直接外呼创建上线
This commit is contained in:
parent
ce52219985
commit
f5dad5d7aa
@ -82,14 +82,14 @@ public class PatientInfoServiceImpl implements IPatientInfoService {
|
||||
@Resource
|
||||
private PatientVisitRecordMapper patientVisitRecordMapper;
|
||||
@Resource
|
||||
private RegexUtil regexUtil;
|
||||
@Resource
|
||||
private PatientInfoImportMainMapper patientInfoImportMainMapper;
|
||||
@Resource
|
||||
private AgencyMapper agencyMapper;
|
||||
@Resource
|
||||
private ISysConfigService sysConfigService;
|
||||
|
||||
private static final String IMPORT_PERSON_TIME = "import_person_time";
|
||||
|
||||
/**
|
||||
* 查询患者信息
|
||||
*
|
||||
@ -347,7 +347,7 @@ public class PatientInfoServiceImpl implements IPatientInfoService {
|
||||
@Override
|
||||
public AjaxResult patientUpload(List<PatientInfoImport> list, Integer isDistinct, String fileName, String importName) {
|
||||
int number;
|
||||
String importPersonTime = sysConfigService.selectConfigByKey("import_person_time");
|
||||
String importPersonTime = sysConfigService.selectConfigByKey(IMPORT_PERSON_TIME);
|
||||
if (!importPersonTime.equals(StringUtils.EMPTY)) {
|
||||
number = Integer.parseInt(importPersonTime);
|
||||
if (CollectionUtils.isNotEmpty(list) && list.size() > number) {
|
||||
|
||||
@ -84,6 +84,7 @@ import com.xinelu.manage.vo.specialdiseasenode.SpecialDiseaseNodeAuditVo;
|
||||
import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseChildRouteAuditVo;
|
||||
import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteAuditVo;
|
||||
import com.xinelu.system.mapper.SysDictDataMapper;
|
||||
import com.xinelu.system.service.ISysConfigService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
@ -161,9 +162,13 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
||||
private SysDictDataMapper sysDictDataMapper;
|
||||
@Value("${aiob.callBackUrl}")
|
||||
private String callBackUrl;
|
||||
@Resource
|
||||
private ISysConfigService sysConfigService;
|
||||
|
||||
private static final String SUCCESS = "OK";
|
||||
|
||||
private static final String DAY_CALL_FREQUENCY = "day_call_frequency";
|
||||
|
||||
/**
|
||||
* 查询签约患者管理任务路径
|
||||
*
|
||||
@ -886,24 +891,28 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult directOutbound(SignPatientManageRouteNode introducedNode) {
|
||||
//如果是批量 创建
|
||||
SignPatientManageRouteNodeDto signPatientManageRouteNode = new SignPatientManageRouteNodeDto();
|
||||
signPatientManageRouteNode.setNodePlanTime(LocalDateTime.now());
|
||||
List<SignPatientManageRouteNode> signPatientManageRouteNodes = signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeList(signPatientManageRouteNode);
|
||||
if (CollectionUtils.isNotEmpty(signPatientManageRouteNodes) && signPatientManageRouteNodes.size() >= 100) {
|
||||
return AjaxResult.error("今日创建任务已达上线,请改日创建任务!");
|
||||
}
|
||||
String dayCallFrequency = sysConfigService.selectConfigByKey(DAY_CALL_FREQUENCY);
|
||||
//获取患者信息
|
||||
List<PatientInfoVo> listPatient = new ArrayList<>();
|
||||
PatientInfoDto patientInfo = new PatientInfoDto();
|
||||
patientInfo.setSn(introducedNode.getSn());
|
||||
listPatient = patientInfoMapper.getPatientList(patientInfo);
|
||||
if (CollectionUtils.isNotEmpty(listPatient) && listPatient.size() > 100) {
|
||||
if (StringUtils.isNotBlank(dayCallFrequency) && dayCallFrequency.equals(com.xinelu.common.utils.StringUtils.EMPTY)){
|
||||
int number = Integer.parseInt(dayCallFrequency);
|
||||
//如果是批量 创建
|
||||
SignPatientManageRouteNodeDto signPatientManageRouteNode = new SignPatientManageRouteNodeDto();
|
||||
signPatientManageRouteNode.setNodePlanTime(LocalDateTime.now());
|
||||
List<SignPatientManageRouteNode> signPatientManageRouteNodes = signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeList(signPatientManageRouteNode);
|
||||
if (CollectionUtils.isNotEmpty(signPatientManageRouteNodes) && signPatientManageRouteNodes.size() >= number) {
|
||||
return AjaxResult.error("今日创建任务已达上线,请改日创建任务!");
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(listPatient) && listPatient.size() > number) {
|
||||
return AjaxResult.error("创建任务数量超出当日上限,请减少创建任务数量!");
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(listPatient) && CollectionUtils.isNotEmpty(signPatientManageRouteNodes) && (listPatient.size() + signPatientManageRouteNodes.size()) > 100) {
|
||||
if (CollectionUtils.isNotEmpty(listPatient) && CollectionUtils.isNotEmpty(signPatientManageRouteNodes) && (listPatient.size() + signPatientManageRouteNodes.size()) > number) {
|
||||
return AjaxResult.error("创建任务数量超出当日上限,请减少创建任务数量!");
|
||||
}
|
||||
}
|
||||
List<SignPatientManageRoute> signPatientManageRoutes = new ArrayList<>();
|
||||
ArrayList<SignPatientManageRouteNode> saveNodes = new ArrayList<>();
|
||||
for (PatientInfoVo patientInfoVo : listPatient) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user