代码合并终
This commit is contained in:
@@ -17,6 +17,19 @@ import java.util.List;
|
|||||||
public class OverviewVO implements Serializable {
|
public class OverviewVO implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "monitorObjects", value = "监测点集合")
|
||||||
|
private List<MonitorObject> monitorObjects;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "setRate", value = "光伏用户")
|
||||||
|
private PhotovoltaicUser photovoltaicUser;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "setRate", value = "光伏容量")
|
||||||
|
private PhotovoltaicCapacity photovoltaicCapacity;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class MonitorObject {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@ApiModelProperty(name = "monitorSort", value = "监测点类别")
|
@ApiModelProperty(name = "monitorSort", value = "监测点类别")
|
||||||
private String monitorSort;
|
private String monitorSort;
|
||||||
@ApiModelProperty(name = "sumNum", value = "监测点数量")
|
@ApiModelProperty(name = "sumNum", value = "监测点数量")
|
||||||
@@ -29,7 +42,49 @@ public class OverviewVO implements Serializable {
|
|||||||
private String sameNum;
|
private String sameNum;
|
||||||
@ApiModelProperty(name = "sumNum", value = "环比监测点占比")
|
@ApiModelProperty(name = "sumNum", value = "环比监测点占比")
|
||||||
private String ringNum;
|
private String ringNum;
|
||||||
|
@ApiModelProperty(name = "setRate", value = "设置率")
|
||||||
|
private String setRate="20.3";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class PhotovoltaicUser {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "highPressure", value = "中压用户(10KV)")
|
||||||
|
private Integer highPressure=0;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "highPressure", value = "低压用户(380V)")
|
||||||
|
private Integer lowPressure=0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class PhotovoltaicCapacity {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "highCapacity", value = "中压容量(10KV)")
|
||||||
|
private Float highCapacity=0.f;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "lowCapacity", value = "低压容量(380V)")
|
||||||
|
private Float lowCapacity=0.f;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class PhotoVoltaicVoltage {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "type", value = "电压类型")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "num", value = "数量")
|
||||||
|
private Integer num;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "capacity", value = "容量")
|
||||||
|
private Float capacity;
|
||||||
|
|
||||||
|
}
|
||||||
@Data
|
@Data
|
||||||
public static class AlarmVO {
|
public static class AlarmVO {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public class SpecialAnalysisMonitorVO implements Serializable {
|
|||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 监测点名称
|
* 单位名称
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = "orgName", value = "单位名称")
|
@ApiModelProperty(name = "orgName", value = "单位名称")
|
||||||
private String orgName;
|
private String orgName;
|
||||||
|
|||||||
@@ -55,13 +55,4 @@ public class PwOverviewController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, groupVOS, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, groupVOS, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
// @PostMapping("/getWorkOrder")
|
|
||||||
// @OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
|
||||||
// @ApiOperation("工单转换率/处置率")
|
|
||||||
// @ApiImplicitParam(name = "param", value = "条件参数", required = true)
|
|
||||||
// public HttpResult<List<?>> getWorkOrder(@RequestBody OverviewParam.OverviewDateParam param) {
|
|
||||||
// String methodDescribe = getMethodDescribe("getWorkOrder");
|
|
||||||
// List<?> groups = overviewService.getWorkOrder(param);
|
|
||||||
// return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, groups, methodDescribe);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,9 +43,9 @@ public class OverviewController extends BaseController {
|
|||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@ApiOperation("监测点统计")
|
@ApiOperation("监测点统计")
|
||||||
@ApiImplicitParam(name = "param", value = "条件参数", required = true)
|
@ApiImplicitParam(name = "param", value = "条件参数", required = true)
|
||||||
public HttpResult<List<OverviewVO>> getMapDisplay(@RequestBody OverviewParam param) {
|
public HttpResult<OverviewVO> getMapDisplay(@RequestBody OverviewParam param) {
|
||||||
String methodDescribe = getMethodDescribe("getMapDisplay");
|
String methodDescribe = getMethodDescribe("getMapDisplay");
|
||||||
List<OverviewVO> monitorYoY = overviewService.getMonitorYoY(param);
|
OverviewVO monitorYoY = overviewService.getMonitorYoY(param);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, monitorYoY, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, monitorYoY, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,11 +21,24 @@ public interface OverviewMapper {
|
|||||||
* @param param
|
* @param param
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<OverviewVO> selectYoY(@Param("orgIds") List<String> orgId,@Param("param") OverviewParam param);
|
List<OverviewVO.MonitorObject> selectYoY(@Param("orgIds") List<String> orgId,@Param("param") OverviewParam param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询配网所有信息
|
* 查询配网所有信息
|
||||||
|
* @param orgId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<DistributionMonitorVO> selectListAll(@Param("orgIds") List<String> orgId);
|
List<DistributionMonitorVO> selectListAll(@Param("orgIds") List<String> orgId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分布式光伏查询监测点用户和容量
|
||||||
|
* @param orgId
|
||||||
|
* @param levelOne 低电压字典
|
||||||
|
* @param levelTwo 中电压字典
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<OverviewVO.PhotoVoltaicVoltage> selectPhotovoltaicUser(@Param("orgIds") List<String> orgId,
|
||||||
|
@Param("levelOne") List<String> levelOne,
|
||||||
|
@Param("levelTwo") List<String> levelTwo);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.njcn.device.pms.mapper.majornetwork.OverviewMapper">
|
<mapper namespace="com.njcn.device.pms.mapper.majornetwork.OverviewMapper">
|
||||||
|
|
||||||
<select id="selectYoY" resultType="com.njcn.device.pms.pojo.vo.OverviewVO">
|
<select id="selectYoY" resultType="com.njcn.device.pms.pojo.vo.OverviewVO$MonitorObject">
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
ta.Monitor_Sort as monitorSort,
|
ta.Monitor_Sort as monitorSort,
|
||||||
@@ -275,4 +275,47 @@
|
|||||||
INNER JOIN pms_distribution_monitor b ON t.id = b.Monitor_Id and b.Status=1
|
INNER JOIN pms_distribution_monitor b ON t.id = b.Monitor_Id and b.Status=1
|
||||||
LEFT JOIN pms_statation_stat pss on t.Power_Station_Id=pss.Power_Id
|
LEFT JOIN pms_statation_stat pss on t.Power_Station_Id=pss.Power_Id
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectPhotovoltaicUser" resultType="com.njcn.device.pms.pojo.vo.OverviewVO$PhotoVoltaicVoltage">
|
||||||
|
(select
|
||||||
|
1 AS type,
|
||||||
|
count(*) AS num,
|
||||||
|
IFNULL( sum( installed_capacity ), 0 ) AS Capacity
|
||||||
|
from
|
||||||
|
f_cons_power
|
||||||
|
<where>
|
||||||
|
section IN
|
||||||
|
<foreach collection="orgIds" item="item" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
|
||||||
|
and voltage_level IN
|
||||||
|
<foreach collection="levelOne" item="item" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
)
|
||||||
|
UNION ALL
|
||||||
|
(
|
||||||
|
select
|
||||||
|
2 AS type,
|
||||||
|
count(*) AS num,
|
||||||
|
IFNULL( sum( installed_capacity ), 0 ) AS Capacity
|
||||||
|
from
|
||||||
|
f_cons_power
|
||||||
|
<where>
|
||||||
|
section IN
|
||||||
|
<foreach
|
||||||
|
collection="orgIds" item="item" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
|
||||||
|
and voltage_level IN
|
||||||
|
<foreach collection="levelTwo" item="item" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
|
||||||
|
</where>
|
||||||
|
)
|
||||||
|
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
FROM
|
FROM
|
||||||
pms_generatrix_wire AS pg
|
pms_generatrix_wire AS pg
|
||||||
LEFT JOIN pms_statation_stat AS pss ON pg.station_id = pss.Power_Id
|
LEFT JOIN pms_statation_stat AS pss ON pg.station = pss.Power_Id
|
||||||
WHERE
|
WHERE
|
||||||
pg.`Status` = 1
|
pg.`Status` = 1
|
||||||
AND pss.`Status` = 1
|
AND pss.`Status` = 1
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import com.njcn.system.enums.DicDataTypeEnum;
|
|||||||
import com.njcn.system.pojo.po.DictData;
|
import com.njcn.system.pojo.po.DictData;
|
||||||
import com.njcn.user.api.DeptFeignClient;
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
import com.njcn.user.pojo.dto.DeptDTO;
|
import com.njcn.user.pojo.dto.DeptDTO;
|
||||||
import com.njcn.web.utils.WebUtil;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ public interface OverviewService {
|
|||||||
* @param param
|
* @param param
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<OverviewVO> getMonitorYoY(OverviewParam param);
|
OverviewVO getMonitorYoY(OverviewParam param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 告警监测点占比
|
* 告警监测点占比
|
||||||
@@ -44,10 +44,4 @@ public interface OverviewService {
|
|||||||
*/
|
*/
|
||||||
List<OverviewVO.AreaAlarmCountVO> getAlarmRating(OverviewParam.OverviewDateParam param);
|
List<OverviewVO.AreaAlarmCountVO> getAlarmRating(OverviewParam.OverviewDateParam param);
|
||||||
|
|
||||||
/**
|
|
||||||
* 工单转换率/处置率
|
|
||||||
* @param param
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<?> getWorkOrder(OverviewParam.OverviewDateParam param);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import com.njcn.user.api.DeptFeignClient;
|
|||||||
import com.njcn.user.pojo.dto.DeptDTO;
|
import com.njcn.user.pojo.dto.DeptDTO;
|
||||||
import com.njcn.user.pojo.po.Dept;
|
import com.njcn.user.pojo.po.Dept;
|
||||||
import com.njcn.web.utils.WebUtil;
|
import com.njcn.web.utils.WebUtil;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -46,11 +47,11 @@ public class OverviewServiceImpl implements OverviewService {
|
|||||||
private final DicDataFeignClient dicDataFeignClient;
|
private final DicDataFeignClient dicDataFeignClient;
|
||||||
private final RMpMonitorAlarmCountMService rMpMonitorAlarmCountMService;
|
private final RMpMonitorAlarmCountMService rMpMonitorAlarmCountMService;
|
||||||
private final RStatAreaAlarmCountMService rStatAreaAlarmCountMService;
|
private final RStatAreaAlarmCountMService rStatAreaAlarmCountMService;
|
||||||
|
private static final String XIONG_AN_CITY="雄安新区";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<OverviewVO> getMonitorYoY(OverviewParam param) {
|
public OverviewVO getMonitorYoY(OverviewParam param) {
|
||||||
List<OverviewVO> overviewVOS=new ArrayList<>();
|
OverviewVO vos=new OverviewVO();
|
||||||
|
|
||||||
//获取监测点类别集合(配网1-2-3类监测点)
|
//获取监测点类别集合(配网1-2-3类监测点)
|
||||||
List<DictData> lineData = dicDataFeignClient.getDicDataByTypeCode(
|
List<DictData> lineData = dicDataFeignClient.getDicDataByTypeCode(
|
||||||
DicDataTypeEnum.LINE_SORT.getCode()).getData();
|
DicDataTypeEnum.LINE_SORT.getCode()).getData();
|
||||||
@@ -59,17 +60,17 @@ public class OverviewServiceImpl implements OverviewService {
|
|||||||
List<String> deptListCode = getDeptListCode(param.getId());
|
List<String> deptListCode = getDeptListCode(param.getId());
|
||||||
if(CollectionUtil.isNotEmpty(deptListCode)){
|
if(CollectionUtil.isNotEmpty(deptListCode)){
|
||||||
|
|
||||||
overviewVOS = overviewMapper.selectYoY(deptListCode, param);
|
List<OverviewVO.MonitorObject> overviewVOS = overviewMapper.selectYoY(deptListCode, param);
|
||||||
Map<String, OverviewVO> voMap = overviewVOS.stream().
|
Map<String, OverviewVO.MonitorObject> voMap = overviewVOS.stream().
|
||||||
collect(Collectors.toMap(OverviewVO::getMonitorSort, Function.identity()));
|
collect(Collectors.toMap(OverviewVO.MonitorObject::getMonitorSort, Function.identity()));
|
||||||
|
|
||||||
//不存在监测点赋值初始值
|
//不存在监测点赋值初始值
|
||||||
List<DictData> notMeasurementList = lineData.stream().filter(r -> !voMap.containsKey(r.getId()))
|
List<DictData> notMeasurementList = lineData.stream().filter(r -> !voMap.containsKey(r.getId()))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
if(CollectionUtil.isNotEmpty(notMeasurementList)){
|
if(CollectionUtil.isNotEmpty(notMeasurementList)){
|
||||||
OverviewVO overviewVO;
|
OverviewVO.MonitorObject overviewVO;
|
||||||
for (DictData notData : notMeasurementList) {
|
for (DictData notData : notMeasurementList) {
|
||||||
overviewVO=new OverviewVO();
|
overviewVO=new OverviewVO.MonitorObject();
|
||||||
overviewVO.setMonitorSort(notData.getId());
|
overviewVO.setMonitorSort(notData.getId());
|
||||||
overviewVO.setSumNum("0");
|
overviewVO.setSumNum("0");
|
||||||
overviewVO.setYtbSumNum("0");
|
overviewVO.setYtbSumNum("0");
|
||||||
@@ -79,9 +80,45 @@ public class OverviewServiceImpl implements OverviewService {
|
|||||||
overviewVOS.add(overviewVO);
|
overviewVOS.add(overviewVO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//获取电压字典
|
||||||
|
List<DictData> voltageData = dicDataFeignClient.getDicDataByTypeCode(
|
||||||
|
DicDataTypeEnum.DEV_VOLTAGE.getCode()).getData();
|
||||||
|
//低压字典
|
||||||
|
List<String> lowPressure=new ArrayList<>();
|
||||||
|
//中压字典
|
||||||
|
List<String> inPressure=new ArrayList<>();
|
||||||
|
for (DictData voltageDatum : voltageData) {
|
||||||
|
if(DicDataEnum.AC_380V.getCode().equals( voltageDatum.getCode())&&"0.38".equals(voltageDatum.getValue())){
|
||||||
|
lowPressure.add(voltageDatum.getId());
|
||||||
|
}
|
||||||
|
if(DicDataEnum.DY_380V.getCode().equals( voltageDatum.getCode())&&"0.38".equals(voltageDatum.getValue())){
|
||||||
|
lowPressure.add(voltageDatum.getId());
|
||||||
|
}
|
||||||
|
if(DicDataEnum.DY_10KV.getCode().equals( voltageDatum.getCode())){
|
||||||
|
inPressure.add(voltageDatum.getId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//查询分布式光伏概览用户数量和装机容量
|
||||||
|
List<OverviewVO.PhotoVoltaicVoltage> voltageList = overviewMapper.selectPhotovoltaicUser(deptListCode, lowPressure, inPressure);
|
||||||
|
//光伏用户
|
||||||
|
OverviewVO.PhotovoltaicUser photovoltaicUser=new OverviewVO.PhotovoltaicUser();
|
||||||
|
//装机容量
|
||||||
|
OverviewVO.PhotovoltaicCapacity photovoltaicCapacity=new OverviewVO.PhotovoltaicCapacity();
|
||||||
|
for (OverviewVO.PhotoVoltaicVoltage value : voltageList) {
|
||||||
|
if("1".equals(value.getType())){
|
||||||
|
photovoltaicUser.setLowPressure(value.getNum());
|
||||||
|
photovoltaicCapacity.setLowCapacity(value.getCapacity());
|
||||||
|
}else{
|
||||||
|
photovoltaicUser.setHighPressure(value.getNum());
|
||||||
|
photovoltaicCapacity.setHighCapacity(value.getCapacity());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return overviewVOS;
|
vos.setMonitorObjects(overviewVOS);
|
||||||
|
vos.setPhotovoltaicUser(photovoltaicUser);
|
||||||
|
vos.setPhotovoltaicCapacity(photovoltaicCapacity);
|
||||||
|
}
|
||||||
|
return vos;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -220,7 +257,13 @@ public class OverviewServiceImpl implements OverviewService {
|
|||||||
if(deptMap.containsKey(alarmCountMVO.getOrgNo())){
|
if(deptMap.containsKey(alarmCountMVO.getOrgNo())){
|
||||||
alarmCountVO=new OverviewVO.AreaAlarmCountVO();
|
alarmCountVO=new OverviewVO.AreaAlarmCountVO();
|
||||||
String name = deptMap.get(alarmCountMVO.getOrgNo()).getName();
|
String name = deptMap.get(alarmCountMVO.getOrgNo()).getName();
|
||||||
alarmCountVO.setOrgName(name.replace("供电公司","市"));
|
|
||||||
|
String replace = name.replace("供电公司","");
|
||||||
|
if(XIONG_AN_CITY.equals(replace)){
|
||||||
|
alarmCountVO.setOrgName(XIONG_AN_CITY);
|
||||||
|
}else{
|
||||||
|
alarmCountVO.setOrgName(replace+"市");
|
||||||
|
}
|
||||||
alarmCountVO.setEventTypeGrade(alarmCountMVO.getEventTypeGrade());
|
alarmCountVO.setEventTypeGrade(alarmCountMVO.getEventTypeGrade());
|
||||||
alarmCountVO.setHarmonicTypeGrade(alarmCountMVO.getHarmonicTypeGrade());
|
alarmCountVO.setHarmonicTypeGrade(alarmCountMVO.getHarmonicTypeGrade());
|
||||||
alarmCountMVOS.add(alarmCountVO);
|
alarmCountMVOS.add(alarmCountVO);
|
||||||
@@ -230,12 +273,6 @@ public class OverviewServiceImpl implements OverviewService {
|
|||||||
return alarmCountMVOS;
|
return alarmCountMVOS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<OverviewVO.AlarmVO> getWorkOrder(OverviewParam.OverviewDateParam param) {
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 当前部门通用方法
|
* 当前部门通用方法
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ public class SpecialAnalysisServiceImpl implements SpecialAnalysisService {
|
|||||||
private final DeptFeignClient deptFeignClient;
|
private final DeptFeignClient deptFeignClient;
|
||||||
private final SpecialAnalysisMapper specialAnalysisMapper;
|
private final SpecialAnalysisMapper specialAnalysisMapper;
|
||||||
private final DicDataFeignClient dicDataFeignClient;
|
private final DicDataFeignClient dicDataFeignClient;
|
||||||
|
private static final String XIONG_AN_CITY="雄安新区";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SpecialAnalysisMonitorVO getMonitorList(SpecialAnalysisParam param) {
|
public SpecialAnalysisMonitorVO getMonitorList(SpecialAnalysisParam param) {
|
||||||
@@ -72,11 +73,19 @@ public class SpecialAnalysisServiceImpl implements SpecialAnalysisService {
|
|||||||
String name = voltageLevelMap.get(info.getVoltageLevel());
|
String name = voltageLevelMap.get(info.getVoltageLevel());
|
||||||
info.setVoltageLevel(name);
|
info.setVoltageLevel(name);
|
||||||
}
|
}
|
||||||
|
String replace = info.getOrgName().replace("供电公司本部","");
|
||||||
|
if(XIONG_AN_CITY.equals(replace)){
|
||||||
|
info.setOrgName(XIONG_AN_CITY);
|
||||||
|
}else{
|
||||||
|
info.setOrgName(replace+"市");
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
Map<String, List<SpecialAnalysisMonitorVO.SpecialAnalysisVO>> listMap =
|
Map<String, List<SpecialAnalysisMonitorVO.SpecialAnalysisVO>> listMap =
|
||||||
infoList.stream().collect(Collectors.groupingBy(r->
|
infoList.stream().collect(Collectors.groupingBy(r->
|
||||||
r.getOrgName().replace("供电公司","市")
|
r.getOrgName()
|
||||||
));
|
));
|
||||||
|
|
||||||
vo.setSpecialAnalysisVOList(listMap);
|
vo.setSpecialAnalysisVOList(listMap);
|
||||||
|
|
||||||
//2.根据电压等级分组显示数据
|
//2.根据电压等级分组显示数据
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>harmonic-prepare</artifactId>
|
<artifactId>harmonic-prepare</artifactId>
|
||||||
<packaging>jar</packaging>
|
|
||||||
<name>稳态预处理模块</name>
|
<name>稳态预处理模块</name>
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>8</maven.compiler.source>
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
@@ -194,7 +193,7 @@
|
|||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>build-image</id>
|
<id>build-image</id>
|
||||||
<phase>site</phase>
|
<phase>install</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>build</goal>
|
<goal>build</goal>
|
||||||
</goals>
|
</goals>
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package com.njcn.process.constant;
|
||||||
|
|
||||||
|
import com.google.common.collect.Maps;
|
||||||
|
import com.njcn.device.pq.pojo.po.DataV;
|
||||||
|
import org.springframework.cglib.beans.BeanMap;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2022/12/7 15:18【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public class Test {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
|
||||||
|
Map<String, Object> map = Maps.newHashMap ( );
|
||||||
|
DataV d = new DataV ( );
|
||||||
|
BeanMap beanMap = BeanMap.create (d);
|
||||||
|
for (Object key : beanMap.keySet ( )) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,94 @@
|
|||||||
|
package com.njcn.process.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2023/2/1 14:17【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 台区测点问题表
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value = "r_stat_distribution_problem")
|
||||||
|
public class RStatDistributionProblemPO {
|
||||||
|
/**
|
||||||
|
* 问题编号(有生成规则,看文档)
|
||||||
|
*/
|
||||||
|
@MppMultiId(value = "problem_no")
|
||||||
|
private String problemNo;
|
||||||
|
|
||||||
|
@TableField(value = "org_no")
|
||||||
|
private String orgNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问题类型(字典,两种类型:谐波电压越限、谐波电流越限)
|
||||||
|
*/
|
||||||
|
@TableField(value = "problem_type")
|
||||||
|
private String problemType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问题发生时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "occur_time")
|
||||||
|
private Date occurTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 台区ID
|
||||||
|
*/
|
||||||
|
@TableField(value = "distribution_id")
|
||||||
|
private String distributionId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最新超标时间(超标连续大于4小时)
|
||||||
|
*/
|
||||||
|
@TableField(value = "last_time")
|
||||||
|
private Date lastTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态(字典,两种类型:待审核/已审核)
|
||||||
|
*/
|
||||||
|
@TableField(value = "check_status")
|
||||||
|
private String checkStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核处理(字典,三种情况:“-”“生成工单”“无需处理”,待审核状态的审核结果为“-”,另外两种根据审核弹窗选择结果显示.这边字典存两个生成工单、无需处理,为空是替换成“-”)
|
||||||
|
*/
|
||||||
|
@TableField(value = "check_result")
|
||||||
|
private String checkResult;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问题处理时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "handle_time")
|
||||||
|
private Date handleTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点ID
|
||||||
|
*/
|
||||||
|
@TableField(value = "measurement_point_id")
|
||||||
|
private String measurementPointId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问题描述
|
||||||
|
*/
|
||||||
|
@TableField(value = "problem_describe")
|
||||||
|
private String problemDescribe;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 补充描述
|
||||||
|
*/
|
||||||
|
@TableField(value = "supply_describe")
|
||||||
|
private String supplyDescribe;
|
||||||
|
}
|
||||||
@@ -0,0 +1,194 @@
|
|||||||
|
package com.njcn.process.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2023/2/1 14:13【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单详情表
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value = "r_stat_work_order_detail")
|
||||||
|
public class RStatWorkOrderDetailPO {
|
||||||
|
/**
|
||||||
|
* 问题编号(台区测点问题表的problem_no)
|
||||||
|
*/
|
||||||
|
@MppMultiId(value = "problem_no")
|
||||||
|
private String problemNo;
|
||||||
|
@TableField(value = "org_no")
|
||||||
|
private String orgNo;
|
||||||
|
/**
|
||||||
|
* 工单状态(字典,待派单、已派单、已关闭)
|
||||||
|
*/
|
||||||
|
@TableField(value = "work_order_status")
|
||||||
|
private String workOrderStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单类型(字典,目前一个,整改单)
|
||||||
|
*/
|
||||||
|
@TableField(value = "work_order_type")
|
||||||
|
private String workOrderType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 一级业务类型(字典,目前一个,运检业务)
|
||||||
|
*/
|
||||||
|
@TableField(value = "primary_business_type")
|
||||||
|
private String primaryBusinessType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 二级业务类型(字典,两种类型:谐波电压越限、谐波电流越限)
|
||||||
|
*/
|
||||||
|
@TableField(value = "two_business_type")
|
||||||
|
private String twoBusinessType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供电所
|
||||||
|
*/
|
||||||
|
@TableField(value = "power_supply_station")
|
||||||
|
private String powerSupplyStation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单流程(字典,生成工单、派单、反馈、审核、整改、评估、归档,默认生成工单)
|
||||||
|
*/
|
||||||
|
@TableField(value = "work_order_process")
|
||||||
|
private String workOrderProcess;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 维护班组
|
||||||
|
*/
|
||||||
|
@TableField(value = "whbz")
|
||||||
|
private String whbz;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单负责人
|
||||||
|
*/
|
||||||
|
@TableField(value = "work_order_leader")
|
||||||
|
private String workOrderLeader;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单完成时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "work_order_over_time")
|
||||||
|
private Date workOrderOverTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 要求反馈时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "expect_ask_feedback_time")
|
||||||
|
private Date expectAskFeedbackTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接单人ID
|
||||||
|
*/
|
||||||
|
@TableField(value = "pick_up_person")
|
||||||
|
private String pickUpPerson;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下发时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "distribution_time")
|
||||||
|
private Date distributionTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预期到期时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "expiration_time")
|
||||||
|
private Date expirationTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联设备主人
|
||||||
|
*/
|
||||||
|
@TableField(value = "relation_device")
|
||||||
|
private String relationDevice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件
|
||||||
|
*/
|
||||||
|
@TableField(value = "enclosure")
|
||||||
|
private String enclosure;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 抄送
|
||||||
|
*/
|
||||||
|
@TableField(value = "copy_for")
|
||||||
|
private String copyFor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 反馈时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "ask_feedback_time")
|
||||||
|
private Date askFeedbackTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划完成时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "planned_completion_time")
|
||||||
|
private Date plannedCompletionTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原因反馈
|
||||||
|
*/
|
||||||
|
@TableField(value = "cause_feedback")
|
||||||
|
private String causeFeedback;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态(字典,两种类型:审核通过/审核不通过)
|
||||||
|
*/
|
||||||
|
@TableField(value = "check_status")
|
||||||
|
private String checkStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核意见(审核通过可为空,审核不通过时必填)
|
||||||
|
*/
|
||||||
|
@TableField(value = "check_comments")
|
||||||
|
private String checkComments;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划完成时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "rectify_complete_time")
|
||||||
|
private Date rectifyCompleteTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改人ID
|
||||||
|
*/
|
||||||
|
@TableField(value = "rectify_person")
|
||||||
|
private String rectifyPerson;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改描述
|
||||||
|
*/
|
||||||
|
@TableField(value = "rectify_describe")
|
||||||
|
private String rectifyDescribe;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评估完成时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "assess_complete_time")
|
||||||
|
private Date assessCompleteTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评估结果(字典,评估合格、评估不合格)
|
||||||
|
*/
|
||||||
|
@TableField(value = "assess_result")
|
||||||
|
private String assessResult;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评估描述
|
||||||
|
*/
|
||||||
|
@TableField(value = "assess_describe")
|
||||||
|
private String assessDescribe;
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package com.njcn.process.pojo.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 工单统计类
|
||||||
|
* @Param:
|
||||||
|
* @return:
|
||||||
|
* @Author: clam
|
||||||
|
* @Date: 2023/1/5
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OrderCountVO implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -8022287041427540079L;
|
||||||
|
|
||||||
|
@ApiModelProperty("单位id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty("工单数量")
|
||||||
|
private Integer orderCount;
|
||||||
|
|
||||||
|
@ApiModelProperty("已完成工单数量")
|
||||||
|
private Integer compelteOrderCount;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<parent>
|
|
||||||
<artifactId>pqs-process</artifactId>
|
|
||||||
<groupId>com.njcn</groupId>
|
|
||||||
<version>1.0.0</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<name>技术监督管理</name>
|
|
||||||
<artifactId>process-api</artifactId>
|
|
||||||
|
|
||||||
<properties>
|
|
||||||
<maven.compiler.source>8</maven.compiler.source>
|
|
||||||
<maven.compiler.target>8</maven.compiler.target>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.njcn</groupId>
|
|
||||||
<artifactId>common-core</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.njcn</groupId>
|
|
||||||
<artifactId>common-db</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.njcn</groupId>
|
|
||||||
<artifactId>common-microservice</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.njcn</groupId>
|
|
||||||
<artifactId>common-poi</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.github.jeffreyning</groupId>
|
|
||||||
<artifactId>mybatisplus-plus</artifactId>
|
|
||||||
<version>1.5.1-RELEASE</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</project>
|
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package com.njcn.process.controller;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
|
import com.njcn.common.pojo.constant.OperateType;
|
||||||
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
|
import com.njcn.process.pojo.vo.IssueesAndOrderVO;
|
||||||
|
import com.njcn.process.pojo.vo.OrderCountVO;
|
||||||
|
import com.njcn.process.service.RStatDistributionProblemService;
|
||||||
|
import com.njcn.web.controller.BaseController;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2023/2/1 16:33【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/rStatWorkOrder")
|
||||||
|
@Api(tags = "工单管理")
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class RStatWorkOrderController extends BaseController {
|
||||||
|
|
||||||
|
private final RStatDistributionProblemService rStatDistributionProblemService;
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.DELETE)
|
||||||
|
@PostMapping("/queryIssuesAndOrder")
|
||||||
|
@ApiOperation("查询问题及工单(当前部门下)")
|
||||||
|
@ApiImplicitParam(name = "orgNo", value = "部门id", required = true)
|
||||||
|
public HttpResult<IssueesAndOrderVO> queryIssuesAndOrder(@RequestParam("orgNo") String orgNo){
|
||||||
|
String methodDescribe = getMethodDescribe("queryIssuesAndOrder");
|
||||||
|
IssueesAndOrderVO issueesAndOrderVO =rStatDistributionProblemService.queryIssuesAndOrder(orgNo);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, issueesAndOrderVO, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.DELETE)
|
||||||
|
@PostMapping("/queryOrderDetail")
|
||||||
|
@ApiOperation("查询工单及工单总数及完成工单数量(当前部门下)")
|
||||||
|
@ApiImplicitParam(name = "orgNo", value = "部门id", required = true)
|
||||||
|
public HttpResult<OrderCountVO> queryOrderDetail(@RequestParam("orgNo") String orgNo){
|
||||||
|
String methodDescribe = getMethodDescribe("queryOrderDetail");
|
||||||
|
OrderCountVO orderCountVO =rStatDistributionProblemService.queryOrderCount(orgNo);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, orderCountVO, methodDescribe);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.njcn.process.mapper;
|
||||||
|
|
||||||
|
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||||
|
import com.njcn.process.pojo.po.RStatDistributionProblemPO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2023/2/1 14:17【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface RStatDistributionProblemMapper extends MppBaseMapper<RStatDistributionProblemPO> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.njcn.process.mapper;
|
||||||
|
|
||||||
|
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||||
|
import com.njcn.process.pojo.po.RStatWorkOrderDetailPO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2023/2/1 14:13【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface RStatWorkOrderDetailMapper extends MppBaseMapper<RStatWorkOrderDetailPO> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.njcn.process.mapper.RStatDistributionProblemMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.njcn.process.pojo.po.RStatDistributionProblemPO">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table r_stat_distribution_problem-->
|
||||||
|
<id column="problem_no" jdbcType="VARCHAR" property="problemNo" />
|
||||||
|
<result column="problem_type" jdbcType="VARCHAR" property="problemType" />
|
||||||
|
<result column="occur_time" jdbcType="TIMESTAMP" property="occurTime" />
|
||||||
|
<result column="distribution_id" jdbcType="VARCHAR" property="distributionId" />
|
||||||
|
<result column="last_time" jdbcType="TIMESTAMP" property="lastTime" />
|
||||||
|
<result column="check_status" jdbcType="VARCHAR" property="checkStatus" />
|
||||||
|
<result column="check_result" jdbcType="VARCHAR" property="checkResult" />
|
||||||
|
<result column="handle_time" jdbcType="TIMESTAMP" property="handleTime" />
|
||||||
|
<result column="measurement_point_id" jdbcType="VARCHAR" property="measurementPointId" />
|
||||||
|
<result column="problem_describe" jdbcType="VARCHAR" property="problemDescribe" />
|
||||||
|
<result column="supply_describe" jdbcType="VARCHAR" property="supplyDescribe" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
problem_no, problem_type, occur_time, distribution_id, last_time, check_status, check_result,
|
||||||
|
handle_time, measurement_point_id, problem_describe, supply_describe
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.njcn.process.mapper.RStatWorkOrderDetailMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.njcn.process.pojo.po.RStatWorkOrderDetailPO">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table r_stat_work_order_detail-->
|
||||||
|
<id column="problem_no" jdbcType="VARCHAR" property="problemNo" />
|
||||||
|
<result column="work_order_status" jdbcType="VARCHAR" property="workOrderStatus" />
|
||||||
|
<result column="work_order_type" jdbcType="VARCHAR" property="workOrderType" />
|
||||||
|
<result column="primary_business_type" jdbcType="VARCHAR" property="primaryBusinessType" />
|
||||||
|
<result column="two_business_type" jdbcType="VARCHAR" property="twoBusinessType" />
|
||||||
|
<result column="power_supply_station" jdbcType="VARCHAR" property="powerSupplyStation" />
|
||||||
|
<result column="work_order_process" jdbcType="VARCHAR" property="workOrderProcess" />
|
||||||
|
<result column="whbz" jdbcType="VARCHAR" property="whbz" />
|
||||||
|
<result column="work_order_leader" jdbcType="VARCHAR" property="workOrderLeader" />
|
||||||
|
<result column="work_order_over_time" jdbcType="TIMESTAMP" property="workOrderOverTime" />
|
||||||
|
<result column="expect_ask_feedback_time" jdbcType="TIMESTAMP" property="expectAskFeedbackTime" />
|
||||||
|
<result column="pick_up_person" jdbcType="VARCHAR" property="pickUpPerson" />
|
||||||
|
<result column="distribution_time" jdbcType="TIMESTAMP" property="distributionTime" />
|
||||||
|
<result column="expiration_time" jdbcType="TIMESTAMP" property="expirationTime" />
|
||||||
|
<result column="relation_device" jdbcType="VARCHAR" property="relationDevice" />
|
||||||
|
<result column="enclosure" jdbcType="VARCHAR" property="enclosure" />
|
||||||
|
<result column="copy_for" jdbcType="VARCHAR" property="copyFor" />
|
||||||
|
<result column="ask_feedback_time" jdbcType="TIMESTAMP" property="askFeedbackTime" />
|
||||||
|
<result column="planned_completion_time" jdbcType="TIMESTAMP" property="plannedCompletionTime" />
|
||||||
|
<result column="cause_feedback" jdbcType="VARCHAR" property="causeFeedback" />
|
||||||
|
<result column="check_status" jdbcType="VARCHAR" property="checkStatus" />
|
||||||
|
<result column="check_comments" jdbcType="VARCHAR" property="checkComments" />
|
||||||
|
<result column="rectify_complete_time" jdbcType="TIMESTAMP" property="rectifyCompleteTime" />
|
||||||
|
<result column="rectify_person" jdbcType="VARCHAR" property="rectifyPerson" />
|
||||||
|
<result column="rectify_describe" jdbcType="VARCHAR" property="rectifyDescribe" />
|
||||||
|
<result column="assess_complete_time" jdbcType="TIMESTAMP" property="assessCompleteTime" />
|
||||||
|
<result column="assess_result" jdbcType="VARCHAR" property="assessResult" />
|
||||||
|
<result column="assess_describe" jdbcType="VARCHAR" property="assessDescribe" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
problem_no, work_order_status, work_order_type, primary_business_type, two_business_type,
|
||||||
|
power_supply_station, work_order_process, whbz, work_order_leader, work_order_over_time,
|
||||||
|
expect_ask_feedback_time, pick_up_person, distribution_time, expiration_time, relation_device,
|
||||||
|
enclosure, copy_for, ask_feedback_time, planned_completion_time, cause_feedback,
|
||||||
|
check_status, check_comments, rectify_complete_time, rectify_person, rectify_describe,
|
||||||
|
assess_complete_time, assess_result, assess_describe
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package com.njcn.process.service;
|
||||||
|
|
||||||
|
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||||
|
import com.njcn.process.pojo.po.RStatDistributionProblemPO;
|
||||||
|
import com.njcn.process.pojo.vo.IssueesAndOrderVO;
|
||||||
|
import com.njcn.process.pojo.vo.OrderCountVO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2023/2/1 14:17【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface RStatDistributionProblemService extends IMppService<RStatDistributionProblemPO> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 查询问题及工单(当前部门下)
|
||||||
|
* @Param: [orgNo]
|
||||||
|
* @return: com.njcn.process.pojo.vo.IssueesAndOrderVO
|
||||||
|
* @Author: clam
|
||||||
|
* @Date: 2023/2/2
|
||||||
|
*/
|
||||||
|
IssueesAndOrderVO queryIssuesAndOrder(String orgNo);
|
||||||
|
/**
|
||||||
|
* @Description: 查询工单及工单总数及完成工单数量(当前部门下)
|
||||||
|
* @Param: [orgNo]
|
||||||
|
* @return: com.njcn.process.pojo.vo.OrderCountVO
|
||||||
|
* @Author: clam
|
||||||
|
* @Date: 2023/2/2
|
||||||
|
*/
|
||||||
|
OrderCountVO queryOrderCount(String orgNo);
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.njcn.process.service;
|
||||||
|
|
||||||
|
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||||
|
import com.njcn.process.pojo.po.RStatWorkOrderDetailPO;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2023/2/1 14:13【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface RStatWorkOrderDetailService extends IMppService<RStatWorkOrderDetailPO> {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
package com.njcn.process.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||||
|
import com.njcn.process.mapper.RStatDistributionProblemMapper;
|
||||||
|
import com.njcn.process.mapper.RStatWorkOrderDetailMapper;
|
||||||
|
import com.njcn.process.pojo.po.RStatDistributionProblemPO;
|
||||||
|
import com.njcn.process.pojo.po.RStatWorkOrderDetailPO;
|
||||||
|
import com.njcn.process.pojo.vo.IssueesAndOrderVO;
|
||||||
|
import com.njcn.process.pojo.vo.OrderCountVO;
|
||||||
|
import com.njcn.process.service.RStatDistributionProblemService;
|
||||||
|
import com.njcn.system.enums.DicDataEnum;
|
||||||
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2023/2/1 14:17【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class RStatDistributionProblemServiceImpl extends MppServiceImpl<RStatDistributionProblemMapper, RStatDistributionProblemPO> implements RStatDistributionProblemService{
|
||||||
|
|
||||||
|
|
||||||
|
private final DeptFeignClient deptFeignClient;
|
||||||
|
|
||||||
|
private final RStatDistributionProblemMapper rStatDistributionProblemMapper;
|
||||||
|
|
||||||
|
private final RStatWorkOrderDetailMapper rStatWorkOrderDetailMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param orgNo
|
||||||
|
* @Description: 查询问题及工单(当前部门下)
|
||||||
|
* @Param: [orgNo]
|
||||||
|
* @return: com.njcn.process.pojo.vo.IssueesAndOrderVO
|
||||||
|
* @Author: clam
|
||||||
|
* @Date: 2023/2/2
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public IssueesAndOrderVO queryIssuesAndOrder(String orgNo) {
|
||||||
|
IssueesAndOrderVO issueesAndOrderVO = new IssueesAndOrderVO();
|
||||||
|
|
||||||
|
List<String> deptIds = deptFeignClient.getDepSonIdtByDeptId(orgNo).getData();
|
||||||
|
/*问题个数*/
|
||||||
|
QueryWrapper<RStatDistributionProblemPO> problemPOQueryWrapper = new QueryWrapper<> ();
|
||||||
|
problemPOQueryWrapper.select ("problem_no").
|
||||||
|
in ("org_no",deptIds);
|
||||||
|
List<RStatDistributionProblemPO> rStatDistributionProblemPOS = rStatDistributionProblemMapper.selectList (problemPOQueryWrapper);
|
||||||
|
issueesAndOrderVO.setId (orgNo);
|
||||||
|
issueesAndOrderVO.setIssueesCount (rStatDistributionProblemPOS.size ());
|
||||||
|
List<String> problemNoList = rStatDistributionProblemPOS.stream ( ).map (RStatDistributionProblemPO::getProblemNo).collect (Collectors.toList ( ));
|
||||||
|
/*已关联工单数量*/
|
||||||
|
QueryWrapper<RStatWorkOrderDetailPO> workOrderDetailPOQueryWrapper = new QueryWrapper<> ();
|
||||||
|
workOrderDetailPOQueryWrapper.select ("1").
|
||||||
|
in("problem_no",problemNoList).
|
||||||
|
in ("org_no",deptIds);
|
||||||
|
Integer relatedOrderCount = rStatWorkOrderDetailMapper.selectCount (workOrderDetailPOQueryWrapper);
|
||||||
|
issueesAndOrderVO.setRelatedOrderCount (relatedOrderCount);
|
||||||
|
return issueesAndOrderVO;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param orgNo
|
||||||
|
* @Description: 查询工单及工单总数及完成工单数量(当前部门下)
|
||||||
|
* @Param: [orgNo]
|
||||||
|
* @return: com.njcn.process.pojo.vo.OrderCountVO
|
||||||
|
* @Author: clam
|
||||||
|
* @Date: 2023/2/2
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public OrderCountVO queryOrderCount(String orgNo) {
|
||||||
|
OrderCountVO orderCountVO = new OrderCountVO();
|
||||||
|
List<String> deptIds = deptFeignClient.getDepSonIdtByDeptId(orgNo).getData();
|
||||||
|
/*工单数量*/
|
||||||
|
QueryWrapper<RStatWorkOrderDetailPO> workOrderDetailPOQueryWrapper = new QueryWrapper<> ();
|
||||||
|
workOrderDetailPOQueryWrapper.
|
||||||
|
in ("org_no",deptIds);
|
||||||
|
List<RStatWorkOrderDetailPO> rStatWorkOrderDetailPOS = rStatWorkOrderDetailMapper.selectList (workOrderDetailPOQueryWrapper);
|
||||||
|
orderCountVO.setId (orgNo);
|
||||||
|
orderCountVO.setOrderCount (rStatWorkOrderDetailPOS.size ());
|
||||||
|
/*已完成工单数量*/
|
||||||
|
long count = rStatWorkOrderDetailPOS.stream ( ).filter (t -> Objects.equals (t.getWorkOrderStatus ( ), DicDataEnum.CLOSED.getCode ())).count ( );
|
||||||
|
orderCountVO.setCompelteOrderCount (Integer.valueOf (count+""));
|
||||||
|
return orderCountVO;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.njcn.process.service.impl;
|
||||||
|
|
||||||
|
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||||
|
import com.njcn.process.mapper.RStatWorkOrderDetailMapper;
|
||||||
|
import com.njcn.process.pojo.po.RStatWorkOrderDetailPO;
|
||||||
|
import com.njcn.process.service.RStatWorkOrderDetailService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
|
* Date: 2023/2/1 14:13【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class RStatWorkOrderDetailServiceImpl extends MppServiceImpl<RStatWorkOrderDetailMapper, RStatWorkOrderDetailPO> implements RStatWorkOrderDetailService{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -13,4 +13,8 @@ public interface DicDataConstant {
|
|||||||
String TWO_LINE = "Two_Line";
|
String TWO_LINE = "Two_Line";
|
||||||
String THREE_LINE ="Three_Line";
|
String THREE_LINE ="Three_Line";
|
||||||
|
|
||||||
|
|
||||||
|
String NAME_KEY = "DicCache:";
|
||||||
|
String SPLIT_SIGN = "-";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,78 @@
|
|||||||
|
package com.njcn.system.component;
|
||||||
|
|
||||||
|
import com.njcn.redis.utils.RedisUtil;
|
||||||
|
import com.njcn.system.api.DicDataFeignClient;
|
||||||
|
import com.njcn.system.enums.DicDataTypeEnum;
|
||||||
|
import com.njcn.system.pojo.po.DictData;
|
||||||
|
import com.njcn.system.service.IDictDataService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.data.redis.core.RedisTemplate;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import javax.annotation.PostConstruct;
|
||||||
|
import javax.annotation.PreDestroy;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import static com.njcn.system.pojo.constant.DicDataConstant.NAME_KEY;
|
||||||
|
import static com.njcn.system.pojo.constant.DicDataConstant.SPLIT_SIGN;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pqs
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @date 2023/2/6
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
@Slf4j
|
||||||
|
public class DictCacheRedis {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private @Autowired
|
||||||
|
IDictDataService dictDataService;
|
||||||
|
|
||||||
|
private @Autowired
|
||||||
|
RedisUtil redisUtil;
|
||||||
|
private @Autowired
|
||||||
|
RedisTemplate<String, Object> redisTemplate;
|
||||||
|
|
||||||
|
@PostConstruct
|
||||||
|
public void init(){
|
||||||
|
log.info("系统启动中。。。加载dictDataMap");
|
||||||
|
/*todo 后续将字典表全部加载*/
|
||||||
|
List<DictData> data = dictDataService.getDicDataByTypeCode (DicDataTypeEnum.LINE_STATE.getCode ( ));
|
||||||
|
List<DictData> data2 = dictDataService.getDicDataByTypeCode (DicDataTypeEnum.DEV_STATUS.getCode ( ));
|
||||||
|
List<DictData> data3 = dictDataService.getDicDataByTypeCode (DicDataTypeEnum.LINE_SORT.getCode ( ));
|
||||||
|
|
||||||
|
/*
|
||||||
|
* key:NAME_KEY前缀(清缓存使用)+SPLIT_SIGN(拼接符号)+DicDataTypeEnum+SPLIT_SIGN(拼接符号)+Code
|
||||||
|
* Value:id
|
||||||
|
* */
|
||||||
|
data.forEach (temp->{
|
||||||
|
redisUtil.saveByKey (NAME_KEY+ SPLIT_SIGN+DicDataTypeEnum.LINE_STATE.getCode ( )+SPLIT_SIGN+temp.getCode (),temp.getId ());
|
||||||
|
});
|
||||||
|
|
||||||
|
data2.forEach (temp->{
|
||||||
|
redisUtil.saveByKey (NAME_KEY+SPLIT_SIGN+DicDataTypeEnum.DEV_STATUS.getCode ( )+SPLIT_SIGN+temp.getCode (),temp.getId ());
|
||||||
|
});
|
||||||
|
|
||||||
|
data3.forEach (temp->{
|
||||||
|
redisUtil.saveByKey (NAME_KEY+SPLIT_SIGN+DicDataTypeEnum.LINE_SORT.getCode ( )+SPLIT_SIGN+temp.getCode (),temp.getId ());
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreDestroy
|
||||||
|
public void destroy(){
|
||||||
|
log.info("系统运行结束");
|
||||||
|
Set<String> keys = redisTemplate.keys(NAME_KEY + "*");
|
||||||
|
|
||||||
|
redisTemplate.delete(keys);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user