|
@@ -1,9 +1,13 @@
|
|
package com.huimv.env.common.controller;
|
|
package com.huimv.env.common.controller;
|
|
|
|
|
|
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
|
+import com.huimv.env.common.service.IEnvDayagePeizhiService;
|
|
|
|
+import com.huimv.env.common.service.IEnvDeviceService;
|
|
|
|
+import com.huimv.env.common.service.IEnvFengPeizhiService;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
/**
|
|
* <p>
|
|
* <p>
|
|
@@ -15,6 +19,40 @@ import org.springframework.web.bind.annotation.RestController;
|
|
*/
|
|
*/
|
|
@RestController
|
|
@RestController
|
|
@RequestMapping("/env-dayage-peizhi")
|
|
@RequestMapping("/env-dayage-peizhi")
|
|
|
|
+@CrossOrigin
|
|
public class EnvDayagePeizhiController {
|
|
public class EnvDayagePeizhiController {
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private IEnvDayagePeizhiService dayagePeizhiService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private IEnvFengPeizhiService peizhiService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private IEnvDeviceService deviceService;
|
|
|
|
+
|
|
|
|
+ @PostMapping("/getDayAgePeiZhi")
|
|
|
|
+ public String getDayAgePeiZhi(@RequestBody Map<String, String> paramsMap) {
|
|
|
|
+ String list = paramsMap.get("list");
|
|
|
|
+ String idCode = paramsMap.get("idCode");
|
|
|
|
+ String[] split = list.split(",");
|
|
|
|
+ return dayagePeizhiService.getDayAgePeiZhi(split, idCode);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @PostMapping("/getFengPeiZhi")
|
|
|
|
+ public String getFengPeiZhi(@RequestBody Map<String, String> paramsMap) {
|
|
|
|
+ String list = paramsMap.get("list");
|
|
|
|
+ String[] split = list.split(",");
|
|
|
|
+ return peizhiService.getFengPeiZhi(split);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @PostMapping("/getDeviceCodeByChipId")
|
|
|
|
+ public String getDeviceCodeByChipId(@RequestBody Map<String, String> paramsMap) {
|
|
|
|
+ String idCode = paramsMap.get("idCode");
|
|
|
|
+ return deviceService.getDeviceCodeByChipId(idCode);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @PostMapping("/updateStatus")
|
|
|
|
+ public void updateStatus(@RequestBody Map<String, String> paramsMap) {
|
|
|
|
+ String idCode = paramsMap.get("idCode");
|
|
|
|
+ deviceService.updateStatus(idCode);
|
|
|
|
+ }
|
|
}
|
|
}
|