导入患者、创建任务修改

This commit is contained in:
zhangheng 2025-03-03 11:53:02 +08:00
parent 2a6938c495
commit d82eff7f29
5 changed files with 34 additions and 1 deletions

View File

@ -2,6 +2,8 @@ package com.xinelu.manage.dto.signpatientmanageroutenode;
import com.xinelu.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import java.time.LocalDateTime;
import java.util.List;
import lombok.Data;
@ -87,6 +89,6 @@ public class SignPatientManageRouteNodeDto {
@ApiModelProperty(value = "拨打状态DIALED,已拨打NODIALED:未拨打默认NULL表示未拨打")
private String dialStatus;
private LocalDateTime nodePlanTime;
}

View File

@ -348,6 +348,18 @@ public class PatientInfoServiceImpl implements IPatientInfoService {
@Transactional(rollbackFor = Exception.class)
@Override
public AjaxResult patientUpload(List<PatientInfoImport> list, Integer isDistinct, String fileName) {
if (CollectionUtils.isNotEmpty(list) && list.size() > 100) {
return AjaxResult.error("本次导入表数据超过100人次上限");
}
PatientInfoImport patientInfoImport1 = new PatientInfoImport();
patientInfoImport1.setCreateTime(LocalDateTime.now());
List<PatientInfoImport> patientInfoImports = patientInfoImportMapper.selectPatientInfoImportList(patientInfoImport1);
if (CollectionUtils.isNotEmpty(patientInfoImports) && patientInfoImports.size() > 100) {
return AjaxResult.error("今日导入已达100人次上限");
}
if (CollectionUtils.isNotEmpty(list) && CollectionUtils.isNotEmpty(patientInfoImports) && (list.size() + patientInfoImports.size() > 100)) {
return AjaxResult.error("总计导入超过100人次上限请修改后重新导入");
}
//登录用户科室信息
SysUser sysUser = sysUserMapper.selectUserById(SecurityUtils.getUserId());
Agency agency = agencyMapper.selectAgencyById(sysUser.getHospitalAgencyId());

View File

@ -39,6 +39,7 @@ import com.xinelu.manage.dto.patientquestionoptionresult.PatientQuestionOptionRe
import com.xinelu.manage.dto.patientquestionsubjectresult.PatientQuestionSubjectResultDTO;
import com.xinelu.manage.dto.patientquestionsubmitresult.PatientQuestionSubmitResultDTO;
import com.xinelu.manage.dto.signpatientmanageroutenode.CreateAiobActualTimeTaskDto;
import com.xinelu.manage.dto.signpatientmanageroutenode.SignPatientManageRouteNodeDto;
import com.xinelu.manage.dto.smssend.SmsInfoDTO;
import com.xinelu.manage.mapper.labelfieldcontent.LabelFieldContentMapper;
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
@ -195,11 +196,23 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
public AjaxResult insertSignPatientManageRoute(SignPatientManageRouteVO signPatientManageRoute) {
//如果是批量 创建
if (StringUtils.isNotBlank(signPatientManageRoute.getSn())) {
SignPatientManageRouteNodeDto signPatientManageRouteNode = new SignPatientManageRouteNodeDto();
signPatientManageRouteNode.setNodePlanTime(LocalDateTime.now());
List<SignPatientManageRouteNode> signPatientManageRouteNodes = signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeList(signPatientManageRouteNode);
if (CollectionUtils.isNotEmpty(signPatientManageRouteNodes) && signPatientManageRouteNodes.size() >= 100) {
return AjaxResult.error("今日创建任务已达上线,请改日创建任务!");
}
//获取患者信息
List<PatientInfoVo> listPatient = new ArrayList<>();
PatientInfoDto patientInfo = new PatientInfoDto();
patientInfo.setSn(signPatientManageRoute.getSn());
listPatient = patientInfoMapper.getPatientList(patientInfo);
if (CollectionUtils.isNotEmpty(listPatient) && listPatient.size() > 100) {
return AjaxResult.error("创建任务数量超出当日上限,请减少创建任务数量!");
}
if (CollectionUtils.isNotEmpty(listPatient) && CollectionUtils.isNotEmpty(signPatientManageRouteNodes) && (listPatient.size() + signPatientManageRouteNodes.size()) > 100) {
return AjaxResult.error("创建任务数量超出当日上限,请减少创建任务数量!");
}
for (PatientInfoVo patientInfoVo : listPatient) {
signPatientManageRoute.setPatientId(patientInfoVo.getId());
signPatientManageRoute.setPatientName(patientInfoVo.getPatientName());

View File

@ -86,6 +86,9 @@
<if test="sn != null and sn != ''">
and sn = #{sn}
</if>
<if test="createTime != null">
and DATE_FORMAT(create_time, '%Y-%m-%d') = DATE_FORMAT(#{createTime}, '%Y-%m-%d')
</if>
</where>
</select>

View File

@ -176,6 +176,9 @@
<if test="dialStatus !=null and dialStatus == 'DIALED'">
and dial_status = 'DIALED'
</if>
<if test="nodePlanTime != null">
and DATE_FORMAT(node_plan_time, '%Y-%m-%d') = DATE_FORMAT(#{nodePlanTime}, '%Y-%m-%d')
</if>
</where>
</select>