Kaynağa Gözat

修改冲突01点03分

hujh 3 yıl önce
ebeveyn
işleme
56df331562

+ 39 - 14
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,7 @@ 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,7 +1825,6 @@ public class TMSController extends BaseRESTfulController {
     @PostMapping("/getDeliveryOrder")
     public Map<String, Object> getDeliveryOrder(@RequestParam String orderNumber){
         return tmsTruckFeign.getDeliveryOrder(orderNumber);
-
     }
     @ApiOperation(value="模糊查询江船名 ")
     @ApiImplicitParams({
@@ -1845,4 +1834,40 @@ public class TMSController extends BaseRESTfulController {
     public Map<String, Object> getShipNameList(@RequestParam(value = "state") String state){
         return tmsshipFeign.getShipNameList(state);
     }
+
+    @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);
+    }
 }

+ 48 - 0
src/main/java/com/steerinfo/dil/controller/UniversalController.java

@@ -16,6 +16,8 @@ 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 +257,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);
+    }
 }

+ 1 - 0
src/main/java/com/steerinfo/dil/feign/RmsFeign.java

@@ -323,6 +323,7 @@ public interface RmsFeign {
     //    根据门岗id获取门岗名
     @PostMapping(value ="api/v1/rms/rmsgatepost/getGatepostName/{gatepostId}")
     Map<String,Object> getGatepostName(@PathVariable("gatepostId")BigDecimal gatepostId);
+
     //获取物资种类
     @PostMapping(value = "api/v1/rms/rmsmaterialtype/getMaterialTypeList")
     Map<String, Object> getMaterialTypeList(@RequestBody(required = false) Map<String, Object> mapValue,

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

@@ -227,4 +227,30 @@ 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);
+
 }

+ 6 - 0
src/main/java/com/steerinfo/dil/feign/TmsshipFeign.java

@@ -159,6 +159,7 @@ public interface TmsshipFeign {
      * 展示位置作业信息列表
      *
      * @param mapValue
+<<<<<<< HEAD
      * @param pageNum
      * @param pageSize
      * @param apiId
@@ -171,6 +172,10 @@ public interface TmsshipFeign {
                                       @RequestParam Integer apiId,
                                             @RequestParam String con);
 
+    @PostMapping(value = "/api/v1/shipTms/tmsshipshiplocations/getShipLocationList")
+    Map<String, Object> getShipLocationList(@RequestBody(required = false) Map<String, Object> mapValue);
+
+
     /**
      * 查询位置作业信息
      *
@@ -754,4 +759,5 @@ public interface TmsshipFeign {
     //    模糊查询江船名
     @PostMapping(value = "/api/v1/shipTms/dilbatchs/getShipNameList")
     Map<String, Object> getShipNameList(@RequestParam(value = "state")String state);
+
 }

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

@@ -40,4 +40,10 @@ 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);
+
 }

+ 14 - 13
src/main/resources/bootstrap.yml

@@ -25,31 +25,32 @@ eureka:
 
 openfeign:
   ColumnDataFeign:
-    url: ${COLUMNDATAFEIGN_URL:localhost:8083}
+
+    url: ${COLUMNDATAFEIGN_URL:172.16.33.166:8083}
   AmsFeign:
-    url: ${AMSFEIGN_URL:localhost:8079}
+    url: ${AMSFEIGN_URL:172.16.33.166:8079}
   BmsshipFeign:
-    url: ${BMSSHIPFEIGN_URL:localhost:8078}
+    url: ${BMSSHIPFEIGN_URL:172.16.33.166:8078}
   BmstrainFeign:
-    url: ${BMSTRAINFEIGN_URL:localhost:8077}
+    url: ${BMSTRAINFEIGN_URL:172.16.33.166:8077}
   BmstruckFeign:
-    url: ${BMSTRUCKFEIGN_URL:localhost:8076}
+    url: ${BMSTRUCKFEIGN_URL:172.16.33.166:8076}
   QmsTruckFeign:
-    url: ${QMSTRUCKFEIGN_URL:localhost:8047}
+    url: ${QMSTRUCKFEIGN_URL:172.16.33.166:8047}
   TmsTrainFeign:
-    url: ${TMSTRAINFEIGN_URL:localhost:8086}
+    url: ${TMSTRAINFEIGN_URL:172.16.33.166:8086}
   TmsTruckFeign:
-    url: ${TMSTRUCKFEIGN_URL:localhost:8088}
+    url: ${TMSTRUCKFEIGN_URL:172.16.33.166:8088}
   TmsshipFeign:
-    url: ${TMSSHIPFEIGN_URL:localhost:8090}
+    url: ${TMSSHIPFEIGN_URL:172.16.33.166:8090}
   WMSHFeign:
-    url: ${WMSHFEIGN_URL:localhost:8070}
+    url: ${WMSHFEIGN_URL:172.16.33.166:8070}
   WMSFeign:
-    url: ${WMSFEIGN_URL:localhost:8093}
+    url: ${WMSFEIGN_URL:172.16.33.166:8093}
   OMSFeign:
-    url: ${OMSFEIGN_URL:localhost:8095}
+    url: ${OMSFEIGN_URL:172.16.33.166:8095}
   RmsFeign:
-    url: ${RMSFEIGN_URL:localhost:8060}
+    url: ${RMSFEIGN_HRL:172.16.33.166:8060}
 
 genxml:
   pth: com/a

+ 67 - 0
src/main/resources/com/steerinfo/dil/mapper/UniversalMapper.xml

@@ -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>