فهرست منبع

'销售订单接口'

HUJIANGUO 3 سال پیش
والد
کامیت
5129d0ae39
33فایلهای تغییر یافته به همراه2768 افزوده شده و 880 حذف شده
  1. 23 23
      pom.xml
  2. 3 3
      src/main/java/com/steerinfo/dil/controller/AmsSaleOrderController.java
  3. 27 0
      src/main/java/com/steerinfo/dil/controller/WSFaceController.java
  4. 19 0
      src/main/java/com/steerinfo/dil/mapper/AmsSaleMaterialMapper.java
  5. 7 1
      src/main/java/com/steerinfo/dil/mapper/AmsSaleOrderMapper.java
  6. 4 0
      src/main/java/com/steerinfo/dil/mapper/RmsCarrierMapper.java
  7. 20 7
      src/main/java/com/steerinfo/dil/model/AmsPurchaseOrder.java
  8. 214 0
      src/main/java/com/steerinfo/dil/model/AmsSaleMaterial.java
  9. 45 15
      src/main/java/com/steerinfo/dil/model/RmsCarrier.java
  10. 3 0
      src/main/java/com/steerinfo/dil/service/impl/AmsPurchaseOrderServiceImpl.java
  11. 123 23
      src/main/java/com/steerinfo/dil/service/impl/AmsSaleOrderServiceImpl.java
  12. 39 5
      src/main/java/com/steerinfo/dil/service/impl/RmsSupplierServiceImpl.java
  13. 1 1
      src/main/java/com/steerinfo/dil/util/DataChange.java
  14. 1 1
      src/main/java/com/steerinfo/dil/util/EASUtil.java
  15. 72 0
      src/main/java/com/steerinfo/dil/util/SaleUtil.java
  16. 35 58
      src/main/java/com/steerinfo/dil/wsdl/TestDG.java
  17. 0 53
      src/main/java/com/steerinfo/dil/wsdl/TestEasUtil.java
  18. 498 0
      src/main/java/com/steerinfo/dil/wsdl/WSFaceFacade.wsdl
  19. 10 12
      src/main/java/com/steerinfo/dil/wsdl/WSFaceFacadeSoapBindingStub.java
  20. 0 3
      src/main/java/com/steerinfo/dil/wsdl/WSFaceFacadeSrvProxy.java
  21. 1 1
      src/main/java/com/steerinfo/dil/wsdl/WSInvokeException.java
  22. 98 0
      src/main/java/com/steerinfo/dil/wsdl/WSUpDaxingMeteringSystemFacade.wsdl
  23. 187 0
      src/main/java/com/steerinfo/dil/wsdl/WSUpDaxingMeteringSystemFacadeSoapBindingStub.java
  24. 12 0
      src/main/java/com/steerinfo/dil/wsdl/WSUpDaxingMeteringSystemFacadeSrvProxy.java
  25. 16 0
      src/main/java/com/steerinfo/dil/wsdl/WSUpDaxingMeteringSystemFacadeSrvProxyService.java
  26. 142 0
      src/main/java/com/steerinfo/dil/wsdl/WSUpDaxingMeteringSystemFacadeSrvProxyServiceLocator.java
  27. 2 3
      src/main/resources/application-dev.yml
  28. 2 2
      src/main/resources/application-prod.yml
  29. 1 1
      src/main/resources/bootstrap.yml
  30. 584 564
      src/main/resources/com/steerinfo/dil/mapper/AmsPurchaseOrderMapper.xml
  31. 409 0
      src/main/resources/com/steerinfo/dil/mapper/AmsSaleMaterialMapper.xml
  32. 23 8
      src/main/resources/com/steerinfo/dil/mapper/AmsSaleOrderMapper.xml
  33. 147 96
      src/main/resources/com/steerinfo/dil/mapper/RmsCarrierMapper.xml

+ 23 - 23
pom.xml

@@ -183,29 +183,29 @@
     <build>
         <plugins>
                         <!-- 自动生成代码文件-->
-<!--            <plugin>-->
-<!--                <groupId>com.steerinfo</groupId>-->
-<!--                <artifactId>generator-maven-plugin</artifactId>-->
-<!--                <version>3.0</version>-->
-<!--                <configuration>-->
-<!--                    <connUrl>jdbc:oracle:thin:@172.16.33.163:1521:ilsdbpri</connUrl>-->
-<!--                    <user>dil</user>-->
-<!--                    <password>Dil123789</password>-->
-<!--                    &lt;!&ndash;包名&ndash;&gt;-->
-<!--                    <targetPackage>com.steerinfo.dil</targetPackage>-->
-<!--                    <tables>-->
-<!--                        <table></table>-->
-<!--                    </tables>-->
-<!--                </configuration>-->
-<!--                <executions>-->
-<!--                    <execution>-->
-<!--                        <phase>compile</phase>-->
-<!--                        <goals>-->
-<!--                            <goal>steerinfo</goal>-->
-<!--                        </goals>-->
-<!--                    </execution>-->
-<!--                </executions>-->
-<!--            </plugin>-->
+            <plugin>
+                <groupId>com.steerinfo</groupId>
+                <artifactId>generator-maven-plugin</artifactId>
+                <version>3.0</version>
+                <configuration>
+                    <connUrl>jdbc:oracle:thin:@172.16.33.163:1521:ilsdbpri</connUrl>
+                    <user>dil</user>
+                    <password>Dil123789</password>
+                    <!--包名-->
+                    <targetPackage>com.steerinfo.dil</targetPackage>
+                    <tables>
+                        <table>RMS_CARRIER</table>
+                    </tables>
+                </configuration>
+                <executions>
+                    <execution>
+                        <phase>compile</phase>
+                        <goals>
+                            <goal>steerinfo</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
             <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>

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

@@ -34,9 +34,9 @@ public class AmsSaleOrderController extends BaseRESTfulController {
      */
     @ApiModelProperty(value = "销售订单管理对接接口/查询")
     @PostMapping("/getSaleOrder")
-    public RESTfulResult getSaleOrder(@RequestParam BigDecimal saleOrderId) {
-        Map<String,Object> mapValue = amsSaleOrderService.getSaleOrder(saleOrderId);
-        return success(mapValue);
+    public Map<String,Object> getSaleOrder(@RequestParam BigDecimal saleOrderId) {
+        Map<String,Object> input = amsSaleOrderService.getSaleOrder(saleOrderId);
+        return input;
     }
 
     /**

+ 27 - 0
src/main/java/com/steerinfo/dil/controller/WSFaceController.java

@@ -4,9 +4,11 @@ import com.alibaba.druid.support.json.JSONUtils;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.steerinfo.dil.util.BaseRESTfulController;
+import com.steerinfo.dil.util.SaleUtil;
 import com.steerinfo.dil.wsdl.ServiceInfo;
 import com.steerinfo.dil.wsdl.WSFaceFacadeSrvProxyServiceLocator;
 import io.swagger.annotations.ApiModelProperty;
+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;
@@ -23,6 +25,9 @@ import java.util.Map;
 @RequestMapping("/${api.version}/wsface")
 public class WSFaceController extends BaseRESTfulController {
 
+    @Autowired
+    SaleUtil saleUtil;
+
     @PostMapping("/pushBmsSettlement")
     @ApiModelProperty(value = "结算金蝶访问接口")
     public String WSFaceWay(@RequestBody Map<String,Object> map) {
@@ -42,4 +47,26 @@ public class WSFaceController extends BaseRESTfulController {
         }
         return output;
     }
+
+    @PostMapping("/pushSaleOrderToEas")
+    @ApiModelProperty(value = "销售订单推送数据接口")
+    public String pushSaleOrderToEas(@RequestBody Map<String,Object> map) {
+//        Map<String, Object> totalMap = saleUtil.getTotalMap();
+//        totalMap.put("input",map);
+        com.steerinfo.dil.wsdl.ServiceInfo service = new ServiceInfo("user", "dgjt@kingdee", "eas", "zseas85", "L2", 0);
+        WSFaceFacadeSrvProxyServiceLocator locator = new WSFaceFacadeSrvProxyServiceLocator();
+        service.setServername("172.16.62.243" , "56898");
+        String output = null;
+        try {
+            // 这边是map,将map封装后转为json
+            String json = JSONUtils.toJSONString(map);
+            String res = locator.getWSFaceFacade().invokeJson(json);
+            JSONObject request = JSON.parseObject(res);
+            output = request.getString("output");
+            System.out.println(output);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return output;
+    }
 }

+ 19 - 0
src/main/java/com/steerinfo/dil/mapper/AmsSaleMaterialMapper.java

@@ -0,0 +1,19 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.AmsSaleMaterial;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
+
+import java.math.BigDecimal;
+
+@Mapper
+public interface AmsSaleMaterialMapper extends IBaseMapper<AmsSaleMaterial, BigDecimal> {
+
+    // 得到销售订单主键
+    @Select("select seq_AMS_SALE_MATERIAL.nextval from dual")
+    BigDecimal getSaleMaterialId();
+
+    // 通过物资编码查询物资id
+    BigDecimal getMaterialId(String materialCode);
+}

+ 7 - 1
src/main/java/com/steerinfo/dil/mapper/AmsSaleOrderMapper.java

@@ -18,6 +18,12 @@ public interface AmsSaleOrderMapper extends IBaseMapper<AmsSaleOrder, BigDecimal
     List<Map<String, Object>> getMaterialMessages(BigDecimal saleOrderId);
 
     // 得到销售订单主键
-    @Select("")
+    @Select("select seq_AMS_SALE_ORDER.nextval from dual")
     BigDecimal getSaleOrderId();
+
+    // 查询收货单位
+    BigDecimal getReceiveId(String receiveUnit);
+
+    // 查询发货单位
+    BigDecimal getShipperId(String shipperUnit);
 }

+ 4 - 0
src/main/java/com/steerinfo/dil/mapper/RmsCarrierMapper.java

@@ -3,9 +3,13 @@ package com.steerinfo.dil.mapper;
 import com.steerinfo.dil.model.RmsCarrier;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
 
 import java.math.BigDecimal;
 
 @Mapper
 public interface RmsCarrierMapper extends IBaseMapper<RmsCarrier, BigDecimal> {
+
+    @Select("select seq_RMS_CARRIER.nextval from dual")
+    BigDecimal getCarrierId();
 }

+ 20 - 7
src/main/java/com/steerinfo/dil/model/AmsPurchaseOrder.java

@@ -3,7 +3,6 @@ package com.steerinfo.dil.model;
 import com.steerinfo.framework.model.IBasePO;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
-import org.springframework.format.annotation.DateTimeFormat;
 
 import java.math.BigDecimal;
 import java.util.Date;
@@ -11,7 +10,7 @@ import java.util.Date;
 @ApiModel(value="采购订单")
 public class AmsPurchaseOrder implements IBasePO<BigDecimal> {
     /**
-     * 主键ID(PURCHASE_ORDER_ID,DECIMAL,38)
+     * 主键ID(PURCHASE_ORDER_ID,DECIMAL,0)
      */
     @ApiModelProperty(value="主键ID",required=true)
     private BigDecimal purchaseOrderId;
@@ -23,7 +22,7 @@ public class AmsPurchaseOrder implements IBasePO<BigDecimal> {
     private String purchaseOrderNo;
 
     /**
-     * 批次ID(BATCH_ID,DECIMAL,38)
+     * 批次ID(BATCH_ID,DECIMAL,0)
      */
     @ApiModelProperty(value="批次ID",required=false)
     private BigDecimal batchId;
@@ -31,18 +30,17 @@ public class AmsPurchaseOrder implements IBasePO<BigDecimal> {
     /**
      * 订单日期(PURCHASE_ORDER_DATE,TIMESTAMP,7)
      */
-    @DateTimeFormat(pattern = "yyyy-mm-dd hh24:mi:ss")
     @ApiModelProperty(value="订单日期",required=false)
     private Date purchaseOrderDate;
 
     /**
-     * 供应商ID(SUPPLIER_UNIT_ID,DECIMAL,38)
+     * 供应商ID(SUPPLIER_UNIT_ID,DECIMAL,0)
      */
     @ApiModelProperty(value="供应商ID",required=false)
     private BigDecimal supplierUnitId;
 
     /**
-     * 采购组织ID(PURCHASING_ORGANIZATION_ID,DECIMAL,38)
+     * 采购组织ID(PURCHASING_ORGANIZATION_ID,DECIMAL,0)
      */
     @ApiModelProperty(value="采购组织ID",required=false)
     private BigDecimal purchasingOrganizationId;
@@ -60,7 +58,7 @@ public class AmsPurchaseOrder implements IBasePO<BigDecimal> {
     private BigDecimal puchaseOrderMaterialNumber;
 
     /**
-     * 收货单位(RECEIVE_UNIT_ID,DECIMAL,38)
+     * 收货单位(RECEIVE_UNIT_ID,DECIMAL,0)
      */
     @ApiModelProperty(value="收货单位",required=false)
     private BigDecimal receiveUnitId;
@@ -113,6 +111,12 @@ public class AmsPurchaseOrder implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="金蝶采购订单主键",required=false)
     private String easPurchaseOrderId;
 
+    /**
+     * 金蝶分录ID(EAS_ENTRY_ID,VARCHAR,50)
+     */
+    @ApiModelProperty(value="金蝶分录ID",required=false)
+    private String easEntryId;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -261,6 +265,14 @@ public class AmsPurchaseOrder implements IBasePO<BigDecimal> {
         this.easPurchaseOrderId = easPurchaseOrderId == null ? null : easPurchaseOrderId.trim();
     }
 
+    public String getEasEntryId() {
+        return easEntryId;
+    }
+
+    public void setEasEntryId(String easEntryId) {
+        this.easEntryId = easEntryId == null ? null : easEntryId.trim();
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -284,6 +296,7 @@ public class AmsPurchaseOrder implements IBasePO<BigDecimal> {
         sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
         sb.append(", deleted=").append(deleted);
         sb.append(", easPurchaseOrderId=").append(easPurchaseOrderId);
+        sb.append(", easEntryId=").append(easEntryId);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 214 - 0
src/main/java/com/steerinfo/dil/model/AmsSaleMaterial.java

@@ -0,0 +1,214 @@
+package com.steerinfo.dil.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@ApiModel(value="销售订单分录物资中间表")
+public class AmsSaleMaterial implements IBasePO<BigDecimal> {
+    /**
+     * 主键ID(SALE_MATERIAL_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="主键ID",required=true)
+    private BigDecimal saleMaterialId;
+
+    /**
+     * 销售订单主表主键ID(SALE_ORDER_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="销售订单主表主键ID",required=false)
+    private BigDecimal saleOrderId;
+
+    /**
+     * 物资ID(MATERIAL_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="物资ID",required=false)
+    private BigDecimal materialId;
+
+    /**
+     * 物资重量(MATERIAL_WEIGHT,DECIMAL,0)
+     */
+    @ApiModelProperty(value="物资重量",required=false)
+    private BigDecimal materialWeight;
+
+    /**
+     * 物资件数(MATERIAL_NUMBER,DECIMAL,38)
+     */
+    @ApiModelProperty(value="物资件数",required=false)
+    private BigDecimal materialNumber;
+
+    /**
+     * 金蝶分路主键ID(EAS_PRIMARY_ID,VARCHAR,30)
+     */
+    @ApiModelProperty(value="金蝶分路主键ID",required=false)
+    private String easPrimaryId;
+
+    /**
+     * 记录创建人(INSERT_USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="记录创建人",required=false)
+    private String insertUsername;
+
+    /**
+     * 记录创建时间(INSERT_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录创建时间",required=false)
+    private Date insertTime;
+
+    /**
+     * 记录修改人(UPDATE_USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="记录修改人",required=false)
+    private String updateUsername;
+
+    /**
+     * 记录修改时间(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录修改时间",required=false)
+    private Date updateTime;
+
+    /**
+     * 记录创建或修改备注(INSERT_UPDATE_REMARK,VARCHAR,100)
+     */
+    @ApiModelProperty(value="记录创建或修改备注",required=false)
+    private String insertUpdateRemark;
+
+    /**
+     * 逻辑删除 0:未删除 ;1:已删除(DELETED,DECIMAL,38)
+     */
+    @ApiModelProperty(value="逻辑删除 0:未删除 ;1:已删除",required=false)
+    private BigDecimal deleted;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public BigDecimal getId() {
+        return this.saleMaterialId;
+    }
+
+    @Override
+    public void setId(BigDecimal saleMaterialId) {
+        this.saleMaterialId = saleMaterialId;
+    }
+
+    public BigDecimal getSaleMaterialId() {
+        return saleMaterialId;
+    }
+
+    public void setSaleMaterialId(BigDecimal saleMaterialId) {
+        this.saleMaterialId = saleMaterialId;
+    }
+
+    public BigDecimal getSaleOrderId() {
+        return saleOrderId;
+    }
+
+    public void setSaleOrderId(BigDecimal saleOrderId) {
+        this.saleOrderId = saleOrderId;
+    }
+
+    public BigDecimal getMaterialId() {
+        return materialId;
+    }
+
+    public void setMaterialId(BigDecimal materialId) {
+        this.materialId = materialId;
+    }
+
+    public BigDecimal getMaterialWeight() {
+        return materialWeight;
+    }
+
+    public void setMaterialWeight(BigDecimal materialWeight) {
+        this.materialWeight = materialWeight;
+    }
+
+    public BigDecimal getMaterialNumber() {
+        return materialNumber;
+    }
+
+    public void setMaterialNumber(BigDecimal materialNumber) {
+        this.materialNumber = materialNumber;
+    }
+
+    public String getEasPrimaryId() {
+        return easPrimaryId;
+    }
+
+    public void setEasPrimaryId(String easPrimaryId) {
+        this.easPrimaryId = easPrimaryId == null ? null : easPrimaryId.trim();
+    }
+
+    public String getInsertUsername() {
+        return insertUsername;
+    }
+
+    public void setInsertUsername(String insertUsername) {
+        this.insertUsername = insertUsername == null ? null : insertUsername.trim();
+    }
+
+    public Date getInsertTime() {
+        return insertTime;
+    }
+
+    public void setInsertTime(Date insertTime) {
+        this.insertTime = insertTime;
+    }
+
+    public String getUpdateUsername() {
+        return updateUsername;
+    }
+
+    public void setUpdateUsername(String updateUsername) {
+        this.updateUsername = updateUsername == null ? null : updateUsername.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getInsertUpdateRemark() {
+        return insertUpdateRemark;
+    }
+
+    public void setInsertUpdateRemark(String insertUpdateRemark) {
+        this.insertUpdateRemark = insertUpdateRemark == null ? null : insertUpdateRemark.trim();
+    }
+
+    public BigDecimal getDeleted() {
+        return deleted;
+    }
+
+    public void setDeleted(BigDecimal deleted) {
+        this.deleted = deleted;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", saleMaterialId=").append(saleMaterialId);
+        sb.append(", saleOrderId=").append(saleOrderId);
+        sb.append(", materialId=").append(materialId);
+        sb.append(", materialWeight=").append(materialWeight);
+        sb.append(", materialNumber=").append(materialNumber);
+        sb.append(", easPrimaryId=").append(easPrimaryId);
+        sb.append(", insertUsername=").append(insertUsername);
+        sb.append(", insertTime=").append(insertTime);
+        sb.append(", updateUsername=").append(updateUsername);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
+        sb.append(", deleted=").append(deleted);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 45 - 15
src/main/java/com/steerinfo/dil/model/RmsCarrier.java

@@ -10,19 +10,19 @@ import java.util.Date;
 @ApiModel(value="承运方")
 public class RmsCarrier implements IBasePO<BigDecimal> {
     /**
-     * 主键ID(CARRIER_ID,DECIMAL,38)
+     * 主键ID(CARRIER_ID,DECIMAL,0)
      */
     @ApiModelProperty(value="主键ID",required=true)
     private BigDecimal carrierId;
 
     /**
-     * 运输类型:0危化品;1:其他(CARRIER_TRANSPORT_TYPE,DECIMAL,38)
+     * 运输类型:0危化品;1:其他(CARRIER_TRANSPORT_TYPE,VARCHAR,32)
      */
     @ApiModelProperty(value="运输类型:0危化品;1:其他",required=false)
-    private BigDecimal carrierTransportType;
+    private String carrierTransportType;
 
     /**
-     * 承运商名称(CARRIER_NAME,VARCHAR,32)
+     * 承运商名称(CARRIER_NAME,VARCHAR,100)
      */
     @ApiModelProperty(value="承运商名称",required=false)
     private String carrierName;
@@ -40,10 +40,10 @@ public class RmsCarrier implements IBasePO<BigDecimal> {
     private String carrierAddress;
 
     /**
-     * 中标区域(CARRIER_BID_AREA,VARCHAR,20)
+     * 中标区域ID(CARRIER_BID_AREA_ID,DECIMAL,0)
      */
-    @ApiModelProperty(value="中标区域",required=false)
-    private String carrierBidArea;
+    @ApiModelProperty(value="中标区域ID",required=false)
+    private BigDecimal carrierBidAreaId;
 
     /**
      * 中标时间(CARRIER_BID_TIME,TIMESTAMP,7)
@@ -207,6 +207,18 @@ public class RmsCarrier implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="逻辑删除",required=false)
     private BigDecimal deleted;
 
+    /**
+     * 承运商类型:0外协承运商;1虚拟承运商;2销售承运商;3原料供应承运商(CARRIER_TYPE,VARCHAR,32)
+     */
+    @ApiModelProperty(value="承运商类型:0外协承运商;1虚拟承运商;2销售承运商;3原料供应承运商",required=false)
+    private String carrierType;
+
+    /**
+     * eas金蝶主键(EAS_CARRIER_ID,VARCHAR,50)
+     */
+    @ApiModelProperty(value="eas金蝶主键",required=false)
+    private String easCarrierId;
+
     /**
      * 运输证(照片)(CARRIER_TRANSPORT_CERTIFICATE,BLOB,4000)
      */
@@ -245,12 +257,12 @@ public class RmsCarrier implements IBasePO<BigDecimal> {
         this.carrierId = carrierId;
     }
 
-    public BigDecimal getCarrierTransportType() {
+    public String getCarrierTransportType() {
         return carrierTransportType;
     }
 
-    public void setCarrierTransportType(BigDecimal carrierTransportType) {
-        this.carrierTransportType = carrierTransportType;
+    public void setCarrierTransportType(String carrierTransportType) {
+        this.carrierTransportType = carrierTransportType == null ? null : carrierTransportType.trim();
     }
 
     public String getCarrierName() {
@@ -277,12 +289,12 @@ public class RmsCarrier implements IBasePO<BigDecimal> {
         this.carrierAddress = carrierAddress == null ? null : carrierAddress.trim();
     }
 
-    public String getCarrierBidArea() {
-        return carrierBidArea;
+    public BigDecimal getCarrierBidAreaId() {
+        return carrierBidAreaId;
     }
 
-    public void setCarrierBidArea(String carrierBidArea) {
-        this.carrierBidArea = carrierBidArea == null ? null : carrierBidArea.trim();
+    public void setCarrierBidAreaId(BigDecimal carrierBidAreaId) {
+        this.carrierBidAreaId = carrierBidAreaId;
     }
 
     public Date getCarrierBidTime() {
@@ -501,6 +513,22 @@ public class RmsCarrier implements IBasePO<BigDecimal> {
         this.deleted = deleted;
     }
 
+    public String getCarrierType() {
+        return carrierType;
+    }
+
+    public void setCarrierType(String carrierType) {
+        this.carrierType = carrierType == null ? null : carrierType.trim();
+    }
+
+    public String getEasCarrierId() {
+        return easCarrierId;
+    }
+
+    public void setEasCarrierId(String easCarrierId) {
+        this.easCarrierId = easCarrierId == null ? null : easCarrierId.trim();
+    }
+
     public byte[] getCarrierTransportCertificate() {
         return carrierTransportCertificate;
     }
@@ -536,7 +564,7 @@ public class RmsCarrier implements IBasePO<BigDecimal> {
         sb.append(", carrierName=").append(carrierName);
         sb.append(", carrierAbbreviation=").append(carrierAbbreviation);
         sb.append(", carrierAddress=").append(carrierAddress);
-        sb.append(", carrierBidArea=").append(carrierBidArea);
+        sb.append(", carrierBidAreaId=").append(carrierBidAreaId);
         sb.append(", carrierBidTime=").append(carrierBidTime);
         sb.append(", carrierLegalRepresentative=").append(carrierLegalRepresentative);
         sb.append(", registerNo=").append(registerNo);
@@ -564,6 +592,8 @@ public class RmsCarrier implements IBasePO<BigDecimal> {
         sb.append(", updateTime=").append(updateTime);
         sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
         sb.append(", deleted=").append(deleted);
+        sb.append(", carrierType=").append(carrierType);
+        sb.append(", easCarrierId=").append(easCarrierId);
         sb.append(", carrierTransportCertificate=").append(carrierTransportCertificate);
         sb.append(", carrierBusinessLicense=").append(carrierBusinessLicense);
         sb.append(", carrierBusinessAblelicense=").append(carrierBusinessAblelicense);

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

@@ -51,6 +51,8 @@ public class AmsPurchaseOrderServiceImpl implements IAmsPurchaseOrderService {
         int result = 0;
         // 得到金蝶采购主键id
         String EASPurchaseId = (String) mapVal.get("EASPurchaseId");
+        // 得到金蝶分录id
+        String EASEntryId = (String) mapVal.get("EASEntryId");
         // 得到采购订单号
         String purchaseOrderNo = (String) mapVal.get("purchaseOrderNo");
         // 得到物资唯一编号
@@ -119,6 +121,7 @@ public class AmsPurchaseOrderServiceImpl implements IAmsPurchaseOrderService {
         amsPurchaseOrder.setUpdateTime(new Date());
         amsPurchaseOrder.setUpdateUsername("admin");
         amsPurchaseOrder.setInsertUpdateRemark("无");
+        amsPurchaseOrder.setEasEntryId(EASEntryId);
         Map<String, Object> map1 = new HashMap<>();
         BigDecimal deleted = new BigDecimal(0);
         map1.put("purchaseOrderNo", purchaseOrderNo);

+ 123 - 23
src/main/java/com/steerinfo/dil/service/impl/AmsSaleOrderServiceImpl.java

@@ -1,10 +1,15 @@
 package com.steerinfo.dil.service.impl;
 
+import com.steerinfo.dil.mapper.AmsSaleMaterialMapper;
 import com.steerinfo.dil.mapper.AmsSaleOrderMapper;
+import com.steerinfo.dil.model.AmsSaleMaterial;
 import com.steerinfo.dil.model.AmsSaleOrder;
 import com.steerinfo.dil.service.IAmsSaleOrderService;
+import com.steerinfo.dil.util.DataChange;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
 import java.math.BigDecimal;
 import java.util.Date;
 import java.util.HashMap;
@@ -29,6 +34,8 @@ public class AmsSaleOrderServiceImpl implements IAmsSaleOrderService {
 
     @Autowired
     private AmsSaleOrderMapper amsSaleOrderMapper;
+    @Autowired
+    AmsSaleMaterialMapper amsSaleMaterialMapper;
 
     /**
      * 查询销售订单
@@ -39,6 +46,20 @@ public class AmsSaleOrderServiceImpl implements IAmsSaleOrderService {
     public Map<String, Object> getSaleOrder(BigDecimal saleOrderId) {
         List<Map<String,Object>> entries = amsSaleOrderMapper.getMaterialMessages(saleOrderId);
         Map<String,Object> head = amsSaleOrderMapper.getSaleOrderMessage(saleOrderId);
+        for (Map<String, Object> entry : entries) {
+            BigDecimal qty = null;
+            BigDecimal materialNumber = (BigDecimal) entry.get("materialNumber");
+            BigDecimal materialWeight = (BigDecimal) entry.get("materialWeight");
+            if (materialNumber != null && materialNumber.toString().length() != 0) {
+                qty = materialNumber;
+            }
+            if (materialWeight != null && materialWeight.toString().length() != 0) {
+                qty = materialWeight;
+            }
+            entry.put("qty",qty);
+            entry.remove("materialNumber");
+            entry.remove("materialWeight");
+        }
         Map<String,Object> input = new HashMap<>();
         input.put("head",head);
         input.put("entries",entries);
@@ -50,36 +71,115 @@ public class AmsSaleOrderServiceImpl implements IAmsSaleOrderService {
      * @param mapVal
      * @return
      */
+    @Transactional
     @Override
     public int operationSaleOrder(Map<String, Object> mapVal) {
+        int result = 0;
+        // 审批状态
+        String orderStatus = (String) mapVal.get("orderStatus");
         // 得到销售订单号
         String saleNumber = (String) mapVal.get("saleNumber");
-        // 得到账户余额
-        String saleAccountBalance = (String) mapVal.get("saleAccountBalance");
-        // 得到当前订单金额
-        String saleCurrentOrderAmount = (String) mapVal.get("saleCurrentOrderAmount");
-        // 得到历史订单金额
-        String saleHistoricalOrderAmount = (String) mapVal.get("saleHistoricalOrderAmount");
-        // 得到主键id
         Map<String,Object> map = new HashMap<>();
         map.put("saleNumber",saleNumber);
         List<AmsSaleOrder> amsSaleOrders = amsSaleOrderMapper.selectByParameters(map);
-        if (amsSaleOrders.size() == 0) {
-            AmsSaleOrder amsSaleOrder = new AmsSaleOrder();
-            amsSaleOrder.setSaleOrderId(amsSaleOrderMapper.getSaleOrderId());
-            amsSaleOrder.setSaleNumber(saleNumber);
-            amsSaleOrder.setDeleted(new BigDecimal(0));
-            amsSaleOrder.setInsertTime(new Date());
-            amsSaleOrder.setUpdateTime(new Date());
-            amsSaleOrder.setInsertUsername("admin");
-            amsSaleOrder.setInsertUpdateRemark("金蝶采集销售订单");
-            amsSaleOrder.setUpdateUsername("admin");
+        if (orderStatus.equals("4")) {
+            AmsSaleOrder amsSaleOrder = amsSaleOrders.get(0);
+            amsSaleOrder.setSaleOrderStatus(new BigDecimal(4));
+            result = amsSaleOrderMapper.updateByPrimaryKeySelective(amsSaleOrder);
+        }
+        else {
+            // 得到账户余额
+            String saleAccountBalance = (String) mapVal.get("saleAccountBalance");
+            // 得到当前订单金额
+            String saleCurrentOrderAmount = (String) mapVal.get("saleCurrentOrderAmount");
+            // 得到历史订单金额
+            String saleHistoricalOrderAmount = (String) mapVal.get("saleHistoricalOrderAmount");
+            // 得到订单备注
+            String saleRemark = (String) mapVal.get("saleRemark");
+            // 得到收货单位
+            String receiveUnit = (String) mapVal.get("receiveUnit");
+            BigDecimal receiveId = amsSaleOrderMapper.getReceiveId(receiveUnit);
+            // 得到发货单位
+            String shipperUnit = (String) mapVal.get("shipperUnit");
+            BigDecimal shipperId = amsSaleOrderMapper.getShipperId(shipperUnit);
+            // 得到收款客户
+            String saleOrderReceiveCustomer = (String) mapVal.get("receiveCustomer");
+            // 得到物资信息
+            List<Map<String, Object>> mapList = (List<Map<String, Object>>) mapVal.get("mapList");
+            // 如果不存在则自己新增
+            if (amsSaleOrders.size() == 0) {
+                AmsSaleOrder amsSaleOrder = new AmsSaleOrder();
+                BigDecimal saleOrderId = amsSaleOrderMapper.getSaleOrderId();
+                amsSaleOrder.setSaleOrderId(saleOrderId);
+                amsSaleOrder.setSaleNumber(DataChange.generateEightDigitsNumber("WXSDD", saleOrderId.intValue()));
+                amsSaleOrder.setDeleted(new BigDecimal(0));
+                amsSaleOrder.setInsertTime(new Date());
+                amsSaleOrder.setUpdateTime(new Date());
+                amsSaleOrder.setInsertUsername("admin");
+                amsSaleOrder.setInsertUpdateRemark("金蝶采集销售订单");
+                amsSaleOrder.setUpdateUsername("admin");
+                amsSaleOrder.setReceiveId(receiveId);
+                amsSaleOrder.setShipperId(shipperId);
+                amsSaleOrder.setSaleOrderIsselfMention("否");
+                amsSaleOrder.setSaleOrderTax("13%");
+                amsSaleOrder.setSaleUnitPrice(new BigDecimal(4000));
+                amsSaleOrder.setSaleRemark(saleRemark);
+                amsSaleOrder.setSaleOrderReceiveCustomer(saleOrderReceiveCustomer);
+                amsSaleOrder.setSaleAccountBalance(new BigDecimal(saleAccountBalance));
+                amsSaleOrder.setSaleCurrentOrderAmount(new BigDecimal(saleCurrentOrderAmount));
+                if (saleHistoricalOrderAmount != null && saleHistoricalOrderAmount.length() != 0) {
+                    amsSaleOrder.setSaleHistoricalOrderAmount(new BigDecimal(saleHistoricalOrderAmount));
+                }
+                amsSaleOrder.setSaleOrderStatus(new BigDecimal(2));
+                // 遍历物资分录,新增销售订单与物资中间表
+                for (Map<String, Object> materialMap : mapList) {
+                    AmsSaleMaterial amsSaleMaterial = new AmsSaleMaterial();
+                    BigDecimal saleMaterialId = amsSaleMaterialMapper.getSaleMaterialId();
+                    amsSaleMaterial.setSaleMaterialId(saleMaterialId);
+                    amsSaleMaterial.setSaleOrderId(saleOrderId);
+                    // 得到物资编码
+                    String materialCode = (String) materialMap.get("materialCode");
+                    BigDecimal materialId = amsSaleMaterialMapper.getMaterialId(materialCode);
+                    // 得到金蝶分录主键
+                    String easPrimaryId = (String) materialMap.get("easPrimaryId");
+                    // 得到物资数量
+                    String materialNumber = (String) materialMap.get("materialNumber");
+                    // 得到计量单位
+                    String materialUnit = (String) materialMap.get("materialUnit");
+                    amsSaleMaterial.setEasPrimaryId(easPrimaryId);
+                    amsSaleMaterial.setMaterialId(materialId);
+                    amsSaleMaterial.setInsertTime(new Date());
+                    amsSaleMaterial.setInsertUsername("金蝶");
+                    amsSaleMaterial.setInsertUpdateRemark("采集金蝶销售订单");
+                    if (materialUnit.equals("件")) {
+                        amsSaleMaterial.setMaterialNumber(new BigDecimal(materialNumber));
+                    } else {
+                        amsSaleMaterial.setMaterialWeight(new BigDecimal(materialNumber));
+                    }
+                    result += amsSaleMaterialMapper.insertSelective(amsSaleMaterial);
+                }
+                result += amsSaleOrderMapper.insertSelective(amsSaleOrder);
+            } else {
+                AmsSaleOrder amsSaleOrder = amsSaleOrders.get(0);
+                amsSaleOrder.setSaleNumber(saleNumber);
+                amsSaleOrder.setSaleAccountBalance(new BigDecimal(saleAccountBalance));
+                amsSaleOrder.setSaleCurrentOrderAmount(new BigDecimal(saleCurrentOrderAmount));
+                if (saleHistoricalOrderAmount != null && saleHistoricalOrderAmount.length() != 0) {
+                    amsSaleOrder.setSaleHistoricalOrderAmount(new BigDecimal(saleHistoricalOrderAmount));
+                }
+                amsSaleOrder.setSaleOrderStatus(new BigDecimal(orderStatus));
+                for (Map<String, Object> materialMap : mapList) {
+                    // 得到中间表主键id
+                    String saleMaterialId = (String) materialMap.get("saleMaterialId");
+                    // 得到金蝶分录id
+                    String easPrimaryId = (String) materialMap.get("easPrimaryId");
+                    AmsSaleMaterial amsSaleMaterial = amsSaleMaterialMapper.selectByPrimaryKey(new BigDecimal(saleMaterialId));
+                    amsSaleMaterial.setEasPrimaryId(easPrimaryId);
+                    result += amsSaleMaterialMapper.updateByPrimaryKeySelective(amsSaleMaterial);
+                }
+                result += amsSaleOrderMapper.updateByPrimaryKeySelective(amsSaleOrder);
+            }
         }
-        AmsSaleOrder amsSaleOrder = amsSaleOrders.get(0);
-        amsSaleOrder.setSaleNumber(saleNumber);
-        amsSaleOrder.setSaleAccountBalance(new BigDecimal(saleAccountBalance));
-        amsSaleOrder.setSaleCurrentOrderAmount(new BigDecimal(saleCurrentOrderAmount));
-        amsSaleOrder.setSaleHistoricalOrderAmount(new BigDecimal(saleHistoricalOrderAmount));
-        return amsSaleOrderMapper.updateByPrimaryKeySelective(amsSaleOrder);
+        return result;
     }
 }

+ 39 - 5
src/main/java/com/steerinfo/dil/service/impl/RmsSupplierServiceImpl.java

@@ -1,6 +1,8 @@
 package com.steerinfo.dil.service.impl;
 
+import com.steerinfo.dil.mapper.RmsCarrierMapper;
 import com.steerinfo.dil.mapper.RmsSupplierMapper;
+import com.steerinfo.dil.model.RmsCarrier;
 import com.steerinfo.dil.model.RmsSupplier;
 import com.steerinfo.dil.service.IRmsSupplierService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -31,6 +33,9 @@ public class RmsSupplierServiceImpl implements IRmsSupplierService {
     @Autowired
     private RmsSupplierMapper rmsSupplierMapper;
 
+    @Autowired
+    RmsCarrierMapper rmsCarrierMapper;
+
     /**
      * 操作供应商
      * @param mapVal
@@ -54,14 +59,19 @@ public class RmsSupplierServiceImpl implements IRmsSupplierService {
         String supplierContactNumber = (String) mapVal.get("supplierContactNumber");
         // 得到数据数据状态
         Integer dataStatus = (Integer) mapVal.get("dataStatus");
-        // 判断是供应商还是承运商
-        String dataType = (String) mapVal.get("dataType");
+//        // 判断是供应商还是承运商
+//        String dataType = (String) mapVal.get("dataType");
         // 判断是否EASId已存在
         Map<String,Object> map1 = new HashMap<>();
         map1.put("easSupplierId",EASSupplierId);
+        Map<String,Object> map2 = new HashMap<>();
         BigDecimal deleted = new BigDecimal(0);
         map1.put("deleted",deleted);
+        map2.put("easCarrierId",EASSupplierId);
+        map2.put("deleted",deleted);
+        List<RmsCarrier> rmsCarriers = rmsCarrierMapper.selectByParameters(map2);
         List<RmsSupplier> rmsSuppliers = rmsSupplierMapper.selectByParameters(map1);
+        // 供应商
         RmsSupplier rmsSupplier = new RmsSupplier();
         rmsSupplier.setEasSupplierId(EASSupplierId);
         rmsSupplier.setSupplierName(supplierName);
@@ -75,26 +85,50 @@ public class RmsSupplierServiceImpl implements IRmsSupplierService {
         rmsSupplier.setUpdateTime(new Date());
         rmsSupplier.setUpdateUsername("admin");
         rmsSupplier.setInsertUpdateRemark("无");
+        // 承运商
+        RmsCarrier rmsCarrier = new RmsCarrier();
+        rmsCarrier.setCarrierName(supplierName);
+        rmsCarrier.setCarrierAbbreviation(supplierAbbreviation);
+        rmsCarrier.setCarrierAddress(supplierAddress);
+        rmsCarrier.setCarrierDutyParagraph(supplierDutyParagraph);
+        rmsCarrier.setCarrierContactNumber(supplierContactNumber);
+        rmsCarrier.setCarrierAgent(supplierContactsName);
+        rmsCarrier.setInsertTime(new Date());
+        rmsCarrier.setInsertUsername("admin");
+        rmsCarrier.setUpdateTime(new Date());
+        rmsCarrier.setUpdateUsername("admin");
+        rmsCarrier.setInsertUpdateRemark("无");
         int result = 0;
         // 新增
         if (rmsSuppliers.size() == 0) {
             BigDecimal supplierId = rmsSupplierMapper.getSupplierId();
+            BigDecimal carrierId = rmsCarrierMapper.getCarrierId();
+            rmsCarrier.setCarrierId(carrierId);
+            rmsCarrier.setDeleted(new BigDecimal(0));
             rmsSupplier.setSupplierId(supplierId);
             rmsSupplier.setDeleted(new BigDecimal(0));
-            result = rmsSupplierMapper.insertSelective(rmsSupplier);
+            result += rmsSupplierMapper.insertSelective(rmsSupplier);
+            result += rmsCarrierMapper.insertSelective(rmsCarrier);
         }
         // 修改
         if (rmsSuppliers.size() != 0 && dataStatus == 1) {
             RmsSupplier rmsSupplier1 = rmsSuppliers.get(0);
+            RmsCarrier rmsCarrier1 = rmsCarriers.get(0);
+            rmsCarrier.setCarrierId(rmsCarrier1.getCarrierId());
             rmsSupplier.setSupplierId(rmsSupplier1.getSupplierId());
-            result = rmsSupplierMapper.updateByPrimaryKeySelective(rmsSupplier);
+            result += rmsSupplierMapper.updateByPrimaryKeySelective(rmsSupplier);
+            result += rmsCarrierMapper.updateByPrimaryKeySelective(rmsCarrier);
         }
         // 逻辑删除
         if (rmsSuppliers.size() != 0 && dataStatus == 2) {
             RmsSupplier rmsSupplier1 = rmsSuppliers.get(0);
+            RmsCarrier rmsCarrier1 = rmsCarriers.get(0);
             rmsSupplier.setSupplierId(rmsSupplier1.getSupplierId());
+            rmsCarrier.setCarrierId(rmsCarrier1.getCarrierId());
             rmsSupplier.setDeleted(new BigDecimal(1));
-            result = rmsSupplierMapper.updateByPrimaryKeySelective(rmsSupplier);
+            rmsCarrier.setDeleted(new BigDecimal(1));
+            result += rmsSupplierMapper.updateByPrimaryKeySelective(rmsSupplier);
+            result += rmsCarrierMapper.updateByPrimaryKeySelective(rmsCarrier);
         }
         return result;
     }

+ 1 - 1
src/main/java/com/steerinfo/dil/util/DataChange.java

@@ -152,7 +152,7 @@ public class DataChange {
                         ? "0000" + id : id < 100000
                         ? "000" + id : id < 1000000
                         ? "00" + id : id < 10000000
-                        ? "0" + id : id
+                        ? "0" + id : id.toString()
         );
         return sb.toString();
     }

+ 1 - 1
src/main/java/com/steerinfo/dil/util/EASUtil.java

@@ -4,7 +4,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 /**
- * 配置金蝶连接常量Map
+ * 配置金蝶测试环境连接常量Map
  * @Description:
  * @Author:HuJianGuo
  * @GreateTime:2021/11/15 19:44

+ 72 - 0
src/main/java/com/steerinfo/dil/util/SaleUtil.java

@@ -0,0 +1,72 @@
+package com.steerinfo.dil.util;
+
+import org.springframework.stereotype.Component;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 配置金蝶销售正式环境连接常量Map
+ * @Description:
+ * @Author:HuJianGuo
+ * @GreateTime:2021/11/15 19:44
+ * @Version:V2.0
+ */
+@Component
+public class SaleUtil {
+    // totalMap
+    public final Map<String,Object> totalMap = new HashMap<>();
+    // context
+    public final Map<String,Object> context = new HashMap<>();
+    public final boolean logError = true;
+    public final boolean logData = true;
+    // context
+    public final Map<String,Object> login = new HashMap<>();
+    public final String password = "dgjt@kingdee";
+    public final String dcName = "zseas85";
+    public final String dbType = "0";
+    public final String userName = "user";
+    // context
+    public final String command = "saveSaleOrderBillHandler";
+
+    /**
+     * 得到context的map
+     * @return
+     */
+    public Map<String,Object> getContext(){
+        this.context.put("logError",logError);
+        this.context.put("logData",logData);
+        return this.context;
+    }
+
+    /**
+     * 得到login的map
+     * @return
+     */
+    public Map<String,Object> getLogin(){
+        this.login.put("password",password);
+        this.login.put("dcName",dcName);
+        this.login.put("dbType",dbType);
+        this.login.put("userName",userName);
+        return this.login;
+    }
+
+    /**
+     * 得到command字符串
+     * @return
+     */
+    public String getCommand(){
+        return this.command;
+    }
+
+    /**
+     * 将所有的配置放入到totalMap的map里面
+     * @return
+     */
+    public Map<String,Object> getTotalMap() {
+        totalMap.put("context",getContext());
+        totalMap.put("login",getLogin());
+        totalMap.put("command",getCommand());
+        return this.totalMap;
+    }
+}

+ 35 - 58
src/main/java/com/steerinfo/dil/wsdl/TestDG.java

@@ -3,8 +3,6 @@ package com.steerinfo.dil.wsdl;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
-import com.steerinfo.dil.wsdl.ServiceInfo;
-import com.steerinfo.dil.wsdl.WSFaceFacadeSrvProxyServiceLocator;
 
 
 public class TestDG {
@@ -38,71 +36,50 @@ public class TestDG {
 //        service.setServername("172.16.200.57" , "6888");
         com.steerinfo.dil.wsdl.ServiceInfo service = new ServiceInfo("user", "kduser", "eas", "D001", "L2", 1);
         service.setServername("172.16.62.243" , "56898");
+//        service.setServername("172.16.49.135" , "56898");
+//        service.setServername("127.0.0.1" , "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" +
+                    " \"input\":{\n" +
+                    "    \"head\": {\n" +
+                    "        \"cusNum\": \"011600008\",\n" +
+                    "        \"number\": \"WXSDD2021122000010003\",\n" +
+                    "        \"unitName\": \"四川省达州钢铁集团有限责任公司\",\n" +
+                    "        \"bizDate\": \"2021-12-20 21:22:00\",\n" +
+                    "        \"remark\": \"测试数据\"\n" +
+                    "    },\n" +
+                    "    \"entries\": [\n" +
+                    "        {\n" +
+                    "            \"materialName\": \"四级螺纹钢定尺范围\",\n" +
+                    "            \"materialNum\": \"080101010100083\",\n" +
+                    "            \"qty\": 20,\n" +
+                    "            \"saleMaterialId\": 4\n" +
+                    "        }\n" +
+                    "    ]\n" +
+                    "},\n" +
+                    "      \"context\": {\n" +
+                    "          \"logError\": true,\n" +
+                    "          \"logData\": true\n" +
+                    "      },\n" +
+                    "      \"login\": {\n" +
+                    "          \"password\": \"dgjt@kingdee\",\n" +
+                    "          \"dcName\": \"zseas85\",\n" +
+                    "          \"dbType\": \"0\",\n" +
+                    "          \"userName\": \"user\"\n" +
+                    "      },\n" +
+                    "      \"command\": \"saveSaleOrderBillHandler\"\n" +
                     "}";
             String res = locator.getWSFaceFacade().invokeJson(json);
             JSONObject request = JSON.parseObject(res);
             String output = request.getString("output");
-            System.out.println(output);
+            String requestException = request.getString("exception");
+            System.out.println("成功:"+output);
+            System.out.println("失败:"+requestException);
 //            String outResult = FaceEncryptUtil.AES_Decrypt(output, "FXXT");
 //            System.out.println(res);//调用接口后返回的结果数据
 //            System.out.println(outResult);

+ 0 - 53
src/main/java/com/steerinfo/dil/wsdl/TestEasUtil.java

@@ -1,53 +0,0 @@
-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:
- * @Author:HuJianGuo
- * @GreateTime:2021/11/15 19:54
- * @Version:V2.0
- */
-public class TestEasUtil {
-
-    public static void aiXin(){
-        for(float y = (float) 1.5;y>-1.5;y -=0.1) {
-            for(float x= (float) -1.5;x<1.5;x+= 0.05){
-                float a = x*x+y*y-1;
-                if((a*a*a-x*x*y*y*y)<=0.0) {
-                    System.out.print("^");
-                }
-                else
-                    System.out.print(" ");
-            }
-            System.out.println();
-        }
-    }
-
-    public static void main(String[] args) {
-        aiXin();
-    }
-
-    public static void circle(){
-        int r=15;//圆形的半径
-        for (int y = 0; y <= 2 * r; y += 2) {//y的步长为2,改变y的步长可以将圆形变成椭圆
-            int x = (int)Math.round(r - Math.sqrt(2 * r * y - y * y));
-            int len = 2 * (r - x);
-            for (int i = 0; i <= x; i++) {
-                System.out.print(' ');
-            }
-            System.out.print('*');
-            for (int j = 0; j <= len; j++) {
-                System.out.print(' ');
-            }
-            System.out.println('*');
-        }
-    }
-
-}

+ 498 - 0
src/main/java/com/steerinfo/dil/wsdl/WSFaceFacade.wsdl

@@ -0,0 +1,498 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions targetNamespace="http://172.16.62.243:56898/ormrpc/services/WSFaceFacade" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://172.16.62.243:56898/ormrpc/services/WSFaceFacade" xmlns:intf="http://172.16.62.243:56898/ormrpc/services/WSFaceFacade" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="urn:client.facefacade" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    <!--WSDL created by Apache Axis version: 1.4
+    Built on Apr 22, 2006 (06:55:48 PDT)-->
+    <wsdl:types>
+        <schema targetNamespace="urn:client.facefacade" xmlns="http://www.w3.org/2001/XMLSchema">
+            <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
+            <complexType name="WSInvokeException">
+                <sequence/>
+            </complexType>
+        </schema>
+    </wsdl:types>
+
+    <wsdl:message name="writeFileJsonResponse">
+
+        <wsdl:part name="writeFileJsonReturn" type="xsd:string">
+
+        </wsdl:part>
+
+    </wsdl:message>
+
+    <wsdl:message name="readFileXmlRequest">
+
+        <wsdl:part name="request" type="xsd:string">
+
+        </wsdl:part>
+
+    </wsdl:message>
+
+    <wsdl:message name="writeFileJsonRequest">
+
+        <wsdl:part name="request" type="xsd:string">
+
+        </wsdl:part>
+
+        <wsdl:part name="fileData" type="xsd:base64Binary">
+
+        </wsdl:part>
+
+    </wsdl:message>
+
+    <wsdl:message name="thirdJsonResponse">
+
+        <wsdl:part name="thirdJsonReturn" type="xsd:string">
+
+        </wsdl:part>
+
+    </wsdl:message>
+
+    <wsdl:message name="writeFileXmlResponse">
+
+        <wsdl:part name="writeFileXmlReturn" type="xsd:string">
+
+        </wsdl:part>
+
+    </wsdl:message>
+
+    <wsdl:message name="thirdXMLRequest">
+
+        <wsdl:part name="strRequest" type="xsd:string">
+
+        </wsdl:part>
+
+    </wsdl:message>
+
+    <wsdl:message name="invokeXMLRequest">
+
+        <wsdl:part name="strRequest" type="xsd:string">
+
+        </wsdl:part>
+
+    </wsdl:message>
+
+    <wsdl:message name="readFileJsonRequest">
+
+        <wsdl:part name="request" type="xsd:string">
+
+        </wsdl:part>
+
+    </wsdl:message>
+
+    <wsdl:message name="readFileJsonResponse">
+
+        <wsdl:part name="readFileJsonReturn" type="xsd:base64Binary">
+
+        </wsdl:part>
+
+    </wsdl:message>
+
+    <wsdl:message name="thirdXMLResponse">
+
+        <wsdl:part name="thirdXMLReturn" type="xsd:string">
+
+        </wsdl:part>
+
+    </wsdl:message>
+
+    <wsdl:message name="readFileXmlResponse">
+
+        <wsdl:part name="readFileXmlReturn" type="xsd:base64Binary">
+
+        </wsdl:part>
+
+    </wsdl:message>
+
+    <wsdl:message name="invokeJsonRequest">
+
+        <wsdl:part name="strRequest" type="xsd:string">
+
+        </wsdl:part>
+
+    </wsdl:message>
+
+    <wsdl:message name="invokeJsonResponse">
+
+        <wsdl:part name="invokeJsonReturn" type="xsd:string">
+
+        </wsdl:part>
+
+    </wsdl:message>
+
+    <wsdl:message name="invokeXMLResponse">
+
+        <wsdl:part name="invokeXMLReturn" type="xsd:string">
+
+        </wsdl:part>
+
+    </wsdl:message>
+
+    <wsdl:message name="thirdJsonRequest">
+
+        <wsdl:part name="strRequest" type="xsd:string">
+
+        </wsdl:part>
+
+    </wsdl:message>
+
+    <wsdl:message name="writeFileXmlRequest">
+
+        <wsdl:part name="request" type="xsd:string">
+
+        </wsdl:part>
+
+        <wsdl:part name="fileData" type="xsd:base64Binary">
+
+        </wsdl:part>
+
+    </wsdl:message>
+
+    <wsdl:message name="WSInvokeException">
+
+        <wsdl:part name="fault" type="tns1:WSInvokeException">
+
+        </wsdl:part>
+
+    </wsdl:message>
+
+    <wsdl:portType name="WSFaceFacadeSrvProxy">
+
+        <wsdl:operation name="invokeJson" parameterOrder="strRequest">
+
+            <wsdl:input message="impl:invokeJsonRequest" name="invokeJsonRequest">
+
+            </wsdl:input>
+
+            <wsdl:output message="impl:invokeJsonResponse" name="invokeJsonResponse">
+
+            </wsdl:output>
+
+            <wsdl:fault message="impl:WSInvokeException" name="WSInvokeException">
+
+            </wsdl:fault>
+
+        </wsdl:operation>
+
+        <wsdl:operation name="invokeXML" parameterOrder="strRequest">
+
+            <wsdl:input message="impl:invokeXMLRequest" name="invokeXMLRequest">
+
+            </wsdl:input>
+
+            <wsdl:output message="impl:invokeXMLResponse" name="invokeXMLResponse">
+
+            </wsdl:output>
+
+            <wsdl:fault message="impl:WSInvokeException" name="WSInvokeException">
+
+            </wsdl:fault>
+
+        </wsdl:operation>
+
+        <wsdl:operation name="thirdJson" parameterOrder="strRequest">
+
+            <wsdl:input message="impl:thirdJsonRequest" name="thirdJsonRequest">
+
+            </wsdl:input>
+
+            <wsdl:output message="impl:thirdJsonResponse" name="thirdJsonResponse">
+
+            </wsdl:output>
+
+            <wsdl:fault message="impl:WSInvokeException" name="WSInvokeException">
+
+            </wsdl:fault>
+
+        </wsdl:operation>
+
+        <wsdl:operation name="thirdXML" parameterOrder="strRequest">
+
+            <wsdl:input message="impl:thirdXMLRequest" name="thirdXMLRequest">
+
+            </wsdl:input>
+
+            <wsdl:output message="impl:thirdXMLResponse" name="thirdXMLResponse">
+
+            </wsdl:output>
+
+            <wsdl:fault message="impl:WSInvokeException" name="WSInvokeException">
+
+            </wsdl:fault>
+
+        </wsdl:operation>
+
+        <wsdl:operation name="writeFileJson" parameterOrder="request fileData">
+
+            <wsdl:input message="impl:writeFileJsonRequest" name="writeFileJsonRequest">
+
+            </wsdl:input>
+
+            <wsdl:output message="impl:writeFileJsonResponse" name="writeFileJsonResponse">
+
+            </wsdl:output>
+
+            <wsdl:fault message="impl:WSInvokeException" name="WSInvokeException">
+
+            </wsdl:fault>
+
+        </wsdl:operation>
+
+        <wsdl:operation name="readFileJson" parameterOrder="request">
+
+            <wsdl:input message="impl:readFileJsonRequest" name="readFileJsonRequest">
+
+            </wsdl:input>
+
+            <wsdl:output message="impl:readFileJsonResponse" name="readFileJsonResponse">
+
+            </wsdl:output>
+
+            <wsdl:fault message="impl:WSInvokeException" name="WSInvokeException">
+
+            </wsdl:fault>
+
+        </wsdl:operation>
+
+        <wsdl:operation name="writeFileXml" parameterOrder="request fileData">
+
+            <wsdl:input message="impl:writeFileXmlRequest" name="writeFileXmlRequest">
+
+            </wsdl:input>
+
+            <wsdl:output message="impl:writeFileXmlResponse" name="writeFileXmlResponse">
+
+            </wsdl:output>
+
+            <wsdl:fault message="impl:WSInvokeException" name="WSInvokeException">
+
+            </wsdl:fault>
+
+        </wsdl:operation>
+
+        <wsdl:operation name="readFileXml" parameterOrder="request">
+
+            <wsdl:input message="impl:readFileXmlRequest" name="readFileXmlRequest">
+
+            </wsdl:input>
+
+            <wsdl:output message="impl:readFileXmlResponse" name="readFileXmlResponse">
+
+            </wsdl:output>
+
+            <wsdl:fault message="impl:WSInvokeException" name="WSInvokeException">
+
+            </wsdl:fault>
+
+        </wsdl:operation>
+
+    </wsdl:portType>
+
+    <wsdl:binding name="WSFaceFacadeSoapBinding" type="impl:WSFaceFacadeSrvProxy">
+
+        <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+        <wsdl:operation name="invokeJson">
+
+            <wsdlsoap:operation soapAction=""/>
+
+            <wsdl:input name="invokeJsonRequest">
+
+                <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.app.face.cd.eas.kingdee.com" use="encoded"/>
+
+            </wsdl:input>
+
+            <wsdl:output name="invokeJsonResponse">
+
+                <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://172.16.62.243:56898/ormrpc/services/WSFaceFacade" use="encoded"/>
+
+            </wsdl:output>
+
+            <wsdl:fault name="WSInvokeException">
+
+                <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="WSInvokeException" namespace="http://172.16.62.243:56898/ormrpc/services/WSFaceFacade" use="encoded"/>
+
+            </wsdl:fault>
+
+        </wsdl:operation>
+
+        <wsdl:operation name="invokeXML">
+
+            <wsdlsoap:operation soapAction=""/>
+
+            <wsdl:input name="invokeXMLRequest">
+
+                <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.app.face.cd.eas.kingdee.com" use="encoded"/>
+
+            </wsdl:input>
+
+            <wsdl:output name="invokeXMLResponse">
+
+                <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://172.16.62.243:56898/ormrpc/services/WSFaceFacade" use="encoded"/>
+
+            </wsdl:output>
+
+            <wsdl:fault name="WSInvokeException">
+
+                <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="WSInvokeException" namespace="http://172.16.62.243:56898/ormrpc/services/WSFaceFacade" use="encoded"/>
+
+            </wsdl:fault>
+
+        </wsdl:operation>
+
+        <wsdl:operation name="thirdJson">
+
+            <wsdlsoap:operation soapAction=""/>
+
+            <wsdl:input name="thirdJsonRequest">
+
+                <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.app.face.cd.eas.kingdee.com" use="encoded"/>
+
+            </wsdl:input>
+
+            <wsdl:output name="thirdJsonResponse">
+
+                <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://172.16.62.243:56898/ormrpc/services/WSFaceFacade" use="encoded"/>
+
+            </wsdl:output>
+
+            <wsdl:fault name="WSInvokeException">
+
+                <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="WSInvokeException" namespace="http://172.16.62.243:56898/ormrpc/services/WSFaceFacade" use="encoded"/>
+
+            </wsdl:fault>
+
+        </wsdl:operation>
+
+        <wsdl:operation name="thirdXML">
+
+            <wsdlsoap:operation soapAction=""/>
+
+            <wsdl:input name="thirdXMLRequest">
+
+                <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.app.face.cd.eas.kingdee.com" use="encoded"/>
+
+            </wsdl:input>
+
+            <wsdl:output name="thirdXMLResponse">
+
+                <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://172.16.62.243:56898/ormrpc/services/WSFaceFacade" use="encoded"/>
+
+            </wsdl:output>
+
+            <wsdl:fault name="WSInvokeException">
+
+                <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="WSInvokeException" namespace="http://172.16.62.243:56898/ormrpc/services/WSFaceFacade" use="encoded"/>
+
+            </wsdl:fault>
+
+        </wsdl:operation>
+
+        <wsdl:operation name="writeFileJson">
+
+            <wsdlsoap:operation soapAction=""/>
+
+            <wsdl:input name="writeFileJsonRequest">
+
+                <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.app.face.cd.eas.kingdee.com" use="encoded"/>
+
+            </wsdl:input>
+
+            <wsdl:output name="writeFileJsonResponse">
+
+                <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://172.16.62.243:56898/ormrpc/services/WSFaceFacade" use="encoded"/>
+
+            </wsdl:output>
+
+            <wsdl:fault name="WSInvokeException">
+
+                <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="WSInvokeException" namespace="http://172.16.62.243:56898/ormrpc/services/WSFaceFacade" use="encoded"/>
+
+            </wsdl:fault>
+
+        </wsdl:operation>
+
+        <wsdl:operation name="readFileJson">
+
+            <wsdlsoap:operation soapAction=""/>
+
+            <wsdl:input name="readFileJsonRequest">
+
+                <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.app.face.cd.eas.kingdee.com" use="encoded"/>
+
+            </wsdl:input>
+
+            <wsdl:output name="readFileJsonResponse">
+
+                <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://172.16.62.243:56898/ormrpc/services/WSFaceFacade" use="encoded"/>
+
+            </wsdl:output>
+
+            <wsdl:fault name="WSInvokeException">
+
+                <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="WSInvokeException" namespace="http://172.16.62.243:56898/ormrpc/services/WSFaceFacade" use="encoded"/>
+
+            </wsdl:fault>
+
+        </wsdl:operation>
+
+        <wsdl:operation name="writeFileXml">
+
+            <wsdlsoap:operation soapAction=""/>
+
+            <wsdl:input name="writeFileXmlRequest">
+
+                <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.app.face.cd.eas.kingdee.com" use="encoded"/>
+
+            </wsdl:input>
+
+            <wsdl:output name="writeFileXmlResponse">
+
+                <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://172.16.62.243:56898/ormrpc/services/WSFaceFacade" use="encoded"/>
+
+            </wsdl:output>
+
+            <wsdl:fault name="WSInvokeException">
+
+                <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="WSInvokeException" namespace="http://172.16.62.243:56898/ormrpc/services/WSFaceFacade" use="encoded"/>
+
+            </wsdl:fault>
+
+        </wsdl:operation>
+
+        <wsdl:operation name="readFileXml">
+
+            <wsdlsoap:operation soapAction=""/>
+
+            <wsdl:input name="readFileXmlRequest">
+
+                <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.app.face.cd.eas.kingdee.com" use="encoded"/>
+
+            </wsdl:input>
+
+            <wsdl:output name="readFileXmlResponse">
+
+                <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://172.16.62.243:56898/ormrpc/services/WSFaceFacade" use="encoded"/>
+
+            </wsdl:output>
+
+            <wsdl:fault name="WSInvokeException">
+
+                <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="WSInvokeException" namespace="http://172.16.62.243:56898/ormrpc/services/WSFaceFacade" use="encoded"/>
+
+            </wsdl:fault>
+
+        </wsdl:operation>
+
+    </wsdl:binding>
+
+    <wsdl:service name="WSFaceFacadeSrvProxyService">
+
+        <wsdl:port binding="impl:WSFaceFacadeSoapBinding" name="WSFaceFacade">
+
+            <wsdlsoap:address location="http://172.16.62.243:56898/ormrpc/services/WSFaceFacade"/>
+
+        </wsdl:port>
+
+    </wsdl:service>
+
+</wsdl:definitions>

+ 10 - 12
src/main/java/com/steerinfo/dil/wsdl/WSFaceFacadeSoapBindingStub.java

@@ -1,14 +1,12 @@
 /**
  * WSFaceFacadeSoapBindingStub.java
  *
- * This file was auto-generated from com.steerinfo.dil.wsdl
- * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) com.steerinfo.dil.wsdl2Java emitter.
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
  */
 
 package com.steerinfo.dil.wsdl;
 
-
-
 public class WSFaceFacadeSoapBindingStub extends org.apache.axis.client.Stub implements com.steerinfo.dil.wsdl.WSFaceFacadeSrvProxy {
     private java.util.Vector cachedSerClasses = new java.util.Vector();
     private java.util.Vector cachedSerQNames = new java.util.Vector();
@@ -36,7 +34,7 @@ public class WSFaceFacadeSoapBindingStub extends org.apache.axis.client.Stub imp
         oper.setUse(org.apache.axis.constants.Use.ENCODED);
         oper.addFault(new org.apache.axis.description.FaultDesc(
                       new javax.xml.namespace.QName("http://172.16.62.243:56898/ormrpc/services/WSFaceFacade", "fault"),
-                      "com.steerinfo.dil.wsdl.WSInvokeException",
+                      "dg.WSInvokeException",
                       new javax.xml.namespace.QName("urn:client.facefacade", "WSInvokeException"), 
                       true
                      ));
@@ -53,7 +51,7 @@ public class WSFaceFacadeSoapBindingStub extends org.apache.axis.client.Stub imp
         oper.setUse(org.apache.axis.constants.Use.ENCODED);
         oper.addFault(new org.apache.axis.description.FaultDesc(
                       new javax.xml.namespace.QName("http://172.16.62.243:56898/ormrpc/services/WSFaceFacade", "fault"),
-                      "com.steerinfo.dil.wsdl.WSInvokeException",
+                      "dg.WSInvokeException",
                       new javax.xml.namespace.QName("urn:client.facefacade", "WSInvokeException"), 
                       true
                      ));
@@ -70,7 +68,7 @@ public class WSFaceFacadeSoapBindingStub extends org.apache.axis.client.Stub imp
         oper.setUse(org.apache.axis.constants.Use.ENCODED);
         oper.addFault(new org.apache.axis.description.FaultDesc(
                       new javax.xml.namespace.QName("http://172.16.62.243:56898/ormrpc/services/WSFaceFacade", "fault"),
-                      "com.steerinfo.dil.wsdl.WSInvokeException",
+                      "dg.WSInvokeException",
                       new javax.xml.namespace.QName("urn:client.facefacade", "WSInvokeException"), 
                       true
                      ));
@@ -87,7 +85,7 @@ public class WSFaceFacadeSoapBindingStub extends org.apache.axis.client.Stub imp
         oper.setUse(org.apache.axis.constants.Use.ENCODED);
         oper.addFault(new org.apache.axis.description.FaultDesc(
                       new javax.xml.namespace.QName("http://172.16.62.243:56898/ormrpc/services/WSFaceFacade", "fault"),
-                      "com.steerinfo.dil.wsdl.WSInvokeException",
+                      "dg.WSInvokeException",
                       new javax.xml.namespace.QName("urn:client.facefacade", "WSInvokeException"), 
                       true
                      ));
@@ -106,7 +104,7 @@ public class WSFaceFacadeSoapBindingStub extends org.apache.axis.client.Stub imp
         oper.setUse(org.apache.axis.constants.Use.ENCODED);
         oper.addFault(new org.apache.axis.description.FaultDesc(
                       new javax.xml.namespace.QName("http://172.16.62.243:56898/ormrpc/services/WSFaceFacade", "fault"),
-                      "com.steerinfo.dil.wsdl.WSInvokeException",
+                      "dg.WSInvokeException",
                       new javax.xml.namespace.QName("urn:client.facefacade", "WSInvokeException"), 
                       true
                      ));
@@ -123,7 +121,7 @@ public class WSFaceFacadeSoapBindingStub extends org.apache.axis.client.Stub imp
         oper.setUse(org.apache.axis.constants.Use.ENCODED);
         oper.addFault(new org.apache.axis.description.FaultDesc(
                       new javax.xml.namespace.QName("http://172.16.62.243:56898/ormrpc/services/WSFaceFacade", "fault"),
-                      "com.steerinfo.dil.wsdl.WSInvokeException",
+                      "dg.WSInvokeException",
                       new javax.xml.namespace.QName("urn:client.facefacade", "WSInvokeException"), 
                       true
                      ));
@@ -142,7 +140,7 @@ public class WSFaceFacadeSoapBindingStub extends org.apache.axis.client.Stub imp
         oper.setUse(org.apache.axis.constants.Use.ENCODED);
         oper.addFault(new org.apache.axis.description.FaultDesc(
                       new javax.xml.namespace.QName("http://172.16.62.243:56898/ormrpc/services/WSFaceFacade", "fault"),
-                      "com.steerinfo.dil.wsdl.WSInvokeException",
+                      "dg.WSInvokeException",
                       new javax.xml.namespace.QName("urn:client.facefacade", "WSInvokeException"), 
                       true
                      ));
@@ -159,7 +157,7 @@ public class WSFaceFacadeSoapBindingStub extends org.apache.axis.client.Stub imp
         oper.setUse(org.apache.axis.constants.Use.ENCODED);
         oper.addFault(new org.apache.axis.description.FaultDesc(
                       new javax.xml.namespace.QName("http://172.16.62.243:56898/ormrpc/services/WSFaceFacade", "fault"),
-                      "com.steerinfo.dil.wsdl.WSInvokeException",
+                      "dg.WSInvokeException",
                       new javax.xml.namespace.QName("urn:client.facefacade", "WSInvokeException"), 
                       true
                      ));

+ 0 - 3
src/main/java/com/steerinfo/dil/wsdl/WSFaceFacadeSrvProxy.java

@@ -7,9 +7,6 @@
 
 package com.steerinfo.dil.wsdl;
 
-import javax.jws.WebService;
-
-@WebService
 public interface WSFaceFacadeSrvProxy extends java.rmi.Remote {
     public String invokeJson(String strRequest) throws java.rmi.RemoteException, com.steerinfo.dil.wsdl.WSInvokeException;
     public String invokeXML(String strRequest) throws java.rmi.RemoteException, com.steerinfo.dil.wsdl.WSInvokeException;

+ 1 - 1
src/main/java/com/steerinfo/dil/wsdl/WSInvokeException.java

@@ -43,7 +43,7 @@ public class WSInvokeException  extends org.apache.axis.AxisFault  implements ja
         new org.apache.axis.description.TypeDesc(WSInvokeException.class, true);
 
     static {
-        typeDesc.setXmlType(new javax.xml.namespace.QName("urn:client.facefacade", "WSInvokeException"));
+        typeDesc.setXmlType(new javax.xml.namespace.QName("urn:client.updaxingmeteringsystemfacade", "WSInvokeException"));
     }
 
     /**

+ 98 - 0
src/main/java/com/steerinfo/dil/wsdl/WSUpDaxingMeteringSystemFacade.wsdl

@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions targetNamespace="http://172.16.62.243:56898/ormrpc/services/WSUpDaxingMeteringSystemFacade" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://172.16.62.243:56898/ormrpc/services/WSUpDaxingMeteringSystemFacade" xmlns:intf="http://172.16.62.243:56898/ormrpc/services/WSUpDaxingMeteringSystemFacade" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="urn:client.updaxingmeteringsystemfacade" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    <!--WSDL created by Apache Axis version: 1.4
+    Built on Apr 22, 2006 (06:55:48 PDT)-->
+    <wsdl:types>
+        <schema targetNamespace="urn:client.updaxingmeteringsystemfacade" xmlns="http://www.w3.org/2001/XMLSchema">
+            <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
+            <complexType name="WSInvokeException">
+                <sequence/>
+            </complexType>
+        </schema>
+    </wsdl:types>
+
+    <wsdl:message name="WSInvokeException">
+
+        <wsdl:part name="fault" type="tns1:WSInvokeException">
+
+        </wsdl:part>
+
+    </wsdl:message>
+
+    <wsdl:message name="saveWeighBillResponse">
+
+        <wsdl:part name="saveWeighBillReturn" type="xsd:string">
+
+        </wsdl:part>
+
+    </wsdl:message>
+
+    <wsdl:message name="saveWeighBillRequest">
+
+        <wsdl:part name="requests" type="xsd:string">
+
+        </wsdl:part>
+
+    </wsdl:message>
+
+    <wsdl:portType name="WSUpDaxingMeteringSystemFacadeSrvProxy">
+
+        <wsdl:operation name="saveWeighBill" parameterOrder="requests">
+
+            <wsdl:input message="impl:saveWeighBillRequest" name="saveWeighBillRequest">
+
+            </wsdl:input>
+
+            <wsdl:output message="impl:saveWeighBillResponse" name="saveWeighBillResponse">
+
+            </wsdl:output>
+
+            <wsdl:fault message="impl:WSInvokeException" name="WSInvokeException">
+
+            </wsdl:fault>
+
+        </wsdl:operation>
+
+    </wsdl:portType>
+
+    <wsdl:binding name="WSUpDaxingMeteringSystemFacadeSoapBinding" type="impl:WSUpDaxingMeteringSystemFacadeSrvProxy">
+
+        <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+        <wsdl:operation name="saveWeighBill">
+
+            <wsdlsoap:operation soapAction=""/>
+
+            <wsdl:input name="saveWeighBillRequest">
+
+                <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.weight.daxing.custom.eas.kingdee.com" use="encoded"/>
+
+            </wsdl:input>
+
+            <wsdl:output name="saveWeighBillResponse">
+
+                <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://172.16.62.243:56898/ormrpc/services/WSUpDaxingMeteringSystemFacade" use="encoded"/>
+
+            </wsdl:output>
+
+            <wsdl:fault name="WSInvokeException">
+
+                <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="WSInvokeException" namespace="http://172.16.62.243:56898/ormrpc/services/WSUpDaxingMeteringSystemFacade" use="encoded"/>
+
+            </wsdl:fault>
+
+        </wsdl:operation>
+
+    </wsdl:binding>
+
+    <wsdl:service name="WSUpDaxingMeteringSystemFacadeSrvProxyService">
+
+        <wsdl:port binding="impl:WSUpDaxingMeteringSystemFacadeSoapBinding" name="WSUpDaxingMeteringSystemFacade">
+
+            <wsdlsoap:address location="http://172.16.62.243:56898/ormrpc/services/WSUpDaxingMeteringSystemFacade"/>
+
+        </wsdl:port>
+
+    </wsdl:service>
+
+</wsdl:definitions>

+ 187 - 0
src/main/java/com/steerinfo/dil/wsdl/WSUpDaxingMeteringSystemFacadeSoapBindingStub.java

@@ -0,0 +1,187 @@
+/**
+ * WSUpDaxingMeteringSystemFacadeSoapBindingStub.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
+ */
+
+package com.steerinfo.dil.wsdl;
+
+public class WSUpDaxingMeteringSystemFacadeSoapBindingStub extends org.apache.axis.client.Stub implements com.steerinfo.dil.wsdl.WSUpDaxingMeteringSystemFacadeSrvProxy {
+    private java.util.Vector cachedSerClasses = new java.util.Vector();
+    private java.util.Vector cachedSerQNames = new java.util.Vector();
+    private java.util.Vector cachedSerFactories = new java.util.Vector();
+    private java.util.Vector cachedDeserFactories = new java.util.Vector();
+
+    static org.apache.axis.description.OperationDesc [] _operations;
+
+    static {
+        _operations = new org.apache.axis.description.OperationDesc[1];
+        _initOperationDesc1();
+    }
+
+    private static void _initOperationDesc1(){
+        org.apache.axis.description.OperationDesc oper;
+        org.apache.axis.description.ParameterDesc param;
+        oper = new org.apache.axis.description.OperationDesc();
+        oper.setName("saveWeighBill");
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "requests"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+        oper.addParameter(param);
+        oper.setReturnType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        oper.setReturnClass(String.class);
+        oper.setReturnQName(new javax.xml.namespace.QName("", "saveWeighBillReturn"));
+        oper.setStyle(org.apache.axis.constants.Style.RPC);
+        oper.setUse(org.apache.axis.constants.Use.ENCODED);
+        oper.addFault(new org.apache.axis.description.FaultDesc(
+                      new javax.xml.namespace.QName("http://172.16.62.243:56898/ormrpc/services/WSUpDaxingMeteringSystemFacade", "fault"),
+                      "dg.WSInvokeException",
+                      new javax.xml.namespace.QName("urn:client.updaxingmeteringsystemfacade", "WSInvokeException"), 
+                      true
+                     ));
+        _operations[0] = oper;
+
+    }
+
+    public WSUpDaxingMeteringSystemFacadeSoapBindingStub() throws org.apache.axis.AxisFault {
+         this(null);
+    }
+
+    public WSUpDaxingMeteringSystemFacadeSoapBindingStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
+         this(service);
+         super.cachedEndpoint = endpointURL;
+    }
+
+    public WSUpDaxingMeteringSystemFacadeSoapBindingStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
+        if (service == null) {
+            super.service = new org.apache.axis.client.Service();
+        } else {
+            super.service = service;
+        }
+        ((org.apache.axis.client.Service)super.service).setTypeMappingVersion("1.1");
+            Class cls;
+            javax.xml.namespace.QName qName;
+            javax.xml.namespace.QName qName2;
+            Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class;
+            Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class;
+            Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class;
+            Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class;
+            Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class;
+            Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class;
+            Class simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class;
+            Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;
+            Class simplelistsf = org.apache.axis.encoding.ser.SimpleListSerializerFactory.class;
+            Class simplelistdf = org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class;
+            qName = new javax.xml.namespace.QName("urn:client.updaxingmeteringsystemfacade", "WSInvokeException");
+            cachedSerQNames.add(qName);
+            cls = com.steerinfo.dil.wsdl.WSInvokeException.class;
+            cachedSerClasses.add(cls);
+            cachedSerFactories.add(beansf);
+            cachedDeserFactories.add(beandf);
+
+    }
+
+    protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException {
+        try {
+            org.apache.axis.client.Call _call = super._createCall();
+            if (super.maintainSessionSet) {
+                _call.setMaintainSession(super.maintainSession);
+            }
+            if (super.cachedUsername != null) {
+                _call.setUsername(super.cachedUsername);
+            }
+            if (super.cachedPassword != null) {
+                _call.setPassword(super.cachedPassword);
+            }
+            if (super.cachedEndpoint != null) {
+                _call.setTargetEndpointAddress(super.cachedEndpoint);
+            }
+            if (super.cachedTimeout != null) {
+                _call.setTimeout(super.cachedTimeout);
+            }
+            if (super.cachedPortName != null) {
+                _call.setPortName(super.cachedPortName);
+            }
+            java.util.Enumeration keys = super.cachedProperties.keys();
+            while (keys.hasMoreElements()) {
+                String key = (String) keys.nextElement();
+                _call.setProperty(key, super.cachedProperties.get(key));
+            }
+            // All the type mapping information is registered
+            // when the first call is made.
+            // The type mapping information is actually registered in
+            // the TypeMappingRegistry of the service, which
+            // is the reason why registration is only needed for the first call.
+            synchronized (this) {
+                if (firstCall()) {
+                    // must set encoding style before registering serializers
+                    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
+                    _call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC);
+                    for (int i = 0; i < cachedSerFactories.size(); ++i) {
+                        Class cls = (Class) cachedSerClasses.get(i);
+                        javax.xml.namespace.QName qName =
+                                (javax.xml.namespace.QName) cachedSerQNames.get(i);
+                        Object x = cachedSerFactories.get(i);
+                        if (x instanceof Class) {
+                            Class sf = (Class)
+                                 cachedSerFactories.get(i);
+                            Class df = (Class)
+                                 cachedDeserFactories.get(i);
+                            _call.registerTypeMapping(cls, qName, sf, df, false);
+                        }
+                        else if (x instanceof javax.xml.rpc.encoding.SerializerFactory) {
+                            org.apache.axis.encoding.SerializerFactory sf = (org.apache.axis.encoding.SerializerFactory)
+                                 cachedSerFactories.get(i);
+                            org.apache.axis.encoding.DeserializerFactory df = (org.apache.axis.encoding.DeserializerFactory)
+                                 cachedDeserFactories.get(i);
+                            _call.registerTypeMapping(cls, qName, sf, df, false);
+                        }
+                    }
+                }
+            }
+            return _call;
+        }
+        catch (Throwable _t) {
+            throw new org.apache.axis.AxisFault("Failure trying to get the Call object", _t);
+        }
+    }
+
+    public String saveWeighBill(String requests) throws java.rmi.RemoteException, com.steerinfo.dil.wsdl.WSInvokeException {
+        if (super.cachedEndpoint == null) {
+            throw new org.apache.axis.NoEndPointException();
+        }
+        org.apache.axis.client.Call _call = createCall();
+        _call.setOperation(_operations[0]);
+        _call.setUseSOAPAction(true);
+        _call.setSOAPActionURI("");
+        _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
+        _call.setOperationName(new javax.xml.namespace.QName("http://webservice.weight.daxing.custom.eas.kingdee.com", "saveWeighBill"));
+
+        setRequestHeaders(_call);
+        setAttachments(_call);
+ try {        Object _resp = _call.invoke(new Object[] {requests});
+
+        if (_resp instanceof java.rmi.RemoteException) {
+            throw (java.rmi.RemoteException)_resp;
+        }
+        else {
+            extractAttachments(_call);
+            try {
+                return (String) _resp;
+            } catch (Exception _exception) {
+                return (String) org.apache.axis.utils.JavaUtils.convert(_resp, String.class);
+            }
+        }
+  } catch (org.apache.axis.AxisFault axisFaultException) {
+    if (axisFaultException.detail != null) {
+        if (axisFaultException.detail instanceof java.rmi.RemoteException) {
+              throw (java.rmi.RemoteException) axisFaultException.detail;
+         }
+        if (axisFaultException.detail instanceof com.steerinfo.dil.wsdl.WSInvokeException) {
+              throw (com.steerinfo.dil.wsdl.WSInvokeException) axisFaultException.detail;
+         }
+   }
+  throw axisFaultException;
+}
+    }
+
+}

+ 12 - 0
src/main/java/com/steerinfo/dil/wsdl/WSUpDaxingMeteringSystemFacadeSrvProxy.java

@@ -0,0 +1,12 @@
+/**
+ * WSUpDaxingMeteringSystemFacadeSrvProxy.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
+ */
+
+package com.steerinfo.dil.wsdl;
+
+public interface WSUpDaxingMeteringSystemFacadeSrvProxy extends java.rmi.Remote {
+    public String saveWeighBill(String requests) throws java.rmi.RemoteException, com.steerinfo.dil.wsdl.WSInvokeException;
+}

+ 16 - 0
src/main/java/com/steerinfo/dil/wsdl/WSUpDaxingMeteringSystemFacadeSrvProxyService.java

@@ -0,0 +1,16 @@
+/**
+ * WSUpDaxingMeteringSystemFacadeSrvProxyService.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
+ */
+
+package com.steerinfo.dil.wsdl;
+
+public interface WSUpDaxingMeteringSystemFacadeSrvProxyService extends javax.xml.rpc.Service {
+    public String getWSUpDaxingMeteringSystemFacadeAddress();
+
+    public com.steerinfo.dil.wsdl.WSUpDaxingMeteringSystemFacadeSrvProxy getWSUpDaxingMeteringSystemFacade() throws javax.xml.rpc.ServiceException;
+
+    public com.steerinfo.dil.wsdl.WSUpDaxingMeteringSystemFacadeSrvProxy getWSUpDaxingMeteringSystemFacade(java.net.URL portAddress) throws javax.xml.rpc.ServiceException;
+}

+ 142 - 0
src/main/java/com/steerinfo/dil/wsdl/WSUpDaxingMeteringSystemFacadeSrvProxyServiceLocator.java

@@ -0,0 +1,142 @@
+/**
+ * WSUpDaxingMeteringSystemFacadeSrvProxyServiceLocator.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
+ */
+
+package com.steerinfo.dil.wsdl;
+
+public class WSUpDaxingMeteringSystemFacadeSrvProxyServiceLocator extends org.apache.axis.client.Service implements com.steerinfo.dil.wsdl.WSUpDaxingMeteringSystemFacadeSrvProxyService {
+
+    public WSUpDaxingMeteringSystemFacadeSrvProxyServiceLocator() {
+    }
+
+
+    public WSUpDaxingMeteringSystemFacadeSrvProxyServiceLocator(org.apache.axis.EngineConfiguration config) {
+        super(config);
+    }
+
+    public WSUpDaxingMeteringSystemFacadeSrvProxyServiceLocator(String wsdlLoc, javax.xml.namespace.QName sName) throws javax.xml.rpc.ServiceException {
+        super(wsdlLoc, sName);
+    }
+
+    // Use to get a proxy class for WSUpDaxingMeteringSystemFacade
+    private String WSUpDaxingMeteringSystemFacade_address = "http://172.16.62.243:56898/ormrpc/services/WSUpDaxingMeteringSystemFacade";
+
+    public String getWSUpDaxingMeteringSystemFacadeAddress() {
+        return WSUpDaxingMeteringSystemFacade_address;
+    }
+
+    // The WSDD service name defaults to the port name.
+    private String WSUpDaxingMeteringSystemFacadeWSDDServiceName = "WSUpDaxingMeteringSystemFacade";
+
+    public String getWSUpDaxingMeteringSystemFacadeWSDDServiceName() {
+        return WSUpDaxingMeteringSystemFacadeWSDDServiceName;
+    }
+
+    public void setWSUpDaxingMeteringSystemFacadeWSDDServiceName(String name) {
+        WSUpDaxingMeteringSystemFacadeWSDDServiceName = name;
+    }
+
+    public com.steerinfo.dil.wsdl.WSUpDaxingMeteringSystemFacadeSrvProxy getWSUpDaxingMeteringSystemFacade() throws javax.xml.rpc.ServiceException {
+       java.net.URL endpoint;
+        try {
+            endpoint = new java.net.URL(WSUpDaxingMeteringSystemFacade_address);
+        }
+        catch (java.net.MalformedURLException e) {
+            throw new javax.xml.rpc.ServiceException(e);
+        }
+        return getWSUpDaxingMeteringSystemFacade(endpoint);
+    }
+
+    public com.steerinfo.dil.wsdl.WSUpDaxingMeteringSystemFacadeSrvProxy getWSUpDaxingMeteringSystemFacade(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
+        try {
+            com.steerinfo.dil.wsdl.WSUpDaxingMeteringSystemFacadeSoapBindingStub _stub = new com.steerinfo.dil.wsdl.WSUpDaxingMeteringSystemFacadeSoapBindingStub(portAddress, this);
+            _stub.setPortName(getWSUpDaxingMeteringSystemFacadeWSDDServiceName());
+            return _stub;
+        }
+        catch (org.apache.axis.AxisFault e) {
+            return null;
+        }
+    }
+
+    public void setWSUpDaxingMeteringSystemFacadeEndpointAddress(String address) {
+        WSUpDaxingMeteringSystemFacade_address = address;
+    }
+
+    /**
+     * For the given interface, get the stub implementation.
+     * If this service has no port for the given interface,
+     * then ServiceException is thrown.
+     */
+    public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
+        try {
+            if (com.steerinfo.dil.wsdl.WSUpDaxingMeteringSystemFacadeSrvProxy.class.isAssignableFrom(serviceEndpointInterface)) {
+                com.steerinfo.dil.wsdl.WSUpDaxingMeteringSystemFacadeSoapBindingStub _stub = new com.steerinfo.dil.wsdl.WSUpDaxingMeteringSystemFacadeSoapBindingStub(new java.net.URL(WSUpDaxingMeteringSystemFacade_address), this);
+                _stub.setPortName(getWSUpDaxingMeteringSystemFacadeWSDDServiceName());
+                return _stub;
+            }
+        }
+        catch (Throwable t) {
+            throw new javax.xml.rpc.ServiceException(t);
+        }
+        throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
+    }
+
+    /**
+     * For the given interface, get the stub implementation.
+     * If this service has no port for the given interface,
+     * then ServiceException is thrown.
+     */
+    public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
+        if (portName == null) {
+            return getPort(serviceEndpointInterface);
+        }
+        String inputPortName = portName.getLocalPart();
+        if ("WSUpDaxingMeteringSystemFacade".equals(inputPortName)) {
+            return getWSUpDaxingMeteringSystemFacade();
+        }
+        else  {
+            java.rmi.Remote _stub = getPort(serviceEndpointInterface);
+            ((org.apache.axis.client.Stub) _stub).setPortName(portName);
+            return _stub;
+        }
+    }
+
+    public javax.xml.namespace.QName getServiceName() {
+        return new javax.xml.namespace.QName("http://172.16.62.243:56898/ormrpc/services/WSUpDaxingMeteringSystemFacade", "WSUpDaxingMeteringSystemFacadeSrvProxyService");
+    }
+
+    private java.util.HashSet ports = null;
+
+    public java.util.Iterator getPorts() {
+        if (ports == null) {
+            ports = new java.util.HashSet();
+            ports.add(new javax.xml.namespace.QName("http://172.16.62.243:56898/ormrpc/services/WSUpDaxingMeteringSystemFacade", "WSUpDaxingMeteringSystemFacade"));
+        }
+        return ports.iterator();
+    }
+
+    /**
+    * Set the endpoint address for the specified port name.
+    */
+    public void setEndpointAddress(String portName, String address) throws javax.xml.rpc.ServiceException {
+        
+if ("WSUpDaxingMeteringSystemFacade".equals(portName)) {
+            setWSUpDaxingMeteringSystemFacadeEndpointAddress(address);
+        }
+        else 
+{ // Unknown Port Name
+            throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
+        }
+    }
+
+    /**
+    * Set the endpoint address for the specified port name.
+    */
+    public void setEndpointAddress(javax.xml.namespace.QName portName, String address) throws javax.xml.rpc.ServiceException {
+        setEndpointAddress(portName.getLocalPart(), address);
+    }
+
+}

+ 2 - 3
src/main/resources/application-dev.yml

@@ -1,9 +1,8 @@
 spring:
   datasource:
     url: jdbc:oracle:thin:@172.16.33.163:1521:ilsdbpri
-    password: Dil123789
-    username: dil
+    password: root123
+    username: dagang
     driver-class-name: oracle.jdbc.OracleDriver
   application:
     name: dal-dazhou-join-api
-

+ 2 - 2
src/main/resources/application-prod.yml

@@ -1,8 +1,8 @@
 spring:
   datasource:
     url: jdbc:oracle:thin:@172.16.33.163:1521:ilsdbpri
-    password: dil
-    username: Dil123789
+    password: root123
+    username: dagang
     driver-class-name: oracle.jdbc.OracleDriver
   application:
     name: dal-dazhou-join-api

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

@@ -51,4 +51,4 @@ mybatis:
     call-setters-on-nulls: true
 
 server:
-  port: 8066
+  port: 8006

+ 584 - 564
src/main/resources/com/steerinfo/dil/mapper/AmsPurchaseOrderMapper.xml

@@ -1,572 +1,592 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.steerinfo.dil.mapper.AmsPurchaseOrderMapper">
-    <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.AmsPurchaseOrder">
-        <id column="PURCHASE_ORDER_ID" jdbcType="DECIMAL" property="purchaseOrderId"/>
-        <result column="PURCHASE_ORDER_NO" jdbcType="VARCHAR" property="purchaseOrderNo"/>
-        <result column="BATCH_ID" jdbcType="DECIMAL" property="batchId"/>
-        <result column="PURCHASE_ORDER_DATE" jdbcType="TIMESTAMP" property="purchaseOrderDate"/>
-        <result column="SUPPLIER_UNIT_ID" jdbcType="DECIMAL" property="supplierUnitId"/>
-        <result column="PURCHASING_ORGANIZATION_ID" jdbcType="DECIMAL" property="purchasingOrganizationId"/>
-        <result column="PURCHASE_ORDER_BUYER" jdbcType="VARCHAR" property="purchaseOrderBuyer"/>
-        <result column="PUCHASE_ORDER_MATERIAL_NUMBER" jdbcType="DECIMAL" property="puchaseOrderMaterialNumber"/>
-        <result column="RECEIVE_UNIT_ID" jdbcType="DECIMAL" property="receiveUnitId"/>
-        <result column="PUCHASE_ORDER_DELIVERY_DATE" jdbcType="TIMESTAMP" property="puchaseOrderDeliveryDate"/>
-        <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername"/>
-        <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime"/>
-        <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername"/>
-        <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime"/>
-        <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark"/>
-        <result column="DELETED" jdbcType="DECIMAL" property="deleted"/>
-        <result column="EAS_PURCHASE_ORDER_ID" jdbcType="VARCHAR" property="easPurchaseOrderId"/>
-    </resultMap>
-    <sql id="columns">
-        PURCHASE_ORDER_ID, PURCHASE_ORDER_NO, BATCH_ID, PURCHASE_ORDER_DATE, SUPPLIER_UNIT_ID,
-    PURCHASING_ORGANIZATION_ID, PURCHASE_ORDER_BUYER, PUCHASE_ORDER_MATERIAL_NUMBER,
-    RECEIVE_UNIT_ID, PUCHASE_ORDER_DELIVERY_DATE, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
-    UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, EAS_PURCHASE_ORDER_ID
-    </sql>
-    <sql id="columns_alias">
-        t.PURCHASE_ORDER_ID, t.PURCHASE_ORDER_NO, t.BATCH_ID, t.PURCHASE_ORDER_DATE, t.SUPPLIER_UNIT_ID,
-    t.PURCHASING_ORGANIZATION_ID, t.PURCHASE_ORDER_BUYER, t.PUCHASE_ORDER_MATERIAL_NUMBER,
-    t.RECEIVE_UNIT_ID, t.PUCHASE_ORDER_DELIVERY_DATE, t.INSERT_USERNAME, t.INSERT_TIME,
-    t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED, t.EAS_PURCHASE_ORDER_ID
-    </sql>
-    <sql id="select">
-        SELECT
-        <include refid="columns"/>
-        FROM AMS_PURCHASE_ORDER
-    </sql>
-    <sql id="select_alias">
-        SELECT
-        <include refid="columns_alias"/>
-        FROM AMS_PURCHASE_ORDER t
-    </sql>
-    <sql id="where">
-        <where>
-            <if test="purchaseOrderId != null">
-                and PURCHASE_ORDER_ID = #{purchaseOrderId}
-            </if>
-            <if test="purchaseOrderNo != null and purchaseOrderNo != ''">
-                and PURCHASE_ORDER_NO = #{purchaseOrderNo}
-            </if>
-            <if test="batchId != null">
-                and BATCH_ID = #{batchId}
-            </if>
-            <if test="purchaseOrderDate != null">
-                and TO_CHAR(PURCHASE_ORDER_DATE,'yyyy-MM-dd') = #{purchaseOrderDate}
-            </if>
-            <if test="supplierUnitId != null">
-                and SUPPLIER_UNIT_ID = #{supplierUnitId}
-            </if>
-            <if test="purchasingOrganizationId != null">
-                and PURCHASING_ORGANIZATION_ID = #{purchasingOrganizationId}
-            </if>
-            <if test="purchaseOrderBuyer != null and purchaseOrderBuyer != ''">
-                and PURCHASE_ORDER_BUYER = #{purchaseOrderBuyer}
-            </if>
-            <if test="puchaseOrderMaterialNumber != null">
-                and PUCHASE_ORDER_MATERIAL_NUMBER = #{puchaseOrderMaterialNumber}
-            </if>
-            <if test="receiveUnitId != null">
-                and RECEIVE_UNIT_ID = #{receiveUnitId}
-            </if>
-            <if test="puchaseOrderDeliveryDate != null">
-                and TO_CHAR(PUCHASE_ORDER_DELIVERY_DATE,'yyyy-MM-dd') = #{puchaseOrderDeliveryDate}
-            </if>
-            <if test="insertUsername != null and insertUsername != ''">
-                and INSERT_USERNAME = #{insertUsername}
-            </if>
-            <if test="insertTime != null">
-                and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
-            </if>
-            <if test="updateUsername != null and updateUsername != ''">
-                and UPDATE_USERNAME = #{updateUsername}
-            </if>
-            <if test="updateTime != null">
-                and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
-            </if>
-            <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
-                and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
-            </if>
-            <if test="deleted != null">
-                and DELETED = #{deleted}
-            </if>
-            <if test="easPurchaseOrderId != null and easPurchaseOrderId != ''">
-                and EAS_PURCHASE_ORDER_ID = #{easPurchaseOrderId}
-            </if>
-        </where>
-    </sql>
-    <sql id="whereLike">
-        <where>
-            <if test="purchaseOrderId != null">
-                and PURCHASE_ORDER_ID = #{purchaseOrderId}
-            </if>
-            <if test="purchaseOrderNo != null and purchaseOrderNo != ''">
-                and PURCHASE_ORDER_NO LIKE '%${purchaseOrderNo}%'
-            </if>
-            <if test="batchId != null">
-                and BATCH_ID = #{batchId}
-            </if>
-            <if test="purchaseOrderDate != null">
-                and TO_CHAR(PURCHASE_ORDER_DATE,'yyyy-MM-dd') = #{purchaseOrderDate}
-            </if>
-            <if test="supplierUnitId != null">
-                and SUPPLIER_UNIT_ID = #{supplierUnitId}
-            </if>
-            <if test="purchasingOrganizationId != null">
-                and PURCHASING_ORGANIZATION_ID = #{purchasingOrganizationId}
-            </if>
-            <if test="purchaseOrderBuyer != null and purchaseOrderBuyer != ''">
-                and PURCHASE_ORDER_BUYER LIKE '%${purchaseOrderBuyer}%'
-            </if>
-            <if test="puchaseOrderMaterialNumber != null">
-                and PUCHASE_ORDER_MATERIAL_NUMBER = #{puchaseOrderMaterialNumber}
-            </if>
-            <if test="receiveUnitId != null">
-                and RECEIVE_UNIT_ID = #{receiveUnitId}
-            </if>
-            <if test="puchaseOrderDeliveryDate != null">
-                and TO_CHAR(PUCHASE_ORDER_DELIVERY_DATE,'yyyy-MM-dd') = #{puchaseOrderDeliveryDate}
-            </if>
-            <if test="insertUsername != null and insertUsername != ''">
-                and INSERT_USERNAME LIKE '%${insertUsername}%'
-            </if>
-            <if test="insertTime != null">
-                and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
-            </if>
-            <if test="updateUsername != null and updateUsername != ''">
-                and UPDATE_USERNAME LIKE '%${updateUsername}%'
-            </if>
-            <if test="updateTime != null">
-                and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
-            </if>
-            <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
-                and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
-            </if>
-            <if test="deleted != null">
-                and DELETED = #{deleted}
-            </if>
-            <if test="easPurchaseOrderId != null and easPurchaseOrderId != ''">
-                and EAS_PURCHASE_ORDER_ID LIKE '%${easPurchaseOrderId}%'
-            </if>
-        </where>
-    </sql>
-    <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
-        delete
-        from AMS_PURCHASE_ORDER
-        where PURCHASE_ORDER_ID = #{purchaseOrderId,jdbcType=DECIMAL}
-    </delete>
-    <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
-        delete from AMS_PURCHASE_ORDER
-        where 1!=1
-        <if test="purchaseOrderNo != null and purchaseOrderNo != ''">
-            or PURCHASE_ORDER_NO = #{purchaseOrderNo}
-        </if>
-        <if test="batchId != null">
-            or BATCH_ID = #{batchId}
-        </if>
-        <if test="purchaseOrderDate != null">
-            or TO_CHAR(PURCHASE_ORDER_DATE,'yyyy-MM-dd') = '#{purchaseOrderDate}'
-        </if>
-        <if test="supplierUnitId != null">
-            or SUPPLIER_UNIT_ID = #{supplierUnitId}
-        </if>
-        <if test="purchasingOrganizationId != null">
-            or PURCHASING_ORGANIZATION_ID = #{purchasingOrganizationId}
-        </if>
-        <if test="purchaseOrderBuyer != null and purchaseOrderBuyer != ''">
-            or PURCHASE_ORDER_BUYER = #{purchaseOrderBuyer}
-        </if>
-        <if test="puchaseOrderMaterialNumber != null">
-            or PUCHASE_ORDER_MATERIAL_NUMBER = #{puchaseOrderMaterialNumber}
-        </if>
-        <if test="receiveUnitId != null">
-            or RECEIVE_UNIT_ID = #{receiveUnitId}
-        </if>
-        <if test="puchaseOrderDeliveryDate != null">
-            or TO_CHAR(PUCHASE_ORDER_DELIVERY_DATE,'yyyy-MM-dd') = '#{puchaseOrderDeliveryDate}'
-        </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="easPurchaseOrderId != null and easPurchaseOrderId != ''">
-            or EAS_PURCHASE_ORDER_ID = #{easPurchaseOrderId}
-        </if>
-    </delete>
-    <insert id="insert" parameterType="com.steerinfo.dil.model.AmsPurchaseOrder">
-        insert into AMS_PURCHASE_ORDER (PURCHASE_ORDER_ID, PURCHASE_ORDER_NO,
-                                        BATCH_ID, PURCHASE_ORDER_DATE, SUPPLIER_UNIT_ID,
-                                        PURCHASING_ORGANIZATION_ID, PURCHASE_ORDER_BUYER,
-                                        PUCHASE_ORDER_MATERIAL_NUMBER, RECEIVE_UNIT_ID,
-                                        PUCHASE_ORDER_DELIVERY_DATE, INSERT_USERNAME,
-                                        INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
-                                        INSERT_UPDATE_REMARK, DELETED, EAS_PURCHASE_ORDER_ID)
-        values (#{purchaseOrderId,jdbcType=DECIMAL}, #{purchaseOrderNo,jdbcType=VARCHAR},
-                #{batchId,jdbcType=DECIMAL}, #{purchaseOrderDate,jdbcType=TIMESTAMP},
-                #{supplierUnitId,jdbcType=DECIMAL},
-                #{purchasingOrganizationId,jdbcType=DECIMAL}, #{purchaseOrderBuyer,jdbcType=VARCHAR},
-                #{puchaseOrderMaterialNumber,jdbcType=DECIMAL}, #{receiveUnitId,jdbcType=DECIMAL},
-                #{puchaseOrderDeliveryDate,jdbcType=TIMESTAMP}, #{insertUsername,jdbcType=VARCHAR},
-                #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
-                #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL},
-                #{easPurchaseOrderId,jdbcType=VARCHAR})
-    </insert>
-    <insert id="insertSelective" parameterType="com.steerinfo.dil.model.AmsPurchaseOrder">
-        insert into AMS_PURCHASE_ORDER
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="purchaseOrderId != null">
-                PURCHASE_ORDER_ID,
-            </if>
-            <if test="purchaseOrderNo != null">
-                PURCHASE_ORDER_NO,
-            </if>
-            <if test="batchId != null">
-                BATCH_ID,
-            </if>
-            <if test="purchaseOrderDate != null">
-                PURCHASE_ORDER_DATE,
-            </if>
-            <if test="supplierUnitId != null">
-                SUPPLIER_UNIT_ID,
-            </if>
-            <if test="purchasingOrganizationId != null">
-                PURCHASING_ORGANIZATION_ID,
-            </if>
-            <if test="purchaseOrderBuyer != null">
-                PURCHASE_ORDER_BUYER,
-            </if>
-            <if test="puchaseOrderMaterialNumber != null">
-                PUCHASE_ORDER_MATERIAL_NUMBER,
-            </if>
-            <if test="receiveUnitId != null">
-                RECEIVE_UNIT_ID,
-            </if>
-            <if test="puchaseOrderDeliveryDate != null">
-                PUCHASE_ORDER_DELIVERY_DATE,
-            </if>
-            <if test="insertUsername != null">
-                INSERT_USERNAME,
-            </if>
-            <if test="insertTime != null">
-                INSERT_TIME,
-            </if>
-            <if test="updateUsername != null">
-                UPDATE_USERNAME,
-            </if>
-            <if test="updateTime != null">
-                UPDATE_TIME,
-            </if>
-            <if test="insertUpdateRemark != null">
-                INSERT_UPDATE_REMARK,
-            </if>
-            <if test="deleted != null">
-                DELETED,
-            </if>
-            <if test="easPurchaseOrderId != null">
-                EAS_PURCHASE_ORDER_ID,
-            </if>
-        </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="purchaseOrderId != null">
-                #{purchaseOrderId,jdbcType=DECIMAL},
-            </if>
-            <if test="purchaseOrderNo != null">
-                #{purchaseOrderNo,jdbcType=VARCHAR},
-            </if>
-            <if test="batchId != null">
-                #{batchId,jdbcType=DECIMAL},
-            </if>
-            <if test="purchaseOrderDate != null">
-                #{purchaseOrderDate,jdbcType=TIMESTAMP},
-            </if>
-            <if test="supplierUnitId != null">
-                #{supplierUnitId,jdbcType=DECIMAL},
-            </if>
-            <if test="purchasingOrganizationId != null">
-                #{purchasingOrganizationId,jdbcType=DECIMAL},
-            </if>
-            <if test="purchaseOrderBuyer != null">
-                #{purchaseOrderBuyer,jdbcType=VARCHAR},
-            </if>
-            <if test="puchaseOrderMaterialNumber != null">
-                #{puchaseOrderMaterialNumber,jdbcType=DECIMAL},
-            </if>
-            <if test="receiveUnitId != null">
-                #{receiveUnitId,jdbcType=DECIMAL},
-            </if>
-            <if test="puchaseOrderDeliveryDate != null">
-                #{puchaseOrderDeliveryDate,jdbcType=TIMESTAMP},
-            </if>
-            <if test="insertUsername != null">
-                #{insertUsername,jdbcType=VARCHAR},
-            </if>
-            <if test="insertTime != null">
-                #{insertTime,jdbcType=TIMESTAMP},
-            </if>
-            <if test="updateUsername != null">
-                #{updateUsername,jdbcType=VARCHAR},
-            </if>
-            <if test="updateTime != null">
-                #{updateTime,jdbcType=TIMESTAMP},
-            </if>
-            <if test="insertUpdateRemark != null">
-                #{insertUpdateRemark,jdbcType=VARCHAR},
-            </if>
-            <if test="deleted != null">
-                #{deleted,jdbcType=DECIMAL},
-            </if>
-            <if test="easPurchaseOrderId != null">
-                #{easPurchaseOrderId,jdbcType=VARCHAR},
-            </if>
-        </trim>
-    </insert>
-    <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.AmsPurchaseOrder">
-        update AMS_PURCHASE_ORDER
-        set PURCHASE_ORDER_NO             = #{purchaseOrderNo,jdbcType=VARCHAR},
-            BATCH_ID                      = #{batchId,jdbcType=DECIMAL},
-            PURCHASE_ORDER_DATE           = #{purchaseOrderDate,jdbcType=TIMESTAMP},
-            SUPPLIER_UNIT_ID              = #{supplierUnitId,jdbcType=DECIMAL},
-            PURCHASING_ORGANIZATION_ID    = #{purchasingOrganizationId,jdbcType=DECIMAL},
-            PURCHASE_ORDER_BUYER          = #{purchaseOrderBuyer,jdbcType=VARCHAR},
-            PUCHASE_ORDER_MATERIAL_NUMBER = #{puchaseOrderMaterialNumber,jdbcType=DECIMAL},
-            RECEIVE_UNIT_ID               = #{receiveUnitId,jdbcType=DECIMAL},
-            PUCHASE_ORDER_DELIVERY_DATE   = #{puchaseOrderDeliveryDate,jdbcType=TIMESTAMP},
-            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_PURCHASE_ORDER_ID         = #{easPurchaseOrderId,jdbcType=VARCHAR}
-        where PURCHASE_ORDER_ID = #{purchaseOrderId,jdbcType=DECIMAL}
-    </update>
-    <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.AmsPurchaseOrder">
-        update AMS_PURCHASE_ORDER
-        <set>
-            <if test="purchaseOrderNo != null">
-                PURCHASE_ORDER_NO = #{purchaseOrderNo,jdbcType=VARCHAR},
-            </if>
-            <if test="batchId != null">
-                BATCH_ID = #{batchId,jdbcType=DECIMAL},
-            </if>
-            <if test="purchaseOrderDate != null">
-                PURCHASE_ORDER_DATE = #{purchaseOrderDate,jdbcType=TIMESTAMP},
-            </if>
-            <if test="supplierUnitId != null">
-                SUPPLIER_UNIT_ID = #{supplierUnitId,jdbcType=DECIMAL},
-            </if>
-            <if test="purchasingOrganizationId != null">
-                PURCHASING_ORGANIZATION_ID = #{purchasingOrganizationId,jdbcType=DECIMAL},
-            </if>
-            <if test="purchaseOrderBuyer != null">
-                PURCHASE_ORDER_BUYER = #{purchaseOrderBuyer,jdbcType=VARCHAR},
-            </if>
-            <if test="puchaseOrderMaterialNumber != null">
-                PUCHASE_ORDER_MATERIAL_NUMBER = #{puchaseOrderMaterialNumber,jdbcType=DECIMAL},
-            </if>
-            <if test="receiveUnitId != null">
-                RECEIVE_UNIT_ID = #{receiveUnitId,jdbcType=DECIMAL},
-            </if>
-            <if test="puchaseOrderDeliveryDate != null">
-                PUCHASE_ORDER_DELIVERY_DATE = #{puchaseOrderDeliveryDate,jdbcType=TIMESTAMP},
-            </if>
-            <if test="insertUsername != null">
-                INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
-            </if>
-            <if test="insertTime != null">
-                INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
-            </if>
-            <if test="updateUsername != null">
-                UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
-            </if>
-            <if test="updateTime != null">
-                UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
-            </if>
-            <if test="insertUpdateRemark != null">
-                INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
-            </if>
-            <if test="deleted != null">
-                DELETED = #{deleted,jdbcType=DECIMAL},
-            </if>
-            <if test="easPurchaseOrderId != null">
-                EAS_PURCHASE_ORDER_ID = #{easPurchaseOrderId,jdbcType=VARCHAR},
-            </if>
-        </set>
-        where PURCHASE_ORDER_ID = #{purchaseOrderId,jdbcType=DECIMAL}
-    </update>
-    <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
-        <include refid="select"/>
-        where PURCHASE_ORDER_ID = #{purchaseOrderId,jdbcType=DECIMAL}
-    </select>
-    <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-        <include refid="select"/>
-        <include refid="where"/>
-    </select>
-    <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-        <include refid="select"/>
-        <include refid="whereLike"/>
-    </select>
-    <insert id="batchInsert" parameterType="java.util.List">
-        insert into AMS_PURCHASE_ORDER
-        (PURCHASE_ORDER_ID,
-        PURCHASE_ORDER_NO, BATCH_ID, PURCHASE_ORDER_DATE,
-        SUPPLIER_UNIT_ID, PURCHASING_ORGANIZATION_ID,
-        PURCHASE_ORDER_BUYER, PUCHASE_ORDER_MATERIAL_NUMBER,
-        RECEIVE_UNIT_ID, PUCHASE_ORDER_DELIVERY_DATE,
-        INSERT_USERNAME, INSERT_TIME,
-        UPDATE_USERNAME, UPDATE_TIME,
-        INSERT_UPDATE_REMARK, DELETED,
-        EAS_PURCHASE_ORDER_ID)
-        ( <foreach collection="list" item="item" separator="union all">
-        select
-        #{item.purchaseOrderId,jdbcType=DECIMAL},
-        #{item.purchaseOrderNo,jdbcType=VARCHAR}, #{item.batchId,jdbcType=DECIMAL},
-        #{item.purchaseOrderDate,jdbcType=TIMESTAMP},
-        #{item.supplierUnitId,jdbcType=DECIMAL}, #{item.purchasingOrganizationId,jdbcType=DECIMAL},
-        #{item.purchaseOrderBuyer,jdbcType=VARCHAR}, #{item.puchaseOrderMaterialNumber,jdbcType=DECIMAL},
-        #{item.receiveUnitId,jdbcType=DECIMAL}, #{item.puchaseOrderDeliveryDate,jdbcType=TIMESTAMP},
-        #{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.easPurchaseOrderId,jdbcType=VARCHAR} from dual
-    </foreach> )
-    </insert>
-    <update id="batchUpdate" parameterType="java.util.List">
-        update AMS_PURCHASE_ORDER
-        set
-        PURCHASE_ORDER_ID=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
-            when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.purchaseOrderId,jdbcType=DECIMAL}
-        </foreach>
-        ,PURCHASE_ORDER_NO=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
-            when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.purchaseOrderNo,jdbcType=VARCHAR}
-        </foreach>
-        ,BATCH_ID=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
-            when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.batchId,jdbcType=DECIMAL}
-        </foreach>
-        ,PURCHASE_ORDER_DATE=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
-            when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.purchaseOrderDate,jdbcType=TIMESTAMP}
-        </foreach>
-        ,SUPPLIER_UNIT_ID=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
-            when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.supplierUnitId,jdbcType=DECIMAL}
-        </foreach>
-        ,PURCHASING_ORGANIZATION_ID=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
-            when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.purchasingOrganizationId,jdbcType=DECIMAL}
-        </foreach>
-        ,PURCHASE_ORDER_BUYER=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
-            when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.purchaseOrderBuyer,jdbcType=VARCHAR}
-        </foreach>
-        ,PUCHASE_ORDER_MATERIAL_NUMBER=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
-            when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.puchaseOrderMaterialNumber,jdbcType=DECIMAL}
-        </foreach>
-        ,RECEIVE_UNIT_ID=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
-            when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.receiveUnitId,jdbcType=DECIMAL}
-        </foreach>
-        ,PUCHASE_ORDER_DELIVERY_DATE=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
-            when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.puchaseOrderDeliveryDate,jdbcType=TIMESTAMP}
-        </foreach>
-        ,INSERT_USERNAME=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
-            when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
-        </foreach>
-        ,INSERT_TIME=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
-            when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
-        </foreach>
-        ,UPDATE_USERNAME=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
-            when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
-        </foreach>
-        ,UPDATE_TIME=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
-            when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
-        </foreach>
-        ,INSERT_UPDATE_REMARK=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
-            when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
-        </foreach>
-        ,DELETED=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
-            when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
-        </foreach>
-        ,EAS_PURCHASE_ORDER_ID=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
-            when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.easPurchaseOrderId,jdbcType=VARCHAR}
-        </foreach>
-        where PURCHASE_ORDER_ID in
-        <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
-            #{item.purchaseOrderId,jdbcType=DECIMAL}
-        </foreach>
-    </update>
-    <delete id="batchDelete" parameterType="java.util.List">
-        delete from AMS_PURCHASE_ORDER
-        where PURCHASE_ORDER_ID in
-        <foreach collection="list" item="id" open="(" close=")" separator=",">
-            #{id}
-        </foreach>
-    </delete>
-    <!-- 友情提示!!!-->
-    <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
-    <!-- 通过物资唯一编码和外轮船名得到批次 -->
-    <select id="getBatchId" parameterType="java.util.Map" resultType="DECIMAL">
-        SELECT db.BATCH_ID
-        FROM DIL_BATCH db
-                 LEFT JOIN RMS_MATERIAL rm
-                           ON db.MATERIAL_ID = rm.MATERIAL_ID
-        WHERE db.RESULT_FOREIGN_SHIP_NAME = #{resultForeignShipName}
-          AND rm.MATERIAL_CODE = #{materialCode}
-    </select>
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.AmsPurchaseOrder">
+    <id column="PURCHASE_ORDER_ID" jdbcType="DECIMAL" property="purchaseOrderId" />
+    <result column="PURCHASE_ORDER_NO" jdbcType="VARCHAR" property="purchaseOrderNo" />
+    <result column="BATCH_ID" jdbcType="DECIMAL" property="batchId" />
+    <result column="PURCHASE_ORDER_DATE" jdbcType="TIMESTAMP" property="purchaseOrderDate" />
+    <result column="SUPPLIER_UNIT_ID" jdbcType="DECIMAL" property="supplierUnitId" />
+    <result column="PURCHASING_ORGANIZATION_ID" jdbcType="DECIMAL" property="purchasingOrganizationId" />
+    <result column="PURCHASE_ORDER_BUYER" jdbcType="VARCHAR" property="purchaseOrderBuyer" />
+    <result column="PUCHASE_ORDER_MATERIAL_NUMBER" jdbcType="DECIMAL" property="puchaseOrderMaterialNumber" />
+    <result column="RECEIVE_UNIT_ID" jdbcType="DECIMAL" property="receiveUnitId" />
+    <result column="PUCHASE_ORDER_DELIVERY_DATE" jdbcType="TIMESTAMP" property="puchaseOrderDeliveryDate" />
+    <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
+    <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
+    <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
+    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
+    <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
+    <result column="EAS_PURCHASE_ORDER_ID" jdbcType="VARCHAR" property="easPurchaseOrderId" />
+    <result column="EAS_ENTRY_ID" jdbcType="VARCHAR" property="easEntryId" />
+  </resultMap>
+  <sql id="columns">
+    PURCHASE_ORDER_ID, PURCHASE_ORDER_NO, BATCH_ID, PURCHASE_ORDER_DATE, SUPPLIER_UNIT_ID, 
+    PURCHASING_ORGANIZATION_ID, PURCHASE_ORDER_BUYER, PUCHASE_ORDER_MATERIAL_NUMBER, 
+    RECEIVE_UNIT_ID, PUCHASE_ORDER_DELIVERY_DATE, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
+    UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, EAS_PURCHASE_ORDER_ID, EAS_ENTRY_ID
+  </sql>
+  <sql id="columns_alias">
+    t.PURCHASE_ORDER_ID, t.PURCHASE_ORDER_NO, t.BATCH_ID, t.PURCHASE_ORDER_DATE, t.SUPPLIER_UNIT_ID, 
+    t.PURCHASING_ORGANIZATION_ID, t.PURCHASE_ORDER_BUYER, t.PUCHASE_ORDER_MATERIAL_NUMBER, 
+    t.RECEIVE_UNIT_ID, t.PUCHASE_ORDER_DELIVERY_DATE, t.INSERT_USERNAME, t.INSERT_TIME, 
+    t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED, t.EAS_PURCHASE_ORDER_ID, 
+    t.EAS_ENTRY_ID
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns" /> FROM AMS_PURCHASE_ORDER
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias" /> FROM AMS_PURCHASE_ORDER t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="purchaseOrderId != null">
+        and PURCHASE_ORDER_ID = #{purchaseOrderId}
+      </if>
+      <if test="purchaseOrderNo != null and purchaseOrderNo != ''">
+        and PURCHASE_ORDER_NO = #{purchaseOrderNo}
+      </if>
+      <if test="batchId != null">
+        and BATCH_ID = #{batchId}
+      </if>
+      <if test="purchaseOrderDate != null">
+        and TO_CHAR(PURCHASE_ORDER_DATE,'yyyy-MM-dd') = #{purchaseOrderDate}
+      </if>
+      <if test="supplierUnitId != null">
+        and SUPPLIER_UNIT_ID = #{supplierUnitId}
+      </if>
+      <if test="purchasingOrganizationId != null">
+        and PURCHASING_ORGANIZATION_ID = #{purchasingOrganizationId}
+      </if>
+      <if test="purchaseOrderBuyer != null and purchaseOrderBuyer != ''">
+        and PURCHASE_ORDER_BUYER = #{purchaseOrderBuyer}
+      </if>
+      <if test="puchaseOrderMaterialNumber != null">
+        and PUCHASE_ORDER_MATERIAL_NUMBER = #{puchaseOrderMaterialNumber}
+      </if>
+      <if test="receiveUnitId != null">
+        and RECEIVE_UNIT_ID = #{receiveUnitId}
+      </if>
+      <if test="puchaseOrderDeliveryDate != null">
+        and TO_CHAR(PUCHASE_ORDER_DELIVERY_DATE,'yyyy-MM-dd') = #{puchaseOrderDeliveryDate}
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        and INSERT_USERNAME = #{insertUsername}
+      </if>
+      <if test="insertTime != null">
+        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        and UPDATE_USERNAME = #{updateUsername}
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+        and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
+      </if>
+      <if test="deleted != null">
+        and DELETED = #{deleted}
+      </if>
+      <if test="easPurchaseOrderId != null and easPurchaseOrderId != ''">
+        and EAS_PURCHASE_ORDER_ID = #{easPurchaseOrderId}
+      </if>
+      <if test="easEntryId != null and easEntryId != ''">
+        and EAS_ENTRY_ID = #{easEntryId}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="purchaseOrderId != null">
+        and PURCHASE_ORDER_ID = #{purchaseOrderId}
+      </if>
+      <if test="purchaseOrderNo != null and purchaseOrderNo != ''">
+        and PURCHASE_ORDER_NO LIKE '%${purchaseOrderNo}%'
+      </if>
+      <if test="batchId != null">
+        and BATCH_ID = #{batchId}
+      </if>
+      <if test="purchaseOrderDate != null">
+        and TO_CHAR(PURCHASE_ORDER_DATE,'yyyy-MM-dd') = #{purchaseOrderDate}
+      </if>
+      <if test="supplierUnitId != null">
+        and SUPPLIER_UNIT_ID = #{supplierUnitId}
+      </if>
+      <if test="purchasingOrganizationId != null">
+        and PURCHASING_ORGANIZATION_ID = #{purchasingOrganizationId}
+      </if>
+      <if test="purchaseOrderBuyer != null and purchaseOrderBuyer != ''">
+        and PURCHASE_ORDER_BUYER LIKE '%${purchaseOrderBuyer}%'
+      </if>
+      <if test="puchaseOrderMaterialNumber != null">
+        and PUCHASE_ORDER_MATERIAL_NUMBER = #{puchaseOrderMaterialNumber}
+      </if>
+      <if test="receiveUnitId != null">
+        and RECEIVE_UNIT_ID = #{receiveUnitId}
+      </if>
+      <if test="puchaseOrderDeliveryDate != null">
+        and TO_CHAR(PUCHASE_ORDER_DELIVERY_DATE,'yyyy-MM-dd') = #{puchaseOrderDeliveryDate}
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        and INSERT_USERNAME LIKE '%${insertUsername}%'
+      </if>
+      <if test="insertTime != null">
+        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        and UPDATE_USERNAME LIKE '%${updateUsername}%'
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+        and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
+      </if>
+      <if test="deleted != null">
+        and DELETED = #{deleted}
+      </if>
+      <if test="easPurchaseOrderId != null and easPurchaseOrderId != ''">
+        and EAS_PURCHASE_ORDER_ID LIKE '%${easPurchaseOrderId}%'
+      </if>
+      <if test="easEntryId != null and easEntryId != ''">
+        and EAS_ENTRY_ID LIKE '%${easEntryId}%'
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
+    delete from AMS_PURCHASE_ORDER
+    where PURCHASE_ORDER_ID = #{purchaseOrderId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from AMS_PURCHASE_ORDER
+    where 1!=1 
+      <if test="purchaseOrderNo != null and purchaseOrderNo != ''">
+        or PURCHASE_ORDER_NO = #{purchaseOrderNo}
+      </if>
+      <if test="batchId != null">
+        or BATCH_ID = #{batchId}
+      </if>
+      <if test="purchaseOrderDate != null">
+        or TO_CHAR(PURCHASE_ORDER_DATE,'yyyy-MM-dd') = '#{purchaseOrderDate}'
+      </if>
+      <if test="supplierUnitId != null">
+        or SUPPLIER_UNIT_ID = #{supplierUnitId}
+      </if>
+      <if test="purchasingOrganizationId != null">
+        or PURCHASING_ORGANIZATION_ID = #{purchasingOrganizationId}
+      </if>
+      <if test="purchaseOrderBuyer != null and purchaseOrderBuyer != ''">
+        or PURCHASE_ORDER_BUYER = #{purchaseOrderBuyer}
+      </if>
+      <if test="puchaseOrderMaterialNumber != null">
+        or PUCHASE_ORDER_MATERIAL_NUMBER = #{puchaseOrderMaterialNumber}
+      </if>
+      <if test="receiveUnitId != null">
+        or RECEIVE_UNIT_ID = #{receiveUnitId}
+      </if>
+      <if test="puchaseOrderDeliveryDate != null">
+        or TO_CHAR(PUCHASE_ORDER_DELIVERY_DATE,'yyyy-MM-dd') = '#{puchaseOrderDeliveryDate}'
+      </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="easPurchaseOrderId != null and easPurchaseOrderId != ''">
+        or EAS_PURCHASE_ORDER_ID = #{easPurchaseOrderId}
+      </if>
+      <if test="easEntryId != null and easEntryId != ''">
+        or EAS_ENTRY_ID = #{easEntryId}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.dil.model.AmsPurchaseOrder">
+    insert into AMS_PURCHASE_ORDER (PURCHASE_ORDER_ID, PURCHASE_ORDER_NO, 
+      BATCH_ID, PURCHASE_ORDER_DATE, SUPPLIER_UNIT_ID, 
+      PURCHASING_ORGANIZATION_ID, PURCHASE_ORDER_BUYER, 
+      PUCHASE_ORDER_MATERIAL_NUMBER, RECEIVE_UNIT_ID, 
+      PUCHASE_ORDER_DELIVERY_DATE, INSERT_USERNAME, 
+      INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, 
+      INSERT_UPDATE_REMARK, DELETED, EAS_PURCHASE_ORDER_ID, 
+      EAS_ENTRY_ID)
+    values (#{purchaseOrderId,jdbcType=DECIMAL}, #{purchaseOrderNo,jdbcType=VARCHAR}, 
+      #{batchId,jdbcType=DECIMAL}, #{purchaseOrderDate,jdbcType=TIMESTAMP}, #{supplierUnitId,jdbcType=DECIMAL}, 
+      #{purchasingOrganizationId,jdbcType=DECIMAL}, #{purchaseOrderBuyer,jdbcType=VARCHAR}, 
+      #{puchaseOrderMaterialNumber,jdbcType=DECIMAL}, #{receiveUnitId,jdbcType=DECIMAL}, 
+      #{puchaseOrderDeliveryDate,jdbcType=TIMESTAMP}, #{insertUsername,jdbcType=VARCHAR}, 
+      #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, 
+      #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}, #{easPurchaseOrderId,jdbcType=VARCHAR}, 
+      #{easEntryId,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.AmsPurchaseOrder">
+    insert into AMS_PURCHASE_ORDER
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="purchaseOrderId != null">
+        PURCHASE_ORDER_ID,
+      </if>
+      <if test="purchaseOrderNo != null">
+        PURCHASE_ORDER_NO,
+      </if>
+      <if test="batchId != null">
+        BATCH_ID,
+      </if>
+      <if test="purchaseOrderDate != null">
+        PURCHASE_ORDER_DATE,
+      </if>
+      <if test="supplierUnitId != null">
+        SUPPLIER_UNIT_ID,
+      </if>
+      <if test="purchasingOrganizationId != null">
+        PURCHASING_ORGANIZATION_ID,
+      </if>
+      <if test="purchaseOrderBuyer != null">
+        PURCHASE_ORDER_BUYER,
+      </if>
+      <if test="puchaseOrderMaterialNumber != null">
+        PUCHASE_ORDER_MATERIAL_NUMBER,
+      </if>
+      <if test="receiveUnitId != null">
+        RECEIVE_UNIT_ID,
+      </if>
+      <if test="puchaseOrderDeliveryDate != null">
+        PUCHASE_ORDER_DELIVERY_DATE,
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME,
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME,
+      </if>
+      <if test="updateUsername != null">
+        UPDATE_USERNAME,
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME,
+      </if>
+      <if test="insertUpdateRemark != null">
+        INSERT_UPDATE_REMARK,
+      </if>
+      <if test="deleted != null">
+        DELETED,
+      </if>
+      <if test="easPurchaseOrderId != null">
+        EAS_PURCHASE_ORDER_ID,
+      </if>
+      <if test="easEntryId != null">
+        EAS_ENTRY_ID,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="purchaseOrderId != null">
+        #{purchaseOrderId,jdbcType=DECIMAL},
+      </if>
+      <if test="purchaseOrderNo != null">
+        #{purchaseOrderNo,jdbcType=VARCHAR},
+      </if>
+      <if test="batchId != null">
+        #{batchId,jdbcType=DECIMAL},
+      </if>
+      <if test="purchaseOrderDate != null">
+        #{purchaseOrderDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="supplierUnitId != null">
+        #{supplierUnitId,jdbcType=DECIMAL},
+      </if>
+      <if test="purchasingOrganizationId != null">
+        #{purchasingOrganizationId,jdbcType=DECIMAL},
+      </if>
+      <if test="purchaseOrderBuyer != null">
+        #{purchaseOrderBuyer,jdbcType=VARCHAR},
+      </if>
+      <if test="puchaseOrderMaterialNumber != null">
+        #{puchaseOrderMaterialNumber,jdbcType=DECIMAL},
+      </if>
+      <if test="receiveUnitId != null">
+        #{receiveUnitId,jdbcType=DECIMAL},
+      </if>
+      <if test="puchaseOrderDeliveryDate != null">
+        #{puchaseOrderDeliveryDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUsername != null">
+        #{insertUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="insertTime != null">
+        #{insertTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateUsername != null">
+        #{updateUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUpdateRemark != null">
+        #{insertUpdateRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="deleted != null">
+        #{deleted,jdbcType=DECIMAL},
+      </if>
+      <if test="easPurchaseOrderId != null">
+        #{easPurchaseOrderId,jdbcType=VARCHAR},
+      </if>
+      <if test="easEntryId != null">
+        #{easEntryId,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.AmsPurchaseOrder">
+    update AMS_PURCHASE_ORDER
+    set PURCHASE_ORDER_NO = #{purchaseOrderNo,jdbcType=VARCHAR},
+      BATCH_ID = #{batchId,jdbcType=DECIMAL},
+      PURCHASE_ORDER_DATE = #{purchaseOrderDate,jdbcType=TIMESTAMP},
+      SUPPLIER_UNIT_ID = #{supplierUnitId,jdbcType=DECIMAL},
+      PURCHASING_ORGANIZATION_ID = #{purchasingOrganizationId,jdbcType=DECIMAL},
+      PURCHASE_ORDER_BUYER = #{purchaseOrderBuyer,jdbcType=VARCHAR},
+      PUCHASE_ORDER_MATERIAL_NUMBER = #{puchaseOrderMaterialNumber,jdbcType=DECIMAL},
+      RECEIVE_UNIT_ID = #{receiveUnitId,jdbcType=DECIMAL},
+      PUCHASE_ORDER_DELIVERY_DATE = #{puchaseOrderDeliveryDate,jdbcType=TIMESTAMP},
+      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_PURCHASE_ORDER_ID = #{easPurchaseOrderId,jdbcType=VARCHAR},
+      EAS_ENTRY_ID = #{easEntryId,jdbcType=VARCHAR}
+    where PURCHASE_ORDER_ID = #{purchaseOrderId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.AmsPurchaseOrder">
+    update AMS_PURCHASE_ORDER
+    <set>
+      <if test="purchaseOrderNo != null">
+        PURCHASE_ORDER_NO = #{purchaseOrderNo,jdbcType=VARCHAR},
+      </if>
+      <if test="batchId != null">
+        BATCH_ID = #{batchId,jdbcType=DECIMAL},
+      </if>
+      <if test="purchaseOrderDate != null">
+        PURCHASE_ORDER_DATE = #{purchaseOrderDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="supplierUnitId != null">
+        SUPPLIER_UNIT_ID = #{supplierUnitId,jdbcType=DECIMAL},
+      </if>
+      <if test="purchasingOrganizationId != null">
+        PURCHASING_ORGANIZATION_ID = #{purchasingOrganizationId,jdbcType=DECIMAL},
+      </if>
+      <if test="purchaseOrderBuyer != null">
+        PURCHASE_ORDER_BUYER = #{purchaseOrderBuyer,jdbcType=VARCHAR},
+      </if>
+      <if test="puchaseOrderMaterialNumber != null">
+        PUCHASE_ORDER_MATERIAL_NUMBER = #{puchaseOrderMaterialNumber,jdbcType=DECIMAL},
+      </if>
+      <if test="receiveUnitId != null">
+        RECEIVE_UNIT_ID = #{receiveUnitId,jdbcType=DECIMAL},
+      </if>
+      <if test="puchaseOrderDeliveryDate != null">
+        PUCHASE_ORDER_DELIVERY_DATE = #{puchaseOrderDeliveryDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateUsername != null">
+        UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUpdateRemark != null">
+        INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="deleted != null">
+        DELETED = #{deleted,jdbcType=DECIMAL},
+      </if>
+      <if test="easPurchaseOrderId != null">
+        EAS_PURCHASE_ORDER_ID = #{easPurchaseOrderId,jdbcType=VARCHAR},
+      </if>
+      <if test="easEntryId != null">
+        EAS_ENTRY_ID = #{easEntryId,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where PURCHASE_ORDER_ID = #{purchaseOrderId,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
+    <include refid="select" />
+    where PURCHASE_ORDER_ID = #{purchaseOrderId,jdbcType=DECIMAL}
+  </select>
+  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select" />
+    <include refid="where" />
+  </select>
+  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select" />
+    <include refid="whereLike" />
+  </select>
+  <insert id="batchInsert" parameterType="java.util.List">
+    insert into AMS_PURCHASE_ORDER 
+      (PURCHASE_ORDER_ID, 
+      PURCHASE_ORDER_NO, BATCH_ID, PURCHASE_ORDER_DATE, 
+      SUPPLIER_UNIT_ID, PURCHASING_ORGANIZATION_ID, 
+      PURCHASE_ORDER_BUYER, PUCHASE_ORDER_MATERIAL_NUMBER, 
+      RECEIVE_UNIT_ID, PUCHASE_ORDER_DELIVERY_DATE, 
+      INSERT_USERNAME, INSERT_TIME, 
+      UPDATE_USERNAME, UPDATE_TIME, 
+      INSERT_UPDATE_REMARK, DELETED, 
+      EAS_PURCHASE_ORDER_ID, EAS_ENTRY_ID
+      )
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.purchaseOrderId,jdbcType=DECIMAL}, 
+      #{item.purchaseOrderNo,jdbcType=VARCHAR}, #{item.batchId,jdbcType=DECIMAL}, #{item.purchaseOrderDate,jdbcType=TIMESTAMP}, 
+      #{item.supplierUnitId,jdbcType=DECIMAL}, #{item.purchasingOrganizationId,jdbcType=DECIMAL}, 
+      #{item.purchaseOrderBuyer,jdbcType=VARCHAR}, #{item.puchaseOrderMaterialNumber,jdbcType=DECIMAL}, 
+      #{item.receiveUnitId,jdbcType=DECIMAL}, #{item.puchaseOrderDeliveryDate,jdbcType=TIMESTAMP}, 
+      #{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.easPurchaseOrderId,jdbcType=VARCHAR}, #{item.easEntryId,jdbcType=VARCHAR}
+       from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update AMS_PURCHASE_ORDER
+     set
+       PURCHASE_ORDER_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case PURCHASE_ORDER_ID" separator=" ">
+          when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.purchaseOrderId,jdbcType=DECIMAL}
+       </foreach>
+       ,PURCHASE_ORDER_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case PURCHASE_ORDER_ID" separator=" ">
+          when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.purchaseOrderNo,jdbcType=VARCHAR}
+       </foreach>
+       ,BATCH_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case PURCHASE_ORDER_ID" separator=" ">
+          when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.batchId,jdbcType=DECIMAL}
+       </foreach>
+       ,PURCHASE_ORDER_DATE=
+       <foreach close="end" collection="list" index="index" item="item" open="case PURCHASE_ORDER_ID" separator=" ">
+          when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.purchaseOrderDate,jdbcType=TIMESTAMP}
+       </foreach>
+       ,SUPPLIER_UNIT_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case PURCHASE_ORDER_ID" separator=" ">
+          when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.supplierUnitId,jdbcType=DECIMAL}
+       </foreach>
+       ,PURCHASING_ORGANIZATION_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case PURCHASE_ORDER_ID" separator=" ">
+          when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.purchasingOrganizationId,jdbcType=DECIMAL}
+       </foreach>
+       ,PURCHASE_ORDER_BUYER=
+       <foreach close="end" collection="list" index="index" item="item" open="case PURCHASE_ORDER_ID" separator=" ">
+          when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.purchaseOrderBuyer,jdbcType=VARCHAR}
+       </foreach>
+       ,PUCHASE_ORDER_MATERIAL_NUMBER=
+       <foreach close="end" collection="list" index="index" item="item" open="case PURCHASE_ORDER_ID" separator=" ">
+          when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.puchaseOrderMaterialNumber,jdbcType=DECIMAL}
+       </foreach>
+       ,RECEIVE_UNIT_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case PURCHASE_ORDER_ID" separator=" ">
+          when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.receiveUnitId,jdbcType=DECIMAL}
+       </foreach>
+       ,PUCHASE_ORDER_DELIVERY_DATE=
+       <foreach close="end" collection="list" index="index" item="item" open="case PURCHASE_ORDER_ID" separator=" ">
+          when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.puchaseOrderDeliveryDate,jdbcType=TIMESTAMP}
+       </foreach>
+       ,INSERT_USERNAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case PURCHASE_ORDER_ID" separator=" ">
+          when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,INSERT_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case PURCHASE_ORDER_ID" separator=" ">
+          when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,UPDATE_USERNAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case PURCHASE_ORDER_ID" separator=" ">
+          when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case PURCHASE_ORDER_ID" separator=" ">
+          when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,INSERT_UPDATE_REMARK=
+       <foreach close="end" collection="list" index="index" item="item" open="case PURCHASE_ORDER_ID" separator=" ">
+          when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+       </foreach>
+       ,DELETED=
+       <foreach close="end" collection="list" index="index" item="item" open="case PURCHASE_ORDER_ID" separator=" ">
+          when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
+       </foreach>
+       ,EAS_PURCHASE_ORDER_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case PURCHASE_ORDER_ID" separator=" ">
+          when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.easPurchaseOrderId,jdbcType=VARCHAR}
+       </foreach>
+       ,EAS_ENTRY_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case PURCHASE_ORDER_ID" separator=" ">
+          when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.easEntryId,jdbcType=VARCHAR}
+       </foreach>
+     where PURCHASE_ORDER_ID in 
+     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+    #{item.purchaseOrderId,jdbcType=DECIMAL}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from AMS_PURCHASE_ORDER
+    where PURCHASE_ORDER_ID in 
+    <foreach close=")" collection="list" item="id" open="(" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <!-- 通过物资唯一编码和外轮船名得到批次 -->
+  <select id="getBatchId" parameterType="java.util.Map" resultType="DECIMAL">
+    SELECT db.BATCH_ID
+    FROM DIL_BATCH db
+           LEFT JOIN RMS_MATERIAL rm
+                     ON db.MATERIAL_ID = rm.MATERIAL_ID
+    WHERE db.RESULT_FOREIGN_SHIP_NAME = #{resultForeignShipName}
+      AND rm.MATERIAL_CODE = #{materialCode}
+  </select>
 
-    <!-- 通过供应商代码得到供应商id -->
-    <select id="getSupplierId" parameterType="java.util.Map" resultType="DECIMAL">
-        SELECT rs.SUPPLIER_ID
-        FROM RMS_SUPPLIER rs
-        WHERE rs.SUPPLIER_DUTY_PARAGRAPH = #{supplierDutyParagraph}
-    </select>
+  <!-- 通过供应商代码得到供应商id -->
+  <select id="getSupplierId" parameterType="java.util.Map" resultType="DECIMAL">
+    SELECT rs.SUPPLIER_ID
+    FROM RMS_SUPPLIER rs
+    WHERE rs.SUPPLIER_DUTY_PARAGRAPH = #{supplierDutyParagraph}
+  </select>
 
-    <!-- 通过名称查询收货单位 -->
-    <select id="getShipperId" parameterType="java.lang.String" resultType="DECIMAL">
-        SELECT rs.SHIPPER_ID
-        FROM RMS_SHIPPER rs
-        WHERE rs.SHIPPER_NAME = #{receiveUnit}
-    </select>
+  <!-- 通过名称查询收货单位 -->
+  <select id="getShipperId" parameterType="java.lang.String" resultType="DECIMAL">
+    SELECT rs.SHIPPER_ID
+    FROM RMS_SHIPPER rs
+    WHERE rs.SHIPPER_NAME = #{receiveUnit}
+  </select>
 
-    <!-- 通过采购组织名称查询id -->
-    <select id="getOrganizationId" parameterType="java.lang.String" resultType="DECIMAL">
-        SELECT RS.SHIPPER_ID AS "purchasingOrganizationId"
-        FROM RMS_SHIPPER RS
-        WHERE RS.SHIPPER_NAME = #{purchaseOrganization}
-    </select>
-
-    <select id="getMaterialId" parameterType="java.lang.String" resultType="DECIMAL">
-        SELECT RM.MATERIAL_ID AS "materialId"
-        FROM RMS_MATERIAL RM
-        WHERE RM.MATERIAL_CODE = #{materialCode}
-    </select>
+  <!-- 通过采购组织名称查询id -->
+  <select id="getOrganizationId" parameterType="java.lang.String" resultType="DECIMAL">
+    SELECT RS.SHIPPER_ID AS "purchasingOrganizationId"
+    FROM RMS_SHIPPER RS
+    WHERE RS.SHIPPER_NAME = #{purchaseOrganization}
+  </select>
 
+  <select id="getMaterialId" parameterType="java.lang.String" resultType="DECIMAL">
+    SELECT RM.MATERIAL_ID AS "materialId"
+    FROM RMS_MATERIAL RM
+    WHERE RM.MATERIAL_CODE = #{materialCode}
+  </select>
 </mapper>

+ 409 - 0
src/main/resources/com/steerinfo/dil/mapper/AmsSaleMaterialMapper.xml

@@ -0,0 +1,409 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.steerinfo.dil.mapper.AmsSaleMaterialMapper">
+    <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.AmsSaleMaterial">
+        <id column="SALE_MATERIAL_ID" jdbcType="DECIMAL" property="saleMaterialId"/>
+        <result column="SALE_ORDER_ID" jdbcType="DECIMAL" property="saleOrderId"/>
+        <result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId"/>
+        <result column="MATERIAL_WEIGHT" jdbcType="DECIMAL" property="materialWeight"/>
+        <result column="MATERIAL_NUMBER" jdbcType="DECIMAL" property="materialNumber"/>
+        <result column="EAS_PRIMARY_ID" jdbcType="VARCHAR" property="easPrimaryId"/>
+        <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername"/>
+        <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime"/>
+        <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername"/>
+        <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime"/>
+        <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark"/>
+        <result column="DELETED" jdbcType="DECIMAL" property="deleted"/>
+    </resultMap>
+    <sql id="columns">
+        SALE_MATERIAL_ID, SALE_ORDER_ID, MATERIAL_ID, MATERIAL_WEIGHT, MATERIAL_NUMBER, EAS_PRIMARY_ID,
+    INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, 
+    DELETED
+    </sql>
+    <sql id="columns_alias">
+        t.SALE_MATERIAL_ID, t.SALE_ORDER_ID, t.MATERIAL_ID, t.MATERIAL_WEIGHT, t.MATERIAL_NUMBER,
+    t.EAS_PRIMARY_ID, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, 
+    t.INSERT_UPDATE_REMARK, t.DELETED
+    </sql>
+    <sql id="select">
+        SELECT
+        <include refid="columns"/>
+        FROM AMS_SALE_MATERIAL
+    </sql>
+    <sql id="select_alias">
+        SELECT
+        <include refid="columns_alias"/>
+        FROM AMS_SALE_MATERIAL t
+    </sql>
+    <sql id="where">
+        <where>
+            <if test="saleMaterialId != null">
+                and SALE_MATERIAL_ID = #{saleMaterialId}
+            </if>
+            <if test="saleOrderId != null">
+                and SALE_ORDER_ID = #{saleOrderId}
+            </if>
+            <if test="materialId != null">
+                and MATERIAL_ID = #{materialId}
+            </if>
+            <if test="materialWeight != null">
+                and MATERIAL_WEIGHT = #{materialWeight}
+            </if>
+            <if test="materialNumber != null">
+                and MATERIAL_NUMBER = #{materialNumber}
+            </if>
+            <if test="easPrimaryId != null and easPrimaryId != ''">
+                and EAS_PRIMARY_ID = #{easPrimaryId}
+            </if>
+            <if test="insertUsername != null and insertUsername != ''">
+                and INSERT_USERNAME = #{insertUsername}
+            </if>
+            <if test="insertTime != null">
+                and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+            </if>
+            <if test="updateUsername != null and updateUsername != ''">
+                and UPDATE_USERNAME = #{updateUsername}
+            </if>
+            <if test="updateTime != null">
+                and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+            </if>
+            <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+                and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
+            </if>
+            <if test="deleted != null">
+                and DELETED = #{deleted}
+            </if>
+        </where>
+    </sql>
+    <sql id="whereLike">
+        <where>
+            <if test="saleMaterialId != null">
+                and SALE_MATERIAL_ID = #{saleMaterialId}
+            </if>
+            <if test="saleOrderId != null">
+                and SALE_ORDER_ID = #{saleOrderId}
+            </if>
+            <if test="materialId != null">
+                and MATERIAL_ID = #{materialId}
+            </if>
+            <if test="materialWeight != null">
+                and MATERIAL_WEIGHT = #{materialWeight}
+            </if>
+            <if test="materialNumber != null">
+                and MATERIAL_NUMBER = #{materialNumber}
+            </if>
+            <if test="easPrimaryId != null and easPrimaryId != ''">
+                and EAS_PRIMARY_ID LIKE '%${easPrimaryId}%'
+            </if>
+            <if test="insertUsername != null and insertUsername != ''">
+                and INSERT_USERNAME LIKE '%${insertUsername}%'
+            </if>
+            <if test="insertTime != null">
+                and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+            </if>
+            <if test="updateUsername != null and updateUsername != ''">
+                and UPDATE_USERNAME LIKE '%${updateUsername}%'
+            </if>
+            <if test="updateTime != null">
+                and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+            </if>
+            <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+                and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
+            </if>
+            <if test="deleted != null">
+                and DELETED = #{deleted}
+            </if>
+        </where>
+    </sql>
+    <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
+        delete
+        from AMS_SALE_MATERIAL
+        where SALE_MATERIAL_ID = #{saleMaterialId,jdbcType=DECIMAL}
+    </delete>
+    <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+        delete from AMS_SALE_MATERIAL
+        where 1!=1
+        <if test="saleOrderId != null">
+            or SALE_ORDER_ID = #{saleOrderId}
+        </if>
+        <if test="materialId != null">
+            or MATERIAL_ID = #{materialId}
+        </if>
+        <if test="materialWeight != null">
+            or MATERIAL_WEIGHT = #{materialWeight}
+        </if>
+        <if test="materialNumber != null">
+            or MATERIAL_NUMBER = #{materialNumber}
+        </if>
+        <if test="easPrimaryId != null and easPrimaryId != ''">
+            or EAS_PRIMARY_ID = #{easPrimaryId}
+        </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>
+    </delete>
+    <insert id="insert" parameterType="com.steerinfo.dil.model.AmsSaleMaterial">
+        insert into AMS_SALE_MATERIAL (SALE_MATERIAL_ID, SALE_ORDER_ID, MATERIAL_ID,
+                                       MATERIAL_WEIGHT, MATERIAL_NUMBER, EAS_PRIMARY_ID,
+                                       INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
+                                       UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED)
+        values (#{saleMaterialId,jdbcType=DECIMAL}, #{saleOrderId,jdbcType=DECIMAL}, #{materialId,jdbcType=DECIMAL},
+                #{materialWeight,jdbcType=DECIMAL}, #{materialNumber,jdbcType=DECIMAL},
+                #{easPrimaryId,jdbcType=VARCHAR},
+                #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
+                #{updateUsername,jdbcType=VARCHAR},
+                #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL})
+    </insert>
+    <insert id="insertSelective" parameterType="com.steerinfo.dil.model.AmsSaleMaterial">
+        insert into AMS_SALE_MATERIAL
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="saleMaterialId != null">
+                SALE_MATERIAL_ID,
+            </if>
+            <if test="saleOrderId != null">
+                SALE_ORDER_ID,
+            </if>
+            <if test="materialId != null">
+                MATERIAL_ID,
+            </if>
+            <if test="materialWeight != null">
+                MATERIAL_WEIGHT,
+            </if>
+            <if test="materialNumber != null">
+                MATERIAL_NUMBER,
+            </if>
+            <if test="easPrimaryId != null">
+                EAS_PRIMARY_ID,
+            </if>
+            <if test="insertUsername != null">
+                INSERT_USERNAME,
+            </if>
+            <if test="insertTime != null">
+                INSERT_TIME,
+            </if>
+            <if test="updateUsername != null">
+                UPDATE_USERNAME,
+            </if>
+            <if test="updateTime != null">
+                UPDATE_TIME,
+            </if>
+            <if test="insertUpdateRemark != null">
+                INSERT_UPDATE_REMARK,
+            </if>
+            <if test="deleted != null">
+                DELETED,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="saleMaterialId != null">
+                #{saleMaterialId,jdbcType=DECIMAL},
+            </if>
+            <if test="saleOrderId != null">
+                #{saleOrderId,jdbcType=DECIMAL},
+            </if>
+            <if test="materialId != null">
+                #{materialId,jdbcType=DECIMAL},
+            </if>
+            <if test="materialWeight != null">
+                #{materialWeight,jdbcType=DECIMAL},
+            </if>
+            <if test="materialNumber != null">
+                #{materialNumber,jdbcType=DECIMAL},
+            </if>
+            <if test="easPrimaryId != null">
+                #{easPrimaryId,jdbcType=VARCHAR},
+            </if>
+            <if test="insertUsername != null">
+                #{insertUsername,jdbcType=VARCHAR},
+            </if>
+            <if test="insertTime != null">
+                #{insertTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUsername != null">
+                #{updateUsername,jdbcType=VARCHAR},
+            </if>
+            <if test="updateTime != null">
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="insertUpdateRemark != null">
+                #{insertUpdateRemark,jdbcType=VARCHAR},
+            </if>
+            <if test="deleted != null">
+                #{deleted,jdbcType=DECIMAL},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.AmsSaleMaterial">
+        update AMS_SALE_MATERIAL
+        set SALE_ORDER_ID        = #{saleOrderId,jdbcType=DECIMAL},
+            MATERIAL_ID          = #{materialId,jdbcType=DECIMAL},
+            MATERIAL_WEIGHT      = #{materialWeight,jdbcType=DECIMAL},
+            MATERIAL_NUMBER      = #{materialNumber,jdbcType=DECIMAL},
+            EAS_PRIMARY_ID       = #{easPrimaryId,jdbcType=VARCHAR},
+            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}
+        where SALE_MATERIAL_ID = #{saleMaterialId,jdbcType=DECIMAL}
+    </update>
+    <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.AmsSaleMaterial">
+        update AMS_SALE_MATERIAL
+        <set>
+            <if test="saleOrderId != null">
+                SALE_ORDER_ID = #{saleOrderId,jdbcType=DECIMAL},
+            </if>
+            <if test="materialId != null">
+                MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
+            </if>
+            <if test="materialWeight != null">
+                MATERIAL_WEIGHT = #{materialWeight,jdbcType=DECIMAL},
+            </if>
+            <if test="materialNumber != null">
+                MATERIAL_NUMBER = #{materialNumber,jdbcType=DECIMAL},
+            </if>
+            <if test="easPrimaryId != null">
+                EAS_PRIMARY_ID = #{easPrimaryId,jdbcType=VARCHAR},
+            </if>
+            <if test="insertUsername != null">
+                INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+            </if>
+            <if test="insertTime != null">
+                INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUsername != null">
+                UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+            </if>
+            <if test="updateTime != null">
+                UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="insertUpdateRemark != null">
+                INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+            </if>
+            <if test="deleted != null">
+                DELETED = #{deleted,jdbcType=DECIMAL},
+            </if>
+        </set>
+        where SALE_MATERIAL_ID = #{saleMaterialId,jdbcType=DECIMAL}
+    </update>
+    <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+        <include refid="select"/>
+        where SALE_MATERIAL_ID = #{saleMaterialId,jdbcType=DECIMAL}
+    </select>
+    <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+        <include refid="select"/>
+        <include refid="where"/>
+    </select>
+    <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+        <include refid="select"/>
+        <include refid="whereLike"/>
+    </select>
+    <insert id="batchInsert" parameterType="java.util.List">
+        insert into AMS_SALE_MATERIAL
+        (SALE_MATERIAL_ID,
+        SALE_ORDER_ID, MATERIAL_ID, MATERIAL_WEIGHT,
+        MATERIAL_NUMBER, EAS_PRIMARY_ID,
+        INSERT_USERNAME, INSERT_TIME,
+        UPDATE_USERNAME, UPDATE_TIME,
+        INSERT_UPDATE_REMARK, DELETED)
+        ( <foreach collection="list" item="item" separator="union all">
+        select
+        #{item.saleMaterialId,jdbcType=DECIMAL},
+        #{item.saleOrderId,jdbcType=DECIMAL}, #{item.materialId,jdbcType=DECIMAL},
+        #{item.materialWeight,jdbcType=DECIMAL},
+        #{item.materialNumber,jdbcType=DECIMAL}, #{item.easPrimaryId,jdbcType=VARCHAR},
+        #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
+        #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
+        #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.deleted,jdbcType=DECIMAL} from dual
+    </foreach> )
+    </insert>
+    <update id="batchUpdate" parameterType="java.util.List">
+        update AMS_SALE_MATERIAL
+        set
+        SALE_MATERIAL_ID=
+        <foreach close="end" collection="list" index="index" item="item" open="case SALE_MATERIAL_ID" separator=" ">
+            when #{item.saleMaterialId,jdbcType=DECIMAL} then #{item.saleMaterialId,jdbcType=DECIMAL}
+        </foreach>
+        ,SALE_ORDER_ID=
+        <foreach close="end" collection="list" index="index" item="item" open="case SALE_MATERIAL_ID" separator=" ">
+            when #{item.saleMaterialId,jdbcType=DECIMAL} then #{item.saleOrderId,jdbcType=DECIMAL}
+        </foreach>
+        ,MATERIAL_ID=
+        <foreach close="end" collection="list" index="index" item="item" open="case SALE_MATERIAL_ID" separator=" ">
+            when #{item.saleMaterialId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
+        </foreach>
+        ,MATERIAL_WEIGHT=
+        <foreach close="end" collection="list" index="index" item="item" open="case SALE_MATERIAL_ID" separator=" ">
+            when #{item.saleMaterialId,jdbcType=DECIMAL} then #{item.materialWeight,jdbcType=DECIMAL}
+        </foreach>
+        ,MATERIAL_NUMBER=
+        <foreach close="end" collection="list" index="index" item="item" open="case SALE_MATERIAL_ID" separator=" ">
+            when #{item.saleMaterialId,jdbcType=DECIMAL} then #{item.materialNumber,jdbcType=DECIMAL}
+        </foreach>
+        ,EAS_PRIMARY_ID=
+        <foreach close="end" collection="list" index="index" item="item" open="case SALE_MATERIAL_ID" separator=" ">
+            when #{item.saleMaterialId,jdbcType=DECIMAL} then #{item.easPrimaryId,jdbcType=VARCHAR}
+        </foreach>
+        ,INSERT_USERNAME=
+        <foreach close="end" collection="list" index="index" item="item" open="case SALE_MATERIAL_ID" separator=" ">
+            when #{item.saleMaterialId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+        </foreach>
+        ,INSERT_TIME=
+        <foreach close="end" collection="list" index="index" item="item" open="case SALE_MATERIAL_ID" separator=" ">
+            when #{item.saleMaterialId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,UPDATE_USERNAME=
+        <foreach close="end" collection="list" index="index" item="item" open="case SALE_MATERIAL_ID" separator=" ">
+            when #{item.saleMaterialId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+        </foreach>
+        ,UPDATE_TIME=
+        <foreach close="end" collection="list" index="index" item="item" open="case SALE_MATERIAL_ID" separator=" ">
+            when #{item.saleMaterialId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,INSERT_UPDATE_REMARK=
+        <foreach close="end" collection="list" index="index" item="item" open="case SALE_MATERIAL_ID" separator=" ">
+            when #{item.saleMaterialId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+        </foreach>
+        ,DELETED=
+        <foreach close="end" collection="list" index="index" item="item" open="case SALE_MATERIAL_ID" separator=" ">
+            when #{item.saleMaterialId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
+        </foreach>
+        where SALE_MATERIAL_ID in
+        <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+            #{item.saleMaterialId,jdbcType=DECIMAL}
+        </foreach>
+    </update>
+    <delete id="batchDelete" parameterType="java.util.List">
+        delete from AMS_SALE_MATERIAL
+        where SALE_MATERIAL_ID in
+        <foreach close=")" collection="list" item="id" open="(" separator=",">
+            #{id}
+        </foreach>
+    </delete>
+    <!-- 友情提示!!!-->
+    <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+
+  <!-- 通过物资编码查询物资id -->
+    <select id="getMaterialId" parameterType="java.lang.String" resultType="DECIMAL">
+        SELECT RM.MATERIAL_ID AS "materialId"
+        FROM RMS_MATERIAL RM
+        WHERE RM.MATERIAL_CODE = #{materialCode}
+    </select>
+
+</mapper>

+ 23 - 8
src/main/resources/com/steerinfo/dil/mapper/AmsSaleOrderMapper.xml

@@ -623,15 +623,30 @@
         WHERE ASO.SALE_ORDER_ID = #{saleOrderId}
     </select>
 
-    <!-- 得到订单下的车序号 -->
+    <!-- 得到订单下的物资信息 -->
     <select id="getMaterialMessages" parameterType="DECIMAL" resultType="java.util.Map">
-        SELECT RM.MATERIAL_CODE                AS "materialNum",
-               ASTM.SALE_ORDER_MATERIAL_NUMBER AS "qty"
-        FROM AMS_SALE_ORDER_MATERIAL ASOM
-                 LEFT JOIN AMS_SALE_TRUCKNO_MATERIAL ASTM
-                           ON ASTM.TRUCKNO_MATERIAL_ID = ASOM.SALE_ORDER_MATERIAL_ID
+        SELECT RM.MATERIAL_CODE          AS "materialNum",
+               ASM.MATERIAL_WEIGHT       AS "materialWeight",
+               ASM.MATERIAL_NUMBER       AS "materialNumber",
+               RM.MATERIAL_NAME          AS "materialName",
+               ASM.SALE_MATERIAL_ID      AS "saleMaterialId"
+        FROM AMS_SALE_MATERIAL ASM
                  LEFT JOIN RMS_MATERIAL RM
-                           ON RM.MATERIAL_ID = ASTM.MATERIAL_ID
-        WHERE ASOM.SALE_ORDER_ID = #{saleOrderId}
+                           ON RM.MATERIAL_ID = ASM.MATERIAL_ID
+        WHERE ASM.SALE_ORDER_ID = #{saleOrderId}
+    </select>
+
+    <!-- 收货单位 -->
+    <select id="getReceiveId" parameterType="java.lang.String" resultType="DECIMAL">
+        SELECT RC.CONSIGNEE_ID AS "receiveId"
+        FROM RMS_CONSIGNEE RC
+        WHERE RC.CONSIGNEE_CODE = #{receiveUnit}
+    </select>
+
+    <!-- 发货单位 -->
+    <select id="getShipperId" parameterType="java.lang.String" resultType="DECIMAL">
+        SELECT RS.SHIPPER_ID AS "shipperId"
+        FROM RMS_SHIPPER RS
+        WHERE RS.SHIPPER_NAME = #{shipperUnit}
     </select>
 </mapper>

+ 147 - 96
src/main/resources/com/steerinfo/dil/mapper/RmsCarrierMapper.xml

@@ -3,11 +3,11 @@
 <mapper namespace="com.steerinfo.dil.mapper.RmsCarrierMapper">
   <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.RmsCarrier">
     <id column="CARRIER_ID" jdbcType="DECIMAL" property="carrierId" />
-    <result column="CARRIER_TRANSPORT_TYPE" jdbcType="DECIMAL" property="carrierTransportType" />
+    <result column="CARRIER_TRANSPORT_TYPE" jdbcType="VARCHAR" property="carrierTransportType" />
     <result column="CARRIER_NAME" jdbcType="VARCHAR" property="carrierName" />
     <result column="CARRIER_ABBREVIATION" jdbcType="VARCHAR" property="carrierAbbreviation" />
     <result column="CARRIER_ADDRESS" jdbcType="VARCHAR" property="carrierAddress" />
-    <result column="CARRIER_BID_AREA" jdbcType="VARCHAR" property="carrierBidArea" />
+    <result column="CARRIER_BID_AREA_ID" jdbcType="DECIMAL" property="carrierBidAreaId" />
     <result column="CARRIER_BID_TIME" jdbcType="TIMESTAMP" property="carrierBidTime" />
     <result column="CARRIER_LEGAL_REPRESENTATIVE" jdbcType="VARCHAR" property="carrierLegalRepresentative" />
     <result column="REGISTER_NO" jdbcType="VARCHAR" property="registerNo" />
@@ -35,42 +35,45 @@
     <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
     <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
     <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
+    <result column="CARRIER_TYPE" jdbcType="VARCHAR" property="carrierType" />
+    <result column="EAS_CARRIER_ID" jdbcType="VARCHAR" property="easCarrierId" />
     <result column="CARRIER_TRANSPORT_CERTIFICATE" jdbcType="BLOB" property="carrierTransportCertificate" />
     <result column="CARRIER_BUSINESS_LICENSE" jdbcType="BLOB" property="carrierBusinessLicense" />
     <result column="CARRIER_BUSINESS_ABLELICENSE" jdbcType="BLOB" property="carrierBusinessAblelicense" />
   </resultMap>
   <sql id="columns">
     CARRIER_ID, CARRIER_TRANSPORT_TYPE, CARRIER_NAME, CARRIER_ABBREVIATION, CARRIER_ADDRESS, 
-    CARRIER_BID_AREA, CARRIER_BID_TIME, CARRIER_LEGAL_REPRESENTATIVE, REGISTER_NO, CARRIER_AGENT, 
-    CARRIER_CONTACT_NUMBER, CARRIER_FAX, CARRIER_ACCOUNT, CARRIER_ACCOUNT_BLANK, CARRIER_DUTY_PARAGRAPH, 
-    CARRIER_POSTAL_CODE, REGISTER_CAPITAL, BUSINESS_SCOPE, ANNUAL_DATE, COMPANY_STATUS_DESC, 
-    COMPANY_TYPE_DESC, OPERATION_PERIOD, REGISTER_DATE, REGISTER_ORGANIZATION, REGISTER_APTITUDES, 
-    CREDENTIAL_DESC, CONTACTS_NAME, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, 
-    INSERT_UPDATE_REMARK, DELETED, CARRIER_TRANSPORT_CERTIFICATE, CARRIER_BUSINESS_LICENSE, 
-    CARRIER_BUSINESS_ABLELICENSE
+    CARRIER_BID_AREA_ID, CARRIER_BID_TIME, CARRIER_LEGAL_REPRESENTATIVE, REGISTER_NO, 
+    CARRIER_AGENT, CARRIER_CONTACT_NUMBER, CARRIER_FAX, CARRIER_ACCOUNT, CARRIER_ACCOUNT_BLANK, 
+    CARRIER_DUTY_PARAGRAPH, CARRIER_POSTAL_CODE, REGISTER_CAPITAL, BUSINESS_SCOPE, ANNUAL_DATE, 
+    COMPANY_STATUS_DESC, COMPANY_TYPE_DESC, OPERATION_PERIOD, REGISTER_DATE, REGISTER_ORGANIZATION, 
+    REGISTER_APTITUDES, CREDENTIAL_DESC, CONTACTS_NAME, INSERT_USERNAME, INSERT_TIME, 
+    UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, CARRIER_TYPE, EAS_CARRIER_ID, 
+    CARRIER_TRANSPORT_CERTIFICATE, CARRIER_BUSINESS_LICENSE, CARRIER_BUSINESS_ABLELICENSE
   </sql>
   <sql id="columns_alias">
     t.CARRIER_ID, t.CARRIER_TRANSPORT_TYPE, t.CARRIER_NAME, t.CARRIER_ABBREVIATION, t.CARRIER_ADDRESS, 
-    t.CARRIER_BID_AREA, t.CARRIER_BID_TIME, t.CARRIER_LEGAL_REPRESENTATIVE, t.REGISTER_NO, 
+    t.CARRIER_BID_AREA_ID, t.CARRIER_BID_TIME, t.CARRIER_LEGAL_REPRESENTATIVE, t.REGISTER_NO, 
     t.CARRIER_AGENT, t.CARRIER_CONTACT_NUMBER, t.CARRIER_FAX, t.CARRIER_ACCOUNT, t.CARRIER_ACCOUNT_BLANK, 
     t.CARRIER_DUTY_PARAGRAPH, t.CARRIER_POSTAL_CODE, t.REGISTER_CAPITAL, t.BUSINESS_SCOPE, 
     t.ANNUAL_DATE, t.COMPANY_STATUS_DESC, t.COMPANY_TYPE_DESC, t.OPERATION_PERIOD, t.REGISTER_DATE, 
     t.REGISTER_ORGANIZATION, t.REGISTER_APTITUDES, t.CREDENTIAL_DESC, t.CONTACTS_NAME, 
     t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, 
-    t.DELETED, t.CARRIER_TRANSPORT_CERTIFICATE, t.CARRIER_BUSINESS_LICENSE, t.CARRIER_BUSINESS_ABLELICENSE
+    t.DELETED, t.CARRIER_TYPE, t.EAS_CARRIER_ID, t.CARRIER_TRANSPORT_CERTIFICATE, t.CARRIER_BUSINESS_LICENSE, 
+    t.CARRIER_BUSINESS_ABLELICENSE
   </sql>
   <sql id="select">
-    SELECT <include refid="columns"/> FROM RMS_CARRIER
+    SELECT <include refid="columns" /> FROM RMS_CARRIER
   </sql>
   <sql id="select_alias">
-    SELECT <include refid="columns_alias"/> FROM RMS_CARRIER t
+    SELECT <include refid="columns_alias" /> FROM RMS_CARRIER t
   </sql>
   <sql id="where">
     <where> 
       <if test="carrierId != null">
         and CARRIER_ID = #{carrierId}
       </if>
-      <if test="carrierTransportType != null">
+      <if test="carrierTransportType != null and carrierTransportType != ''">
         and CARRIER_TRANSPORT_TYPE = #{carrierTransportType}
       </if>
       <if test="carrierName != null and carrierName != ''">
@@ -82,8 +85,8 @@
       <if test="carrierAddress != null and carrierAddress != ''">
         and CARRIER_ADDRESS = #{carrierAddress}
       </if>
-      <if test="carrierBidArea != null and carrierBidArea != ''">
-        and CARRIER_BID_AREA = #{carrierBidArea}
+      <if test="carrierBidAreaId != null">
+        and CARRIER_BID_AREA_ID = #{carrierBidAreaId}
       </if>
       <if test="carrierBidTime != null">
         and TO_CHAR(CARRIER_BID_TIME,'yyyy-MM-dd') = #{carrierBidTime}
@@ -166,6 +169,12 @@
       <if test="deleted != null">
         and DELETED = #{deleted}
       </if>
+      <if test="carrierType != null and carrierType != ''">
+        and CARRIER_TYPE = #{carrierType}
+      </if>
+      <if test="easCarrierId != null and easCarrierId != ''">
+        and EAS_CARRIER_ID = #{easCarrierId}
+      </if>
       <if test="carrierTransportCertificate != null">
         and CARRIER_TRANSPORT_CERTIFICATE = #{carrierTransportCertificate}
       </if>
@@ -182,8 +191,8 @@
       <if test="carrierId != null">
         and CARRIER_ID = #{carrierId}
       </if>
-      <if test="carrierTransportType != null">
-        and CARRIER_TRANSPORT_TYPE = #{carrierTransportType}
+      <if test="carrierTransportType != null and carrierTransportType != ''">
+        and CARRIER_TRANSPORT_TYPE LIKE '%${carrierTransportType}%'
       </if>
       <if test="carrierName != null and carrierName != ''">
         and CARRIER_NAME LIKE '%${carrierName}%'
@@ -194,8 +203,8 @@
       <if test="carrierAddress != null and carrierAddress != ''">
         and CARRIER_ADDRESS LIKE '%${carrierAddress}%'
       </if>
-      <if test="carrierBidArea != null and carrierBidArea != ''">
-        and CARRIER_BID_AREA LIKE '%${carrierBidArea}%'
+      <if test="carrierBidAreaId != null">
+        and CARRIER_BID_AREA_ID = #{carrierBidAreaId}
       </if>
       <if test="carrierBidTime != null">
         and TO_CHAR(CARRIER_BID_TIME,'yyyy-MM-dd') = #{carrierBidTime}
@@ -278,6 +287,12 @@
       <if test="deleted != null">
         and DELETED = #{deleted}
       </if>
+      <if test="carrierType != null and carrierType != ''">
+        and CARRIER_TYPE LIKE '%${carrierType}%'
+      </if>
+      <if test="easCarrierId != null and easCarrierId != ''">
+        and EAS_CARRIER_ID LIKE '%${easCarrierId}%'
+      </if>
       <if test="carrierTransportCertificate != null">
         and CARRIER_TRANSPORT_CERTIFICATE = #{carrierTransportCertificate}
       </if>
@@ -289,14 +304,14 @@
       </if>
     </where>
   </sql>
-  <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
     delete from RMS_CARRIER
     where CARRIER_ID = #{carrierId,jdbcType=DECIMAL}
   </delete>
   <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
     delete from RMS_CARRIER
     where 1!=1 
-      <if test="carrierTransportType != null">
+      <if test="carrierTransportType != null and carrierTransportType != ''">
         or CARRIER_TRANSPORT_TYPE = #{carrierTransportType}
       </if>
       <if test="carrierName != null and carrierName != ''">
@@ -308,8 +323,8 @@
       <if test="carrierAddress != null and carrierAddress != ''">
         or CARRIER_ADDRESS = #{carrierAddress}
       </if>
-      <if test="carrierBidArea != null and carrierBidArea != ''">
-        or CARRIER_BID_AREA = #{carrierBidArea}
+      <if test="carrierBidAreaId != null">
+        or CARRIER_BID_AREA_ID = #{carrierBidAreaId}
       </if>
       <if test="carrierBidTime != null">
         or TO_CHAR(CARRIER_BID_TIME,'yyyy-MM-dd') = '#{carrierBidTime}'
@@ -392,6 +407,12 @@
       <if test="deleted != null">
         or DELETED = #{deleted}
       </if>
+      <if test="carrierType != null and carrierType != ''">
+        or CARRIER_TYPE = #{carrierType}
+      </if>
+      <if test="easCarrierId != null and easCarrierId != ''">
+        or EAS_CARRIER_ID = #{easCarrierId}
+      </if>
       <if test="carrierTransportCertificate != null">
         or CARRIER_TRANSPORT_CERTIFICATE = #{carrierTransportCertificate}
       </if>
@@ -405,7 +426,7 @@
   <insert id="insert" parameterType="com.steerinfo.dil.model.RmsCarrier">
     insert into RMS_CARRIER (CARRIER_ID, CARRIER_TRANSPORT_TYPE, 
       CARRIER_NAME, CARRIER_ABBREVIATION, CARRIER_ADDRESS, 
-      CARRIER_BID_AREA, CARRIER_BID_TIME, CARRIER_LEGAL_REPRESENTATIVE, 
+      CARRIER_BID_AREA_ID, CARRIER_BID_TIME, CARRIER_LEGAL_REPRESENTATIVE, 
       REGISTER_NO, CARRIER_AGENT, CARRIER_CONTACT_NUMBER, 
       CARRIER_FAX, CARRIER_ACCOUNT, CARRIER_ACCOUNT_BLANK, 
       CARRIER_DUTY_PARAGRAPH, CARRIER_POSTAL_CODE, 
@@ -414,12 +435,13 @@
       REGISTER_DATE, REGISTER_ORGANIZATION, REGISTER_APTITUDES, 
       CREDENTIAL_DESC, CONTACTS_NAME, INSERT_USERNAME, 
       INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, 
-      INSERT_UPDATE_REMARK, DELETED, CARRIER_TRANSPORT_CERTIFICATE, 
+      INSERT_UPDATE_REMARK, DELETED, CARRIER_TYPE, 
+      EAS_CARRIER_ID, CARRIER_TRANSPORT_CERTIFICATE, 
       CARRIER_BUSINESS_LICENSE, CARRIER_BUSINESS_ABLELICENSE
       )
-    values (#{carrierId,jdbcType=DECIMAL}, #{carrierTransportType,jdbcType=DECIMAL}, 
+    values (#{carrierId,jdbcType=DECIMAL}, #{carrierTransportType,jdbcType=VARCHAR}, 
       #{carrierName,jdbcType=VARCHAR}, #{carrierAbbreviation,jdbcType=VARCHAR}, #{carrierAddress,jdbcType=VARCHAR}, 
-      #{carrierBidArea,jdbcType=VARCHAR}, #{carrierBidTime,jdbcType=TIMESTAMP}, #{carrierLegalRepresentative,jdbcType=VARCHAR}, 
+      #{carrierBidAreaId,jdbcType=DECIMAL}, #{carrierBidTime,jdbcType=TIMESTAMP}, #{carrierLegalRepresentative,jdbcType=VARCHAR}, 
       #{registerNo,jdbcType=VARCHAR}, #{carrierAgent,jdbcType=VARCHAR}, #{carrierContactNumber,jdbcType=VARCHAR}, 
       #{carrierFax,jdbcType=VARCHAR}, #{carrierAccount,jdbcType=VARCHAR}, #{carrierAccountBlank,jdbcType=VARCHAR}, 
       #{carrierDutyParagraph,jdbcType=VARCHAR}, #{carrierPostalCode,jdbcType=VARCHAR}, 
@@ -428,7 +450,8 @@
       #{registerDate,jdbcType=TIMESTAMP}, #{registerOrganization,jdbcType=VARCHAR}, #{registerAptitudes,jdbcType=VARCHAR}, 
       #{credentialDesc,jdbcType=VARCHAR}, #{contactsName,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR}, 
       #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, 
-      #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}, #{carrierTransportCertificate,jdbcType=BLOB}, 
+      #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}, #{carrierType,jdbcType=VARCHAR}, 
+      #{easCarrierId,jdbcType=VARCHAR}, #{carrierTransportCertificate,jdbcType=BLOB}, 
       #{carrierBusinessLicense,jdbcType=BLOB}, #{carrierBusinessAblelicense,jdbcType=BLOB}
       )
   </insert>
@@ -450,8 +473,8 @@
       <if test="carrierAddress != null">
         CARRIER_ADDRESS,
       </if>
-      <if test="carrierBidArea != null">
-        CARRIER_BID_AREA,
+      <if test="carrierBidAreaId != null">
+        CARRIER_BID_AREA_ID,
       </if>
       <if test="carrierBidTime != null">
         CARRIER_BID_TIME,
@@ -534,6 +557,12 @@
       <if test="deleted != null">
         DELETED,
       </if>
+      <if test="carrierType != null">
+        CARRIER_TYPE,
+      </if>
+      <if test="easCarrierId != null">
+        EAS_CARRIER_ID,
+      </if>
       <if test="carrierTransportCertificate != null">
         CARRIER_TRANSPORT_CERTIFICATE,
       </if>
@@ -549,7 +578,7 @@
         #{carrierId,jdbcType=DECIMAL},
       </if>
       <if test="carrierTransportType != null">
-        #{carrierTransportType,jdbcType=DECIMAL},
+        #{carrierTransportType,jdbcType=VARCHAR},
       </if>
       <if test="carrierName != null">
         #{carrierName,jdbcType=VARCHAR},
@@ -560,8 +589,8 @@
       <if test="carrierAddress != null">
         #{carrierAddress,jdbcType=VARCHAR},
       </if>
-      <if test="carrierBidArea != null">
-        #{carrierBidArea,jdbcType=VARCHAR},
+      <if test="carrierBidAreaId != null">
+        #{carrierBidAreaId,jdbcType=DECIMAL},
       </if>
       <if test="carrierBidTime != null">
         #{carrierBidTime,jdbcType=TIMESTAMP},
@@ -644,6 +673,12 @@
       <if test="deleted != null">
         #{deleted,jdbcType=DECIMAL},
       </if>
+      <if test="carrierType != null">
+        #{carrierType,jdbcType=VARCHAR},
+      </if>
+      <if test="easCarrierId != null">
+        #{easCarrierId,jdbcType=VARCHAR},
+      </if>
       <if test="carrierTransportCertificate != null">
         #{carrierTransportCertificate,jdbcType=BLOB},
       </if>
@@ -657,11 +692,11 @@
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.RmsCarrier">
     update RMS_CARRIER
-    set CARRIER_TRANSPORT_TYPE = #{carrierTransportType,jdbcType=DECIMAL},
+    set CARRIER_TRANSPORT_TYPE = #{carrierTransportType,jdbcType=VARCHAR},
       CARRIER_NAME = #{carrierName,jdbcType=VARCHAR},
       CARRIER_ABBREVIATION = #{carrierAbbreviation,jdbcType=VARCHAR},
       CARRIER_ADDRESS = #{carrierAddress,jdbcType=VARCHAR},
-      CARRIER_BID_AREA = #{carrierBidArea,jdbcType=VARCHAR},
+      CARRIER_BID_AREA_ID = #{carrierBidAreaId,jdbcType=DECIMAL},
       CARRIER_BID_TIME = #{carrierBidTime,jdbcType=TIMESTAMP},
       CARRIER_LEGAL_REPRESENTATIVE = #{carrierLegalRepresentative,jdbcType=VARCHAR},
       REGISTER_NO = #{registerNo,jdbcType=VARCHAR},
@@ -689,6 +724,8 @@
       UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
       INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
       DELETED = #{deleted,jdbcType=DECIMAL},
+      CARRIER_TYPE = #{carrierType,jdbcType=VARCHAR},
+      EAS_CARRIER_ID = #{easCarrierId,jdbcType=VARCHAR},
       CARRIER_TRANSPORT_CERTIFICATE = #{carrierTransportCertificate,jdbcType=BLOB},
       CARRIER_BUSINESS_LICENSE = #{carrierBusinessLicense,jdbcType=BLOB},
       CARRIER_BUSINESS_ABLELICENSE = #{carrierBusinessAblelicense,jdbcType=BLOB}
@@ -698,7 +735,7 @@
     update RMS_CARRIER
     <set>
       <if test="carrierTransportType != null">
-        CARRIER_TRANSPORT_TYPE = #{carrierTransportType,jdbcType=DECIMAL},
+        CARRIER_TRANSPORT_TYPE = #{carrierTransportType,jdbcType=VARCHAR},
       </if>
       <if test="carrierName != null">
         CARRIER_NAME = #{carrierName,jdbcType=VARCHAR},
@@ -709,8 +746,8 @@
       <if test="carrierAddress != null">
         CARRIER_ADDRESS = #{carrierAddress,jdbcType=VARCHAR},
       </if>
-      <if test="carrierBidArea != null">
-        CARRIER_BID_AREA = #{carrierBidArea,jdbcType=VARCHAR},
+      <if test="carrierBidAreaId != null">
+        CARRIER_BID_AREA_ID = #{carrierBidAreaId,jdbcType=DECIMAL},
       </if>
       <if test="carrierBidTime != null">
         CARRIER_BID_TIME = #{carrierBidTime,jdbcType=TIMESTAMP},
@@ -793,6 +830,12 @@
       <if test="deleted != null">
         DELETED = #{deleted,jdbcType=DECIMAL},
       </if>
+      <if test="carrierType != null">
+        CARRIER_TYPE = #{carrierType,jdbcType=VARCHAR},
+      </if>
+      <if test="easCarrierId != null">
+        EAS_CARRIER_ID = #{easCarrierId,jdbcType=VARCHAR},
+      </if>
       <if test="carrierTransportCertificate != null">
         CARRIER_TRANSPORT_CERTIFICATE = #{carrierTransportCertificate,jdbcType=BLOB},
       </if>
@@ -805,24 +848,24 @@
     </set>
     where CARRIER_ID = #{carrierId,jdbcType=DECIMAL}
   </update>
-  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
-    <include refid="select"/>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
+    <include refid="select" />
     where CARRIER_ID = #{carrierId,jdbcType=DECIMAL}
   </select>
   <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    <include refid="select"/>
-    <include refid="where"/>
+    <include refid="select" />
+    <include refid="where" />
   </select>
   <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    <include refid="select"/>
-    <include refid="whereLike"/>
+    <include refid="select" />
+    <include refid="whereLike" />
   </select>
   <insert id="batchInsert" parameterType="java.util.List">
     insert into RMS_CARRIER 
       (CARRIER_ID, 
       CARRIER_TRANSPORT_TYPE, CARRIER_NAME, 
       CARRIER_ABBREVIATION, CARRIER_ADDRESS, 
-      CARRIER_BID_AREA, CARRIER_BID_TIME, 
+      CARRIER_BID_AREA_ID, CARRIER_BID_TIME, 
       CARRIER_LEGAL_REPRESENTATIVE, REGISTER_NO, 
       CARRIER_AGENT, CARRIER_CONTACT_NUMBER, 
       CARRIER_FAX, CARRIER_ACCOUNT, CARRIER_ACCOUNT_BLANK, 
@@ -835,15 +878,15 @@
       CONTACTS_NAME, INSERT_USERNAME, 
       INSERT_TIME, UPDATE_USERNAME, 
       UPDATE_TIME, INSERT_UPDATE_REMARK, 
-      DELETED, CARRIER_TRANSPORT_CERTIFICATE, 
-      CARRIER_BUSINESS_LICENSE, CARRIER_BUSINESS_ABLELICENSE
-      )
+      DELETED, CARRIER_TYPE, EAS_CARRIER_ID, 
+      CARRIER_TRANSPORT_CERTIFICATE, CARRIER_BUSINESS_LICENSE, 
+      CARRIER_BUSINESS_ABLELICENSE)
     ( <foreach collection="list" item="item" separator="union all"> 
    select  
       #{item.carrierId,jdbcType=DECIMAL}, 
-      #{item.carrierTransportType,jdbcType=DECIMAL}, #{item.carrierName,jdbcType=VARCHAR}, 
+      #{item.carrierTransportType,jdbcType=VARCHAR}, #{item.carrierName,jdbcType=VARCHAR}, 
       #{item.carrierAbbreviation,jdbcType=VARCHAR}, #{item.carrierAddress,jdbcType=VARCHAR}, 
-      #{item.carrierBidArea,jdbcType=VARCHAR}, #{item.carrierBidTime,jdbcType=TIMESTAMP}, 
+      #{item.carrierBidAreaId,jdbcType=DECIMAL}, #{item.carrierBidTime,jdbcType=TIMESTAMP}, 
       #{item.carrierLegalRepresentative,jdbcType=VARCHAR}, #{item.registerNo,jdbcType=VARCHAR}, 
       #{item.carrierAgent,jdbcType=VARCHAR}, #{item.carrierContactNumber,jdbcType=VARCHAR}, 
       #{item.carrierFax,jdbcType=VARCHAR}, #{item.carrierAccount,jdbcType=VARCHAR}, #{item.carrierAccountBlank,jdbcType=VARCHAR}, 
@@ -856,171 +899,179 @@
       #{item.contactsName,jdbcType=VARCHAR}, #{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.carrierTransportCertificate,jdbcType=BLOB}, 
-      #{item.carrierBusinessLicense,jdbcType=BLOB}, #{item.carrierBusinessAblelicense,jdbcType=BLOB}
-       from dual  
+      #{item.deleted,jdbcType=DECIMAL}, #{item.carrierType,jdbcType=VARCHAR}, #{item.easCarrierId,jdbcType=VARCHAR}, 
+      #{item.carrierTransportCertificate,jdbcType=BLOB}, #{item.carrierBusinessLicense,jdbcType=BLOB}, 
+      #{item.carrierBusinessAblelicense,jdbcType=BLOB} from dual  
    </foreach> )
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
      update RMS_CARRIER
      set
        CARRIER_ID=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.carrierId,jdbcType=DECIMAL}
        </foreach>
        ,CARRIER_TRANSPORT_TYPE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
-          when #{item.carrierId,jdbcType=DECIMAL} then #{item.carrierTransportType,jdbcType=DECIMAL}
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
+          when #{item.carrierId,jdbcType=DECIMAL} then #{item.carrierTransportType,jdbcType=VARCHAR}
        </foreach>
        ,CARRIER_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.carrierName,jdbcType=VARCHAR}
        </foreach>
        ,CARRIER_ABBREVIATION=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.carrierAbbreviation,jdbcType=VARCHAR}
        </foreach>
        ,CARRIER_ADDRESS=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.carrierAddress,jdbcType=VARCHAR}
        </foreach>
-       ,CARRIER_BID_AREA=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
-          when #{item.carrierId,jdbcType=DECIMAL} then #{item.carrierBidArea,jdbcType=VARCHAR}
+       ,CARRIER_BID_AREA_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
+          when #{item.carrierId,jdbcType=DECIMAL} then #{item.carrierBidAreaId,jdbcType=DECIMAL}
        </foreach>
        ,CARRIER_BID_TIME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.carrierBidTime,jdbcType=TIMESTAMP}
        </foreach>
        ,CARRIER_LEGAL_REPRESENTATIVE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.carrierLegalRepresentative,jdbcType=VARCHAR}
        </foreach>
        ,REGISTER_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.registerNo,jdbcType=VARCHAR}
        </foreach>
        ,CARRIER_AGENT=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.carrierAgent,jdbcType=VARCHAR}
        </foreach>
        ,CARRIER_CONTACT_NUMBER=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.carrierContactNumber,jdbcType=VARCHAR}
        </foreach>
        ,CARRIER_FAX=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.carrierFax,jdbcType=VARCHAR}
        </foreach>
        ,CARRIER_ACCOUNT=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.carrierAccount,jdbcType=VARCHAR}
        </foreach>
        ,CARRIER_ACCOUNT_BLANK=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.carrierAccountBlank,jdbcType=VARCHAR}
        </foreach>
        ,CARRIER_DUTY_PARAGRAPH=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.carrierDutyParagraph,jdbcType=VARCHAR}
        </foreach>
        ,CARRIER_POSTAL_CODE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.carrierPostalCode,jdbcType=VARCHAR}
        </foreach>
        ,REGISTER_CAPITAL=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.registerCapital,jdbcType=VARCHAR}
        </foreach>
        ,BUSINESS_SCOPE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.businessScope,jdbcType=VARCHAR}
        </foreach>
        ,ANNUAL_DATE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.annualDate,jdbcType=VARCHAR}
        </foreach>
        ,COMPANY_STATUS_DESC=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.companyStatusDesc,jdbcType=VARCHAR}
        </foreach>
        ,COMPANY_TYPE_DESC=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.companyTypeDesc,jdbcType=VARCHAR}
        </foreach>
        ,OPERATION_PERIOD=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.operationPeriod,jdbcType=VARCHAR}
        </foreach>
        ,REGISTER_DATE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.registerDate,jdbcType=TIMESTAMP}
        </foreach>
        ,REGISTER_ORGANIZATION=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.registerOrganization,jdbcType=VARCHAR}
        </foreach>
        ,REGISTER_APTITUDES=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.registerAptitudes,jdbcType=VARCHAR}
        </foreach>
        ,CREDENTIAL_DESC=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.credentialDesc,jdbcType=VARCHAR}
        </foreach>
        ,CONTACTS_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.contactsName,jdbcType=VARCHAR}
        </foreach>
        ,INSERT_USERNAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
        </foreach>
        ,INSERT_TIME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
        </foreach>
        ,UPDATE_USERNAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
        </foreach>
        ,UPDATE_TIME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
        </foreach>
        ,INSERT_UPDATE_REMARK=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
        </foreach>
        ,DELETED=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
        </foreach>
+       ,CARRIER_TYPE=
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
+          when #{item.carrierId,jdbcType=DECIMAL} then #{item.carrierType,jdbcType=VARCHAR}
+       </foreach>
+       ,EAS_CARRIER_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
+          when #{item.carrierId,jdbcType=DECIMAL} then #{item.easCarrierId,jdbcType=VARCHAR}
+       </foreach>
        ,CARRIER_TRANSPORT_CERTIFICATE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.carrierTransportCertificate,jdbcType=BLOB}
        </foreach>
        ,CARRIER_BUSINESS_LICENSE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.carrierBusinessLicense,jdbcType=BLOB}
        </foreach>
        ,CARRIER_BUSINESS_ABLELICENSE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case CARRIER_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case CARRIER_ID" separator=" ">
           when #{item.carrierId,jdbcType=DECIMAL} then #{item.carrierBusinessAblelicense,jdbcType=BLOB}
        </foreach>
      where CARRIER_ID in 
-     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
     #{item.carrierId,jdbcType=DECIMAL}
      </foreach> 
   </update>
   <delete id="batchDelete" parameterType="java.util.List">
     delete from RMS_CARRIER
     where CARRIER_ID in 
-    <foreach collection="list" item="id" open="(" close=")" separator=",">
+    <foreach close=")" collection="list" item="id" open="(" separator=",">
       #{id}
     </foreach>
   </delete>
   <!-- 友情提示!!!-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
-  
+
 </mapper>