Browse Source

'修改收获客户接口'

HUJIANGUO 3 years ago
parent
commit
a627d29c3a

+ 1 - 1
pom.xml

@@ -169,7 +169,7 @@
                     <!--包名-->
                     <targetPackage>com.steerinfo.dil</targetPackage>
                     <tables>
-<!--                        <table>DIL_BATCH</table>-->
+                        <table>RMS_CONSIGNEE</table>
                     </tables>
                 </configuration>
                 <executions>

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

@@ -41,6 +41,7 @@ public class RmsConsigneeController extends BaseRESTfulController {
             @ApiImplicitParam(name = "consigneeRegisteredAddress", value = "安顺市鑫智成通川区金龙大道119号", required = true, dataType = "String"),
             @ApiImplicitParam(name = "consigneeContactName", value = "李四", required = true, dataType = "String"),
             @ApiImplicitParam(name = "consigneeContactTel", value = "17356241456", required = true, dataType = "String"),
+            @ApiImplicitParam(name = "consigneeCode", value = "12138", required = true, dataType = "String"),
             @ApiImplicitParam(name = "dataStatus", value = "1", required = true, dataType = "Integer"),
     })
     @PostMapping("/operationConsignee")

+ 2 - 0
src/main/java/com/steerinfo/dil/mapper/BmsshipStatementMapper.java

@@ -18,4 +18,6 @@ public interface BmsshipStatementMapper extends IBaseMapper<BmsshipStatement, Bi
     String getShipPaymentUnit(BigDecimal statementId);
     // 得到途损费付款单位
     Map<String,Object> getLossPaymentUnit(BigDecimal statementId);
+
+    Map<String,Object> getWaterFeeMembers(BigDecimal statementId);
 }

+ 17 - 2
src/main/java/com/steerinfo/dil/model/RmsConsignee.java

@@ -63,7 +63,7 @@ public class RmsConsignee implements IBasePO<BigDecimal> {
     private String consigneeWarrantyWeight;
 
     /**
-     * 联系电话(CONSIGNEE_CONTACT_TEL,CHAR,10)
+     * 联系电话(CONSIGNEE_CONTACT_TEL,VARCHAR,20)
      */
     @ApiModelProperty(value="联系电话",required=false)
     private String consigneeContactTel;
@@ -116,7 +116,13 @@ public class RmsConsignee implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="金蝶收获客户主键ID",required=false)
     private String easConsigneeId;
 
-    private static final Long serialVersionUID = 1L;
+    /**
+     * 收货客户编码(CONSIGNEE_CODE,VARCHAR,50)
+     */
+    @ApiModelProperty(value="收货客户编码",required=false)
+    private String consigneeCode;
+
+    private static final long serialVersionUID = 1L;
 
     @Override
     public BigDecimal getId() {
@@ -272,6 +278,14 @@ public class RmsConsignee implements IBasePO<BigDecimal> {
         this.easConsigneeId = easConsigneeId == null ? null : easConsigneeId.trim();
     }
 
+    public String getConsigneeCode() {
+        return consigneeCode;
+    }
+
+    public void setConsigneeCode(String consigneeCode) {
+        this.consigneeCode = consigneeCode == null ? null : consigneeCode.trim();
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -296,6 +310,7 @@ public class RmsConsignee implements IBasePO<BigDecimal> {
         sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
         sb.append(", deleted=").append(deleted);
         sb.append(", easConsigneeId=").append(easConsigneeId);
+        sb.append(", consigneeCode=").append(consigneeCode);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 9 - 8
src/main/java/com/steerinfo/dil/service/impl/BmsportHandlingFeeServiceImpl.java

@@ -1,8 +1,5 @@
 package com.steerinfo.dil.service.impl;
 
-import com.steerinfo.framework.mapper.IBaseMapper;
-import com.steerinfo.framework.service.impl.BaseServiceImpl;
-import com.steerinfo.dil.model.BmsportHandlingFee;
 import com.steerinfo.dil.mapper.BmsportHandlingFeeMapper;
 import com.steerinfo.dil.service.IBmsportHandlingFeeService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -46,22 +43,26 @@ public class BmsportHandlingFeeServiceImpl implements IBmsportHandlingFeeService
         }
         Map<String, Object> map = entries.get(0);
         BigDecimal statementTotalAmount = (BigDecimal) map.get("amount");
+        BigDecimal qty = (BigDecimal) map.get("qty");
+        map.remove("amount");
+        map.remove("qty");
+        map.put("amount",statementTotalAmount.toString());
+        map.put("qty",qty.toString());
+        String detailNum = (String) map.get("detailNum");
         Date statementTime = (Date) map.get("detailDate");
         Map<String,Object> head = new HashMap<>();
         Map<String,Object> otherMap = bmsportHandlingFeeMapper.getOtherMessage(new BigDecimal(feeId));
-        head.put("allAmount",statementTotalAmount);
+        head.put("allAmount",statementTotalAmount.toString());
         head.put("bizDate",statementTime);
-        head.put("billNum","");
+        head.put("billNum",detailNum);
         String amountType = "港口装卸费";
         head.put("amountType",amountType);
-        head.put("collectionUnitName","");
         head.put("payUnitNum","");
         head.put("receivedUnitNum","");
-        head.put("collectionUnitNum","");
         head.putAll(otherMap);
         Map<String,Object> input = new HashMap<>();
         input.put("entries",entries);
         input.put("head",head);
-        return head;
+        return input;
     }
 }

+ 25 - 11
src/main/java/com/steerinfo/dil/service/impl/BmsshipStatementServiceImpl.java

@@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -41,6 +42,20 @@ public class BmsshipStatementServiceImpl implements IBmsshipStatementService {
         Map<String, Object> head = bmsshipStatementMapper.getShipStatement(new BigDecimal(statementId));
         List<Map<String, Object>> mapList = bmsshipStatementMapper.getShipOtherMessage(new BigDecimal(statementId));
         String amountType = (String) head.get("amountType");
+        // 详单
+        List<Map<String,Object>> entries = new ArrayList<>();
+        Map<String,Object> input = new HashMap<>();
+        Map<String,Object> detailsMap = new HashMap<>();
+        detailsMap.put("detailNum","");
+        detailsMap.put("detailDate","");
+        detailsMap.put("carNum","");
+        detailsMap.put("startingPoint","");
+        detailsMap.put("endPoint","");
+        detailsMap.put("qty","");
+        detailsMap.put("forwarder","");
+        detailsMap.put("matNum","");
+        detailsMap.put("matName","");
+        entries.add(detailsMap);
         Map<String, Object> map = new HashMap<>();
         if (amountType.equals("水运费")) {
             // 发货单位和收款单位
@@ -60,20 +75,19 @@ public class BmsshipStatementServiceImpl implements IBmsshipStatementService {
             map.put("receivedUnitNum","");
             map.put("payUnitNum","");
             map.putAll(lossMap);
+            input.put("entries",entries);
         }
         if (amountType.equals("水分检测费")) {
-            String payUnitName = "";
-            String forwordUnitNum = "";
-            String collectionUnitName = "";
-            map.put("payUnitName",payUnitName);
-            map.put("forwordUnitName",payUnitName);
-            map.put("collectionUnitName",collectionUnitName);
-            map.put("payUnitNum",payUnitName);
-            map.put("forwordUnitNum",forwordUnitNum);
-            map.put("collectionUnitNum",payUnitName);
-            map.put("receivedUnitNum",payUnitName);
+            Map<String,Object> waterMap = bmsshipStatementMapper.getWaterFeeMembers(new BigDecimal(statementId));
+            map.put("collectionUnitName","");
+            map.put("payUnitNum","");
+            map.put("collectionUnitNum","");
+            map.put("receivedUnitNum","");
+            map.putAll(waterMap);
+            input.put("entries",entries);
         }
         head.putAll(map);
-        return head;
+        input.put("head",head);
+        return input;
     }
 }

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

@@ -38,23 +38,23 @@ public class BmstruckDetailsOrderServiceImpl implements IBmstruckDetailsOrderSer
     @Override
     public Map<String, Object> getPurchaseDetailsOrder(Integer detailsId) {
         List<Map<String, Object>> entries = bmstruckDetailsOrderMapper.getPurchaseDetailsOrder(new BigDecimal(detailsId));
-        for (Map<String,Object> map : entries) {
-            map.put("startingPoint","");
-            map.put("endPoint","");
-        }
         String amountType = "采购汽运";
         Map<String,Object> head = new HashMap<>();
-        String billNum = "";
-        Date bizDate = (Date) (entries.get(0).get("bizDate"));
+        String billNum = (String) (entries.get(0).get("detailNum"));
+        Date bizDate = (Date) (entries.get(0).get("detailDate"));
         BigDecimal amount = (BigDecimal) (entries.get(0).get("amount"));
-        Double statementExcludTax = amount.doubleValue();
+        BigDecimal qty = (BigDecimal) (entries.get(0).get("qty"));
+        entries.get(0).remove("amount");
+        entries.get(0).remove("qty");
+        entries.get(0).put("amount",amount.toString());
+        entries.get(0).put("qty",qty.toString());
+        String statementExcludTax = amount.toString();
         Map<String,Object> statementMap = bmstruckDetailsOrderMapper.getStatementMessage(new BigDecimal(detailsId));
         head.put("billNum",billNum);
         head.put("bizDate",bizDate);
         head.put("amountType",amountType);
-        head.put("amount",statementExcludTax);
+        head.put("allAmount",statementExcludTax);
         head.put("receivedUnitNum","");
-        head.put("collectionUnitNum","");
         head.put("payUnitNum","");
         head.putAll(statementMap);
         Map<String,Object> input = new HashMap<>();

+ 0 - 1
src/main/java/com/steerinfo/dil/service/impl/BmstruckStatementServiceImpl.java

@@ -52,7 +52,6 @@ public class BmstruckStatementServiceImpl implements IBmstruckStatementService {
         head.putAll(map);
         head.put("payUnitNum","");
         head.put("forwordUnitNum","");
-        head.put("receivedUnitNum","");
         head.put("collectionUnitNum","");
         return head;
     }

+ 3 - 0
src/main/java/com/steerinfo/dil/service/impl/RmsConsigneeServiceImpl.java

@@ -49,6 +49,8 @@ public class RmsConsigneeServiceImpl implements IRmsConsigneeService {
         String consigneeContactName = (String) mapVal.get("consigneeContactName");
         // 得到联系电话
         String consigneeContactTel = (String) mapVal.get("consigneeContactTel");
+        // 得到客户编码
+        String consigneeCode = (String) mapVal.get("consigneeCode");
         // 得到数据状态
         Integer dataStatus = (Integer) mapVal.get("dataStatus");
         // 判断是否EASId已存在
@@ -63,6 +65,7 @@ public class RmsConsigneeServiceImpl implements IRmsConsigneeService {
         rmsConsignee.setConsigneeRegisteredAddress(consigneeRegisteredAddress);
         rmsConsignee.setConsigneeContactName(consigneeContactName);
         rmsConsignee.setConsigneeContactTel(consigneeContactTel);
+        rmsConsignee.setConsigneeCode(consigneeCode);
         rmsConsignee.setInsertTime(new Date());
         rmsConsignee.setInsertUsername("admin");
         rmsConsignee.setUpdateTime(new Date());

+ 28 - 73
src/main/java/com/steerinfo/dil/wsdl/TestEasUtil.java

@@ -3,8 +3,10 @@ package com.steerinfo.dil.wsdl;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.steerinfo.dil.util.EASUtil;
+import org.apache.poi.ss.formula.functions.T;
 
 import java.util.Map;
+import java.util.Scanner;
 
 /**
  * @Description:
@@ -14,80 +16,33 @@ import java.util.Map;
  */
 public class TestEasUtil {
 
-
     public static void main(String[] args) {
-        com.steerinfo.dil.wsdl.ServiceInfo service = new ServiceInfo("user", "kduser", "eas", "D001", "L2", 1);
-        service.setServername("172.16.62.243" , "56898");
-        long startT = System.currentTimeMillis();
-        try {
-            String result = null;
-            WSFaceFacadeSrvProxyServiceLocator locator = new WSFaceFacadeSrvProxyServiceLocator();
-            // 这边是map,将map封装后转为json
-            String json ="{\n" +
-                    "\n" +
-                    "\t\"input\": {\n" +
-                    "\t\t\"head\": {\n" +
-                    "\t\t\t\"billNum\": \"9999999\",\n" +
-                    "\t\t\t\"bizDate\": \"2021-11-15\",\n" +
-                    "\t\t\t\"payUnitNum\": \"\",\n" +
-                    "\t\t\t\"payUnitName\": \"\",\n" +
-                    "\t\t\t\"forwordUnitNum\": \"DG001\",\n" +
-                    "\t\t\t\"forwordUnitName\": \"四川省达州钢铁集团有限责任公司\",\n" +
-                    "\t\t\t\"collectionUnitNum\": \"010300304\",\n" +
-                    "\t\t\t\"collectionUnitName\": \"010300304\",\n" +
-                    "\t\t\t\"receivedUnitNum\": \"\",\n" +
-                    "\t\t\t\"receivedUnitName\": \"\",\n" +
-                    "\t\t\t\"allAmount\": 11111\n" +
-                    "\t\t},\n" +
-                    "\t\t\"entries\": [{\n" +
-                    "\t\t\t\t\"detailNum\": \"111\",\n" +
-                    "\t\t\t\t\"detailDate\": \"2021-11-15\",\n" +
-                    "\t\t\t\t\"carNum\": \"001\",\n" +
-                    "\t\t\t\t\"startingPoint\": \"成都\",\n" +
-                    "\t\t\t\t\"endPoint\": \"达州\",\n" +
-                    "\t\t\t\t\"qty\": \"1\",\n" +
-                    "\t\t\t\t\"amount\": \"100\",\n" +
-                    "\t\t\t\t\"forwarder\": \"自提\",\n" +
-                    "\t\t\t\t\"matNum\": \"0101020300002\",\n" +
-                    "\t\t\t\t\"matName\": \"伊朗铁精粉\"\n" +
-                    "\t\t\t},\n" +
-                    "\t\t\t{\n" +
-                    "\t\t\t\t\"detailNum\": \"222\",\n" +
-                    "\t\t\t\t\"detailDate\": \"2021-11-15\",\n" +
-                    "\t\t\t\t\"carNum\": \"002\",\n" +
-                    "\t\t\t\t\"startingPoint\": \"成都\",\n" +
-                    "\t\t\t\t\"endPoint\": \"绵阳\",\n" +
-                    "\t\t\t\t\"qty\": \"2\",\n" +
-                    "\t\t\t\t\"amount\": \"200\",\n" +
-                    "\t\t\t\t\"forwarder\": \"达运\",\n" +
-                    "\t\t\t\t\"matNum\": \"0101020400001\",\n" +
-                    "\t\t\t\t\"matName\": \"巴西球团矿\"\n" +
-                    "\t\t\t}\n" +
-                    "\n" +
-                    "\t\t]\n" +
-                    "\t},\n" +
-                    "\t\"context\": {\n" +
-                    "\t\t\"logError\": true,\n" +
-                    "\t\t\"logData\": true\n" +
-                    "\t},\n" +
-                    "\t\"login\": {\n" +
-                    "\t\t\"password\": \"kduser\",\n" +
-                    "\t\t\"dcName\": \"D001\",\n" +
-                    "\t\t\"dbType\": \"0\",\n" +
-                    "\t\t\"userName\": \"user\"\n" +
-                    "\t},\n" +
-                    "\t\"command\": \"savePayOtherBill\"\n" +
-                    "\n" +
-                    "}";
-            String res = locator.getWSFaceFacade().invokeJson(json);
-            JSONObject request = JSON.parseObject(res);
-            String output = request.getString("output");
-            System.out.println(output);
-//            String outResult = FaceEncryptUtil.AES_Decrypt(output, "FXXT");
-//            System.out.println(res);//调用接口后返回的结果数据
-//            System.out.println(outResult);
-        } catch (Exception e) {
-            e.printStackTrace();
+        TestEasUtil test = new TestEasUtil();
+        EASUtil easUtil = new EASUtil();
+        System.out.println(easUtil.getTotalMap());
+        System.out.println(String.class);
+        test.pleaseAsk();
+        System.out.println("罗棒:");
+        Scanner sc = new Scanner(System.in);
+        int i = sc.nextInt();
+        String answer = test.pleaseAnswer(i);
+        System.out.println(answer);
+        System.out.println("小峰:为什么?");
+        String reason = sc.next();
+        System.out.println("小峰:呜呜呜~");
+    }
+
+    public void pleaseAsk() {
+        System.out.println("小峰:请问你爱我吗?");
+    }
+
+    public String pleaseAnswer(int answer) {
+        String name = "罗棒:";
+        if (answer == 520) {
+            return name + "我爱你";
+        }
+        else {
+            return name + "我不爱你";
         }
     }
 }

+ 12 - 11
src/main/resources/com/steerinfo/dil/mapper/BmsportHandlingFeeMapper.xml

@@ -429,8 +429,8 @@
     <select id="getPortFee" parameterType="DECIMAL" resultType="java.util.Map">
         SELECT BHF.FEE_NO               AS "detailNum",
                BHF.INSERT_TIME          AS "detailDate",
-               RP1.PORT_NAME            AS "startingPoint",
-               RP2.PORT_NAME            AS "endPoint",
+               RP1.SUPPLIER_NAME        AS "startingPoint",
+               RP2.SHIPPER_NAME         AS "endPoint",
                BHF.FEE_MATERIAL_TONNAGE AS "qty",
                BHF.FEE_VALUE            AS "amount",
                RM.MATERIAL_NAME         AS "matName",
@@ -441,22 +441,23 @@
                  LEFT JOIN DIL_BATCH DB
                            ON DB.RESULT_FOREIGN_SHIP_NAME = BHF.FEE_FOREIGN_SHIP_NAME
                                AND DB.MATERIAL_ID = BHF.MATERIAL_ID
-                 LEFT JOIN AMSSHIP_DELIVERY_NOTICE ADN
-                           ON ADN.BATCH_ID = DB.BATCH_ID
-                 LEFT JOIN AMSSHIP_DELIVERY_ATTORNEY ADA
-                           ON ADA.BATCH_ID = DB.BATCH_ID
-                 LEFT JOIN RMS_PORT RP1
-                           ON RP1.PORT_ID = ADN.PORT_ID
-                 LEFT JOIN RMS_PORT RP2
-                           ON RP2.PORT_ID = ADA.DOWN_SWIM_PORT_ID
+                 LEFT JOIN AMS_PURCHASE_ORDER APO
+                           ON APO.BATCH_ID = DB.BATCH_ID
+                 LEFT JOIN RMS_SUPPLIER RP1
+                           ON RP1.SUPPLIER_ID = apo.SUPPLIER_UNIT_ID
+                 LEFT JOIN RMS_SHIPPER RP2
+                           ON RP2.SHIPPER_ID = APO.RECEIVE_UNIT_ID
         WHERE BHF.FEE_ID = #{feeId}
     </select>
 
+    <!-- 付款单位,收货单位,发货单位 -->
     <select id="getOtherMessage" parameterType="DECIMAL" resultType="java.util.Map">
         SELECT RS.SHIPPER_NAME             AS "payUnitName",
                RS.SHIPPER_NAME             AS "receivedUnitName",
                RSU.SUPPLIER_DUTY_PARAGRAPH AS "forwordUnitNum",
-               RSU.SUPPLIER_NAME           AS "forwardUnitName"
+               RSU.SUPPLIER_NAME           AS "forwardUnitName",
+               RSU.SUPPLIER_NAME           AS "collectionUnitName",
+               RSU.SUPPLIER_DUTY_PARAGRAPH AS "collectionUnitNum"
         FROM BMSPORT_HANDLING_FEE BHF
                  LEFT JOIN DIL_BATCH DB
                            ON DB.RESULT_FOREIGN_SHIP_NAME = BHF.FEE_FOREIGN_SHIP_NAME

+ 14 - 0
src/main/resources/com/steerinfo/dil/mapper/BmsshipStatementMapper.xml

@@ -463,4 +463,18 @@
                            ON RP.PORT_ID = ADN.CARRIER_ID
         WHERE BDS.STATEMENT_ID = #{statementId}
     </select>
+
+    <select id="getWaterFeeMembers" parameterType="DECIMAL" resultType="java.util.Map" >
+        SELECT
+        RSU.SUPPLIER_DUTY_PARAGRAPH AS "forwordUnitNum",
+               RSU.SUPPLIER_NAME AS "forwordUnitName",
+               RSH.SHIPPER_NAME AS "payUnitName"
+        FROM BMSSHIP_STATEMENT BS
+LEFT JOIN AMS_PURCHASE_ORDER APO
+ON APO.BATCH_ID = BS.BATCH_ID
+LEFT JOIN RMS_SHIPPER RSH
+ON RSH.SHIPPER_ID = APO.RECEIVE_UNIT_ID
+LEFT JOIN RMS_SUPPLIER RSU
+ON RSU.SUPPLIER_ID = APO.SUPPLIER_UNIT_ID
+    </select>
 </mapper>

+ 1 - 0
src/main/resources/com/steerinfo/dil/mapper/BmstrainStatementMapper.xml

@@ -360,6 +360,7 @@
         WHERE BS.STATEMENT_ID = #{statementId}
     </select>
 
+    <!-- 发货单位 -->
     <select id="getCarrierAndReceiver" parameterType="DECIMAL" resultType="java.util.Map">
         SELECT RSU.SUPPLIER_DUTY_PARAGRAPH AS "forwordUnitNum",
                RSU.SUPPLIER_NAME           AS "forwordUnitName"

+ 13 - 6
src/main/resources/com/steerinfo/dil/mapper/BmstruckDetailsOrderMapper.xml

@@ -433,7 +433,7 @@
                         RCA.CAPACITY_NUMBER        AS "carNum",
                         RS.SHIPPER_NAME            AS "startingPoint",
                         RCO.CONSIGNEE_COMPANY_NAME AS "endPoint",
-                        ASP.PLAN_MATERIAL_NUMBER   AS "qty",
+                        ASPM.MATERIAL_NUMBER       AS "qty",
                         BDO.DETAILS_AMOUNT         AS "amount",
                         RC.CARRIER_NAME            AS "forwarder",
                         RM.MATERIAL_NAME           AS "matName",
@@ -455,14 +455,14 @@
                            ON RS.SHIPPER_ID = ASO.SHIPPER_ID
                  LEFT JOIN RMS_CONSIGNEE RCO
                            ON RCO.CONSIGNEE_ID = ASO.RECEIVE_ID
-                 LEFT JOIN AMS_SALE_PLAN ASP
-                           ON ASP.PLAN_ID = ASO.PLAN_ID
+                 LEFT JOIN AMS_SALE_PLAN_MATERIAL ASPM
+                           ON ASPM.PLAN_MATERIAL_ID = ASO.PLAN_ID
                  LEFT JOIN AMS_DISPATCH_SALE_ORDER ADSO
                            ON ADSO.SALE_ORDER_MATERIAL_ID = ASOM.SALE_ORDER_MATERIAL_ID
                  LEFT JOIN RMS_CARRIER RC
                            ON RC.CARRIER_ID = ADSO.CARRIER_ID
                  LEFT JOIN RMS_MATERIAL RM
-                           ON RM.MATERIAL_ID = ASP.MATERIAL_ID
+                           ON RM.MATERIAL_ID = ASPM.MATERIAL_ID
         WHERE BDS.STATEMENT_ID = #{statementId}
     </select>
 
@@ -475,7 +475,9 @@
                BDO.DETAILS_AMOUNT                AS "amount",
                RCR.CARRIER_NAME                  AS "forwarder",
                RM.MATERIAL_CODE                  AS "matNum",
-               RM.MATERIAL_NAME                  AS "matName"
+               RM.MATERIAL_NAME                  AS "matName",
+               RSU.SUPPLIER_NAME                 AS "startingPoint",
+               RSH.SHIPPER_NAME                  AS "endPoint"
         FROM BMSTRUCK_DETAILS_ORDER BDO
                  LEFT JOIN OMSTRUCK_ORDER OO
                            ON OO.ORDER_ID = BDO.ORDER_ID
@@ -485,6 +487,10 @@
                            ON RCP.CAPACITY_ID = RDC.CAPACITY_ID
                  LEFT JOIN AMS_PURCHASE_ORDER APO
                            ON BDO.PURCHASE_ORDER_ID = APO.PURCHASE_ORDER_ID
+                 LEFT JOIN RMS_SUPPLIER RSU
+                           ON RSU.SUPPLIER_ID = APO.SUPPLIER_UNIT_ID
+                 LEFT JOIN RMS_SHIPPER RSH
+                           ON RSH.SHIPPER_ID = APO.RECEIVE_UNIT_ID
                  LEFT JOIN AMSTRUCK_PURPLAN AP
                            ON AP.BATCH_ID = APO.BATCH_ID
                  LEFT JOIN RMS_CARRIER RCR
@@ -499,7 +505,8 @@
     <!-- 查询采购汽运账单所需信息 -->
     <select id="getStatementMessage" parameterType="DECIMAL" resultType="java.util.Map">
         SELECT RS.SHIPPER_NAME             AS "receivedUnitName",
-               RCR.CARRIER_NAME            AS "collectionUnitName",
+               RSU.SUPPLIER_NAME           AS "collectionUnitName",
+               RSU.SUPPLIER_DUTY_PARAGRAPH AS "collectionUnitNum",
                RS.SHIPPER_NAME             AS "payUnitName",
                RSU.SUPPLIER_DUTY_PARAGRAPH AS "forwordUnitNum",
                RSU.SUPPLIER_NAME           AS "forwordUnitName"

+ 1 - 0
src/main/resources/com/steerinfo/dil/mapper/BmstruckStatementMapper.xml

@@ -468,6 +468,7 @@
     <!-- 得到收款单位和收货单位 -->
     <select id="getCarrierAndReceiver" parameterType="DECIMAL" resultType="java.util.Map">
         SELECT RC.CONSIGNEE_COMPANY_NAME AS "receivedUnitName",
+               RC.CONSIGNEE_CODE         AS "receivedUnitNum",
                RCA.CARRIER_NAME          AS "collectionUnitName"
         FROM BMSTRUCK_STATEMENT BS
                  LEFT JOIN BMSTRUCK_DETAILS_STATEMENT BDS

+ 233 - 207
src/main/resources/com/steerinfo/dil/mapper/RmsConsigneeMapper.xml

@@ -11,7 +11,7 @@
     <result column="CONSIGNEE_CONTACT_NAME" jdbcType="VARCHAR" property="consigneeContactName" />
     <result column="CONSIGNEE_WARRANTY_AMOUNT" jdbcType="DECIMAL" property="consigneeWarrantyAmount" />
     <result column="CONSIGNEE_WARRANTY_WEIGHT" jdbcType="VARCHAR" property="consigneeWarrantyWeight" />
-    <result column="CONSIGNEE_CONTACT_TEL" jdbcType="CHAR" property="consigneeContactTel" />
+    <result column="CONSIGNEE_CONTACT_TEL" jdbcType="VARCHAR" property="consigneeContactTel" />
     <result column="CONSIGNEE_EXCHANGE_DELIVERY" jdbcType="DECIMAL" property="consigneeExchangeDelivery" />
     <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
     <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
@@ -20,19 +20,21 @@
     <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
     <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
     <result column="EAS_CONSIGNEE_ID" jdbcType="VARCHAR" property="easConsigneeId" />
+    <result column="CONSIGNEE_CODE" jdbcType="VARCHAR" property="consigneeCode" />
   </resultMap>
   <sql id="columns">
-    CONSIGNEE_ID, CONSIGNEE_COMPANY_NAME, CONSIGNEE_ABBREVIATION, CONSIGNEE_REGISTERED_ADDRESS, 
-    CONSIGNEE_RECEIVE_ADDRESS, CONSIGNEE_REGISTRATION_TIME, CONSIGNEE_CONTACT_NAME, CONSIGNEE_WARRANTY_AMOUNT, 
-    CONSIGNEE_WARRANTY_WEIGHT, CONSIGNEE_CONTACT_TEL, CONSIGNEE_EXCHANGE_DELIVERY, INSERT_USERNAME, 
-    INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, EAS_CONSIGNEE_ID
+    CONSIGNEE_ID, CONSIGNEE_COMPANY_NAME, CONSIGNEE_ABBREVIATION, CONSIGNEE_REGISTERED_ADDRESS,
+    CONSIGNEE_RECEIVE_ADDRESS, CONSIGNEE_REGISTRATION_TIME, CONSIGNEE_CONTACT_NAME, CONSIGNEE_WARRANTY_AMOUNT,
+    CONSIGNEE_WARRANTY_WEIGHT, CONSIGNEE_CONTACT_TEL, CONSIGNEE_EXCHANGE_DELIVERY, INSERT_USERNAME,
+    INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, EAS_CONSIGNEE_ID,
+    CONSIGNEE_CODE
   </sql>
   <sql id="columns_alias">
-    t.CONSIGNEE_ID, t.CONSIGNEE_COMPANY_NAME, t.CONSIGNEE_ABBREVIATION, t.CONSIGNEE_REGISTERED_ADDRESS, 
-    t.CONSIGNEE_RECEIVE_ADDRESS, t.CONSIGNEE_REGISTRATION_TIME, t.CONSIGNEE_CONTACT_NAME, 
-    t.CONSIGNEE_WARRANTY_AMOUNT, t.CONSIGNEE_WARRANTY_WEIGHT, t.CONSIGNEE_CONTACT_TEL, 
-    t.CONSIGNEE_EXCHANGE_DELIVERY, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, 
-    t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED, t.EAS_CONSIGNEE_ID
+    t.CONSIGNEE_ID, t.CONSIGNEE_COMPANY_NAME, t.CONSIGNEE_ABBREVIATION, t.CONSIGNEE_REGISTERED_ADDRESS,
+    t.CONSIGNEE_RECEIVE_ADDRESS, t.CONSIGNEE_REGISTRATION_TIME, t.CONSIGNEE_CONTACT_NAME,
+    t.CONSIGNEE_WARRANTY_AMOUNT, t.CONSIGNEE_WARRANTY_WEIGHT, t.CONSIGNEE_CONTACT_TEL,
+    t.CONSIGNEE_EXCHANGE_DELIVERY, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME,
+    t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED, t.EAS_CONSIGNEE_ID, t.CONSIGNEE_CODE
   </sql>
   <sql id="select">
     SELECT <include refid="columns" /> FROM RMS_CONSIGNEE
@@ -41,7 +43,7 @@
     SELECT <include refid="columns_alias" /> FROM RMS_CONSIGNEE t
   </sql>
   <sql id="where">
-    <where> 
+    <where>
       <if test="consigneeId != null">
         and CONSIGNEE_ID = #{consigneeId}
       </if>
@@ -69,7 +71,7 @@
       <if test="consigneeWarrantyWeight != null and consigneeWarrantyWeight != ''">
         and CONSIGNEE_WARRANTY_WEIGHT = #{consigneeWarrantyWeight}
       </if>
-      <if test="consigneeContactTel != null">
+      <if test="consigneeContactTel != null and consigneeContactTel != ''">
         and CONSIGNEE_CONTACT_TEL = #{consigneeContactTel}
       </if>
       <if test="consigneeExchangeDelivery != null">
@@ -96,10 +98,13 @@
       <if test="easConsigneeId != null and easConsigneeId != ''">
         and EAS_CONSIGNEE_ID = #{easConsigneeId}
       </if>
+      <if test="consigneeCode != null and consigneeCode != ''">
+        and CONSIGNEE_CODE = #{consigneeCode}
+      </if>
     </where>
   </sql>
   <sql id="whereLike">
-    <where> 
+    <where>
       <if test="consigneeId != null">
         and CONSIGNEE_ID = #{consigneeId}
       </if>
@@ -127,8 +132,8 @@
       <if test="consigneeWarrantyWeight != null and consigneeWarrantyWeight != ''">
         and CONSIGNEE_WARRANTY_WEIGHT LIKE '%${consigneeWarrantyWeight}%'
       </if>
-      <if test="consigneeContactTel != null">
-        and CONSIGNEE_CONTACT_TEL = #{consigneeContactTel}
+      <if test="consigneeContactTel != null and consigneeContactTel != ''">
+        and CONSIGNEE_CONTACT_TEL LIKE '%${consigneeContactTel}%'
       </if>
       <if test="consigneeExchangeDelivery != null">
         and CONSIGNEE_EXCHANGE_DELIVERY = #{consigneeExchangeDelivery}
@@ -154,6 +159,9 @@
       <if test="easConsigneeId != null and easConsigneeId != ''">
         and EAS_CONSIGNEE_ID LIKE '%${easConsigneeId}%'
       </if>
+      <if test="consigneeCode != null and consigneeCode != ''">
+        and CONSIGNEE_CODE LIKE '%${consigneeCode}%'
+      </if>
     </where>
   </sql>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
@@ -162,78 +170,81 @@
   </delete>
   <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
     delete from RMS_CONSIGNEE
-    where 1!=1 
-      <if test="consigneeCompanyName != null and consigneeCompanyName != ''">
-        or CONSIGNEE_COMPANY_NAME = #{consigneeCompanyName}
-      </if>
-      <if test="consigneeAbbreviation != null and consigneeAbbreviation != ''">
-        or CONSIGNEE_ABBREVIATION = #{consigneeAbbreviation}
-      </if>
-      <if test="consigneeRegisteredAddress != null and consigneeRegisteredAddress != ''">
-        or CONSIGNEE_REGISTERED_ADDRESS = #{consigneeRegisteredAddress}
-      </if>
-      <if test="consigneeReceiveAddress != null and consigneeReceiveAddress != ''">
-        or CONSIGNEE_RECEIVE_ADDRESS = #{consigneeReceiveAddress}
-      </if>
-      <if test="consigneeRegistrationTime != null">
-        or TO_CHAR(CONSIGNEE_REGISTRATION_TIME,'yyyy-MM-dd') = '#{consigneeRegistrationTime}'
-      </if>
-      <if test="consigneeContactName != null and consigneeContactName != ''">
-        or CONSIGNEE_CONTACT_NAME = #{consigneeContactName}
-      </if>
-      <if test="consigneeWarrantyAmount != null">
-        or CONSIGNEE_WARRANTY_AMOUNT = #{consigneeWarrantyAmount}
-      </if>
-      <if test="consigneeWarrantyWeight != null and consigneeWarrantyWeight != ''">
-        or CONSIGNEE_WARRANTY_WEIGHT = #{consigneeWarrantyWeight}
-      </if>
-      <if test="consigneeContactTel != null">
-        or CONSIGNEE_CONTACT_TEL = #{consigneeContactTel}
-      </if>
-      <if test="consigneeExchangeDelivery != null">
-        or CONSIGNEE_EXCHANGE_DELIVERY = #{consigneeExchangeDelivery}
-      </if>
-      <if test="insertUsername != null and insertUsername != ''">
-        or INSERT_USERNAME = #{insertUsername}
-      </if>
-      <if test="insertTime != null">
-        or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
-      </if>
-      <if test="updateUsername != null and updateUsername != ''">
-        or UPDATE_USERNAME = #{updateUsername}
-      </if>
-      <if test="updateTime != null">
-        or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
-      </if>
-      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
-        or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
-      </if>
-      <if test="deleted != null">
-        or DELETED = #{deleted}
-      </if>
-      <if test="easConsigneeId != null and easConsigneeId != ''">
-        or EAS_CONSIGNEE_ID = #{easConsigneeId}
-      </if>
+    where 1!=1
+    <if test="consigneeCompanyName != null and consigneeCompanyName != ''">
+      or CONSIGNEE_COMPANY_NAME = #{consigneeCompanyName}
+    </if>
+    <if test="consigneeAbbreviation != null and consigneeAbbreviation != ''">
+      or CONSIGNEE_ABBREVIATION = #{consigneeAbbreviation}
+    </if>
+    <if test="consigneeRegisteredAddress != null and consigneeRegisteredAddress != ''">
+      or CONSIGNEE_REGISTERED_ADDRESS = #{consigneeRegisteredAddress}
+    </if>
+    <if test="consigneeReceiveAddress != null and consigneeReceiveAddress != ''">
+      or CONSIGNEE_RECEIVE_ADDRESS = #{consigneeReceiveAddress}
+    </if>
+    <if test="consigneeRegistrationTime != null">
+      or TO_CHAR(CONSIGNEE_REGISTRATION_TIME,'yyyy-MM-dd') = '#{consigneeRegistrationTime}'
+    </if>
+    <if test="consigneeContactName != null and consigneeContactName != ''">
+      or CONSIGNEE_CONTACT_NAME = #{consigneeContactName}
+    </if>
+    <if test="consigneeWarrantyAmount != null">
+      or CONSIGNEE_WARRANTY_AMOUNT = #{consigneeWarrantyAmount}
+    </if>
+    <if test="consigneeWarrantyWeight != null and consigneeWarrantyWeight != ''">
+      or CONSIGNEE_WARRANTY_WEIGHT = #{consigneeWarrantyWeight}
+    </if>
+    <if test="consigneeContactTel != null and consigneeContactTel != ''">
+      or CONSIGNEE_CONTACT_TEL = #{consigneeContactTel}
+    </if>
+    <if test="consigneeExchangeDelivery != null">
+      or CONSIGNEE_EXCHANGE_DELIVERY = #{consigneeExchangeDelivery}
+    </if>
+    <if test="insertUsername != null and insertUsername != ''">
+      or INSERT_USERNAME = #{insertUsername}
+    </if>
+    <if test="insertTime != null">
+      or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
+    </if>
+    <if test="updateUsername != null and updateUsername != ''">
+      or UPDATE_USERNAME = #{updateUsername}
+    </if>
+    <if test="updateTime != null">
+      or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+    </if>
+    <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+      or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
+    </if>
+    <if test="deleted != null">
+      or DELETED = #{deleted}
+    </if>
+    <if test="easConsigneeId != null and easConsigneeId != ''">
+      or EAS_CONSIGNEE_ID = #{easConsigneeId}
+    </if>
+    <if test="consigneeCode != null and consigneeCode != ''">
+      or CONSIGNEE_CODE = #{consigneeCode}
+    </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.dil.model.RmsConsignee">
-    insert into RMS_CONSIGNEE (CONSIGNEE_ID, CONSIGNEE_COMPANY_NAME, 
-      CONSIGNEE_ABBREVIATION, CONSIGNEE_REGISTERED_ADDRESS, 
-      CONSIGNEE_RECEIVE_ADDRESS, CONSIGNEE_REGISTRATION_TIME, 
-      CONSIGNEE_CONTACT_NAME, CONSIGNEE_WARRANTY_AMOUNT, 
-      CONSIGNEE_WARRANTY_WEIGHT, CONSIGNEE_CONTACT_TEL, 
-      CONSIGNEE_EXCHANGE_DELIVERY, INSERT_USERNAME, 
-      INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, 
-      INSERT_UPDATE_REMARK, DELETED, EAS_CONSIGNEE_ID
-      )
-    values (#{consigneeId,jdbcType=DECIMAL}, #{consigneeCompanyName,jdbcType=VARCHAR}, 
-      #{consigneeAbbreviation,jdbcType=VARCHAR}, #{consigneeRegisteredAddress,jdbcType=VARCHAR}, 
-      #{consigneeReceiveAddress,jdbcType=VARCHAR}, #{consigneeRegistrationTime,jdbcType=TIMESTAMP}, 
-      #{consigneeContactName,jdbcType=VARCHAR}, #{consigneeWarrantyAmount,jdbcType=DECIMAL}, 
-      #{consigneeWarrantyWeight,jdbcType=VARCHAR}, #{consigneeContactTel,jdbcType=CHAR}, 
-      #{consigneeExchangeDelivery,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, 
-      #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, 
-      #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}, #{easConsigneeId,jdbcType=VARCHAR}
-      )
+    insert into RMS_CONSIGNEE (CONSIGNEE_ID, CONSIGNEE_COMPANY_NAME,
+                               CONSIGNEE_ABBREVIATION, CONSIGNEE_REGISTERED_ADDRESS,
+                               CONSIGNEE_RECEIVE_ADDRESS, CONSIGNEE_REGISTRATION_TIME,
+                               CONSIGNEE_CONTACT_NAME, CONSIGNEE_WARRANTY_AMOUNT,
+                               CONSIGNEE_WARRANTY_WEIGHT, CONSIGNEE_CONTACT_TEL,
+                               CONSIGNEE_EXCHANGE_DELIVERY, INSERT_USERNAME,
+                               INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
+                               INSERT_UPDATE_REMARK, DELETED, EAS_CONSIGNEE_ID,
+                               CONSIGNEE_CODE)
+    values (#{consigneeId,jdbcType=DECIMAL}, #{consigneeCompanyName,jdbcType=VARCHAR},
+            #{consigneeAbbreviation,jdbcType=VARCHAR}, #{consigneeRegisteredAddress,jdbcType=VARCHAR},
+            #{consigneeReceiveAddress,jdbcType=VARCHAR}, #{consigneeRegistrationTime,jdbcType=TIMESTAMP},
+            #{consigneeContactName,jdbcType=VARCHAR}, #{consigneeWarrantyAmount,jdbcType=DECIMAL},
+            #{consigneeWarrantyWeight,jdbcType=VARCHAR}, #{consigneeContactTel,jdbcType=VARCHAR},
+            #{consigneeExchangeDelivery,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR},
+            #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
+            #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}, #{easConsigneeId,jdbcType=VARCHAR},
+            #{consigneeCode,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.dil.model.RmsConsignee">
     insert into RMS_CONSIGNEE
@@ -292,6 +303,9 @@
       <if test="easConsigneeId != null">
         EAS_CONSIGNEE_ID,
       </if>
+      <if test="consigneeCode != null">
+        CONSIGNEE_CODE,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="consigneeId != null">
@@ -322,7 +336,7 @@
         #{consigneeWarrantyWeight,jdbcType=VARCHAR},
       </if>
       <if test="consigneeContactTel != null">
-        #{consigneeContactTel,jdbcType=CHAR},
+        #{consigneeContactTel,jdbcType=VARCHAR},
       </if>
       <if test="consigneeExchangeDelivery != null">
         #{consigneeExchangeDelivery,jdbcType=DECIMAL},
@@ -348,27 +362,31 @@
       <if test="easConsigneeId != null">
         #{easConsigneeId,jdbcType=VARCHAR},
       </if>
+      <if test="consigneeCode != null">
+        #{consigneeCode,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.RmsConsignee">
     update RMS_CONSIGNEE
     set CONSIGNEE_COMPANY_NAME = #{consigneeCompanyName,jdbcType=VARCHAR},
-      CONSIGNEE_ABBREVIATION = #{consigneeAbbreviation,jdbcType=VARCHAR},
-      CONSIGNEE_REGISTERED_ADDRESS = #{consigneeRegisteredAddress,jdbcType=VARCHAR},
-      CONSIGNEE_RECEIVE_ADDRESS = #{consigneeReceiveAddress,jdbcType=VARCHAR},
-      CONSIGNEE_REGISTRATION_TIME = #{consigneeRegistrationTime,jdbcType=TIMESTAMP},
-      CONSIGNEE_CONTACT_NAME = #{consigneeContactName,jdbcType=VARCHAR},
-      CONSIGNEE_WARRANTY_AMOUNT = #{consigneeWarrantyAmount,jdbcType=DECIMAL},
-      CONSIGNEE_WARRANTY_WEIGHT = #{consigneeWarrantyWeight,jdbcType=VARCHAR},
-      CONSIGNEE_CONTACT_TEL = #{consigneeContactTel,jdbcType=CHAR},
-      CONSIGNEE_EXCHANGE_DELIVERY = #{consigneeExchangeDelivery,jdbcType=DECIMAL},
-      INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
-      INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
-      UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
-      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
-      INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
-      DELETED = #{deleted,jdbcType=DECIMAL},
-      EAS_CONSIGNEE_ID = #{easConsigneeId,jdbcType=VARCHAR}
+        CONSIGNEE_ABBREVIATION = #{consigneeAbbreviation,jdbcType=VARCHAR},
+        CONSIGNEE_REGISTERED_ADDRESS = #{consigneeRegisteredAddress,jdbcType=VARCHAR},
+        CONSIGNEE_RECEIVE_ADDRESS = #{consigneeReceiveAddress,jdbcType=VARCHAR},
+        CONSIGNEE_REGISTRATION_TIME = #{consigneeRegistrationTime,jdbcType=TIMESTAMP},
+        CONSIGNEE_CONTACT_NAME = #{consigneeContactName,jdbcType=VARCHAR},
+        CONSIGNEE_WARRANTY_AMOUNT = #{consigneeWarrantyAmount,jdbcType=DECIMAL},
+        CONSIGNEE_WARRANTY_WEIGHT = #{consigneeWarrantyWeight,jdbcType=VARCHAR},
+        CONSIGNEE_CONTACT_TEL = #{consigneeContactTel,jdbcType=VARCHAR},
+        CONSIGNEE_EXCHANGE_DELIVERY = #{consigneeExchangeDelivery,jdbcType=DECIMAL},
+        INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+        INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+        UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+        INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+        DELETED = #{deleted,jdbcType=DECIMAL},
+        EAS_CONSIGNEE_ID = #{easConsigneeId,jdbcType=VARCHAR},
+        CONSIGNEE_CODE = #{consigneeCode,jdbcType=VARCHAR}
     where CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.RmsConsignee">
@@ -399,7 +417,7 @@
         CONSIGNEE_WARRANTY_WEIGHT = #{consigneeWarrantyWeight,jdbcType=VARCHAR},
       </if>
       <if test="consigneeContactTel != null">
-        CONSIGNEE_CONTACT_TEL = #{consigneeContactTel,jdbcType=CHAR},
+        CONSIGNEE_CONTACT_TEL = #{consigneeContactTel,jdbcType=VARCHAR},
       </if>
       <if test="consigneeExchangeDelivery != null">
         CONSIGNEE_EXCHANGE_DELIVERY = #{consigneeExchangeDelivery,jdbcType=DECIMAL},
@@ -425,6 +443,9 @@
       <if test="easConsigneeId != null">
         EAS_CONSIGNEE_ID = #{easConsigneeId,jdbcType=VARCHAR},
       </if>
+      <if test="consigneeCode != null">
+        CONSIGNEE_CODE = #{consigneeCode,jdbcType=VARCHAR},
+      </if>
     </set>
     where CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL}
   </update>
@@ -441,114 +462,120 @@
     <include refid="whereLike" />
   </select>
   <insert id="batchInsert" parameterType="java.util.List">
-    insert into RMS_CONSIGNEE 
-      (CONSIGNEE_ID, 
-      CONSIGNEE_COMPANY_NAME, CONSIGNEE_ABBREVIATION, 
-      CONSIGNEE_REGISTERED_ADDRESS, CONSIGNEE_RECEIVE_ADDRESS, 
-      CONSIGNEE_REGISTRATION_TIME, CONSIGNEE_CONTACT_NAME, 
-      CONSIGNEE_WARRANTY_AMOUNT, CONSIGNEE_WARRANTY_WEIGHT, 
-      CONSIGNEE_CONTACT_TEL, CONSIGNEE_EXCHANGE_DELIVERY, 
-      INSERT_USERNAME, INSERT_TIME, 
-      UPDATE_USERNAME, UPDATE_TIME, 
-      INSERT_UPDATE_REMARK, DELETED, 
-      EAS_CONSIGNEE_ID)
-    ( <foreach collection="list" item="item" separator="union all"> 
-   select  
-      #{item.consigneeId,jdbcType=DECIMAL}, 
-      #{item.consigneeCompanyName,jdbcType=VARCHAR}, #{item.consigneeAbbreviation,jdbcType=VARCHAR}, 
-      #{item.consigneeRegisteredAddress,jdbcType=VARCHAR}, #{item.consigneeReceiveAddress,jdbcType=VARCHAR}, 
-      #{item.consigneeRegistrationTime,jdbcType=TIMESTAMP}, #{item.consigneeContactName,jdbcType=VARCHAR}, 
-      #{item.consigneeWarrantyAmount,jdbcType=DECIMAL}, #{item.consigneeWarrantyWeight,jdbcType=VARCHAR}, 
-      #{item.consigneeContactTel,jdbcType=CHAR}, #{item.consigneeExchangeDelivery,jdbcType=DECIMAL}, 
-      #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP}, 
-      #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, 
-      #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.deleted,jdbcType=DECIMAL}, 
-      #{item.easConsigneeId,jdbcType=VARCHAR} from dual  
-   </foreach> )
+    insert into RMS_CONSIGNEE
+    (CONSIGNEE_ID,
+    CONSIGNEE_COMPANY_NAME, CONSIGNEE_ABBREVIATION,
+    CONSIGNEE_REGISTERED_ADDRESS, CONSIGNEE_RECEIVE_ADDRESS,
+    CONSIGNEE_REGISTRATION_TIME, CONSIGNEE_CONTACT_NAME,
+    CONSIGNEE_WARRANTY_AMOUNT, CONSIGNEE_WARRANTY_WEIGHT,
+    CONSIGNEE_CONTACT_TEL, CONSIGNEE_EXCHANGE_DELIVERY,
+    INSERT_USERNAME, INSERT_TIME,
+    UPDATE_USERNAME, UPDATE_TIME,
+    INSERT_UPDATE_REMARK, DELETED,
+    EAS_CONSIGNEE_ID, CONSIGNEE_CODE
+    )
+    ( <foreach collection="list" item="item" separator="union all">
+    select
+    #{item.consigneeId,jdbcType=DECIMAL},
+    #{item.consigneeCompanyName,jdbcType=VARCHAR}, #{item.consigneeAbbreviation,jdbcType=VARCHAR},
+    #{item.consigneeRegisteredAddress,jdbcType=VARCHAR}, #{item.consigneeReceiveAddress,jdbcType=VARCHAR},
+    #{item.consigneeRegistrationTime,jdbcType=TIMESTAMP}, #{item.consigneeContactName,jdbcType=VARCHAR},
+    #{item.consigneeWarrantyAmount,jdbcType=DECIMAL}, #{item.consigneeWarrantyWeight,jdbcType=VARCHAR},
+    #{item.consigneeContactTel,jdbcType=VARCHAR}, #{item.consigneeExchangeDelivery,jdbcType=DECIMAL},
+    #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
+    #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
+    #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.deleted,jdbcType=DECIMAL},
+    #{item.easConsigneeId,jdbcType=VARCHAR}, #{item.consigneeCode,jdbcType=VARCHAR}
+    from dual
+  </foreach> )
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
-     update RMS_CONSIGNEE
-     set
-       CONSIGNEE_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeId,jdbcType=DECIMAL}
-       </foreach>
-       ,CONSIGNEE_COMPANY_NAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeCompanyName,jdbcType=VARCHAR}
-       </foreach>
-       ,CONSIGNEE_ABBREVIATION=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeAbbreviation,jdbcType=VARCHAR}
-       </foreach>
-       ,CONSIGNEE_REGISTERED_ADDRESS=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeRegisteredAddress,jdbcType=VARCHAR}
-       </foreach>
-       ,CONSIGNEE_RECEIVE_ADDRESS=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeReceiveAddress,jdbcType=VARCHAR}
-       </foreach>
-       ,CONSIGNEE_REGISTRATION_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeRegistrationTime,jdbcType=TIMESTAMP}
-       </foreach>
-       ,CONSIGNEE_CONTACT_NAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeContactName,jdbcType=VARCHAR}
-       </foreach>
-       ,CONSIGNEE_WARRANTY_AMOUNT=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeWarrantyAmount,jdbcType=DECIMAL}
-       </foreach>
-       ,CONSIGNEE_WARRANTY_WEIGHT=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeWarrantyWeight,jdbcType=VARCHAR}
-       </foreach>
-       ,CONSIGNEE_CONTACT_TEL=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeContactTel,jdbcType=CHAR}
-       </foreach>
-       ,CONSIGNEE_EXCHANGE_DELIVERY=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeExchangeDelivery,jdbcType=DECIMAL}
-       </foreach>
-       ,INSERT_USERNAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
-       </foreach>
-       ,INSERT_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
-       </foreach>
-       ,UPDATE_USERNAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
-       </foreach>
-       ,UPDATE_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
-       </foreach>
-       ,INSERT_UPDATE_REMARK=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
-       </foreach>
-       ,DELETED=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
-       </foreach>
-       ,EAS_CONSIGNEE_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.easConsigneeId,jdbcType=VARCHAR}
-       </foreach>
-     where CONSIGNEE_ID in 
-     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
-    #{item.consigneeId,jdbcType=DECIMAL}
-     </foreach> 
+    update RMS_CONSIGNEE
+    set
+    CONSIGNEE_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeId,jdbcType=DECIMAL}
+    </foreach>
+    ,CONSIGNEE_COMPANY_NAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeCompanyName,jdbcType=VARCHAR}
+    </foreach>
+    ,CONSIGNEE_ABBREVIATION=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeAbbreviation,jdbcType=VARCHAR}
+    </foreach>
+    ,CONSIGNEE_REGISTERED_ADDRESS=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeRegisteredAddress,jdbcType=VARCHAR}
+    </foreach>
+    ,CONSIGNEE_RECEIVE_ADDRESS=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeReceiveAddress,jdbcType=VARCHAR}
+    </foreach>
+    ,CONSIGNEE_REGISTRATION_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeRegistrationTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,CONSIGNEE_CONTACT_NAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeContactName,jdbcType=VARCHAR}
+    </foreach>
+    ,CONSIGNEE_WARRANTY_AMOUNT=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeWarrantyAmount,jdbcType=DECIMAL}
+    </foreach>
+    ,CONSIGNEE_WARRANTY_WEIGHT=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeWarrantyWeight,jdbcType=VARCHAR}
+    </foreach>
+    ,CONSIGNEE_CONTACT_TEL=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeContactTel,jdbcType=VARCHAR}
+    </foreach>
+    ,CONSIGNEE_EXCHANGE_DELIVERY=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeExchangeDelivery,jdbcType=DECIMAL}
+    </foreach>
+    ,INSERT_USERNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,INSERT_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,UPDATE_USERNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,UPDATE_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,INSERT_UPDATE_REMARK=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+    </foreach>
+    ,DELETED=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
+    </foreach>
+    ,EAS_CONSIGNEE_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.easConsigneeId,jdbcType=VARCHAR}
+    </foreach>
+    ,CONSIGNEE_CODE=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeCode,jdbcType=VARCHAR}
+    </foreach>
+    where CONSIGNEE_ID in
+    <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+      #{item.consigneeId,jdbcType=DECIMAL}
+    </foreach>
   </update>
   <delete id="batchDelete" parameterType="java.util.List">
     delete from RMS_CONSIGNEE
-    where CONSIGNEE_ID in 
+    where CONSIGNEE_ID in
     <foreach close=")" collection="list" item="id" open="(" separator=",">
       #{id}
     </foreach>
@@ -556,5 +583,4 @@
   <!-- 友情提示!!!-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
 
-  
 </mapper>