From 88419bc51de62ffe6640a4c9d48489cdbddc46a8 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期四, 19 十二月 2024 19:46:00 +0800
Subject: [PATCH] 最新版本541200007

---
 /dev/null                                                                                                               |   29 --
 server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/WholeProvinceBoardVO.java        |    7 
 server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/WholeProvinceZXTVO.java          |   31 ++
 server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/WholeProvinceZxtDetailVO.java    |   29 ++
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java                |  252 ++++++++++++++++++++++
 server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/TmsCloudController.java                                |   30 ++
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/TmsServiceImpl.java                  |   21 -
 server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/board/WholeProvinceController.java                           |  154 ++++++++-----
 server/visits/dmvisit_service/src/main/java/com/doumee/core/tms/model/response/TmsTotalAndReportVehicleQtyResponse.java |    4 
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/third/BoardService.java                         |   12 +
 server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/TotalOutQtyNumVO.java            |   47 ++++
 server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/WholeProvinceMapVO.java          |   30 ++
 12 files changed, 512 insertions(+), 134 deletions(-)

diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/TmsCloudController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/TmsCloudController.java
index d46799d..287af7d 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/TmsCloudController.java
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/TmsCloudController.java
@@ -3,9 +3,7 @@
 import com.doumee.api.BaseController;
 import com.doumee.config.annotation.LoginNoRequired;
 import com.doumee.core.model.ApiResponse;
-import com.doumee.core.tms.model.request.TmsLockStatusQueryRequest;
-import com.doumee.core.tms.model.request.TmsOrderInfoRequest;
-import com.doumee.core.tms.model.request.TmsOrderListRequest;
+import com.doumee.core.tms.model.request.*;
 import com.doumee.core.tms.model.response.*;
 import com.doumee.core.utils.Constants;
 import com.doumee.core.wms.model.response.WmsBaseResponse;
@@ -48,9 +46,29 @@
     @ApiOperation("銆怲MS銆戝悎鍚屽垪琛ㄦ帴鍙�")
     @LoginNoRequired
     @PostMapping("/orderList")
-    public ApiResponse<TmsBasePageResponse<TmsOrderListResponse>> orderList(@RequestBody TmsOrderListRequest request )   {
-
-        return  ApiResponse.success(tmsService.orderList(request));
+    public ApiResponse<TmsBasePageResponse<TmsOrderListResponse>> orderList(@RequestBody TmsOrderListRequest param )   {
+        if(param == null){
+            param = new TmsOrderListRequest();
+        }
+        if(param.getParameters() == null){
+            param.setParameters( new TmsOrderListParamRequest());
+        }
+        if(param.getPager() == null){
+            param.setPager( new TmsOrderListPagerRequest());
+        }
+        if(param.getPager().getPage() == null){
+            param.getPager().setPage(1);
+        }
+        if(param.getPager().getRows() == null){
+            param.getPager().setRows(10);
+        }
+        if(StringUtils.isBlank(param.getParameters().getPhoneNumber())){
+            param.getParameters().setPhoneNumber("00000000000");//鎵嬫満鍙峰繀濉�
+        }
+        if(param.getParameters().getContractNumbers()==null || param.getParameters().getContractNumbers().size()==0){
+            param.getParameters().setContractNumbers(null);
+        }
+        return  ApiResponse.success(tmsService.orderList(param));
     }
     @ApiOperation("銆怲MS銆戝悎鍚岃鎯呮帴鍙�")
     @LoginNoRequired
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/board/WholeProvinceController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/board/WholeProvinceController.java
index 794b868..082627d 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/board/WholeProvinceController.java
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/board/WholeProvinceController.java
@@ -3,15 +3,24 @@
 import  com.doumee.api.BaseController;
 import com.doumee.config.annotation.LoginNoRequired;
 import com.doumee.core.model.ApiResponse;
+import com.doumee.core.tms.model.request.TmsOrderInfoRequest;
+import com.doumee.core.tms.model.request.TmsOrderListPagerRequest;
+import com.doumee.core.tms.model.request.TmsOrderListParamRequest;
+import com.doumee.core.tms.model.request.TmsOrderListRequest;
+import com.doumee.core.tms.model.response.TmsBasePageResponse;
+import com.doumee.core.tms.model.response.TmsOrderInfoResponse;
+import com.doumee.core.tms.model.response.TmsOrderListResponse;
 import com.doumee.core.utils.Constants;
 import com.doumee.core.utils.DateUtil;
+import com.doumee.dao.business.model.TmsFactoryParam;
 import com.doumee.dao.web.response.platformReport.*;
+import com.doumee.service.business.third.BoardService;
+import com.doumee.service.business.third.TmsService;
 import io.swagger.annotations.*;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
 
 import java.math.BigDecimal;
 import java.util.ArrayList;
@@ -32,7 +41,10 @@
 @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/board/api/wholeProvince")
 public class WholeProvinceController extends BaseController {
 
-
+    @Autowired
+    private TmsService tmsService;
+    @Autowired
+    private BoardService boardService;
     @LoginNoRequired
     @ApiOperation("涓績鏁版嵁")
     @GetMapping("/centerData")
@@ -95,76 +107,88 @@
         }
         return ApiResponse.success(list);
     }
-
-
-
-
     @LoginNoRequired
-    @ApiOperation("杩涢攢瀛樿繍钀�")
-    @GetMapping("/salesOperationList")
-    @ApiImplicitParams({
-            @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "queryType", value = "鏌ヨ绫诲瀷锛�0=鍛紱1=鏈堬紱2=骞达紱", required = true),
-    })
-    public ApiResponse<List<SalesOperationVO>> salesOperationList(@RequestParam Integer queryType) {
-        List<SalesOperationVO> list = new ArrayList<>();
-        Random random = new Random();
-        List<String> dayList = DateUtil.getBeforDays(new Date(),7);
-        if(Constants.equalsInteger(queryType,Constants.ONE)){
-            dayList = DateUtil.getBeforDays(new Date(),30);
-        }else if(Constants.equalsInteger(queryType,Constants.TWO)){
-            dayList = DateUtil.getBeforMonth(new Date(),12);
-        }
-        for (String str:dayList) {
-            SalesOperationVO data = new SalesOperationVO();
-            data.setDateStr(str);
-            data.setStockNum(new BigDecimal(random.nextInt(1000)));
-            data.setTotalInNum(new BigDecimal(random.nextInt(1000)));
-            data.setTotalOutNum(new BigDecimal(random.nextInt(1000)));
-            list.add(data);
-        }
+    @ApiOperation("璁㈠崟鍦ㄩ�旇窡韪�-绱鍑哄簱閲�")
+    @GetMapping("/totalOutQtyNum")
+    public ApiResponse<TotalOutQtyNumVO> totalOutQtyNum() {
+        TotalOutQtyNumVO result = boardService.totalOutQtyNum();
+
+        return ApiResponse.success(result);
+    }
+    @LoginNoRequired
+    @ApiOperation("鎵�鏈夌儫鍘傞泦鍚�")
+    @GetMapping("/factoryList")
+    public ApiResponse<List<TmsFactoryParam>> factoryList() {
+        List<TmsFactoryParam> list = boardService.factoryList();
         return ApiResponse.success(list);
     }
 
+
+
+
     @LoginNoRequired
-    @ApiOperation("搴撳瓨鍒╃敤鐜�")
-    @GetMapping("/energyDataList")
-    public ApiResponse<List<StockRataVO>> energyDataList() {
-        List<StockRataVO> energyDataVOList = new ArrayList<>();
-        Random random = new Random();
-        for (int i = 1; i <= 5; i++) {
-            StockRataVO data = new StockRataVO();
-            data.setPlaceName("鍦扮偣_"+i);
-            data.setNowStockNum(new BigDecimal(random.nextInt(200)));
-            data.setStockRataNum(new BigDecimal(random.nextInt(200)));
-            data.setTotalStockNum(new BigDecimal(random.nextInt(100)));
-            energyDataVOList.add(data);
-        }
-        return ApiResponse.success(energyDataVOList);
+    @ApiOperation("浠撳簱璧勬簮鍒╃敤鐜�")
+    @GetMapping("/inventoryUseRate")
+    public ApiResponse<WholeProvinceZXTVO> inventoryUseRate( ) {
+        WholeProvinceZXTVO  list = boardService.inventoryUseRate();
+        return ApiResponse.success(list);
+    }
+    @LoginNoRequired
+    @ApiOperation("杩愬姏璧勬簮鍒╃敤鐜�")
+    @GetMapping("/tranportAbilityUseRate")
+    public ApiResponse<WholeProvinceZXTVO> tranportAbilityUseRate( ) {
+        WholeProvinceZXTVO  list = boardService.tranportAbilityUseRate();
+        return ApiResponse.success(list);
+    }
+    @LoginNoRequired
+    @ApiOperation("鍑哄簱鑳藉姏鍒╃敤鐜�")
+    @GetMapping("/outAbilityUseRate")
+    public ApiResponse<WholeProvinceZXTVO> outAbilityUseRate( ) {
+        WholeProvinceZXTVO  list = boardService.outAbilityUseRate();
+        return ApiResponse.success(list);
+    }
+    @LoginNoRequired
+    @ApiOperation("鍦板浘鏈湀鏈勾鎬诲嚭搴撻噺缁熻闆嗗悎锛堟寜鐪佷唤锛�")
+    @GetMapping("/mapYearAndMonthOutList")
+    public ApiResponse<List<WholeProvinceMapVO>> mapYearAndMonthOutList( ) {
+        List<WholeProvinceMapVO>  list = boardService.mapYearAndMonthOutList();
+        return ApiResponse.success(list);
     }
 
 
+    @ApiOperation("璁㈠崟浠诲姟鍚堝悓鍒楄〃鎺ュ彛")
     @LoginNoRequired
-    @ApiOperation("涓婃湀娌硅�楁帓琛�")
-    @GetMapping("/lastMonthOil")
-    public ApiResponse<List<OilDataVO>> lastMonthOil() {
-        List<OilDataVO> oilDataVOList = new ArrayList<>();
-        Random random = new Random();
-        BigDecimal maxOil = BigDecimal.ZERO;
-        BigDecimal lastOil = BigDecimal.ZERO;
-        for (int i = 1; i <= 7; i++) {
-            OilDataVO oilDataVO = new OilDataVO();
-            oilDataVO.setCarNo("鐨朅8" + random.nextInt(9) + random.nextInt(9) + random.nextInt(9) + random.nextInt(9));
-            if(i==1){
-                oilDataVO.setQuantity(new BigDecimal(random.nextInt(100)));
-                maxOil = oilDataVO.getQuantity();
-            }else{
-                oilDataVO.setQuantity(new BigDecimal(random.nextInt(lastOil.intValue())));
-            }
-            lastOil = oilDataVO.getQuantity();
-            oilDataVO.setMaxOil(maxOil);
-            oilDataVOList.add(oilDataVO);
+    @PostMapping("/orderList")
+    public ApiResponse<TmsBasePageResponse<TmsOrderListResponse>> orderList(@RequestBody TmsOrderListRequest param )   {
+        if(param == null){
+            param = new TmsOrderListRequest();
         }
-        return ApiResponse.success(oilDataVOList);
+        if(param.getParameters() == null){
+            param.setParameters( new TmsOrderListParamRequest());
+        }
+        if(param.getPager() == null){
+            param.setPager( new TmsOrderListPagerRequest());
+        }
+        if(param.getPager().getPage() == null){
+            param.getPager().setPage(1);
+        }
+        if(param.getPager().getRows() == null){
+            param.getPager().setRows(10);
+        }
+        if(StringUtils.isBlank(param.getParameters().getPhoneNumber())){
+            param.getParameters().setPhoneNumber("00000000000");//鎵嬫満鍙峰繀濉�
+        }
+        if(param.getParameters().getContractNumbers()==null || param.getParameters().getContractNumbers().size()==0){
+            param.getParameters().setContractNumbers(null);
+        }
+        return  ApiResponse.success(tmsService.orderList(param));
+    }
+    @ApiOperation("鍚堝悓璇︽儏鎺ュ彛")
+    @LoginNoRequired
+    @PostMapping("/orderInfo")
+    public ApiResponse<TmsOrderInfoResponse> ordreInfo(@RequestBody TmsOrderInfoRequest request )   {
+
+        return ApiResponse.success(tmsService.orderInfo(request));
     }
 
 }
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/tms/model/response/TmsTotalAndReportVehicleQtyResponse.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/tms/model/response/TmsTotalAndReportVehicleQtyResponse.java
index c5043dc..87aa67c 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/core/tms/model/response/TmsTotalAndReportVehicleQtyResponse.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/tms/model/response/TmsTotalAndReportVehicleQtyResponse.java
@@ -19,7 +19,7 @@
     @ApiModelProperty(value = "宸ュ巶鍚嶇О" )
     private String   factoryName;//	瀛楃涓�	宸ュ巶鍚嶇О
     @ApiModelProperty(value = "鎻愭姤杩愬姏鏁�" )
-    private String   reportQty;//	鏁板瓧	鎻愭姤杩愬姏鏁�
+    private BigDecimal   reportQty;//	鏁板瓧	鎻愭姤杩愬姏鏁�
     @ApiModelProperty(value = "鎬昏繍鍔涙暟" )
-    private String   totalQty;//	鏁板瓧	鎬昏繍鍔涙暟
+    private BigDecimal   totalQty;//	鏁板瓧	鎬昏繍鍔涙暟
 }
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/SalesOperationVO.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/SalesOperationVO.java
deleted file mode 100644
index 6590352..0000000
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/SalesOperationVO.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.doumee.dao.web.response.platformReport;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.math.BigDecimal;
-
-/**
- * 杩涢攢瀛樺簱瀛�
- *
- * @Author : Rk
- * @create 2024/10/25 10:59
- */
-@Data
-public class SalesOperationVO {
-
-    @ApiModelProperty(value = "鏃ユ湡")
-    private String dateStr;
-
-    @ApiModelProperty(value = "鎬诲叆搴撴暟 涓囨敮")
-    private BigDecimal totalInNum;
-
-    @ApiModelProperty(value = "鎬诲嚭搴撴暟 涓囨敮")
-    private BigDecimal totalOutNum;
-
-    @ApiModelProperty(value = "搴撳瓨鍊� 涓囨敮")
-    private BigDecimal stockNum;
-
-}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/TotalOutQtyNumVO.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/TotalOutQtyNumVO.java
new file mode 100644
index 0000000..c769dcc
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/TotalOutQtyNumVO.java
@@ -0,0 +1,47 @@
+package com.doumee.dao.web.response.platformReport;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 杩愯緭浠诲姟
+ *
+ * @Author : Rk
+ * @create 2024/10/25 10:59
+ */
+@Data
+public class TotalOutQtyNumVO {
+
+    @ApiModelProperty(value = "鏈懆鍑哄簱閲�(鐪佸唴)")
+    private BigDecimal currentInWeekNum;
+    @ApiModelProperty(value = "鏈懆鍑哄簱閲�(鐪佸)")
+    private BigDecimal currentOutWeekNum;
+    @ApiModelProperty(value = "涓婂懆鍑哄簱閲忥紙鐪佸唴锛�")
+    private BigDecimal lastInWeekNum;
+    @ApiModelProperty(value = "涓婂懆鍑哄簱閲忥紙鐪佸锛�")
+    private BigDecimal lastOutWeekNum;
+    @ApiModelProperty(value = "鏈湀鍑哄簱閲忥紙鐪佸唴锛�")
+    private BigDecimal currentInMonthNum;
+    @ApiModelProperty(value = "鏈湀鍑哄簱閲忥紙鐪佸锛�")
+    private BigDecimal currentOutMonthNum;
+    @ApiModelProperty(value = "涓婃湀鍑哄簱閲忥紙鐪佸唴锛�")
+    private BigDecimal lastInMonthNum;
+    @ApiModelProperty(value = "涓婃湀鍑哄簱閲忥紙鐪佸锛�")
+    private BigDecimal lastOutMonthNum;
+    @ApiModelProperty(value = "鍘诲勾鍚屾湀鍑哄簱閲�(鐪佸唴锛�")
+    private BigDecimal sameInMonthNum;
+    @ApiModelProperty(value = "鍘诲勾鍚屾湀鍑哄簱閲忥紙鐪佸锛�")
+    private BigDecimal sameOutMonthNum;
+    @ApiModelProperty(value = "鏈勾鍑哄簱閲�(鐪佸唴锛�")
+    private BigDecimal  currentInYearNum;
+    @ApiModelProperty(value = "鏈勾鍑哄簱閲忥紙鐪佸锛�")
+    private BigDecimal  currentOutYearNum;
+    @ApiModelProperty(value = "鍘诲勾鍑哄簱閲忥紙鐪佸唴锛�")
+    private BigDecimal  lastInYearNum;
+    @ApiModelProperty(value = "鍘诲勾鍑哄簱閲忥紙鐪佸锛�")
+    private BigDecimal  lastOutYearNum;
+
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/WholeProvinceBoardVO.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/WholeProvinceBoardVO.java
index 778c88e..8becde0 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/WholeProvinceBoardVO.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/WholeProvinceBoardVO.java
@@ -1,6 +1,5 @@
 package com.doumee.dao.web.response.platformReport;
 
-import com.doumee.dao.business.model.PlatformJob;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
@@ -66,13 +65,13 @@
 
 
     @ApiModelProperty(value = "杩涢攢瀛樿繍钀� - 7鏃�" , hidden = true)
-    private List<SalesOperationVO> salesOperationWeekList;
+    private List<WholeProvinceZxtDetailVO> salesOperationWeekList;
 
     @ApiModelProperty(value = "杩涢攢瀛樿繍钀� - 鏈堝害" , hidden = true)
-    private List<SalesOperationVO> salesOperationMonthList;
+    private List<WholeProvinceZxtDetailVO> salesOperationMonthList;
 
     @ApiModelProperty(value = "杩涢攢瀛樿繍钀� - 骞村害" , hidden = true)
-    private List<SalesOperationVO> salesOperationYearList;
+    private List<WholeProvinceZxtDetailVO> salesOperationYearList;
 
     @ApiModelProperty(value = "搴撳瓨鍒╃敤鐜�" , hidden = true)
     private List<StockRataVO> stockRataVOListList;
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/WholeProvinceMapVO.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/WholeProvinceMapVO.java
new file mode 100644
index 0000000..dd2dbd6
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/WholeProvinceMapVO.java
@@ -0,0 +1,30 @@
+package com.doumee.dao.web.response.platformReport;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ *
+ *
+ * @Author : Rk
+ * @create 2024/10/25 10:59
+ */
+@Data
+public class WholeProvinceMapVO {
+
+    @ApiModelProperty(value = "鏈勾鎬绘暟閲� ")
+    private BigDecimal yearNum;
+
+    @ApiModelProperty(value = "鏈湀鎬绘暟閲� 涓囨敮")
+    private BigDecimal monthNum;
+
+    @ApiModelProperty(value = "鐪佷唤浠g爜")
+    private String provinceCode;
+    @ApiModelProperty(value = "鐪佷唤鍚嶇О")
+    private String provinceName;
+
+
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/WholeProvinceZXTVO.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/WholeProvinceZXTVO.java
new file mode 100644
index 0000000..3e77c7f
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/WholeProvinceZXTVO.java
@@ -0,0 +1,31 @@
+package com.doumee.dao.web.response.platformReport;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ *
+ *
+ * @Author : Rk
+ * @create 2024/10/25 10:59
+ */
+@Data
+public class WholeProvinceZXTVO {
+
+    @ApiModelProperty(value = "鍒╃敤鐜� ")
+    private BigDecimal useRate;
+
+    @ApiModelProperty(value = "鎬绘暟閲� 涓囨敮")
+    private BigDecimal totalNum;
+
+    @ApiModelProperty(value = "褰撳墠鍊� 涓囨敮")
+    private BigDecimal currentNum;
+
+    @ApiModelProperty(value = "鍥惧舰鏄庣粏闆嗗悎")
+    private List<WholeProvinceZxtDetailVO> detailList;
+
+
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/WholeProvinceZxtDetailVO.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/WholeProvinceZxtDetailVO.java
new file mode 100644
index 0000000..413a3d4
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/WholeProvinceZxtDetailVO.java
@@ -0,0 +1,29 @@
+package com.doumee.dao.web.response.platformReport;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ *
+ *
+ * @Author : Rk
+ * @create 2024/10/25 10:59
+ */
+@Data
+public class WholeProvinceZxtDetailVO {
+
+    @ApiModelProperty(value = "鐑熷巶鍚嶇О")
+    private String factoryName;
+
+    @ApiModelProperty(value = "鍒╃敤鐜� ")
+    private BigDecimal useRate;
+
+    @ApiModelProperty(value = "鎬绘暟閲� 涓囨敮")
+    private BigDecimal totalNum;
+
+    @ApiModelProperty(value = "褰撳墠鍊� 涓囨敮")
+    private BigDecimal currentNum;
+
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
index 95aaf3c..4fdc968 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
@@ -14,9 +14,12 @@
 import com.doumee.core.haikang.model.param.respose.*;
 import com.doumee.core.haikang.service.HKCarOpenService;
 import com.doumee.core.haikang.service.HKService;
-import com.doumee.core.model.ApiResponse;
-import com.doumee.core.model.PageData;
-import com.doumee.core.model.PageWrap;
+import com.doumee.core.tms.model.request.TmsFacrotyCodeListRequest;
+import com.doumee.core.tms.model.request.TmsOutQtyAndVehicleQtyRequest;
+import com.doumee.core.tms.model.response.TmsDistributionOfDeliveryLocResponse;
+import com.doumee.core.tms.model.response.TmsInventoryListResponse;
+import com.doumee.core.tms.model.response.TmsOutQtyAndVehicleQtyResponse;
+import com.doumee.core.tms.model.response.TmsTotalAndReportVehicleQtyResponse;
 import com.doumee.core.utils.Constants;
 import com.doumee.core.utils.DateUtil;
 import com.doumee.core.utils.Utils;
@@ -30,8 +33,8 @@
 import com.doumee.dao.web.reqeust.CarsJobAndContractDTO;
 import com.doumee.dao.web.response.platformReport.*;
 import com.doumee.service.business.impl.PlatformJobServiceImpl;
-import com.doumee.service.business.impl.VisitsServiceImpl;
 import com.doumee.service.business.third.BoardService;
+import com.doumee.service.business.third.TmsService;
 import com.doumee.service.business.third.WmsService;
 import com.github.xiaoymin.knife4j.core.util.CollectionUtils;
 import com.github.yulichang.wrapper.MPJLambdaWrapper;
@@ -40,9 +43,7 @@
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import org.springframework.web.bind.annotation.RequestBody;
 
-import javax.servlet.http.HttpServletResponse;
 import java.math.BigDecimal;
 import java.util.*;
 import java.util.stream.Collectors;
@@ -66,6 +67,8 @@
     @Autowired
     private SystemDictDataBiz systemDictDataBiz;
     @Autowired
+    private TmsFactoryParamMapper tmsFactoryParamMapper;
+    @Autowired
     private PlatformWarnEventJoinMapper platformWarnEventJoinMapper;
     @Autowired
     private PlatformJobMapper platformJobMapper;
@@ -83,6 +86,8 @@
     private RetentionMapper retentionMapper;
     @Autowired
     private PlatformGroupMapper platformGroupMapper;
+    @Autowired
+    private TmsService tmsService;
     /**
      * 鑾峰彇鍖哄煙鏍戝舰缁撴瀯鏁版嵁
      * @return
@@ -2036,7 +2041,242 @@
             return null;
         }
     }
+    /**
+     * 鍑哄簱鑳藉姏鏉庢案鍒�
+     * @return
+     */
+    @Override
+    public WholeProvinceZXTVO outAbilityUseRate(){
+        WholeProvinceZXTVO result = new WholeProvinceZXTVO();
+        result.setCurrentNum(new BigDecimal(0));
+        result.setTotalNum(new BigDecimal(0));
+        result.setUseRate(new BigDecimal(0));
+        result.setDetailList(new ArrayList<>());
+        List<TmsFactoryParam> paramList = factoryList();
+        List<WholeProvinceZxtDetailVO> list = new ArrayList<>();
+        TmsOutQtyAndVehicleQtyRequest param = new TmsOutQtyAndVehicleQtyRequest();
+        if(paramList!=null){
+            String startDate = DateUtil.formatDate(new Date(),"yyyy-MM-dd");
+            String endDate = DateUtil.formatDate(new Date(),"yyyy-MM-dd");
+            for(TmsFactoryParam p : paramList){
+                WholeProvinceZxtDetailVO t = new WholeProvinceZxtDetailVO();
+                t.setFactoryName(p.getName());
+                t.setCurrentNum(new BigDecimal(0));
+                t.setUseRate(new BigDecimal(0));
+                t.setTotalNum(Constants.formatBigdecimal(p.getNum2()));//鎬诲嚭搴撹兘鍔�
+                if(StringUtils.isBlank(p.getCode())){
+                    param.setFacrotyCodeList(new ArrayList<>());
+                    param.setDateStart(startDate);
+                    param.setDateEnd(endDate);
+                    param.getFacrotyCodeList().add(p.getCode());
+                    List<TmsOutQtyAndVehicleQtyResponse> response = tmsService.getOutQtyAndVehicleQty(param);//鏌ヨ鍑哄簱閲�
+                    t.setCurrentNum(getCurrentOutQryByList(response));
+                    if(t.getTotalNum().compareTo(new BigDecimal(0)) !=0){
+                        t.setUseRate(t.getCurrentNum().divide(t.getTotalNum(),4,BigDecimal.ROUND_HALF_UP));
+                    }
+                }
+                result.getDetailList().add(t);
+                result.setCurrentNum(result.getCurrentNum().add(t.getCurrentNum()));
+                result.setTotalNum(result.getTotalNum().add(t.getTotalNum()));
+            }
+        }
+        if(result.getTotalNum().compareTo(new BigDecimal(0)) !=0){
+            result.setUseRate(result.getCurrentNum().divide(result.getTotalNum(),4,BigDecimal.ROUND_HALF_UP));
+        }
+        return result;
+    }
+    /**
+     * 鍑哄簱鑳藉姏鏉庢案鍒�
+     * @return
+     */
+    @Override
+    public    TotalOutQtyNumVO totalOutQtyNum(){
+        TotalOutQtyNumVO  data = new TotalOutQtyNumVO();
+        data.setCurrentInYearNum(new BigDecimal(0));
+        data.setCurrentInWeekNum(new BigDecimal(0));
+        data.setCurrentInMonthNum(new BigDecimal(0));
+        data.setLastInYearNum(new BigDecimal(0));
+        data.setLastInMonthNum(new BigDecimal(0));
+        data.setLastInWeekNum(new BigDecimal(0));
+        data.setSameInMonthNum(new BigDecimal(0));
+        //---------鐪佸----------------
+        data.setCurrentOutYearNum(new BigDecimal(0));
+        data.setCurrentOutWeekNum(new BigDecimal(0));
+        data.setCurrentOutMonthNum(new BigDecimal(0));
+        data.setLastOutYearNum(new BigDecimal(0));
+        data.setLastOutMonthNum(new BigDecimal(0));
+        data.setLastOutWeekNum(new BigDecimal(0));
+        data.setSameOutMonthNum(new BigDecimal(0));
 
+        return data;
+    }
+    /**
+     * 鍑哄簱鑳藉姏鏉庢案鍒�
+     * @return
+     */
+    @Override
+    public    List<WholeProvinceMapVO> mapYearAndMonthOutList(){
+        List<WholeProvinceMapVO> result = new ArrayList<>();
+        List<TmsFactoryParam> paramList =factoryList();
+        if(paramList!=null && paramList.size()>0){
+            List<String> codes = new ArrayList<>();
+            for(TmsFactoryParam p : paramList){
+                if(StringUtils.isBlank(p.getCode())){
+                    continue;
+                }
+                codes.add(p.getCode());
+            }
+            if(codes.size()>0){
+                TmsFacrotyCodeListRequest param = new TmsFacrotyCodeListRequest();
+                param.setFacrotyCodeList(codes);
+                List<TmsDistributionOfDeliveryLocResponse> response  = tmsService.getDistributionOfDeliveryLocations(param);//鏌ヨ鍑哄簱閲�
+                if(response!=null &&response.size()>0){
+                    for(TmsDistributionOfDeliveryLocResponse model : response){
+                        WholeProvinceMapVO tt = getFromProvinceResultList(model ,result);
+                        if(tt == null){
+                            tt =new WholeProvinceMapVO();
+                            tt.setMonthNum( Constants.formatBigdecimal0Float(model.getMonthOutboundQuantity()));
+                            tt.setYearNum( Constants.formatBigdecimal0Float(model.getYearOutboundQuantity()));
+                            tt.setProvinceCode(model.getFromProvinceCode());
+                            tt.setProvinceName(model.getFromProvinceName());
+                            result.add(tt);
+                        }
+                    }
+                }
+            }
+
+        }
+        return result;
+    }
+
+    private WholeProvinceMapVO getFromProvinceResultList(TmsDistributionOfDeliveryLocResponse model, List<WholeProvinceMapVO> result) {
+        for(WholeProvinceMapVO t : result){
+            if(StringUtils.equals(t.getProvinceCode(), model.getFromProvinceCode())){
+                t.setMonthNum(Constants.formatBigdecimal(t.getMonthNum()).add(Constants.formatBigdecimal0Float(model.getMonthOutboundQuantity())));
+                t.setYearNum(Constants.formatBigdecimal(t.getYearNum()).add(Constants.formatBigdecimal0Float(model.getYearOutboundQuantity())));
+                return   t;
+            }
+        }
+
+        return  null;
+    }
+
+    /**
+     * 鍑哄簱鑳藉姏鏉庢案鍒�
+     * @return
+     */
+    @Override
+    public     List<TmsFactoryParam> factoryList(){
+        List<TmsFactoryParam> paramList = tmsFactoryParamMapper.selectList(new QueryWrapper<TmsFactoryParam>().lambda()
+                .eq(TmsFactoryParam::getIsdeleted,Constants.ZERO)
+                .orderByAsc(TmsFactoryParam::getSortnum));
+        return paramList;
+    }
+    /**
+     * 鍑哄簱鑳藉姏鏉庢案鍒�
+     * @return
+     */
+    @Override
+    public WholeProvinceZXTVO tranportAbilityUseRate(){
+        WholeProvinceZXTVO result = new WholeProvinceZXTVO();
+        result.setCurrentNum(new BigDecimal(0));
+        result.setTotalNum(new BigDecimal(0));
+        result.setUseRate(new BigDecimal(0));
+        result.setDetailList(new ArrayList<>());
+        List<TmsFactoryParam> paramList =factoryList();
+        if(paramList!=null){
+            List<TmsTotalAndReportVehicleQtyResponse> response = tmsService.getTotalAndReportVehicleQty();//鏌ヨ鍑哄簱閲�
+            for(TmsFactoryParam p : paramList){
+                WholeProvinceZxtDetailVO t = new WholeProvinceZxtDetailVO();
+                t.setFactoryName(p.getName());
+                t.setCurrentNum(new BigDecimal(0));
+                t.setTotalNum(Constants.formatBigdecimal(p.getNum1()));//鎬诲簱瀛橀噺
+                getFromReportVehicleQtyList(p.getCode(),t,response);//澶勭悊鎻愭姤杩愬姏鍜屾�昏繍鍔涙暟鎹�
+                t.setUseRate(new BigDecimal(0));
+                if(t.getTotalNum().compareTo(new BigDecimal(0)) !=0){
+                    t.setUseRate(t.getCurrentNum().divide(t.getTotalNum(),4,BigDecimal.ROUND_HALF_UP));
+                }
+                result.getDetailList().add(t);
+                result.setCurrentNum(result.getCurrentNum().add(t.getCurrentNum()));
+                result.setTotalNum(result.getTotalNum().add(t.getTotalNum()));
+            }
+        }
+        if(result.getTotalNum().compareTo(new BigDecimal(0)) !=0){
+            result.setUseRate(result.getCurrentNum().divide(result.getTotalNum(),4,BigDecimal.ROUND_HALF_UP));
+        }
+        return result;
+    }
+    private void getFromReportVehicleQtyList(String code,WholeProvinceZxtDetailVO t, List<TmsTotalAndReportVehicleQtyResponse> responses) {
+        BigDecimal current = new BigDecimal(0);
+        BigDecimal total= new BigDecimal(0);
+        if(responses!=null && responses.size()>0){
+            for(TmsTotalAndReportVehicleQtyResponse model: responses){
+                if(StringUtils.equals(model.getFactoryCode(),code)){
+                    total = total.add(Constants.formatBigdecimal(model.getTotalQty()));
+                    current = current.add(Constants.formatBigdecimal(model.getReportQty()));
+                }
+            }
+        }
+        t.setCurrentNum(current);
+        t.setTotalNum(total);
+    }
+    private BigDecimal getCurrentOutQryByList(List<TmsOutQtyAndVehicleQtyResponse> response) {
+        BigDecimal r = new BigDecimal(0);
+        if(response!=null && response.size()>0){
+            for(TmsOutQtyAndVehicleQtyResponse model: response){
+                    r = r.add(Constants.formatBigdecimal(model.getTotalOutQty()));
+            }
+        }
+        return r ;
+    }
+
+    /**
+     * 浠撳簱璧勬簮鍒╃敤鐜�
+     * @return
+     */
+    @Override
+    public WholeProvinceZXTVO inventoryUseRate(){
+        WholeProvinceZXTVO result = new WholeProvinceZXTVO();
+        result.setCurrentNum(new BigDecimal(0));
+        result.setTotalNum(new BigDecimal(0));
+        result.setUseRate(new BigDecimal(0));
+        result.setDetailList(new ArrayList<>());
+        List<TmsFactoryParam> paramList = factoryList();
+        List<TmsInventoryListResponse> responses = tmsService.getRealTimeInventory();
+        if(paramList!=null){
+            for(TmsFactoryParam p : paramList){
+                WholeProvinceZxtDetailVO t = new WholeProvinceZxtDetailVO();
+                t.setFactoryName(p.getName());
+                t.setCurrentNum(new BigDecimal(0));
+                t.setTotalNum(Constants.formatBigdecimal(p.getNum1()));//鎬诲簱瀛橀噺
+                t.setCurrentNum(getFromInventoryList(p.getCode(),responses));
+                t.setUseRate(new BigDecimal(0));
+                if(t.getTotalNum().compareTo(new BigDecimal(0)) !=0){
+                    t.setUseRate(t.getCurrentNum().divide(t.getTotalNum(),4,BigDecimal.ROUND_HALF_UP));
+                }
+                result.getDetailList().add(t);
+                result.setCurrentNum(result.getCurrentNum().add(t.getCurrentNum()));
+                result.setTotalNum(result.getTotalNum().add(t.getTotalNum()));
+            }
+        }
+        if(result.getTotalNum().compareTo(new BigDecimal(0)) !=0){
+            result.setUseRate(result.getCurrentNum().divide(result.getTotalNum(),4,BigDecimal.ROUND_HALF_UP));
+        }
+        return result;
+    }
+
+    private BigDecimal getFromInventoryList(String code, List<TmsInventoryListResponse> responses) {
+        BigDecimal r = new BigDecimal(0);
+        if(responses!=null && responses.size()>0){
+            for(TmsInventoryListResponse model: responses){
+                if(StringUtils.equals(model.getFactoryCode(),code)){
+                   r = r.add(Constants.formatBigdecimal(model.getStockQty()));
+                }
+            }
+        }
+        return r ;
+
+    }
 
 
 }
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/TmsServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/TmsServiceImpl.java
index 645a5b9..615705c 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/TmsServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/TmsServiceImpl.java
@@ -197,27 +197,6 @@
      */
     @Override
     public   TmsBasePageResponse<TmsOrderListResponse>  orderList(TmsOrderListRequest param){
-        if(param == null){
-            param = new TmsOrderListRequest();
-        }
-        if(param.getParameters() == null){
-            param.setParameters( new TmsOrderListParamRequest());
-        }
-        if(param.getPager() == null){
-            param.setPager( new TmsOrderListPagerRequest());
-        }
-        if(param.getPager().getPage() == null){
-            param.getPager().setPage(1);
-        }
-        if(param.getPager().getRows() == null){
-            param.getPager().setRows(10);
-        }
-       if(StringUtils.isBlank(param.getParameters().getPhoneNumber())){
-           param.getParameters().setPhoneNumber("00000000000");//鎵嬫満鍙峰繀濉�
-       }
-       if(param.getParameters().getContractNumbers()==null || param.getParameters().getContractNumbers().size()==0){
-           param.getParameters().setContractNumbers(null);
-       }
         String url = systemDictDataBiz.queryByCode(Constants.TSM_PARAM,Constants.TMS_INTERFACE_URL_PREFIX).getCode()
                     +TMSContants.InterfacePath.getOrderList[0];
         TmsBaseResponse<TmsBasePageResponse<TmsOrderListResponse>> response = sendHttpRequest(url,TMSContants.InterfacePath.getOrderList[1],JSONObject.toJSONString(param)
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/third/BoardService.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/third/BoardService.java
index 927ec61..eba17aa 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/third/BoardService.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/third/BoardService.java
@@ -1,9 +1,9 @@
 package com.doumee.service.business.third;
 
 import com.doumee.core.haikang.model.cars.response.CarsAlarmResultListResponse;
-import com.doumee.core.haikang.model.param.request.RegionDataRankingTypeRequest;
 import com.doumee.core.haikang.model.param.respose.*;
 import com.doumee.dao.business.model.PlatformWarnEvent;
+import com.doumee.dao.business.model.TmsFactoryParam;
 import com.doumee.dao.web.reqeust.CarsJobAndContractDTO;
 import com.doumee.dao.web.response.platformReport.*;
 
@@ -92,4 +92,14 @@
     List<CarsAlarmResultListResponse> carsEventList();
 
     List<RegionDataRankingDataResponse> getRegionDataRanking(Integer type);
+
+    WholeProvinceZXTVO inventoryUseRate();
+    WholeProvinceZXTVO outAbilityUseRate();
+    WholeProvinceZXTVO tranportAbilityUseRate();
+
+    List<TmsFactoryParam> factoryList();
+
+    List<WholeProvinceMapVO> mapYearAndMonthOutList();
+
+    TotalOutQtyNumVO totalOutQtyNum();
 }

--
Gitblit v1.9.3