1.调整终端管理下,终端和监测点模糊搜索bug

This commit is contained in:
wr
2024-06-20 17:54:48 +08:00
parent d3af5bd9e4
commit 7abce7651d
5 changed files with 46 additions and 47 deletions

View File

@@ -1646,7 +1646,6 @@
AND device.id = deviceDetail.id AND device.id = deviceDetail.id
AND line.id = lineDetail.id AND line.id = lineDetail.id
AND vg.Id = voltage.id AND vg.Id = voltage.id
<if test="ids!=null and ids.size() > 0"> <if test="ids!=null and ids.size() > 0">
AND line.id IN AND line.id IN
<foreach collection="ids" item="item" open="(" close=")" separator=","> <foreach collection="ids" item="item" open="(" close=")" separator=",">
@@ -1655,14 +1654,14 @@
</if> </if>
<if test="searchValue!=null and searchValue!='' and type==2"> <if test="searchValue!=null and searchValue!='' and type==2">
and ( and (
lineName like CONCAT('%', #{searchValue}, '%') line.NAME like CONCAT('%', #{searchValue}, '%')
or subName like CONCAT('%', #{searchValue}, '%') or substation.NAME like CONCAT('%', #{searchValue}, '%')
) )
</if> </if>
<if test="searchValue!=null and searchValue!='' and type==1"> <if test="searchValue!=null and searchValue!='' and type==1">
and ( and (
devName like CONCAT('%', #{searchValue}, '%') device.NAME like CONCAT('%', #{searchValue}, '%')
or subName like CONCAT('%', #{searchValue}, '%') or substation.NAME like CONCAT('%', #{searchValue}, '%')
) )
</if> </if>
</where> </where>

View File

@@ -59,7 +59,7 @@ public class UserReportManageController extends BaseController {
} }
@PostMapping("/update") @PostMapping("/update")
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType= OperateType.UPDATE) @OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.UPDATE)
@Operation(summary = "重新发起") @Operation(summary = "重新发起")
@ApiImplicitParam(name = "userReportParam", value = "实体参数", required = true) @ApiImplicitParam(name = "userReportParam", value = "实体参数", required = true)
public HttpResult<Object> updateUserReport(@RequestBody @Validated UserReportParam.UserReportUpdate userReportParam) { public HttpResult<Object> updateUserReport(@RequestBody @Validated UserReportParam.UserReportUpdate userReportParam) {
@@ -69,7 +69,7 @@ public class UserReportManageController extends BaseController {
} }
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType= OperateType.ADD) @OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
@PostMapping("/auditUserReport") @PostMapping("/auditUserReport")
@ApiOperation("修改干扰源用户") @ApiOperation("修改干扰源用户")
@ApiImplicitParam(name = "userReportUpdate", value = "实体参数", required = true) @ApiImplicitParam(name = "userReportUpdate", value = "实体参数", required = true)
@@ -143,7 +143,7 @@ public class UserReportManageController extends BaseController {
@ApiImplicitParam(name = "userReportQueryParam", value = "参数", required = true) @ApiImplicitParam(name = "userReportQueryParam", value = "参数", required = true)
public HttpResult<Page<UserReportVO>> getNormalUserPage(@RequestBody @Validated UserReportParam.UserReportQueryParam userReportQueryParam) { public HttpResult<Page<UserReportVO>> getNormalUserPage(@RequestBody @Validated UserReportParam.UserReportQueryParam userReportQueryParam) {
String methodDescribe = getMethodDescribe("getInterferenceUserPage"); String methodDescribe = getMethodDescribe("getInterferenceUserPage");
Page<UserReportVO> out = userReportPOService.getInterferenceUserPage(userReportQueryParam,true); Page<UserReportVO> out = userReportPOService.getInterferenceUserPage(userReportQueryParam, true);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, out, methodDescribe); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, out, methodDescribe);
} }
@@ -153,7 +153,7 @@ public class UserReportManageController extends BaseController {
@ApiImplicitParam(name = "userReportQueryParam", value = "参数", required = true) @ApiImplicitParam(name = "userReportQueryParam", value = "参数", required = true)
public HttpResult<Page<UserReportVO>> getInterferenceUserPage(@RequestBody @Validated UserReportParam.UserReportQueryParam userReportQueryParam) { public HttpResult<Page<UserReportVO>> getInterferenceUserPage(@RequestBody @Validated UserReportParam.UserReportQueryParam userReportQueryParam) {
String methodDescribe = getMethodDescribe("getInterferenceUserPage"); String methodDescribe = getMethodDescribe("getInterferenceUserPage");
Page<UserReportVO> out = userReportPOService.getInterferenceUserPage(userReportQueryParam,false); Page<UserReportVO> out = userReportPOService.getInterferenceUserPage(userReportQueryParam, false);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, out, methodDescribe); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, out, methodDescribe);
} }
@@ -168,9 +168,6 @@ public class UserReportManageController extends BaseController {
} }
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD) @OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
@PostMapping("/cancel") @PostMapping("/cancel")
@ApiOperation("取消") @ApiOperation("取消")
@@ -183,11 +180,13 @@ public class UserReportManageController extends BaseController {
@OperateInfo(info = LogEnum.BUSINESS_COMMON) @OperateInfo(info = LogEnum.BUSINESS_COMMON)
@GetMapping(value ="/downloadSensitiveReportTemplate", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE) @GetMapping(value = "/downloadSensitiveReportTemplate", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
@ApiOperation("下载干扰源用户台账模板") @ApiOperation("下载干扰源用户台账模板")
public void downloadSensitiveReportTemplate() { public void downloadSensitiveReportTemplate() {
userReportPOService.downloadSensitiveReportTemplate(); userReportPOService.downloadSensitiveReportTemplate();
} }
@PostMapping(value = "/importSensitiveReportData", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE) @PostMapping(value = "/importSensitiveReportData", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
@ApiOperation("批量导入干扰源用户") @ApiOperation("批量导入干扰源用户")
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD) @OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
@@ -199,9 +198,8 @@ public class UserReportManageController extends BaseController {
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
} }
@OperateInfo(info = LogEnum.BUSINESS_COMMON) @OperateInfo(info = LogEnum.BUSINESS_COMMON)
@GetMapping(value ="/downloadSensitiveUserTemplate", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE) @GetMapping(value = "/downloadSensitiveUserTemplate", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
@ApiOperation("下载敏感及重要用户模板") @ApiOperation("下载敏感及重要用户模板")
public void downloadSensitiveUserTemplate() { public void downloadSensitiveUserTemplate() {
userReportPOService.downloadSensitiveUserTemplate(); userReportPOService.downloadSensitiveUserTemplate();

View File

@@ -145,6 +145,9 @@ public class QuitRunningDeviceServiceImpl extends ServiceImpl<QuitRunningDeviceM
param.setType(quitRunningDeviceQueryParam.getDeviceType()); param.setType(quitRunningDeviceQueryParam.getDeviceType());
param.setSearchValue(quitRunningDeviceQueryParam.getSearchValue()); param.setSearchValue(quitRunningDeviceQueryParam.getSearchValue());
List<LineDetailVO.Detail> lineDetail = lineFeignClient.getDeptDeviceDetailData(param).getData(); List<LineDetailVO.Detail> lineDetail = lineFeignClient.getDeptDeviceDetailData(param).getData();
if(CollUtil.isEmpty(lineDetail)){
return new Page<>();
}
Map<String, LineDetailVO.Detail> mapDetail=new HashMap<>(); Map<String, LineDetailVO.Detail> mapDetail=new HashMap<>();
QueryWrapper<QuitRunningDeviceVO> quitRunningDeviceVOQueryWrapper = new QueryWrapper<>(); QueryWrapper<QuitRunningDeviceVO> quitRunningDeviceVOQueryWrapper = new QueryWrapper<>();
if (Objects.nonNull(quitRunningDeviceQueryParam)) { if (Objects.nonNull(quitRunningDeviceQueryParam)) {

View File

@@ -36,7 +36,7 @@ public interface UserReportPOService extends IBpmService<UserReportPO> {
List<UserReportVO> getUserReportList(); List<UserReportVO> getUserReportList();
Page<UserReportVO> getInterferenceUserPage(UserReportParam.UserReportQueryParam userReportQueryParam,Boolean allDataFlag); Page<UserReportVO> getInterferenceUserPage(UserReportParam.UserReportQueryParam userReportQueryParam, Boolean allDataFlag);
String cancelUserReport(BpmProcessInstanceCancelParam cancelReqVO); String cancelUserReport(BpmProcessInstanceCancelParam cancelReqVO);

View File

@@ -101,21 +101,21 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
UserReportPO userReportPO = new UserReportPO(); UserReportPO userReportPO = new UserReportPO();
BeanUtils.copyProperties(userReportParam, userReportPO); BeanUtils.copyProperties(userReportParam, userReportPO);
userReportPO.setState(DataStateEnum.ENABLE.getCode()); userReportPO.setState(DataStateEnum.ENABLE.getCode());
if(Objects.equals(userReportParam.getSaveOrCheckflag(),"2")){ if (Objects.equals(userReportParam.getSaveOrCheckflag(), "2")) {
if(StringUtils.isEmpty(userReportParam.getId())){ if (StringUtils.isEmpty(userReportParam.getId())) {
checkProjectName(userReportParam, false); checkProjectName(userReportParam, false);
}else { } else {
checkProjectName(userReportParam, true); checkProjectName(userReportParam, true);
} }
} }
//判断工程名称是否有重复的 //判断工程名称是否有重复的
if(Objects.equals(userReportParam.getSaveOrCheckflag(),"1")){ if (Objects.equals(userReportParam.getSaveOrCheckflag(), "1")) {
userReportPO.setStatus(BpmTaskStatusEnum.WAIT.getStatus()); userReportPO.setStatus(BpmTaskStatusEnum.WAIT.getStatus());
}else { } else {
userReportPO.setStatus(BpmTaskStatusEnum.RUNNING.getStatus()); userReportPO.setStatus(BpmTaskStatusEnum.RUNNING.getStatus());
} }
@@ -153,7 +153,7 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
} }
// 如何未提交审则不需要发起 BPM 流程 // 如何未提交审则不需要发起 BPM 流程
if(Objects.equals(userReportParam.getSaveOrCheckflag(),"2")){ if (Objects.equals(userReportParam.getSaveOrCheckflag(), "2")) {
Map<String, Object> processInstanceVariables = new HashMap<>(); Map<String, Object> processInstanceVariables = new HashMap<>();
BpmProcessInstanceCreateReqDTO bpmProcessInstanceCreateReqDTO = new BpmProcessInstanceCreateReqDTO(); BpmProcessInstanceCreateReqDTO bpmProcessInstanceCreateReqDTO = new BpmProcessInstanceCreateReqDTO();
bpmProcessInstanceCreateReqDTO.setProcessDefinitionKey(SupervisionKeyEnum.BUILD_USER_INFO.getKey()); bpmProcessInstanceCreateReqDTO.setProcessDefinitionKey(SupervisionKeyEnum.BUILD_USER_INFO.getKey());
@@ -290,9 +290,9 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
} }
userReportVOQueryWrapper.like(StringUtils.isNotBlank(userReportQueryParam.getProjectName()), "supervision_user_report.project_name", userReportQueryParam.getProjectName()); userReportVOQueryWrapper.like(StringUtils.isNotBlank(userReportQueryParam.getProjectName()), "supervision_user_report.project_name", userReportQueryParam.getProjectName());
//添加上时间范围 //添加上时间范围
if(StrUtil.isNotBlank(userReportQueryParam.getSearchBeginTime())&&StrUtil.isNotBlank(userReportQueryParam.getSearchEndTime())){ if (StrUtil.isNotBlank(userReportQueryParam.getSearchBeginTime()) && StrUtil.isNotBlank(userReportQueryParam.getSearchEndTime())) {
userReportVOQueryWrapper .and(x->x.between("supervision_user_report.expected_production_date", userReportVOQueryWrapper.and(x -> x.between("supervision_user_report.expected_production_date",
DateUtil.beginOfDay(DateUtil.parse(userReportQueryParam.getSearchBeginTime())), DateUtil.beginOfDay(DateUtil.parse(userReportQueryParam.getSearchBeginTime())),
DateUtil.endOfDay(DateUtil.parse(userReportQueryParam.getSearchEndTime()))).or().isNull("supervision_user_report.expected_production_date")); DateUtil.endOfDay(DateUtil.parse(userReportQueryParam.getSearchEndTime()))).or().isNull("supervision_user_report.expected_production_date"));
} }
@@ -377,7 +377,7 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
List<UserReportPO> list = this.lambdaQuery() List<UserReportPO> list = this.lambdaQuery()
.eq(UserReportPO::getStatus, 2) .eq(UserReportPO::getStatus, 2)
.eq(UserReportPO::getDataType,0) .eq(UserReportPO::getDataType, 0)
.in(CollectionUtil.isNotEmpty(data), UserReportPO::getOrgId, data) .in(CollectionUtil.isNotEmpty(data), UserReportPO::getOrgId, data)
.list(); .list();
List<UserReportVO> collect = list.stream().map(temp -> { List<UserReportVO> collect = list.stream().map(temp -> {
@@ -393,13 +393,13 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
} }
@Override @Override
public Page<UserReportVO> getInterferenceUserPage(UserReportParam.UserReportQueryParam userReportQueryParam,Boolean allDataFlag) { public Page<UserReportVO> getInterferenceUserPage(UserReportParam.UserReportQueryParam userReportQueryParam, Boolean allDataFlag) {
QueryWrapper<UserReportVO> userReportVOQueryWrapper = new QueryWrapper<>(); QueryWrapper<UserReportVO> userReportVOQueryWrapper = new QueryWrapper<>();
List<String> colleaguesIds = userFeignClient.getColleaguesIdByUserId(RequestUtil.getUserIndex()).getData(); List<String> colleaguesIds = userFeignClient.getColleaguesIdByUserId(RequestUtil.getUserIndex()).getData();
userReportVOQueryWrapper.in("supervision_user_report.create_by", colleaguesIds) userReportVOQueryWrapper.in("supervision_user_report.create_by", colleaguesIds)
.eq("supervision_user_report.state", DataStateEnum.ENABLE.getCode()) .eq("supervision_user_report.state", DataStateEnum.ENABLE.getCode())
.eq("supervision_user_report.status", FlowStatusEnum.APPROVE.getCode()); .eq("supervision_user_report.status", FlowStatusEnum.APPROVE.getCode());
if(!allDataFlag){ if (!allDataFlag) {
//台账不查询全部数据,需要排除敏感及重要用户 //台账不查询全部数据,需要排除敏感及重要用户
userReportVOQueryWrapper.ne("supervision_user_report.user_type", UserNatureEnum.SENSITIVE_USER.getCode()); userReportVOQueryWrapper.ne("supervision_user_report.user_type", UserNatureEnum.SENSITIVE_USER.getCode());
} }
@@ -412,7 +412,7 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
userReportVOQueryWrapper.eq("data_type", userReportQueryParam.getDataType()); userReportVOQueryWrapper.eq("data_type", userReportQueryParam.getDataType());
} }
userReportVOQueryWrapper.like(StringUtils.isNotBlank(userReportQueryParam.getProjectName()), "supervision_user_report.project_name", userReportQueryParam.getProjectName()); userReportVOQueryWrapper.like(StringUtils.isNotBlank(userReportQueryParam.getProjectName()), "supervision_user_report.project_name", userReportQueryParam.getProjectName());
if(StrUtil.isNotBlank(userReportQueryParam.getSearchBeginTime())&&StrUtil.isNotBlank(userReportQueryParam.getSearchEndTime())){ if (StrUtil.isNotBlank(userReportQueryParam.getSearchBeginTime()) && StrUtil.isNotBlank(userReportQueryParam.getSearchEndTime())) {
userReportVOQueryWrapper.between("supervision_user_report.expected_production_date", userReportVOQueryWrapper.between("supervision_user_report.expected_production_date",
DateUtil.beginOfDay(DateUtil.parse(userReportQueryParam.getSearchBeginTime())), DateUtil.beginOfDay(DateUtil.parse(userReportQueryParam.getSearchBeginTime())),
DateUtil.endOfDay(DateUtil.parse(userReportQueryParam.getSearchEndTime()))); DateUtil.endOfDay(DateUtil.parse(userReportQueryParam.getSearchEndTime())));
@@ -527,7 +527,7 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
pullDown = new PullDown(); pullDown = new PullDown();
pullDown.setFirstCol(1); pullDown.setFirstCol(1);
pullDown.setLastCol(1); pullDown.setLastCol(1);
pullDown.setStrings(jiBeiArea.stream().filter(x -> !x.getName().equals("风光储")&&!x.getName().equals("超高压")).map(DictData::getName).collect(Collectors.toList())); pullDown.setStrings(jiBeiArea.stream().filter(x -> !x.getName().equals("风光储") && !x.getName().equals("超高压")).map(DictData::getName).collect(Collectors.toList()));
pullDowns.add(pullDown); pullDowns.add(pullDown);
pullDown = new PullDown(); pullDown = new PullDown();
@@ -656,7 +656,7 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
BeanUtils.copyProperties(userExcel, sensitiveUserExcelMsg); BeanUtils.copyProperties(userExcel, sensitiveUserExcelMsg);
sensitiveUserExcelMsg.setMsg("该用户已录入!"); sensitiveUserExcelMsg.setMsg("该用户已录入!");
sensitiveUserExcelMsgs.add(sensitiveUserExcelMsg); sensitiveUserExcelMsgs.add(sensitiveUserExcelMsg);
}else{ } else {
//处理通用信息 //处理通用信息
UserReportPO userReportPO = new UserReportPO(); UserReportPO userReportPO = new UserReportPO();
userReportPO.setReporter(RequestUtil.getUserIndex()); userReportPO.setReporter(RequestUtil.getUserIndex());
@@ -685,7 +685,7 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
userReportSensitivePO.setPowerSupplyCount(userExcel.getPowerSupplyCount()); userReportSensitivePO.setPowerSupplyCount(userExcel.getPowerSupplyCount());
userReportSensitivePO.setEnergyQualityIndex(PubUtil.getDicById(userExcel.getEnergyQualityIndex(), indicatorType)); userReportSensitivePO.setEnergyQualityIndex(PubUtil.getDicById(userExcel.getEnergyQualityIndex(), indicatorType));
userReportSensitivePO.setEvaluationType(PubUtil.getDicById(userExcel.getEvaluationType(), evaluationType)); userReportSensitivePO.setEvaluationType(PubUtil.getDicById(userExcel.getEvaluationType(), evaluationType));
userReportSensitivePO.setAntiInterferenceTest(userExcel.getAntiInterferenceTest()+""); userReportSensitivePO.setAntiInterferenceTest(userExcel.getAntiInterferenceTest() + "");
userReportSensitivePO.setEvaluationChekDept(userExcel.getEvaluationChekDept()); userReportSensitivePO.setEvaluationChekDept(userExcel.getEvaluationChekDept());
userReportSensitivePO.setNeedGovernance(userExcel.getNeedGovernance()); userReportSensitivePO.setNeedGovernance(userExcel.getNeedGovernance());
userReportSensitivePO.setBackgroundTestPerformed(userExcel.getBackgroundTestPerformed()); userReportSensitivePO.setBackgroundTestPerformed(userExcel.getBackgroundTestPerformed());
@@ -752,7 +752,7 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
pullDown = new PullDown(); pullDown = new PullDown();
pullDown.setFirstCol(2); pullDown.setFirstCol(2);
pullDown.setLastCol(2); pullDown.setLastCol(2);
pullDown.setStrings(jiBeiArea.stream().filter(x -> !"风光储".equals(x.getName())&&!"超高压".equals(x.getName())).map(DictData::getName).collect(Collectors.toList())); pullDown.setStrings(jiBeiArea.stream().filter(x -> !"风光储".equals(x.getName()) && !"超高压".equals(x.getName())).map(DictData::getName).collect(Collectors.toList()));
pullDowns.add(pullDown); pullDowns.add(pullDown);
pullDown = new PullDown(); pullDown = new PullDown();
@@ -874,10 +874,10 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
//电网工程类用户额外数据 //电网工程类用户额外数据
UserReportProjectPO userReportProjectPO = new UserReportProjectPO(); UserReportProjectPO userReportProjectPO = new UserReportProjectPO();
userReportProjectPO.setId(userReportPO.getId()); userReportProjectPO.setId(userReportPO.getId());
if(ObjectUtil.isNotEmpty(reportExcel.getNonlinearLoadType())){ if (ObjectUtil.isNotEmpty(reportExcel.getNonlinearLoadType())) {
userReportProjectPO.setAgreementCapacity(reportExcel.getUserAgreementCapacity().doubleValue()); userReportProjectPO.setAgreementCapacity(reportExcel.getUserAgreementCapacity().doubleValue());
} }
if(StrUtil.isNotBlank(reportExcel.getNonlinearLoadType())){ if (StrUtil.isNotBlank(reportExcel.getNonlinearLoadType())) {
userReportProjectPO.setNonlinearDeviceType(treeString.containsKey(reportExcel.getNonlinearLoadType()) ? treeString.get(reportExcel.getNonlinearLoadType()) : null); userReportProjectPO.setNonlinearDeviceType(treeString.containsKey(reportExcel.getNonlinearLoadType()) ? treeString.get(reportExcel.getNonlinearLoadType()) : null);
} }
@@ -906,7 +906,7 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
userReportSubstationPO.setPccEquipmentCapacity(reportExcel.getPccEquipmentCapacity()); userReportSubstationPO.setPccEquipmentCapacity(reportExcel.getPccEquipmentCapacity());
userReportSubstationPO.setUserAgreementCapacity(reportExcel.getUserAgreementCapacity()); userReportSubstationPO.setUserAgreementCapacity(reportExcel.getUserAgreementCapacity());
userReportSubstationPO.setEvaluationType(PubUtil.getDicById(reportExcel.getEvaluationType(), evaluationType)); userReportSubstationPO.setEvaluationType(PubUtil.getDicById(reportExcel.getEvaluationType(), evaluationType));
if(StrUtil.isNotBlank(reportExcel.getNonlinearLoadType())){ if (StrUtil.isNotBlank(reportExcel.getNonlinearLoadType())) {
userReportSubstationPO.setNonlinearLoadType(treeString.containsKey(reportExcel.getNonlinearLoadType()) ? treeString.get(reportExcel.getNonlinearLoadType()) : null); userReportSubstationPO.setNonlinearLoadType(treeString.containsKey(reportExcel.getNonlinearLoadType()) ? treeString.get(reportExcel.getNonlinearLoadType()) : null);
} }
userReportSubstationPO.setEvaluationChekDept(reportExcel.getEvaluationChekDept()); userReportSubstationPO.setEvaluationChekDept(reportExcel.getEvaluationChekDept());
@@ -932,16 +932,16 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
return CommonResponseEnum.SUCCESS.getCode(); return CommonResponseEnum.SUCCESS.getCode();
} }
public Map<String,String> getTreeString(String name, List<SysDicTreePO> treeVOS) { public Map<String, String> getTreeString(String name, List<SysDicTreePO> treeVOS) {
Map<String,String> info = new LinkedHashMap<>(); Map<String, String> info = new LinkedHashMap<>();
for (SysDicTreePO sysMenuDtoChild : treeVOS) { for (SysDicTreePO sysMenuDtoChild : treeVOS) {
if (sysMenuDtoChild.getLevel() == 3) { if (sysMenuDtoChild.getLevel() == 3) {
name = sysMenuDtoChild.getId()+"-"+sysMenuDtoChild.getName(); name = sysMenuDtoChild.getId() + "-" + sysMenuDtoChild.getName();
} }
if (CollUtil.isNotEmpty(sysMenuDtoChild.getChildren())) { if (CollUtil.isNotEmpty(sysMenuDtoChild.getChildren())) {
info.putAll(getTreeString(name, sysMenuDtoChild.getChildren())); info.putAll(getTreeString(name, sysMenuDtoChild.getChildren()));
} else { } else {
info.put(name.split("-")[1],name.split("-")[0]); info.put(name.split("-")[1], name.split("-")[0]);
} }
} }
return info; return info;
@@ -976,7 +976,7 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
* @param isExcludeSelf 是否排除自己,一般新增不排除,更新时需要排除自己 * @param isExcludeSelf 是否排除自己,一般新增不排除,更新时需要排除自己
*/ */
private void checkProjectName(UserReportParam userReportParam, boolean isExcludeSelf) { private void checkProjectName(UserReportParam userReportParam, boolean isExcludeSelf) {
if(!StringUtils.isEmpty(userReportParam.getProjectName())){ if (!StringUtils.isEmpty(userReportParam.getProjectName())) {
LambdaQueryWrapper<UserReportPO> userReportPOLambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<UserReportPO> userReportPOLambdaQueryWrapper = new LambdaQueryWrapper<>();
userReportPOLambdaQueryWrapper userReportPOLambdaQueryWrapper
.eq(UserReportPO::getProjectName, userReportParam.getProjectName()) .eq(UserReportPO::getProjectName, userReportParam.getProjectName())
@@ -986,9 +986,8 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
if (isExcludeSelf) { if (isExcludeSelf) {
if (userReportParam instanceof UserReportParam.UserReportUpdate) { if (userReportParam instanceof UserReportParam.UserReportUpdate) {
userReportPOLambdaQueryWrapper.ne(UserReportPO::getId, ((UserReportParam.UserReportUpdate) userReportParam).getId()); userReportPOLambdaQueryWrapper.ne(UserReportPO::getId, ((UserReportParam.UserReportUpdate) userReportParam).getId());
}else { } else {
userReportPOLambdaQueryWrapper.ne(UserReportPO::getId, ( userReportParam).getId()); userReportPOLambdaQueryWrapper.ne(UserReportPO::getId, (userReportParam).getId());
} }
} }
List<UserReportPO> userReportPOList = this.baseMapper.selectList(userReportPOLambdaQueryWrapper); List<UserReportPO> userReportPOList = this.baseMapper.selectList(userReportPOLambdaQueryWrapper);