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);
......
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