zx 3 lat temu
rodzic
commit
9a7852776c

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

@@ -118,10 +118,10 @@ public class AmsshipDeliveryAttorneyController extends BaseRESTfulController {
             @ApiImplicitParam(name = "amsshipDeliveryAttorney", value = "详细实体amsshipDeliveryAttorney", required = true, dataType = "amsshipDeliveryAttorney")
     })
     @PostMapping(value = "/editDeliveryAttroney", produces  = "application/json;charset=UTF-8")
-    public RESTfulResult editDeliveryAttroney(@RequestBody AmsshipDeliveryAttorney amsshipDeliveryAttorney){
-        amsshipDeliveryAttorneyService.updateByPrimaryKeySelective(amsshipDeliveryAttorney);
-        System.out.println(amsshipDeliveryAttorney);
-        return success(amsshipDeliveryAttorney);
+    public RESTfulResult editDeliveryAttroney(@RequestBody Map<String,Object> amsshipDeliveryAttorney){
+        //修改提货委托
+        int i = amsshipDeliveryAttorneyService.modifyDeliveryAttroney(amsshipDeliveryAttorney);
+        return success(i);
     }
     //下发
     @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")

+ 6 - 1
src/main/java/com/steerinfo/dil/controller/AmsshipDeliveryNoticeController.java

@@ -2,6 +2,7 @@ package com.steerinfo.dil.controller;
 
 import com.alibaba.fastjson.JSON;
 import com.steerinfo.dil.feign.ESFeign;
+import com.steerinfo.dil.mapper.AmsshipDeliveryNoticeMapper;
 import com.steerinfo.dil.model.AmsshipDeliveryAttorney;
 import com.steerinfo.dil.model.AmsshipDeliveryNotice;
 import com.steerinfo.dil.model.OmsshipShipmentInstructions;
@@ -46,6 +47,8 @@ public class AmsshipDeliveryNoticeController extends BaseRESTfulController {
     @Autowired
     ColumnDataUtil columnDataUtil;
     @Autowired
+    AmsshipDeliveryNoticeMapper amsshipDeliveryNoticeMapper;
+    @Autowired
     ESFeign esFeign;
     @ApiOperation(value="展示发货通知单表", notes="分页查询")
     @ApiImplicitParams({
@@ -136,7 +139,9 @@ public class AmsshipDeliveryNoticeController extends BaseRESTfulController {
     })
     @PostMapping(value = "/editDeliveryNotice", produces  = "application/json;charset=UTF-8")
     public RESTfulResult editDeliveryNotice(@RequestBody AmsshipDeliveryNotice amsshipDeliveryNotice){
-        return success(amsshipDeliveryNotice);
+        amsshipDeliveryNotice.setNoticeId(amsshipDeliveryNotice.getNoticeId());
+        int i = amsshipDeliveryNoticeMapper.updateByPrimaryKeySelective(amsshipDeliveryNotice);
+        return success(i);
     }
     // 下发
     @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的amsshipDeliveryNotice信息来更新详细信息")

+ 1 - 1
src/main/java/com/steerinfo/dil/controller/OmsshipShipmentInstructionsController.java

@@ -87,7 +87,7 @@ public class OmsshipShipmentInstructionsController extends BaseRESTfulController
             @ApiImplicitParam(name = "omsshipShipmentInstructions", value = "详细实体omsshipShipmentInstructions", required = true, dataType = "OmsshipShipmentInstructions")
     })
     @PostMapping(value = "/updateShipmentInstructions")
-    public RESTfulResult updateShipmentInstructions(@RequestBody OmsshipShipmentInstructions omsshipShipmentInstructions){
+    public RESTfulResult updateShipmentInstructions(@RequestBody Map<String,Object> omsshipShipmentInstructions){
         int code = omsshipShipmentInstructionsService.updateByPrimaryKey(omsshipShipmentInstructions);
         return success(code);
     }

+ 2 - 0
src/main/java/com/steerinfo/dil/service/IAmsshipDeliveryAttorneyService.java

@@ -69,4 +69,6 @@ public interface IAmsshipDeliveryAttorneyService{
      * @return
      */
     List<Map<String, Object>> getRmRawId();
+
+    int modifyDeliveryAttroney(Map<String, Object> amsshipDeliveryAttorney);
 }

+ 1 - 1
src/main/java/com/steerinfo/dil/service/IOmsshipShipmentInstructionsService.java

@@ -33,7 +33,7 @@ public interface IOmsshipShipmentInstructionsService{
     //新增装船指令
     int insert(Map<String,Object> map);
 
-    int updateByPrimaryKey(OmsshipShipmentInstructions omsshipShipmentInstructions);
+    int updateByPrimaryKey(Map<String,Object> omsshipShipmentInstructions);
 
 //    //得到最大id
 //    BigDecimal selectMaxId();

+ 23 - 0
src/main/java/com/steerinfo/dil/service/impl/AmsshipDeliveryAttorneyServiceImpl.java

@@ -146,4 +146,27 @@ public class AmsshipDeliveryAttorneyServiceImpl implements IAmsshipDeliveryAttor
     }
 
 
+    //修改提货委托
+    @Override
+    public int modifyDeliveryAttroney(Map<String, Object> amsshipDeliveryAttorney) {
+        BigDecimal resultId = DataChange.dataToBigDecimal(amsshipDeliveryAttorney.get("resultId"));
+        BigDecimal portId = DataChange.dataToBigDecimal(amsshipDeliveryAttorney.get("portId"));
+        String attorneyContactTelephone = (String)amsshipDeliveryAttorney.get("attorneyContactTelephone");
+        String attorenyPickupIdcard =(String) amsshipDeliveryAttorney.get("attorenyPickupIdcard");
+        String attorneyPickupContactPerson=(String)amsshipDeliveryAttorney.get("attorneyPickupContactPerson");
+        BigDecimal downSwimPortId =DataChange.dataToBigDecimal(amsshipDeliveryAttorney.get("downSwimPortId"));
+        long attorneyTime = (long)amsshipDeliveryAttorney.get("attorneyTime");
+        AmsshipDeliveryAttorney amsshipDeliveryAttorney1=new AmsshipDeliveryAttorney();
+        amsshipDeliveryAttorney1.setAttorneyId(resultId);
+        amsshipDeliveryAttorney1.setPortId(portId);
+        amsshipDeliveryAttorney1.setAttorneyContactTelephone(attorneyContactTelephone);
+        amsshipDeliveryAttorney1.setAttorneyPickupContactPerson(attorneyPickupContactPerson);
+        amsshipDeliveryAttorney1.setAttorenyPickupIdcard(attorenyPickupIdcard);
+        amsshipDeliveryAttorney1.setDownSwimPortId(downSwimPortId);
+        amsshipDeliveryAttorney1.setAttorneyTime(new Date(attorneyTime));
+        int i = amsshipDeliveryAttorneyMapper.updateByPrimaryKeySelective(amsshipDeliveryAttorney1);
+        return i;
+    }
+
+
 }

+ 9 - 3
src/main/java/com/steerinfo/dil/service/impl/OmsshipShipmentInstructionsServiceImpl.java

@@ -120,9 +120,15 @@ public class OmsshipShipmentInstructionsServiceImpl implements IOmsshipShipmentI
      * @return
      */
     @Override
-    public int updateByPrimaryKey(OmsshipShipmentInstructions omsshipShipmentInstructions) {
-        omsshipShipmentInstructions.setUpdateTime(new Date());
-        return omsshipShipmentInstructionsMapper.updateByPrimaryKeySelective(omsshipShipmentInstructions);
+    public int updateByPrimaryKey(Map<String,Object> omsshipShipmentInstructions) {
+        BigDecimal instructionsId = DataChange.dataToBigDecimal(omsshipShipmentInstructions.get("shipmentInstructionsId"));
+        BigDecimal instructionsTotalTonnage = DataChange.dataToBigDecimal(omsshipShipmentInstructions.get("instructionsTotalTonnage"));
+        long instructionTime = (long)omsshipShipmentInstructions.get("instructionTime");
+        OmsshipShipmentInstructions omsshipShipmentInstructions1=new OmsshipShipmentInstructions();
+        omsshipShipmentInstructions1.setShipmentInstructionsId(instructionsId);
+        omsshipShipmentInstructions1.setInstructionsTotalTonnage(instructionsTotalTonnage);
+        omsshipShipmentInstructions1.setInstructionTime(new Date(instructionTime));
+        return omsshipShipmentInstructionsMapper.updateByPrimaryKeySelective(omsshipShipmentInstructions1);
 
     }
 

+ 1 - 1
src/main/resources/application-dev.yml

@@ -9,7 +9,7 @@ spring:
 
 openfeign:
   WmshboundFeign:
-    url: ${WMSHBOUNDFEIGN_URL:localhost:8013}
+    url: ${WMSHBOUNDFEIGN_URL:172.16.33.162:8013}
   ColumnDataFeign:
     url: ${COLUMNDATAFEIGN_URL:172.16.33.166:8083}
 

+ 9 - 4
src/main/resources/com/steerinfo/dil/mapper/AmsshipDeliveryAttorneyMapper.xml

@@ -650,16 +650,21 @@
     </select>
     <!--  根据主键id进行查询-->
     <select id="getDeliveryAttorneyId" resultType="java.util.Map">
-        select t1.BATCH_ID                       "batchId",
+        select
+               CONCAT(DB.RESULT_FOREIGN_SHIP_NAME,RM.MATERIAL_NAME) "batchId",
                t1.PORT_ID                        "portId",
                t1.DOWN_SWIM_PORT_ID              "downSwimPortId",
                t1.ATTORNEY_PICKUP_CONTACT_PERSON "attorneyPickupContactPerson",
-               t1.ATTORENY_PICKUP_IDCARD         "attorneyPickupIdcard",
+               t1.ATTORENY_PICKUP_IDCARD         "attorenyPickupIdcard",
                t1.ATTORNEY_CONTACT_TELEPHONE     "attorneyContactTelephone",
-               t1.ATTORNEY_TIME                  "attorneytime",
-               t1.ATTORNEY_PDFFILE               "attorneyPdffile"
+               t1.ATTORNEY_TIME                  "attorneyTime"
+--                t1.ATTORNEY_PDFFILE               "attorneyPdffile"
 
         from AMSSHIP_DELIVERY_ATTORNEY t1
+        left join DIL_BATCH DB
+        ON DB.BATCH_ID=T1.BATCH_ID
+        LEFT JOIN RMS_MATERIAL RM
+        ON RM.MATERIAL_ID=DB.MATERIAL_ID
         where t1.ATTORNEY_ID = #{attorneyId}
     </select>
     <!--得到提货通知单id-->

+ 10 - 6
src/main/resources/com/steerinfo/dil/mapper/OmsshipShipmentInstructionsMapper.xml

@@ -595,12 +595,16 @@
     </select>
 
     <select id="selectShipmentInstructions" parameterType="DECIMAL" resultType="java.util.Map">
-        SELECT BATCH_ID                   "batchId",
-               RECIPIENT_CARRIER_ID       "recipientCarrierId",
-               PORT_CARRIER_ID            "portCarrierId",
-               INSTRUCTIONS_TOTAL_TONNAGE "instructionsTotalTonnage",
-               INSTRUCTION_TIME           "instructionTime"
-        FROM OMSSHIP_SHIPMENT_INSTRUCTIONS
+        SELECT CONCAT(DB.RESULT_FOREIGN_SHIP_NAME,RM.MATERIAL_NAME)  "batchId",
+               OSI.RECIPIENT_CARRIER_ID       "recipientCarrierId",
+               OSI.PORT_CARRIER_ID            "portCarrierId",
+               OSI.INSTRUCTIONS_TOTAL_TONNAGE "instructionsTotalTonnage",
+               OSI.INSTRUCTION_TIME           "instructionTime"
+        FROM OMSSHIP_SHIPMENT_INSTRUCTIONS OSI
+        left join DIL_BATCH DB
+        ON DB.BATCH_ID=OSI.BATCH_ID
+        LEFT JOIN RMS_MATERIAL RM
+        ON RM.MATERIAL_ID=DB.MATERIAL_ID
         WHERE SHIPMENT_INSTRUCTIONS_ID = #{shipmentInstructionsId}
     </select>