|
|
@@ -189,80 +189,78 @@ public class TPsInspectionAppController extends BaseController {
|
|
|
* 根据类型查询数据,调用对应Controller的list方法
|
|
|
*/
|
|
|
private TableDataInfo queryByType(String type, String dataJson) {
|
|
|
- type = type.toLowerCase();
|
|
|
-
|
|
|
switch (type) {
|
|
|
- case "alarm":
|
|
|
+ case "1":
|
|
|
TPsInspectionAlarm alarm = (TPsInspectionAlarm) setFilterFields(dataJson, TPsInspectionAlarm.class);
|
|
|
return alarmController.list(alarm);
|
|
|
|
|
|
- case "extinguisher":
|
|
|
- TPsInspectionExtinguisher extinguisher = (TPsInspectionExtinguisher) setFilterFields(dataJson, TPsInspectionExtinguisher.class);
|
|
|
- return extinguisherController.list(extinguisher);
|
|
|
-
|
|
|
- case "hydrant":
|
|
|
- TPsInspectionHydrant hydrant = (TPsInspectionHydrant) setFilterFields(dataJson, TPsInspectionHydrant.class);
|
|
|
- return hydrantController.list(hydrant);
|
|
|
-
|
|
|
- case "firedoor":
|
|
|
- TPsInspectionFiredoor firedoor = (TPsInspectionFiredoor) setFilterFields(dataJson, TPsInspectionFiredoor.class);
|
|
|
- return firedoorController.list(firedoor);
|
|
|
-
|
|
|
- case "lift":
|
|
|
- TPsInspectionLift lift = (TPsInspectionLift) setFilterFields(dataJson, TPsInspectionLift.class);
|
|
|
- return liftController.list(lift);
|
|
|
-
|
|
|
- case "cabinet":
|
|
|
+ case "2":
|
|
|
TPsInspectionCabinet cabinet = (TPsInspectionCabinet) setFilterFields(dataJson, TPsInspectionCabinet.class);
|
|
|
return cabinetController.list(cabinet);
|
|
|
|
|
|
- case "callsystem":
|
|
|
+ case "3":
|
|
|
TPsInspectionCallsystem callsystem = (TPsInspectionCallsystem) setFilterFields(dataJson, TPsInspectionCallsystem.class);
|
|
|
return callsystemController.list(callsystem);
|
|
|
|
|
|
- case "fgs":
|
|
|
- TPsInspectionFgs fgs = (TPsInspectionFgs) setFilterFields(dataJson, TPsInspectionFgs.class);
|
|
|
- return fgsController.list(fgs);
|
|
|
+ case "4":
|
|
|
+ TPsInspectionCoffer coffer = (TPsInspectionCoffer) setFilterFields(dataJson, TPsInspectionCoffer.class);
|
|
|
+ return cofferController.list(coffer);
|
|
|
|
|
|
- case "curtain":
|
|
|
+ case "5":
|
|
|
TPsInspectionCurtain curtain = (TPsInspectionCurtain) setFilterFields(dataJson, TPsInspectionCurtain.class);
|
|
|
return curtainController.list(curtain);
|
|
|
|
|
|
- case "steam":
|
|
|
- TPsInspectionSteam steam = (TPsInspectionSteam) setFilterFields(dataJson, TPsInspectionSteam.class);
|
|
|
- return steamController.list(steam);
|
|
|
+ case "6":
|
|
|
+ TPsInspectionExtinguisher extinguisher = (TPsInspectionExtinguisher) setFilterFields(dataJson, TPsInspectionExtinguisher.class);
|
|
|
+ return extinguisherController.list(extinguisher);
|
|
|
|
|
|
- case "monitor":
|
|
|
- TPsInspectionMonitor monitor = (TPsInspectionMonitor) setFilterFields(dataJson, TPsInspectionMonitor.class);
|
|
|
- return monitorController.list(monitor);
|
|
|
+ case "7":
|
|
|
+ TPsInspectionEyewash eyewash = (TPsInspectionEyewash) setFilterFields(dataJson, TPsInspectionEyewash.class);
|
|
|
+ return eyewashController.list(eyewash);
|
|
|
|
|
|
- case "coffer":
|
|
|
- TPsInspectionCoffer coffer = (TPsInspectionCoffer) setFilterFields(dataJson, TPsInspectionCoffer.class);
|
|
|
- return cofferController.list(coffer);
|
|
|
+ case "8":
|
|
|
+ TPsInspectionFgs fgs = (TPsInspectionFgs) setFilterFields(dataJson, TPsInspectionFgs.class);
|
|
|
+ return fgsController.list(fgs);
|
|
|
|
|
|
- case "sump":
|
|
|
- TPsInspectionSump sump = (TPsInspectionSump) setFilterFields(dataJson, TPsInspectionSump.class);
|
|
|
- return sumpController.list(sump);
|
|
|
+ case "9":
|
|
|
+ TPsInspectionFiredoor firedoor = (TPsInspectionFiredoor) setFilterFields(dataJson, TPsInspectionFiredoor.class);
|
|
|
+ return firedoorController.list(firedoor);
|
|
|
+
|
|
|
+ case "10":
|
|
|
+ TPsInspectionHydrant hydrant = (TPsInspectionHydrant) setFilterFields(dataJson, TPsInspectionHydrant.class);
|
|
|
+ return hydrantController.list(hydrant);
|
|
|
|
|
|
- case "pit":
|
|
|
+ case "11":
|
|
|
+ TPsInspectionLift lift = (TPsInspectionLift) setFilterFields(dataJson, TPsInspectionLift.class);
|
|
|
+ return liftController.list(lift);
|
|
|
+
|
|
|
+ case "12":
|
|
|
+ TPsInspectionMonitor monitor = (TPsInspectionMonitor) setFilterFields(dataJson, TPsInspectionMonitor.class);
|
|
|
+ return monitorController.list(monitor);
|
|
|
+
|
|
|
+ case "13":
|
|
|
TPsInspectionPit pit = (TPsInspectionPit) setFilterFields(dataJson, TPsInspectionPit.class);
|
|
|
return pitController.list(pit);
|
|
|
|
|
|
- case "rainvalve":
|
|
|
+ case "14":
|
|
|
TPsInspectionRainvalve rainvalve = (TPsInspectionRainvalve) setFilterFields(dataJson, TPsInspectionRainvalve.class);
|
|
|
return rainvalveController.list(rainvalve);
|
|
|
|
|
|
- case "ventvalve":
|
|
|
- TPsInspectionVentvalve ventvalve = (TPsInspectionVentvalve) setFilterFields(dataJson, TPsInspectionVentvalve.class);
|
|
|
- return ventvalveController.list(ventvalve);
|
|
|
+ case "15":
|
|
|
+ TPsInspectionSteam steam = (TPsInspectionSteam) setFilterFields(dataJson, TPsInspectionSteam.class);
|
|
|
+ return steamController.list(steam);
|
|
|
|
|
|
- case "utilitystation":
|
|
|
+ case "16":
|
|
|
+ TPsInspectionSump sump = (TPsInspectionSump) setFilterFields(dataJson, TPsInspectionSump.class);
|
|
|
+ return sumpController.list(sump);
|
|
|
+
|
|
|
+ case "17":
|
|
|
TPsInspectionUtilitystation utilitystation = (TPsInspectionUtilitystation) setFilterFields(dataJson, TPsInspectionUtilitystation.class);
|
|
|
return utilitystationController.list(utilitystation);
|
|
|
|
|
|
- case "eyewash":
|
|
|
- TPsInspectionEyewash eyewash = (TPsInspectionEyewash) setFilterFields(dataJson, TPsInspectionEyewash.class);
|
|
|
- return eyewashController.list(eyewash);
|
|
|
+ case "18":
|
|
|
+ TPsInspectionVentvalve ventvalve = (TPsInspectionVentvalve) setFilterFields(dataJson, TPsInspectionVentvalve.class);
|
|
|
+ return ventvalveController.list(ventvalve);
|
|
|
|
|
|
default:
|
|
|
throw new IllegalArgumentException("不支持的巡检记录类型:" + type);
|
|
|
@@ -273,80 +271,78 @@ public class TPsInspectionAppController extends BaseController {
|
|
|
* 根据类型获取数据,调用对应Controller的getInfo方法
|
|
|
*/
|
|
|
private AjaxResult getInfoByType(String type, String dataJson) {
|
|
|
- type = type.toLowerCase();
|
|
|
-
|
|
|
switch (type) {
|
|
|
- case "alarm":
|
|
|
+ case "1":
|
|
|
TPsInspectionAlarm alarm = (TPsInspectionAlarm) setFilterFields(dataJson, TPsInspectionAlarm.class);
|
|
|
return alarmController.getInfoByDevNo(alarm);
|
|
|
|
|
|
- case "extinguisher":
|
|
|
- TPsInspectionExtinguisher extinguisher = (TPsInspectionExtinguisher) setFilterFields(dataJson, TPsInspectionExtinguisher.class);
|
|
|
- return extinguisherController.getInfoByFireextinguisherno(extinguisher);
|
|
|
-
|
|
|
- case "hydrant":
|
|
|
- TPsInspectionHydrant hydrant = (TPsInspectionHydrant) setFilterFields(dataJson, TPsInspectionHydrant.class);
|
|
|
- return hydrantController.getInfoByEquipid(hydrant);
|
|
|
-
|
|
|
- case "firedoor":
|
|
|
- TPsInspectionFiredoor firedoor = (TPsInspectionFiredoor) setFilterFields(dataJson, TPsInspectionFiredoor.class);
|
|
|
- return firedoorController.getInfoByDoorno(firedoor);
|
|
|
-
|
|
|
- case "lift":
|
|
|
- TPsInspectionLift lift = (TPsInspectionLift) setFilterFields(dataJson, TPsInspectionLift.class);
|
|
|
- return liftController.getInfoByDevno(lift);
|
|
|
-
|
|
|
- case "cabinet":
|
|
|
+ case "2":
|
|
|
TPsInspectionCabinet cabinet = (TPsInspectionCabinet) setFilterFields(dataJson, TPsInspectionCabinet.class);
|
|
|
return cabinetController.getInfoByBoxNo(cabinet);
|
|
|
|
|
|
- case "callsystem":
|
|
|
+ case "3":
|
|
|
TPsInspectionCallsystem callsystem = (TPsInspectionCallsystem) setFilterFields(dataJson, TPsInspectionCallsystem.class);
|
|
|
return callsystemController.getInfoByDevno(callsystem);
|
|
|
|
|
|
- case "fgs":
|
|
|
- TPsInspectionFgs fgs = (TPsInspectionFgs) setFilterFields(dataJson, TPsInspectionFgs.class);
|
|
|
- return fgsController.getInfoByFgsno(fgs);
|
|
|
+ case "4":
|
|
|
+ TPsInspectionCoffer coffer = (TPsInspectionCoffer) setFilterFields(dataJson, TPsInspectionCoffer.class);
|
|
|
+ return cofferController.getInfoByCofferno(coffer);
|
|
|
|
|
|
- case "curtain":
|
|
|
+ case "5":
|
|
|
TPsInspectionCurtain curtain = (TPsInspectionCurtain) setFilterFields(dataJson, TPsInspectionCurtain.class);
|
|
|
return curtainController.getInfoByCurtainname(curtain);
|
|
|
|
|
|
- case "steam":
|
|
|
- TPsInspectionSteam steam = (TPsInspectionSteam) setFilterFields(dataJson, TPsInspectionSteam.class);
|
|
|
- return steamController.getInfoBySteamname(steam);
|
|
|
+ case "6":
|
|
|
+ TPsInspectionExtinguisher extinguisher = (TPsInspectionExtinguisher) setFilterFields(dataJson, TPsInspectionExtinguisher.class);
|
|
|
+ return extinguisherController.getInfoByFireextinguisherno(extinguisher);
|
|
|
|
|
|
- case "monitor":
|
|
|
- TPsInspectionMonitor monitor = (TPsInspectionMonitor) setFilterFields(dataJson, TPsInspectionMonitor.class);
|
|
|
- return monitorController.getInfoByDevno(monitor);
|
|
|
+ case "7":
|
|
|
+ TPsInspectionEyewash eyewash = (TPsInspectionEyewash) setFilterFields(dataJson, TPsInspectionEyewash.class);
|
|
|
+ return eyewashController.getInfoByDevno(eyewash);
|
|
|
|
|
|
- case "coffer":
|
|
|
- TPsInspectionCoffer coffer = (TPsInspectionCoffer) setFilterFields(dataJson, TPsInspectionCoffer.class);
|
|
|
- return cofferController.getInfoByCofferno(coffer);
|
|
|
+ case "8":
|
|
|
+ TPsInspectionFgs fgs = (TPsInspectionFgs) setFilterFields(dataJson, TPsInspectionFgs.class);
|
|
|
+ return fgsController.getInfoByFgsno(fgs);
|
|
|
|
|
|
- case "sump":
|
|
|
- TPsInspectionSump sump = (TPsInspectionSump) setFilterFields(dataJson, TPsInspectionSump.class);
|
|
|
- return sumpController.getInfoBySumpno(sump);
|
|
|
+ case "9":
|
|
|
+ TPsInspectionFiredoor firedoor = (TPsInspectionFiredoor) setFilterFields(dataJson, TPsInspectionFiredoor.class);
|
|
|
+ return firedoorController.getInfoByDoorno(firedoor);
|
|
|
+
|
|
|
+ case "10":
|
|
|
+ TPsInspectionHydrant hydrant = (TPsInspectionHydrant) setFilterFields(dataJson, TPsInspectionHydrant.class);
|
|
|
+ return hydrantController.getInfoByEquipid(hydrant);
|
|
|
|
|
|
- case "pit":
|
|
|
+ case "11":
|
|
|
+ TPsInspectionLift lift = (TPsInspectionLift) setFilterFields(dataJson, TPsInspectionLift.class);
|
|
|
+ return liftController.getInfoByDevno(lift);
|
|
|
+
|
|
|
+ case "12":
|
|
|
+ TPsInspectionMonitor monitor = (TPsInspectionMonitor) setFilterFields(dataJson, TPsInspectionMonitor.class);
|
|
|
+ return monitorController.getInfoByDevno(monitor);
|
|
|
+
|
|
|
+ case "13":
|
|
|
TPsInspectionPit pit = (TPsInspectionPit) setFilterFields(dataJson, TPsInspectionPit.class);
|
|
|
return pitController.getInfoByDevno(pit);
|
|
|
|
|
|
- case "rainvalve":
|
|
|
+ case "14":
|
|
|
TPsInspectionRainvalve rainvalve = (TPsInspectionRainvalve) setFilterFields(dataJson, TPsInspectionRainvalve.class);
|
|
|
return rainvalveController.getInfoByValvename(rainvalve);
|
|
|
|
|
|
- case "ventvalve":
|
|
|
- TPsInspectionVentvalve ventvalve = (TPsInspectionVentvalve) setFilterFields(dataJson, TPsInspectionVentvalve.class);
|
|
|
- return ventvalveController.getInfoByVentvalveno(ventvalve);
|
|
|
+ case "15":
|
|
|
+ TPsInspectionSteam steam = (TPsInspectionSteam) setFilterFields(dataJson, TPsInspectionSteam.class);
|
|
|
+ return steamController.getInfoBySteamname(steam);
|
|
|
|
|
|
- case "utilitystation":
|
|
|
+ case "16":
|
|
|
+ TPsInspectionSump sump = (TPsInspectionSump) setFilterFields(dataJson, TPsInspectionSump.class);
|
|
|
+ return sumpController.getInfoBySumpno(sump);
|
|
|
+
|
|
|
+ case "17":
|
|
|
TPsInspectionUtilitystation utilitystation = (TPsInspectionUtilitystation) setFilterFields(dataJson, TPsInspectionUtilitystation.class);
|
|
|
return utilitystationController.getInfoByUtilitystationname(utilitystation);
|
|
|
|
|
|
- case "eyewash":
|
|
|
- TPsInspectionEyewash eyewash = (TPsInspectionEyewash) setFilterFields(dataJson, TPsInspectionEyewash.class);
|
|
|
- return eyewashController.getInfoByDevno(eyewash);
|
|
|
+ case "18":
|
|
|
+ TPsInspectionVentvalve ventvalve = (TPsInspectionVentvalve) setFilterFields(dataJson, TPsInspectionVentvalve.class);
|
|
|
+ return ventvalveController.getInfoByVentvalveno(ventvalve);
|
|
|
|
|
|
default:
|
|
|
throw new IllegalArgumentException("不支持的巡检记录类型:" + type);
|
|
|
@@ -357,7 +353,6 @@ public class TPsInspectionAppController extends BaseController {
|
|
|
* 根据类型更新数据,调用对应Controller的edit方法
|
|
|
*/
|
|
|
private AjaxResult updateByType(String type, Map<String, Object> request) {
|
|
|
- type = type.toLowerCase();
|
|
|
Object dataObj = request.get("data");
|
|
|
|
|
|
if (dataObj == null) {
|
|
|
@@ -367,77 +362,77 @@ public class TPsInspectionAppController extends BaseController {
|
|
|
String dataJson = JSON.toJSONString(dataObj);
|
|
|
|
|
|
switch (type) {
|
|
|
- case "alarm":
|
|
|
+ case "1":
|
|
|
TPsInspectionAlarm alarm = JSON.parseObject(dataJson, TPsInspectionAlarm.class);
|
|
|
return alarmController.edit(alarm);
|
|
|
|
|
|
- case "extinguisher":
|
|
|
- TPsInspectionExtinguisher extinguisher = JSON.parseObject(dataJson, TPsInspectionExtinguisher.class);
|
|
|
- return extinguisherController.edit(extinguisher);
|
|
|
-
|
|
|
- case "hydrant":
|
|
|
- TPsInspectionHydrant hydrant = JSON.parseObject(dataJson, TPsInspectionHydrant.class);
|
|
|
- return hydrantController.edit(hydrant);
|
|
|
-
|
|
|
- case "firedoor":
|
|
|
- TPsInspectionFiredoor firedoor = JSON.parseObject(dataJson, TPsInspectionFiredoor.class);
|
|
|
- return firedoorController.edit(firedoor);
|
|
|
-
|
|
|
- case "lift":
|
|
|
- TPsInspectionLift lift = JSON.parseObject(dataJson, TPsInspectionLift.class);
|
|
|
- return liftController.edit(lift);
|
|
|
-
|
|
|
- case "cabinet":
|
|
|
+ case "2":
|
|
|
TPsInspectionCabinet cabinet = JSON.parseObject(dataJson, TPsInspectionCabinet.class);
|
|
|
return cabinetController.edit(cabinet);
|
|
|
|
|
|
- case "callsystem":
|
|
|
+ case "3":
|
|
|
TPsInspectionCallsystem callsystem = JSON.parseObject(dataJson, TPsInspectionCallsystem.class);
|
|
|
return callsystemController.edit(callsystem);
|
|
|
|
|
|
- case "fgs":
|
|
|
- TPsInspectionFgs fgs = JSON.parseObject(dataJson, TPsInspectionFgs.class);
|
|
|
- return fgsController.edit(fgs);
|
|
|
+ case "4":
|
|
|
+ TPsInspectionCoffer coffer = JSON.parseObject(dataJson, TPsInspectionCoffer.class);
|
|
|
+ return cofferController.edit(coffer);
|
|
|
|
|
|
- case "curtain":
|
|
|
+ case "5":
|
|
|
TPsInspectionCurtain curtain = JSON.parseObject(dataJson, TPsInspectionCurtain.class);
|
|
|
return curtainController.edit(curtain);
|
|
|
|
|
|
- case "steam":
|
|
|
- TPsInspectionSteam steam = JSON.parseObject(dataJson, TPsInspectionSteam.class);
|
|
|
- return steamController.edit(steam);
|
|
|
+ case "6":
|
|
|
+ TPsInspectionExtinguisher extinguisher = JSON.parseObject(dataJson, TPsInspectionExtinguisher.class);
|
|
|
+ return extinguisherController.edit(extinguisher);
|
|
|
|
|
|
- case "monitor":
|
|
|
- TPsInspectionMonitor monitor = JSON.parseObject(dataJson, TPsInspectionMonitor.class);
|
|
|
- return monitorController.edit(monitor);
|
|
|
+ case "7":
|
|
|
+ TPsInspectionEyewash eyewash = JSON.parseObject(dataJson, TPsInspectionEyewash.class);
|
|
|
+ return eyewashController.edit(eyewash);
|
|
|
|
|
|
- case "coffer":
|
|
|
- TPsInspectionCoffer coffer = JSON.parseObject(dataJson, TPsInspectionCoffer.class);
|
|
|
- return cofferController.edit(coffer);
|
|
|
+ case "8":
|
|
|
+ TPsInspectionFgs fgs = JSON.parseObject(dataJson, TPsInspectionFgs.class);
|
|
|
+ return fgsController.edit(fgs);
|
|
|
|
|
|
- case "sump":
|
|
|
- TPsInspectionSump sump = JSON.parseObject(dataJson, TPsInspectionSump.class);
|
|
|
- return sumpController.edit(sump);
|
|
|
+ case "9":
|
|
|
+ TPsInspectionFiredoor firedoor = JSON.parseObject(dataJson, TPsInspectionFiredoor.class);
|
|
|
+ return firedoorController.edit(firedoor);
|
|
|
|
|
|
- case "pit":
|
|
|
+ case "10":
|
|
|
+ TPsInspectionHydrant hydrant = JSON.parseObject(dataJson, TPsInspectionHydrant.class);
|
|
|
+ return hydrantController.edit(hydrant);
|
|
|
+
|
|
|
+ case "11":
|
|
|
+ TPsInspectionLift lift = JSON.parseObject(dataJson, TPsInspectionLift.class);
|
|
|
+ return liftController.edit(lift);
|
|
|
+
|
|
|
+ case "12":
|
|
|
+ TPsInspectionMonitor monitor = JSON.parseObject(dataJson, TPsInspectionMonitor.class);
|
|
|
+ return monitorController.edit(monitor);
|
|
|
+
|
|
|
+ case "13":
|
|
|
TPsInspectionPit pit = JSON.parseObject(dataJson, TPsInspectionPit.class);
|
|
|
return pitController.edit(pit);
|
|
|
|
|
|
- case "rainvalve":
|
|
|
+ case "14":
|
|
|
TPsInspectionRainvalve rainvalve = JSON.parseObject(dataJson, TPsInspectionRainvalve.class);
|
|
|
return rainvalveController.edit(rainvalve);
|
|
|
|
|
|
- case "ventvalve":
|
|
|
- TPsInspectionVentvalve ventvalve = JSON.parseObject(dataJson, TPsInspectionVentvalve.class);
|
|
|
- return ventvalveController.edit(ventvalve);
|
|
|
+ case "15":
|
|
|
+ TPsInspectionSteam steam = JSON.parseObject(dataJson, TPsInspectionSteam.class);
|
|
|
+ return steamController.edit(steam);
|
|
|
+
|
|
|
+ case "16":
|
|
|
+ TPsInspectionSump sump = JSON.parseObject(dataJson, TPsInspectionSump.class);
|
|
|
+ return sumpController.edit(sump);
|
|
|
|
|
|
- case "utilitystation":
|
|
|
+ case "17":
|
|
|
TPsInspectionUtilitystation utilitystation = JSON.parseObject(dataJson, TPsInspectionUtilitystation.class);
|
|
|
return utilitystationController.edit(utilitystation);
|
|
|
|
|
|
- case "eyewash":
|
|
|
- TPsInspectionEyewash eyewash = JSON.parseObject(dataJson, TPsInspectionEyewash.class);
|
|
|
- return eyewashController.edit(eyewash);
|
|
|
+ case "18":
|
|
|
+ TPsInspectionVentvalve ventvalve = JSON.parseObject(dataJson, TPsInspectionVentvalve.class);
|
|
|
+ return ventvalveController.edit(ventvalve);
|
|
|
|
|
|
default:
|
|
|
throw new IllegalArgumentException("不支持的巡检记录类型:" + type);
|