Commit 2e95f607 authored by zhangwanglin's avatar zhangwanglin

终止计划更新状态

parent 3a902c27
......@@ -145,6 +145,7 @@ public class SrvTaskServiceImpl implements SrvTaskService {
chSrvTask.setSrvEmpId(Long.parseLong(srvTaskInfoVO.getSrvEmpId()));//服务人员id
chSrvTask.setStatus((short) 1);//状态 未分配:0;已分配:1;已终止2
chSrvTask.setSrvDate(DateUtils.strToDate(taskDetails.get(0)));
chSrvTask.setFcd(new Date());
srvTaskMapper.insert(chSrvTask);
// 服务计划制定方案修改为已生效
ChSrvProgram chSrvProgram = new ChSrvProgram();
......@@ -159,8 +160,12 @@ public class SrvTaskServiceImpl implements SrvTaskService {
// this.updateAttachs(srvTaskInfoVO.getListAttach(), chSrvTask.getSrvTaskId());
} else {
// 修改服务计划
chSrvTaskDetailMapper.delete(new QueryWrapper<ChSrvTaskDetail>().eq("srv_task_id", Long.parseLong(srvTaskId)));//删除原来的计划详情
this.insertTaskDetail(Long.parseLong(srvTaskId), taskDetails);
// chSrvTaskDetailMapper.delete(new QueryWrapper<ChSrvTaskDetail>().eq("srv_task_id", Long.parseLong(srvTaskId)));//删除原来的计划详情
UpdateWrapper updateWrapper1 = new UpdateWrapper();
updateWrapper1.eq("SRV_TASK_ID",srvTaskId);
updateWrapper1.set("STATUS",3);
chSrvTaskDetailMapper.update(null,updateWrapper1);
// this.insertTaskDetail(Long.parseLong(srvTaskId), taskDetails);
//修改服务计划
ChSrvTask chSrvTask = new ChSrvTask();
UpdateWrapper updateWrapper = new UpdateWrapper();
......@@ -203,6 +208,7 @@ public class SrvTaskServiceImpl implements SrvTaskService {
chSrvTaskDetail.setSrvTaskId(srvTaskId);//taskId
chSrvTaskDetail.setSrvDate(DateUtils.strToDate(taskDetail));//服务开始时间
chSrvTaskDetail.setStatus((short) 0);//状态 未执行:0;执行中:1;已执行:2;已失效:3已完成4
chSrvTaskDetail.setFcd(new Date());
chSrvTaskDetailMapper.insert(chSrvTaskDetail);
}
}
......@@ -241,7 +247,7 @@ public class SrvTaskServiceImpl implements SrvTaskService {
int chSrvTaskDetailCount = chSrvTaskDetailMapper
.getSrvTaskDetail(String.valueOf(srvTaskId), dateStr);
if (chSrvTaskDetailCount > 0) {
log.info("{},已经有计划任务了",dateStr);
log.info("{},已经有计划任务了",srvTaskId);
continue;
}
ChSrvTaskDetail chSrvTaskDetail = new ChSrvTaskDetail();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment