Browse Source

任务环节表批次改为long类型,换车平车表任务id换成批次

pt
ma 4 years ago
parent
commit
5ebd2b3895
  1. 12
      wisdomcar/src/main/java/com/ccsens/wisdomcar/bean/po/PatientWisdomCar.java
  2. 48
      wisdomcar/src/main/java/com/ccsens/wisdomcar/bean/po/PatientWisdomCarExample.java
  3. 6
      wisdomcar/src/main/java/com/ccsens/wisdomcar/bean/po/StepTask.java
  4. 20
      wisdomcar/src/main/java/com/ccsens/wisdomcar/bean/po/StepTaskExample.java
  5. 7
      wisdomcar/src/main/java/com/ccsens/wisdomcar/persist/dao/StepTaskDao.java
  6. 2
      wisdomcar/src/main/java/com/ccsens/wisdomcar/service/WisdomCarService.java
  7. 4
      wisdomcar/src/main/resources/mapper_dao/StepTaskDao.xml
  8. 30
      wisdomcar/src/main/resources/mapper_raw/PatientWisdomCarMapper.xml
  9. 14
      wisdomcar/src/main/resources/mapper_raw/StepTaskMapper.xml

12
wisdomcar/src/main/java/com/ccsens/wisdomcar/bean/po/PatientWisdomCar.java

@ -8,7 +8,7 @@ public class PatientWisdomCar implements Serializable {
private Long patientId;
private Long taskSubId;
private Long batch;
private Long carId;
@ -44,12 +44,12 @@ public class PatientWisdomCar implements Serializable {
this.patientId = patientId;
}
public Long getTaskSubId() {
return taskSubId;
public Long getBatch() {
return batch;
}
public void setTaskSubId(Long taskSubId) {
this.taskSubId = taskSubId;
public void setBatch(Long batch) {
this.batch = batch;
}
public Long getCarId() {
@ -124,7 +124,7 @@ public class PatientWisdomCar implements Serializable {
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", patientId=").append(patientId);
sb.append(", taskSubId=").append(taskSubId);
sb.append(", batch=").append(batch);
sb.append(", carId=").append(carId);
sb.append(", startTime=").append(startTime);
sb.append(", endTime=").append(endTime);

48
wisdomcar/src/main/java/com/ccsens/wisdomcar/bean/po/PatientWisdomCarExample.java

@ -225,63 +225,63 @@ public class PatientWisdomCarExample {
return (Criteria) this;
}
public Criteria andTaskSubIdIsNull() {
addCriterion("task_sub_id is null");
public Criteria andBatchIsNull() {
addCriterion("batch is null");
return (Criteria) this;
}
public Criteria andTaskSubIdIsNotNull() {
addCriterion("task_sub_id is not null");
public Criteria andBatchIsNotNull() {
addCriterion("batch is not null");
return (Criteria) this;
}
public Criteria andTaskSubIdEqualTo(Long value) {
addCriterion("task_sub_id =", value, "taskSubId");
public Criteria andBatchEqualTo(Long value) {
addCriterion("batch =", value, "batch");
return (Criteria) this;
}
public Criteria andTaskSubIdNotEqualTo(Long value) {
addCriterion("task_sub_id <>", value, "taskSubId");
public Criteria andBatchNotEqualTo(Long value) {
addCriterion("batch <>", value, "batch");
return (Criteria) this;
}
public Criteria andTaskSubIdGreaterThan(Long value) {
addCriterion("task_sub_id >", value, "taskSubId");
public Criteria andBatchGreaterThan(Long value) {
addCriterion("batch >", value, "batch");
return (Criteria) this;
}
public Criteria andTaskSubIdGreaterThanOrEqualTo(Long value) {
addCriterion("task_sub_id >=", value, "taskSubId");
public Criteria andBatchGreaterThanOrEqualTo(Long value) {
addCriterion("batch >=", value, "batch");
return (Criteria) this;
}
public Criteria andTaskSubIdLessThan(Long value) {
addCriterion("task_sub_id <", value, "taskSubId");
public Criteria andBatchLessThan(Long value) {
addCriterion("batch <", value, "batch");
return (Criteria) this;
}
public Criteria andTaskSubIdLessThanOrEqualTo(Long value) {
addCriterion("task_sub_id <=", value, "taskSubId");
public Criteria andBatchLessThanOrEqualTo(Long value) {
addCriterion("batch <=", value, "batch");
return (Criteria) this;
}
public Criteria andTaskSubIdIn(List<Long> values) {
addCriterion("task_sub_id in", values, "taskSubId");
public Criteria andBatchIn(List<Long> values) {
addCriterion("batch in", values, "batch");
return (Criteria) this;
}
public Criteria andTaskSubIdNotIn(List<Long> values) {
addCriterion("task_sub_id not in", values, "taskSubId");
public Criteria andBatchNotIn(List<Long> values) {
addCriterion("batch not in", values, "batch");
return (Criteria) this;
}
public Criteria andTaskSubIdBetween(Long value1, Long value2) {
addCriterion("task_sub_id between", value1, value2, "taskSubId");
public Criteria andBatchBetween(Long value1, Long value2) {
addCriterion("batch between", value1, value2, "batch");
return (Criteria) this;
}
public Criteria andTaskSubIdNotBetween(Long value1, Long value2) {
addCriterion("task_sub_id not between", value1, value2, "taskSubId");
public Criteria andBatchNotBetween(Long value1, Long value2) {
addCriterion("batch not between", value1, value2, "batch");
return (Criteria) this;
}

6
wisdomcar/src/main/java/com/ccsens/wisdomcar/bean/po/StepTask.java

@ -12,7 +12,7 @@ public class StepTask implements Serializable {
private Long patientId;
private Integer batch;
private Long batch;
private Date createdAt;
@ -54,11 +54,11 @@ public class StepTask implements Serializable {
this.patientId = patientId;
}
public Integer getBatch() {
public Long getBatch() {
return batch;
}
public void setBatch(Integer batch) {
public void setBatch(Long batch) {
this.batch = batch;
}

20
wisdomcar/src/main/java/com/ccsens/wisdomcar/bean/po/StepTaskExample.java

@ -355,52 +355,52 @@ public class StepTaskExample {
return (Criteria) this;
}
public Criteria andBatchEqualTo(Integer value) {
public Criteria andBatchEqualTo(Long value) {
addCriterion("batch =", value, "batch");
return (Criteria) this;
}
public Criteria andBatchNotEqualTo(Integer value) {
public Criteria andBatchNotEqualTo(Long value) {
addCriterion("batch <>", value, "batch");
return (Criteria) this;
}
public Criteria andBatchGreaterThan(Integer value) {
public Criteria andBatchGreaterThan(Long value) {
addCriterion("batch >", value, "batch");
return (Criteria) this;
}
public Criteria andBatchGreaterThanOrEqualTo(Integer value) {
public Criteria andBatchGreaterThanOrEqualTo(Long value) {
addCriterion("batch >=", value, "batch");
return (Criteria) this;
}
public Criteria andBatchLessThan(Integer value) {
public Criteria andBatchLessThan(Long value) {
addCriterion("batch <", value, "batch");
return (Criteria) this;
}
public Criteria andBatchLessThanOrEqualTo(Integer value) {
public Criteria andBatchLessThanOrEqualTo(Long value) {
addCriterion("batch <=", value, "batch");
return (Criteria) this;
}
public Criteria andBatchIn(List<Integer> values) {
public Criteria andBatchIn(List<Long> values) {
addCriterion("batch in", values, "batch");
return (Criteria) this;
}
public Criteria andBatchNotIn(List<Integer> values) {
public Criteria andBatchNotIn(List<Long> values) {
addCriterion("batch not in", values, "batch");
return (Criteria) this;
}
public Criteria andBatchBetween(Integer value1, Integer value2) {
public Criteria andBatchBetween(Long value1, Long value2) {
addCriterion("batch between", value1, value2, "batch");
return (Criteria) this;
}
public Criteria andBatchNotBetween(Integer value1, Integer value2) {
public Criteria andBatchNotBetween(Long value1, Long value2) {
addCriterion("batch not between", value1, value2, "batch");
return (Criteria) this;
}

7
wisdomcar/src/main/java/com/ccsens/wisdomcar/persist/dao/StepTaskDao.java

@ -42,4 +42,11 @@ public interface StepTaskDao extends StepTaskMapper {
* @return 0不存在
*/
Integer findTaskIsTriageTask(Long taskSubId);
/**
* 查找对应绑定平车的任务ID
* @param taskSubId 查询的任务ID
* @return 绑定平车任务ID
*/
ProjectVo.BindCar getBindCarByTaskNew(@Param("taskSubId") Long taskSubId);
}

2
wisdomcar/src/main/java/com/ccsens/wisdomcar/service/WisdomCarService.java

@ -252,7 +252,7 @@ public class WisdomCarService implements IWisdomCarService {
for (ProjectVo.TaskSub taskSub : taskDetail.getTaskSubList()) {
StepTask stepTask = new StepTask();
stepTask.setId(snowflake.nextId());
stepTask.setBatch(1);
stepTask.setBatch(1L);
stepTask.setPatientId(patient.getId());
stepTask.setTaskSubId(taskSub.getTaskSubId());
if (CollectionUtil.isNotEmpty(steps)){

4
wisdomcar/src/main/resources/mapper_dao/StepTaskDao.xml

@ -47,4 +47,8 @@
AND step_id = 29
AND rec_status = 0
</select>
<select id="getBindCarByTaskNew" resultType="com.ccsens.wisdomcar.bean.vo.ProjectVo$BindCar">
</select>
</mapper>

30
wisdomcar/src/main/resources/mapper_raw/PatientWisdomCarMapper.xml

@ -4,7 +4,7 @@
<resultMap id="BaseResultMap" type="com.ccsens.wisdomcar.bean.po.PatientWisdomCar">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="patient_id" jdbcType="BIGINT" property="patientId" />
<result column="task_sub_id" jdbcType="BIGINT" property="taskSubId" />
<result column="batch" jdbcType="BIGINT" property="batch" />
<result column="car_id" jdbcType="BIGINT" property="carId" />
<result column="start_time" jdbcType="BIGINT" property="startTime" />
<result column="end_time" jdbcType="BIGINT" property="endTime" />
@ -73,7 +73,7 @@
</where>
</sql>
<sql id="Base_Column_List">
id, patient_id, task_sub_id, car_id, start_time, end_time, is_demo, created_at, updated_at,
id, patient_id, batch, car_id, start_time, end_time, is_demo, created_at, updated_at,
rec_status, binding_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.wisdomcar.bean.po.PatientWisdomCarExample" resultMap="BaseResultMap">
@ -107,11 +107,11 @@
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.wisdomcar.bean.po.PatientWisdomCar">
insert into t_patient_wisdom_car (id, patient_id, task_sub_id,
insert into t_patient_wisdom_car (id, patient_id, batch,
car_id, start_time, end_time,
is_demo, created_at, updated_at,
is_demo, created_at, updated_at,
rec_status, binding_status)
values (#{id,jdbcType=BIGINT}, #{patientId,jdbcType=BIGINT}, #{taskSubId,jdbcType=BIGINT},
values (#{id,jdbcType=BIGINT}, #{patientId,jdbcType=BIGINT}, #{batch,jdbcType=BIGINT},
#{carId,jdbcType=BIGINT}, #{startTime,jdbcType=BIGINT}, #{endTime,jdbcType=BIGINT},
#{isDemo,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
#{recStatus,jdbcType=TINYINT}, #{bindingStatus,jdbcType=TINYINT})
@ -125,8 +125,8 @@
<if test="patientId != null">
patient_id,
</if>
<if test="taskSubId != null">
task_sub_id,
<if test="batch != null">
batch,
</if>
<if test="carId != null">
car_id,
@ -160,8 +160,8 @@
<if test="patientId != null">
#{patientId,jdbcType=BIGINT},
</if>
<if test="taskSubId != null">
#{taskSubId,jdbcType=BIGINT},
<if test="batch != null">
#{batch,jdbcType=BIGINT},
</if>
<if test="carId != null">
#{carId,jdbcType=BIGINT},
@ -204,8 +204,8 @@
<if test="record.patientId != null">
patient_id = #{record.patientId,jdbcType=BIGINT},
</if>
<if test="record.taskSubId != null">
task_sub_id = #{record.taskSubId,jdbcType=BIGINT},
<if test="record.batch != null">
batch = #{record.batch,jdbcType=BIGINT},
</if>
<if test="record.carId != null">
car_id = #{record.carId,jdbcType=BIGINT},
@ -240,7 +240,7 @@
update t_patient_wisdom_car
set id = #{record.id,jdbcType=BIGINT},
patient_id = #{record.patientId,jdbcType=BIGINT},
task_sub_id = #{record.taskSubId,jdbcType=BIGINT},
batch = #{record.batch,jdbcType=BIGINT},
car_id = #{record.carId,jdbcType=BIGINT},
start_time = #{record.startTime,jdbcType=BIGINT},
end_time = #{record.endTime,jdbcType=BIGINT},
@ -259,8 +259,8 @@
<if test="patientId != null">
patient_id = #{patientId,jdbcType=BIGINT},
</if>
<if test="taskSubId != null">
task_sub_id = #{taskSubId,jdbcType=BIGINT},
<if test="batch != null">
batch = #{batch,jdbcType=BIGINT},
</if>
<if test="carId != null">
car_id = #{carId,jdbcType=BIGINT},
@ -292,7 +292,7 @@
<update id="updateByPrimaryKey" parameterType="com.ccsens.wisdomcar.bean.po.PatientWisdomCar">
update t_patient_wisdom_car
set patient_id = #{patientId,jdbcType=BIGINT},
task_sub_id = #{taskSubId,jdbcType=BIGINT},
batch = #{batch,jdbcType=BIGINT},
car_id = #{carId,jdbcType=BIGINT},
start_time = #{startTime,jdbcType=BIGINT},
end_time = #{endTime,jdbcType=BIGINT},

14
wisdomcar/src/main/resources/mapper_raw/StepTaskMapper.xml

@ -6,7 +6,7 @@
<result column="step_id" jdbcType="BIGINT" property="stepId" />
<result column="task_sub_id" jdbcType="BIGINT" property="taskSubId" />
<result column="patient_id" jdbcType="BIGINT" property="patientId" />
<result column="batch" jdbcType="INTEGER" property="batch" />
<result column="batch" jdbcType="BIGINT" property="batch" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
@ -107,7 +107,7 @@
patient_id, batch, created_at,
updated_at, rec_status)
values (#{id,jdbcType=BIGINT}, #{stepId,jdbcType=BIGINT}, #{taskSubId,jdbcType=BIGINT},
#{patientId,jdbcType=BIGINT}, #{batch,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP},
#{patientId,jdbcType=BIGINT}, #{batch,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.wisdomcar.bean.po.StepTask">
@ -152,7 +152,7 @@
#{patientId,jdbcType=BIGINT},
</if>
<if test="batch != null">
#{batch,jdbcType=INTEGER},
#{batch,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
@ -187,7 +187,7 @@
patient_id = #{record.patientId,jdbcType=BIGINT},
</if>
<if test="record.batch != null">
batch = #{record.batch,jdbcType=INTEGER},
batch = #{record.batch,jdbcType=BIGINT},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
@ -209,7 +209,7 @@
step_id = #{record.stepId,jdbcType=BIGINT},
task_sub_id = #{record.taskSubId,jdbcType=BIGINT},
patient_id = #{record.patientId,jdbcType=BIGINT},
batch = #{record.batch,jdbcType=INTEGER},
batch = #{record.batch,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
@ -230,7 +230,7 @@
patient_id = #{patientId,jdbcType=BIGINT},
</if>
<if test="batch != null">
batch = #{batch,jdbcType=INTEGER},
batch = #{batch,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
@ -249,7 +249,7 @@
set step_id = #{stepId,jdbcType=BIGINT},
task_sub_id = #{taskSubId,jdbcType=BIGINT},
patient_id = #{patientId,jdbcType=BIGINT},
batch = #{batch,jdbcType=INTEGER},
batch = #{batch,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}

Loading…
Cancel
Save