技术监督管理调整
This commit is contained in:
@@ -4,9 +4,11 @@ import com.njcn.common.pojo.constant.ServerInfo;
|
|||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.device.pms.api.fallback.StatationStatClientFallbackFactory;
|
import com.njcn.device.pms.api.fallback.StatationStatClientFallbackFactory;
|
||||||
import com.njcn.device.pms.pojo.dto.PmsStatationStatInfoDTO;
|
import com.njcn.device.pms.pojo.dto.PmsStatationStatInfoDTO;
|
||||||
|
import com.njcn.device.pms.pojo.param.PmsBaseParam;
|
||||||
import com.njcn.device.pms.pojo.param.PmsStatationStatInfoParam;
|
import com.njcn.device.pms.pojo.param.PmsStatationStatInfoParam;
|
||||||
import com.njcn.device.pms.pojo.po.StatationStat;
|
import com.njcn.device.pms.pojo.po.StatationStat;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
||||||
@@ -43,4 +45,8 @@ public interface StatationStatClient {
|
|||||||
HttpResult<List<StatationStat>> getPowerInfo(@RequestBody PmsStatationStatInfoParam param);
|
HttpResult<List<StatationStat>> getPowerInfo(@RequestBody PmsStatationStatInfoParam param);
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/getstatationStatList")
|
||||||
|
HttpResult<List<StatationStat>> getstatationStatList(@RequestBody PmsBaseParam pmsBaseParam);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.njcn.common.pojo.exception.BusinessException;
|
|||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.device.pms.api.StatationStatClient;
|
import com.njcn.device.pms.api.StatationStatClient;
|
||||||
import com.njcn.device.pms.pojo.dto.PmsStatationStatInfoDTO;
|
import com.njcn.device.pms.pojo.dto.PmsStatationStatInfoDTO;
|
||||||
|
import com.njcn.device.pms.pojo.param.PmsBaseParam;
|
||||||
import com.njcn.device.pms.pojo.param.PmsStatationStatInfoParam;
|
import com.njcn.device.pms.pojo.param.PmsStatationStatInfoParam;
|
||||||
import com.njcn.device.pms.pojo.po.StatationStat;
|
import com.njcn.device.pms.pojo.po.StatationStat;
|
||||||
import com.njcn.device.pms.utils.PmsDeviceEnumUtil;
|
import com.njcn.device.pms.utils.PmsDeviceEnumUtil;
|
||||||
@@ -44,6 +45,12 @@ public class StatationStatClientFallbackFactory implements FallbackFactory<Stata
|
|||||||
log.error("{}异常,降级处理,异常为:{}", "获取变电站信息", throwable.toString());
|
log.error("{}异常,降级处理,异常为:{}", "获取变电站信息", throwable.toString());
|
||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<StatationStat>> getstatationStatList(PmsBaseParam pmsBaseParam) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "获取变电站信息", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -203,5 +203,7 @@ public class SupvReportM {
|
|||||||
*/
|
*/
|
||||||
private Integer powerTotalConductedNum;
|
private Integer powerTotalConductedNum;
|
||||||
|
|
||||||
|
private Integer isuploadhead;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ public class SupvPlanVO {
|
|||||||
* 关联电站
|
* 关联电站
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "关联电站")
|
@ApiModelProperty(value = "关联电站")
|
||||||
private String objRelationStation;
|
private String substationName;
|
||||||
|
|
||||||
@ApiModelProperty(value = "关联电站电压等级")
|
@ApiModelProperty(value = "关联电站电压等级")
|
||||||
private String substationVoltageLevel;
|
private String substationVoltageLevel;
|
||||||
|
|||||||
@@ -100,4 +100,18 @@ public class SupvPushGwController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除电能质量技术监督工作计划接口
|
||||||
|
* @author cdf
|
||||||
|
* @date 2023/6/28
|
||||||
|
*/
|
||||||
|
@PostMapping("delPushPlan")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@ApiOperation("取消电能质量技术监督工作计划接口")
|
||||||
|
@ApiImplicitParam(name = "planIds",value = "请求体",required = true)
|
||||||
|
public HttpResult<Object> delPushPlan(@RequestBody List<String> planIds){
|
||||||
|
String methodDescribe = getMethodDescribe("delPushPlan");
|
||||||
|
supvPushGwService.deletePlan(planIds);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -169,6 +169,9 @@ public class SupvPlanServiceImpl extends ServiceImpl<SupvPlanMapper, SupvPlan> i
|
|||||||
if(map.containsKey(item.getCreateBy())) {
|
if(map.containsKey(item.getCreateBy())) {
|
||||||
item.setCreateBy(map.get(item.getCreateBy()).getName());
|
item.setCreateBy(map.get(item.getCreateBy()).getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
Page<SupvPlanVO> pageVo = new Page<>();
|
Page<SupvPlanVO> pageVo = new Page<>();
|
||||||
pageVo.setTotal(page.getTotal());
|
pageVo.setTotal(page.getTotal());
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ public class SupvProblemServiceImpl extends ServiceImpl<SupvProblemMapper, SupvP
|
|||||||
BeanUtil.copyProperties(supvProblemParam,supvProblem);
|
BeanUtil.copyProperties(supvProblemParam,supvProblem);
|
||||||
supvProblem.setPlanRectificationTime(PubUtils.localDateFormat(supvProblemParam.getPlanRectificationTime()));
|
supvProblem.setPlanRectificationTime(PubUtils.localDateFormat(supvProblemParam.getPlanRectificationTime()));
|
||||||
supvProblem.setRectificationTime(PubUtils.localDateFormat(supvProblemParam.getRectificationTime()));
|
supvProblem.setRectificationTime(PubUtils.localDateFormat(supvProblemParam.getRectificationTime()));
|
||||||
|
supvProblem.setIsUploadHead(0);
|
||||||
this.save(supvProblem);
|
this.save(supvProblem);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -252,11 +252,28 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
|||||||
throw new BusinessException("一次最多上送100条数据");
|
throw new BusinessException("一次最多上送100条数据");
|
||||||
}
|
}
|
||||||
//TODO 调用上送接口
|
//TODO 调用上送接口
|
||||||
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean deletePlan(List<String> planIds) {
|
public boolean deletePlan(List<String> planIds) {
|
||||||
return false;
|
|
||||||
|
List<SupvPlan> supvPlanList = new ArrayList<>();
|
||||||
|
for(String id : planIds) {
|
||||||
|
SupvPlan supvPlan = new SupvPlan();
|
||||||
|
supvPlan.setPlanId(id);
|
||||||
|
supvPlanList.add(supvPlan);
|
||||||
|
}
|
||||||
|
|
||||||
|
//TODO
|
||||||
|
|
||||||
|
|
||||||
|
for(SupvPlan supvPlan : supvPlanList) {
|
||||||
|
supvPlan.setIsUploadHead(2);
|
||||||
|
supvPlanMapper.updateById(supvPlan);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -249,6 +249,7 @@ public class SupvReportMServiceImpl extends MppServiceImpl<SupvReportMMapper, Su
|
|||||||
supvReportM.setStatisticsLevel("5");
|
supvReportM.setStatisticsLevel("5");
|
||||||
}
|
}
|
||||||
supvReportM.setSupvNum(all);
|
supvReportM.setSupvNum(all);
|
||||||
|
supvReportM.setIsuploadhead(0);
|
||||||
supvReportMBatch.add(supvReportM);
|
supvReportMBatch.add(supvReportM);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user