Преглед на файлове

火车装车 进口矿修改建议

txf преди 3 години
родител
ревизия
c5cdf385f5

+ 37 - 13
src/main/java/com/steerinfo/dil/controller/TMSController.java

@@ -154,22 +154,15 @@ public class TMSController extends BaseRESTfulController {
      * 位置作业
      *
      * @param mapValue
-     * @param pageNum
-     * @param pageSize
-     * @param apiId
      * @return
      */
     @PostMapping("getShipLocationList")
     @ApiOperation(value = "展示位置作业")
-    public Map<String, Object> getShipLocationList(@RequestBody(required = false) Map<String, Object> mapValue,
-                                                   Integer pageNum,
-                                                   Integer pageSize,
-                                                   Integer apiId,
-                                                   String con) {
+    public Map<String, Object> getShipLocationList(@RequestBody(required = false) Map<String, Object> mapValue) {
         if (mapValue == null) {
             mapValue = new HashMap<>();
         }
-        return tmsshipFeign.getShipLocationList(mapValue==null?new HashMap<>():mapValue, pageNum, pageSize, apiId,con);
+        return tmsshipFeign.getShipLocationList(mapValue==null?new HashMap<>():mapValue);
     }
 
     @PostMapping("getShipLocation/{locationId}")
@@ -270,7 +263,6 @@ public class TMSController extends BaseRESTfulController {
 
     /**
      * 卸船作业
-     *
      * @param mapValue
      * @param pageNum
      * @param pageSize
@@ -334,9 +326,6 @@ public class TMSController extends BaseRESTfulController {
                                                          Integer pageSize,
                                                          Integer apiId,
                                                          String con) {
-        if (mapValue == null) {
-            mapValue = new HashMap<>();
-        }
         return tmsshipFeign.getWaterQualityResultList(mapValue==null?new HashMap<>():mapValue, pageNum, pageSize, apiId,con);
     }
 
@@ -1835,6 +1824,41 @@ public class TMSController extends BaseRESTfulController {
     @PostMapping("/getDeliveryOrder")
     public Map<String, Object> getDeliveryOrder(@RequestParam String orderNumber){
         return tmsTruckFeign.getDeliveryOrder(orderNumber);
+    }
+
+    @ApiOperation(value = "国产矿物流新增装车")
+    @PostMapping(value = "/addDomesticLoadResult")
+    public Map<String, Object> addDomesticLoadResult(@RequestBody(required = false) Map<String, Object> map) {
+        return tmsTrainFeign.addDomesticLoadResult(map);
+    }
+
+    @ApiOperation(value = "国产矿物流补录装车信息")
+    @PostMapping(value = "/updateDomesticLoadResult")
+    public Map<String, Object> updateDomesticLoadResult(@RequestBody(required = false) Map<String, Object> map) {
+        return tmsTrainFeign.updateDomesticLoadResult(map);
+    }
+
+    @ApiOperation(value = "添加火车计量委托")
+    @PostMapping(value = "/addTrainMeasureCommission")
+    public Map<String, Object> addTrainMeasureCommission(@RequestBody(required = false) Map<String, Object> map) {
+        return tmsTrainFeign.addTrainMeasureCommission(map);
+    }
+
+    @ApiOperation(value = "查询需要发送计量委托的车皮信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "apiId(209)", value = "表头", required = false, dataType = "Interger")
+    })
+    @PostMapping(value = "/getLoadResultToSendMC")
+    public Map<String, Object> getLoadResultToSendMC( @RequestBody(required = false) Map<String, Object> mapValue,
+            Integer apiId,
+            Integer pageNum,
+            Integer pageSize,Integer resultType) {
+        return tmsTrainFeign.getLoadResultToSendMC(mapValue==null?new HashMap<>():mapValue, apiId, pageNum, pageSize, resultType);
+    }
 
+    @ApiOperation(value = "批量新增计量委托")
+    @PostMapping(value = "/batchSendMeasureCommission")
+    public Map<String, Object> batchSendMeasureCommission(@RequestBody(required = false) Map<String, Object> map) {
+        return tmsTrainFeign.batchSendMeasureCommission(map);
     }
 }

+ 47 - 4
src/main/java/com/steerinfo/dil/controller/UniversalController.java

@@ -12,10 +12,7 @@ import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.HashMap;
 import java.util.List;
@@ -255,4 +252,50 @@ public class UniversalController extends BaseRESTfulController {
         PageListAdd data = columnDataUtil.tableColumnData(apiId, list, columnList);
         return success(data);
     }
+
+    @ApiModelProperty(value = "模糊查询批次")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "apiId", value = "244", required = false, dataType = "BigDecimal")
+    })
+    @PostMapping("/queryBatchByLike")
+    public RESTfulResult queryBatchByLike(@RequestBody(required = false) Map<String,Object> mapValue,
+                                             Integer pageNum,
+                                             Integer pageSize,
+                                             Integer apiId,
+                                             String index) {
+
+        if(mapValue == null) {
+            mapValue = new HashMap<>();
+        }
+        if(index != null){
+            mapValue.put("index", "%" + index + "%");
+        }
+        List<Map<String, Object>> list = universalMapper.getBatchAndOrderMes(mapValue);
+        PageHelper.startPage(pageNum, pageSize);
+        //分页查询数据
+        List<Map<String, Object>> columnList = universalMapper.getBatchAndOrderMes(mapValue);
+        PageListAdd data = columnDataUtil.tableColumnData(apiId, list, columnList);
+        return success(data);
+    }
+
+    @ApiModelProperty(value = "模糊查询承运商")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "apiId", value = "244", required = false, dataType = "BigDecimal")
+    })
+    @PostMapping("/getCarrierMesByLike")
+    public RESTfulResult getCarrierMesByLike(@RequestParam("index") String index) {
+        if(index != null){
+            if(index.length() == 0){
+                index = null;
+            }else {
+                index += "%";
+            }
+        }
+        List<Map<String, Object>> list = universalMapper.getCarrierMesByLike(index);
+        return success(list);
+    }
 }

+ 25 - 0
src/main/java/com/steerinfo/dil/feign/TmsTrainFeign.java

@@ -227,4 +227,29 @@ public interface TmsTrainFeign {
             @RequestParam("pageSize") Integer pageSize,
             @RequestParam("loadingId")Integer loadingId,
             @RequestParam("unloadingId")Integer unloadingId);
+
+    @ApiOperation(value = "国产矿物流新增装车")
+    @PostMapping(value = "api/v1/trainTms/tmstrainloadingresults/addDomesticLoadResult")
+    Map<String, Object> addDomesticLoadResult(@RequestBody(required = false) Map<String, Object> map);
+
+    @ApiOperation(value = "国产矿物流补录装车信息")
+    @PostMapping(value = "api/v1/trainTms/tmstrainloadingresults/updateDomesticLoadResult")
+    Map<String, Object> updateDomesticLoadResult(@RequestBody(required = false) Map<String, Object> map);
+
+    @ApiOperation(value = "添加火车计量委托")
+    @PostMapping(value = "api/v1/trainTms/tmstrainmeasurecommissions/addTrainMeasureCommission")
+    Map<String, Object> addTrainMeasureCommission(@RequestBody(required = false) Map<String, Object> map);
+
+
+    @PostMapping(value = "api/v1/trainTms/tmstrainmeasurecommissions/getLoadResultToSendMC")
+    Map<String, Object> getLoadResultToSendMC( @RequestBody(required = false) Map<String, Object> mapValue,
+                                               @RequestParam("apiId") Integer apiId,
+                                               @RequestParam("pageNum") Integer pageNum,
+                                               @RequestParam("pageSize") Integer pageSize,
+                                               @RequestParam("resultType") Integer resultType
+                                               );
+
+    @ApiOperation(value = "批量新增计量委托")
+    @PostMapping(value = "api/v1/trainTms/tmstrainmeasurecommissions/batchSendMeasureCommission")
+    Map<String, Object> batchSendMeasureCommission(@RequestBody(required = false) Map<String, Object> map);
 }

+ 1 - 8
src/main/java/com/steerinfo/dil/feign/TmsshipFeign.java

@@ -159,17 +159,10 @@ public interface TmsshipFeign {
      * 展示位置作业信息列表
      *
      * @param mapValue
-     * @param pageNum
-     * @param pageSize
-     * @param apiId
      * @return
      */
     @PostMapping(value = "/api/v1/shipTms/tmsshipshiplocations/getShipLocationList")
-    Map<String, Object> getShipLocationList(@RequestBody(required = false) Map<String, Object> mapValue,
-                                      @RequestParam Integer pageNum,
-                                      @RequestParam Integer pageSize,
-                                      @RequestParam Integer apiId,
-                                            @RequestParam String con);
+    Map<String, Object> getShipLocationList(@RequestBody(required = false) Map<String, Object> mapValue);
 
     /**
      * 查询位置作业信息

+ 5 - 0
src/main/java/com/steerinfo/dil/mapper/UniversalMapper.java

@@ -40,4 +40,9 @@ public interface UniversalMapper {
     //模糊查询所有物资
     List<Map<String, Object>> queryMaterialByLike(Map<String, Object> map);
 
+    //查询所有的批次及其关联的采购订单号
+    List<Map<String, Object>> getBatchAndOrderMes(Map<String, Object> map);
+
+    //承运商边输边查
+    List<Map<String, Object>> getCarrierMesByLike(String index);
 }

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

@@ -16,7 +16,7 @@ spring:
 eureka:
   client:
     service-url:
-      defaultZone: http://root:root@${EUREKA_HOST:172.16.33.161}:${EUREKA_PORT:8061}/eureka/
+      defaultZone: http://root:root@${EUREKA_HOST:172.16.33.162}:${EUREKA_PORT:8081}/eureka/
   instance:
     prefer-ip-address: true
     status-page-url: http://${spring.cloud.client.ip-address}:${server.port}/swagger-ui.html#/
@@ -27,7 +27,7 @@ openfeign:
   ColumnDataFeign:
     url: ${COLUMNDATAFEIGN_URL:localhost:8083}
   AmsFeign:
-    url: ${AMSFEIGN_URL:localhost:8079}
+    url: ${AMSFEIGN_URL:172.166.33.161:8079}
   BmsshipFeign:
     url: ${BMSSHIPFEIGN_URL:localhost:8078}
   BmstrainFeign:

+ 69 - 2
src/main/resources/com/steerinfo/dil/mapper/UniversalMapper.xml

@@ -210,9 +210,9 @@
                                  RS.SUPPLIER_NAME    "supplierName",
                                  RS.SUPPLIER_ADDRESS "supplierAddress"
                  from DIL_BATCH DB
-                          left join AMS_PURCHASE_ORDER APO
+                          join AMS_PURCHASE_ORDER APO
                                     on apo.BATCH_ID = DB.BATCH_ID
-                          left join RMS_SUPPLIER RS
+                          join RMS_SUPPLIER RS
                                     on RS.SUPPLIER_ID = apo.SUPPLIER_UNIT_ID
                  <where>
                     <if test="materialId != null">
@@ -311,4 +311,71 @@
             order by "materialId" desc
         </if>
     </select>
+
+<!--  查询所有的批次及其关联的采购订单号  -->
+    <select id="getBatchAndOrderMes" parameterType="map" resultType="java.util.Map">
+        select *
+        from (
+                 select
+                        DB.BATCH_ID                 "batchId",
+                        DB.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
+                        RM.MATERIAL_NAME            "materialName",
+                        APO.PURCHASE_ORDER_NO       "purchaseOrderNo",
+                        APO.INSERT_TIME             "insetTime"
+                 from DIL_BATCH DB
+                          left join AMS_PURCHASE_ORDER APO
+                                    on APO.BATCH_ID = DB.BATCH_ID
+                          left join RMS_MATERIAL RM
+                                    on RM.MATERIAL_ID = DB.MATERIAL_ID
+                 <where>
+                     <if test="index != null">
+                         "resultForeignShipName" like #{index}
+                     </if>
+                 </where>
+             )
+        <where>
+            <if test="resultForeignShipName != null">
+                <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
+                    "resultForeignShipName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="materialName != null">
+                and
+                <foreach collection="materialName" item="item" open="(" separator="or" close=")">
+                    "materialName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="purchaseOrderNo != null">
+                and
+                <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
+                    "purchaseOrderNo" like '%${item}%'
+                </foreach>
+            </if>
+        </where>
+        <include refid="orderBy"></include>
+        <if test="orderField == null  ">
+            order by "insetTime" desc
+        </if>
+    </select>
+
+<!-- 边输边查承运商   -->
+    <select id="getCarrierMesByLike" parameterType="string" resultType="java.util.Map">
+        select
+        *
+        from(
+        select
+            RC.CARRIER_ID "carrierId",
+            RC.CARRIER_NAME "carrierName"
+        from RMS_CARRIER RC
+        order by "carrierName"
+        )
+        <where>
+            <if test="index != null">
+                "carrierName"  like #{index}
+            </if>
+            <if test="index == null">
+                rownum &lt; 10
+            </if>
+        </where>
+    </select>
 </mapper>