草稿功能各个页面开发
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package com.njcn.supervision.pojo.param.device;
|
||||
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
@@ -29,6 +28,9 @@ public class QuitRunningDeviceParam implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String id;
|
||||
@ApiModelProperty(value = "保存1,提交审批2")
|
||||
private String saveOrCheckflag;
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.njcn.supervision.pojo.param.device;
|
||||
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
@@ -24,7 +23,8 @@ import java.util.Map;
|
||||
@NoArgsConstructor
|
||||
public class SupervisionTempLineDebugParam {
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "保存1,提交审批2")
|
||||
private String saveOrCheckflag;
|
||||
/**
|
||||
* 调试原因
|
||||
*/
|
||||
|
||||
@@ -26,6 +26,13 @@ import java.util.Map;
|
||||
@NoArgsConstructor
|
||||
public class SupervisionTempLineReportParam {
|
||||
|
||||
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "保存1,提交审批2")
|
||||
private String saveOrCheckflag;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "填报部门")
|
||||
private String orgId;
|
||||
/**
|
||||
|
||||
@@ -12,6 +12,9 @@ import java.time.LocalDate;
|
||||
@Data
|
||||
public class SurveyPlanParam implements Serializable {
|
||||
|
||||
private String id;
|
||||
@ApiModelProperty(value = "保存1,提交审批2")
|
||||
private String saveOrCheckflag;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -112,6 +115,8 @@ public class SurveyPlanParam implements Serializable {
|
||||
*/
|
||||
@ApiModelProperty(value = "计划状态")
|
||||
private Integer status;
|
||||
@ApiModelProperty(value = " 监督类型")
|
||||
private String supvType;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.njcn.supervision.pojo.param.survey;
|
||||
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -26,6 +25,8 @@ public class SurveyTestParam implements Serializable {
|
||||
@ApiModelProperty("id")
|
||||
@NotBlank(message = "索引不能为空")
|
||||
private String Id;
|
||||
@ApiModelProperty(value = "保存1,提交审批2")
|
||||
private String saveOrCheckflag;
|
||||
|
||||
/**
|
||||
* 普测计划表id
|
||||
@@ -102,11 +103,18 @@ public class SurveyTestParam implements Serializable {
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public static class SurveyTestQueryParam extends BaseParam {
|
||||
|
||||
/**
|
||||
* 普测负责单位
|
||||
*/
|
||||
String deptIndex;
|
||||
|
||||
/**
|
||||
* 测试审批状态(1:审批中;2:审批通过;3:审批不通过;4:已取消)
|
||||
*/
|
||||
@ApiModelProperty(value = "测试审批状态")
|
||||
private Integer status;
|
||||
@ApiModelProperty(value = " 监督类型")
|
||||
private String supvType;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -32,6 +32,9 @@ public class SupervisionTempDeviceReport {
|
||||
*/
|
||||
@TableField(value = "power_company")
|
||||
private String powerCompany;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 0 关联系统内变电站;1用户手动输入变电站
|
||||
*/
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
supervision_temp_line_debug.`status` `Status`,
|
||||
supervision_temp_line_debug.create_by
|
||||
FROM
|
||||
supervision_temp_line_report
|
||||
left JOIN supervision_temp_line_debug ON supervision_temp_line_report.id = supervision_temp_line_debug.id
|
||||
supervision_temp_line_debug
|
||||
left JOIN supervision_temp_line_report ON supervision_temp_line_report.id = supervision_temp_line_debug.id
|
||||
where supervision_temp_line_report.`status`=2
|
||||
and ${ew.sqlSegment}
|
||||
</select>
|
||||
|
||||
@@ -25,7 +25,6 @@ import com.njcn.supervision.enums.SupervisionUserStatusEnum;
|
||||
import com.njcn.supervision.mapper.device.QuitRunningDeviceMapper;
|
||||
import com.njcn.supervision.pojo.param.device.QuitRunningDeviceParam;
|
||||
import com.njcn.supervision.pojo.po.device.QuitRunningDevice;
|
||||
import com.njcn.supervision.pojo.vo.device.CheckDeviceVo;
|
||||
import com.njcn.supervision.pojo.vo.device.QuitRunningDeviceVO;
|
||||
import com.njcn.supervision.service.device.IQuitRunningDeviceService;
|
||||
import com.njcn.supervision.service.user.UserReportPOService;
|
||||
@@ -76,9 +75,20 @@ public class QuitRunningDeviceServiceImpl extends ServiceImpl<QuitRunningDeviceM
|
||||
quitRunningDevice.setDevStatus(4);
|
||||
}
|
||||
quitRunningDevice.setState(DataStateEnum.ENABLE.getCode());
|
||||
//设置状态
|
||||
if(Objects.equals(quitRunningDeviceParam.getSaveOrCheckflag(),"1")){
|
||||
quitRunningDevice.setStatus(BpmTaskStatusEnum.WAIT.getStatus());
|
||||
|
||||
}else {
|
||||
quitRunningDevice.setStatus(BpmTaskStatusEnum.RUNNING.getStatus());
|
||||
this.save(quitRunningDevice);
|
||||
|
||||
}
|
||||
|
||||
// quitRunningDevice.setStatus(BpmTaskStatusEnum.RUNNING.getStatus());
|
||||
this.saveOrUpdate(quitRunningDevice);
|
||||
// 发起 BPM 流程
|
||||
if(Objects.equals(quitRunningDeviceParam.getSaveOrCheckflag(),"2")) {
|
||||
|
||||
Map<String, Object> processInstanceVariables = new HashMap<>();
|
||||
BpmProcessInstanceCreateReqDTO bpmProcessInstanceCreateReqDTO = new BpmProcessInstanceCreateReqDTO();
|
||||
bpmProcessInstanceCreateReqDTO.setProcessDefinitionKey(SupervisionKeyEnum.QUIT_RUNNING_DEVICE.getKey());
|
||||
@@ -89,6 +99,7 @@ public class QuitRunningDeviceServiceImpl extends ServiceImpl<QuitRunningDeviceM
|
||||
// 将工作流的编号,更新到流程单中
|
||||
quitRunningDevice.setProcessInstanceId(processInstanceId);
|
||||
this.baseMapper.updateById(quitRunningDevice);
|
||||
}
|
||||
return quitRunningDevice.getId();
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@ import com.njcn.supervision.pojo.param.device.SupervisionDevMainReportParam;
|
||||
import com.njcn.supervision.pojo.param.device.SupervisionTempDeviceReportParam;
|
||||
import com.njcn.supervision.pojo.po.device.SupervisionDevMainReportPO;
|
||||
import com.njcn.supervision.pojo.po.device.SupervisionTempDeviceReport;
|
||||
import com.njcn.supervision.pojo.vo.device.CheckDeviceVo;
|
||||
import com.njcn.supervision.pojo.vo.device.SupervisionDevMainReportVO;
|
||||
import com.njcn.supervision.service.device.SupervisionDevMainReportPOService;
|
||||
import com.njcn.supervision.service.device.SupervisionTempDeviceReportService;
|
||||
@@ -35,6 +34,7 @@ import com.njcn.user.pojo.vo.UserVO;
|
||||
import com.njcn.web.factory.PageFactory;
|
||||
import com.njcn.web.utils.RequestUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -66,20 +66,36 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String addDevReport(SupervisionDevMainReportParam supervisionDevMainReportParam) {
|
||||
|
||||
//设备校验ip
|
||||
checkIp(supervisionDevMainReportParam, false);
|
||||
SupervisionDevMainReportPO supervisionDevMainReportPO = new SupervisionDevMainReportPO();
|
||||
BeanUtils.copyProperties(supervisionDevMainReportParam, supervisionDevMainReportPO);
|
||||
supervisionDevMainReportPO.setState(DataStateEnum.ENABLE.getCode());
|
||||
if(StringUtils.isEmpty(supervisionDevMainReportParam.getId())){
|
||||
//设备校验ip
|
||||
checkIp(supervisionDevMainReportParam, false);
|
||||
|
||||
}else {
|
||||
//设备校验ip
|
||||
checkIp(supervisionDevMainReportParam, true);
|
||||
|
||||
}
|
||||
//设置状态
|
||||
if(Objects.equals(supervisionDevMainReportParam.getSaveOrCheckflag(),"1")){
|
||||
supervisionDevMainReportPO.setStatus(BpmTaskStatusEnum.WAIT.getStatus());
|
||||
|
||||
}else {
|
||||
supervisionDevMainReportPO.setStatus(BpmTaskStatusEnum.RUNNING.getStatus());
|
||||
this.save(supervisionDevMainReportPO);
|
||||
|
||||
}
|
||||
|
||||
|
||||
supervisionDevMainReportPO.setState(DataStateEnum.ENABLE.getCode());
|
||||
this.saveOrUpdate(supervisionDevMainReportPO);
|
||||
String id = supervisionDevMainReportPO.getId();
|
||||
//存储临时终端信息
|
||||
SupervisionTempDeviceReportParam supervisionTempDeviceReportParam = supervisionDevMainReportParam.getSupervisionTempDeviceReportParam();
|
||||
SupervisionTempDeviceReport supervisionTempDeviceReportPO = new SupervisionTempDeviceReport();
|
||||
BeanUtils.copyProperties(supervisionTempDeviceReportParam, supervisionTempDeviceReportPO);
|
||||
supervisionTempDeviceReportPO.setId(id);
|
||||
supervisionTempDeviceReportService.save(supervisionTempDeviceReportPO);
|
||||
supervisionTempDeviceReportService.saveOrUpdate(supervisionTempDeviceReportPO);
|
||||
//存储临时监测点信息
|
||||
// SupervisionTempLineReportParam supervisionTempLineReportParam = supervisionDevMainReportParam.getSupervisionTempLineReportParam();
|
||||
// SupervisionTempLineReport supervisionTempLineReport = new SupervisionTempLineReport();
|
||||
@@ -87,6 +103,8 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
|
||||
// supervisionTempDeviceReportPO.setId(id);
|
||||
// supervisionTempLineReportService.save(supervisionTempLineReport);
|
||||
// 发起 BPM 流程
|
||||
// 如何未提交审则不需要发起 BPM 流程
|
||||
if(Objects.equals(supervisionDevMainReportParam.getSaveOrCheckflag(),"2")) {
|
||||
Map<String, Object> processInstanceVariables = new HashMap<>();
|
||||
BpmProcessInstanceCreateReqDTO bpmProcessInstanceCreateReqDTO = new BpmProcessInstanceCreateReqDTO();
|
||||
bpmProcessInstanceCreateReqDTO.setProcessDefinitionKey(SupervisionKeyEnum.DEVICE_INFO_ADD.getKey());
|
||||
@@ -97,7 +115,7 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
|
||||
// 将工作流的编号,更新到流程单中
|
||||
supervisionDevMainReportPO.setProcessInstanceId(processInstanceId);
|
||||
this.baseMapper.updateById(supervisionDevMainReportPO);
|
||||
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
||||
@@ -243,7 +261,9 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
|
||||
|
||||
SupervisionTempDeviceReport supervisionTempDeviceReport = supervisionTempDeviceReportService.lambdaQuery().eq(SupervisionTempDeviceReport::getId, id).one();
|
||||
// supervisionTempDeviceReport.setSubstation(lineFeignClient.getSubstationInfo(supervisionTempDeviceReport.getSubstation()).getData().getName());
|
||||
if(StringUtils.isNotEmpty(supervisionTempDeviceReport.getPowerCompany())){
|
||||
supervisionTempDeviceReport.setPowerCompany(deptFeignClient.getDeptById(supervisionTempDeviceReport.getPowerCompany()).getData().getName());
|
||||
}
|
||||
supervisionDevMainReportVO.setSupervisionTempDeviceReport(supervisionTempDeviceReport);
|
||||
return supervisionDevMainReportVO;
|
||||
}
|
||||
@@ -256,6 +276,8 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
|
||||
* @Date: 2024/5/11
|
||||
*/
|
||||
private void checkIp(SupervisionDevMainReportParam supervisionDevMainReportParam, boolean isExcludeSelf) {
|
||||
//如果保存不填ip则不校验
|
||||
if(!StringUtils.isEmpty(supervisionDevMainReportParam.getSupervisionTempDeviceReportParam().getTerminalIp())) {
|
||||
|
||||
LambdaQueryWrapper<SupervisionTempDeviceReport> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper
|
||||
@@ -265,6 +287,9 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
|
||||
if (isExcludeSelf) {
|
||||
if (supervisionDevMainReportParam instanceof SupervisionDevMainReportParam.SupervisionDevMainReportParamUpdate) {
|
||||
lambdaQueryWrapper.ne(SupervisionTempDeviceReport::getId, ((SupervisionDevMainReportParam.SupervisionDevMainReportParamUpdate) supervisionDevMainReportParam).getId());
|
||||
}else {
|
||||
lambdaQueryWrapper.ne(SupervisionTempDeviceReport::getId, (supervisionDevMainReportParam).getId());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -285,3 +310,4 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,18 +84,26 @@ public class SupervisionTempLineDebugPOServiceImpl extends ServiceImpl<Supervisi
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String addTempLineDebug(SupervisionTempLineDebugParam supervisionTempLineReportParam) {
|
||||
|
||||
SupervisionTempLineDebugPO byId = this.getById(supervisionTempLineReportParam.getId());
|
||||
if(Objects.nonNull(byId)){
|
||||
if(byId.getState() == 1) {
|
||||
throw new BusinessException("该监测点已申请联调");
|
||||
}
|
||||
}
|
||||
// SupervisionTempLineDebugPO byId = this.getById(supervisionTempLineReportParam.getId());
|
||||
// if(Objects.nonNull(byId)){
|
||||
// if(byId.getState() == 1) {
|
||||
// throw new BusinessException("该监测点已申请联调");
|
||||
// }
|
||||
// }
|
||||
SupervisionTempLineDebugPO supervisionTempLineDebugPO = new SupervisionTempLineDebugPO();
|
||||
BeanUtils.copyProperties(supervisionTempLineReportParam,supervisionTempLineDebugPO);
|
||||
supervisionTempLineDebugPO.setState(DataStateEnum.ENABLE.getCode());
|
||||
//设置状态
|
||||
if(Objects.equals(supervisionTempLineReportParam.getSaveOrCheckflag(),"1")){
|
||||
supervisionTempLineDebugPO.setStatus(BpmTaskStatusEnum.WAIT.getStatus());
|
||||
|
||||
}else {
|
||||
supervisionTempLineDebugPO.setStatus(BpmTaskStatusEnum.RUNNING.getStatus());
|
||||
|
||||
}
|
||||
supervisionTempLineDebugPO.setState(DataStateEnum.ENABLE.getCode());
|
||||
this.saveOrUpdate(supervisionTempLineDebugPO);
|
||||
String id = supervisionTempLineDebugPO.getId();
|
||||
if(Objects.equals(supervisionTempLineReportParam.getSaveOrCheckflag(),"2")) {
|
||||
// 发起 BPM 流程
|
||||
Map<String, Object> processInstanceVariables = new HashMap<>();
|
||||
BpmProcessInstanceCreateReqDTO bpmProcessInstanceCreateReqDTO = new BpmProcessInstanceCreateReqDTO();
|
||||
@@ -107,6 +115,8 @@ public class SupervisionTempLineDebugPOServiceImpl extends ServiceImpl<Supervisi
|
||||
// 将工作流的编号,更新到流程单中
|
||||
supervisionTempLineDebugPO.setProcessInstanceId(processInstanceId);
|
||||
this.updateById(supervisionTempLineDebugPO);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return id;
|
||||
@@ -144,8 +154,8 @@ public class SupervisionTempLineDebugPOServiceImpl extends ServiceImpl<Supervisi
|
||||
public Page<SupervisionTempLineDebugVO> getTempLineDeug(SupervisionTempLineDebugParam.SupervisionTempLineDebugQuery supervisionTempLineDebugQuery) {
|
||||
QueryWrapper<SupervisionDevMainReportVO> queryWrapper = new QueryWrapper<>();
|
||||
List<String> colleaguesIds = userFeignClient.getColleaguesIdByUserId(RequestUtil.getUserIndex()).getData();
|
||||
queryWrapper.in("supervision_temp_line_report.create_by", colleaguesIds)
|
||||
.eq("supervision_temp_line_report.state", DataStateEnum.ENABLE.getCode());
|
||||
queryWrapper.in("supervision_temp_line_debug.create_by", colleaguesIds)
|
||||
.eq("supervision_temp_line_debug.state", DataStateEnum.ENABLE.getCode());
|
||||
if (StrUtil.isNotBlank(supervisionTempLineDebugQuery.getOrgNo())) {
|
||||
/*获取直接下属子单位*/
|
||||
List<String> data = deptFeignClient.getDepSonIdtByDeptId(supervisionTempLineDebugQuery.getOrgNo()).getData();
|
||||
@@ -166,10 +176,10 @@ public class SupervisionTempLineDebugPOServiceImpl extends ServiceImpl<Supervisi
|
||||
);
|
||||
}
|
||||
//添加上时间范围
|
||||
queryWrapper.between("supervision_temp_line_report.Create_Time",
|
||||
queryWrapper.between("supervision_temp_line_debug.Create_Time",
|
||||
DateUtil.beginOfDay(DateUtil.parse(supervisionTempLineDebugQuery.getSearchBeginTime())),
|
||||
DateUtil.endOfDay(DateUtil.parse(supervisionTempLineDebugQuery.getSearchEndTime())));
|
||||
queryWrapper.orderByDesc("supervision_temp_line_report.Update_Time");
|
||||
queryWrapper.orderByDesc("supervision_temp_line_debug.Update_Time");
|
||||
Page<SupervisionTempLineDebugVO> page =this.baseMapper.page(new Page<>(PageFactory.getPageNum(supervisionTempLineDebugQuery), PageFactory.getPageSize(supervisionTempLineDebugQuery)), queryWrapper);
|
||||
return page;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ import com.njcn.supervision.mapper.device.SupervisionTempLineReportMapper;
|
||||
import com.njcn.supervision.pojo.param.device.SupervisionTempLineReportParam;
|
||||
import com.njcn.supervision.pojo.po.device.SupervisionTempLineDebugPO;
|
||||
import com.njcn.supervision.pojo.po.device.SupervisionTempLineReport;
|
||||
import com.njcn.supervision.pojo.vo.device.CheckDeviceVo;
|
||||
import com.njcn.supervision.pojo.vo.device.SupervisionTempLineReportVO;
|
||||
import com.njcn.supervision.service.device.SupervisionTempLineReportService;
|
||||
import com.njcn.supervision.service.user.UserReportPOService;
|
||||
@@ -36,6 +35,7 @@ import com.njcn.user.pojo.vo.UserVO;
|
||||
import com.njcn.web.factory.PageFactory;
|
||||
import com.njcn.web.utils.RequestUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -70,17 +70,33 @@ public class SupervisionTempLineReportServiceImpl extends ServiceImpl<Supervisio
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String addTempLineReport(SupervisionTempLineReportParam supervisionTempLineReportParam) {
|
||||
//判断干扰源用户是否绑定
|
||||
checkLineId(supervisionTempLineReportParam, false);
|
||||
|
||||
SupervisionTempLineReport supervisionTempLineReport = new SupervisionTempLineReport();
|
||||
BeanUtils.copyProperties(supervisionTempLineReportParam,supervisionTempLineReport);
|
||||
supervisionTempLineReport.setState(DataStateEnum.ENABLE.getCode());
|
||||
|
||||
if(StringUtils.isEmpty(supervisionTempLineReportParam.getId())){
|
||||
//判断监测点是否重复
|
||||
checkLineId(supervisionTempLineReportParam, false);
|
||||
|
||||
}else {
|
||||
//判断监测点是否重复
|
||||
checkLineId(supervisionTempLineReportParam, true);
|
||||
|
||||
}
|
||||
//设置状态
|
||||
if(Objects.equals(supervisionTempLineReportParam.getSaveOrCheckflag(),"1")){
|
||||
supervisionTempLineReport.setStatus(BpmTaskStatusEnum.WAIT.getStatus());
|
||||
|
||||
}else {
|
||||
supervisionTempLineReport.setStatus(BpmTaskStatusEnum.RUNNING.getStatus());
|
||||
|
||||
this.save(supervisionTempLineReport);
|
||||
String id = supervisionTempLineReport.getId();
|
||||
}
|
||||
|
||||
|
||||
supervisionTempLineReport.setState(DataStateEnum.ENABLE.getCode());
|
||||
|
||||
this.saveOrUpdate(supervisionTempLineReport);
|
||||
String id = supervisionTempLineReport.getId();
|
||||
if(Objects.equals(supervisionTempLineReportParam.getSaveOrCheckflag(),"2")) {
|
||||
// 发起 BPM 流程
|
||||
Map<String, Object> processInstanceVariables = new HashMap<>();
|
||||
BpmProcessInstanceCreateReqDTO bpmProcessInstanceCreateReqDTO = new BpmProcessInstanceCreateReqDTO();
|
||||
@@ -92,7 +108,7 @@ public class SupervisionTempLineReportServiceImpl extends ServiceImpl<Supervisio
|
||||
// 将工作流的编号,更新到流程单中
|
||||
supervisionTempLineReport.setProcessInstanceId(processInstanceId);
|
||||
this.baseMapper.updateById(supervisionTempLineReport);
|
||||
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
||||
@@ -220,6 +236,8 @@ public class SupervisionTempLineReportServiceImpl extends ServiceImpl<Supervisio
|
||||
}
|
||||
|
||||
private void checkLineId(SupervisionTempLineReportParam supervisionTempLineReportParam, boolean isExcludeSelf) {
|
||||
//保存时不为空则不校验
|
||||
if(Objects.nonNull(supervisionTempLineReportParam.getNum())||Objects.nonNull(supervisionTempLineReportParam.getLineName())) {
|
||||
LambdaQueryWrapper<SupervisionTempLineReport> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper
|
||||
.eq(SupervisionTempLineReport::getMonitoringTerminalCode, supervisionTempLineReportParam.getMonitoringTerminalCode())
|
||||
@@ -231,6 +249,9 @@ public class SupervisionTempLineReportServiceImpl extends ServiceImpl<Supervisio
|
||||
if (isExcludeSelf) {
|
||||
if (supervisionTempLineReportParam instanceof SupervisionTempLineReportParam.SupervisionTempLineReportUpdate) {
|
||||
lambdaQueryWrapper.ne(SupervisionTempLineReport::getId, ((SupervisionTempLineReportParam.SupervisionTempLineReportUpdate) supervisionTempLineReportParam).getId());
|
||||
}else {
|
||||
lambdaQueryWrapper.ne(SupervisionTempLineReport::getId, (supervisionTempLineReportParam).getId());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -248,3 +269,4 @@ public class SupervisionTempLineReportServiceImpl extends ServiceImpl<Supervisio
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ import com.njcn.supervision.mapper.survey.SurveyPlanMapper;
|
||||
import com.njcn.supervision.pojo.param.survey.SurveyPlanParam;
|
||||
import com.njcn.supervision.pojo.po.survey.SurveyPlan;
|
||||
import com.njcn.supervision.pojo.po.survey.SurveyTest;
|
||||
import com.njcn.supervision.pojo.vo.device.CheckDeviceVo;
|
||||
import com.njcn.supervision.pojo.vo.survey.SurveyPlanVO;
|
||||
import com.njcn.supervision.pojo.vo.survey.SurveySubstation;
|
||||
import com.njcn.supervision.service.survey.ISurveyPlanService;
|
||||
@@ -36,7 +35,7 @@ import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.user.api.UserFeignClient;
|
||||
import com.njcn.web.factory.PageFactory;
|
||||
import com.njcn.web.utils.RequestUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -95,7 +94,7 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
|
||||
if (Objects.nonNull(surveyPlanQueryParam.getStatus())) {
|
||||
surveyPlanVOQueryWrapper.in("supervision_survey_plan.status", surveyPlanQueryParam.getStatus());
|
||||
}
|
||||
|
||||
surveyPlanVOQueryWrapper.eq(StringUtils.isNotBlank(surveyPlanQueryParam.getSupvType()),"supervision_survey_plan.supv_type",surveyPlanQueryParam.getSupvType());
|
||||
}
|
||||
//获取当前用户部门所有同事的id,查看该部门下所有的数据
|
||||
List<String> colleaguesIds = userFeignClient.getColleaguesIdByUserId(RequestUtil.getUserIndex()).getData();
|
||||
@@ -134,10 +133,18 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
|
||||
//排除重复计划的策略暂时未知,待后期有人提出了,再去做,todo...
|
||||
SurveyPlan surveyPlan = new SurveyPlan();
|
||||
BeanUtils.copyProperties(surveyPlanParam, surveyPlan);
|
||||
surveyPlan.setState(DataStateEnum.ENABLE.getCode());
|
||||
//设置状态
|
||||
if(Objects.equals(surveyPlanParam.getSaveOrCheckflag(),"1")){
|
||||
surveyPlan.setStatus(BpmTaskStatusEnum.WAIT.getStatus());
|
||||
|
||||
}else {
|
||||
surveyPlan.setStatus(BpmTaskStatusEnum.RUNNING.getStatus());
|
||||
this.save(surveyPlan);
|
||||
|
||||
}
|
||||
surveyPlan.setState(DataStateEnum.ENABLE.getCode());
|
||||
this.saveOrUpdate(surveyPlan);
|
||||
// 发起 BPM 流程
|
||||
if(Objects.equals(surveyPlanParam.getSaveOrCheckflag(),"2")){
|
||||
Map<String, Object> processInstanceVariables = new HashMap<>();
|
||||
BpmProcessInstanceCreateReqDTO bpmProcessInstanceCreateReqDTO = new BpmProcessInstanceCreateReqDTO();
|
||||
bpmProcessInstanceCreateReqDTO.setProcessDefinitionKey(SupervisionKeyEnum.SURVEY_PLAN.getKey());
|
||||
@@ -148,6 +155,8 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
|
||||
// 将工作流的编号,更新到流程单中
|
||||
surveyPlan.setProcessInstanceId(processInstanceId);
|
||||
this.baseMapper.updateById(surveyPlan);
|
||||
}
|
||||
|
||||
return surveyPlan.getId();
|
||||
}
|
||||
|
||||
@@ -213,7 +222,7 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
|
||||
surveyTest.setInitiateWarningFlag(0);
|
||||
surveyTest.setSubstation(subId);
|
||||
surveyTest.setCustomSubstationFlag(0);
|
||||
surveyTest.setStatus(FlowStatusEnum.UN_TEST.getCode());
|
||||
surveyTest.setStatus(FlowStatusEnum.NEW.getCode());
|
||||
surveyTest.setCreateBy(surveyPlan.getCreateBy());
|
||||
surveyTestService.save(surveyTest);
|
||||
}
|
||||
@@ -224,7 +233,7 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
|
||||
surveyTest.setSubstation(surveyPlan.getSubstation());
|
||||
surveyTest.setInitiateWarningFlag(0);
|
||||
surveyTest.setCustomSubstationFlag(1);
|
||||
surveyTest.setStatus(FlowStatusEnum.UN_TEST.getCode());
|
||||
surveyTest.setStatus(FlowStatusEnum.NEW.getCode());
|
||||
surveyTest.setCreateBy(surveyPlan.getCreateBy());
|
||||
surveyTestService.save(surveyTest);
|
||||
}
|
||||
|
||||
@@ -26,11 +26,8 @@ import com.njcn.supervision.enums.ProblemTypeEnum;
|
||||
import com.njcn.supervision.enums.SupervisionKeyEnum;
|
||||
import com.njcn.supervision.mapper.survey.SurveyTestMapper;
|
||||
import com.njcn.supervision.pojo.param.survey.SurveyTestParam;
|
||||
import com.njcn.supervision.pojo.po.survey.SupervisionGeneralSurveyPlanDetailPO;
|
||||
import com.njcn.supervision.pojo.po.survey.SupervisionGeneralSurveyPlanPO;
|
||||
import com.njcn.supervision.pojo.po.survey.SurveyPlan;
|
||||
import com.njcn.supervision.pojo.po.survey.SurveyTest;
|
||||
import com.njcn.supervision.pojo.vo.survey.SurveyPlanVO;
|
||||
import com.njcn.supervision.pojo.vo.survey.SurveyTestVO;
|
||||
import com.njcn.supervision.service.leaflet.IWarningLeafletService;
|
||||
import com.njcn.supervision.service.survey.ISurveyPlanService;
|
||||
@@ -42,7 +39,7 @@ import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.user.api.UserFeignClient;
|
||||
import com.njcn.web.factory.PageFactory;
|
||||
import com.njcn.web.utils.RequestUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -98,6 +95,7 @@ public class SurveyTestServiceImpl extends ServiceImpl<SurveyTestMapper, SurveyT
|
||||
if (Objects.nonNull(surveyTestQueryParam.getSearchValue())) {
|
||||
LambdaQueryWrapper<SurveyPlan> surveyPlanLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
surveyPlanLambdaQueryWrapper.eq(SurveyPlan::getState, DataStateEnum.ENABLE.getCode())
|
||||
.eq(StringUtils.isNotBlank(surveyTestQueryParam.getSupvType()),SurveyPlan::getSupvType,surveyTestQueryParam.getSupvType())
|
||||
.like(SurveyPlan::getPlanName, surveyTestQueryParam.getSearchValue());
|
||||
List<SurveyPlan> surveyPlans = surveyPlanService.getBaseMapper().selectList(surveyPlanLambdaQueryWrapper);
|
||||
if (CollectionUtil.isNotEmpty(surveyPlans)) {
|
||||
@@ -109,11 +107,14 @@ public class SurveyTestServiceImpl extends ServiceImpl<SurveyTestMapper, SurveyT
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//筛选普测负责单位
|
||||
if (StrUtil.isNotBlank(surveyTestQueryParam.getDeptIndex())) {
|
||||
List<String> deptIds = deptFeignClient.getDepSonIdtByDeptId(surveyTestQueryParam.getDeptIndex()).getData();
|
||||
surveyTestVOQueryWrapper.in("supervision_survey_test.dept_id", deptIds);
|
||||
}
|
||||
if (Objects.nonNull(surveyTestQueryParam.getStatus())) {
|
||||
surveyTestVOQueryWrapper.eq("supervision_survey_test.status", surveyTestQueryParam.getStatus());
|
||||
}
|
||||
|
||||
}
|
||||
//获取当前用户部门所有同事的id,查看该部门下所有的数据
|
||||
List<String> colleaguesIds = userFeignClient.getColleaguesIdByUserId(RequestUtil.getUserIndex()).getData();
|
||||
@@ -193,15 +194,25 @@ public class SurveyTestServiceImpl extends ServiceImpl<SurveyTestMapper, SurveyT
|
||||
public String addSurveyTest(SurveyTestParam surveyTestParam) {
|
||||
SurveyTest surveyTest = this.getById(surveyTestParam.getId());
|
||||
//没有copy前端所有的字段,仅赋值了test表中需要的几个字段
|
||||
|
||||
surveyTest.setCompleteTime(surveyTestParam.getCompleteTime());
|
||||
surveyTest.setCompleteBy(surveyTestParam.getCompleteBy());
|
||||
surveyTest.setTestReport(surveyTestParam.getTestReport());
|
||||
surveyTest.setProblemFlag(surveyTestParam.getProblemFlag());
|
||||
surveyTest.setProblemDetail(surveyTestParam.getProblemDetail());
|
||||
surveyTest.setState(DataStateEnum.ENABLE.getCode());
|
||||
//设置状态
|
||||
if(Objects.equals(surveyTestParam.getSaveOrCheckflag(),"1")){
|
||||
surveyTest.setStatus(BpmTaskStatusEnum.WAIT.getStatus());
|
||||
|
||||
}else {
|
||||
surveyTest.setStatus(BpmTaskStatusEnum.RUNNING.getStatus());
|
||||
|
||||
}
|
||||
surveyTest.setState(DataStateEnum.ENABLE.getCode());
|
||||
// surveyTest.setStatus(BpmTaskStatusEnum.RUNNING.getStatus());
|
||||
this.updateById(surveyTest);
|
||||
// 发起 BPM 流程
|
||||
if(Objects.equals(surveyTestParam.getSaveOrCheckflag(),"2")) {
|
||||
Map<String, Object> processInstanceVariables = new HashMap<>();
|
||||
BpmProcessInstanceCreateReqDTO bpmProcessInstanceCreateReqDTO = new BpmProcessInstanceCreateReqDTO();
|
||||
bpmProcessInstanceCreateReqDTO.setProcessDefinitionKey(SupervisionKeyEnum.SURVEY_TEST.getKey());
|
||||
@@ -212,6 +223,7 @@ public class SurveyTestServiceImpl extends ServiceImpl<SurveyTestMapper, SurveyT
|
||||
// 将工作流的编号,更新到流程单中
|
||||
surveyTest.setProcessInstanceId(processInstanceId);
|
||||
this.baseMapper.updateById(surveyTest);
|
||||
}
|
||||
return surveyTest.getId();
|
||||
}
|
||||
|
||||
|
||||
@@ -406,12 +406,7 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
||||
userReportVOQueryWrapper.eq("data_type", userReportQueryParam.getDataType());
|
||||
}
|
||||
userReportVOQueryWrapper.like(StringUtils.isNotBlank(userReportQueryParam.getProjectName()), "supervision_user_report.project_name", userReportQueryParam.getProjectName());
|
||||
if(StrUtil.isNotBlank(userReportQueryParam.getSearchBeginTime())&&StrUtil.isNotBlank(userReportQueryParam.getSearchEndTime())){
|
||||
userReportVOQueryWrapper.between("supervision_user_report.expected_production_date",
|
||||
DateUtil.beginOfDay(DateUtil.parse(userReportQueryParam.getSearchBeginTime())),
|
||||
DateUtil.endOfDay(DateUtil.parse(userReportQueryParam.getSearchEndTime())));
|
||||
}
|
||||
userReportVOQueryWrapper.orderByDesc("supervision_user_report.Update_Time");
|
||||
|
||||
}
|
||||
userReportVOQueryWrapper.orderByDesc("supervision_user_report.create_time");
|
||||
return this.baseMapper.page(new Page<>(PageFactory.getPageNum(userReportQueryParam), PageFactory.getPageSize(userReportQueryParam)), userReportVOQueryWrapper);
|
||||
@@ -495,108 +490,55 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
||||
|
||||
@Override
|
||||
public void downloadSensitiveUserTemplate() {
|
||||
ExportParams exportParams = new ExportParams("敏感及重要用户数据模板(带*字段均是必填,请严格按照模板标准填入数据)", "敏感及重要用户数据信息");
|
||||
//所属地市
|
||||
List<DictData> jiBeiArea = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.JIBEI_AREA.getCode()).getData();
|
||||
//电压等级
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setSheetName("敏感及重要用户");
|
||||
List<DictData> devVoltage = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE_STAND.getCode()).getData();
|
||||
//评估单位
|
||||
List<DictData> evaluationDept;
|
||||
evaluationDept = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.EVALUATION_DEPT.getCode()).getData();
|
||||
//评估类型
|
||||
List<DictData> evaluationType = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.EVALUATION_TYPE.getCode()).getData();
|
||||
//指标类型
|
||||
List<DictData> indicatorType = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.INDICATOR_TYPE.getCode()).getData();
|
||||
//行业类型
|
||||
List<DictData> industryType = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.INDUSTRY_TYPE_JB.getCode()).getData();
|
||||
//负荷级别
|
||||
List<DictData> loadLevel = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.LOAD_LEVEL.getCode()).getData();
|
||||
//供电电源情况
|
||||
List<DictData> supplyCondition = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.SUPPLY_CONDITION.getCode()).getData();
|
||||
|
||||
List<PullDown> pullDowns = new ArrayList<>();
|
||||
|
||||
|
||||
PullDown pullDown;
|
||||
pullDown = new PullDown();
|
||||
pullDown.setFirstCol(1);
|
||||
pullDown.setLastCol(1);
|
||||
pullDown.setStrings(jiBeiArea.stream().filter(x -> !x.getName().equals("风光储")&&!x.getName().equals("超高压")).map(DictData::getName).collect(Collectors.toList()));
|
||||
pullDowns.add(pullDown);
|
||||
|
||||
pullDown = new PullDown();
|
||||
pullDown.setFirstCol(3);
|
||||
pullDown.setLastCol(3);
|
||||
pullDown.setFirstCol(2);
|
||||
pullDown.setLastCol(2);
|
||||
pullDown.setStrings(Stream.of("可研", "建设", "运行", "退运").collect(Collectors.toList()));
|
||||
pullDowns.add(pullDown);
|
||||
|
||||
|
||||
pullDown = new PullDown();
|
||||
pullDown.setFirstCol(6);
|
||||
pullDown.setLastCol(6);
|
||||
pullDown.setFirstCol(4);
|
||||
pullDown.setLastCol(4);
|
||||
pullDown.setStrings(devVoltage.stream().map(DictData::getName).collect(Collectors.toList()));
|
||||
pullDowns.add(pullDown);
|
||||
|
||||
pullDown = new PullDown();
|
||||
pullDown.setFirstCol(7);
|
||||
pullDown.setLastCol(7);
|
||||
pullDown.setStrings(evaluationDept.stream().map(DictData::getName).collect(Collectors.toList()));
|
||||
pullDowns.add(pullDown);
|
||||
|
||||
pullDown = new PullDown();
|
||||
pullDown.setFirstCol(12);
|
||||
pullDown.setLastCol(12);
|
||||
pullDown.setStrings(evaluationType.stream().map(DictData::getName).collect(Collectors.toList()));
|
||||
pullDowns.add(pullDown);
|
||||
|
||||
pullDown = new PullDown();
|
||||
pullDown.setFirstCol(13);
|
||||
pullDown.setLastCol(13);
|
||||
pullDown.setFirstCol(5);
|
||||
pullDown.setLastCol(5);
|
||||
pullDown.setStrings(industryType.stream().map(DictData::getName).collect(Collectors.toList()));
|
||||
pullDowns.add(pullDown);
|
||||
|
||||
pullDown = new PullDown();
|
||||
pullDown.setFirstCol(16);
|
||||
pullDown.setLastCol(16);
|
||||
pullDown.setStrings(indicatorType.stream().map(DictData::getName).collect(Collectors.toList()));
|
||||
pullDowns.add(pullDown);
|
||||
|
||||
pullDown = new PullDown();
|
||||
pullDown.setFirstCol(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.setFirstCol(8);
|
||||
pullDown.setLastCol(8);
|
||||
pullDown.setStrings(devVoltage.stream().map(DictData::getName).collect(Collectors.toList()));
|
||||
pullDowns.add(pullDown);
|
||||
|
||||
pullDown = new PullDown();
|
||||
pullDown.setFirstCol(21);
|
||||
pullDown.setLastCol(21);
|
||||
pullDown.setFirstCol(9);
|
||||
pullDown.setLastCol(9);
|
||||
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()));
|
||||
pullDown.setStrings(supplyCondition.stream().map(DictData::getName).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.exportExcelPullDownOne(exportParams, "敏感及重要用户模板.xlsx", pullDowns, SensitiveUserExcel.class, new ArrayList<>());
|
||||
|
||||
}
|
||||
|
||||
@@ -605,13 +547,13 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
||||
public String importSensitiveUserData(MultipartFile file, HttpServletResponse response) {
|
||||
ImportParams params = new ImportParams();
|
||||
params.setHeadRows(1);//表头
|
||||
params.setTitleRows(1);//标题
|
||||
// params.setTitleRows(1);//标题
|
||||
params.setNeedVerify(true);
|
||||
params.setStartSheetIndex(0);
|
||||
params.setSheetNum(1);
|
||||
List<SensitiveUserSExcel> sensitiveUserExcels;
|
||||
List<SensitiveUserExcel> sensitiveUserExcels;
|
||||
try {
|
||||
ExcelImportResult<SensitiveUserSExcel> sensitiveUserExcelExcelImportResult = ExcelImportUtil.importExcelMore(file.getInputStream(), SensitiveUserSExcel.class, params);
|
||||
ExcelImportResult<SensitiveUserExcel> sensitiveUserExcelExcelImportResult = ExcelImportUtil.importExcelMore(file.getInputStream(), SensitiveUserExcel.class, params);
|
||||
//如果存在非法数据,将不合格的数据导出
|
||||
if (sensitiveUserExcelExcelImportResult.isVerifyFail()) {
|
||||
PoiUtil.exportFileByWorkbook(sensitiveUserExcelExcelImportResult.getFailWorkbook(), "非法用户数据.xlsx", response);
|
||||
@@ -622,51 +564,49 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
||||
} catch (Exception e) {
|
||||
throw new BusinessException(SupervisionResponseEnum.IMPORT_SENSITIVE_USER_ERROR);
|
||||
}
|
||||
//电压等级
|
||||
List<DictData> devVoltage = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE_STAND.getCode()).getData();
|
||||
//指标类型
|
||||
List<DictData> indicatorType = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.INDICATOR_TYPE.getCode()).getData();
|
||||
//评估类型
|
||||
List<DictData> evaluationType = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.EVALUATION_TYPE.getCode()).getData();
|
||||
//行业类型
|
||||
List<DictData> industryType = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.INDUSTRY_TYPE_JB.getCode()).getData();
|
||||
//负荷级别
|
||||
List<DictData> loadLevel = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.LOAD_LEVEL.getCode()).getData();
|
||||
//供电电源情况
|
||||
List<DictData> supplyCondition = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.SUPPLY_CONDITION.getCode()).getData();
|
||||
|
||||
//执行批量导入敏感及重要用户,入库过程中会进行数据校验
|
||||
List<SensitiveUserSExcel.SensitiveUserExcelMsg> sensitiveUserExcelMsgs = new ArrayList<>();
|
||||
List<SensitiveUserExcel.SensitiveUserExcelMsg> sensitiveUserExcelMsgs = new ArrayList<>();
|
||||
if (CollectionUtil.isNotEmpty(sensitiveUserExcels)) {
|
||||
for (SensitiveUserSExcel userExcel : sensitiveUserExcels) {
|
||||
for (SensitiveUserExcel sensitiveUserExcel : sensitiveUserExcels) {
|
||||
//先判断当前用户是否已经存在
|
||||
LambdaQueryWrapper<UserReportPO> userReportPOLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
userReportPOLambdaQueryWrapper.eq(UserReportPO::getProjectName, userExcel.getProjectName())
|
||||
userReportPOLambdaQueryWrapper.eq(UserReportPO::getProjectName, sensitiveUserExcel.getProjectName())
|
||||
.eq(UserReportPO::getState, DataStateEnum.ENABLE.getCode());
|
||||
int count = this.count(userReportPOLambdaQueryWrapper);
|
||||
if (count > 0) {
|
||||
// if(sensitiveUserExcel.getOverlay() == 1){
|
||||
//
|
||||
// }else{
|
||||
//该用户已经录入
|
||||
SensitiveUserSExcel.SensitiveUserExcelMsg sensitiveUserExcelMsg = new SensitiveUserSExcel.SensitiveUserExcelMsg();
|
||||
BeanUtils.copyProperties(userExcel, sensitiveUserExcelMsg);
|
||||
SensitiveUserExcel.SensitiveUserExcelMsg sensitiveUserExcelMsg = new SensitiveUserExcel.SensitiveUserExcelMsg();
|
||||
BeanUtils.copyProperties(sensitiveUserExcel, sensitiveUserExcelMsg);
|
||||
sensitiveUserExcelMsg.setMsg("该用户已录入!");
|
||||
sensitiveUserExcelMsgs.add(sensitiveUserExcelMsg);
|
||||
}else{
|
||||
// }
|
||||
continue;
|
||||
}
|
||||
//处理通用信息
|
||||
UserReportPO userReportPO = new UserReportPO();
|
||||
userReportPO.setReporter(RequestUtil.getUserIndex());
|
||||
userReportPO.setReportDate(LocalDate.now());
|
||||
userReportPO.setOrgId(RequestUtil.getDeptIndex());
|
||||
userReportPO.setExpectedProductionDate(userExcel.getExpectedProductionDate());
|
||||
userReportPO.setCity(sensitiveUserExcel.getCity());
|
||||
userReportPO.setUserType(UserNatureEnum.SENSITIVE_USER.getCode());
|
||||
//所属地市
|
||||
userReportPO.setCity(userExcel.getCity());
|
||||
userReportPO.setResponsibleDepartment(userExcel.getResponsibleDepartment());
|
||||
userReportPO.setUserStatus(userExcel.getUserStatus());
|
||||
userReportPO.setSubstation(userExcel.getSubstation());
|
||||
userReportPO.setVoltageLevel(PubUtil.getDicById(userExcel.getVoltageLevel(), devVoltage));
|
||||
userReportPO.setProjectName(userExcel.getProjectName());
|
||||
userReportPO.setEvaluationDept(userExcel.getEvaluationDept());
|
||||
userReportPO.setEvaluationConclusion(userExcel.getEvaluationConclusion());
|
||||
if(Objects.nonNull(sensitiveUserExcel.getUserStatus())){
|
||||
userReportPO.setUserStatus(sensitiveUserExcel.getUserStatus());
|
||||
}else{
|
||||
userReportPO.setUserStatus(SupervisionUserStatusEnum.PRODUCT.getCode());
|
||||
}
|
||||
userReportPO.setSubstation(sensitiveUserExcel.getSubstation());
|
||||
//电压等级需要特殊处理下
|
||||
if (StrUtil.isNotBlank(sensitiveUserExcel.getVoltageLevel())) {
|
||||
userReportPO.setVoltageLevel(PubUtil.getDicById(sensitiveUserExcel.getVoltageLevel(), devVoltage));
|
||||
}
|
||||
userReportPO.setProjectName(sensitiveUserExcel.getProjectName());
|
||||
userReportPO.setDataType(1);
|
||||
userReportPO.setStatus(2);
|
||||
userReportPO.setState(DataStateEnum.ENABLE.getCode());
|
||||
@@ -674,250 +614,24 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
||||
//处理敏感用户的信息
|
||||
UserReportSensitivePO userReportSensitivePO = new UserReportSensitivePO();
|
||||
userReportSensitivePO.setId(userReportPO.getId());
|
||||
userReportSensitivePO.setPccPoint(userExcel.getPccPoint());
|
||||
userReportSensitivePO.setDeviceName(userExcel.getDeviceName());
|
||||
userReportSensitivePO.setPowerSupplyCount(userExcel.getPowerSupplyCount());
|
||||
userReportSensitivePO.setEnergyQualityIndex(PubUtil.getDicById(userExcel.getEnergyQualityIndex(), indicatorType));
|
||||
userReportSensitivePO.setEvaluationType(PubUtil.getDicById(userExcel.getEvaluationType(), evaluationType));
|
||||
userReportSensitivePO.setAntiInterferenceTest(userExcel.getAntiInterferenceTest()+"");
|
||||
userReportSensitivePO.setEvaluationChekDept(userExcel.getEvaluationChekDept());
|
||||
userReportSensitivePO.setNeedGovernance(userExcel.getNeedGovernance());
|
||||
userReportSensitivePO.setBackgroundTestPerformed(userExcel.getBackgroundTestPerformed());
|
||||
// userReportSensitivePO.setSubstationMainWiringDiagram();
|
||||
// userReportSensitivePO.setSensitiveDevices();
|
||||
// userReportSensitivePO.setAntiInterferenceReport();
|
||||
// userReportSensitivePO.setPowerQualityReport();
|
||||
// userReportSensitivePO.setFeasibilityReport();
|
||||
// userReportSensitivePO.setPreliminaryDesignDescription();
|
||||
// userReportSensitivePO.setPredictionEvaluationReport();
|
||||
// userReportSensitivePO.setPredictionEvaluationReviewOpinions();
|
||||
// userReportSensitivePO.setAdditionalAttachments();
|
||||
if (StrUtil.isNotBlank(userExcel.getIndustry())) {
|
||||
userReportSensitivePO.setIndustry(PubUtil.getDicById(userExcel.getIndustry(), industryType));
|
||||
if (StrUtil.isNotBlank(sensitiveUserExcel.getIndustry())) {
|
||||
userReportSensitivePO.setIndustry(PubUtil.getDicById(sensitiveUserExcel.getIndustry(), industryType));
|
||||
}
|
||||
userReportSensitivePO.setMaintenanceUnit(userExcel.getMaintenanceUnit());
|
||||
userReportSensitivePO.setPowerSupply(userExcel.getPowerSupply());
|
||||
if (StrUtil.isNotBlank(userExcel.getSupplyVoltageLevel())) {
|
||||
userReportSensitivePO.setSupplyVoltageLevel(PubUtil.getDicById(userExcel.getSupplyVoltageLevel(), devVoltage));
|
||||
userReportSensitivePO.setMaintenanceUnit(sensitiveUserExcel.getMaintenanceUnit());
|
||||
userReportSensitivePO.setPowerSupply(sensitiveUserExcel.getPowerSupply());
|
||||
if (StrUtil.isNotBlank(sensitiveUserExcel.getSupplyVoltageLevel())) {
|
||||
userReportSensitivePO.setSupplyVoltageLevel(PubUtil.getDicById(sensitiveUserExcel.getSupplyVoltageLevel(), devVoltage));
|
||||
}
|
||||
if (StrUtil.isNotBlank(userExcel.getLoadLevel())) {
|
||||
userReportSensitivePO.setLoadLevel(PubUtil.getDicById(userExcel.getLoadLevel(), loadLevel));
|
||||
if (StrUtil.isNotBlank(sensitiveUserExcel.getLoadLevel())) {
|
||||
userReportSensitivePO.setLoadLevel(PubUtil.getDicById(sensitiveUserExcel.getLoadLevel(), loadLevel));
|
||||
}
|
||||
if (StrUtil.isNotBlank(userExcel.getPowerSupplyInfo())) {
|
||||
userReportSensitivePO.setPowerSupplyInfo(PubUtil.getDicById(userExcel.getPowerSupplyInfo(), supplyCondition));
|
||||
if (StrUtil.isNotBlank(sensitiveUserExcel.getPowerSupplyInfo())) {
|
||||
userReportSensitivePO.setPowerSupplyInfo(PubUtil.getDicById(sensitiveUserExcel.getPowerSupplyInfo(), supplyCondition));
|
||||
}
|
||||
userReportSensitivePO.setState(DataStateEnum.ENABLE.getCode());
|
||||
userReportSensitivePOService.save(userReportSensitivePO);
|
||||
}
|
||||
}
|
||||
}
|
||||
//判断有没有错误信息
|
||||
if (CollectionUtil.isNotEmpty(sensitiveUserExcelMsgs)) {
|
||||
ExcelUtil.exportExcel("失败列表.xlsx", SensitiveUserSExcel.SensitiveUserExcelMsg.class, sensitiveUserExcelMsgs);
|
||||
return null;
|
||||
}
|
||||
return CommonResponseEnum.SUCCESS.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void downloadSensitiveReportTemplate() {
|
||||
ExportParams exportParams = new ExportParams("干扰源用户数据模板(带*字段均是必填,请严格按照模板标准填入数据)", "干扰源用户数据信息");
|
||||
//所属地市
|
||||
List<DictData> jiBeiArea = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.JIBEI_AREA.getCode()).getData();
|
||||
//主要非线性设备类型-冀北
|
||||
List<SysDicTreePO> treeVOS = dictTreeFeignClient.queryByCodeList(DicDataTypeEnum.Major_Nonlinear_Device.getCode()).getData();
|
||||
//电压等级
|
||||
List<DictData> devVoltage = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE_STAND.getCode()).getData();
|
||||
//评估单位
|
||||
List<DictData> evaluationDept = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.EVALUATION_DEPT.getCode()).getData();
|
||||
//评估类型
|
||||
List<DictData> evaluationType = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.EVALUATION_TYPE.getCode()).getData();
|
||||
|
||||
Map<String, String> treeString = getTreeString("", treeVOS.get(0).getChildren());
|
||||
|
||||
List<PullDown> pullDowns = new ArrayList<>();
|
||||
PullDown pullDown;
|
||||
pullDown = new PullDown();
|
||||
pullDown.setFirstCol(1);
|
||||
pullDown.setLastCol(1);
|
||||
pullDown.setStrings(Stream.of("新建电网工程", "扩建电网工程", "新建非线性负荷用户", "扩建非线性负荷用户", "新建新能源发电站", "扩建新能源发电站").collect(Collectors.toList()));
|
||||
pullDowns.add(pullDown);
|
||||
|
||||
pullDown = new PullDown();
|
||||
pullDown.setFirstCol(2);
|
||||
pullDown.setLastCol(2);
|
||||
pullDown.setStrings(jiBeiArea.stream().filter(x -> !"风光储".equals(x.getName())&&!"超高压".equals(x.getName())).map(DictData::getName).collect(Collectors.toList()));
|
||||
pullDowns.add(pullDown);
|
||||
|
||||
pullDown = new PullDown();
|
||||
pullDown.setFirstCol(4);
|
||||
pullDown.setLastCol(4);
|
||||
pullDown.setStrings(Stream.of("可研", "建设", "运行", "退运").collect(Collectors.toList()));
|
||||
pullDowns.add(pullDown);
|
||||
|
||||
pullDown = new PullDown();
|
||||
pullDown.setFirstCol(7);
|
||||
pullDown.setLastCol(7);
|
||||
pullDown.setStrings(devVoltage.stream().map(DictData::getName).collect(Collectors.toList()));
|
||||
pullDowns.add(pullDown);
|
||||
|
||||
pullDown = new PullDown();
|
||||
pullDown.setFirstCol(8);
|
||||
pullDown.setLastCol(8);
|
||||
pullDown.setStrings(evaluationDept.stream().map(DictData::getName).collect(Collectors.toList()));
|
||||
pullDowns.add(pullDown);
|
||||
|
||||
|
||||
pullDown = new PullDown();
|
||||
pullDown.setFirstCol(15);
|
||||
pullDown.setLastCol(15);
|
||||
pullDown.setStrings(evaluationType.stream().map(DictData::getName).collect(Collectors.toList()));
|
||||
pullDowns.add(pullDown);
|
||||
|
||||
pullDown = new PullDown();
|
||||
pullDown.setFirstCol(16);
|
||||
pullDown.setLastCol(16);
|
||||
pullDown.setStrings(treeString.keySet().stream().collect(Collectors.toList()));
|
||||
pullDowns.add(pullDown);
|
||||
|
||||
pullDown = new PullDown();
|
||||
pullDown.setFirstCol(18);
|
||||
pullDown.setLastCol(18);
|
||||
pullDown.setStrings(Stream.of("否", "是").collect(Collectors.toList()));
|
||||
pullDowns.add(pullDown);
|
||||
|
||||
pullDown = new PullDown();
|
||||
pullDown.setFirstCol(19);
|
||||
pullDown.setLastCol(19);
|
||||
pullDown.setStrings(Stream.of("否", "是").collect(Collectors.toList()));
|
||||
pullDowns.add(pullDown);
|
||||
|
||||
ExcelUtil.exportExcelPullDown(exportParams, "干扰源用户用户模板.xlsx", pullDowns, SensitiveReportExcel.class, new ArrayList<>());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String importSensitiveReportData(MultipartFile file, HttpServletResponse response) {
|
||||
ImportParams params = new ImportParams();
|
||||
params.setHeadRows(1);//表头
|
||||
params.setTitleRows(1);//标题
|
||||
params.setNeedVerify(true);
|
||||
params.setStartSheetIndex(0);
|
||||
params.setSheetNum(1);
|
||||
List<SensitiveReportExcel> sensitiveUserExcels;
|
||||
try {
|
||||
ExcelImportResult<SensitiveReportExcel> sensitiveUserExcelExcelImportResult = ExcelImportUtil.importExcelMore(file.getInputStream(), SensitiveReportExcel.class, params);
|
||||
//如果存在非法数据,将不合格的数据导出
|
||||
if (sensitiveUserExcelExcelImportResult.isVerifyFail()) {
|
||||
PoiUtil.exportFileByWorkbook(sensitiveUserExcelExcelImportResult.getFailWorkbook(), "非法用户数据.xlsx", response);
|
||||
return null;
|
||||
} else {
|
||||
sensitiveUserExcels = sensitiveUserExcelExcelImportResult.getList();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new BusinessException(SupervisionResponseEnum.IMPORT_SENSITIVE_USER_ERROR);
|
||||
}
|
||||
//主要非线性设备类型-冀北
|
||||
List<SysDicTreePO> treeVOS = dictTreeFeignClient.queryByCodeList(DicDataTypeEnum.Major_Nonlinear_Device.getCode()).getData();
|
||||
//电压等级
|
||||
List<DictData> devVoltage = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE_STAND.getCode()).getData();
|
||||
Map<String, String> treeString = getTreeString("", treeVOS.get(0).getChildren());
|
||||
//评估类型
|
||||
List<DictData> evaluationType = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.EVALUATION_TYPE.getCode()).getData();
|
||||
|
||||
//执行批量导入敏感及重要用户,入库过程中会进行数据校验
|
||||
List<SensitiveReportExcel.SensitiveReportExcelMsg> sensitiveUserExcelMsgs = new ArrayList<>();
|
||||
if (CollectionUtil.isNotEmpty(sensitiveUserExcels)) {
|
||||
for (SensitiveReportExcel reportExcel : sensitiveUserExcels) {
|
||||
//先判断当前用户是否已经存在
|
||||
LambdaQueryWrapper<UserReportPO> userReportPOLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
userReportPOLambdaQueryWrapper.eq(UserReportPO::getProjectName, reportExcel.getProjectName())
|
||||
.eq(UserReportPO::getState, DataStateEnum.ENABLE.getCode());
|
||||
int count = this.count(userReportPOLambdaQueryWrapper);
|
||||
if (count > 0) {
|
||||
//该用户已经录入
|
||||
SensitiveReportExcel.SensitiveReportExcelMsg sensitiveUserExcelMsg = new SensitiveReportExcel.SensitiveReportExcelMsg();
|
||||
BeanUtils.copyProperties(reportExcel, sensitiveUserExcelMsg);
|
||||
sensitiveUserExcelMsg.setMsg("该用户已录入!");
|
||||
sensitiveUserExcelMsgs.add(sensitiveUserExcelMsg);
|
||||
} else {
|
||||
//处理通用信息
|
||||
UserReportPO userReportPO = new UserReportPO();
|
||||
userReportPO.setReporter(RequestUtil.getUserIndex());
|
||||
userReportPO.setReportDate(LocalDate.now());
|
||||
userReportPO.setOrgId(RequestUtil.getDeptIndex());
|
||||
userReportPO.setExpectedProductionDate(reportExcel.getExpectedProductionDate());
|
||||
userReportPO.setUserType(reportExcel.getUserType());
|
||||
//所属地市
|
||||
userReportPO.setCity(reportExcel.getCity());
|
||||
userReportPO.setResponsibleDepartment(reportExcel.getResponsibleDepartment());
|
||||
userReportPO.setUserStatus(reportExcel.getUserStatus());
|
||||
userReportPO.setSubstation(reportExcel.getSubstation());
|
||||
userReportPO.setVoltageLevel(PubUtil.getDicById(reportExcel.getVoltageLevel(), devVoltage));
|
||||
userReportPO.setProjectName(reportExcel.getProjectName());
|
||||
userReportPO.setEvaluationDept(reportExcel.getEvaluationDept());
|
||||
userReportPO.setEvaluationConclusion(reportExcel.getEvaluationConclusion());
|
||||
userReportPO.setDataType(1);
|
||||
userReportPO.setStatus(2);
|
||||
userReportPO.setState(DataStateEnum.ENABLE.getCode());
|
||||
this.baseMapper.insert(userReportPO);
|
||||
if (CollectionUtil.newArrayList(
|
||||
UserNatureEnum.BUILD_POWER_GRID.getCode(),
|
||||
UserNatureEnum.EXTEND_POWER_GRID.getCode()
|
||||
).contains(userReportPO.getUserType())) {
|
||||
//电网工程类用户额外数据
|
||||
UserReportProjectPO userReportProjectPO = new UserReportProjectPO();
|
||||
userReportProjectPO.setId(userReportPO.getId());
|
||||
if(ObjectUtil.isNotEmpty(reportExcel.getNonlinearLoadType())){
|
||||
userReportProjectPO.setAgreementCapacity(reportExcel.getUserAgreementCapacity().doubleValue());
|
||||
}
|
||||
if(StrUtil.isNotBlank(reportExcel.getNonlinearLoadType())){
|
||||
userReportProjectPO.setNonlinearDeviceType(treeString.containsKey(reportExcel.getNonlinearLoadType()) ? treeString.get(reportExcel.getNonlinearLoadType()) : null);
|
||||
}
|
||||
|
||||
userReportProjectPO.setNeedGovernance(reportExcel.getNeedGovernance());
|
||||
userReportProjectPO.setBackgroundTestPerformed(reportExcel.getBackgroundTestPerformed());
|
||||
// userReportProjectPO.setFeasibilityReport();
|
||||
// userReportProjectPO.setPreliminaryDesignDescription();
|
||||
// userReportProjectPO.setPredictionEvaluationReport();
|
||||
// userReportProjectPO.setPredictionEvaluationReviewOpinions();
|
||||
// userReportProjectPO.setAdditionalAttachments();
|
||||
userReportProjectPO.setState(DataStateEnum.ENABLE.getCode());
|
||||
userReportProjectPOService.saveOrUpdate(userReportProjectPO);
|
||||
}
|
||||
if (CollectionUtil.newArrayList(
|
||||
UserNatureEnum.BUILD_NON_LINEAR_LOAD.getCode(),
|
||||
UserNatureEnum.EXTEND_NON_LINEAR_LOAD.getCode(),
|
||||
UserNatureEnum.BUILD_NEW_ENERGY_POWER_STATION.getCode(),
|
||||
UserNatureEnum.EXTEND_NEW_ENERGY_POWER_STATION.getCode()
|
||||
).contains(userReportPO.getUserType())) {
|
||||
//非线性负荷用户 & 新能源发电站用户
|
||||
UserReportSubstationPO userReportSubstationPO = new UserReportSubstationPO();
|
||||
userReportSubstationPO.setId(userReportPO.getId());
|
||||
userReportSubstationPO.setPccPoint(reportExcel.getPccPoint());
|
||||
userReportSubstationPO.setBaseShortCircuitCapacity(reportExcel.getBaseShortCircuitCapacity());
|
||||
userReportSubstationPO.setMinShortCircuitCapacity(reportExcel.getMinShortCircuitCapacity());
|
||||
userReportSubstationPO.setPccEquipmentCapacity(reportExcel.getPccEquipmentCapacity());
|
||||
userReportSubstationPO.setUserAgreementCapacity(reportExcel.getUserAgreementCapacity());
|
||||
userReportSubstationPO.setEvaluationType(PubUtil.getDicById(reportExcel.getEvaluationType(), evaluationType));
|
||||
if(StrUtil.isNotBlank(reportExcel.getNonlinearLoadType())){
|
||||
userReportSubstationPO.setNonlinearLoadType(treeString.containsKey(reportExcel.getNonlinearLoadType()) ? treeString.get(reportExcel.getNonlinearLoadType()) : null);
|
||||
}
|
||||
userReportSubstationPO.setEvaluationChekDept(reportExcel.getEvaluationChekDept());
|
||||
userReportSubstationPO.setNeedGovernance(reportExcel.getNeedGovernance());
|
||||
userReportSubstationPO.setBackgroundTestPerformed(reportExcel.getBackgroundTestPerformed());
|
||||
// userReportSubstationPO.setSubstationMainWiringDiagram();
|
||||
// userReportSubstationPO.setFeasibilityReport();
|
||||
// userReportSubstationPO.setPreliminaryDesignDescription();
|
||||
// userReportSubstationPO.setPredictionEvaluationReport();
|
||||
// userReportSubstationPO.setPredictionEvaluationReviewOpinions();
|
||||
// userReportSubstationPO.setAdditionalAttachments();
|
||||
userReportSubstationPO.setState(DataStateEnum.ENABLE.getCode());
|
||||
userReportSubstationPOService.saveOrUpdate(userReportSubstationPO);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//判断有没有错误信息
|
||||
if (CollectionUtil.isNotEmpty(sensitiveUserExcelMsgs)) {
|
||||
ExcelUtil.exportExcel("失败列表.xlsx", SensitiveUserExcel.SensitiveUserExcelMsg.class, sensitiveUserExcelMsgs);
|
||||
@@ -926,20 +640,6 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
||||
return CommonResponseEnum.SUCCESS.getCode();
|
||||
}
|
||||
|
||||
public Map<String,String> getTreeString(String name, List<SysDicTreePO> treeVOS) {
|
||||
Map<String,String> info = new LinkedHashMap<>();
|
||||
for (SysDicTreePO sysMenuDtoChild : treeVOS) {
|
||||
if (sysMenuDtoChild.getLevel() == 3) {
|
||||
name = sysMenuDtoChild.getId()+"-"+sysMenuDtoChild.getName();
|
||||
}
|
||||
if (CollUtil.isNotEmpty(sysMenuDtoChild.getChildren())) {
|
||||
info.putAll(getTreeString(name, sysMenuDtoChild.getChildren()));
|
||||
} else {
|
||||
info.put(name.split("-")[1],name.split("-")[0]);
|
||||
}
|
||||
}
|
||||
return info;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有字段为null的属性名
|
||||
|
||||
Reference in New Issue
Block a user