代码调整
This commit is contained in:
@@ -17,6 +17,7 @@ public enum SupervisionResponseEnum {
|
||||
*/
|
||||
SUPERVISION_COMMON_ERROR("A00550","监督管理模块异常"),
|
||||
IMPORT_SENSITIVE_USER_ERROR("A00550","导入敏感及重要用户失败"),
|
||||
IMPORT_SENSITIVE_USER_DATA_ERROR("A00550","敏感及重要用户数据为空"),
|
||||
IMPORT_SENSITIVE_REPORT_ERROR("A00550","导入干扰源用户失败"),
|
||||
SUPERVISION_SERVICE_NOT_FOUND("A00550","业务实现类丢失,清查看类路径配置"),
|
||||
DATA_NOT_EXISTS("A00550","数据不存在"),
|
||||
|
||||
@@ -58,7 +58,7 @@ public class SensitiveUserSExcel implements Serializable {
|
||||
|
||||
|
||||
@Excel(name = "工程预期投产日期(yyyy-MM-dd)", width = 30)
|
||||
//@NotBlank(message = "工程预期投产日期不能为空")
|
||||
@NotBlank(message = "工程预期投产日期不能为空")
|
||||
private String expectedProductionDate;
|
||||
|
||||
@Excel(name = "电压等级", width = 30)
|
||||
|
||||
@@ -779,15 +779,19 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
||||
params.setNeedVerify(true);
|
||||
params.setStartSheetIndex(0);
|
||||
params.setSheetNum(1);
|
||||
List<SensitiveUserSExcel> sensitiveUserExcels = new ArrayList<>();
|
||||
List<SensitiveUserSExcel> sensitiveUserExcels;
|
||||
try {
|
||||
ExcelImportResult<SensitiveUserSExcel> sensitiveUserExcelExcelImportResult = ExcelImportUtil.importExcelMore(file.getInputStream(), SensitiveUserSExcel.class, params);
|
||||
//如果存在非法数据,将不合格的数据导出
|
||||
if (sensitiveUserExcelExcelImportResult.isVerifyFail()) {
|
||||
PoiUtil.exportFileByWorkbook(sensitiveUserExcelExcelImportResult.getFailWorkbook(), "非法用户数据.xlsx", response);
|
||||
} else {
|
||||
sensitiveUserExcels = sensitiveUserExcelExcelImportResult.getList();
|
||||
List<SensitiveUserSExcel> sensitiveUserExcelExcelImportResult = ExcelImportUtil.importExcel(file.getInputStream(), SensitiveUserSExcel.class, params);
|
||||
sensitiveUserExcels = sensitiveUserExcelExcelImportResult.stream().filter(x -> StringUtils.isNotBlank(x.getCity())).collect(Collectors.toList());
|
||||
if(CollectionUtil.isEmpty(sensitiveUserExcels)){
|
||||
throw new BusinessException(SupervisionResponseEnum.IMPORT_DEV_DATA_ERROR);
|
||||
}
|
||||
//如果存在非法数据,将不合格的数据导出
|
||||
// if (sensitiveUserExcelExcelImportResult.isVerifyFail()) {
|
||||
// PoiUtil.exportFileByWorkbook(sensitiveUserExcelExcelImportResult.getFailWorkbook(), "非法用户数据.xlsx", response);
|
||||
// } else {
|
||||
// sensitiveUserExcels = sensitiveUserExcelExcelImportResult.getList();
|
||||
// }
|
||||
} catch (Exception e) {
|
||||
throw new BusinessException(SupervisionResponseEnum.IMPORT_SENSITIVE_USER_ERROR);
|
||||
}
|
||||
@@ -807,7 +811,7 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
||||
List<DictData> supplyCondition = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.SUPPLY_CONDITION.getCode()).getData();
|
||||
|
||||
//解决填报部门问题
|
||||
List<DeptDTO> data = deptFeignClient.getDeptDescendantIndexes(RequestUtil.getUserIndex(), WebUtil.filterDeptType()).getData();
|
||||
List<DeptDTO> data = deptFeignClient.getDeptDescendantIndexes(RequestUtil.getDeptIndex(), WebUtil.filterDeptType()).getData();
|
||||
|
||||
|
||||
//执行批量导入敏感及重要用户,入库过程中会进行数据校验
|
||||
|
||||
Reference in New Issue
Block a user