手动创建任务修改
This commit is contained in:
parent
a41d6eb011
commit
d44124f756
@ -4,6 +4,8 @@ import com.xinelu.common.annotation.Log;
|
||||
import com.xinelu.common.core.controller.BaseController;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.core.page.TableDataInfo;
|
||||
import com.xinelu.common.custominterface.Insert;
|
||||
import com.xinelu.common.custominterface.Update;
|
||||
import com.xinelu.common.enums.BusinessType;
|
||||
import com.xinelu.common.utils.poi.ExcelUtil;
|
||||
import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute;
|
||||
@ -13,18 +15,13 @@ import com.xinelu.manage.service.signpatientmanageroute.ISignPatientManageRouteS
|
||||
import com.xinelu.manage.vo.manualfollowup.ManualFollowUpVO;
|
||||
import com.xinelu.manage.vo.signpatientmanageroute.SignPatientManageRouteVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import java.util.List;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
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.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 签约患者管理任务路径控制器
|
||||
@ -77,7 +74,7 @@ public class SignPatientManageRouteController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('manage:signroute:add')")
|
||||
@Log(title = "签约患者管理任务路径", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(@RequestBody SignPatientManageRouteVO signPatientManageRoute) {
|
||||
public AjaxResult add(@RequestBody @Validated(Insert.class) SignPatientManageRouteVO signPatientManageRoute) {
|
||||
return signPatientManageRouteService.insertSignPatientManageRoute(signPatientManageRoute);
|
||||
}
|
||||
|
||||
@ -87,7 +84,7 @@ public class SignPatientManageRouteController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('manage:signroute:edit')")
|
||||
@Log(title = "签约患者管理任务路径", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody SignPatientManageRouteVO signPatientManageRoute) {
|
||||
public AjaxResult edit(@RequestBody @Validated(Update.class) SignPatientManageRouteVO signPatientManageRoute) {
|
||||
return signPatientManageRouteService.updateSignPatientManageRoute(signPatientManageRoute);
|
||||
}
|
||||
|
||||
|
||||
@ -2,6 +2,8 @@ package com.xinelu.manage.domain.signpatientmanageroute;
|
||||
|
||||
import com.xinelu.common.annotation.Excel;
|
||||
import com.xinelu.common.core.domain.BaseEntity;
|
||||
import com.xinelu.common.custominterface.Insert;
|
||||
import com.xinelu.common.custominterface.Update;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
@ -9,6 +11,8 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 签约患者管理任务路径对象 sign_patient_manage_route
|
||||
*
|
||||
@ -78,7 +82,8 @@ public class SignPatientManageRoute extends BaseEntity {
|
||||
|
||||
/** 路径名称(任务名称) */
|
||||
@ApiModelProperty(value = "路径名称")
|
||||
@Excel(name = "路径名称", readConverterExp = "任=务名称")
|
||||
@Excel(name = "路径名称", readConverterExp = "任务名称")
|
||||
@NotBlank(message = "任务名称不能为空", groups = {Insert.class, Update.class})
|
||||
private String routeName;
|
||||
|
||||
/** 任务创建类型,手动创建:MANUAL_CREATE,自动匹配:MANUAL_MATCHE */
|
||||
@ -93,12 +98,13 @@ public class SignPatientManageRoute extends BaseEntity {
|
||||
|
||||
/** 路径分类(任务分类),全部:ALL,科室管理路径:DEPARTMENT_MANAGE_PATH,专病管理路径:SPECIAL_DIEASE_MANAGE_PATH */
|
||||
@ApiModelProperty(value = "路径分类")
|
||||
@Excel(name = "路径分类", readConverterExp = "任=务分类")
|
||||
@Excel(name = "路径分类", readConverterExp = "任务分类")
|
||||
private String routeClassify;
|
||||
|
||||
/** 适用范围,在院:IN_THE_HOSPITAL,出院:DISCHARGE,门诊:OUTPATIENT_SERVICE,门诊+出院:OUTPATIENT_SERVICE_DISCHARGE */
|
||||
@ApiModelProperty(value = "适用范围,在院:IN_THE_HOSPITAL,出院:DISCHARGE,门诊:OUTPATIENT_SERVICE,门诊+出院:OUTPATIENT_SERVICE_DISCHARGE")
|
||||
@Excel(name = "适用范围,在院:IN_THE_HOSPITAL,出院:DISCHARGE,门诊:OUTPATIENT_SERVICE,门诊+出院:OUTPATIENT_SERVICE_DISCHARGE")
|
||||
@NotBlank(message = "适用范围不能为空", groups = {Insert.class, Update.class})
|
||||
private String suitRange;
|
||||
|
||||
/** 排序 */
|
||||
|
||||
@ -3,6 +3,8 @@ package com.xinelu.manage.domain.signpatientmanageroutenode;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xinelu.common.annotation.Excel;
|
||||
import com.xinelu.common.core.domain.BaseEntity;
|
||||
import com.xinelu.common.custominterface.Insert;
|
||||
import com.xinelu.common.custominterface.Update;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.time.LocalDateTime;
|
||||
@ -12,6 +14,9 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 签约患者管理任务路径节点对象 sign_patient_manage_route_node
|
||||
*
|
||||
@ -36,43 +41,51 @@ public class SignPatientManageRouteNode extends BaseEntity {
|
||||
|
||||
/** 路径名称(任务名称) */
|
||||
@ApiModelProperty(value = "路径名称")
|
||||
@Excel(name = "路径名称", readConverterExp = "任=务名称")
|
||||
@Excel(name = "路径名称", readConverterExp = "任务名称")
|
||||
@NotBlank(message = "路径名称不能为空", groups = {Insert.class, Update.class})
|
||||
private String manageRouteName;
|
||||
|
||||
/** 管理路径节点名称 */
|
||||
@ApiModelProperty(value = "管理路径节点名称")
|
||||
@Excel(name = "管理路径节点名称")
|
||||
@NotBlank(message = "管理路径节点名称不能为空", groups = {Insert.class, Update.class})
|
||||
private String routeNodeName;
|
||||
|
||||
/** 管理路径节点时间,时间单位为:天 */
|
||||
@ApiModelProperty(value = "管理路径节点时间,时间单位为:天")
|
||||
@Excel(name = "管理路径节点时间,时间单位为:天")
|
||||
@NotNull(message = "管理路径节点时间不能为空", groups = {Insert.class, Update.class})
|
||||
private Integer routeNodeDay;
|
||||
|
||||
/** 任务类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP */
|
||||
@ApiModelProperty(value = "任务类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP")
|
||||
@Excel(name = "任务类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP")
|
||||
@NotBlank(message = "任务类型不能为空", groups = {Insert.class, Update.class})
|
||||
private String taskType;
|
||||
|
||||
/** 任务状态 */
|
||||
@ApiModelProperty(value = "任务状态")
|
||||
@Excel(name = "任务状态")
|
||||
@NotBlank(message = "任务状态不能为空", groups = {Insert.class, Update.class})
|
||||
private String taskStatus;
|
||||
|
||||
/** 任务细分 */
|
||||
@ApiModelProperty(value = "任务细分")
|
||||
@Excel(name = "任务细分")
|
||||
@NotBlank(message = "任务细分不能为空", groups = {Insert.class, Update.class})
|
||||
private String taskSubdivision;
|
||||
|
||||
/** 二级分类描述 */
|
||||
@ApiModelProperty(value = "二级分类描述")
|
||||
@Excel(name = "二级分类描述")
|
||||
@NotBlank(message = "二级分类描述不能为空", groups = {Insert.class, Update.class})
|
||||
private String secondClassifyDescribe;
|
||||
|
||||
/** 执行时间,格式:HH:mm */
|
||||
@ApiModelProperty(value = "执行时间,格式:HH:mm")
|
||||
@JsonFormat(pattern = "HH:mm")
|
||||
@Excel(name = "执行时间,格式:HH:mm", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@NotBlank(message = "执行时间不能为空", groups = {Insert.class, Update.class})
|
||||
private LocalTime executeTime;
|
||||
|
||||
/** 电话推送标识,0:未开启,1:已开启 */
|
||||
|
||||
@ -33,16 +33,17 @@ import com.xinelu.manage.vo.manualfollowup.ManualFollowPatientVO;
|
||||
import com.xinelu.manage.vo.manualfollowup.ManualFollowUpVO;
|
||||
import com.xinelu.manage.vo.signpatientmanageroute.SignPatientManageRouteVO;
|
||||
import com.xinelu.manage.vo.signroutetriggercondition.SignRouteTriggerConditionVO;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import javax.annotation.Resource;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
/**
|
||||
* 签约患者管理任务路径Service业务层处理
|
||||
@ -66,8 +67,6 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
||||
private PatientQuestionOptionResultMapper patientQuestionOptionResultMapper;
|
||||
@Resource
|
||||
private SignRouteTriggerConditionMapper signRouteTriggerConditionMapper;
|
||||
@Resource
|
||||
private PatientInfoMapper patientInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询签约患者管理任务路径
|
||||
@ -110,9 +109,8 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
||||
}
|
||||
//新增节点表
|
||||
List<SignPatientManageRouteNode> signPatientManageRouteNodes = new ArrayList<>();
|
||||
SignPatientManageRouteNode signPatientManageRouteNode = new SignPatientManageRouteNode();
|
||||
for (SignPatientManageRouteNode routeNode : signPatientManageRoute.getRouteNodeList()) {
|
||||
extracted(signPatientManageRoute, signPatientManageRouteNodes, signPatientManageRouteNode, routeNode);
|
||||
extracted(signPatientManageRoute, signPatientManageRouteNodes, routeNode);
|
||||
}
|
||||
int insertBatchCount = signPatientManageRouteNodeMapper.insertBatch(signPatientManageRouteNodes);
|
||||
if (insertBatchCount < 0) {
|
||||
@ -306,7 +304,7 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* 新增患者管理任务执行记录
|
||||
*/
|
||||
private Long insertPatientTaskExecuteRecord(PatientQuestionSubmitResultDTO dto, String routeHandlePerson, LocalDateTime time) {
|
||||
@ -346,7 +344,8 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
||||
/**
|
||||
* 塞值
|
||||
*/
|
||||
private static void extracted(SignPatientManageRouteVO signPatientManageRoute, List<SignPatientManageRouteNode> signPatientManageRouteNodes, SignPatientManageRouteNode signPatientManageRouteNode, SignPatientManageRouteNode routeNode) {
|
||||
private static void extracted(SignPatientManageRouteVO signPatientManageRoute, List<SignPatientManageRouteNode> signPatientManageRouteNodes, SignPatientManageRouteNode routeNode) {
|
||||
SignPatientManageRouteNode signPatientManageRouteNode = new SignPatientManageRouteNode();
|
||||
if (Objects.nonNull(routeNode) && TaskContentEnum.PHONE_OUTBOUND.getInfo().equals(routeNode.getTaskType())) {
|
||||
signPatientManageRouteNode.setPhonePushSign(Objects.isNull(routeNode.getPhonePushSign()) ? null : routeNode.getPhonePushSign());
|
||||
signPatientManageRouteNode.setPhoneId(Objects.isNull(routeNode.getPhoneId()) ? null : routeNode.getPhoneId());
|
||||
|
||||
@ -1,11 +1,13 @@
|
||||
package com.xinelu.manage.vo.signpatientmanageroute;
|
||||
|
||||
import com.xinelu.common.custominterface.Update;
|
||||
import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute;
|
||||
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
|
||||
import com.xinelu.manage.vo.signroutetriggercondition.SignRouteTriggerConditionVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -21,6 +23,7 @@ public class SignPatientManageRouteVO extends SignPatientManageRoute {
|
||||
/**
|
||||
* 患者管理任务路径id
|
||||
*/
|
||||
@NotNull(message = "管理路径信息不能为空", groups = {Update.class})
|
||||
private Long signPatientManageRouteId;
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user