Browse Source

Merge branch 'dev' of ssh://10.10.100.21/source/saas-platform into dev

chenw 7 years ago
parent
commit
92d5966825
31 changed files with 1918 additions and 4205 deletions
  1. 1 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java
  2. 6 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  3. 1 1
      applications/purchase/purchase-server/src/main/resources/mapper/PurchaseListMapper.xml
  4. 22 21
      applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/SaleDetailDTO.java
  5. 1 1
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/controller/SaleController.java
  6. 1 3
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/ProdInOutMapper.java
  7. 5 2
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/SaleListMapper.java
  8. 2 11
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/SaleMapper.java
  9. 1 2
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/SaledetailMapper.java
  10. 4 0
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/po/Sale.java
  11. 0 1941
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/po/SaleExample.java
  12. 0 1651
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/po/SaledetailExample.java
  13. 34 22
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java
  14. 1050 0
      applications/sale/sale-server/src/main/resources/mapper/ProdIODetailMapper.xml
  15. 500 0
      applications/sale/sale-server/src/main/resources/mapper/ProdInOutMapper.xml
  16. 17 71
      applications/sale/sale-server/src/main/resources/mapper/SaleListMapper.xml
  17. 44 226
      applications/sale/sale-server/src/main/resources/mapper/SaleMapper.xml
  18. 99 225
      applications/sale/sale-server/src/main/resources/mapper/SaledetailMapper.xml
  19. 4 0
      applications/storage/storage-dto/pom.xml
  20. 2 0
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/entities/ProdIODetail.java
  21. 6 0
      base-servers/gateway-server/src/main/resources/application.yml
  22. 0 1
      frontend/saas-web/app/view/core/baseform/FormPanel.js
  23. 1 1
      frontend/saas-web/app/view/core/baseform/GridPanel.js
  24. 9 7
      frontend/saas-web/app/view/core/query/QueryPanel.js
  25. 2 2
      frontend/saas-web/app/view/document/customer/FormPanel.js
  26. 13 2
      frontend/saas-web/app/view/document/kind/ChildForm.js
  27. 19 4
      frontend/saas-web/app/view/document/kind/Kind.js
  28. 9 6
      frontend/saas-web/app/view/document/kind/KindController.js
  29. 36 5
      frontend/saas-web/app/view/document/kind/KindModel.js
  30. 25 0
      frontend/saas-web/app/view/document/other/ProductBrand.js
  31. 4 0
      frontend/saas-web/resources/json/navigation.json

+ 1 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java

@@ -29,6 +29,7 @@ public enum BizExceptionCode implements BaseExceptionCode {
     SALE_ALL_TURNOUT(72000, "该销售单已全部转出货,无法转出货单"),
     SALE_CLOSE(72001, "单据已关闭,无法进行操作"),
     SALE_YQTYBEYONDQTY(72001, "明细行已转数量大于数量"),
+    SALE_NULL_BILL(72002, "单据不存在或者明细为空"),
     //资金
 
     //库存

+ 6 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java

@@ -24,6 +24,7 @@ import com.usoftchina.saas.purchase.service.PurchaseService;
 import com.usoftchina.saas.utils.BeanMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.StringUtils;
 
 import java.util.ArrayList;
@@ -90,6 +91,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
     }
 
     @Override
+    @Transactional
     public DocBaseDTO saveFormData(PurchaseFormDTO formdata) {
         if (null == formdata || null == formdata.getMain()){
             throw new BizException(500, "数据为空,请填写后再保存");
@@ -168,11 +170,13 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
     }
 
     @Override
+    @Transactional
     public void delete(Long id) {
         singleDelete(id);
     }
 
     @Override
+    @Transactional
     public int deleteDetail(Long id) {
        Integer num = purchasedetailMapper.deleteByPrimaryKey(id);
         DocBaseDTO docBaseDTO = getBaseDTOById(id);
@@ -182,6 +186,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
     }
 
     @Override
+    @Transactional
     public DocBaseDTO audit(PurchaseFormDTO formData) {
         Long id = null;
         DocBaseDTO baseDTO = null;
@@ -308,6 +313,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
     }
 
     @Override
+    @Transactional
     public Result turnProdin(Long id) {
         Purchase purchase = getMapper().selectByPrimaryKey(id);
 

+ 1 - 1
applications/purchase/purchase-server/src/main/resources/mapper/PurchaseListMapper.xml

@@ -63,7 +63,7 @@
                  ${con}
             </if>
             <if test="companyId != null">
-              and   companyId = #{companyId}
+              and   purchase.companyId = #{companyId}
             </if>
         </where>  order by pu_id,pd_detno
     </select>

+ 22 - 21
applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/SaleDetailDTO.java

@@ -5,6 +5,7 @@ import com.usoftchina.saas.base.dto.CommonBaseDTO;
 import lombok.Data;
 
 import java.io.Serializable;
+import java.util.Date;
 
 /**
  * @author: guq
@@ -12,45 +13,45 @@ import java.io.Serializable;
  **/
 @Data
 public class SaleDetailDTO extends CommonBaseDTO implements Serializable {
-    private  Long pd_puid;
+    private Long sd_said;
 
-    private String pd_code;
+    private Integer sd_detno;
 
-    private Integer pd_detno;
+    private String sd_code;
 
-    private Integer pd_prodid;
+    private Long sd_prodid;
 
-    private String pd_prodcode;
+    private String sd_prodcode;
 
-    private String pd_unit;
+    private Double sd_qty;
 
-    private Double pd_qty;
+    private Double sd_price;
 
-    private Double pd_price;
+    private Double sd_total;
 
-    private Double pd_total;
+    private Double sd_taxrate;
 
-    private Double pd_taxtotal;
+    private Double sd_netprice;
 
-    private Double pd_acceptqty;
+    private Double sd_nettotal;
 
-    private Double pd_delivery;
+    private Date sd_delivery;
 
-    private String pd_salecode;
+    private Double sd_sendqty;
 
-    private Integer pd_saledetno;
+    private Double sd_pdqty;
 
-    private Integer pd_sdid;
+    private Double sd_yqty;
 
-    private String pd_text1;
+    private String sd_remark;
 
-    private String pd_text2;
+    private String sd_text1;
 
-    private String pd_text3;
+    private String sd_text2;
 
-    private String pd_text4;
+    private String sd_text3;
 
-    private String pd_text5;
+    private String sd_text4;
 
-    private Double pd_yqty;
+    private String sd_text5;
 }

+ 1 - 1
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/controller/SaleController.java

@@ -157,7 +157,7 @@ public class SaleController {
         return Result.success();
     }
 
-    @PostMapping("/turnProdOut/{id}")
+    @GetMapping("/turnProdOut/{id}")
     public Result turnOut(@PathVariable("id") Long id) {
         saleService.turnOut(id);
         return Result.success();

+ 1 - 3
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/ProdInOutMapper.java

@@ -1,10 +1,8 @@
 package com.usoftchina.saas.sale.mapper;
 
-import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.storage.entities.ProdInOut;
-import org.apache.ibatis.annotations.Param;
 
-import java.util.List;
+
 
 public interface ProdInOutMapper {
 

+ 5 - 2
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/SaleListMapper.java

@@ -2,10 +2,13 @@ package com.usoftchina.saas.sale.mapper;
 
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.sale.po.SaleList;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
 public interface SaleListMapper {
-    List<SaleList> selectSaleBycondition(ListReqDTO list);
-    List<SaleList> selectPurchaseListByCondition(ListReqDTO list);
+
+    List<SaleList> selectPurchaseBycondition(@Param("con") String con, @Param("companyId") Long companyId);
+
+    List<SaleList> selectPurchaseListByCondition(@Param("con") String con, @Param("companyId") Long companyId);
 }

+ 2 - 11
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/SaleMapper.java

@@ -2,14 +2,10 @@ package com.usoftchina.saas.sale.mapper;
 
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.sale.po.Sale;
-import com.usoftchina.saas.sale.po.SaleExample;
 import java.util.List;
 import org.apache.ibatis.annotations.Param;
 
 public interface SaleMapper {
-    int countByExample(SaleExample example);
-
-    int deleteByExample(SaleExample example);
 
     int deleteByPrimaryKey(Long sa_id);
 
@@ -17,13 +13,8 @@ public interface SaleMapper {
 
     int insertSelective(Sale record);
 
-    List<Sale> selectByExample(SaleExample example);
-
     Sale selectByPrimaryKey(Long sa_id);
 
-    int updateByExampleSelective(@Param("record") Sale record, @Param("example") SaleExample example);
-
-    int updateByExample(@Param("record") Sale record, @Param("example") SaleExample example);
 
     int updateByPrimaryKeySelective(Sale record);
 
@@ -31,8 +22,6 @@ public interface SaleMapper {
 
     Integer validateCodeWhenInsert(String code);
 
-    Integer validateCodeWhenUpdate(String code, Long id);
-
     String selectCodeById(Long id);
 
     String validateBatchUnAudit(List<DocBaseDTO> baseDTOs);
@@ -40,4 +29,6 @@ public interface SaleMapper {
     String validateUnAudit(Long id);
 
     String validateAudit(List<DocBaseDTO> baseDTOs);
+
+    Integer validateCodeWhenUpdate(@Param("code") String code,@Param("id") Long id);
 }

+ 1 - 2
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/SaledetailMapper.java

@@ -1,9 +1,8 @@
 package com.usoftchina.saas.sale.mapper;
 
 import com.usoftchina.saas.sale.po.SaleDetail;
-import com.usoftchina.saas.sale.po.SaledetailExample;
 import java.util.List;
-import org.apache.ibatis.annotations.Param;
+
 
 public interface SaledetailMapper {
 

+ 4 - 0
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/po/Sale.java

@@ -19,10 +19,14 @@ public class Sale extends CommonBaseEntity{
 
     private String sa_custname;
 
+    private String sa_toplace;
+
     private Double sa_total;
 
     private String sa_totalupper;
 
+    private String sa_remark;
+
     private String sa_status;
 
     private String sa_statuscode;

+ 0 - 1941
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/po/SaleExample.java

@@ -1,1941 +0,0 @@
-package com.usoftchina.saas.sale.po;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-public class SaleExample {
-    protected String orderByClause;
-
-    protected boolean distinct;
-
-    protected List<Criteria> oredCriteria;
-
-    public SaleExample() {
-        oredCriteria = new ArrayList<Criteria>();
-    }
-
-    public void setOrderByClause(String orderByClause) {
-        this.orderByClause = orderByClause;
-    }
-
-    public String getOrderByClause() {
-        return orderByClause;
-    }
-
-    public void setDistinct(boolean distinct) {
-        this.distinct = distinct;
-    }
-
-    public boolean isDistinct() {
-        return distinct;
-    }
-
-    public List<Criteria> getOredCriteria() {
-        return oredCriteria;
-    }
-
-    public void or(Criteria criteria) {
-        oredCriteria.add(criteria);
-    }
-
-    public Criteria or() {
-        Criteria criteria = createCriteriaInternal();
-        oredCriteria.add(criteria);
-        return criteria;
-    }
-
-    public Criteria createCriteria() {
-        Criteria criteria = createCriteriaInternal();
-        if (oredCriteria.size() == 0) {
-            oredCriteria.add(criteria);
-        }
-        return criteria;
-    }
-
-    protected Criteria createCriteriaInternal() {
-        Criteria criteria = new Criteria();
-        return criteria;
-    }
-
-    public void clear() {
-        oredCriteria.clear();
-        orderByClause = null;
-        distinct = false;
-    }
-
-    protected abstract static class GeneratedCriteria {
-        protected List<Criterion> criteria;
-
-        protected GeneratedCriteria() {
-            super();
-            criteria = new ArrayList<Criterion>();
-        }
-
-        public boolean isValid() {
-            return criteria.size() > 0;
-        }
-
-        public List<Criterion> getAllCriteria() {
-            return criteria;
-        }
-
-        public List<Criterion> getCriteria() {
-            return criteria;
-        }
-
-        protected void addCriterion(String condition) {
-            if (condition == null) {
-                throw new RuntimeException("Value for condition cannot be null");
-            }
-            criteria.add(new Criterion(condition));
-        }
-
-        protected void addCriterion(String condition, Object value, String property) {
-            if (value == null) {
-                throw new RuntimeException("Value for " + property + " cannot be null");
-            }
-            criteria.add(new Criterion(condition, value));
-        }
-
-        protected void addCriterion(String condition, Object value1, Object value2, String property) {
-            if (value1 == null || value2 == null) {
-                throw new RuntimeException("Between values for " + property + " cannot be null");
-            }
-            criteria.add(new Criterion(condition, value1, value2));
-        }
-
-        public Criteria andSa_idIsNull() {
-            addCriterion("sa_id is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_idIsNotNull() {
-            addCriterion("sa_id is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_idEqualTo(Integer value) {
-            addCriterion("sa_id =", value, "sa_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_idNotEqualTo(Integer value) {
-            addCriterion("sa_id <>", value, "sa_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_idGreaterThan(Integer value) {
-            addCriterion("sa_id >", value, "sa_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_idGreaterThanOrEqualTo(Integer value) {
-            addCriterion("sa_id >=", value, "sa_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_idLessThan(Integer value) {
-            addCriterion("sa_id <", value, "sa_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_idLessThanOrEqualTo(Integer value) {
-            addCriterion("sa_id <=", value, "sa_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_idIn(List<Integer> values) {
-            addCriterion("sa_id in", values, "sa_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_idNotIn(List<Integer> values) {
-            addCriterion("sa_id not in", values, "sa_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_idBetween(Integer value1, Integer value2) {
-            addCriterion("sa_id between", value1, value2, "sa_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_idNotBetween(Integer value1, Integer value2) {
-            addCriterion("sa_id not between", value1, value2, "sa_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_codeIsNull() {
-            addCriterion("sa_code is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_codeIsNotNull() {
-            addCriterion("sa_code is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_codeEqualTo(String value) {
-            addCriterion("sa_code =", value, "sa_code");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_codeNotEqualTo(String value) {
-            addCriterion("sa_code <>", value, "sa_code");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_codeGreaterThan(String value) {
-            addCriterion("sa_code >", value, "sa_code");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_codeGreaterThanOrEqualTo(String value) {
-            addCriterion("sa_code >=", value, "sa_code");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_codeLessThan(String value) {
-            addCriterion("sa_code <", value, "sa_code");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_codeLessThanOrEqualTo(String value) {
-            addCriterion("sa_code <=", value, "sa_code");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_codeLike(String value) {
-            addCriterion("sa_code like", value, "sa_code");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_codeNotLike(String value) {
-            addCriterion("sa_code not like", value, "sa_code");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_codeIn(List<String> values) {
-            addCriterion("sa_code in", values, "sa_code");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_codeNotIn(List<String> values) {
-            addCriterion("sa_code not in", values, "sa_code");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_codeBetween(String value1, String value2) {
-            addCriterion("sa_code between", value1, value2, "sa_code");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_codeNotBetween(String value1, String value2) {
-            addCriterion("sa_code not between", value1, value2, "sa_code");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custidIsNull() {
-            addCriterion("sa_custid is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custidIsNotNull() {
-            addCriterion("sa_custid is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custidEqualTo(Integer value) {
-            addCriterion("sa_custid =", value, "sa_custid");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custidNotEqualTo(Integer value) {
-            addCriterion("sa_custid <>", value, "sa_custid");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custidGreaterThan(Integer value) {
-            addCriterion("sa_custid >", value, "sa_custid");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custidGreaterThanOrEqualTo(Integer value) {
-            addCriterion("sa_custid >=", value, "sa_custid");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custidLessThan(Integer value) {
-            addCriterion("sa_custid <", value, "sa_custid");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custidLessThanOrEqualTo(Integer value) {
-            addCriterion("sa_custid <=", value, "sa_custid");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custidIn(List<Integer> values) {
-            addCriterion("sa_custid in", values, "sa_custid");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custidNotIn(List<Integer> values) {
-            addCriterion("sa_custid not in", values, "sa_custid");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custidBetween(Integer value1, Integer value2) {
-            addCriterion("sa_custid between", value1, value2, "sa_custid");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custidNotBetween(Integer value1, Integer value2) {
-            addCriterion("sa_custid not between", value1, value2, "sa_custid");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custcodeIsNull() {
-            addCriterion("sa_custcode is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custcodeIsNotNull() {
-            addCriterion("sa_custcode is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custcodeEqualTo(String value) {
-            addCriterion("sa_custcode =", value, "sa_custcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custcodeNotEqualTo(String value) {
-            addCriterion("sa_custcode <>", value, "sa_custcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custcodeGreaterThan(String value) {
-            addCriterion("sa_custcode >", value, "sa_custcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custcodeGreaterThanOrEqualTo(String value) {
-            addCriterion("sa_custcode >=", value, "sa_custcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custcodeLessThan(String value) {
-            addCriterion("sa_custcode <", value, "sa_custcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custcodeLessThanOrEqualTo(String value) {
-            addCriterion("sa_custcode <=", value, "sa_custcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custcodeLike(String value) {
-            addCriterion("sa_custcode like", value, "sa_custcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custcodeNotLike(String value) {
-            addCriterion("sa_custcode not like", value, "sa_custcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custcodeIn(List<String> values) {
-            addCriterion("sa_custcode in", values, "sa_custcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custcodeNotIn(List<String> values) {
-            addCriterion("sa_custcode not in", values, "sa_custcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custcodeBetween(String value1, String value2) {
-            addCriterion("sa_custcode between", value1, value2, "sa_custcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custcodeNotBetween(String value1, String value2) {
-            addCriterion("sa_custcode not between", value1, value2, "sa_custcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custnameIsNull() {
-            addCriterion("sa_custname is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custnameIsNotNull() {
-            addCriterion("sa_custname is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custnameEqualTo(String value) {
-            addCriterion("sa_custname =", value, "sa_custname");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custnameNotEqualTo(String value) {
-            addCriterion("sa_custname <>", value, "sa_custname");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custnameGreaterThan(String value) {
-            addCriterion("sa_custname >", value, "sa_custname");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custnameGreaterThanOrEqualTo(String value) {
-            addCriterion("sa_custname >=", value, "sa_custname");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custnameLessThan(String value) {
-            addCriterion("sa_custname <", value, "sa_custname");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custnameLessThanOrEqualTo(String value) {
-            addCriterion("sa_custname <=", value, "sa_custname");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custnameLike(String value) {
-            addCriterion("sa_custname like", value, "sa_custname");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custnameNotLike(String value) {
-            addCriterion("sa_custname not like", value, "sa_custname");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custnameIn(List<String> values) {
-            addCriterion("sa_custname in", values, "sa_custname");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custnameNotIn(List<String> values) {
-            addCriterion("sa_custname not in", values, "sa_custname");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custnameBetween(String value1, String value2) {
-            addCriterion("sa_custname between", value1, value2, "sa_custname");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_custnameNotBetween(String value1, String value2) {
-            addCriterion("sa_custname not between", value1, value2, "sa_custname");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_toplaceIsNull() {
-            addCriterion("sa_toplace is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_toplaceIsNotNull() {
-            addCriterion("sa_toplace is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_toplaceEqualTo(String value) {
-            addCriterion("sa_toplace =", value, "sa_toplace");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_toplaceNotEqualTo(String value) {
-            addCriterion("sa_toplace <>", value, "sa_toplace");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_toplaceGreaterThan(String value) {
-            addCriterion("sa_toplace >", value, "sa_toplace");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_toplaceGreaterThanOrEqualTo(String value) {
-            addCriterion("sa_toplace >=", value, "sa_toplace");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_toplaceLessThan(String value) {
-            addCriterion("sa_toplace <", value, "sa_toplace");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_toplaceLessThanOrEqualTo(String value) {
-            addCriterion("sa_toplace <=", value, "sa_toplace");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_toplaceLike(String value) {
-            addCriterion("sa_toplace like", value, "sa_toplace");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_toplaceNotLike(String value) {
-            addCriterion("sa_toplace not like", value, "sa_toplace");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_toplaceIn(List<String> values) {
-            addCriterion("sa_toplace in", values, "sa_toplace");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_toplaceNotIn(List<String> values) {
-            addCriterion("sa_toplace not in", values, "sa_toplace");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_toplaceBetween(String value1, String value2) {
-            addCriterion("sa_toplace between", value1, value2, "sa_toplace");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_toplaceNotBetween(String value1, String value2) {
-            addCriterion("sa_toplace not between", value1, value2, "sa_toplace");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_totalIsNull() {
-            addCriterion("sa_total is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_totalIsNotNull() {
-            addCriterion("sa_total is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_totalEqualTo(Double value) {
-            addCriterion("sa_total =", value, "sa_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_totalNotEqualTo(Double value) {
-            addCriterion("sa_total <>", value, "sa_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_totalGreaterThan(Double value) {
-            addCriterion("sa_total >", value, "sa_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_totalGreaterThanOrEqualTo(Double value) {
-            addCriterion("sa_total >=", value, "sa_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_totalLessThan(Double value) {
-            addCriterion("sa_total <", value, "sa_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_totalLessThanOrEqualTo(Double value) {
-            addCriterion("sa_total <=", value, "sa_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_totalIn(List<Double> values) {
-            addCriterion("sa_total in", values, "sa_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_totalNotIn(List<Double> values) {
-            addCriterion("sa_total not in", values, "sa_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_totalBetween(Double value1, Double value2) {
-            addCriterion("sa_total between", value1, value2, "sa_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_totalNotBetween(Double value1, Double value2) {
-            addCriterion("sa_total not between", value1, value2, "sa_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_totalupperIsNull() {
-            addCriterion("sa_totalupper is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_totalupperIsNotNull() {
-            addCriterion("sa_totalupper is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_totalupperEqualTo(String value) {
-            addCriterion("sa_totalupper =", value, "sa_totalupper");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_totalupperNotEqualTo(String value) {
-            addCriterion("sa_totalupper <>", value, "sa_totalupper");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_totalupperGreaterThan(String value) {
-            addCriterion("sa_totalupper >", value, "sa_totalupper");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_totalupperGreaterThanOrEqualTo(String value) {
-            addCriterion("sa_totalupper >=", value, "sa_totalupper");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_totalupperLessThan(String value) {
-            addCriterion("sa_totalupper <", value, "sa_totalupper");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_totalupperLessThanOrEqualTo(String value) {
-            addCriterion("sa_totalupper <=", value, "sa_totalupper");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_totalupperLike(String value) {
-            addCriterion("sa_totalupper like", value, "sa_totalupper");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_totalupperNotLike(String value) {
-            addCriterion("sa_totalupper not like", value, "sa_totalupper");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_totalupperIn(List<String> values) {
-            addCriterion("sa_totalupper in", values, "sa_totalupper");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_totalupperNotIn(List<String> values) {
-            addCriterion("sa_totalupper not in", values, "sa_totalupper");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_totalupperBetween(String value1, String value2) {
-            addCriterion("sa_totalupper between", value1, value2, "sa_totalupper");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_totalupperNotBetween(String value1, String value2) {
-            addCriterion("sa_totalupper not between", value1, value2, "sa_totalupper");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_remarkIsNull() {
-            addCriterion("sa_remark is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_remarkIsNotNull() {
-            addCriterion("sa_remark is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_remarkEqualTo(String value) {
-            addCriterion("sa_remark =", value, "sa_remark");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_remarkNotEqualTo(String value) {
-            addCriterion("sa_remark <>", value, "sa_remark");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_remarkGreaterThan(String value) {
-            addCriterion("sa_remark >", value, "sa_remark");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_remarkGreaterThanOrEqualTo(String value) {
-            addCriterion("sa_remark >=", value, "sa_remark");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_remarkLessThan(String value) {
-            addCriterion("sa_remark <", value, "sa_remark");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_remarkLessThanOrEqualTo(String value) {
-            addCriterion("sa_remark <=", value, "sa_remark");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_remarkLike(String value) {
-            addCriterion("sa_remark like", value, "sa_remark");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_remarkNotLike(String value) {
-            addCriterion("sa_remark not like", value, "sa_remark");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_remarkIn(List<String> values) {
-            addCriterion("sa_remark in", values, "sa_remark");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_remarkNotIn(List<String> values) {
-            addCriterion("sa_remark not in", values, "sa_remark");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_remarkBetween(String value1, String value2) {
-            addCriterion("sa_remark between", value1, value2, "sa_remark");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_remarkNotBetween(String value1, String value2) {
-            addCriterion("sa_remark not between", value1, value2, "sa_remark");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_statusIsNull() {
-            addCriterion("sa_status is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_statusIsNotNull() {
-            addCriterion("sa_status is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_statusEqualTo(String value) {
-            addCriterion("sa_status =", value, "sa_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_statusNotEqualTo(String value) {
-            addCriterion("sa_status <>", value, "sa_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_statusGreaterThan(String value) {
-            addCriterion("sa_status >", value, "sa_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_statusGreaterThanOrEqualTo(String value) {
-            addCriterion("sa_status >=", value, "sa_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_statusLessThan(String value) {
-            addCriterion("sa_status <", value, "sa_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_statusLessThanOrEqualTo(String value) {
-            addCriterion("sa_status <=", value, "sa_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_statusLike(String value) {
-            addCriterion("sa_status like", value, "sa_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_statusNotLike(String value) {
-            addCriterion("sa_status not like", value, "sa_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_statusIn(List<String> values) {
-            addCriterion("sa_status in", values, "sa_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_statusNotIn(List<String> values) {
-            addCriterion("sa_status not in", values, "sa_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_statusBetween(String value1, String value2) {
-            addCriterion("sa_status between", value1, value2, "sa_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_statusNotBetween(String value1, String value2) {
-            addCriterion("sa_status not between", value1, value2, "sa_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_statuscodeIsNull() {
-            addCriterion("sa_statuscode is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_statuscodeIsNotNull() {
-            addCriterion("sa_statuscode is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_statuscodeEqualTo(String value) {
-            addCriterion("sa_statuscode =", value, "sa_statuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_statuscodeNotEqualTo(String value) {
-            addCriterion("sa_statuscode <>", value, "sa_statuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_statuscodeGreaterThan(String value) {
-            addCriterion("sa_statuscode >", value, "sa_statuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_statuscodeGreaterThanOrEqualTo(String value) {
-            addCriterion("sa_statuscode >=", value, "sa_statuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_statuscodeLessThan(String value) {
-            addCriterion("sa_statuscode <", value, "sa_statuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_statuscodeLessThanOrEqualTo(String value) {
-            addCriterion("sa_statuscode <=", value, "sa_statuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_statuscodeLike(String value) {
-            addCriterion("sa_statuscode like", value, "sa_statuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_statuscodeNotLike(String value) {
-            addCriterion("sa_statuscode not like", value, "sa_statuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_statuscodeIn(List<String> values) {
-            addCriterion("sa_statuscode in", values, "sa_statuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_statuscodeNotIn(List<String> values) {
-            addCriterion("sa_statuscode not in", values, "sa_statuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_statuscodeBetween(String value1, String value2) {
-            addCriterion("sa_statuscode between", value1, value2, "sa_statuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_statuscodeNotBetween(String value1, String value2) {
-            addCriterion("sa_statuscode not between", value1, value2, "sa_statuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_sendstatuscodeIsNull() {
-            addCriterion("sa_sendstatuscode is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_sendstatuscodeIsNotNull() {
-            addCriterion("sa_sendstatuscode is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_sendstatuscodeEqualTo(String value) {
-            addCriterion("sa_sendstatuscode =", value, "sa_sendstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_sendstatuscodeNotEqualTo(String value) {
-            addCriterion("sa_sendstatuscode <>", value, "sa_sendstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_sendstatuscodeGreaterThan(String value) {
-            addCriterion("sa_sendstatuscode >", value, "sa_sendstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_sendstatuscodeGreaterThanOrEqualTo(String value) {
-            addCriterion("sa_sendstatuscode >=", value, "sa_sendstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_sendstatuscodeLessThan(String value) {
-            addCriterion("sa_sendstatuscode <", value, "sa_sendstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_sendstatuscodeLessThanOrEqualTo(String value) {
-            addCriterion("sa_sendstatuscode <=", value, "sa_sendstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_sendstatuscodeLike(String value) {
-            addCriterion("sa_sendstatuscode like", value, "sa_sendstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_sendstatuscodeNotLike(String value) {
-            addCriterion("sa_sendstatuscode not like", value, "sa_sendstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_sendstatuscodeIn(List<String> values) {
-            addCriterion("sa_sendstatuscode in", values, "sa_sendstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_sendstatuscodeNotIn(List<String> values) {
-            addCriterion("sa_sendstatuscode not in", values, "sa_sendstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_sendstatuscodeBetween(String value1, String value2) {
-            addCriterion("sa_sendstatuscode between", value1, value2, "sa_sendstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_sendstatuscodeNotBetween(String value1, String value2) {
-            addCriterion("sa_sendstatuscode not between", value1, value2, "sa_sendstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_sendstatusIsNull() {
-            addCriterion("sa_sendstatus is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_sendstatusIsNotNull() {
-            addCriterion("sa_sendstatus is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_sendstatusEqualTo(String value) {
-            addCriterion("sa_sendstatus =", value, "sa_sendstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_sendstatusNotEqualTo(String value) {
-            addCriterion("sa_sendstatus <>", value, "sa_sendstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_sendstatusGreaterThan(String value) {
-            addCriterion("sa_sendstatus >", value, "sa_sendstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_sendstatusGreaterThanOrEqualTo(String value) {
-            addCriterion("sa_sendstatus >=", value, "sa_sendstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_sendstatusLessThan(String value) {
-            addCriterion("sa_sendstatus <", value, "sa_sendstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_sendstatusLessThanOrEqualTo(String value) {
-            addCriterion("sa_sendstatus <=", value, "sa_sendstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_sendstatusLike(String value) {
-            addCriterion("sa_sendstatus like", value, "sa_sendstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_sendstatusNotLike(String value) {
-            addCriterion("sa_sendstatus not like", value, "sa_sendstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_sendstatusIn(List<String> values) {
-            addCriterion("sa_sendstatus in", values, "sa_sendstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_sendstatusNotIn(List<String> values) {
-            addCriterion("sa_sendstatus not in", values, "sa_sendstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_sendstatusBetween(String value1, String value2) {
-            addCriterion("sa_sendstatus between", value1, value2, "sa_sendstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_sendstatusNotBetween(String value1, String value2) {
-            addCriterion("sa_sendstatus not between", value1, value2, "sa_sendstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_printstatusIsNull() {
-            addCriterion("sa_printstatus is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_printstatusIsNotNull() {
-            addCriterion("sa_printstatus is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_printstatusEqualTo(String value) {
-            addCriterion("sa_printstatus =", value, "sa_printstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_printstatusNotEqualTo(String value) {
-            addCriterion("sa_printstatus <>", value, "sa_printstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_printstatusGreaterThan(String value) {
-            addCriterion("sa_printstatus >", value, "sa_printstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_printstatusGreaterThanOrEqualTo(String value) {
-            addCriterion("sa_printstatus >=", value, "sa_printstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_printstatusLessThan(String value) {
-            addCriterion("sa_printstatus <", value, "sa_printstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_printstatusLessThanOrEqualTo(String value) {
-            addCriterion("sa_printstatus <=", value, "sa_printstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_printstatusLike(String value) {
-            addCriterion("sa_printstatus like", value, "sa_printstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_printstatusNotLike(String value) {
-            addCriterion("sa_printstatus not like", value, "sa_printstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_printstatusIn(List<String> values) {
-            addCriterion("sa_printstatus in", values, "sa_printstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_printstatusNotIn(List<String> values) {
-            addCriterion("sa_printstatus not in", values, "sa_printstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_printstatusBetween(String value1, String value2) {
-            addCriterion("sa_printstatus between", value1, value2, "sa_printstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_printstatusNotBetween(String value1, String value2) {
-            addCriterion("sa_printstatus not between", value1, value2, "sa_printstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_printstatuscodeIsNull() {
-            addCriterion("sa_printstatuscode is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_printstatuscodeIsNotNull() {
-            addCriterion("sa_printstatuscode is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_printstatuscodeEqualTo(String value) {
-            addCriterion("sa_printstatuscode =", value, "sa_printstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_printstatuscodeNotEqualTo(String value) {
-            addCriterion("sa_printstatuscode <>", value, "sa_printstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_printstatuscodeGreaterThan(String value) {
-            addCriterion("sa_printstatuscode >", value, "sa_printstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_printstatuscodeGreaterThanOrEqualTo(String value) {
-            addCriterion("sa_printstatuscode >=", value, "sa_printstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_printstatuscodeLessThan(String value) {
-            addCriterion("sa_printstatuscode <", value, "sa_printstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_printstatuscodeLessThanOrEqualTo(String value) {
-            addCriterion("sa_printstatuscode <=", value, "sa_printstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_printstatuscodeLike(String value) {
-            addCriterion("sa_printstatuscode like", value, "sa_printstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_printstatuscodeNotLike(String value) {
-            addCriterion("sa_printstatuscode not like", value, "sa_printstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_printstatuscodeIn(List<String> values) {
-            addCriterion("sa_printstatuscode in", values, "sa_printstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_printstatuscodeNotIn(List<String> values) {
-            addCriterion("sa_printstatuscode not in", values, "sa_printstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_printstatuscodeBetween(String value1, String value2) {
-            addCriterion("sa_printstatuscode between", value1, value2, "sa_printstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_printstatuscodeNotBetween(String value1, String value2) {
-            addCriterion("sa_printstatuscode not between", value1, value2, "sa_printstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorderidIsNull() {
-            addCriterion("sa_recorderid is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorderidIsNotNull() {
-            addCriterion("sa_recorderid is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorderidEqualTo(Integer value) {
-            addCriterion("sa_recorderid =", value, "sa_recorderid");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorderidNotEqualTo(Integer value) {
-            addCriterion("sa_recorderid <>", value, "sa_recorderid");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorderidGreaterThan(Integer value) {
-            addCriterion("sa_recorderid >", value, "sa_recorderid");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorderidGreaterThanOrEqualTo(Integer value) {
-            addCriterion("sa_recorderid >=", value, "sa_recorderid");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorderidLessThan(Integer value) {
-            addCriterion("sa_recorderid <", value, "sa_recorderid");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorderidLessThanOrEqualTo(Integer value) {
-            addCriterion("sa_recorderid <=", value, "sa_recorderid");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorderidIn(List<Integer> values) {
-            addCriterion("sa_recorderid in", values, "sa_recorderid");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorderidNotIn(List<Integer> values) {
-            addCriterion("sa_recorderid not in", values, "sa_recorderid");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorderidBetween(Integer value1, Integer value2) {
-            addCriterion("sa_recorderid between", value1, value2, "sa_recorderid");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorderidNotBetween(Integer value1, Integer value2) {
-            addCriterion("sa_recorderid not between", value1, value2, "sa_recorderid");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorderIsNull() {
-            addCriterion("sa_recorder is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorderIsNotNull() {
-            addCriterion("sa_recorder is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorderEqualTo(String value) {
-            addCriterion("sa_recorder =", value, "sa_recorder");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorderNotEqualTo(String value) {
-            addCriterion("sa_recorder <>", value, "sa_recorder");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorderGreaterThan(String value) {
-            addCriterion("sa_recorder >", value, "sa_recorder");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorderGreaterThanOrEqualTo(String value) {
-            addCriterion("sa_recorder >=", value, "sa_recorder");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorderLessThan(String value) {
-            addCriterion("sa_recorder <", value, "sa_recorder");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorderLessThanOrEqualTo(String value) {
-            addCriterion("sa_recorder <=", value, "sa_recorder");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorderLike(String value) {
-            addCriterion("sa_recorder like", value, "sa_recorder");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorderNotLike(String value) {
-            addCriterion("sa_recorder not like", value, "sa_recorder");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorderIn(List<String> values) {
-            addCriterion("sa_recorder in", values, "sa_recorder");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorderNotIn(List<String> values) {
-            addCriterion("sa_recorder not in", values, "sa_recorder");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorderBetween(String value1, String value2) {
-            addCriterion("sa_recorder between", value1, value2, "sa_recorder");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorderNotBetween(String value1, String value2) {
-            addCriterion("sa_recorder not between", value1, value2, "sa_recorder");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorddateIsNull() {
-            addCriterion("sa_recorddate is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorddateIsNotNull() {
-            addCriterion("sa_recorddate is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorddateEqualTo(Date value) {
-            addCriterion("sa_recorddate =", value, "sa_recorddate");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorddateNotEqualTo(Date value) {
-            addCriterion("sa_recorddate <>", value, "sa_recorddate");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorddateGreaterThan(Date value) {
-            addCriterion("sa_recorddate >", value, "sa_recorddate");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorddateGreaterThanOrEqualTo(Date value) {
-            addCriterion("sa_recorddate >=", value, "sa_recorddate");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorddateLessThan(Date value) {
-            addCriterion("sa_recorddate <", value, "sa_recorddate");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorddateLessThanOrEqualTo(Date value) {
-            addCriterion("sa_recorddate <=", value, "sa_recorddate");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorddateIn(List<Date> values) {
-            addCriterion("sa_recorddate in", values, "sa_recorddate");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorddateNotIn(List<Date> values) {
-            addCriterion("sa_recorddate not in", values, "sa_recorddate");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorddateBetween(Date value1, Date value2) {
-            addCriterion("sa_recorddate between", value1, value2, "sa_recorddate");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_recorddateNotBetween(Date value1, Date value2) {
-            addCriterion("sa_recorddate not between", value1, value2, "sa_recorddate");
-            return (Criteria) this;
-        }
-
-        public Criteria andCompanyidIsNull() {
-            addCriterion("companyid is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andCompanyidIsNotNull() {
-            addCriterion("companyid is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andCompanyidEqualTo(Integer value) {
-            addCriterion("companyid =", value, "companyid");
-            return (Criteria) this;
-        }
-
-        public Criteria andCompanyidNotEqualTo(Integer value) {
-            addCriterion("companyid <>", value, "companyid");
-            return (Criteria) this;
-        }
-
-        public Criteria andCompanyidGreaterThan(Integer value) {
-            addCriterion("companyid >", value, "companyid");
-            return (Criteria) this;
-        }
-
-        public Criteria andCompanyidGreaterThanOrEqualTo(Integer value) {
-            addCriterion("companyid >=", value, "companyid");
-            return (Criteria) this;
-        }
-
-        public Criteria andCompanyidLessThan(Integer value) {
-            addCriterion("companyid <", value, "companyid");
-            return (Criteria) this;
-        }
-
-        public Criteria andCompanyidLessThanOrEqualTo(Integer value) {
-            addCriterion("companyid <=", value, "companyid");
-            return (Criteria) this;
-        }
-
-        public Criteria andCompanyidIn(List<Integer> values) {
-            addCriterion("companyid in", values, "companyid");
-            return (Criteria) this;
-        }
-
-        public Criteria andCompanyidNotIn(List<Integer> values) {
-            addCriterion("companyid not in", values, "companyid");
-            return (Criteria) this;
-        }
-
-        public Criteria andCompanyidBetween(Integer value1, Integer value2) {
-            addCriterion("companyid between", value1, value2, "companyid");
-            return (Criteria) this;
-        }
-
-        public Criteria andCompanyidNotBetween(Integer value1, Integer value2) {
-            addCriterion("companyid not between", value1, value2, "companyid");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdaterIdIsNull() {
-            addCriterion("updaterId is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdaterIdIsNotNull() {
-            addCriterion("updaterId is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdaterIdEqualTo(Integer value) {
-            addCriterion("updaterId =", value, "updaterId");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdaterIdNotEqualTo(Integer value) {
-            addCriterion("updaterId <>", value, "updaterId");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdaterIdGreaterThan(Integer value) {
-            addCriterion("updaterId >", value, "updaterId");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdaterIdGreaterThanOrEqualTo(Integer value) {
-            addCriterion("updaterId >=", value, "updaterId");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdaterIdLessThan(Integer value) {
-            addCriterion("updaterId <", value, "updaterId");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdaterIdLessThanOrEqualTo(Integer value) {
-            addCriterion("updaterId <=", value, "updaterId");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdaterIdIn(List<Integer> values) {
-            addCriterion("updaterId in", values, "updaterId");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdaterIdNotIn(List<Integer> values) {
-            addCriterion("updaterId not in", values, "updaterId");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdaterIdBetween(Integer value1, Integer value2) {
-            addCriterion("updaterId between", value1, value2, "updaterId");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdaterIdNotBetween(Integer value1, Integer value2) {
-            addCriterion("updaterId not between", value1, value2, "updaterId");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatetimeIsNull() {
-            addCriterion("updatetime is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatetimeIsNotNull() {
-            addCriterion("updatetime is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatetimeEqualTo(Date value) {
-            addCriterion("updatetime =", value, "updatetime");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatetimeNotEqualTo(Date value) {
-            addCriterion("updatetime <>", value, "updatetime");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatetimeGreaterThan(Date value) {
-            addCriterion("updatetime >", value, "updatetime");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatetimeGreaterThanOrEqualTo(Date value) {
-            addCriterion("updatetime >=", value, "updatetime");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatetimeLessThan(Date value) {
-            addCriterion("updatetime <", value, "updatetime");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatetimeLessThanOrEqualTo(Date value) {
-            addCriterion("updatetime <=", value, "updatetime");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatetimeIn(List<Date> values) {
-            addCriterion("updatetime in", values, "updatetime");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatetimeNotIn(List<Date> values) {
-            addCriterion("updatetime not in", values, "updatetime");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatetimeBetween(Date value1, Date value2) {
-            addCriterion("updatetime between", value1, value2, "updatetime");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatetimeNotBetween(Date value1, Date value2) {
-            addCriterion("updatetime not between", value1, value2, "updatetime");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text1IsNull() {
-            addCriterion("sa_text1 is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text1IsNotNull() {
-            addCriterion("sa_text1 is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text1EqualTo(String value) {
-            addCriterion("sa_text1 =", value, "sa_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text1NotEqualTo(String value) {
-            addCriterion("sa_text1 <>", value, "sa_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text1GreaterThan(String value) {
-            addCriterion("sa_text1 >", value, "sa_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text1GreaterThanOrEqualTo(String value) {
-            addCriterion("sa_text1 >=", value, "sa_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text1LessThan(String value) {
-            addCriterion("sa_text1 <", value, "sa_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text1LessThanOrEqualTo(String value) {
-            addCriterion("sa_text1 <=", value, "sa_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text1Like(String value) {
-            addCriterion("sa_text1 like", value, "sa_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text1NotLike(String value) {
-            addCriterion("sa_text1 not like", value, "sa_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text1In(List<String> values) {
-            addCriterion("sa_text1 in", values, "sa_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text1NotIn(List<String> values) {
-            addCriterion("sa_text1 not in", values, "sa_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text1Between(String value1, String value2) {
-            addCriterion("sa_text1 between", value1, value2, "sa_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text1NotBetween(String value1, String value2) {
-            addCriterion("sa_text1 not between", value1, value2, "sa_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text2IsNull() {
-            addCriterion("sa_text2 is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text2IsNotNull() {
-            addCriterion("sa_text2 is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text2EqualTo(String value) {
-            addCriterion("sa_text2 =", value, "sa_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text2NotEqualTo(String value) {
-            addCriterion("sa_text2 <>", value, "sa_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text2GreaterThan(String value) {
-            addCriterion("sa_text2 >", value, "sa_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text2GreaterThanOrEqualTo(String value) {
-            addCriterion("sa_text2 >=", value, "sa_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text2LessThan(String value) {
-            addCriterion("sa_text2 <", value, "sa_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text2LessThanOrEqualTo(String value) {
-            addCriterion("sa_text2 <=", value, "sa_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text2Like(String value) {
-            addCriterion("sa_text2 like", value, "sa_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text2NotLike(String value) {
-            addCriterion("sa_text2 not like", value, "sa_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text2In(List<String> values) {
-            addCriterion("sa_text2 in", values, "sa_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text2NotIn(List<String> values) {
-            addCriterion("sa_text2 not in", values, "sa_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text2Between(String value1, String value2) {
-            addCriterion("sa_text2 between", value1, value2, "sa_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text2NotBetween(String value1, String value2) {
-            addCriterion("sa_text2 not between", value1, value2, "sa_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text3IsNull() {
-            addCriterion("sa_text3 is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text3IsNotNull() {
-            addCriterion("sa_text3 is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text3EqualTo(String value) {
-            addCriterion("sa_text3 =", value, "sa_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text3NotEqualTo(String value) {
-            addCriterion("sa_text3 <>", value, "sa_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text3GreaterThan(String value) {
-            addCriterion("sa_text3 >", value, "sa_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text3GreaterThanOrEqualTo(String value) {
-            addCriterion("sa_text3 >=", value, "sa_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text3LessThan(String value) {
-            addCriterion("sa_text3 <", value, "sa_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text3LessThanOrEqualTo(String value) {
-            addCriterion("sa_text3 <=", value, "sa_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text3Like(String value) {
-            addCriterion("sa_text3 like", value, "sa_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text3NotLike(String value) {
-            addCriterion("sa_text3 not like", value, "sa_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text3In(List<String> values) {
-            addCriterion("sa_text3 in", values, "sa_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text3NotIn(List<String> values) {
-            addCriterion("sa_text3 not in", values, "sa_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text3Between(String value1, String value2) {
-            addCriterion("sa_text3 between", value1, value2, "sa_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text3NotBetween(String value1, String value2) {
-            addCriterion("sa_text3 not between", value1, value2, "sa_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text4IsNull() {
-            addCriterion("sa_text4 is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text4IsNotNull() {
-            addCriterion("sa_text4 is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text4EqualTo(String value) {
-            addCriterion("sa_text4 =", value, "sa_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text4NotEqualTo(String value) {
-            addCriterion("sa_text4 <>", value, "sa_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text4GreaterThan(String value) {
-            addCriterion("sa_text4 >", value, "sa_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text4GreaterThanOrEqualTo(String value) {
-            addCriterion("sa_text4 >=", value, "sa_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text4LessThan(String value) {
-            addCriterion("sa_text4 <", value, "sa_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text4LessThanOrEqualTo(String value) {
-            addCriterion("sa_text4 <=", value, "sa_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text4Like(String value) {
-            addCriterion("sa_text4 like", value, "sa_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text4NotLike(String value) {
-            addCriterion("sa_text4 not like", value, "sa_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text4In(List<String> values) {
-            addCriterion("sa_text4 in", values, "sa_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text4NotIn(List<String> values) {
-            addCriterion("sa_text4 not in", values, "sa_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text4Between(String value1, String value2) {
-            addCriterion("sa_text4 between", value1, value2, "sa_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text4NotBetween(String value1, String value2) {
-            addCriterion("sa_text4 not between", value1, value2, "sa_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text5IsNull() {
-            addCriterion("sa_text5 is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text5IsNotNull() {
-            addCriterion("sa_text5 is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text5EqualTo(String value) {
-            addCriterion("sa_text5 =", value, "sa_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text5NotEqualTo(String value) {
-            addCriterion("sa_text5 <>", value, "sa_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text5GreaterThan(String value) {
-            addCriterion("sa_text5 >", value, "sa_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text5GreaterThanOrEqualTo(String value) {
-            addCriterion("sa_text5 >=", value, "sa_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text5LessThan(String value) {
-            addCriterion("sa_text5 <", value, "sa_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text5LessThanOrEqualTo(String value) {
-            addCriterion("sa_text5 <=", value, "sa_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text5Like(String value) {
-            addCriterion("sa_text5 like", value, "sa_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text5NotLike(String value) {
-            addCriterion("sa_text5 not like", value, "sa_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text5In(List<String> values) {
-            addCriterion("sa_text5 in", values, "sa_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text5NotIn(List<String> values) {
-            addCriterion("sa_text5 not in", values, "sa_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text5Between(String value1, String value2) {
-            addCriterion("sa_text5 between", value1, value2, "sa_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andSa_text5NotBetween(String value1, String value2) {
-            addCriterion("sa_text5 not between", value1, value2, "sa_text5");
-            return (Criteria) this;
-        }
-    }
-
-    public static class Criteria extends GeneratedCriteria {
-
-        protected Criteria() {
-            super();
-        }
-    }
-
-    public static class Criterion {
-        private String condition;
-
-        private Object value;
-
-        private Object secondValue;
-
-        private boolean noValue;
-
-        private boolean singleValue;
-
-        private boolean betweenValue;
-
-        private boolean listValue;
-
-        private String typeHandler;
-
-        public String getCondition() {
-            return condition;
-        }
-
-        public Object getValue() {
-            return value;
-        }
-
-        public Object getSecondValue() {
-            return secondValue;
-        }
-
-        public boolean isNoValue() {
-            return noValue;
-        }
-
-        public boolean isSingleValue() {
-            return singleValue;
-        }
-
-        public boolean isBetweenValue() {
-            return betweenValue;
-        }
-
-        public boolean isListValue() {
-            return listValue;
-        }
-
-        public String getTypeHandler() {
-            return typeHandler;
-        }
-
-        protected Criterion(String condition) {
-            super();
-            this.condition = condition;
-            this.typeHandler = null;
-            this.noValue = true;
-        }
-
-        protected Criterion(String condition, Object value, String typeHandler) {
-            super();
-            this.condition = condition;
-            this.value = value;
-            this.typeHandler = typeHandler;
-            if (value instanceof List<?>) {
-                this.listValue = true;
-            } else {
-                this.singleValue = true;
-            }
-        }
-
-        protected Criterion(String condition, Object value) {
-            this(condition, value, null);
-        }
-
-        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
-            super();
-            this.condition = condition;
-            this.value = value;
-            this.secondValue = secondValue;
-            this.typeHandler = typeHandler;
-            this.betweenValue = true;
-        }
-
-        protected Criterion(String condition, Object value, Object secondValue) {
-            this(condition, value, secondValue, null);
-        }
-    }
-}

+ 0 - 1651
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/po/SaledetailExample.java

@@ -1,1651 +0,0 @@
-package com.usoftchina.saas.sale.po;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-public class SaledetailExample {
-    protected String orderByClause;
-
-    protected boolean distinct;
-
-    protected List<Criteria> oredCriteria;
-
-    public SaledetailExample() {
-        oredCriteria = new ArrayList<Criteria>();
-    }
-
-    public void setOrderByClause(String orderByClause) {
-        this.orderByClause = orderByClause;
-    }
-
-    public String getOrderByClause() {
-        return orderByClause;
-    }
-
-    public void setDistinct(boolean distinct) {
-        this.distinct = distinct;
-    }
-
-    public boolean isDistinct() {
-        return distinct;
-    }
-
-    public List<Criteria> getOredCriteria() {
-        return oredCriteria;
-    }
-
-    public void or(Criteria criteria) {
-        oredCriteria.add(criteria);
-    }
-
-    public Criteria or() {
-        Criteria criteria = createCriteriaInternal();
-        oredCriteria.add(criteria);
-        return criteria;
-    }
-
-    public Criteria createCriteria() {
-        Criteria criteria = createCriteriaInternal();
-        if (oredCriteria.size() == 0) {
-            oredCriteria.add(criteria);
-        }
-        return criteria;
-    }
-
-    protected Criteria createCriteriaInternal() {
-        Criteria criteria = new Criteria();
-        return criteria;
-    }
-
-    public void clear() {
-        oredCriteria.clear();
-        orderByClause = null;
-        distinct = false;
-    }
-
-    protected abstract static class GeneratedCriteria {
-        protected List<Criterion> criteria;
-
-        protected GeneratedCriteria() {
-            super();
-            criteria = new ArrayList<Criterion>();
-        }
-
-        public boolean isValid() {
-            return criteria.size() > 0;
-        }
-
-        public List<Criterion> getAllCriteria() {
-            return criteria;
-        }
-
-        public List<Criterion> getCriteria() {
-            return criteria;
-        }
-
-        protected void addCriterion(String condition) {
-            if (condition == null) {
-                throw new RuntimeException("Value for condition cannot be null");
-            }
-            criteria.add(new Criterion(condition));
-        }
-
-        protected void addCriterion(String condition, Object value, String property) {
-            if (value == null) {
-                throw new RuntimeException("Value for " + property + " cannot be null");
-            }
-            criteria.add(new Criterion(condition, value));
-        }
-
-        protected void addCriterion(String condition, Object value1, Object value2, String property) {
-            if (value1 == null || value2 == null) {
-                throw new RuntimeException("Between values for " + property + " cannot be null");
-            }
-            criteria.add(new Criterion(condition, value1, value2));
-        }
-
-        public Criteria andSd_idIsNull() {
-            addCriterion("sd_id is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_idIsNotNull() {
-            addCriterion("sd_id is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_idEqualTo(Integer value) {
-            addCriterion("sd_id =", value, "sd_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_idNotEqualTo(Integer value) {
-            addCriterion("sd_id <>", value, "sd_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_idGreaterThan(Integer value) {
-            addCriterion("sd_id >", value, "sd_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_idGreaterThanOrEqualTo(Integer value) {
-            addCriterion("sd_id >=", value, "sd_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_idLessThan(Integer value) {
-            addCriterion("sd_id <", value, "sd_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_idLessThanOrEqualTo(Integer value) {
-            addCriterion("sd_id <=", value, "sd_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_idIn(List<Integer> values) {
-            addCriterion("sd_id in", values, "sd_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_idNotIn(List<Integer> values) {
-            addCriterion("sd_id not in", values, "sd_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_idBetween(Integer value1, Integer value2) {
-            addCriterion("sd_id between", value1, value2, "sd_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_idNotBetween(Integer value1, Integer value2) {
-            addCriterion("sd_id not between", value1, value2, "sd_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_saidIsNull() {
-            addCriterion("sd_said is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_saidIsNotNull() {
-            addCriterion("sd_said is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_saidEqualTo(Integer value) {
-            addCriterion("sd_said =", value, "sd_said");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_saidNotEqualTo(Integer value) {
-            addCriterion("sd_said <>", value, "sd_said");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_saidGreaterThan(Integer value) {
-            addCriterion("sd_said >", value, "sd_said");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_saidGreaterThanOrEqualTo(Integer value) {
-            addCriterion("sd_said >=", value, "sd_said");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_saidLessThan(Integer value) {
-            addCriterion("sd_said <", value, "sd_said");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_saidLessThanOrEqualTo(Integer value) {
-            addCriterion("sd_said <=", value, "sd_said");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_saidIn(List<Integer> values) {
-            addCriterion("sd_said in", values, "sd_said");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_saidNotIn(List<Integer> values) {
-            addCriterion("sd_said not in", values, "sd_said");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_saidBetween(Integer value1, Integer value2) {
-            addCriterion("sd_said between", value1, value2, "sd_said");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_saidNotBetween(Integer value1, Integer value2) {
-            addCriterion("sd_said not between", value1, value2, "sd_said");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_detnoIsNull() {
-            addCriterion("sd_detno is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_detnoIsNotNull() {
-            addCriterion("sd_detno is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_detnoEqualTo(Integer value) {
-            addCriterion("sd_detno =", value, "sd_detno");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_detnoNotEqualTo(Integer value) {
-            addCriterion("sd_detno <>", value, "sd_detno");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_detnoGreaterThan(Integer value) {
-            addCriterion("sd_detno >", value, "sd_detno");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_detnoGreaterThanOrEqualTo(Integer value) {
-            addCriterion("sd_detno >=", value, "sd_detno");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_detnoLessThan(Integer value) {
-            addCriterion("sd_detno <", value, "sd_detno");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_detnoLessThanOrEqualTo(Integer value) {
-            addCriterion("sd_detno <=", value, "sd_detno");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_detnoIn(List<Integer> values) {
-            addCriterion("sd_detno in", values, "sd_detno");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_detnoNotIn(List<Integer> values) {
-            addCriterion("sd_detno not in", values, "sd_detno");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_detnoBetween(Integer value1, Integer value2) {
-            addCriterion("sd_detno between", value1, value2, "sd_detno");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_detnoNotBetween(Integer value1, Integer value2) {
-            addCriterion("sd_detno not between", value1, value2, "sd_detno");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_prodidIsNull() {
-            addCriterion("sd_prodid is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_prodidIsNotNull() {
-            addCriterion("sd_prodid is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_prodidEqualTo(Integer value) {
-            addCriterion("sd_prodid =", value, "sd_prodid");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_prodidNotEqualTo(Integer value) {
-            addCriterion("sd_prodid <>", value, "sd_prodid");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_prodidGreaterThan(Integer value) {
-            addCriterion("sd_prodid >", value, "sd_prodid");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_prodidGreaterThanOrEqualTo(Integer value) {
-            addCriterion("sd_prodid >=", value, "sd_prodid");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_prodidLessThan(Integer value) {
-            addCriterion("sd_prodid <", value, "sd_prodid");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_prodidLessThanOrEqualTo(Integer value) {
-            addCriterion("sd_prodid <=", value, "sd_prodid");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_prodidIn(List<Integer> values) {
-            addCriterion("sd_prodid in", values, "sd_prodid");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_prodidNotIn(List<Integer> values) {
-            addCriterion("sd_prodid not in", values, "sd_prodid");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_prodidBetween(Integer value1, Integer value2) {
-            addCriterion("sd_prodid between", value1, value2, "sd_prodid");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_prodidNotBetween(Integer value1, Integer value2) {
-            addCriterion("sd_prodid not between", value1, value2, "sd_prodid");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_prodcodeIsNull() {
-            addCriterion("sd_prodcode is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_prodcodeIsNotNull() {
-            addCriterion("sd_prodcode is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_prodcodeEqualTo(String value) {
-            addCriterion("sd_prodcode =", value, "sd_prodcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_prodcodeNotEqualTo(String value) {
-            addCriterion("sd_prodcode <>", value, "sd_prodcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_prodcodeGreaterThan(String value) {
-            addCriterion("sd_prodcode >", value, "sd_prodcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_prodcodeGreaterThanOrEqualTo(String value) {
-            addCriterion("sd_prodcode >=", value, "sd_prodcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_prodcodeLessThan(String value) {
-            addCriterion("sd_prodcode <", value, "sd_prodcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_prodcodeLessThanOrEqualTo(String value) {
-            addCriterion("sd_prodcode <=", value, "sd_prodcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_prodcodeLike(String value) {
-            addCriterion("sd_prodcode like", value, "sd_prodcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_prodcodeNotLike(String value) {
-            addCriterion("sd_prodcode not like", value, "sd_prodcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_prodcodeIn(List<String> values) {
-            addCriterion("sd_prodcode in", values, "sd_prodcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_prodcodeNotIn(List<String> values) {
-            addCriterion("sd_prodcode not in", values, "sd_prodcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_prodcodeBetween(String value1, String value2) {
-            addCriterion("sd_prodcode between", value1, value2, "sd_prodcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_prodcodeNotBetween(String value1, String value2) {
-            addCriterion("sd_prodcode not between", value1, value2, "sd_prodcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_qtyIsNull() {
-            addCriterion("sd_qty is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_qtyIsNotNull() {
-            addCriterion("sd_qty is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_qtyEqualTo(Double value) {
-            addCriterion("sd_qty =", value, "sd_qty");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_qtyNotEqualTo(Double value) {
-            addCriterion("sd_qty <>", value, "sd_qty");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_qtyGreaterThan(Double value) {
-            addCriterion("sd_qty >", value, "sd_qty");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_qtyGreaterThanOrEqualTo(Double value) {
-            addCriterion("sd_qty >=", value, "sd_qty");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_qtyLessThan(Double value) {
-            addCriterion("sd_qty <", value, "sd_qty");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_qtyLessThanOrEqualTo(Double value) {
-            addCriterion("sd_qty <=", value, "sd_qty");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_qtyIn(List<Double> values) {
-            addCriterion("sd_qty in", values, "sd_qty");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_qtyNotIn(List<Double> values) {
-            addCriterion("sd_qty not in", values, "sd_qty");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_qtyBetween(Double value1, Double value2) {
-            addCriterion("sd_qty between", value1, value2, "sd_qty");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_qtyNotBetween(Double value1, Double value2) {
-            addCriterion("sd_qty not between", value1, value2, "sd_qty");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_priceIsNull() {
-            addCriterion("sd_price is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_priceIsNotNull() {
-            addCriterion("sd_price is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_priceEqualTo(Double value) {
-            addCriterion("sd_price =", value, "sd_price");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_priceNotEqualTo(Double value) {
-            addCriterion("sd_price <>", value, "sd_price");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_priceGreaterThan(Double value) {
-            addCriterion("sd_price >", value, "sd_price");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_priceGreaterThanOrEqualTo(Double value) {
-            addCriterion("sd_price >=", value, "sd_price");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_priceLessThan(Double value) {
-            addCriterion("sd_price <", value, "sd_price");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_priceLessThanOrEqualTo(Double value) {
-            addCriterion("sd_price <=", value, "sd_price");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_priceIn(List<Double> values) {
-            addCriterion("sd_price in", values, "sd_price");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_priceNotIn(List<Double> values) {
-            addCriterion("sd_price not in", values, "sd_price");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_priceBetween(Double value1, Double value2) {
-            addCriterion("sd_price between", value1, value2, "sd_price");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_priceNotBetween(Double value1, Double value2) {
-            addCriterion("sd_price not between", value1, value2, "sd_price");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_totalIsNull() {
-            addCriterion("sd_total is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_totalIsNotNull() {
-            addCriterion("sd_total is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_totalEqualTo(Double value) {
-            addCriterion("sd_total =", value, "sd_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_totalNotEqualTo(Double value) {
-            addCriterion("sd_total <>", value, "sd_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_totalGreaterThan(Double value) {
-            addCriterion("sd_total >", value, "sd_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_totalGreaterThanOrEqualTo(Double value) {
-            addCriterion("sd_total >=", value, "sd_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_totalLessThan(Double value) {
-            addCriterion("sd_total <", value, "sd_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_totalLessThanOrEqualTo(Double value) {
-            addCriterion("sd_total <=", value, "sd_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_totalIn(List<Double> values) {
-            addCriterion("sd_total in", values, "sd_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_totalNotIn(List<Double> values) {
-            addCriterion("sd_total not in", values, "sd_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_totalBetween(Double value1, Double value2) {
-            addCriterion("sd_total between", value1, value2, "sd_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_totalNotBetween(Double value1, Double value2) {
-            addCriterion("sd_total not between", value1, value2, "sd_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_taxrateIsNull() {
-            addCriterion("sd_taxrate is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_taxrateIsNotNull() {
-            addCriterion("sd_taxrate is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_taxrateEqualTo(Double value) {
-            addCriterion("sd_taxrate =", value, "sd_taxrate");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_taxrateNotEqualTo(Double value) {
-            addCriterion("sd_taxrate <>", value, "sd_taxrate");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_taxrateGreaterThan(Double value) {
-            addCriterion("sd_taxrate >", value, "sd_taxrate");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_taxrateGreaterThanOrEqualTo(Double value) {
-            addCriterion("sd_taxrate >=", value, "sd_taxrate");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_taxrateLessThan(Double value) {
-            addCriterion("sd_taxrate <", value, "sd_taxrate");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_taxrateLessThanOrEqualTo(Double value) {
-            addCriterion("sd_taxrate <=", value, "sd_taxrate");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_taxrateIn(List<Double> values) {
-            addCriterion("sd_taxrate in", values, "sd_taxrate");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_taxrateNotIn(List<Double> values) {
-            addCriterion("sd_taxrate not in", values, "sd_taxrate");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_taxrateBetween(Double value1, Double value2) {
-            addCriterion("sd_taxrate between", value1, value2, "sd_taxrate");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_taxrateNotBetween(Double value1, Double value2) {
-            addCriterion("sd_taxrate not between", value1, value2, "sd_taxrate");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_netpriceIsNull() {
-            addCriterion("sd_netprice is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_netpriceIsNotNull() {
-            addCriterion("sd_netprice is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_netpriceEqualTo(Double value) {
-            addCriterion("sd_netprice =", value, "sd_netprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_netpriceNotEqualTo(Double value) {
-            addCriterion("sd_netprice <>", value, "sd_netprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_netpriceGreaterThan(Double value) {
-            addCriterion("sd_netprice >", value, "sd_netprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_netpriceGreaterThanOrEqualTo(Double value) {
-            addCriterion("sd_netprice >=", value, "sd_netprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_netpriceLessThan(Double value) {
-            addCriterion("sd_netprice <", value, "sd_netprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_netpriceLessThanOrEqualTo(Double value) {
-            addCriterion("sd_netprice <=", value, "sd_netprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_netpriceIn(List<Double> values) {
-            addCriterion("sd_netprice in", values, "sd_netprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_netpriceNotIn(List<Double> values) {
-            addCriterion("sd_netprice not in", values, "sd_netprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_netpriceBetween(Double value1, Double value2) {
-            addCriterion("sd_netprice between", value1, value2, "sd_netprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_netpriceNotBetween(Double value1, Double value2) {
-            addCriterion("sd_netprice not between", value1, value2, "sd_netprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_nettotalIsNull() {
-            addCriterion("sd_nettotal is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_nettotalIsNotNull() {
-            addCriterion("sd_nettotal is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_nettotalEqualTo(Double value) {
-            addCriterion("sd_nettotal =", value, "sd_nettotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_nettotalNotEqualTo(Double value) {
-            addCriterion("sd_nettotal <>", value, "sd_nettotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_nettotalGreaterThan(Double value) {
-            addCriterion("sd_nettotal >", value, "sd_nettotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_nettotalGreaterThanOrEqualTo(Double value) {
-            addCriterion("sd_nettotal >=", value, "sd_nettotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_nettotalLessThan(Double value) {
-            addCriterion("sd_nettotal <", value, "sd_nettotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_nettotalLessThanOrEqualTo(Double value) {
-            addCriterion("sd_nettotal <=", value, "sd_nettotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_nettotalIn(List<Double> values) {
-            addCriterion("sd_nettotal in", values, "sd_nettotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_nettotalNotIn(List<Double> values) {
-            addCriterion("sd_nettotal not in", values, "sd_nettotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_nettotalBetween(Double value1, Double value2) {
-            addCriterion("sd_nettotal between", value1, value2, "sd_nettotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_nettotalNotBetween(Double value1, Double value2) {
-            addCriterion("sd_nettotal not between", value1, value2, "sd_nettotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_deliveryIsNull() {
-            addCriterion("sd_delivery is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_deliveryIsNotNull() {
-            addCriterion("sd_delivery is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_deliveryEqualTo(Date value) {
-            addCriterion("sd_delivery =", value, "sd_delivery");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_deliveryNotEqualTo(Date value) {
-            addCriterion("sd_delivery <>", value, "sd_delivery");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_deliveryGreaterThan(Date value) {
-            addCriterion("sd_delivery >", value, "sd_delivery");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_deliveryGreaterThanOrEqualTo(Date value) {
-            addCriterion("sd_delivery >=", value, "sd_delivery");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_deliveryLessThan(Date value) {
-            addCriterion("sd_delivery <", value, "sd_delivery");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_deliveryLessThanOrEqualTo(Date value) {
-            addCriterion("sd_delivery <=", value, "sd_delivery");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_deliveryIn(List<Date> values) {
-            addCriterion("sd_delivery in", values, "sd_delivery");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_deliveryNotIn(List<Date> values) {
-            addCriterion("sd_delivery not in", values, "sd_delivery");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_deliveryBetween(Date value1, Date value2) {
-            addCriterion("sd_delivery between", value1, value2, "sd_delivery");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_deliveryNotBetween(Date value1, Date value2) {
-            addCriterion("sd_delivery not between", value1, value2, "sd_delivery");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_sendqtyIsNull() {
-            addCriterion("sd_sendqty is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_sendqtyIsNotNull() {
-            addCriterion("sd_sendqty is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_sendqtyEqualTo(Double value) {
-            addCriterion("sd_sendqty =", value, "sd_sendqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_sendqtyNotEqualTo(Double value) {
-            addCriterion("sd_sendqty <>", value, "sd_sendqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_sendqtyGreaterThan(Double value) {
-            addCriterion("sd_sendqty >", value, "sd_sendqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_sendqtyGreaterThanOrEqualTo(Double value) {
-            addCriterion("sd_sendqty >=", value, "sd_sendqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_sendqtyLessThan(Double value) {
-            addCriterion("sd_sendqty <", value, "sd_sendqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_sendqtyLessThanOrEqualTo(Double value) {
-            addCriterion("sd_sendqty <=", value, "sd_sendqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_sendqtyIn(List<Double> values) {
-            addCriterion("sd_sendqty in", values, "sd_sendqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_sendqtyNotIn(List<Double> values) {
-            addCriterion("sd_sendqty not in", values, "sd_sendqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_sendqtyBetween(Double value1, Double value2) {
-            addCriterion("sd_sendqty between", value1, value2, "sd_sendqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_sendqtyNotBetween(Double value1, Double value2) {
-            addCriterion("sd_sendqty not between", value1, value2, "sd_sendqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_pdqtyIsNull() {
-            addCriterion("sd_pdqty is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_pdqtyIsNotNull() {
-            addCriterion("sd_pdqty is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_pdqtyEqualTo(Double value) {
-            addCriterion("sd_pdqty =", value, "sd_pdqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_pdqtyNotEqualTo(Double value) {
-            addCriterion("sd_pdqty <>", value, "sd_pdqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_pdqtyGreaterThan(Double value) {
-            addCriterion("sd_pdqty >", value, "sd_pdqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_pdqtyGreaterThanOrEqualTo(Double value) {
-            addCriterion("sd_pdqty >=", value, "sd_pdqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_pdqtyLessThan(Double value) {
-            addCriterion("sd_pdqty <", value, "sd_pdqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_pdqtyLessThanOrEqualTo(Double value) {
-            addCriterion("sd_pdqty <=", value, "sd_pdqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_pdqtyIn(List<Double> values) {
-            addCriterion("sd_pdqty in", values, "sd_pdqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_pdqtyNotIn(List<Double> values) {
-            addCriterion("sd_pdqty not in", values, "sd_pdqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_pdqtyBetween(Double value1, Double value2) {
-            addCriterion("sd_pdqty between", value1, value2, "sd_pdqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_pdqtyNotBetween(Double value1, Double value2) {
-            addCriterion("sd_pdqty not between", value1, value2, "sd_pdqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_remarkIsNull() {
-            addCriterion("sd_remark is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_remarkIsNotNull() {
-            addCriterion("sd_remark is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_remarkEqualTo(String value) {
-            addCriterion("sd_remark =", value, "sd_remark");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_remarkNotEqualTo(String value) {
-            addCriterion("sd_remark <>", value, "sd_remark");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_remarkGreaterThan(String value) {
-            addCriterion("sd_remark >", value, "sd_remark");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_remarkGreaterThanOrEqualTo(String value) {
-            addCriterion("sd_remark >=", value, "sd_remark");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_remarkLessThan(String value) {
-            addCriterion("sd_remark <", value, "sd_remark");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_remarkLessThanOrEqualTo(String value) {
-            addCriterion("sd_remark <=", value, "sd_remark");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_remarkLike(String value) {
-            addCriterion("sd_remark like", value, "sd_remark");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_remarkNotLike(String value) {
-            addCriterion("sd_remark not like", value, "sd_remark");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_remarkIn(List<String> values) {
-            addCriterion("sd_remark in", values, "sd_remark");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_remarkNotIn(List<String> values) {
-            addCriterion("sd_remark not in", values, "sd_remark");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_remarkBetween(String value1, String value2) {
-            addCriterion("sd_remark between", value1, value2, "sd_remark");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_remarkNotBetween(String value1, String value2) {
-            addCriterion("sd_remark not between", value1, value2, "sd_remark");
-            return (Criteria) this;
-        }
-
-        public Criteria andCompanyidIsNull() {
-            addCriterion("companyid is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andCompanyidIsNotNull() {
-            addCriterion("companyid is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andCompanyidEqualTo(Integer value) {
-            addCriterion("companyid =", value, "companyid");
-            return (Criteria) this;
-        }
-
-        public Criteria andCompanyidNotEqualTo(Integer value) {
-            addCriterion("companyid <>", value, "companyid");
-            return (Criteria) this;
-        }
-
-        public Criteria andCompanyidGreaterThan(Integer value) {
-            addCriterion("companyid >", value, "companyid");
-            return (Criteria) this;
-        }
-
-        public Criteria andCompanyidGreaterThanOrEqualTo(Integer value) {
-            addCriterion("companyid >=", value, "companyid");
-            return (Criteria) this;
-        }
-
-        public Criteria andCompanyidLessThan(Integer value) {
-            addCriterion("companyid <", value, "companyid");
-            return (Criteria) this;
-        }
-
-        public Criteria andCompanyidLessThanOrEqualTo(Integer value) {
-            addCriterion("companyid <=", value, "companyid");
-            return (Criteria) this;
-        }
-
-        public Criteria andCompanyidIn(List<Integer> values) {
-            addCriterion("companyid in", values, "companyid");
-            return (Criteria) this;
-        }
-
-        public Criteria andCompanyidNotIn(List<Integer> values) {
-            addCriterion("companyid not in", values, "companyid");
-            return (Criteria) this;
-        }
-
-        public Criteria andCompanyidBetween(Integer value1, Integer value2) {
-            addCriterion("companyid between", value1, value2, "companyid");
-            return (Criteria) this;
-        }
-
-        public Criteria andCompanyidNotBetween(Integer value1, Integer value2) {
-            addCriterion("companyid not between", value1, value2, "companyid");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdaterIdIsNull() {
-            addCriterion("updaterId is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdaterIdIsNotNull() {
-            addCriterion("updaterId is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdaterIdEqualTo(Integer value) {
-            addCriterion("updaterId =", value, "updaterId");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdaterIdNotEqualTo(Integer value) {
-            addCriterion("updaterId <>", value, "updaterId");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdaterIdGreaterThan(Integer value) {
-            addCriterion("updaterId >", value, "updaterId");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdaterIdGreaterThanOrEqualTo(Integer value) {
-            addCriterion("updaterId >=", value, "updaterId");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdaterIdLessThan(Integer value) {
-            addCriterion("updaterId <", value, "updaterId");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdaterIdLessThanOrEqualTo(Integer value) {
-            addCriterion("updaterId <=", value, "updaterId");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdaterIdIn(List<Integer> values) {
-            addCriterion("updaterId in", values, "updaterId");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdaterIdNotIn(List<Integer> values) {
-            addCriterion("updaterId not in", values, "updaterId");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdaterIdBetween(Integer value1, Integer value2) {
-            addCriterion("updaterId between", value1, value2, "updaterId");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdaterIdNotBetween(Integer value1, Integer value2) {
-            addCriterion("updaterId not between", value1, value2, "updaterId");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatetimeIsNull() {
-            addCriterion("updatetime is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatetimeIsNotNull() {
-            addCriterion("updatetime is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatetimeEqualTo(Date value) {
-            addCriterion("updatetime =", value, "updatetime");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatetimeNotEqualTo(Date value) {
-            addCriterion("updatetime <>", value, "updatetime");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatetimeGreaterThan(Date value) {
-            addCriterion("updatetime >", value, "updatetime");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatetimeGreaterThanOrEqualTo(Date value) {
-            addCriterion("updatetime >=", value, "updatetime");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatetimeLessThan(Date value) {
-            addCriterion("updatetime <", value, "updatetime");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatetimeLessThanOrEqualTo(Date value) {
-            addCriterion("updatetime <=", value, "updatetime");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatetimeIn(List<Date> values) {
-            addCriterion("updatetime in", values, "updatetime");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatetimeNotIn(List<Date> values) {
-            addCriterion("updatetime not in", values, "updatetime");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatetimeBetween(Date value1, Date value2) {
-            addCriterion("updatetime between", value1, value2, "updatetime");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatetimeNotBetween(Date value1, Date value2) {
-            addCriterion("updatetime not between", value1, value2, "updatetime");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text1IsNull() {
-            addCriterion("sd_text1 is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text1IsNotNull() {
-            addCriterion("sd_text1 is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text1EqualTo(String value) {
-            addCriterion("sd_text1 =", value, "sd_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text1NotEqualTo(String value) {
-            addCriterion("sd_text1 <>", value, "sd_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text1GreaterThan(String value) {
-            addCriterion("sd_text1 >", value, "sd_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text1GreaterThanOrEqualTo(String value) {
-            addCriterion("sd_text1 >=", value, "sd_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text1LessThan(String value) {
-            addCriterion("sd_text1 <", value, "sd_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text1LessThanOrEqualTo(String value) {
-            addCriterion("sd_text1 <=", value, "sd_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text1Like(String value) {
-            addCriterion("sd_text1 like", value, "sd_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text1NotLike(String value) {
-            addCriterion("sd_text1 not like", value, "sd_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text1In(List<String> values) {
-            addCriterion("sd_text1 in", values, "sd_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text1NotIn(List<String> values) {
-            addCriterion("sd_text1 not in", values, "sd_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text1Between(String value1, String value2) {
-            addCriterion("sd_text1 between", value1, value2, "sd_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text1NotBetween(String value1, String value2) {
-            addCriterion("sd_text1 not between", value1, value2, "sd_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text2IsNull() {
-            addCriterion("sd_text2 is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text2IsNotNull() {
-            addCriterion("sd_text2 is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text2EqualTo(String value) {
-            addCriterion("sd_text2 =", value, "sd_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text2NotEqualTo(String value) {
-            addCriterion("sd_text2 <>", value, "sd_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text2GreaterThan(String value) {
-            addCriterion("sd_text2 >", value, "sd_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text2GreaterThanOrEqualTo(String value) {
-            addCriterion("sd_text2 >=", value, "sd_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text2LessThan(String value) {
-            addCriterion("sd_text2 <", value, "sd_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text2LessThanOrEqualTo(String value) {
-            addCriterion("sd_text2 <=", value, "sd_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text2Like(String value) {
-            addCriterion("sd_text2 like", value, "sd_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text2NotLike(String value) {
-            addCriterion("sd_text2 not like", value, "sd_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text2In(List<String> values) {
-            addCriterion("sd_text2 in", values, "sd_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text2NotIn(List<String> values) {
-            addCriterion("sd_text2 not in", values, "sd_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text2Between(String value1, String value2) {
-            addCriterion("sd_text2 between", value1, value2, "sd_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text2NotBetween(String value1, String value2) {
-            addCriterion("sd_text2 not between", value1, value2, "sd_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text3IsNull() {
-            addCriterion("sd_text3 is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text3IsNotNull() {
-            addCriterion("sd_text3 is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text3EqualTo(String value) {
-            addCriterion("sd_text3 =", value, "sd_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text3NotEqualTo(String value) {
-            addCriterion("sd_text3 <>", value, "sd_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text3GreaterThan(String value) {
-            addCriterion("sd_text3 >", value, "sd_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text3GreaterThanOrEqualTo(String value) {
-            addCriterion("sd_text3 >=", value, "sd_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text3LessThan(String value) {
-            addCriterion("sd_text3 <", value, "sd_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text3LessThanOrEqualTo(String value) {
-            addCriterion("sd_text3 <=", value, "sd_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text3Like(String value) {
-            addCriterion("sd_text3 like", value, "sd_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text3NotLike(String value) {
-            addCriterion("sd_text3 not like", value, "sd_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text3In(List<String> values) {
-            addCriterion("sd_text3 in", values, "sd_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text3NotIn(List<String> values) {
-            addCriterion("sd_text3 not in", values, "sd_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text3Between(String value1, String value2) {
-            addCriterion("sd_text3 between", value1, value2, "sd_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text3NotBetween(String value1, String value2) {
-            addCriterion("sd_text3 not between", value1, value2, "sd_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text4IsNull() {
-            addCriterion("sd_text4 is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text4IsNotNull() {
-            addCriterion("sd_text4 is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text4EqualTo(String value) {
-            addCriterion("sd_text4 =", value, "sd_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text4NotEqualTo(String value) {
-            addCriterion("sd_text4 <>", value, "sd_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text4GreaterThan(String value) {
-            addCriterion("sd_text4 >", value, "sd_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text4GreaterThanOrEqualTo(String value) {
-            addCriterion("sd_text4 >=", value, "sd_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text4LessThan(String value) {
-            addCriterion("sd_text4 <", value, "sd_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text4LessThanOrEqualTo(String value) {
-            addCriterion("sd_text4 <=", value, "sd_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text4Like(String value) {
-            addCriterion("sd_text4 like", value, "sd_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text4NotLike(String value) {
-            addCriterion("sd_text4 not like", value, "sd_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text4In(List<String> values) {
-            addCriterion("sd_text4 in", values, "sd_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text4NotIn(List<String> values) {
-            addCriterion("sd_text4 not in", values, "sd_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text4Between(String value1, String value2) {
-            addCriterion("sd_text4 between", value1, value2, "sd_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text4NotBetween(String value1, String value2) {
-            addCriterion("sd_text4 not between", value1, value2, "sd_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text5IsNull() {
-            addCriterion("sd_text5 is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text5IsNotNull() {
-            addCriterion("sd_text5 is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text5EqualTo(String value) {
-            addCriterion("sd_text5 =", value, "sd_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text5NotEqualTo(String value) {
-            addCriterion("sd_text5 <>", value, "sd_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text5GreaterThan(String value) {
-            addCriterion("sd_text5 >", value, "sd_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text5GreaterThanOrEqualTo(String value) {
-            addCriterion("sd_text5 >=", value, "sd_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text5LessThan(String value) {
-            addCriterion("sd_text5 <", value, "sd_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text5LessThanOrEqualTo(String value) {
-            addCriterion("sd_text5 <=", value, "sd_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text5Like(String value) {
-            addCriterion("sd_text5 like", value, "sd_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text5NotLike(String value) {
-            addCriterion("sd_text5 not like", value, "sd_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text5In(List<String> values) {
-            addCriterion("sd_text5 in", values, "sd_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text5NotIn(List<String> values) {
-            addCriterion("sd_text5 not in", values, "sd_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text5Between(String value1, String value2) {
-            addCriterion("sd_text5 between", value1, value2, "sd_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andSd_text5NotBetween(String value1, String value2) {
-            addCriterion("sd_text5 not between", value1, value2, "sd_text5");
-            return (Criteria) this;
-        }
-    }
-
-    public static class Criteria extends GeneratedCriteria {
-
-        protected Criteria() {
-            super();
-        }
-    }
-
-    public static class Criterion {
-        private String condition;
-
-        private Object value;
-
-        private Object secondValue;
-
-        private boolean noValue;
-
-        private boolean singleValue;
-
-        private boolean betweenValue;
-
-        private boolean listValue;
-
-        private String typeHandler;
-
-        public String getCondition() {
-            return condition;
-        }
-
-        public Object getValue() {
-            return value;
-        }
-
-        public Object getSecondValue() {
-            return secondValue;
-        }
-
-        public boolean isNoValue() {
-            return noValue;
-        }
-
-        public boolean isSingleValue() {
-            return singleValue;
-        }
-
-        public boolean isBetweenValue() {
-            return betweenValue;
-        }
-
-        public boolean isListValue() {
-            return listValue;
-        }
-
-        public String getTypeHandler() {
-            return typeHandler;
-        }
-
-        protected Criterion(String condition) {
-            super();
-            this.condition = condition;
-            this.typeHandler = null;
-            this.noValue = true;
-        }
-
-        protected Criterion(String condition, Object value, String typeHandler) {
-            super();
-            this.condition = condition;
-            this.value = value;
-            this.typeHandler = typeHandler;
-            if (value instanceof List<?>) {
-                this.listValue = true;
-            } else {
-                this.singleValue = true;
-            }
-        }
-
-        protected Criterion(String condition, Object value) {
-            this(condition, value, null);
-        }
-
-        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
-            super();
-            this.condition = condition;
-            this.value = value;
-            this.secondValue = secondValue;
-            this.typeHandler = typeHandler;
-            this.betweenValue = true;
-        }
-
-        protected Criterion(String condition, Object value, Object secondValue) {
-            this(condition, value, secondValue, null);
-        }
-    }
-}

+ 34 - 22
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java

@@ -29,12 +29,14 @@ import com.usoftchina.saas.storage.entities.ProdInOut;
 import com.usoftchina.saas.utils.BeanMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.StringUtils;
 
 import java.security.MessageDigest;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
+import java.util.Random;
 
 /**
  * @author: guq
@@ -49,10 +51,10 @@ public class SaleServiceImpl implements SaleService{
     private SaleMapper saleMapper;
     @Autowired
     private SaledetailMapper saledetailMapper;
-    @Autowired
+   /* @Autowired
     private MessageLogService messageLogService;
     @Autowired
-    private MaxnumberService maxnumberService;
+    private MaxnumberService maxnumberService;*/
     @Autowired
     private ProdInOutMapper prodInOutMapper;
     @Autowired
@@ -93,6 +95,7 @@ public class SaleServiceImpl implements SaleService{
     }
 
     @Override
+    @Transactional
     public DocBaseDTO saveFormData(SaleFormDTO formdata) {
         if (null == formdata || null == formdata.getMain()){
             throw new BizException(500, "数据为空,请填写后再保存");
@@ -118,7 +121,7 @@ public class SaleServiceImpl implements SaleService{
         sale.setCreateTime(new Date());
 
         //编号校验
-        sa_code = pushMaxnubmer(sa_code, sa_id);
+        //sa_code = pushMaxnubmer(sa_code, sa_id);
         //单号赋值
         sale.setSa_code(sa_code);
         //判断更新与保存动作
@@ -139,7 +142,7 @@ public class SaleServiceImpl implements SaleService{
             }
             baseDTO = getBaseDTOById(sa_id);
             //日志记录
-            messageLogService.save(baseDTO);
+            //messageLogService.save(baseDTO);
             return baseDTO;
         }
         //更新操作
@@ -165,11 +168,12 @@ public class SaleServiceImpl implements SaleService{
         }
         baseDTO = getBaseDTOById(sa_id);
         //日志
-        messageLogService.save(baseDTO);
+        //messageLogService.save(baseDTO);
         return baseDTO;
     }
 
     @Override
+    @Transactional
     public void delete(Long id) {
         singleDelete(id);
     }
@@ -179,11 +183,12 @@ public class SaleServiceImpl implements SaleService{
         Integer num = saledetailMapper.deleteByPrimaryKey(id);
         DocBaseDTO docBaseDTO = getBaseDTOById(id);
         //日志
-        messageLogService.deleteDetail(docBaseDTO);
+        //messageLogService.deleteDetail(docBaseDTO);
         return num;
     }
 
     @Override
+    @Transactional
     public DocBaseDTO audit(SaleFormDTO formData) {
         Long id = null;
         DocBaseDTO baseDTO = null;
@@ -251,7 +256,7 @@ public class SaleServiceImpl implements SaleService{
 
         DocBaseDTO docBaseDTO = getBaseDTOById(id);
         //日志
-        messageLogService.audit(docBaseDTO);
+        //messageLogService.audit(docBaseDTO);
     }
 
     private void singleDelete(Long id) {
@@ -262,17 +267,22 @@ public class SaleServiceImpl implements SaleService{
             saleMapper.deleteByPrimaryKey(id);
             DocBaseDTO docBaseDTO = getBaseDTOById(id);
             //日志
-            messageLogService.delete(docBaseDTO);
+            //messageLogService.delete(docBaseDTO);
         }
     }
 
 
     private List<SaleList> getListByMode(ListReqDTO req) {
         List<SaleList> list = null;
+        Long companyId = BaseContextHolder.getCompanyId();
+        String con = req.getFinalCondition();
+        if (null == con) {
+            con = "1=1";
+        }
         if (null == req || StringUtils.isEmpty(req.getMode()) || "MAIN".equals(req.getMode())) {
-            list = saleListMapper.selectSaleBycondition(req);
+            list = saleListMapper.selectPurchaseBycondition(con, companyId);
         } else {
-            list = saleListMapper.selectPurchaseListByCondition(req);
+            list = saleListMapper.selectPurchaseListByCondition(con, companyId);
         }
         return list;
     }
@@ -284,14 +294,14 @@ public class SaleServiceImpl implements SaleService{
      * @Author: guq
      * @Date: 2018/10/19
      */
-    private String pushMaxnubmer(String code, Long id) {
+   /* private String pushMaxnubmer(String code, Long id) {
         if (null == code) {
             throw new BizException(BizExceptionCode.NULL_CODE);
         }
         Integer count = "0".equals(String.valueOf(id)) ? saleMapper.validateCodeWhenInsert(code) :
                 saleMapper.validateCodeWhenUpdate(code, id);
         return maxnumberService.pushMaxnubmer(count, code, "Purchase").getData();
-    }
+    }*/
 
     /**
      * @Description
@@ -308,7 +318,7 @@ public class SaleServiceImpl implements SaleService{
         DocBaseDTO baseDTO = new DocBaseDTO();
         baseDTO.setId(id);
         baseDTO.setCode(code);
-        baseDTO.setName("Purchase");
+        baseDTO.setName("Sale");
         return baseDTO;
     }
 
@@ -337,10 +347,11 @@ public class SaleServiceImpl implements SaleService{
         saleMapper.updateByPrimaryKeySelective(sale);
         DocBaseDTO docBaseDTO = getBaseDTOById(id);
         //日志
-        messageLogService.close(docBaseDTO);
+        //messageLogService.close(docBaseDTO);
     }
 
     @Override
+    @Transactional
     public void open(long id) {
         List<SaleDetail> saleDetailList = saledetailMapper.selectByFK(id);
         //部分入库、全部入库
@@ -372,20 +383,21 @@ public class SaleServiceImpl implements SaleService{
             saleMapper.updateByPrimaryKeySelective(sale);
             DocBaseDTO docBaseDTO = getBaseDTOById(id);
             //日志
-            messageLogService.open(docBaseDTO);
+            //messageLogService.open(docBaseDTO);
         }
     }
 
     @Override
+    @Transactional
     public void turnOut(Long id) {
-        if (null == id) {
-            return;
-        }
         Integer count = 0;
         double pdQty = 0;
         double pdYqty = 0;
         Sale sale = saleMapper.selectByPrimaryKey(id);
         List<SaleDetail> details = saledetailMapper.selectByFK(id);
+        if (null == sale || StringUtils.isEmpty(sale.getSa_code()) || details.size() == 0) {
+            throw new BizException(BizExceptionCode.SALE_NULL_BILL);
+        }
         //检查转单状态
         String statuscode = sale.getSa_sendstatuscode();
         if (Status.TURNOUT.name().equals(statuscode)){
@@ -411,9 +423,9 @@ public class SaleServiceImpl implements SaleService{
         //插入验收单主表
         ProdInOut prodInOut = new ProdInOut();
         //生成单号
-        Object data = maxnumberService.getMaxnumber("Sale", true).getData();
-        JSONObject parse = (JSONObject)JSONObject.parse(data.toString());
-        String pi_inoutno = String.valueOf(parse.get("code"));
+        //String pi_inoutno = maxnumberService.getMaxnumber("Sale", true).getData();
+       // Object data =
+        String pi_inoutno = "xxxxx" + (int)(Math.random()*100)+1;;
 
         prodInOut.setPi_inoutno(pi_inoutno);
         prodInOut.setPi_class("出货单");
@@ -475,7 +487,7 @@ public class SaleServiceImpl implements SaleService{
         saleMapper.updateByPrimaryKeySelective(sale);
         DocBaseDTO docBaseDTO = getBaseDTOById(id);
         //日志
-        messageLogService.unAudit(docBaseDTO);
+        //messageLogService.unAudit(docBaseDTO);
     }
 
 

+ 1050 - 0
applications/sale/sale-server/src/main/resources/mapper/ProdIODetailMapper.xml

@@ -0,0 +1,1050 @@
+<?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.usoftchina.saas.sale.mapper.ProdIODetailMapper">
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.storage.entities.ProdIODetail">
+    <id column="pd_id" jdbcType="INTEGER" property="id" />
+    <result column="pd_piid" jdbcType="INTEGER" property="pd_piid" />
+    <result column="pd_inoutno" jdbcType="VARCHAR" property="pd_inoutno" />
+    <result column="pd_piclass" jdbcType="VARCHAR" property="pd_piclass" />
+    <result column="pd_pdno" jdbcType="INTEGER" property="pd_pdno" />
+    <result column="pd_ordercode" jdbcType="VARCHAR" property="pd_ordercode" />
+    <result column="pd_orderdetno" jdbcType="INTEGER" property="pd_orderdetno" />
+    <result column="pd_prodid" jdbcType="INTEGER" property="pd_prodid" />
+    <result column="pd_prodcode" jdbcType="VARCHAR" property="pd_prodcode" />
+    <result column="pd_unit" jdbcType="VARCHAR" property="pd_unit" />
+    <result column="pd_inqty" jdbcType="INTEGER" property="pd_inqty" />
+    <result column="pd_outqty" jdbcType="INTEGER" property="pd_outqty" />
+    <result column="pd_orderprice" jdbcType="DOUBLE" property="pd_orderprice" />
+    <result column="pd_sendprice" jdbcType="DOUBLE" property="pd_sendprice" />
+    <result column="pd_price" jdbcType="DOUBLE" property="pd_price" />
+    <result column="pd_total" jdbcType="DOUBLE" property="pd_total" />
+    <result column="pd_taxrate" jdbcType="DOUBLE" property="pd_taxrate" />
+    <result column="pd_netprice" jdbcType="DOUBLE" property="pd_netprice" />
+    <result column="pd_nettotal" jdbcType="DOUBLE" property="pd_nettotal" />
+    <result column="pd_whid" jdbcType="INTEGER" property="pd_whid" />
+    <result column="pd_whcode" jdbcType="VARCHAR" property="pd_whcode" />
+    <result column="pd_whname" jdbcType="VARCHAR" property="pd_whname" />
+    <result column="pd_inwhid" jdbcType="INTEGER" property="pd_inwhid" />
+    <result column="pd_inwhcode" jdbcType="VARCHAR" property="pd_inwhcode" />
+    <result column="pd_inwhname" jdbcType="VARCHAR" property="pd_inwhname" />
+    <result column="pd_orderid" jdbcType="INTEGER" property="pd_orderid" />
+    <result column="pd_sdid" jdbcType="INTEGER" property="pd_sdid" />
+    <result column="pd_status" jdbcType="INTEGER" property="pd_status" />
+    <result column="companyid" jdbcType="INTEGER" property="companyId" />
+    <result column="updaterid" jdbcType="INTEGER" property="updaterId" />
+    <result column="updatetime" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="pd_text1" jdbcType="VARCHAR" property="pd_text1" />
+    <result column="pd_text2" jdbcType="VARCHAR" property="pd_text2" />
+    <result column="pd_text3" jdbcType="VARCHAR" property="pd_text3" />
+    <result column="pd_text4" jdbcType="VARCHAR" property="pd_text4" />
+    <result column="pd_text5" jdbcType="VARCHAR" property="pd_text5" />
+    <result column="pd_ym" jdbcType="INTEGER" property="pd_ym" />
+    <result column="pd_yqty" jdbcType="INTEGER" property="pd_yqty" />
+    <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
+    <association property="product" javaType="com.usoftchina.saas.document.entities.Product">
+      <id column="pr_id" property="id"/>
+      <result column="pr_code" property="pr_code"/>
+      <result column="pr_detail" property="pr_detail"/>
+      <result column="pr_spec" property="pr_spec"/>
+      <result column="pr_unit" property="pr_unit"/>
+      <result column="pr_kind" property="pr_kind"/>
+      <result column="pr_orispeccode" property="pr_orispeccode"/>
+      <result column="pr_whid" property="pr_whid"/>
+      <result column="pr_whcode" property="pr_whcode"/>
+      <result column="pr_whname" property="pr_whname"/>
+      <result column="pr_zxbzs" property="pr_zxbzs"/>
+      <result column="pr_leadtime" property="pr_leadtime"/>
+      <result column="pr_brand" property="pr_brand"/>
+      <result column="pr_standardprice" property="pr_standardprice"/>
+      <result column="pr_purcprice" property="pr_purcprice"/>
+      <result column="pr_saleprice" property="pr_saleprice"/>
+      <result column="pr_vendid" property="pr_vendid"/>
+      <result column="pr_vendname" property="pr_vendname"/>
+      <result column="pr_vendcode" property="pr_vendcode"/>
+      <result column="pr_docdate" property="pr_docdate"/>
+      <result column="pr_recordmanid" property="pr_recordmanid"/>
+      <result column="pr_recordman" property="pr_recordman"/>
+      <result column="pr_status" property="pr_status"/>
+      <result column="pr_statuscode" property="pr_statuscode"/>
+      <result column="pr_text1" property="pr_text1"/>
+      <result column="pr_text2" property="pr_text2"/>
+      <result column="pr_text3" property="pr_text3"/>
+      <result column="pr_text4" property="pr_text4"/>
+    </association>
+  </resultMap>
+  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.storage.entities.ProdIODetail">
+    <result column="pd_remark" jdbcType="LONGVARCHAR" property="pd_remark" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    pd_id, pd_piid, pd_inoutno, pd_piclass, pd_pdno, pd_ordercode, pd_orderdetno, pd_prodid, 
+    pd_prodcode, pd_unit, pd_inqty, pd_outqty, pd_orderprice, pd_sendprice, pd_price, 
+    pd_total, pd_taxrate, pd_netprice, pd_nettotal, pd_whid, pd_whcode, pd_whname, pd_inwhid, 
+    pd_inwhcode, pd_inwhname, pd_orderid, pd_sdid, pd_status, companyid, updaterid, updatetime, 
+    pd_text1, pd_text2, pd_text3, pd_text4, pd_text5, pd_ym, pd_yqty,pd_ioid
+  </sql>
+  <sql id="Blob_Column_List">
+    pd_remark
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
+    select 
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from prodiodetail
+    where pd_id = #{pd_id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from prodiodetail
+    where pd_id = #{pd_id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.saas.storage.entities.ProdInOut">
+    insert into prodiodetail (pd_id, pd_piid, pd_inoutno, 
+      pd_piclass, pd_pdno, pd_ordercode, 
+      pd_orderdetno, pd_prodid, pd_prodcode, 
+      pd_unit, pd_inqty, pd_outqty, 
+      pd_orderprice, pd_sendprice, pd_price, 
+      pd_total, pd_taxrate, pd_netprice, 
+      pd_nettotal, pd_whid, pd_whcode, 
+      pd_whname, pd_inwhid, pd_inwhcode, 
+      pd_inwhname, pd_orderid, pd_sdid, 
+      pd_status, companyid, updaterid, 
+      updatetime, pd_text1, pd_text2, 
+      pd_text3, pd_text4, pd_text5, 
+      pd_ym, pd_yqty, pd_remark,pd_ioid
+      )
+    values (#{pd_id,jdbcType=INTEGER}, #{pd_piid,jdbcType=INTEGER}, #{pd_inoutno,jdbcType=VARCHAR}, 
+      #{pd_piclass,jdbcType=VARCHAR}, #{pd_pdno,jdbcType=INTEGER}, #{pd_ordercode,jdbcType=VARCHAR}, 
+      #{pd_orderdetno,jdbcType=INTEGER}, #{pd_prodid,jdbcType=INTEGER}, #{pd_prodcode,jdbcType=VARCHAR}, 
+      #{pd_unit,jdbcType=VARCHAR}, #{pd_inqty,jdbcType=INTEGER}, #{pd_outqty,jdbcType=INTEGER}, 
+      #{pd_orderprice,jdbcType=DOUBLE}, #{pd_sendprice,jdbcType=DOUBLE}, #{pd_price,jdbcType=DOUBLE}, 
+      #{pd_total,jdbcType=DOUBLE}, #{pd_taxrate,jdbcType=DOUBLE}, #{pd_netprice,jdbcType=DOUBLE},
+      #{pd_nettotal,jdbcType=DOUBLE}, #{pd_whid,jdbcType=INTEGER}, #{pd_whcode,jdbcType=VARCHAR}, 
+      #{pd_whname,jdbcType=VARCHAR}, #{pd_inwhid,jdbcType=INTEGER}, #{pd_inwhcode,jdbcType=VARCHAR}, 
+      #{pd_inwhname,jdbcType=VARCHAR}, #{pd_orderid,jdbcType=INTEGER}, #{pd_sdid,jdbcType=INTEGER}, 
+      #{pd_status,jdbcType=INTEGER}, #{companyid,jdbcType=INTEGER}, #{updaterid,jdbcType=INTEGER}, 
+      #{updatetime,jdbcType=TIMESTAMP}, #{pd_text1,jdbcType=VARCHAR}, #{pd_text2,jdbcType=VARCHAR}, 
+      #{pd_text3,jdbcType=VARCHAR}, #{pd_text4,jdbcType=VARCHAR}, #{pd_text5,jdbcType=VARCHAR}, 
+      #{pd_ym,jdbcType=INTEGER}, #{pd_yqty,jdbcType=INTEGER}, #{pd_remark,jdbcType=LONGVARCHAR},
+      #{pd_ioid,jdbcType=INTEGER}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.storage.entities.ProdInOut">
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
+    insert into prodiodetail
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="pd_piid != null">
+        pd_piid,
+      </if>
+      <if test="pd_inoutno != null">
+        pd_inoutno,
+      </if>
+      <if test="pd_piclass != null">
+        pd_piclass,
+      </if>
+      <if test="pd_pdno != null">
+        pd_pdno,
+      </if>
+      <if test="pd_ordercode != null">
+        pd_ordercode,
+      </if>
+      <if test="pd_orderdetno != null">
+        pd_orderdetno,
+      </if>
+      <if test="pd_prodid != null">
+        pd_prodid,
+      </if>
+      <if test="pd_prodcode != null">
+        pd_prodcode,
+      </if>
+      <if test="pd_unit != null">
+        pd_unit,
+      </if>
+      <if test="pd_inqty != null">
+        pd_inqty,
+      </if>
+      <if test="pd_outqty != null">
+        pd_outqty,
+      </if>
+      <if test="pd_orderprice != null">
+        pd_orderprice,
+      </if>
+      <if test="pd_sendprice != null">
+        pd_sendprice,
+      </if>
+      <if test="pd_price != null">
+        pd_price,
+      </if>
+      <if test="pd_total != null">
+        pd_total,
+      </if>
+      <if test="pd_taxrate != null">
+        pd_taxrate,
+      </if>
+      <if test="pd_netprice != null">
+        pd_netprice,
+      </if>
+      <if test="pd_nettotal != null">
+        pd_nettotal,
+      </if>
+      <if test="pd_whid != null">
+        pd_whid,
+      </if>
+      <if test="pd_whcode != null">
+        pd_whcode,
+      </if>
+      <if test="pd_whname != null">
+        pd_whname,
+      </if>
+      <if test="pd_inwhid != null">
+        pd_inwhid,
+      </if>
+      <if test="pd_inwhcode != null">
+        pd_inwhcode,
+      </if>
+      <if test="pd_inwhname != null">
+        pd_inwhname,
+      </if>
+      <if test="pd_orderid != null">
+        pd_orderid,
+      </if>
+      <if test="pd_sdid != null">
+        pd_sdid,
+      </if>
+      <if test="pd_status != null">
+        pd_status,
+      </if>
+      <if test="companyId != null">
+        companyid,
+      </if>
+      <if test="updaterId != null">
+        updaterid,
+      </if>
+      <if test="updateTime != null">
+        updatetime,
+      </if>
+      <if test="pd_text1 != null">
+        pd_text1,
+      </if>
+      <if test="pd_text2 != null">
+        pd_text2,
+      </if>
+      <if test="pd_text3 != null">
+        pd_text3,
+      </if>
+      <if test="pd_text4 != null">
+        pd_text4,
+      </if>
+      <if test="pd_text5 != null">
+        pd_text5,
+      </if>
+      <if test="pd_ym != null">
+        pd_ym,
+      </if>
+      <if test="pd_yqty != null">
+        pd_yqty,
+      </if>
+      <if test="pd_remark != null">
+        pd_remark,
+      </if>
+      <if test="pd_ioid != null">
+        pd_ioid,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="pd_piid != null">
+        #{pd_piid,jdbcType=INTEGER},
+      </if>
+      <if test="pd_inoutno != null">
+        #{pd_inoutno,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_piclass != null">
+        #{pd_piclass,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_pdno != null">
+        #{pd_pdno,jdbcType=INTEGER},
+      </if>
+      <if test="pd_ordercode != null">
+        #{pd_ordercode,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_orderdetno != null">
+        #{pd_orderdetno,jdbcType=INTEGER},
+      </if>
+      <if test="pd_prodid != null">
+        #{pd_prodid,jdbcType=INTEGER},
+      </if>
+      <if test="pd_prodcode != null">
+        #{pd_prodcode,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_unit != null">
+        #{pd_unit,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_inqty != null">
+        #{pd_inqty,jdbcType=INTEGER},
+      </if>
+      <if test="pd_outqty != null">
+        #{pd_outqty,jdbcType=INTEGER},
+      </if>
+      <if test="pd_orderprice != null">
+        #{pd_orderprice,jdbcType=DOUBLE},
+      </if>
+      <if test="pd_sendprice != null">
+        #{pd_sendprice,jdbcType=DOUBLE},
+      </if>
+      <if test="pd_price != null">
+        #{pd_price,jdbcType=DOUBLE},
+      </if>
+      <if test="pd_total != null">
+        #{pd_total,jdbcType=DOUBLE},
+      </if>
+      <if test="pd_taxrate != null">
+        #{pd_taxrate,jdbcType=DOUBLE},
+      </if>
+      <if test="pd_netprice != null">
+        #{pd_netprice,jdbcType=DOUBLE},
+      </if>
+      <if test="pd_nettotal != null">
+        #{pd_nettotal,jdbcType=DOUBLE},
+      </if>
+      <if test="pd_whid != null">
+        #{pd_whid,jdbcType=INTEGER},
+      </if>
+      <if test="pd_whcode != null">
+        #{pd_whcode,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_whname != null">
+        #{pd_whname,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_inwhid != null">
+        #{pd_inwhid,jdbcType=INTEGER},
+      </if>
+      <if test="pd_inwhcode != null">
+        #{pd_inwhcode,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_inwhname != null">
+        #{pd_inwhname,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_orderid != null">
+        #{pd_orderid,jdbcType=INTEGER},
+      </if>
+      <if test="pd_sdid != null">
+        #{pd_sdid,jdbcType=INTEGER},
+      </if>
+      <if test="pd_status != null">
+        #{pd_status,jdbcType=INTEGER},
+      </if>
+      <if test="companyId != null">
+        #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null">
+        #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pd_text1 != null">
+        #{pd_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_text2 != null">
+        #{pd_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_text3 != null">
+        #{pd_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_text4 != null">
+        #{pd_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_text5 != null">
+        #{pd_text5,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_ym != null">
+        #{pd_ym,jdbcType=INTEGER},
+      </if>
+      <if test="pd_yqty != null">
+        #{pd_yqty,jdbcType=INTEGER},
+      </if>
+      <if test="pd_remark != null">
+        #{pd_remark,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="pd_ioid != null">
+        #{pd_ioid,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.storage.entities.ProdInOut">
+    update prodiodetail
+    <set>
+      <if test="pd_piid != null">
+        pd_piid = #{pd_piid,jdbcType=INTEGER},
+      </if>
+      <if test="pd_inoutno != null">
+        pd_inoutno = #{pd_inoutno,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_piclass != null">
+        pd_piclass = #{pd_piclass,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_pdno != null">
+        pd_pdno = #{pd_pdno,jdbcType=INTEGER},
+      </if>
+      <if test="pd_ordercode != null">
+        pd_ordercode = #{pd_ordercode,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_orderdetno != null">
+        pd_orderdetno = #{pd_orderdetno,jdbcType=INTEGER},
+      </if>
+      <if test="pd_prodid != null">
+        pd_prodid = #{pd_prodid,jdbcType=INTEGER},
+      </if>
+      <if test="pd_prodcode != null">
+        pd_prodcode = #{pd_prodcode,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_unit != null">
+        pd_unit = #{pd_unit,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_inqty != null">
+        pd_inqty = #{pd_inqty,jdbcType=INTEGER},
+      </if>
+      <if test="pd_outqty != null">
+        pd_outqty = #{pd_outqty,jdbcType=INTEGER},
+      </if>
+      <if test="pd_orderprice != null">
+        pd_orderprice = #{pd_orderprice,jdbcType=DOUBLE},
+      </if>
+      <if test="pd_sendprice != null">
+        pd_sendprice = #{pd_sendprice,jdbcType=DOUBLE},
+      </if>
+      <if test="pd_price != null">
+        pd_price = #{pd_price,jdbcType=DOUBLE},
+      </if>
+      <if test="pd_total != null">
+        pd_total = #{pd_total,jdbcType=DOUBLE},
+      </if>
+      <if test="pd_taxrate != null">
+        pd_taxrate = #{pd_taxrate,jdbcType=DOUBLE},
+      </if>
+      <if test="pd_netprice != null">
+        pd_netprice = #{pd_netprice,jdbcType=DOUBLE},
+      </if>
+      <if test="pd_nettotal != null">
+        pd_nettotal = #{pd_nettotal,jdbcType=DOUBLE},
+      </if>
+      <if test="pd_whid != null">
+        pd_whid = #{pd_whid,jdbcType=INTEGER},
+      </if>
+      <if test="pd_whcode != null">
+        pd_whcode = #{pd_whcode,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_whname != null">
+        pd_whname = #{pd_whname,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_inwhid != null">
+        pd_inwhid = #{pd_inwhid,jdbcType=INTEGER},
+      </if>
+      <if test="pd_inwhcode != null">
+        pd_inwhcode = #{pd_inwhcode,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_inwhname != null">
+        pd_inwhname = #{pd_inwhname,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_orderid != null">
+        pd_orderid = #{pd_orderid,jdbcType=INTEGER},
+      </if>
+      <if test="pd_sdid != null">
+        pd_sdid = #{pd_sdid,jdbcType=INTEGER},
+      </if>
+      <if test="pd_status != null">
+        pd_status = #{pd_status,jdbcType=INTEGER},
+      </if>
+      <if test="companyId != null">
+        companyid = #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null">
+        updaterid = #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null">
+        updatetime = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pd_text1 != null">
+        pd_text1 = #{pd_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_text2 != null">
+        pd_text2 = #{pd_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_text3 != null">
+        pd_text3 = #{pd_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_text4 != null">
+        pd_text4 = #{pd_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_text5 != null">
+        pd_text5 = #{pd_text5,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_ym != null">
+        pd_ym = #{pd_ym,jdbcType=INTEGER},
+      </if>
+      <if test="pd_yqty != null">
+        pd_yqty = #{pd_yqty,jdbcType=INTEGER},
+      </if>
+      <if test="pd_remark != null">
+        pd_remark = #{pd_remark,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="pd_ioid != null">
+        pd_ioid = #{pd_ioid,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    where pd_id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.saas.storage.entities.ProdInOut">
+    update prodiodetail
+    set pd_piid = #{pd_piid,jdbcType=INTEGER},
+      pd_inoutno = #{pd_inoutno,jdbcType=VARCHAR},
+      pd_piclass = #{pd_piclass,jdbcType=VARCHAR},
+      pd_pdno = #{pd_pdno,jdbcType=INTEGER},
+      pd_ordercode = #{pd_ordercode,jdbcType=VARCHAR},
+      pd_orderdetno = #{pd_orderdetno,jdbcType=INTEGER},
+      pd_prodid = #{pd_prodid,jdbcType=INTEGER},
+      pd_prodcode = #{pd_prodcode,jdbcType=VARCHAR},
+      pd_unit = #{pd_unit,jdbcType=VARCHAR},
+      pd_inqty = #{pd_inqty,jdbcType=INTEGER},
+      pd_outqty = #{pd_outqty,jdbcType=INTEGER},
+      pd_orderprice = #{pd_orderprice,jdbcType=DOUBLE},
+      pd_sendprice = #{pd_sendprice,jdbcType=DOUBLE},
+      pd_price = #{pd_price,jdbcType=DOUBLE},
+      pd_total = #{pd_total,jdbcType=DOUBLE},
+      pd_taxrate = #{pd_taxrate,jdbcType=DOUBLE},
+      pd_netprice = #{pd_netprice,jdbcType=DOUBLE},
+      pd_nettotal = #{pd_nettotal,jdbcType=DOUBLE},
+      pd_whid = #{pd_whid,jdbcType=INTEGER},
+      pd_whcode = #{pd_whcode,jdbcType=VARCHAR},
+      pd_whname = #{pd_whname,jdbcType=VARCHAR},
+      pd_inwhid = #{pd_inwhid,jdbcType=INTEGER},
+      pd_inwhcode = #{pd_inwhcode,jdbcType=VARCHAR},
+      pd_inwhname = #{pd_inwhname,jdbcType=VARCHAR},
+      pd_orderid = #{pd_orderid,jdbcType=INTEGER},
+      pd_sdid = #{pd_sdid,jdbcType=INTEGER},
+      pd_status = #{pd_status,jdbcType=INTEGER},
+      companyid = #{companyid,jdbcType=INTEGER},
+      updaterid = #{updaterid,jdbcType=INTEGER},
+      updatetime = #{updatetime,jdbcType=TIMESTAMP},
+      pd_text1 = #{pd_text1,jdbcType=VARCHAR},
+      pd_text2 = #{pd_text2,jdbcType=VARCHAR},
+      pd_text3 = #{pd_text3,jdbcType=VARCHAR},
+      pd_text4 = #{pd_text4,jdbcType=VARCHAR},
+      pd_text5 = #{pd_text5,jdbcType=VARCHAR},
+      pd_ym = #{pd_ym,jdbcType=INTEGER},
+      pd_yqty = #{pd_yqty,jdbcType=INTEGER},
+      pd_remark = #{pd_remark,jdbcType=LONGVARCHAR},
+      pd_ioid = #{pd_ioid,jdbcType=INTEGER}
+    where pd_id = #{pd_id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.storage.entities.ProdInOut">
+    update prodiodetail
+    set pd_piid = #{pd_piid,jdbcType=INTEGER},
+      pd_inoutno = #{pd_inoutno,jdbcType=VARCHAR},
+      pd_piclass = #{pd_piclass,jdbcType=VARCHAR},
+      pd_pdno = #{pd_pdno,jdbcType=INTEGER},
+      pd_ordercode = #{pd_ordercode,jdbcType=VARCHAR},
+      pd_orderdetno = #{pd_orderdetno,jdbcType=INTEGER},
+      pd_prodid = #{pd_prodid,jdbcType=INTEGER},
+      pd_prodcode = #{pd_prodcode,jdbcType=VARCHAR},
+      pd_unit = #{pd_unit,jdbcType=VARCHAR},
+      pd_inqty = #{pd_inqty,jdbcType=INTEGER},
+      pd_outqty = #{pd_outqty,jdbcType=INTEGER},
+      pd_orderprice = #{pd_orderprice,jdbcType=DOUBLE},
+      pd_sendprice = #{pd_sendprice,jdbcType=DOUBLE},
+      pd_price = #{pd_price,jdbcType=DOUBLE},
+      pd_total = #{pd_total,jdbcType=DOUBLE},
+      pd_taxrate = #{pd_taxrate,jdbcType=DOUBLE},
+      pd_netprice = #{pd_netprice,jdbcType=DOUBLE},
+      pd_nettotal = #{pd_nettotal,jdbcType=DOUBLE},
+      pd_whid = #{pd_whid,jdbcType=INTEGER},
+      pd_whcode = #{pd_whcode,jdbcType=VARCHAR},
+      pd_whname = #{pd_whname,jdbcType=VARCHAR},
+      pd_inwhid = #{pd_inwhid,jdbcType=INTEGER},
+      pd_inwhcode = #{pd_inwhcode,jdbcType=VARCHAR},
+      pd_inwhname = #{pd_inwhname,jdbcType=VARCHAR},
+      pd_orderid = #{pd_orderid,jdbcType=INTEGER},
+      pd_sdid = #{pd_sdid,jdbcType=INTEGER},
+      pd_status = #{pd_status,jdbcType=INTEGER},
+      companyid = #{companyid,jdbcType=INTEGER},
+      updaterid = #{updaterid,jdbcType=INTEGER},
+      updatetime = #{updatetime,jdbcType=TIMESTAMP},
+      pd_text1 = #{pd_text1,jdbcType=VARCHAR},
+      pd_text2 = #{pd_text2,jdbcType=VARCHAR},
+      pd_text3 = #{pd_text3,jdbcType=VARCHAR},
+      pd_text4 = #{pd_text4,jdbcType=VARCHAR},
+      pd_text5 = #{pd_text5,jdbcType=VARCHAR},
+      pd_ym = #{pd_ym,jdbcType=INTEGER},
+      pd_yqty = #{pd_yqty,jdbcType=INTEGER},
+      pd_ioid = #{pd_ioid,jdbcType=INTEGER}
+    where pd_id = #{pd_id,jdbcType=INTEGER}
+  </update>
+
+  <insert id="batchInsert" parameterType="java.util.List" >
+    insert into prodiodetail
+    (
+    pd_piid,pd_inoutno,pd_piclass,pd_pdno,pd_ordercode,
+    pd_orderdetno,pd_prodid,pd_prodcode,pd_unit,
+    pd_inqty,pd_outqty,pd_orderprice,pd_sendprice,pd_price,
+    pd_total,pd_taxrate,pd_netprice,pd_nettotal,
+    pd_whid,pd_whcode,pd_whname,pd_inwhid,pd_inwhcode,
+    pd_inwhname,pd_orderid,pd_sdid,pd_status,pd_remark,
+    companyid,updaterid,updatetime,pd_text1,pd_text2,
+    pd_text3,pd_text4,pd_text5,pd_ym,pd_yqty
+    )
+    values
+    <foreach collection="list" item="item" index="index" open="" close="" separator=",">
+      (
+      #{item.pd_piid,jdbcType=INTEGER},#{item.pd_inoutno,jdbcType=VARCHAR},#{item.pd_piclass,jdbcType=VARCHAR},#{item.pd_pdno,jdbcType=INTEGER},#{item.pd_ordercode,jdbcType=VARCHAR},
+      #{item.pd_orderdetno,jdbcType=INTEGER},#{item.pd_prodid,jdbcType=INTEGER},#{item.pd_prodcode,jdbcType=VARCHAR},#{item.pd_unit,jdbcType=VARCHAR},
+      #{item.pd_inqty,jdbcType=INTEGER},#{item.pd_outqty,jdbcType=INTEGER},#{item.pd_orderprice,jdbcType=DOUBLE},#{item.pd_sendprice,jdbcType=DOUBLE},#{item.pd_price,jdbcType=DOUBLE},
+      #{item.pd_total,jdbcType=DOUBLE},#{item.pd_taxrate,jdbcType=DOUBLE},#{item.pd_netprice,jdbcType=DOUBLE},#{item.pd_nettotal,jdbcType=DOUBLE},
+      #{item.pd_whid,jdbcType=INTEGER},#{item.pd_whcode,jdbcType=VARCHAR},#{item.pd_whname,jdbcType=VARCHAR},#{item.pd_inwhid,jdbcType=INTEGER},#{item.pd_inwhcode,jdbcType=VARCHAR},
+      #{item.pd_inwhname,jdbcType=VARCHAR},#{item.pd_orderid,jdbcType=INTEGER},#{item.pd_sdid,jdbcType=INTEGER},#{item.pd_status,jdbcType=VARCHAR},#{item.pd_remark,jdbcType=VARCHAR},
+      #{item.companyId,jdbcType=INTEGER},#{item.updaterId,jdbcType=INTEGER},#{item.updateTime,jdbcType=TIMESTAMP},#{item.pd_text1,jdbcType=VARCHAR},#{item.pd_text2,jdbcType=VARCHAR},
+      #{item.pd_text3,jdbcType=VARCHAR},#{item.pd_text4,jdbcType=VARCHAR},#{item.pd_text5,jdbcType=VARCHAR},#{item.pd_ym,jdbcType=INTEGER},#{item.pd_yqty,jdbcType=INTEGER}
+      )
+    </foreach>
+  </insert>
+
+  <insert id="batchInsert1" parameterType="java.util.List" >
+    <foreach collection="list" item="item" index="index" open="" close="" separator=",">
+      insert into prodiodetail
+      <trim prefix="(" suffix=")" suffixOverrides=",">
+        <if test="item.pd_piid != null">
+          pd_piid,
+        </if>
+        <if test="item.pd_inoutno != null">
+          pd_inoutno,
+        </if>
+        <if test="item.pd_piclass != null">
+          pd_piclass,
+        </if>
+        <if test="item.pd_pdno != null">
+          pd_pdno,
+        </if>
+        <if test="item.pd_ordercode != null">
+          pd_ordercode,
+        </if>
+        <if test="item.pd_orderdetno != null">
+          pd_orderdetno,
+        </if>
+        <if test="item.pd_prodid != null">
+          pd_prodid,
+        </if>
+        <if test="item.pd_prodcode != null">
+          pd_prodcode,
+        </if>
+        <if test="item.pd_unit != null">
+          pd_unit,
+        </if>
+        <if test="item.pd_inqty != null">
+          pd_inqty,
+        </if>
+        <if test="item.pd_outqty != null">
+          pd_outqty,
+        </if>
+        <if test="item.pd_orderprice != null">
+          pd_orderprice,
+        </if>
+        <if test="item.pd_sendprice != null">
+          pd_sendprice,
+        </if>
+        <if test="item.pd_price != null">
+          pd_price,
+        </if>
+        <if test="item.pd_total != null">
+          pd_total,
+        </if>
+        <if test="item.pd_taxrate != null">
+          pd_taxrate,
+        </if>
+        <if test="item.pd_netprice != null">
+          pd_netprice,
+        </if>
+        <if test="item.pd_nettotal != null">
+          pd_nettotal,
+        </if>
+        <if test="item.pd_whid != null">
+          pd_whid,
+        </if>
+        <if test="item.pd_whcode != null">
+          pd_whcode,
+        </if>
+        <if test="item.pd_whname != null">
+          pd_whname,
+        </if>
+        <if test="item.pd_inwhid != null">
+          pd_inwhid,
+        </if>
+        <if test="item.pd_inwhcode != null">
+          pd_inwhcode,
+        </if>
+        <if test="item.pd_inwhname != null">
+          pd_inwhname,
+        </if>
+        <if test="item.pd_orderid != null">
+          pd_orderid,
+        </if>
+        <if test="item.pd_sdid != null">
+          pd_sdid,
+        </if>
+        <if test="item.pd_status != null">
+          pd_status,
+        </if>
+        <if test="item.companyId != null">
+          companyid,
+        </if>
+        <if test="item.updaterId != null">
+          updaterid,
+        </if>
+        <if test="item.updateTime != null">
+          updatetime,
+        </if>
+        <if test="item.pd_text1 != null">
+          pd_text1,
+        </if>
+        <if test="item.pd_text2 != null">
+          pd_text2,
+        </if>
+        <if test="item.pd_text3 != null">
+          pd_text3,
+        </if>
+        <if test="item.pd_text4 != null">
+          pd_text4,
+        </if>
+        <if test="item.pd_text5 != null">
+          pd_text5,
+        </if>
+        <if test="item.pd_ym != null">
+          pd_ym,
+        </if>
+        <if test="item.pd_yqty != null">
+          pd_yqty,
+        </if>
+        <if test="item.pd_remark != null">
+          pd_remark,
+        </if>
+        <if test="item.pd_ioid != null">
+          pd_ioid,
+        </if>
+      </trim>
+      <trim prefix="values (" suffix=")" suffixOverrides=",">
+        <if test="item.pd_piid != null">
+          #{item.pd_piid,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_inoutno != null">
+          #{item.pd_inoutno,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_piclass != null">
+          #{item.pd_piclass,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_pdno != null">
+          #{item.pd_pdno,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_ordercode != null">
+          #{item.pd_ordercode,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_orderdetno != null">
+          #{item.pd_orderdetno,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_prodid != null">
+          #{item.pd_prodid,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_prodcode != null">
+          #{item.pd_prodcode,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_unit != null">
+          #{item.pd_unit,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_inqty != null">
+          #{item.pd_inqty,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_outqty != null">
+          #{item.pd_outqty,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_orderprice != null">
+          #{item.pd_orderprice,jdbcType=DOUBLE},
+        </if>
+        <if test="item.pd_sendprice != null">
+          #{item.pd_sendprice,jdbcType=DOUBLE},
+        </if>
+        <if test="item.pd_price != null">
+          #{item.pd_price,jdbcType=DOUBLE},
+        </if>
+        <if test="item.pd_total != null">
+          #{item.pd_total,jdbcType=DOUBLE},
+        </if>
+        <if test="item.pd_taxrate != null">
+          #{item.pd_taxrate,jdbcType=DOUBLE},
+        </if>
+        <if test="item.pd_netprice != null">
+          #{item.pd_netprice,jdbcType=DOUBLE},
+        </if>
+        <if test="item.pd_nettotal != null">
+          #{item.pd_nettotal,jdbcType=DOUBLE},
+        </if>
+        <if test="item.pd_whid != null">
+          #{item.pd_whid,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_whcode != null">
+          #{item.pd_whcode,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_whname != null">
+          #{item.pd_whname,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_inwhid != null">
+          #{item.pd_inwhid,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_inwhcode != null">
+          #{item.pd_inwhcode,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_inwhname != null">
+          #{item.pd_inwhname,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_orderid != null">
+          #{item.pd_orderid,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_sdid != null">
+          #{item.pd_sdid,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_status != null">
+          #{item.pd_status,jdbcType=INTEGER},
+        </if>
+        <if test="item.companyId != null">
+          #{item.companyId,jdbcType=INTEGER},
+        </if>
+        <if test="item.updaterId != null">
+          #{item.updaterId,jdbcType=INTEGER},
+        </if>
+        <if test="item.updateTime != null">
+          #{item.updateTime,jdbcType=TIMESTAMP},
+        </if>
+        <if test="item.pd_text1 != null">
+          #{item.pd_text1,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_text2 != null">
+          #{item.pd_text2,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_text3 != null">
+          #{item.pd_text3,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_text4 != null">
+          #{item.pd_text4,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_text5 != null">
+          #{item.pd_text5,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_ym != null">
+          #{item.pd_ym,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_yqty != null">
+          #{item.pd_yqty,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_remark != null">
+          #{item.pd_remark,jdbcType=LONGVARCHAR},
+        </if>
+        <if test="item.pd_ioid != null">
+          #{item.pd_ioid,jdbcType=INTEGER},
+        </if>
+      </trim>
+
+    </foreach>
+  </insert>
+
+
+
+
+
+
+
+
+
+  <update id="batchUpdate" parameterType="com.usoftchina.saas.storage.entities.ProdInOut" >
+    <foreach collection="list" item="item" index="index" open="" close="" separator=";">
+      update prodiodetail <set>
+      <if test="item.pd_piid !=null">
+        pd_piid = #{item.pd_piid},
+      </if>
+      <if test="item.pd_inoutno !=null">
+        pd_inoutno = #{item.pd_inoutno},
+      </if>
+      <if test="item.pd_piclass !=null">
+        pd_piclass = #{item.pd_piclass},
+      </if>
+      <if test="item.pd_pdno !=null">
+        pd_pdno = #{item.pd_pdno},
+      </if>
+      <if test="item.pd_ordercode !=null">
+        pd_ordercode = #{item.pd_ordercode},
+      </if>
+      <if test="item.pd_orderdetno !=null">
+        pd_orderdetno = #{item.pd_orderdetno},
+      </if>
+      <if test="item.pd_prodid !=null">
+        pd_prodid = #{item.pd_prodid},
+      </if>
+      <if test="item.pd_prodcode !=null">
+        pd_prodcode = #{item.pd_prodcode},
+      </if>
+      <if test="item.pd_unit !=null">
+        pd_unit = #{item.pd_unit},
+      </if>
+      <if test="item.pd_inqty !=null">
+        pd_inqty = #{item.pd_inqty},
+      </if>
+      <if test="item.pd_outqty !=null">
+        pd_outqty = #{item.pd_outqty},
+      </if>
+      <if test="item.pd_orderprice !=null">
+        pd_orderprice = #{item.pd_orderprice},
+      </if>
+      <if test="item.pd_sendprice !=null">
+        pd_sendprice = #{item.pd_sendprice},
+      </if>
+      <if test="item.pd_price !=null">
+        pd_price = #{item.pd_price},
+      </if>
+      <if test="item.pd_total !=null">
+        pd_total = #{item.pd_total},
+      </if>
+      <if test="item.pd_taxrate !=null">
+        pd_taxrate = #{item.pd_taxrate},
+      </if>
+      <if test="item.pd_netprice !=null">
+        pd_netprice = #{item.pd_netprice},
+      </if>
+      <if test="item.pd_nettotal !=null">
+        pd_nettotal = #{item.pd_nettotal},
+      </if>
+      <if test="item.pd_whid !=null">
+        pd_whid = #{item.pd_whid},
+      </if>
+      <if test="item.pd_whcode !=null">
+        pd_whcode = #{item.pd_whcode},
+      </if>
+      <if test="item.pd_whname !=null">
+        pd_whname = #{item.pd_whname},
+      </if>
+      <if test="item.pd_inwhid !=null">
+        pd_inwhid = #{item.pd_inwhid},
+      </if>
+      <if test="item.pd_inwhcode !=null">
+        pd_inwhcode = #{item.pd_inwhcode},
+      </if>
+      <if test="item.pd_inwhname !=null">
+        pd_inwhname = #{item.pd_inwhname},
+      </if>
+      <if test="item.pd_orderid !=null">
+        pd_orderid = #{item.pd_orderid},
+      </if>
+      <if test="item.pd_sdid !=null">
+        pd_sdid = #{item.pd_sdid},
+      </if>
+      <if test="item.pd_status !=null">
+        pd_status = #{item.pd_status},
+      </if>
+      <if test="item.pd_remark !=null">
+        pd_remark = #{item.pd_remark},
+      </if>
+      <if test="item.companyId!=null">
+        companyId = #{item.companyId},
+      </if>
+      <if test="item.updaterId!=null">
+        updaterId = #{item.updaterId},
+      </if>
+      <if test="item.updateTime!=null">
+        updateTime = #{item.updateTime},
+      </if>
+      pd_text1 = #{item.pd_text1},
+      pd_text2 = #{item.pd_text2},
+      pd_text3 = #{item.pd_text3},
+      pd_text4 = #{item.pd_text4},
+      pd_text5 = #{item.pd_text5},
+      <if test="item.pd_ym!=null">
+        pd_ym = #{item.pd_ym},
+      </if>
+      <if test="item.pd_yqty!=null">
+        pd_yqty = #{item.pd_yqty},
+      </if>
+    </set>
+      where PD_ID = #{item.id,jdbcType=INTEGER}
+    </foreach>
+  </update>
+
+  <update id="updatePurchaseYqty" parameterType="java.lang.Integer">
+
+update prodiodetail a
+set a.pd_yqty =ifnull((select  b.pd_outqty  from  (select pd_ioid,sum(pd_outqty) pd_outqty from  prodiodetail left join prodinout on pd_piid = pi_id where pd_piclass='采购验退单'
+and pi_puid=#{id,jdbcType=INTEGER}  GROUP BY pd_ioid) b where ifnull(b.pd_ioid ,0)= a.pd_id ),0)
+where a.pd_piid = (select pi_id from prodinout where pi_puid=#{id,jdbcType=INTEGER} and pi_class='采购验收单')
+  </update>
+
+
+  <select id="selectByFK" parameterType="long" resultMap="BaseResultMap">
+    select * from prodiodetail a left join product b on b.pr_id= a.pd_prodid and a.companyid = b.companyid
+    where pd_piid=#{id} order by pd_pdno
+  </select>
+
+
+
+</mapper>

+ 500 - 0
applications/sale/sale-server/src/main/resources/mapper/ProdInOutMapper.xml

@@ -0,0 +1,500 @@
+<?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.usoftchina.saas.sale.mapper.ProdInOutMapper">
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.storage.entities.ProdInOut">
+    <id column="pi_id" jdbcType="INTEGER" property="id" />
+    <result column="pi_inoutno" jdbcType="VARCHAR" property="pi_inoutno" />
+    <result column="pi_class" jdbcType="VARCHAR" property="pi_class" />
+    <result column="pi_date" jdbcType="TIMESTAMP" property="pi_date" />
+    <result column="pi_vendid" jdbcType="INTEGER" property="pi_vendid" />
+    <result column="pi_vendcode" jdbcType="VARCHAR" property="pi_vendcode" />
+    <result column="pi_vendname" jdbcType="VARCHAR" property="pi_vendname" />
+    <result column="pi_custid" jdbcType="INTEGER" property="pi_custid" />
+    <result column="pi_custcode" jdbcType="VARCHAR" property="pi_custcode" />
+    <result column="pi_custname" jdbcType="VARCHAR" property="pi_custname" />
+    <result column="pi_puid" jdbcType="INTEGER" property="pi_puid" />
+    <result column="pi_pucode" jdbcType="VARCHAR" property="pi_pucode" />
+    <result column="pi_said" jdbcType="INTEGER" property="pi_said" />
+    <result column="pi_sacode" jdbcType="VARCHAR" property="pi_sacode" />
+    <result column="pi_total" jdbcType="DOUBLE" property="pi_total" />
+    <result column="pi_recordmanid" jdbcType="INTEGER" property="pi_recordmanid" />
+    <result column="pi_recordman" jdbcType="VARCHAR" property="pi_recordman" />
+    <result column="pi_recorddate" jdbcType="TIMESTAMP" property="pi_recorddate" />
+    <result column="pi_status" jdbcType="VARCHAR" property="pi_status" />
+    <result column="pi_statuscode" jdbcType="VARCHAR" property="pi_statuscode" />
+    <result column="pi_printstatus" jdbcType="VARCHAR" property="pi_printstatus" />
+    <result column="pi_printstatuscode" jdbcType="VARCHAR" property="pi_printstatuscode" />
+    <result column="companyid" jdbcType="INTEGER" property="companyId" />
+    <result column="updaterid" jdbcType="INTEGER" property="updaterId" />
+    <result column="updatetime" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="pi_text1" jdbcType="VARCHAR" property="pi_text1" />
+    <result column="pi_text2" jdbcType="VARCHAR" property="pi_text2" />
+    <result column="pi_text3" jdbcType="VARCHAR" property="pi_text3" />
+    <result column="pi_text4" jdbcType="VARCHAR" property="pi_text4" />
+    <result column="pi_text5" jdbcType="VARCHAR" property="pi_text5" />
+  </resultMap>
+  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.storage.entities.ProdInOut">
+    <result column="pi_address" jdbcType="LONGVARCHAR" property="pi_address" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    pi_id, pi_inoutno, pi_class, pi_date, pi_vendid, pi_vendcode, pi_vendname, pi_custid, 
+    pi_custcode, pi_custname, pi_puid, pi_pucode, pi_said, pi_sacode, pi_total, pi_recordmanid, 
+    pi_recordman, pi_recorddate, pi_status, pi_statuscode, pi_printstatus, pi_printstatuscode, 
+    companyid, updaterid, updatetime, pi_text1, pi_text2, pi_text3, pi_text4, pi_text5
+  </sql>
+  <sql id="Blob_Column_List">
+    pi_address
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
+    select 
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from prodinout
+    where pi_id = #{pi_id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from prodinout
+    where pi_id = #{pi_id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.saas.storage.entities.ProdInOut">
+    insert into prodinout (pi_id, pi_inoutno, pi_class, 
+      pi_date, pi_vendid, pi_vendcode, 
+      pi_vendname, pi_custid, pi_custcode, 
+      pi_custname, pi_puid, pi_pucode, 
+      pi_said, pi_sacode, pi_total, 
+      pi_recordmanid, pi_recordman, pi_recorddate, 
+      pi_status, pi_statuscode, pi_printstatus, 
+      pi_printstatuscode, companyid, updaterid, 
+      updatetime, pi_text1, pi_text2, 
+      pi_text3, pi_text4, pi_text5,
+      pi_address)
+    values (#{pi_id,jdbcType=INTEGER}, #{pi_inoutno,jdbcType=VARCHAR}, #{pi_class,jdbcType=VARCHAR}, 
+      #{pi_date,jdbcType=TIMESTAMP}, #{pi_vendid,jdbcType=INTEGER}, #{pi_vendcode,jdbcType=VARCHAR}, 
+      #{pi_vendname,jdbcType=VARCHAR}, #{pi_custid,jdbcType=INTEGER}, #{pi_custcode,jdbcType=VARCHAR}, 
+      #{pi_custname,jdbcType=VARCHAR}, #{pi_puid,jdbcType=INTEGER}, #{pi_pucode,jdbcType=VARCHAR}, 
+      #{pi_said,jdbcType=INTEGER}, #{pi_sacode,jdbcType=VARCHAR}, #{pi_total,jdbcType=DOUBLE},
+      #{pi_recordmanid,jdbcType=INTEGER}, #{pi_recordman,jdbcType=VARCHAR}, #{pi_recorddate,jdbcType=TIMESTAMP}, 
+      #{pi_status,jdbcType=VARCHAR}, #{pi_statuscode,jdbcType=VARCHAR}, #{pi_printstatus,jdbcType=VARCHAR}, 
+      #{pi_printstatuscode,jdbcType=VARCHAR}, #{companyid,jdbcType=INTEGER}, #{updaterid,jdbcType=INTEGER}, 
+      #{updatetime,jdbcType=TIMESTAMP}, #{pi_text1,jdbcType=VARCHAR}, #{pi_text2,jdbcType=VARCHAR}, 
+      #{pi_text3,jdbcType=VARCHAR}, #{pi_text4,jdbcType=VARCHAR}, #{pi_text5,jdbcType=VARCHAR}, 
+      #{pi_address,jdbcType=LONGVARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.storage.entities.ProdInOut">
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
+    insert into prodinout
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+
+      <if test="pi_inoutno != null">
+        pi_inoutno,
+      </if>
+      <if test="pi_class != null">
+        pi_class,
+      </if>
+      <if test="pi_date != null">
+        pi_date,
+      </if>
+      <if test="pi_vendid != null">
+        pi_vendid,
+      </if>
+      <if test="pi_vendcode != null">
+        pi_vendcode,
+      </if>
+      <if test="pi_vendname != null">
+        pi_vendname,
+      </if>
+      <if test="pi_custid != null">
+        pi_custid,
+      </if>
+      <if test="pi_custcode != null">
+        pi_custcode,
+      </if>
+      <if test="pi_custname != null">
+        pi_custname,
+      </if>
+      <if test="pi_puid != null">
+        pi_puid,
+      </if>
+      <if test="pi_pucode != null">
+        pi_pucode,
+      </if>
+      <if test="pi_said != null">
+        pi_said,
+      </if>
+      <if test="pi_sacode != null">
+        pi_sacode,
+      </if>
+      <if test="pi_total != null">
+        pi_total,
+      </if>
+      <if test="pi_recordmanid != null">
+        pi_recordmanid,
+      </if>
+      <if test="pi_recordman != null">
+        pi_recordman,
+      </if>
+      <if test="pi_recorddate != null">
+        pi_recorddate,
+      </if>
+      <if test="pi_status != null">
+        pi_status,
+      </if>
+      <if test="pi_statuscode != null">
+        pi_statuscode,
+      </if>
+      <if test="pi_printstatus != null">
+        pi_printstatus,
+      </if>
+      <if test="pi_printstatuscode != null">
+        pi_printstatuscode,
+      </if>
+      <if test="companyId != null">
+        companyid,
+      </if>
+      <if test="updaterId != null">
+        updaterid,
+      </if>
+      <if test="updateTime != null">
+        updatetime,
+      </if>
+      <if test="pi_text1 != null">
+        pi_text1,
+      </if>
+      <if test="pi_text2 != null">
+        pi_text2,
+      </if>
+      <if test="pi_text3 != null">
+        pi_text3,
+      </if>
+      <if test="pi_text4 != null">
+        pi_text4,
+      </if>
+      <if test="pi_text5 != null">
+        pi_text5,
+      </if>
+      <if test="pi_address != null">
+        pi_address,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+
+      <if test="pi_inoutno != null">
+        #{pi_inoutno,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_class != null">
+        #{pi_class,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_date != null">
+        #{pi_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pi_vendid != null">
+        #{pi_vendid,jdbcType=INTEGER},
+      </if>
+      <if test="pi_vendcode != null">
+        #{pi_vendcode,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_vendname != null">
+        #{pi_vendname,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_custid != null">
+        #{pi_custid,jdbcType=INTEGER},
+      </if>
+      <if test="pi_custcode != null">
+        #{pi_custcode,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_custname != null">
+        #{pi_custname,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_puid != null">
+        #{pi_puid,jdbcType=INTEGER},
+      </if>
+      <if test="pi_pucode != null">
+        #{pi_pucode,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_said != null">
+        #{pi_said,jdbcType=INTEGER},
+      </if>
+      <if test="pi_sacode != null">
+        #{pi_sacode,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_total != null">
+        #{pi_total,jdbcType=DOUBLE},
+      </if>
+      <if test="pi_recordmanid != null">
+        #{pi_recordmanid,jdbcType=INTEGER},
+      </if>
+      <if test="pi_recordman != null">
+        #{pi_recordman,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_recorddate != null">
+        #{pi_recorddate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pi_status != null">
+        #{pi_status,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_statuscode != null">
+        #{pi_statuscode,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_printstatus != null">
+        #{pi_printstatus,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_printstatuscode != null">
+        #{pi_printstatuscode,jdbcType=VARCHAR},
+      </if>
+      <if test="companyId != null">
+        #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null">
+        #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pi_text1 != null">
+        #{pi_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_text2 != null">
+        #{pi_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_text3 != null">
+        #{pi_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_text4 != null">
+        #{pi_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_text5 != null">
+        #{pi_text5,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_address != null">
+        #{pi_address,jdbcType=LONGVARCHAR},
+      </if>
+    </trim>
+  </insert>
+
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.storage.entities.ProdInOut">
+    update prodinout
+    <set>
+      <if test="pi_inoutno != null">
+        pi_inoutno = #{pi_inoutno,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_class != null">
+        pi_class = #{pi_class,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_date != null">
+        pi_date = #{pi_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pi_vendid != null">
+        pi_vendid = #{pi_vendid,jdbcType=INTEGER},
+      </if>
+      <if test="pi_vendcode != null">
+        pi_vendcode = #{pi_vendcode,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_vendname != null">
+        pi_vendname = #{pi_vendname,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_custid != null">
+        pi_custid = #{pi_custid,jdbcType=INTEGER},
+      </if>
+      <if test="pi_custcode != null">
+        pi_custcode = #{pi_custcode,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_custname != null">
+        pi_custname = #{pi_custname,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_puid != null">
+        pi_puid = #{pi_puid,jdbcType=INTEGER},
+      </if>
+      <if test="pi_pucode != null">
+        pi_pucode = #{pi_pucode,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_said != null">
+        pi_said = #{pi_said,jdbcType=INTEGER},
+      </if>
+      <if test="pi_sacode != null">
+        pi_sacode = #{pi_sacode,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_total != null">
+        pi_total = #{pi_total,jdbcType=DOUBLE},
+      </if>
+      <if test="pi_recordmanid != null">
+        pi_recordmanid = #{pi_recordmanid,jdbcType=INTEGER},
+      </if>
+      <if test="pi_recordman != null">
+        pi_recordman = #{pi_recordman,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_recorddate != null">
+        pi_recorddate = #{pi_recorddate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pi_status != null">
+        pi_status = #{pi_status,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_statuscode != null">
+        pi_statuscode = #{pi_statuscode,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_printstatus != null">
+        pi_printstatus = #{pi_printstatus,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_printstatuscode != null">
+        pi_printstatuscode = #{pi_printstatuscode,jdbcType=VARCHAR},
+      </if>
+      <if test="companyId != null">
+        companyid = #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null">
+        updaterid = #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null">
+        updatetime = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pi_text1 != null">
+        pi_text1 = #{pi_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_text2 != null">
+        pi_text2 = #{pi_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_text3 != null">
+        pi_text3 = #{pi_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_text4 != null">
+        pi_text4 = #{pi_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_text5 != null">
+        pi_text5 = #{pi_text5,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_address != null">
+        pi_address = #{pi_address,jdbcType=LONGVARCHAR},
+      </if>
+
+    </set>
+    where pi_id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.saas.storage.entities.ProdInOut">
+    update prodinout
+    set pi_inoutno = #{pi_inoutno,jdbcType=VARCHAR},
+      pi_class = #{pi_class,jdbcType=VARCHAR},
+      pi_date = #{pi_date,jdbcType=TIMESTAMP},
+      pi_vendid = #{pi_vendid,jdbcType=INTEGER},
+      pi_vendcode = #{pi_vendcode,jdbcType=VARCHAR},
+      pi_vendname = #{pi_vendname,jdbcType=VARCHAR},
+      pi_custid = #{pi_custid,jdbcType=INTEGER},
+      pi_custcode = #{pi_custcode,jdbcType=VARCHAR},
+      pi_custname = #{pi_custname,jdbcType=VARCHAR},
+      pi_puid = #{pi_puid,jdbcType=INTEGER},
+      pi_pucode = #{pi_pucode,jdbcType=VARCHAR},
+      pi_said = #{pi_said,jdbcType=INTEGER},
+      pi_sacode = #{pi_sacode,jdbcType=VARCHAR},
+      pi_total = #{pi_total,jdbcType=DOUBLE},
+      pi_recordmanid = #{pi_recordmanid,jdbcType=INTEGER},
+      pi_recordman = #{pi_recordman,jdbcType=VARCHAR},
+      pi_recorddate = #{pi_recorddate,jdbcType=TIMESTAMP},
+      pi_status = #{pi_status,jdbcType=VARCHAR},
+      pi_statuscode = #{pi_statuscode,jdbcType=VARCHAR},
+      pi_printstatus = #{pi_printstatus,jdbcType=VARCHAR},
+      pi_printstatuscode = #{pi_printstatuscode,jdbcType=VARCHAR},
+      companyid = #{companyid,jdbcType=INTEGER},
+      updaterid = #{updaterid,jdbcType=INTEGER},
+      updatetime = #{updatetime,jdbcType=TIMESTAMP},
+      pi_text1 = #{pi_text1,jdbcType=VARCHAR},
+      pi_text2 = #{pi_text2,jdbcType=VARCHAR},
+      pi_text3 = #{pi_text3,jdbcType=VARCHAR},
+      pi_text4 = #{pi_text4,jdbcType=VARCHAR},
+      pi_text5 = #{pi_text5,jdbcType=VARCHAR},
+      pi_address = #{pi_address,jdbcType=LONGVARCHAR}
+
+    where pi_id = #{pi_id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.storage.entities.ProdInOut">
+    update prodinout
+    set pi_inoutno = #{pi_inoutno,jdbcType=VARCHAR},
+      pi_class = #{pi_class,jdbcType=VARCHAR},
+      pi_date = #{pi_date,jdbcType=TIMESTAMP},
+      pi_vendid = #{pi_vendid,jdbcType=INTEGER},
+      pi_vendcode = #{pi_vendcode,jdbcType=VARCHAR},
+      pi_vendname = #{pi_vendname,jdbcType=VARCHAR},
+      pi_custid = #{pi_custid,jdbcType=INTEGER},
+      pi_custcode = #{pi_custcode,jdbcType=VARCHAR},
+      pi_custname = #{pi_custname,jdbcType=VARCHAR},
+      pi_puid = #{pi_puid,jdbcType=INTEGER},
+      pi_pucode = #{pi_pucode,jdbcType=VARCHAR},
+      pi_said = #{pi_said,jdbcType=INTEGER},
+      pi_sacode = #{pi_sacode,jdbcType=VARCHAR},
+      pi_total = #{pi_total,jdbcType=DOUBLE},
+      pi_recordmanid = #{pi_recordmanid,jdbcType=INTEGER},
+      pi_recordman = #{pi_recordman,jdbcType=VARCHAR},
+      pi_recorddate = #{pi_recorddate,jdbcType=TIMESTAMP},
+      pi_status = #{pi_status,jdbcType=VARCHAR},
+      pi_statuscode = #{pi_statuscode,jdbcType=VARCHAR},
+      pi_printstatus = #{pi_printstatus,jdbcType=VARCHAR},
+      pi_printstatuscode = #{pi_printstatuscode,jdbcType=VARCHAR},
+      companyid = #{companyId,jdbcType=INTEGER},
+      updaterid = #{updaterId,jdbcType=INTEGER},
+      updatetime = #{updateTime,jdbcType=TIMESTAMP},
+      pi_text1 = #{pi_text1,jdbcType=VARCHAR},
+      pi_text2 = #{pi_text2,jdbcType=VARCHAR},
+      pi_text3 = #{pi_text3,jdbcType=VARCHAR},
+      pi_text4 = #{pi_text4,jdbcType=VARCHAR},
+      pi_text5 = #{pi_text5,jdbcType=VARCHAR}
+    where pi_id = #{id,jdbcType=INTEGER}
+  </update>
+</mapper>

+ 17 - 71
applications/sale/sale-server/src/main/resources/mapper/SaleListMapper.xml

@@ -50,83 +50,29 @@
         <result column="sd_text5" property="sd_text5" jdbcType="VARCHAR" />
     </resultMap>
 
-    <select id="selectPurchaseListByCondition" parameterType="com.usoftchina.saas.commons.dto.ListReqDTO" resultMap="BaseResultMap">
-        select  *  from sale left join sale on pu_id=pd_puid
+    <select id="selectPurchaseListByCondition" resultMap="BaseResultMap">
+        select  *  from sale left join saledetail on sa_id=sd_said
         <where>
-            <if test="finalCon != null">
-                 ${finalCon}
+            <if test="con != null">
+                ${con}
             </if>
-            order by sa_id,
-        </where>
+            <if test="companyId != null">
+                and   sale.companyId = #{companyId}
+            </if>
+        </where>  order by sd_detno
     </select>
 
-    <select id="selectPurchaseBycondition" parameterType="com.usoftchina.saas.commons.dto.ListReqDTO" resultMap="BaseResultMap">
-        select  *  from purchase
+    <select id="selectPurchaseBycondition" resultMap="BaseResultMap">
+        select  *  from sale
         <where>
-            <if test="finalCon != null">
-                 ${finalCon}
+            <if test="con != null">
+                ${con}
+            </if>
+            <if test="companyId != null">
+                and  companyId = #{companyId}
             </if>
         </where>
-        order by sd_detno
+        order by sa_id
     </select>
-    <insert id="batchInsert" parameterType="java.util.List" >
-        insert into purchasedetail ( PD_PUID, PD_CODE,
-        PD_DETNO, PD_PRODID, PD_PRODCODE,
-        PD_UNIT, PD_QTY, PD_PRICE,
-        PD_TOTAL, PD_TAXTOTAL, PD_ACCEPTQTY,
-        PD_DELIVERY, PD_SALECODE, PD_SALEDETNO,
-        PD_SDID, companyId, updaterId,
-        updateTime, pd_text1, pd_text2,
-        pd_text3, pd_text4, pd_text5,
-        pd_yqty)
-        values
-        <foreach collection="list" item="item" index="index" open="" close="" separator=",">
-            (
-            #{item.pdPuid,jdbcType=INTEGER}, #{item.pdCode,jdbcType=VARCHAR},
-            #{item.pdDetno,jdbcType=INTEGER}, #{item.pdProdid,jdbcType=INTEGER}, #{item.pdProdcode,jdbcType=VARCHAR},
-            #{item.pdUnit,jdbcType=VARCHAR}, #{item.pdQty,jdbcType=DOUBLE}, #{item.pdPrice,jdbcType=DOUBLE},
-            #{item.pdTotal,jdbcType=DOUBLE}, #{item.pdTaxtotal,jdbcType=DOUBLE}, #{item.pdAcceptqty,jdbcType=DOUBLE},
-            #{item.pdDelivery,jdbcType=DOUBLE}, #{item.pdSalecode,jdbcType=VARCHAR}, #{item.pdSaledetno,jdbcType=INTEGER},
-            #{item.pdSdid,jdbcType=INTEGER}, #{item.companyId,jdbcType=INTEGER}, #{item.updaterId,jdbcType=INTEGER},
-            #{item.updateTime,jdbcType=TIMESTAMP}, #{item.pdText1,jdbcType=VARCHAR}, #{item.pdText2,jdbcType=VARCHAR},
-            #{item.pdText3,jdbcType=VARCHAR}, #{item.pdText4,jdbcType=VARCHAR}, #{item.pdText5,jdbcType=VARCHAR},
-            #{item.pdYqty,jdbcType=DOUBLE}
-            )
-        </foreach>
-    </insert>
-    <update id="batchUpdate" parameterType="com.usoftchina.saas.purchase.po.PurchaseDetail" >
-        <foreach collection="list" item="item" index="index" open="" close="" separator=";">
-            update purchasedetail <set>
-            PD_PUID = #{item.pdPuid},
-            PD_CODE = #{item.pdCode},
-            PD_DETNO = #{item.pdDetno},
-            PD_PRODID = #{item.pdProdid},
-            PD_PRODCODE = #{item.pdProdcode},
-            PD_UNIT = #{item.pdUnit},
-            PD_QTY = #{item.pdQty},
-            PD_PRICE = #{item.pdPrice},
-            PD_TOTAL = #{item.pdTotal},
-            PD_TAXTOTAL = #{item.pdTaxtotal},
-            PD_ACCEPTQTY = #{item.pdAcceptqty},
-            PD_DELIVERY = #{item.pdDelivery},
-            PD_SALECODE = #{item.pdSalecode},
-            PD_SALEDETNO = #{item.pdSaledetno},
-            PD_SDID = #{item.pdSdid},
-            companyId = #{item.companyId},
-            updaterId = #{item.updaterId},
-            updateTime = #{item.updateTime},
-            pd_text1 = #{item.pdText1},
-            pd_text2 = #{item.pdText2},
-            pd_text3 = #{item.pdText3},
-            pd_text4 = #{item.pdText4},
-            pd_text5 = #{item.pdText5},
-            pd_yqty = #{item.pdYqty}
-        </set>
-            where PD_ID = #{item.id,jdbcType=INTEGER}
-        </foreach>
-    </update>
-    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
-        delete from purchasedetail
-        where PD_ID = #{id}
-    </delete>
+
 </mapper>

+ 44 - 226
applications/sale/sale-server/src/main/resources/mapper/SaleMapper.xml

@@ -20,108 +20,30 @@
     <result column="sa_recorderid" property="sa_recorderid" jdbcType="INTEGER" />
     <result column="sa_recorder" property="sa_recorder" jdbcType="VARCHAR" />
     <result column="sa_recorddate" property="sa_recorddate" jdbcType="TIMESTAMP" />
-    <result column="companyid" property="companyid" jdbcType="INTEGER" />
+    <result column="companyid" property="companyId" jdbcType="INTEGER" />
     <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
-    <result column="updatetime" property="updatetime" jdbcType="TIMESTAMP" />
+    <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
     <result column="sa_text1" property="sa_text1" jdbcType="VARCHAR" />
     <result column="sa_text2" property="sa_text2" jdbcType="VARCHAR" />
     <result column="sa_text3" property="sa_text3" jdbcType="VARCHAR" />
     <result column="sa_text4" property="sa_text4" jdbcType="VARCHAR" />
     <result column="sa_text5" property="sa_text5" jdbcType="VARCHAR" />
   </resultMap>
-  <sql id="Example_Where_Clause" >
-    <where >
-      <foreach collection="oredCriteria" item="criteria" separator="or" >
-        <if test="criteria.valid" >
-          <trim prefix="(" suffix=")" prefixOverrides="and" >
-            <foreach collection="criteria.criteria" item="criterion" >
-              <choose >
-                <when test="criterion.noValue" >
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue" >
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue" >
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue" >
-                  and ${criterion.condition}
-                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
-  <sql id="Update_By_Example_Where_Clause" >
-    <where >
-      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
-        <if test="criteria.valid" >
-          <trim prefix="(" suffix=")" prefixOverrides="and" >
-            <foreach collection="criteria.criteria" item="criterion" >
-              <choose >
-                <when test="criterion.noValue" >
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue" >
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue" >
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue" >
-                  and ${criterion.condition}
-                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
   <sql id="Base_Column_List" >
     sa_id, sa_code, sa_custid, sa_custcode, sa_custname, sa_toplace, sa_total, sa_totalupper, 
     sa_remark, sa_status, sa_statuscode, sa_sendstatuscode, sa_sendstatus, sa_printstatus, 
     sa_printstatuscode, sa_recorderid, sa_recorder, sa_recorddate, companyid, updaterId, 
-    updatetime, sa_text1, sa_text2, sa_text3, sa_text4, sa_text5
+    updateTime, sa_text1, sa_text2, sa_text3, sa_text4, sa_text5
   </sql>
-  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.usoftchina.saas.sale.po.SaleExample" >
-    select
-    <if test="distinct" >
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    from sale
-    <if test="_parameter != null" >
-      <include refid="Example_Where_Clause" />
-    </if>
-    <if test="orderByClause != null" >
-      order by ${orderByClause}
-    </if>
-  </select>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
     select 
     <include refid="Base_Column_List" />
     from sale
     where sa_id = #{id}
   </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
-    delete from sale
-    where sa_id = #{sa_id,jdbcType=INTEGER}
-  </delete>
-  <delete id="deleteByExample" parameterType="com.usoftchina.saas.sale.po.SaleExample" >
+  <delete id="deleteByPrimaryKey" parameterType="long" >
     delete from sale
-    <if test="_parameter != null" >
-      <include refid="Example_Where_Clause" />
-    </if>
+    where sa_id = #{id}
   </delete>
   <insert id="insert" parameterType="com.usoftchina.saas.sale.po.Sale" >
     insert into sale (sa_id, sa_code, sa_custid, 
@@ -130,7 +52,7 @@
       sa_status, sa_statuscode, sa_sendstatuscode, 
       sa_sendstatus, sa_printstatus, sa_printstatuscode, 
       sa_recorderid, sa_recorder, sa_recorddate, 
-      companyid, updaterId, updatetime, 
+      companyid, updaterId, updateTime, 
       sa_text1, sa_text2, sa_text3, 
       sa_text4, sa_text5)
     values (#{sa_id,jdbcType=INTEGER}, #{sa_code,jdbcType=VARCHAR}, #{sa_custid,jdbcType=INTEGER}, 
@@ -139,16 +61,13 @@
       #{sa_status,jdbcType=VARCHAR}, #{sa_statuscode,jdbcType=VARCHAR}, #{sa_sendstatuscode,jdbcType=VARCHAR}, 
       #{sa_sendstatus,jdbcType=VARCHAR}, #{sa_printstatus,jdbcType=VARCHAR}, #{sa_printstatuscode,jdbcType=VARCHAR}, 
       #{sa_recorderid,jdbcType=INTEGER}, #{sa_recorder,jdbcType=VARCHAR}, #{sa_recorddate,jdbcType=TIMESTAMP}, 
-      #{companyid,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER}, #{updatetime,jdbcType=TIMESTAMP}, 
+      #{companyid,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, 
       #{sa_text1,jdbcType=VARCHAR}, #{sa_text2,jdbcType=VARCHAR}, #{sa_text3,jdbcType=VARCHAR}, 
       #{sa_text4,jdbcType=VARCHAR}, #{sa_text5,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.sale.po.Sale" >
     insert into sale
     <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="sa_id != null" >
-        sa_id,
-      </if>
       <if test="sa_code != null" >
         sa_code,
       </if>
@@ -206,8 +125,8 @@
       <if test="updaterId != null" >
         updaterId,
       </if>
-      <if test="updatetime != null" >
-        updatetime,
+      <if test="updateTime != null" >
+        updateTime,
       </if>
       <if test="sa_text1 != null" >
         sa_text1,
@@ -226,9 +145,6 @@
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="sa_id != null" >
-        #{sa_id,jdbcType=INTEGER},
-      </if>
       <if test="sa_code != null" >
         #{sa_code,jdbcType=VARCHAR},
       </if>
@@ -286,8 +202,8 @@
       <if test="updaterId != null" >
         #{updaterId,jdbcType=INTEGER},
       </if>
-      <if test="updatetime != null" >
-        #{updatetime,jdbcType=TIMESTAMP},
+      <if test="updateTime != null" >
+        #{updateTime,jdbcType=TIMESTAMP},
       </if>
       <if test="sa_text1 != null" >
         #{sa_text1,jdbcType=VARCHAR},
@@ -306,130 +222,6 @@
       </if>
     </trim>
   </insert>
-  <select id="countByExample" parameterType="com.usoftchina.saas.sale.po.SaleExample" resultType="java.lang.Integer" >
-    select count(*) from sale
-    <if test="_parameter != null" >
-      <include refid="Example_Where_Clause" />
-    </if>
-  </select>
-  <update id="updateByExampleSelective" parameterType="map" >
-    update sale
-    <set >
-      <if test="record.sa_id != null" >
-        sa_id = #{record.sa_id,jdbcType=INTEGER},
-      </if>
-      <if test="record.sa_code != null" >
-        sa_code = #{record.sa_code,jdbcType=VARCHAR},
-      </if>
-      <if test="record.sa_custid != null" >
-        sa_custid = #{record.sa_custid,jdbcType=INTEGER},
-      </if>
-      <if test="record.sa_custcode != null" >
-        sa_custcode = #{record.sa_custcode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.sa_custname != null" >
-        sa_custname = #{record.sa_custname,jdbcType=VARCHAR},
-      </if>
-      <if test="record.sa_toplace != null" >
-        sa_toplace = #{record.sa_toplace,jdbcType=VARCHAR},
-      </if>
-      <if test="record.sa_total != null" >
-        sa_total = #{record.sa_total,jdbcType=DOUBLE},
-      </if>
-      <if test="record.sa_totalupper != null" >
-        sa_totalupper = #{record.sa_totalupper,jdbcType=VARCHAR},
-      </if>
-      <if test="record.sa_remark != null" >
-        sa_remark = #{record.sa_remark,jdbcType=VARCHAR},
-      </if>
-      <if test="record.sa_status != null" >
-        sa_status = #{record.sa_status,jdbcType=VARCHAR},
-      </if>
-      <if test="record.sa_statuscode != null" >
-        sa_statuscode = #{record.sa_statuscode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.sa_sendstatuscode != null" >
-        sa_sendstatuscode = #{record.sa_sendstatuscode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.sa_sendstatus != null" >
-        sa_sendstatus = #{record.sa_sendstatus,jdbcType=VARCHAR},
-      </if>
-      <if test="record.sa_printstatus != null" >
-        sa_printstatus = #{record.sa_printstatus,jdbcType=VARCHAR},
-      </if>
-      <if test="record.sa_printstatuscode != null" >
-        sa_printstatuscode = #{record.sa_printstatuscode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.sa_recorderid != null" >
-        sa_recorderid = #{record.sa_recorderid,jdbcType=INTEGER},
-      </if>
-      <if test="record.sa_recorder != null" >
-        sa_recorder = #{record.sa_recorder,jdbcType=VARCHAR},
-      </if>
-      <if test="record.sa_recorddate != null" >
-        sa_recorddate = #{record.sa_recorddate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.companyid != null" >
-        companyid = #{record.companyid,jdbcType=INTEGER},
-      </if>
-      <if test="record.updaterId != null" >
-        updaterId = #{record.updaterId,jdbcType=INTEGER},
-      </if>
-      <if test="record.updatetime != null" >
-        updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.sa_text1 != null" >
-        sa_text1 = #{record.sa_text1,jdbcType=VARCHAR},
-      </if>
-      <if test="record.sa_text2 != null" >
-        sa_text2 = #{record.sa_text2,jdbcType=VARCHAR},
-      </if>
-      <if test="record.sa_text3 != null" >
-        sa_text3 = #{record.sa_text3,jdbcType=VARCHAR},
-      </if>
-      <if test="record.sa_text4 != null" >
-        sa_text4 = #{record.sa_text4,jdbcType=VARCHAR},
-      </if>
-      <if test="record.sa_text5 != null" >
-        sa_text5 = #{record.sa_text5,jdbcType=VARCHAR},
-      </if>
-    </set>
-    <if test="_parameter != null" >
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByExample" parameterType="map" >
-    update sale
-    set sa_id = #{record.sa_id,jdbcType=INTEGER},
-      sa_code = #{record.sa_code,jdbcType=VARCHAR},
-      sa_custid = #{record.sa_custid,jdbcType=INTEGER},
-      sa_custcode = #{record.sa_custcode,jdbcType=VARCHAR},
-      sa_custname = #{record.sa_custname,jdbcType=VARCHAR},
-      sa_toplace = #{record.sa_toplace,jdbcType=VARCHAR},
-      sa_total = #{record.sa_total,jdbcType=DOUBLE},
-      sa_totalupper = #{record.sa_totalupper,jdbcType=VARCHAR},
-      sa_remark = #{record.sa_remark,jdbcType=VARCHAR},
-      sa_status = #{record.sa_status,jdbcType=VARCHAR},
-      sa_statuscode = #{record.sa_statuscode,jdbcType=VARCHAR},
-      sa_sendstatuscode = #{record.sa_sendstatuscode,jdbcType=VARCHAR},
-      sa_sendstatus = #{record.sa_sendstatus,jdbcType=VARCHAR},
-      sa_printstatus = #{record.sa_printstatus,jdbcType=VARCHAR},
-      sa_printstatuscode = #{record.sa_printstatuscode,jdbcType=VARCHAR},
-      sa_recorderid = #{record.sa_recorderid,jdbcType=INTEGER},
-      sa_recorder = #{record.sa_recorder,jdbcType=VARCHAR},
-      sa_recorddate = #{record.sa_recorddate,jdbcType=TIMESTAMP},
-      companyid = #{record.companyid,jdbcType=INTEGER},
-      updaterId = #{record.updaterId,jdbcType=INTEGER},
-      updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
-      sa_text1 = #{record.sa_text1,jdbcType=VARCHAR},
-      sa_text2 = #{record.sa_text2,jdbcType=VARCHAR},
-      sa_text3 = #{record.sa_text3,jdbcType=VARCHAR},
-      sa_text4 = #{record.sa_text4,jdbcType=VARCHAR},
-      sa_text5 = #{record.sa_text5,jdbcType=VARCHAR}
-    <if test="_parameter != null" >
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.sale.po.Sale" >
     update sale
     <set >
@@ -484,14 +276,14 @@
       <if test="sa_recorddate != null" >
         sa_recorddate = #{sa_recorddate,jdbcType=TIMESTAMP},
       </if>
-      <if test="companyid != null" >
-        companyid = #{companyid,jdbcType=INTEGER},
+      <if test="companyId != null" >
+        companyid = #{companyId,jdbcType=INTEGER},
       </if>
       <if test="updaterId != null" >
         updaterId = #{updaterId,jdbcType=INTEGER},
       </if>
-      <if test="updatetime != null" >
-        updatetime = #{updatetime,jdbcType=TIMESTAMP},
+      <if test="updateTime != null" >
+        updateTime = #{updateTime,jdbcType=TIMESTAMP},
       </if>
       <if test="sa_text1 != null" >
         sa_text1 = #{sa_text1,jdbcType=VARCHAR},
@@ -509,7 +301,7 @@
         sa_text5 = #{sa_text5,jdbcType=VARCHAR},
       </if>
     </set>
-    where sa_id = #{sa_id,jdbcType=INTEGER}
+    where sa_id = #{id,jdbcType=INTEGER}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.sale.po.Sale" >
     update sale
@@ -532,12 +324,38 @@
       sa_recorddate = #{sa_recorddate,jdbcType=TIMESTAMP},
       companyid = #{companyid,jdbcType=INTEGER},
       updaterId = #{updaterId,jdbcType=INTEGER},
-      updatetime = #{updatetime,jdbcType=TIMESTAMP},
+      updateTime = #{updateTime,jdbcType=TIMESTAMP},
       sa_text1 = #{sa_text1,jdbcType=VARCHAR},
       sa_text2 = #{sa_text2,jdbcType=VARCHAR},
       sa_text3 = #{sa_text3,jdbcType=VARCHAR},
       sa_text4 = #{sa_text4,jdbcType=VARCHAR},
       sa_text5 = #{sa_text5,jdbcType=VARCHAR}
-    where sa_id = #{sa_id,jdbcType=INTEGER}
+    where sa_id = #{id,jdbcType=INTEGER}
   </update>
+
+  <select id="validateCodeWhenInsert" resultType="int" parameterType="string" >
+    select count(1) from sale where sa_code = #{code}
+  </select>
+  <select id="validateCodeWhenUpdate" resultType="int" >
+    select count(1) from sale where sa_code = #{code} and sa_id != #{id}
+  </select>
+  <select id="selectCodeById" resultType="string" parameterType="long">
+    select sa_code from sale where sa_id=#{id}
+  </select>
+
+  <select id="validateAudit" parameterType="com.usoftchina.saas.commons.dto.DocBaseDTO" resultType="java.lang.String">
+    select GROUP_CONCAT(sa_code) from sale where sa_statuscode='AUDITED' and sa_id in
+    <foreach collection="list" item="item" open="(" close=")" separator=",">
+      #{item.id}
+    </foreach>
+  </select>
+  <select id="validateBatchUnAudit" parameterType="com.usoftchina.saas.commons.dto.DocBaseDTO" resultType="java.lang.String">
+    select GROUP_CONCAT(sa_code) from sale where sa_statuscode='UNAUDITED' and sa_id in
+    <foreach collection="list" item="item" open="(" close=")" separator=",">
+      #{item.id}
+    </foreach>
+  </select>
+  <select id="validateUnAudit" parameterType="long" resultType="java.lang.String">
+    select sa_code from sale where sa_id = #{id} and IFNULL(sa_statuscode,'UNAUDITED')='UNAUDITED'
+  </select>
 </mapper>

+ 99 - 225
applications/sale/sale-server/src/main/resources/mapper/SaledetailMapper.xml

@@ -1,8 +1,8 @@
 <?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.usoftchina.saas.sale.mapper.SaledetailMapper" >
-  <resultMap id="BaseResultMap" type="com.usoftchina.saas.sale.po.Saledetail" >
-    <id column="sd_id" property="sd_id" jdbcType="INTEGER" />
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.sale.po.SaleDetail" >
+    <id column="sd_id" property="id" jdbcType="INTEGER" />
     <result column="sd_said" property="sd_said" jdbcType="INTEGER" />
     <result column="sd_detno" property="sd_detno" jdbcType="INTEGER" />
     <result column="sd_prodid" property="sd_prodid" jdbcType="INTEGER" />
@@ -17,130 +17,53 @@
     <result column="sd_sendqty" property="sd_sendqty" jdbcType="DOUBLE" />
     <result column="sd_pdqty" property="sd_pdqty" jdbcType="DOUBLE" />
     <result column="sd_remark" property="sd_remark" jdbcType="VARCHAR" />
-    <result column="companyid" property="companyid" jdbcType="INTEGER" />
+    <result column="companyId" property="companyId" jdbcType="INTEGER" />
     <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
-    <result column="updatetime" property="updatetime" jdbcType="TIMESTAMP" />
+    <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
     <result column="sd_text1" property="sd_text1" jdbcType="VARCHAR" />
     <result column="sd_text2" property="sd_text2" jdbcType="VARCHAR" />
     <result column="sd_text3" property="sd_text3" jdbcType="VARCHAR" />
     <result column="sd_text4" property="sd_text4" jdbcType="VARCHAR" />
     <result column="sd_text5" property="sd_text5" jdbcType="VARCHAR" />
   </resultMap>
-  <sql id="Example_Where_Clause" >
-    <where >
-      <foreach collection="oredCriteria" item="criteria" separator="or" >
-        <if test="criteria.valid" >
-          <trim prefix="(" suffix=")" prefixOverrides="and" >
-            <foreach collection="criteria.criteria" item="criterion" >
-              <choose >
-                <when test="criterion.noValue" >
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue" >
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue" >
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue" >
-                  and ${criterion.condition}
-                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
-  <sql id="Update_By_Example_Where_Clause" >
-    <where >
-      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
-        <if test="criteria.valid" >
-          <trim prefix="(" suffix=")" prefixOverrides="and" >
-            <foreach collection="criteria.criteria" item="criterion" >
-              <choose >
-                <when test="criterion.noValue" >
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue" >
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue" >
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue" >
-                  and ${criterion.condition}
-                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
   <sql id="Base_Column_List" >
     sd_id, sd_said, sd_detno, sd_prodid, sd_prodcode, sd_qty, sd_price, sd_total, sd_taxrate, 
-    sd_netprice, sd_nettotal, sd_delivery, sd_sendqty, sd_pdqty, sd_remark, companyid, 
-    updaterId, updatetime, sd_text1, sd_text2, sd_text3, sd_text4, sd_text5
+    sd_netprice, sd_nettotal, sd_delivery, sd_sendqty, sd_pdqty, sd_remark, companyId, 
+    updaterId, updateTime, sd_text1, sd_text2, sd_text3, sd_text4, sd_text5
   </sql>
-  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.usoftchina.saas.sale.po.SaledetailExample" >
-    select
-    <if test="distinct" >
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    from saledetail
-    <if test="_parameter != null" >
-      <include refid="Example_Where_Clause" />
-    </if>
-    <if test="orderByClause != null" >
-      order by ${orderByClause}
-    </if>
-  </select>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
     select 
     <include refid="Base_Column_List" />
     from saledetail
-    where sd_id = #{sd_id,jdbcType=INTEGER}
+    where sd_id = #{id,jdbcType=INTEGER}
   </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
     delete from saledetail
-    where sd_id = #{sd_id,jdbcType=INTEGER}
+    where sd_id = #{id}
   </delete>
-  <delete id="deleteByExample" parameterType="com.usoftchina.saas.sale.po.SaledetailExample" >
-    delete from saledetail
-    <if test="_parameter != null" >
-      <include refid="Example_Where_Clause" />
-    </if>
-  </delete>
-  <insert id="insert" parameterType="com.usoftchina.saas.sale.po.Saledetail" >
+
+  <insert id="insert" parameterType="com.usoftchina.saas.sale.po.SaleDetail" >
     insert into saledetail (sd_id, sd_said, sd_detno, 
       sd_prodid, sd_prodcode, sd_qty, 
       sd_price, sd_total, sd_taxrate, 
       sd_netprice, sd_nettotal, sd_delivery, 
       sd_sendqty, sd_pdqty, sd_remark, 
-      companyid, updaterId, updatetime, 
+      companyId, updaterId, updateTime, 
       sd_text1, sd_text2, sd_text3, 
       sd_text4, sd_text5)
-    values (#{sd_id,jdbcType=INTEGER}, #{sd_said,jdbcType=INTEGER}, #{sd_detno,jdbcType=INTEGER}, 
+    values (#{id,jdbcType=INTEGER}, #{sd_said,jdbcType=INTEGER}, #{sd_detno,jdbcType=INTEGER},
       #{sd_prodid,jdbcType=INTEGER}, #{sd_prodcode,jdbcType=VARCHAR}, #{sd_qty,jdbcType=DOUBLE}, 
       #{sd_price,jdbcType=DOUBLE}, #{sd_total,jdbcType=DOUBLE}, #{sd_taxrate,jdbcType=DOUBLE}, 
       #{sd_netprice,jdbcType=DOUBLE}, #{sd_nettotal,jdbcType=DOUBLE}, #{sd_delivery,jdbcType=TIMESTAMP}, 
       #{sd_sendqty,jdbcType=DOUBLE}, #{sd_pdqty,jdbcType=DOUBLE}, #{sd_remark,jdbcType=VARCHAR}, 
-      #{companyid,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER}, #{updatetime,jdbcType=TIMESTAMP}, 
+      #{companyId,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, 
       #{sd_text1,jdbcType=VARCHAR}, #{sd_text2,jdbcType=VARCHAR}, #{sd_text3,jdbcType=VARCHAR}, 
       #{sd_text4,jdbcType=VARCHAR}, #{sd_text5,jdbcType=VARCHAR})
   </insert>
-  <insert id="insertSelective" parameterType="com.usoftchina.saas.sale.po.Saledetail" >
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.sale.po.SaleDetail" >
     insert into saledetail
     <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="sd_id != null" >
+      <if test="id != null" >
         sd_id,
       </if>
       <if test="sd_said != null" >
@@ -185,14 +108,14 @@
       <if test="sd_remark != null" >
         sd_remark,
       </if>
-      <if test="companyid != null" >
-        companyid,
+      <if test="companyId != null" >
+        companyId,
       </if>
       <if test="updaterId != null" >
         updaterId,
       </if>
-      <if test="updatetime != null" >
-        updatetime,
+      <if test="updateTime != null" >
+        updateTime,
       </if>
       <if test="sd_text1 != null" >
         sd_text1,
@@ -211,8 +134,8 @@
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="sd_id != null" >
-        #{sd_id,jdbcType=INTEGER},
+      <if test="id != null" >
+        #{id,jdbcType=INTEGER},
       </if>
       <if test="sd_said != null" >
         #{sd_said,jdbcType=INTEGER},
@@ -256,14 +179,14 @@
       <if test="sd_remark != null" >
         #{sd_remark,jdbcType=VARCHAR},
       </if>
-      <if test="companyid != null" >
-        #{companyid,jdbcType=INTEGER},
+      <if test="companyId != null" >
+        #{companyId,jdbcType=INTEGER},
       </if>
       <if test="updaterId != null" >
         #{updaterId,jdbcType=INTEGER},
       </if>
-      <if test="updatetime != null" >
-        #{updatetime,jdbcType=TIMESTAMP},
+      <if test="updateTime != null" >
+        #{updateTime,jdbcType=TIMESTAMP},
       </if>
       <if test="sd_text1 != null" >
         #{sd_text1,jdbcType=VARCHAR},
@@ -282,119 +205,7 @@
       </if>
     </trim>
   </insert>
-  <select id="countByExample" parameterType="com.usoftchina.saas.sale.po.SaledetailExample" resultType="java.lang.Integer" >
-    select count(*) from saledetail
-    <if test="_parameter != null" >
-      <include refid="Example_Where_Clause" />
-    </if>
-  </select>
-  <update id="updateByExampleSelective" parameterType="map" >
-    update saledetail
-    <set >
-      <if test="record.sd_id != null" >
-        sd_id = #{record.sd_id,jdbcType=INTEGER},
-      </if>
-      <if test="record.sd_said != null" >
-        sd_said = #{record.sd_said,jdbcType=INTEGER},
-      </if>
-      <if test="record.sd_detno != null" >
-        sd_detno = #{record.sd_detno,jdbcType=INTEGER},
-      </if>
-      <if test="record.sd_prodid != null" >
-        sd_prodid = #{record.sd_prodid,jdbcType=INTEGER},
-      </if>
-      <if test="record.sd_prodcode != null" >
-        sd_prodcode = #{record.sd_prodcode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.sd_qty != null" >
-        sd_qty = #{record.sd_qty,jdbcType=DOUBLE},
-      </if>
-      <if test="record.sd_price != null" >
-        sd_price = #{record.sd_price,jdbcType=DOUBLE},
-      </if>
-      <if test="record.sd_total != null" >
-        sd_total = #{record.sd_total,jdbcType=DOUBLE},
-      </if>
-      <if test="record.sd_taxrate != null" >
-        sd_taxrate = #{record.sd_taxrate,jdbcType=DOUBLE},
-      </if>
-      <if test="record.sd_netprice != null" >
-        sd_netprice = #{record.sd_netprice,jdbcType=DOUBLE},
-      </if>
-      <if test="record.sd_nettotal != null" >
-        sd_nettotal = #{record.sd_nettotal,jdbcType=DOUBLE},
-      </if>
-      <if test="record.sd_delivery != null" >
-        sd_delivery = #{record.sd_delivery,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.sd_sendqty != null" >
-        sd_sendqty = #{record.sd_sendqty,jdbcType=DOUBLE},
-      </if>
-      <if test="record.sd_pdqty != null" >
-        sd_pdqty = #{record.sd_pdqty,jdbcType=DOUBLE},
-      </if>
-      <if test="record.sd_remark != null" >
-        sd_remark = #{record.sd_remark,jdbcType=VARCHAR},
-      </if>
-      <if test="record.companyid != null" >
-        companyid = #{record.companyid,jdbcType=INTEGER},
-      </if>
-      <if test="record.updaterId != null" >
-        updaterId = #{record.updaterId,jdbcType=INTEGER},
-      </if>
-      <if test="record.updatetime != null" >
-        updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.sd_text1 != null" >
-        sd_text1 = #{record.sd_text1,jdbcType=VARCHAR},
-      </if>
-      <if test="record.sd_text2 != null" >
-        sd_text2 = #{record.sd_text2,jdbcType=VARCHAR},
-      </if>
-      <if test="record.sd_text3 != null" >
-        sd_text3 = #{record.sd_text3,jdbcType=VARCHAR},
-      </if>
-      <if test="record.sd_text4 != null" >
-        sd_text4 = #{record.sd_text4,jdbcType=VARCHAR},
-      </if>
-      <if test="record.sd_text5 != null" >
-        sd_text5 = #{record.sd_text5,jdbcType=VARCHAR},
-      </if>
-    </set>
-    <if test="_parameter != null" >
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByExample" parameterType="map" >
-    update saledetail
-    set sd_id = #{record.sd_id,jdbcType=INTEGER},
-      sd_said = #{record.sd_said,jdbcType=INTEGER},
-      sd_detno = #{record.sd_detno,jdbcType=INTEGER},
-      sd_prodid = #{record.sd_prodid,jdbcType=INTEGER},
-      sd_prodcode = #{record.sd_prodcode,jdbcType=VARCHAR},
-      sd_qty = #{record.sd_qty,jdbcType=DOUBLE},
-      sd_price = #{record.sd_price,jdbcType=DOUBLE},
-      sd_total = #{record.sd_total,jdbcType=DOUBLE},
-      sd_taxrate = #{record.sd_taxrate,jdbcType=DOUBLE},
-      sd_netprice = #{record.sd_netprice,jdbcType=DOUBLE},
-      sd_nettotal = #{record.sd_nettotal,jdbcType=DOUBLE},
-      sd_delivery = #{record.sd_delivery,jdbcType=TIMESTAMP},
-      sd_sendqty = #{record.sd_sendqty,jdbcType=DOUBLE},
-      sd_pdqty = #{record.sd_pdqty,jdbcType=DOUBLE},
-      sd_remark = #{record.sd_remark,jdbcType=VARCHAR},
-      companyid = #{record.companyid,jdbcType=INTEGER},
-      updaterId = #{record.updaterId,jdbcType=INTEGER},
-      updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
-      sd_text1 = #{record.sd_text1,jdbcType=VARCHAR},
-      sd_text2 = #{record.sd_text2,jdbcType=VARCHAR},
-      sd_text3 = #{record.sd_text3,jdbcType=VARCHAR},
-      sd_text4 = #{record.sd_text4,jdbcType=VARCHAR},
-      sd_text5 = #{record.sd_text5,jdbcType=VARCHAR}
-    <if test="_parameter != null" >
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.sale.po.Saledetail" >
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.sale.po.SaleDetail" >
     update saledetail
     <set >
       <if test="sd_said != null" >
@@ -439,14 +250,14 @@
       <if test="sd_remark != null" >
         sd_remark = #{sd_remark,jdbcType=VARCHAR},
       </if>
-      <if test="companyid != null" >
-        companyid = #{companyid,jdbcType=INTEGER},
+      <if test="companyId != null" >
+        companyId = #{companyId,jdbcType=INTEGER},
       </if>
       <if test="updaterId != null" >
         updaterId = #{updaterId,jdbcType=INTEGER},
       </if>
-      <if test="updatetime != null" >
-        updatetime = #{updatetime,jdbcType=TIMESTAMP},
+      <if test="updateTime != null" >
+        updateTime = #{updateTime,jdbcType=TIMESTAMP},
       </if>
       <if test="sd_text1 != null" >
         sd_text1 = #{sd_text1,jdbcType=VARCHAR},
@@ -464,9 +275,9 @@
         sd_text5 = #{sd_text5,jdbcType=VARCHAR},
       </if>
     </set>
-    where sd_id = #{sd_id,jdbcType=INTEGER}
+    where sd_id = #{id,jdbcType=INTEGER}
   </update>
-  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.sale.po.Saledetail" >
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.sale.po.SaleDetail" >
     update saledetail
     set sd_said = #{sd_said,jdbcType=INTEGER},
       sd_detno = #{sd_detno,jdbcType=INTEGER},
@@ -482,14 +293,77 @@
       sd_sendqty = #{sd_sendqty,jdbcType=DOUBLE},
       sd_pdqty = #{sd_pdqty,jdbcType=DOUBLE},
       sd_remark = #{sd_remark,jdbcType=VARCHAR},
-      companyid = #{companyid,jdbcType=INTEGER},
+      companyId = #{companyId,jdbcType=INTEGER},
       updaterId = #{updaterId,jdbcType=INTEGER},
-      updatetime = #{updatetime,jdbcType=TIMESTAMP},
+      updateTime = #{updateTime,jdbcType=TIMESTAMP},
       sd_text1 = #{sd_text1,jdbcType=VARCHAR},
       sd_text2 = #{sd_text2,jdbcType=VARCHAR},
       sd_text3 = #{sd_text3,jdbcType=VARCHAR},
       sd_text4 = #{sd_text4,jdbcType=VARCHAR},
       sd_text5 = #{sd_text5,jdbcType=VARCHAR}
-    where sd_id = #{sd_id,jdbcType=INTEGER}
+    where sd_id = #{id,jdbcType=INTEGER}
   </update>
+
+  <insert id="batchInsert" parameterType="java.util.List" >
+    insert into saledetail (sd_said, sd_detno,
+    sd_prodid, sd_prodcode, sd_qty,
+    sd_price, sd_total, sd_taxrate,
+    sd_netprice, sd_nettotal, sd_delivery,
+    sd_sendqty, sd_pdqty, sd_remark,
+    companyId, updaterId, updateTime,
+    sd_text1, sd_text2, sd_text3,
+    sd_text4, sd_text5)
+    values
+    <foreach collection="list" item="item" index="index" open="" close="" separator=",">
+      (
+      (#{item.sd_said,jdbcType=INTEGER}, #{item.sd_detno,jdbcType=INTEGER},
+      #{item.sd_prodid,jdbcType=INTEGER}, #{item.sd_prodcode,jdbcType=VARCHAR}, #{item.sd_qty,jdbcType=DOUBLE},
+      #{item.sd_price,jdbcType=DOUBLE}, #{item.sd_total,jdbcType=DOUBLE}, #{item.sd_taxrate,jdbcType=DOUBLE},
+      #{item.sd_netprice,jdbcType=DOUBLE}, #{item.sd_nettotal,jdbcType=DOUBLE}, #{item.sd_delivery,jdbcType=TIMESTAMP},
+      #{item.sd_sendqty,jdbcType=DOUBLE}, #{item.sd_pdqty,jdbcType=DOUBLE}, #{item.sd_remark,jdbcType=VARCHAR},
+      #{item.companyId,jdbcType=INTEGER}, #{item.updaterId,jdbcType=INTEGER}, #{item.updateTime,jdbcType=TIMESTAMP},
+      #{item.sd_text1,jdbcType=VARCHAR}, #{item.sd_text2,jdbcType=VARCHAR}, #{item.sd_text3,jdbcType=VARCHAR},
+      #{item.sd_text4,jdbcType=VARCHAR}, #{item.sd_text5,jdbcType=VARCHAR})
+      )
+    </foreach>
+  </insert>
+  <update id="batchUpdate" parameterType="com.usoftchina.saas.sale.po.SaleDetail" >
+    <foreach collection="list" item="item" index="index" open="" close="" separator=";">
+      update saledetail <set>
+      set sd_said = #{item.sd_said,jdbcType=INTEGER},
+      sd_detno = #{item.sd_detno,jdbcType=INTEGER},
+      sd_prodid = #{item.sd_prodid,jdbcType=INTEGER},
+      sd_prodcode = #{item.sd_prodcode,jdbcType=VARCHAR},
+      sd_qty = #{item.sd_qty,jdbcType=DOUBLE},
+      sd_price = #{item.sd_price,jdbcType=DOUBLE},
+      sd_total = #{item.sd_total,jdbcType=DOUBLE},
+      sd_taxrate = #{item.sd_taxrate,jdbcType=DOUBLE},
+      sd_netprice = #{item.sd_netprice,jdbcType=DOUBLE},
+      sd_nettotal = #{item.sd_nettotal,jdbcType=DOUBLE},
+      sd_delivery = #{item.sd_delivery,jdbcType=TIMESTAMP},
+      sd_sendqty = #{item.sd_sendqty,jdbcType=DOUBLE},
+      sd_pdqty = #{item.sd_pdqty,jdbcType=DOUBLE},
+      sd_remark = #{item.sd_remark,jdbcType=VARCHAR},
+      companyId = #{item.companyId,jdbcType=INTEGER},
+      updaterId = #{item.updaterId,jdbcType=INTEGER},
+      updateTime = #{item.updateTime,jdbcType=TIMESTAMP},
+      sd_text1 = #{item.sd_text1,jdbcType=VARCHAR},
+      sd_text2 = #{item.sd_text2,jdbcType=VARCHAR},
+      sd_text3 = #{item.sd_text3,jdbcType=VARCHAR},
+      sd_text4 = #{item.sd_text4,jdbcType=VARCHAR},
+      sd_text5 = #{item.sd_text5,jdbcType=VARCHAR},
+      sd_yqty = #{item.sd_yqty,jdbcType=DOUBLE},
+      sd_code = #{item.sd_code,jdbcType=VARCHAR}
+    </set>
+      where sd_id = #{item.id,jdbcType=INTEGER}
+    </foreach>
+  </update>
+  <delete id="deleteByForeignKey" parameterType="java.lang.Long">
+    delete from saledetail where sd_said=#{id}
+  </delete>
+
+  <select id="selectByFK" parameterType="long" resultMap="BaseResultMap">
+    select * from saledetail
+    where sd_said=#{id} order by sd_detno
+  </select>
 </mapper>

+ 4 - 0
applications/storage/storage-dto/pom.xml

@@ -24,6 +24,10 @@
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>core</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>document-dto</artifactId>
+        </dependency>
     </dependencies>
 
 

+ 2 - 0
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/entities/ProdIODetail.java

@@ -1,6 +1,7 @@
 package com.usoftchina.saas.storage.entities;
 
 import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import com.usoftchina.saas.document.entities.Product;
 import lombok.Data;
 
 import java.io.Serializable;
@@ -80,4 +81,5 @@ public class ProdIODetail extends CommonBaseEntity implements Serializable {
 
     private Long pd_ioid;
 
+    private Product product;
 }

+ 6 - 0
base-servers/gateway-server/src/main/resources/application.yml

@@ -98,6 +98,12 @@ spring:
         - Path=/api/money/**
         filters:
         - RewritePath=/api/money/(?<segment>.*), /$\{segment}
+      - id: COMMONS-SERVER
+        uri: lb://COMMONS-SERVER
+        predicates:
+        - Path=/api/commons/**
+        filters:
+        - RewritePath=/api/commons/(?<segment>.*), /$\{segment}
 server:
   port: 8560
   tomcat:

+ 0 - 1
frontend/saas-web/app/view/core/baseform/FormPanel.js

@@ -12,7 +12,6 @@ Ext.define('saas.view.core.baseform.FormPanel', {
     layout: 'column',
     autoScroll: true,
     border: 1,
-    bodyPadding: 5,
     searchField:[],
 
     fieldDefaults: {

+ 1 - 1
frontend/saas-web/app/view/core/baseform/GridPanel.js

@@ -14,7 +14,7 @@ Ext.define('saas.view.core.baseform.GridPanel', {
             me.store = Ext.create('Ext.data.Store',{
                 fields:fields,
                 autoLoad: true,
-                pageSize: 6,
+                pageSize: 10,
                 data: [],
                 proxy: {
                     type: 'ajax',

+ 9 - 7
frontend/saas-web/app/view/core/query/QueryPanel.js

@@ -123,7 +123,7 @@ Ext.define('saas.view.core.query.QueryPanel', {
             }else {
                 var xtype = item.xtype || 'textfield',
                 type = item.fieldType || me.getDefaultFieldType(xtype),
-                operation = item.operation || me.getDefaultFieldOperation(type),
+                operation = item.operation || me.getDefaultFieldOperation(xtype),
                 conditionValue = me.getConditionValue(xtype, value);
     
                 if(!conditionValue) {
@@ -158,17 +158,19 @@ Ext.define('saas.view.core.query.QueryPanel', {
         return type;
     },
 
-    getDefaultFieldOperation: function(type) {
+    getDefaultFieldOperation: function(xtype) {
         var operation;
 
-        if(type == 'string') {
-            operation = 'like';
-        }else if(type == 'number') {
+        if(Ext.Array.contains(['numberfield'], xtype)) {
             operation = '=';
-        }else if(type == 'date') {
+        }else if(Ext.Array.contains(['datefield'], xtype)) {
             operation = '=';
-        }else if(type == 'enum') {
+        }else if(Ext.Array.contains(['condatefield'], xtype)) {
+            operation = 'between';
+        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo'], xtype)) {
             operation = 'in';
+        }else {
+            operation = 'like';
         }
 
         return operation;

+ 2 - 2
frontend/saas-web/app/view/document/customer/FormPanel.js

@@ -12,7 +12,6 @@ Ext.define('saas.view.document.customer.FormPanel', {
     layout: 'fit',
     autoScroll: true,
     border: 1,
-    bodyPadding: 5,
 
     fieldDefaults: {
         margin: '0 5 5 0',
@@ -23,7 +22,7 @@ Ext.define('saas.view.document.customer.FormPanel', {
 
     //字段属性
     _title:'客户管理',
-    _dataUrl:'http://192.168.253.41:9480/api/document/vendor/getVendorsByCondition',
+    _dataUrl:'http://192.168.253.228:9480/customer/list',
     _saveUrl:'http://192.168.253.228:8800/api/document/vendor/save',
     _deleteUrl:'http://192.168.253.228:8800/api/document/vendor/delete',
 
@@ -34,6 +33,7 @@ Ext.define('saas.view.document.customer.FormPanel', {
                 name : "vendorGrid", 
                 xtype : "core-baseform-gridpanel", 
                 layout:'fit',
+                margin:'',
                 dataUrl:me._dataUrl,
                 columns : [
                     {

+ 13 - 2
frontend/saas-web/app/view/document/kind/ChildForm.js

@@ -54,10 +54,21 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
         productkind:{
             items:[{
                 xtype:'hidden',
-                name:'pk_id'
+                name:'id'
+            },{
+                xtype:'textfield',
+                name:'pt_name',
+                allowBlank:false,
+                fieldLabel:'类型'
+            }],
+        },
+        productbrand:{
+            items:[{
+                xtype:'hidden',
+                name:'id'
             },{
                 xtype:'textfield',
-                name:'pk_kind',
+                name:'pb_name',
                 allowBlank:false,
                 fieldLabel:'类型'
             }],

+ 19 - 4
frontend/saas-web/app/view/document/kind/Kind.js

@@ -10,6 +10,7 @@ Ext.define('saas.view.document.kind.Kind', {
     viewModel: {
         type: 'document-kind'
     },
+    defaultType:'',
     tbar: [{
         xtype: 'segmentedbutton',
         reference: 'dataKind',
@@ -78,16 +79,30 @@ Ext.define('saas.view.document.kind.Kind', {
             }],
             keyField:'id',
             dataField:'vk_name',
-            reqUrl:'http://192.168.253.41:9480/api/document/vendorkind/save',
-            delUrl:'http://192.168.253.41:9480/api/document/vendorkind/delete'
+            reqUrl:'http://192.168.253.41:9480/vendorkind/save',
+            delUrl:'http://192.168.253.41:9480/vendorkind/delete'
         },
         productkind:{
             columns: [{
                 text: '物料类型',
-                dataIndex: 'pk_kind',
+                dataIndex: 'pt_name',
                 flex: 1
             }],
-            keyField:'pk_id',
+            keyField:'id',
+            dataField:'pt_name',
+            reqUrl:'http://192.168.253.41:9480/producttype/save',
+            delUrl:'http://192.168.253.41:9480/producttype/delete'
+        },
+        productbrand:{
+            columns: [{
+                text: '物料类型',
+                dataIndex: 'pb_name',
+                flex: 1
+            }],
+            keyField:'id',
+            dataField:'pb_name',
+            reqUrl:'http://192.168.253.41:9480/productbrand/save',
+            delUrl:'http://192.168.253.41:9480/productbrand/delete'
         },
         inoutkind:{
             columns: [{

+ 9 - 6
frontend/saas-web/app/view/document/kind/KindController.js

@@ -8,12 +8,15 @@ Ext.define('saas.view.document.kind.KindController', {
     FormUtil: Ext.create('saas.util.FormUtil'),
     BaseUtil: Ext.create('saas.util.BaseUtil'),
     loadDefualt:function(grid){
-        var me=this,
-            view = me.getView(),
-            vm = me.getViewModel(),
-            defaultKind=vm.getData()['dataKind'].value,
-            etc = view.etc[defaultKind];
-
+        var me=this,view = me.getView(),vm = me.getViewModel(),defaultKind;
+        if(view.defaultType!=''){
+            defaultKind = view.defaultType  //其他单表界面
+            vm.setData({'dataKind':{'value':defaultKind}});
+            debugger
+        }else{
+            defaultKind=vm.getData()['dataKind'].value  //类别合并界面
+        }
+        var etc = view.etc[defaultKind];
         grid.reconfigure(vm.getStore(defaultKind), me.insertActionColumn(etc.columns));
     },
     onKindToggle:function(container, button, pressed){

+ 36 - 5
frontend/saas-web/app/view/document/kind/KindModel.js

@@ -34,7 +34,7 @@ Ext.define('saas.view.document.kind.KindModel', {
             ],
             proxy: {
                 type: 'ajax',
-                url: 'http://192.168.253.41:9480/api/document/vendorkind/getAll',
+                url: 'http://192.168.253.41:9480/vendorkind/getAll',
                 actionMethods: {
                     read: 'GET'
                 },
@@ -44,14 +44,45 @@ Ext.define('saas.view.document.kind.KindModel', {
                 }
             },
             pageSize: null,
-            autoLoad: false
+            autoLoad: true
         },
         productkind:{
             fields:[
-                {name: 'pk_id', type: 'int'},
-                {name: 'pk_kind',  type: 'string'}
+                {name: 'id', type: 'int'},
+                {name: 'pt_name',  type: 'string'}
             ],
-            data:[]
+            proxy: {
+                type: 'ajax',
+                url: 'http://192.168.253.41:9480/producttype/getAll',
+                actionMethods: {
+                    read: 'GET'
+                },
+                reader: {
+                    type: 'json',
+                    rootProperty: 'data'
+                }
+            },
+            pageSize: null,
+            autoLoad: true
+        },
+        productbrand:{
+            fields:[
+                {name: 'id', type: 'int'},
+                {name: 'pb_name',  type: 'string'}
+            ],
+            proxy: {
+                type: 'ajax',
+                url: 'http://192.168.253.41:9480/productbrand/getAll',
+                actionMethods: {
+                    read: 'GET'
+                },
+                reader: {
+                    type: 'json',
+                    rootProperty: 'data'
+                }
+            },
+            pageSize: null,
+            autoLoad: true
         },
         inoutkind:{
             fields:[

+ 25 - 0
frontend/saas-web/app/view/document/other/ProductBrand.js

@@ -0,0 +1,25 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.document.other.ProductBrand', {
+    extend: 'saas.view.document.kind.Kind',
+    xtype: 'other-productbrand',
+    autoScroll: true,
+    layout:'fit',
+    defaultType:'productbrand',
+    tbar: ['->',{
+        xtype:'button',
+        text:'新增',
+        listeners: {
+            click: 'onAdd'
+        }
+    },{
+        xtype:'button',
+        text:'刷新',
+        listeners: {
+            click: 'onRefresh'
+        }
+    }]
+})
+
+

+ 4 - 0
frontend/saas-web/resources/json/navigation.json

@@ -214,6 +214,10 @@
             "text": "收入类别",
             "viewType": "document-kind",
             "leaf": true
+        }, {
+            "text": "物料品牌",
+            "viewType": "other-productbrand",
+            "leaf": true
         }, {
             "text": "计量单位",
             "viewType": "mainlist",