浏览代码

移植新版健康管理后台项目

shilin 1 年之前
父节点
当前提交
a86c513386

+ 13 - 13
web/consumer-hb/src/main/java/com/gyee/consumer/controller/health/HealthController.java

@@ -14,7 +14,6 @@ import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
-import java.util.Date;
 
 @Controller
 @RequestMapping("/health")
@@ -91,7 +90,7 @@ public class HealthController {
 
     @GetMapping("/findWtHealthInfo1")
     @ResponseBody
-    @ApiOperation(value = "获取健康管理风机信息", notes = "获取健康管理风机信息")
+    @ApiOperation(value = "获取健康管理风机信息1", notes = "获取健康管理风机信息1")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query")
     })
@@ -105,7 +104,7 @@ public class HealthController {
 
     @GetMapping("/findWtHealthInfo2")
     @ResponseBody
-    @ApiOperation(value = "获取健康管理风机信息", notes = "获取健康管理风机信息")
+    @ApiOperation(value = "获取健康管理风机信息2", notes = "获取健康管理风机信息2")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query")
     })
@@ -119,7 +118,7 @@ public class HealthController {
 
     @GetMapping("/findWtHealthInfo3")
     @ResponseBody
-    @ApiOperation(value = "获取健康管理风机信息", notes = "获取健康管理风机信息")
+    @ApiOperation(value = "获取健康管理风机信息3", notes = "获取健康管理风机信息3")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query")
     })
@@ -650,13 +649,13 @@ public class HealthController {
     }
 
     /////////////////////////////////////////////////////////////////////////////////////////////////////
-    @GetMapping("/getconHealthReportTargetMap")
+    @GetMapping("/getEconHealthReportMain")
     @ResponseBody
     @ApiOperation(value = "获得健康报告主表信息", notes = "获得健康报告主表信息")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "wtId", value = "设备编号", required = true, dataType = "string", paramType = "query"),
             @ApiImplicitParam(name = "recordDate", value = "日期", required = true, dataType = "string", paramType = "query")})
-    public AjaxResult getEconHealthReportMain(@RequestParam("recordDate") Date recordDate, @RequestParam("wtId") String wtId) throws Exception {
+    public AjaxResult getEconHealthReportMain(@RequestParam("recordDate") String recordDate, @RequestParam("wtId") String wtId) throws Exception {
 
         AjaxResult ajax =healthMainService.getEconHealthReportMain(recordDate, wtId);
 
@@ -672,7 +671,7 @@ public class HealthController {
 
             @ApiImplicitParam(name = "wtId", value = "设备编号", required = true, dataType = "string", paramType = "query"),
             @ApiImplicitParam(name = "recordDate", value = "日期", required = true, dataType = "string", paramType = "query")})
-    public AjaxResult getconHealthReportTargetMap(@RequestParam("recordDate") Date recordDate, @RequestParam("wtId") String wtId) throws Exception {
+    public AjaxResult getconHealthReportTargetMap(@RequestParam("recordDate") String recordDate, @RequestParam("wtId") String wtId) throws Exception {
 
         AjaxResult ajax =healthMainService.getconHealthReportTargetMap(recordDate, wtId);
 
@@ -686,7 +685,8 @@ public class HealthController {
     @ApiImplicitParams({
             @ApiImplicitParam(name = "wtId", value = "设备编号", required = true, dataType = "string", paramType = "query"),
             @ApiImplicitParam(name = "recordDate", value = "日期", required = true, dataType = "string", paramType = "query")})
-    public AjaxResult getStateJudgment(@RequestParam("recordDate") Date recordDate, @RequestParam("wtId") String wtId) throws Exception {
+    public AjaxResult getStateJudgment( @RequestParam(name = "recordDate") String recordDate,
+                                        @RequestParam(name = "wtId")String wtId) throws Exception {
 
         AjaxResult ajax =healthMainService.getStateJudgment(recordDate, wtId);
 
@@ -700,7 +700,7 @@ public class HealthController {
     @ApiImplicitParams({
             @ApiImplicitParam(name = "wtId", value = "设备编号", required = true, dataType = "string", paramType = "query"),
             @ApiImplicitParam(name = "recordDate", value = "日期", required = true, dataType = "string", paramType = "query")})
-    public AjaxResult getHealthNumVoList(@RequestParam("recordDate") Date recordDate, @RequestParam("wtId") String wtId) throws Exception {
+    public AjaxResult getHealthNumVoList(@RequestParam("recordDate") String recordDate, @RequestParam("wtId") String wtId) throws Exception {
 
         AjaxResult ajax =healthMainService.getHealthNumVoList(recordDate, wtId);
 
@@ -714,7 +714,7 @@ public class HealthController {
     @ApiImplicitParams({
             @ApiImplicitParam(name = "wtId", value = "设备编号", required = true, dataType = "string", paramType = "query"),
             @ApiImplicitParam(name = "recordDate", value = "日期", required = true, dataType = "string", paramType = "query")})
-    public AjaxResult getEquipmentInfoDayTopVoList(@RequestParam("recordDate") Date recordDate, @RequestParam("wtId") String wtId) throws Exception {
+    public AjaxResult getEquipmentInfoDayTopVoList(@RequestParam("recordDate") String recordDate, @RequestParam("wtId") String wtId) throws Exception {
 
 
         AjaxResult ajax =healthMainService.getEquipmentInfoDayTopVoList(recordDate, wtId);
@@ -730,7 +730,7 @@ public class HealthController {
             @ApiImplicitParam(name = "recordDate", value = "日期", required = true, dataType = "string", paramType = "query"),
             @ApiImplicitParam(name = "type", value = "类型(clx 齿轮箱,fdj 发电机,bj 变桨,zz 主轴)", required = true, dataType = "string", paramType = "query")
     })
-    public AjaxResult getHealthDataVlueVo(@RequestParam("recordDate") Date recordDate, @RequestParam("wtId") String wtId,  @RequestParam("type") String type) throws Exception {
+    public AjaxResult getHealthDataVlueVo(@RequestParam("recordDate") String recordDate, @RequestParam("wtId") String wtId,  @RequestParam("type") String type) throws Exception {
 
 
         AjaxResult ajax =healthMainService.getHealthDataVlueVo(recordDate, wtId,type);
@@ -745,7 +745,7 @@ public class HealthController {
     @ApiImplicitParams({
             @ApiImplicitParam(name = "wtId", value = "设备编号", required = true, dataType = "string", paramType = "query"),
             @ApiImplicitParam(name = "recordDate", value = "日期", required = true, dataType = "string", paramType = "query")})
-    public AjaxResult getAlarmcountVoList(@RequestParam("recordDate") Date recordDate, @RequestParam("wtId") String wtId) throws Exception {
+    public AjaxResult getAlarmcountVoList(@RequestParam("recordDate") String recordDate, @RequestParam("wtId") String wtId) throws Exception {
 
 
         AjaxResult ajax =healthMainService.getAlarmcountVoList(recordDate, wtId);
@@ -760,7 +760,7 @@ public class HealthController {
     @ApiImplicitParams({
             @ApiImplicitParam(name = "wtId", value = "设备编号", required = true, dataType = "string", paramType = "query"),
             @ApiImplicitParam(name = "recordDate", value = "日期", required = true, dataType = "string", paramType = "query")})
-    public AjaxResult getHealthReportQxpc(@RequestParam("recordDate") Date recordDate, @RequestParam("wtId") String wtId) throws Exception {
+    public AjaxResult getHealthReportQxpc(@RequestParam("recordDate") String recordDate, @RequestParam("wtId") String wtId) throws Exception {
 
 
 

+ 8 - 11
web/consumer-hb/src/main/java/com/gyee/consumer/fallback/health/HealthServiceFallbackFactory.java

@@ -6,11 +6,8 @@ import com.gyee.consumer.model.Healthsystemsub;
 import com.gyee.consumer.model.Tablepar;
 import com.gyee.consumer.service.health.HealthService;
 import feign.hystrix.FallbackFactory;
-import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 
-import java.util.Date;
-
 public class HealthServiceFallbackFactory implements FallbackFactory<HealthService> {
 
     @Override
@@ -279,43 +276,43 @@ public class HealthServiceFallbackFactory implements FallbackFactory<HealthServi
             }
             ////////////////////////////////////////////////////////////////////////////////
             @Override
-            public AjaxResult getEconHealthReportMain(Date recordDate, String wtId) throws Exception{
+            public AjaxResult getEconHealthReportMain(String recordDate, String wtId) throws Exception{
                 return AjaxResult.error(throwable.getMessage());
             }
 
             @Override
-            public AjaxResult getconHealthReportTargetMap(Date recordDate, String wtId) throws Exception{
+            public AjaxResult getconHealthReportTargetMap(String recordDate, String wtId) throws Exception{
                 return AjaxResult.error(throwable.getMessage());
             }
 
 
             @Override
-            public AjaxResult getStateJudgment(Date recordDate, String wtId) throws Exception{
+            public AjaxResult getStateJudgment(String recordDate, String wtId) throws Exception{
                 return AjaxResult.error(throwable.getMessage());
             }
 
             @Override
-            public AjaxResult getHealthNumVoList(Date recordDate, String wtId) throws Exception{
+            public AjaxResult getHealthNumVoList(String recordDate, String wtId) throws Exception{
                 return AjaxResult.error(throwable.getMessage());
             }
 
             @Override
-            public AjaxResult getEquipmentInfoDayTopVoList(Date recordDate, String wtId) throws Exception{
+            public AjaxResult getEquipmentInfoDayTopVoList(String recordDate, String wtId) throws Exception{
                 return AjaxResult.error(throwable.getMessage());
             }
 
             @Override
-            public AjaxResult getHealthDataVlueVo(Date recordDate, String wtId, String type) throws Exception{
+            public AjaxResult getHealthDataVlueVo(String recordDate, String wtId, String type) throws Exception{
                 return AjaxResult.error(throwable.getMessage());
             }
 
             @Override
-            public AjaxResult getAlarmcountVoList(Date recordDate, String wtId) throws Exception{
+            public AjaxResult getAlarmcountVoList(String recordDate, String wtId) throws Exception{
                 return AjaxResult.error(throwable.getMessage());
             }
 
             @Override
-            public AjaxResult getHealthReportQxpc(Date recordDate, String wtId) throws Exception{
+            public AjaxResult getHealthReportQxpc(String recordDate, String wtId) throws Exception{
                 return AjaxResult.error(throwable.getMessage());
             }
         };

+ 9 - 11
web/consumer-hb/src/main/java/com/gyee/consumer/service/health/HealthService.java

@@ -12,8 +12,6 @@ import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 
-import java.util.Date;
-
 @FeignClient(name = "health", url = "${provider.healthurl}",
         fallbackFactory = HealthServiceFallbackFactory.class,
         configuration = FeignConfiguration.class)
@@ -223,30 +221,30 @@ public interface HealthService {
 
     //////////////////////////////////////////////////////////////////////////////////////////
 
-    @GetMapping("/healthreport/getconHealthReportTargetMap")
-    public AjaxResult getEconHealthReportMain(Date recordDate, String wtId) throws Exception;
+    @GetMapping("/healthreport/getEconHealthReportMain")
+    public AjaxResult getEconHealthReportMain(@RequestParam("wtId") String recordDate, @RequestParam("wtId") String wtId) throws Exception;
 
     @GetMapping("/healthreport/getconHealthReportTargetMap")
-    public AjaxResult getconHealthReportTargetMap(Date recordDate, String wtId) throws Exception;
+    public AjaxResult getconHealthReportTargetMap(@RequestParam("wtId") String recordDate, @RequestParam("wtId") String wtId) throws Exception;
 
 
     @GetMapping("/healthreport/getStateJudgment")
-    public AjaxResult getStateJudgment(Date recordDate, String wtId) throws Exception;
+    public AjaxResult getStateJudgment(@RequestParam("wtId") String recordDate, @RequestParam("wtId") String wtId) throws Exception;
 
     @GetMapping("/healthreport/getHealthNumVoList")
-    public AjaxResult getHealthNumVoList(Date recordDate, String wtId) throws Exception;
+    public AjaxResult getHealthNumVoList(@RequestParam("wtId") String recordDate, @RequestParam("wtId") String wtId) throws Exception;
 
     @GetMapping("/healthreport/getEquipmentInfoDayTopVoList")
-    public AjaxResult getEquipmentInfoDayTopVoList(Date recordDate, String wtId) throws Exception;
+    public AjaxResult getEquipmentInfoDayTopVoList(@RequestParam("wtId") String recordDate, @RequestParam("wtId") String wtId) throws Exception;
 
     @GetMapping("/healthreport/getHealthDataVlueVo")
-    public AjaxResult getHealthDataVlueVo(Date recordDate, String wtId, String type) throws Exception;
+    public AjaxResult getHealthDataVlueVo(@RequestParam("wtId") String recordDate, @RequestParam("wtId") String wtId, @RequestParam("type") String type) throws Exception;
 
     @GetMapping("/healthreport/getAlarmcountVoList")
-    public AjaxResult getAlarmcountVoList(Date recordDate, String wtId) throws Exception;
+    public AjaxResult getAlarmcountVoList(@RequestParam("wtId") String recordDate, @RequestParam("wtId") String wtId) throws Exception;
 
     @GetMapping("/healthreport/getHealthReportQxpc")
-    public AjaxResult getHealthReportQxpc(Date recordDate, String wtId) throws Exception;
+    public AjaxResult getHealthReportQxpc(@RequestParam("wtId") String recordDate, @RequestParam("wtId") String wtId) throws Exception;
 
 
 }