Просмотр исходного кода

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

guq 7 лет назад
Родитель
Сommit
311360fc18
100 измененных файлов с 1619 добавлено и 5920 удалено
  1. 4 2
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/BillCodeSeq.java
  2. 26 87
      applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/ProductDTO.java
  3. 20 12
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/WarehouseController.java
  4. 6 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomerMapper.java
  5. 1 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/WarehouseMapper.java
  6. 6 4
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/WarehouseService.java
  7. 26 10
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java
  8. 32 5
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/WarehouseServiceImpl.java
  9. 7 0
      applications/document/document-server/src/main/resources/mapper/CustomerMapper.xml
  10. 10 2
      applications/document/document-server/src/main/resources/mapper/WarehouseMapper.xml
  11. 3 3
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdIODetailDTO.java
  12. 61 11
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/ProdInOutController.java
  13. 3 3
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/ProdInOutListMapper.java
  14. 7 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/ProdInOutMapper.java
  15. 2 2
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdIODetail.java
  16. 12 3
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/ProdInOutService.java
  17. 221 38
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java
  18. 1 1
      applications/purchase/purchase-server/src/main/resources/mapper/ProdIODetailMapper.xml
  19. 12 23
      applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutListMapper.xml
  20. 16 0
      applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutMapper.xml
  21. 0 1
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/ProdIODetailMapper.java
  22. 0 2
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/ProdInOutMapper.java
  23. 16 14
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/ProdInOutServiceImpl.java
  24. 5 1
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdIODetailDTO.java
  25. 0 1
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdInOutDTO.java
  26. 5 4
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdIODetail.java
  27. 0 2631
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdIODetailExample.java
  28. 2 10
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOut.java
  29. 0 2359
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOutExample.java
  30. 0 8
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOutList.java
  31. 67 12
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/controller/ProdInOutController.java
  32. 5 3
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/ProdIODetailMapper.java
  33. 6 2
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/ProdInOutListMapper.java
  34. 12 3
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/ProdInOutMapper.java
  35. 21 4
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/ProdInOutService.java
  36. 232 54
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/ProdInoutServiceImpl.java
  37. 6 43
      applications/storage/storage-server/src/main/resources/mapper/ProdIODetailMapper.xml
  38. 6 6
      applications/storage/storage-server/src/main/resources/mapper/ProdInOutListMapper.xml
  39. 87 26
      applications/storage/storage-server/src/main/resources/mapper/ProdInOutMapper.xml
  40. 7 0
      frontend/saas-web/app/model/document/productDTO.js
  41. 25 9
      frontend/saas-web/app/view/core/base/BasePanel.js
  42. 3 3
      frontend/saas-web/app/view/core/base/BasePanelController.js
  43. 4 0
      frontend/saas-web/app/view/core/base/BasePanelModel.js
  44. 7 7
      frontend/saas-web/app/view/core/base/GridPanel.js
  45. 0 4
      frontend/saas-web/app/view/core/baseform/FormPanelModel.js
  46. 16 0
      frontend/saas-web/app/view/document/bom/BasePanel.js
  47. 10 0
      frontend/saas-web/app/view/document/bom/BasePanelController.js
  48. 4 0
      frontend/saas-web/app/view/document/bom/BasePanelModel.js
  49. 92 0
      frontend/saas-web/app/view/document/customer/BasePanel.js
  50. 10 0
      frontend/saas-web/app/view/document/customer/BasePanelController.js
  51. 4 0
      frontend/saas-web/app/view/document/customer/BasePanelModel.js
  52. 3 2
      frontend/saas-web/app/view/document/customer/FormController.js
  53. 6 0
      frontend/saas-web/app/view/document/customer/FormModel.js
  54. 4 4
      frontend/saas-web/app/view/document/customer/FormPanel.js
  55. 0 112
      frontend/saas-web/app/view/document/customer/list/FormPanel.js
  56. 0 11
      frontend/saas-web/app/view/document/customer/list/FormPanelController.js
  57. 0 4
      frontend/saas-web/app/view/document/customer/list/FormPanelModel.js
  58. 0 6
      frontend/saas-web/app/view/document/customer/panel/FormModel.js
  59. 86 0
      frontend/saas-web/app/view/document/product/BasePanel.js
  60. 10 0
      frontend/saas-web/app/view/document/product/BasePanelController.js
  61. 4 0
      frontend/saas-web/app/view/document/product/BasePanelModel.js
  62. 2 2
      frontend/saas-web/app/view/document/product/FormController.js
  63. 6 0
      frontend/saas-web/app/view/document/product/FormModel.js
  64. 4 4
      frontend/saas-web/app/view/document/product/FormPanel.js
  65. 0 109
      frontend/saas-web/app/view/document/product/list/FormPanel.js
  66. 0 11
      frontend/saas-web/app/view/document/product/list/FormPanelController.js
  67. 0 4
      frontend/saas-web/app/view/document/product/list/FormPanelModel.js
  68. 0 6
      frontend/saas-web/app/view/document/product/panel/FormModel.js
  69. 91 0
      frontend/saas-web/app/view/document/vendor/BasePanel.js
  70. 10 0
      frontend/saas-web/app/view/document/vendor/BasePanelController.js
  71. 4 0
      frontend/saas-web/app/view/document/vendor/BasePanelModel.js
  72. 2 2
      frontend/saas-web/app/view/document/vendor/FormController.js
  73. 6 0
      frontend/saas-web/app/view/document/vendor/FormModel.js
  74. 4 4
      frontend/saas-web/app/view/document/vendor/FormPanel.js
  75. 0 116
      frontend/saas-web/app/view/document/vendor/list/FormPanel.js
  76. 0 11
      frontend/saas-web/app/view/document/vendor/list/FormPanelController.js
  77. 0 4
      frontend/saas-web/app/view/document/vendor/list/FormPanelModel.js
  78. 0 6
      frontend/saas-web/app/view/document/vendor/panel/FormModel.js
  79. 1 1
      frontend/saas-web/app/view/money/payBalance/FormPanelController.js
  80. 1 1
      frontend/saas-web/app/view/money/payBalance/QueryPanelController.js
  81. 2 2
      frontend/saas-web/app/view/money/recBalance/FormPanelController.js
  82. 2 2
      frontend/saas-web/app/view/money/recBalance/QueryPanelController.js
  83. 3 3
      frontend/saas-web/app/view/purchase/purchase/FormPanelController.js
  84. 1 1
      frontend/saas-web/app/view/purchase/purchase/QueryPanelController.js
  85. 26 7
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js
  86. 55 6
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js
  87. 2 1
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js
  88. 1 1
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanelController.js
  89. 77 37
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js
  90. 59 5
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js
  91. 1 0
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanelModel.js
  92. 10 14
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js
  93. 1 1
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanelController.js
  94. 1 0
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanelModel.js
  95. 1 1
      frontend/saas-web/app/view/sale/sale/FormPanelController.js
  96. 1 1
      frontend/saas-web/app/view/sale/sale/QueryPanelController.js
  97. 1 1
      frontend/saas-web/app/view/sale/saleIn/FormPanelController.js
  98. 1 1
      frontend/saas-web/app/view/sale/saleIn/QueryPanelController.js
  99. 1 1
      frontend/saas-web/app/view/sale/saleOut/FormPanelController.js
  100. 1 1
      frontend/saas-web/app/view/sale/saleOut/QueryPanelController.js

+ 4 - 2
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/BillCodeSeq.java

@@ -40,9 +40,11 @@ public enum  BillCodeSeq {
 
     VERIFICATION("核价单", "Verification"),
 
-    OTHRECEIPTS("其他收入单", "Otherceipts"),
+    OTHRECEIPTS("其它收入单","OthReceipts"),
 
-    OTHSPENDINGS("其他收入单", "Otherceipts"),
+    OTHSPENDINGS ("其它支出单","OthSpendings"),
+
+    FUNDTRANSFER ("资金转存","FundTransfer"),
 
     BOM("BOM资料", "Bom");
 

+ 26 - 87
applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/ProductDTO.java

@@ -1,100 +1,39 @@
 package com.usoftchina.saas.document.dto;
 
-import java.io.Serializable;
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import lombok.Data;
 
-public class ProductDTO implements Serializable {
+import java.io.Serializable;
+import java.util.Date;
+@Data
+public class ProductDTO extends CommonBaseEntity implements Serializable {
 
-    private long id;
     private String pr_code;
     private String pr_detail;
     private String pr_spec;
+    private String pr_unit;
+    private String pr_kind;
     private String pr_orispeccode;
+    private long pr_whid;
+    private String pr_whcode;
+    private String pr_whname;
+    private long pr_zxbzs;
+    private long pr_leadtime;
     private String pr_brand;
-    private String pr_unit;
+    private String pr_standardprice;
+    private String pr_purcprice;
+    private String pr_saleprice;
+    private long pr_vendid;
+    private String pr_vendname;
+    private String pr_vendcode;
+    private Date pr_docdate;
+    private long pr_recordmanid;
+    private String pr_recordman;
     private String pr_status;
     private String pr_statuscode;
+    private String pr_text1;
+    private String pr_text2;
+    private String pr_text3;
+    private String pr_text4;
 
-    public String getPr_status() {
-        return pr_status;
-    }
-
-    public void setPr_status(String pr_status) {
-        this.pr_status = pr_status;
-    }
-
-    public String getPr_statuscode() {
-        return pr_statuscode;
-    }
-
-    public void setPr_statuscode(String pr_statuscode) {
-        this.pr_statuscode = pr_statuscode;
-    }
-
-    public String getPr_unit() {
-        return pr_unit;
-    }
-
-    public void setPr_unit(String pr_unit) {
-        this.pr_unit = pr_unit;
-    }
-
-    public long getId() {
-        return id;
-    }
-
-    public void setId(long id) {
-        this.id = id;
-    }
-
-    public String getPr_code() {
-        return pr_code;
-    }
-
-    public void setPr_code(String pr_code) {
-        this.pr_code = pr_code;
-    }
-
-    public String getPr_detail() {
-        return pr_detail;
-    }
-
-    public void setPr_detail(String pr_detail) {
-        this.pr_detail = pr_detail;
-    }
-
-    public String getPr_spec() {
-        return pr_spec;
-    }
-
-    public void setPr_spec(String pr_spec) {
-        this.pr_spec = pr_spec;
-    }
-
-    public String getPr_orispeccode() {
-        return pr_orispeccode;
-    }
-
-    public void setPr_orispeccode(String pr_orispeccode) {
-        this.pr_orispeccode = pr_orispeccode;
-    }
-
-    public String getPr_brand() {
-        return pr_brand;
-    }
-
-    public void setPr_brand(String pr_brand) {
-        this.pr_brand = pr_brand;
-    }
-
-    @Override
-    public String toString() {
-        return "ProductDTO{" +
-                "pr_id='" + id + '\'' +
-                ", pr_code='" + pr_code + '\'' +
-                ", pr_detail='" + pr_detail + '\'' +
-                ", pr_spec='" + pr_spec + '\'' +
-                ", pr_orispeccode='" + pr_orispeccode + '\'' +
-                ", pr_brand='" + pr_brand + '\'' +
-                '}';
-    }
 }

+ 20 - 12
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/WarehouseController.java

@@ -1,16 +1,15 @@
 package com.usoftchina.saas.document.controller;
 
+import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.document.entities.Warehouse;
 import com.usoftchina.saas.document.service.WarehouseService;
+import com.usoftchina.saas.page.PageRequest;
 import org.springframework.beans.factory.annotation.Autowired;
-
 import org.springframework.web.bind.annotation.*;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
 
 import java.util.Map;
 
@@ -22,6 +21,23 @@ public class WarehouseController {
     @Autowired
     private WarehouseService warehouseService;
 
+    /**
+     * 仓库资料列表
+     *
+     * @param page
+     * @param req
+     * @return
+     */
+    @GetMapping("/list")
+    public Result<PageInfo<Warehouse>> getListData(PageRequest page, ListReqDTO req) {
+        PageInfo<Warehouse> listData = warehouseService.getListData(page, req);
+        return Result.success(listData);
+    }
+
+
+
+
+
     /**
      * 过账
      * @return
@@ -65,14 +81,6 @@ public class WarehouseController {
         return Result.success(result);
     }
 
-    /**
-     * 获取列表
-     * @return
-     */
-    @GetMapping("/list")
-    public Result getList(){
-        return Result.success(warehouseService.selectAll());
-    }
 
     /**
      * 关闭

+ 6 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomerMapper.java

@@ -2,6 +2,7 @@ package com.usoftchina.saas.document.mapper;
 
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.document.entities.Customer;
+import org.apache.ibatis.annotations.Param;
 
 public interface CustomerMapper extends CommonBaseMapper<Customer> {
     int deleteByPrimaryKey(Long cu_id);
@@ -15,4 +16,9 @@ public interface CustomerMapper extends CommonBaseMapper<Customer> {
     int updateByPrimaryKey(Customer record);
 
     String selectCodeById(Long id);
+
+    Integer validateCodeWhenInsert(@Param("code") String code, @Param("companyId") Long companyId);
+
+    Integer validateCodeWhenUpdate(@Param("code") String code, @Param("id") Long id,
+                                   @Param("companyId") Long companyId);
 }

+ 1 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/WarehouseMapper.java

@@ -27,7 +27,7 @@ public interface WarehouseMapper extends CommonBaseMapper<Warehouse> {
 
     void unPost(Map<String, Object> map);
 
-    List<Warehouse> selectAll(@Param("companyId") Long companyId);
+    List<Warehouse> selectWarehouseListByCondition(@Param("con") String con, @Param("companyId") Long companyId);
 
     int validateCodeWhenInsert(@Param("code") String code, @Param("companyId") Long companyId);
 

+ 6 - 4
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/WarehouseService.java

@@ -1,17 +1,20 @@
 package com.usoftchina.saas.document.service;
 
+import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.service.CommonBaseService;
 import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.document.entities.Warehouse;
 import com.usoftchina.saas.document.mapper.WarehouseMapper;
+import com.usoftchina.saas.page.PageRequest;
 
-
-import java.util.List;
 import java.util.Map;
 
 public interface WarehouseService extends CommonBaseService<WarehouseMapper, Warehouse> {
 
+    PageInfo<Warehouse> getListData(PageRequest page, ListReqDTO req);
+
     void post(Map<String, Object> map);
 
     boolean validPeriod(String periods);
@@ -19,8 +22,7 @@ public interface WarehouseService extends CommonBaseService<WarehouseMapper, War
     DocBaseDTO insertSelective(Warehouse record);
 
     void unPost(Map<String, Object> map);
-
-    List<Warehouse> selectAll();
+    
 
     /**
      * 关闭

+ 26 - 10
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java

@@ -3,10 +3,13 @@ package com.usoftchina.saas.document.service.impl;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.commons.api.MaxnumberService;
+import com.usoftchina.saas.commons.api.MessageLogService;
 import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.commons.exception.BizExceptionCode;
+import com.usoftchina.saas.commons.po.BillCodeSeq;
 import com.usoftchina.saas.commons.po.Status;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.dto.CustomerDTO;
@@ -49,7 +52,11 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
     @Autowired
     private CustomeraddressMapper customeraddressMapper;
 
+    @Autowired
+    private MessageLogService messageLogService;
 
+    @Autowired
+    private MaxnumberService maxnumberService;
 
 
     @Override
@@ -120,9 +127,9 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
         customer.setCreateTime(new Date());
 
         //编号校验
-//        pu_code = pushMaxnubmer(pu_code, pu_id);
+        cu_code = pushMaxnubmer(cu_code, cu_id);
         //单号赋值
-//        purchase.setPu_code(pu_code);
+        customer.setCu_code(cu_code);
         if (StringUtils.isEmpty(cu_id) || "0".equals(cu_id.toString())) {
             //插入操作
             getMapper().insertSelective(customer);
@@ -154,7 +161,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
             }
             baseDTO = getBaseDTOById(cu_id);
             //日志记录
-//            messageLogService.save(baseDTO);
+            messageLogService.save(baseDTO);
             return baseDTO;
         }
         //更新操作
@@ -206,7 +213,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
 
         baseDTO = getBaseDTOById(cu_id);
         //日志记录
-//            messageLogService.save(baseDTO);
+            messageLogService.save(baseDTO);
         return baseDTO;
     }
 
@@ -217,13 +224,14 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
 
     private void singleDelete(Long id) {
         if (null!=id) {
+            DocBaseDTO docBaseDTO = getBaseDTOById(id);
             //主表删除
             getMapper().deleteByPrimaryKey(id);
             //从表删除
             customercontactMapper.deleteByFK(id);
             customeraddressMapper.deleteByFK(id);
             //日志
-//            messageLogService.delete(docBaseDTO);
+            messageLogService.delete(docBaseDTO);
         }
     }
 
@@ -244,7 +252,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
         customercontactMapper.deleteByPrimaryKey(id);
         DocBaseDTO docBaseDTO = getBaseDTOById(id);
         //日志
-//        messageLogService.deleteDetail(docBaseDTO);
+        messageLogService.deleteDetail(docBaseDTO);
     }
 
     @Override
@@ -252,7 +260,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
         customeraddressMapper.deleteByPrimaryKey(id);
         DocBaseDTO docBaseDTO = getBaseDTOById(id);
         //日志
-//        messageLogService.deleteDetail(docBaseDTO);
+        messageLogService.deleteDetail(docBaseDTO);
     }
 
     private DocBaseDTO singleClose(Long id) {
@@ -267,7 +275,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
             getMapper().updateByPrimaryKeySelective(customer);
             docBaseDTO = getBaseDTOById(id);
             //日志
-//        messageLogService.close(docBaseDTO);
+        messageLogService.close(docBaseDTO);
         }
         return docBaseDTO;
     }
@@ -301,7 +309,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
             getMapper().updateByPrimaryKeySelective(customer);
             docBaseDTO = getBaseDTOById(id);
             //日志
-//        messageLogService.close(docBaseDTO);
+        messageLogService.close(docBaseDTO);
         }
         return docBaseDTO;
     }
@@ -355,7 +363,15 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
         return baseDTO;
     }
 
-
+    private String pushMaxnubmer(String code, Long id) {
+        if (null == code) {
+            throw new BizException(BizExceptionCode.NULL_CODE);
+        }
+        Long companyId = BaseContextHolder.getCompanyId();
+        Integer count = "0".equals(String.valueOf(id)) ? getMapper().validateCodeWhenInsert(code, companyId) :
+                getMapper().validateCodeWhenUpdate(code, id, companyId);
+        return maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.CUSTOMER.getCaller()).getData();
+    }
 
 
 

+ 32 - 5
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/WarehouseServiceImpl.java

@@ -1,10 +1,13 @@
 package com.usoftchina.saas.document.service.impl;
 
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.MaxnumberService;
 import com.usoftchina.saas.commons.api.MessageLogService;
 import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.commons.exception.BizExceptionCode;
 import com.usoftchina.saas.commons.po.BillCodeSeq;
 import com.usoftchina.saas.commons.po.Status;
@@ -13,10 +16,10 @@ import com.usoftchina.saas.document.entities.Warehouse;
 import com.usoftchina.saas.document.mapper.WarehouseMapper;
 import com.usoftchina.saas.document.service.WarehouseService;
 import com.usoftchina.saas.exception.BizException;
+import com.usoftchina.saas.page.PageRequest;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import javax.print.Doc;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -30,6 +33,34 @@ public class WarehouseServiceImpl extends CommonBaseServiceImpl<WarehouseMapper,
     @Autowired
     private MaxnumberService maxnumberService;
 
+    @Override
+    public PageInfo<Warehouse> getListData(PageRequest page, ListReqDTO req) {
+        //设置默认分页
+        if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
+            page = new PageRequest();
+            page.setNumber(1);
+            page.setSize(10);
+        }
+        PageHelper.startPage(page.getNumber(), page.getSize());
+        //查询数据
+        List<Warehouse> lists = getListByMode(req);
+        //取分页信息
+        PageInfo<Warehouse> pageInfo = new PageInfo<Warehouse>(lists);
+        return pageInfo;
+    }
+
+    private List<Warehouse> getListByMode(ListReqDTO req) {
+        List<Warehouse> list = null;
+        Long companyId = BaseContextHolder.getCompanyId();
+        String con = req.getFinalCondition();
+        if (null == con) {
+            con = "1=1";
+        }
+        list = getMapper().selectWarehouseListByCondition(con, companyId);
+        return list;
+    }
+
+
     /**
      * 过账
      * @param map
@@ -97,10 +128,6 @@ public class WarehouseServiceImpl extends CommonBaseServiceImpl<WarehouseMapper,
         getMapper().unPost(map);
     }
 
-    @Override
-    public List<Warehouse> selectAll() {
-        return getMapper().selectAll(BaseContextHolder.getCompanyId());
-    }
 
     @Override
     public DocBaseDTO close(Long id) {

+ 7 - 0
applications/document/document-server/src/main/resources/mapper/CustomerMapper.xml

@@ -352,6 +352,13 @@
     where cu_id = #{id,jdbcType=INTEGER}
   </update>
 
+  <select id="validateCodeWhenInsert" resultType="int">
+    select count(1) from customer where cu_code = #{code} and companyId =#{companyId}
+  </select>
+  <select id="validateCodeWhenUpdate" resultType="int" >
+    select count(1) from customer where cu_code = #{code} and cu_id != #{id} and companyId =#{companyId}
+  </select>
+
   <select id="selectCodeById" parameterType="java.lang.Long" resultType="string">
     select
     cu_code

+ 10 - 2
applications/document/document-server/src/main/resources/mapper/WarehouseMapper.xml

@@ -309,8 +309,16 @@
         where wh_id = #{wh_id,jdbcType=INTEGER}
     </update>
 
-    <select id="selectAll" resultType="com.usoftchina.saas.document.entities.Warehouse">
-        SELECT * FROM WAREHOUSE WHERE COMPANYID = #{companyId}
+    <select id="selectWarehouseListByCondition"  resultMap="WarehouseResultMapper">
+        select  *  from Warehouse
+        <where>
+            <if test="con != null">
+                ${con}
+            </if>
+            <if test="companyId != null">
+                and   companyid = #{companyId}
+            </if>
+        </where>  order by wh_id
     </select>
 
     <select id="validateCodeWhenInsert" resultType="int">

+ 3 - 3
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdIODetailDTO.java

@@ -1,7 +1,7 @@
 package com.usoftchina.saas.purchase.dto;
 
 import com.usoftchina.saas.base.entity.CommonBaseEntity;
-import com.usoftchina.saas.document.entities.Product;
+import com.usoftchina.saas.document.dto.ProductDTO;
 import lombok.Data;
 
 import java.io.Serializable;
@@ -25,7 +25,7 @@ public class ProdIODetailDTO extends CommonBaseEntity implements Serializable {
 
     private Integer pd_orderdetno;
 
-    private Integer pd_prodid;
+    private Long pd_prodid;
 
     private String pd_prodcode;
 
@@ -85,6 +85,6 @@ public class ProdIODetailDTO extends CommonBaseEntity implements Serializable {
 
     private Long pd_ioid;
 
-    private Product product;
+    private ProductDTO productDTO;
 
 }

+ 61 - 11
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/ProdInOutController.java

@@ -4,9 +4,9 @@ import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.purchase.dto.ProdInOutFormDTO;
-import com.usoftchina.saas.purchase.dto.ProdInOutReqDTO;
 import com.usoftchina.saas.purchase.po.ProdInOutList;
 import com.usoftchina.saas.purchase.service.ProdInOutService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -33,7 +33,7 @@ public class ProdInOutController {
      * @return
      */
     @GetMapping("/list")
-    public Result<PageInfo<ProdInOutList>> getListData(PageRequest page, ProdInOutReqDTO req) {
+    public Result<PageInfo<ProdInOutList>> getListData(PageRequest page, ListReqDTO req) {
         PageInfo<ProdInOutList> listData = prodInOutService.getListData(page,req);
         return Result.success(listData);
     }
@@ -61,13 +61,26 @@ public class ProdInOutController {
         return Result.success(savedDTO);
     }
 
+    /**
+     * 出入库单批量删除
+     *
+     * @param baseDTOs
+     * @return
+     */
+    @PostMapping("/batchDelete")
+    public Result batchDelete(@RequestBody BatchDealBaseDTO baseDTOs) {
+        prodInOutService.batchDelete(baseDTOs);
+        return Result.success();
+    }
+
+
     /**
      * 出入库单删除
      *
      * @param id
      * @return
      */
-    @GetMapping("/delete/{id}")
+    @PostMapping("/delete/{id}")
     public Result delete(@PathVariable("id") Long id) {
         prodInOutService.delete(id);
         return Result.success();
@@ -79,7 +92,7 @@ public class ProdInOutController {
      * @param id
      * @return
      */
-    @GetMapping("/deleteItem/{id}")
+    @PostMapping("/deleteItem/{id}")
     public Result deleteItem(@PathVariable("id") Long id) {
         prodInOutService.deleteItem(id);
         return Result.success();
@@ -104,7 +117,7 @@ public class ProdInOutController {
      * @param id
      * @return
      */
-    @GetMapping("/unAudit/{id}")
+    @PostMapping("/unAudit/{id}")
     public Result unAudit(@PathVariable("id") Long id) {
         prodInOutService.unAudit(id);
         return Result.success();
@@ -134,24 +147,61 @@ public class ProdInOutController {
         return Result.success();
     }
 
+    /**
+     * 出入库单关闭
+     *
+     * @param id
+     * @return
+     */
+    @PostMapping("/close/{id}")
+    public Result close(@PathVariable(value = "id") long id){
+        DocBaseDTO close = prodInOutService.close(id);
+        return Result.success(close);
+    }
+
 
     /**
-     * 出入库单批量删除
+     * 出入库单批量关闭
      *
      * @param baseDTOs
      * @return
      */
-    @PostMapping("/batchDelete")
-    public Result batchDelete(@RequestBody BatchDealBaseDTO baseDTOs) {
-        prodInOutService.batchDelete(baseDTOs);
+    @PostMapping("/batchClose")
+    public Result batchClose(@RequestBody BatchDealBaseDTO baseDTOs) {
+        prodInOutService.batchClose(baseDTOs);
+        return Result.success();
+    }
+
+    /**
+     * 出入库单启用
+     *
+     * @param id
+     * @return
+     */
+    @PostMapping("/open/{id}")
+    public Result open(@PathVariable(value = "id") long id){
+        DocBaseDTO open = prodInOutService.open(id);
+        return Result.success(open);
+    }
+
+    /**
+     * 出入库单批量启用
+     *
+     * @param baseDTOs
+     * @return
+     */
+    @PostMapping("/batchOpen")
+    public Result batchOpen(@RequestBody BatchDealBaseDTO baseDTOs) {
+        prodInOutService.batchOpen(baseDTOs);
         return Result.success();
     }
 
-    @GetMapping("/turnProdOut/{id}")
+
+    @PostMapping("/turnProdOut/{id}")
     public Result turnProdin(@PathVariable("id") Long id){
         prodInOutService.turnProdOut(id);
         return Result.success();
-    };
+    }
 
 
 

+ 3 - 3
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/ProdInOutListMapper.java

@@ -1,7 +1,7 @@
 package com.usoftchina.saas.purchase.mapper;
 
-import com.usoftchina.saas.purchase.dto.ProdInOutReqDTO;
 import com.usoftchina.saas.purchase.po.ProdInOutList;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -11,9 +11,9 @@ import java.util.List;
  */
 public interface ProdInOutListMapper {
 
-    List<ProdInOutList> selectProdInOutListByCondition(ProdInOutReqDTO reqDTO);
+    List<ProdInOutList> selectProdInOutListByCondition(@Param("con") String con, @Param("companyId") Long companyId);
 
-    List<ProdInOutList> selectProdInOutBycondition(ProdInOutReqDTO reqDTO);
+    List<ProdInOutList> selectProdInOutBycondition(@Param("con") String con,@Param("companyId") Long companyId);
 
 
 }

+ 7 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/ProdInOutMapper.java

@@ -2,6 +2,7 @@ package com.usoftchina.saas.purchase.mapper;
 
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.purchase.po.ProdInOut;
+import org.apache.ibatis.annotations.Param;
 
 public interface ProdInOutMapper extends CommonBaseMapper<ProdInOut> {
 
@@ -17,4 +18,10 @@ public interface ProdInOutMapper extends CommonBaseMapper<ProdInOut> {
     int updateByPrimaryKeyWithBLOBs(ProdInOut record);
 
     int updateByPrimaryKey(ProdInOut record);
+
+    Integer validateCodeWhenInsert(@Param("pi_inoutno") String pi_inoutno, @Param("companyId") Long companyId);
+
+    Integer validateCodeWhenUpdate(@Param("pi_inoutno") String pi_inoutno, @Param("id") Long id,@Param("companyId") Long companyId);
+
+    String selectCodeById(Long id);
 }

+ 2 - 2
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdIODetail.java

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

+ 12 - 3
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/ProdInOutService.java

@@ -5,9 +5,9 @@ import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.base.service.CommonBaseService;
 import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.purchase.dto.ProdInOutFormDTO;
-import com.usoftchina.saas.purchase.dto.ProdInOutReqDTO;
 import com.usoftchina.saas.purchase.mapper.ProdInOutMapper;
 import com.usoftchina.saas.purchase.po.ProdInOut;
 import com.usoftchina.saas.purchase.po.ProdInOutList;
@@ -47,21 +47,30 @@ public interface ProdInOutService extends CommonBaseService<ProdInOutMapper, Pro
      */
     DocBaseDTO audit(ProdInOutFormDTO formData);
 
+    void batchAudit(BatchDealBaseDTO baseDTOs);
+
     /**
      * 反审核出入库单
      * @param id
      */
     void unAudit(Long id);
 
-    void batchAudit(BatchDealBaseDTO baseDTOs);
+    void batchUnAudit(BatchDealBaseDTO baseDTOs);
 
     void deleteItem(Long id);
 
     void batchDelete(BatchDealBaseDTO baseDTOs);
 
-    PageInfo<ProdInOutList> getListData(PageRequest page, ProdInOutReqDTO req);
+    PageInfo<ProdInOutList> getListData(PageRequest page, ListReqDTO req);
 
     Result turnProdOut(Long id);
 
 
+    DocBaseDTO close(long id);
+
+    void batchClose(BatchDealBaseDTO baseDTOs);
+
+    DocBaseDTO open(long id);
+
+    void batchOpen(BatchDealBaseDTO baseDTOs);
 }

+ 221 - 38
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java

@@ -5,9 +5,13 @@ import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.MaxnumberService;
+import com.usoftchina.saas.commons.api.MessageLogService;
 import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.commons.exception.BizExceptionCode;
+import com.usoftchina.saas.commons.po.BillCodeSeq;
+import com.usoftchina.saas.commons.po.Status;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.api.WarehouseApi;
 import com.usoftchina.saas.exception.BizException;
@@ -16,7 +20,6 @@ import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.purchase.dto.ProdIODetailDTO;
 import com.usoftchina.saas.purchase.dto.ProdInOutDTO;
 import com.usoftchina.saas.purchase.dto.ProdInOutFormDTO;
-import com.usoftchina.saas.purchase.dto.ProdInOutReqDTO;
 import com.usoftchina.saas.purchase.mapper.*;
 import com.usoftchina.saas.purchase.po.ProdIODetail;
 import com.usoftchina.saas.purchase.po.ProdInOut;
@@ -25,6 +28,7 @@ import com.usoftchina.saas.purchase.service.ProdInOutService;
 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.*;
@@ -43,6 +47,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
     @Autowired
     private PurchasedetailMapper purchasedetailMapper;
     @Autowired
+    private MessageLogService messageLogService;
+    @Autowired
     private ProdInOutListMapper prodInOutListMapper;
     @Autowired
     private WarehouseApi warehouseApi;
@@ -53,7 +59,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
 
 
     @Override
-    public PageInfo<ProdInOutList> getListData(PageRequest page, ProdInOutReqDTO req) {
+    public PageInfo<ProdInOutList> getListData(PageRequest page, ListReqDTO req) {
         //设置默认分页
         //设置默认分页
         if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
@@ -69,12 +75,17 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         return pageInfo;
     }
 
-    private List<ProdInOutList> getListByMode(ProdInOutReqDTO req) {
+    private List<ProdInOutList> getListByMode(ListReqDTO req) {
         List<ProdInOutList> 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 = prodInOutListMapper.selectProdInOutListByCondition(req);
+              list = prodInOutListMapper.selectProdInOutListByCondition(con,companyId);
         } else {
-              list = prodInOutListMapper.selectProdInOutBycondition(req);
+              list = prodInOutListMapper.selectProdInOutBycondition(con,companyId);
         }
         return list;
     }
@@ -97,6 +108,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
     }
 
     @Override
+    @Transactional
     public DocBaseDTO saveFormData(ProdInOutFormDTO formdata) {
         if (null == formdata || null == formdata.getMain()){
             throw new BizException(500, "数据为空,请填写后再保存");
@@ -115,6 +127,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         DocBaseDTO baseDTO = new DocBaseDTO();
         Long pi_id = main.getId();
         String pi_inoutno = main.getPi_inoutno();
+        String pi_class = main.getPi_class();
         ProdInOut prodInOut = BeanMapper.map(main,ProdInOut.class);
         prodInOut.setCompanyId(companyId);
         prodInOut.setCreatorId(userId);
@@ -123,9 +136,9 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         prodInOut.setPi_puid(main.getPi_puid());
         prodInOut.setPi_pucode(main.getPi_pucode());
         //编号获取
-        pi_inoutno = pushMaxnubmer(pi_inoutno, pi_id);
+        pi_inoutno = pushMaxnubmer(prodInOut);
         prodInOut.setPi_inoutno(pi_inoutno);
-        baseDTO.setCode(pi_inoutno);
+
         //判断更新与保存动作
         if (StringUtils.isEmpty(pi_id) || "0".equals(pi_id.toString())){
             //插入操作
@@ -137,14 +150,20 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 detail.setPd_piid(pi_id);
                 detail.setPd_inoutno(pi_inoutno);
                 detail.setPd_piclass(prodInOut.getPi_class());
-                detail.setPd_yqty(new Double(0));
+                detail.setCompanyId(companyId);
+                detail.setCreatorId(userId);
+                detail.setCreateTime(new Date());
+
                 insertDetails.add(detail);
             }
             //插入从表
             if (insertDetails.size()>0) {
                 prodIODetailMapper.batchInsert(insertDetails);
             }
-            baseDTO.setId(pi_id);
+
+            baseDTO = getBaseDTOById(pi_id,pi_class,pi_inoutno);
+            //日志记录
+            messageLogService.save(baseDTO);
             return baseDTO;
         }
         //更新操作
@@ -155,6 +174,9 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             detail.setPd_piid(pi_id);
             detail.setPd_inoutno(pi_inoutno);
             detail.setPd_piclass(prodInOut.getPi_class());
+            detail.setCompanyId(companyId);
+            detail.setCreatorId(userId);
+            detail.setCreateTime(new Date());
             if (StringUtils.isEmpty(detail.getId()) || "0".equals(detail.getId().toString())) {
                 insertDetails.add(detail);
             } else {
@@ -169,32 +191,38 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         if (updateDetails.size()>0) {
             prodIODetailMapper.batchUpdate(updateDetails);
         }
-        baseDTO.setId(pi_id);
+        baseDTO = getBaseDTOById(pi_id,pi_class,pi_inoutno);
         //更新已转数
+        //日志记录
+        messageLogService.update(baseDTO);
         updateYqty(prodInOut);
         return baseDTO;
     }
 
+
     @Override
+    @Transactional
     public void delete(Long id) {
         singleDelete(id);
     }
 
     private void singleDelete(Long id) {
-        if (null != id) {
-            ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
+
+            ProdInOut prodInOut = checkAndReturnOrder(id);;
             //删除主键
             getMapper().deleteByPrimaryKey(prodInOut.getId());
             //删除从表
             prodIODetailMapper.deleteByFK(id);
+            DocBaseDTO docBaseDTO = getBaseDTOById(id,prodInOut.getPi_class(),prodInOut.getPi_inoutno());
             //更新已转数
-//            updateYqty(prodInOut.getPi_puid(),prodInOut.getPi_class());
             updateYqty(prodInOut);
-       }
+            //日志
+            messageLogService.delete(docBaseDTO);
     }
 
 
     @Override
+    @Transactional
     public DocBaseDTO audit(ProdInOutFormDTO formData) {
         Long id = null;
         DocBaseDTO baseDTO = new DocBaseDTO();
@@ -204,21 +232,42 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 baseDTO = saveFormData(formData);
                 id = baseDTO.getId();
             }
-            singleAudit(formData.getMain());
+            String res = singleAudit(formData.getMain());
+            if(res!=null){
+                new BizException(501,res);
+            }
         }
         baseDTO.setId(id);
         return baseDTO;
     }
 
-    @Override
-    public void unAudit(Long id) {
-        ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
-        ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
-        singleAudit(prodInOutDTO);
+    private String singleAudit(ProdInOutDTO prodInOutDTO) {
+        String pi_class= prodInOutDTO.getPi_class();
+        Map<String, Object> map = new HashMap<String, Object>();
+        map.put("inoutNo",prodInOutDTO.getPi_inoutno() );
+        map.put("class", pi_class);
+        map.put("commitid",BaseContextHolder.getUserId());
+        map.put("companyid",BaseContextHolder.getCompanyId());
+        map.put("result","");
+        warehouseApi.post(map);
+        Object result =  map.get("result");
+        if(result!=null){
+            return result.toString();
+        }else{
+            //记录日志
+            DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class,prodInOutDTO.getPi_inoutno());
+            //日志
+            messageLogService.audit(docBaseDTO);
+            return "";
+        }
     }
 
     @Override
     public void batchAudit(BatchDealBaseDTO baseDTOs) {
+        if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
+                baseDTOs.getBaseDTOs().size() == 0) {
+            return;
+        }
         for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
             Long id =  base.getId();
             ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
@@ -227,29 +276,59 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         }
     }
 
-    private void singleAudit(ProdInOutDTO prodInOutDTO) {
+    @Override
+    public void unAudit(Long id) {
+        ProdInOut prodInOut =checkAndReturnOrder(id);
+        ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut, ProdInOutDTO.class);
+        String res =  singleUnAudit(prodInOutDTO);
+
+    }
+
+    private String singleUnAudit(ProdInOutDTO prodInOutDTO) {
+        String pi_class= prodInOutDTO.getPi_class();
         Map<String, Object> map = new HashMap<String, Object>();
         map.put("inoutNo",prodInOutDTO.getPi_inoutno() );
-        map.put("class",prodInOutDTO.getPi_class() );
-        map.put("commitid",prodInOutDTO.getPi_recordmanid());
-        map.put("companyid",prodInOutDTO.getCompanyId());
+        map.put("class", pi_class);
+        map.put("commitid",BaseContextHolder.getUserId());
+        map.put("companyid",BaseContextHolder.getCompanyId());
         map.put("result","");
-        warehouseApi.post(map);
+        warehouseApi.unPost(map);
         Object result =  map.get("result");
-        System.out.println("result");
-        //记录日志
-        if (!StringUtils.isEmpty(result))
-            throw new BizException(500, "存在已审核单据,单据编号:" + result);
+        if(result!=null){
+            return result.toString();
+        }else{
+            //记录日志
+            DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class,prodInOutDTO.getPi_inoutno());
+            //日志
+            messageLogService.audit(docBaseDTO);
+            return "";
+        }
     }
 
+    @Override
+    public void batchUnAudit(BatchDealBaseDTO baseDTOs) {
+        if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
+                baseDTOs.getBaseDTOs().size() == 0) {
+            return;
+        }
+        for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
+            Long id =  base.getId();
+            ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
+            ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
+            singleUnAudit(prodInOutDTO);
+        }
+    }
 
     @Override
     public void deleteItem(Long id) {
         ProdIODetail prodIODetail = prodIODetailMapper.selectByPrimaryKey(id);
+        ProdInOut prodInOut = checkAndReturnOrder(prodIODetail.getPd_piid());
         prodIODetailMapper.deleteByPrimaryKey(id);
-        ProdInOut prodInOut = getMapper().selectByPrimaryKey(prodIODetail.getPd_piid());
         //更新已转数
         updateYqty(prodInOut);
+        DocBaseDTO docBaseDTO = getBaseDTOById(id,prodInOut.getPi_class(),prodInOut.getPi_inoutno());
+        //日志
+        messageLogService.deleteDetail(docBaseDTO);
     }
 
     @Override
@@ -292,9 +371,9 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         //插入验退单主表
         ProdInOut targetPi = new ProdInOut();
         //生成单号
-        String piInoutno = "YT0001";
+        String piInoutno = maxnumberService.getMaxnumber(BillCodeSeq.PURCHASEOUT.getCaller(),true).getData();
         targetPi.setPi_inoutno(piInoutno);
-        targetPi.setPi_class("采购验退单");
+        targetPi.setPi_class(BillCodeSeq.PURCHASEOUT.getName());
         targetPi.setPi_date(new Date());
         targetPi.setPi_recorddate(new Date());
         targetPi.setPi_vendcode(sourcePi.getPi_vendcode());
@@ -313,7 +392,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
              if(sourcePid.getPd_inqty()-sourcePid.getPd_yqty()>0){
                  targetPid.setPd_piid(pi_id);
                  targetPid.setPd_inoutno(piInoutno);
-                 targetPid.setPd_piclass("采购验退单");
+                 targetPid.setPd_piclass(BillCodeSeq.PURCHASEOUT.getName());
                  targetPid.setPd_pdno(i);
                  targetPid.setPd_orderid(sourcePid.getPd_orderid());
                  targetPid.setPd_ordercode(sourcePid.getPd_ordercode());
@@ -335,14 +414,118 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         return Result.success();
     }
 
-    private String pushMaxnubmer(String code, Long id) {
-        if (null == code) {
+    private DocBaseDTO singleClose(Long id) {
+        DocBaseDTO docBaseDTO = null;
+        if (null!=id) {
+            ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
+            if(Status.CLOSE.name().equals(prodInOut.getPi_statuscode())){
+                throw new BizException(BizExceptionCode.BIZ_CLOSE);
+            }
+            prodInOut.setPi_statuscode(Status.CLOSE.name());
+            prodInOut.setPi_status(Status.CLOSE.getDisplay());
+            getMapper().updateByPrimaryKeySelective(prodInOut);
+            docBaseDTO = getBaseDTOById(id,prodInOut.getPi_class(),prodInOut.getPi_inoutno());
+            //日志
+            messageLogService.close(docBaseDTO);
+        }
+        return docBaseDTO;
+    }
+
+
+    @Override
+    public DocBaseDTO close(long id) {
+        return singleClose(id);
+    }
+
+    @Override
+    public void batchClose(BatchDealBaseDTO baseDTOs) {
+        if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
+                baseDTOs.getBaseDTOs().size() == 0) {
+            return;
+        }
+        for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
+            singleClose(base.getId());
+        }
+    }
+
+    private DocBaseDTO singleOpen(Long id) {
+        DocBaseDTO docBaseDTO = null;
+        if (null!=id) {
+            ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
+            if(Status.OPEN.name().equals(prodInOut.getPi_statuscode())){
+                throw new BizException(BizExceptionCode.BIZ_OPEN);
+            }
+            prodInOut.setPi_statuscode(Status.OPEN.name());
+            prodInOut.setPi_status(Status.OPEN.getDisplay());
+            getMapper().updateByPrimaryKeySelective(prodInOut);
+            docBaseDTO = getBaseDTOById(id,prodInOut.getPi_class(),prodInOut.getPi_inoutno());
+            //日志
+        messageLogService.close(docBaseDTO);
+        }
+        return docBaseDTO;
+    }
+
+
+    @Override
+    public DocBaseDTO open(long id) {
+        return singleOpen(id);
+    }
+
+    @Override
+    public void batchOpen(BatchDealBaseDTO baseDTOs) {
+        if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
+                baseDTOs.getBaseDTOs().size() == 0) {
+            return;
+        }
+        for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
+            singleOpen(base.getId());
+        }
+    }
+
+    private DocBaseDTO getBaseDTOById(Long id, String pi_class,String code) {
+        if (null == id) {
+            return null;
+        }
+        String caller = BillCodeSeq.PURCHASEIN.getName().equals(pi_class)?BillCodeSeq.PURCHASEIN.getCaller():BillCodeSeq.PURCHASEOUT.getCaller();
+        DocBaseDTO baseDTO = new DocBaseDTO();
+        baseDTO.setId(id);
+        baseDTO.setCode(code);
+        baseDTO.setName(caller);
+        return baseDTO;
+    }
+
+
+    private String pushMaxnubmer(ProdInOut prodInOut) {
+        String pi_inoutno = prodInOut.getPi_inoutno();
+        String pi_class = prodInOut.getPi_class();
+        Long id = prodInOut.getId();
+        if (null == pi_inoutno) {
             throw new BizException(BizExceptionCode.NULL_CODE);
         }
         Long companyId = BaseContextHolder.getCompanyId();
-        Integer count = "0".equals(String.valueOf(id)) ? purchaseMapper.validateCodeWhenInsert(code, companyId) :
-                purchaseMapper.validateCodeWhenUpdate(code, id, companyId);
-        return maxnumberService.pushMaxnubmer(count, code, "Purchase").toString();
+        Integer count = "0".equals(String.valueOf(id)) ? getMapper().validateCodeWhenInsert(pi_inoutno, companyId) :
+                getMapper().validateCodeWhenUpdate(pi_inoutno, id, companyId);
+        String caller ="";
+        if("采购验收单".equals(pi_class)){
+            caller = BillCodeSeq.PURCHASEIN.getCaller();
+        }else if("采购验退单".equals(pi_class)) {
+            caller = BillCodeSeq.PURCHASEOUT.getCaller();
+        }
+        return maxnumberService.pushMaxnubmer(count, pi_inoutno, caller).getData();
+    }
+
+
+
+
+    private ProdInOut checkAndReturnOrder (Long id){
+        if(id == null || id <= 0) {
+            throw new BizException(BizExceptionCode.ILLEGAL_ID);
+        }
+        ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
+        if(prodInOut==null){
+            throw new BizException(BizExceptionCode.NO_DATA);
+        }
+        return prodInOut;
     }
 
 

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

@@ -41,7 +41,7 @@
     <result column="pd_ym" jdbcType="INTEGER" property="pd_ym" />
     <result column="pd_yqty" jdbcType="DOUBLE" property="pd_yqty" />
     <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
-    <association property="product" javaType="com.usoftchina.saas.document.entities.Product">
+    <association property="productDTO" javaType="com.usoftchina.saas.document.dto.ProductDTO">
       <id column="pr_id" property="id"/>
       <result column="pr_code" property="pr_code"/>
       <result column="pr_detail" property="pr_detail"/>

+ 12 - 23
applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutListMapper.xml

@@ -72,40 +72,29 @@
   </resultMap>
 
 
-  <select id="selectProdInOutListByCondition" parameterType="com.usoftchina.saas.purchase.dto.ProdInOutReqDTO" resultMap="BaseResultMap">
+  <select id="selectProdInOutListByCondition"  resultMap="BaseResultMap">
     select  *  from prodinout left join prodiodetail on pi_id = pd_piid
     <where>
-      <if test="begin != null">
-        pu_date &gt;= ${begin}
+      <if test="con != null">
+        ${con}
       </if>
-      <if test="end!= null">
-        AND  pu_date &lt;= ${end}
+      <if test="companyId != null">
+        and   prodinout.companyid = #{companyId}
       </if>
-      <if test="status != null">
-        AND pu_status=${status}
-      </if>
-      <if test="keyword != null">
-        AND ${keyword}
-      </if>
-    </where>
+    </where>  order by pi_id,pd_pdno
   </select>
 
-  <select id="selectProdInOutBycondition" parameterType="com.usoftchina.saas.purchase.dto.ProdInOutReqDTO" resultMap="BaseResultMap">
+  <select id="selectProdInOutBycondition"  resultMap="BaseResultMap">
     select  *  from prodinout
     <where>
-      <if test="begin != null">
-        pu_date &gt;= ${begin}
-      </if>
-      <if test="end!= null">
-        AND  pu_date &lt;= ${end}
-      </if>
-      <if test="status != null">
-        AND pu_status=${status}
+      <if test="con != null">
+        ${con}
       </if>
-      <if test="keyword != null">
-        AND ${keyword}
+      <if test="companyId != null">
+        and  companyid = #{companyId}
       </if>
     </where>
+    order by pi_id
   </select>
 
 

+ 16 - 0
applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutMapper.xml

@@ -422,4 +422,20 @@
       pi_text5 = #{pi_text5,jdbcType=VARCHAR}
     where pi_id = #{id,jdbcType=INTEGER}
   </update>
+
+  <select id="validateCodeWhenInsert"  resultType="int">
+    select count(1) from prodinout where pi_inoutno = #{pi_inoutno} and companyid = #{companyId}
+  </select>
+  <select id="validateCodeWhenUpdate" resultType="int" >
+    select count(1) from prodinout where pi_inoutno = #{pi_inoutno} and pi_id != #{id} and companyid != #{companyId}
+  </select>
+
+  <select id="selectCodeById" resultType="string" parameterType="long">
+    select pi_inoutno from prodinout where pi_id=#{id}
+  </select>
+
+
+
+
+
 </mapper>

+ 0 - 1
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/ProdIODetailMapper.java

@@ -2,7 +2,6 @@ package com.usoftchina.saas.sale.mapper;
 
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.storage.po.ProdIODetail;
-import com.usoftchina.saas.storage.po.ProdIODetailExample;
 
 
 import java.util.List;

+ 0 - 2
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/ProdInOutMapper.java

@@ -2,10 +2,8 @@ package com.usoftchina.saas.sale.mapper;
 
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 
-import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.storage.po.ProdInOut;
-import com.usoftchina.saas.storage.po.ProdInOutExample;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;

+ 16 - 14
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/ProdInOutServiceImpl.java

@@ -122,7 +122,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             if (insertDetails.size()>0) {
                 prodIODetailMapper.batchInsert(insertDetails);
             }
-            baseDTO = getBaseDTOById(pi_id,pi_class);
+            baseDTO = getBaseDTOById(pi_id,pi_class,pi_inoutno);
             //更新明细金额
             getTotal(pi_id,pi_class);
             //日志记录
@@ -151,7 +151,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         if (updateDetails.size()>0) {
             prodIODetailMapper.batchUpdate(updateDetails);
         }
-        baseDTO = getBaseDTOById(pi_id,pi_class);
+        baseDTO = getBaseDTOById(pi_id,pi_class,pi_inoutno);
         //更新已转数
         updateYqty(prodInOut);
         return baseDTO;
@@ -169,7 +169,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         prodIODetailMapper.deleteByForeignKey(id);
         //主表删除
         prodInOutMapper.deleteByPrimaryKey(id);
-        DocBaseDTO docBaseDTO = getBaseDTOById(id,prodInOut.getPi_class());
+        DocBaseDTO docBaseDTO = getBaseDTOById(id,prodInOut.getPi_class(),prodInOut.getPi_inoutno());
         //更新已转数
         updateYqty(prodInOut);
         //日志
@@ -188,7 +188,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 id = baseDTO.getId();
             }
             String res = singleAudit(formData.getMain());
-            if(res!=null){
+            if(StringUtils.hasText(res)){
                 new BizException(501,res);
             }
         }
@@ -197,19 +197,21 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
     }
     private String singleAudit(ProdInOutDTO prodInOutDTO) {
         String pi_class= prodInOutDTO.getPi_class();
+        String pi_inoutno = prodInOutDTO.getPi_inoutno();
         Map<String, Object> map = new HashMap<String, Object>();
-        map.put("inoutNo",prodInOutDTO.getPi_inoutno() );
+        map.put("inoutNo",pi_inoutno);
         map.put("class", pi_class);
         map.put("commitid",BaseContextHolder.getUserId());
         map.put("companyid",BaseContextHolder.getCompanyId());
         map.put("result","");
         warehouseApi.post(map);
         Object result =  map.get("result");
+        System.out.println("result:"+result);
         if(result!=null){
             return result.toString();
         }else{
             //记录日志
-            DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class);
+            DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class,pi_inoutno);
             //日志
             messageLogService.audit(docBaseDTO);
             return "";
@@ -232,9 +234,10 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         }
     }
     private String singleUnAudit(ProdInOutDTO prodInOutDTO) {
-        String pi_class= prodInOutDTO.getPi_class();
+        String pi_class = prodInOutDTO.getPi_class();
+        String  pi_inoutno = prodInOutDTO.getPi_inoutno();
         Map<String, Object> map = new HashMap<String, Object>();
-        map.put("inoutNo",prodInOutDTO.getPi_inoutno() );
+        map.put("inoutNo", pi_inoutno);
         map.put("class", pi_class);
         map.put("commitid",BaseContextHolder.getUserId());
         map.put("companyid",BaseContextHolder.getCompanyId());
@@ -252,7 +255,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             prodInOut.setUpdaterId(BaseContextHolder.getUserId());
             getMapper().updateByPrimaryKeySelective(prodInOut);
             //记录日志
-            DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class);
+            DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class,pi_inoutno);
             //日志
             messageLogService.unAudit(docBaseDTO);
             return "";
@@ -311,7 +314,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         Integer num = prodIODetailMapper.deleteByPrimaryKey(id);
         //更新已转数
         updateYqty(prodInOut);
-        DocBaseDTO docBaseDTO = getBaseDTOById(id,prodInOut.getPi_class());
+        DocBaseDTO docBaseDTO = getBaseDTOById(id,prodInOut.getPi_class(),prodInOut.getPi_inoutno());
         //日志
        messageLogService.deleteDetail(docBaseDTO);
         return num;
@@ -473,7 +476,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
 
         prodInOutMapper.updateByPrimaryKeySelective(prodInOut);
         //记录日志
-        DocBaseDTO docBaseDTO = getBaseDTOById(prodInOut.getId(),prodInOut.getPi_class());
+        DocBaseDTO docBaseDTO = getBaseDTOById(prodInOut.getId(),prodInOut.getPi_class(),prodInOut.getPi_inoutno());
        messageLogService.close(docBaseDTO);
         return "";
     }
@@ -518,7 +521,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         prodInOut.setPi_statuscode(Status.AUDITED.getDisplay());
         prodInOutMapper.updateByPrimaryKeySelective(prodInOut);
         //记录日志
-        DocBaseDTO docBaseDTO = getBaseDTOById(prodInOut.getId(),prodInOut.getPi_class());
+        DocBaseDTO docBaseDTO = getBaseDTOById(prodInOut.getId(),prodInOut.getPi_class(),prodInOut.getPi_inoutno());
         messageLogService.open(docBaseDTO);
         return "";
     }
@@ -591,12 +594,11 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
      * @Author: wuyx
      * @Date: 2018/10/25
      */
-    private DocBaseDTO getBaseDTOById(Long id,String pi_class) {
+    private DocBaseDTO getBaseDTOById(Long id,String pi_class,String code) {
         if (null == id) {
             return null;
         }
         String caller = BillCodeSeq.SALEIN.getName().equals(pi_class)?BillCodeSeq.SALEIN.getCaller():BillCodeSeq.SALEOUT.getCaller();
-        String code = prodInOutMapper.selectCodeById(id);
         DocBaseDTO baseDTO = new DocBaseDTO();
         baseDTO.setId(id);
         baseDTO.setCode(code);

+ 5 - 1
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdIODetailDTO.java

@@ -1,6 +1,7 @@
 package com.usoftchina.saas.storage.dto;
 
 import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import com.usoftchina.saas.document.dto.ProductDTO;
 import lombok.Data;
 
 import java.io.Serializable;
@@ -24,7 +25,7 @@ public class ProdIODetailDTO extends CommonBaseEntity implements Serializable {
 
     private Integer pd_orderdetno;
 
-    private Integer pd_prodid;
+    private Long pd_prodid;
 
     private String pd_prodcode;
 
@@ -83,4 +84,7 @@ public class ProdIODetailDTO extends CommonBaseEntity implements Serializable {
     private String pd_remark;
 
     private Long pd_ioid;
+
+    private ProductDTO productDTO;
+
 }

+ 0 - 1
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdInOutDTO.java

@@ -69,7 +69,6 @@ public class ProdInOutDTO extends CommonBaseEntity implements Serializable {
 
     private String pi_address;
 
-    private Long pi_inid;
 
 
 }

+ 5 - 4
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdIODetail.java

@@ -1,7 +1,7 @@
 package com.usoftchina.saas.storage.po;
 
 import com.usoftchina.saas.base.entity.CommonBaseEntity;
-import com.usoftchina.saas.document.entities.Product;
+import com.usoftchina.saas.document.dto.ProductDTO;
 import lombok.Data;
 
 import java.io.Serializable;
@@ -57,9 +57,9 @@ public class ProdIODetail extends CommonBaseEntity implements Serializable {
 
     private String pd_inwhname;
 
-    private Long pd_orderid;
+    private Integer pd_orderid;
 
-    private Long pd_sdid;
+    private Integer pd_sdid;
 
     private Integer pd_status;
 
@@ -81,5 +81,6 @@ public class ProdIODetail extends CommonBaseEntity implements Serializable {
 
     private Long pd_ioid;
 
-    private Product product;
+    private ProductDTO productDTO;
+
 }

+ 0 - 2631
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdIODetailExample.java

@@ -1,2631 +0,0 @@
-package com.usoftchina.saas.storage.po;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-public class ProdIODetailExample {
-    protected String orderByClause;
-
-    protected boolean distinct;
-
-    protected List<Criteria> oredCriteria;
-
-    public ProdIODetailExample() {
-        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 andPd_idIsNull() {
-            addCriterion("pd_id is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_idIsNotNull() {
-            addCriterion("pd_id is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_idEqualTo(Integer value) {
-            addCriterion("pd_id =", value, "pd_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_idNotEqualTo(Integer value) {
-            addCriterion("pd_id <>", value, "pd_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_idGreaterThan(Integer value) {
-            addCriterion("pd_id >", value, "pd_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_idGreaterThanOrEqualTo(Integer value) {
-            addCriterion("pd_id >=", value, "pd_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_idLessThan(Integer value) {
-            addCriterion("pd_id <", value, "pd_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_idLessThanOrEqualTo(Integer value) {
-            addCriterion("pd_id <=", value, "pd_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_idIn(List<Integer> values) {
-            addCriterion("pd_id in", values, "pd_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_idNotIn(List<Integer> values) {
-            addCriterion("pd_id not in", values, "pd_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_idBetween(Integer value1, Integer value2) {
-            addCriterion("pd_id between", value1, value2, "pd_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_idNotBetween(Integer value1, Integer value2) {
-            addCriterion("pd_id not between", value1, value2, "pd_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_piidIsNull() {
-            addCriterion("pd_piid is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_piidIsNotNull() {
-            addCriterion("pd_piid is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_piidEqualTo(Integer value) {
-            addCriterion("pd_piid =", value, "pd_piid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_piidNotEqualTo(Integer value) {
-            addCriterion("pd_piid <>", value, "pd_piid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_piidGreaterThan(Integer value) {
-            addCriterion("pd_piid >", value, "pd_piid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_piidGreaterThanOrEqualTo(Integer value) {
-            addCriterion("pd_piid >=", value, "pd_piid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_piidLessThan(Integer value) {
-            addCriterion("pd_piid <", value, "pd_piid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_piidLessThanOrEqualTo(Integer value) {
-            addCriterion("pd_piid <=", value, "pd_piid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_piidIn(List<Integer> values) {
-            addCriterion("pd_piid in", values, "pd_piid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_piidNotIn(List<Integer> values) {
-            addCriterion("pd_piid not in", values, "pd_piid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_piidBetween(Integer value1, Integer value2) {
-            addCriterion("pd_piid between", value1, value2, "pd_piid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_piidNotBetween(Integer value1, Integer value2) {
-            addCriterion("pd_piid not between", value1, value2, "pd_piid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inoutnoIsNull() {
-            addCriterion("pd_inoutno is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inoutnoIsNotNull() {
-            addCriterion("pd_inoutno is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inoutnoEqualTo(String value) {
-            addCriterion("pd_inoutno =", value, "pd_inoutno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inoutnoNotEqualTo(String value) {
-            addCriterion("pd_inoutno <>", value, "pd_inoutno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inoutnoGreaterThan(String value) {
-            addCriterion("pd_inoutno >", value, "pd_inoutno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inoutnoGreaterThanOrEqualTo(String value) {
-            addCriterion("pd_inoutno >=", value, "pd_inoutno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inoutnoLessThan(String value) {
-            addCriterion("pd_inoutno <", value, "pd_inoutno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inoutnoLessThanOrEqualTo(String value) {
-            addCriterion("pd_inoutno <=", value, "pd_inoutno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inoutnoLike(String value) {
-            addCriterion("pd_inoutno like", value, "pd_inoutno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inoutnoNotLike(String value) {
-            addCriterion("pd_inoutno not like", value, "pd_inoutno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inoutnoIn(List<String> values) {
-            addCriterion("pd_inoutno in", values, "pd_inoutno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inoutnoNotIn(List<String> values) {
-            addCriterion("pd_inoutno not in", values, "pd_inoutno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inoutnoBetween(String value1, String value2) {
-            addCriterion("pd_inoutno between", value1, value2, "pd_inoutno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inoutnoNotBetween(String value1, String value2) {
-            addCriterion("pd_inoutno not between", value1, value2, "pd_inoutno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_piclassIsNull() {
-            addCriterion("pd_piclass is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_piclassIsNotNull() {
-            addCriterion("pd_piclass is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_piclassEqualTo(String value) {
-            addCriterion("pd_piclass =", value, "pd_piclass");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_piclassNotEqualTo(String value) {
-            addCriterion("pd_piclass <>", value, "pd_piclass");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_piclassGreaterThan(String value) {
-            addCriterion("pd_piclass >", value, "pd_piclass");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_piclassGreaterThanOrEqualTo(String value) {
-            addCriterion("pd_piclass >=", value, "pd_piclass");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_piclassLessThan(String value) {
-            addCriterion("pd_piclass <", value, "pd_piclass");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_piclassLessThanOrEqualTo(String value) {
-            addCriterion("pd_piclass <=", value, "pd_piclass");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_piclassLike(String value) {
-            addCriterion("pd_piclass like", value, "pd_piclass");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_piclassNotLike(String value) {
-            addCriterion("pd_piclass not like", value, "pd_piclass");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_piclassIn(List<String> values) {
-            addCriterion("pd_piclass in", values, "pd_piclass");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_piclassNotIn(List<String> values) {
-            addCriterion("pd_piclass not in", values, "pd_piclass");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_piclassBetween(String value1, String value2) {
-            addCriterion("pd_piclass between", value1, value2, "pd_piclass");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_piclassNotBetween(String value1, String value2) {
-            addCriterion("pd_piclass not between", value1, value2, "pd_piclass");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_pdnoIsNull() {
-            addCriterion("pd_pdno is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_pdnoIsNotNull() {
-            addCriterion("pd_pdno is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_pdnoEqualTo(Integer value) {
-            addCriterion("pd_pdno =", value, "pd_pdno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_pdnoNotEqualTo(Integer value) {
-            addCriterion("pd_pdno <>", value, "pd_pdno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_pdnoGreaterThan(Integer value) {
-            addCriterion("pd_pdno >", value, "pd_pdno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_pdnoGreaterThanOrEqualTo(Integer value) {
-            addCriterion("pd_pdno >=", value, "pd_pdno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_pdnoLessThan(Integer value) {
-            addCriterion("pd_pdno <", value, "pd_pdno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_pdnoLessThanOrEqualTo(Integer value) {
-            addCriterion("pd_pdno <=", value, "pd_pdno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_pdnoIn(List<Integer> values) {
-            addCriterion("pd_pdno in", values, "pd_pdno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_pdnoNotIn(List<Integer> values) {
-            addCriterion("pd_pdno not in", values, "pd_pdno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_pdnoBetween(Integer value1, Integer value2) {
-            addCriterion("pd_pdno between", value1, value2, "pd_pdno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_pdnoNotBetween(Integer value1, Integer value2) {
-            addCriterion("pd_pdno not between", value1, value2, "pd_pdno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_ordercodeIsNull() {
-            addCriterion("pd_ordercode is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_ordercodeIsNotNull() {
-            addCriterion("pd_ordercode is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_ordercodeEqualTo(String value) {
-            addCriterion("pd_ordercode =", value, "pd_ordercode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_ordercodeNotEqualTo(String value) {
-            addCriterion("pd_ordercode <>", value, "pd_ordercode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_ordercodeGreaterThan(String value) {
-            addCriterion("pd_ordercode >", value, "pd_ordercode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_ordercodeGreaterThanOrEqualTo(String value) {
-            addCriterion("pd_ordercode >=", value, "pd_ordercode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_ordercodeLessThan(String value) {
-            addCriterion("pd_ordercode <", value, "pd_ordercode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_ordercodeLessThanOrEqualTo(String value) {
-            addCriterion("pd_ordercode <=", value, "pd_ordercode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_ordercodeLike(String value) {
-            addCriterion("pd_ordercode like", value, "pd_ordercode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_ordercodeNotLike(String value) {
-            addCriterion("pd_ordercode not like", value, "pd_ordercode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_ordercodeIn(List<String> values) {
-            addCriterion("pd_ordercode in", values, "pd_ordercode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_ordercodeNotIn(List<String> values) {
-            addCriterion("pd_ordercode not in", values, "pd_ordercode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_ordercodeBetween(String value1, String value2) {
-            addCriterion("pd_ordercode between", value1, value2, "pd_ordercode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_ordercodeNotBetween(String value1, String value2) {
-            addCriterion("pd_ordercode not between", value1, value2, "pd_ordercode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderdetnoIsNull() {
-            addCriterion("pd_orderdetno is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderdetnoIsNotNull() {
-            addCriterion("pd_orderdetno is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderdetnoEqualTo(Integer value) {
-            addCriterion("pd_orderdetno =", value, "pd_orderdetno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderdetnoNotEqualTo(Integer value) {
-            addCriterion("pd_orderdetno <>", value, "pd_orderdetno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderdetnoGreaterThan(Integer value) {
-            addCriterion("pd_orderdetno >", value, "pd_orderdetno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderdetnoGreaterThanOrEqualTo(Integer value) {
-            addCriterion("pd_orderdetno >=", value, "pd_orderdetno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderdetnoLessThan(Integer value) {
-            addCriterion("pd_orderdetno <", value, "pd_orderdetno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderdetnoLessThanOrEqualTo(Integer value) {
-            addCriterion("pd_orderdetno <=", value, "pd_orderdetno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderdetnoIn(List<Integer> values) {
-            addCriterion("pd_orderdetno in", values, "pd_orderdetno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderdetnoNotIn(List<Integer> values) {
-            addCriterion("pd_orderdetno not in", values, "pd_orderdetno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderdetnoBetween(Integer value1, Integer value2) {
-            addCriterion("pd_orderdetno between", value1, value2, "pd_orderdetno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderdetnoNotBetween(Integer value1, Integer value2) {
-            addCriterion("pd_orderdetno not between", value1, value2, "pd_orderdetno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_prodidIsNull() {
-            addCriterion("pd_prodid is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_prodidIsNotNull() {
-            addCriterion("pd_prodid is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_prodidEqualTo(Integer value) {
-            addCriterion("pd_prodid =", value, "pd_prodid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_prodidNotEqualTo(Integer value) {
-            addCriterion("pd_prodid <>", value, "pd_prodid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_prodidGreaterThan(Integer value) {
-            addCriterion("pd_prodid >", value, "pd_prodid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_prodidGreaterThanOrEqualTo(Integer value) {
-            addCriterion("pd_prodid >=", value, "pd_prodid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_prodidLessThan(Integer value) {
-            addCriterion("pd_prodid <", value, "pd_prodid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_prodidLessThanOrEqualTo(Integer value) {
-            addCriterion("pd_prodid <=", value, "pd_prodid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_prodidIn(List<Integer> values) {
-            addCriterion("pd_prodid in", values, "pd_prodid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_prodidNotIn(List<Integer> values) {
-            addCriterion("pd_prodid not in", values, "pd_prodid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_prodidBetween(Integer value1, Integer value2) {
-            addCriterion("pd_prodid between", value1, value2, "pd_prodid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_prodidNotBetween(Integer value1, Integer value2) {
-            addCriterion("pd_prodid not between", value1, value2, "pd_prodid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_prodcodeIsNull() {
-            addCriterion("pd_prodcode is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_prodcodeIsNotNull() {
-            addCriterion("pd_prodcode is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_prodcodeEqualTo(String value) {
-            addCriterion("pd_prodcode =", value, "pd_prodcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_prodcodeNotEqualTo(String value) {
-            addCriterion("pd_prodcode <>", value, "pd_prodcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_prodcodeGreaterThan(String value) {
-            addCriterion("pd_prodcode >", value, "pd_prodcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_prodcodeGreaterThanOrEqualTo(String value) {
-            addCriterion("pd_prodcode >=", value, "pd_prodcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_prodcodeLessThan(String value) {
-            addCriterion("pd_prodcode <", value, "pd_prodcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_prodcodeLessThanOrEqualTo(String value) {
-            addCriterion("pd_prodcode <=", value, "pd_prodcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_prodcodeLike(String value) {
-            addCriterion("pd_prodcode like", value, "pd_prodcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_prodcodeNotLike(String value) {
-            addCriterion("pd_prodcode not like", value, "pd_prodcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_prodcodeIn(List<String> values) {
-            addCriterion("pd_prodcode in", values, "pd_prodcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_prodcodeNotIn(List<String> values) {
-            addCriterion("pd_prodcode not in", values, "pd_prodcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_prodcodeBetween(String value1, String value2) {
-            addCriterion("pd_prodcode between", value1, value2, "pd_prodcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_prodcodeNotBetween(String value1, String value2) {
-            addCriterion("pd_prodcode not between", value1, value2, "pd_prodcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_unitIsNull() {
-            addCriterion("pd_unit is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_unitIsNotNull() {
-            addCriterion("pd_unit is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_unitEqualTo(String value) {
-            addCriterion("pd_unit =", value, "pd_unit");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_unitNotEqualTo(String value) {
-            addCriterion("pd_unit <>", value, "pd_unit");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_unitGreaterThan(String value) {
-            addCriterion("pd_unit >", value, "pd_unit");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_unitGreaterThanOrEqualTo(String value) {
-            addCriterion("pd_unit >=", value, "pd_unit");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_unitLessThan(String value) {
-            addCriterion("pd_unit <", value, "pd_unit");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_unitLessThanOrEqualTo(String value) {
-            addCriterion("pd_unit <=", value, "pd_unit");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_unitLike(String value) {
-            addCriterion("pd_unit like", value, "pd_unit");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_unitNotLike(String value) {
-            addCriterion("pd_unit not like", value, "pd_unit");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_unitIn(List<String> values) {
-            addCriterion("pd_unit in", values, "pd_unit");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_unitNotIn(List<String> values) {
-            addCriterion("pd_unit not in", values, "pd_unit");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_unitBetween(String value1, String value2) {
-            addCriterion("pd_unit between", value1, value2, "pd_unit");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_unitNotBetween(String value1, String value2) {
-            addCriterion("pd_unit not between", value1, value2, "pd_unit");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inqtyIsNull() {
-            addCriterion("pd_inqty is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inqtyIsNotNull() {
-            addCriterion("pd_inqty is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inqtyEqualTo(Integer value) {
-            addCriterion("pd_inqty =", value, "pd_inqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inqtyNotEqualTo(Integer value) {
-            addCriterion("pd_inqty <>", value, "pd_inqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inqtyGreaterThan(Integer value) {
-            addCriterion("pd_inqty >", value, "pd_inqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inqtyGreaterThanOrEqualTo(Integer value) {
-            addCriterion("pd_inqty >=", value, "pd_inqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inqtyLessThan(Integer value) {
-            addCriterion("pd_inqty <", value, "pd_inqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inqtyLessThanOrEqualTo(Integer value) {
-            addCriterion("pd_inqty <=", value, "pd_inqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inqtyIn(List<Integer> values) {
-            addCriterion("pd_inqty in", values, "pd_inqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inqtyNotIn(List<Integer> values) {
-            addCriterion("pd_inqty not in", values, "pd_inqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inqtyBetween(Integer value1, Integer value2) {
-            addCriterion("pd_inqty between", value1, value2, "pd_inqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inqtyNotBetween(Integer value1, Integer value2) {
-            addCriterion("pd_inqty not between", value1, value2, "pd_inqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_outqtyIsNull() {
-            addCriterion("pd_outqty is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_outqtyIsNotNull() {
-            addCriterion("pd_outqty is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_outqtyEqualTo(Integer value) {
-            addCriterion("pd_outqty =", value, "pd_outqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_outqtyNotEqualTo(Integer value) {
-            addCriterion("pd_outqty <>", value, "pd_outqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_outqtyGreaterThan(Integer value) {
-            addCriterion("pd_outqty >", value, "pd_outqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_outqtyGreaterThanOrEqualTo(Integer value) {
-            addCriterion("pd_outqty >=", value, "pd_outqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_outqtyLessThan(Integer value) {
-            addCriterion("pd_outqty <", value, "pd_outqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_outqtyLessThanOrEqualTo(Integer value) {
-            addCriterion("pd_outqty <=", value, "pd_outqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_outqtyIn(List<Integer> values) {
-            addCriterion("pd_outqty in", values, "pd_outqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_outqtyNotIn(List<Integer> values) {
-            addCriterion("pd_outqty not in", values, "pd_outqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_outqtyBetween(Integer value1, Integer value2) {
-            addCriterion("pd_outqty between", value1, value2, "pd_outqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_outqtyNotBetween(Integer value1, Integer value2) {
-            addCriterion("pd_outqty not between", value1, value2, "pd_outqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderpriceIsNull() {
-            addCriterion("pd_orderprice is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderpriceIsNotNull() {
-            addCriterion("pd_orderprice is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderpriceEqualTo(Double value) {
-            addCriterion("pd_orderprice =", value, "pd_orderprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderpriceNotEqualTo(Double value) {
-            addCriterion("pd_orderprice <>", value, "pd_orderprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderpriceGreaterThan(Double value) {
-            addCriterion("pd_orderprice >", value, "pd_orderprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderpriceGreaterThanOrEqualTo(Double value) {
-            addCriterion("pd_orderprice >=", value, "pd_orderprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderpriceLessThan(Double value) {
-            addCriterion("pd_orderprice <", value, "pd_orderprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderpriceLessThanOrEqualTo(Double value) {
-            addCriterion("pd_orderprice <=", value, "pd_orderprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderpriceIn(List<Double> values) {
-            addCriterion("pd_orderprice in", values, "pd_orderprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderpriceNotIn(List<Double> values) {
-            addCriterion("pd_orderprice not in", values, "pd_orderprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderpriceBetween(Double value1, Double value2) {
-            addCriterion("pd_orderprice between", value1, value2, "pd_orderprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderpriceNotBetween(Double value1, Double value2) {
-            addCriterion("pd_orderprice not between", value1, value2, "pd_orderprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_sendpriceIsNull() {
-            addCriterion("pd_sendprice is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_sendpriceIsNotNull() {
-            addCriterion("pd_sendprice is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_sendpriceEqualTo(Double value) {
-            addCriterion("pd_sendprice =", value, "pd_sendprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_sendpriceNotEqualTo(Double value) {
-            addCriterion("pd_sendprice <>", value, "pd_sendprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_sendpriceGreaterThan(Double value) {
-            addCriterion("pd_sendprice >", value, "pd_sendprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_sendpriceGreaterThanOrEqualTo(Double value) {
-            addCriterion("pd_sendprice >=", value, "pd_sendprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_sendpriceLessThan(Double value) {
-            addCriterion("pd_sendprice <", value, "pd_sendprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_sendpriceLessThanOrEqualTo(Double value) {
-            addCriterion("pd_sendprice <=", value, "pd_sendprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_sendpriceIn(List<Double> values) {
-            addCriterion("pd_sendprice in", values, "pd_sendprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_sendpriceNotIn(List<Double> values) {
-            addCriterion("pd_sendprice not in", values, "pd_sendprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_sendpriceBetween(Double value1, Double value2) {
-            addCriterion("pd_sendprice between", value1, value2, "pd_sendprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_sendpriceNotBetween(Double value1, Double value2) {
-            addCriterion("pd_sendprice not between", value1, value2, "pd_sendprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_priceIsNull() {
-            addCriterion("pd_price is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_priceIsNotNull() {
-            addCriterion("pd_price is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_priceEqualTo(Double value) {
-            addCriterion("pd_price =", value, "pd_price");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_priceNotEqualTo(Double value) {
-            addCriterion("pd_price <>", value, "pd_price");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_priceGreaterThan(Double value) {
-            addCriterion("pd_price >", value, "pd_price");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_priceGreaterThanOrEqualTo(Double value) {
-            addCriterion("pd_price >=", value, "pd_price");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_priceLessThan(Double value) {
-            addCriterion("pd_price <", value, "pd_price");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_priceLessThanOrEqualTo(Double value) {
-            addCriterion("pd_price <=", value, "pd_price");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_priceIn(List<Double> values) {
-            addCriterion("pd_price in", values, "pd_price");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_priceNotIn(List<Double> values) {
-            addCriterion("pd_price not in", values, "pd_price");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_priceBetween(Double value1, Double value2) {
-            addCriterion("pd_price between", value1, value2, "pd_price");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_priceNotBetween(Double value1, Double value2) {
-            addCriterion("pd_price not between", value1, value2, "pd_price");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_totalIsNull() {
-            addCriterion("pd_total is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_totalIsNotNull() {
-            addCriterion("pd_total is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_totalEqualTo(String value) {
-            addCriterion("pd_total =", value, "pd_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_totalNotEqualTo(String value) {
-            addCriterion("pd_total <>", value, "pd_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_totalGreaterThan(String value) {
-            addCriterion("pd_total >", value, "pd_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_totalGreaterThanOrEqualTo(String value) {
-            addCriterion("pd_total >=", value, "pd_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_totalLessThan(String value) {
-            addCriterion("pd_total <", value, "pd_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_totalLessThanOrEqualTo(String value) {
-            addCriterion("pd_total <=", value, "pd_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_totalLike(String value) {
-            addCriterion("pd_total like", value, "pd_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_totalNotLike(String value) {
-            addCriterion("pd_total not like", value, "pd_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_totalIn(List<String> values) {
-            addCriterion("pd_total in", values, "pd_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_totalNotIn(List<String> values) {
-            addCriterion("pd_total not in", values, "pd_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_totalBetween(String value1, String value2) {
-            addCriterion("pd_total between", value1, value2, "pd_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_totalNotBetween(String value1, String value2) {
-            addCriterion("pd_total not between", value1, value2, "pd_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_taxrateIsNull() {
-            addCriterion("pd_taxrate is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_taxrateIsNotNull() {
-            addCriterion("pd_taxrate is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_taxrateEqualTo(Double value) {
-            addCriterion("pd_taxrate =", value, "pd_taxrate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_taxrateNotEqualTo(Double value) {
-            addCriterion("pd_taxrate <>", value, "pd_taxrate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_taxrateGreaterThan(Double value) {
-            addCriterion("pd_taxrate >", value, "pd_taxrate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_taxrateGreaterThanOrEqualTo(Double value) {
-            addCriterion("pd_taxrate >=", value, "pd_taxrate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_taxrateLessThan(Double value) {
-            addCriterion("pd_taxrate <", value, "pd_taxrate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_taxrateLessThanOrEqualTo(Double value) {
-            addCriterion("pd_taxrate <=", value, "pd_taxrate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_taxrateIn(List<Double> values) {
-            addCriterion("pd_taxrate in", values, "pd_taxrate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_taxrateNotIn(List<Double> values) {
-            addCriterion("pd_taxrate not in", values, "pd_taxrate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_taxrateBetween(Double value1, Double value2) {
-            addCriterion("pd_taxrate between", value1, value2, "pd_taxrate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_taxrateNotBetween(Double value1, Double value2) {
-            addCriterion("pd_taxrate not between", value1, value2, "pd_taxrate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_netpriceIsNull() {
-            addCriterion("pd_netprice is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_netpriceIsNotNull() {
-            addCriterion("pd_netprice is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_netpriceEqualTo(Double value) {
-            addCriterion("pd_netprice =", value, "pd_netprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_netpriceNotEqualTo(Double value) {
-            addCriterion("pd_netprice <>", value, "pd_netprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_netpriceGreaterThan(Double value) {
-            addCriterion("pd_netprice >", value, "pd_netprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_netpriceGreaterThanOrEqualTo(Double value) {
-            addCriterion("pd_netprice >=", value, "pd_netprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_netpriceLessThan(Double value) {
-            addCriterion("pd_netprice <", value, "pd_netprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_netpriceLessThanOrEqualTo(Double value) {
-            addCriterion("pd_netprice <=", value, "pd_netprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_netpriceIn(List<Double> values) {
-            addCriterion("pd_netprice in", values, "pd_netprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_netpriceNotIn(List<Double> values) {
-            addCriterion("pd_netprice not in", values, "pd_netprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_netpriceBetween(Double value1, Double value2) {
-            addCriterion("pd_netprice between", value1, value2, "pd_netprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_netpriceNotBetween(Double value1, Double value2) {
-            addCriterion("pd_netprice not between", value1, value2, "pd_netprice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_nettotalIsNull() {
-            addCriterion("pd_nettotal is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_nettotalIsNotNull() {
-            addCriterion("pd_nettotal is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_nettotalEqualTo(Double value) {
-            addCriterion("pd_nettotal =", value, "pd_nettotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_nettotalNotEqualTo(Double value) {
-            addCriterion("pd_nettotal <>", value, "pd_nettotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_nettotalGreaterThan(Double value) {
-            addCriterion("pd_nettotal >", value, "pd_nettotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_nettotalGreaterThanOrEqualTo(Double value) {
-            addCriterion("pd_nettotal >=", value, "pd_nettotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_nettotalLessThan(Double value) {
-            addCriterion("pd_nettotal <", value, "pd_nettotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_nettotalLessThanOrEqualTo(Double value) {
-            addCriterion("pd_nettotal <=", value, "pd_nettotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_nettotalIn(List<Double> values) {
-            addCriterion("pd_nettotal in", values, "pd_nettotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_nettotalNotIn(List<Double> values) {
-            addCriterion("pd_nettotal not in", values, "pd_nettotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_nettotalBetween(Double value1, Double value2) {
-            addCriterion("pd_nettotal between", value1, value2, "pd_nettotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_nettotalNotBetween(Double value1, Double value2) {
-            addCriterion("pd_nettotal not between", value1, value2, "pd_nettotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whidIsNull() {
-            addCriterion("pd_whid is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whidIsNotNull() {
-            addCriterion("pd_whid is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whidEqualTo(Integer value) {
-            addCriterion("pd_whid =", value, "pd_whid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whidNotEqualTo(Integer value) {
-            addCriterion("pd_whid <>", value, "pd_whid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whidGreaterThan(Integer value) {
-            addCriterion("pd_whid >", value, "pd_whid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whidGreaterThanOrEqualTo(Integer value) {
-            addCriterion("pd_whid >=", value, "pd_whid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whidLessThan(Integer value) {
-            addCriterion("pd_whid <", value, "pd_whid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whidLessThanOrEqualTo(Integer value) {
-            addCriterion("pd_whid <=", value, "pd_whid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whidIn(List<Integer> values) {
-            addCriterion("pd_whid in", values, "pd_whid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whidNotIn(List<Integer> values) {
-            addCriterion("pd_whid not in", values, "pd_whid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whidBetween(Integer value1, Integer value2) {
-            addCriterion("pd_whid between", value1, value2, "pd_whid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whidNotBetween(Integer value1, Integer value2) {
-            addCriterion("pd_whid not between", value1, value2, "pd_whid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whcodeIsNull() {
-            addCriterion("pd_whcode is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whcodeIsNotNull() {
-            addCriterion("pd_whcode is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whcodeEqualTo(String value) {
-            addCriterion("pd_whcode =", value, "pd_whcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whcodeNotEqualTo(String value) {
-            addCriterion("pd_whcode <>", value, "pd_whcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whcodeGreaterThan(String value) {
-            addCriterion("pd_whcode >", value, "pd_whcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whcodeGreaterThanOrEqualTo(String value) {
-            addCriterion("pd_whcode >=", value, "pd_whcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whcodeLessThan(String value) {
-            addCriterion("pd_whcode <", value, "pd_whcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whcodeLessThanOrEqualTo(String value) {
-            addCriterion("pd_whcode <=", value, "pd_whcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whcodeLike(String value) {
-            addCriterion("pd_whcode like", value, "pd_whcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whcodeNotLike(String value) {
-            addCriterion("pd_whcode not like", value, "pd_whcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whcodeIn(List<String> values) {
-            addCriterion("pd_whcode in", values, "pd_whcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whcodeNotIn(List<String> values) {
-            addCriterion("pd_whcode not in", values, "pd_whcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whcodeBetween(String value1, String value2) {
-            addCriterion("pd_whcode between", value1, value2, "pd_whcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whcodeNotBetween(String value1, String value2) {
-            addCriterion("pd_whcode not between", value1, value2, "pd_whcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whnameIsNull() {
-            addCriterion("pd_whname is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whnameIsNotNull() {
-            addCriterion("pd_whname is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whnameEqualTo(String value) {
-            addCriterion("pd_whname =", value, "pd_whname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whnameNotEqualTo(String value) {
-            addCriterion("pd_whname <>", value, "pd_whname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whnameGreaterThan(String value) {
-            addCriterion("pd_whname >", value, "pd_whname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whnameGreaterThanOrEqualTo(String value) {
-            addCriterion("pd_whname >=", value, "pd_whname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whnameLessThan(String value) {
-            addCriterion("pd_whname <", value, "pd_whname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whnameLessThanOrEqualTo(String value) {
-            addCriterion("pd_whname <=", value, "pd_whname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whnameLike(String value) {
-            addCriterion("pd_whname like", value, "pd_whname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whnameNotLike(String value) {
-            addCriterion("pd_whname not like", value, "pd_whname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whnameIn(List<String> values) {
-            addCriterion("pd_whname in", values, "pd_whname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whnameNotIn(List<String> values) {
-            addCriterion("pd_whname not in", values, "pd_whname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whnameBetween(String value1, String value2) {
-            addCriterion("pd_whname between", value1, value2, "pd_whname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_whnameNotBetween(String value1, String value2) {
-            addCriterion("pd_whname not between", value1, value2, "pd_whname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhidIsNull() {
-            addCriterion("pd_inwhid is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhidIsNotNull() {
-            addCriterion("pd_inwhid is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhidEqualTo(Integer value) {
-            addCriterion("pd_inwhid =", value, "pd_inwhid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhidNotEqualTo(Integer value) {
-            addCriterion("pd_inwhid <>", value, "pd_inwhid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhidGreaterThan(Integer value) {
-            addCriterion("pd_inwhid >", value, "pd_inwhid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhidGreaterThanOrEqualTo(Integer value) {
-            addCriterion("pd_inwhid >=", value, "pd_inwhid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhidLessThan(Integer value) {
-            addCriterion("pd_inwhid <", value, "pd_inwhid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhidLessThanOrEqualTo(Integer value) {
-            addCriterion("pd_inwhid <=", value, "pd_inwhid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhidIn(List<Integer> values) {
-            addCriterion("pd_inwhid in", values, "pd_inwhid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhidNotIn(List<Integer> values) {
-            addCriterion("pd_inwhid not in", values, "pd_inwhid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhidBetween(Integer value1, Integer value2) {
-            addCriterion("pd_inwhid between", value1, value2, "pd_inwhid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhidNotBetween(Integer value1, Integer value2) {
-            addCriterion("pd_inwhid not between", value1, value2, "pd_inwhid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhcodeIsNull() {
-            addCriterion("pd_inwhcode is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhcodeIsNotNull() {
-            addCriterion("pd_inwhcode is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhcodeEqualTo(String value) {
-            addCriterion("pd_inwhcode =", value, "pd_inwhcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhcodeNotEqualTo(String value) {
-            addCriterion("pd_inwhcode <>", value, "pd_inwhcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhcodeGreaterThan(String value) {
-            addCriterion("pd_inwhcode >", value, "pd_inwhcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhcodeGreaterThanOrEqualTo(String value) {
-            addCriterion("pd_inwhcode >=", value, "pd_inwhcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhcodeLessThan(String value) {
-            addCriterion("pd_inwhcode <", value, "pd_inwhcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhcodeLessThanOrEqualTo(String value) {
-            addCriterion("pd_inwhcode <=", value, "pd_inwhcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhcodeLike(String value) {
-            addCriterion("pd_inwhcode like", value, "pd_inwhcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhcodeNotLike(String value) {
-            addCriterion("pd_inwhcode not like", value, "pd_inwhcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhcodeIn(List<String> values) {
-            addCriterion("pd_inwhcode in", values, "pd_inwhcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhcodeNotIn(List<String> values) {
-            addCriterion("pd_inwhcode not in", values, "pd_inwhcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhcodeBetween(String value1, String value2) {
-            addCriterion("pd_inwhcode between", value1, value2, "pd_inwhcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhcodeNotBetween(String value1, String value2) {
-            addCriterion("pd_inwhcode not between", value1, value2, "pd_inwhcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhnameIsNull() {
-            addCriterion("pd_inwhname is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhnameIsNotNull() {
-            addCriterion("pd_inwhname is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhnameEqualTo(String value) {
-            addCriterion("pd_inwhname =", value, "pd_inwhname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhnameNotEqualTo(String value) {
-            addCriterion("pd_inwhname <>", value, "pd_inwhname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhnameGreaterThan(String value) {
-            addCriterion("pd_inwhname >", value, "pd_inwhname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhnameGreaterThanOrEqualTo(String value) {
-            addCriterion("pd_inwhname >=", value, "pd_inwhname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhnameLessThan(String value) {
-            addCriterion("pd_inwhname <", value, "pd_inwhname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhnameLessThanOrEqualTo(String value) {
-            addCriterion("pd_inwhname <=", value, "pd_inwhname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhnameLike(String value) {
-            addCriterion("pd_inwhname like", value, "pd_inwhname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhnameNotLike(String value) {
-            addCriterion("pd_inwhname not like", value, "pd_inwhname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhnameIn(List<String> values) {
-            addCriterion("pd_inwhname in", values, "pd_inwhname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhnameNotIn(List<String> values) {
-            addCriterion("pd_inwhname not in", values, "pd_inwhname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhnameBetween(String value1, String value2) {
-            addCriterion("pd_inwhname between", value1, value2, "pd_inwhname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_inwhnameNotBetween(String value1, String value2) {
-            addCriterion("pd_inwhname not between", value1, value2, "pd_inwhname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderidIsNull() {
-            addCriterion("pd_orderid is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderidIsNotNull() {
-            addCriterion("pd_orderid is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderidEqualTo(Integer value) {
-            addCriterion("pd_orderid =", value, "pd_orderid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderidNotEqualTo(Integer value) {
-            addCriterion("pd_orderid <>", value, "pd_orderid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderidGreaterThan(Integer value) {
-            addCriterion("pd_orderid >", value, "pd_orderid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderidGreaterThanOrEqualTo(Integer value) {
-            addCriterion("pd_orderid >=", value, "pd_orderid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderidLessThan(Integer value) {
-            addCriterion("pd_orderid <", value, "pd_orderid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderidLessThanOrEqualTo(Integer value) {
-            addCriterion("pd_orderid <=", value, "pd_orderid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderidIn(List<Integer> values) {
-            addCriterion("pd_orderid in", values, "pd_orderid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderidNotIn(List<Integer> values) {
-            addCriterion("pd_orderid not in", values, "pd_orderid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderidBetween(Integer value1, Integer value2) {
-            addCriterion("pd_orderid between", value1, value2, "pd_orderid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_orderidNotBetween(Integer value1, Integer value2) {
-            addCriterion("pd_orderid not between", value1, value2, "pd_orderid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_sdidIsNull() {
-            addCriterion("pd_sdid is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_sdidIsNotNull() {
-            addCriterion("pd_sdid is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_sdidEqualTo(Integer value) {
-            addCriterion("pd_sdid =", value, "pd_sdid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_sdidNotEqualTo(Integer value) {
-            addCriterion("pd_sdid <>", value, "pd_sdid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_sdidGreaterThan(Integer value) {
-            addCriterion("pd_sdid >", value, "pd_sdid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_sdidGreaterThanOrEqualTo(Integer value) {
-            addCriterion("pd_sdid >=", value, "pd_sdid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_sdidLessThan(Integer value) {
-            addCriterion("pd_sdid <", value, "pd_sdid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_sdidLessThanOrEqualTo(Integer value) {
-            addCriterion("pd_sdid <=", value, "pd_sdid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_sdidIn(List<Integer> values) {
-            addCriterion("pd_sdid in", values, "pd_sdid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_sdidNotIn(List<Integer> values) {
-            addCriterion("pd_sdid not in", values, "pd_sdid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_sdidBetween(Integer value1, Integer value2) {
-            addCriterion("pd_sdid between", value1, value2, "pd_sdid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_sdidNotBetween(Integer value1, Integer value2) {
-            addCriterion("pd_sdid not between", value1, value2, "pd_sdid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_statusIsNull() {
-            addCriterion("pd_status is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_statusIsNotNull() {
-            addCriterion("pd_status is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_statusEqualTo(Integer value) {
-            addCriterion("pd_status =", value, "pd_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_statusNotEqualTo(Integer value) {
-            addCriterion("pd_status <>", value, "pd_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_statusGreaterThan(Integer value) {
-            addCriterion("pd_status >", value, "pd_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_statusGreaterThanOrEqualTo(Integer value) {
-            addCriterion("pd_status >=", value, "pd_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_statusLessThan(Integer value) {
-            addCriterion("pd_status <", value, "pd_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_statusLessThanOrEqualTo(Integer value) {
-            addCriterion("pd_status <=", value, "pd_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_statusIn(List<Integer> values) {
-            addCriterion("pd_status in", values, "pd_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_statusNotIn(List<Integer> values) {
-            addCriterion("pd_status not in", values, "pd_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_statusBetween(Integer value1, Integer value2) {
-            addCriterion("pd_status between", value1, value2, "pd_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_statusNotBetween(Integer value1, Integer value2) {
-            addCriterion("pd_status not between", value1, value2, "pd_status");
-            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 andPd_text1IsNull() {
-            addCriterion("pd_text1 is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text1IsNotNull() {
-            addCriterion("pd_text1 is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text1EqualTo(String value) {
-            addCriterion("pd_text1 =", value, "pd_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text1NotEqualTo(String value) {
-            addCriterion("pd_text1 <>", value, "pd_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text1GreaterThan(String value) {
-            addCriterion("pd_text1 >", value, "pd_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text1GreaterThanOrEqualTo(String value) {
-            addCriterion("pd_text1 >=", value, "pd_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text1LessThan(String value) {
-            addCriterion("pd_text1 <", value, "pd_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text1LessThanOrEqualTo(String value) {
-            addCriterion("pd_text1 <=", value, "pd_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text1Like(String value) {
-            addCriterion("pd_text1 like", value, "pd_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text1NotLike(String value) {
-            addCriterion("pd_text1 not like", value, "pd_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text1In(List<String> values) {
-            addCriterion("pd_text1 in", values, "pd_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text1NotIn(List<String> values) {
-            addCriterion("pd_text1 not in", values, "pd_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text1Between(String value1, String value2) {
-            addCriterion("pd_text1 between", value1, value2, "pd_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text1NotBetween(String value1, String value2) {
-            addCriterion("pd_text1 not between", value1, value2, "pd_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text2IsNull() {
-            addCriterion("pd_text2 is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text2IsNotNull() {
-            addCriterion("pd_text2 is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text2EqualTo(String value) {
-            addCriterion("pd_text2 =", value, "pd_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text2NotEqualTo(String value) {
-            addCriterion("pd_text2 <>", value, "pd_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text2GreaterThan(String value) {
-            addCriterion("pd_text2 >", value, "pd_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text2GreaterThanOrEqualTo(String value) {
-            addCriterion("pd_text2 >=", value, "pd_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text2LessThan(String value) {
-            addCriterion("pd_text2 <", value, "pd_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text2LessThanOrEqualTo(String value) {
-            addCriterion("pd_text2 <=", value, "pd_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text2Like(String value) {
-            addCriterion("pd_text2 like", value, "pd_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text2NotLike(String value) {
-            addCriterion("pd_text2 not like", value, "pd_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text2In(List<String> values) {
-            addCriterion("pd_text2 in", values, "pd_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text2NotIn(List<String> values) {
-            addCriterion("pd_text2 not in", values, "pd_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text2Between(String value1, String value2) {
-            addCriterion("pd_text2 between", value1, value2, "pd_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text2NotBetween(String value1, String value2) {
-            addCriterion("pd_text2 not between", value1, value2, "pd_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text3IsNull() {
-            addCriterion("pd_text3 is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text3IsNotNull() {
-            addCriterion("pd_text3 is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text3EqualTo(String value) {
-            addCriterion("pd_text3 =", value, "pd_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text3NotEqualTo(String value) {
-            addCriterion("pd_text3 <>", value, "pd_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text3GreaterThan(String value) {
-            addCriterion("pd_text3 >", value, "pd_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text3GreaterThanOrEqualTo(String value) {
-            addCriterion("pd_text3 >=", value, "pd_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text3LessThan(String value) {
-            addCriterion("pd_text3 <", value, "pd_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text3LessThanOrEqualTo(String value) {
-            addCriterion("pd_text3 <=", value, "pd_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text3Like(String value) {
-            addCriterion("pd_text3 like", value, "pd_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text3NotLike(String value) {
-            addCriterion("pd_text3 not like", value, "pd_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text3In(List<String> values) {
-            addCriterion("pd_text3 in", values, "pd_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text3NotIn(List<String> values) {
-            addCriterion("pd_text3 not in", values, "pd_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text3Between(String value1, String value2) {
-            addCriterion("pd_text3 between", value1, value2, "pd_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text3NotBetween(String value1, String value2) {
-            addCriterion("pd_text3 not between", value1, value2, "pd_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text4IsNull() {
-            addCriterion("pd_text4 is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text4IsNotNull() {
-            addCriterion("pd_text4 is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text4EqualTo(String value) {
-            addCriterion("pd_text4 =", value, "pd_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text4NotEqualTo(String value) {
-            addCriterion("pd_text4 <>", value, "pd_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text4GreaterThan(String value) {
-            addCriterion("pd_text4 >", value, "pd_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text4GreaterThanOrEqualTo(String value) {
-            addCriterion("pd_text4 >=", value, "pd_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text4LessThan(String value) {
-            addCriterion("pd_text4 <", value, "pd_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text4LessThanOrEqualTo(String value) {
-            addCriterion("pd_text4 <=", value, "pd_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text4Like(String value) {
-            addCriterion("pd_text4 like", value, "pd_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text4NotLike(String value) {
-            addCriterion("pd_text4 not like", value, "pd_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text4In(List<String> values) {
-            addCriterion("pd_text4 in", values, "pd_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text4NotIn(List<String> values) {
-            addCriterion("pd_text4 not in", values, "pd_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text4Between(String value1, String value2) {
-            addCriterion("pd_text4 between", value1, value2, "pd_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text4NotBetween(String value1, String value2) {
-            addCriterion("pd_text4 not between", value1, value2, "pd_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text5IsNull() {
-            addCriterion("pd_text5 is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text5IsNotNull() {
-            addCriterion("pd_text5 is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text5EqualTo(String value) {
-            addCriterion("pd_text5 =", value, "pd_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text5NotEqualTo(String value) {
-            addCriterion("pd_text5 <>", value, "pd_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text5GreaterThan(String value) {
-            addCriterion("pd_text5 >", value, "pd_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text5GreaterThanOrEqualTo(String value) {
-            addCriterion("pd_text5 >=", value, "pd_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text5LessThan(String value) {
-            addCriterion("pd_text5 <", value, "pd_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text5LessThanOrEqualTo(String value) {
-            addCriterion("pd_text5 <=", value, "pd_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text5Like(String value) {
-            addCriterion("pd_text5 like", value, "pd_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text5NotLike(String value) {
-            addCriterion("pd_text5 not like", value, "pd_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text5In(List<String> values) {
-            addCriterion("pd_text5 in", values, "pd_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text5NotIn(List<String> values) {
-            addCriterion("pd_text5 not in", values, "pd_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text5Between(String value1, String value2) {
-            addCriterion("pd_text5 between", value1, value2, "pd_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_text5NotBetween(String value1, String value2) {
-            addCriterion("pd_text5 not between", value1, value2, "pd_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_ymIsNull() {
-            addCriterion("pd_ym is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_ymIsNotNull() {
-            addCriterion("pd_ym is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_ymEqualTo(Integer value) {
-            addCriterion("pd_ym =", value, "pd_ym");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_ymNotEqualTo(Integer value) {
-            addCriterion("pd_ym <>", value, "pd_ym");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_ymGreaterThan(Integer value) {
-            addCriterion("pd_ym >", value, "pd_ym");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_ymGreaterThanOrEqualTo(Integer value) {
-            addCriterion("pd_ym >=", value, "pd_ym");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_ymLessThan(Integer value) {
-            addCriterion("pd_ym <", value, "pd_ym");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_ymLessThanOrEqualTo(Integer value) {
-            addCriterion("pd_ym <=", value, "pd_ym");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_ymIn(List<Integer> values) {
-            addCriterion("pd_ym in", values, "pd_ym");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_ymNotIn(List<Integer> values) {
-            addCriterion("pd_ym not in", values, "pd_ym");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_ymBetween(Integer value1, Integer value2) {
-            addCriterion("pd_ym between", value1, value2, "pd_ym");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_ymNotBetween(Integer value1, Integer value2) {
-            addCriterion("pd_ym not between", value1, value2, "pd_ym");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_yqtyIsNull() {
-            addCriterion("pd_yqty is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_yqtyIsNotNull() {
-            addCriterion("pd_yqty is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_yqtyEqualTo(Double value) {
-            addCriterion("pd_yqty =", value, "pd_yqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_yqtyNotEqualTo(Double value) {
-            addCriterion("pd_yqty <>", value, "pd_yqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_yqtyGreaterThan(Double value) {
-            addCriterion("pd_yqty >", value, "pd_yqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_yqtyGreaterThanOrEqualTo(Double value) {
-            addCriterion("pd_yqty >=", value, "pd_yqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_yqtyLessThan(Double value) {
-            addCriterion("pd_yqty <", value, "pd_yqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_yqtyLessThanOrEqualTo(Double value) {
-            addCriterion("pd_yqty <=", value, "pd_yqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_yqtyIn(List<Double> values) {
-            addCriterion("pd_yqty in", values, "pd_yqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_yqtyNotIn(List<Double> values) {
-            addCriterion("pd_yqty not in", values, "pd_yqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_yqtyBetween(Double value1, Double value2) {
-            addCriterion("pd_yqty between", value1, value2, "pd_yqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPd_yqtyNotBetween(Double value1, Double value2) {
-            addCriterion("pd_yqty not between", value1, value2, "pd_yqty");
-            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);
-        }
-    }
-}

+ 2 - 10
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOut.java

@@ -31,14 +31,12 @@ public class ProdInOut extends CommonBaseEntity implements Serializable {
 
     private String pi_pucode;
 
-    private Long pi_said;
+    private Integer pi_said;
 
     private String pi_sacode;
 
     private Double pi_total;
 
-    private String pi_address;
-
     private Integer pi_recordmanid;
 
     private String pi_recordman;
@@ -63,12 +61,6 @@ public class ProdInOut extends CommonBaseEntity implements Serializable {
 
     private String pi_text5;
 
-    private Long pi_inid;
-
-    private Double pi_nettotal;
-
-    private Date pi_auditdate;
-
-    private String pi_auditman;
+    private String pi_address;
 
 }

+ 0 - 2359
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOutExample.java

@@ -1,2359 +0,0 @@
-package com.usoftchina.saas.storage.po;
-
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-public class ProdInOutExample {
-    protected String orderByClause;
-
-    protected boolean distinct;
-
-    protected List<Criteria> oredCriteria;
-
-    public ProdInOutExample() {
-        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 andPi_idIsNull() {
-            addCriterion("pi_id is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_idIsNotNull() {
-            addCriterion("pi_id is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_idEqualTo(Integer value) {
-            addCriterion("pi_id =", value, "pi_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_idNotEqualTo(Integer value) {
-            addCriterion("pi_id <>", value, "pi_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_idGreaterThan(Integer value) {
-            addCriterion("pi_id >", value, "pi_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_idGreaterThanOrEqualTo(Integer value) {
-            addCriterion("pi_id >=", value, "pi_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_idLessThan(Integer value) {
-            addCriterion("pi_id <", value, "pi_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_idLessThanOrEqualTo(Integer value) {
-            addCriterion("pi_id <=", value, "pi_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_idIn(List<Integer> values) {
-            addCriterion("pi_id in", values, "pi_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_idNotIn(List<Integer> values) {
-            addCriterion("pi_id not in", values, "pi_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_idBetween(Integer value1, Integer value2) {
-            addCriterion("pi_id between", value1, value2, "pi_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_idNotBetween(Integer value1, Integer value2) {
-            addCriterion("pi_id not between", value1, value2, "pi_id");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_inoutnoIsNull() {
-            addCriterion("pi_inoutno is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_inoutnoIsNotNull() {
-            addCriterion("pi_inoutno is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_inoutnoEqualTo(String value) {
-            addCriterion("pi_inoutno =", value, "pi_inoutno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_inoutnoNotEqualTo(String value) {
-            addCriterion("pi_inoutno <>", value, "pi_inoutno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_inoutnoGreaterThan(String value) {
-            addCriterion("pi_inoutno >", value, "pi_inoutno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_inoutnoGreaterThanOrEqualTo(String value) {
-            addCriterion("pi_inoutno >=", value, "pi_inoutno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_inoutnoLessThan(String value) {
-            addCriterion("pi_inoutno <", value, "pi_inoutno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_inoutnoLessThanOrEqualTo(String value) {
-            addCriterion("pi_inoutno <=", value, "pi_inoutno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_inoutnoLike(String value) {
-            addCriterion("pi_inoutno like", value, "pi_inoutno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_inoutnoNotLike(String value) {
-            addCriterion("pi_inoutno not like", value, "pi_inoutno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_inoutnoIn(List<String> values) {
-            addCriterion("pi_inoutno in", values, "pi_inoutno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_inoutnoNotIn(List<String> values) {
-            addCriterion("pi_inoutno not in", values, "pi_inoutno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_inoutnoBetween(String value1, String value2) {
-            addCriterion("pi_inoutno between", value1, value2, "pi_inoutno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_inoutnoNotBetween(String value1, String value2) {
-            addCriterion("pi_inoutno not between", value1, value2, "pi_inoutno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_classIsNull() {
-            addCriterion("pi_class is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_classIsNotNull() {
-            addCriterion("pi_class is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_classEqualTo(String value) {
-            addCriterion("pi_class =", value, "pi_class");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_classNotEqualTo(String value) {
-            addCriterion("pi_class <>", value, "pi_class");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_classGreaterThan(String value) {
-            addCriterion("pi_class >", value, "pi_class");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_classGreaterThanOrEqualTo(String value) {
-            addCriterion("pi_class >=", value, "pi_class");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_classLessThan(String value) {
-            addCriterion("pi_class <", value, "pi_class");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_classLessThanOrEqualTo(String value) {
-            addCriterion("pi_class <=", value, "pi_class");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_classLike(String value) {
-            addCriterion("pi_class like", value, "pi_class");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_classNotLike(String value) {
-            addCriterion("pi_class not like", value, "pi_class");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_classIn(List<String> values) {
-            addCriterion("pi_class in", values, "pi_class");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_classNotIn(List<String> values) {
-            addCriterion("pi_class not in", values, "pi_class");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_classBetween(String value1, String value2) {
-            addCriterion("pi_class between", value1, value2, "pi_class");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_classNotBetween(String value1, String value2) {
-            addCriterion("pi_class not between", value1, value2, "pi_class");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_dateIsNull() {
-            addCriterion("pi_date is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_dateIsNotNull() {
-            addCriterion("pi_date is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_dateEqualTo(Date value) {
-            addCriterion("pi_date =", value, "pi_date");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_dateNotEqualTo(Date value) {
-            addCriterion("pi_date <>", value, "pi_date");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_dateGreaterThan(Date value) {
-            addCriterion("pi_date >", value, "pi_date");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_dateGreaterThanOrEqualTo(Date value) {
-            addCriterion("pi_date >=", value, "pi_date");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_dateLessThan(Date value) {
-            addCriterion("pi_date <", value, "pi_date");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_dateLessThanOrEqualTo(Date value) {
-            addCriterion("pi_date <=", value, "pi_date");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_dateIn(List<Date> values) {
-            addCriterion("pi_date in", values, "pi_date");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_dateNotIn(List<Date> values) {
-            addCriterion("pi_date not in", values, "pi_date");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_dateBetween(Date value1, Date value2) {
-            addCriterion("pi_date between", value1, value2, "pi_date");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_dateNotBetween(Date value1, Date value2) {
-            addCriterion("pi_date not between", value1, value2, "pi_date");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendidIsNull() {
-            addCriterion("pi_vendid is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendidIsNotNull() {
-            addCriterion("pi_vendid is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendidEqualTo(Integer value) {
-            addCriterion("pi_vendid =", value, "pi_vendid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendidNotEqualTo(Integer value) {
-            addCriterion("pi_vendid <>", value, "pi_vendid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendidGreaterThan(Integer value) {
-            addCriterion("pi_vendid >", value, "pi_vendid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendidGreaterThanOrEqualTo(Integer value) {
-            addCriterion("pi_vendid >=", value, "pi_vendid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendidLessThan(Integer value) {
-            addCriterion("pi_vendid <", value, "pi_vendid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendidLessThanOrEqualTo(Integer value) {
-            addCriterion("pi_vendid <=", value, "pi_vendid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendidIn(List<Integer> values) {
-            addCriterion("pi_vendid in", values, "pi_vendid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendidNotIn(List<Integer> values) {
-            addCriterion("pi_vendid not in", values, "pi_vendid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendidBetween(Integer value1, Integer value2) {
-            addCriterion("pi_vendid between", value1, value2, "pi_vendid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendidNotBetween(Integer value1, Integer value2) {
-            addCriterion("pi_vendid not between", value1, value2, "pi_vendid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendcodeIsNull() {
-            addCriterion("pi_vendcode is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendcodeIsNotNull() {
-            addCriterion("pi_vendcode is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendcodeEqualTo(String value) {
-            addCriterion("pi_vendcode =", value, "pi_vendcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendcodeNotEqualTo(String value) {
-            addCriterion("pi_vendcode <>", value, "pi_vendcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendcodeGreaterThan(String value) {
-            addCriterion("pi_vendcode >", value, "pi_vendcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendcodeGreaterThanOrEqualTo(String value) {
-            addCriterion("pi_vendcode >=", value, "pi_vendcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendcodeLessThan(String value) {
-            addCriterion("pi_vendcode <", value, "pi_vendcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendcodeLessThanOrEqualTo(String value) {
-            addCriterion("pi_vendcode <=", value, "pi_vendcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendcodeLike(String value) {
-            addCriterion("pi_vendcode like", value, "pi_vendcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendcodeNotLike(String value) {
-            addCriterion("pi_vendcode not like", value, "pi_vendcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendcodeIn(List<String> values) {
-            addCriterion("pi_vendcode in", values, "pi_vendcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendcodeNotIn(List<String> values) {
-            addCriterion("pi_vendcode not in", values, "pi_vendcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendcodeBetween(String value1, String value2) {
-            addCriterion("pi_vendcode between", value1, value2, "pi_vendcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendcodeNotBetween(String value1, String value2) {
-            addCriterion("pi_vendcode not between", value1, value2, "pi_vendcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendnameIsNull() {
-            addCriterion("pi_vendname is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendnameIsNotNull() {
-            addCriterion("pi_vendname is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendnameEqualTo(String value) {
-            addCriterion("pi_vendname =", value, "pi_vendname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendnameNotEqualTo(String value) {
-            addCriterion("pi_vendname <>", value, "pi_vendname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendnameGreaterThan(String value) {
-            addCriterion("pi_vendname >", value, "pi_vendname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendnameGreaterThanOrEqualTo(String value) {
-            addCriterion("pi_vendname >=", value, "pi_vendname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendnameLessThan(String value) {
-            addCriterion("pi_vendname <", value, "pi_vendname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendnameLessThanOrEqualTo(String value) {
-            addCriterion("pi_vendname <=", value, "pi_vendname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendnameLike(String value) {
-            addCriterion("pi_vendname like", value, "pi_vendname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendnameNotLike(String value) {
-            addCriterion("pi_vendname not like", value, "pi_vendname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendnameIn(List<String> values) {
-            addCriterion("pi_vendname in", values, "pi_vendname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendnameNotIn(List<String> values) {
-            addCriterion("pi_vendname not in", values, "pi_vendname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendnameBetween(String value1, String value2) {
-            addCriterion("pi_vendname between", value1, value2, "pi_vendname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_vendnameNotBetween(String value1, String value2) {
-            addCriterion("pi_vendname not between", value1, value2, "pi_vendname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custidIsNull() {
-            addCriterion("pi_custid is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custidIsNotNull() {
-            addCriterion("pi_custid is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custidEqualTo(Integer value) {
-            addCriterion("pi_custid =", value, "pi_custid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custidNotEqualTo(Integer value) {
-            addCriterion("pi_custid <>", value, "pi_custid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custidGreaterThan(Integer value) {
-            addCriterion("pi_custid >", value, "pi_custid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custidGreaterThanOrEqualTo(Integer value) {
-            addCriterion("pi_custid >=", value, "pi_custid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custidLessThan(Integer value) {
-            addCriterion("pi_custid <", value, "pi_custid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custidLessThanOrEqualTo(Integer value) {
-            addCriterion("pi_custid <=", value, "pi_custid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custidIn(List<Integer> values) {
-            addCriterion("pi_custid in", values, "pi_custid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custidNotIn(List<Integer> values) {
-            addCriterion("pi_custid not in", values, "pi_custid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custidBetween(Integer value1, Integer value2) {
-            addCriterion("pi_custid between", value1, value2, "pi_custid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custidNotBetween(Integer value1, Integer value2) {
-            addCriterion("pi_custid not between", value1, value2, "pi_custid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custcodeIsNull() {
-            addCriterion("pi_custcode is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custcodeIsNotNull() {
-            addCriterion("pi_custcode is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custcodeEqualTo(String value) {
-            addCriterion("pi_custcode =", value, "pi_custcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custcodeNotEqualTo(String value) {
-            addCriterion("pi_custcode <>", value, "pi_custcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custcodeGreaterThan(String value) {
-            addCriterion("pi_custcode >", value, "pi_custcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custcodeGreaterThanOrEqualTo(String value) {
-            addCriterion("pi_custcode >=", value, "pi_custcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custcodeLessThan(String value) {
-            addCriterion("pi_custcode <", value, "pi_custcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custcodeLessThanOrEqualTo(String value) {
-            addCriterion("pi_custcode <=", value, "pi_custcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custcodeLike(String value) {
-            addCriterion("pi_custcode like", value, "pi_custcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custcodeNotLike(String value) {
-            addCriterion("pi_custcode not like", value, "pi_custcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custcodeIn(List<String> values) {
-            addCriterion("pi_custcode in", values, "pi_custcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custcodeNotIn(List<String> values) {
-            addCriterion("pi_custcode not in", values, "pi_custcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custcodeBetween(String value1, String value2) {
-            addCriterion("pi_custcode between", value1, value2, "pi_custcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custcodeNotBetween(String value1, String value2) {
-            addCriterion("pi_custcode not between", value1, value2, "pi_custcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custnameIsNull() {
-            addCriterion("pi_custname is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custnameIsNotNull() {
-            addCriterion("pi_custname is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custnameEqualTo(String value) {
-            addCriterion("pi_custname =", value, "pi_custname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custnameNotEqualTo(String value) {
-            addCriterion("pi_custname <>", value, "pi_custname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custnameGreaterThan(String value) {
-            addCriterion("pi_custname >", value, "pi_custname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custnameGreaterThanOrEqualTo(String value) {
-            addCriterion("pi_custname >=", value, "pi_custname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custnameLessThan(String value) {
-            addCriterion("pi_custname <", value, "pi_custname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custnameLessThanOrEqualTo(String value) {
-            addCriterion("pi_custname <=", value, "pi_custname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custnameLike(String value) {
-            addCriterion("pi_custname like", value, "pi_custname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custnameNotLike(String value) {
-            addCriterion("pi_custname not like", value, "pi_custname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custnameIn(List<String> values) {
-            addCriterion("pi_custname in", values, "pi_custname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custnameNotIn(List<String> values) {
-            addCriterion("pi_custname not in", values, "pi_custname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custnameBetween(String value1, String value2) {
-            addCriterion("pi_custname between", value1, value2, "pi_custname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_custnameNotBetween(String value1, String value2) {
-            addCriterion("pi_custname not between", value1, value2, "pi_custname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_puidIsNull() {
-            addCriterion("pi_puid is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_puidIsNotNull() {
-            addCriterion("pi_puid is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_puidEqualTo(Integer value) {
-            addCriterion("pi_puid =", value, "pi_puid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_puidNotEqualTo(Integer value) {
-            addCriterion("pi_puid <>", value, "pi_puid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_puidGreaterThan(Integer value) {
-            addCriterion("pi_puid >", value, "pi_puid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_puidGreaterThanOrEqualTo(Integer value) {
-            addCriterion("pi_puid >=", value, "pi_puid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_puidLessThan(Integer value) {
-            addCriterion("pi_puid <", value, "pi_puid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_puidLessThanOrEqualTo(Integer value) {
-            addCriterion("pi_puid <=", value, "pi_puid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_puidIn(List<Integer> values) {
-            addCriterion("pi_puid in", values, "pi_puid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_puidNotIn(List<Integer> values) {
-            addCriterion("pi_puid not in", values, "pi_puid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_puidBetween(Integer value1, Integer value2) {
-            addCriterion("pi_puid between", value1, value2, "pi_puid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_puidNotBetween(Integer value1, Integer value2) {
-            addCriterion("pi_puid not between", value1, value2, "pi_puid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_pucodeIsNull() {
-            addCriterion("pi_pucode is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_pucodeIsNotNull() {
-            addCriterion("pi_pucode is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_pucodeEqualTo(String value) {
-            addCriterion("pi_pucode =", value, "pi_pucode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_pucodeNotEqualTo(String value) {
-            addCriterion("pi_pucode <>", value, "pi_pucode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_pucodeGreaterThan(String value) {
-            addCriterion("pi_pucode >", value, "pi_pucode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_pucodeGreaterThanOrEqualTo(String value) {
-            addCriterion("pi_pucode >=", value, "pi_pucode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_pucodeLessThan(String value) {
-            addCriterion("pi_pucode <", value, "pi_pucode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_pucodeLessThanOrEqualTo(String value) {
-            addCriterion("pi_pucode <=", value, "pi_pucode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_pucodeLike(String value) {
-            addCriterion("pi_pucode like", value, "pi_pucode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_pucodeNotLike(String value) {
-            addCriterion("pi_pucode not like", value, "pi_pucode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_pucodeIn(List<String> values) {
-            addCriterion("pi_pucode in", values, "pi_pucode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_pucodeNotIn(List<String> values) {
-            addCriterion("pi_pucode not in", values, "pi_pucode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_pucodeBetween(String value1, String value2) {
-            addCriterion("pi_pucode between", value1, value2, "pi_pucode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_pucodeNotBetween(String value1, String value2) {
-            addCriterion("pi_pucode not between", value1, value2, "pi_pucode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_saidIsNull() {
-            addCriterion("pi_said is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_saidIsNotNull() {
-            addCriterion("pi_said is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_saidEqualTo(Integer value) {
-            addCriterion("pi_said =", value, "pi_said");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_saidNotEqualTo(Integer value) {
-            addCriterion("pi_said <>", value, "pi_said");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_saidGreaterThan(Integer value) {
-            addCriterion("pi_said >", value, "pi_said");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_saidGreaterThanOrEqualTo(Integer value) {
-            addCriterion("pi_said >=", value, "pi_said");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_saidLessThan(Integer value) {
-            addCriterion("pi_said <", value, "pi_said");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_saidLessThanOrEqualTo(Integer value) {
-            addCriterion("pi_said <=", value, "pi_said");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_saidIn(List<Integer> values) {
-            addCriterion("pi_said in", values, "pi_said");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_saidNotIn(List<Integer> values) {
-            addCriterion("pi_said not in", values, "pi_said");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_saidBetween(Integer value1, Integer value2) {
-            addCriterion("pi_said between", value1, value2, "pi_said");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_saidNotBetween(Integer value1, Integer value2) {
-            addCriterion("pi_said not between", value1, value2, "pi_said");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_sacodeIsNull() {
-            addCriterion("pi_sacode is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_sacodeIsNotNull() {
-            addCriterion("pi_sacode is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_sacodeEqualTo(String value) {
-            addCriterion("pi_sacode =", value, "pi_sacode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_sacodeNotEqualTo(String value) {
-            addCriterion("pi_sacode <>", value, "pi_sacode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_sacodeGreaterThan(String value) {
-            addCriterion("pi_sacode >", value, "pi_sacode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_sacodeGreaterThanOrEqualTo(String value) {
-            addCriterion("pi_sacode >=", value, "pi_sacode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_sacodeLessThan(String value) {
-            addCriterion("pi_sacode <", value, "pi_sacode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_sacodeLessThanOrEqualTo(String value) {
-            addCriterion("pi_sacode <=", value, "pi_sacode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_sacodeLike(String value) {
-            addCriterion("pi_sacode like", value, "pi_sacode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_sacodeNotLike(String value) {
-            addCriterion("pi_sacode not like", value, "pi_sacode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_sacodeIn(List<String> values) {
-            addCriterion("pi_sacode in", values, "pi_sacode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_sacodeNotIn(List<String> values) {
-            addCriterion("pi_sacode not in", values, "pi_sacode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_sacodeBetween(String value1, String value2) {
-            addCriterion("pi_sacode between", value1, value2, "pi_sacode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_sacodeNotBetween(String value1, String value2) {
-            addCriterion("pi_sacode not between", value1, value2, "pi_sacode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_totalIsNull() {
-            addCriterion("pi_total is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_totalIsNotNull() {
-            addCriterion("pi_total is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_totalEqualTo(BigDecimal value) {
-            addCriterion("pi_total =", value, "pi_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_totalNotEqualTo(BigDecimal value) {
-            addCriterion("pi_total <>", value, "pi_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_totalGreaterThan(BigDecimal value) {
-            addCriterion("pi_total >", value, "pi_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_totalGreaterThanOrEqualTo(BigDecimal value) {
-            addCriterion("pi_total >=", value, "pi_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_totalLessThan(BigDecimal value) {
-            addCriterion("pi_total <", value, "pi_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_totalLessThanOrEqualTo(BigDecimal value) {
-            addCriterion("pi_total <=", value, "pi_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_totalIn(List<BigDecimal> values) {
-            addCriterion("pi_total in", values, "pi_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_totalNotIn(List<BigDecimal> values) {
-            addCriterion("pi_total not in", values, "pi_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_totalBetween(BigDecimal value1, BigDecimal value2) {
-            addCriterion("pi_total between", value1, value2, "pi_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_totalNotBetween(BigDecimal value1, BigDecimal value2) {
-            addCriterion("pi_total not between", value1, value2, "pi_total");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recordmanidIsNull() {
-            addCriterion("pi_recordmanid is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recordmanidIsNotNull() {
-            addCriterion("pi_recordmanid is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recordmanidEqualTo(Integer value) {
-            addCriterion("pi_recordmanid =", value, "pi_recordmanid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recordmanidNotEqualTo(Integer value) {
-            addCriterion("pi_recordmanid <>", value, "pi_recordmanid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recordmanidGreaterThan(Integer value) {
-            addCriterion("pi_recordmanid >", value, "pi_recordmanid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recordmanidGreaterThanOrEqualTo(Integer value) {
-            addCriterion("pi_recordmanid >=", value, "pi_recordmanid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recordmanidLessThan(Integer value) {
-            addCriterion("pi_recordmanid <", value, "pi_recordmanid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recordmanidLessThanOrEqualTo(Integer value) {
-            addCriterion("pi_recordmanid <=", value, "pi_recordmanid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recordmanidIn(List<Integer> values) {
-            addCriterion("pi_recordmanid in", values, "pi_recordmanid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recordmanidNotIn(List<Integer> values) {
-            addCriterion("pi_recordmanid not in", values, "pi_recordmanid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recordmanidBetween(Integer value1, Integer value2) {
-            addCriterion("pi_recordmanid between", value1, value2, "pi_recordmanid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recordmanidNotBetween(Integer value1, Integer value2) {
-            addCriterion("pi_recordmanid not between", value1, value2, "pi_recordmanid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recordmanIsNull() {
-            addCriterion("pi_recordman is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recordmanIsNotNull() {
-            addCriterion("pi_recordman is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recordmanEqualTo(String value) {
-            addCriterion("pi_recordman =", value, "pi_recordman");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recordmanNotEqualTo(String value) {
-            addCriterion("pi_recordman <>", value, "pi_recordman");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recordmanGreaterThan(String value) {
-            addCriterion("pi_recordman >", value, "pi_recordman");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recordmanGreaterThanOrEqualTo(String value) {
-            addCriterion("pi_recordman >=", value, "pi_recordman");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recordmanLessThan(String value) {
-            addCriterion("pi_recordman <", value, "pi_recordman");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recordmanLessThanOrEqualTo(String value) {
-            addCriterion("pi_recordman <=", value, "pi_recordman");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recordmanLike(String value) {
-            addCriterion("pi_recordman like", value, "pi_recordman");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recordmanNotLike(String value) {
-            addCriterion("pi_recordman not like", value, "pi_recordman");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recordmanIn(List<String> values) {
-            addCriterion("pi_recordman in", values, "pi_recordman");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recordmanNotIn(List<String> values) {
-            addCriterion("pi_recordman not in", values, "pi_recordman");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recordmanBetween(String value1, String value2) {
-            addCriterion("pi_recordman between", value1, value2, "pi_recordman");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recordmanNotBetween(String value1, String value2) {
-            addCriterion("pi_recordman not between", value1, value2, "pi_recordman");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recorddateIsNull() {
-            addCriterion("pi_recorddate is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recorddateIsNotNull() {
-            addCriterion("pi_recorddate is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recorddateEqualTo(Date value) {
-            addCriterion("pi_recorddate =", value, "pi_recorddate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recorddateNotEqualTo(Date value) {
-            addCriterion("pi_recorddate <>", value, "pi_recorddate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recorddateGreaterThan(Date value) {
-            addCriterion("pi_recorddate >", value, "pi_recorddate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recorddateGreaterThanOrEqualTo(Date value) {
-            addCriterion("pi_recorddate >=", value, "pi_recorddate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recorddateLessThan(Date value) {
-            addCriterion("pi_recorddate <", value, "pi_recorddate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recorddateLessThanOrEqualTo(Date value) {
-            addCriterion("pi_recorddate <=", value, "pi_recorddate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recorddateIn(List<Date> values) {
-            addCriterion("pi_recorddate in", values, "pi_recorddate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recorddateNotIn(List<Date> values) {
-            addCriterion("pi_recorddate not in", values, "pi_recorddate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recorddateBetween(Date value1, Date value2) {
-            addCriterion("pi_recorddate between", value1, value2, "pi_recorddate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_recorddateNotBetween(Date value1, Date value2) {
-            addCriterion("pi_recorddate not between", value1, value2, "pi_recorddate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_statusIsNull() {
-            addCriterion("pi_status is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_statusIsNotNull() {
-            addCriterion("pi_status is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_statusEqualTo(String value) {
-            addCriterion("pi_status =", value, "pi_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_statusNotEqualTo(String value) {
-            addCriterion("pi_status <>", value, "pi_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_statusGreaterThan(String value) {
-            addCriterion("pi_status >", value, "pi_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_statusGreaterThanOrEqualTo(String value) {
-            addCriterion("pi_status >=", value, "pi_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_statusLessThan(String value) {
-            addCriterion("pi_status <", value, "pi_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_statusLessThanOrEqualTo(String value) {
-            addCriterion("pi_status <=", value, "pi_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_statusLike(String value) {
-            addCriterion("pi_status like", value, "pi_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_statusNotLike(String value) {
-            addCriterion("pi_status not like", value, "pi_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_statusIn(List<String> values) {
-            addCriterion("pi_status in", values, "pi_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_statusNotIn(List<String> values) {
-            addCriterion("pi_status not in", values, "pi_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_statusBetween(String value1, String value2) {
-            addCriterion("pi_status between", value1, value2, "pi_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_statusNotBetween(String value1, String value2) {
-            addCriterion("pi_status not between", value1, value2, "pi_status");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_statuscodeIsNull() {
-            addCriterion("pi_statuscode is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_statuscodeIsNotNull() {
-            addCriterion("pi_statuscode is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_statuscodeEqualTo(String value) {
-            addCriterion("pi_statuscode =", value, "pi_statuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_statuscodeNotEqualTo(String value) {
-            addCriterion("pi_statuscode <>", value, "pi_statuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_statuscodeGreaterThan(String value) {
-            addCriterion("pi_statuscode >", value, "pi_statuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_statuscodeGreaterThanOrEqualTo(String value) {
-            addCriterion("pi_statuscode >=", value, "pi_statuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_statuscodeLessThan(String value) {
-            addCriterion("pi_statuscode <", value, "pi_statuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_statuscodeLessThanOrEqualTo(String value) {
-            addCriterion("pi_statuscode <=", value, "pi_statuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_statuscodeLike(String value) {
-            addCriterion("pi_statuscode like", value, "pi_statuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_statuscodeNotLike(String value) {
-            addCriterion("pi_statuscode not like", value, "pi_statuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_statuscodeIn(List<String> values) {
-            addCriterion("pi_statuscode in", values, "pi_statuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_statuscodeNotIn(List<String> values) {
-            addCriterion("pi_statuscode not in", values, "pi_statuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_statuscodeBetween(String value1, String value2) {
-            addCriterion("pi_statuscode between", value1, value2, "pi_statuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_statuscodeNotBetween(String value1, String value2) {
-            addCriterion("pi_statuscode not between", value1, value2, "pi_statuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_printstatusIsNull() {
-            addCriterion("pi_printstatus is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_printstatusIsNotNull() {
-            addCriterion("pi_printstatus is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_printstatusEqualTo(String value) {
-            addCriterion("pi_printstatus =", value, "pi_printstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_printstatusNotEqualTo(String value) {
-            addCriterion("pi_printstatus <>", value, "pi_printstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_printstatusGreaterThan(String value) {
-            addCriterion("pi_printstatus >", value, "pi_printstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_printstatusGreaterThanOrEqualTo(String value) {
-            addCriterion("pi_printstatus >=", value, "pi_printstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_printstatusLessThan(String value) {
-            addCriterion("pi_printstatus <", value, "pi_printstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_printstatusLessThanOrEqualTo(String value) {
-            addCriterion("pi_printstatus <=", value, "pi_printstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_printstatusLike(String value) {
-            addCriterion("pi_printstatus like", value, "pi_printstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_printstatusNotLike(String value) {
-            addCriterion("pi_printstatus not like", value, "pi_printstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_printstatusIn(List<String> values) {
-            addCriterion("pi_printstatus in", values, "pi_printstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_printstatusNotIn(List<String> values) {
-            addCriterion("pi_printstatus not in", values, "pi_printstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_printstatusBetween(String value1, String value2) {
-            addCriterion("pi_printstatus between", value1, value2, "pi_printstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_printstatusNotBetween(String value1, String value2) {
-            addCriterion("pi_printstatus not between", value1, value2, "pi_printstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_printstatuscodeIsNull() {
-            addCriterion("pi_printstatuscode is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_printstatuscodeIsNotNull() {
-            addCriterion("pi_printstatuscode is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_printstatuscodeEqualTo(String value) {
-            addCriterion("pi_printstatuscode =", value, "pi_printstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_printstatuscodeNotEqualTo(String value) {
-            addCriterion("pi_printstatuscode <>", value, "pi_printstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_printstatuscodeGreaterThan(String value) {
-            addCriterion("pi_printstatuscode >", value, "pi_printstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_printstatuscodeGreaterThanOrEqualTo(String value) {
-            addCriterion("pi_printstatuscode >=", value, "pi_printstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_printstatuscodeLessThan(String value) {
-            addCriterion("pi_printstatuscode <", value, "pi_printstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_printstatuscodeLessThanOrEqualTo(String value) {
-            addCriterion("pi_printstatuscode <=", value, "pi_printstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_printstatuscodeLike(String value) {
-            addCriterion("pi_printstatuscode like", value, "pi_printstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_printstatuscodeNotLike(String value) {
-            addCriterion("pi_printstatuscode not like", value, "pi_printstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_printstatuscodeIn(List<String> values) {
-            addCriterion("pi_printstatuscode in", values, "pi_printstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_printstatuscodeNotIn(List<String> values) {
-            addCriterion("pi_printstatuscode not in", values, "pi_printstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_printstatuscodeBetween(String value1, String value2) {
-            addCriterion("pi_printstatuscode between", value1, value2, "pi_printstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_printstatuscodeNotBetween(String value1, String value2) {
-            addCriterion("pi_printstatuscode not between", value1, value2, "pi_printstatuscode");
-            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 andPi_text1IsNull() {
-            addCriterion("pi_text1 is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text1IsNotNull() {
-            addCriterion("pi_text1 is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text1EqualTo(String value) {
-            addCriterion("pi_text1 =", value, "pi_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text1NotEqualTo(String value) {
-            addCriterion("pi_text1 <>", value, "pi_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text1GreaterThan(String value) {
-            addCriterion("pi_text1 >", value, "pi_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text1GreaterThanOrEqualTo(String value) {
-            addCriterion("pi_text1 >=", value, "pi_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text1LessThan(String value) {
-            addCriterion("pi_text1 <", value, "pi_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text1LessThanOrEqualTo(String value) {
-            addCriterion("pi_text1 <=", value, "pi_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text1Like(String value) {
-            addCriterion("pi_text1 like", value, "pi_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text1NotLike(String value) {
-            addCriterion("pi_text1 not like", value, "pi_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text1In(List<String> values) {
-            addCriterion("pi_text1 in", values, "pi_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text1NotIn(List<String> values) {
-            addCriterion("pi_text1 not in", values, "pi_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text1Between(String value1, String value2) {
-            addCriterion("pi_text1 between", value1, value2, "pi_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text1NotBetween(String value1, String value2) {
-            addCriterion("pi_text1 not between", value1, value2, "pi_text1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text2IsNull() {
-            addCriterion("pi_text2 is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text2IsNotNull() {
-            addCriterion("pi_text2 is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text2EqualTo(String value) {
-            addCriterion("pi_text2 =", value, "pi_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text2NotEqualTo(String value) {
-            addCriterion("pi_text2 <>", value, "pi_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text2GreaterThan(String value) {
-            addCriterion("pi_text2 >", value, "pi_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text2GreaterThanOrEqualTo(String value) {
-            addCriterion("pi_text2 >=", value, "pi_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text2LessThan(String value) {
-            addCriterion("pi_text2 <", value, "pi_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text2LessThanOrEqualTo(String value) {
-            addCriterion("pi_text2 <=", value, "pi_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text2Like(String value) {
-            addCriterion("pi_text2 like", value, "pi_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text2NotLike(String value) {
-            addCriterion("pi_text2 not like", value, "pi_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text2In(List<String> values) {
-            addCriterion("pi_text2 in", values, "pi_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text2NotIn(List<String> values) {
-            addCriterion("pi_text2 not in", values, "pi_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text2Between(String value1, String value2) {
-            addCriterion("pi_text2 between", value1, value2, "pi_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text2NotBetween(String value1, String value2) {
-            addCriterion("pi_text2 not between", value1, value2, "pi_text2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text3IsNull() {
-            addCriterion("pi_text3 is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text3IsNotNull() {
-            addCriterion("pi_text3 is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text3EqualTo(String value) {
-            addCriterion("pi_text3 =", value, "pi_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text3NotEqualTo(String value) {
-            addCriterion("pi_text3 <>", value, "pi_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text3GreaterThan(String value) {
-            addCriterion("pi_text3 >", value, "pi_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text3GreaterThanOrEqualTo(String value) {
-            addCriterion("pi_text3 >=", value, "pi_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text3LessThan(String value) {
-            addCriterion("pi_text3 <", value, "pi_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text3LessThanOrEqualTo(String value) {
-            addCriterion("pi_text3 <=", value, "pi_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text3Like(String value) {
-            addCriterion("pi_text3 like", value, "pi_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text3NotLike(String value) {
-            addCriterion("pi_text3 not like", value, "pi_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text3In(List<String> values) {
-            addCriterion("pi_text3 in", values, "pi_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text3NotIn(List<String> values) {
-            addCriterion("pi_text3 not in", values, "pi_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text3Between(String value1, String value2) {
-            addCriterion("pi_text3 between", value1, value2, "pi_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text3NotBetween(String value1, String value2) {
-            addCriterion("pi_text3 not between", value1, value2, "pi_text3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text4IsNull() {
-            addCriterion("pi_text4 is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text4IsNotNull() {
-            addCriterion("pi_text4 is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text4EqualTo(String value) {
-            addCriterion("pi_text4 =", value, "pi_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text4NotEqualTo(String value) {
-            addCriterion("pi_text4 <>", value, "pi_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text4GreaterThan(String value) {
-            addCriterion("pi_text4 >", value, "pi_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text4GreaterThanOrEqualTo(String value) {
-            addCriterion("pi_text4 >=", value, "pi_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text4LessThan(String value) {
-            addCriterion("pi_text4 <", value, "pi_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text4LessThanOrEqualTo(String value) {
-            addCriterion("pi_text4 <=", value, "pi_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text4Like(String value) {
-            addCriterion("pi_text4 like", value, "pi_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text4NotLike(String value) {
-            addCriterion("pi_text4 not like", value, "pi_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text4In(List<String> values) {
-            addCriterion("pi_text4 in", values, "pi_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text4NotIn(List<String> values) {
-            addCriterion("pi_text4 not in", values, "pi_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text4Between(String value1, String value2) {
-            addCriterion("pi_text4 between", value1, value2, "pi_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text4NotBetween(String value1, String value2) {
-            addCriterion("pi_text4 not between", value1, value2, "pi_text4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text5IsNull() {
-            addCriterion("pi_text5 is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text5IsNotNull() {
-            addCriterion("pi_text5 is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text5EqualTo(String value) {
-            addCriterion("pi_text5 =", value, "pi_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text5NotEqualTo(String value) {
-            addCriterion("pi_text5 <>", value, "pi_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text5GreaterThan(String value) {
-            addCriterion("pi_text5 >", value, "pi_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text5GreaterThanOrEqualTo(String value) {
-            addCriterion("pi_text5 >=", value, "pi_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text5LessThan(String value) {
-            addCriterion("pi_text5 <", value, "pi_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text5LessThanOrEqualTo(String value) {
-            addCriterion("pi_text5 <=", value, "pi_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text5Like(String value) {
-            addCriterion("pi_text5 like", value, "pi_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text5NotLike(String value) {
-            addCriterion("pi_text5 not like", value, "pi_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text5In(List<String> values) {
-            addCriterion("pi_text5 in", values, "pi_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text5NotIn(List<String> values) {
-            addCriterion("pi_text5 not in", values, "pi_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text5Between(String value1, String value2) {
-            addCriterion("pi_text5 between", value1, value2, "pi_text5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_text5NotBetween(String value1, String value2) {
-            addCriterion("pi_text5 not between", value1, value2, "pi_text5");
-            return (Criteria) this;
-        }
-        public Criteria andPi_nettotalIsNull() {
-            addCriterion("Pi_nettotal is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_nettotalIsNotNull() {
-            addCriterion("Pi_nettotal is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_nettotalEqualTo(Integer value) {
-            addCriterion("Pi_nettotal =", value, "Pi_nettotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_nettotalNotEqualTo(Integer value) {
-            addCriterion("Pi_nettotal <>", value, "Pi_nettotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_nettotalGreaterThan(Integer value) {
-            addCriterion("Pi_nettotal >", value, "Pi_nettotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_nettotalGreaterThanOrEqualTo(Integer value) {
-            addCriterion("Pi_nettotal >=", value, "Pi_nettotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_nettotalLessThan(Integer value) {
-            addCriterion("Pi_nettotal <", value, "Pi_nettotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_nettotalLessThanOrEqualTo(Integer value) {
-            addCriterion("Pi_nettotal <=", value, "Pi_nettotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_nettotalIn(List<Integer> values) {
-            addCriterion("Pi_nettotal in", values, "Pi_nettotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_nettotalNotIn(List<Integer> values) {
-            addCriterion("Pi_nettotal not in", values, "Pi_nettotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_nettotalBetween(Integer value1, Integer value2) {
-            addCriterion("Pi_nettotal between", value1, value2, "Pi_nettotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_nettotalNotBetween(Integer value1, Integer value2) {
-            addCriterion("Pi_nettotal not between", value1, value2, "Pi_nettotal");
-            return (Criteria) this;
-        }
-        public Criteria andPi_auditdateIsNull() {
-            addCriterion("Pi_auditdate is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_auditdateIsNotNull() {
-            addCriterion("Pi_auditdate is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_auditdateEqualTo(Integer value) {
-            addCriterion("Pi_auditdate =", value, "Pi_auditdate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_auditdateNotEqualTo(Integer value) {
-            addCriterion("Pi_auditdate <>", value, "Pi_auditdate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_auditdateGreaterThan(Integer value) {
-            addCriterion("Pi_auditdate >", value, "Pi_auditdate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_auditdateGreaterThanOrEqualTo(Integer value) {
-            addCriterion("Pi_auditdate >=", value, "Pi_auditdate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_auditdateLessThan(Integer value) {
-            addCriterion("Pi_auditdate <", value, "Pi_auditdate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_auditdateLessThanOrEqualTo(Integer value) {
-            addCriterion("Pi_auditdate <=", value, "Pi_auditdate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_auditdateIn(List<Integer> values) {
-            addCriterion("Pi_auditdate in", values, "Pi_auditdate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_auditdateNotIn(List<Integer> values) {
-            addCriterion("Pi_auditdate not in", values, "Pi_auditdate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_auditdateBetween(Integer value1, Integer value2) {
-            addCriterion("Pi_auditdate between", value1, value2, "Pi_auditdate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_auditdateNotBetween(Integer value1, Integer value2) {
-            addCriterion("Pi_auditdate not between", value1, value2, "Pi_auditdate");
-            return (Criteria) this;
-        }
-        public Criteria andPi_auditmanIsNull() {
-            addCriterion("Pi_auditman is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_auditmanIsNotNull() {
-            addCriterion("Pi_auditman is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_auditmanEqualTo(Integer value) {
-            addCriterion("Pi_auditman =", value, "Pi_auditman");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_auditmanNotEqualTo(Integer value) {
-            addCriterion("Pi_auditman <>", value, "Pi_auditman");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_auditmanGreaterThan(Integer value) {
-            addCriterion("Pi_auditman >", value, "Pi_auditman");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_auditmanGreaterThanOrEqualTo(Integer value) {
-            addCriterion("Pi_auditman >=", value, "Pi_auditman");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_auditmanLessThan(Integer value) {
-            addCriterion("Pi_auditman <", value, "Pi_auditman");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_auditmanLessThanOrEqualTo(Integer value) {
-            addCriterion("Pi_auditman <=", value, "Pi_auditman");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_auditmanIn(List<Integer> values) {
-            addCriterion("Pi_auditman in", values, "Pi_auditman");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_auditmanNotIn(List<Integer> values) {
-            addCriterion("Pi_auditman not in", values, "Pi_auditman");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_auditmanBetween(Integer value1, Integer value2) {
-            addCriterion("Pi_auditman between", value1, value2, "Pi_auditman");
-            return (Criteria) this;
-        }
-
-        public Criteria andPi_auditmanNotBetween(Integer value1, Integer value2) {
-            addCriterion("Pi_auditman not between", value1, value2, "Pi_auditman");
-            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 - 8
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOutList.java

@@ -66,8 +66,6 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private String pi_address;
 
-    private Long pi_inid;
-
     private Long pd_piid;
 
     private String pd_inoutno;
@@ -140,10 +138,4 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private Long pd_ioid;
 
-    private Double pi_nettotal;
-
-    private Date pi_auditdate;
-
-    private String pi_auditman;
-
 }

+ 67 - 12
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/controller/ProdInOutController.java

@@ -3,7 +3,7 @@ package com.usoftchina.saas.storage.controller;
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
-import com.usoftchina.saas.commons.dto.DocSavedDTO;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.storage.dto.ProdInOutFormDTO;
@@ -11,13 +11,19 @@ import com.usoftchina.saas.storage.po.ProdInOutList;
 import com.usoftchina.saas.storage.service.ProdInOutService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
+
+/**
+ * Created by zdw
+ * 2018-10-17 11:41.
+ */
 @CrossOrigin
 @RestController
 @RequestMapping("/prodinout")
 public class ProdInOutController {
 
     @Autowired
-    public ProdInOutService prodInOutService;
+    ProdInOutService prodInOutService;
+
 
     /**
      * 出入库订单列表
@@ -50,18 +56,31 @@ public class ProdInOutController {
      * @return
      */
     @PostMapping("/save")
-    public Result<DocSavedDTO> saveFormData(@RequestBody ProdInOutFormDTO data) {
-        DocSavedDTO savedDTO = prodInOutService.saveFormData(data,false);
+    public Result<DocBaseDTO> saveFormData(@RequestBody ProdInOutFormDTO data) {
+        DocBaseDTO savedDTO = prodInOutService.saveFormData(data);
         return Result.success(savedDTO);
     }
 
+    /**
+     * 出入库单批量删除
+     *
+     * @param baseDTOs
+     * @return
+     */
+    @PostMapping("/batchDelete")
+    public Result batchDelete(@RequestBody BatchDealBaseDTO baseDTOs) {
+        prodInOutService.batchDelete(baseDTOs);
+        return Result.success();
+    }
+
+
     /**
      * 出入库单删除
      *
      * @param id
      * @return
      */
-    @GetMapping("/delete/{id}")
+    @PostMapping("/delete/{id}")
     public Result delete(@PathVariable("id") Long id) {
         prodInOutService.delete(id);
         return Result.success();
@@ -73,7 +92,7 @@ public class ProdInOutController {
      * @param id
      * @return
      */
-    @GetMapping("/deleteItem/{id}")
+    @PostMapping("/deleteItem/{id}")
     public Result deleteItem(@PathVariable("id") Long id) {
         prodInOutService.deleteItem(id);
         return Result.success();
@@ -88,7 +107,7 @@ public class ProdInOutController {
      */
     @PostMapping("/audit")
     public Result audit(@RequestBody ProdInOutFormDTO formData) {
-        DocSavedDTO audit = prodInOutService.audit(formData);
+        DocBaseDTO audit = prodInOutService.audit(formData);
         return Result.success(audit);
     }
 
@@ -98,7 +117,7 @@ public class ProdInOutController {
      * @param id
      * @return
      */
-    @GetMapping("/unAudit/{id}")
+    @PostMapping("/unAudit/{id}")
     public Result unAudit(@PathVariable("id") Long id) {
         prodInOutService.unAudit(id);
         return Result.success();
@@ -128,16 +147,52 @@ public class ProdInOutController {
         return Result.success();
     }
 
+    /**
+     * 出入库单关闭
+     *
+     * @param id
+     * @return
+     */
+    @PostMapping("/close/{id}")
+    public Result close(@PathVariable(value = "id") long id){
+        DocBaseDTO close = prodInOutService.close(id);
+        return Result.success(close);
+    }
+
 
     /**
-     * 出入库单批量删除
+     * 出入库单批量关闭
      *
      * @param baseDTOs
      * @return
      */
-    @PostMapping("/batchDelete")
-    public Result batchDelete(@RequestBody BatchDealBaseDTO baseDTOs) {
-        prodInOutService.batchDelete(baseDTOs);
+    @PostMapping("/batchClose")
+    public Result batchClose(@RequestBody BatchDealBaseDTO baseDTOs) {
+        prodInOutService.batchClose(baseDTOs);
+        return Result.success();
+    }
+
+    /**
+     * 出入库单启用
+     *
+     * @param id
+     * @return
+     */
+    @PostMapping("/open/{id}")
+    public Result open(@PathVariable(value = "id") long id){
+        DocBaseDTO open = prodInOutService.open(id);
+        return Result.success(open);
+    }
+
+    /**
+     * 出入库单批量启用
+     *
+     * @param baseDTOs
+     * @return
+     */
+    @PostMapping("/batchOpen")
+    public Result batchOpen(@RequestBody BatchDealBaseDTO baseDTOs) {
+        prodInOutService.batchOpen(baseDTOs);
         return Result.success();
     }
 

+ 5 - 3
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/ProdIODetailMapper.java

@@ -1,19 +1,19 @@
 package com.usoftchina.saas.storage.mapper;
 
+
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.storage.po.ProdIODetail;
 
 import java.util.List;
 
-
 public interface ProdIODetailMapper extends CommonBaseMapper<ProdIODetail> {
 
-    int deleteByPrimaryKey(Long pd_id);
 
+    int deleteByPrimaryKey(Long pd_id);
 
     int insertSelective(ProdIODetail record);
 
-    ProdIODetail selectByPrimaryKey(Long pd_id);
+    ProdIODetail selectByPrimaryKey(Integer pd_id);
 
     int updateByPrimaryKeySelective(ProdIODetail record);
 
@@ -28,4 +28,6 @@ public interface ProdIODetailMapper extends CommonBaseMapper<ProdIODetail> {
     void updatePurchaseYqty(Integer id);
 
     List<ProdIODetail> selectByFK(Long id);
+
+    void deleteByFK(Long id);
 }

+ 6 - 2
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/ProdInOutListMapper.java

@@ -6,11 +6,15 @@ import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
-
+/**
+ * Created by zdw
+ * 2018-10-18 16:57.
+ */
 public interface ProdInOutListMapper {
 
     List<ProdInOutList> selectProdInOutListByCondition(@Param("con") String con, @Param("companyId") Long companyId);
 
-    List<ProdInOutList> selectProdInOutBycondition(@Param("con") String con,@Param("companyId") Long companyId);
+    List<ProdInOutList> selectProdInOutBycondition(@Param("con") String con, @Param("companyId") Long companyId);
+
 
 }

+ 12 - 3
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/ProdInOutMapper.java

@@ -1,13 +1,14 @@
 package com.usoftchina.saas.storage.mapper;
 
+
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.storage.po.ProdInOut;
+import org.apache.ibatis.annotations.Param;
 
 public interface ProdInOutMapper extends CommonBaseMapper<ProdInOut> {
 
-    int deleteByPrimaryKey(Long pi_id);
 
-    int insert(ProdInOut record);
+    int deleteByPrimaryKey(Long pi_id);
 
     int insertSelective(ProdInOut record);
 
@@ -15,5 +16,13 @@ public interface ProdInOutMapper extends CommonBaseMapper<ProdInOut> {
 
     int updateByPrimaryKeySelective(ProdInOut record);
 
+    int updateByPrimaryKeyWithBLOBs(ProdInOut record);
+
     int updateByPrimaryKey(ProdInOut record);
-}
+
+    Integer validateCodeWhenInsert(@Param("pi_inoutno") String pi_inoutno, @Param("companyId") Long companyId);
+
+    Integer validateCodeWhenUpdate(@Param("pi_inoutno") String pi_inoutno, @Param("id") Long id, @Param("companyId") Long companyId);
+
+    String selectCodeById(Long id);
+}

+ 21 - 4
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/ProdInOutService.java

@@ -3,7 +3,7 @@ package com.usoftchina.saas.storage.service;
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.service.CommonBaseService;
 import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
-import com.usoftchina.saas.commons.dto.DocSavedDTO;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.storage.dto.ProdInOutFormDTO;
@@ -11,6 +11,11 @@ import com.usoftchina.saas.storage.mapper.ProdInOutMapper;
 import com.usoftchina.saas.storage.po.ProdInOut;
 import com.usoftchina.saas.storage.po.ProdInOutList;
 
+
+/**
+ * Created by zdw
+ * 2018-10-17 13:39.
+ */
 public interface ProdInOutService extends CommonBaseService<ProdInOutMapper, ProdInOut> {
 
     /**
@@ -27,7 +32,7 @@ public interface ProdInOutService extends CommonBaseService<ProdInOutMapper, Pro
      * @param formdata
      * @return
      */
-    DocSavedDTO saveFormData(ProdInOutFormDTO formdata, Boolean isbfaudit);
+    DocBaseDTO saveFormData(ProdInOutFormDTO formdata);
 
     /**
      * 删除出入库单
@@ -40,7 +45,9 @@ public interface ProdInOutService extends CommonBaseService<ProdInOutMapper, Pro
      * @param formData
      * @return
      */
-    DocSavedDTO audit(ProdInOutFormDTO formData);
+    DocBaseDTO audit(ProdInOutFormDTO formData);
+
+    void batchAudit(BatchDealBaseDTO baseDTOs);
 
     /**
      * 反审核出入库单
@@ -48,7 +55,7 @@ public interface ProdInOutService extends CommonBaseService<ProdInOutMapper, Pro
      */
     void unAudit(Long id);
 
-    void batchAudit(BatchDealBaseDTO baseDTOs);
+    void batchUnAudit(BatchDealBaseDTO baseDTOs);
 
     void deleteItem(Long id);
 
@@ -56,4 +63,14 @@ public interface ProdInOutService extends CommonBaseService<ProdInOutMapper, Pro
 
     PageInfo<ProdInOutList> getListData(PageRequest page, ListReqDTO req);
 
+
+
+
+    DocBaseDTO close(long id);
+
+    void batchClose(BatchDealBaseDTO baseDTOs);
+
+    DocBaseDTO open(long id);
+
+    void batchOpen(BatchDealBaseDTO baseDTOs);
 }

+ 232 - 54
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/ProdInoutServiceImpl.java

@@ -4,11 +4,13 @@ import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.MaxnumberService;
+import com.usoftchina.saas.commons.api.MessageLogService;
 import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
-import com.usoftchina.saas.commons.dto.DocSavedDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.commons.exception.BizExceptionCode;
+import com.usoftchina.saas.commons.po.BillCodeSeq;
+import com.usoftchina.saas.commons.po.Status;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.api.WarehouseApi;
 import com.usoftchina.saas.exception.BizException;
@@ -26,6 +28,7 @@ import com.usoftchina.saas.storage.service.ProdInOutService;
 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.*;
@@ -35,6 +38,9 @@ public class ProdInoutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
 
     @Autowired
     private ProdIODetailMapper prodIODetailMapper;
+
+    @Autowired
+    private MessageLogService messageLogService;
     @Autowired
     private ProdInOutListMapper prodInOutListMapper;
     @Autowired
@@ -47,6 +53,7 @@ public class ProdInoutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
 
     @Override
     public PageInfo<ProdInOutList> getListData(PageRequest page, ListReqDTO req) {
+        //设置默认分页
         //设置默认分页
         if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
             page = new PageRequest();
@@ -65,10 +72,13 @@ public class ProdInoutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         List<ProdInOutList> 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 = prodInOutListMapper.selectProdInOutListByCondition(con, companyId);
+            list = prodInOutListMapper.selectProdInOutListByCondition(con,companyId);
         } else {
-            list = prodInOutListMapper.selectProdInOutBycondition(con, companyId);
+            list = prodInOutListMapper.selectProdInOutBycondition(con,companyId);
         }
         return list;
     }
@@ -91,9 +101,10 @@ public class ProdInoutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
     }
 
     @Override
-    public DocSavedDTO saveFormData(ProdInOutFormDTO formdata, Boolean isbfaudit) {
+    @Transactional
+    public DocBaseDTO saveFormData(ProdInOutFormDTO formdata) {
         if (null == formdata || null == formdata.getMain()){
-            throw new BizException(BizExceptionCode.EMPTY_DATA);
+            throw new BizException(500, "数据为空,请填写后再保存");
         }
         //公司ID
         Long companyId = BaseContextHolder.getCompanyId();
@@ -106,9 +117,10 @@ public class ProdInoutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         List<ProdIODetail> insertDetails = new ArrayList<>();
         //更新从表数据
         List<ProdIODetail> updateDetails = new ArrayList<>();
-        DocSavedDTO saveDTO = new DocSavedDTO();
+        DocBaseDTO baseDTO = new DocBaseDTO();
         Long pi_id = main.getId();
         String pi_inoutno = main.getPi_inoutno();
+        String pi_class = main.getPi_class();
         ProdInOut prodInOut = BeanMapper.map(main,ProdInOut.class);
         prodInOut.setCompanyId(companyId);
         prodInOut.setCreatorId(userId);
@@ -117,9 +129,9 @@ public class ProdInoutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         prodInOut.setPi_puid(main.getPi_puid());
         prodInOut.setPi_pucode(main.getPi_pucode());
         //编号获取
-        //pi_inoutno = pushMaxnubmer(pi_inoutno, pi_id);
+        pi_inoutno = pushMaxnubmer(prodInOut);
         prodInOut.setPi_inoutno(pi_inoutno);
-        saveDTO.setCode(pi_inoutno);
+
         //判断更新与保存动作
         if (StringUtils.isEmpty(pi_id) || "0".equals(pi_id.toString())){
             //插入操作
@@ -131,15 +143,21 @@ public class ProdInoutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 detail.setPd_piid(pi_id);
                 detail.setPd_inoutno(pi_inoutno);
                 detail.setPd_piclass(prodInOut.getPi_class());
-//                detail.setPd_yqty(new Double());
+                detail.setCompanyId(companyId);
+                detail.setCreatorId(userId);
+                detail.setCreateTime(new Date());
+
                 insertDetails.add(detail);
             }
             //插入从表
             if (insertDetails.size()>0) {
                 prodIODetailMapper.batchInsert(insertDetails);
             }
-            saveDTO.setId(pi_id);
-            return saveDTO;
+
+            baseDTO = getBaseDTOById(pi_id,pi_class,pi_inoutno);
+            //日志记录
+            messageLogService.save(baseDTO);
+            return baseDTO;
         }
         //更新操作
         getMapper().updateByPrimaryKeySelective(prodInOut);
@@ -149,6 +167,9 @@ public class ProdInoutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             detail.setPd_piid(pi_id);
             detail.setPd_inoutno(pi_inoutno);
             detail.setPd_piclass(prodInOut.getPi_class());
+            detail.setCompanyId(companyId);
+            detail.setCreatorId(userId);
+            detail.setCreateTime(new Date());
             if (StringUtils.isEmpty(detail.getId()) || "0".equals(detail.getId().toString())) {
                 insertDetails.add(detail);
             } else {
@@ -163,57 +184,82 @@ public class ProdInoutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         if (updateDetails.size()>0) {
             prodIODetailMapper.batchUpdate(updateDetails);
         }
-        saveDTO.setId(pi_id);
+        baseDTO = getBaseDTOById(pi_id,pi_class,pi_inoutno);
         //更新已转数
-        if (!isbfaudit)
-            updateYqty(prodInOut);
-        return saveDTO;
+        //日志记录
+        messageLogService.update(baseDTO);
+
+        return baseDTO;
     }
 
+
     @Override
+    @Transactional
     public void delete(Long id) {
         singleDelete(id);
     }
 
     private void singleDelete(Long id) {
-        if (null != id) {
-            ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
-            //删除主键
-            getMapper().deleteByPrimaryKey(prodInOut.getId());
-            //TODO 删除从表
 
-            //更新已转数
-//            updateYqty(prodInOut.getPi_puid(),prodInOut.getPi_class());
-            updateYqty(prodInOut);
-        }
+        ProdInOut prodInOut = checkAndReturnOrder(id);;
+        //删除主键
+        getMapper().deleteByPrimaryKey(prodInOut.getId());
+        //删除从表
+        prodIODetailMapper.deleteByFK(id);
+        DocBaseDTO docBaseDTO = getBaseDTOById(id,prodInOut.getPi_class(),prodInOut.getPi_inoutno());
+
+        //日志
+        messageLogService.delete(docBaseDTO);
     }
 
 
     @Override
-    public DocSavedDTO audit(ProdInOutFormDTO formData) {
+    @Transactional
+    public DocBaseDTO audit(ProdInOutFormDTO formData) {
         Long id = null;
-        DocSavedDTO savedDTO = new DocSavedDTO();
+        DocBaseDTO baseDTO = new DocBaseDTO();
         if (null != formData) {
             id = formData.getMain().getId();
             if (StringUtils.isEmpty(id)) {
-                DocSavedDTO saveDTO = saveFormData(formData,true);
-                id = saveDTO.getId();
+                baseDTO = saveFormData(formData);
+                id = baseDTO.getId();
+            }
+            String res = singleAudit(formData.getMain());
+            if(res!=null){
+                new BizException(501,res);
             }
-            singleAudit(formData.getMain());
         }
-        savedDTO.setId(id);
-        return savedDTO;
+        baseDTO.setId(id);
+        return baseDTO;
     }
 
-    @Override
-    public void unAudit(Long id) {
-        ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
-        ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
-        singleAudit(prodInOutDTO);
+    private String singleAudit(ProdInOutDTO prodInOutDTO) {
+        String pi_class= prodInOutDTO.getPi_class();
+        Map<String, Object> map = new HashMap<String, Object>();
+        map.put("inoutNo",prodInOutDTO.getPi_inoutno() );
+        map.put("class", pi_class);
+        map.put("commitid",BaseContextHolder.getUserId());
+        map.put("companyid",BaseContextHolder.getCompanyId());
+        map.put("result","");
+        warehouseApi.post(map);
+        Object result =  map.get("result");
+        if(result!=null){
+            return result.toString();
+        }else{
+            //记录日志
+            DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class,prodInOutDTO.getPi_inoutno());
+            //日志
+            messageLogService.audit(docBaseDTO);
+            return "";
+        }
     }
 
     @Override
     public void batchAudit(BatchDealBaseDTO baseDTOs) {
+        if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
+                baseDTOs.getBaseDTOs().size() == 0) {
+            return;
+        }
         for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
             Long id =  base.getId();
             ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
@@ -222,29 +268,58 @@ public class ProdInoutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         }
     }
 
-    private void singleAudit(ProdInOutDTO prodInOutDTO) {
+    @Override
+    public void unAudit(Long id) {
+        ProdInOut prodInOut =checkAndReturnOrder(id);
+        ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut, ProdInOutDTO.class);
+        String res =  singleUnAudit(prodInOutDTO);
+
+    }
+
+    private String singleUnAudit(ProdInOutDTO prodInOutDTO) {
+        String pi_class= prodInOutDTO.getPi_class();
         Map<String, Object> map = new HashMap<String, Object>();
         map.put("inoutNo",prodInOutDTO.getPi_inoutno() );
-        map.put("class",prodInOutDTO.getPi_class() );
-        map.put("commitid",prodInOutDTO.getPi_recordmanid());
-        map.put("companyid",prodInOutDTO.getCompanyId());
+        map.put("class", pi_class);
+        map.put("commitid",BaseContextHolder.getUserId());
+        map.put("companyid",BaseContextHolder.getCompanyId());
         map.put("result","");
-        warehouseApi.post(map);
+        warehouseApi.unPost(map);
         Object result =  map.get("result");
-        System.out.println("result");
-        //记录日志
-        if (!StringUtils.isEmpty(result))
-            throw new BizException(500, "存在已审核单据,单据编号:" + result);
+        if(result!=null){
+            return result.toString();
+        }else{
+            //记录日志
+            DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class,prodInOutDTO.getPi_inoutno());
+            //日志
+            messageLogService.audit(docBaseDTO);
+            return "";
+        }
     }
 
+    @Override
+    public void batchUnAudit(BatchDealBaseDTO baseDTOs) {
+        if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
+                baseDTOs.getBaseDTOs().size() == 0) {
+            return;
+        }
+        for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
+            Long id =  base.getId();
+            ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
+            ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
+            singleUnAudit(prodInOutDTO);
+        }
+    }
 
     @Override
     public void deleteItem(Long id) {
         ProdIODetail prodIODetail = prodIODetailMapper.selectByPrimaryKey(id);
+        ProdInOut prodInOut = checkAndReturnOrder(prodIODetail.getPd_piid());
         prodIODetailMapper.deleteByPrimaryKey(id);
-        ProdInOut prodInOut = getMapper().selectByPrimaryKey(prodIODetail.getPd_piid());
-        //更新已转数
-        updateYqty(prodInOut);
+
+        DocBaseDTO docBaseDTO = getBaseDTOById(id,prodInOut.getPi_class(),prodInOut.getPi_inoutno());
+        //日志
+        messageLogService.deleteDetail(docBaseDTO);
     }
 
     @Override
@@ -257,17 +332,120 @@ public class ProdInoutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         }
     }
 
-    private void updateYqty(ProdInOut prodInOut) {
-        //TODO 更新已转数
 
+
+    private DocBaseDTO singleClose(Long id) {
+        DocBaseDTO docBaseDTO = null;
+        if (null!=id) {
+            ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
+            if(Status.CLOSE.name().equals(prodInOut.getPi_statuscode())){
+                throw new BizException(BizExceptionCode.BIZ_CLOSE);
+            }
+            prodInOut.setPi_statuscode(Status.CLOSE.name());
+            prodInOut.setPi_status(Status.CLOSE.getDisplay());
+            getMapper().updateByPrimaryKeySelective(prodInOut);
+            docBaseDTO = getBaseDTOById(id,prodInOut.getPi_class(),prodInOut.getPi_inoutno());
+            //日志
+            messageLogService.close(docBaseDTO);
+        }
+        return docBaseDTO;
+    }
+
+
+    @Override
+    public DocBaseDTO close(long id) {
+        return singleClose(id);
+    }
+
+    @Override
+    public void batchClose(BatchDealBaseDTO baseDTOs) {
+        if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
+                baseDTOs.getBaseDTOs().size() == 0) {
+            return;
+        }
+        for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
+            singleClose(base.getId());
+        }
+    }
+
+    private DocBaseDTO singleOpen(Long id) {
+        DocBaseDTO docBaseDTO = null;
+        if (null!=id) {
+            ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
+            if(Status.OPEN.name().equals(prodInOut.getPi_statuscode())){
+                throw new BizException(BizExceptionCode.BIZ_OPEN);
+            }
+            prodInOut.setPi_statuscode(Status.OPEN.name());
+            prodInOut.setPi_status(Status.OPEN.getDisplay());
+            getMapper().updateByPrimaryKeySelective(prodInOut);
+            docBaseDTO = getBaseDTOById(id,prodInOut.getPi_class(),prodInOut.getPi_inoutno());
+            //日志
+        messageLogService.close(docBaseDTO);
+        }
+        return docBaseDTO;
+    }
+
+
+    @Override
+    public DocBaseDTO open(long id) {
+        return singleOpen(id);
+    }
+
+    @Override
+    public void batchOpen(BatchDealBaseDTO baseDTOs) {
+        if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
+                baseDTOs.getBaseDTOs().size() == 0) {
+            return;
+        }
+        for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
+            singleOpen(base.getId());
+        }
+    }
+
+    private DocBaseDTO getBaseDTOById(Long id, String pi_class,String code) {
+        if (null == id) {
+            return null;
+        }
+        String caller = BillCodeSeq.PURCHASEIN.getName().equals(pi_class)?BillCodeSeq.PURCHASEIN.getCaller():BillCodeSeq.PURCHASEOUT.getCaller();
+        DocBaseDTO baseDTO = new DocBaseDTO();
+        baseDTO.setId(id);
+        baseDTO.setCode(code);
+        baseDTO.setName(caller);
+        return baseDTO;
     }
 
-    /*private String pushMaxnubmer(String code, Long id) {
-        if (null == code) {
+    private String pushMaxnubmer(ProdInOut prodInOut) {
+        String pi_inoutno = prodInOut.getPi_inoutno();
+        String pi_class = prodInOut.getPi_class();
+        Long id = prodInOut.getId();
+        if (null == pi_inoutno) {
             throw new BizException(BizExceptionCode.NULL_CODE);
         }
+        Long companyId = BaseContextHolder.getCompanyId();
+        Integer count = "0".equals(String.valueOf(id)) ? getMapper().validateCodeWhenInsert(pi_inoutno, companyId) :
+                getMapper().validateCodeWhenUpdate(pi_inoutno, id, companyId);
+        String caller ="";
+        if("其它入库单".equals(pi_class)){
+            caller = BillCodeSeq.OTHERIN.getCaller();
+        }else if("其它出库单".equals(pi_class)) {
+            caller = BillCodeSeq.OTHEROUT.getCaller();
+        }else if("调拨单".equals(pi_class)) {
+            caller = BillCodeSeq.APPROPRIATIONINOUT.getCaller();
+        }
+        return maxnumberService.pushMaxnubmer(count, pi_inoutno, caller).getData();
+    }
+
 
-        return maxnumberService.pushMaxnubmer(count, code, "Purchase");
-    }*/
 
+
+    private ProdInOut checkAndReturnOrder (Long id){
+        if(id == null || id <= 0) {
+            throw new BizException(BizExceptionCode.ILLEGAL_ID);
+        }
+        ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
+        if(prodInOut==null){
+            throw new BizException(BizExceptionCode.NO_DATA);
+        }
+        return prodInOut;
+    }
 }

+ 6 - 43
applications/storage/storage-server/src/main/resources/mapper/ProdIODetailMapper.xml

@@ -1,6 +1,6 @@
 <?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.storage.mapper.ProdIODetailMapper">
+<mapper namespace="com.usoftchina.saas.purchase.mapper.ProdIODetailMapper">
   <resultMap id="BaseResultMap" type="com.usoftchina.saas.storage.po.ProdIODetail">
     <id column="pd_id" jdbcType="INTEGER" property="id" />
     <result column="pd_piid" jdbcType="INTEGER" property="pd_piid" />
@@ -41,7 +41,7 @@
     <result column="pd_ym" jdbcType="INTEGER" property="pd_ym" />
     <result column="pd_yqty" jdbcType="DOUBLE" property="pd_yqty" />
     <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
-    <association property="product" javaType="com.usoftchina.saas.document.entities.Product">
+    <association property="productDTO" javaType="com.usoftchina.saas.document.dto.ProductDTO">
       <id column="pr_id" property="id"/>
       <result column="pr_code" property="pr_code"/>
       <result column="pr_detail" property="pr_detail"/>
@@ -75,7 +75,6 @@
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.storage.po.ProdIODetail">
     <result column="pd_remark" jdbcType="LONGVARCHAR" property="pd_remark" />
   </resultMap>
-
   <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, 
@@ -86,7 +85,6 @@
   <sql id="Blob_Column_List">
     pd_remark
   </sql>
-
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
     select 
     <include refid="Base_Column_List" />
@@ -99,7 +97,6 @@
     delete from prodiodetail
     where pd_id = #{pd_id,jdbcType=INTEGER}
   </delete>
-
   <insert id="insertSelective" parameterType="com.usoftchina.saas.storage.po.ProdIODetail">
     <selectKey resultType="java.lang.Long" keyProperty="id">
       SELECT LAST_INSERT_ID() AS ID
@@ -344,7 +341,6 @@
       </if>
     </trim>
   </insert>
-
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.storage.po.ProdIODetail">
     update prodiodetail
     <set>
@@ -553,34 +549,6 @@
       pd_ioid = #{pd_ioid,jdbcType=INTEGER}
     where pd_id = #{pd_id,jdbcType=INTEGER}
   </update>
-
-  <insert id="batchInsert1" 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=DOUBLE},#{item.pd_outqty,jdbcType=DOUBLE},#{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=DOUBLE}
-      )
-    </foreach>
-  </insert>
-
   <insert id="batchInsert" parameterType="java.util.List" >
     <foreach collection="list" item="item" index="index" open="" close="" separator=",">
       insert into prodiodetail
@@ -825,14 +793,6 @@
     </foreach>
   </insert>
 
-
-
-
-
-
-
-
-
   <update id="batchUpdate" parameterType="com.usoftchina.saas.storage.po.ProdIODetail" >
     <foreach collection="list" item="item" index="index" open="" close="" separator=";">
       update prodiodetail <set>
@@ -959,6 +919,9 @@ where a.pd_piid = (select pi_id from prodinout where pi_puid=#{id,jdbcType=INTEG
     where pd_piid=#{id} order by pd_pdno
   </select>
 
-
+  <delete id="deleteByFK" parameterType="java.lang.Long">
+    delete from prodiodetail
+    where pd_piid = #{id,jdbcType=INTEGER}
+  </delete>
 
 </mapper>

+ 6 - 6
applications/storage/storage-server/src/main/resources/mapper/ProdInOutListMapper.xml

@@ -1,7 +1,7 @@
 <?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.storage.mapper.ProdInOutListMapper">
-  <resultMap id="BaseResultMap" type="com.usoftchina.saas.storage.po.ProdInOutList">
+<mapper namespace="com.usoftchina.saas.purchase.mapper.ProdInOutListMapper">
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.purchase.po.ProdInOutList">
     <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" />
@@ -73,7 +73,7 @@
 
 
   <select id="selectProdInOutListByCondition"  resultMap="BaseResultMap">
-    select  *  from prodinout left join prodiodetail on pi_id=pd_piid
+    select  *  from prodinout left join prodiodetail on pi_id = pd_piid
     <where>
       <if test="con != null">
         ${con}
@@ -85,16 +85,16 @@
   </select>
 
   <select id="selectProdInOutBycondition"  resultMap="BaseResultMap">
-    select  *  from prodinout left join prodiodetail on pi_id=pd_piid
+    select  *  from prodinout
     <where>
       <if test="con != null">
         ${con}
       </if>
       <if test="companyId != null">
-        and   prodinout.companyid = #{companyId}
+        and  companyid = #{companyId}
       </if>
     </where>
-    order by pi_id,pd_pdno
+    order by pi_id
   </select>
 
 

+ 87 - 26
applications/storage/storage-server/src/main/resources/mapper/ProdInOutMapper.xml

@@ -1,6 +1,6 @@
 <?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.storage.mapper.ProdInOutMapper">
+<mapper namespace="com.usoftchina.saas.purchase.mapper.ProdInOutMapper">
   <resultMap id="BaseResultMap" type="com.usoftchina.saas.storage.po.ProdInOut">
     <id column="pi_id" jdbcType="INTEGER" property="id" />
     <result column="pi_inoutno" jdbcType="VARCHAR" property="pi_inoutno" />
@@ -39,6 +39,9 @@
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.storage.po.ProdInOut">
     <result column="pi_address" jdbcType="LONGVARCHAR" property="pi_address" />
   </resultMap>
+
+
+
   <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, 
@@ -48,7 +51,6 @@
   <sql id="Blob_Column_List">
     pi_address
   </sql>
-
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
     select 
     <include refid="Base_Column_List" />
@@ -62,30 +64,6 @@
     where pi_id = #{pi_id,jdbcType=INTEGER}
   </delete>
 
-  <insert id="insert" parameterType="com.usoftchina.saas.storage.po.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.po.ProdInOut">
     <selectKey resultType="java.lang.Long" keyProperty="id">
       SELECT LAST_INSERT_ID() AS ID
@@ -376,5 +354,88 @@
     </set>
     where pi_id = #{id,jdbcType=INTEGER}
   </update>
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.saas.storage.po.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.po.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>
+
+  <select id="validateCodeWhenInsert"  resultType="int">
+    select count(1) from prodinout where pi_inoutno = #{pi_inoutno} and companyid = #{companyId}
+  </select>
+  <select id="validateCodeWhenUpdate" resultType="int" >
+    select count(1) from prodinout where pi_inoutno = #{pi_inoutno} and pi_id != #{id} and companyid != #{companyId}
+  </select>
+
+  <select id="selectCodeById" resultType="string" parameterType="long">
+    select pi_inoutno from prodinout where pi_id=#{id}
+  </select>
+
+
+
+
 
 </mapper>

+ 7 - 0
frontend/saas-web/app/model/document/productDTO.js

@@ -0,0 +1,7 @@
+Ext.define('saas.model.document.ProductDTO', {
+    extend: 'saas.model.Base',
+    fields: [
+        { name: 'pr_detail', type: 'string' },
+        { name: 'pr_unit', type: 'string' }
+    ]
+});

+ 25 - 9
frontend/saas-web/app/view/core/baseform/FormPanel.js → frontend/saas-web/app/view/core/base/BasePanel.js

@@ -1,20 +1,20 @@
-Ext.define('saas.view.core.baseform.FormPanel', {
+Ext.define('saas.view.core.base.BasePanel', {
     extend: 'Ext.form.Panel',
-    xtype: 'core-baseform-formpanel',
-    controller: 'core-baseform-formpanel',
-    viewModel: 'core-baseform-formpanel',
+    xtype: 'core-base-basepanel',
+    
+    controller: 'core-base-basepanel',
+    viewModel: 'core-base-basepanel',
 
     //工具类
     FormUtil: Ext.create('saas.util.FormUtil'),
     BaseUtil: Ext.create('saas.util.BaseUtil'),
 
     //基础属性
-    layout: 'column',
     autoScroll: true,
     border: 1,
     bodyPadding: 5,
-    searchField:[],
-
+    layout: 'fit',
+    
     fieldDefaults: {
         margin: '0 5 5 0',
         labelAlign: 'right',
@@ -22,10 +22,18 @@ Ext.define('saas.view.core.baseform.FormPanel', {
         columnWidth: 0.25,
         blankText: '该字段不能为空'
     },
+    
+    searchField:[],
+    gridColumns: [],
 
     initComponent: function() {
 
-        var me = this;
+        var me = this,
+        gridConfig = me.gridConfig,
+        gridDataUrl = gridConfig.dataUrl,
+        gridIdField = gridConfig.idField,
+        gridCodeField = gridConfig.codeField,
+        gridColumns = gridConfig.columns;
 
         Ext.apply(me, {
             dockedItems: [{
@@ -40,8 +48,16 @@ Ext.define('saas.view.core.baseform.FormPanel', {
                     text: '查询',
                     handler: 'query'
                 }])
+            }],
+            items: [{
+                layout: 'fit',
+                xtype: 'core-base-gridpanel',
+                dataUrl: gridDataUrl,
+                idField: gridIdField,
+                codeField: gridCodeField,
+                columns: gridColumns
             }]
         });
         me.callParent(arguments);
-    }
+    },
 });

+ 3 - 3
frontend/saas-web/app/view/core/baseform/FormPanelController.js → frontend/saas-web/app/view/core/base/BasePanelController.js

@@ -1,13 +1,13 @@
-Ext.define('saas.view.core.baseform.FormPanelController', {
+Ext.define('saas.view.core.base.BasePanelController', {
     extend: 'Ext.app.ViewController',
-    alias: 'controller.core-baseform-formpanel',
+    alias: 'controller.core-base-basepanel',
 
     BaseUtil: Ext.create('saas.util.BaseUtil'),
     FormUtil: Ext.create('saas.util.FormUtil'),
 
     query: function() {
         var form = this.view;
-        var grid = this.view.down('[name=baseGrid]');
+        var grid = form.down('core-baseform-gridpanel');
         grid.condition = '';
         var fields = form.searchField.map(f => f.name);
         var items = [];

+ 4 - 0
frontend/saas-web/app/view/core/base/BasePanelModel.js

@@ -0,0 +1,4 @@
+Ext.define('saas.view.core.base.BasePanelModel', {
+    extend: 'Ext.app.ViewModel',
+    alias: 'viewmodel.core-base-basepanel',
+});

+ 7 - 7
frontend/saas-web/app/view/core/baseform/GridPanel.js → frontend/saas-web/app/view/core/base/GridPanel.js

@@ -1,17 +1,17 @@
-Ext.define('saas.view.core.baseform.GridPanel', {
+Ext.define('saas.view.core.base.GridPanel', {
     extend: 'Ext.grid.Panel',
-    xtype: 'core-baseform-gridpanel',
-    BaseUtil: Ext.create('saas.util.BaseUtil'),
-    dataUrl: '',
-    dbSearchFields: [],
-    condition:'',
+    xtype: 'core-base-gridpanel',
 
     selModel: {
         checkOnly:true,
         type:'checkboxmodel',
         mode : "MULTI" ,
         ignoreRightMouseSelection : false
-	},
+    },
+    
+    dataUrl: '',
+    dbSearchFields: [],
+    condition:'',
 
     initComponent: function() {
         var me = this;

+ 0 - 4
frontend/saas-web/app/view/core/baseform/FormPanelModel.js

@@ -1,4 +0,0 @@
-Ext.define('saas.view.core.baseform.FormPanelModel', {
-    extend: 'Ext.app.ViewModel',
-    alias: 'viewmodel.core-baseform-formpanel',
-});

+ 16 - 0
frontend/saas-web/app/view/document/bom/BasePanel.js

@@ -0,0 +1,16 @@
+Ext.define('saas.view.document.bom.BasePanel', {
+    extend: 'saas.view.core.base.BasePanel',
+    xtype: 'document-bom-basepanel',
+
+    controller: 'document-bom-basepanel',
+    viewModel: 'document-bom-basepanel',
+
+    //字段属性
+    _title:'BOM资料',
+    _dataUrl:basePath + 'document/vendor/getVendorsByCondition',
+    _saveUrl:basePath + 'document/vendor/save',
+    _deleteUrl:basePath + 'document/vendor/delete',
+
+
+
+});

+ 10 - 0
frontend/saas-web/app/view/document/bom/BasePanelController.js

@@ -0,0 +1,10 @@
+Ext.define('saas.view.document.bom.BasePanelController', {
+    extend: 'saas.view.core.base.BasePanelController',
+    alias: 'controller.document-bom-basepanel',
+    
+    init: function (form) {
+        var me = this;
+        this.control({
+        });
+    }
+});

+ 4 - 0
frontend/saas-web/app/view/document/bom/BasePanelModel.js

@@ -0,0 +1,4 @@
+Ext.define('saas.view.document.bom.BasePanelModel', {
+    extend: 'saas.view.core.base.BasePanelModel',
+    alias: 'viewmodel.document-bom-basepanel'
+});

+ 92 - 0
frontend/saas-web/app/view/document/customer/BasePanel.js

@@ -0,0 +1,92 @@
+Ext.define('saas.view.document.customer.BasePanel', {
+    extend: 'saas.view.core.base.BasePanel',
+    xtype: 'document-customer-basepanel',
+
+    controller: 'document-customer-basepanel',
+    viewModel: 'document-customer-basepanel',
+
+    searchField:[{
+        xtype : "remotecombo", 
+        storeUrl:basePath+'ducument/customerkind/getCombo',
+        name : "cu_type", 
+        emptyText : "请选择客户类型", 
+        allowBlank : true, 
+        queryMode: 'local',
+        displayField: 'display',
+        valueField: 'value',
+        columnWidth : 0.25,
+        etc:{
+            customerkind:{
+                keyField:'id',
+                dataField:'ck_name',
+                reqUrl:basePath+'ducument/customerkind/save',
+                delUrl:basePath+'ducument/customerkind/delete'
+            }
+        },
+        addHandler:function(b){
+            var form = this.ownerCmp.ownerCt.ownerCt;
+            this.dialog = form.getController().getView().add({
+                xtype: 'document-kind-childwin',
+                bind: {
+                    title: '新增客户类型'
+                },
+                dataKind:'customerkind',
+                belong:this.ownerCmp.etc['customerkind'],
+                _parent:form,
+                record:null,
+                session: true
+            });
+            this.dialog.show();
+        }  
+    }],
+
+    //字段属性
+    _formXtype:'document-customer-formpanel',
+    _title:'客户资料',
+    // _dataUrl:basePath+'ducument/customer/list',
+    _batchOpenUrl:basePath+'ducument/customer/batchOpen',
+    _batchCloseUrl:basePath+'ducument/customer/batchClose',
+    _batchDeleteUrl:basePath+'ducument/customer/batchDelete',
+
+    gridConfig: {
+        idField: 'id',
+        codeField: 'cu_code',
+        dataUrl: basePath+'ducument/customer/list',
+        columns : [{
+            text : "客户id", 
+            width : 0, 
+            dataIndex : "id", 
+            xtype : "numbercolumn", 
+        },{
+            text : "客户编号", 
+            width : 200.0, 
+            dataIndex : "cu_code", 
+        }, 
+        {
+            text : "客户名称", 
+            dataIndex : "cu_name", 
+            width : 120.0, 
+        }, 
+        {
+            text : "客户状态", 
+            dataIndex : "cu_status", 
+            width : 120.0, 
+        }, 
+        {
+            text : "客户UU", 
+            dataIndex : "cu_uu", 
+            width : 120.0, 
+        }, 
+        {
+            text : "默认客户地址", 
+            dataIndex : "ca_address", 
+            width : 120.0, 
+        }, 
+        {
+            text : "默认客户联系人", 
+            dataIndex : "cc_name", 
+            flex : 1.0, 
+        }]
+    },
+
+});

+ 10 - 0
frontend/saas-web/app/view/document/customer/BasePanelController.js

@@ -0,0 +1,10 @@
+Ext.define('saas.view.document.customer.BasePanelController', {
+    extend: 'saas.view.core.base.BasePanelController',
+    alias: 'controller.document-customer-basepanel',
+
+    init: function (form) {
+        var me = this;
+        this.control({
+        });
+    }
+});

+ 4 - 0
frontend/saas-web/app/view/document/customer/BasePanelModel.js

@@ -0,0 +1,4 @@
+Ext.define('saas.view.document.customer.BasePanelModel', {
+    extend: 'saas.view.core.base.BasePanelModel',
+    alias: 'viewmodel.document-customer-basepanel'
+});

+ 3 - 2
frontend/saas-web/app/view/document/customer/panel/FormController.js → frontend/saas-web/app/view/document/customer/FormController.js

@@ -1,6 +1,7 @@
-Ext.define('saas.view.document.customer.panel.FormController', {
+Ext.define('saas.view.document.customer.FormController', {
     extend: 'saas.view.core.form.FormPanelController',
-    alias: 'controller.customer-panel-formpanel',
+    alias: 'controller.document-customer-formpanel',
+    
     init: function (form) {
         var me = this;
         this.control({});

+ 6 - 0
frontend/saas-web/app/view/document/customer/FormModel.js

@@ -0,0 +1,6 @@
+Ext.define('saas.view.document.customer.FormModel', {
+    extend: 'saas.view.core.form.FormPanelModel',
+    alias: 'viewmodel.document-customer-formpanel',
+
+    
+});

+ 4 - 4
frontend/saas-web/app/view/document/customer/panel/FormPanel.js → frontend/saas-web/app/view/document/customer/FormPanel.js

@@ -1,9 +1,9 @@
-Ext.define('saas.view.document.customer.panel.FormPanel', {
+Ext.define('saas.view.document.customer.FormPanel', {
     extend: 'saas.view.core.form.FormPanel',
-    xtype: 'customer-panel-formpanel',
+    xtype: 'document-customer-formpanel',
 
-    controller: 'customer-panel-formpanel',
-    viewModel: 'customer-panel-formpanel',
+    controller: 'document-customer-formpanel',
+    viewModel: 'document-customer-formpanel',
     
     caller:'Customer',
 

+ 0 - 112
frontend/saas-web/app/view/document/customer/list/FormPanel.js

@@ -1,112 +0,0 @@
-Ext.define('saas.view.document.customer.list.FormPanel', {
-    extend: 'saas.view.core.baseform.FormPanel',
-    xtype: 'customer-list-formpanel',
-    controller: 'customer-list-formpanel',
-    viewModel: 'customer-list-formpanel',
-
-    fieldDefaults: {
-        margin: '0 5 5 0',
-        labelAlign: 'right',
-        labelWidth: 90,
-        blankText: '该字段不能为空'
-    },
-
-    searchField:[{
-        xtype : "remotecombo", 
-        storeUrl:basePath+'ducument/customerkind/getCombo',
-        name : "cu_type", 
-        emptyText : "请选择客户类型", 
-        allowBlank : true, 
-        queryMode: 'local',
-        displayField: 'display',
-        valueField: 'value',
-        columnWidth : 0.25,
-        etc:{
-            customerkind:{
-                keyField:'id',
-                dataField:'ck_name',
-                reqUrl:basePath+'ducument/customerkind/save',
-                delUrl:basePath+'ducument/customerkind/delete'
-            }
-        },
-        addHandler:function(b){
-            var form = this.ownerCmp.ownerCt.ownerCt;
-            this.dialog = form.getController().getView().add({
-                xtype: 'document-kind-childwin',
-                bind: {
-                    title: '新增客户类型'
-                },
-                dataKind:'customerkind',
-                belong:this.ownerCmp.etc['customerkind'],
-                _parent:form,
-                record:null,
-                session: true
-            });
-            this.dialog.show();
-        }  
-    }],
-
-    //字段属性
-    _formXtype:'customer-panel-formpanel',
-    _title:'客户资料',
-    _dataUrl:basePath+'ducument/customer/list',
-    _batchOpenUrl:basePath+'ducument/customer/batchOpen',
-    _batchCloseUrl:basePath+'ducument/customer/batchClose',
-    _batchDeleteUrl:basePath+'ducument/customer/batchDelete',
-
-    initComponent: function () {
-        var me = this;
-        Ext.apply(me, {
-            items: [{
-                idField: 'id',
-                codeField: 'cu_code',
-                name : "baseGrid", 
-                xtype : "core-baseform-gridpanel", 
-                layout:'fit',
-                dataUrl:me._dataUrl,
-                columns : [{
-                    text : "客户id", 
-                    width : 0, 
-                    dataIndex : "id", 
-                    xtype : "numbercolumn", 
-                },{
-                    text : "客户编号", 
-                    width : 200.0, 
-                    dataIndex : "cu_code", 
-                    xtype : "", 
-                }, 
-                {
-                    text : "客户名称", 
-                    dataIndex : "cu_name", 
-                    width : 120.0, 
-                    xtype : "", 
-                }, 
-                {
-                    text : "客户状态", 
-                    dataIndex : "cu_status", 
-                    width : 120.0, 
-                    xtype : ""
-                }, 
-                {
-                    text : "客户UU", 
-                    dataIndex : "cu_uu", 
-                    width : 120.0, 
-                    xtype : "",
-                }, 
-                {
-                    text : "默认客户地址", 
-                    dataIndex : "ca_address", 
-                    width : 120.0, 
-                    xtype : "",
-                }, 
-                {
-                    text : "默认客户联系人", 
-                    dataIndex : "cc_name", 
-                    flex : 1.0, 
-                    xtype : "",
-                }]
-            }]
-        });
-        me.callParent(arguments);
-    }
-});

+ 0 - 11
frontend/saas-web/app/view/document/customer/list/FormPanelController.js

@@ -1,11 +0,0 @@
-Ext.define('saas.view.document.customer.list.FormPanelController', {
-    extend: 'saas.view.core.baseform.FormPanelController',
-    BaseUtil: Ext.create('saas.util.BaseUtil'),
-    FormUtil: Ext.create('saas.util.FormUtil'),
-    alias: 'controller.customer-list-formpanel',
-    init: function (form) {
-        var me = this;
-        this.control({
-        });
-    }
-});

+ 0 - 4
frontend/saas-web/app/view/document/customer/list/FormPanelModel.js

@@ -1,4 +0,0 @@
-Ext.define('saas.view.document.customer.list.FormPanelModel', {
-    extend: 'saas.view.core.baseform.FormPanelModel',
-    alias: 'viewmodel.customer-list-formpanel'
-});

+ 0 - 6
frontend/saas-web/app/view/document/customer/panel/FormModel.js

@@ -1,6 +0,0 @@
-Ext.define('saas.view.document.customer.panel.FormModel', {
-    extend: 'saas.view.core.form.FormPanelModel',
-    alias: 'viewmodel.customer-panel-formpanel',
-
-    
-});

+ 86 - 0
frontend/saas-web/app/view/document/product/BasePanel.js

@@ -0,0 +1,86 @@
+Ext.define('saas.view.document.product.BasePanel', {
+    extend: 'saas.view.core.base.BasePanel',
+    xtype: 'document-product-basepanel',
+
+    controller: 'document-product-basepanel',
+    viewModel: 'document-product-basepanel',
+
+    searchField:[{
+        xtype : "remotecombo", 
+        storeUrl: basePath + 'document/producttype/getCombo',
+        name : "pr_type", 
+        emptyText : "请选择物料类型", 
+        allowBlank : true, 
+        queryMode: 'local',
+        displayField: 'display',
+        valueField: 'value',
+        columnWidth : 0.25,
+        etc:{
+            producttype:{
+                keyField:'id',
+                dataField:'pr_name',
+                reqUrl:basePath + 'document/producttype/save',
+                delUrl:basePath + 'document/producttype/delete'
+            }
+        },
+        addHandler:function(b){
+            var form = this.ownerCmp.ownerCt.ownerCt;
+            this.dialog = form.getController().getView().add({
+                xtype: 'document-kind-childwin',
+                bind: {
+                    title: '新增物料类型'
+                },
+                dataKind:'producttype',
+                belong:this.ownerCmp.etc['producttype'],
+                _parent:form,
+                record:null,
+                session: true
+            });
+            this.dialog.show();
+        }  
+    }],
+
+    //字段属性
+    _formXtype:'document-product-formpanel',
+    _title:'物料资料',
+    // _dataUrl: basePath + 'document/product/list',
+    _batchOpenUrl: basePath + 'document/product/batchOpen',
+    _batchCloseUrl: basePath + 'document/product/batchClose',
+    _batchDeleteUrl: basePath + 'document/product/batchDelete',
+
+    gridConfig: {
+        idField: 'id',
+        codeField: 'pr_code',
+        dataUrl: basePath + 'document/product/list',
+        columns : [{
+            text : "id", 
+            width : 0, 
+            dataIndex : "id", 
+            xtype : "numbercolumn", 
+        },{
+            text : "物料编号", 
+            width : 200.0, 
+            dataIndex : "pr_code", 
+            xtype : "", 
+        }, 
+        {
+            text : "物料名称", 
+            dataIndex : "pr_detail", 
+            width : 120.0, 
+            xtype : "", 
+        }, 
+        {
+            text : "状态", 
+            dataIndex : "pr_status", 
+            width : 120.0, 
+            xtype : ""
+        }, 
+        {
+            text : "物料种类", 
+            dataIndex : "pr_type", 
+            width : 120.0, 
+            xtype : "",
+        }]
+    },
+
+});

+ 10 - 0
frontend/saas-web/app/view/document/product/BasePanelController.js

@@ -0,0 +1,10 @@
+Ext.define('saas.view.document.product.BasePanelController', {
+    extend: 'saas.view.core.base.BasePanelController',
+    alias: 'controller.document-product-basepanel',
+
+    init: function (form) {
+        var me = this;
+        this.control({
+        });
+    }
+});

+ 4 - 0
frontend/saas-web/app/view/document/product/BasePanelModel.js

@@ -0,0 +1,4 @@
+Ext.define('saas.view.document.product.BasePanelModel', {
+    extend: 'saas.view.core.base.BasePanelModel',
+    alias: 'viewmodel.document-product-basepanel'
+});

+ 2 - 2
frontend/saas-web/app/view/document/product/panel/FormController.js → frontend/saas-web/app/view/document/product/FormController.js

@@ -1,6 +1,6 @@
-Ext.define('saas.view.document.product.panel.FormController', {
+Ext.define('saas.view.document.product.FormController', {
     extend: 'saas.view.core.form.FormPanelController',
-    alias: 'controller.product-panel-formpanel',
+    alias: 'controller.document-product-formpanel',
     init: function (form) {
         var me = this;
         this.control({

+ 6 - 0
frontend/saas-web/app/view/document/product/FormModel.js

@@ -0,0 +1,6 @@
+Ext.define('saas.view.document.product.FormModel', {
+    extend: 'saas.view.core.form.FormPanelModel',
+    alias: 'viewmodel.document-product-formpanel',
+
+    
+});

+ 4 - 4
frontend/saas-web/app/view/document/product/panel/FormPanel.js → frontend/saas-web/app/view/document/product/FormPanel.js

@@ -1,9 +1,9 @@
-Ext.define('saas.view.document.product.panel.FormPanel', {
+Ext.define('saas.view.document.product.FormPanel', {
     extend: 'saas.view.core.form.FormPanel',
-    xtype: 'product-panel-formpanel',
+    xtype: 'document-product-formpanel',
 
-    controller: 'product-panel-formpanel',
-    viewModel: 'product-panel-formpanel',
+    controller: 'document-product-formpanel',
+    viewModel: 'document-product-formpanel',
     
     caller:'Product',
 

+ 0 - 109
frontend/saas-web/app/view/document/product/list/FormPanel.js

@@ -1,109 +0,0 @@
-Ext.define('saas.view.document.product.list.FormPanel', {
-    extend: 'saas.view.core.baseform.FormPanel',
-    xtype: 'product-list-formpanel',
-    controller: 'product-list-formpanel',
-    viewModel: 'product-list-formpanel',
-
-    //工具类
-    FormUtil: Ext.create('saas.util.FormUtil'),
-    BaseUtil: Ext.create('saas.util.BaseUtil'),
-
-    //基础属性
-    layout: 'fit',
-    autoScroll: true,
-    border: 1,
-
-    fieldDefaults: {
-        margin: '0 5 5 0',
-        labelAlign: 'right',
-        labelWidth: 90,
-        blankText: '该字段不能为空'
-    },
-
-    searchField:[{
-        xtype : "remotecombo", 
-        storeUrl: basePath + 'document/producttype/getCombo',
-        name : "pr_type", 
-        emptyText : "请选择物料类型", 
-        allowBlank : true, 
-        queryMode: 'local',
-        displayField: 'display',
-        valueField: 'value',
-        columnWidth : 0.25,
-        etc:{
-            producttype:{
-                keyField:'id',
-                dataField:'pr_name',
-                reqUrl:basePath + 'document/producttype/save',
-                delUrl:basePath + 'document/producttype/delete'
-            }
-        },
-        addHandler:function(b){
-            var form = this.ownerCmp.ownerCt.ownerCt;
-            this.dialog = form.getController().getView().add({
-                xtype: 'document-kind-childwin',
-                bind: {
-                    title: '新增物料类型'
-                },
-                dataKind:'producttype',
-                belong:this.ownerCmp.etc['producttype'],
-                _parent:form,
-                record:null,
-                session: true
-            });
-            this.dialog.show();
-        }  
-    }],
-
-    //字段属性
-    _formXtype:'product-panel-formpanel',
-    _title:'物料资料',
-    _dataUrl:basePath + 'document/product/list',
-    _batchOpenUrl:basePath + 'document/product/batchOpen',
-    _batchCloseUrl:basePath + 'document/product/batchClose',
-    _batchDeleteUrl:basePath + 'document/product/batchDelete',
-
-    initComponent: function () {
-        var me = this;
-        Ext.apply(me, {
-            items: [{
-                idField: 'id',
-                codeField: 'pr_code',
-                name : "baseGrid", 
-                xtype : "core-baseform-gridpanel", 
-                layout:'fit',
-                dataUrl:me._dataUrl,
-                columns : [{
-                    text : "id", 
-                    width : 0, 
-                    dataIndex : "id", 
-                    xtype : "numbercolumn", 
-                },{
-                    text : "物料编号", 
-                    width : 200.0, 
-                    dataIndex : "pr_code", 
-                    xtype : "", 
-                }, 
-                {
-                    text : "物料名称", 
-                    dataIndex : "pr_detail", 
-                    width : 120.0, 
-                    xtype : "", 
-                }, 
-                {
-                    text : "状态", 
-                    dataIndex : "pr_status", 
-                    width : 120.0, 
-                    xtype : ""
-                }, 
-                {
-                    text : "物料种类", 
-                    dataIndex : "pr_type", 
-                    width : 120.0, 
-                    xtype : "",
-                }]
-            }]
-        });
-        me.callParent(arguments);
-    }
-});

+ 0 - 11
frontend/saas-web/app/view/document/product/list/FormPanelController.js

@@ -1,11 +0,0 @@
-Ext.define('saas.view.document.product.list.FormPanelController', {
-    extend: 'saas.view.core.baseform.FormPanelController',
-    BaseUtil: Ext.create('saas.util.BaseUtil'),
-    FormUtil: Ext.create('saas.util.FormUtil'),
-    alias: 'controller.product-list-formpanel',
-    init: function (form) {
-        var me = this;
-        this.control({
-        });
-    }
-});

+ 0 - 4
frontend/saas-web/app/view/document/product/list/FormPanelModel.js

@@ -1,4 +0,0 @@
-Ext.define('saas.view.document.product.list.FormPanelModel', {
-    extend: 'saas.view.core.baseform.FormPanelModel',
-    alias: 'viewmodel.product-list-formpanel'
-});

+ 0 - 6
frontend/saas-web/app/view/document/product/panel/FormModel.js

@@ -1,6 +0,0 @@
-Ext.define('saas.view.document.product.panel.FormModel', {
-    extend: 'saas.view.core.form.FormPanelModel',
-    alias: 'viewmodel.product-panel-formpanel',
-
-    
-});

+ 91 - 0
frontend/saas-web/app/view/document/vendor/BasePanel.js

@@ -0,0 +1,91 @@
+Ext.define('saas.view.document.vendor.BasePanel', {
+    extend: 'saas.view.core.base.BasePanel',
+    xtype: 'document-vendor-basepanel',
+    controller: 'document-vendor-basepanel',
+    viewModel: 'document-vendor-basepanel',
+
+    searchField:[{
+        xtype : "remotecombo", 
+        storeUrl:basePath+'ducument/vendorkind/getCombo',
+        name : "ve_type", 
+        emptyText : "请选择供应商类型", 
+        allowBlank : true, 
+        queryMode: 'local',
+        displayField: 'display',
+        valueField: 'value',
+        columnWidth : 0.25,
+        etc:{
+            vendorkind:{
+                keyField:'id',
+                dataField:'vk_name',
+                reqUrl:basePath+'ducument/vendorkind/save',
+                delUrl:basePath+'ducument/vendorkind/delete'
+            }
+        },
+        addHandler:function(b){
+            var form = this.ownerCmp.ownerCt.ownerCt;
+            this.dialog = form.getController().getView().add({
+                xtype: 'document-kind-childwin',
+                bind: {
+                    title: '新增供应商类型'
+                },
+                dataKind:'vendorkind',
+                belong:this.ownerCmp.etc['vendorkind'],
+                _parent:form,
+                record:null,
+                session: true
+            });
+            this.dialog.show();
+        }  
+    }],
+
+    //字段属性
+    _formXtype:'document-vendor-formpanel',
+    _title:'供应商资料',
+    // _dataUrl:basePath+'ducument/vendor/list',
+    _deleteUrl:basePath+'ducument/vendor/delete/',
+    _batchOpenUrl:basePath+'ducument/vendor/batchOpen',
+    _batchCloseUrl:basePath+'ducument/vendor/batchClose',
+    _batchDeleteUrl:basePath+'ducument/vendor/batchDelete',
+
+    gridConfig: {
+        idField: 'id',
+        codeField: 've_code',
+        dataUrl: basePath+'ducument/vendor/list',
+        columns : [{
+            text : "供应商id", 
+            width : 0, 
+            dataIndex : "id", 
+            xtype : "numbercolumn", 
+        },{
+            text : "供应商编号", 
+            width : 200.0, 
+            dataIndex : "ve_code", 
+            xtype : "", 
+        }, 
+        {
+            text : "供应商名称", 
+            dataIndex : "ve_name", 
+            width : 120.0, 
+            xtype : "", 
+        }, 
+        {
+            text : "供应商状态", 
+            dataIndex : "ve_status", 
+            width : 120.0, 
+            xtype : ""
+        }, 
+        {
+            text : "供应商UU", 
+            dataIndex : "ve_uu", 
+            width : 120.0, 
+            xtype : "",
+        }, 
+        {
+            text : "默认供应商联系人", 
+            dataIndex : "vc_name", 
+            flex : 1.0, 
+            xtype : "",
+        }]
+    },
+});

+ 10 - 0
frontend/saas-web/app/view/document/vendor/BasePanelController.js

@@ -0,0 +1,10 @@
+Ext.define('saas.view.document.vendor.BasePanelController', {
+    extend: 'saas.view.core.base.BasePanelController',
+    alias: 'controller.document-vendor-basepanel',
+
+    init: function (form) {
+        var me = this;
+        this.control({
+        });
+    }
+});

+ 4 - 0
frontend/saas-web/app/view/document/vendor/BasePanelModel.js

@@ -0,0 +1,4 @@
+Ext.define('saas.view.document.vendor.BasePanelModel', {
+    extend: 'saas.view.core.base.BasePanelModel',
+    alias: 'viewmodel.document-vendor-basepanel'
+});

+ 2 - 2
frontend/saas-web/app/view/document/vendor/panel/FormController.js → frontend/saas-web/app/view/document/vendor/FormController.js

@@ -1,6 +1,6 @@
-Ext.define('saas.view.document.vendor.panel.FormController', {
+Ext.define('saas.view.document.vendor.FormController', {
     extend: 'saas.view.core.form.FormPanelController',
-    alias: 'controller.vendor-panel-formpanel',
+    alias: 'controller.document-vendor-formpanel',
     init: function (form) {
         var me = this;
         this.control({});

+ 6 - 0
frontend/saas-web/app/view/document/vendor/FormModel.js

@@ -0,0 +1,6 @@
+Ext.define('saas.view.document.vendor.FormModel', {
+    extend: 'saas.view.core.form.FormPanelModel',
+    alias: 'viewmodel.document-vendor-formpanel',
+
+    
+});

+ 4 - 4
frontend/saas-web/app/view/document/vendor/panel/FormPanel.js → frontend/saas-web/app/view/document/vendor/FormPanel.js

@@ -1,9 +1,9 @@
-Ext.define('saas.view.document.vendor.panel.FormPanel', {
+Ext.define('saas.view.document.vendor.FormPanel', {
     extend: 'saas.view.core.form.FormPanel',
-    xtype: 'vendor-panel-formpanel',
+    xtype: 'document-vendor-formpanel',
 
-    controller: 'vendor-panel-formpanel',
-    viewModel: 'vendor-panel-formpanel',
+    controller: 'document-vendor-formpanel',
+    viewModel: 'document-vendor-formpanel',
     
     caller:'Vendor',
 

+ 0 - 116
frontend/saas-web/app/view/document/vendor/list/FormPanel.js

@@ -1,116 +0,0 @@
-Ext.define('saas.view.document.vendor.list.FormPanel', {
-    extend: 'saas.view.core.baseform.FormPanel',
-    xtype: 'vendor-list-formpanel',
-    controller: 'vendor-list-formpanel',
-    viewModel: 'vendor-list-formpanel',
-
-    //工具类
-    FormUtil: Ext.create('saas.util.FormUtil'),
-    BaseUtil: Ext.create('saas.util.BaseUtil'),
-
-    //基础属性
-    layout: 'fit',
-    autoScroll: true,
-    border: 1,
-
-    fieldDefaults: {
-        margin: '0 5 5 0',
-        labelAlign: 'right',
-        labelWidth: 90,
-        blankText: '该字段不能为空'
-    },
-
-    searchField:[{
-        xtype : "remotecombo", 
-        storeUrl:basePath+'ducument/vendorkind/getCombo',
-        name : "ve_type", 
-        emptyText : "请选择供应商类型", 
-        allowBlank : true, 
-        queryMode: 'local',
-        displayField: 'display',
-        valueField: 'value',
-        columnWidth : 0.25,
-        etc:{
-            vendorkind:{
-                keyField:'id',
-                dataField:'vk_name',
-                reqUrl:basePath+'ducument/vendorkind/save',
-                delUrl:basePath+'ducument/vendorkind/delete'
-            }
-        },
-        addHandler:function(b){
-            var form = this.ownerCmp.ownerCt.ownerCt;
-            this.dialog = form.getController().getView().add({
-                xtype: 'document-kind-childwin',
-                bind: {
-                    title: '新增供应商类型'
-                },
-                dataKind:'vendorkind',
-                belong:this.ownerCmp.etc['vendorkind'],
-                _parent:form,
-                record:null,
-                session: true
-            });
-            this.dialog.show();
-        }  
-    }],
-
-    //字段属性
-    _formXtype:'vendor-panel-formpanel',
-    _title:'供应商资料',
-    _dataUrl:basePath+'ducument/vendor/list',
-    _deleteUrl:basePath+'ducument/vendor/delete/',
-    _batchOpenUrl:basePath+'ducument/vendor/batchOpen',
-    _batchCloseUrl:basePath+'ducument/vendor/batchClose',
-    _batchDeleteUrl:basePath+'ducument/vendor/batchDelete',
-
-    initComponent: function () {
-        var me = this;
-        Ext.apply(me, {
-            items: [{
-                idField: 'id',
-                codeField: 've_code',
-                name : "baseGrid", 
-                xtype : "core-baseform-gridpanel", 
-                layout:'fit',
-                dataUrl:me._dataUrl,
-                columns : [{
-                    text : "供应商id", 
-                    width : 0, 
-                    dataIndex : "id", 
-                    xtype : "numbercolumn", 
-                },{
-                    text : "供应商编号", 
-                    width : 200.0, 
-                    dataIndex : "ve_code", 
-                    xtype : "", 
-                }, 
-                {
-                    text : "供应商名称", 
-                    dataIndex : "ve_name", 
-                    width : 120.0, 
-                    xtype : "", 
-                }, 
-                {
-                    text : "供应商状态", 
-                    dataIndex : "ve_status", 
-                    width : 120.0, 
-                    xtype : ""
-                }, 
-                {
-                    text : "供应商UU", 
-                    dataIndex : "ve_uu", 
-                    width : 120.0, 
-                    xtype : "",
-                }, 
-                {
-                    text : "默认供应商联系人", 
-                    dataIndex : "vc_name", 
-                    flex : 1.0, 
-                    xtype : "",
-                }]
-            }]
-        });
-        me.callParent(arguments);
-    }
-});

+ 0 - 11
frontend/saas-web/app/view/document/vendor/list/FormPanelController.js

@@ -1,11 +0,0 @@
-Ext.define('saas.view.document.vendor.list.FormPanelController', {
-    extend: 'saas.view.core.baseform.FormPanelController',
-    BaseUtil: Ext.create('saas.util.BaseUtil'),
-    FormUtil: Ext.create('saas.util.FormUtil'),
-    alias: 'controller.vendor-list-formpanel',
-    init: function (form) {
-        var me = this;
-        this.control({
-        });
-    }
-});

+ 0 - 4
frontend/saas-web/app/view/document/vendor/list/FormPanelModel.js

@@ -1,4 +0,0 @@
-Ext.define('saas.view.document.vendor.list.FormPanelModel', {
-    extend: 'saas.view.core.baseform.FormPanelModel',
-    alias: 'viewmodel.vendor-list-formpanel'
-});

+ 0 - 6
frontend/saas-web/app/view/document/vendor/panel/FormModel.js

@@ -1,6 +0,0 @@
-Ext.define('saas.view.document.vendor.panel.FormModel', {
-    extend: 'saas.view.core.form.FormPanelModel',
-    alias: 'viewmodel.vendor-panel-formpanel',
-
-    
-});

+ 1 - 1
frontend/saas-web/app/view/money/payBalance/FormPanelController.js

@@ -9,7 +9,7 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         //数据接口
-                        dataUrl: 'http://192.168.253.31:9480/customer/list',
+                        dataUrl: basePath + 'document/customer/list',
                         //赋值 
                         dbfinds:[{
                             from: 'id', to: 'rb_custid'

+ 1 - 1
frontend/saas-web/app/view/money/payBalance/QueryPanelController.js

@@ -61,7 +61,7 @@ Ext.define('saas.view.money.paybalance.QueryPanelController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         conditionCode:'pr_code',
-                        dataUrl:basePath + 'document/product/getProductsByCondition',
+                        dataUrl:basePath + 'document/product/list',
                         dbfinds:[{
                             from:'pr_code',to:'pd_prodcode',
                         }, {

+ 2 - 2
frontend/saas-web/app/view/money/recBalance/FormPanelController.js

@@ -9,7 +9,7 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         //数据接口
-                        dataUrl: 'http://192.168.253.31:9480/customer/list',
+                        dataUrl: basePath + 'document/customer/list',
                         //赋值 
                         dbfinds:[{
                             from: 'id', to: 'rb_custid'
@@ -64,7 +64,7 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         //数据接口
-                        dataUrl: 'http://192.168.253.31:9480/customer/list',
+                        dataUrl: basePath + 'document/customer/list',
                         //赋值 
                         dbfinds:[{
                             from: 'id', to: 'rb_custid'

+ 2 - 2
frontend/saas-web/app/view/money/recBalance/QueryPanelController.js

@@ -9,7 +9,7 @@ Ext.define('saas.view.money.recBalance.QueryPanelController', {
             'dbfindtrigger[name=pu_vendname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:'http://192.168.253.41:9480/api/document/vendor/list',
+                        dataUrl: basePath + 'document/vendor/list',
                         dbfinds:[{
                             from:'ve_code',to:'pu_vendcode'
                         },{
@@ -61,7 +61,7 @@ Ext.define('saas.view.money.recBalance.QueryPanelController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         conditionCode:'pr_code',
-                        dataUrl:'http://192.168.253.41:9480/api/document/product/getProductsByCondition',
+                        dataUrl: basePath + 'document/product/list',
                         dbfinds:[{
                             from:'pr_code',to:'pd_prodcode',
                         }, {

+ 3 - 3
frontend/saas-web/app/view/purchase/purchase/FormPanelController.js

@@ -70,7 +70,7 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         //数据接口
-                        dataUrl:basePath+'document/product/getProductsByCondition',
+                        dataUrl: basePath + 'document/product/list',
                         //放大镜赋值设置
                         dbfinds:[{
                             from:'pr_code',to:'pd_prodcode'
@@ -132,7 +132,7 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         //数据接口
-                        dataUrl:'http://192.168.253.31:9480/product/getProductsByCondition',
+                        dataUrl: basePath + 'document/product/list',
                         //放大镜赋值设置
                         dbfinds:[{
                             from:'pr_code',to:'pd_prodcode'
@@ -198,7 +198,7 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
         id = form.getForm().findField(form._idField);
         form.BaseUtil.request({
             url: form._turnInUrl+id.value,
-            method: 'GET',
+            method: 'POST',
         })
         .then(function(localJson) {
             if(localJson.success){

+ 1 - 1
frontend/saas-web/app/view/purchase/purchase/QueryPanelController.js

@@ -61,7 +61,7 @@ Ext.define('saas.view.purchase.purchase.QueryPanelController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         conditionCode:'pr_code',
-                        dataUrl:basePath+'document/product/getProductsByCondition',
+                        dataUrl:basePath+'document/product/list',
                         dbfinds:[{
                             from:'pr_code',to:'pd_prodcode',
                         }, {

+ 26 - 7
frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js

@@ -19,10 +19,20 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
     _readUrl:basePath+'purchase/prodinout/read/',
     _saveUrl:basePath+'purchase/prodinout/save',
     _auditUrl:basePath+'purchase/prodinout/audit',
-    _deleteUrl:basePath+'purchase/prodinout/delete/',
     _deleteDetailUrl:basePath+'purchase/prodinout/deleteItem/',
     _baseVastUrl:basePath+'purchase/prodinout/',
     _turnOutUrl:basePath+'purchase/prodinout/turnProdOut/',
+
+    // _relationColumn: 'pd_piid',
+    // _readUrl:'http://localhost:8800/prodinout/read/',
+    // _saveUrl:'http://localhost:8800/prodinout/save',
+    // _auditUrl:'http://localhost:8800/prodinout/audit',
+    // _deleteUrl:'http://localhost:8800/prodinout/delete/',
+    // _baseVastUrl:'http://localhost:8800/prodinout/',
+    // _turnOutUrl:'http://localhost:8800/prodinout/turnProdOut/',
+
+
+
     initId:0,
 
     toolBtns: [{
@@ -102,7 +112,9 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
     }, {
         name : "detailGridField", 
         xtype : "detailGridField",
-        storeModel:'saas.model.document.Product', 
+        storeModel:'saas.model.document.ProductDTO',
+        _deleteDetailUrl:'http://localhost:8800/prodinout/deleteItem/',
+        // _deleteUrl:basePath+'purchase/prodinout/delete/',
         detnoColumn:  'pd_pdno',
         columns : [
             {
@@ -112,8 +124,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
             },{
                 text : "物料id", 
                 dataIndex : "pd_prodid", 
-                xtype : "numbercolumn",
-                hidden:true
+                xtype : "numbercolumn"
             },
             {
                 text : "物料编号", 
@@ -140,7 +151,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
                 dataIndex : "pr_detail",
                 ignore:true,
                 renderer: function (v, m, r) {
-                    return r.data["product"]?r.data["product"][m.column.dataIndex]:v;
+                    return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:'';
                 }
             },
             {
@@ -148,7 +159,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
                 dataIndex : "pr_spec",
                 ignore:true,
                 renderer: function (v, m, r) {
-                    return r.data["product"]?r.data["product"][m.column.dataIndex]:v;
+                    return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:'';
                 }
             },
             {
@@ -173,7 +184,15 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
                 format:'0',
                 items : null,
                 summaryType: 'sum'
-            }, 
+            },{
+                text : "仓库id", 
+                dataIndex : "pd_whid", 
+                xtype : "numbercolumn"
+            },
+            {
+                text : "仓库编号", 
+                dataIndex : "pd_whcode"
+            },
             {
                 text : "仓库", 
                 dataIndex : "pd_whname", 

+ 55 - 6
frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js

@@ -12,11 +12,15 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                 }
             },
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=pu_vendcode]':{
+            'dbfindtrigger[name=pu_vendname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:basePath+'document/vendor/list',
+
+                        // dataUrl:basePath+'document/vendor/getVendorsByCondition',
+                        dataUrl:'http://localhost:9480/vendor/list',
                         dbfinds:[{
+                            from:'ve_id',to:'pi_vendid'
+                        },{
                             from:'ve_code',to:'pu_vendcode'
                         },{
                             from:'ve_name',to:'pu_vendname'
@@ -66,10 +70,10 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
             'dbfindtrigger[name=pd_prodcode]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        conditionCode:'pr_code',
-                        dataUrl:basePath+'document/product/getProductsByCondition',
+                        // dataUrl:basePath+'document/product/list',
+                        dataUrl:'http://localhost:9480/product/list',
                         dbfinds:[{
-                            from:'pr_id',to:'pd_prodid'                          
+                            from:'id',to:'pd_prodid'                          
                         },{
                             from:'pr_code',to:'pd_prodcode'                          
                         },{
@@ -121,8 +125,53 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                         }]
                     }) ;   
 
+                }
+            },
+
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pd_whname]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        // dataUrl:basePath+'document/warehouse/list',
+                        dataUrl:'http://localhost:9480/warehouse/list',
+                        dbfinds:[{
+                            from:'id',to:'pd_whid'                          
+                        },{
+                            from:'wh_code',to:'pd_whcode'                          
+                        },{
+                            from:'wh_description',to:'pd_whname'
+                        }],
+                        dbtpls:[{
+                            field:'pd_whcode',width:100
+                        },{
+                            field:'pd_whname',width:100
+                        }],
+                        dbColumns:[{
+                            "text": "仓库ID",
+                            "flex": 0,
+                            "dataIndex": "id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "仓库编号",
+                            "flex": 1,
+                            "dataIndex": "wh_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "仓库名称",
+                            "flex": 1,
+                            "dataIndex": "wh_description",
+                            "xtype": "",
+                            "items": null
+                        }, ]
+                    }) ;   
+
                 }
             }
+
         });
 
     },
@@ -156,7 +205,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
         id = form.getForm().findField(form._idField);
         form.BaseUtil.request({
             url: form._turnOutUrl+id.value,
-            method: 'GET',
+            method: 'POST',
         })
         .then(function(localJson) {
             if(localJson.success){

+ 2 - 1
frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js

@@ -106,7 +106,8 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
         codeField:'pi_inoutno',
         addTitle:'采购验收单',
         addXtype:'purchase-purchasein-formpanel',
-        defaultCondition:' pi_class = 采购验收单',
+        defaultCondition:' pi_class = \'采购验收单\'',
+        // baseVastUrl:basePath+'purchase/prodinout/',
         baseVastUrl:"http://localhost:8800/prodinout/",
         baseColumn: [{
             text: 'id',

+ 1 - 1
frontend/saas-web/app/view/purchase/purchaseIn/QueryPanelController.js

@@ -61,7 +61,7 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanelController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         conditionCode:'pr_code',
-                        dataUrl:basePath+'document/product/getProductsByCondition',
+                        dataUrl:basePath+'document/product/list',
                         dbfinds:[{
                             from:'pr_code',to:'pd_prodcode',
                             from:'pr_unit',to:'pd_unit'

+ 77 - 37
frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js

@@ -4,22 +4,35 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
 
     controller: 'purchase-purchaseout-formpanel',
     viewModel: 'purchase-purchaseout-formpanel',
-    
+
+    viewName: 'purchase-purchaseout-formpanel',
     caller:'PurchaseOut',
     
-    //字段属性
+     //字段属性
     _title:'采购验退单',
     _idField: 'id',
     _codeField: 'pi_inoutno',
     _statusField: 'pi_status',
     _statusCodeField: 'pi_statuscode',
     
+    // _relationColumn: 'pd_piid',
+    // _readUrl:basePath+'purchase/prodinout/read/',
+    // _saveUrl:basePath+'purchase/prodinout/save',
+    // _auditUrl:basePath+'purchase/prodinout/audit',
+    // _deleteDetailUrl:basePath+'purchase/prodinout/deleteItem/',
+    // _baseVastUrl:basePath+'purchase/prodinout/',
+    // _turnOutUrl:basePath+'purchase/prodinout/turnProdOut/',
+
     _relationColumn: 'pd_piid',
-    _readUrl:basePath+'purchase/prodinout/read/',
-    _saveUrl:basePath+'purchase/prodinout/save',
-    _auditUrl:basePath+'purchase/prodinout/audit',
-    _deleteUrl:basePath+'purchase/prodinout/delete/',
-    _deleteDetailUrl:basePath+'purchase/prodinout/deleteItem/',
+    _readUrl:'http://localhost:8800/prodinout/read/',
+    _saveUrl:'http://localhost:8800/prodinout/save',
+    _auditUrl:'http://localhost:8800/prodinout/audit',
+    _deleteUrl:'http://localhost:8800/prodinout/delete/',
+    _baseVastUrl:'http://localhost:8800/prodinout/',
+    _turnOutUrl:'http://localhost:8800/prodinout/turnProdOut/',
+
+
+
     initId:0,
 
     toolBtns: [],
@@ -35,7 +48,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
         xtype : "textfield", 
         name : "pi_inoutno", 
         bind : "{pi_inoutno}", 
-        fieldLabel : "验退单号", 
+        fieldLabel : "验单号", 
         allowBlank : true, 
         columnWidth : 0.25
     },{
@@ -53,21 +66,16 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
         fieldLabel : "供应商ID", 
         allowBlank : true, 
         columnWidth : 0.0
+    },{
+        xtype: 'hidden',
+        name: 'pu_vendcode',
+        bind: '{pu_vendcode}',
+        fieldLabel: '供应商编号'
     }, {
-        xtype : "textfield", 
-        name : "pi_vendcode", 
-        bind : "{pi_vendcode}", 
-        fieldLabel : "供应商编号", 
-        hidden:true,
-        allowBlank : true, 
-        columnWidth : 0, 
-    }, {
-        xtype : "dbfindtrigger", 
-        name : "pi_vendname", 
-        bind : "{pi_vendname}", 
-        fieldLabel : "供应商名称", 
-        allowBlank : true, 
-        columnWidth : 0.25
+        xtype: 'dbfindtrigger',
+        name: 'pu_vendname',
+        bind: '{pu_vendname}',
+        fieldLabel: '供应商名称'
     },{
         xtype : "datefield", 
         name : "pi_date", 
@@ -84,7 +92,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
         readOnly: true,
         columnWidth : 0.25
     }, {
-        xtype : "textfield", 
+        xtype : "hidden", 
         name : "pi_puid", 
         bind : "{pi_puid}", 
         fieldLabel : "采购单id", 
@@ -97,16 +105,22 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
         fieldLabel : "采购单号", 
         allowBlank : true, 
         columnWidth : 0.25
-    },{
+    }, {
         name : "detailGridField", 
-        xtype : "detailGridField", 
-        storeModel:'saas.model.purchase.ProdIODetail', 
-        detnoColumn:  'pd_pdno',
+        xtype : "detailGridField",
+        storeModel:'saas.model.document.ProductDTO',
+        _deleteDetailUrl:'http://localhost:8800/prodinout/deleteItem/',
+        // _deleteUrl:basePath+'purchase/prodinout/delete/',
+        _detnoColumn:  'pd_pdno',
         columns : [
             {
                 text : "id", 
                 dataIndex : "id", 
                 xtype : "numbercolumn"
+            },{
+                text : "物料id", 
+                dataIndex : "pd_prodid", 
+                xtype : "numbercolumn"
             },
             {
                 text : "物料编号", 
@@ -131,16 +145,22 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
             {
                 text : "名称", 
                 dataIndex : "pr_detail",
-                ignore:true
+                ignore:true,
+                renderer: function (v, m, r) {
+                    return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:'';
+                }
             },
             {
                 text : "规格", 
                 dataIndex : "pr_spec",
-                ignore:true
-            }, 
+                ignore:true,
+                renderer: function (v, m, r) {
+                    return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:'';
+                }
+            },
             {
-                text : "验退数量", 
-                dataIndex : "pd_outqty", 
+                text : "数量", 
+                dataIndex : "pd_inqty", 
                 editor : {
                     xtype : "numberfield"
                 },
@@ -149,6 +169,25 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
                 format:'0',
                 items : null,
                 summaryType: 'sum'
+            },            {
+                text : "已转数", 
+                dataIndex : "pd_yqty", 
+                editor : {
+                    xtype : "numberfield"
+                },
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                format:'0',
+                items : null,
+                summaryType: 'sum'
+            },{
+                text : "仓库id", 
+                dataIndex : "pd_whid", 
+                xtype : "numbercolumn"
+            },
+            {
+                text : "仓库编号", 
+                dataIndex : "pd_whcode"
             }, 
             {
                 text : "仓库", 
@@ -193,6 +232,12 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
                 dataIndex : "pd_nettotal", 
                 xtype : "numbercolumn"
             },
+            {
+                text : "采购单明细id", 
+                dataIndex : "pd_orderid", 
+                width : 120.0,
+                hidden:true
+            },
             {
                 text : "采购单号", 
                 dataIndex : "pd_ordercode", 
@@ -202,11 +247,6 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
                 dataIndex : "pd_orderdetno", 
                 xtype : "numbercolumn",
                 flex:1
-            }, {
-                text : "出入库明细id", 
-                dataIndex : "pd_ioid", 
-                width : 120.0,
-                hidden:true
             }
         ]
     }, {

+ 59 - 5
frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js

@@ -1,6 +1,7 @@
 Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
     extend: 'saas.view.core.form.FormPanelController',
     alias: 'controller.purchase-purchaseout-formpanel',
+    
     init: function (form) {
         var me = this;
         this.control({
@@ -11,11 +12,15 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
                 }
             },
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=pu_vendcode]':{
+            'dbfindtrigger[name=pu_vendname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:basePath+'document/vendor/list',
+
+                        // dataUrl:basePath+'document/vendor/getVendorsByCondition',
+                        dataUrl:'http://localhost:9480/vendor/list',
                         dbfinds:[{
+                            from:'ve_id',to:'pi_vendid'
+                        },{
                             from:'ve_code',to:'pu_vendcode'
                         },{
                             from:'ve_name',to:'pu_vendname'
@@ -65,10 +70,10 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
             'dbfindtrigger[name=pd_prodcode]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        conditionCode:'pr_code',
-                        dataUrl:basePath+'document/product/getProductsByCondition',
+                        // dataUrl:basePath+'document/product/list',
+                        dataUrl:'http://localhost:9480/product/list',
                         dbfinds:[{
-                            from:'pr_id',to:'pd_prodid'                          
+                            from:'id',to:'pd_prodid'                          
                         },{
                             from:'pr_code',to:'pd_prodcode'                          
                         },{
@@ -120,8 +125,57 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
                         }]
                     }) ;   
 
+                }
+            },
+
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pd_whname]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        // dataUrl:basePath+'document/warehouse/list',
+                        dataUrl:'http://localhost:9480/warehouse/list',
+                        dbfinds:[{
+                            from:'id',to:'pd_whid'                          
+                        },{
+                            from:'wh_code',to:'pd_whcode'                          
+                        },{
+                            from:'wh_description',to:'pd_whname'
+                        }],
+                        dbtpls:[{
+                            field:'pd_whcode',width:100
+                        },{
+                            field:'pd_whname',width:100
+                        }],
+                        dbColumns:[{
+                            "text": "仓库ID",
+                            "flex": 0,
+                            "dataIndex": "id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "仓库编号",
+                            "flex": 1,
+                            "dataIndex": "wh_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "仓库名称",
+                            "flex": 1,
+                            "dataIndex": "wh_description",
+                            "xtype": "",
+                            "items": null
+                        }, ]
+                    }) ;   
+
                 }
             }
+
+
+
+
+
         });
 
     },

+ 1 - 0
frontend/saas-web/app/view/purchase/purchaseOut/FormPanelModel.js

@@ -1,6 +1,7 @@
 Ext.define('saas.view.purchase.purchaseOut.FormPanelModel', {
     extend: 'saas.view.core.form.FormPanelModel',
     alias: 'viewmodel.purchase-purchaseout-formpanel',
+    
     data: {
         pi_class: '采购验退单'
      }

+ 10 - 14
frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js

@@ -48,18 +48,13 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
         name: 'pd_prodcode',
         bind: '{pd_prodcode}',
         fieldLabel: '物料编号',
-        fieldMode: 'DETAIL',
-        queryType:'VAG',
-        hidden:true,
-        allowBlank: true,
-        columnWidth: 0.25
+        showDetail: true
     }, {
-        xtype: 'dbfindtrigger',
-        name: 'pr_detail#pd_prodcode',
+        xtype: 'textfield',
+        name: 'pr_detail',
         bind: '{pr_detail}',
         fieldLabel: '物料名称',
-        allowBlank: true,
-        columnWidth: 0.25
+        showDetail: true
     }, {
         xtype: 'combobox',
         name: 'pi_statuscode',
@@ -73,7 +68,7 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
         store: Ext.create('Ext.data.ArrayStore', {
             fields: ['pi_statuscode', 'pi_status'],
             data: [
-                ["$ALL", "全部"],
+                ["ALL", "全部"],
                 ["AUDITED", "已审核"],
                 ["UNAUDITED", "未审核"]
             ]
@@ -112,7 +107,8 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
         addTitle:'采购验退单',
         addXtype:'purchase-purchaseout-formpanel',
         defaultCondition:' pi_class = \'采购验退单\'',
-        baseVastUrl:basePath+'purchase/prodinout/',
+        // baseVastUrl:basePath+'purchase/prodinout/',
+        baseVastUrl:"http://localhost:8800/prodinout/",
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',
@@ -126,7 +122,7 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
             text: '单据状态',
             dataIndex: 'pi_status',
             width: 120
-        },{
+        }, {
             text: '单据类型',
             dataIndex: 'pi_class',
             width: 120
@@ -191,8 +187,8 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
             dataIndex: 'pd_prodcode',
             width: 120
         },{
-            text: '验退数量',
-            dataIndex: 'pd_outqty',
+            text: '验数量',
+            dataIndex: 'pd_inqty',
             xtype:'numbercolumn',
             width: 120
         },{

+ 1 - 1
frontend/saas-web/app/view/purchase/purchaseOut/QueryPanelController.js

@@ -61,7 +61,7 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanelController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         conditionCode:'pr_code',
-                        dataUrl:basePath+'document/product/getProductsByCondition',
+                        dataUrl:basePath+'document/product/list',
                         dbfinds:[{
                             from:'pr_code',to:'pd_prodcode',
                             from:'pr_unit',to:'pd_unit'

+ 1 - 0
frontend/saas-web/app/view/purchase/purchaseOut/QueryPanelModel.js

@@ -1,4 +1,5 @@
 Ext.define('saas.view.purchase.purchaseOut.QueryPanelModel', {
     extend: 'saas.view.core.query.QueryPanelModel',
     alias: 'viewmodel.purchase-purchaseout-querypanel'
+
 });

+ 1 - 1
frontend/saas-web/app/view/sale/sale/FormPanelController.js

@@ -62,7 +62,7 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         conditionCode:'pr_code',
-                        dataUrl:basePath+'document/product/getProductsByCondition',
+                        dataUrl:basePath+'document/product/list',
                         dbfinds:[
                         {
                             from:'pr_code',to:'sd_prodcode'

+ 1 - 1
frontend/saas-web/app/view/sale/sale/QueryPanelController.js

@@ -62,7 +62,7 @@ Ext.define('saas.view.sale.sale.QueryPanelController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         conditionCode:'pr_code',
-                        dataUrl:basePath+'document/product/getProductsByCondition',
+                        dataUrl:basePath+'document/product/list',
                         dbfinds:[{
                             from:'pr_code',to:'sd_prodcode',
                             from:'pr_detail',to:'pr_detail'

+ 1 - 1
frontend/saas-web/app/view/sale/saleIn/FormPanelController.js

@@ -63,7 +63,7 @@ Ext.define('saas.view.sale.saleIn.FormPanelController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         conditionCode:'pr_code',
-                        dataUrl:basePath+'document/product/getProductsByCondition',
+                        dataUrl:basePath+'document/product/list',
                         dbfinds:[
                         {
                             from:'id',to:'pd_prodid'

+ 1 - 1
frontend/saas-web/app/view/sale/saleIn/QueryPanelController.js

@@ -64,7 +64,7 @@ Ext.define('saas.view.sale.saleIn.QueryPanelController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         conditionCode:'pr_code',
-                        dataUrl:basePath+'document/product/getProductsByCondition',
+                        dataUrl:basePath+'document/product/list',
                         dbfinds:[{
                             from:'pr_code',to:'pd_prodcode'
                         }, {

+ 1 - 1
frontend/saas-web/app/view/sale/saleOut/FormPanelController.js

@@ -64,7 +64,7 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         conditionCode:'pr_code',
-                        dataUrl:basePath+'document/product/getProductsByCondition',
+                        dataUrl:basePath+'document/product/list',
                         dbfinds:[
                         {
                             from:'id',to:'pd_prodid'

+ 1 - 1
frontend/saas-web/app/view/sale/saleOut/QueryPanelController.js

@@ -65,7 +65,7 @@ Ext.define('saas.view.sale.saleout.QueryPanelController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         conditionCode:'pr_code',
-                        dataUrl:basePath+'document/product/getProductsByCondition',
+                        dataUrl:basePath+'document/product/list',
                         dbfinds:[{
                             from:'pr_code',to:'pd_prodcode'
                         }, {

Некоторые файлы не были показаны из-за большого количества измененных файлов