1.技术监督历史计划
2.技术监督预告警单和反馈数据 3.技术监督国网上送,计划历史记录、告警单和反馈数据 4.技术监督bug修改
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
package com.njcn.process.controller;
|
||||
|
||||
|
||||
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.process.pojo.param.SupvAlarmBackParam;
|
||||
import com.njcn.process.pojo.po.SupvAlarmBack;
|
||||
import com.njcn.process.service.ISupvAlarmBackService;
|
||||
import io.swagger.annotations.Api;
|
||||
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.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 技术监督预告警单反馈数据表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author wr
|
||||
* @since 2023-09-01
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags ="预告警单反馈")
|
||||
@RequestMapping("/supvAlarmBack")
|
||||
@RequiredArgsConstructor
|
||||
public class SupvAlarmBackController extends BaseController {
|
||||
|
||||
private final ISupvAlarmBackService supvAlarmBackService;
|
||||
|
||||
@PostMapping("addAlarmBack")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||
@ApiOperation("新增预告警单反馈")
|
||||
public HttpResult<Boolean> addAlarmBack(@RequestBody @Validated SupvAlarmBackParam.AlarmBackInsert insert){
|
||||
String methodDescribe = getMethodDescribe("addAlarmBack");
|
||||
Boolean b = supvAlarmBackService.addAlarmBack(insert);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe);
|
||||
}
|
||||
|
||||
@PostMapping("updateAlarmBack")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||
@ApiOperation("修改预告警单反馈")
|
||||
public HttpResult<Boolean> updateAlarmBack(@RequestBody @Validated SupvAlarmBackParam.AlarmBackUpdate update){
|
||||
String methodDescribe = getMethodDescribe("updateAlarmBack");
|
||||
Boolean b = supvAlarmBackService.updateAlarmBack(update);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe);
|
||||
}
|
||||
|
||||
@PostMapping("delAlarmBack")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||
@ApiOperation("删除预告警单反馈")
|
||||
@ApiImplicitParam(name = "planIds",value = "监督计划索引集合",required = true)
|
||||
public HttpResult<Boolean> delAlarmBack(@RequestBody List<String> planIds){
|
||||
String methodDescribe = getMethodDescribe("delAlarmBack");
|
||||
Boolean b = supvAlarmBackService.delAlarmBack(planIds);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe);
|
||||
}
|
||||
|
||||
@PostMapping("pageAlarmBack")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("分页查询预告警单反馈")
|
||||
@ApiImplicitParam(name = "param",value = "请求体",required = true)
|
||||
public HttpResult<Page<SupvAlarmBack>> pageAlarmBack(@RequestBody SupvAlarmBackParam param){
|
||||
String methodDescribe = getMethodDescribe("pagePlanHis");
|
||||
Page<SupvAlarmBack> supvPlanHisPage = supvAlarmBackService.pageAlarmBack(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, supvPlanHisPage, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.njcn.process.controller;
|
||||
|
||||
|
||||
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.process.pojo.param.SupvAlarmParam;
|
||||
import com.njcn.process.pojo.po.SupvAlarm;
|
||||
import com.njcn.process.service.ISupvAlarmService;
|
||||
import io.swagger.annotations.Api;
|
||||
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.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author wr
|
||||
* @since 2023-09-01
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags ="预告警单")
|
||||
@RequestMapping("/supvAlarm")
|
||||
@RequiredArgsConstructor
|
||||
public class SupvAlarmController extends BaseController {
|
||||
|
||||
private final ISupvAlarmService supvAlarmService;
|
||||
|
||||
@PostMapping("addAlarm")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||
@ApiOperation("新增预告警单")
|
||||
public HttpResult<Boolean> addAlarm(@RequestBody @Validated SupvAlarmParam.AlarmInsert insert){
|
||||
String methodDescribe = getMethodDescribe("addAlarm");
|
||||
Boolean b = supvAlarmService.addAlarm(insert);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe);
|
||||
}
|
||||
|
||||
@PostMapping("updateAlarm")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||
@ApiOperation("修改预告警单")
|
||||
public HttpResult<Boolean> updateAlarm(@RequestBody @Validated SupvAlarmParam.AlarmUpdate update){
|
||||
String methodDescribe = getMethodDescribe("updateAlarm");
|
||||
Boolean b = supvAlarmService.updateAlarm(update);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe);
|
||||
}
|
||||
|
||||
@PostMapping("delAlarm")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||
@ApiOperation("删除预告警单")
|
||||
@ApiImplicitParam(name = "planIds",value = "监督计划索引集合",required = true)
|
||||
public HttpResult<Boolean> delAlarm(@RequestBody List<String> planIds){
|
||||
String methodDescribe = getMethodDescribe("delAlarm");
|
||||
Boolean b = supvAlarmService.delAlarm(planIds);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe);
|
||||
}
|
||||
|
||||
@PostMapping("pageAlarm")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("分页查询预告警单")
|
||||
@ApiImplicitParam(name = "param",value = "请求体",required = true)
|
||||
public HttpResult<Page<SupvAlarm>> pageAlarm(@RequestBody SupvAlarmParam param){
|
||||
String methodDescribe = getMethodDescribe("pageAlarm");
|
||||
Page<SupvAlarm> supvPlanHisPage = supvAlarmService.pageAlarm(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, supvPlanHisPage, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.njcn.process.controller;
|
||||
|
||||
|
||||
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.process.pojo.param.SupvPlanHisParam;
|
||||
import com.njcn.process.pojo.po.SupvPlanHis;
|
||||
import com.njcn.process.service.ISupvPlanHisService;
|
||||
import io.swagger.annotations.Api;
|
||||
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.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 监督工作计划变更历史数据表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author wr
|
||||
* @since 2023-09-01
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/supvPlanHis")
|
||||
@Api(tags ="计划历史记录")
|
||||
@RequiredArgsConstructor
|
||||
public class SupvPlanHisController extends BaseController {
|
||||
|
||||
private final ISupvPlanHisService supvPlanHisService;
|
||||
|
||||
@PostMapping("addPlanHis")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||
@ApiOperation("新增技术监督计划历史记录")
|
||||
public HttpResult<Boolean> addPlanHis(@RequestBody @Validated SupvPlanHisParam.insert insert){
|
||||
String methodDescribe = getMethodDescribe("addPlanHis");
|
||||
Boolean b = supvPlanHisService.addPlanHis(insert);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe);
|
||||
}
|
||||
|
||||
@PostMapping("updatePlanHis")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||
@ApiOperation("修改技术监督计划历史记录")
|
||||
public HttpResult<Boolean> updatePlanHis(@RequestBody @Validated SupvPlanHisParam.update update){
|
||||
String methodDescribe = getMethodDescribe("updatePlanHis");
|
||||
Boolean b = supvPlanHisService.updatePlanHis(update);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe);
|
||||
}
|
||||
|
||||
@PostMapping("delPlanHis")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||
@ApiOperation("删除监督计划历史记录")
|
||||
@ApiImplicitParam(name = "planIds",value = "监督计划索引集合",required = true)
|
||||
public HttpResult<Boolean> delPlanHis(@RequestBody List<String> planIds){
|
||||
String methodDescribe = getMethodDescribe("delPlanHis");
|
||||
Boolean b = supvPlanHisService.delPlanHis(planIds);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe);
|
||||
}
|
||||
|
||||
@PostMapping("pagePlanHis")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("分页查询监督计划历史记录")
|
||||
@ApiImplicitParam(name = "param",value = "请求体",required = true)
|
||||
public HttpResult<Page<SupvPlanHis>> pagePlanHis(@RequestBody SupvPlanHisParam param){
|
||||
String methodDescribe = getMethodDescribe("pagePlanHis");
|
||||
Page<SupvPlanHis> supvPlanHisPage = supvPlanHisService.pagePlanHis(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, supvPlanHisPage, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.njcn.process.controller;
|
||||
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.OperateType;
|
||||
@@ -12,12 +11,9 @@ import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.process.pojo.param.SupvProblemParam;
|
||||
import com.njcn.process.pojo.po.SupvFile;
|
||||
import com.njcn.process.pojo.po.SupvProblem;
|
||||
import com.njcn.process.pojo.vo.SupvProblemVO;
|
||||
import com.njcn.process.service.ISupvProblemService;
|
||||
import com.njcn.system.api.DicDataFeignClient;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.user.pojo.vo.PvTerminalTreeVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -31,10 +27,6 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -53,10 +45,6 @@ public class SupvProblemController extends BaseController {
|
||||
private final ISupvProblemService iSupvProblemService;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@PostMapping("addProblem")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||
@ApiOperation("新增技术监督问题")
|
||||
@@ -99,5 +87,13 @@ public class SupvProblemController extends BaseController {
|
||||
Page<SupvProblem> page = iSupvProblemService.pageProblem(supvProblemParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||
}
|
||||
|
||||
@PostMapping("problemList")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("所有监督问题")
|
||||
@ApiImplicitParam(name = "supvProblemParam",value = "请求体",required = true)
|
||||
public void problemList(@RequestBody SupvProblemParam supvProblemParam){
|
||||
iSupvProblemService.problemList(supvProblemParam);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -125,4 +125,33 @@ public class SupvPushGwController extends BaseController {
|
||||
String s = supvPushGwService.deletePlan(planIds);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, s, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("pushPlanHis")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("推送工作计划变更历史数据接口")
|
||||
public HttpResult<String> pushPlanHis(@RequestBody List<String> ids){
|
||||
String methodDescribe = getMethodDescribe("pushPlanHis");
|
||||
String s = supvPushGwService.pushPlanHis(ids);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, s, methodDescribe);
|
||||
}
|
||||
|
||||
@PostMapping("pushAlarm")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("推送电能质量技术监督预告警单数据接口")
|
||||
public HttpResult<String> pushAlarm(@RequestBody List<String> ids){
|
||||
String methodDescribe = getMethodDescribe("pushAlarm");
|
||||
String s = supvPushGwService.pushAlarm(ids);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, s, methodDescribe);
|
||||
}
|
||||
|
||||
@PostMapping("pushAlarmHis")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("推送电能质量技术监督预告警单反馈数据接口")
|
||||
public HttpResult<String> pushAlarmHis(@RequestBody List<String> ids){
|
||||
String methodDescribe = getMethodDescribe("pushAlarmHis");
|
||||
String s = supvPushGwService.pushAlarmHis(ids);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, s, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.njcn.process.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.process.pojo.param.SupvAlarmBackParam;
|
||||
import com.njcn.process.pojo.po.SupvAlarmBack;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 技术监督预告警单反馈数据表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author wr
|
||||
* @since 2023-09-01
|
||||
*/
|
||||
public interface SupvAlarmBackMapper extends BaseMapper<SupvAlarmBack> {
|
||||
|
||||
|
||||
Page<SupvAlarmBack> pageAlarmBack(Page objectPage,@Param("ids") List<String> ids,@Param("param") SupvAlarmBackParam param);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.process.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.process.pojo.po.SupvAlarm;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author wr
|
||||
* @since 2023-09-01
|
||||
*/
|
||||
public interface SupvAlarmMapper extends BaseMapper<SupvAlarm> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.process.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.process.pojo.po.SupvPlanHis;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 监督工作计划变更历史数据表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author wr
|
||||
* @since 2023-09-01
|
||||
*/
|
||||
public interface SupvPlanHisMapper extends BaseMapper<SupvPlanHis> {
|
||||
|
||||
}
|
||||
@@ -2,9 +2,13 @@ package com.njcn.process.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.process.pojo.param.SupvProblemParam;
|
||||
import com.njcn.process.pojo.po.SupvProblem;
|
||||
import com.njcn.process.pojo.vo.SupvProblemVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
@@ -17,4 +21,6 @@ public interface SupvProblemMapper extends BaseMapper<SupvProblem> {
|
||||
|
||||
Boolean updateId(@Param("isUploadHead")Integer isUploadHead,
|
||||
@Param("id") String id);
|
||||
|
||||
List<SupvProblemVO> listDerive(@Param("param") SupvProblemParam supvProblemParam);
|
||||
}
|
||||
|
||||
@@ -23,8 +23,14 @@ public interface SupvReportMMapper extends MppBaseMapper<SupvReportM> {
|
||||
|
||||
List<ProcessPublicDTO> statisticPlanReport(@Param("startTime")LocalDateTime startTime, @Param("endTime")LocalDateTime endTime, @Param("statisticType")String statisticType,@Param("objType")String objType,@Param("effectStatus")List<String> effectStatus);
|
||||
|
||||
|
||||
//问题数据
|
||||
List<ProcessPublicDTO> statisticQueReport(@Param("startTime")LocalDateTime startTime, @Param("endTime")LocalDateTime endTime, @Param("statisticType")String statisticType,@Param("rectificationStatus")String rectificationStatus,@Param("objType")String objType);
|
||||
|
||||
//问题整改数量
|
||||
List<ProcessPublicDTO> statisticQueReportRectify(@Param("startTime")LocalDateTime startTime, @Param("endTime")LocalDateTime endTime, @Param("statisticType")String statisticType,@Param("rectificationStatus")String rectificationStatus,@Param("objType")String objType);
|
||||
|
||||
|
||||
|
||||
Boolean updateId(@Param("isUploadHead")Integer isUploadHead,
|
||||
@Param("id") String id);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<?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.SupvAlarmBackMapper">
|
||||
|
||||
<select id="pageAlarmBack" resultType="com.njcn.process.pojo.po.SupvAlarmBack">
|
||||
select
|
||||
sab.*,
|
||||
sa.bill_No,
|
||||
sa.bill_Name
|
||||
from
|
||||
supv_alarm sa
|
||||
INNER JOIN supv_alarm_back sab on sab.work_Alarm_Id = sa.Alarm_Id
|
||||
<where>
|
||||
<if test="param.searchBeginTime != null and param.searchBeginTime != ''">
|
||||
AND DATE_FORMAT(sab.complete_Time, '%Y-%m-%d') >= DATE_FORMAT(#{param.searchBeginTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="param.searchEndTime != null and param.searchEndTime != ''">
|
||||
AND DATE_FORMAT(sab.complete_Time, '%Y-%m-%d') <= DATE_FORMAT(#{param.searchEndTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -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.process.mapper.SupvAlarmMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -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.process.mapper.SupvPlanHisMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -5,4 +5,13 @@
|
||||
<update id="updateId">
|
||||
update supv_problem set is_upload_head= #{isUploadHead} where problem_Id=#{id}
|
||||
</update>
|
||||
<select id="listDerive" resultType="com.njcn.process.pojo.vo.SupvProblemVO">
|
||||
select
|
||||
work_plan_name,
|
||||
sp.*
|
||||
from
|
||||
supv_problem spm
|
||||
INNER JOIN supv_plan sp on sp.plan_Id=spm.plan_id
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -40,4 +40,21 @@
|
||||
</if>
|
||||
group by a.duty_Org_Id
|
||||
</select>
|
||||
|
||||
<select id="statisticQueReportRectify" resultType="com.njcn.process.pojo.dto.ProcessPublicDTO">
|
||||
select count(1) value,a.duty_Org_Id id from supv_problem a
|
||||
inner join supv_plan b on a.plan_Id = b.plan_id
|
||||
where
|
||||
b.supv_Type = #{statisticType}
|
||||
<if test="startTime!=null and endTime!=null">
|
||||
and a.rectification_Time between #{startTime} and #{endTime}
|
||||
</if>
|
||||
<if test="rectificationStatus !=null and rectificationStatus!=''">
|
||||
and a.rectification_Status = #{rectificationStatus}
|
||||
</if>
|
||||
<if test="objType !=null and objType!=''">
|
||||
and b.obj_type = #{objType}
|
||||
</if>
|
||||
group by a.duty_Org_Id
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.njcn.process.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.process.pojo.param.SupvAlarmBackParam;
|
||||
import com.njcn.process.pojo.po.SupvAlarmBack;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 技术监督预告警单反馈数据表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author wr
|
||||
* @since 2023-09-01
|
||||
*/
|
||||
public interface ISupvAlarmBackService extends IService<SupvAlarmBack> {
|
||||
|
||||
|
||||
boolean addAlarmBack(SupvAlarmBackParam.AlarmBackInsert param);
|
||||
|
||||
boolean updateAlarmBack(SupvAlarmBackParam.AlarmBackUpdate param);
|
||||
|
||||
boolean delAlarmBack(List<String> planIds);
|
||||
|
||||
Page<SupvAlarmBack> pageAlarmBack(SupvAlarmBackParam param);
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.njcn.process.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.process.pojo.param.SupvAlarmParam;
|
||||
import com.njcn.process.pojo.po.SupvAlarm;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author wr
|
||||
* @since 2023-09-01
|
||||
*/
|
||||
public interface ISupvAlarmService extends IService<SupvAlarm> {
|
||||
|
||||
boolean addAlarm(SupvAlarmParam.AlarmInsert param);
|
||||
|
||||
boolean updateAlarm(SupvAlarmParam.AlarmUpdate param);
|
||||
|
||||
boolean delAlarm(List<String> planIds);
|
||||
|
||||
Page<SupvAlarm> pageAlarm(SupvAlarmParam param);
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.njcn.process.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.process.pojo.param.SupvPlanHisParam;
|
||||
import com.njcn.process.pojo.po.SupvPlanHis;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 监督工作计划变更历史数据表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author wr
|
||||
* @since 2023-09-01
|
||||
*/
|
||||
public interface ISupvPlanHisService extends IService<SupvPlanHis> {
|
||||
|
||||
|
||||
boolean addPlanHis(SupvPlanHisParam.insert supvPlanHis);
|
||||
|
||||
boolean updatePlanHis(SupvPlanHisParam.update supvPlanHis);
|
||||
|
||||
boolean delPlanHis(List<String> planIds);
|
||||
|
||||
Page<SupvPlanHis> pagePlanHis(SupvPlanHisParam supvPlanParam);
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.process.pojo.param.SupvProblemParam;
|
||||
import com.njcn.process.pojo.po.SupvProblem;
|
||||
import com.njcn.process.pojo.po.SupvProblem;
|
||||
import com.njcn.process.pojo.vo.SupvProblemVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -48,4 +48,12 @@ public interface ISupvProblemService extends IService<SupvProblem> {
|
||||
*/
|
||||
Page<SupvProblem> pageProblem(SupvProblemParam supvProblemParam);
|
||||
|
||||
/**
|
||||
* @Description: 查询所有问题信息
|
||||
* @param supvProblemParam
|
||||
* @return: java.util.List<com.njcn.process.pojo.po.SupvProblem>
|
||||
* @Author: wr
|
||||
* @Date: 2023/9/1 9:44
|
||||
*/
|
||||
void problemList(SupvProblemParam supvProblemParam);
|
||||
}
|
||||
|
||||
@@ -48,4 +48,30 @@ public interface SupvPushGwService {
|
||||
* @date 2023/6/28
|
||||
*/
|
||||
String deletePlan(List<String> planIds);
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @param ids
|
||||
* @return: java.lang.String
|
||||
* @Author: wr
|
||||
* @Date: 2023/9/5 10:25
|
||||
*/
|
||||
String pushPlanHis(List<String> ids);
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @param ids
|
||||
* @return: java.lang.String
|
||||
* @Author: wr
|
||||
* @Date: 2023/9/5 10:27
|
||||
*/
|
||||
String pushAlarm(List<String> ids);
|
||||
/**
|
||||
* @Description:
|
||||
* @param ids
|
||||
* @return: java.lang.String
|
||||
* @Author: wr
|
||||
* @Date: 2023/9/5 10:35
|
||||
*/
|
||||
String pushAlarmHis(List<String> ids);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.njcn.process.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.process.mapper.SupvAlarmBackMapper;
|
||||
import com.njcn.process.pojo.param.SupvAlarmBackParam;
|
||||
import com.njcn.process.pojo.po.SupvAlarm;
|
||||
import com.njcn.process.pojo.po.SupvAlarmBack;
|
||||
import com.njcn.process.service.ISupvAlarmBackService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.user.pojo.po.Dept;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 技术监督预告警单反馈数据表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author wr
|
||||
* @since 2023-09-01
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class SupvAlarmBackServiceImpl extends ServiceImpl<SupvAlarmBackMapper, SupvAlarmBack> implements ISupvAlarmBackService {
|
||||
|
||||
private final DeptFeignClient deptFeignClient;
|
||||
@Value("${gw.code}")
|
||||
private String code;
|
||||
@Override
|
||||
public boolean addAlarmBack(SupvAlarmBackParam.AlarmBackInsert param) {
|
||||
//获取省单位
|
||||
Dept data = deptFeignClient.getDeptByCode(code).getData();
|
||||
SupvAlarmBack supvAlarmBack = BeanUtil.copyProperties(param, SupvAlarmBack.class);
|
||||
supvAlarmBack.setProvinceId(data.getCode());
|
||||
supvAlarmBack.setProvinceName(data.getName());
|
||||
supvAlarmBack.setIsUploadHead(0);
|
||||
return this.save(supvAlarmBack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateAlarmBack(SupvAlarmBackParam.AlarmBackUpdate param) {
|
||||
SupvAlarmBack supvAlarmBack = BeanUtil.copyProperties(param, SupvAlarmBack.class);
|
||||
SupvAlarmBack byId = this.getById(param.getAlarmBackId());
|
||||
if(1==byId.getIsUploadHead()){
|
||||
supvAlarmBack.setIsUploadHead(3);
|
||||
}
|
||||
return this.updateById(supvAlarmBack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean delAlarmBack(List<String> ids) {
|
||||
LambdaQueryWrapper<SupvAlarmBack> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.ne(SupvAlarmBack::getIsUploadHead, 0).eq(SupvAlarmBack::getWorkAlarmId, ids);
|
||||
int count = this.count(lambdaQueryWrapper);
|
||||
if (count > 0) {
|
||||
throw new BusinessException("请选择未上送国网的删除");
|
||||
}
|
||||
return this.removeByIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<SupvAlarmBack> pageAlarmBack(SupvAlarmBackParam param) {
|
||||
List<String> deptIds=new ArrayList<>();
|
||||
if(StrUtil.isNotBlank(param.getOrgId())){
|
||||
deptIds = deptFeignClient.getDepSonSelfCodetByCode(param.getOrgId()).getData();
|
||||
}
|
||||
Page<SupvAlarmBack> page = this.baseMapper.pageAlarmBack(new Page<>(param.getPageNum(), param.getPageSize()),
|
||||
deptIds,param
|
||||
);
|
||||
return page;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.njcn.process.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.process.mapper.SupvAlarmMapper;
|
||||
import com.njcn.process.pojo.param.SupvAlarmParam;
|
||||
import com.njcn.process.pojo.po.SupvAlarm;
|
||||
import com.njcn.process.pojo.po.SupvPlanHis;
|
||||
import com.njcn.process.service.ISupvAlarmService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.user.pojo.po.Dept;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author wr
|
||||
* @since 2023-09-01
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class SupvAlarmServiceImpl extends ServiceImpl<SupvAlarmMapper, SupvAlarm> implements ISupvAlarmService {
|
||||
|
||||
private final DeptFeignClient deptFeignClient;
|
||||
|
||||
@Value("${gw.code}")
|
||||
private String code;
|
||||
@Override
|
||||
public boolean addAlarm(SupvAlarmParam.AlarmInsert param) {
|
||||
//获取省单位
|
||||
Dept data = deptFeignClient.getDeptByCode(code).getData();
|
||||
SupvAlarm supvAlarm = BeanUtil.copyProperties(param, SupvAlarm.class);
|
||||
supvAlarm.setProvinceId(data.getCode());
|
||||
supvAlarm.setProvinceName(data.getName());
|
||||
supvAlarm.setIsUploadHead(0);
|
||||
return this.save(supvAlarm);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateAlarm(SupvAlarmParam.AlarmUpdate param) {
|
||||
SupvAlarm supvAlarm = BeanUtil.copyProperties(param, SupvAlarm.class);
|
||||
SupvAlarm byId = this.getById(param.getAlarmId());
|
||||
if(1==byId.getIsUploadHead()){
|
||||
supvAlarm.setIsUploadHead(3);
|
||||
}
|
||||
return this.updateById(supvAlarm);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean delAlarm(List<String> planIds) {
|
||||
LambdaQueryWrapper<SupvAlarm> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.ne(SupvAlarm::getIsUploadHead, 0).eq(SupvAlarm::getAlarmId, planIds);
|
||||
int count = this.count(lambdaQueryWrapper);
|
||||
if (count > 0) {
|
||||
throw new BusinessException("请选择未上送国网的删除");
|
||||
}
|
||||
return this.removeByIds(planIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<SupvAlarm> pageAlarm(SupvAlarmParam param) {
|
||||
List<String> deptIds = deptFeignClient.getDepSonSelfCodetByCode(param.getOrgId()).getData();
|
||||
Page<SupvAlarm> page = this.page(new Page<>(param.getPageNum(), param.getPageSize()),
|
||||
new LambdaQueryWrapper<SupvAlarm>().in(SupvAlarm::getCreaterOrgId, deptIds)
|
||||
.between(SupvAlarm::getCreaterTime,
|
||||
DateUtil.beginOfDay(DateUtil.parse(param.getSearchBeginTime())),
|
||||
DateUtil.endOfDay(DateUtil.parse(param.getSearchEndTime())))
|
||||
|
||||
);
|
||||
return page;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.njcn.process.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
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.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.process.mapper.SupvPlanHisMapper;
|
||||
import com.njcn.process.pojo.param.SupvPlanHisParam;
|
||||
import com.njcn.process.pojo.po.SupvPlan;
|
||||
import com.njcn.process.pojo.po.SupvPlanHis;
|
||||
import com.njcn.process.pojo.po.SupvProblem;
|
||||
import com.njcn.process.service.ISupvPlanHisService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.process.service.ISupvPlanService;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.user.pojo.po.Dept;
|
||||
import com.njcn.web.utils.RequestUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 监督工作计划变更历史数据表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author wr
|
||||
* @since 2023-09-01
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class SupvPlanHisServiceImpl extends ServiceImpl<SupvPlanHisMapper, SupvPlanHis> implements ISupvPlanHisService {
|
||||
|
||||
private final DeptFeignClient deptFeignClient;
|
||||
@Override
|
||||
public boolean addPlanHis(SupvPlanHisParam.insert supvPlanHis) {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updatePlanHis(SupvPlanHisParam.update supvPlanHis) {
|
||||
SupvPlanHis planHis = BeanUtil.copyProperties(supvPlanHis, SupvPlanHis.class);
|
||||
SupvPlanHis byId = this.getById(supvPlanHis.getId());
|
||||
if(1==byId.getIsUploadHead()){
|
||||
planHis.setIsUploadHead(3);
|
||||
}
|
||||
return this.updateById(planHis);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean delPlanHis(List<String> planIds) {
|
||||
LambdaQueryWrapper<SupvPlanHis> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(SupvPlanHis::getIsUploadHead, 1).eq(SupvPlanHis::getId, planIds);
|
||||
int count = this.count(lambdaQueryWrapper);
|
||||
if (count > 0) {
|
||||
throw new BusinessException("请选择未上送国网的删除");
|
||||
}
|
||||
return this.removeByIds(planIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<SupvPlanHis> pagePlanHis(SupvPlanHisParam supvPlanParam) {
|
||||
List<String> deptIds = deptFeignClient.getDepSonSelfCodetByCode(supvPlanParam.getOrgId()).getData();
|
||||
Page<SupvPlanHis> page = this.page(new Page<>(supvPlanParam.getPageNum(), supvPlanParam.getPageSize()),
|
||||
new LambdaQueryWrapper<SupvPlanHis>().in(SupvPlanHis::getSupvOrgId, deptIds)
|
||||
.between(SupvPlanHis::getAdjustTime,
|
||||
DateUtil.beginOfDay(DateUtil.parse(supvPlanParam.getSearchBeginTime())),
|
||||
DateUtil.endOfDay(DateUtil.parse(supvPlanParam.getSearchEndTime())))
|
||||
|
||||
);
|
||||
return page;
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@@ -21,9 +22,11 @@ import com.njcn.process.mapper.SupvProblemMapper;
|
||||
import com.njcn.process.pojo.param.SupvPlanParam;
|
||||
import com.njcn.process.pojo.po.SupvFile;
|
||||
import com.njcn.process.pojo.po.SupvPlan;
|
||||
import com.njcn.process.pojo.po.SupvPlanHis;
|
||||
import com.njcn.process.pojo.po.SupvProblem;
|
||||
import com.njcn.process.pojo.vo.SupvPlanVO;
|
||||
import com.njcn.process.service.ISupvFileService;
|
||||
import com.njcn.process.service.ISupvPlanHisService;
|
||||
import com.njcn.process.service.ISupvPlanService;
|
||||
import com.njcn.system.api.DicDataFeignClient;
|
||||
import com.njcn.system.enums.DicDataEnum;
|
||||
@@ -32,6 +35,7 @@ import com.njcn.system.enums.SystemResponseEnum;
|
||||
import com.njcn.system.pojo.po.DictData;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.user.api.UserFeignClient;
|
||||
import com.njcn.user.pojo.po.Dept;
|
||||
import com.njcn.user.pojo.po.User;
|
||||
import com.njcn.user.pojo.vo.PvTerminalTreeVO;
|
||||
import com.njcn.web.factory.PageFactory;
|
||||
@@ -40,10 +44,12 @@ import liquibase.pro.packaged.L;
|
||||
import liquibase.pro.packaged.S;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
@@ -74,9 +80,11 @@ public class SupvPlanServiceImpl extends ServiceImpl<SupvPlanMapper, SupvPlan> i
|
||||
private final SupvProblemMapper supvProblemMapper;
|
||||
|
||||
private final FileStorageUtil fileStorageUtil;
|
||||
private final ISupvPlanHisService supvPlanHisService;
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean addPlan(SupvPlanParam supvPlanParam) {
|
||||
checkParam(supvPlanParam, false);
|
||||
SupvPlan supvPlan = new SupvPlan();
|
||||
@@ -124,6 +132,7 @@ public class SupvPlanServiceImpl extends ServiceImpl<SupvPlanMapper, SupvPlan> i
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean updatePlan(SupvPlanParam supvPlanParam) {
|
||||
checkParam(supvPlanParam, true);
|
||||
SupvPlan supvPlan = new SupvPlan();
|
||||
@@ -148,9 +157,6 @@ public class SupvPlanServiceImpl extends ServiceImpl<SupvPlanMapper, SupvPlan> i
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if(!"01".equals(supvPlan.getEffectStatus())){
|
||||
if(Objects.isNull(supvPlan.getEffectStartTime()) ){
|
||||
throw new BusinessException("开始实施时间不可为空!");
|
||||
@@ -162,14 +168,50 @@ public class SupvPlanServiceImpl extends ServiceImpl<SupvPlanMapper, SupvPlan> i
|
||||
throw new BusinessException("结束实施时间不可为空!");
|
||||
}
|
||||
}
|
||||
this.updateById(supvPlan);
|
||||
return true;
|
||||
SupvPlan byId = this.getById(supvPlan.getPlanId());
|
||||
if(1==byId.getIsUploadHead()){
|
||||
supvPlan.setIsUploadHead(3);
|
||||
|
||||
SupvPlanHis planHis=new SupvPlanHis();
|
||||
planHis.setPlanId(supvPlan.getPlanId());
|
||||
planHis.setWorkPlanName(supvPlan.getWorkPlanName());
|
||||
planHis.setSupvOrgId(supvPlan.getSupvOrgId());
|
||||
Dept data = deptFeignClient.getDeptByCode(supvPlan.getSupvOrgId()).getData();
|
||||
if(ObjectUtil.isNull(data)){
|
||||
throw new BusinessException("监督单位不存在,请检查监督计划单位字段");
|
||||
}
|
||||
planHis.setSupvOrgName(data.getName());
|
||||
planHis.setPlanSupvDate(supvPlan.getPlanSupvDate());
|
||||
if (supvPlanParam instanceof SupvPlanParam.UpdateSupvPlanParam) {
|
||||
planHis.setOtherRemark(((SupvPlanParam.UpdateSupvPlanParam) supvPlanParam).getOtherRemarkHis());
|
||||
planHis.setApplyComment(((SupvPlanParam.UpdateSupvPlanParam) supvPlanParam).getApplyCommentHis());
|
||||
}
|
||||
planHis.setPlanStatus(supvPlanParam.getPlanStatus());
|
||||
planHis.setUpdateUserId(RequestUtil.getUserIndex());
|
||||
planHis.setUpdateUserName(RequestUtil.getUserNickname());
|
||||
planHis.setUpdateTime(LocalDateTime.now());
|
||||
planHis.setDeleteFlag("0");
|
||||
//判断是否已存在问题
|
||||
List<SupvPlanHis> list = supvPlanHisService.list(new LambdaQueryWrapper<SupvPlanHis>()
|
||||
.eq(SupvPlanHis::getPlanId, planHis.getPlanId())
|
||||
.orderByDesc(SupvPlanHis::getUpdateTime)
|
||||
|
||||
);
|
||||
if(CollUtil.isNotEmpty(list)){
|
||||
planHis.setParentId(list.get(0).getId());
|
||||
}
|
||||
planHis.setAdjustTime(LocalDateTime.now());
|
||||
planHis.setIsUploadHead(0);
|
||||
supvPlanHisService.save(planHis);
|
||||
}
|
||||
return this.updateById(supvPlan);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean delPlan(List<String> planIds) {
|
||||
LambdaQueryWrapper<SupvPlan> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(SupvPlan::getIsUploadHead, 1).eq(SupvPlan::getPlanId, planIds);
|
||||
lambdaQueryWrapper.ne(SupvPlan::getIsUploadHead, 0).eq(SupvPlan::getPlanId, planIds);
|
||||
int count = this.count(lambdaQueryWrapper);
|
||||
if (count > 0) {
|
||||
throw new BusinessException("请选择未上送国网的删除");
|
||||
|
||||
@@ -3,23 +3,21 @@ package com.njcn.process.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.utils.PubUtils;
|
||||
import com.njcn.device.pq.pojo.vo.PqsLineWeightVo;
|
||||
import com.njcn.oss.utils.FileStorageUtil;
|
||||
import com.njcn.process.enums.ProcessResponseEnum;
|
||||
import com.njcn.poi.excel.ExcelUtil;
|
||||
import com.njcn.process.mapper.SupvFileMapper;
|
||||
import com.njcn.process.mapper.SupvProblemMapper;
|
||||
import com.njcn.process.pojo.param.SupvProblemParam;
|
||||
import com.njcn.process.pojo.po.SupvFile;
|
||||
import com.njcn.process.pojo.po.SupvPlan;
|
||||
import com.njcn.process.pojo.po.SupvProblem;
|
||||
import com.njcn.process.pojo.po.SupvProblem;
|
||||
import com.njcn.process.pojo.vo.SupvProblemVO;
|
||||
import com.njcn.process.service.ISupvProblemService;
|
||||
import com.njcn.system.api.DicDataFeignClient;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
@@ -27,10 +25,10 @@ import com.njcn.user.pojo.vo.PvTerminalTreeVO;
|
||||
import com.njcn.web.factory.PageFactory;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -55,6 +53,7 @@ public class SupvProblemServiceImpl extends ServiceImpl<SupvProblemMapper, SupvP
|
||||
private final FileStorageUtil fileStorageUtil;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean addProblem(SupvProblemParam supvProblemParam) {
|
||||
SupvProblem supvProblem = new SupvProblem();
|
||||
BeanUtil.copyProperties(supvProblemParam, supvProblem);
|
||||
@@ -68,6 +67,7 @@ public class SupvProblemServiceImpl extends ServiceImpl<SupvProblemMapper, SupvP
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean updateProblem(SupvProblemParam supvProblemParam) {
|
||||
SupvProblem supvProblem = new SupvProblem();
|
||||
BeanUtil.copyProperties(supvProblemParam, supvProblem);
|
||||
@@ -75,14 +75,19 @@ public class SupvProblemServiceImpl extends ServiceImpl<SupvProblemMapper, SupvP
|
||||
if(StrUtil.isNotBlank(supvProblemParam.getRectificationTime())) {
|
||||
supvProblem.setRectificationTime(PubUtils.beginTimeToLocalDateTime(supvProblemParam.getRectificationTime()));
|
||||
}
|
||||
SupvProblem byId = this.getById(supvProblem.getProblemId());
|
||||
if(1==byId.getIsUploadHead()){
|
||||
supvProblem.setIsUploadHead(3);
|
||||
}
|
||||
this.updateById(supvProblem);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean delProblem(List<String> problemIds) {
|
||||
LambdaQueryWrapper<SupvProblem> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(SupvProblem::getIsUploadHead, 1).eq(SupvProblem::getProblemId, problemIds);
|
||||
lambdaQueryWrapper.ne(SupvProblem::getIsUploadHead, 0).eq(SupvProblem::getProblemId, problemIds);
|
||||
int count = this.count(lambdaQueryWrapper);
|
||||
if (count > 0) {
|
||||
throw new BusinessException("请选择未上送国网的删除");
|
||||
@@ -128,5 +133,13 @@ public class SupvProblemServiceImpl extends ServiceImpl<SupvProblemMapper, SupvP
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void problemList(SupvProblemParam supvProblemParam) {
|
||||
List<SupvProblemVO> supvProblemVOS = this.baseMapper.listDerive(supvProblemParam);
|
||||
// List<PqsLineWeightVo.WeightExcel> weightExcels = this.baseMapper.selectWeights(terminalMainQueryParam);
|
||||
// ExcelUtil.exportExcel("监测点权重信息.xlsx",PqsLineWeightVo.WeightExcel.class,weightExcels);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.njcn.process.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
@@ -9,6 +10,7 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.oss.utils.FileStorageUtil;
|
||||
import com.njcn.process.mapper.SupvFileMapper;
|
||||
@@ -16,10 +18,11 @@ import com.njcn.process.mapper.SupvPlanMapper;
|
||||
import com.njcn.process.mapper.SupvProblemMapper;
|
||||
import com.njcn.process.mapper.SupvReportMMapper;
|
||||
import com.njcn.process.pojo.param.SendParam;
|
||||
import com.njcn.process.pojo.po.SupvFile;
|
||||
import com.njcn.process.pojo.po.SupvPlan;
|
||||
import com.njcn.process.pojo.po.SupvProblem;
|
||||
import com.njcn.process.pojo.po.SupvReportM;
|
||||
import com.njcn.process.pojo.po.*;
|
||||
import com.njcn.process.pojo.vo.gw.*;
|
||||
import com.njcn.process.service.ISupvAlarmBackService;
|
||||
import com.njcn.process.service.ISupvAlarmService;
|
||||
import com.njcn.process.service.ISupvPlanHisService;
|
||||
import com.njcn.process.service.SupvPushGwService;
|
||||
import com.njcn.system.api.DicDataFeignClient;
|
||||
import com.njcn.system.enums.DicDataTypeEnum;
|
||||
@@ -77,6 +80,10 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
|
||||
private final UserFeignClient userFeignClient;
|
||||
|
||||
private final ISupvPlanHisService supvPlanHisService;
|
||||
private final ISupvAlarmService supvAlarmService;
|
||||
private final ISupvAlarmBackService supvAlarmBackService;
|
||||
|
||||
@Value("${gw.url}")
|
||||
private String gwUrl;
|
||||
|
||||
@@ -108,6 +115,9 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
List<DictData> supvVoltageDicList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE.getCode()).getData();
|
||||
Map<String, DictData> mapVoltage = supvVoltageDicList.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||
|
||||
List<DictData> planList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.PLAN_STATUS.getCode()).getData();
|
||||
Map<String, DictData> mapPlan = planList.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||
|
||||
List<String> userIds = supvPlanList.stream().map(SupvPlan::getCreateBy).distinct().collect(Collectors.toList());
|
||||
List<User> userList = userFeignClient.getUserByIdList(userIds).getData();
|
||||
Map<String, User> map = userList.stream().collect(Collectors.toMap(User::getId, Function.identity()));
|
||||
@@ -188,6 +198,12 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
supvPlan.setObjVoltageLevelName(dictData.getName());
|
||||
}
|
||||
|
||||
//计划状态
|
||||
if (mapPlan.containsKey(supvPlan.getPlanStatus())) {
|
||||
DictData dictData = mapPlan.get(supvPlan.getPlanStatus());
|
||||
supvPlan.setPlanStatus(String.format("%02d", dictData.getAlgoDescribe()));
|
||||
}
|
||||
|
||||
//判断用户是否存在
|
||||
if (map.containsKey(supvPlan.getPlanUserId())) {
|
||||
supvPlan.setPlanUserName(map.get(supvPlan.getPlanUserId()).getName());
|
||||
@@ -203,10 +219,9 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
if (supvPlanList.size() > 100) {
|
||||
throw new BusinessException("一次最多上送100条数据");
|
||||
}
|
||||
|
||||
|
||||
List<PlanVO> planVOS = BeanUtil.copyToList(supvPlanList, PlanVO.class);
|
||||
SendParam param = new SendParam();
|
||||
param.setStats(supvPlanList);
|
||||
param.setStats(planVOS);
|
||||
param.setProvinceId("13B9B47F1E483324E05338297A0A0595");
|
||||
String s = JSONObject.toJSONStringWithDateFormat(param, JSON.DEFFAULT_DATE_FORMAT);
|
||||
log.info(Thread.currentThread().getName() + "获取返回体 接收电能质量技术监督工作计划数据接口数据:" + s + "结束----!");
|
||||
@@ -215,30 +230,30 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
log.info(Thread.currentThread().getName() + "获取返回体 接收电能质量技术监督工作计划数据接口响应结果:" + send + "结束----!");
|
||||
if (send.containsKey("succeed")) {
|
||||
String succeed = send.get("succeed");
|
||||
if(succeed.indexOf("\\\"")!=-1){
|
||||
if (succeed.indexOf("\\\"") != -1) {
|
||||
succeed = succeed.replace("\\\"", "\"");
|
||||
}
|
||||
Map mapData = JSON.parseObject(succeed, Map.class);
|
||||
String status = mapData.get("status").toString();
|
||||
if ("000000".equals(status)) {
|
||||
for (SupvPlan supvPlan : supvPlanList) {
|
||||
supvPlanMapper.updateId(1,supvPlan.getPlanId());
|
||||
supvPlanMapper.updateId(1, supvPlan.getPlanId());
|
||||
}
|
||||
String result = mapData.get("result").toString();
|
||||
Map mapCount = JSON.parseObject(result, Map.class);
|
||||
String count = mapCount.get("count").toString();
|
||||
return "操作成功:成功数据"+count+"条";
|
||||
return "操作成功:成功数据" + count + "条";
|
||||
} else {
|
||||
String errors = mapData.get("errors").toString();
|
||||
throw new BusinessException("操作失败:"+status+"_"+errors);
|
||||
throw new BusinessException("操作失败:" + status + "_" + errors);
|
||||
}
|
||||
} else {
|
||||
throw new BusinessException("出现未知错误");
|
||||
throw new BusinessException("当前时间段国网上送请求过多,请稍后再试");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String pushQuestion(List<String> problemIds,Integer type) {
|
||||
public String pushQuestion(List<String> problemIds, Integer type) {
|
||||
LambdaQueryWrapper<SupvProblem> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.in(SupvProblem::getProblemId, problemIds);
|
||||
List<SupvProblem> supvProblemList = supvProblemMapper.selectList(lambdaQueryWrapper);
|
||||
@@ -277,16 +292,18 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
|
||||
//TODO
|
||||
// 目前一个问题对应一个措施,上送一个问题需要调用问题接口和整改措施接口
|
||||
List<ProblemVO> list = BeanUtil.copyToList(supvProblemList, ProblemVO.class);
|
||||
|
||||
SendParam param = new SendParam();
|
||||
param.setStats(supvProblemList);
|
||||
param.setStats(list);
|
||||
param.setProvinceId("13B9B47F1E483324E05338297A0A0595");
|
||||
String s = JSONObject.toJSONStringWithDateFormat(param, JSON.DEFFAULT_DATE_FORMAT);
|
||||
log.info(Thread.currentThread().getName() + "获取返回体 删除电能质量技术监督工作计划接口数据:" + s + "结束----!");
|
||||
Map<String, String> send;
|
||||
if(type==0){
|
||||
if (type == 0) {
|
||||
send = send(param, getUrl(2), "pqProblemCreate");
|
||||
log.info(Thread.currentThread().getName() + "获取返回体 接收电能质量技术监督实施问题数据接口响应结果:" + send + "结束----!");
|
||||
}else{
|
||||
} else {
|
||||
send = send(param, getUrl(3), "pqProblemUpdate");
|
||||
log.info(Thread.currentThread().getName() + "获取返回体 接收电能质量技术监督实施问题整改数据接口响应结果:" + send + "结束----!");
|
||||
}
|
||||
@@ -294,32 +311,32 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
|
||||
if (send.containsKey("succeed")) {
|
||||
String succeed = send.get("succeed");
|
||||
if(succeed.indexOf("\\\"")!=-1){
|
||||
if (succeed.indexOf("\\\"") != -1) {
|
||||
succeed = succeed.replace("\\\"", "\"");
|
||||
}
|
||||
Map map = JSON.parseObject(succeed, Map.class);
|
||||
String status = map.get("status").toString();
|
||||
if ("000000".equals(status)) {
|
||||
for (SupvProblem supvProblem : supvProblemList) {
|
||||
supvProblemMapper.updateId(1,supvProblem.getProblemId());
|
||||
supvProblemMapper.updateId(1, supvProblem.getProblemId());
|
||||
}
|
||||
String result = map.get("result").toString();
|
||||
Map mapCount = JSON.parseObject(result, Map.class);
|
||||
String count = mapCount.get("count").toString();
|
||||
return "操作成功:成功数据"+count+"条";
|
||||
}else {
|
||||
return "操作成功:成功数据" + count + "条";
|
||||
} else {
|
||||
String errors = map.get("errors").toString();
|
||||
throw new BusinessException("操作失败:"+status+"_"+errors);
|
||||
throw new BusinessException("操作失败:" + status + "_" + errors);
|
||||
}
|
||||
} else {
|
||||
throw new BusinessException("出现未知错误");
|
||||
throw new BusinessException("当前时间段国网上送请求过多,请稍后再试");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String pushFile(List<String> busIds) throws IOException {
|
||||
StringBuilder stringBuilder=new StringBuilder();
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
LambdaQueryWrapper<SupvFile> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.in(SupvFile::getBusiId, busIds);
|
||||
List<SupvFile> supvFiles = supvFileMapper.selectList(lambdaQueryWrapper);
|
||||
@@ -336,7 +353,7 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
log.info(Thread.currentThread().getName() + "获取返回体 总部提供附件接收接口,省公司调用此接口,完成附件上报响应结果:" + sendFile + "结束----!");
|
||||
if (sendFile.containsKey("succeed")) {
|
||||
String succeed = sendFile.get("succeed");
|
||||
if(succeed.indexOf("\\\"")!=-1){
|
||||
if (succeed.indexOf("\\\"") != -1) {
|
||||
succeed = succeed.replace("\\\"", "\"");
|
||||
}
|
||||
Map map = JSON.parseObject(succeed, Map.class);
|
||||
@@ -345,13 +362,13 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
String result = map.get("result").toString();
|
||||
Map mapCount = JSON.parseObject(result, Map.class);
|
||||
String count = mapCount.get("count").toString();
|
||||
stringBuilder.append( "第"+i+"次操作成功:成功数据"+count+"条");
|
||||
stringBuilder.append("第" + i + "次操作成功:成功数据" + count + "条");
|
||||
} else {
|
||||
String errors = map.get("errors").toString();
|
||||
stringBuilder.append("第"+i+"次操作失败:"+status+"_"+errors);
|
||||
stringBuilder.append("第" + i + "次操作失败:" + status + "_" + errors);
|
||||
}
|
||||
} else {
|
||||
stringBuilder.append("第"+i+"次出现未知错误");
|
||||
stringBuilder.append("第" + i + "次当前时间段国网上送请求过多,请稍后再试");
|
||||
}
|
||||
}
|
||||
return stringBuilder.toString();
|
||||
@@ -377,25 +394,25 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
log.info(Thread.currentThread().getName() + "获取返回体 取消电能质量技术监督工作计划接口响应结果:" + send + "结束----!");
|
||||
if (send.containsKey("succeed")) {
|
||||
String succeed = send.get("succeed");
|
||||
if(succeed.indexOf("\\\"")!=-1){
|
||||
if (succeed.indexOf("\\\"") != -1) {
|
||||
succeed = succeed.replace("\\\"", "\"");
|
||||
}
|
||||
Map map = JSON.parseObject(succeed, Map.class);
|
||||
String status = map.get("status").toString();
|
||||
if ("000000".equals(status)) {
|
||||
for (SupvReportM supvReportM : supvReportMList) {
|
||||
supvReportMMapper.updateId(1,supvReportM.getMonthReportId());
|
||||
supvReportMMapper.updateId(1, supvReportM.getMonthReportId());
|
||||
}
|
||||
String result = map.get("result").toString();
|
||||
Map mapCount = JSON.parseObject(result, Map.class);
|
||||
String count = mapCount.get("count").toString();
|
||||
return "操作成功:成功数据"+count+"条";
|
||||
return "操作成功:成功数据" + count + "条";
|
||||
} else {
|
||||
String errors = map.get("errors").toString();
|
||||
throw new BusinessException("操作失败:"+status+"_"+errors);
|
||||
throw new BusinessException("操作失败:" + status + "_" + errors);
|
||||
}
|
||||
} else {
|
||||
throw new BusinessException("出现未知错误");
|
||||
throw new BusinessException("当前时间段国网上送请求过多,请稍后再试");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -428,73 +445,236 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
log.info(Thread.currentThread().getName() + "获取返回体 删除电能质量技术监督工作计划接口响应结果:" + send + "结束----!");
|
||||
if (send.containsKey("succeed")) {
|
||||
String succeed = send.get("succeed");
|
||||
if(succeed.indexOf("\\\"")!=-1){
|
||||
if (succeed.indexOf("\\\"") != -1) {
|
||||
succeed = succeed.replace("\\\"", "\"");
|
||||
}
|
||||
Map map = JSON.parseObject(succeed, Map.class);
|
||||
String status = map.get("status").toString();
|
||||
if ("000000".equals(status)) {
|
||||
for (SupvPlan supvPlan : supvPlanList) {
|
||||
supvPlanMapper.updateId(2,supvPlan.getPlanId());
|
||||
supvPlanMapper.updateId(2, supvPlan.getPlanId());
|
||||
}
|
||||
String result = map.get("result").toString();
|
||||
Map mapCount = JSON.parseObject(result, Map.class);
|
||||
String countNum = mapCount.get("count").toString();
|
||||
return "操作成功:成功数据"+countNum+"条";
|
||||
return "操作成功:成功数据" + countNum + "条";
|
||||
} else {
|
||||
String errors = map.get("errors").toString();
|
||||
throw new BusinessException("操作失败:"+status+"_"+errors);
|
||||
throw new BusinessException("操作失败:" + status + "_" + errors);
|
||||
}
|
||||
} else {
|
||||
throw new BusinessException("出现未知错误");
|
||||
throw new BusinessException("当前时间段国网上送请求过多,请稍后再试");
|
||||
}
|
||||
}
|
||||
|
||||
public Map<String, String> send(SendParam param, String url, String serviceName) {
|
||||
Map<String, String> map = new LinkedHashMap<>();
|
||||
ContentBody cb;
|
||||
if (ObjectUtil.isNull(param)) {
|
||||
cb = new ContentBody("");
|
||||
} else {
|
||||
String s = JSONObject.toJSONStringWithDateFormat(param, JSON.DEFFAULT_DATE_FORMAT);
|
||||
log.info(Thread.currentThread().getName() + "1.信息:" + s);
|
||||
cb = new ContentBody(s);
|
||||
@Override
|
||||
public String pushPlanHis(List<String> ids) {
|
||||
List<SupvPlanHis> supvPlanHis = supvPlanHisService.listByIds(ids);
|
||||
if (supvPlanHis.size() > 100) {
|
||||
throw new BusinessException("一次最多上送100条数据");
|
||||
}
|
||||
//ContentBody传递,要求使用post方式进行调用
|
||||
//如果需要传递请求参数 可以拼接到请求URL中,或者设置paramsMap参数由SDK内部进行拼接
|
||||
HttpParameters.Builder builder = HttpParameters.newBuilder();
|
||||
//计划状态
|
||||
List<DictData> planList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.PLAN_STATUS.getCode()).getData();
|
||||
Map<String, DictData> mapPlan = planList.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||
|
||||
builder.requestURL(url) // 设置请求的URL,可以拼接URL请求参数
|
||||
.api("zongbuSync") // 设置服务名
|
||||
.version("1.0.0") // 设置版本号
|
||||
.method("post") // 设置调用方式, 必须为 post
|
||||
.contentType("application/json; charset=UTF-8") //设置请求content-type
|
||||
.accessKey("7d4cb2c0afb5468ca56e0654b1a442ef").secretKey("lW2xr6zKjbaqVDOSgQpcGrM6Rg0=");// 设置accessKey 和 设置secretKey
|
||||
for (SupvPlanHis supvPlanHi : supvPlanHis) {
|
||||
//计划状态
|
||||
if (mapPlan.containsKey(supvPlanHi.getPlanStatus())) {
|
||||
DictData dictData = mapPlan.get(supvPlanHi.getPlanStatus());
|
||||
supvPlanHi.setPlanStatus(String.format("%02d", dictData.getAlgoDescribe()));
|
||||
}
|
||||
}
|
||||
List<PlanHisVO> list = BeanUtil.copyToList(supvPlanHis, PlanHisVO.class);
|
||||
SendParam param = new SendParam();
|
||||
param.setStats(list);
|
||||
param.setProvinceId("13B9B47F1E483324E05338297A0A0595");
|
||||
String s = JSONObject.toJSONStringWithDateFormat(param, JSON.DEFFAULT_DATE_FORMAT);
|
||||
log.info(Thread.currentThread().getName() + "获取返回体 预告警单数据接口:" + s + "结束----!");
|
||||
Map<String, String> send = send(param, getUrl(7), "pqPlanCreateHis");
|
||||
log.info(Thread.currentThread().getName() + "获取返回体 预告警单数据接口:" + send + "结束----!");
|
||||
if (send.containsKey("succeed")) {
|
||||
String succeed = send.get("succeed");
|
||||
if (succeed.indexOf("\\\"") != -1) {
|
||||
succeed = succeed.replace("\\\"", "\"");
|
||||
}
|
||||
Map map = JSON.parseObject(succeed, Map.class);
|
||||
String status = map.get("status").toString();
|
||||
if ("000000".equals(status)) {
|
||||
List<String> hisIds = supvPlanHis.stream().map(SupvPlanHis::getId).collect(Collectors.toList());
|
||||
|
||||
supvPlanHisService.update(new LambdaUpdateWrapper<SupvPlanHis>()
|
||||
.set(SupvPlanHis::getIsUploadHead, 1)
|
||||
.in(SupvPlanHis::getId, hisIds)
|
||||
);
|
||||
|
||||
builder.contentBody(cb);
|
||||
String token = LoginToken();
|
||||
builder.putHeaderParamsMap("x-token", token);
|
||||
builder.putHeaderParamsMap("serviceName", serviceName);
|
||||
//进行调用,返回结果
|
||||
String result = map.get("result").toString();
|
||||
Map mapCount = JSON.parseObject(result, Map.class);
|
||||
String countNum = mapCount.get("count").toString();
|
||||
return "操作成功:成功数据" + countNum + "条";
|
||||
} else {
|
||||
String errors = map.get("errors").toString();
|
||||
throw new BusinessException("操作失败:" + status + "_" + errors);
|
||||
}
|
||||
} else {
|
||||
throw new BusinessException("当前时间段国网上送请求过多,请稍后再试");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String pushAlarm(List<String> ids) {
|
||||
List<SupvAlarm> supvAlarms = supvAlarmService.listByIds(ids);
|
||||
if (supvAlarms.size() > 100) {
|
||||
throw new BusinessException("一次最多上送100条数据");
|
||||
}
|
||||
//单据类型
|
||||
List<DictData> billList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.BILL_TYPE.getCode()).getData();
|
||||
Map<String, DictData> mapBill = billList.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||
|
||||
//所属专业
|
||||
List<DictData> specialityList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.SPECIALITY_TYPE.getCode()).getData();
|
||||
Map<String, DictData> mapSpeciality = specialityList.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||
DictData dictData;
|
||||
for (SupvAlarm supvAlarm : supvAlarms) {
|
||||
|
||||
//单据类型
|
||||
if (mapBill.containsKey(supvAlarm.getBillType())) {
|
||||
dictData = mapBill.get(supvAlarm.getBillType());
|
||||
supvAlarm.setBillType(String.format("%02d", dictData.getAlgoDescribe()));
|
||||
}
|
||||
|
||||
//所属专业
|
||||
if (mapSpeciality.containsKey(supvAlarm.getSpecialityType())) {
|
||||
dictData = mapSpeciality.get(supvAlarm.getSpecialityType());
|
||||
supvAlarm.setSpecialityType(String.format("%02d", dictData.getAlgoDescribe()));
|
||||
}
|
||||
}
|
||||
List<AlarmVO> list = BeanUtil.copyToList(supvAlarms, AlarmVO.class);
|
||||
SendParam param = new SendParam();
|
||||
param.setStats(list);
|
||||
param.setProvinceId("13B9B47F1E483324E05338297A0A0595");
|
||||
String s = JSONObject.toJSONStringWithDateFormat(param, JSON.DEFFAULT_DATE_FORMAT);
|
||||
log.info(Thread.currentThread().getName() + "获取返回体 工作计划变更历史数据接口:" + s + "结束----!");
|
||||
Map<String, String> send = send(param, getUrl(8), "pqAlarmCreate");
|
||||
log.info(Thread.currentThread().getName() + "获取返回体 工作计划变更历史数据接口:" + send + "结束----!");
|
||||
if (send.containsKey("succeed")) {
|
||||
String succeed = send.get("succeed");
|
||||
if (succeed.indexOf("\\\"") != -1) {
|
||||
succeed = succeed.replace("\\\"", "\"");
|
||||
}
|
||||
Map map = JSON.parseObject(succeed, Map.class);
|
||||
String status = map.get("status").toString();
|
||||
if ("000000".equals(status)) {
|
||||
List<String> hisIds = supvAlarms.stream().map(SupvAlarm::getAlarmId).collect(Collectors.toList());
|
||||
supvAlarmService.update(new LambdaUpdateWrapper<SupvAlarm>()
|
||||
.set(SupvAlarm::getIsUploadHead, 1)
|
||||
.in(SupvAlarm::getAlarmId, hisIds)
|
||||
);
|
||||
|
||||
String result = map.get("result").toString();
|
||||
Map mapCount = JSON.parseObject(result, Map.class);
|
||||
String countNum = mapCount.get("count").toString();
|
||||
return "操作成功:成功数据" + countNum + "条";
|
||||
} else {
|
||||
String errors = map.get("errors").toString();
|
||||
throw new BusinessException("操作失败:" + status + "_" + errors);
|
||||
}
|
||||
} else {
|
||||
throw new BusinessException("当前时间段国网上送请求过多,请稍后再试");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String pushAlarmHis(List<String> ids) {
|
||||
List<SupvAlarmBack> supvAlarmBacks = supvAlarmBackService.listByIds(ids);
|
||||
if (supvAlarmBacks.size() > 100) {
|
||||
throw new BusinessException("一次最多上送100条数据");
|
||||
}
|
||||
List<AlarmBackVO> list = BeanUtil.copyToList(supvAlarmBacks, AlarmBackVO.class);
|
||||
SendParam param = new SendParam();
|
||||
param.setStats(list);
|
||||
param.setProvinceId("13B9B47F1E483324E05338297A0A0595");
|
||||
String s = JSONObject.toJSONStringWithDateFormat(param, JSON.DEFFAULT_DATE_FORMAT);
|
||||
log.info(Thread.currentThread().getName() + "获取返回体 工作计划变更历史数据接口:" + s + "结束----!");
|
||||
Map<String, String> send = send(param, getUrl(9), "pqAlarmBackCreate");
|
||||
log.info(Thread.currentThread().getName() + "获取返回体 工作计划变更历史数据接口:" + send + "结束----!");
|
||||
if (send.containsKey("succeed")) {
|
||||
String succeed = send.get("succeed");
|
||||
if (succeed.indexOf("\\\"") != -1) {
|
||||
succeed = succeed.replace("\\\"", "\"");
|
||||
}
|
||||
Map map = JSON.parseObject(succeed, Map.class);
|
||||
String status = map.get("status").toString();
|
||||
if ("000000".equals(status)) {
|
||||
List<String> hisIds = supvAlarmBacks.stream().map(SupvAlarmBack::getAlarmBackId).collect(Collectors.toList());
|
||||
|
||||
supvAlarmBackService.update(new LambdaUpdateWrapper<SupvAlarmBack>()
|
||||
.set(SupvAlarmBack::getIsUploadHead, 1)
|
||||
.in(SupvAlarmBack::getAlarmBackId, hisIds)
|
||||
);
|
||||
|
||||
String result = map.get("result").toString();
|
||||
Map mapCount = JSON.parseObject(result, Map.class);
|
||||
String countNum = mapCount.get("count").toString();
|
||||
return "操作成功:成功数据" + countNum + "条";
|
||||
} else {
|
||||
String errors = map.get("errors").toString();
|
||||
throw new BusinessException("操作失败:" + status + "_" + errors);
|
||||
}
|
||||
} else {
|
||||
throw new BusinessException("当前时间段国网上送请求过多,请稍后再试");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public Map<String, String> send(SendParam param, String url, String serviceName) {
|
||||
Map<String, String> map = new LinkedHashMap<>();
|
||||
try {
|
||||
HttpReturn ret = HttpCaller.invokeReturn(builder.build());
|
||||
String responseStr = ret.getResponseStr();//获取响应的文本串
|
||||
map.put("succeed", responseStr);
|
||||
} catch (HttpCallerException e) {
|
||||
// error process
|
||||
log.info(Thread.currentThread().getName() + "错误信息:" + e);
|
||||
map.put("error", e.toString());
|
||||
ContentBody cb;
|
||||
if (ObjectUtil.isNull(param)) {
|
||||
cb = new ContentBody("");
|
||||
} else {
|
||||
String s = JSONObject.toJSONStringWithDateFormat(param, JSON.DEFFAULT_DATE_FORMAT);
|
||||
log.info(Thread.currentThread().getName() + "1.信息:" + s);
|
||||
cb = new ContentBody(s);
|
||||
}
|
||||
//ContentBody传递,要求使用post方式进行调用
|
||||
//如果需要传递请求参数 可以拼接到请求URL中,或者设置paramsMap参数由SDK内部进行拼接
|
||||
HttpParameters.Builder builder = HttpParameters.newBuilder();
|
||||
|
||||
builder.requestURL(url) // 设置请求的URL,可以拼接URL请求参数
|
||||
.api("zongbuSync") // 设置服务名
|
||||
.version("1.0.0") // 设置版本号
|
||||
.method("post") // 设置调用方式, 必须为 post
|
||||
.contentType("application/json; charset=UTF-8") //设置请求content-type
|
||||
.accessKey("7d4cb2c0afb5468ca56e0654b1a442ef").secretKey("lW2xr6zKjbaqVDOSgQpcGrM6Rg0=");// 设置accessKey 和 设置secretKey
|
||||
|
||||
|
||||
builder.contentBody(cb);
|
||||
String token = LoginToken();
|
||||
builder.putHeaderParamsMap("x-token", token);
|
||||
builder.putHeaderParamsMap("serviceName", serviceName);
|
||||
//进行调用,返回结果
|
||||
try {
|
||||
HttpReturn ret = HttpCaller.invokeReturn(builder.build());
|
||||
String responseStr = ret.getResponseStr();//获取响应的文本串
|
||||
map.put("succeed", responseStr);
|
||||
} catch (HttpCallerException e) {
|
||||
// error process
|
||||
log.info(Thread.currentThread().getName() + "错误信息:" + e);
|
||||
map.put("error", e.toString());
|
||||
}
|
||||
}catch (Exception e){
|
||||
map.put("error", "当前时间段国网上送请求过多,请稍后再试");
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
public String LoginToken() {
|
||||
public String LoginToken() {
|
||||
String token = null;
|
||||
String clientId = "942a9278671711eda2e10ae0b5517f6c";
|
||||
String clientSecret = "3Psd2VEhsA3dVsSPHW0ll5r/03kAqlA2P4w2IiWPA8UWSadcX0we2wffjyTUYGsK";
|
||||
|
||||
String userUrl = "http://"+gwUrl+"/psr-auth/oauth/accessToken?grant_type={grant_type}&client_id={client_id}&client_secret={client_secret}";
|
||||
String userUrl = "http://" + gwUrl + "/psr-auth/oauth/accessToken?grant_type={grant_type}&client_id={client_id}&client_secret={client_secret}";
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("grant_type", "credentials");
|
||||
map.put("client_id", clientId);
|
||||
@@ -506,13 +686,13 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
//获取返回体
|
||||
Map body = userEntity.getBody();
|
||||
token = body.get("access_token").toString();
|
||||
}else{
|
||||
} else {
|
||||
throw new BusinessException("获取数据token出现未知异常!请检查ip端口是否正确!");
|
||||
}
|
||||
return token;
|
||||
}
|
||||
|
||||
public Map<String,String> sendFile(String url, SupvFile supvFile) throws IOException {
|
||||
public Map<String, String> sendFile(String url, SupvFile supvFile) throws IOException {
|
||||
String path = supvFile.getFileUrl();
|
||||
if (StrUtil.isBlank(path)) {
|
||||
throw new BusinessException("获取文件上传路径为空!请检查原始路径是否存在");
|
||||
@@ -532,7 +712,7 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
throw new BusinessException("文件服务器,文件不存在");
|
||||
}
|
||||
|
||||
Map<String,String> map=new LinkedHashMap<>();
|
||||
Map<String, String> map = new LinkedHashMap<>();
|
||||
|
||||
//ContentBody传递,要求使用post方式进行调用
|
||||
//如果需要传递请求参数 可以拼接到请求URL中,或者设置paramsMap参数由SDK内部进行拼接
|
||||
@@ -547,8 +727,8 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
|
||||
|
||||
String token = LoginToken();
|
||||
log.info(Thread.currentThread().getName() + "3.错误信息:"+token);
|
||||
builder.putHeaderParamsMap("x-token",token);
|
||||
log.info(Thread.currentThread().getName() + "3.错误信息:" + token);
|
||||
builder.putHeaderParamsMap("x-token", token);
|
||||
builder.putHeaderParamsMap("serviceName", "pqFileCreate");
|
||||
|
||||
String uploadTime = supvFile.getUploadTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||
@@ -562,17 +742,17 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
.putParamsMap("uploadTime", uploadTime)
|
||||
.putParamsMap("uploaderId", supvFile.getUploaderId());
|
||||
//设置上传文件
|
||||
builder.addAttachFile("file", attachmentName,fileStream);
|
||||
builder.addAttachFile("file", attachmentName, fileStream);
|
||||
|
||||
//进行调用,返回结果
|
||||
try {
|
||||
HttpReturn ret = HttpCaller.invokeReturn(builder.build());
|
||||
String responseStr = ret.getResponseStr();//获取响应的文本串
|
||||
map.put("succeed",responseStr);
|
||||
map.put("succeed", responseStr);
|
||||
} catch (HttpCallerException e) {
|
||||
// error process
|
||||
log.info(Thread.currentThread().getName() + "错误信息:"+e);
|
||||
map.put("error",e.toString());
|
||||
log.info(Thread.currentThread().getName() + "错误信息:" + e);
|
||||
map.put("error", e.toString());
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@@ -644,7 +824,7 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
* @return
|
||||
*/
|
||||
public String getUrl(Integer type) {
|
||||
String url = "http://"+gwUrl+"/CSB";
|
||||
String url = "http://" + gwUrl + "/CSB";
|
||||
|
||||
switch (type) {
|
||||
case 1:
|
||||
@@ -683,6 +863,24 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
*/
|
||||
url += "/WMCenter/powerQuality/plan/delete";
|
||||
break;
|
||||
case 7:
|
||||
/**
|
||||
* 接收电能质量技术监督工作计划变更历史数据接口
|
||||
*/
|
||||
url += "/WMCenter/powerQuality/plan/createHis";
|
||||
break;
|
||||
case 8:
|
||||
/**
|
||||
* 接收电能质量技术监督预告警单数据接口
|
||||
*/
|
||||
url += "/WMCenter/powerQuality/alarm/create";
|
||||
break;
|
||||
case 9:
|
||||
/**
|
||||
* 接收电能质量技术监督预告警单反馈数据接口
|
||||
*/
|
||||
url += "/WMCenter/powerQuality/alarm/backCreate";
|
||||
break;
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
@@ -97,9 +97,9 @@ public class SupvReportMServiceImpl extends MppServiceImpl<SupvReportMMapper, Su
|
||||
List<ProcessPublicDTO> processPublicDTOListY = this.baseMapper.statisticPlanReport(firstYearDay,endYearDay,mapStatistic.get(DicDataEnum.UHV_Converter.getCode()).getId(),null,null);
|
||||
List<ProcessPublicDTO> processPublicDTOListAll = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.UHV_Converter.getCode()).getId(),null, Stream.of("02","03","04").collect(Collectors.toList()));
|
||||
|
||||
List<ProcessPublicDTO> processPublicDTOListNewM = this.baseMapper.statisticPlanReport(firstDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),null,Stream.of("02","03","04").collect(Collectors.toList()));
|
||||
List<ProcessPublicDTO> processPublicDTOListNewY = this.baseMapper.statisticPlanReport(firstYearDay,endYearDay,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),null,null);
|
||||
List<ProcessPublicDTO> processPublicDTOListNewAll = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),null,Stream.of("02","03","04").collect(Collectors.toList()));
|
||||
List<ProcessPublicDTO> processPublicDTOListNewM = this.baseMapper.statisticPlanReport(firstDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"01",Stream.of("02","03","04").collect(Collectors.toList()));
|
||||
List<ProcessPublicDTO> processPublicDTOListNewY = this.baseMapper.statisticPlanReport(firstYearDay,endYearDay,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"01",null);
|
||||
List<ProcessPublicDTO> processPublicDTOListNewAll = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"01",Stream.of("02","03","04").collect(Collectors.toList()));
|
||||
|
||||
List<ProcessPublicDTO> processPublicDTOListNewZM = this.baseMapper.statisticPlanReport(firstDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"02",Stream.of("02","03","04").collect(Collectors.toList()));
|
||||
List<ProcessPublicDTO> processPublicDTOListNewZY = this.baseMapper.statisticPlanReport(firstYearDay,endYearDay,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"02",null);
|
||||
@@ -115,19 +115,20 @@ public class SupvReportMServiceImpl extends MppServiceImpl<SupvReportMMapper, Su
|
||||
List<ProcessPublicDTO> processPublicDTOQesYesAll = this.baseMapper.statisticQueReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.UHV_Converter.getCode()).getId(),"01",null);
|
||||
|
||||
//新能源问题总数量
|
||||
List<ProcessPublicDTO> processPublicDTOQesNewM = this.baseMapper.statisticQueReport(firstDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),null,null);
|
||||
List<ProcessPublicDTO> processPublicDTOQesNewAll = this.baseMapper.statisticQueReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),null,null);
|
||||
List<ProcessPublicDTO> processPublicDTOQesNewM = this.baseMapper.statisticQueReport(firstDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),null,"01");
|
||||
List<ProcessPublicDTO> processPublicDTOQesNewAll = this.baseMapper.statisticQueReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),null,"01");
|
||||
|
||||
//新能源问题已整改数量
|
||||
List<ProcessPublicDTO> processPublicDTOQesNewYesM = this.baseMapper.statisticQueReport(firstDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"01",null);
|
||||
List<ProcessPublicDTO> processPublicDTOQesNewYesAll = this.baseMapper.statisticQueReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"01",null);
|
||||
List<ProcessPublicDTO> processPublicDTOQesNewYesM = this.baseMapper.statisticQueReportRectify(firstDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"01","01");
|
||||
List<ProcessPublicDTO> processPublicDTOQesNewYesAll = this.baseMapper.statisticQueReportRectify(firstYearDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"01","01");
|
||||
|
||||
//新能源改扩建问题数量
|
||||
List<ProcessPublicDTO> processPublicDTOQesNewGaiM = this.baseMapper.statisticQueReport(firstDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),null,"02");
|
||||
List<ProcessPublicDTO> processPublicDTOQesNewGaiAll = this.baseMapper.statisticQueReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),null,"02");
|
||||
|
||||
List<ProcessPublicDTO> processPublicDTOQesNewGaiYesM = this.baseMapper.statisticQueReport(firstDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"01","02");
|
||||
List<ProcessPublicDTO> processPublicDTOQesNewGaiYesAll = this.baseMapper.statisticQueReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"01","02");
|
||||
//新能源改扩建整改问题数量
|
||||
List<ProcessPublicDTO> processPublicDTOQesNewGaiYesM = this.baseMapper.statisticQueReportRectify(firstDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"01","02");
|
||||
List<ProcessPublicDTO> processPublicDTOQesNewGaiYesAll = this.baseMapper.statisticQueReportRectify(firstYearDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"01","02");
|
||||
|
||||
|
||||
//敏感用户
|
||||
@@ -140,8 +141,8 @@ public class SupvReportMServiceImpl extends MppServiceImpl<SupvReportMMapper, Su
|
||||
List<ProcessPublicDTO> processPublicDTOQesMingGanAll = this.baseMapper.statisticQueReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.POWER_QUALITY.getCode()).getId(),null,null);
|
||||
|
||||
//敏感用户问题已整改数量
|
||||
List<ProcessPublicDTO> processPublicDTOQesMingGanYesM = this.baseMapper.statisticQueReport(firstDay,endTime,mapStatistic.get(DicDataEnum.POWER_QUALITY.getCode()).getId(),"01",null);
|
||||
List<ProcessPublicDTO> processPublicDTOQesMingGanYesAll = this.baseMapper.statisticQueReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.POWER_QUALITY.getCode()).getId(),"01",null);
|
||||
List<ProcessPublicDTO> processPublicDTOQesMingGanYesM = this.baseMapper.statisticQueReportRectify(firstDay,endTime,mapStatistic.get(DicDataEnum.POWER_QUALITY.getCode()).getId(),"01",null);
|
||||
List<ProcessPublicDTO> processPublicDTOQesMingGanYesAll = this.baseMapper.statisticQueReportRectify(firstYearDay,endTime,mapStatistic.get(DicDataEnum.POWER_QUALITY.getCode()).getId(),"01",null);
|
||||
|
||||
//电压
|
||||
List<ProcessPublicDTO> processPublicDTODianYaListM = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),null,null);
|
||||
@@ -150,8 +151,9 @@ public class SupvReportMServiceImpl extends MppServiceImpl<SupvReportMMapper, Su
|
||||
//本月问题数量和累计问题数量
|
||||
List<ProcessPublicDTO> processPublicDTODianYaGanM = this.baseMapper.statisticQueReport(firstDay,endTime,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),null,null);
|
||||
List<ProcessPublicDTO> processPublicDTODianYaGanAll = this.baseMapper.statisticQueReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),null,null);
|
||||
List<ProcessPublicDTO> processPublicDTODianYaGanYesM = this.baseMapper.statisticQueReport(firstDay,endTime,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),"01",null);
|
||||
List<ProcessPublicDTO> processPublicDTODianYaGanYesAll = this.baseMapper.statisticQueReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),"01",null);
|
||||
//整改
|
||||
List<ProcessPublicDTO> processPublicDTODianYaGanYesM = this.baseMapper.statisticQueReportRectify(firstDay,endTime,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),"01",null);
|
||||
List<ProcessPublicDTO> processPublicDTODianYaGanYesAll = this.baseMapper.statisticQueReportRectify(firstYearDay,endTime,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),"01",null);
|
||||
|
||||
|
||||
List<SupvReportM> supvReportMBatch = new ArrayList<>();
|
||||
|
||||
@@ -55,7 +55,8 @@ mybatis-plus:
|
||||
type-aliases-package: com.njcn.process.pojo
|
||||
|
||||
gw:
|
||||
url: 25.36.214.86:32234
|
||||
url: dwzyywzt-pms3-proxy.com
|
||||
code: 13B9B47F1E483324E05338297A0A0595
|
||||
|
||||
mqtt:
|
||||
client-id: @artifactId@${random.value}
|
||||
|
||||
Reference in New Issue
Block a user