Commit 608078e9 authored by zhangwanglin's avatar zhangwanglin

补卡修改

parent 44e1e30a
...@@ -742,7 +742,15 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -742,7 +742,15 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
@Override @Override
public SrvTaskCardRespDTO getSrvTaskCardInfo(String taskDetailId){ public SrvTaskCardRespDTO getSrvTaskCardInfo(String taskDetailId){
List<SrvTaskRespVO> records = taskDetailMapper.getSrvTaskCardInfo(taskDetailId); List<SrvTaskRespVO> records = taskDetailMapper.getSrvTaskCardInfo(taskDetailId);
List<ItemRespVO> itemRespVOS = new ArrayList<>();
for (SrvTaskRespVO record : records) {
ItemRespVO itemRespVO = new ItemRespVO();
itemRespVO.setItemId(record.getItemId());
itemRespVO.setItemName(record.getItemName());
itemRespVOS.add(itemRespVO);
}
SrvTaskCardRespDTO srvTaskCardRespDTO = new SrvTaskCardRespDTO(); SrvTaskCardRespDTO srvTaskCardRespDTO = new SrvTaskCardRespDTO();
srvTaskCardRespDTO.setItemsList(itemRespVOS);
List<String> collect = records.stream().map(SrvTaskRespVO::getItemName).collect(Collectors.toList()); List<String> collect = records.stream().map(SrvTaskRespVO::getItemName).collect(Collectors.toList());
String join = StringUtils.join(collect, ","); String join = StringUtils.join(collect, ",");
srvTaskCardRespDTO.setItemName(join); srvTaskCardRespDTO.setItemName(join);
...@@ -754,7 +762,13 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -754,7 +762,13 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
srvTaskCardRespDTO.setAuditor(records.get(0).getAuditor()); srvTaskCardRespDTO.setAuditor(records.get(0).getAuditor());
srvTaskCardRespDTO.setStatus(records.get(0).getStatus()); srvTaskCardRespDTO.setStatus(records.get(0).getStatus());
srvTaskCardRespDTO.setReason(records.get(0).getReason()); srvTaskCardRespDTO.setReason(records.get(0).getReason());
srvTaskCardRespDTO.setSrvOrganId(records.get(0).getSrvOrganId());
srvTaskCardRespDTO.setModeId(records.get(0).getModeId());
srvTaskCardRespDTO.setEmpId(records.get(0).getEmpId());
srvTaskCardRespDTO.setAuditRemark(records.get(0).getAuditRemark()); srvTaskCardRespDTO.setAuditRemark(records.get(0).getAuditRemark());
srvTaskCardRespDTO.setTaskDetailId(records.get(0).getTaskDetailId());
srvTaskCardRespDTO.setDisabInfoId(records.get(0).getDisabInfoId());
srvTaskCardRespDTO.setSrvTaskId(Long.parseLong(records.get(0).getSrvTaskId()));
Result<List<ChFndAttach>> listResult = attachFeignService.selectAttachs(Long.valueOf(taskDetailId), AttachType.DISABLE.getUploadType()); Result<List<ChFndAttach>> listResult = attachFeignService.selectAttachs(Long.valueOf(taskDetailId), AttachType.DISABLE.getUploadType());
if (listResult.getCode().equals(ResultCode.SUCCESS.getCode())) { if (listResult.getCode().equals(ResultCode.SUCCESS.getCode())) {
srvTaskCardRespDTO.setFileDataList(listResult.getData()); srvTaskCardRespDTO.setFileDataList(listResult.getData());
......
...@@ -98,6 +98,9 @@ ...@@ -98,6 +98,9 @@
detail.check_status status, detail.check_status status,
detail.clock_reason reason, detail.clock_reason reason,
detail.auditor, detail.auditor,
detail.srv_task_id srvTaskId,
detail.task_detail_id taskDetailId,
info.srv_mode_id modeId,
detail.audit_remark auditRemark detail.audit_remark auditRemark
from ch_srv_plan plan from ch_srv_plan plan
left join ch_disable_info info on plan.DISAB_INFO_ID = info.DISAB_INFO_ID left join ch_disable_info info on plan.DISAB_INFO_ID = info.DISAB_INFO_ID
......
package com.hungraim.ltc.pojo.vo.account;
import lombok.Data;
/**
* @author zwl
* @ClassName ItemRespVO
* @description
* @date 2023/9/21 20:57
**/
@Data
public class ItemRespVO {
// 任务名称
private String itemName;
// 任务名称
private Long itemId;
}
...@@ -23,12 +23,23 @@ public class SrvTaskCardRespDTO { ...@@ -23,12 +23,23 @@ public class SrvTaskCardRespDTO {
// 护理人员 // 护理人员
private String empName; private String empName;
private String empId;
private String modeId;
private String disabInfoId;
private String srvOrganId;
private Long srvTaskId;
// 任务时间 // 任务时间
private String srvDate; private String srvDate;
// 任务名称 // 任务名称
private String itemName; private String itemName;
private List<ItemRespVO> itemsList;
private Long status; private Long status;
// 服务方式 // 服务方式
...@@ -40,5 +51,8 @@ public class SrvTaskCardRespDTO { ...@@ -40,5 +51,8 @@ public class SrvTaskCardRespDTO {
private String auditRemark; private String auditRemark;
private Long taskDetailId;
private List<ChFndAttach> fileDataList; private List<ChFndAttach> fileDataList;
} }
...@@ -18,6 +18,13 @@ public class SrvTaskRespVO { ...@@ -18,6 +18,13 @@ public class SrvTaskRespVO {
// 护理机构 // 护理机构
private String srvOrganName; private String srvOrganName;
private String modeId;
private String srvTaskId;
// 护理人员 // 护理人员
private String empName; private String empName;
......
...@@ -2,6 +2,7 @@ package com.hungraim.ltc.governance.controller; ...@@ -2,6 +2,7 @@ package com.hungraim.ltc.governance.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.governance.service.SrvTaskService; import com.hungraim.ltc.governance.service.SrvTaskService;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach;
import com.hungraim.ltc.pojo.vo.governance.*; import com.hungraim.ltc.pojo.vo.governance.*;
import com.hungraim.ltc.util.Result; import com.hungraim.ltc.util.Result;
import com.hungraim.ltc.util.ResultCode; import com.hungraim.ltc.util.ResultCode;
...@@ -14,6 +15,7 @@ import org.springframework.web.bind.annotation.*; ...@@ -14,6 +15,7 @@ import org.springframework.web.bind.annotation.*;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
/** /**
* 服务计划Controller * 服务计划Controller
...@@ -166,11 +168,42 @@ public class SrvTaskController { ...@@ -166,11 +168,42 @@ public class SrvTaskController {
if (srvPlanInputVO.getDisabInfoId() == null) { if (srvPlanInputVO.getDisabInfoId() == null) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR); return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
} }
List<ChFndAttach> fileDataList = srvPlanInputVO.getFileDataList();
if(fileDataList.size() < 2 ){
return Result.failed("护理记录单复印件、医疗养老上门补单申请表至少各一张");
}
List<String> collect1 = fileDataList.stream().map(ChFndAttach::getFileName)
.distinct().collect(Collectors.toList());
boolean ss = (collect1.size()!=fileDataList.size())? true: false;
if(ss){
return Result.failed("上传的附件不可重复");
}
Integer userId = TokenParsingUtil.TokenParsing(token, "userId"); Integer userId = TokenParsingUtil.TokenParsing(token, "userId");
srvPlanInputVO.setAdmin(String.valueOf(userId)); srvPlanInputVO.setAdmin(String.valueOf(userId));
return srvTaskService.saveApplyCard(srvPlanInputVO); return srvTaskService.saveApplyCard(srvPlanInputVO);
} }
@PostMapping("/updateApplyCard")
public Result updateApplyCard(@RequestHeader("Authorization") String token,SrvPlanInputVO srvPlanInputVO){
if (srvPlanInputVO.getDisabInfoId() == null) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
List<ChFndAttach> fileDataList = srvPlanInputVO.getFileDataList();
if(fileDataList.size() < 2 ){
return Result.failed("护理记录单复印件、医疗养老上门补单申请表至少各一张");
}
List<String> collect1 = fileDataList.stream().map(ChFndAttach::getFileName)
.distinct().collect(Collectors.toList());
boolean ss = (collect1.size()!=fileDataList.size())? true: false;
if(ss){
return Result.failed("上传的附件不可重复");
}
Integer userId = TokenParsingUtil.TokenParsing(token, "userId");
srvPlanInputVO.setAdmin(String.valueOf(userId));
return srvTaskService.updateApplyCard(srvPlanInputVO);
}
@PostMapping("/auditingCard") @PostMapping("/auditingCard")
public Result auditingCard(AuditingCardVO auditingCardVO){ public Result auditingCard(AuditingCardVO auditingCardVO){
return srvTaskService.auditingCard(auditingCardVO); return srvTaskService.auditingCard(auditingCardVO);
......
...@@ -41,6 +41,8 @@ public interface SrvTaskService { ...@@ -41,6 +41,8 @@ public interface SrvTaskService {
// 补卡 // 补卡
Result saveApplyCard(SrvPlanInputVO srvPlanInputVO); Result saveApplyCard(SrvPlanInputVO srvPlanInputVO);
Result updateApplyCard(SrvPlanInputVO srvPlanInputVO);
Result auditingCard(AuditingCardVO auditingCardVO); Result auditingCard(AuditingCardVO auditingCardVO);
Result queryItemBySrvOrganId(Long srvOrganId); Result queryItemBySrvOrganId(Long srvOrganId);
......
...@@ -77,7 +77,7 @@ public class SrvTaskServiceImpl implements SrvTaskService { ...@@ -77,7 +77,7 @@ public class SrvTaskServiceImpl implements SrvTaskService {
*/ */
@Override @Override
public Page<SrvTaskDetailVO> getSrvTaskDetailList(Page<SrvTaskDetailVO> page, Integer organId, String disableName, String disableTel, String empName, String certifNum, String srvDate, Date startTime, Date endTime, String status, String modeId) { public Page<SrvTaskDetailVO> getSrvTaskDetailList(Page<SrvTaskDetailVO> page, Integer organId, String disableName, String disableTel, String empName, String certifNum, String srvDate, Date startTime, Date endTime, String status, String modeId) {
return srvTaskMapper.getSrvTaskDetailList(page, organId, disableName, disableTel, empName, certifNum, srvDate,startTime, endTime, status, modeId); return srvTaskMapper.getSrvTaskDetailList(page, organId, disableName, disableTel, empName, certifNum, srvDate, startTime, endTime, status, modeId);
} }
/** /**
...@@ -161,7 +161,7 @@ public class SrvTaskServiceImpl implements SrvTaskService { ...@@ -161,7 +161,7 @@ public class SrvTaskServiceImpl implements SrvTaskService {
//添加服务计划详情 //添加服务计划详情
Long newSrvTaskId = chSrvTask.getSrvTaskId(); Long newSrvTaskId = chSrvTask.getSrvTaskId();
this.insertTaskDetail(newSrvTaskId, taskDetails); this.insertTaskDetail(newSrvTaskId, taskDetails);
saveSrvPlan(programId,null); saveSrvPlan(programId, null);
//添加附件 //添加附件
// this.updateAttachs(srvTaskInfoVO.getListAttach(), chSrvTask.getSrvTaskId()); // this.updateAttachs(srvTaskInfoVO.getListAttach(), chSrvTask.getSrvTaskId());
} else { } else {
...@@ -177,14 +177,14 @@ public class SrvTaskServiceImpl implements SrvTaskService { ...@@ -177,14 +177,14 @@ public class SrvTaskServiceImpl implements SrvTaskService {
//修改服务计划 //修改服务计划
ChSrvTask chSrvTask = new ChSrvTask(); ChSrvTask chSrvTask = new ChSrvTask();
UpdateWrapper updateWrapper = new UpdateWrapper(); UpdateWrapper updateWrapper = new UpdateWrapper();
updateWrapper.eq("SRV_TASK_ID",srvTaskId); updateWrapper.eq("SRV_TASK_ID", srvTaskId);
//状态 未分配:0;已分配:1;已终止2 //状态 未分配:0;已分配:1;已终止2
updateWrapper.set("STATUS",srvTaskInfoVO.getTaskStatus()); updateWrapper.set("STATUS", srvTaskInfoVO.getTaskStatus());
updateWrapper.set("LCD",new Date()); updateWrapper.set("LCD", new Date());
updateWrapper.set("LCU",param.getUserId()); updateWrapper.set("LCU", param.getUserId());
updateWrapper.set("END_REASON",srvTaskInfoVO.getEndReason()); updateWrapper.set("END_REASON", srvTaskInfoVO.getEndReason());
srvTaskMapper.update(null,updateWrapper); srvTaskMapper.update(null, updateWrapper);
//修改附件 //修改附件
// this.updateAttachs(srvTaskInfoVO.getListAttach(), Long.parseLong(srvTaskId)); // this.updateAttachs(srvTaskInfoVO.getListAttach(), Long.parseLong(srvTaskId));
} }
...@@ -192,8 +192,8 @@ public class SrvTaskServiceImpl implements SrvTaskService { ...@@ -192,8 +192,8 @@ public class SrvTaskServiceImpl implements SrvTaskService {
} }
public void saveSrvPlan(String programId,String srvPlanTime){ public void saveSrvPlan(String programId, String srvPlanTime) {
List<ChSrvPlan> chSrvPlans = chSrvPlanMapper.queryPlan(programId,srvPlanTime); List<ChSrvPlan> chSrvPlans = chSrvPlanMapper.queryPlan(programId, srvPlanTime);
for (ChSrvPlan chSrvPlan : chSrvPlans) { for (ChSrvPlan chSrvPlan : chSrvPlans) {
chSrvPlan.setCreationTime(new Date()); chSrvPlan.setCreationTime(new Date());
chSrvPlanMapper.insert(chSrvPlan); chSrvPlanMapper.insert(chSrvPlan);
...@@ -202,7 +202,7 @@ public class SrvTaskServiceImpl implements SrvTaskService { ...@@ -202,7 +202,7 @@ public class SrvTaskServiceImpl implements SrvTaskService {
// mode_id 4 // mode_id 4
@Override @Override
public void otherPlaceHandler(String programId){ public void otherPlaceHandler(String programId) {
accountFeignService.getOtherPlace(programId); accountFeignService.getOtherPlace(programId);
} }
...@@ -242,8 +242,8 @@ public class SrvTaskServiceImpl implements SrvTaskService { ...@@ -242,8 +242,8 @@ public class SrvTaskServiceImpl implements SrvTaskService {
Date programEdnDate = chSrvProgram.getProgramEdnDate(); Date programEdnDate = chSrvProgram.getProgramEdnDate();
String programEdnDateStr = DateUtils.dateToStr(programEdnDate); String programEdnDateStr = DateUtils.dateToStr(programEdnDate);
int i = chSrvSendMapper.updateSrvSendInfo(disabInfoId, programEdnDateStr); int i = chSrvSendMapper.updateSrvSendInfo(disabInfoId, programEdnDateStr);
if(i >0 ){ if (i > 0) {
log.info("服务分配{}终止成功",disabInfoId); log.info("服务分配{}终止成功", disabInfoId);
} }
} }
} }
...@@ -258,7 +258,7 @@ public class SrvTaskServiceImpl implements SrvTaskService { ...@@ -258,7 +258,7 @@ public class SrvTaskServiceImpl implements SrvTaskService {
int chSrvTaskDetailCount = chSrvTaskDetailMapper int chSrvTaskDetailCount = chSrvTaskDetailMapper
.getSrvTaskDetail(String.valueOf(srvTaskId), dateStr); .getSrvTaskDetail(String.valueOf(srvTaskId), dateStr);
if (chSrvTaskDetailCount > 0) { if (chSrvTaskDetailCount > 0) {
log.info("{},已经有计划任务了",srvTaskId); log.info("{},已经有计划任务了", srvTaskId);
continue; continue;
} }
ChSrvTaskDetail chSrvTaskDetail = new ChSrvTaskDetail(); ChSrvTaskDetail chSrvTaskDetail = new ChSrvTaskDetail();
...@@ -269,7 +269,7 @@ public class SrvTaskServiceImpl implements SrvTaskService { ...@@ -269,7 +269,7 @@ public class SrvTaskServiceImpl implements SrvTaskService {
chSrvTaskDetailMapper.insert(chSrvTaskDetail); chSrvTaskDetailMapper.insert(chSrvTaskDetail);
// ch_srv_plan // ch_srv_plan
String programId = chSrvTask.getProgramId(); String programId = chSrvTask.getProgramId();
saveSrvPlan(programId,dateStr); saveSrvPlan(programId, dateStr);
} }
} }
...@@ -277,8 +277,8 @@ public class SrvTaskServiceImpl implements SrvTaskService { ...@@ -277,8 +277,8 @@ public class SrvTaskServiceImpl implements SrvTaskService {
// 补卡 // 补卡
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Override @Override
public Result saveApplyCard(SrvPlanInputVO srvPlanInputVO){ public Result saveApplyCard(SrvPlanInputVO srvPlanInputVO) {
log.info("SrvTaskServiceImpl=======saveApplyCard:{}",JSON.toJSONString(srvPlanInputVO)); log.info("SrvTaskServiceImpl=======saveApplyCard:{}", JSON.toJSONString(srvPlanInputVO));
Long taskDetailId = null; Long taskDetailId = null;
// 先查询是否有计划,有计划了不再生成计划 // 先查询是否有计划,有计划了不再生成计划
List<ChSrvTaskDetail> chSrvTaskDetailList = chSrvTaskDetailMapper.selectList(new LambdaQueryWrapper<ChSrvTaskDetail>() List<ChSrvTaskDetail> chSrvTaskDetailList = chSrvTaskDetailMapper.selectList(new LambdaQueryWrapper<ChSrvTaskDetail>()
...@@ -288,9 +288,9 @@ public class SrvTaskServiceImpl implements SrvTaskService { ...@@ -288,9 +288,9 @@ public class SrvTaskServiceImpl implements SrvTaskService {
if (CollectionUtil.isNotEmpty(chSrvTaskDetailList)) { if (CollectionUtil.isNotEmpty(chSrvTaskDetailList)) {
ChSrvTaskDetail chSrvTaskDetail = chSrvTaskDetailList.get(0); ChSrvTaskDetail chSrvTaskDetail = chSrvTaskDetailList.get(0);
taskDetailId = chSrvTaskDetail.getTaskDetailId(); taskDetailId = chSrvTaskDetail.getTaskDetailId();
if(modeId == 3){ if (modeId == 3) {
int status = chSrvTaskDetailList.stream().map(ChSrvTaskDetail::getStatus).findFirst().orElse((short)0); int status = chSrvTaskDetailList.stream().map(ChSrvTaskDetail::getStatus).findFirst().orElse((short) 0);
if(status == 1 || status == 4) { if (status == 1 || status == 4) {
return Result.failed("手机app已有任务,不可重复生成"); return Result.failed("手机app已有任务,不可重复生成");
} }
ChSrvTaskDetail chSrvTaskDetailDTO = new ChSrvTaskDetail(); ChSrvTaskDetail chSrvTaskDetailDTO = new ChSrvTaskDetail();
...@@ -306,10 +306,10 @@ public class SrvTaskServiceImpl implements SrvTaskService { ...@@ -306,10 +306,10 @@ public class SrvTaskServiceImpl implements SrvTaskService {
.eq(ChSrvPlan::getDisabInfoId, srvPlanInputVO.getDisabInfoId()) .eq(ChSrvPlan::getDisabInfoId, srvPlanInputVO.getDisabInfoId())
.eq(ChSrvPlan::getSrvPlanTime, srvPlanInputVO.getSrvPlanTime()) .eq(ChSrvPlan::getSrvPlanTime, srvPlanInputVO.getSrvPlanTime())
.eq(ChSrvPlan::getModeId, srvPlanInputVO.getModeId())); .eq(ChSrvPlan::getModeId, srvPlanInputVO.getModeId()));
if(CollectionUtil.isNotEmpty(srvPlanList)){ if (CollectionUtil.isNotEmpty(srvPlanList)) {
return Result.failed("任务列表已有计划,不可重复生成"); return Result.failed("任务列表已有计划,不可重复生成");
} }
}else { } else {
// 插入计划表 // 插入计划表
ChSrvTaskDetail chSrvTaskDetail = new ChSrvTaskDetail(); ChSrvTaskDetail chSrvTaskDetail = new ChSrvTaskDetail();
...@@ -326,14 +326,14 @@ public class SrvTaskServiceImpl implements SrvTaskService { ...@@ -326,14 +326,14 @@ public class SrvTaskServiceImpl implements SrvTaskService {
chSrvTaskDetail.setClockOperator(srvPlanInputVO.getAdmin()); chSrvTaskDetail.setClockOperator(srvPlanInputVO.getAdmin());
chSrvTaskDetail.setFcd(new Date()); chSrvTaskDetail.setFcd(new Date());
int insert = chSrvTaskDetailMapper.insert(chSrvTaskDetail); int insert = chSrvTaskDetailMapper.insert(chSrvTaskDetail);
if(insert == 0){ if (insert == 0) {
return Result.failed("补卡失败,请重新提交"); return Result.failed("补卡失败,请重新提交");
} }
taskDetailId = chSrvTaskDetail.getTaskDetailId(); taskDetailId = chSrvTaskDetail.getTaskDetailId();
} }
try { try {
log.info("=======SrvTaskServiceImpl.saveApplyCard.taskDetailId:{}",taskDetailId); log.info("=======SrvTaskServiceImpl.saveApplyCard.taskDetailId:{}", taskDetailId);
String[] itemIds = srvPlanInputVO.getItemIds(); String[] itemIds = srvPlanInputVO.getItemIds();
List<ItemDTO> itemDTOS = chSrvPlanMapper.queryItem(srvPlanInputVO.getSrvOrganId()); List<ItemDTO> itemDTOS = chSrvPlanMapper.queryItem(srvPlanInputVO.getSrvOrganId());
...@@ -352,20 +352,64 @@ public class SrvTaskServiceImpl implements SrvTaskService { ...@@ -352,20 +352,64 @@ public class SrvTaskServiceImpl implements SrvTaskService {
chSrvPlan.setSrvPlanTime(srvPlanInputVO.getSrvPlanTime()); chSrvPlan.setSrvPlanTime(srvPlanInputVO.getSrvPlanTime());
chSrvPlan.setTaskDetailId(taskDetailId); chSrvPlan.setTaskDetailId(taskDetailId);
int insert1 = chSrvPlanMapper.insert(chSrvPlan); int insert1 = chSrvPlanMapper.insert(chSrvPlan);
if(insert1==0){ if (insert1 == 0) {
return Result.failed("补卡失败,请重新提交"); return Result.failed("补卡失败,请重新提交");
} }
} }
srvPlanInputVO.setTaskDetailId(taskDetailId); srvPlanInputVO.setTaskDetailId(taskDetailId);
this.updateAttachs(srvPlanInputVO); this.updateAttachs(srvPlanInputVO);
} catch (Exception e) { } catch (Exception e) {
log.error("=======SrvTaskServiceImpl error {}",e); log.error("=======SrvTaskServiceImpl===saveApplyCard===error {}", e);
return Result.failed("补卡失败"); return Result.failed("补卡失败");
} }
return Result.success(); return Result.success();
} }
@Transactional(rollbackFor = Exception.class)
@Override
public Result updateApplyCard(SrvPlanInputVO srvPlanInputVO) {
Long taskDetailId = srvPlanInputVO.getTaskDetailId();
ChSrvTaskDetail chSrvTaskDetailDTO = new ChSrvTaskDetail();
chSrvTaskDetailDTO.setTaskDetailId(taskDetailId);
// 补卡标识
chSrvTaskDetailDTO.setIsClock((short) 1);
chSrvTaskDetailDTO.setCheckStatus((short) 1);
chSrvTaskDetailDTO.setClockReason(srvPlanInputVO.getClockReason());
chSrvTaskDetailDTO.setClockOperator(srvPlanInputVO.getAdmin());
chSrvTaskDetailDTO.setLcd(new Date());
try {
chSrvTaskDetailMapper.updateById(chSrvTaskDetailDTO);
chSrvPlanMapper.delete(new QueryWrapper<ChSrvPlan>().eq("task_detail_id", taskDetailId));
String[] itemIds = srvPlanInputVO.getItemIds();
List<ItemDTO> itemDTOS = chSrvPlanMapper.queryItem(srvPlanInputVO.getSrvOrganId());
for (String r : itemIds) {
ChSrvPlan chSrvPlan = new ChSrvPlan();
chSrvPlan.setItemId(Long.valueOf(r));
if (CollectionUtil.isNotEmpty(itemDTOS)) {
String itemName = itemDTOS.stream().filter(s -> s.getItemId().equals(r)).map(ItemDTO::getItemName).findFirst().orElse(null);
chSrvPlan.setItemName(itemName);
}
chSrvPlan.setSrvOrganId(srvPlanInputVO.getSrvOrganId());
chSrvPlan.setModeId(srvPlanInputVO.getModeId());
chSrvPlan.setCreationTime(new Date());
chSrvPlan.setDisabInfoId(srvPlanInputVO.getDisabInfoId());
chSrvPlan.setEmpId(srvPlanInputVO.getEmpId());
chSrvPlan.setSrvPlanTime(srvPlanInputVO.getSrvPlanTime());
chSrvPlan.setTaskDetailId(taskDetailId);
int insert1 = chSrvPlanMapper.insert(chSrvPlan);
}
this.updateAttachs(srvPlanInputVO);
} catch (Exception e) {
log.error("=======SrvTaskServiceImpl===updateApplyCard===error {}", e);
return Result.failed("补卡修改失败");
}
return Result.success();
}
@Override @Override
public Result auditingCard(AuditingCardVO auditingCardVO){ public Result auditingCard(AuditingCardVO auditingCardVO){
......
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