1.技术监督代码调整
2.国网对象类型统计 3.国网新能源场站代码提交
This commit is contained in:
@@ -82,6 +82,16 @@ public class LineDevGetDTO {
|
|||||||
*/
|
*/
|
||||||
private Integer isUpToGrid;
|
private Integer isUpToGrid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0.未上送 1.已上送 2.取消上送 3.待重新上送(用于典型负荷)
|
||||||
|
*/
|
||||||
|
private Integer isUploadHead;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0.未上送 1.已上送 2.取消上送 3.待重新上送(用于主网监测点)
|
||||||
|
*/
|
||||||
|
private Integer monitorUploadStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* oracle监测点id
|
* oracle监测点id
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -26,5 +26,7 @@ public class DeptGetLineParam {
|
|||||||
@ApiModelProperty(name = "systemType",value = "0.只返回主网的监测点信息; 1.只返回配网的监测点信息; null、2.返回主网配网两种监测点信息")
|
@ApiModelProperty(name = "systemType",value = "0.只返回主网的监测点信息; 1.只返回配网的监测点信息; null、2.返回主网配网两种监测点信息")
|
||||||
private Integer systemType;
|
private Integer systemType;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "monitorStateAll",value = "true.只返回在线监测点信息 false.返回全部监测点信息")
|
||||||
|
private Boolean monitorStateRunning=true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,6 +59,9 @@ public enum PmsDeviceResponseEnum {
|
|||||||
|
|
||||||
NO_ID_STATION("A00357","变电站编号为空"),
|
NO_ID_STATION("A00357","变电站编号为空"),
|
||||||
NO_ID_ORG("A00357","部门编号为空"),
|
NO_ID_ORG("A00357","部门编号为空"),
|
||||||
|
NE_ENERGY_ID("A003560","场站编号重复"),
|
||||||
|
MONITOR_NE_ENERGY_FIND("A00361","主网监测点存在绑定该场站信息关系,请先解除绑定关系"),
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,80 @@
|
|||||||
|
package com.njcn.device.pms.pojo.param;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import com.njcn.web.pojo.param.BaseParam;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.*;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pqs
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @date 2023/2/20
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class NewEnergyQueryParam extends BaseParam {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "单位id")
|
||||||
|
private String orgId;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class Info {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@TableId("Id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "对象类型不能为空")
|
||||||
|
@TableField("Obj_Name")
|
||||||
|
private String objName;
|
||||||
|
/**
|
||||||
|
* 组织机构名称
|
||||||
|
*/
|
||||||
|
@TableField("Org_Name")
|
||||||
|
private String orgName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织机构ID(外键)
|
||||||
|
*/
|
||||||
|
@TableField("Org_Id")
|
||||||
|
private String orgId;
|
||||||
|
/**
|
||||||
|
* 电压等级
|
||||||
|
*/
|
||||||
|
@TableField("voltage_Level")
|
||||||
|
private String voltageLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压等级
|
||||||
|
*/
|
||||||
|
@TableField("Powerr_Name")
|
||||||
|
private String powerrName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检测点对象类型(字典)
|
||||||
|
*/
|
||||||
|
@TableField("Obj_Type")
|
||||||
|
private String objType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压等级
|
||||||
|
*/
|
||||||
|
@TableField("station_status")
|
||||||
|
private String stationStatus;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
package com.njcn.device.pms.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author wr
|
||||||
|
* @since 2024-03-26
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@TableName("pms_new_energy")
|
||||||
|
public class PmsNewEnergy extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@TableId("Id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
@TableField("Obj_Name")
|
||||||
|
private String objName;
|
||||||
|
/**
|
||||||
|
* 组织机构名称
|
||||||
|
*/
|
||||||
|
@TableField("Org_Name")
|
||||||
|
private String orgName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织机构ID(外键)
|
||||||
|
*/
|
||||||
|
@TableField("Org_Id")
|
||||||
|
private String orgId;
|
||||||
|
/**
|
||||||
|
* 电压等级
|
||||||
|
*/
|
||||||
|
@TableField("voltage_Level")
|
||||||
|
private String voltageLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压等级
|
||||||
|
*/
|
||||||
|
@TableField("Powerr_Name")
|
||||||
|
private String powerrName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检测点对象类型(字典)
|
||||||
|
*/
|
||||||
|
@TableField("Obj_Type")
|
||||||
|
private String objType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压等级
|
||||||
|
*/
|
||||||
|
@TableField("station_status")
|
||||||
|
private String stationStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态:0-删除 1-正常
|
||||||
|
*/
|
||||||
|
@TableField("State")
|
||||||
|
private Integer state;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package com.njcn.device.pms.pojo.vo.gw;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wr
|
||||||
|
* @description
|
||||||
|
* @date 2024/3/22 11:05
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MonitorEnergy {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "部门名称")
|
||||||
|
private String orgName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "监测点信息")
|
||||||
|
List<Details> info;
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class Details {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "对象类型")
|
||||||
|
private String objType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "接入线路电压等级为110kV及以上变电站数量(座)")
|
||||||
|
private String num;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "接入线路电压等级为110kV及以上变电站数量(座)")
|
||||||
|
List<VoltageInfo> voltageInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class VoltageInfo {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "已监测数量")
|
||||||
|
private Integer monitorNum;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "新能源场站总数")
|
||||||
|
private Integer totalNum;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "监测率")
|
||||||
|
private Float monitorRate;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "装置数量(台)")
|
||||||
|
private Integer deviceNum;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "覆盖变电站数量(座)")
|
||||||
|
private Integer substationsNum;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "电站覆盖率(%)")
|
||||||
|
private Float substationsRate;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package com.njcn.device.pms.controller.gwPush;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
|
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.device.pms.service.gwPush.MonitorStatisticsService;
|
||||||
|
import com.njcn.web.controller.BaseController;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/monitorStatistics")
|
||||||
|
@Api(tags = "台账类国网上送监测点统计")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class MonitorStatisticsController extends BaseController {
|
||||||
|
|
||||||
|
private final MonitorStatisticsService monitorStatisticsService;
|
||||||
|
|
||||||
|
@PostMapping("/objType")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@ApiOperation("国网上送接口")
|
||||||
|
public HttpResult< List<List<String>>> objType(String deptId){
|
||||||
|
String methodDescribe = getMethodDescribe("objType");
|
||||||
|
List<List<String>> gwMonitorStatistics = monitorStatisticsService.getGwMonitorStatistics(deptId);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, gwMonitorStatistics, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,116 @@
|
|||||||
|
package com.njcn.device.pms.controller.ledgerManger;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
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.device.pms.pojo.param.NewEnergyQueryParam;
|
||||||
|
import com.njcn.device.pms.pojo.po.PmsNewEnergy;
|
||||||
|
import com.njcn.device.pms.service.gwPush.IPmsNewEnergyService;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import com.njcn.web.controller.BaseController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 前端控制器
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author wr
|
||||||
|
* @since 2024-03-26
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/pmsNewEnergy")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class PmsNewEnergyController extends BaseController {
|
||||||
|
|
||||||
|
private final IPmsNewEnergyService newEnergyService;
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("getNewEnergyList")
|
||||||
|
@ApiOperation("分页场站台账所有信息")
|
||||||
|
@ApiImplicitParam(name = "baseParam",value = "查询监测终端台账信息",required = true)
|
||||||
|
public HttpResult<Page<PmsNewEnergy>> getNewEnergyList(@RequestBody @Validated NewEnergyQueryParam baseParam){
|
||||||
|
String methodDescribe = getMethodDescribe("getNewEnergyList");
|
||||||
|
Page<PmsNewEnergy> res = newEnergyService.getNewEnergyList(baseParam);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,res,methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("getNewEnergySelectList")
|
||||||
|
@ApiOperation("查询场站台账所有信息")
|
||||||
|
public HttpResult<List<PmsNewEnergy>> getNewEnergySelectList(String orgId){
|
||||||
|
String methodDescribe = getMethodDescribe("getNewEnergySelectList");
|
||||||
|
List<PmsNewEnergy> res = newEnergyService.getNewEnergySelectList(orgId);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,res,methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增监测终端台账信息
|
||||||
|
* @author hany
|
||||||
|
* @date 2022/10/26
|
||||||
|
*/
|
||||||
|
@PostMapping("/addNewEnergy")
|
||||||
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON,operateType= OperateType.ADD)
|
||||||
|
@ApiOperation("新增监测终端台账信息")
|
||||||
|
@ApiImplicitParam(name = "param", value = "新增实体", required = true)
|
||||||
|
public HttpResult<Object> add(@RequestBody @Validated NewEnergyQueryParam.Info param){
|
||||||
|
String methodDescribe = getMethodDescribe("add");
|
||||||
|
boolean result = newEnergyService.add(param);
|
||||||
|
if (result) {
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
} else {
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改监测终端台账信息
|
||||||
|
* @author hany
|
||||||
|
* @date 2022/10/27
|
||||||
|
*/
|
||||||
|
@PostMapping("/updateNewEnergy")
|
||||||
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON,operateType = OperateType.UPDATE)
|
||||||
|
@ApiOperation("修改监测终端台账信息")
|
||||||
|
@ApiImplicitParam(name = "updateParam", value = "更新实体", required = true)
|
||||||
|
public HttpResult<Object> update(@RequestBody @Validated NewEnergyQueryParam.Info updateParam){
|
||||||
|
String methodDescribe = getMethodDescribe("update");
|
||||||
|
boolean result = newEnergyService.update(updateParam);
|
||||||
|
if (result) {
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
} else {
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除监测终端台账信息
|
||||||
|
* @param ids id
|
||||||
|
* @author hany
|
||||||
|
* @date 2022/10/27
|
||||||
|
*/
|
||||||
|
@PostMapping("/deleteNewEnergy")
|
||||||
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.DELETE)
|
||||||
|
@ApiOperation("删除监测终端台账信息")
|
||||||
|
@ApiImplicitParam(name = "ids", value = "ID索引", required = true)
|
||||||
|
public HttpResult<Object> delete(@RequestBody List<String> ids){
|
||||||
|
String methodDescribe = getMethodDescribe("delete");
|
||||||
|
boolean result = newEnergyService.delete(ids);
|
||||||
|
if(result){
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}else {
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.njcn.device.pms.mapper.majornetwork;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.device.pms.pojo.po.PmsNewEnergy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author wr
|
||||||
|
* @since 2024-03-26
|
||||||
|
*/
|
||||||
|
public interface PmsNewEnergyMapper extends BaseMapper<PmsNewEnergy> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -22,7 +22,8 @@ public interface SpecialAnalysisMapper {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<SpecialAnalysisMonitorVO.SpecialAnalysisVO> selectList(@Param("deptIdList") List<String> deptIdList,
|
List<SpecialAnalysisMonitorVO.SpecialAnalysisVO> selectList(@Param("deptIdList") List<String> deptIdList,
|
||||||
@Param("monitorTags") String monitorTags);
|
@Param("monitorTags") String monitorTags,
|
||||||
|
@Param("status") String status);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 同比环比数据(风电场,光伏电站,冶炼负荷)
|
* 同比环比数据(风电场,光伏电站,冶炼负荷)
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
1 as Status,
|
1 as Status,
|
||||||
now() as Create_Time,
|
now() as Create_Time,
|
||||||
now() as Update_Time,
|
now() as Update_Time,
|
||||||
Line_Id as Statistical_Interval,
|
Line_Id as Line_Id,
|
||||||
15 as Statistical_Interval,
|
15 as Statistical_Interval,
|
||||||
Power_Station_Id as Power_Station_Id
|
Power_Station_Id as Power_Station_Id
|
||||||
from
|
from
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<?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.device.pms.mapper.majornetwork.PmsNewEnergyMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -22,6 +22,7 @@
|
|||||||
<where>
|
<where>
|
||||||
pm.`Status` = 1
|
pm.`Status` = 1
|
||||||
AND ps.`Status` = 1
|
AND ps.`Status` = 1
|
||||||
|
AND pm.`Monitor_State` = #{status}
|
||||||
<if test="deptIdList != null and deptIdList.size > 0">
|
<if test="deptIdList != null and deptIdList.size > 0">
|
||||||
AND pm.Org_Id IN
|
AND pm.Org_Id IN
|
||||||
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package com.njcn.device.pms.service.gwPush;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.njcn.device.pms.pojo.param.NewEnergyQueryParam;
|
||||||
|
import com.njcn.device.pms.pojo.param.PmsBaseParam;
|
||||||
|
import com.njcn.device.pms.pojo.po.PmsNewEnergy;
|
||||||
|
import com.njcn.web.pojo.param.BaseParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author wr
|
||||||
|
* @since 2024-03-26
|
||||||
|
*/
|
||||||
|
public interface IPmsNewEnergyService extends IService<PmsNewEnergy> {
|
||||||
|
/**
|
||||||
|
* 分页查询所有
|
||||||
|
* @return Page<PmsNewEnergy>
|
||||||
|
*/
|
||||||
|
Page<PmsNewEnergy> getNewEnergyList(NewEnergyQueryParam baseParam);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有
|
||||||
|
* @param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<PmsNewEnergy> getNewEnergySelectList(String orgId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*/
|
||||||
|
boolean add(NewEnergyQueryParam.Info param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
* @param
|
||||||
|
*/
|
||||||
|
boolean update(NewEnergyQueryParam.Info updateParam);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
* @param ids ids
|
||||||
|
*/
|
||||||
|
boolean delete(List<String> ids);
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.njcn.device.pms.service.gwPush;
|
||||||
|
|
||||||
|
import com.njcn.device.pms.pojo.vo.gw.MonitorEnergy;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国网台账类上送
|
||||||
|
*/
|
||||||
|
public interface MonitorStatisticsService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 国网上送统计类型数量统计
|
||||||
|
* @Author: wr
|
||||||
|
* @Date: 2024/3/22 9:49
|
||||||
|
*/
|
||||||
|
List<List<String>> getGwMonitorStatistics(String deptId);
|
||||||
|
}
|
||||||
@@ -0,0 +1,143 @@
|
|||||||
|
package com.njcn.device.pms.service.gwPush.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
|
import com.njcn.device.biz.pojo.dto.DeptGetChildrenMoreDTO;
|
||||||
|
import com.njcn.device.biz.pojo.dto.LineDevGetDTO;
|
||||||
|
import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
||||||
|
import com.njcn.device.pms.service.gwPush.MonitorStatisticsService;
|
||||||
|
import com.njcn.device.pms.service.ledgerManger.CommTerminalService;
|
||||||
|
import com.njcn.system.api.DictTreeFeignClient;
|
||||||
|
import com.njcn.system.enums.DicDataTypeEnum;
|
||||||
|
import com.njcn.system.enums.DicTreeEnum;
|
||||||
|
import com.njcn.system.pojo.po.SysDicTreePO;
|
||||||
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
|
import com.njcn.user.pojo.po.Dept;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pqs
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @date 2023/12/11
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class MonitorStatisticsServiceImpl implements MonitorStatisticsService {
|
||||||
|
|
||||||
|
private final CommTerminalService commTerminalService;
|
||||||
|
private final DictTreeFeignClient dictTreeFeignClient;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<List<String>> getGwMonitorStatistics(String deptId) {
|
||||||
|
List<List<String>> info = new ArrayList<>();
|
||||||
|
//查询所有一级树字典
|
||||||
|
List<SysDicTreePO> sysDicTreePOList = dictTreeFeignClient.queryAll().getData();
|
||||||
|
|
||||||
|
//监测点大类
|
||||||
|
List<SysDicTreePO> broadCategory = sysDicTreePOList.stream()
|
||||||
|
.filter(item -> Objects.equals(item.getPid(), "0"))
|
||||||
|
.filter(item -> !Objects.equals(item.getCode(), DicDataTypeEnum.DEVICE_UNIT.getCode()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
broadCategory.sort(Comparator.comparing(SysDicTreePO::getSort));
|
||||||
|
|
||||||
|
List<String> list = new ArrayList<>();
|
||||||
|
list.add("");
|
||||||
|
List<String> collect = broadCategory.stream().map(SysDicTreePO::getName).collect(Collectors.toList());
|
||||||
|
list.addAll(collect);
|
||||||
|
list.add("合计");
|
||||||
|
//获取主网监测统计
|
||||||
|
Map<String, List<String>> metWorkMap = mapDicIds(broadCategory, sysDicTreePOList);
|
||||||
|
|
||||||
|
//筛选典型源荷统计
|
||||||
|
List<SysDicTreePO> sourceLoad = sysDicTreePOList.stream().filter(item ->
|
||||||
|
Objects.equals(DicTreeEnum.Power_Station.getCode(), item.getCode()) ||
|
||||||
|
Objects.equals(DicTreeEnum.Ele_Railways.getCode(), item.getCode()) ||
|
||||||
|
Objects.equals(DicTreeEnum.Wind_Farms.getCode(), item.getCode()) ||
|
||||||
|
Objects.equals(DicTreeEnum.Imp_Users.getCode(), item.getCode())
|
||||||
|
).collect(Collectors.toList());
|
||||||
|
sourceLoad.sort(Comparator.comparing(SysDicTreePO::getSort));
|
||||||
|
//获取典型源荷监测统计
|
||||||
|
Map<String, List<String>> sourceLoadMap = mapDicIds(sourceLoad, sysDicTreePOList);
|
||||||
|
list.addAll(sourceLoad.stream().map(SysDicTreePO::getName).collect(Collectors.toList()));
|
||||||
|
list.add("其他");
|
||||||
|
list.add("合计");
|
||||||
|
info.add(list);
|
||||||
|
//筛选出国网统计信息
|
||||||
|
DeptGetLineParam deptGetLineParam = new DeptGetLineParam();
|
||||||
|
deptGetLineParam.setDeptId(deptId);
|
||||||
|
deptGetLineParam.setMonitorStateRunning(false);
|
||||||
|
List<DeptGetChildrenMoreDTO> deptGetChildrenMoreDTOS = commTerminalService.deptGetLine(deptGetLineParam);
|
||||||
|
//部门信息循环
|
||||||
|
List<String> line;
|
||||||
|
for (DeptGetChildrenMoreDTO deptMonitor : deptGetChildrenMoreDTOS) {
|
||||||
|
line = new ArrayList<>();
|
||||||
|
line.add(deptMonitor.getUnitName());
|
||||||
|
List<LineDevGetDTO> lineBaseList = deptMonitor.getLineBaseList();
|
||||||
|
if(CollUtil.isEmpty(lineBaseList)){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
List<LineDevGetDTO> upToGridList = lineBaseList.stream().filter(item -> Objects.equals(item.getIsUpToGrid(), DataStateEnum.ENABLE.getCode()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
addmetWorkList(metWorkMap, upToGridList, line);
|
||||||
|
addSourceLoadList(sourceLoadMap, upToGridList, line);
|
||||||
|
info.add(line);
|
||||||
|
}
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<String> addmetWorkList(Map<String, List<String>> mapSourceLoad, List<LineDevGetDTO> upToGridList, List<String> line) {
|
||||||
|
long total = 0;
|
||||||
|
for (String s : mapSourceLoad.keySet()) {
|
||||||
|
List<String> value = mapSourceLoad.get(s);
|
||||||
|
long monitorCount = upToGridList.stream().filter(item -> value.contains(item.getObjType()) &&
|
||||||
|
Objects.equals(item.getMonitorUploadStatus(), DataStateEnum.ENABLE.getCode())
|
||||||
|
).map(LineDevGetDTO::getPointId).count();
|
||||||
|
total += monitorCount;
|
||||||
|
line.add(String.valueOf(monitorCount));
|
||||||
|
}
|
||||||
|
line.add(String.valueOf(total));
|
||||||
|
return line;
|
||||||
|
}
|
||||||
|
private List<String> addSourceLoadList(Map<String, List<String>> mapSourceLoad, List<LineDevGetDTO> upToGridList, List<String> line) {
|
||||||
|
long total = 0;
|
||||||
|
for (String s : mapSourceLoad.keySet()) {
|
||||||
|
List<String> value = mapSourceLoad.get(s);
|
||||||
|
long monitorCount = upToGridList.stream().filter(item -> value.contains(item.getObjType()) &&
|
||||||
|
Objects.equals(item.getIsUploadHead(), DataStateEnum.ENABLE.getCode())
|
||||||
|
).map(LineDevGetDTO::getPointId).count();
|
||||||
|
total += monitorCount;
|
||||||
|
line.add(String.valueOf(monitorCount));
|
||||||
|
}
|
||||||
|
List<String> sourceLoad = mapSourceLoad.values().stream().flatMap(list -> list.stream()).distinct().collect(Collectors.toList());
|
||||||
|
long count = upToGridList.stream().filter(item -> !sourceLoad.contains(item.getObjType()) &&
|
||||||
|
Objects.equals(item.getIsUploadHead(), DataStateEnum.ENABLE.getCode())
|
||||||
|
).map(LineDevGetDTO::getPointId).count();
|
||||||
|
line.add(String.valueOf(count));
|
||||||
|
total += count;
|
||||||
|
line.add(String.valueOf(total));
|
||||||
|
return line;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param objType 监测点对象类型大类
|
||||||
|
* @param objTypeAll 监测点所有对象类型
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private Map<String, List<String>> mapDicIds(List<SysDicTreePO> objType, List<SysDicTreePO> objTypeAll) {
|
||||||
|
Map<String, List<String>> mapKey = new LinkedHashMap<>();
|
||||||
|
for(SysDicTreePO load : objType){
|
||||||
|
List<String> ids = objTypeAll.stream().filter(item -> item.getPid().equals(load.getId()) ||
|
||||||
|
item.getId().equals(load.getId())
|
||||||
|
).map(SysDicTreePO::getId).collect(Collectors.toList());;
|
||||||
|
mapKey.put(load.getCode(), ids);
|
||||||
|
}
|
||||||
|
return mapKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,141 @@
|
|||||||
|
package com.njcn.device.pms.service.gwPush.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.device.pms.enums.PmsDeviceResponseEnum;
|
||||||
|
import com.njcn.device.pms.mapper.majornetwork.PmsNewEnergyMapper;
|
||||||
|
import com.njcn.device.pms.pojo.param.NewEnergyQueryParam;
|
||||||
|
import com.njcn.device.pms.pojo.po.*;
|
||||||
|
import com.njcn.device.pms.service.gwPush.IPmsNewEnergyService;
|
||||||
|
import com.njcn.device.pms.service.majornetwork.IMonitorService;
|
||||||
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
|
import com.njcn.web.factory.PageFactory;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author wr
|
||||||
|
* @since 2024-03-26
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class PmsNewEnergyServiceImpl extends ServiceImpl<PmsNewEnergyMapper, PmsNewEnergy> implements IPmsNewEnergyService {
|
||||||
|
|
||||||
|
private final DeptFeignClient deptFeignClient;
|
||||||
|
private final IMonitorService monitorService;
|
||||||
|
@Override
|
||||||
|
public Page<PmsNewEnergy> getNewEnergyList(NewEnergyQueryParam baseParam) {
|
||||||
|
List<String> orgIds = new ArrayList<>();
|
||||||
|
if(StrUtil.isNotBlank(baseParam.getOrgId())){
|
||||||
|
orgIds.addAll(deptFeignClient.getDepSonSelfCodetByDeptId(baseParam.getOrgId()).getData());
|
||||||
|
}
|
||||||
|
|
||||||
|
LambdaQueryWrapper<PmsNewEnergy> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.eq(PmsNewEnergy::getState,DataStateEnum.ENABLE.getCode())
|
||||||
|
.in(CollUtil.isNotEmpty(orgIds),PmsNewEnergy::getOrgId,orgIds);
|
||||||
|
if(StrUtil.isNotBlank(baseParam.getSearchValue())) {
|
||||||
|
lambdaQueryWrapper.and(i -> i.like(PmsNewEnergy::getObjName, baseParam.getSearchValue())
|
||||||
|
.or()
|
||||||
|
.like(PmsNewEnergy::getOrgName, baseParam.getSearchValue())
|
||||||
|
.or()
|
||||||
|
.like(PmsNewEnergy::getPowerrName, baseParam.getSearchValue()));
|
||||||
|
}
|
||||||
|
lambdaQueryWrapper.orderByDesc(PmsNewEnergy::getCreateTime);
|
||||||
|
//初始化分页数据
|
||||||
|
return this.page(new Page<>(PageFactory.getPageNum(baseParam), PageFactory.getPageSize(baseParam)), lambdaQueryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PmsNewEnergy> getNewEnergySelectList(String orgId) {
|
||||||
|
LambdaQueryWrapper<PmsNewEnergy> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.eq(PmsNewEnergy::getState,DataStateEnum.ENABLE.getCode());
|
||||||
|
if(StrUtil.isNotBlank(orgId)){
|
||||||
|
List<String> deptCodes = deptFeignClient.getDepSonSelfCodetByDeptId(orgId).getData();
|
||||||
|
lambdaQueryWrapper.in(PmsNewEnergy::getOrgId,deptCodes);
|
||||||
|
}
|
||||||
|
return this.list(lambdaQueryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean add(NewEnergyQueryParam.Info param) {
|
||||||
|
List<PmsNewEnergy> list = this.list(new LambdaQueryWrapper<PmsNewEnergy>()
|
||||||
|
.eq(PmsNewEnergy::getState,DataStateEnum.ENABLE.getCode())
|
||||||
|
.eq(PmsNewEnergy::getId, param.getId())
|
||||||
|
.or(wrapper ->
|
||||||
|
wrapper.eq(PmsNewEnergy::getObjName, param.getOrgName())
|
||||||
|
)
|
||||||
|
);
|
||||||
|
if (CollectionUtil.isNotEmpty(list)) {
|
||||||
|
List<String> collect = list.stream().map(PmsNewEnergy::getObjName).collect(Collectors.toList());
|
||||||
|
if(collect.contains(param.getObjName())){
|
||||||
|
throw new BusinessException(PmsDeviceResponseEnum.MODEL_NAME_REPEAT);
|
||||||
|
}
|
||||||
|
throw new BusinessException(PmsDeviceResponseEnum.NE_ENERGY_ID);
|
||||||
|
}
|
||||||
|
PmsNewEnergy pmsNewEnergy = new PmsNewEnergy();
|
||||||
|
BeanUtils.copyProperties(param, pmsNewEnergy);
|
||||||
|
return this.save(pmsNewEnergy);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改监测终端台账
|
||||||
|
* @author hany
|
||||||
|
* @date 2022/10/27
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean update(NewEnergyQueryParam.Info param) {
|
||||||
|
List<PmsNewEnergy> list = this.list(new LambdaQueryWrapper<PmsNewEnergy>()
|
||||||
|
.eq(PmsNewEnergy::getState,DataStateEnum.ENABLE.getCode())
|
||||||
|
.ne(PmsNewEnergy::getId, param.getId())
|
||||||
|
.and(wrapper ->
|
||||||
|
wrapper.eq(PmsNewEnergy::getObjName, param.getObjName())
|
||||||
|
)
|
||||||
|
);
|
||||||
|
if (CollectionUtil.isNotEmpty(list)) {
|
||||||
|
List<String> collect = list.stream().map(PmsNewEnergy::getObjName).collect(Collectors.toList());
|
||||||
|
if(collect.contains(param.getObjName())){
|
||||||
|
throw new BusinessException(PmsDeviceResponseEnum.MODEL_NAME_REPEAT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
PmsNewEnergy pmsNewEnergy = BeanUtil.copyProperties(param, PmsNewEnergy.class);
|
||||||
|
return this.updateById(pmsNewEnergy);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
* @param ids
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean delete(List<String> ids) {
|
||||||
|
//删除前需要判断依赖终端的监测点是否存在
|
||||||
|
LambdaQueryWrapper<Monitor> monitorLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
monitorLambdaQueryWrapper.in(Monitor::getTractionId,ids).eq(Monitor::getStatus,DataStateEnum.ENABLE.getCode());
|
||||||
|
int mCount = monitorService.count(monitorLambdaQueryWrapper);
|
||||||
|
if(mCount>0){
|
||||||
|
throw new BusinessException(PmsDeviceResponseEnum.MONITOR_NE_ENERGY_FIND);
|
||||||
|
}
|
||||||
|
return this.update(new LambdaUpdateWrapper<PmsNewEnergy>()
|
||||||
|
.set(PmsNewEnergy::getState, DataStateEnum.DELETED.getCode())
|
||||||
|
.in(PmsNewEnergy::getId, ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -129,7 +129,9 @@ public class CommTerminalServiceImpl implements CommTerminalService {
|
|||||||
|
|
||||||
Map<String, List<Monitor>> map = new HashMap<>();
|
Map<String, List<Monitor>> map = new HashMap<>();
|
||||||
if (deptGetLineParam.getSystemType() == 0 || deptGetLineParam.getSystemType() == 2) {
|
if (deptGetLineParam.getSystemType() == 0 || deptGetLineParam.getSystemType() == 2) {
|
||||||
List<Monitor> monitorList = monitorMapper.selectList(new LambdaQueryWrapper<Monitor>().eq(Monitor::getStatus, 1).eq(Monitor::getMonitorState, dictData.getId()));
|
List<Monitor> monitorList = monitorMapper.selectList(new LambdaQueryWrapper<Monitor>()
|
||||||
|
.eq(Monitor::getStatus, 1)
|
||||||
|
.eq(deptGetLineParam.getMonitorStateRunning(),Monitor::getMonitorState, dictData.getId()));
|
||||||
map = monitorList.stream().collect(Collectors.groupingBy(Monitor::getOrgId));
|
map = monitorList.stream().collect(Collectors.groupingBy(Monitor::getOrgId));
|
||||||
}
|
}
|
||||||
//TODO 配网数据量巨大,暂时注释
|
//TODO 配网数据量巨大,暂时注释
|
||||||
@@ -168,6 +170,8 @@ public class CommTerminalServiceImpl implements CommTerminalService {
|
|||||||
//预处理模块需要的id修改value为id
|
//预处理模块需要的id修改value为id
|
||||||
lineDevGetDTO.setVoltageLevel(it.getVoltageLevel());
|
lineDevGetDTO.setVoltageLevel(it.getVoltageLevel());
|
||||||
lineDevGetDTO.setIsUpToGrid(it.getIsUpToGrid());
|
lineDevGetDTO.setIsUpToGrid(it.getIsUpToGrid());
|
||||||
|
lineDevGetDTO.setIsUploadHead(it.getIsUploadHead());
|
||||||
|
lineDevGetDTO.setMonitorUploadStatus(it.getMonitorUploadStatus());
|
||||||
lineList.add(lineDevGetDTO);
|
lineList.add(lineDevGetDTO);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,8 +83,11 @@ public class PowerDistributionareaServiceImpl extends ServiceImpl<PowerDistribut
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<PowerDistributionarea> getList(BaseParam baseParam) {
|
public Page<PowerDistributionarea> getList(BaseParam baseParam) {
|
||||||
|
List<Dept> deptInfo = deptFeignClient.getAllDept().getData();
|
||||||
|
List<String> deptIds = deptInfo.stream().map(Dept::getCode).collect(Collectors.toList());
|
||||||
LambdaQueryWrapper<PowerDistributionarea> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<PowerDistributionarea> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
lambdaQueryWrapper.eq(PowerDistributionarea::getStatus,DataStateEnum.ENABLE.getCode())
|
lambdaQueryWrapper.eq(PowerDistributionarea::getStatus,DataStateEnum.ENABLE.getCode())
|
||||||
|
.in(CollUtil.isNotEmpty(deptIds),PowerDistributionarea::getOrgId,deptIds)
|
||||||
.and(StrUtil.isNotBlank(baseParam.getSearchValue()),
|
.and(StrUtil.isNotBlank(baseParam.getSearchValue()),
|
||||||
i->i.like(PowerDistributionarea::getName,baseParam.getSearchValue())
|
i->i.like(PowerDistributionarea::getName,baseParam.getSearchValue())
|
||||||
.or()
|
.or()
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class SpecialAnalysisServiceImpl implements SpecialAnalysisService {
|
|||||||
List<DictData> voltageLevelList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE.getCode()).getData();
|
List<DictData> voltageLevelList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE.getCode()).getData();
|
||||||
//将电压信息转成map,key:id value:name
|
//将电压信息转成map,key:id value:name
|
||||||
Map<String, String> voltageLevelMap = voltageLevelList.stream().collect(Collectors.toMap(DictData::getId, DictData::getName));
|
Map<String, String> voltageLevelMap = voltageLevelList.stream().collect(Collectors.toMap(DictData::getId, DictData::getName));
|
||||||
|
DictData dictData = dicDataFeignClient.getDicDataByNameAndTypeName(DicDataTypeEnum.LINE_STATE.getName(), DicDataEnum.RUN.getName()).getData();
|
||||||
//专项分析-只是统计当前所在部门及下部门直接挂钩的监测点
|
//专项分析-只是统计当前所在部门及下部门直接挂钩的监测点
|
||||||
List<Dept> deptList = deptFeignClient.getSpecialDeptList().getData();
|
List<Dept> deptList = deptFeignClient.getSpecialDeptList().getData();
|
||||||
List<String> deptIds = deptList.stream().map(Dept::getCode).collect(Collectors.toList());
|
List<String> deptIds = deptList.stream().map(Dept::getCode).collect(Collectors.toList());
|
||||||
@@ -64,7 +64,7 @@ public class SpecialAnalysisServiceImpl implements SpecialAnalysisService {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//1.获取原始数据(参数1,部门id。参数2,监测点标签字典id集合)
|
//1.获取原始数据(参数1,部门id。参数2,监测点标签字典id集合)
|
||||||
List<SpecialAnalysisMonitorVO.SpecialAnalysisVO> infoList = specialAnalysisMapper.selectList(deptIds, data.getId());
|
List<SpecialAnalysisMonitorVO.SpecialAnalysisVO> infoList = specialAnalysisMapper.selectList(deptIds, data.getId(),dictData.getId());
|
||||||
|
|
||||||
//获取部门区域
|
//获取部门区域
|
||||||
if (CollectionUtil.isNotEmpty(infoList)) {
|
if (CollectionUtil.isNotEmpty(infoList)) {
|
||||||
|
|||||||
@@ -80,6 +80,11 @@ public class RLoadTypeUserManageVO implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@ApiModelProperty("入网报告路径")
|
@ApiModelProperty("入网报告路径")
|
||||||
private String iFilePath;
|
private String iFilePath;
|
||||||
|
/**
|
||||||
|
* 入网报告名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("入网报告名称")
|
||||||
|
private String iFilePathName;
|
||||||
/**
|
/**
|
||||||
* 入网报告上传时间
|
* 入网报告上传时间
|
||||||
*/
|
*/
|
||||||
@@ -120,6 +125,11 @@ public class RLoadTypeUserManageVO implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@ApiModelProperty("实测报告路径")
|
@ApiModelProperty("实测报告路径")
|
||||||
private String aFilePath;
|
private String aFilePath;
|
||||||
|
/**
|
||||||
|
* 实测报告名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("实测报告名称")
|
||||||
|
private String aFilePathName;
|
||||||
/**
|
/**
|
||||||
* 实测报告上传时间
|
* 实测报告上传时间
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ public class PmsTerminalDetectionController extends BaseController {
|
|||||||
|
|
||||||
@ApiOperation("检测报告下载")
|
@ApiOperation("检测报告下载")
|
||||||
@GetMapping(value = "/reportDownload")
|
@GetMapping(value = "/reportDownload")
|
||||||
public InputStreamResource reportDownload( TerminalParam.DownloadParam param) throws IOException {
|
public InputStreamResource reportDownload( TerminalParam.DownloadParam param){
|
||||||
InputStreamResource minIoUploadResDTO = pmsTerminalDetectionService.reportDownload(param);
|
InputStreamResource minIoUploadResDTO = pmsTerminalDetectionService.reportDownload(param);
|
||||||
return minIoUploadResDTO;
|
return minIoUploadResDTO;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ import io.swagger.annotations.ApiOperation;
|
|||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.poi.ss.usermodel.Workbook;
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
import org.springframework.beans.BeanUtils;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@@ -98,33 +97,23 @@ public class RGeneralSurveyPlanController extends BaseController {
|
|||||||
@PostMapping("/addPlanConfig")
|
@PostMapping("/addPlanConfig")
|
||||||
@ApiOperation("增加普测计划参数")
|
@ApiOperation("增加普测计划参数")
|
||||||
@ApiImplicitParam(name = "rSurveyPlanConfigVOList", value = "", required = true)
|
@ApiImplicitParam(name = "rSurveyPlanConfigVOList", value = "", required = true)
|
||||||
public HttpResult<Boolean> addPlanConfig(@Validated @RequestBody List<RSurveyPlanConfigVO> rSurveyPlanConfigVOList) {
|
public HttpResult<Boolean> addPlanConfig(@Validated @RequestBody List<RSurveyPlanConfigPO> rSurveyPlanConfigVOList) {
|
||||||
String methodDescribe = getMethodDescribe("querySubStatation");
|
String methodDescribe = getMethodDescribe("addPlanConfig");
|
||||||
double sum = rSurveyPlanConfigVOList.stream().mapToDouble(RSurveyPlanConfigVO::getProportion).sum();
|
double sum = rSurveyPlanConfigVOList.stream().mapToDouble(RSurveyPlanConfigPO::getProportion).sum();
|
||||||
if (sum > 1) {
|
if (sum > 1) {
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.MATH_ERROR, false, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.MATH_ERROR, false, methodDescribe);
|
||||||
}
|
}
|
||||||
List<RSurveyPlanConfigPO> collect = rSurveyPlanConfigVOList.stream().map(temp -> {
|
boolean b = rSurveyPlanConfigService.saveOrUpdateBatchByMultiId(rSurveyPlanConfigVOList, 500);
|
||||||
RSurveyPlanConfigPO rs = new RSurveyPlanConfigPO();
|
|
||||||
BeanUtils.copyProperties(temp, rs);
|
|
||||||
return rs;
|
|
||||||
}).collect(Collectors.toList());
|
|
||||||
boolean b = rSurveyPlanConfigService.saveOrUpdateBatchByMultiId(collect, 500);
|
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/queryPlanConfig")
|
@PostMapping("/queryPlanConfig")
|
||||||
@ApiOperation("查询普测计划参数")
|
@ApiOperation("查询普测计划参数")
|
||||||
public HttpResult<List<RSurveyPlanConfigVO>> queryPlanConfig() {
|
public HttpResult<List<RSurveyPlanConfigPO>> queryPlanConfig() {
|
||||||
String methodDescribe = getMethodDescribe("queryPlanConfig");
|
String methodDescribe = getMethodDescribe("queryPlanConfig");
|
||||||
List<RSurveyPlanConfigPO> list = rSurveyPlanConfigService.list();
|
List<RSurveyPlanConfigPO> list = rSurveyPlanConfigService.getOrgIds();
|
||||||
List<RSurveyPlanConfigVO> collect = list.stream().map(temp -> {
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
RSurveyPlanConfigVO rs = new RSurveyPlanConfigVO();
|
|
||||||
BeanUtils.copyProperties(temp, rs);
|
|
||||||
return rs;
|
|
||||||
}).collect(Collectors.toList());
|
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, collect, methodDescribe);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ public interface LoadTypeUserManageMapper extends BaseMapper<RLoadTypeUserManage
|
|||||||
*/
|
*/
|
||||||
Page<RLoadTypeUserManageVO> getLoadTypeUserPage(IPage<RLoadTypeUserManageVO> page,
|
Page<RLoadTypeUserManageVO> getLoadTypeUserPage(IPage<RLoadTypeUserManageVO> page,
|
||||||
@Param("param") LoadTypeUserSearchParam loadTypeUserSearchParam,
|
@Param("param") LoadTypeUserSearchParam loadTypeUserSearchParam,
|
||||||
@Param("ids") List<String> ids
|
@Param("ids") List<String> ids,
|
||||||
|
@Param("aStatus") String aStatus
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -38,6 +39,8 @@ public interface LoadTypeUserManageMapper extends BaseMapper<RLoadTypeUserManage
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
Page<RLoadTypeUserManageVO> getLoadTypeRelationPage(IPage<RLoadTypeUserManageVO> page,
|
Page<RLoadTypeUserManageVO> getLoadTypeRelationPage(IPage<RLoadTypeUserManageVO> page,
|
||||||
@Param("param") LoadTypeUserSearchParam loadTypeUserSearchParam
|
@Param("param") LoadTypeUserSearchParam loadTypeUserSearchParam,
|
||||||
|
@Param("ids") List<String> ids,
|
||||||
|
@Param("aStatus") String aStatus
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="param.checkType != null and param.checkType == 1">
|
<if test="param.checkType != null and param.checkType == 1">
|
||||||
and r.i_check_person is null and r.i_check_person !=""
|
AND ( r.i_check_person IS not NULL or r.i_check_person != "")
|
||||||
</if>
|
</if>
|
||||||
<if test="param.loadType != null and param.loadType != ''">
|
<if test="param.loadType != null and param.loadType != ''">
|
||||||
and r.load_type = #{param.loadType}
|
and r.load_type = #{param.loadType}
|
||||||
@@ -26,6 +26,9 @@
|
|||||||
<if test="param.fileUploadflag != null and param.fileUploadflag != ''">
|
<if test="param.fileUploadflag != null and param.fileUploadflag != ''">
|
||||||
and r.i_is_file_upload = #{param.fileUploadflag}
|
and r.i_is_file_upload = #{param.fileUploadflag}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="aStatus!= null and aStatus != ''">
|
||||||
|
and r.a_status != #{aStatus}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by record_time desc
|
order by record_time desc
|
||||||
</select>
|
</select>
|
||||||
@@ -39,8 +42,14 @@
|
|||||||
AND ISNULL( relation_user_id )= 0
|
AND ISNULL( relation_user_id )= 0
|
||||||
AND LENGTH(
|
AND LENGTH(
|
||||||
trim( relation_user_id ))> 0
|
trim( relation_user_id ))> 0
|
||||||
<if test="param.orgNo != null and param.orgNo != ''">
|
<if test="ids != null and ids.size > 0">
|
||||||
and r.org_no = #{param.orgNo}
|
AND r.org_no IN
|
||||||
|
<foreach collection='ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="param.checkType != null and param.checkType == 1">
|
||||||
|
AND ( r.i_check_person IS not NULL or r.i_check_person != "")
|
||||||
</if>
|
</if>
|
||||||
<if test="param.loadType != null and param.loadType != ''">
|
<if test="param.loadType != null and param.loadType != ''">
|
||||||
and r.load_type = #{param.loadType}
|
and r.load_type = #{param.loadType}
|
||||||
@@ -53,6 +62,9 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="param.aIsFileUpload != null and param.aIsFileUpload != ''">
|
<if test="param.aIsFileUpload != null and param.aIsFileUpload != ''">
|
||||||
and r.a_is_file_upload = #{param.aIsFileUpload}
|
and r.a_is_file_upload = #{param.aIsFileUpload}
|
||||||
|
</if>
|
||||||
|
<if test="aStatus!= null and aStatus != ''">
|
||||||
|
and r.a_status != #{aStatus}
|
||||||
</if>
|
</if>
|
||||||
order by record_time desc
|
order by record_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ public interface PmsTerminalDetectionService extends IService<PmsTerminalDetecti
|
|||||||
* @param param
|
* @param param
|
||||||
* @return MinIoUploadResDTO
|
* @return MinIoUploadResDTO
|
||||||
*/
|
*/
|
||||||
InputStreamResource reportDownload(TerminalParam.DownloadParam param) throws IOException;
|
InputStreamResource reportDownload(TerminalParam.DownloadParam param);
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* 终端入网检测台账统计
|
* 终端入网检测台账统计
|
||||||
|
|||||||
@@ -1,10 +1,19 @@
|
|||||||
package com.njcn.process.service;
|
package com.njcn.process.service;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||||
import com.njcn.process.mapper.RSurveyPlanConfigMapper;
|
import com.njcn.process.mapper.RSurveyPlanConfigMapper;
|
||||||
import com.njcn.process.pojo.po.RSurveyPlanConfigPO;
|
import com.njcn.process.pojo.po.RSurveyPlanConfigPO;
|
||||||
import com.njcn.process.service.impl.RSurveyPlanConfigService;
|
import com.njcn.process.service.impl.RSurveyPlanConfigService;
|
||||||
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
|
import com.njcn.user.pojo.po.Dept;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
@@ -15,6 +24,14 @@ import org.springframework.stereotype.Service;
|
|||||||
* @version V1.0.0
|
* @version V1.0.0
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
public class RSurveyPlanConfigServiceImpl extends MppServiceImpl<RSurveyPlanConfigMapper, RSurveyPlanConfigPO> implements RSurveyPlanConfigService{
|
public class RSurveyPlanConfigServiceImpl extends MppServiceImpl<RSurveyPlanConfigMapper, RSurveyPlanConfigPO> implements RSurveyPlanConfigService{
|
||||||
|
|
||||||
|
private final DeptFeignClient deptFeignClient;
|
||||||
|
@Override
|
||||||
|
public List<RSurveyPlanConfigPO> getOrgIds() {
|
||||||
|
List<Dept> data = deptFeignClient.getAllDept().getData();
|
||||||
|
List<String> orgIds = data.stream().map(Dept::getCode).collect(Collectors.toList());
|
||||||
|
return this.list(new LambdaQueryWrapper<RSurveyPlanConfigPO>().in(CollUtil.isNotEmpty(orgIds),RSurveyPlanConfigPO::getOrgId,orgIds ));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import com.njcn.user.pojo.po.Dept;
|
|||||||
import com.njcn.user.pojo.vo.PvTerminalTreeVO;
|
import com.njcn.user.pojo.vo.PvTerminalTreeVO;
|
||||||
import com.njcn.web.utils.RequestUtil;
|
import com.njcn.web.utils.RequestUtil;
|
||||||
import com.njcn.web.utils.WebUtil;
|
import com.njcn.web.utils.WebUtil;
|
||||||
|
import liquibase.pro.packaged.S;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.ibatis.jdbc.Null;
|
import org.apache.ibatis.jdbc.Null;
|
||||||
@@ -72,13 +73,14 @@ public class LoadTypeUserManageServiceImpl implements LoadTypeUserManageService
|
|||||||
Page<RLoadTypeUserManageVO> page = new Page<>(loadTypeUserSearchParam.getPageNum(), loadTypeUserSearchParam.getPageSize());
|
Page<RLoadTypeUserManageVO> page = new Page<>(loadTypeUserSearchParam.getPageNum(), loadTypeUserSearchParam.getPageSize());
|
||||||
List<String> ids=deptFeignClient.getDepSonIdtByDeptId (loadTypeUserSearchParam.getOrgNo()).getData ( );
|
List<String> ids=deptFeignClient.getDepSonIdtByDeptId (loadTypeUserSearchParam.getOrgNo()).getData ( );
|
||||||
Integer checkType = loadTypeUserSearchParam.getCheckType();
|
Integer checkType = loadTypeUserSearchParam.getCheckType();
|
||||||
|
String aStatus = null;
|
||||||
//0表示不是审核信息 1标识审核信息
|
//0表示不是审核信息 1标识审核信息
|
||||||
List<String> data = deptFeignClient.getDepSonIdtByDeptId (loadTypeUserSearchParam.getOrgNo()).getData ( );
|
|
||||||
if(checkType==1){
|
if(checkType==1){
|
||||||
ids=data.stream().filter(x->!x.contains(loadTypeUserSearchParam.getOrgNo())).collect(Collectors.toList());
|
ids=ids.stream().filter(x->!x.contains(loadTypeUserSearchParam.getOrgNo())).collect(Collectors.toList());
|
||||||
|
aStatus = dicDataFeignClient.getDicDataByCode(DicDataEnum.FINISH.getCode()).getData().getId();
|
||||||
}
|
}
|
||||||
//干扰源用户信息录入
|
//干扰源用户信息录入
|
||||||
Page<RLoadTypeUserManageVO> loadTypeUserPage = loadTypeUserManageMapper.getLoadTypeUserPage(page, loadTypeUserSearchParam,ids);
|
Page<RLoadTypeUserManageVO> loadTypeUserPage = loadTypeUserManageMapper.getLoadTypeUserPage(page, loadTypeUserSearchParam,ids,aStatus);
|
||||||
List<PvTerminalTreeVO> dept = deptFeignClient.allDeptList().getData();
|
List<PvTerminalTreeVO> dept = deptFeignClient.allDeptList().getData();
|
||||||
Map<String, PvTerminalTreeVO> pvTerminalTreeVOMap = dept.stream().collect(Collectors.toMap(PvTerminalTreeVO::getId, pvTerminalTreeVO -> pvTerminalTreeVO));
|
Map<String, PvTerminalTreeVO> pvTerminalTreeVOMap = dept.stream().collect(Collectors.toMap(PvTerminalTreeVO::getId, pvTerminalTreeVO -> pvTerminalTreeVO));
|
||||||
//部门处理:根据部门code取名称
|
//部门处理:根据部门code取名称
|
||||||
@@ -202,8 +204,15 @@ public class LoadTypeUserManageServiceImpl implements LoadTypeUserManageService
|
|||||||
@Override
|
@Override
|
||||||
public Page<RLoadTypeUserManageVO> getLoadTypeRelationList(LoadTypeUserSearchParam loadTypeUserSearchParam) {
|
public Page<RLoadTypeUserManageVO> getLoadTypeRelationList(LoadTypeUserSearchParam loadTypeUserSearchParam) {
|
||||||
Page<RLoadTypeUserManageVO> page = new Page<>(loadTypeUserSearchParam.getPageNum(), loadTypeUserSearchParam.getPageSize());
|
Page<RLoadTypeUserManageVO> page = new Page<>(loadTypeUserSearchParam.getPageNum(), loadTypeUserSearchParam.getPageSize());
|
||||||
Page<RLoadTypeUserManageVO> loadTypeUserPage = loadTypeUserManageMapper.getLoadTypeRelationPage(page, loadTypeUserSearchParam);
|
List<String> ids=deptFeignClient.getDepSonIdtByDeptId (loadTypeUserSearchParam.getOrgNo()).getData ( );
|
||||||
|
Integer checkType = loadTypeUserSearchParam.getCheckType();
|
||||||
|
String aStatus = null;
|
||||||
|
//0表示不是审核信息 1标识审核信息
|
||||||
|
if(checkType==1){
|
||||||
|
ids=ids.stream().filter(x->!x.contains(loadTypeUserSearchParam.getOrgNo())).collect(Collectors.toList());
|
||||||
|
aStatus = dicDataFeignClient.getDicDataByCode(DicDataEnum.FINISH.getCode()).getData().getId();
|
||||||
|
}
|
||||||
|
Page<RLoadTypeUserManageVO> loadTypeUserPage = loadTypeUserManageMapper.getLoadTypeRelationPage(page, loadTypeUserSearchParam,ids,aStatus);
|
||||||
//部门处理:根据部门code取名称
|
//部门处理:根据部门code取名称
|
||||||
List<RLoadTypeUserManageVO> list = loadTypeUserPage.getRecords();
|
List<RLoadTypeUserManageVO> list = loadTypeUserPage.getRecords();
|
||||||
List<PvTerminalTreeVO> dept = deptFeignClient.allDeptList().getData();
|
List<PvTerminalTreeVO> dept = deptFeignClient.allDeptList().getData();
|
||||||
|
|||||||
@@ -306,7 +306,7 @@ public class PmsTerminalDetectionServiceImpl extends ServiceImpl<PmsTerminalDete
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public InputStreamResource reportDownload(TerminalParam.DownloadParam param) throws IOException {
|
public InputStreamResource reportDownload(TerminalParam.DownloadParam param) {
|
||||||
PmsTerminalDetection terminal = this.getById(param.getId());
|
PmsTerminalDetection terminal = this.getById(param.getId());
|
||||||
if (ObjectUtil.isNull(terminal)) {
|
if (ObjectUtil.isNull(terminal)) {
|
||||||
if (StringUtils.isEmpty(terminal)) {
|
if (StringUtils.isEmpty(terminal)) {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.njcn.process.service.impl;
|
package com.njcn.process.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
@@ -34,6 +35,7 @@ import org.springframework.beans.BeanUtils;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
|
import org.springframework.util.ObjectUtils;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
@@ -198,6 +200,7 @@ public class RGeneralSurveyPlanPOServiceImpl extends MppServiceImpl<RGeneralSurv
|
|||||||
map(RGeneralSurveyPlanDetail::getSubId).collect(Collectors.toList());
|
map(RGeneralSurveyPlanDetail::getSubId).collect(Collectors.toList());
|
||||||
rGeneralSurveyPlanVO.setSubCount(collect1.size());
|
rGeneralSurveyPlanVO.setSubCount(collect1.size());
|
||||||
rGeneralSurveyPlanVO.setSubIds(collect1);
|
rGeneralSurveyPlanVO.setSubIds(collect1);
|
||||||
|
rGeneralSurveyPlanVO.setIsFileUpload(ObjectUtil.isNull(temp.getIsFileUpload()) ? 0 : temp.getIsFileUpload());
|
||||||
/*
|
/*
|
||||||
long Subcount = rGeneralSurveyPlanDetails.stream ( ).
|
long Subcount = rGeneralSurveyPlanDetails.stream ( ).
|
||||||
filter (surveyPlanDetail -> Objects.equals (surveyPlanDetail.getPlanNo ( ), temp.getPlanNo ( ))).
|
filter (surveyPlanDetail -> Objects.equals (surveyPlanDetail.getPlanNo ( ), temp.getPlanNo ( ))).
|
||||||
|
|||||||
@@ -2,6 +2,9 @@ package com.njcn.process.service.impl;
|
|||||||
|
|
||||||
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||||
import com.njcn.process.pojo.po.RSurveyPlanConfigPO;
|
import com.njcn.process.pojo.po.RSurveyPlanConfigPO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
@@ -14,4 +17,6 @@ import com.njcn.process.pojo.po.RSurveyPlanConfigPO;
|
|||||||
public interface RSurveyPlanConfigService extends IMppService<RSurveyPlanConfigPO> {
|
public interface RSurveyPlanConfigService extends IMppService<RSurveyPlanConfigPO> {
|
||||||
|
|
||||||
|
|
||||||
|
List<RSurveyPlanConfigPO> getOrgIds();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user