|
@@ -16,6 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
|
+import java.net.URLEncoder;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
@@ -64,50 +65,45 @@ public class BuildingService {
|
|
encodedPointValue3 = URLEncoder.encode("烟雾", "UTF-8");
|
|
encodedPointValue3 = URLEncoder.encode("烟雾", "UTF-8");
|
|
encodedPointValue4 = URLEncoder.encode("液位", "UTF-8");
|
|
encodedPointValue4 = URLEncoder.encode("液位", "UTF-8");
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
- }
|
|
|
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
-
|
|
|
|
|
|
+ LargeBuildingControl largeBuildingControl = new LargeBuildingControl(
|
|
|
|
+ repeat(ApiUrlConfig.getControlElectricity(), null),
|
|
|
|
+ repeat(ApiUrlConfig.getControlElevator(), null),
|
|
|
|
+ repeat(ApiUrlConfig.getControlElectricityRoom(), null),
|
|
|
|
+ repeat(ApiUrlConfig.getControlTodaySum(), null),
|
|
|
|
+ repeat(ApiUrlConfig.getControlMonthSum(), "type="+encodedParamValue),
|
|
|
|
+ repeat(ApiUrlConfig.getControlMonthSum(), "type="+encodedParamValue2),
|
|
|
|
+ repeat(ApiUrlConfig.getControlMonthSum(), "type="+encodedParamValue3),
|
|
|
|
+ repeat(ApiUrlConfig.getControlImportantSum(), "type="+encodedParamValue),
|
|
|
|
+ repeat(ApiUrlConfig.getControlImportantSum(), "type="+encodedParamValue2),
|
|
|
|
+ repeat(ApiUrlConfig.getControlImportantSum(), "type="+encodedParamValue3),
|
|
|
|
+ repeat(ApiUrlConfig.getControlEquipment(), null),
|
|
|
|
+ normalNum,
|
|
|
|
+ abnormalNum,
|
|
|
|
+ repeat(ApiUrlConfig.getControlAlarm(), null),
|
|
|
|
+ repeat(ApiUrlConfig.getControlWater(), "position=23F"),
|
|
|
|
+ repeat(ApiUrlConfig.getControlWater(), "position="+encodedParamValue4),
|
|
|
|
+ repeat(ApiUrlConfig.getPhotovoltaicPower(), null)
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ largeBuildingControl.setAbnormalPointOne(repeat(ApiUrlConfig.getControlAlertDetails(), "type="+encodedPointValue));
|
|
|
|
+ largeBuildingControl.setAbnormalPointTwo(repeat(ApiUrlConfig.getControlAlertDetails(), "type="+encodedPointValue2));
|
|
|
|
+ largeBuildingControl.setAbnormalPointThree(repeat(ApiUrlConfig.getControlAlertDetails(), "type="+encodedPointValue3));
|
|
|
|
+ largeBuildingControl.setAbnormalPointFour(repeat(ApiUrlConfig.getControlAlertDetails(), "type="+encodedPointValue4));
|
|
|
|
+
|
|
|
|
+ if (platBuildingMapper.getExist() > 0){
|
|
|
|
+ platBuildingMapper.updateBuildingControl(largeBuildingControl);
|
|
|
|
+ } else {
|
|
|
|
+ largeBuildingControl.setWaterDeviceAirNum(0L);
|
|
|
|
+ platBuildingMapper.addBuildingControl(largeBuildingControl);
|
|
|
|
+ }
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
- LargeBuildingControl largeBuildingControl = new LargeBuildingControl(
|
|
|
|
- repeat(ApiUrlConfig.getControlElectricity(), null),
|
|
|
|
- repeat(ApiUrlConfig.getControlElevator(), null),
|
|
|
|
- repeat(ApiUrlConfig.getControlElectricityRoom(), null),
|
|
|
|
- repeat(ApiUrlConfig.getControlTodaySum(), null),
|
|
|
|
- repeat(ApiUrlConfig.getControlMonthSum(), "type="+encodedParamValue),
|
|
|
|
- repeat(ApiUrlConfig.getControlMonthSum(), "type="+encodedParamValue2),
|
|
|
|
- repeat(ApiUrlConfig.getControlMonthSum(), "type="+encodedParamValue3),
|
|
|
|
- repeat(ApiUrlConfig.getControlImportantSum(), "type="+encodedParamValue),
|
|
|
|
- repeat(ApiUrlConfig.getControlImportantSum(), "type="+encodedParamValue2),
|
|
|
|
- repeat(ApiUrlConfig.getControlImportantSum(), "type="+encodedParamValue3),
|
|
|
|
- repeat(ApiUrlConfig.getControlEquipment(), null),
|
|
|
|
- normalNum,
|
|
|
|
- abnormalNum,
|
|
|
|
- repeat(ApiUrlConfig.getControlAlarm(), null),
|
|
|
|
- repeat(ApiUrlConfig.getControlWater(), "position=23F"),
|
|
|
|
- repeat(ApiUrlConfig.getControlWater(), "position="+encodedParamValue4),
|
|
|
|
- repeat(ApiUrlConfig.getPhotovoltaicPower(), null)
|
|
|
|
- );
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- largeBuildingControl.setAbnormalPointOne(repeat(ApiUrlConfig.getControlAlertDetails(), "type="+encodedPointValue));
|
|
|
|
- largeBuildingControl.setAbnormalPointTwo(repeat(ApiUrlConfig.getControlAlertDetails(), "type="+encodedPointValue2));
|
|
|
|
- largeBuildingControl.setAbnormalPointThree(repeat(ApiUrlConfig.getControlAlertDetails(), "type="+encodedPointValue3));
|
|
|
|
- largeBuildingControl.setAbnormalPointFour(repeat(ApiUrlConfig.getControlAlertDetails(), "type="+encodedPointValue4));
|
|
|
|
-
|
|
|
|
- if (platBuildingMapper.getExist() > 0){
|
|
|
|
- platBuildingMapper.updateBuildingControl(largeBuildingControl);
|
|
|
|
- } else {
|
|
|
|
- largeBuildingControl.setWaterDeviceAirNum(0L);
|
|
|
|
- platBuildingMapper.addBuildingControl(largeBuildingControl);
|
|
|
|
- }
|
|
|
|
- else platBuildingMapper.addBuildingControl(largeBuildingControl);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|