diff --git a/.gitignore b/.gitignore index bb34a739..073a0423 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ gen hs_err_pid* mbg.xml resources/mbg.xml +resources/application.yml diff --git a/tall/src/main/java/com/ccsens/tall/bean/vo/TaskVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/TaskVo.java index acd62ac0..44e5c8c2 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/vo/TaskVo.java +++ b/tall/src/main/java/com/ccsens/tall/bean/vo/TaskVo.java @@ -85,6 +85,7 @@ public class TaskVo { } return null; } + } @ApiModel @Data @@ -137,6 +138,8 @@ public class TaskVo { private BigDecimal money; @ApiModelProperty("状态:0-未开始,1-进行中,2-已完成") private int process; + @ApiModelProperty("任务进行状态:0-未开始,1-进行中,2-已结束") + private int taskProgress; @ApiModelProperty("子项目id") private Long subProjectId; @ApiModelProperty("子项目名字") @@ -178,6 +181,30 @@ public class TaskVo { @ApiModelProperty("任务创建人(userId)") private String buildUser; + public int getTaskProgress() { + long now = System.currentTimeMillis(); + if(delay == 2){ + if(realBeginTime != null && realBeginTime != 0){ + if(realEndTime == null || realEndTime == 0){ + return 1; + } + return 2; + } + } + if(delay == 0){ + if(beginTime != null && endTime != null){ + if(beginTime > now){ + return 0; + } + if(endTime < now){ + return 2; + } + return 1; + } + } + return taskProgress; + } + public Long getDuration(){ if(ObjectUtil.isNotNull(beginTime) && ObjectUtil.isNotNull(endTime)) { return endTime - beginTime; diff --git a/tall/src/main/resources/application.yml b/tall/src/main/resources/application.yml index e75cc2c3..ee27f352 100644 --- a/tall/src/main/resources/application.yml +++ b/tall/src/main/resources/application.yml @@ -1,5 +1,6 @@ spring: profiles: - active: prod - include: util-prod,common + active: test + include: util-test,common + diff --git a/tall/src/main/resources/mapper_raw/ProRoleMapper.xml b/tall/src/main/resources/mapper_raw/ProRoleMapper.xml index 1e28879b..489aa8c5 100644 --- a/tall/src/main/resources/mapper_raw/ProRoleMapper.xml +++ b/tall/src/main/resources/mapper_raw/ProRoleMapper.xml @@ -86,7 +86,7 @@ - order by ${orderByClause} + order by ${orderByClause} + Select + c.id + From + `t_patient_wisdom_car` c + WHERE c.task_sub_id=#{id} + order by + c.`created_at` + desc + limit 1 + + \ No newline at end of file diff --git a/wisdomcar/src/main/resources/mapper_raw/PatientInformationRecordMapper.xml b/wisdomcar/src/main/resources/mapper_raw/PatientInformationRecordMapper.xml new file mode 100644 index 00000000..f3ae6ac9 --- /dev/null +++ b/wisdomcar/src/main/resources/mapper_raw/PatientInformationRecordMapper.xml @@ -0,0 +1,259 @@ + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, patient_car_id, task_sub_id, information_type, content, created_at, updated_at, + rec_status + + + + + delete from t_patient_information_record + where id = #{id,jdbcType=BIGINT} + + + delete from t_patient_information_record + + + + + + insert into t_patient_information_record (id, patient_car_id, task_sub_id, + information_type, content, created_at, + updated_at, rec_status) + values (#{id,jdbcType=BIGINT}, #{patientCarId,jdbcType=BIGINT}, #{taskSubId,jdbcType=BIGINT}, + #{informationType,jdbcType=TINYINT}, #{content,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, + #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) + + + insert into t_patient_information_record + + + id, + + + patient_car_id, + + + task_sub_id, + + + information_type, + + + content, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{patientCarId,jdbcType=BIGINT}, + + + #{taskSubId,jdbcType=BIGINT}, + + + #{informationType,jdbcType=TINYINT}, + + + #{content,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_patient_information_record + + + id = #{record.id,jdbcType=BIGINT}, + + + patient_car_id = #{record.patientCarId,jdbcType=BIGINT}, + + + task_sub_id = #{record.taskSubId,jdbcType=BIGINT}, + + + information_type = #{record.informationType,jdbcType=TINYINT}, + + + content = #{record.content,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_patient_information_record + set id = #{record.id,jdbcType=BIGINT}, + patient_car_id = #{record.patientCarId,jdbcType=BIGINT}, + task_sub_id = #{record.taskSubId,jdbcType=BIGINT}, + information_type = #{record.informationType,jdbcType=TINYINT}, + content = #{record.content,jdbcType=VARCHAR}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_patient_information_record + + + patient_car_id = #{patientCarId,jdbcType=BIGINT}, + + + task_sub_id = #{taskSubId,jdbcType=BIGINT}, + + + information_type = #{informationType,jdbcType=TINYINT}, + + + content = #{content,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_patient_information_record + set patient_car_id = #{patientCarId,jdbcType=BIGINT}, + task_sub_id = #{taskSubId,jdbcType=BIGINT}, + information_type = #{informationType,jdbcType=TINYINT}, + content = #{content,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/wisdomcar/src/main/resources/mapper_raw/PatientWisdomCarMapper.xml b/wisdomcar/src/main/resources/mapper_raw/PatientWisdomCarMapper.xml index af2284c8..4021aeef 100644 --- a/wisdomcar/src/main/resources/mapper_raw/PatientWisdomCarMapper.xml +++ b/wisdomcar/src/main/resources/mapper_raw/PatientWisdomCarMapper.xml @@ -73,7 +73,7 @@ - id, patient_id, task_sub_id, car_id, start_time, end_time, is_demo, created_at, updated_at, + id, patient_id, task_sub_id, car_id, start_time, end_time, is_demo, created_at, updated_at, rec_status, binding_status