|
|
@ -2,6 +2,7 @@ package com.ccsens.wisdomcar.service; |
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil; |
|
|
|
import cn.hutool.core.lang.Snowflake; |
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
import com.ccsens.util.CodeEnum; |
|
|
|
import com.ccsens.util.exception.BaseException; |
|
|
|
import com.ccsens.util.message.SwitchoverProjectUtil; |
|
|
@ -66,12 +67,17 @@ public class ProjectService implements IProjectService { |
|
|
|
|
|
|
|
@Override |
|
|
|
public void saveData(Long startTime, StepTask stepTask, Long operationId, byte operation) { |
|
|
|
//患者平车id
|
|
|
|
Long patientCarId = null; |
|
|
|
// 判断是否为结束结点
|
|
|
|
Step step = stepDao.selectByPrimaryKey(stepTask.getStepId()); |
|
|
|
Integer max = stepDao.getMaxSequence(Constant.STEP_TYPE_REAL); |
|
|
|
if (step != null && max != null && step.getSequence() != null && step.getSequence().intValue() == max.intValue()) { |
|
|
|
// 修改平车结束时间点
|
|
|
|
ProjectVo.BindCar bindCar = stepTaskDao.getBindCarTaskId(stepTask.getTaskSubId()); |
|
|
|
if(ObjectUtil.isNotNull(bindCar)){ |
|
|
|
patientCarId = bindCar.getCarId(); |
|
|
|
} |
|
|
|
boolean needModifyEndTime = bindCar != null && (bindCar.getEndTime() == null || bindCar.getEndTime() == 0); |
|
|
|
if (needModifyEndTime) { |
|
|
|
log.info("出现异常,未找到绑定平车:{}", stepTask.getTaskSubId()); |
|
|
@ -107,6 +113,8 @@ public class ProjectService implements IProjectService { |
|
|
|
} else { |
|
|
|
data.setWisdomCarRecordId(operationId); |
|
|
|
} |
|
|
|
data.setPatientCarId(patientCarId); |
|
|
|
|
|
|
|
data.setTaskSubId(stepTask.getTaskSubId()); |
|
|
|
data.setStepId(stepTask.getStepId()); |
|
|
|
data.setPushStatus(Constant.PUSH_STATUS_NO); |
|
|
|