计划监督bug修改,添加部分json属性数据
This commit is contained in:
@@ -168,8 +168,8 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
|
||||
//电站等级
|
||||
if(mapVoltage.containsKey(supvPlan.getSubstationVoltageLevel())) {
|
||||
supvPlan.setSubstationVoltageLevel(String.format("%02d", mapVoltage.get(supvPlan.getSubstationVoltageLevel()).getAlgoDescribe()));
|
||||
supvPlan.setSubstationVoltageLevelName(mapVoltage.get(supvPlan.getSubstationVoltageLevel()).getName());
|
||||
supvPlan.setSubstationVoltageLevel(String.format("%02d", mapVoltage.get(supvPlan.getSubstationVoltageLevel()).getAlgoDescribe()));
|
||||
|
||||
}
|
||||
|
||||
@@ -179,11 +179,15 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
supvPlan.setObjVoltageLevelName(dictData.getName());
|
||||
}
|
||||
|
||||
|
||||
//判断用户是否存在
|
||||
if (map.containsKey(supvPlan.getPlanUserId())) {
|
||||
supvPlan.setPlanUserName(map.get(supvPlan.getPlanUserId()).getName());
|
||||
}
|
||||
|
||||
//添加计划单位名称
|
||||
if(mapCode.containsKey(supvPlan.getPlanOrgId())){
|
||||
pvTerminalTreeVO = mapCode.get(supvPlan.getPlanOrgId());
|
||||
supvPlan.setPlanOrgName(pvTerminalTreeVO.getName());
|
||||
}
|
||||
}
|
||||
if(supvPlanList.size()>100){
|
||||
throw new BusinessException("一次最多上送100条数据");
|
||||
@@ -197,12 +201,12 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
JSONArray objects = new JSONArray(Collections.singletonList(supvPlanList));
|
||||
String s = objects.toString();
|
||||
log.info(Thread.currentThread().getName() + "获取返回体 推送技术监督工作计划:" + s + "结束----!");
|
||||
for(SupvPlan supvPlan: supvPlanList){
|
||||
SupvPlan supvPlanPO = new SupvPlan();
|
||||
supvPlanPO.setPlanId(supvPlan.getPlanId());
|
||||
supvPlanPO.setIsUploadHead(1);
|
||||
supvPlanMapper.updateById(supvPlanPO);
|
||||
}
|
||||
// for(SupvPlan supvPlan: supvPlanList){
|
||||
// SupvPlan supvPlanPO = new SupvPlan();
|
||||
// supvPlanPO.setPlanId(supvPlan.getPlanId());
|
||||
// supvPlanPO.setIsUploadHead(1);
|
||||
// supvPlanMapper.updateById(supvPlanPO);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
@@ -235,7 +239,7 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
supvProblem.setMonitorType(String.format("%02d",mapMonitorType.get(supvProblem.getMonitorType()).getAlgoDescribe()));
|
||||
}
|
||||
if(mapProblemType.containsKey(supvProblem.getProblemType())){
|
||||
supvProblem.setProblemType(String.format("%02d",mapProblemType.get(supvProblem.getMonitorType()).getAlgoDescribe()));
|
||||
supvProblem.setProblemType(String.format("%02d",mapProblemType.get(supvProblem.getProblemType()).getAlgoDescribe()));
|
||||
}
|
||||
if(mapRe.containsKey(supvProblem.getRectificationMeasure())){
|
||||
supvProblem.setRectificationMeasure(String.format("%02d",mapRe.get(supvProblem.getRectificationMeasure()).getAlgoDescribe()));
|
||||
@@ -253,12 +257,12 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
JSONArray objects = new JSONArray(Collections.singletonList(supvProblemList));
|
||||
String s = objects.toString();
|
||||
log.info(Thread.currentThread().getName() + "获取返回体 推送技术监督实施问题:" + s + "结束----!");
|
||||
for(SupvProblem supvProblem:supvProblemList){
|
||||
SupvProblem supvProblemPO = new SupvProblem();
|
||||
supvProblemPO.setProblemId(supvProblem.getProblemId());
|
||||
supvProblemPO.setIsUploadHead(1);
|
||||
supvProblemMapper.updateById(supvProblemPO);
|
||||
}
|
||||
// for(SupvProblem supvProblem:supvProblemList){
|
||||
// SupvProblem supvProblemPO = new SupvProblem();
|
||||
// supvProblemPO.setProblemId(supvProblem.getProblemId());
|
||||
// supvProblemPO.setIsUploadHead(1);
|
||||
// supvProblemMapper.updateById(supvProblemPO);
|
||||
// }
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -294,12 +298,12 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
JSONArray objects = new JSONArray(Collections.singletonList(supvReportMList));
|
||||
String s = objects.toString();
|
||||
log.info(Thread.currentThread().getName() + "获取返回体 推送技术监督月报统计数据接口:" + s + "结束----!");
|
||||
for(SupvReportM supvReportM : supvReportMList){
|
||||
SupvReportM supvReportMPO = new SupvReportM();
|
||||
supvReportMPO.setMonthReportId(supvReportM.getMonthReportId());
|
||||
supvReportMPO.setIsUploadHead(1);
|
||||
supvReportMMapper.updateById(supvReportMPO);
|
||||
}
|
||||
// for(SupvReportM supvReportM : supvReportMList){
|
||||
// SupvReportM supvReportMPO = new SupvReportM();
|
||||
// supvReportMPO.setMonthReportId(supvReportM.getMonthReportId());
|
||||
// supvReportMPO.setIsUploadHead(1);
|
||||
// supvReportMMapper.updateById(supvReportMPO);
|
||||
// }
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -326,10 +330,10 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
JSONArray objects = new JSONArray(Collections.singletonList(supvPlanList));
|
||||
String s = objects.toString();
|
||||
log.info(Thread.currentThread().getName() + "获取返回体 取消电能质量技术监督工作计划接口:" + s + "结束----!");
|
||||
for(SupvPlan supvPlan : supvPlanList) {
|
||||
supvPlan.setIsUploadHead(2);
|
||||
supvPlanMapper.updateById(supvPlan);
|
||||
}
|
||||
// for(SupvPlan supvPlan : supvPlanList) {
|
||||
// supvPlan.setIsUploadHead(2);
|
||||
// supvPlanMapper.updateById(supvPlan);
|
||||
// }
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -424,7 +428,7 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
* @return
|
||||
*/
|
||||
public static String getUrl(Integer type){
|
||||
String url="http://25.36.214.86:32234";
|
||||
String url="http://25.36.214.86:32234/CSB";
|
||||
|
||||
switch (type){
|
||||
case 1:
|
||||
|
||||
Reference in New Issue
Block a user