患者导入限制修改
This commit is contained in:
parent
b7a6a3d46a
commit
ce52219985
@ -348,21 +348,20 @@ public class PatientInfoServiceImpl implements IPatientInfoService {
|
||||
public AjaxResult patientUpload(List<PatientInfoImport> list, Integer isDistinct, String fileName, String importName) {
|
||||
int number;
|
||||
String importPersonTime = sysConfigService.selectConfigByKey("import_person_time");
|
||||
if (org.apache.commons.lang3.StringUtils.isBlank(importPersonTime) || importPersonTime.equals(StringUtils.EMPTY)) {
|
||||
number = 1000;
|
||||
}
|
||||
if (!importPersonTime.equals(StringUtils.EMPTY)) {
|
||||
number = Integer.parseInt(importPersonTime);
|
||||
if (CollectionUtils.isNotEmpty(list) && list.size() > number) {
|
||||
return AjaxResult.error("本次导入表数据超过" + number + "人次上限!");
|
||||
}
|
||||
PatientInfoImport patientInfoImport1 = new PatientInfoImport();
|
||||
patientInfoImport1.setCreateTime(LocalDateTime.now());
|
||||
List<PatientInfoImport> patientInfoImports = patientInfoImportMapper.selectPatientInfoImportList(patientInfoImport1);
|
||||
if (CollectionUtils.isNotEmpty(patientInfoImports) && patientInfoImports.size() > number) {
|
||||
return AjaxResult.error("今日导入已达" + number + "人次上限!");
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(list) && CollectionUtils.isNotEmpty(patientInfoImports) && (list.size() + patientInfoImports.size() > number)) {
|
||||
return AjaxResult.error("总计导入超过" + number + "人次上限,请修改后重新导入!");
|
||||
// PatientInfoImport patientInfoImport1 = new PatientInfoImport();
|
||||
// patientInfoImport1.setCreateTime(LocalDateTime.now());
|
||||
// List<PatientInfoImport> patientInfoImports = patientInfoImportMapper.selectPatientInfoImportList(patientInfoImport1);
|
||||
// if (CollectionUtils.isNotEmpty(patientInfoImports) && patientInfoImports.size() > number) {
|
||||
// return AjaxResult.error("今日导入已达" + number + "人次上限!");
|
||||
// }
|
||||
// if (CollectionUtils.isNotEmpty(list) && CollectionUtils.isNotEmpty(patientInfoImports) && (list.size() + patientInfoImports.size() > number)) {
|
||||
// return AjaxResult.error("总计导入超过" + number + "人次上限,请修改后重新导入!");
|
||||
// }
|
||||
}
|
||||
//登录用户科室信息
|
||||
SysUser sysUser = sysUserMapper.selectUserById(SecurityUtils.getUserId());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user