画像修改

This commit is contained in:
zhangheng 2024-07-15 11:07:17 +08:00
parent 5353175a26
commit dc36d0b607
4 changed files with 44 additions and 37 deletions

View File

@ -21,6 +21,9 @@ public class PatientQuestionSubmitResultDTO extends PatientQuestionSubmitResult
@ApiModelProperty(value = "任务类型电话外呼PHONE_OUTBOUND问卷量表QUESTIONNAIRE_SCALE人工随访ARTIFICIAL_FOLLOW_UP") @ApiModelProperty(value = "任务类型电话外呼PHONE_OUTBOUND问卷量表QUESTIONNAIRE_SCALE人工随访ARTIFICIAL_FOLLOW_UP")
private String taskType; private String taskType;
@ApiModelProperty(value = "任务节点类型电话外呼PHONE_OUTBOUND问卷量表QUESTIONNAIRE_SCALE")
private String taskNodeType;
@ApiModelProperty(value = "任务处理人id") @ApiModelProperty(value = "任务处理人id")
private Long routeHandleId; private Long routeHandleId;

View File

@ -182,7 +182,7 @@ public class LabelFieldContentServiceImpl implements ILabelFieldContentService {
List<LabelFieldInfo> labelFieldInfos = labelFieldInfoMapper.taskPartitionDictIdList(); List<LabelFieldInfo> labelFieldInfos = labelFieldInfoMapper.taskPartitionDictIdList();
if (CollectionUtils.isNotEmpty(labelFieldInfos)) { if (CollectionUtils.isNotEmpty(labelFieldInfos)) {
List<Long> collect = labelFieldInfos.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getTaskPartitionDictId())).map(LabelFieldInfo::getTaskPartitionDictId).distinct().collect(Collectors.toList()); List<Long> collect = labelFieldInfos.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getTaskPartitionDictId())).map(LabelFieldInfo::getTaskPartitionDictId).distinct().collect(Collectors.toList());
List<LabelFieldContent> labelFieldContents = labelFieldContentMapper.selectLabelFieldContentPortraitSn(collect,patientId); List<LabelFieldContent> labelFieldContents = labelFieldContentMapper.selectLabelFieldContentPortraitSn(collect, patientId);
if (CollectionUtils.isNotEmpty(labelFieldContents)) { if (CollectionUtils.isNotEmpty(labelFieldContents)) {
for (LabelFieldInfo fieldInfo : labelFieldInfos) { for (LabelFieldInfo fieldInfo : labelFieldInfos) {
List<String> collect1 = labelFieldContents.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getFieldId()) && fieldInfo.getTaskPartitionDictId().equals(item.getFieldId())).map(LabelFieldContent::getPortraitSn).distinct().collect(Collectors.toList()); List<String> collect1 = labelFieldContents.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getFieldId()) && fieldInfo.getTaskPartitionDictId().equals(item.getFieldId())).map(LabelFieldContent::getPortraitSn).distinct().collect(Collectors.toList());
@ -278,23 +278,27 @@ public class LabelFieldContentServiceImpl implements ILabelFieldContentService {
return AjaxResult.success(); return AjaxResult.success();
} }
List<PortraitSnVO> PortraitSnVOS = new ArrayList<>(); List<PortraitSnVO> PortraitSnVOS = new ArrayList<>();
try { List<GroupingValue> groupingValues = new ArrayList<>();
for (LabelFieldAndPartitionDict labelFieldAndPartitionDict : labelField.getLabelFieldAndPartitionDictList()) { for (LabelFieldAndPartitionDict labelFieldAndPartitionDict : labelField.getLabelFieldAndPartitionDictList()) {
if (StringUtils.isBlank(labelFieldAndPartitionDict.getPortraitSnVOList().get(0).getPortraitSn())) { if (CollectionUtils.isNotEmpty(labelFieldAndPartitionDict.getPortraitSnVOList())) {
String portraitSn = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS"));
labelFieldAndPartitionDict.getPortraitSnVOList().forEach(item -> item.setPortraitSn(portraitSn));
}
PortraitSnVOS.addAll(labelFieldAndPartitionDict.getPortraitSnVOList()); PortraitSnVOS.addAll(labelFieldAndPartitionDict.getPortraitSnVOList());
}
}
if (CollectionUtils.isEmpty(PortraitSnVOS)) {
return AjaxResult.success();
}
try {
for (PortraitSnVO portraitSnVO : PortraitSnVOS) {
if (StringUtils.isBlank(portraitSnVO.getPortraitSn())) {
portraitSnVO.setPortraitSn(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS")));
portraitSnVO.getGroupingValues().forEach(item -> item.setPortraitSn(portraitSnVO.getPortraitSn()));
groupingValues.addAll(portraitSnVO.getGroupingValues());
}
TimeUnit.MILLISECONDS.sleep(10); TimeUnit.MILLISECONDS.sleep(10);
} }
} catch (InterruptedException e) { } catch (InterruptedException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
List<GroupingValue> groupingValues = new ArrayList<>();
for (PortraitSnVO portraitSnVO : PortraitSnVOS) {
portraitSnVO.getGroupingValues().forEach(item -> item.setPortraitSn(portraitSnVO.getPortraitSn()));
groupingValues.addAll(portraitSnVO.getGroupingValues());
}
List<GroupingValue> updateGroupingValues = new ArrayList<>(); List<GroupingValue> updateGroupingValues = new ArrayList<>();
List<GroupingValue> insertGroupingValues = new ArrayList<>(); List<GroupingValue> insertGroupingValues = new ArrayList<>();
//传入标签ids //传入标签ids

View File

@ -7,13 +7,7 @@ import com.xinelu.common.constant.TaskCreateTypeConstant;
import com.xinelu.common.constant.TaskNodeTypeConstants; import com.xinelu.common.constant.TaskNodeTypeConstants;
import com.xinelu.common.constant.TemplateTypeConstants; import com.xinelu.common.constant.TemplateTypeConstants;
import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.enums.NodeExecuteStatusEnum; import com.xinelu.common.enums.*;
import com.xinelu.common.enums.PhoneConnectStatusEnum;
import com.xinelu.common.enums.PhoneMessageRemindEnum;
import com.xinelu.common.enums.RouteNodeNameEnum;
import com.xinelu.common.enums.TaskContentEnum;
import com.xinelu.common.enums.TaskCreateTypeEnum;
import com.xinelu.common.enums.TaskNodeTypeEnum;
import com.xinelu.common.exception.ServiceException; import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.AgeUtil; import com.xinelu.common.utils.AgeUtil;
import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.SecurityUtils;
@ -63,20 +57,17 @@ import com.xinelu.manage.vo.specialdiseasenode.RouteTaskAuditVo;
import com.xinelu.manage.vo.specialdiseasenode.SpecialDiseaseNodeAuditVo; import com.xinelu.manage.vo.specialdiseasenode.SpecialDiseaseNodeAuditVo;
import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseChildRouteAuditVo; import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseChildRouteAuditVo;
import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteAuditVo; import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteAuditVo;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;
/** /**
* 签约患者管理任务路径Service业务层处理 * 签约患者管理任务路径Service业务层处理
@ -118,10 +109,6 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
private IPropagandaInfoService propagandaInfoService; private IPropagandaInfoService propagandaInfoService;
@Resource @Resource
private LabelFieldContentMapper labelFieldContentMapper; private LabelFieldContentMapper labelFieldContentMapper;
@Resource
private TextMessageMapper textMessageMapper;
@Resource
private WechatTemplateMapper wechatTemplateMapper;
@Resource @Resource
private ISignPatientManageRouteNodeService signPatientManageRouteNodeService; private ISignPatientManageRouteNodeService signPatientManageRouteNodeService;
@ -312,15 +299,15 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
String routeHandlePerson = dto.getRouteHandlePerson(); String routeHandlePerson = dto.getRouteHandlePerson();
LocalDateTime time = LocalDateTime.now(); LocalDateTime time = LocalDateTime.now();
// 如果任务类型是电话外呼更新节点任务表新增患者管理任务执行记录 // 如果任务类型是电话外呼更新节点任务表新增患者管理任务执行记录
if (dto.getTaskType().equals(TaskContentEnum.PHONE_OUTBOUND.getInfo())) { if (dto.getTaskNodeType().equals(TaskContentEnum.PHONE_OUTBOUND.getInfo())) {
// 更新节点任务表 // 更新节点任务表
if (StringUtils.isBlank(dto.getPhoneConnectStatus())) {
dto.setPhoneConnectStatus(PhoneConnectStatusEnum.CONNECTED.getInfo());
}
updateSignPatientManageRouteNode(dto, routeHandlePerson, time); updateSignPatientManageRouteNode(dto, routeHandlePerson, time);
// 新增患者管理任务执行记录 // 新增患者管理任务执行记录
insertPatientTaskExecuteRecord(dto, routeHandlePerson, time); insertPatientTaskExecuteRecord(dto, routeHandlePerson, time);
// 发送短信 // 发送短信
if (StringUtils.isBlank(dto.getPhoneConnectStatus())) {
dto.setPhoneConnectStatus(PhoneConnectStatusEnum.CONNECTED.getInfo());
}
if (StringUtils.isNotBlank(dto.getPhoneMessageRemind()) && (PhoneMessageRemindEnum.EVERYONE_SEND_MESSAGE.getInfo().equals(dto.getPhoneMessageRemind()) || (PhoneConnectStatusEnum.CONNECTED.getInfo().equals(dto.getPhoneConnectStatus()) && PhoneMessageRemindEnum.CONNECTED_SEND_MESSAGE.getInfo().equals(dto.getPhoneMessageRemind())) || (PhoneConnectStatusEnum.NOTCONNECTED.getInfo().equals(dto.getPhoneConnectStatus()) && PhoneMessageRemindEnum.NOT_CONNECTED_SEND_MESSAGE.getInfo().equals(dto.getPhoneMessageRemind())))) { if (StringUtils.isNotBlank(dto.getPhoneMessageRemind()) && (PhoneMessageRemindEnum.EVERYONE_SEND_MESSAGE.getInfo().equals(dto.getPhoneMessageRemind()) || (PhoneConnectStatusEnum.CONNECTED.getInfo().equals(dto.getPhoneConnectStatus()) && PhoneMessageRemindEnum.CONNECTED_SEND_MESSAGE.getInfo().equals(dto.getPhoneMessageRemind())) || (PhoneConnectStatusEnum.NOTCONNECTED.getInfo().equals(dto.getPhoneConnectStatus()) && PhoneMessageRemindEnum.NOT_CONNECTED_SEND_MESSAGE.getInfo().equals(dto.getPhoneMessageRemind())))) {
iSignPatientManageRouteNodeService.generateTask(dto.getManageRouteNodeId(), dto.getTaskType()); iSignPatientManageRouteNodeService.generateTask(dto.getManageRouteNodeId(), dto.getTaskType());
} }
@ -662,7 +649,7 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
private Long insertPatientTaskExecuteRecord(PatientQuestionSubmitResultDTO dto, String routeHandlePerson, LocalDateTime time) { private Long insertPatientTaskExecuteRecord(PatientQuestionSubmitResultDTO dto, String routeHandlePerson, LocalDateTime time) {
PatientTaskExecuteRecord patientTaskExecuteRecord = new PatientTaskExecuteRecord(); PatientTaskExecuteRecord patientTaskExecuteRecord = new PatientTaskExecuteRecord();
BeanUtils.copyProperties(dto, patientTaskExecuteRecord); BeanUtils.copyProperties(dto, patientTaskExecuteRecord);
patientTaskExecuteRecord.setTaskContent(dto.getTaskType()); patientTaskExecuteRecord.setTaskContent(dto.getTaskNodeType());
patientTaskExecuteRecord.setExecuteTime(time); patientTaskExecuteRecord.setExecuteTime(time);
patientTaskExecuteRecord.setExecutePerson(routeHandlePerson); patientTaskExecuteRecord.setExecutePerson(routeHandlePerson);
patientTaskExecuteRecord.setExecuteType(TaskCreateTypeConstant.MANUAL_CREATE); patientTaskExecuteRecord.setExecuteType(TaskCreateTypeConstant.MANUAL_CREATE);
@ -682,6 +669,9 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
SignPatientManageRouteNode signPatientManageRouteNode = new SignPatientManageRouteNode(); SignPatientManageRouteNode signPatientManageRouteNode = new SignPatientManageRouteNode();
signPatientManageRouteNode.setId(dto.getManageRouteNodeId()); signPatientManageRouteNode.setId(dto.getManageRouteNodeId());
signPatientManageRouteNode.setNodeExecuteStatus(NodeExecuteStatusEnum.EXECUTED.toString()); signPatientManageRouteNode.setNodeExecuteStatus(NodeExecuteStatusEnum.EXECUTED.toString());
if (dto.getTaskNodeType().equals(TaskContentEnum.PHONE_OUTBOUND.getInfo())) {
signPatientManageRouteNode.setPhoneConnectStatus(dto.getPhoneConnectStatus());
}
signPatientManageRouteNode.setRouteHandleRemark(dto.getRouteHandleRemark()); signPatientManageRouteNode.setRouteHandleRemark(dto.getRouteHandleRemark());
signPatientManageRouteNode.setPhoneConnectStatus(dto.getPhoneConnectStatus()); signPatientManageRouteNode.setPhoneConnectStatus(dto.getPhoneConnectStatus());
signPatientManageRouteNode.setRouteHandleId(dto.getRouteHandleId()); signPatientManageRouteNode.setRouteHandleId(dto.getRouteHandleId());

View File

@ -4,10 +4,20 @@ import lombok.Data;
import java.util.List; import java.util.List;
/**
* 画像编辑传值反值
*/
@Data @Data
public class LabelField { public class LabelField {
/**
* 未使用
*/
private List<List<GroupingValue>> groupingValues; private List<List<GroupingValue>> groupingValues;
/**
* 传值
*/
private List<LabelFieldAndPartitionDict> labelFieldAndPartitionDictList; private List<LabelFieldAndPartitionDict> labelFieldAndPartitionDictList;
} }