1.暂降次数微调
2.报表接口调整
This commit is contained in:
@@ -39,7 +39,7 @@ public class MonitorSendController extends BaseController {
|
||||
@ApiOperation("国网上送接口")
|
||||
@ApiImplicitParam(name = "param",value = "请求体",required = true)
|
||||
public HttpResult<String> windSend(@RequestBody @Validated MonitorParam.Info param){
|
||||
String methodDescribe = getMethodDescribe("sendType");
|
||||
String methodDescribe = getMethodDescribe("windSend");
|
||||
String s = monitorSendService.sendType(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, s, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -1334,6 +1334,12 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
||||
|
||||
for (OracleTerminalExcel oracleTerminalExcel : oracleTerminalExcelList) {
|
||||
//单位
|
||||
if(oracleTerminalExcel.getGdName().equals("省检修")){
|
||||
oracleTerminalExcel.setGdName("国网河北超高压公司本部");
|
||||
}else {
|
||||
oracleTerminalExcel.setGdName("国网"+oracleTerminalExcel.getGdName()+"本部");
|
||||
}
|
||||
|
||||
if (!mapDept.containsKey(oracleTerminalExcel.getGdName())) {
|
||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "单位名称不存在,请确认单位名称是否正确"));
|
||||
continue;
|
||||
@@ -1524,141 +1530,173 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
||||
LambdaQueryWrapper<Monitor> monitorLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
monitorLambdaQueryWrapper.eq(Monitor::getLineId, lineId)
|
||||
.eq(Monitor::getName, oracleTerminalExcel.getLineName());
|
||||
Monitor monitor = monitorMapper.selectOne(monitorLambdaQueryWrapper);
|
||||
List<Monitor> monitorList = monitorMapper.selectList(monitorLambdaQueryWrapper);
|
||||
|
||||
if(CollUtil.isNotEmpty(monitorList)) {
|
||||
|
||||
for (Monitor monitor : monitorList) {
|
||||
|
||||
//当前电站下面没有监测点,可以新增
|
||||
Monitor monitorPO = new Monitor();
|
||||
|
||||
String monitorId = "04";
|
||||
String one = "";
|
||||
if (deptDTO.getName().contains("石家庄")) {
|
||||
one = "01";
|
||||
} else if (deptDTO.getName().contains("邯郸")) {
|
||||
one = "02";
|
||||
} else if (deptDTO.getName().contains("保定")) {
|
||||
one = "03";
|
||||
} else if (deptDTO.getName().contains("沧州")) {
|
||||
one = "04";
|
||||
} else if (deptDTO.getName().contains("邢台")) {
|
||||
one = "05";
|
||||
} else if (deptDTO.getName().contains("衡水")) {
|
||||
one = "06";
|
||||
} else if (deptDTO.getName().contains("超高压")) {
|
||||
one = "07";
|
||||
} else {
|
||||
one = "3.14159";
|
||||
}
|
||||
|
||||
String last = String.format("M%05d", oracleTerminalExcel.getId());
|
||||
|
||||
monitorPO.setMonitorId(monitorId + one + last);
|
||||
|
||||
|
||||
//当前电站下面没有监测点,可以新增
|
||||
Monitor monitorPO = new Monitor();
|
||||
monitorPO.setName(oracleTerminalExcel.getLineName());
|
||||
monitorPO.setPowerrName(stationName);
|
||||
monitorPO.setPowerrId(stationId);
|
||||
monitorPO.setOperationName(deptDTO.getName());
|
||||
monitorPO.setOperationId(deptDTO.getCode());
|
||||
monitorPO.setOrgName(deptDTO.getName());
|
||||
monitorPO.setOrgId(deptDTO.getCode());
|
||||
monitorPO.setLineName(lineName);
|
||||
monitorPO.setLineId(lineId);
|
||||
monitorPO.setVoltageLevel(genScale);
|
||||
monitorPO.setIsUploadHead(0);
|
||||
monitorPO.setMonitorOverlimitStatus(0);
|
||||
monitorPO.setMonitorOverlimitStatus(0);
|
||||
|
||||
String monitorId = "04";
|
||||
String one ="";
|
||||
if(deptDTO.getName().contains("石家庄")){
|
||||
one= "01";
|
||||
}else if(deptDTO.getName().contains("邯郸")){
|
||||
one= "02";
|
||||
}else if(deptDTO.getName().contains("保定")){
|
||||
one= "03";
|
||||
}else if(deptDTO.getName().contains("沧州")){
|
||||
one= "04";
|
||||
}else if(deptDTO.getName().contains("邢台")){
|
||||
one= "05";
|
||||
}else if(deptDTO.getName().contains("衡水")){
|
||||
one= "06";
|
||||
}else if(deptDTO.getName().contains("超高压")){
|
||||
one= "07";
|
||||
}else {
|
||||
one= "3.14159";
|
||||
}
|
||||
String monitorState = null;
|
||||
switch (oracleTerminalExcel.getRunFlag()) {
|
||||
case 0:
|
||||
monitorState = DicDataEnum.RUN.getName();
|
||||
break;
|
||||
case 1:
|
||||
monitorState = DicDataEnum.DEBUGGING.getName();
|
||||
break;
|
||||
case 2:
|
||||
monitorState = DicDataEnum.DECOMMISSIONING.getName();
|
||||
break;
|
||||
default:
|
||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典监测点状态不存在,请确认后重试"));
|
||||
break;
|
||||
|
||||
String last = String.format("M%05d",oracleTerminalExcel.getId());
|
||||
}
|
||||
if (monitorStateDicMap.containsKey(monitorState)) {
|
||||
monitorPO.setMonitorState(monitorStateDicMap.get(monitorState).getId());
|
||||
} else {
|
||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典监测点运行状态不存在,请确认后重试"));
|
||||
continue;
|
||||
}
|
||||
|
||||
monitorPO.setMonitorId(monitorId+one+last);
|
||||
monitorPO.setMonitorType(monitorType.getId());
|
||||
monitorPO.setStandShortCapacity(oracleTerminalExcel.getStandardCapacity());
|
||||
monitorPO.setMinShortCircuitCapacity(oracleTerminalExcel.getShortCapacity());
|
||||
monitorPO.setUserAgreementCapacity(oracleTerminalExcel.getDealCapacity());
|
||||
monitorPO.setPowerSupplyEqCapacity(oracleTerminalExcel.getDevCapacity());
|
||||
DictData scale = dicDataFeignClient.getDicDataById(monitorPO.getVoltageLevel()).getData();
|
||||
Overlimit overlimitTem = new Overlimit();
|
||||
COverlimitUtil.voltageDeviation(overlimitTem, Float.parseFloat(scale.getValue()));
|
||||
monitorPO.setVoltageDeviationLowerLimit(overlimitTem.getUvoltageDev());
|
||||
monitorPO.setVoltageDeviationUpperLimit(overlimitTem.getVoltageDev());
|
||||
monitorPO.setPotentialTransFormerType(potentialDic.getId());
|
||||
monitorPO.setNeutralGroundingMode(neutralDic.getId());
|
||||
monitorPO.setStatisticalInterval(oracleTerminalExcel.getTimeInterval());
|
||||
monitorPO.setTerminalId(devId);
|
||||
monitorPO.setIsSpecialSupplyElectricity(0);
|
||||
|
||||
monitorPO.setMonitorObjectName(oracleTerminalExcel.getObjName());
|
||||
|
||||
|
||||
monitorPO.setName(oracleTerminalExcel.getLineName());
|
||||
monitorPO.setPowerrName(stationName);
|
||||
monitorPO.setPowerrId(stationId);
|
||||
monitorPO.setOperationName(deptDTO.getName());
|
||||
monitorPO.setOperationId(deptDTO.getCode());
|
||||
monitorPO.setOrgName(deptDTO.getName());
|
||||
monitorPO.setOrgId(deptDTO.getCode());
|
||||
monitorPO.setLineName(lineName);
|
||||
monitorPO.setLineId(lineId);
|
||||
monitorPO.setVoltageLevel(genScale);
|
||||
monitorPO.setIsUploadHead(0);
|
||||
monitorPO.setMonitorOverlimitStatus(0);
|
||||
monitorPO.setMonitorOverlimitStatus(0);
|
||||
if (oracleTerminalExcel.getLoadType().equals("电加热负荷") ||oracleTerminalExcel.getLoadType().equals("轧机") || oracleTerminalExcel.getLoadType().equals("其他非线性负荷")) {
|
||||
if (objTypeDicMap.containsKey("冶炼负荷")) {
|
||||
String objTypeId = objTypeDicMap.get("冶炼负荷").getId();
|
||||
monitorPO.setMonitorTag(objTypeId);
|
||||
} else {
|
||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "冶炼负荷字典监测标签不存在,请确认后重试"));
|
||||
continue;
|
||||
}
|
||||
} else if (oracleTerminalExcel.getLoadType().equals("商业/市政/民用/电子通讯负荷")) {
|
||||
if (objTypeDicMap.containsKey("城市商业")) {
|
||||
String objTypeId = objTypeDicMap.get("城市商业").getId();
|
||||
monitorPO.setMonitorTag(objTypeId);
|
||||
} else {
|
||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "城市商业字典监测标签不存在,请确认后重试"));
|
||||
continue;
|
||||
}
|
||||
|
||||
String monitorState = null;
|
||||
switch (oracleTerminalExcel.getRunFlag()) {
|
||||
case 0:
|
||||
monitorState = DicDataEnum.RUN.getName();
|
||||
break;
|
||||
case 1:
|
||||
monitorState = DicDataEnum.DEBUGGING.getName();
|
||||
break;
|
||||
case 2:
|
||||
monitorState = DicDataEnum.DECOMMISSIONING.getName();
|
||||
break;
|
||||
default:
|
||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典监测点状态不存在,请确认后重试"));
|
||||
break;
|
||||
} else if (oracleTerminalExcel.getLoadType().equals("半导体制造") || oracleTerminalExcel.getLoadType().equals("精密加工")) {
|
||||
if (objTypeDicMap.containsKey("敏感用户")) {
|
||||
String objTypeId = objTypeDicMap.get("敏感用户").getId();
|
||||
monitorPO.setMonitorTag(objTypeId);
|
||||
} else {
|
||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "敏感用户字典监测标签不存在,请确认后重试"));
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
if (monitorStateDicMap.containsKey(monitorState)) {
|
||||
monitorPO.setMonitorState(monitorStateDicMap.get(monitorState).getId());
|
||||
} else {
|
||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典监测点运行状态不存在,请确认后重试"));
|
||||
continue;
|
||||
}
|
||||
} else if (oracleTerminalExcel.getLoadType().equals("二类变电站") || oracleTerminalExcel.getLoadType().equals("三类变电站") || oracleTerminalExcel.getLoadType().equals("四类变电站")) {
|
||||
if (objTypeDicMap.containsKey("主变高压侧")) {
|
||||
String objTypeId = objTypeDicMap.get("主变高压侧").getId();
|
||||
monitorPO.setMonitorTag(objTypeId);
|
||||
} else {
|
||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典监测标签不存在,请确认后重试"));
|
||||
continue;
|
||||
}
|
||||
}else if(oracleTerminalExcel.getLoadType().equals("跨省计量关口")){
|
||||
if (objTypeDicMap.containsKey("跨省联络线")) {
|
||||
String objTypeId = objTypeDicMap.get("跨省联络线").getId();
|
||||
monitorPO.setMonitorTag(objTypeId);
|
||||
} else {
|
||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "跨省联络线字典监测标签不存在,请确认后重试"));
|
||||
continue;
|
||||
}
|
||||
|
||||
monitorPO.setMonitorType(monitorType.getId());
|
||||
monitorPO.setStandShortCapacity(oracleTerminalExcel.getStandardCapacity());
|
||||
monitorPO.setMinShortCircuitCapacity(oracleTerminalExcel.getShortCapacity());
|
||||
monitorPO.setUserAgreementCapacity(oracleTerminalExcel.getDealCapacity());
|
||||
monitorPO.setPowerSupplyEqCapacity(oracleTerminalExcel.getDevCapacity());
|
||||
DictData scale = dicDataFeignClient.getDicDataById(monitorPO.getVoltageLevel()).getData();
|
||||
Overlimit overlimitTem = new Overlimit();
|
||||
COverlimitUtil.voltageDeviation(overlimitTem, Float.parseFloat(scale.getValue()));
|
||||
monitorPO.setVoltageDeviationLowerLimit(overlimitTem.getUvoltageDev());
|
||||
monitorPO.setVoltageDeviationUpperLimit(overlimitTem.getVoltageDev());
|
||||
monitorPO.setPotentialTransFormerType(potentialDic.getId());
|
||||
monitorPO.setNeutralGroundingMode(neutralDic.getId());
|
||||
monitorPO.setStatisticalInterval(oracleTerminalExcel.getTimeInterval());
|
||||
monitorPO.setTerminalId(devId);
|
||||
monitorPO.setIsSpecialSupplyElectricity(0);
|
||||
}else if(oracleTerminalExcel.getLoadType().equals("光伏电站")){
|
||||
if (objTypeDicMap.containsKey("光伏电站")) {
|
||||
String objTypeId = objTypeDicMap.get("光伏电站").getId();
|
||||
monitorPO.setMonitorTag(objTypeId);
|
||||
} else {
|
||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "光伏电站字典监测标签不存在,请确认后重试"));
|
||||
continue;
|
||||
}
|
||||
|
||||
monitorPO.setMonitorObjectName(oracleTerminalExcel.getObjName());
|
||||
} else {
|
||||
if (objTypeDicMap.containsKey(oracleTerminalExcel.getLoadType())) {
|
||||
String objTypeId = objTypeDicMap.get(oracleTerminalExcel.getLoadType()).getId();
|
||||
monitorPO.setMonitorTag(objTypeId);
|
||||
} else {
|
||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典监测标签不存在,请确认后重试"));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//监测点对象类型
|
||||
|
||||
if(oracleTerminalExcel.getLoadType().equals("电加热负荷") || oracleTerminalExcel.getLoadType().equals("商业/市政/民用/电子通讯负荷") ||oracleTerminalExcel.getLoadType().equals("其他非线性负荷")){
|
||||
if (objTypeDicMap.containsKey(oracleTerminalExcel.getLoadType())) {
|
||||
String objTypeId = objTypeDicMap.get("冶炼负荷").getId();
|
||||
monitorPO.setMonitorTag(objTypeId);
|
||||
}else {
|
||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典监测标签不存在,请确认后重试"));
|
||||
continue;
|
||||
}
|
||||
}else if(oracleTerminalExcel.getLoadType().equals("半导体制造") ||oracleTerminalExcel.getLoadType().equals("精密加工")){
|
||||
if (objTypeDicMap.containsKey(oracleTerminalExcel.getLoadType())) {
|
||||
String objTypeId = objTypeDicMap.get("重要或敏感用户").getId();
|
||||
monitorPO.setMonitorTag(objTypeId);
|
||||
}else {
|
||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典监测标签不存在,请确认后重试"));
|
||||
continue;
|
||||
}
|
||||
if (objTypeMap.containsKey(oracleTerminalExcel.getLoadType())) {
|
||||
String objTypeId = objTypeMap.get(oracleTerminalExcel.getLoadType()).getId();
|
||||
monitorPO.setObjType(objTypeId);
|
||||
}else if(oracleTerminalExcel.getLoadType().equals("电加热负荷")){
|
||||
String objTypeId = objTypeMap.get("电加热负荷(含电弧炉、中频炉、电热炉、单/多晶硅生产设备)").getId();
|
||||
monitorPO.setObjType(objTypeId);
|
||||
} else {
|
||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, oracleTerminalExcel.getLoadType() + "字典监测点对象类型不存在,请确认后重试"));
|
||||
continue;
|
||||
}
|
||||
|
||||
}else if(oracleTerminalExcel.getLoadType().equals("二类变电站") ||oracleTerminalExcel.getLoadType().equals("三类变电站") ||oracleTerminalExcel.getLoadType().equals("四类变电站")){
|
||||
if (objTypeDicMap.containsKey(oracleTerminalExcel.getLoadType())) {
|
||||
String objTypeId = objTypeDicMap.get("主变低压侧").getId();
|
||||
monitorPO.setMonitorTag(objTypeId);
|
||||
}else {
|
||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典监测标签不存在,请确认后重试"));
|
||||
continue;
|
||||
}
|
||||
}else {
|
||||
if (objTypeDicMap.containsKey(oracleTerminalExcel.getLoadType())) {
|
||||
String objTypeId = objTypeDicMap.get(oracleTerminalExcel.getLoadType()).getId();
|
||||
monitorPO.setMonitorTag(objTypeId);
|
||||
} else {
|
||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典监测标签不存在,请确认后重试"));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//监测点对象类型
|
||||
|
||||
if (objTypeMap.containsKey(oracleTerminalExcel.getLoadType())) {
|
||||
String objTypeId = objTypeMap.get(oracleTerminalExcel.getLoadType()).getId();
|
||||
monitorPO.setObjType(objTypeId);
|
||||
} else {
|
||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, oracleTerminalExcel.getLoadType()+"字典监测点对象类型不存在,请确认后重试"));
|
||||
continue;
|
||||
}
|
||||
|
||||
//行业类型
|
||||
//行业类型
|
||||
/* if (businessDicMap.containsKey(oracleTerminalExcel.getBusinessType())) {
|
||||
String busTypeId = businessDicMap.get(oracleTerminalExcel.getBusinessType()).getId();
|
||||
monitorPO.setTradeCode(busTypeId);
|
||||
@@ -1667,92 +1705,93 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
||||
continue;
|
||||
}*/
|
||||
|
||||
//TODO 监测点对象名称
|
||||
//TODO 监测点对象名称
|
||||
|
||||
|
||||
String wireMethod = "";
|
||||
switch (oracleTerminalExcel.getPtType()) {
|
||||
case 0:
|
||||
wireMethod = DicDataEnum.STAR.getName();
|
||||
break;
|
||||
case 1:
|
||||
wireMethod = DicDataEnum.STAR_TRIANGLE.getName();
|
||||
break;
|
||||
case 2:
|
||||
wireMethod = DicDataEnum.OPEN_DELTA.getName();
|
||||
break;
|
||||
default:
|
||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典接线方式不存在,请确认后重试"));
|
||||
break;
|
||||
}
|
||||
if (wireListMap.containsKey(wireMethod)) {
|
||||
monitorPO.setTerminalWiringMethod(wireListMap.get(wireMethod).getId());
|
||||
} else {
|
||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典接线方式不存在,请确认后重试"));
|
||||
continue;
|
||||
}
|
||||
String wireMethod = "";
|
||||
switch (oracleTerminalExcel.getPtType()) {
|
||||
case 0:
|
||||
wireMethod = DicDataEnum.STAR.getName();
|
||||
break;
|
||||
case 1:
|
||||
wireMethod = DicDataEnum.STAR_TRIANGLE.getName();
|
||||
break;
|
||||
case 2:
|
||||
wireMethod = DicDataEnum.OPEN_DELTA.getName();
|
||||
break;
|
||||
default:
|
||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典接线方式不存在,请确认后重试"));
|
||||
break;
|
||||
}
|
||||
if (wireListMap.containsKey(wireMethod)) {
|
||||
monitorPO.setTerminalWiringMethod(wireListMap.get(wireMethod).getId());
|
||||
} else {
|
||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典接线方式不存在,请确认后重试"));
|
||||
continue;
|
||||
}
|
||||
|
||||
monitorPO.setStatus(DataStateEnum.ENABLE.getCode());
|
||||
monitorPO.setIsSpecialMonitor(0);
|
||||
monitorPO.setPt1(oracleTerminalExcel.getPt1());
|
||||
monitorPO.setPt2(oracleTerminalExcel.getPt2());
|
||||
monitorPO.setCt1(oracleTerminalExcel.getCt1());
|
||||
monitorPO.setCt2(oracleTerminalExcel.getCt2());
|
||||
monitorPO.setStatus(DataStateEnum.ENABLE.getCode());
|
||||
monitorPO.setIsSpecialMonitor(0);
|
||||
monitorPO.setPt1(oracleTerminalExcel.getPt1());
|
||||
monitorPO.setPt2(oracleTerminalExcel.getPt2());
|
||||
monitorPO.setCt1(oracleTerminalExcel.getCt1());
|
||||
monitorPO.setCt2(oracleTerminalExcel.getCt2());
|
||||
|
||||
|
||||
if(oracleTerminalExcel.getLoadType().equals("光伏电站") || oracleTerminalExcel.getLoadType().equals("风电场")){
|
||||
monitorPO.setFieldStation("01");
|
||||
}
|
||||
if (oracleTerminalExcel.getLoadType().equals("光伏电站") || oracleTerminalExcel.getLoadType().equals("风电场")) {
|
||||
monitorPO.setFieldStation("01");
|
||||
}
|
||||
|
||||
if(oracleTerminalExcel.getPowerFlag() == 0){
|
||||
monitorPO.setPowerFlag("101");
|
||||
}else if(oracleTerminalExcel.getPowerFlag() == 1){
|
||||
monitorPO.setPowerFlag("102");
|
||||
}
|
||||
if (oracleTerminalExcel.getPowerFlag() == 0) {
|
||||
monitorPO.setPowerFlag("101");
|
||||
} else if (oracleTerminalExcel.getPowerFlag() == 1) {
|
||||
monitorPO.setPowerFlag("102");
|
||||
}
|
||||
|
||||
|
||||
if (Objects.isNull(lineBak) && Objects.isNull(monitor)) {
|
||||
monitorPO.setIsUpToGrid(0);
|
||||
monitorMapper.insert(monitorPO);
|
||||
Overlimit overlimit = COverlimitUtil.globalAssemble(Float.parseFloat(scale.getValue()), oracleTerminalExcel.getDealCapacity(), oracleTerminalExcel.getDevCapacity(), oracleTerminalExcel.getShortCapacity(), 0, 0);
|
||||
overlimit.setId(monitorPO.getId());
|
||||
Overlimit overlimitRes = overlimitMapper.selectById(monitorPO.getId());
|
||||
if (Objects.isNull(overlimitRes)) {
|
||||
overlimitMapper.insert(overlimit);
|
||||
} else {
|
||||
overlimitMapper.updateById(overlimit);
|
||||
}
|
||||
|
||||
LineBak lineBakPO = new LineBak();
|
||||
lineBakPO.setId(monitorPO.getId());
|
||||
lineBakPO.setLineId(oracleTerminalExcel.getId());
|
||||
lineBakMapper.insert(lineBakPO);
|
||||
} else {
|
||||
if (Objects.isNull(lineBak)) {
|
||||
LineBak lineBakPO = new LineBak();
|
||||
lineBakPO.setId(monitor.getId());
|
||||
lineBakPO.setLineId(oracleTerminalExcel.getId());
|
||||
lineBakMapper.insert(lineBakPO);
|
||||
monitorMapper.updateById(monitorPO);
|
||||
} else if (Objects.isNull(monitor)) {
|
||||
monitorPO.setIsUpToGrid(0);
|
||||
monitorMapper.deleteById(lineBak.getId());
|
||||
monitorPO.setId(lineBak.getId());
|
||||
monitorMapper.insert(monitorPO);
|
||||
} else {
|
||||
monitorPO.setId(lineBak.getId());
|
||||
monitorMapper.updateById(monitorPO);
|
||||
}
|
||||
|
||||
if (Objects.isNull(lineBak) && Objects.isNull(monitor)) {
|
||||
monitorPO.setIsUpToGrid(0);
|
||||
monitorMapper.insert(monitorPO);
|
||||
Overlimit overlimit = COverlimitUtil.globalAssemble(Float.parseFloat(scale.getValue()), oracleTerminalExcel.getDealCapacity(), oracleTerminalExcel.getDevCapacity(), oracleTerminalExcel.getShortCapacity(), 0, 0);
|
||||
overlimit.setId(monitorPO.getId());
|
||||
Overlimit overlimitRes = overlimitMapper.selectById(monitorPO.getId());
|
||||
if (Objects.isNull(overlimitRes)) {
|
||||
overlimitMapper.insert(overlimit);
|
||||
} else {
|
||||
overlimitMapper.updateById(overlimit);
|
||||
}
|
||||
Overlimit overlimit = COverlimitUtil.globalAssemble(Float.parseFloat(scale.getValue()), oracleTerminalExcel.getDealCapacity(), oracleTerminalExcel.getDevCapacity(), oracleTerminalExcel.getShortCapacity(), 0, 0);
|
||||
overlimit.setId(monitorPO.getId());
|
||||
Overlimit overlimitRes = overlimitMapper.selectById(monitorPO.getId());
|
||||
if (Objects.isNull(overlimitRes)) {
|
||||
overlimitMapper.insert(overlimit);
|
||||
} else {
|
||||
overlimitMapper.updateById(overlimit);
|
||||
}
|
||||
|
||||
LineBak lineBakPO = new LineBak();
|
||||
lineBakPO.setId(monitorPO.getId());
|
||||
lineBakPO.setLineId(oracleTerminalExcel.getId());
|
||||
lineBakMapper.insert(lineBakPO);
|
||||
} else {
|
||||
if (Objects.isNull(lineBak)) {
|
||||
LineBak lineBakPO = new LineBak();
|
||||
lineBakPO.setId(monitor.getId());
|
||||
lineBakPO.setLineId(oracleTerminalExcel.getId());
|
||||
lineBakMapper.insert(lineBakPO);
|
||||
monitorMapper.updateById(monitorPO);
|
||||
} else if (Objects.isNull(monitor)) {
|
||||
monitorPO.setIsUpToGrid(0);
|
||||
monitorMapper.deleteById(lineBak.getId());
|
||||
monitorPO.setId(lineBak.getId());
|
||||
monitorMapper.insert(monitorPO);
|
||||
} else {
|
||||
monitorPO.setId(lineBak.getId());
|
||||
monitorMapper.updateById(monitorPO);
|
||||
}
|
||||
|
||||
Overlimit overlimit = COverlimitUtil.globalAssemble(Float.parseFloat(scale.getValue()), oracleTerminalExcel.getDealCapacity(), oracleTerminalExcel.getDevCapacity(), oracleTerminalExcel.getShortCapacity(), 0, 0);
|
||||
overlimit.setId(monitorPO.getId());
|
||||
Overlimit overlimitRes = overlimitMapper.selectById(monitorPO.getId());
|
||||
if (Objects.isNull(overlimitRes)) {
|
||||
overlimitMapper.insert(overlimit);
|
||||
} else {
|
||||
overlimitMapper.updateById(overlimit);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user