1.国网上送典型台账——干扰用户监测调整

This commit is contained in:
wr
2024-02-27 16:23:59 +08:00
parent 67d6b245d6
commit a530e9fa08
2 changed files with 22 additions and 10 deletions

View File

@@ -156,7 +156,8 @@ public class MonitorSendServiceImpl implements MonitorSendService {
str.append(""+(i+1)+"次循环:"+ returnInformation(1, trIds, trMap)+";</br>"); str.append(""+(i+1)+"次循环:"+ returnInformation(1, trIds, trMap)+";</br>");
} }
break; break;
case "2300": // case "2300":
default:
List<OtherUserDto> other = this.otherUserSend(monitorList); List<OtherUserDto> other = this.otherUserSend(monitorList);
sendSize(other); sendSize(other);
List<List<OtherUserDto>> otSplit = ListUtil.split(other, 100); List<List<OtherUserDto>> otSplit = ListUtil.split(other, 100);
@@ -168,8 +169,6 @@ public class MonitorSendServiceImpl implements MonitorSendService {
str.append(""+(i++)+"循环:"+ returnInformation(1, otIds, otMap)+";</br>"); str.append(""+(i++)+"循环:"+ returnInformation(1, otIds, otMap)+";</br>");
} }
break; break;
default:
throw new BusinessException("请选择国网上送的监测点标签上送");
} }
return str.toString(); return str.toString();
} }

View File

@@ -3,11 +3,14 @@ package com.njcn.system.timer.tasks;
import com.njcn.common.pojo.exception.BusinessException; import com.njcn.common.pojo.exception.BusinessException;
import com.njcn.device.pms.api.MonitorSendClient; import com.njcn.device.pms.api.MonitorSendClient;
import com.njcn.device.pms.pojo.param.MonitorParam; import com.njcn.device.pms.pojo.param.MonitorParam;
import com.njcn.system.pojo.vo.DictTreeVO;
import com.njcn.system.service.SysDicTreePOService; import com.njcn.system.service.SysDicTreePOService;
import com.njcn.system.timer.TimerTaskRunner; import com.njcn.system.timer.TimerTaskRunner;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.List;
/** /**
* *
@@ -22,13 +25,23 @@ public class MonitorSendOtherUserTaskRunner implements TimerTaskRunner {
@Override @Override
public void action() { public void action() {
List<DictTreeVO> dictTreeVOS = sysDicTreePOService.queryByPid("0");
for (DictTreeVO dictTreeVO : dictTreeVOS) {
if(dictTreeVO.getCode().equals("1401")||
dictTreeVO.getCode().equals("1402")||
dictTreeVO.getCode().equals("2400")||
dictTreeVO.getCode().equals("1300")||
dictTreeVO.getCode().equals("Device_Unit")){
continue;
}
//干扰用户 //干扰用户
MonitorParam.Info param4 = new MonitorParam.Info(); MonitorParam.Info param = new MonitorParam.Info();
param4.setObjType(sysDicTreePOService.queryByCode("2300").getId()); param.setObjType(dictTreeVO.getId());
param4.setFiy(true); param.setFiy(true);
String code = monitorSendClient.windSend(param4).getCode(); String code = monitorSendClient.windSend(param).getCode();
if(code.equals("A0002")){ if(code.equals("A0002")){
throw new BusinessException("失败"); throw new BusinessException("失败");
} }
} }
}
} }