导入患者、创建任务修改
This commit is contained in:
parent
2a6938c495
commit
d82eff7f29
@ -2,6 +2,8 @@ package com.xinelu.manage.dto.signpatientmanageroutenode;
|
|||||||
|
|
||||||
import com.xinelu.common.annotation.Excel;
|
import com.xinelu.common.annotation.Excel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@ -87,6 +89,6 @@ public class SignPatientManageRouteNodeDto {
|
|||||||
@ApiModelProperty(value = "拨打状态:DIALED,已拨打:NODIALED:未拨打;默认NULL表示未拨打")
|
@ApiModelProperty(value = "拨打状态:DIALED,已拨打:NODIALED:未拨打;默认NULL表示未拨打")
|
||||||
private String dialStatus;
|
private String dialStatus;
|
||||||
|
|
||||||
|
private LocalDateTime nodePlanTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -348,6 +348,18 @@ public class PatientInfoServiceImpl implements IPatientInfoService {
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult patientUpload(List<PatientInfoImport> list, Integer isDistinct, String fileName) {
|
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());
|
SysUser sysUser = sysUserMapper.selectUserById(SecurityUtils.getUserId());
|
||||||
Agency agency = agencyMapper.selectAgencyById(sysUser.getHospitalAgencyId());
|
Agency agency = agencyMapper.selectAgencyById(sysUser.getHospitalAgencyId());
|
||||||
|
|||||||
@ -39,6 +39,7 @@ import com.xinelu.manage.dto.patientquestionoptionresult.PatientQuestionOptionRe
|
|||||||
import com.xinelu.manage.dto.patientquestionsubjectresult.PatientQuestionSubjectResultDTO;
|
import com.xinelu.manage.dto.patientquestionsubjectresult.PatientQuestionSubjectResultDTO;
|
||||||
import com.xinelu.manage.dto.patientquestionsubmitresult.PatientQuestionSubmitResultDTO;
|
import com.xinelu.manage.dto.patientquestionsubmitresult.PatientQuestionSubmitResultDTO;
|
||||||
import com.xinelu.manage.dto.signpatientmanageroutenode.CreateAiobActualTimeTaskDto;
|
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.dto.smssend.SmsInfoDTO;
|
||||||
import com.xinelu.manage.mapper.labelfieldcontent.LabelFieldContentMapper;
|
import com.xinelu.manage.mapper.labelfieldcontent.LabelFieldContentMapper;
|
||||||
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
|
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
|
||||||
@ -195,11 +196,23 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
|||||||
public AjaxResult insertSignPatientManageRoute(SignPatientManageRouteVO signPatientManageRoute) {
|
public AjaxResult insertSignPatientManageRoute(SignPatientManageRouteVO signPatientManageRoute) {
|
||||||
//如果是批量 创建
|
//如果是批量 创建
|
||||||
if (StringUtils.isNotBlank(signPatientManageRoute.getSn())) {
|
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<>();
|
List<PatientInfoVo> listPatient = new ArrayList<>();
|
||||||
PatientInfoDto patientInfo = new PatientInfoDto();
|
PatientInfoDto patientInfo = new PatientInfoDto();
|
||||||
patientInfo.setSn(signPatientManageRoute.getSn());
|
patientInfo.setSn(signPatientManageRoute.getSn());
|
||||||
listPatient = patientInfoMapper.getPatientList(patientInfo);
|
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) {
|
for (PatientInfoVo patientInfoVo : listPatient) {
|
||||||
signPatientManageRoute.setPatientId(patientInfoVo.getId());
|
signPatientManageRoute.setPatientId(patientInfoVo.getId());
|
||||||
signPatientManageRoute.setPatientName(patientInfoVo.getPatientName());
|
signPatientManageRoute.setPatientName(patientInfoVo.getPatientName());
|
||||||
|
|||||||
@ -86,6 +86,9 @@
|
|||||||
<if test="sn != null and sn != ''">
|
<if test="sn != null and sn != ''">
|
||||||
and sn = #{sn}
|
and sn = #{sn}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
and DATE_FORMAT(create_time, '%Y-%m-%d') = DATE_FORMAT(#{createTime}, '%Y-%m-%d')
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@ -176,6 +176,9 @@
|
|||||||
<if test="dialStatus !=null and dialStatus == 'DIALED'">
|
<if test="dialStatus !=null and dialStatus == 'DIALED'">
|
||||||
and dial_status = 'DIALED'
|
and dial_status = 'DIALED'
|
||||||
</if>
|
</if>
|
||||||
|
<if test="nodePlanTime != null">
|
||||||
|
and DATE_FORMAT(node_plan_time, '%Y-%m-%d') = DATE_FORMAT(#{nodePlanTime}, '%Y-%m-%d')
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user