Bläddra i källkod

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

chenw 7 år sedan
förälder
incheckning
9874fcdfcd
57 ändrade filer med 3522 tillägg och 254 borttagningar
  1. 15 0
      applications/commons/commons-api/pom.xml
  2. 21 0
      applications/commons/commons-dto/pom.xml
  3. 1 1
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/dto/BatchDealBaseDTO.java
  4. 1 1
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/dto/ComboDTO.java
  5. 1 1
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/dto/DocBaseDTO.java
  6. 1 1
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/dto/DocReqDTO.java
  7. 1 1
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/dto/DocSavedDTO.java
  8. 1 1
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/dto/ProductBaseDTO.java
  9. 35 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/Maxnumbers.java
  10. 771 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/MaxnumbersExample.java
  11. 47 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/Maxnumbersdetail.java
  12. 761 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/MaxnumbersdetailExample.java
  13. 73 0
      applications/commons/commons-server/pom.xml
  14. 23 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/CommonsApplication.java
  15. 19 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/CommonsController.java
  16. 33 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/MaxnumbersMapper.java
  17. 32 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/MaxnumbersdetailMapper.java
  18. 61 0
      applications/commons/commons-server/src/main/resources/application.yml
  19. BIN
      applications/commons/commons-server/src/main/resources/auth/pub.key
  20. 64 0
      applications/commons/commons-server/src/main/resources/logback-spring.xml
  21. 276 0
      applications/commons/commons-server/src/main/resources/mapper/MaxnumbersMapper.xml
  22. 276 0
      applications/commons/commons-server/src/main/resources/mapper/MaxnumbersdetailMapper.xml
  23. 6 7
      applications/commons/pom.xml
  24. 2 1
      applications/document/document-server/pom.xml
  25. 3 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductController.java
  26. 2 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/VendorController.java
  27. 3 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProductMapper.java
  28. 3 3
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/VendorMapper.java
  29. 3 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/Impl/ProductServiceImpl.java
  30. 2 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/Impl/VendorServiceImpl.java
  31. 3 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProductService.java
  32. 2 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/VendorService.java
  33. 2 1
      applications/purchase/purchase-server/pom.xml
  34. 3 2
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/PurchaseController.java
  35. 2 1
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/PurchaseMapper.java
  36. 3 2
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/PurchaseService.java
  37. 4 3
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  38. 2 2
      applications/purchase/purchase-server/src/main/resources/mapper/PurchaseListMapper.xml
  39. 2 2
      applications/purchase/purchase-server/src/main/resources/mapper/PurchaseMapper.xml
  40. 1 1
      applications/purchase/purchase-server/src/main/resources/mapper/PurchasedetailMapper.xml
  41. 10 1
      frontend/saas-web/app/util/FormUtil.js
  42. 5 4
      frontend/saas-web/app/view/core/form/FormPanel.js
  43. 17 7
      frontend/saas-web/app/view/core/form/FormPanelController.js
  44. 2 1
      frontend/saas-web/app/view/core/form/FormPanelModel.js
  45. 11 1
      frontend/saas-web/app/view/main/MainModel.js
  46. 62 46
      frontend/saas-web/app/view/purchase/purchase/FormPanel.js
  47. 1 1
      frontend/saas-web/app/view/purchase/purchase/QueryPanel.js
  48. 1 5
      frontend/saas-web/app/view/purchase/purchase/QueryPanelModel.js
  49. 56 85
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js
  50. 57 56
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js
  51. 1 5
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanelModel.js
  52. 147 0
      frontend/saas-web/app/view/purchase/purchaseOut/FormController.js
  53. 7 0
      frontend/saas-web/app/view/purchase/purchaseOut/FormModel.js
  54. 246 0
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js
  55. 219 0
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js
  56. 115 0
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanelController.js
  57. 4 0
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanelModel.js

+ 15 - 0
applications/commons/commons-api/pom.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>commons</artifactId>
+        <groupId>com.usoftchina.saas</groupId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>commons-api</artifactId>
+
+
+</project>

+ 21 - 0
applications/commons/commons-dto/pom.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>commons</artifactId>
+        <groupId>com.usoftchina.saas</groupId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>commoms-dto</artifactId>
+    <dependencies>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>core</artifactId>
+        </dependency>
+    </dependencies>
+
+
+</project>

+ 1 - 1
applications/commons/src/main/java/com/usoftchina/saas/common/dto/BatchDealBaseDTO.java → applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/dto/BatchDealBaseDTO.java

@@ -1,4 +1,4 @@
-package com.usoftchina.saas.common.dto;
+package com.usoftchina.saas.commons.dto;
 
 import java.io.Serializable;
 import java.util.List;

+ 1 - 1
applications/commons/src/main/java/com/usoftchina/saas/common/dto/ComboDTO.java → applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/dto/ComboDTO.java

@@ -1,4 +1,4 @@
-package com.usoftchina.saas.common.dto;
+package com.usoftchina.saas.commons.dto;
 
 import java.io.Serializable;
 

+ 1 - 1
applications/commons/src/main/java/com/usoftchina/saas/common/dto/DocBaseDTO.java → applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/dto/DocBaseDTO.java

@@ -1,4 +1,4 @@
-package com.usoftchina.saas.common.dto;
+package com.usoftchina.saas.commons.dto;
 
 import java.io.Serializable;
 

+ 1 - 1
applications/commons/src/main/java/com/usoftchina/saas/common/dto/DocReqDTO.java → applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/dto/DocReqDTO.java

@@ -1,4 +1,4 @@
-package com.usoftchina.saas.common.dto;
+package com.usoftchina.saas.commons.dto;
 
 
 /**

+ 1 - 1
applications/commons/src/main/java/com/usoftchina/saas/common/dto/DocSavedDTO.java → applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/dto/DocSavedDTO.java

@@ -1,4 +1,4 @@
-package com.usoftchina.saas.common.dto;
+package com.usoftchina.saas.commons.dto;
 
 import java.io.Serializable;
 

+ 1 - 1
applications/commons/src/main/java/com/usoftchina/saas/common/dto/ProductBaseDTO.java → applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/dto/ProductBaseDTO.java

@@ -1,4 +1,4 @@
-package com.usoftchina.saas.common.dto;
+package com.usoftchina.saas.commons.dto;
 
 import java.io.Serializable;
 

+ 35 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/Maxnumbers.java

@@ -0,0 +1,35 @@
+package com.usoftchina.saas.commons.po;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+
+public class Maxnumbers extends CommonBaseEntity{
+    private String mn_caller;
+
+    private String mn_leadcode;
+
+    private String mn_number;
+
+    public String getMn_caller() {
+        return mn_caller;
+    }
+
+    public void setMn_caller(String mn_caller) {
+        this.mn_caller = mn_caller == null ? null : mn_caller.trim();
+    }
+
+    public String getMn_leadcode() {
+        return mn_leadcode;
+    }
+
+    public void setMn_leadcode(String mn_leadcode) {
+        this.mn_leadcode = mn_leadcode == null ? null : mn_leadcode.trim();
+    }
+
+    public String getMn_number() {
+        return mn_number;
+    }
+
+    public void setMn_number(String mn_number) {
+        this.mn_number = mn_number == null ? null : mn_number.trim();
+    }
+}

+ 771 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/MaxnumbersExample.java

@@ -0,0 +1,771 @@
+package com.usoftchina.saas.commons.po;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class MaxnumbersExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public MaxnumbersExample() {
+        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 andMn_idIsNull() {
+            addCriterion("mn_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_idIsNotNull() {
+            addCriterion("mn_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_idEqualTo(Integer value) {
+            addCriterion("mn_id =", value, "mn_id");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_idNotEqualTo(Integer value) {
+            addCriterion("mn_id <>", value, "mn_id");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_idGreaterThan(Integer value) {
+            addCriterion("mn_id >", value, "mn_id");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_idGreaterThanOrEqualTo(Integer value) {
+            addCriterion("mn_id >=", value, "mn_id");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_idLessThan(Integer value) {
+            addCriterion("mn_id <", value, "mn_id");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_idLessThanOrEqualTo(Integer value) {
+            addCriterion("mn_id <=", value, "mn_id");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_idIn(List<Integer> values) {
+            addCriterion("mn_id in", values, "mn_id");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_idNotIn(List<Integer> values) {
+            addCriterion("mn_id not in", values, "mn_id");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_idBetween(Integer value1, Integer value2) {
+            addCriterion("mn_id between", value1, value2, "mn_id");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_idNotBetween(Integer value1, Integer value2) {
+            addCriterion("mn_id not between", value1, value2, "mn_id");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_callerIsNull() {
+            addCriterion("mn_caller is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_callerIsNotNull() {
+            addCriterion("mn_caller is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_callerEqualTo(String value) {
+            addCriterion("mn_caller =", value, "mn_caller");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_callerNotEqualTo(String value) {
+            addCriterion("mn_caller <>", value, "mn_caller");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_callerGreaterThan(String value) {
+            addCriterion("mn_caller >", value, "mn_caller");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_callerGreaterThanOrEqualTo(String value) {
+            addCriterion("mn_caller >=", value, "mn_caller");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_callerLessThan(String value) {
+            addCriterion("mn_caller <", value, "mn_caller");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_callerLessThanOrEqualTo(String value) {
+            addCriterion("mn_caller <=", value, "mn_caller");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_callerLike(String value) {
+            addCriterion("mn_caller like", value, "mn_caller");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_callerNotLike(String value) {
+            addCriterion("mn_caller not like", value, "mn_caller");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_callerIn(List<String> values) {
+            addCriterion("mn_caller in", values, "mn_caller");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_callerNotIn(List<String> values) {
+            addCriterion("mn_caller not in", values, "mn_caller");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_callerBetween(String value1, String value2) {
+            addCriterion("mn_caller between", value1, value2, "mn_caller");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_callerNotBetween(String value1, String value2) {
+            addCriterion("mn_caller not between", value1, value2, "mn_caller");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_leadcodeIsNull() {
+            addCriterion("mn_leadcode is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_leadcodeIsNotNull() {
+            addCriterion("mn_leadcode is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_leadcodeEqualTo(String value) {
+            addCriterion("mn_leadcode =", value, "mn_leadcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_leadcodeNotEqualTo(String value) {
+            addCriterion("mn_leadcode <>", value, "mn_leadcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_leadcodeGreaterThan(String value) {
+            addCriterion("mn_leadcode >", value, "mn_leadcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_leadcodeGreaterThanOrEqualTo(String value) {
+            addCriterion("mn_leadcode >=", value, "mn_leadcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_leadcodeLessThan(String value) {
+            addCriterion("mn_leadcode <", value, "mn_leadcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_leadcodeLessThanOrEqualTo(String value) {
+            addCriterion("mn_leadcode <=", value, "mn_leadcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_leadcodeLike(String value) {
+            addCriterion("mn_leadcode like", value, "mn_leadcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_leadcodeNotLike(String value) {
+            addCriterion("mn_leadcode not like", value, "mn_leadcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_leadcodeIn(List<String> values) {
+            addCriterion("mn_leadcode in", values, "mn_leadcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_leadcodeNotIn(List<String> values) {
+            addCriterion("mn_leadcode not in", values, "mn_leadcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_leadcodeBetween(String value1, String value2) {
+            addCriterion("mn_leadcode between", value1, value2, "mn_leadcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_leadcodeNotBetween(String value1, String value2) {
+            addCriterion("mn_leadcode not between", value1, value2, "mn_leadcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_numberIsNull() {
+            addCriterion("mn_number is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_numberIsNotNull() {
+            addCriterion("mn_number is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_numberEqualTo(String value) {
+            addCriterion("mn_number =", value, "mn_number");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_numberNotEqualTo(String value) {
+            addCriterion("mn_number <>", value, "mn_number");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_numberGreaterThan(String value) {
+            addCriterion("mn_number >", value, "mn_number");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_numberGreaterThanOrEqualTo(String value) {
+            addCriterion("mn_number >=", value, "mn_number");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_numberLessThan(String value) {
+            addCriterion("mn_number <", value, "mn_number");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_numberLessThanOrEqualTo(String value) {
+            addCriterion("mn_number <=", value, "mn_number");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_numberLike(String value) {
+            addCriterion("mn_number like", value, "mn_number");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_numberNotLike(String value) {
+            addCriterion("mn_number not like", value, "mn_number");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_numberIn(List<String> values) {
+            addCriterion("mn_number in", values, "mn_number");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_numberNotIn(List<String> values) {
+            addCriterion("mn_number not in", values, "mn_number");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_numberBetween(String value1, String value2) {
+            addCriterion("mn_number between", value1, value2, "mn_number");
+            return (Criteria) this;
+        }
+
+        public Criteria andMn_numberNotBetween(String value1, String value2) {
+            addCriterion("mn_number not between", value1, value2, "mn_number");
+            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 andCreateTimeIsNull() {
+            addCriterion("createTime is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNotNull() {
+            addCriterion("createTime is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeEqualTo(Date value) {
+            addCriterion("createTime =", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotEqualTo(Date value) {
+            addCriterion("createTime <>", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThan(Date value) {
+            addCriterion("createTime >", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("createTime >=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThan(Date value) {
+            addCriterion("createTime <", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("createTime <=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIn(List<Date> values) {
+            addCriterion("createTime in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotIn(List<Date> values) {
+            addCriterion("createTime not in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeBetween(Date value1, Date value2) {
+            addCriterion("createTime between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("createTime not between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatorIdIsNull() {
+            addCriterion("creatorId is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatorIdIsNotNull() {
+            addCriterion("creatorId is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatorIdEqualTo(Integer value) {
+            addCriterion("creatorId =", value, "creatorId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatorIdNotEqualTo(Integer value) {
+            addCriterion("creatorId <>", value, "creatorId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatorIdGreaterThan(Integer value) {
+            addCriterion("creatorId >", value, "creatorId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatorIdGreaterThanOrEqualTo(Integer value) {
+            addCriterion("creatorId >=", value, "creatorId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatorIdLessThan(Integer value) {
+            addCriterion("creatorId <", value, "creatorId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatorIdLessThanOrEqualTo(Integer value) {
+            addCriterion("creatorId <=", value, "creatorId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatorIdIn(List<Integer> values) {
+            addCriterion("creatorId in", values, "creatorId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatorIdNotIn(List<Integer> values) {
+            addCriterion("creatorId not in", values, "creatorId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatorIdBetween(Integer value1, Integer value2) {
+            addCriterion("creatorId between", value1, value2, "creatorId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatorIdNotBetween(Integer value1, Integer value2) {
+            addCriterion("creatorId not between", value1, value2, "creatorId");
+            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 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 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);
+        }
+    }
+}

+ 47 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/Maxnumbersdetail.java

@@ -0,0 +1,47 @@
+package com.usoftchina.saas.commons.po;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+
+import java.util.Date;
+
+public class Maxnumbersdetail extends CommonBaseEntity{
+    private String md_caller;
+
+    private String md_leadcode;
+
+    private Integer md_maxno;
+
+    private Integer companyId;
+
+    private Date createTime;
+
+    private Integer creatorId;
+
+    private Date updateTime;
+
+    private Integer updaterId;
+
+    public String getMd_caller() {
+        return md_caller;
+    }
+
+    public void setMd_caller(String md_caller) {
+        this.md_caller = md_caller == null ? null : md_caller.trim();
+    }
+
+    public String getMd_leadcode() {
+        return md_leadcode;
+    }
+
+    public void setMd_leadcode(String md_leadcode) {
+        this.md_leadcode = md_leadcode == null ? null : md_leadcode.trim();
+    }
+
+    public Integer getMd_maxno() {
+        return md_maxno;
+    }
+
+    public void setMd_maxno(Integer md_maxno) {
+        this.md_maxno = md_maxno;
+    }
+}

+ 761 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/MaxnumbersdetailExample.java

@@ -0,0 +1,761 @@
+package com.usoftchina.saas.commons.po;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class MaxnumbersdetailExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public MaxnumbersdetailExample() {
+        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 andMd_idIsNull() {
+            addCriterion("md_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_idIsNotNull() {
+            addCriterion("md_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_idEqualTo(Integer value) {
+            addCriterion("md_id =", value, "md_id");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_idNotEqualTo(Integer value) {
+            addCriterion("md_id <>", value, "md_id");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_idGreaterThan(Integer value) {
+            addCriterion("md_id >", value, "md_id");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_idGreaterThanOrEqualTo(Integer value) {
+            addCriterion("md_id >=", value, "md_id");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_idLessThan(Integer value) {
+            addCriterion("md_id <", value, "md_id");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_idLessThanOrEqualTo(Integer value) {
+            addCriterion("md_id <=", value, "md_id");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_idIn(List<Integer> values) {
+            addCriterion("md_id in", values, "md_id");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_idNotIn(List<Integer> values) {
+            addCriterion("md_id not in", values, "md_id");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_idBetween(Integer value1, Integer value2) {
+            addCriterion("md_id between", value1, value2, "md_id");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_idNotBetween(Integer value1, Integer value2) {
+            addCriterion("md_id not between", value1, value2, "md_id");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_callerIsNull() {
+            addCriterion("md_caller is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_callerIsNotNull() {
+            addCriterion("md_caller is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_callerEqualTo(String value) {
+            addCriterion("md_caller =", value, "md_caller");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_callerNotEqualTo(String value) {
+            addCriterion("md_caller <>", value, "md_caller");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_callerGreaterThan(String value) {
+            addCriterion("md_caller >", value, "md_caller");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_callerGreaterThanOrEqualTo(String value) {
+            addCriterion("md_caller >=", value, "md_caller");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_callerLessThan(String value) {
+            addCriterion("md_caller <", value, "md_caller");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_callerLessThanOrEqualTo(String value) {
+            addCriterion("md_caller <=", value, "md_caller");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_callerLike(String value) {
+            addCriterion("md_caller like", value, "md_caller");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_callerNotLike(String value) {
+            addCriterion("md_caller not like", value, "md_caller");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_callerIn(List<String> values) {
+            addCriterion("md_caller in", values, "md_caller");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_callerNotIn(List<String> values) {
+            addCriterion("md_caller not in", values, "md_caller");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_callerBetween(String value1, String value2) {
+            addCriterion("md_caller between", value1, value2, "md_caller");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_callerNotBetween(String value1, String value2) {
+            addCriterion("md_caller not between", value1, value2, "md_caller");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_leadcodeIsNull() {
+            addCriterion("md_leadcode is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_leadcodeIsNotNull() {
+            addCriterion("md_leadcode is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_leadcodeEqualTo(String value) {
+            addCriterion("md_leadcode =", value, "md_leadcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_leadcodeNotEqualTo(String value) {
+            addCriterion("md_leadcode <>", value, "md_leadcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_leadcodeGreaterThan(String value) {
+            addCriterion("md_leadcode >", value, "md_leadcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_leadcodeGreaterThanOrEqualTo(String value) {
+            addCriterion("md_leadcode >=", value, "md_leadcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_leadcodeLessThan(String value) {
+            addCriterion("md_leadcode <", value, "md_leadcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_leadcodeLessThanOrEqualTo(String value) {
+            addCriterion("md_leadcode <=", value, "md_leadcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_leadcodeLike(String value) {
+            addCriterion("md_leadcode like", value, "md_leadcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_leadcodeNotLike(String value) {
+            addCriterion("md_leadcode not like", value, "md_leadcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_leadcodeIn(List<String> values) {
+            addCriterion("md_leadcode in", values, "md_leadcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_leadcodeNotIn(List<String> values) {
+            addCriterion("md_leadcode not in", values, "md_leadcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_leadcodeBetween(String value1, String value2) {
+            addCriterion("md_leadcode between", value1, value2, "md_leadcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_leadcodeNotBetween(String value1, String value2) {
+            addCriterion("md_leadcode not between", value1, value2, "md_leadcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_maxnoIsNull() {
+            addCriterion("md_maxno is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_maxnoIsNotNull() {
+            addCriterion("md_maxno is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_maxnoEqualTo(Integer value) {
+            addCriterion("md_maxno =", value, "md_maxno");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_maxnoNotEqualTo(Integer value) {
+            addCriterion("md_maxno <>", value, "md_maxno");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_maxnoGreaterThan(Integer value) {
+            addCriterion("md_maxno >", value, "md_maxno");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_maxnoGreaterThanOrEqualTo(Integer value) {
+            addCriterion("md_maxno >=", value, "md_maxno");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_maxnoLessThan(Integer value) {
+            addCriterion("md_maxno <", value, "md_maxno");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_maxnoLessThanOrEqualTo(Integer value) {
+            addCriterion("md_maxno <=", value, "md_maxno");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_maxnoIn(List<Integer> values) {
+            addCriterion("md_maxno in", values, "md_maxno");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_maxnoNotIn(List<Integer> values) {
+            addCriterion("md_maxno not in", values, "md_maxno");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_maxnoBetween(Integer value1, Integer value2) {
+            addCriterion("md_maxno between", value1, value2, "md_maxno");
+            return (Criteria) this;
+        }
+
+        public Criteria andMd_maxnoNotBetween(Integer value1, Integer value2) {
+            addCriterion("md_maxno not between", value1, value2, "md_maxno");
+            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 andCreateTimeIsNull() {
+            addCriterion("createTime is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNotNull() {
+            addCriterion("createTime is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeEqualTo(Date value) {
+            addCriterion("createTime =", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotEqualTo(Date value) {
+            addCriterion("createTime <>", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThan(Date value) {
+            addCriterion("createTime >", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("createTime >=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThan(Date value) {
+            addCriterion("createTime <", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("createTime <=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIn(List<Date> values) {
+            addCriterion("createTime in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotIn(List<Date> values) {
+            addCriterion("createTime not in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeBetween(Date value1, Date value2) {
+            addCriterion("createTime between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("createTime not between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatorIdIsNull() {
+            addCriterion("creatorId is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatorIdIsNotNull() {
+            addCriterion("creatorId is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatorIdEqualTo(Integer value) {
+            addCriterion("creatorId =", value, "creatorId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatorIdNotEqualTo(Integer value) {
+            addCriterion("creatorId <>", value, "creatorId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatorIdGreaterThan(Integer value) {
+            addCriterion("creatorId >", value, "creatorId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatorIdGreaterThanOrEqualTo(Integer value) {
+            addCriterion("creatorId >=", value, "creatorId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatorIdLessThan(Integer value) {
+            addCriterion("creatorId <", value, "creatorId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatorIdLessThanOrEqualTo(Integer value) {
+            addCriterion("creatorId <=", value, "creatorId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatorIdIn(List<Integer> values) {
+            addCriterion("creatorId in", values, "creatorId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatorIdNotIn(List<Integer> values) {
+            addCriterion("creatorId not in", values, "creatorId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatorIdBetween(Integer value1, Integer value2) {
+            addCriterion("creatorId between", value1, value2, "creatorId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatorIdNotBetween(Integer value1, Integer value2) {
+            addCriterion("creatorId not between", value1, value2, "creatorId");
+            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 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 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);
+        }
+    }
+}

+ 73 - 0
applications/commons/commons-server/pom.xml

@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>commons</artifactId>
+        <groupId>com.usoftchina.saas</groupId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>commons-server</artifactId>
+    <dependencies>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>commoms-dto</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>auth-client</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>server-starter</artifactId>
+        </dependency>
+        <!-- db -->
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+        </dependency>
+        <!-- sleuth -->
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-zipkin</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.amqp</groupId>
+            <artifactId>spring-rabbit</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper-spring-boot-starter</artifactId>
+        </dependency>
+        <!-- feign -->
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-openfeign</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>com.spotify</groupId>
+                <artifactId>docker-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

+ 23 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/CommonsApplication.java

@@ -0,0 +1,23 @@
+package com.usoftchina.saas.commons;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+/**
+ * @author: guq
+ * @create: 2018-10-18 15:47
+ **/
+@SpringBootApplication
+@EnableEurekaClient
+@EnableTransactionManagement
+@EnableFeignClients("com.usoftchina.saas")
+@MapperScan("com.usoftchina.saas.commons.mapper")
+public class CommonsApplication {
+    public static void main(String[] args) {
+        SpringApplication.run(CommonsApplication.class, args);
+    }
+}

+ 19 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/CommonsController.java

@@ -0,0 +1,19 @@
+package com.usoftchina.saas.commons.controller;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author: guq
+ * @create: 2018-10-18 15:53
+ **/
+@RestController
+@RequestMapping("/commons")
+public class CommonsController {
+
+    @RequestMapping("/test")
+    public String test() {
+        return "TEST";
+    }
+
+}

+ 33 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/MaxnumbersMapper.java

@@ -0,0 +1,33 @@
+package com.usoftchina.saas.commons.mapper;
+
+
+
+import com.usoftchina.saas.commons.po.Maxnumbers;
+import com.usoftchina.saas.commons.po.MaxnumbersExample;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface MaxnumbersMapper {
+    int countByExample(MaxnumbersExample example);
+
+    int deleteByExample(MaxnumbersExample example);
+
+    int deleteByPrimaryKey(Integer mn_id);
+
+    int insert(Maxnumbers record);
+
+    int insertSelective(Maxnumbers record);
+
+    List<Maxnumbers> selectByExample(MaxnumbersExample example);
+
+    Maxnumbers selectByPrimaryKey(Integer mn_id);
+
+    int updateByExampleSelective(@Param("record") Maxnumbers record, @Param("example") MaxnumbersExample example);
+
+    int updateByExample(@Param("record") Maxnumbers record, @Param("example") MaxnumbersExample example);
+
+    int updateByPrimaryKeySelective(Maxnumbers record);
+
+    int updateByPrimaryKey(Maxnumbers record);
+}

+ 32 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/MaxnumbersdetailMapper.java

@@ -0,0 +1,32 @@
+package com.usoftchina.saas.commons.mapper;
+
+
+import com.usoftchina.saas.commons.po.Maxnumbersdetail;
+import com.usoftchina.saas.commons.po.MaxnumbersdetailExample;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface MaxnumbersdetailMapper {
+    int countByExample(MaxnumbersdetailExample example);
+
+    int deleteByExample(MaxnumbersdetailExample example);
+
+    int deleteByPrimaryKey(Integer md_id);
+
+    int insert(Maxnumbersdetail record);
+
+    int insertSelective(Maxnumbersdetail record);
+
+    List<Maxnumbersdetail> selectByExample(MaxnumbersdetailExample example);
+
+    Maxnumbersdetail selectByPrimaryKey(Integer md_id);
+
+    int updateByExampleSelective(@Param("record") Maxnumbersdetail record, @Param("example") MaxnumbersdetailExample example);
+
+    int updateByExample(@Param("record") Maxnumbersdetail record, @Param("example") MaxnumbersdetailExample example);
+
+    int updateByPrimaryKeySelective(Maxnumbersdetail record);
+
+    int updateByPrimaryKey(Maxnumbersdetail record);
+}

+ 61 - 0
applications/commons/commons-server/src/main/resources/application.yml

@@ -0,0 +1,61 @@
+spring:
+  application:
+    name: commons-server
+  security:
+    user:
+      name: admin
+      password: select111***
+  datasource:
+    driver-class-name: com.mysql.jdbc.Driver
+    url: jdbc:mysql://192.168.253.12:3306/saas_biz?characterEncoding=utf-8&useSSL=false&allowMultiQueries=true
+    username: root
+    password: select111***
+    hikari:
+      minimum-idle: 5
+      maximum-pool-size: 50
+      idle-timeout: 30000
+      max-lifetime: 1800000
+      connection-timeout: 30000
+  messages:
+    basename: i18n/messages
+  rabbitmq:
+    host: 192.168.0.176
+    port: 5672
+    password: guest
+    username: guest
+  zipkin:
+    sender:
+      type: rabbit
+    locator:
+      discovery:
+        enabled: true
+  sleuth:
+    sampler:
+      probability: 1.0
+eureka:
+  instance:
+    leaseRenewalIntervalInSeconds: 10
+    health-check-url-path: /actuator/health
+    status-page-url-path: /actuator/info
+    metadata-map:
+      user.name: ${spring.security.user.name}
+      user.password: ${spring.security.user.password}
+  client:
+    registryFetchIntervalSeconds: 5
+    serviceUrl:
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8500/eureka/
+server:
+  port: 8900
+  tomcat:
+    uri-encoding: UTF-8
+info:
+  name: '@project.artifactId@'
+  description: '@project.description@'
+  version: '@project.version@'
+  spring-boot-version: '@spring.boot.version@'
+  spring-cloud-version: '@spring.cloud.version@'
+mybatis:
+  type-aliases-package: com.usoftchina.saas.commons.po
+  mapper-locations: classpath:mapper/*.xml
+auth:
+  public-key: auth/pub.key

BIN
applications/commons/commons-server/src/main/resources/auth/pub.key


+ 64 - 0
applications/commons/commons-server/src/main/resources/logback-spring.xml

@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+    <include resource="org/springframework/boot/logging/logback/defaults.xml" />
+    <jmxConfigurator/>
+
+    <!--
+    %m
+    输出代码中指定的消息
+    %p
+    输出优先级,即DEBUG,INFO,WARN,ERROR,FATAL
+    %r
+    输出自应用启动到输出该log信息耗费的毫秒数
+    %c
+    输出所属的类目,通常就是所在类的全名
+    %t
+    输出产生该日志事件的线程名
+    %n
+    输出一个回车换行符,Windows平台为“\r\n”,Unix平台为“\n”
+    %d
+    输出日志时间点的日期或时间,默认格式为ISO8601,也可以在其后指定格式,比如:%d{yyy MMM dd HH:mm:ss,SSS},
+    输出类似:2002年10月18日 22:10:28,921
+    %l
+    输出日志事件的发生位置,包括类目名、发生的线程,以及在代码中的行数。举例:Testlog4.main(TestLog4.java:10)
+    -->
+
+    <springProperty scope="context" name="log.path" source="logging.path" defaultValue="/var/log/saas/commons-server"/>
+    <springProperty scope="context" name="spring.application.name" source="spring.application.name" defaultValue="commons-server"/>
+    <springProperty scope="context" name="spring.profiles.active" source="spring.profiles.active" defaultValue="dev"/>
+    <springProperty scope="context" name="common-pattern" source="logging.common-pattern" defaultValue="%d{yyyy-MM-dd HH:mm:ss.SSS}:[%5p] [%t:%r] [%C{1}:%M:%L] --> %m%n"/>
+    <springProperty scope="context" name="log.level.console" source="logging.level.console" defaultValue="INFO"/>
+
+    <contextName>${spring.application.name}-${spring.profiles.active}-logback</contextName>
+
+
+    <appender name="CONSOLE_APPENDER" class="ch.qos.logback.core.ConsoleAppender">
+        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+            <level>${log.level.console}</level>
+        </filter>
+        <encoder>
+            <pattern>${common-pattern}</pattern>
+        </encoder>
+    </appender>
+
+    <appender name="ROOT_APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${log.path}/root.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+            <!-- 每天一归档 -->
+            <fileNamePattern>${log.path}/%d{yyyy-MM}/root-%d{yyyy-MM-dd}-%i.log.gz</fileNamePattern>
+            <!-- 单个日志文件最多 100MB, 60天的日志周期,最大不能超过20GB -->
+            <maxFileSize>128MB</maxFileSize>
+            <maxHistory>60</maxHistory>
+            <totalSizeCap>20GB</totalSizeCap>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${common-pattern}</pattern>
+        </encoder>
+    </appender>
+
+    <root level="${log.level.console}">
+        <appender-ref ref="CONSOLE_APPENDER"/>
+        <appender-ref ref="ROOT_APPENDER"/>
+    </root>
+
+</configuration>

+ 276 - 0
applications/commons/commons-server/src/main/resources/mapper/MaxnumbersMapper.xml

@@ -0,0 +1,276 @@
+<?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.commons.mapper.MaxnumbersMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.commons.po.Maxnumbers" >
+    <id column="mn_id" property="id" jdbcType="INTEGER" />
+    <result column="mn_caller" property="mn_caller" jdbcType="VARCHAR" />
+    <result column="mn_leadcode" property="mn_leadcode" jdbcType="VARCHAR" />
+    <result column="mn_number" property="mn_number" jdbcType="VARCHAR" />
+    <result column="companyId" property="companyId" jdbcType="INTEGER" />
+    <result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
+    <result column="creatorId" property="creatorId" jdbcType="INTEGER" />
+    <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+    <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
+  </resultMap>
+  <sql id="Example_Where_Clause" >
+    <where >
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
+        <if test="criteria.valid" >
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
+            <foreach collection="criteria.criteria" item="criterion" >
+              <choose >
+                <when test="criterion.noValue" >
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue" >
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue" >
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue" >
+                  and ${criterion.condition}
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause" >
+    <where >
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
+        <if test="criteria.valid" >
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
+            <foreach collection="criteria.criteria" item="criterion" >
+              <choose >
+                <when test="criterion.noValue" >
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue" >
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue" >
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue" >
+                  and ${criterion.condition}
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List" >
+    mn_id, mn_caller, mn_leadcode, mn_number, companyId, createTime, creatorId, updateTime, 
+    updaterId
+  </sql>
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.usoftchina.saas.commons.po.MaxnumbersExample" >
+    select
+    <if test="distinct" >
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from maxnumbers
+    <if test="_parameter != null" >
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null" >
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    select 
+    <include refid="Base_Column_List" />
+    from maxnumbers
+    where mn_id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+    delete from maxnumbers
+    where mn_id = #{id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.usoftchina.saas.commons.po.MaxnumbersExample" >
+    delete from maxnumbers
+    <if test="_parameter != null" >
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.saas.commons.po.Maxnumbers" >
+    insert into maxnumbers (mn_id, mn_caller, mn_leadcode, 
+      mn_number, companyId, createTime, 
+      creatorId, updateTime, updaterId
+      )
+    values (#{id,jdbcType=INTEGER}, #{mn_caller,jdbcType=VARCHAR}, #{mn_leadcode,jdbcType=VARCHAR},
+      #{mn_number,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{creatorId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{updaterId,jdbcType=INTEGER}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.commons.po.Maxnumbers" >
+    insert into maxnumbers
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        mn_id,
+      </if>
+      <if test="mn_caller != null" >
+        mn_caller,
+      </if>
+      <if test="mn_leadcode != null" >
+        mn_leadcode,
+      </if>
+      <if test="mn_number != null" >
+        mn_number,
+      </if>
+      <if test="companyId != null" >
+        companyId,
+      </if>
+      <if test="createTime != null" >
+        createTime,
+      </if>
+      <if test="creatorId != null" >
+        creatorId,
+      </if>
+      <if test="updateTime != null" >
+        updateTime,
+      </if>
+      <if test="updaterId != null" >
+        updaterId,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="mn_caller != null" >
+        #{mn_caller,jdbcType=VARCHAR},
+      </if>
+      <if test="mn_leadcode != null" >
+        #{mn_leadcode,jdbcType=VARCHAR},
+      </if>
+      <if test="mn_number != null" >
+        #{mn_number,jdbcType=VARCHAR},
+      </if>
+      <if test="companyId != null" >
+        #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null" >
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="creatorId != null" >
+        #{creatorId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null" >
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updaterId != null" >
+        #{updaterId,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.usoftchina.saas.commons.po.MaxnumbersExample" resultType="java.lang.Integer" >
+    select count(*) from maxnumbers
+    <if test="_parameter != null" >
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map" >
+    update maxnumbers
+    <set >
+      <if test="record.id != null" >
+        mn_id = #{record.id,jdbcType=INTEGER},
+      </if>
+      <if test="record.mn_caller != null" >
+        mn_caller = #{record.mn_caller,jdbcType=VARCHAR},
+      </if>
+      <if test="record.mn_leadcode != null" >
+        mn_leadcode = #{record.mn_leadcode,jdbcType=VARCHAR},
+      </if>
+      <if test="record.mn_number != null" >
+        mn_number = #{record.mn_number,jdbcType=VARCHAR},
+      </if>
+      <if test="record.companyId != null" >
+        companyId = #{record.companyId,jdbcType=INTEGER},
+      </if>
+      <if test="record.createTime != null" >
+        createTime = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.creatorId != null" >
+        creatorId = #{record.creatorId,jdbcType=INTEGER},
+      </if>
+      <if test="record.updateTime != null" >
+        updateTime = #{record.updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.updaterId != null" >
+        updaterId = #{record.updaterId,jdbcType=INTEGER},
+      </if>
+    </set>
+    <if test="_parameter != null" >
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map" >
+    update maxnumbers
+    set mn_id = #{record.id,jdbcType=INTEGER},
+      mn_caller = #{record.mn_caller,jdbcType=VARCHAR},
+      mn_leadcode = #{record.mn_leadcode,jdbcType=VARCHAR},
+      mn_number = #{record.mn_number,jdbcType=VARCHAR},
+      companyId = #{record.companyId,jdbcType=INTEGER},
+      createTime = #{record.createTime,jdbcType=TIMESTAMP},
+      creatorId = #{record.creatorId,jdbcType=INTEGER},
+      updateTime = #{record.updateTime,jdbcType=TIMESTAMP},
+      updaterId = #{record.updaterId,jdbcType=INTEGER}
+    <if test="_parameter != null" >
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.commons.po.Maxnumbers" >
+    update maxnumbers
+    <set >
+      <if test="mn_caller != null" >
+        mn_caller = #{mn_caller,jdbcType=VARCHAR},
+      </if>
+      <if test="mn_leadcode != null" >
+        mn_leadcode = #{mn_leadcode,jdbcType=VARCHAR},
+      </if>
+      <if test="mn_number != null" >
+        mn_number = #{mn_number,jdbcType=VARCHAR},
+      </if>
+      <if test="companyId != null" >
+        companyId = #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null" >
+        createTime = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="creatorId != null" >
+        creatorId = #{creatorId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null" >
+        updateTime = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updaterId != null" >
+        updaterId = #{updaterId,jdbcType=INTEGER},
+      </if>
+    </set>
+    where mn_id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.commons.po.Maxnumbers" >
+    update maxnumbers
+    set mn_caller = #{mn_caller,jdbcType=VARCHAR},
+      mn_leadcode = #{mn_leadcode,jdbcType=VARCHAR},
+      mn_number = #{mn_number,jdbcType=VARCHAR},
+      companyId = #{companyId,jdbcType=INTEGER},
+      createTime = #{createTime,jdbcType=TIMESTAMP},
+      creatorId = #{creatorId,jdbcType=INTEGER},
+      updateTime = #{updateTime,jdbcType=TIMESTAMP},
+      updaterId = #{updaterId,jdbcType=INTEGER}
+    where mn_id = #{id,jdbcType=INTEGER}
+  </update>
+</mapper>

+ 276 - 0
applications/commons/commons-server/src/main/resources/mapper/MaxnumbersdetailMapper.xml

@@ -0,0 +1,276 @@
+<?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.commons.mapper.MaxnumbersdetailMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.commons.po.Maxnumbersdetail" >
+    <id column="md_id" property="id" jdbcType="INTEGER" />
+    <result column="md_caller" property="md_caller" jdbcType="VARCHAR" />
+    <result column="md_leadcode" property="md_leadcode" jdbcType="VARCHAR" />
+    <result column="md_maxno" property="md_maxno" jdbcType="INTEGER" />
+    <result column="companyId" property="companyId" jdbcType="INTEGER" />
+    <result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
+    <result column="creatorId" property="creatorId" jdbcType="INTEGER" />
+    <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+    <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
+  </resultMap>
+  <sql id="Example_Where_Clause" >
+    <where >
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
+        <if test="criteria.valid" >
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
+            <foreach collection="criteria.criteria" item="criterion" >
+              <choose >
+                <when test="criterion.noValue" >
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue" >
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue" >
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue" >
+                  and ${criterion.condition}
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause" >
+    <where >
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
+        <if test="criteria.valid" >
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
+            <foreach collection="criteria.criteria" item="criterion" >
+              <choose >
+                <when test="criterion.noValue" >
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue" >
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue" >
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue" >
+                  and ${criterion.condition}
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List" >
+    md_id, md_caller, md_leadcode, md_maxno, companyId, createTime, creatorId, updateTime, 
+    updaterId
+  </sql>
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.usoftchina.saas.commons.po.MaxnumbersdetailExample" >
+    select
+    <if test="distinct" >
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from maxnumbersdetail
+    <if test="_parameter != null" >
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null" >
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    select 
+    <include refid="Base_Column_List" />
+    from maxnumbersdetail
+    where md_id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+    delete from maxnumbersdetail
+    where md_id = #{id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.usoftchina.saas.commons.po.MaxnumbersdetailExample" >
+    delete from maxnumbersdetail
+    <if test="_parameter != null" >
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.saas.commons.po.Maxnumbersdetail" >
+    insert into maxnumbersdetail (md_id, md_caller, md_leadcode, 
+      md_maxno, companyId, createTime, 
+      creatorId, updateTime, updaterId
+      )
+    values (#{id,jdbcType=INTEGER}, #{md_caller,jdbcType=VARCHAR}, #{md_leadcode,jdbcType=VARCHAR},
+      #{md_maxno,jdbcType=INTEGER}, #{companyId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{creatorId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{updaterId,jdbcType=INTEGER}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.commons.po.Maxnumbersdetail" >
+    insert into maxnumbersdetail
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        md_id,
+      </if>
+      <if test="md_caller != null" >
+        md_caller,
+      </if>
+      <if test="md_leadcode != null" >
+        md_leadcode,
+      </if>
+      <if test="md_maxno != null" >
+        md_maxno,
+      </if>
+      <if test="companyId != null" >
+        companyId,
+      </if>
+      <if test="createTime != null" >
+        createTime,
+      </if>
+      <if test="creatorId != null" >
+        creatorId,
+      </if>
+      <if test="updateTime != null" >
+        updateTime,
+      </if>
+      <if test="updaterId != null" >
+        updaterId,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="md_caller != null" >
+        #{md_caller,jdbcType=VARCHAR},
+      </if>
+      <if test="md_leadcode != null" >
+        #{md_leadcode,jdbcType=VARCHAR},
+      </if>
+      <if test="md_maxno != null" >
+        #{md_maxno,jdbcType=INTEGER},
+      </if>
+      <if test="companyId != null" >
+        #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null" >
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="creatorId != null" >
+        #{creatorId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null" >
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updaterId != null" >
+        #{updaterId,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.usoftchina.saas.commons.po.MaxnumbersdetailExample" resultType="java.lang.Integer" >
+    select count(*) from maxnumbersdetail
+    <if test="_parameter != null" >
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map" >
+    update maxnumbersdetail
+    <set >
+      <if test="record.id != null" >
+        md_id = #{record.id,jdbcType=INTEGER},
+      </if>
+      <if test="record.md_caller != null" >
+        md_caller = #{record.md_caller,jdbcType=VARCHAR},
+      </if>
+      <if test="record.md_leadcode != null" >
+        md_leadcode = #{record.md_leadcode,jdbcType=VARCHAR},
+      </if>
+      <if test="record.md_maxno != null" >
+        md_maxno = #{record.md_maxno,jdbcType=INTEGER},
+      </if>
+      <if test="record.companyId != null" >
+        companyId = #{record.companyId,jdbcType=INTEGER},
+      </if>
+      <if test="record.createTime != null" >
+        createTime = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.creatorId != null" >
+        creatorId = #{record.creatorId,jdbcType=INTEGER},
+      </if>
+      <if test="record.updateTime != null" >
+        updateTime = #{record.updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.updaterId != null" >
+        updaterId = #{record.updaterId,jdbcType=INTEGER},
+      </if>
+    </set>
+    <if test="_parameter != null" >
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map" >
+    update maxnumbersdetail
+    set md_id = #{record.id,jdbcType=INTEGER},
+      md_caller = #{record.md_caller,jdbcType=VARCHAR},
+      md_leadcode = #{record.md_leadcode,jdbcType=VARCHAR},
+      md_maxno = #{record.md_maxno,jdbcType=INTEGER},
+      companyId = #{record.companyId,jdbcType=INTEGER},
+      createTime = #{record.createTime,jdbcType=TIMESTAMP},
+      creatorId = #{record.creatorId,jdbcType=INTEGER},
+      updateTime = #{record.updateTime,jdbcType=TIMESTAMP},
+      updaterId = #{record.updaterId,jdbcType=INTEGER}
+    <if test="_parameter != null" >
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.commons.po.Maxnumbersdetail" >
+    update maxnumbersdetail
+    <set >
+      <if test="md_caller != null" >
+        md_caller = #{md_caller,jdbcType=VARCHAR},
+      </if>
+      <if test="md_leadcode != null" >
+        md_leadcode = #{md_leadcode,jdbcType=VARCHAR},
+      </if>
+      <if test="md_maxno != null" >
+        md_maxno = #{md_maxno,jdbcType=INTEGER},
+      </if>
+      <if test="companyId != null" >
+        companyId = #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null" >
+        createTime = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="creatorId != null" >
+        creatorId = #{creatorId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null" >
+        updateTime = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updaterId != null" >
+        updaterId = #{updaterId,jdbcType=INTEGER},
+      </if>
+    </set>
+    where md_id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.commons.po.Maxnumbersdetail" >
+    update maxnumbersdetail
+    set md_caller = #{md_caller,jdbcType=VARCHAR},
+      md_leadcode = #{md_leadcode,jdbcType=VARCHAR},
+      md_maxno = #{md_maxno,jdbcType=INTEGER},
+      companyId = #{companyId,jdbcType=INTEGER},
+      createTime = #{createTime,jdbcType=TIMESTAMP},
+      creatorId = #{creatorId,jdbcType=INTEGER},
+      updateTime = #{updateTime,jdbcType=TIMESTAMP},
+      updaterId = #{updaterId,jdbcType=INTEGER}
+    where md_id = #{id,jdbcType=INTEGER}
+  </update>
+</mapper>

+ 6 - 7
applications/commons/pom.xml

@@ -8,14 +8,13 @@
         <version>1.0.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
-
     <artifactId>commons</artifactId>
-    <dependencies>
-        <dependency>
-            <groupId>com.usoftchina.saas</groupId>
-            <artifactId>core</artifactId>
-        </dependency>
-    </dependencies>
+    <modules>
+        <module>commons-api</module>
+        <module>commons-dto</module>
+        <module>commons-server</module>
+    </modules>
+    <packaging>pom</packaging>
 
 
 </project>

+ 2 - 1
applications/document/document-server/pom.xml

@@ -59,7 +59,8 @@
         </dependency>
         <dependency>
             <groupId>com.usoftchina.saas</groupId>
-            <artifactId>commons</artifactId>
+            <artifactId>commoms-dto</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
     </dependencies>
 

+ 3 - 2
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductController.java

@@ -3,8 +3,9 @@ package com.usoftchina.saas.document.controller;
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.Result;
 
-import com.usoftchina.saas.common.dto.ComboDTO;
-import com.usoftchina.saas.common.dto.DocReqDTO;
+
+import com.usoftchina.saas.commons.dto.ComboDTO;
+import com.usoftchina.saas.commons.dto.DocReqDTO;
 import com.usoftchina.saas.document.dto.ProductDTO;
 import com.usoftchina.saas.document.entities.Product;
 import com.usoftchina.saas.document.service.ProductService;

+ 2 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/VendorController.java

@@ -2,7 +2,8 @@ package com.usoftchina.saas.document.controller;
 
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.Result;
-import com.usoftchina.saas.common.dto.DocReqDTO;
+
+import com.usoftchina.saas.commons.dto.DocReqDTO;
 import com.usoftchina.saas.document.dto.VendorDTO;
 import com.usoftchina.saas.document.service.VendorService;
 import com.usoftchina.saas.page.PageRequest;

+ 3 - 2
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProductMapper.java

@@ -1,8 +1,9 @@
 package com.usoftchina.saas.document.mapper;
 
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
-import com.usoftchina.saas.common.dto.ComboDTO;
-import com.usoftchina.saas.common.dto.DocReqDTO;
+
+import com.usoftchina.saas.commons.dto.ComboDTO;
+import com.usoftchina.saas.commons.dto.DocReqDTO;
 import com.usoftchina.saas.document.dto.ProductDTO;
 import com.usoftchina.saas.document.entities.Product;
 

+ 3 - 3
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/VendorMapper.java

@@ -2,14 +2,14 @@ package com.usoftchina.saas.document.mapper;
 
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 
-import com.usoftchina.saas.common.dto.DocReqDTO;
-import com.usoftchina.saas.document.dto.VendorDTO;
+
+import com.usoftchina.saas.commons.dto.DocReqDTO;
 import com.usoftchina.saas.document.entities.Vendor;
 
 import java.util.List;
 
 public interface VendorMapper extends CommonBaseMapper<Vendor> {
 
-    List<VendorDTO> getVendorsByCondition(DocReqDTO docReqDTO);
+    List<Vendor> getVendorsByCondition(DocReqDTO docReqDTO);
 
 }

+ 3 - 2
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/Impl/ProductServiceImpl.java

@@ -4,8 +4,9 @@ import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 
-import com.usoftchina.saas.common.dto.ComboDTO;
-import com.usoftchina.saas.common.dto.DocReqDTO;
+
+import com.usoftchina.saas.commons.dto.ComboDTO;
+import com.usoftchina.saas.commons.dto.DocReqDTO;
 import com.usoftchina.saas.document.dto.ProductDTO;
 import com.usoftchina.saas.document.entities.Product;
 import com.usoftchina.saas.document.mapper.ProductMapper;

+ 2 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/Impl/VendorServiceImpl.java

@@ -3,7 +3,8 @@ 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.common.dto.DocReqDTO;
+
+import com.usoftchina.saas.commons.dto.DocReqDTO;
 import com.usoftchina.saas.document.dto.VendorDTO;
 import com.usoftchina.saas.document.entities.Vendor;
 import com.usoftchina.saas.document.mapper.VendorMapper;

+ 3 - 2
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProductService.java

@@ -3,8 +3,9 @@ package com.usoftchina.saas.document.service;
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.service.CommonBaseService;
 
-import com.usoftchina.saas.common.dto.ComboDTO;
-import com.usoftchina.saas.common.dto.DocReqDTO;
+
+import com.usoftchina.saas.commons.dto.ComboDTO;
+import com.usoftchina.saas.commons.dto.DocReqDTO;
 import com.usoftchina.saas.document.dto.ProductDTO;
 import com.usoftchina.saas.document.entities.Product;
 import com.usoftchina.saas.document.mapper.ProductMapper;

+ 2 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/VendorService.java

@@ -3,7 +3,8 @@ package com.usoftchina.saas.document.service;
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.service.CommonBaseService;
 
-import com.usoftchina.saas.common.dto.DocReqDTO;
+
+import com.usoftchina.saas.commons.dto.DocReqDTO;
 import com.usoftchina.saas.document.dto.VendorDTO;
 import com.usoftchina.saas.document.entities.Vendor;
 import com.usoftchina.saas.document.mapper.VendorMapper;

+ 2 - 1
applications/purchase/purchase-server/pom.xml

@@ -62,7 +62,8 @@
         </dependency>
         <dependency>
             <groupId>com.usoftchina.saas</groupId>
-            <artifactId>commons</artifactId>
+            <artifactId>commoms-dto</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
     </dependencies>
 

+ 3 - 2
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/PurchaseController.java

@@ -2,8 +2,9 @@ package com.usoftchina.saas.purchase.controller;
 
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.Result;
-import com.usoftchina.saas.common.dto.BatchDealBaseDTO;
-import com.usoftchina.saas.common.dto.DocSavedDTO;
+
+import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
+import com.usoftchina.saas.commons.dto.DocSavedDTO;
 import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.purchase.dto.*;
 import com.usoftchina.saas.purchase.po.PurchaseList;

+ 2 - 1
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/PurchaseMapper.java

@@ -1,7 +1,8 @@
 package com.usoftchina.saas.purchase.mapper;
 
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
-import com.usoftchina.saas.common.dto.DocBaseDTO;
+
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.purchase.po.Purchase;
 import java.util.List;
 

+ 3 - 2
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/PurchaseService.java

@@ -3,8 +3,9 @@ package com.usoftchina.saas.purchase.service;
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.service.CommonBaseService;
 
-import com.usoftchina.saas.common.dto.BatchDealBaseDTO;
-import com.usoftchina.saas.common.dto.DocSavedDTO;
+
+import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
+import com.usoftchina.saas.commons.dto.DocSavedDTO;
 import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.purchase.dto.PurchaseFormDTO;
 import com.usoftchina.saas.purchase.dto.PurchaseReqDTO;

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

@@ -4,9 +4,10 @@ import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
-import com.usoftchina.saas.common.dto.BatchDealBaseDTO;
-import com.usoftchina.saas.common.dto.DocBaseDTO;
-import com.usoftchina.saas.common.dto.DocSavedDTO;
+
+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.document.api.ProductApi;
 import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.page.PageRequest;

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

@@ -70,7 +70,7 @@
             <if test="keyword != null">
                 AND ${keyword}
             </if>
-            order by pu_id,pd_detno desc
+            order by pu_id,pd_detno
         </where>
     </select>
 
@@ -90,7 +90,7 @@
                 AND ${keyword}
             </if>
         </where>
-        order by pu_id desc
+        order by pu_id
     </select>
     <insert id="batchInsert" parameterType="java.util.List" >
         insert into purchasedetail ( PD_PUID, PD_CODE,

+ 2 - 2
applications/purchase/purchase-server/src/main/resources/mapper/PurchaseMapper.xml

@@ -391,13 +391,13 @@
       pu_text5 = #{pu_text5,jdbcType=VARCHAR}
     where pu_id = #{id,jdbcType=INTEGER}
   </update>
-  <select id="validateAudit" parameterType="com.usoftchina.saas.common.dto.DocBaseDTO" resultType="java.lang.String">
+  <select id="validateAudit" parameterType="com.usoftchina.saas.commons.dto.DocBaseDTO" resultType="java.lang.String">
     select GROUP_CONCAT(pu_code) from purchase where pu_statuscode='AUDITED' and pu_id in
     <foreach collection="list" item="item" open="(" close=")" separator=",">
       #{item.id}
     </foreach>
   </select>
-  <select id="validateBatchUnAudit" parameterType="com.usoftchina.saas.common.dto.DocBaseDTO" resultType="java.lang.String">
+  <select id="validateBatchUnAudit" parameterType="com.usoftchina.saas.commons.dto.DocBaseDTO" resultType="java.lang.String">
     select GROUP_CONCAT(pu_code) from purchase where pu_statuscode='UNAUDITED' and pu_id in
     <foreach collection="list" item="item" open="(" close=")" separator=",">
       #{item.id}

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

@@ -412,6 +412,6 @@
   </delete>
   <select id="selectByFK" parameterType="long" resultMap="BaseResultMap">
     select * from purchasedetail a left join product b on pr_id=pd_prodid and a.companyid = b.companyid
-      where pd_puid=#{pu_id} order by pd_detno desc
+      where pd_puid=#{pu_id} order by pd_detno
   </select>
 </mapper>

+ 10 - 1
frontend/saas-web/app/util/FormUtil.js

@@ -60,9 +60,16 @@ Ext.define('saas.util.FormUtil', {
 
                         // 如果是从表为其绑定store
                         if(item.xtype == 'detailGridField') {
+                            var columns = item.columns,
+                            cnames = columns.filter(function(c) {
+                                return c.dataIndex && !c.ignore;
+                            }).map(function(c) {
+                                return c.dataIndex
+                            });
+                            formModel.set('_detailBindFields', cnames);
                             item.bind = {
                                 store: '{_detailStore}'
-                            };           
+                            };       
                             formModel.set('_detailStore', Ext.create('Ext.data.Store', {
                                 fields: item.columns ? item.columns.filter(function(c) {
                                     return !!c.dataIndex;
@@ -77,6 +84,8 @@ Ext.define('saas.util.FormUtil', {
                                 }) : [],
                                 data: []
                             }));
+
+
                         }
                     });
                 }

+ 5 - 4
frontend/saas-web/app/view/core/form/FormPanel.js

@@ -113,12 +113,13 @@ Ext.define('saas.view.core.form.FormPanel', {
 
     /**
      * 获取form数据
+     * @param all: true:取全部数据,false:排除忽视字段
      */
-    getFormData: function(ignore) {
+    getFormData: function(all) {
         var me = this,
         viewModel = me.getViewModel(),
         allData = viewModel.getData(),
-        bindFields = allData.bindFields,
+        bindFields = allData._bindFields,
         formData = {
             main: {},
             detail: []
@@ -127,7 +128,7 @@ Ext.define('saas.view.core.form.FormPanel', {
         for(k in allData) {
             var d = allData[k];
             // 主表数据
-            if(ignore) {
+            if(all) {
                 formData.main[k] = d;
             }else {
                 if(bindFields.indexOf(k) != -1) {
@@ -179,7 +180,7 @@ Ext.define('saas.view.core.form.FormPanel', {
                 }
             }
         });
-        viewModel.set('bindFields', bindFields);
+        viewModel.set('_bindFields', bindFields);
     },
 
     initFormData: function(formData) {

+ 17 - 7
frontend/saas-web/app/view/core/form/FormPanelController.js

@@ -60,8 +60,12 @@ Ext.define('saas.view.core.form.FormPanelController', {
     },
 
     save:function(){
-        var me = this;
-        var form = this.getView();
+        var me = this,
+        form = this.getView(),
+        viewModel = me.getViewModel(),
+        modelData = viewModel.getData(),
+        detailBindFields = modelData._detailBindFields;
+
         if(form.getForm().wasDirty==false){
             Ext.Msg.alert('提示','未修改数据,请修改后保存');
             return false;
@@ -76,15 +80,21 @@ Ext.define('saas.view.core.form.FormPanelController', {
         var dirtyGridData = [];
         if(gridData.length>0){
             Ext.each(gridData, function(item,index){
-                if(item.dirty){
-                    if((typeof item.data.id) != "number" && item.data.id.indexOf('extMode')>-1){
-                        item.data.id = '';
+                var d = Object.assign({}, item.data),
+                dirty = item.dirty;
+                if(dirty){
+                    if((typeof d.id) != "number" && d.id.indexOf('extMode')>-1){
+                        delete d.id;
                     }
-                    dirtyGridData.push(item.data)
+                    for(k in d) {
+                        if(!Ext.Array.contains(detailBindFields, k)) {
+                            delete d[k];
+                        }
+                    }
+                    dirtyGridData.push(d);
                 }
             });
         }  
-        debugger 
         var params = {
             main:formData.main,
             items:dirtyGridData

+ 2 - 1
frontend/saas-web/app/view/core/form/FormPanelModel.js

@@ -3,7 +3,8 @@ Ext.define('saas.view.core.form.FormPanelModel', {
     alias: 'viewmodel.core-form-formpanel',
 
     data: {
-        bindFields: [], // 请求绑定字段,绑定到formfield并且未设置ignore为true
+        _bindFields: [], // 主表绑定字段,绑定到formfield并且未设置ignore为true
+        _detailBindeFields: [], // 从表绑定列
         _detailStore: null, // 从表store
     },
 });

+ 11 - 1
frontend/saas-web/app/view/main/MainModel.js

@@ -28,7 +28,6 @@ Ext.define('saas.view.main.MainModel', {
                                     {
                                         id: 'purchaseOrder',
                                         text: '采购单(维护界面)',
-                                        //viewType: 'purchase-list-gridpanel',
                                         viewType:'purchase-purchase-formpanel',
                                         leaf: true
                                     },{
@@ -47,6 +46,17 @@ Ext.define('saas.view.main.MainModel', {
                                         viewType:'purchase-purchaseIn-querypanel',
                                         leaf: true
                                     },{
+                                        id: 'purchaseOutOrder',
+                                        text: '采购验退单(维护界面)',
+                                        viewType:'purchase-purchaseOut-formpanel',
+                                        leaf: true
+                                    },{
+                                        id: 'purchaseOutQuery',
+                                        text: '采购验退单查询',
+                                        viewType:'purchase-purchaseOut-querypanel',
+                                        leaf: true
+                                    },
+                                    {
                                         id: 'list1',
                                         text: '列表界面1',
                                         viewType: 'purchase-list-gridpanel1',

+ 62 - 46
frontend/saas-web/app/view/purchase/purchase/FormPanel.js

@@ -5,26 +5,28 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
     controller: 'purchase-purchase-formcontroller',
     viewModel: 'purchase-purchase-formmodel',
     
-    _title:'采购单',
-    _codeField: 'pu_ode',
-    _statusField: 'pu_status',
-    _statusCodeField: 'pu_statuscode',
-    _idField: 'id',
-    _detnoColumn:  'pd_detno',
-    _dataModelUrl:'http://192.168.253.58:8800/purchase/read/',
-    _saveUrl:'http://192.168.253.58:8800/purchase/save',
-    _auditUrl:'http://192.168.253.58:8800/purchase/audit',
-    _deleteUrl:'http://192.168.253.58:8800/purchase/delete/',
-    _deleteDetailUrl:'http://192.168.253.58:8800/purchase/deleteItem/',
-    initId:0,
-
-    toolBtns: [{
-        xtype: 'button',
-        text: '转单按钮',
-        handler: function() {
-            console.log('11');
-        }
-    }],
+     //字段属性
+     _title:'采购单',
+     _idField: 'id',
+     _codeField: 'pu_code',
+     _statusField: 'pu_status',
+     _statusCodeField: 'pu_statuscode',
+     _detnoColumn:  'pd_detno',
+     _relationColumn: 'pd_puid',
+     _readUrl:'http://192.168.253.58:8800/purchase/read/',
+     _saveUrl:'http://192.168.253.58:8800/purchase/save',
+     _auditUrl:'http://192.168.253.58:8800/purchase/audit',
+     _deleteUrl:'http://192.168.253.58:8800/purchase/delete/',
+     _deleteDetailUrl:'http://192.168.253.58:8800/purchase/deleteItem/',
+     initId:0,
+ 
+     toolBtns: [{
+         xtype: 'button',
+         text: '转单按钮',
+         handler: function() {
+             console.log('11');
+         }
+     }],
 
     defaultItems: [{
         xtype: 'hidden',
@@ -108,23 +110,29 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
     }, {
         name : "detailGridField", 
         xtype : "detailGridField", 
-        bind: {
-            store:{
-                data:'{detailGridField}'
-            }
-        },
         columns : [
             {
                 text : "序号", 
-                dataIndex : "pdDetno", 
-                width : 80.0, 
-                xtype : "rownumberer"
+                dataIndex : "pd_detno", 
+                width : 100, 
+                xtype : "numbercolumn",
+                align : 'center',
+                format:'0',
+                summaryType: 'count',
+                summaryRenderer: function(value, summaryData, dataIndex) {
+                    return Ext.String.format('合计: {0}条', value);
+                },
             }, {
                 text : "id", 
                 dataIndex : "id", 
                 xtype : "numbercolumn"
             },
             {
+                text : "物料编号", 
+                width : 200.0, 
+                dataIndex : "pd_prodcode", 
+                xtype : "", 
+                items : null,
                 editor : {
                     displayField : "display", 
                     editable : true, 
@@ -137,39 +145,47 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
                     store : null, 
                     valueField : "value", 
                     xtype : "dbfindtrigger"
-                }, 
-                text : "物料编号", 
-                width : 200.0, 
-                dataIndex : "pd_prodcode", 
-                xtype : "", 
-                items : null
+                }
             },
             {
-                text : "单位", 
-                editor : {
-                    xtype : "textfield"
-                }, 
-                dataIndex : "pd_unit", 
-                width : 120.0, 
-                xtype : "", 
-                items : null
-            }, 
+                text : "名称", 
+                dataIndex : "pr_detail",
+                ignore:true
+            },
+            {
+                text : "规格", 
+                dataIndex : "pr_spec",
+                ignore:true
+            },
             {
                 text : "数量", 
                 dataIndex : "pd_yqty", 
+                editor : {
+                    xtype : "numberfield"
+                },
                 width : 120.0, 
                 xtype : "numbercolumn", 
-                items : null
+                format:'0',
+                items : null,
+                summaryType: 'sum'
             }, 
             {
                 text : "单价", 
+                editor : {
+                    xtype : "numberfield"
+                },
+                format:'0,000.00',
                 dataIndex : "pd_price", 
                 width : 120.0, 
-                xtype : "numbercolumn", 
-                items : null
+                xtype : "numbercolumn",
+                items : null,
+                summaryType: 'sum'
             }, 
             {
                 text : "税率", 
+                editor : {
+                    xtype : "numberfield"
+                },
                 dataIndex : "pd_taxrate", 
                 width : 120.0, 
                 xtype : "numbercolumn", 

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

@@ -88,7 +88,7 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
         columnWidth: 0.25,
         datas: [
             ["TURNIN", "已入库"],
-            ["NOIN", "未入库"],
+            ["UNTURNIN", "未入库"],
             ["PARTIN", "部分入库"]
         ]
     }],

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

@@ -1,9 +1,5 @@
 Ext.define('saas.view.purchase.purchase.QueryPanelModel', {
     extend: 'saas.view.core.query.QueryPanelModel',
-    alias: 'viewmodel.purchase-purchase-querypanel',
+    alias: 'viewmodel.purchase-purchase-querypanel'
 
-    data: {
-       // pu_total: '3333',
-        //pu_code: '4'
-    }
 });

+ 56 - 85
frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js

@@ -6,17 +6,18 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
     viewModel: 'purchase-purchaseIn-formmodel',
     
     _title:'采购验收单',
+    _idField: 'id',
     _codeField: 'pi_inoutno',
     _statusField: 'pu_status',
     _statusCodeField: 'pu_statuscode',
-    _idField: 'id',
     _detnoColumn:  'pd_pdno',
-    _dataModelUrl:'http://192.168.253.58:8800/purchase/read/',
+    _relationColumn: 'pd_piid',
+    _readUrl:'http://192.168.253.58:8800/purchase/read/',
     _saveUrl:'http://192.168.253.58:8800/purchase/save',
     _auditUrl:'http://192.168.253.58:8800/purchase/audit',
     _deleteUrl:'http://192.168.253.58:8800/purchase/delete/',
     _deleteDetailUrl:'http://192.168.253.58:8800/purchase/deleteItem/',
-    initId:0,
+    initId:11,
 
     toolBtns: [{
         xtype: 'button',
@@ -44,95 +45,80 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
         xtype : "textfield", 
         name : "pi_class", 
         bind : "{pi_class}", 
-        fieldLabel : "类型", 
+        fieldLabel : "单据类型", 
         readOnly:true,
         allowBlank : true, 
         columnWidth : 0.25
     }, {
         xtype : "hidden", 
-        name : "pu_vendid", 
-        bind : "{pu_vendid}", 
+        name : "pi_vendid", 
+        bind : "{pi_vendid}", 
         fieldLabel : "供应商ID", 
         allowBlank : true, 
         columnWidth : 0.0
     }, {
         xtype : "textfield", 
-        name : "pu_vendcode", 
-        bind : "{pu_vendcode}", 
+        name : "pi_vendcode", 
+        bind : "{pi_vendcode}", 
         fieldLabel : "供应商编号", 
         hidden:true,
         allowBlank : true, 
         columnWidth : 0, 
     }, {
         xtype : "dbfindtrigger", 
-        name : "pu_vendname", 
-        bind : "{pu_vendname}", 
+        name : "pi_vendname", 
+        bind : "{pi_vendname}", 
         fieldLabel : "供应商名称", 
         allowBlank : true, 
         columnWidth : 0.25
     },{
         xtype : "datefield", 
-        name : "pu_date", 
-        bind : "{pu_date}", 
-        fieldLabel : "采购日期", 
+        name : "pi_date", 
+        bind : "{pi_date}", 
+        fieldLabel : "单据日期", 
         allowBlank : false, 
         columnWidth : 0.25
-    }, {
-        xtype : "hidden", 
-        name : "pu_buyerid", 
-        bind : "{pu_buyerid}", 
-        fieldLabel : "采购员ID", 
-        allowBlank : true, 
-        columnWidth : 0.0
-    }, {
-        xtype : "textfield", 
-        name : "pu_buyercode", 
-        bind : "{pu_buyercode}", 
-        fieldLabel : "采购员编号", 
-        allowBlank : true, 
-        hidden:true,
-        columnWidth : 0
-    }, {
-        xtype : "dbfindtrigger", 
-        name : "pu_buyername", 
-        bind : "{pu_buyername}", 
-        fieldLabel : "采购员名称", 
-        allowBlank : true, 
-        columnWidth : 0.25
-    }, {
+    },{
         xtype : "textfield", 
-        name : "pu_shipaddresscode", 
-        bind : "{pu_shipaddresscode}", 
-        fieldLabel : "交货地址", 
-        allowBlank : true, 
+        name : "pi_total", 
+        bind : "{pi_total}", 
+        fieldLabel : "总额", 
+        allowBlank : true,
+        readOnly: true,
         columnWidth : 0.25
     }, {
         xtype : "textfield", 
-        name : "pu_total", 
-        bind : "{pu_total}", 
-        fieldLabel : "单据金额", 
+        name : "pi_pucode", 
+        bind : "{pi_pucode}", 
+        fieldLabel : "采购单号", 
         allowBlank : true, 
         columnWidth : 0.25
     }, {
         name : "detailGridField", 
         xtype : "detailGridField", 
-        bind: {
-            store:{
-                data:'{detailGridField}'
-            }
-        },
         columns : [
             {
                 text : "序号", 
                 dataIndex : "pd_pdno", 
-                width : 80.0, 
-                xtype : "rownumberer"
+                width : 100, 
+                xtype : "numbercolumn",
+                align : 'center',
+                format:'0',
+                summaryType: 'count',
+                summaryRenderer: function(value, summaryData, dataIndex) {
+                    return Ext.String.format('合计: {0}条', value);
+                },
             }, {
                 text : "id", 
                 dataIndex : "id", 
                 xtype : "numbercolumn"
             },
             {
+                text : "物料编号", 
+                width : 200.0, 
+                dataIndex : "pd_prodcode", 
+                xtype : "", 
+                items : null,
                 editor : {
                     displayField : "display", 
                     editable : true, 
@@ -145,35 +131,34 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
                     store : null, 
                     valueField : "value", 
                     xtype : "dbfindtrigger"
-                }, 
-                text : "物料编号", 
-                width : 200.0, 
-                dataIndex : "pd_prodcode", 
-                xtype : "", 
-                items : null
+                }
             },
             {
-                text : "单位", 
-                editor : {
-                    xtype : "textfield"
-                }, 
-                dataIndex : "pd_unit", 
-                width : 120.0, 
-                xtype : "", 
-                items : null
+                text : "名称", 
+                dataIndex : "pr_detail",
+                ignore:true
+            },
+            {
+                text : "规格", 
+                dataIndex : "pr_spec",
+                ignore:true
             }, 
             {
                 text : "数量", 
                 dataIndex : "pd_inqty", 
+                editor : {
+                    xtype : "numberfield"
+                },
                 width : 120.0, 
                 xtype : "numbercolumn", 
-                items : null
+                format:'0',
+                items : null,
+                summaryType: 'sum'
             }, 
             {
                 text : "仓库", 
                 dataIndex : "pd_whname", 
                 width : 120.0, 
-                xtype : "numbercolumn", 
                 items : null,
                 editor : {
                     displayField : "display", 
@@ -216,21 +201,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
             {
                 text : "采购单号", 
                 dataIndex : "pd_ordercode", 
-                width : 120.0,
-                flex : 1.0,
-                editor : {
-                    displayField : "display", 
-                    editable : true, 
-                    format : "", 
-                    hideTrigger : false, 
-                    maxLength : 100.0, 
-                    minValue : null, 
-                    positiveNum : false, 
-                    queryMode : "local", 
-                    store : null, 
-                    valueField : "value", 
-                    xtype : "dbfindtrigger"
-                }
+                width : 120.0
             },{
                 text : "采购序号", 
                 dataIndex : "pd_orderdetno", 
@@ -257,8 +228,8 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
         xtype : "textfield", 
         readOnly : true, 
         editable : false, 
-        name : "pu_status", 
-        bind : "{pu_status}", 
+        name : "pi_status", 
+        bind : "{pi_status}", 
         fieldLabel : "单据状态", 
         allowBlank : true, 
         columnWidth : 0.25
@@ -266,8 +237,8 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
         xtype : "hidden", 
         readOnly : true, 
         editable : false, 
-        name : "pu_statuscode", 
-        bind : "{pu_statuscode}", 
+        name : "pi_statuscode", 
+        bind : "{pi_statuscode}", 
         fieldLabel : "单据状态码", 
         allowBlank : true, 
         columnWidth : 0.0

+ 57 - 56
frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js

@@ -23,29 +23,29 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
         columnWidth: 0.25
     }, {
         xtype: 'condatefield',
-        name: 'pu_date',
-        bind: '{pu_date}',
-        fieldLabel: '采购日期',
+        name: 'pi_date',
+        bind: '{pi_date}',
+        fieldLabel: '单据日期',
         allowBlank: true,
         columnWidth: 0.5
     }, {
         xtype: 'textfield',
-        name: 'pu_vendcode',
-        bind: '{pu_vendcode}',
+        name: 'pi_vendcode',
+        bind: '{pi_vendcode}',
         fieldLabel: '供应商编号',
         allowBlank: true,
         hidden:true,
         columnWidth: 0.25
     }, {
         xtype: 'textfield',
-        name: 'pu_vendname',
-        bind: '{pu_vendname}',
+        name: 'pi_vendname',
+        bind: '{pi_vendname}',
         fieldLabel: '供应商名称',
         allowBlank: true,
         columnWidth: 0.25
     }, {
         xtype: 'dbfindtrigger',
-        name: 'pd_prodcode#pd_prodcode',
+        name: 'pd_prodcode',
         bind: '{pd_prodcode}',
         fieldLabel: '物料编号',
         fieldMode: 'DETAIL',
@@ -55,48 +55,29 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
         columnWidth: 0.25
     }, {
         xtype: 'dbfindtrigger',
-        name: 'pr_detail',
+        name: 'pr_detail#pd_prodcode',
         bind: '{pr_detail}',
         fieldLabel: '物料名称',
         allowBlank: true,
         columnWidth: 0.25
     }, {
         xtype: 'combobox',
-        name: 'pr_statuscode',
-       // bind: '{pr_statuscode}',
+        name: 'pi_statuscode',
+        bind: '{pi_statuscode}',
         fieldLabel: '审核状态',
         allowBlank: true,
         columnWidth: 0.25,
         queryMode: 'local',
-        displayField: 'pr_status',
-        valueField: 'pr_statuscode',
+        displayField: 'pi_status',
+        valueField: 'pi_statuscode',
         store: Ext.create('Ext.data.ArrayStore', {
-            fields: ['pr_statuscode', 'pr_status'],
+            fields: ['pi_statuscode', 'pi_status'],
             data: [
                 ["$ALL", "全部"],
                 ["AUDITED", "已审核"],
                 ["UNAUDITED", "未审核"]
             ]
         })
-    }, {
-        xtype: 'combobox',
-        name: 'pu_acceptstatuscode',
-        bind: '{pu_acceptstatuscode}',
-        fieldLabel: '入库状态',
-        allowBlank: true,
-        columnWidth: 0.25,
-        queryMode: 'local',
-        displayField: 'pu_acceptstatus',
-        valueField: 'pu_acceptstatuscode',
-        store: Ext.create('Ext.data.ArrayStore', {
-            fields: ['pu_acceptstatuscode', 'pu_acceptstatus'],
-            datas: [
-                ["$ALL", "全部"],
-                ["TURNOUT", "已入库"],
-                ["NOOUT", "未入库"],
-                ["PARTOUT", "部分入库"]
-            ]
-        })
     }],
     moreQueryFormItems: [{
         xtype: 'textfield',
@@ -130,67 +111,77 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
             xtype: 'rownumberer'
         }, {
             text: 'id',
-            dataIndex: 'pu_id',
+            dataIndex: 'pi_id',
             width: 100,
             xtype: 'numbercolumn'
         }, {
             text: '单据编号',
-            dataIndex: 'pu_code',
+            dataIndex: 'pi_inoutno',
             width: 120
         }, {
             text: '单据状态',
-            dataIndex: 'pu_status',
+            dataIndex: 'pi_status',
             width: 120
         }, {
             text: '下单日期',
-            dataIndex: 'pu_indate',
+            dataIndex: 'pi_date',
             xtype:'datecolumn',
             width: 200
+        },{
+            text: '采购单号',
+            dataIndex: 'pi_pucode',
+            width: 200
         },{
             text: '供应商名称',
-            dataIndex: 'pu_vendname',
+            dataIndex: 'pi_vendname',
             width: 120
         },{
             text: '含税金额',
-            dataIndex: 'pu_taxtotal',
+            dataIndex: 'pi_total',
             xtype:'numbercolumn',
             width: 120
         },{
-            text: '金额',
-            dataIndex: 'pu_total',
+            text: '不含税金额',
+            dataIndex: 'pi_nettotal',
             xtype:'numbercolumn',
             width: 120,
             flex: 1
         }],
         _relativeColumn: [{
-            text: '序号',
-            width: 80,
-            xtype: 'rownumberer'
+            text : "序号", 
+            dataIndex : "pd_pdno", 
+            width : 100, 
+            xtype : "numbercolumn",
+            align : 'center'
         }, {
             text: 'id',
             dataIndex: 'pu_id',
-            width: 100,
+            width: 0,
             xtype: 'numbercolumn'
         }, {
             text: '单据编号',
-            dataIndex: 'pu_code',
+            dataIndex: 'pd_inoutno',
             width: 120
         }, {
             text: '单据状态',
-            dataIndex: 'pu_status',
+            dataIndex: 'pi_status',
             width: 120
         }, {
             text: '下单日期',
-            dataIndex: 'pu_indate',
+            dataIndex: 'pi_date',
             xtype:'datecolumn',
             width: 200
         },{
             text: '供应商名称',
-            dataIndex: 'pu_vendname',
+            dataIndex: 'pi_vendname',
+            width: 120
+        },{
+            text: '采购单号',
+            dataIndex: 'pd_ordercode',
             width: 120
         },{
             text: '采购序号',
-            dataIndex: 'pd_detno',
+            dataIndex: 'pd_orderdetno',
             xtype:'numbercolumn',
             width: 120
         },{
@@ -198,18 +189,28 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
             dataIndex: 'pd_prodcode',
             width: 120
         },{
-            text: '数量',
-            dataIndex: 'pd_qty',
+            text: '验收数量',
+            dataIndex: 'pd_inqty',
             xtype:'numbercolumn',
             width: 120
         },{
-            text: '单价',
-            dataIndex: 'pd_price',
+            text: '采购单价',
+            dataIndex: 'pd_orderprice',
+            xtype:'numbercolumn',
+            width: 120
+        },{
+            text: '金额',
+            dataIndex: 'pd_total',
             xtype:'numbercolumn',
             width: 120
         },{
-            text: '已转数',
-            dataIndex: 'pd_ytqy',
+            text: '税率',
+            dataIndex: 'pd_taxrate',
+            xtype:'numbercolumn',
+            width: 120
+        },{
+            text: '成本单价',
+            dataIndex: 'pd_price',
             xtype:'numbercolumn',
             width: 120,
             flex: 1

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

@@ -1,9 +1,5 @@
 Ext.define('saas.view.purchase.purchaseIn.QueryPanelModel', {
     extend: 'saas.view.core.query.QueryPanelModel',
-    alias: 'viewmodel.purchase-purchaseIn-queryformmodel',
+    alias: 'viewmodel.purchase-purchaseIn-queryformmodel'
 
-    data: {
-       // pu_total: '3333',
-        //pu_code: '4'
-    }
 });

+ 147 - 0
frontend/saas-web/app/view/purchase/purchaseOut/FormController.js

@@ -0,0 +1,147 @@
+Ext.define('saas.view.purchase.purchaseOut.FormController', {
+    extend: 'saas.view.core.form.FormPanelController',
+    alias: 'controller.purchase-purchaseOut-formcontroller',
+    init: function (form) {
+        var me = this;
+        this.control({
+            /**放大镜新增demo*/
+            "field[name=combo]":{
+                beforerender:function(f){
+                    f.addHandler=me.addCombo;
+                }
+            },
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pu_vendcode]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dataUrl:'http://192.168.253.41:9480/api/document/vendor/getVendorsByCondition',
+                        dbfinds:[{
+                            from:'ve_code',to:'pu_vendcode'
+                        },{
+                            from:'ve_name',to:'pu_vendname'
+                        }],
+                        dbtpls:[{
+                            field:'ve_code',width:100
+                        },{
+                            field:'ve_name',width:100
+                        }],
+                        dbColumns:[{
+                            conditionCode:'ve_id',
+                            "text": "供应商ID",
+                            "flex": 0,
+                            "dataIndex": "ve_id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            conditionCode:'ve_code',
+                            "text": "供应商编号",
+                            "flex": 1,
+                            "dataIndex": "ve_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            conditionCode:'ve_name',
+                            "text": "供应商名称",
+                            "flex": 1,
+                            "dataIndex": "ve_name",
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            conditionCode:'ve_type',
+                            "text": "供应商类型",
+                            "flex": 0,
+                            "dataIndex": "ve_type",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }]
+                    }) ;   
+
+                }
+            },
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pd_prodcode]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        conditionCode:'pr_code',
+                        dataUrl:'http://192.168.253.41:9480/api/document/product/getProductsByCondition',
+                        dbfinds:[{
+                            from:'pr_code',to:'pd_prodcode',
+                            from:'pr_unit',to:'pd_unit'
+                        }],
+                        dbtpls:[{
+                            field:'pr_code',width:100
+                        },{
+                            field:'pr_detail',width:100
+                        },{
+                            field:'pr_unit',width:100
+                        }],
+                        dbColumns:[{
+                            "text": "物料ID",
+                            "flex": 0,
+                            "dataIndex": "pr_id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "物料编号",
+                            "flex": 1,
+                            "dataIndex": "pr_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "物料名称",
+                            "flex": 1,
+                            "dataIndex": "pr_detail",
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "物料规格",
+                            "flex": 0,
+                            "dataIndex": "pr_spec",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "物料单位",
+                            "flex": 0,
+                            "dataIndex": "pr_unit",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }]
+                    }) ;   
+
+                }
+            }
+        });
+
+    },
+    addCombo:function(){
+        var combo=this.ownerCmp;
+        Ext.create('Ext.window.Window',{
+            layout:'vbox',
+            bodyPadding: 15,
+            width:500,
+            items:[{
+                fieldLabel:'实际值',
+                xtype:'textfield'
+            },{
+                fieldLabel:'显示值',
+                xtype:'textfield'
+            }],
+            buttons:[{
+                text:'确认',
+                handler:function(b){
+                    combo.setValue('ok');
+                    b.up('window').close();
+                }
+            }],
+            renderTo:this.ownerCmp.ownerCt.getEl()
+        }).show();
+
+    }
+});

+ 7 - 0
frontend/saas-web/app/view/purchase/purchaseOut/FormModel.js

@@ -0,0 +1,7 @@
+Ext.define('saas.view.purchase.purchaseOut.FormModel', {
+    extend: 'saas.view.core.form.FormPanelModel',
+    alias: 'viewmodel.purchase-purchaseOut-formmodel',
+    data: {
+        pi_class: '采购验退单'
+     }
+});

+ 246 - 0
frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js

@@ -0,0 +1,246 @@
+Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
+    extend: 'saas.view.core.form.FormPanel',
+    xtype: 'purchase-purchaseOut-formpanel',
+
+    controller: 'purchase-purchaseOut-formcontroller',
+    viewModel: 'purchase-purchaseOut-formmodel',
+    
+    _title:'采购验退单',
+    _idField: 'id',
+    _codeField: 'pi_inoutno',
+    _statusField: 'pu_status',
+    _statusCodeField: 'pu_statuscode',
+    _detnoColumn:  'pd_pdno',
+    _relationColumn: 'pd_piid',
+    _readUrl:'http://192.168.253.58:8800/purchase/read/',
+    _saveUrl:'http://192.168.253.58:8800/purchase/save',
+    _auditUrl:'http://192.168.253.58:8800/purchase/audit',
+    _deleteUrl:'http://192.168.253.58:8800/purchase/delete/',
+    _deleteDetailUrl:'http://192.168.253.58:8800/purchase/deleteItem/',
+    initId:11,
+
+    toolBtns: [{
+        xtype: 'button',
+        text: '转单按钮',
+        handler: function() {
+            console.log('11');
+        }
+    }],
+
+    defaultItems: [{
+        xtype: 'hidden',
+        name: 'id',
+        bind: '{id}',
+        fieldLabel: 'id',
+        allowBlank: true,
+        columnWidth: 0
+    }, {
+        xtype : "textfield", 
+        name : "pi_inoutno", 
+        bind : "{pi_inoutno}", 
+        fieldLabel : "验退单号", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{
+        xtype : "textfield", 
+        name : "pi_class", 
+        bind : "{pi_class}", 
+        fieldLabel : "单据类型", 
+        readOnly:true,
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "hidden", 
+        name : "pi_vendid", 
+        bind : "{pi_vendid}", 
+        fieldLabel : "供应商ID", 
+        allowBlank : true, 
+        columnWidth : 0.0
+    }, {
+        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 : "datefield", 
+        name : "pi_date", 
+        bind : "{pi_date}", 
+        fieldLabel : "单据日期", 
+        allowBlank : false, 
+        columnWidth : 0.25
+    },{
+        xtype : "textfield", 
+        name : "pi_total", 
+        bind : "{pi_total}", 
+        fieldLabel : "总额", 
+        allowBlank : true,
+        readOnly: true,
+        columnWidth : 0.25
+    }, {
+        xtype : "textfield", 
+        name : "pi_pucode", 
+        bind : "{pi_pucode}", 
+        fieldLabel : "采购单号", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        name : "detailGridField", 
+        xtype : "detailGridField", 
+        columns : [
+            {
+                text : "序号", 
+                dataIndex : "pd_pdno", 
+                width : 100, 
+                xtype : "numbercolumn",
+                align : 'center',
+                format:'0',
+                summaryType: 'count',
+                summaryRenderer: function(value, summaryData, dataIndex) {
+                    return Ext.String.format('合计: {0}条', value);
+                },
+            }, {
+                text : "id", 
+                dataIndex : "id", 
+                xtype : "numbercolumn"
+            },
+            {
+                text : "物料编号", 
+                width : 200.0, 
+                dataIndex : "pd_prodcode", 
+                xtype : "", 
+                items : null,
+                editor : {
+                    displayField : "display", 
+                    editable : true, 
+                    format : "", 
+                    hideTrigger : false, 
+                    maxLength : 100.0, 
+                    minValue : null, 
+                    positiveNum : false, 
+                    queryMode : "local", 
+                    store : null, 
+                    valueField : "value", 
+                    xtype : "dbfindtrigger"
+                }
+            },
+            {
+                text : "名称", 
+                dataIndex : "pr_detail",
+                ignore:true
+            },
+            {
+                text : "规格", 
+                dataIndex : "pr_spec",
+                ignore:true
+            }, 
+            {
+                text : "验退数量", 
+                dataIndex : "pd_outqty", 
+                editor : {
+                    xtype : "numberfield"
+                },
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                format:'0',
+                items : null,
+                summaryType: 'sum'
+            }, 
+            {
+                text : "仓库", 
+                dataIndex : "pd_whname", 
+                width : 120.0, 
+                items : null,
+                editor : {
+                    displayField : "display", 
+                    editable : true, 
+                    format : "", 
+                    hideTrigger : false, 
+                    maxLength : 100.0, 
+                    minValue : null, 
+                    positiveNum : false, 
+                    queryMode : "local", 
+                    store : null, 
+                    valueField : "value", 
+                    xtype : "dbfindtrigger"
+                }
+            },
+            {
+                text : "单价", 
+                dataIndex : "pd_orderprice", 
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                items : null
+            }, 
+           {
+                text : "含税金额", 
+                dataIndex : "pd_total", 
+                width : 120.0, 
+                xtype : "numbercolumn"
+            }, {
+                text : "税率", 
+                dataIndex : "pd_taxrate", 
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                items : null
+            },
+            {
+                text : "未税金额", 
+                dataIndex : "pd_nettotal", 
+                xtype : "numbercolumn"
+            },
+            {
+                text : "采购单号", 
+                dataIndex : "pd_ordercode", 
+                width : 120.0
+            },{
+                text : "采购序号", 
+                dataIndex : "pd_orderdetno", 
+                xtype : "numbercolumn",
+                flex:1
+            }
+        ]
+    }, {
+        format : "Y-m-d", 
+        xtype : "datefield", 
+        name : "createTime", 
+        bind : "{createTime}", 
+        fieldLabel : "创建时间", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "datefield", 
+        name : "updateTime", 
+        bind : "{updateTime}", 
+        fieldLabel : "更新时间", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "textfield", 
+        readOnly : true, 
+        editable : false, 
+        name : "pi_status", 
+        bind : "{pi_status}", 
+        fieldLabel : "单据状态", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "hidden", 
+        readOnly : true, 
+        editable : false, 
+        name : "pi_statuscode", 
+        bind : "{pi_statuscode}", 
+        fieldLabel : "单据状态码", 
+        allowBlank : true, 
+        columnWidth : 0.0
+    }]
+});

+ 219 - 0
frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js

@@ -0,0 +1,219 @@
+Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
+    extend: 'saas.view.core.query.QueryPanel',
+    xtype: 'purchase-purchaseOut-querypanel',
+
+    controller: 'purchase-purchaseOut-queryformcontroller',
+    viewModel: 'purchase-purchaseOut-queryformmodel',
+    _baseVastUrl:'http://192.168.253.58:8800/purchase/',
+    _idField:'pi_id',
+    _codeField:'pi_inoutno',
+    queryFormItems: [{
+        xtype: 'hidden',
+        name: 'pi_id',
+        bind: '{pi_id}',
+        fieldLabel: 'ID',
+        allowBlank: true,
+        columnWidth: 0
+    }, {
+        xtype: 'textfield',
+        name: 'pi_inoutno',
+        bind: '{pi_inoutno}',
+        fieldLabel: '单据编号',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'condatefield',
+        name: 'pi_date',
+        bind: '{pi_date}',
+        fieldLabel: '单据日期',
+        allowBlank: true,
+        columnWidth: 0.5
+    }, {
+        xtype: 'textfield',
+        name: 'pi_vendcode',
+        bind: '{pi_vendcode}',
+        fieldLabel: '供应商编号',
+        allowBlank: true,
+        hidden:true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'textfield',
+        name: 'pi_vendname',
+        bind: '{pi_vendname}',
+        fieldLabel: '供应商名称',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pd_prodcode',
+        bind: '{pd_prodcode}',
+        fieldLabel: '物料编号',
+        fieldMode: 'DETAIL',
+        queryType:'VAG',
+        hidden:true,
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pr_detail#pd_prodcode',
+        bind: '{pr_detail}',
+        fieldLabel: '物料名称',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'combobox',
+        name: 'pi_statuscode',
+        bind: '{pi_statuscode}',
+        fieldLabel: '审核状态',
+        allowBlank: true,
+        columnWidth: 0.25,
+        queryMode: 'local',
+        displayField: 'pi_status',
+        valueField: 'pi_statuscode',
+        store: Ext.create('Ext.data.ArrayStore', {
+            fields: ['pi_statuscode', 'pi_status'],
+            data: [
+                ["$ALL", "全部"],
+                ["AUDITED", "已审核"],
+                ["UNAUDITED", "未审核"]
+            ]
+        })
+    }],
+    moreQueryFormItems: [{
+        xtype: 'textfield',
+        name: 'pu_buyername',
+        bind: '{pu_buyername}',
+        fieldLabel: '采购员',
+        allowBlank: true
+    }, {
+        xtype: 'textfield',
+        name: 'pu_total',
+        bind: '{pu_total}',
+        fieldLabel: '金额',
+        allowBlank: true
+    }, {
+        xtype: 'condatefield',
+        name: 'pu_delivery',
+        bind: '{pu_delivery}',
+        fieldLabel: '交货日期',
+        allowBlank: true,
+        columnWidth: 1
+    }],
+    queryGridConfig: {
+        _idField:'pi_id',
+        _codeField:'pi_inoutno',
+        _title:'采购验退单',
+        _addXtype:'test-order-formpanel',
+        _baseVastUrl:'http://192.168.253.58:8800/purchase/',
+        _baseColumn: [{
+            text: '序号',
+            width: 80,
+            xtype: 'rownumberer'
+        }, {
+            text: 'id',
+            dataIndex: 'pi_id',
+            width: 100,
+            xtype: 'numbercolumn'
+        }, {
+            text: '单据编号',
+            dataIndex: 'pi_inoutno',
+            width: 120
+        }, {
+            text: '单据状态',
+            dataIndex: 'pi_status',
+            width: 120
+        }, {
+            text: '下单日期',
+            dataIndex: 'pi_date',
+            xtype:'datecolumn',
+            width: 200
+        },{
+            text: '采购单号',
+            dataIndex: 'pi_pucode',
+            width: 200
+        },{
+            text: '供应商名称',
+            dataIndex: 'pi_vendname',
+            width: 120
+        },{
+            text: '含税金额',
+            dataIndex: 'pi_total',
+            xtype:'numbercolumn',
+            width: 120
+        },{
+            text: '不含税金额',
+            dataIndex: 'pi_nettotal',
+            xtype:'numbercolumn',
+            width: 120,
+            flex: 1
+        }],
+        _relativeColumn: [{
+            text : "序号", 
+            dataIndex : "pd_pdno", 
+            width : 100, 
+            xtype : "numbercolumn",
+            align : 'center'
+        }, {
+            text: 'id',
+            dataIndex: 'pu_id',
+            width: 0,
+            xtype: 'numbercolumn'
+        }, {
+            text: '单据编号',
+            dataIndex: 'pd_inoutno',
+            width: 120
+        }, {
+            text: '单据状态',
+            dataIndex: 'pi_status',
+            width: 120
+        }, {
+            text: '下单日期',
+            dataIndex: 'pi_date',
+            xtype:'datecolumn',
+            width: 200
+        },{
+            text: '供应商名称',
+            dataIndex: 'pi_vendname',
+            width: 120
+        },{
+            text: '采购单号',
+            dataIndex: 'pd_ordercode',
+            width: 120
+        },{
+            text: '采购序号',
+            dataIndex: 'pd_orderdetno',
+            xtype:'numbercolumn',
+            width: 120
+        },{
+            text: '物料编号',
+            dataIndex: 'pd_prodcode',
+            width: 120
+        },{
+            text: '验退数量',
+            dataIndex: 'pd_outqty',
+            xtype:'numbercolumn',
+            width: 120
+        },{
+            text: '采购单价',
+            dataIndex: 'pd_orderprice',
+            xtype:'numbercolumn',
+            width: 120
+        },{
+            text: '金额',
+            dataIndex: 'pd_total',
+            xtype:'numbercolumn',
+            width: 120
+        },{
+            text: '税率',
+            dataIndex: 'pd_taxrate',
+            xtype:'numbercolumn',
+            width: 120
+        },{
+            text: '成本单价',
+            dataIndex: 'pd_price',
+            xtype:'numbercolumn',
+            width: 120,
+            flex: 1
+        }]
+    }
+});

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

@@ -0,0 +1,115 @@
+Ext.define('saas.view.purchase.purchaseOut.QueryPanelController', {
+    extend: 'saas.view.core.query.QueryPanelController',
+    alias: 'controller.purchase-purchaseOut-queryformcontroller',
+    init: function (form) {
+        var me = this;
+        this.control({
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pu_vendname]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dataUrl:'http://192.168.253.41:9480/api/document/vendor/getVendorsByCondition',
+                        dbfinds:[{
+                            from:'ve_code',to:'pu_vendcode'
+                        },{
+                            from:'ve_name',to:'pu_vendname'
+                        }],
+                        dbtpls:[{
+                            field:'ve_code',width:100
+                        },{
+                            field:'ve_name',width:100
+                        }],
+                        dbColumns:[{
+                            conditionCode:'ve_id',
+                            "text": "供应商ID",
+                            "flex": 0,
+                            "dataIndex": "ve_id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            conditionCode:'ve_code',
+                            "text": "供应商编号",
+                            "flex": 1,
+                            "dataIndex": "ve_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            conditionCode:'ve_name',
+                            "text": "供应商名称",
+                            "flex": 1,
+                            "dataIndex": "ve_name",
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            conditionCode:'ve_type',
+                            "text": "供应商类型",
+                            "flex": 0,
+                            "dataIndex": "ve_type",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }]
+                    }) ;   
+
+                }
+            },
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pd_prodcode]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        conditionCode:'pr_code',
+                        dataUrl:'http://192.168.253.41:9480/api/document/product/getProductsByCondition',
+                        dbfinds:[{
+                            from:'pr_code',to:'pd_prodcode',
+                            from:'pr_unit',to:'pd_unit'
+                        }],
+                        dbtpls:[{
+                            field:'pr_code',width:100
+                        },{
+                            field:'pr_detail',width:100
+                        }],
+                        dbColumns:[{
+                            "text": "物料ID",
+                            "flex": 0,
+                            "dataIndex": "pr_id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "物料编号",
+                            "flex": 1,
+                            "dataIndex": "pr_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "物料名称",
+                            "flex": 1,
+                            "dataIndex": "pr_detail",
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "物料规格",
+                            "flex": 0,
+                            "dataIndex": "pr_spec",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "物料单位",
+                            "flex": 0,
+                            "dataIndex": "pr_unit",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }]
+                    }) ;   
+
+                }
+            }
+        });
+
+    }
+});

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

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