Browse Source

Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/DAL-DAZHOU-API

zx 3 years ago
parent
commit
5509d9b930

+ 8 - 3
src/main/java/com/steerinfo/dil/controller/AMScontroller.java

@@ -1337,11 +1337,12 @@ public class AMScontroller{
     public Map<String, Object> getAmsSaleOrderApprovedes(@RequestBody(required = false) Map<String, Object> mapValue,
                                                          Integer pageNum,
                                                          Integer pageSize,
-                                                         Integer apiId) {
+                                                         Integer apiId,
+                                                         String index) {
         if (mapValue == null) {
             mapValue = new HashMap<>();
         }
-        return amsFeign.getAmsSaleOrderApprovedes(mapValue, pageNum, pageSize, apiId);
+        return amsFeign.getAmsSaleOrderApprovedes(mapValue, pageNum, pageSize, apiId,index);
     }
 
     /*
@@ -1471,7 +1472,11 @@ public class AMScontroller{
         return amsFeign.getClientNoticeList(mapValue == null ? new HashMap<>() : mapValue, apiId, pageNum, pageSize, con);
     }
 
-
+    @ApiOperation(value="销售公司直接选择车牌号派发运输订单")
+    @PostMapping("/dispatchTruckOrderBySale")
+    public Map<String,Object> dispatchTruckOrderBySale(@RequestBody Map<String,Object> mapValue){
+        return amsFeign.dispatchTruckOrderBySale(mapValue);
+    }
 
 
 

+ 11 - 5
src/main/java/com/steerinfo/dil/controller/RMScontroller.java

@@ -981,11 +981,6 @@ public class RMScontroller {
         return rmsFeign.deletePortYard(warehouseId);
     }
 
-    //上传图片
-    @PostMapping(value = "/upload")
-    public Map<String,Object> upLoadPhoto(@RequestParam("file") MultipartFile file){
-        return rmsFeign.upLoadPhoto(file);
-    }
 
     /**
      * 得到二级部门的下拉
@@ -1055,4 +1050,15 @@ public class RMScontroller {
     public Map<String,Object>  deleteShipperResult(@RequestBody(required = false) Map<String, Object> map){
         return rmsFeign.deleteShipperResult(map);
     }
+
+    @PostMapping(value = "/getCarrierNameBySSOId")
+    public Map<String,Object> getCarrierNameBySSOId(@RequestParam("carrierSSOId") String carrierSSOId){
+        return rmsFeign.getCarrierNameBySSOId(carrierSSOId);
+    }
+    //边输边查收货客户父节点
+    @PostMapping(value = "getConsigneeFarId")
+    public Map<String,Object> getConsigneeFarId(@RequestParam(value ="state") String state){
+        return rmsFeign.getConsigneeFarId(state);
+    }
+
 }

+ 18 - 0
src/main/java/com/steerinfo/dil/controller/TMSController.java

@@ -1915,4 +1915,22 @@ public class TMSController extends BaseRESTfulController {
     ){
         return tmsTruckFeign.getAllSaleReport(mapValue==null?new HashMap<>():mapValue, apiId, pageNum, pageSize, carrierSsoId);
     }
+    @ApiOperation(value="查询零星物资进厂统计报表")
+    @PostMapping("/getSporadicSuppliesReport1")
+    public Map<String, Object> getSporadicSuppliesReport1(@RequestBody(required=false) Map<String,Object> mapValue,
+                                                Integer apiId,
+                                                Integer pageNum,
+                                                Integer pageSize, String carrierSsoId
+    ){
+        return tmsTruckFeign.getSporadicSuppliesReport1(mapValue==null?new HashMap<>():mapValue, apiId, pageNum, pageSize, carrierSsoId);
+    }
+    @ApiOperation(value="查询零星物资出厂统计报表")
+    @PostMapping("/getSporadicSuppliesReport2")
+    public Map<String, Object> getSporadicSuppliesReport2(@RequestBody(required=false) Map<String,Object> mapValue,
+                                                Integer apiId,
+                                                Integer pageNum,
+                                                Integer pageSize, String carrierSsoId
+    ){
+        return tmsTruckFeign.getSporadicSuppliesReport2(mapValue==null?new HashMap<>():mapValue, apiId, pageNum, pageSize, carrierSsoId);
+    }
 }

+ 12 - 34
src/main/java/com/steerinfo/dil/controller/UniversalController.java

@@ -142,7 +142,7 @@ public class UniversalController extends BaseRESTfulController {
     @ApiOperation(value="查询所有空闲的运力信息")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
-            @ApiImplicitParam(name = "apiId()", value = "动态表头", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "apiId(248)", value = "动态表头", required = false, dataType = "Integer"),
             @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
             @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
     })
@@ -158,14 +158,16 @@ public class UniversalController extends BaseRESTfulController {
             mapValue = new HashMap<>();
         }
         if(index != null){
-            mapValue.put("index", "%" + index + "%");
+            mapValue.put("index","%" + index + "%");
         }
-        if(carrierSsoId != null){
-            if(!"null".equals(carrierSsoId)){
-                mapValue.put("carrierSsoId", carrierSsoId);
-            }
+        if (carrierSsoId != null && carrierSsoId.equals("undefined")) {
+            carrierSsoId = null;
         }
-
+        BigDecimal carrierId = null;
+        if (carrierSsoId != null) {
+          carrierId = universalMapper.getCarrierIdBySSO(carrierSsoId);
+        }
+        mapValue.put("carrierId",carrierId);
         //不分页筛选数据
         List<Map<String, Object>> allCapacity = universalMapper.getAllCapacityByCarrierLike(mapValue);
         PageHelper.startPage(pageNum,pageSize);
@@ -209,30 +211,14 @@ public class UniversalController extends BaseRESTfulController {
     @ApiModelProperty(value = "边输边查发货单位")
     @PostMapping("/getSupplierMesByLike")
     public RESTfulResult getSupplierMesByLike(@RequestParam("index") String index) {
-        if(index != null){
-            if(index.length() == 0){
-                index = null;
-            }else {
-//                index += "%";
-                index = "%"+index+"%";
-            }
-        }
-        List<Map<String, Object>> list = universalMapper.getSupplierMesByLike(index);
+        List<Map<String, Object>> list = universalMapper.getSupplierMesByLike(index == null ? "" : index);
         return success(list);
     }
 
     @ApiModelProperty(value = "边输边查收货单位")
     @PostMapping("/getConsigneeByLike")
     public RESTfulResult getConsigneeByLike(@RequestParam("index") String index) {
-        if(index != null){
-            if(index.length() == 0){
-                index = null;
-            }else {
-//                index += "%";
-                index = "%"+index+"%";
-            }
-        }
-        List<Map<String, Object>> list = universalMapper.getConsigneeByLike(index);
+        List<Map<String, Object>> list = universalMapper.getConsigneeByLike(index == null ? "" : index);
         return success(list);
     }
 
@@ -364,15 +350,7 @@ public class UniversalController extends BaseRESTfulController {
     @ApiModelProperty(value = "边输边查承运商")
     @PostMapping("/getCarrierMesByLike")
     public RESTfulResult getCarrierMesByLike(@RequestParam("index") String index) {
-        if(index != null){
-            if(index.length() == 0){
-                index = null;
-            }else {
-//                index += "%";
-                index = "%"+index+"%";
-            }
-        }
-        List<Map<String, Object>> list = universalMapper.getCarrierMesByLike(index);
+        List<Map<String, Object>> list = universalMapper.getCarrierMesByLike(index == null ? "" : index);
         return success(list);
     }
 

+ 6 - 2
src/main/java/com/steerinfo/dil/feign/AmsFeign.java

@@ -1164,7 +1164,7 @@ public interface AmsFeign {
 //                                                      @RequestParam Integer apiId,
 //                                                      @RequestParam String con) ;
 
-    @PostMapping("/api/v1/ams/amsdispatchsaleorders/getPCDispatchSaleOrderList")
+    @PostMapping("/api/v1销售/ams/amsdispatchsaleorders/getPCDispatchSaleOrderList")
     Map<String, Object> getPCDispatchSaleOrderList(@RequestBody(required = false) Map<String,Object> mapValue,
                                                       @RequestParam Integer pageNum,
                                                       @RequestParam Integer pageSize,
@@ -1314,7 +1314,8 @@ public interface AmsFeign {
     Map<String, Object> getAmsSaleOrderApprovedes(@RequestBody(required = false) Map<String, Object> mapValue,
                                                   @RequestParam("pageNum") Integer pageNum,
                                                   @RequestParam("pageSize") Integer pageSize,
-                                                  @RequestParam("apiId") Integer apiId);
+                                                  @RequestParam("apiId") Integer apiId,
+                                                  @RequestParam("index") String index);
 
     @ApiOperation(value="查询销售订单物资信息")
     @ApiImplicitParams({
@@ -1415,4 +1416,7 @@ public interface AmsFeign {
 
     @PostMapping(value = "api/v1/ams/amsdispatchsaleorders/getDispatchMaterialList")
     RESTfulResult getDispatchMaterialList(@RequestParam Integer dispatchId);
+
+    @PostMapping(value = "api/v1/ams/amssaleordermaterials/dispatchTruckOrderBySale")
+    Map<String, Object> dispatchTruckOrderBySale(Map<String, Object> mapValue);
 }

+ 7 - 3
src/main/java/com/steerinfo/dil/feign/RmsFeign.java

@@ -532,9 +532,6 @@ public interface RmsFeign {
     @PostMapping(value = "api/v1/rms/rmsPortYard/deletePortYard/{warehouseId}")
     Map<String, Object> deletePortYard(@PathVariable("warehouseId") BigDecimal warehouseId);
 
-    //上传图片
-    @PostMapping(value = "api/v1/rms/rmscardriver/upload")
-    Map<String,Object> upLoadPhoto(@RequestParam("file") MultipartFile file);
 
     // 得到二级部门的下拉
     @GetMapping(value = "api/v1/rms/rmspersonnel/getSecondShipper")
@@ -571,4 +568,11 @@ public interface RmsFeign {
     @PostMapping(value = "api/v1/rms/rmsshipper/deleteShipperResult")
     Map<String,Object>  deleteShipperResult(@RequestBody(required = false) Map<String, Object> map);
 
+    @ApiOperation(value = "根据carrierSSOId查询承运商")
+    @PostMapping(value = "api/v1/rms/rmscapacity/getCarrierNameBySSOId")
+    Map<String, Object> getCarrierNameBySSOId(@RequestParam("carrierSSOId") String carrierSSOId);
+
+    @ApiOperation(value = "边输边查收货客户父节点")
+    @PostMapping(value = "api/v1/rms/rmsconsignee/getConsigneeFarId")
+    Map<String, Object> getConsigneeFarId(@RequestParam("state") String state);
 }

+ 14 - 0
src/main/java/com/steerinfo/dil/feign/TmsTruckFeign.java

@@ -362,6 +362,20 @@ public interface TmsTruckFeign {
                                       @RequestParam("pageSize") Integer pageSize,
                                       @RequestParam("carrierSsoId")   String carrierSsoId
     );
+    @PostMapping("api/v1/truckTms/statisticalReport/getSporadicSuppliesReport1")
+    Map<String, Object> getSporadicSuppliesReport1(@RequestBody(required=false) Map<String,Object> mapValue,
+                                         @RequestParam("apiId") Integer apiId,
+                                         @RequestParam("pageNum") Integer pageNum,
+                                         @RequestParam("pageSize") Integer pageSize,
+                                         @RequestParam("carrierSsoId")   String carrierSsoId
+    );
+    @PostMapping("api/v1/truckTms/statisticalReport/getSporadicSuppliesReport2")
+    Map<String, Object> getSporadicSuppliesReport2(@RequestBody(required=false) Map<String,Object> mapValue,
+                                         @RequestParam("apiId") Integer apiId,
+                                         @RequestParam("pageNum") Integer pageNum,
+                                         @RequestParam("pageSize") Integer pageSize,
+                                         @RequestParam("carrierSsoId")   String carrierSsoId
+    );
 }
 
 

+ 28 - 28
src/main/resources/bootstrap.yml

@@ -22,33 +22,33 @@ eureka:
     status-page-url: http://${spring.cloud.client.ip-address}:${server.port}/swagger-ui.html#/
     instance-id: ${spring.cloud.client.ip-address}:${server.port}
 openfeign:
-#  正式环境
-    ColumnDataFeign:
-      url: ${COLUMNDATAFEIGN_URL:172.16.33.166:8083}
-    AmsFeign:
-      url: ${AMSFEIGN_URL:172.16.33.166:8079}
-    BmsshipFeign:
-      url: ${BMSSHIPFEIGN_URL:172.16.33.166:8078}
-    BmstrainFeign:
-      url: ${BMSTRAINFEIGN_URL:172.16.33.166:8077}
-    BmstruckFeign:
-      url: ${BMSTRUCKFEIGN_URL:172.16.33.166:8076}
-    QmsTruckFeign:
-      url: ${QMSTRUCKFEIGN_URL:172.16.33.166:8047}
-    TmsTrainFeign:
-      url: ${TMSTRAINFEIGN_URL:172.16.33.166:8086}
-    TmsTruckFeign:
-      url: ${TMSTRUCKFEIGN_URL:172.16.33.166:8088}
-    TmsshipFeign:
-      url: ${TMSSHIPFEIGN_URL:172.16.33.166:8090}
-    WMSHFeign:
-      url: ${WMSHFEIGN_URL:172.16.33.166:8070}
-    WMSFeign:
-      url: ${WMSFEIGN_URL:172.16.33.166:8093}
-    OMSFeign:
-      url: ${OMSFEIGN_URL:172.16.33.166:8095}
-    RmsFeign:
-      url: ${RMSFEIGN_URL:172.16.33.166:8060}
+  #  正式环境
+  ColumnDataFeign:
+    url: ${COLUMNDATAFEIGN_URL:172.16.33.166:8083}
+  AmsFeign:
+    url: ${AMSFEIGN_URL:172.16.33.166:8079}
+  BmsshipFeign:
+    url: ${BMSSHIPFEIGN_URL:172.16.33.166:8078}
+  BmstrainFeign:
+    url: ${BMSTRAINFEIGN_URL:172.16.33.166:8077}
+  BmstruckFeign:
+    url: ${BMSTRUCKFEIGN_URL:172.16.33.166:8076}
+  QmsTruckFeign:
+    url: ${QMSTRUCKFEIGN_URL:172.16.33.166:8047}
+  TmsTrainFeign:
+    url: ${TMSTRAINFEIGN_URL:172.16.33.166:8086}
+  TmsTruckFeign:
+    url: ${TMSTRUCKFEIGN_URL:172.16.33.166:8088}
+  TmsshipFeign:
+    url: ${TMSSHIPFEIGN_URL:172.16.33.166:8090}
+  WMSHFeign:
+    url: ${WMSHFEIGN_URL:172.16.33.166:8070}
+  WMSFeign:
+    url: ${WMSFEIGN_URL:172.16.33.166:8093}
+  OMSFeign:
+    url: ${OMSFEIGN_URL:172.16.33.166:8095}
+  RmsFeign:
+    url: ${RMSFEIGN_URL:172.16.33.166:8060}
   #测试环境
 #  ColumnDataFeign:
 #    url: ${COLUMNDATAFEIGN_URL:172.16.33.162:8001}
@@ -110,4 +110,4 @@ mybatis:
 server:
   port: 8080
 #测试环境
-#  port: 8080
+#  port: 8019

+ 31 - 39
src/main/resources/com/steerinfo/dil/mapper/UniversalMapper.xml

@@ -149,18 +149,33 @@
                         RC.CAPACITY_ID        "capacityId",
                         RC.CAPACITY_NUMBER     "capacityNumber",
                         RCA.CARRIER_NAME       "carrierName"
-
                  FROM RMS_CAPACITY RC
                           JOIN RMS_CARRIER RCA
                                 ON RCA.CARRIER_ID = RC.CARRIER_ID
                  WHERE RC.CAPACITY_STATUS = 0 AND RC.CAPACITY_TYPE_ID = 1
-                   <if test="index != null">
-                       and RC.CAPACITY_NUMBER LIKE #{index}
-                   </if>
-                   <if test="carrierSsoId != null">
-                       and RCA.CARRIER_SSO_ID = #{carrierSsoId}
-                   </if>
-             )
+            <if test="carrierId != null" >
+                and RC.CARRIER_ID = #{carrierId}
+            </if>
+             ) RCRC
+        <if test="index != null">
+            where RCRC."capacityNumber" LIKE #{index}
+        </if>
+        <if test="index != null">
+            or RCRC."carrierName" LIKE #{index}
+        </if>
+<!--        <where>-->
+<!--            <if test="capacityNumber != null">-->
+<!--                <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">-->
+<!--                    "capacityNumber" like '%${item}%'-->
+<!--                </foreach>-->
+<!--            </if>-->
+<!--            <if test="carrierName != null">-->
+<!--                and-->
+<!--                <foreach collection="carrierName" item="item" open="(" separator="or" close=")">-->
+<!--                    "carrierName" like '%${item}%'-->
+<!--                </foreach>-->
+<!--            </if>-->
+<!--        </where>-->
     </select>
 
     <select id="getCarrierIdBySSO" parameterType="java.lang.String" resultType="DECIMAL" >
@@ -416,15 +431,8 @@
             RC.CARRIER_NAME "value",
             RC.CARRIER_NAME "carrierName"
         from RMS_CARRIER RC
-        <where>
-            <if test="index != null">
-                RC.CARRIER_NAME  like #{index}
-                and rownum &lt; 10
-            </if>
-            <if test="index == null">
-                rownum &lt; 10
-            </if>
-        </where>
+        where
+            instr(RC.CARRIER_NAME, #{index}) > 0 and rownum &lt; 10
         order by "value"
     </select>
 
@@ -432,19 +440,11 @@
 <!--  边输边查发货单位  -->
     <select id="getSupplierMesByLike" parameterType="string" resultType="java.util.Map">
         select
-        RS.SUPPLIER_ID "supplierId",
-        RS.SUPPLIER_NAME "value",
-        RS.SUPPLIER_NAME "supplierName"
+            RS.SUPPLIER_ID "supplierId",
+            RS.SUPPLIER_NAME "value",
+            RS.SUPPLIER_NAME "supplierName"
         from RMS_SUPPLIER RS
-        <where>
-            <if test="index != null">
-                RS.SUPPLIER_NAME  like #{index}
-                and rownum &lt; 10
-            </if>
-            <if test="index == null">
-                rownum &lt; 10
-            </if>
-        </where>
+        where instr(RS.SUPPLIER_NAME, #{index}) > 0 and rownum &lt; 10
         order by "value"
     </select>
     <!--  获取承运商下拉框,并且判断ssoId是否为空,如果ssoId不为空就展示  -->
@@ -466,16 +466,8 @@
         RC.CONSIGNEE_ID "consigneeId",
         RC.CONSIGNEE_COMPANY_NAME "value",
         RC.CONSIGNEE_COMPANY_NAME "consigneeCompanyName"
-            from   RMS_CONSIGNEE   RC
-        <where>
-            <if test="index != null">
-                RC.CONSIGNEE_COMPANY_NAME  like #{index}
-                and rownum &lt; 10
-            </if>
-            <if test="index == null">
-                rownum &lt; 10
-            </if>
-        </where>
+        from   RMS_CONSIGNEE   RC
+        where instr(RC.CONSIGNEE_COMPANY_NAME, #{index}) > 0 and rownum &lt; 10
         order by "value"
     </select>