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