diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroutenode/SignPatientManageRouteNodeController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroutenode/SignPatientManageRouteNodeController.java index 4e174ac6..d43c9791 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroutenode/SignPatientManageRouteNodeController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroutenode/SignPatientManageRouteNodeController.java @@ -5,6 +5,7 @@ import com.xinelu.common.core.domain.R; import com.xinelu.common.core.page.TableDataInfo; import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode; import com.xinelu.manage.dto.signpatientmanageroutenode.PatientTaskDto; +import com.xinelu.manage.dto.signpatientmanageroutenode.RouteNodeCheckDto; import com.xinelu.manage.service.signpatientmanageroutenode.ISignPatientManageRouteNodeService; import com.xinelu.manage.vo.signpatientmanageroutenode.PatientTaskVo; import io.swagger.annotations.Api; @@ -13,6 +14,8 @@ import java.util.List; import javax.annotation.Resource; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -49,4 +52,14 @@ public class SignPatientManageRouteNodeController extends BaseController { List list = signNodeService.getNodesByPatient(patientId); return R.ok(list); } + + /** + * 审核任务 + */ + @ApiOperation("审核任务") + @PostMapping("/audit") + public R audit(@RequestBody RouteNodeCheckDto routeNodeCheckDto) { + int flag = signNodeService.audit(routeNodeCheckDto); + return flag < 0 ? R.fail() : R.ok(); + } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientmanageroutenode/RouteNodeCheckDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientmanageroutenode/RouteNodeCheckDto.java new file mode 100644 index 00000000..f46598ac --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientmanageroutenode/RouteNodeCheckDto.java @@ -0,0 +1,31 @@ +package com.xinelu.manage.dto.signpatientmanageroutenode; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: 节点审核传输对象 + * @author: haown + * @create: 2024-04-07 10:17 + **/ +@ApiModel("节点审核传输对象") +@Data +public class RouteNodeCheckDto { + + /** 签约患者管理任务表id */ + @ApiModelProperty(value = "签约患者管理任务表id") + private Long manageRouteId; + + /** 节点审核状态,同意:AGREE,不同意:DISAGREE */ + @ApiModelProperty(value = "节点审核状态,同意:AGREE,不同意:DISAGREE") + private String routeCheckStatus; + + /** 节点审核人姓名 */ + @ApiModelProperty(value = "节点审核人姓名") + private String routeCheckPerson; + + /** 节点审核备注信息,存储审核备注信息以及审核不通过原因等信息 */ + @ApiModelProperty(value = "节点审核备注信息,存储审核备注信息以及审核不通过原因等信息") + private String routeCheckRemark; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/propagandainfo/PropagandaInfoMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/propagandainfo/PropagandaInfoMapper.java index 1d7d51d7..1b3ec27e 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/propagandainfo/PropagandaInfoMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/propagandainfo/PropagandaInfoMapper.java @@ -3,7 +3,6 @@ package com.xinelu.manage.mapper.propagandainfo; import com.xinelu.manage.domain.propagandainfo.PropagandaInfo; import com.xinelu.manage.dto.propagandainfo.PropagandaInfoDto; import com.xinelu.manage.vo.department.DepartmentVO; -import com.xinelu.manage.vo.propagandainfo.PropagandaMaterialsVo; import java.util.List; /** @@ -19,15 +18,7 @@ public interface PropagandaInfoMapper { * @param id 宣教库管理主键 * @return 宣教库管理 */ - public PropagandaInfo selectPropagandaInfoById(Long id); - - /** - * 查询宣教素材信息 - * - * @param id 宣教库管理主键 - * @return 宣教库管理 - */ - PropagandaMaterialsVo selectPropagandaInfo(Long id); + PropagandaInfo selectPropagandaInfoById(Long id); /** * 查询宣教库管理列表 @@ -35,7 +26,7 @@ public interface PropagandaInfoMapper { * @param propagandaInfo 宣教库管理 * @return 宣教库管理集合 */ - public List selectPropagandaInfoList(PropagandaInfoDto propagandaInfo); + List selectPropagandaInfoList(PropagandaInfoDto propagandaInfo); /** * 新增宣教库管理 @@ -43,7 +34,7 @@ public interface PropagandaInfoMapper { * @param propagandaInfo 宣教库管理 * @return 结果 */ - public int insertPropagandaInfo(PropagandaInfo propagandaInfo); + int insertPropagandaInfo(PropagandaInfo propagandaInfo); /** * 修改宣教库管理 @@ -51,7 +42,7 @@ public interface PropagandaInfoMapper { * @param propagandaInfo 宣教库管理 * @return 结果 */ - public int updatePropagandaInfo(PropagandaInfo propagandaInfo); + int updatePropagandaInfo(PropagandaInfo propagandaInfo); /** * 删除宣教库管理 @@ -59,7 +50,7 @@ public interface PropagandaInfoMapper { * @param id 宣教库管理主键 * @return 结果 */ - public int deletePropagandaInfoById(Long id); + int deletePropagandaInfoById(Long id); /** * 批量删除宣教库管理 @@ -67,7 +58,7 @@ public interface PropagandaInfoMapper { * @param ids 需要删除的数据主键集合 * @return 结果 */ - public int deletePropagandaInfoByIds(Long[] ids); + int deletePropagandaInfoByIds(Long[] ids); /** * 查询科室信息列表及包含宣教库数量 diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroutenode/ISignPatientManageRouteNodeService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroutenode/ISignPatientManageRouteNodeService.java index c6e5b144..35c2d275 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroutenode/ISignPatientManageRouteNodeService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroutenode/ISignPatientManageRouteNodeService.java @@ -2,6 +2,7 @@ package com.xinelu.manage.service.signpatientmanageroutenode; import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode; import com.xinelu.manage.dto.signpatientmanageroutenode.PatientTaskDto; +import com.xinelu.manage.dto.signpatientmanageroutenode.RouteNodeCheckDto; import com.xinelu.manage.vo.signpatientmanageroutenode.PatientTaskVo; import java.util.List; @@ -75,4 +76,11 @@ public interface ISignPatientManageRouteNodeService { * @return 患者任务列表 */ List selectPatientTaskList(PatientTaskDto patientTaskDto); + + /** + * 审核任务 + * @param routeNodeCheckDto 任务审核传输对象 + * @return 结果 + */ + int audit(RouteNodeCheckDto routeNodeCheckDto); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroutenode/impl/SignPatientManageRouteNodeServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroutenode/impl/SignPatientManageRouteNodeServiceImpl.java index eaac0d66..b9f1c5c0 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroutenode/impl/SignPatientManageRouteNodeServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroutenode/impl/SignPatientManageRouteNodeServiceImpl.java @@ -4,6 +4,7 @@ import com.xinelu.manage.domain.patientinfo.PatientInfo; import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute; import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode; import com.xinelu.manage.dto.signpatientmanageroutenode.PatientTaskDto; +import com.xinelu.manage.dto.signpatientmanageroutenode.RouteNodeCheckDto; import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper; import com.xinelu.manage.mapper.signpatientmanageroute.SignPatientManageRouteMapper; import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper; @@ -15,6 +16,7 @@ import java.util.List; import javax.annotation.Resource; import org.apache.commons.collections4.CollectionUtils; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; /** * 签约患者管理任务路径节点Service业务层处理 @@ -49,6 +51,7 @@ public class SignPatientManageRouteNodeServiceImpl implements ISignPatientManage // 查询签约路径 SignPatientManageRoute signPatientManageRoute = new SignPatientManageRoute(); signPatientManageRoute.setSignPatientRecordId(patientInfo.getSignPatientRecordId()); + signPatientManageRoute.setPatientId(patientId); List signRoutes = signRouteMapper.selectSignPatientManageRouteList(signPatientManageRoute); if (CollectionUtils.isNotEmpty(signRoutes)) { SignPatientManageRoute signRoute = signRoutes.get(0); @@ -120,4 +123,27 @@ public class SignPatientManageRouteNodeServiceImpl implements ISignPatientManage @Override public List selectPatientTaskList(PatientTaskDto patientTaskDto) { return signPatientManageRouteNodeMapper.selectPatientTaskList(patientTaskDto); } + + /** + * 审核任务 + * @param routeNodeCheckDto 任务审核传输对象 + * @return 结果 + */ + @Override + @Transactional + public int audit(RouteNodeCheckDto routeNodeCheckDto) { + int flag = 0; + // 根据manageRouteId查询所有节点 + SignPatientManageRouteNode nodeQuery = new SignPatientManageRouteNode(); + nodeQuery.setManageRouteId(routeNodeCheckDto.getManageRouteId()); + List nodeList = signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeList(nodeQuery); + for (SignPatientManageRouteNode node : nodeList) { + node.setRouteCheckStatus(routeNodeCheckDto.getRouteCheckStatus()); + node.setRouteCheckPerson(routeNodeCheckDto.getRouteCheckPerson()); + node.setRouteCheckDate(LocalDateTime.now()); + node.setRouteCheckRemark(routeNodeCheckDto.getRouteCheckRemark()); + flag += signPatientManageRouteNodeMapper.updateSignPatientManageRouteNode(node); + } + return flag; + } } diff --git a/postdischarge-manage/src/main/resources/mapper/manage/propagandainfo/PropagandaInfoMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/propagandainfo/PropagandaInfoMapper.xml index 3b8e69d2..f99246ad 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/propagandainfo/PropagandaInfoMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/propagandainfo/PropagandaInfoMapper.xml @@ -29,36 +29,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - select id, hospital_agency_id, hospital_agency_name, department_id, department_name, propaganda_title, propaganda_type, propaganda_code, propaganda_status, propaganda_content, propaganda_cover_path, article_summary, voicebroadcast, disease_type_id, disease_type_name, propaganda_link, propaganda_barcode_path,del_flag, create_by, create_time, update_by, update_time from propaganda_info @@ -103,18 +73,6 @@ where id = #{id} - - insert into propaganda_info