1.台账管理干扰源用户和敏感用户模板调整,解决批量导入bug
This commit is contained in:
@@ -17,6 +17,7 @@ public enum SupervisionResponseEnum {
|
|||||||
*/
|
*/
|
||||||
SUPERVISION_COMMON_ERROR("A00550","监督管理模块异常"),
|
SUPERVISION_COMMON_ERROR("A00550","监督管理模块异常"),
|
||||||
IMPORT_SENSITIVE_USER_ERROR("A00550","导入敏感及重要用户失败"),
|
IMPORT_SENSITIVE_USER_ERROR("A00550","导入敏感及重要用户失败"),
|
||||||
|
IMPORT_SENSITIVE_REPORT_ERROR("A00550","导入干扰源用户失败"),
|
||||||
SUPERVISION_SERVICE_NOT_FOUND("A00550","业务实现类丢失,清查看类路径配置"),
|
SUPERVISION_SERVICE_NOT_FOUND("A00550","业务实现类丢失,清查看类路径配置"),
|
||||||
DATA_NOT_EXISTS("A00550","数据不存在"),
|
DATA_NOT_EXISTS("A00550","数据不存在"),
|
||||||
NO_POWER("A00550","不能操作非自己创建的任务!")
|
NO_POWER("A00550","不能操作非自己创建的任务!")
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ public class SensitiveReportExcel implements Serializable {
|
|||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public static class SensitiveReportExcelMsg extends SensitiveReportExcel implements Serializable {
|
public static class SensitiveReportExcelMsg extends SensitiveReportExcel implements Serializable {
|
||||||
@Excel(name = "错误信息描述")
|
@Excel(name = "错误信息描述", width = 30)
|
||||||
private String msg;
|
private String msg;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,8 @@ public class SensitiveUserSExcel implements Serializable {
|
|||||||
@Excel(name = "*变电站", width = 30)
|
@Excel(name = "*变电站", width = 30)
|
||||||
@NotBlank(message = "变电站不能为空")
|
@NotBlank(message = "变电站不能为空")
|
||||||
private String substation;
|
private String substation;
|
||||||
|
|
||||||
|
|
||||||
@Excel(name = "*负荷级别", width = 30)
|
@Excel(name = "*负荷级别", width = 30)
|
||||||
@NotBlank(message = "*负荷级别不能为空")
|
@NotBlank(message = "*负荷级别不能为空")
|
||||||
private String loadLevel;
|
private String loadLevel;
|
||||||
@@ -151,9 +153,8 @@ public class SensitiveUserSExcel implements Serializable {
|
|||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public static class SensitiveUserExcelMsg extends SensitiveUserSExcel implements Serializable {
|
public static class SensitiveUserExcelMsg extends SensitiveUserSExcel implements Serializable {
|
||||||
@Excel(name = "错误信息描述")
|
@Excel(name = "错误信息描述", width = 30)
|
||||||
private String msg;
|
private String msg;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,6 +116,9 @@ public class UserReportParam {
|
|||||||
private String saveOrCheckflag;
|
private String saveOrCheckflag;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value="数据来源类型 0:正常审核流程 1:批量导入")
|
||||||
|
private Integer dataType;
|
||||||
|
|
||||||
private UserReportProjectPO userReportProjectPO;
|
private UserReportProjectPO userReportProjectPO;
|
||||||
|
|
||||||
private UserReportSensitivePO userReportSensitivePO;
|
private UserReportSensitivePO userReportSensitivePO;
|
||||||
|
|||||||
@@ -6,12 +6,8 @@ import com.njcn.common.pojo.annotation.OperateInfo;
|
|||||||
import com.njcn.common.pojo.constant.OperateType;
|
import com.njcn.common.pojo.constant.OperateType;
|
||||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
import com.njcn.common.pojo.exception.BusinessException;
|
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.common.utils.HttpResultUtil;
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
import com.njcn.poi.util.PoiUtil;
|
|
||||||
import com.njcn.supervision.enums.SupervisionResponseEnum;
|
|
||||||
import com.njcn.supervision.pojo.dto.SensitiveUserExcel;
|
|
||||||
import com.njcn.supervision.pojo.param.user.UserReportParam;
|
import com.njcn.supervision.pojo.param.user.UserReportParam;
|
||||||
import com.njcn.supervision.pojo.vo.user.UserReportVO;
|
import com.njcn.supervision.pojo.vo.user.UserReportVO;
|
||||||
import com.njcn.supervision.service.user.UserReportPOService;
|
import com.njcn.supervision.service.user.UserReportPOService;
|
||||||
@@ -30,7 +26,6 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 干扰源用户管理
|
* 干扰源用户管理
|
||||||
@@ -187,14 +182,12 @@ public class UserReportManageController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@PostMapping(value = "/importSensitiveReportData", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
|
@PostMapping(value = "/importSensitiveReportData")
|
||||||
@ApiOperation("批量导入干扰源用户")
|
@ApiOperation("批量导入干扰源用户")
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||||
public HttpResult<String> importSensitiveReportData(@ApiParam(value = "文件", required = true) @RequestPart("file") MultipartFile file, HttpServletResponse response) {
|
public HttpResult<String> importSensitiveReportData(@ApiParam(value = "文件", required = true) @RequestPart("file") MultipartFile file, HttpServletResponse response) {
|
||||||
String methodDescribe = getMethodDescribe("importSensitiveReportData");
|
String methodDescribe = getMethodDescribe("importSensitiveReportData");
|
||||||
if (Objects.isNull(userReportPOService.importSensitiveReportData(file, response))) {
|
userReportPOService.importSensitiveReportData(file, response);
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -211,10 +204,7 @@ public class UserReportManageController extends BaseController {
|
|||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||||
public HttpResult<String> importSensitiveUserData(@ApiParam(value = "文件", required = true) @RequestPart("file") MultipartFile file, HttpServletResponse response) {
|
public HttpResult<String> importSensitiveUserData(@ApiParam(value = "文件", required = true) @RequestPart("file") MultipartFile file, HttpServletResponse response) {
|
||||||
String methodDescribe = getMethodDescribe("importSensitiveUserData");
|
String methodDescribe = getMethodDescribe("importSensitiveUserData");
|
||||||
//批量录入暂降数据
|
userReportPOService.importSensitiveUserData(file, response);
|
||||||
if (Objects.isNull(userReportPOService.importSensitiveUserData(file, response))) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,9 +49,9 @@ public interface UserReportPOService extends IBpmService<UserReportPO> {
|
|||||||
|
|
||||||
void downloadSensitiveUserTemplate();
|
void downloadSensitiveUserTemplate();
|
||||||
|
|
||||||
String importSensitiveUserData(MultipartFile file, HttpServletResponse response);
|
void importSensitiveUserData(MultipartFile file, HttpServletResponse response);
|
||||||
|
|
||||||
void downloadSensitiveReportTemplate();
|
void downloadSensitiveReportTemplate();
|
||||||
|
|
||||||
String importSensitiveReportData(MultipartFile file, HttpServletResponse response);
|
void importSensitiveReportData(MultipartFile file, HttpServletResponse response);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.beans.PropertyDescriptor;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -119,8 +120,14 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
|||||||
userReportPO.setStatus(BpmTaskStatusEnum.RUNNING.getStatus());
|
userReportPO.setStatus(BpmTaskStatusEnum.RUNNING.getStatus());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if(ObjectUtil.isNotNull(userReportParam.getDataType())){
|
||||||
userReportPO.setDataType(0);
|
userReportPO.setDataType(userReportParam.getDataType());
|
||||||
|
if(userReportParam.getDataType()==1){
|
||||||
|
userReportPO.setStatus(FlowStatusEnum.APPROVE.getCode());
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
userReportPO.setDataType(0);
|
||||||
|
}
|
||||||
this.saveOrUpdate(userReportPO);
|
this.saveOrUpdate(userReportPO);
|
||||||
if (
|
if (
|
||||||
CollectionUtil.newArrayList(
|
CollectionUtil.newArrayList(
|
||||||
@@ -564,92 +571,90 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
|||||||
pullDown.setStrings(Stream.of("可研", "建设", "运行", "退运").collect(Collectors.toList()));
|
pullDown.setStrings(Stream.of("可研", "建设", "运行", "退运").collect(Collectors.toList()));
|
||||||
pullDowns.add(pullDown);
|
pullDowns.add(pullDown);
|
||||||
|
|
||||||
|
pullDown = new PullDown();
|
||||||
|
pullDown.setFirstCol(5);
|
||||||
|
pullDown.setLastCol(5);
|
||||||
|
pullDown.setStrings(loadLevel.stream().map(DictData::getName).collect(Collectors.toList()));
|
||||||
|
pullDowns.add(pullDown);
|
||||||
|
|
||||||
pullDown = new PullDown();
|
pullDown = new PullDown();
|
||||||
pullDown.setFirstCol(6);
|
pullDown.setFirstCol(6);
|
||||||
pullDown.setLastCol(6);
|
pullDown.setLastCol(6);
|
||||||
|
pullDown.setStrings(supplyCondition.stream().map(DictData::getName).collect(Collectors.toList()));
|
||||||
|
pullDowns.add(pullDown);
|
||||||
|
|
||||||
|
|
||||||
|
pullDown = new PullDown();
|
||||||
|
pullDown.setFirstCol(8);
|
||||||
|
pullDown.setLastCol(8);
|
||||||
pullDown.setStrings(devVoltage.stream().map(DictData::getName).collect(Collectors.toList()));
|
pullDown.setStrings(devVoltage.stream().map(DictData::getName).collect(Collectors.toList()));
|
||||||
pullDowns.add(pullDown);
|
pullDowns.add(pullDown);
|
||||||
|
|
||||||
pullDown = new PullDown();
|
pullDown = new PullDown();
|
||||||
pullDown.setFirstCol(7);
|
pullDown.setFirstCol(9);
|
||||||
pullDown.setLastCol(7);
|
pullDown.setLastCol(9);
|
||||||
pullDown.setStrings(evaluationDept.stream().map(DictData::getName).collect(Collectors.toList()));
|
pullDown.setStrings(evaluationDept.stream().map(DictData::getName).collect(Collectors.toList()));
|
||||||
pullDowns.add(pullDown);
|
pullDowns.add(pullDown);
|
||||||
|
|
||||||
pullDown = new PullDown();
|
pullDown = new PullDown();
|
||||||
pullDown.setFirstCol(12);
|
pullDown.setFirstCol(12);
|
||||||
pullDown.setLastCol(12);
|
pullDown.setLastCol(12);
|
||||||
pullDown.setStrings(evaluationType.stream().map(DictData::getName).collect(Collectors.toList()));
|
pullDown.setStrings(Stream.of("否", "是").collect(Collectors.toList()));
|
||||||
pullDowns.add(pullDown);
|
pullDowns.add(pullDown);
|
||||||
|
|
||||||
pullDown = new PullDown();
|
pullDown = new PullDown();
|
||||||
pullDown.setFirstCol(13);
|
pullDown.setFirstCol(13);
|
||||||
pullDown.setLastCol(13);
|
pullDown.setLastCol(13);
|
||||||
|
pullDown.setStrings(Stream.of("否", "是").collect(Collectors.toList()));
|
||||||
|
pullDowns.add(pullDown);
|
||||||
|
|
||||||
|
pullDown = new PullDown();
|
||||||
|
pullDown.setFirstCol(14);
|
||||||
|
pullDown.setLastCol(14);
|
||||||
|
pullDown.setStrings(evaluationType.stream().map(DictData::getName).collect(Collectors.toList()));
|
||||||
|
pullDowns.add(pullDown);
|
||||||
|
|
||||||
|
pullDown = new PullDown();
|
||||||
|
pullDown.setFirstCol(15);
|
||||||
|
pullDown.setLastCol(15);
|
||||||
pullDown.setStrings(industryType.stream().map(DictData::getName).collect(Collectors.toList()));
|
pullDown.setStrings(industryType.stream().map(DictData::getName).collect(Collectors.toList()));
|
||||||
pullDowns.add(pullDown);
|
pullDowns.add(pullDown);
|
||||||
|
|
||||||
pullDown = new PullDown();
|
pullDown = new PullDown();
|
||||||
pullDown.setFirstCol(16);
|
pullDown.setFirstCol(18);
|
||||||
pullDown.setLastCol(16);
|
pullDown.setLastCol(18);
|
||||||
pullDown.setStrings(indicatorType.stream().map(DictData::getName).collect(Collectors.toList()));
|
pullDown.setStrings(indicatorType.stream().map(DictData::getName).collect(Collectors.toList()));
|
||||||
pullDowns.add(pullDown);
|
pullDowns.add(pullDown);
|
||||||
|
|
||||||
|
pullDown = new PullDown();
|
||||||
|
pullDown.setFirstCol(19);
|
||||||
|
pullDown.setLastCol(19);
|
||||||
|
pullDown.setStrings(Stream.of("否", "是").collect(Collectors.toList()));
|
||||||
|
pullDowns.add(pullDown);
|
||||||
|
|
||||||
pullDown = new PullDown();
|
pullDown = new PullDown();
|
||||||
pullDown.setFirstCol(22);
|
pullDown.setFirstCol(22);
|
||||||
pullDown.setLastCol(22);
|
pullDown.setLastCol(22);
|
||||||
pullDown.setStrings(supplyCondition.stream().map(DictData::getName).collect(Collectors.toList()));
|
|
||||||
pullDowns.add(pullDown);
|
|
||||||
|
|
||||||
pullDown = new PullDown();
|
|
||||||
pullDown.setFirstCol(20);
|
|
||||||
pullDown.setLastCol(20);
|
|
||||||
pullDown.setStrings(devVoltage.stream().map(DictData::getName).collect(Collectors.toList()));
|
pullDown.setStrings(devVoltage.stream().map(DictData::getName).collect(Collectors.toList()));
|
||||||
pullDowns.add(pullDown);
|
pullDowns.add(pullDown);
|
||||||
|
|
||||||
pullDown = new PullDown();
|
|
||||||
pullDown.setFirstCol(21);
|
|
||||||
pullDown.setLastCol(21);
|
|
||||||
pullDown.setStrings(loadLevel.stream().map(DictData::getName).collect(Collectors.toList()));
|
|
||||||
pullDowns.add(pullDown);
|
|
||||||
|
|
||||||
pullDown = new PullDown();
|
|
||||||
pullDown.setFirstCol(10);
|
|
||||||
pullDown.setLastCol(10);
|
|
||||||
pullDown.setStrings(Stream.of("否", "是").collect(Collectors.toList()));
|
|
||||||
pullDowns.add(pullDown);
|
|
||||||
|
|
||||||
|
|
||||||
pullDown = new PullDown();
|
|
||||||
pullDown.setFirstCol(11);
|
|
||||||
pullDown.setLastCol(11);
|
|
||||||
pullDown.setStrings(Stream.of("否", "是").collect(Collectors.toList()));
|
|
||||||
pullDowns.add(pullDown);
|
|
||||||
|
|
||||||
pullDown = new PullDown();
|
|
||||||
pullDown.setFirstCol(17);
|
|
||||||
pullDown.setLastCol(17);
|
|
||||||
pullDown.setStrings(Stream.of("否", "是").collect(Collectors.toList()));
|
|
||||||
pullDowns.add(pullDown);
|
|
||||||
ExcelUtil.exportExcelPullDown(exportParams, "敏感及重要用户模板.xlsx", pullDowns, SensitiveUserSExcel.class, new ArrayList<>());
|
ExcelUtil.exportExcelPullDown(exportParams, "敏感及重要用户模板.xlsx", pullDowns, SensitiveUserSExcel.class, new ArrayList<>());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public String importSensitiveUserData(MultipartFile file, HttpServletResponse response) {
|
public void importSensitiveUserData(MultipartFile file, HttpServletResponse response) {
|
||||||
ImportParams params = new ImportParams();
|
ImportParams params = new ImportParams();
|
||||||
params.setHeadRows(1);//表头
|
params.setHeadRows(1);//表头
|
||||||
params.setTitleRows(1);//标题
|
params.setTitleRows(1);//标题
|
||||||
params.setNeedVerify(true);
|
params.setNeedVerify(true);
|
||||||
params.setStartSheetIndex(0);
|
params.setStartSheetIndex(0);
|
||||||
params.setSheetNum(1);
|
params.setSheetNum(1);
|
||||||
List<SensitiveUserSExcel> sensitiveUserExcels;
|
List<SensitiveUserSExcel> sensitiveUserExcels=new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
ExcelImportResult<SensitiveUserSExcel> sensitiveUserExcelExcelImportResult = ExcelImportUtil.importExcelMore(file.getInputStream(), SensitiveUserSExcel.class, params);
|
ExcelImportResult<SensitiveUserSExcel> sensitiveUserExcelExcelImportResult = ExcelImportUtil.importExcelMore(file.getInputStream(), SensitiveUserSExcel.class, params);
|
||||||
//如果存在非法数据,将不合格的数据导出
|
//如果存在非法数据,将不合格的数据导出
|
||||||
if (sensitiveUserExcelExcelImportResult.isVerifyFail()) {
|
if (sensitiveUserExcelExcelImportResult.isVerifyFail()) {
|
||||||
PoiUtil.exportFileByWorkbook(sensitiveUserExcelExcelImportResult.getFailWorkbook(), "非法用户数据.xlsx", response);
|
PoiUtil.exportFileByWorkbook(sensitiveUserExcelExcelImportResult.getFailWorkbook(), "非法用户数据.xlsx", response);
|
||||||
return null;
|
|
||||||
} else {
|
} else {
|
||||||
sensitiveUserExcels = sensitiveUserExcelExcelImportResult.getList();
|
sensitiveUserExcels = sensitiveUserExcelExcelImportResult.getList();
|
||||||
}
|
}
|
||||||
@@ -748,9 +753,7 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
|||||||
//判断有没有错误信息
|
//判断有没有错误信息
|
||||||
if (CollectionUtil.isNotEmpty(sensitiveUserExcelMsgs)) {
|
if (CollectionUtil.isNotEmpty(sensitiveUserExcelMsgs)) {
|
||||||
ExcelUtil.exportExcel("失败列表.xlsx", SensitiveUserSExcel.SensitiveUserExcelMsg.class, sensitiveUserExcelMsgs);
|
ExcelUtil.exportExcel("失败列表.xlsx", SensitiveUserSExcel.SensitiveUserExcelMsg.class, sensitiveUserExcelMsgs);
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
return CommonResponseEnum.SUCCESS.getCode();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -831,25 +834,24 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public String importSensitiveReportData(MultipartFile file, HttpServletResponse response) {
|
public void importSensitiveReportData(MultipartFile file, HttpServletResponse response) {
|
||||||
ImportParams params = new ImportParams();
|
ImportParams params = new ImportParams();
|
||||||
params.setHeadRows(1);//表头
|
params.setHeadRows(1);//表头
|
||||||
params.setTitleRows(1);//标题
|
params.setTitleRows(1);//标题
|
||||||
params.setNeedVerify(true);
|
params.setNeedVerify(true);
|
||||||
params.setStartSheetIndex(0);
|
params.setStartSheetIndex(0);
|
||||||
params.setSheetNum(1);
|
params.setSheetNum(1);
|
||||||
List<SensitiveReportExcel> sensitiveUserExcels;
|
List<SensitiveReportExcel> sensitiveUserExcels=new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
ExcelImportResult<SensitiveReportExcel> sensitiveUserExcelExcelImportResult = ExcelImportUtil.importExcelMore(file.getInputStream(), SensitiveReportExcel.class, params);
|
ExcelImportResult<SensitiveReportExcel> sensitiveUserExcelExcelImportResult = ExcelImportUtil.importExcelMore(file.getInputStream(), SensitiveReportExcel.class, params);
|
||||||
//如果存在非法数据,将不合格的数据导出
|
//如果存在非法数据,将不合格的数据导出
|
||||||
if (sensitiveUserExcelExcelImportResult.isVerifyFail()) {
|
if (sensitiveUserExcelExcelImportResult.isVerifyFail()) {
|
||||||
PoiUtil.exportFileByWorkbook(sensitiveUserExcelExcelImportResult.getFailWorkbook(), "非法用户数据.xlsx", response);
|
PoiUtil.exportFileByWorkbook(sensitiveUserExcelExcelImportResult.getFailWorkbook(), "非法用户数据.xlsx", response);
|
||||||
return null;
|
|
||||||
} else {
|
} else {
|
||||||
sensitiveUserExcels = sensitiveUserExcelExcelImportResult.getList();
|
sensitiveUserExcels = sensitiveUserExcelExcelImportResult.getList();
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new BusinessException(SupervisionResponseEnum.IMPORT_SENSITIVE_USER_ERROR);
|
throw new BusinessException(SupervisionResponseEnum.IMPORT_SENSITIVE_REPORT_ERROR);
|
||||||
}
|
}
|
||||||
//主要非线性设备类型-冀北
|
//主要非线性设备类型-冀北
|
||||||
List<SysDicTreePO> treeVOS = dictTreeFeignClient.queryByCodeList(DicDataTypeEnum.Major_Nonlinear_Device.getCode()).getData();
|
List<SysDicTreePO> treeVOS = dictTreeFeignClient.queryByCodeList(DicDataTypeEnum.Major_Nonlinear_Device.getCode()).getData();
|
||||||
@@ -954,10 +956,8 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
|||||||
}
|
}
|
||||||
//判断有没有错误信息
|
//判断有没有错误信息
|
||||||
if (CollectionUtil.isNotEmpty(sensitiveUserExcelMsgs)) {
|
if (CollectionUtil.isNotEmpty(sensitiveUserExcelMsgs)) {
|
||||||
ExcelUtil.exportExcel("失败列表.xlsx", SensitiveUserExcel.SensitiveUserExcelMsg.class, sensitiveUserExcelMsgs);
|
ExcelUtil.exportExcel("失败列表.xlsx", SensitiveReportExcel.SensitiveReportExcelMsg.class, sensitiveUserExcelMsgs);
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
return CommonResponseEnum.SUCCESS.getCode();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, String> getTreeString(String name, List<SysDicTreePO> treeVOS) {
|
public Map<String, String> getTreeString(String name, List<SysDicTreePO> treeVOS) {
|
||||||
@@ -983,10 +983,10 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
|||||||
*/
|
*/
|
||||||
public String[] getNullPropertyNames(Object source) {
|
public String[] getNullPropertyNames(Object source) {
|
||||||
final BeanWrapper src = new BeanWrapperImpl(source);
|
final BeanWrapper src = new BeanWrapperImpl(source);
|
||||||
java.beans.PropertyDescriptor[] pds = src.getPropertyDescriptors();
|
PropertyDescriptor[] pds = src.getPropertyDescriptors();
|
||||||
|
|
||||||
Set<String> emptyNames = new HashSet<>();
|
Set<String> emptyNames = new HashSet<>();
|
||||||
for (java.beans.PropertyDescriptor pd : pds) {
|
for (PropertyDescriptor pd : pds) {
|
||||||
Object srcValue = src.getPropertyValue(pd.getName());
|
Object srcValue = src.getPropertyValue(pd.getName());
|
||||||
if (srcValue == null) {
|
if (srcValue == null) {
|
||||||
emptyNames.add(pd.getName());
|
emptyNames.add(pd.getName());
|
||||||
|
|||||||
Reference in New Issue
Block a user