人工随访代办列表查询
This commit is contained in:
commit
69d1a7fb82
@ -6,6 +6,7 @@ import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.utils.StringUtils;
|
||||
import com.xinelu.common.utils.file.FileUploadUtils;
|
||||
import com.xinelu.common.utils.file.FileUtils;
|
||||
import com.xinelu.common.utils.file.MimeTypeUtils;
|
||||
import com.xinelu.framework.config.ServerConfig;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@ -37,6 +38,9 @@ public class CommonController {
|
||||
|
||||
private static final String FILE_DELIMETER = ",";
|
||||
|
||||
@Resource
|
||||
private SystemBusinessConfig systemBusinessConfig;
|
||||
|
||||
/**
|
||||
* 通用下载请求
|
||||
*
|
||||
@ -140,4 +144,23 @@ public class CommonController {
|
||||
log.error("下载文件失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通用管理端富文本上传请求(单个)
|
||||
*/
|
||||
@PostMapping("/richTextPictureUrl")
|
||||
public AjaxResult richTextPictureUrl(MultipartFile file) throws Exception {
|
||||
// 上传文件路径
|
||||
String filePath = SystemBusinessConfig.getProfile() + systemBusinessConfig.getRichTextPictureUrl();
|
||||
// 上传并返回新文件名称
|
||||
String fileName = FileUploadUtils.upload(filePath, file, MimeTypeUtils.IMAGE_EXTENSION);
|
||||
//拼接路径
|
||||
String url = serverConfig.getUrl() + fileName;
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
ajax.put("url", url);
|
||||
ajax.put("fileName", fileName);
|
||||
ajax.put("newFileName", FileUtils.getName(fileName));
|
||||
ajax.put("originalFilename", file.getOriginalFilename());
|
||||
return ajax;
|
||||
}
|
||||
}
|
||||
|
||||
@ -24,6 +24,8 @@ xinelu:
|
||||
captchaType: math
|
||||
# 话术图片路径图片上传
|
||||
script-file-url: /scriptFileUrl
|
||||
# 获取管理端富文本的上传路径
|
||||
rich-text-picture-url: /richTextPictureUrl
|
||||
|
||||
# 开发环境配置
|
||||
server:
|
||||
@ -179,6 +181,6 @@ xss:
|
||||
# 过滤开关
|
||||
enabled: true
|
||||
# 排除链接(多个用逗号分隔)
|
||||
excludes: /system/notice
|
||||
excludes: /system/notice,/system/specialDiseaseNode/add,/system/specialDiseaseNode/edit
|
||||
# 匹配链接
|
||||
urlPatterns: /system/*,/monitor/*,/tool/*
|
||||
|
||||
@ -71,6 +71,11 @@ public class SystemBusinessConfig {
|
||||
*/
|
||||
private String scriptFileUrl;
|
||||
|
||||
/**
|
||||
* 获取管理端富文本的上传路径
|
||||
*/
|
||||
private String richTextPictureUrl;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
@ -193,4 +198,12 @@ public class SystemBusinessConfig {
|
||||
public void setMaterialsVideoUrl(String materialsVideoUrl) {
|
||||
this.materialsVideoUrl = materialsVideoUrl;
|
||||
}
|
||||
|
||||
public String getRichTextPictureUrl() {
|
||||
return richTextPictureUrl;
|
||||
}
|
||||
|
||||
public void setRichTextPictureUrl(String richTextPictureUrl) {
|
||||
this.richTextPictureUrl = richTextPictureUrl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -146,6 +146,9 @@ public class AgencyController extends BaseController {
|
||||
return agencyService.insertAgencyImportList(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 医院园区科室病区联动查询
|
||||
*/
|
||||
@GetMapping("/getAgencyList")
|
||||
public AjaxResult getAgencyList(HospitalDTO hospitalDTO) {
|
||||
return agencyService.getAgencyList(hospitalDTO);
|
||||
|
||||
@ -10,6 +10,7 @@ import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute;
|
||||
import com.xinelu.manage.dto.manualfollowup.ManualFollowUpDTO;
|
||||
import com.xinelu.manage.service.signpatientmanageroute.ISignPatientManageRouteService;
|
||||
import com.xinelu.manage.vo.manualfollowup.ManualFollowUpVO;
|
||||
import com.xinelu.manage.vo.signpatientmanageroute.SignPatientManageRouteVO;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -66,9 +67,9 @@ public class SignPatientManageRouteController extends BaseController {
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:signroute:add')")
|
||||
@Log(title = "签约患者管理任务路径", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SignPatientManageRoute signPatientManageRoute) {
|
||||
return toAjax(signPatientManageRouteService.insertSignPatientManageRoute(signPatientManageRoute));
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(@RequestBody SignPatientManageRouteVO signPatientManageRoute) {
|
||||
return signPatientManageRouteService.insertSignPatientManageRoute(signPatientManageRoute);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -76,9 +77,9 @@ public class SignPatientManageRouteController extends BaseController {
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:signroute:edit')")
|
||||
@Log(title = "签约患者管理任务路径", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SignPatientManageRoute signPatientManageRoute) {
|
||||
return toAjax(signPatientManageRouteService.updateSignPatientManageRoute(signPatientManageRoute));
|
||||
@PutMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody SignPatientManageRouteVO signPatientManageRoute) {
|
||||
return signPatientManageRouteService.updateSignPatientManageRoute(signPatientManageRoute);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
package com.xinelu.manage.mapper.signpatientmanageroutenode;
|
||||
|
||||
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 签约患者管理任务路径节点Mapper接口
|
||||
*
|
||||
@ -60,4 +61,12 @@ public interface SignPatientManageRouteNodeMapper {
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSignPatientManageRouteNodeByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量删除签约患者管理任务路径节点
|
||||
*
|
||||
* @param manageRouteId 需要删除的数据
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteRouteNodeByManageRouteId(Long manageRouteId);
|
||||
}
|
||||
|
||||
@ -88,5 +88,11 @@ public interface IAgencyService {
|
||||
**/
|
||||
AjaxResult insertAgencyImportList(List<Agency> agencyList);
|
||||
|
||||
/**
|
||||
* 医院园区科室病区联动查询
|
||||
*
|
||||
* @param hospitalDTO 信息
|
||||
* @return AjaxResult
|
||||
*/
|
||||
AjaxResult getAgencyList(HospitalDTO hospitalDTO);
|
||||
}
|
||||
|
||||
@ -224,8 +224,15 @@ public class AgencyServiceImpl implements IAgencyService {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 医院园区科室病区联动查询
|
||||
*
|
||||
* @param hospitalDTO 信息
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult getAgencyList(HospitalDTO hospitalDTO) {
|
||||
//只选医院
|
||||
HospitalVO hospitalVO = new HospitalVO();
|
||||
if (StringUtils.isNotBlank(hospitalDTO.getNodeType()) && NodeTypeEnum.HOSPITAL.getInfo().equals(hospitalDTO.getNodeType()) && Objects.nonNull(hospitalDTO.getHospitalId())) {
|
||||
Agency agency = new Agency();
|
||||
@ -242,6 +249,7 @@ public class AgencyServiceImpl implements IAgencyService {
|
||||
List<Department> wardList = departmentMapper.selectDepartmentList(department);
|
||||
hospitalVO.setWardList(wardList);
|
||||
}
|
||||
//选到园区
|
||||
if (StringUtils.isNotBlank(hospitalDTO.getNodeType()) && NodeTypeEnum.CAMPUS.getInfo().equals(hospitalDTO.getNodeType()) && Objects.nonNull(hospitalDTO.getCampusId())) {
|
||||
Department department = new Department();
|
||||
department.setNodeType(NodeTypeEnum.DEPARTMENT.getInfo());
|
||||
@ -252,6 +260,7 @@ public class AgencyServiceImpl implements IAgencyService {
|
||||
List<Department> wardList = departmentMapper.selectDepartmentList(department);
|
||||
hospitalVO.setWardList(wardList);
|
||||
}
|
||||
//选到科室
|
||||
if (StringUtils.isNotBlank(hospitalDTO.getNodeType()) && NodeTypeEnum.DEPARTMENT.getInfo().equals(hospitalDTO.getNodeType()) && Objects.nonNull(hospitalDTO.getDepartmentId())) {
|
||||
Department department = new Department();
|
||||
department.setNodeType(NodeTypeEnum.WARD.getInfo());
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
package com.xinelu.manage.service.signpatientmanageroute;
|
||||
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute;
|
||||
import com.xinelu.manage.dto.manualfollowup.ManualFollowUpDTO;
|
||||
import com.xinelu.manage.vo.manualfollowup.ManualFollowUpVO;
|
||||
import com.xinelu.manage.vo.signpatientmanageroute.SignPatientManageRouteVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -20,7 +22,7 @@ public interface ISignPatientManageRouteService {
|
||||
* @param id 签约患者管理任务路径主键
|
||||
* @return 签约患者管理任务路径
|
||||
*/
|
||||
public SignPatientManageRoute selectSignPatientManageRouteById(Long id);
|
||||
SignPatientManageRoute selectSignPatientManageRouteById(Long id);
|
||||
|
||||
/**
|
||||
* 查询签约患者管理任务路径列表
|
||||
@ -28,7 +30,7 @@ public interface ISignPatientManageRouteService {
|
||||
* @param signPatientManageRoute 签约患者管理任务路径
|
||||
* @return 签约患者管理任务路径集合
|
||||
*/
|
||||
public List<SignPatientManageRoute> selectSignPatientManageRouteList(SignPatientManageRoute signPatientManageRoute);
|
||||
List<SignPatientManageRoute> selectSignPatientManageRouteList(SignPatientManageRoute signPatientManageRoute);
|
||||
|
||||
/**
|
||||
* 新增签约患者管理任务路径
|
||||
@ -36,7 +38,7 @@ public interface ISignPatientManageRouteService {
|
||||
* @param signPatientManageRoute 签约患者管理任务路径
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSignPatientManageRoute(SignPatientManageRoute signPatientManageRoute);
|
||||
AjaxResult insertSignPatientManageRoute(SignPatientManageRouteVO signPatientManageRoute);
|
||||
|
||||
/**
|
||||
* 修改签约患者管理任务路径
|
||||
@ -44,7 +46,7 @@ public interface ISignPatientManageRouteService {
|
||||
* @param signPatientManageRoute 签约患者管理任务路径
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSignPatientManageRoute(SignPatientManageRoute signPatientManageRoute);
|
||||
AjaxResult updateSignPatientManageRoute(SignPatientManageRouteVO signPatientManageRoute);
|
||||
|
||||
/**
|
||||
* 批量删除签约患者管理任务路径
|
||||
@ -52,7 +54,7 @@ public interface ISignPatientManageRouteService {
|
||||
* @param ids 需要删除的签约患者管理任务路径主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSignPatientManageRouteByIds(Long[] ids);
|
||||
int deleteSignPatientManageRouteByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除签约患者管理任务路径信息
|
||||
|
||||
@ -1,16 +1,22 @@
|
||||
package com.xinelu.manage.service.signpatientmanageroute.impl;
|
||||
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.utils.SecurityUtils;
|
||||
import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute;
|
||||
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
|
||||
import com.xinelu.manage.dto.manualfollowup.ManualFollowUpDTO;
|
||||
import com.xinelu.manage.mapper.signpatientmanageroute.SignPatientManageRouteMapper;
|
||||
import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper;
|
||||
import com.xinelu.manage.service.signpatientmanageroute.ISignPatientManageRouteService;
|
||||
import com.xinelu.manage.vo.manualfollowup.ManualFollowUpVO;
|
||||
import com.xinelu.manage.vo.signpatientmanageroute.SignPatientManageRouteVO;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.xinelu.manage.vo.manualfollowup.ManualFollowUpVO;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 签约患者管理任务路径Service业务层处理
|
||||
@ -22,6 +28,8 @@ import org.springframework.stereotype.Service;
|
||||
public class SignPatientManageRouteServiceImpl implements ISignPatientManageRouteService {
|
||||
@Resource
|
||||
private SignPatientManageRouteMapper signPatientManageRouteMapper;
|
||||
@Resource
|
||||
private SignPatientManageRouteNodeMapper signPatientManageRouteNodeMapper;
|
||||
|
||||
/**
|
||||
* 查询签约患者管理任务路径
|
||||
@ -51,10 +59,26 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
||||
* @param signPatientManageRoute 签约患者管理任务路径
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public int insertSignPatientManageRoute(SignPatientManageRoute signPatientManageRoute) {
|
||||
public AjaxResult insertSignPatientManageRoute(SignPatientManageRouteVO signPatientManageRoute) {
|
||||
signPatientManageRoute.setCreateBy(SecurityUtils.getUsername());
|
||||
signPatientManageRoute.setCreateTime(LocalDateTime.now());
|
||||
return signPatientManageRouteMapper.insertSignPatientManageRoute(signPatientManageRoute);
|
||||
int insertRoute = signPatientManageRouteMapper.insertSignPatientManageRoute(signPatientManageRoute);
|
||||
if (insertRoute < 0) {
|
||||
return AjaxResult.error("新增签约患者管理任务路径失败!请联系管理员!");
|
||||
}
|
||||
List<SignPatientManageRouteNode> routeNodeList = signPatientManageRoute.getRouteNodeList();
|
||||
for (SignPatientManageRouteNode signPatientManageRouteNode : routeNodeList) {
|
||||
signPatientManageRouteNode.setManageRouteId(signPatientManageRoute.getId());
|
||||
signPatientManageRouteNode.setCreateTime(LocalDateTime.now());
|
||||
signPatientManageRouteNode.setCreateBy(SecurityUtils.getUsername());
|
||||
}
|
||||
int insertBatchCount = signPatientManageRouteNodeMapper.insertBatch(routeNodeList);
|
||||
if (insertBatchCount < 0) {
|
||||
return AjaxResult.error("新增签约患者管理任务路径失败!请联系管理员!");
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -64,9 +88,28 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSignPatientManageRoute(SignPatientManageRoute signPatientManageRoute) {
|
||||
public AjaxResult updateSignPatientManageRoute(SignPatientManageRouteVO signPatientManageRoute) {
|
||||
signPatientManageRoute.setUpdateBy(SecurityUtils.getUsername());
|
||||
signPatientManageRoute.setUpdateTime(LocalDateTime.now());
|
||||
return signPatientManageRouteMapper.updateSignPatientManageRoute(signPatientManageRoute);
|
||||
int updateCount = signPatientManageRouteMapper.updateSignPatientManageRoute(signPatientManageRoute);
|
||||
if (updateCount < 0) {
|
||||
return AjaxResult.error("修改签约患者管理任务路径失败!请联系管理员!");
|
||||
}
|
||||
int deleteCount = signPatientManageRouteNodeMapper.deleteRouteNodeByManageRouteId(signPatientManageRoute.getSignPatientManageRouteId());
|
||||
if (deleteCount < 0) {
|
||||
return AjaxResult.error("修改签约患者管理任务路径失败!请联系管理员!");
|
||||
}
|
||||
List<SignPatientManageRouteNode> routeNodeList = signPatientManageRoute.getRouteNodeList();
|
||||
for (SignPatientManageRouteNode signPatientManageRouteNode : routeNodeList) {
|
||||
signPatientManageRouteNode.setManageRouteId(signPatientManageRoute.getSignPatientManageRouteId());
|
||||
signPatientManageRouteNode.setCreateTime(LocalDateTime.now());
|
||||
signPatientManageRouteNode.setCreateBy(SecurityUtils.getUsername());
|
||||
}
|
||||
int insertBatchCount = signPatientManageRouteNodeMapper.insertBatch(routeNodeList);
|
||||
if (insertBatchCount < 0) {
|
||||
return AjaxResult.error("新增签约患者管理任务路径失败!请联系管理员!");
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -93,6 +136,7 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
||||
|
||||
/**
|
||||
* 查询人工随访代办列表
|
||||
*
|
||||
* @param manualFollowUpDTO 人工随访查询DTO
|
||||
* @return ManualFollowUpVO 人工随访代办VO
|
||||
*/
|
||||
|
||||
@ -0,0 +1,30 @@
|
||||
package com.xinelu.manage.vo.signpatientmanageroute;
|
||||
|
||||
import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute;
|
||||
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 签约患者管理任务路径对象 sign_patient_manage_route
|
||||
*
|
||||
* @author haown
|
||||
* @date 2024-03-18
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class SignPatientManageRouteVO extends SignPatientManageRoute {
|
||||
|
||||
/**
|
||||
* 患者管理任务路径id
|
||||
*/
|
||||
private Long SignPatientManageRouteId;
|
||||
|
||||
/**
|
||||
* 节点信息
|
||||
*/
|
||||
List<SignPatientManageRouteNode> routeNodeList;
|
||||
|
||||
}
|
||||
@ -23,6 +23,15 @@ public class SpecialDiseaseRouteVO extends SpecialDiseaseRoute {
|
||||
*/
|
||||
private Long specialDiseaseRouteId;
|
||||
|
||||
/**
|
||||
* 总数
|
||||
*/
|
||||
private Long totalNumber;
|
||||
|
||||
/**
|
||||
* 进度
|
||||
*/
|
||||
private Long agreeNumber;
|
||||
|
||||
/**
|
||||
* 节点信息
|
||||
|
||||
@ -716,4 +716,10 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRouteNodeByManageRouteId">
|
||||
delete
|
||||
from sign_patient_manage_route_node
|
||||
where manage_route_id = #{manageRouteId}
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -37,6 +37,8 @@
|
||||
<result property="releaseStatus" column="release_status"/>
|
||||
<result property="suitRange" column="suit_range"/>
|
||||
<result property="routeSort" column="route_sort"/>
|
||||
<result property="agreeNumber" column="agreeNumber"/>
|
||||
<result property="totalNumber" column="totalNumber"/>
|
||||
<result property="routeRemark" column="route_remark"/>
|
||||
<collection property="triggerConditionList" javaType="java.util.List"
|
||||
resultMap="SpecialDiseaseTriggerConditionResult"/>
|
||||
@ -303,8 +305,16 @@
|
||||
sdtc.trigger_condition_operator,
|
||||
sdtc.trigger_condition_value,
|
||||
sdtc.trigger_condition_sort,
|
||||
sdtc.trigger_condition_remark
|
||||
sdtc.trigger_condition_remark,
|
||||
(select COUNT(1)
|
||||
from special_disease_node
|
||||
where route_id = specialDiseaseRouteId) totalNumber,
|
||||
(select COUNT(1)
|
||||
from special_disease_node
|
||||
where route_id = specialDiseaseRouteId
|
||||
and route_check_status = 'AGREE') agreeNumber
|
||||
from special_disease_route sdr
|
||||
LEFT JOIN special_disease_node sdn ON sdn.route_id = sdr.id
|
||||
LEFT JOIN special_disease_trigger_condition sdtc ON sdr.id = sdtc.route_id
|
||||
where sdr.id = #{id}
|
||||
</select>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user