hy 8 years ago
parent
commit
3155260667
52 changed files with 2077 additions and 7144 deletions
  1. 20 0
      applications/common-dto/src/main/java/com/usoftchina/saas/common/dto/BatchDealBaseDTO.java
  2. 11 0
      applications/document/document-api/src/main/java/com/usoftchina/saas/document/api/ProductApi.java
  3. 0 44
      applications/document/document-api/src/main/resources/application.yml
  4. 0 15
      applications/document/document-api/src/main/resources/banner.txt
  5. 0 64
      applications/document/document-api/src/main/resources/logback-spring.xml
  6. 8 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductController.java
  7. 1 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/VendorController.java
  8. 1 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProductMapper.java
  9. 5 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/Impl/ProductServiceImpl.java
  10. 2 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProductService.java
  11. 4 0
      applications/document/document-server/src/main/resources/mapper/ProductMapper.xml
  12. 4 0
      applications/purchase/purchase-dto/pom.xml
  13. 27 273
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/PurchaseDTO.java
  14. 27 237
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/PurchaseItemDTO.java
  15. 55 456
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/PurchaseListDTO.java
  16. 10 0
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/PurchaseReqDTO.java
  17. 5 1
      applications/purchase/purchase-server/pom.xml
  18. 1 1
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/PurchaseApplication.java
  19. 0 36
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/config/WebMvcConfig.java
  20. 43 17
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/PurchaseController.java
  21. 2 1
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/PurchaseListMapper.java
  22. 4 21
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/PurchaseMapper.java
  23. 10 16
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/PurchasedetailMapper.java
  24. 28 224
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/Purchase.java
  25. 0 2121
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/PurchaseExample.java
  26. 41 179
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/PurchaseItem.java
  27. 54 464
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/PurchaseList.java
  28. 0 218
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/Purchasedetail.java
  29. 0 1791
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/PurchasedetailExample.java
  30. 25 4
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/PurchaseService.java
  31. 125 53
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  32. 1 1
      applications/purchase/purchase-server/src/main/resources/application.yml
  33. 126 48
      applications/purchase/purchase-server/src/main/resources/mapper/PurchaseListMapper.xml
  34. 202 490
      applications/purchase/purchase-server/src/main/resources/mapper/PurchaseMapper.xml
  35. 74 235
      applications/purchase/purchase-server/src/main/resources/mapper/PurchasedetailMapper.xml
  36. 10 0
      framework/core/src/main/java/com/usoftchina/saas/utils/StringUtils.java
  37. 8 4
      frontend/saas-web/app/util/FormUtil.js
  38. 280 0
      frontend/saas-web/app/util/QueryUtil.js
  39. 1 1
      frontend/saas-web/app/view/core/dbfind/DbfindGridPanel.js
  40. 7 126
      frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js
  41. 232 0
      frontend/saas-web/app/view/core/dbfind/DbfindTrigger2.js
  42. 63 0
      frontend/saas-web/app/view/core/query/MoreQueryFormPanel.js
  43. 47 0
      frontend/saas-web/app/view/core/query/QueryFormPanel.js
  44. 197 0
      frontend/saas-web/app/view/core/query/QueryGridPanel.js
  45. 57 0
      frontend/saas-web/app/view/core/query/QueryPanel.js
  46. 36 0
      frontend/saas-web/app/view/core/query/QueryPanelController.js
  47. 4 0
      frontend/saas-web/app/view/core/query/QueryPanelModel.js
  48. 6 0
      frontend/saas-web/app/view/main/MainModel.js
  49. 22 0
      frontend/saas-web/app/view/test/myform/FormPanel.js
  50. 177 0
      frontend/saas-web/app/view/test/query/QueryPanel.js
  51. 5 0
      frontend/saas-web/app/view/test/query/QueryPanelController.js
  52. 9 0
      frontend/saas-web/app/view/test/query/QueryPanelModel.js

+ 20 - 0
applications/common-dto/src/main/java/com/usoftchina/saas/common/dto/BatchDealBaseDTO.java

@@ -0,0 +1,20 @@
+package com.usoftchina.saas.common.dto;
+
+import java.util.List;
+
+/**
+ * 批量处理传输基础属性
+ * @author: guq
+ * @create: 2018-10-15 13:46
+ **/
+public class BatchDealBaseDTO {
+    private List<DocBaseDTO> baseDTOs;
+
+    public List<DocBaseDTO> getBaseDTOs() {
+        return baseDTOs;
+    }
+
+    public void setBaseDTOs(List<DocBaseDTO> baseDTOs) {
+        this.baseDTOs = baseDTOs;
+    }
+}

+ 11 - 0
applications/document/document-api/src/main/java/com/usoftchina/saas/document/api/ProductApi.java

@@ -4,6 +4,7 @@ import com.usoftchina.saas.document.dto.ProductDTO;
 import com.usoftchina.saas.page.PageRequest;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 
 import java.util.List;
@@ -20,4 +21,14 @@ public interface ProductApi {
     @GetMapping("/api/document/product/getProductsByCondition")
     public List<ProductDTO> getProductsByCondition(@RequestParam(value = "page") PageRequest page, @RequestParam(value = "condition") String condition);
 
+    /**
+    * @Description
+    * 更新最新采购单价
+    * @Param: [pu_id]
+    * @return: void
+    * @Author: guq
+    * @Date: 2018/10/16
+    */
+    @RequestMapping("/api/document/product/updateLatestPurchasePrice")
+    public void updateLatestPurchasePrice(@RequestParam(value = "id") Long pu_id);
 }

+ 0 - 44
applications/document/document-api/src/main/resources/application.yml

@@ -1,44 +0,0 @@
-spring:
-  application:
-    name: document-api
-  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
-    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
-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: 9481
-  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@'
-auth:
-  public-key: auth/pub.key

+ 0 - 15
applications/document/document-api/src/main/resources/banner.txt

@@ -1,15 +0,0 @@
-${AnsiColor.BRIGHT_YELLOW}
-
-88        88   ad88888ba     ,ad8888ba,    88888888888  888888888888  ,ad8888ba,   88        88  88  888b      88         db
-88        88  d8"     "8b   d8"'    `"8b   88                88      d8"'    `"8b  88        88  88  8888b     88        d88b
-88        88  Y8,          d8'        `8b  88                88     d8'            88        88  88  88 `8b    88       d8'`8b
-88        88  `Y8aaaaa,    88          88  88aaaaa           88     88             88aaaaaaaa88  88  88  `8b   88      d8'  `8b
-88        88    `"""""8b,  88          88  88"""""           88     88             88""""""""88  88  88   `8b  88     d8YaaaaY8b
-88        88          `8b  Y8,        ,8P  88                88     Y8,            88        88  88  88    `8b 88    d8""""""""8b
-Y8a.    .a8P  Y8a     a8P   Y8a.    .a8P   88                88      Y8a.    .a8P  88        88  88  88     `8888   d8'        `8b
- `"Y8888Y"'    "Y88888P"     `"Y8888Y"'    88                88       `"Y8888Y"'   88        88  88  88      `888  d8'          `8b
-
-
-Application Version: ${application.version}${application.formatted-version}
-Spring Boot Version: ${spring-boot.version}${spring-boot.formatted-version}
-${AnsiColor.DEFAULT}

+ 0 - 64
applications/document/document-api/src/main/resources/logback-spring.xml

@@ -1,64 +0,0 @@
-<?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/document-api"/>
-    <springProperty scope="context" name="spring.application.name" source="spring.application.name" defaultValue="document-api"/>
-    <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>

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

@@ -7,23 +7,29 @@ import com.usoftchina.saas.page.PageRequest;
 import feign.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.bind.annotation.RestController;
 
 import java.util.List;
 
 @RestController
-@RequestMapping("/api/document/product")
+@RequestMapping("/product")
 public class ProductController {
 
     @Autowired
     private ProductService productService;
 
     @RequestMapping("/getProductsByCondition")
-    @ResponseBody
     public List<Product> getProductsByCondition(PageRequest page, DocReqDTO docReqDTO){
         List<Product> productList = productService.getProductsByCondition(page, docReqDTO);
         return productList;
     }
 
+    @RequestMapping("/updateLatestPurchasePrice")
+    public void updateLatestPurchasePrice(@RequestParam(value = "id") Long pu_id) {
+        productService.updateLatestPurchasePrice(pu_id);
+    };
+
+
 }

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

@@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
 import java.util.List;
 
 @RestController
-@RequestMapping("/api/document/vendor")
+@RequestMapping("/vendor")
 public class VendorController {
 
     @Autowired

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

@@ -10,5 +10,6 @@ import java.util.List;
 public interface ProductMapper extends CommonBaseMapper<Product> {
 
     List<Product> getProductsByCondition(DocReqDTO docReqDTO);
+    void updateLatestPurchasePrice(Long pu_id);
 
 }

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

@@ -35,4 +35,9 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
         PageInfo<Product> pageInfo = new PageInfo<Product>(productList);
         return productList;
     }
+
+    @Override
+    public void updateLatestPurchasePrice(Long pu_id) {
+        productMapper.updateLatestPurchasePrice(pu_id);
+    }
 }

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

@@ -11,4 +11,6 @@ import java.util.List;
 public interface ProductService extends CommonBaseService<ProductMapper, Product> {
 
     List<Product> getProductsByCondition(PageRequest page, DocReqDTO docReqDTO);
+
+    void updateLatestPurchasePrice(Long pu_id);
 }

+ 4 - 0
applications/document/document-server/src/main/resources/mapper/ProductMapper.xml

@@ -44,5 +44,9 @@
         </where>
 
     </select>
+    <update id="updateLatestPurchasePrice" parameterType="long">
+        update product a set pr_purcprice=(select pd_price from purchasedetail WHERE
+        a.pr_code = pd_prodcode and pd_puid = #{id}) where pr_code in (select pd_prodcode from purchasedetail where pd_puid=#{id})
+    </update>
 </mapper>
 

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

@@ -22,5 +22,9 @@
             <artifactId>springfox-swagger2</artifactId>
             <scope>compile</scope>
         </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
     </dependencies>
 </project>

+ 27 - 273
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/PurchaseDTO.java

@@ -3,6 +3,7 @@ package com.usoftchina.saas.purchase.dto;
 import com.usoftchina.saas.common.dto.DocBaseDTO;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
 
 import java.io.Serializable;
 import java.util.Date;
@@ -11,6 +12,7 @@ import java.util.Date;
  * @author yingp
  * @date 2018/10/9
  */
+@Data
 @ApiModel(value = "Purchase", description = "采购订单")
 public class PurchaseDTO implements Serializable{
     protected Long id;
@@ -23,301 +25,53 @@ public class PurchaseDTO implements Serializable{
     protected Date updateTime;
     protected long updaterId;
 
-    private String puCode;
+    private String pu_code;
 
-    private Date puDate;
+    private Date pu_date;
 
-    private Integer puVendid;
+    private Integer pu_vendid;
 
-    private String puVendcode;
+    private String pu_vendcode;
 
-    private String puVendname;
+    private String pu_vendname;
 
-    private Integer puBuyerid;
+    private Integer pu_buyerid;
 
-    private String puBuyercode;
+    private String pu_buyercode;
 
-    private String puBuyername;
+    private String pu_buyername;
 
-    private Date puDelivery;
+    private Date pu_delivery;
 
-    private Double puTaxtotal;
+    private Double pu_taxtotal;
 
-    private Double puTotal;
+    private Double pu_total;
 
-    private String puRemark;
+    private String pu_remark;
 
-    private String puTotalupper;
+    private String pu_totalupper;
 
-    private String puPrintstatus;
+    private String pu_printstatus;
 
-    public Long getId() {
-        return id;
-    }
+    private String pu_printstatuscode;
 
-    public void setId(Long id) {
-        this.id = id;
-    }
+    private String pu_acceptstatuscode;
 
-    public long getCompanyId() {
-        return companyId;
-    }
+    private String pu_acceptstatus;
 
-    public void setCompanyId(long companyId) {
-        this.companyId = companyId;
-    }
+    private String pu_statuscode;
 
-    public Date getCreateTime() {
-        return createTime;
-    }
+    private String pu_status;
 
-    public void setCreateTime(Date createTime) {
-        this.createTime = createTime;
-    }
+    private String pu_text1;
 
-    public long getCreatorId() {
-        return creatorId;
-    }
+    private String pu_text2;
 
-    public void setCreatorId(long creatorId) {
-        this.creatorId = creatorId;
-    }
+    private String pu_text3;
 
-    public Date getUpdateTime() {
-        return updateTime;
-    }
+    private String pu_text4;
 
-    public void setUpdateTime(Date updateTime) {
-        this.updateTime = updateTime;
-    }
+    private String pu_text5;
 
-    public long getUpdaterId() {
-        return updaterId;
-    }
-
-    public void setUpdaterId(long updaterId) {
-        this.updaterId = updaterId;
-    }
-
-    public String getPuCode() {
-        return puCode;
-    }
-
-    public void setPuCode(String puCode) {
-        this.puCode = puCode;
-    }
-
-    public Date getPuDate() {
-        return puDate;
-    }
-
-    public void setPuDate(Date puDate) {
-        this.puDate = puDate;
-    }
-
-    public Integer getPuVendid() {
-        return puVendid;
-    }
-
-    public void setPuVendid(Integer puVendid) {
-        this.puVendid = puVendid;
-    }
-
-    public String getPuVendcode() {
-        return puVendcode;
-    }
-
-    public void setPuVendcode(String puVendcode) {
-        this.puVendcode = puVendcode;
-    }
-
-    public String getPuVendname() {
-        return puVendname;
-    }
-
-    public void setPuVendname(String puVendname) {
-        this.puVendname = puVendname;
-    }
-
-    public Integer getPuBuyerid() {
-        return puBuyerid;
-    }
-
-    public void setPuBuyerid(Integer puBuyerid) {
-        this.puBuyerid = puBuyerid;
-    }
-
-    public String getPuBuyercode() {
-        return puBuyercode;
-    }
-
-    public void setPuBuyercode(String puBuyercode) {
-        this.puBuyercode = puBuyercode;
-    }
-
-    public String getPuBuyername() {
-        return puBuyername;
-    }
-
-    public void setPuBuyername(String puBuyername) {
-        this.puBuyername = puBuyername;
-    }
-
-    public Date getPuDelivery() {
-        return puDelivery;
-    }
-
-    public void setPuDelivery(Date puDelivery) {
-        this.puDelivery = puDelivery;
-    }
-
-    public Double getPuTaxtotal() {
-        return puTaxtotal;
-    }
-
-    public void setPuTaxtotal(Double puTaxtotal) {
-        this.puTaxtotal = puTaxtotal;
-    }
-
-    public Double getPuTotal() {
-        return puTotal;
-    }
-
-    public void setPuTotal(Double puTotal) {
-        this.puTotal = puTotal;
-    }
-
-    public String getPuRemark() {
-        return puRemark;
-    }
-
-    public void setPuRemark(String puRemark) {
-        this.puRemark = puRemark;
-    }
-
-    public String getPuTotalupper() {
-        return puTotalupper;
-    }
-
-    public void setPuTotalupper(String puTotalupper) {
-        this.puTotalupper = puTotalupper;
-    }
-
-    public String getPuPrintstatus() {
-        return puPrintstatus;
-    }
-
-    public void setPuPrintstatus(String puPrintstatus) {
-        this.puPrintstatus = puPrintstatus;
-    }
-
-    public String getPuPrintstatuscode() {
-        return puPrintstatuscode;
-    }
-
-    public void setPuPrintstatuscode(String puPrintstatuscode) {
-        this.puPrintstatuscode = puPrintstatuscode;
-    }
-
-    public String getPuAcceptstatuscode() {
-        return puAcceptstatuscode;
-    }
-
-    public void setPuAcceptstatuscode(String puAcceptstatuscode) {
-        this.puAcceptstatuscode = puAcceptstatuscode;
-    }
-
-    public String getPuAcceptstatus() {
-        return puAcceptstatus;
-    }
-
-    public void setPuAcceptstatus(String puAcceptstatus) {
-        this.puAcceptstatus = puAcceptstatus;
-    }
-
-    public String getPuStatuscode() {
-        return puStatuscode;
-    }
-
-    public void setPuStatuscode(String puStatuscode) {
-        this.puStatuscode = puStatuscode;
-    }
-
-    public String getPuStatus() {
-        return puStatus;
-    }
-
-    public void setPuStatus(String puStatus) {
-        this.puStatus = puStatus;
-    }
-
-    public String getPuText1() {
-        return puText1;
-    }
-
-    public void setPuText1(String puText1) {
-        this.puText1 = puText1;
-    }
-
-    public String getPuText2() {
-        return puText2;
-    }
-
-    public void setPuText2(String puText2) {
-        this.puText2 = puText2;
-    }
-
-    public String getPuText3() {
-        return puText3;
-    }
-
-    public void setPuText3(String puText3) {
-        this.puText3 = puText3;
-    }
-
-    public String getPuText4() {
-        return puText4;
-    }
-
-    public void setPuText4(String puText4) {
-        this.puText4 = puText4;
-    }
-
-    public String getPuText5() {
-        return puText5;
-    }
-
-    public void setPuText5(String puText5) {
-        this.puText5 = puText5;
-    }
-
-    public String getPuShipaddresscode() {
-        return puShipaddresscode;
-    }
-
-    public void setPuShipaddresscode(String puShipaddresscode) {
-        this.puShipaddresscode = puShipaddresscode;
-    }
-
-    private String puPrintstatuscode;
-
-    private String puAcceptstatuscode;
-
-    private String puAcceptstatus;
-
-    private String puStatuscode;
-
-    private String puStatus;
-
-    private String puText1;
-
-    private String puText2;
-
-    private String puText3;
-
-    private String puText4;
-
-    private String puText5;
-
-    private String puShipaddresscode;
+    private String pu_shipaddresscode;
 }

+ 27 - 237
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/PurchaseItemDTO.java

@@ -2,6 +2,7 @@ package com.usoftchina.saas.purchase.dto;
 
 import com.usoftchina.saas.common.dto.DocBaseDTO;
 import com.usoftchina.saas.common.dto.ProductBaseDTO;
+import lombok.Data;
 
 import java.io.Serializable;
 import java.util.Date;
@@ -10,275 +11,64 @@ import java.util.Date;
  * @author yingp
  * @date 2018/10/9
  */
+@Data
 public class PurchaseItemDTO implements Serializable{
     protected Long id;
 
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public long getCompanyId() {
-        return companyId;
-    }
-
-    public void setCompanyId(long companyId) {
-        this.companyId = companyId;
-    }
-
     /**
      * company id
 
      */
     protected long companyId;
 
-    public Date getCreateTime() {
-        return createTime;
-    }
-
-    public void setCreateTime(Date createTime) {
-        this.createTime = createTime;
-    }
-
-    public long getCreatorId() {
-        return creatorId;
-    }
-
-    public void setCreatorId(long creatorId) {
-        this.creatorId = creatorId;
-    }
-
-    public Date getUpdateTime() {
-        return updateTime;
-    }
-
-    public void setUpdateTime(Date updateTime) {
-        this.updateTime = updateTime;
-    }
-
-    public long getUpdaterId() {
-        return updaterId;
-    }
-
-    public void setUpdaterId(long updaterId) {
-        this.updaterId = updaterId;
-    }
-
-    public Integer getPdPuid() {
-        return pdPuid;
-    }
-
-    public void setPdPuid(Integer pdPuid) {
-        this.pdPuid = pdPuid;
-    }
-
-    public String getPdCode() {
-        return pdCode;
-    }
-
-    public void setPdCode(String pdCode) {
-        this.pdCode = pdCode;
-    }
-
-    public Integer getPdDetno() {
-        return pdDetno;
-    }
-
-    public void setPdDetno(Integer pdDetno) {
-        this.pdDetno = pdDetno;
-    }
-
-    public Integer getPdProdid() {
-        return pdProdid;
-    }
-
-    public void setPdProdid(Integer pdProdid) {
-        this.pdProdid = pdProdid;
-    }
-
-    public String getPdProdcode() {
-        return pdProdcode;
-    }
-
-    public void setPdProdcode(String pdProdcode) {
-        this.pdProdcode = pdProdcode;
-    }
-
-    public String getPdUnit() {
-        return pdUnit;
-    }
-
-    public void setPdUnit(String pdUnit) {
-        this.pdUnit = pdUnit;
-    }
-
-    public Double getPdQty() {
-        return pdQty;
-    }
-
-    public void setPdQty(Double pdQty) {
-        this.pdQty = pdQty;
-    }
-
-    public Double getPdPrice() {
-        return pdPrice;
-    }
-
-    public void setPdPrice(Double pdPrice) {
-        this.pdPrice = pdPrice;
-    }
-
-    public Double getPdTotal() {
-        return pdTotal;
-    }
-
-    public void setPdTotal(Double pdTotal) {
-        this.pdTotal = pdTotal;
-    }
-
-    public Double getPdTaxtotal() {
-        return pdTaxtotal;
-    }
-
-    public void setPdTaxtotal(Double pdTaxtotal) {
-        this.pdTaxtotal = pdTaxtotal;
-    }
-
-    public Double getPdAcceptqty() {
-        return pdAcceptqty;
-    }
-
-    public void setPdAcceptqty(Double pdAcceptqty) {
-        this.pdAcceptqty = pdAcceptqty;
-    }
-
-    public Double getPdDelivery() {
-        return pdDelivery;
-    }
-
-    public void setPdDelivery(Double pdDelivery) {
-        this.pdDelivery = pdDelivery;
-    }
-
-    public String getPdSalecode() {
-        return pdSalecode;
-    }
-
-    public void setPdSalecode(String pdSalecode) {
-        this.pdSalecode = pdSalecode;
-    }
-
-    public Integer getPdSaledetno() {
-        return pdSaledetno;
-    }
-
-    public void setPdSaledetno(Integer pdSaledetno) {
-        this.pdSaledetno = pdSaledetno;
-    }
-
-    public Integer getPdSdid() {
-        return pdSdid;
-    }
-
-    public void setPdSdid(Integer pdSdid) {
-        this.pdSdid = pdSdid;
-    }
-
-    public String getPdText1() {
-        return pdText1;
-    }
-
-    public void setPdText1(String pdText1) {
-        this.pdText1 = pdText1;
-    }
-
-    public String getPdText2() {
-        return pdText2;
-    }
-
-    public void setPdText2(String pdText2) {
-        this.pdText2 = pdText2;
-    }
-
-    public String getPdText3() {
-        return pdText3;
-    }
-
-    public void setPdText3(String pdText3) {
-        this.pdText3 = pdText3;
-    }
-
-    public String getPdText4() {
-        return pdText4;
-    }
-
-    public void setPdText4(String pdText4) {
-        this.pdText4 = pdText4;
-    }
-
-    public String getPdText5() {
-        return pdText5;
-    }
-
-    public void setPdText5(String pdText5) {
-        this.pdText5 = pdText5;
-    }
-
-    public Double getPdYqty() {
-        return pdYqty;
-    }
-
-    public void setPdYqty(Double pdYqty) {
-        this.pdYqty = pdYqty;
-    }
-
     protected Date createTime;
+
     protected long creatorId;
+
     protected Date updateTime;
+
     protected long updaterId;
-    private Integer pdPuid;
 
-    private String pdCode;
+    private  Long pd_puid;
+
+    private String pd_code;
 
-    private Integer pdDetno;
+    private Integer pd_detno;
 
-    private Integer pdProdid;
+    private Integer pd_prodid;
 
-    private String pdProdcode;
+    private String pd_prodcode;
 
-    private String pdUnit;
+    private String pd_unit;
 
-    private Double pdQty;
+    private Double pd_qty;
 
-    private Double pdPrice;
+    private Double pd_price;
 
-    private Double pdTotal;
+    private Double pd_total;
 
-    private Double pdTaxtotal;
+    private Double pd_taxtotal;
 
-    private Double pdAcceptqty;
+    private Double pd_acceptqty;
 
-    private Double pdDelivery;
+    private Double pd_delivery;
 
-    private String pdSalecode;
+    private String pd_salecode;
 
-    private Integer pdSaledetno;
+    private Integer pd_saledetno;
 
-    private Integer pdSdid;
+    private Integer pd_sdid;
 
-    private String pdText1;
+    private String pd_text1;
 
-    private String pdText2;
+    private String pd_text2;
 
-    private String pdText3;
+    private String pd_text3;
 
-    private String pdText4;
+    private String pd_text4;
 
-    private String pdText5;
+    private String pd_text5;
 
-    private Double pdYqty;
+    private Double pd_yqty;
 
 }

+ 55 - 456
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/PurchaseListDTO.java

@@ -1,5 +1,7 @@
 package com.usoftchina.saas.purchase.dto;
 
+import lombok.Data;
+
 import java.io.Serializable;
 import java.math.BigDecimal;
 import java.util.Date;
@@ -10,515 +12,112 @@ import java.util.Date;
  * @author yingp
  * @date 2018/10/9
  */
+@Data
 public class PurchaseListDTO implements Serializable {
+    //主表信息
     protected long companyId;
 
-    protected Date updateTime;
-
-    public long getCompanyId() {
-        return companyId;
-    }
-
-    public void setCompanyId(long companyId) {
-        this.companyId = companyId;
-    }
-
-    public Date getUpdateTime() {
-        return updateTime;
-    }
-
-    public void setUpdateTime(Date updateTime) {
-        this.updateTime = updateTime;
-    }
-
-    public long getUpdaterId() {
-        return updaterId;
-    }
-
-    public void setUpdaterId(long updaterId) {
-        this.updaterId = updaterId;
-    }
-
-    public Integer getPuId() {
-        return puId;
-    }
-
-    public void setPuId(Integer puId) {
-        this.puId = puId;
-    }
-
-    public String getPuCode() {
-        return puCode;
-    }
-
-    public void setPuCode(String puCode) {
-        this.puCode = puCode;
-    }
-
-    public Date getPuDate() {
-        return puDate;
-    }
-
-    public void setPuDate(Date puDate) {
-        this.puDate = puDate;
-    }
-
-    public Integer getPuVendid() {
-        return puVendid;
-    }
-
-    public void setPuVendid(Integer puVendid) {
-        this.puVendid = puVendid;
-    }
-
-    public String getPuVendcode() {
-        return puVendcode;
-    }
-
-    public void setPuVendcode(String puVendcode) {
-        this.puVendcode = puVendcode;
-    }
-
-    public String getPuVendname() {
-        return puVendname;
-    }
-
-    public void setPuVendname(String puVendname) {
-        this.puVendname = puVendname;
-    }
-
-    public Integer getPuBuyerid() {
-        return puBuyerid;
-    }
-
-    public void setPuBuyerid(Integer puBuyerid) {
-        this.puBuyerid = puBuyerid;
-    }
-
-    public String getPuBuyercode() {
-        return puBuyercode;
-    }
-
-    public void setPuBuyercode(String puBuyercode) {
-        this.puBuyercode = puBuyercode;
-    }
-
-    public String getPuBuyername() {
-        return puBuyername;
-    }
-
-    public void setPuBuyername(String puBuyername) {
-        this.puBuyername = puBuyername;
-    }
-
-    public Date getPuDelivery() {
-        return puDelivery;
-    }
-
-    public void setPuDelivery(Date puDelivery) {
-        this.puDelivery = puDelivery;
-    }
-
-    public Double getPuTaxtotal() {
-        return puTaxtotal;
-    }
-
-    public void setPuTaxtotal(Double puTaxtotal) {
-        this.puTaxtotal = puTaxtotal;
-    }
-
-    public Double getPuTotal() {
-        return puTotal;
-    }
-
-    public void setPuTotal(Double puTotal) {
-        this.puTotal = puTotal;
-    }
-
-    public String getPuRemark() {
-        return puRemark;
-    }
-
-    public void setPuRemark(String puRemark) {
-        this.puRemark = puRemark;
-    }
-
-    public String getPuTotalupper() {
-        return puTotalupper;
-    }
-
-    public void setPuTotalupper(String puTotalupper) {
-        this.puTotalupper = puTotalupper;
-    }
-
-    public String getPuPrintstatus() {
-        return puPrintstatus;
-    }
-
-    public void setPuPrintstatus(String puPrintstatus) {
-        this.puPrintstatus = puPrintstatus;
-    }
-
-    public String getPuPrintstatuscode() {
-        return puPrintstatuscode;
-    }
-
-    public void setPuPrintstatuscode(String puPrintstatuscode) {
-        this.puPrintstatuscode = puPrintstatuscode;
-    }
-
-    public String getPuAcceptstatuscode() {
-        return puAcceptstatuscode;
-    }
-
-    public void setPuAcceptstatuscode(String puAcceptstatuscode) {
-        this.puAcceptstatuscode = puAcceptstatuscode;
-    }
-
-    public String getPuAcceptstatus() {
-        return puAcceptstatus;
-    }
-
-    public void setPuAcceptstatus(String puAcceptstatus) {
-        this.puAcceptstatus = puAcceptstatus;
-    }
-
-    public String getPuStatuscode() {
-        return puStatuscode;
-    }
-
-    public void setPuStatuscode(String puStatuscode) {
-        this.puStatuscode = puStatuscode;
-    }
-
-    public String getPuStatus() {
-        return puStatus;
-    }
-
-    public void setPuStatus(String puStatus) {
-        this.puStatus = puStatus;
-    }
-
-    public String getPuText1() {
-        return puText1;
-    }
-
-    public void setPuText1(String puText1) {
-        this.puText1 = puText1;
-    }
-
-    public String getPuText2() {
-        return puText2;
-    }
-
-    public void setPuText2(String puText2) {
-        this.puText2 = puText2;
-    }
+    protected Date createTime;
 
-    public String getPuText3() {
-        return puText3;
-    }
-
-    public void setPuText3(String puText3) {
-        this.puText3 = puText3;
-    }
-
-    public String getPuText4() {
-        return puText4;
-    }
-
-    public void setPuText4(String puText4) {
-        this.puText4 = puText4;
-    }
-
-    public String getPuText5() {
-        return puText5;
-    }
-
-    public void setPuText5(String puText5) {
-        this.puText5 = puText5;
-    }
-
-    public String getPuShipaddresscode() {
-        return puShipaddresscode;
-    }
-
-    public void setPuShipaddresscode(String puShipaddresscode) {
-        this.puShipaddresscode = puShipaddresscode;
-    }
-
-    public Integer getPdId() {
-        return pdId;
-    }
-
-    public void setPdId(Integer pdId) {
-        this.pdId = pdId;
-    }
-
-    public Integer getPdPuid() {
-        return pdPuid;
-    }
-
-    public void setPdPuid(Integer pdPuid) {
-        this.pdPuid = pdPuid;
-    }
-
-    public String getPdCode() {
-        return pdCode;
-    }
-
-    public void setPdCode(String pdCode) {
-        this.pdCode = pdCode;
-    }
-
-    public Integer getPdDetno() {
-        return pdDetno;
-    }
-
-    public void setPdDetno(Integer pdDetno) {
-        this.pdDetno = pdDetno;
-    }
-
-    public Integer getPdProdid() {
-        return pdProdid;
-    }
-
-    public void setPdProdid(Integer pdProdid) {
-        this.pdProdid = pdProdid;
-    }
-
-    public String getPdProdcode() {
-        return pdProdcode;
-    }
-
-    public void setPdProdcode(String pdProdcode) {
-        this.pdProdcode = pdProdcode;
-    }
-
-    public String getPdUnit() {
-        return pdUnit;
-    }
-
-    public void setPdUnit(String pdUnit) {
-        this.pdUnit = pdUnit;
-    }
-
-    public Double getPdQty() {
-        return pdQty;
-    }
-
-    public void setPdQty(Double pdQty) {
-        this.pdQty = pdQty;
-    }
-
-    public Double getPdPrice() {
-        return pdPrice;
-    }
-
-    public void setPdPrice(Double pdPrice) {
-        this.pdPrice = pdPrice;
-    }
-
-    public Double getPdTotal() {
-        return pdTotal;
-    }
-
-    public void setPdTotal(Double pdTotal) {
-        this.pdTotal = pdTotal;
-    }
-
-    public Double getPdTaxtotal() {
-        return pdTaxtotal;
-    }
-
-    public void setPdTaxtotal(Double pdTaxtotal) {
-        this.pdTaxtotal = pdTaxtotal;
-    }
-
-    public Double getPdAcceptqty() {
-        return pdAcceptqty;
-    }
-
-    public void setPdAcceptqty(Double pdAcceptqty) {
-        this.pdAcceptqty = pdAcceptqty;
-    }
-
-    public Double getPdDelivery() {
-        return pdDelivery;
-    }
-
-    public void setPdDelivery(Double pdDelivery) {
-        this.pdDelivery = pdDelivery;
-    }
-
-    public String getPdSalecode() {
-        return pdSalecode;
-    }
-
-    public void setPdSalecode(String pdSalecode) {
-        this.pdSalecode = pdSalecode;
-    }
-
-    public Integer getPdSaledetno() {
-        return pdSaledetno;
-    }
-
-    public void setPdSaledetno(Integer pdSaledetno) {
-        this.pdSaledetno = pdSaledetno;
-    }
-
-    public Integer getPdSdid() {
-        return pdSdid;
-    }
-
-    public void setPdSdid(Integer pdSdid) {
-        this.pdSdid = pdSdid;
-    }
-
-    public String getPdText1() {
-        return pdText1;
-    }
-
-    public void setPdText1(String pdText1) {
-        this.pdText1 = pdText1;
-    }
-
-    public String getPdText2() {
-        return pdText2;
-    }
-
-    public void setPdText2(String pdText2) {
-        this.pdText2 = pdText2;
-    }
-
-    public String getPdText3() {
-        return pdText3;
-    }
-
-    public void setPdText3(String pdText3) {
-        this.pdText3 = pdText3;
-    }
-
-    public String getPdText4() {
-        return pdText4;
-    }
-
-    public void setPdText4(String pdText4) {
-        this.pdText4 = pdText4;
-    }
-
-    public String getPdText5() {
-        return pdText5;
-    }
-
-    public void setPdText5(String pdText5) {
-        this.pdText5 = pdText5;
-    }
-
-    public Double getPdYqty() {
-        return pdYqty;
-    }
-
-    public void setPdYqty(Double pdYqty) {
-        this.pdYqty = pdYqty;
-    }
+    protected Date updateTime;
 
     protected long updaterId;
 
-    private  Integer puId;
+    private  Integer pu_id;
 
-    private String puCode;
+    private String pu_code;
 
-    private Date puDate;
+    private Date pu_date;
 
-    private Integer puVendid;
+    private Integer pu_vendid;
 
-    private String puVendcode;
+    private String pu_vendcode;
 
-    private String puVendname;
+    private String pu_vendname;
 
-    private Integer puBuyerid;
+    private Integer pu_buyerid;
 
-    private String puBuyercode;
+    private String pu_buyercode;
 
-    private String puBuyername;
+    private String pu_buyername;
 
-    private Date puDelivery;
+    private Date pu_delivery;
 
-    private Double puTaxtotal;
+    private Double pu_taxtotal;
 
-    private Double puTotal;
+    private Double pu_total;
 
-    private String puRemark;
+    private String pu_remark;
 
-    private String puTotalupper;
+    private String pu_totalupper;
 
-    private String puPrintstatus;
+    private String pu_printstatus;
 
-    private String puPrintstatuscode;
+    private String pu_printstatuscode;
 
-    private String puAcceptstatuscode;
+    private String pu_acceptstatuscode;
 
-    private String puAcceptstatus;
+    private String pu_acceptstatus;
 
-    private String puStatuscode;
+    private String pu_statuscode;
 
-    private String puStatus;
+    private String pu_status;
 
-    private String puText1;
+    private String pu_text1;
 
-    private String puText2;
+    private String pu_text2;
 
-    private String puText3;
+    private String pu_text3;
 
-    private String puText4;
+    private String pu_text4;
 
-    private String puText5;
+    private String pu_text5;
 
-    private String puShipaddresscode;
+    private String pu_shipaddresscode;
 
-    private Integer pdId;
+    //从表字段
+    private Long pd_id;
 
-    private Integer pdPuid;
+    private  Long pd_puid;
 
-    private String pdCode;
+    private String pd_code;
 
-    private Integer pdDetno;
+    private Integer pd_detno;
 
-    private Integer pdProdid;
+    private Integer pd_prodid;
 
-    private String pdProdcode;
+    private String pd_prodcode;
 
-    private String pdUnit;
+    private String pd_unit;
 
-    private Double pdQty;
+    private Double pd_qty;
 
-    private Double pdPrice;
+    private Double pd_price;
 
-    private Double pdTotal;
+    private Double pd_total;
 
-    private Double pdTaxtotal;
+    private Double pd_taxtotal;
 
-    private Double pdAcceptqty;
+    private Double pd_acceptqty;
 
-    private Double pdDelivery;
+    private Double pd_delivery;
 
-    private String pdSalecode;
+    private String pd_salecode;
 
-    private Integer pdSaledetno;
+    private Integer pd_saledetno;
 
-    private Integer pdSdid;
+    private Integer pd_sdid;
 
-    private String pdText1;
+    private String pd_text1;
 
-    private String pdText2;
+    private String pd_text2;
 
-    private String pdText3;
+    private String pd_text3;
 
-    private String pdText4;
+    private String pd_text4;
 
-    private String pdText5;
+    private String pd_text5;
 
-    private Double pdYqty;
+    private Double pd_yqty;
 
 }

+ 10 - 0
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/PurchaseReqDTO.java

@@ -20,6 +20,8 @@ public class PurchaseReqDTO implements Serializable{
     private Date end;
     private String status;
     private String keyword;
+    //区分是否为关联列表
+    private String mode;
 
     public Date getBegin() {
         return begin;
@@ -53,6 +55,14 @@ public class PurchaseReqDTO implements Serializable{
         this.keyword = keyword;
     }
 
+    public String getMode() {
+        return mode;
+    }
+
+    public void setMode(String mode) {
+        this.mode = mode;
+    }
+
     @Override
     public String toString() {
         return "PurchaseReqDTO{" +

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

@@ -48,7 +48,11 @@
             <groupId>org.springframework.amqp</groupId>
             <artifactId>spring-rabbit</artifactId>
         </dependency>
-
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <version>1.16.10</version>
+        </dependency>
         <dependency>
             <groupId>com.github.pagehelper</groupId>
             <artifactId>pagehelper-spring-boot-starter</artifactId>

+ 1 - 1
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/PurchaseApplication.java

@@ -15,7 +15,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
 @SpringBootApplication
 @EnableEurekaClient
 @EnableTransactionManagement
-@EnableFeignClients("com.usoftchina.saas.document.api")
+@EnableFeignClients("com.usoftchina.saas")
 //@EnableAuthClient
 @MapperScan("com.usoftchina.saas.purchase.mapper")
 public class PurchaseApplication {

+ 0 - 36
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/config/WebMvcConfig.java

@@ -1,36 +0,0 @@
-package com.usoftchina.saas.purchase.config;
-
-
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.http.converter.HttpMessageConverter;
-import org.springframework.http.converter.StringHttpMessageConverter;
-import org.springframework.web.client.RestTemplate;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
-
-import java.nio.charset.Charset;
-import java.util.List;
-
-@Configuration
-public class WebMvcConfig implements WebMvcConfigurer{
-
-    @Bean
-    public HttpMessageConverter<String> responseBodyConverter() {
-        StringHttpMessageConverter converter = new StringHttpMessageConverter(Charset.forName("UTF-8"));
-        return converter;
-    }
-
-    @Override
-    public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
-        WebMvcConfigurer.super.configureMessageConverters(converters);
-        converters.add(responseBodyConverter());
-    }
-
-    @Bean
-    public RestTemplate restTemplate(){
-        RestTemplate restTemplate = new RestTemplate();
-        restTemplate.getMessageConverters().add(0, responseBodyConverter());
-        return restTemplate;
-    }
-
-}

+ 43 - 17
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/PurchaseController.java

@@ -2,19 +2,21 @@ package com.usoftchina.saas.purchase.controller;
 
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.Result;
-import com.usoftchina.saas.common.dto.DocSavedDTO;
+import com.usoftchina.saas.common.dto.BatchDealBaseDTO;
+import com.usoftchina.saas.document.api.ProductApi;
 import com.usoftchina.saas.page.PageRequest;
-import com.usoftchina.saas.purchase.dto.PurchaseFormDTO;
-import com.usoftchina.saas.purchase.dto.PurchaseListDTO;
-import com.usoftchina.saas.purchase.dto.PurchaseReqDTO;
+import com.usoftchina.saas.purchase.dto.*;
 import com.usoftchina.saas.purchase.service.PurchaseService;
+
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+
 /**
  * @author yingp
  * @date 2018/10/9
  */
+@CrossOrigin
 @RestController
 @RequestMapping("/purchase")
 public class PurchaseController {
@@ -40,8 +42,8 @@ public class PurchaseController {
      *
      * @return
      */
-    @GetMapping("/form")
-    public Result<PurchaseFormDTO> getFormData(@RequestParam int id) {
+    @GetMapping("/read")
+    public Result<PurchaseFormDTO> getFormData(@RequestParam Long id) {
         PurchaseFormDTO data = purchaseService.getFormData(id);
         return Result.success(data);
     }
@@ -49,13 +51,13 @@ public class PurchaseController {
     /**
      * 采购订单表单保存
      *
-     * @param formData
+     * @param
      * @return
      */
-    @PostMapping("/form")
-    public Result<DocSavedDTO> saveFormData(@RequestBody PurchaseFormDTO formData) {
-        Long pu_id = purchaseService.saveFormData(formData);
-        return Result.success(pu_id);
+    @PostMapping(value = "/save")
+    public Result<Long> saveFormData(@RequestBody PurchaseFormDTO data) {
+        Long id = purchaseService.saveFormData(data);
+        return Result.success(id);
     }
 
     /**
@@ -64,8 +66,8 @@ public class PurchaseController {
      * @param id
      * @return
      */
-    @DeleteMapping("/form")
-    public Result delete(@RequestParam Integer id) {
+    @GetMapping("/delete/{id}")
+    public Result delete(@PathVariable("id") Long id) {
         purchaseService.delete(id);
         return Result.success();
     }
@@ -76,8 +78,8 @@ public class PurchaseController {
      * @param id
      * @return
      */
-    @DeleteMapping("/item")
-    public Result deleteItem(@RequestParam Integer id) {
+    @GetMapping("/deleteItem/{id}")
+    public Result deleteItem(@PathVariable("id") Long id) {
         purchaseService.deleteItem(id);
         return Result.success();
     }
@@ -90,8 +92,32 @@ public class PurchaseController {
      */
     @PostMapping("/audit")
     public Result audit(@RequestBody PurchaseFormDTO formData) {
-        int affact = purchaseService.audit(formData);
-        return Result.success(affact);
+        Long id = purchaseService.audit(formData);
+        return Result.success(id);
+    }
+
+    /**
+     * 采购订单批量审核
+     *
+     * @param baseDTOs
+     * @return
+     */
+    @PostMapping("/batchAudit")
+    public Result batchAudit(@RequestBody BatchDealBaseDTO baseDTOs) {
+        purchaseService.batchAudit(baseDTOs);
+        return Result.success();
+    }
+
+    /**
+     * 采购订单批量删除
+     *
+     * @param baseDTOs
+     * @return
+     */
+    @PostMapping("/batchDelete")
+    public Result batchDelete(@RequestBody BatchDealBaseDTO baseDTOs) {
+        purchaseService.batchDelete(baseDTOs);
+        return Result.success();
     }
 
 }

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

@@ -6,5 +6,6 @@ import com.usoftchina.saas.purchase.po.PurchaseList;
 import java.util.List;
 
 public interface PurchaseListMapper {
-    List<PurchaseList> selectByCondition(PurchaseReqDTO reqDTO);
+    List<PurchaseList> selectPurchaseListByCondition(PurchaseReqDTO reqDTO);
+    List<PurchaseList> selectPurchaseBycondition(PurchaseReqDTO reqDTO);
 }

+ 4 - 21
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/PurchaseMapper.java

@@ -1,37 +1,20 @@
 package com.usoftchina.saas.purchase.mapper;
 
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.common.dto.DocBaseDTO;
 import com.usoftchina.saas.purchase.po.Purchase;
-import com.usoftchina.saas.purchase.po.PurchaseExample;
 import java.util.List;
-import org.apache.ibatis.annotations.Param;
 
 public interface PurchaseMapper extends CommonBaseMapper<Purchase>{
-    int countByExample(PurchaseExample example);
 
-    int deleteByExample(PurchaseExample example);
-
-    int deleteByPrimaryKey(Integer puId);
 
     int insert(Purchase record);
 
     int insertSelective(Purchase record);
 
-    List<Purchase> selectByExampleWithBLOBs(PurchaseExample example);
-
-    List<Purchase> selectByExample(PurchaseExample example);
-
-    Purchase selectByPrimaryKey(Integer puId);
-
-    int updateByExampleSelective(@Param("record") Purchase record, @Param("example") PurchaseExample example);
-
-    int updateByExampleWithBLOBs(@Param("record") Purchase record, @Param("example") PurchaseExample example);
-
-    int updateByExample(@Param("record") Purchase record, @Param("example") PurchaseExample example);
-
-    int updateByPrimaryKeySelective(Purchase record);
+    Purchase selectByPrimaryKey(Long id);
 
-    int updateByPrimaryKeyWithBLOBs(Purchase record);
+    String validateAudit(List<DocBaseDTO> list);
 
-    int updateByPrimaryKey(Purchase record);
+    List<Purchase> selectByTest(String con);
 }

+ 10 - 16
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/PurchasedetailMapper.java

@@ -2,34 +2,28 @@ package com.usoftchina.saas.purchase.mapper;
 
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.purchase.po.Purchase;
-import com.usoftchina.saas.purchase.po.Purchasedetail;
-import com.usoftchina.saas.purchase.po.PurchasedetailExample;
+import com.usoftchina.saas.purchase.po.PurchaseItem;
 import java.util.List;
-import org.apache.ibatis.annotations.Param;
 
 
 public interface PurchasedetailMapper extends CommonBaseMapper<Purchase> {
-    int countByExample(PurchasedetailExample example);
-
-    int deleteByExample(PurchasedetailExample example);
-
     int deleteByPrimaryKey(Integer pdId);
 
-    int insert(Purchasedetail record);
+    int insert(PurchaseItem record);
 
-    int insertSelective(Purchasedetail record);
+    int insertSelective(PurchaseItem record);
 
-    List<Purchasedetail> selectByExample(PurchasedetailExample example);
+    PurchaseItem selectByPrimaryKey(Integer pdId);
 
-    Purchasedetail selectByPrimaryKey(Integer pdId);
+    int updateByPrimaryKeySelective(PurchaseItem record);
 
-    int updateByExampleSelective(@Param("record") Purchasedetail record, @Param("example") PurchasedetailExample example);
+    int updateByPrimaryKey(PurchaseItem record);
 
-    int updateByExample(@Param("record") Purchasedetail record, @Param("example") PurchasedetailExample example);
+    void batchInsert(List<PurchaseItem> list);
 
-    int updateByPrimaryKeySelective(Purchasedetail record);
+    void batchUpdate(List<PurchaseItem> list);
 
-    int updateByPrimaryKey(Purchasedetail record);
+    void deleteByForeignKey(Long fk_id);
 
-    void batchInsert(List<Purchasedetail> list);
+    List<PurchaseItem> selectByFK(Long fk_i);
 }

+ 28 - 224
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/Purchase.java

@@ -1,259 +1,63 @@
 package com.usoftchina.saas.purchase.po;
 
 import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import lombok.Data;
+import lombok.ToString;
 
 import java.io.Serializable;
 import java.util.Date;
 
+@Data
 public class Purchase extends CommonBaseEntity implements Serializable {
 
-    private String puCode;
+    private String pu_code;
 
-    private Date puDate;
+    private Date pu_date;
 
-    private Integer puVendid;
+    private Integer pu_vendid;
 
-    private String puVendcode;
+    private String pu_vendcode;
 
-    private String puVendname;
+    private String pu_vendname;
 
-    private Integer puBuyerid;
+    private Integer pu_buyerid;
 
-    private String puBuyercode;
+    private String pu_buyercode;
 
-    private String puBuyername;
+    private String pu_buyername;
 
-    private Date puDelivery;
+    private Date pu_delivery;
 
-    private Double puTaxtotal;
+    private Double pu_taxtotal;
 
-    private Double puTotal;
+    private Double pu_total;
 
-    private String puRemark;
+    private String pu_remark;
 
-    private String puTotalupper;
+    private String pu_totalupper;
 
-    private String puPrintstatus;
+    private String pu_printstatus;
 
-    private String puPrintstatuscode;
+    private String pu_printstatuscode;
 
-    private String puAcceptstatuscode;
+    private String pu_acceptstatuscode;
 
-    private String puAcceptstatus;
+    private String pu_acceptstatus;
 
-    private String puStatuscode;
+    private String pu_statuscode;
 
-    private String puStatus;
+    private String pu_status;
 
-    private String puText1;
+    private String pu_text1;
 
-    private String puText2;
+    private String pu_text2;
 
-    private String puText3;
+    private String pu_text3;
 
-    private String puText4;
+    private String pu_text4;
 
-    private String puText5;
+    private String pu_text5;
 
-    private String puShipaddresscode;
+    private String pu_shipaddresscode;
 
-    public String getPuCode() {
-        return puCode;
-    }
-
-    public void setPuCode(String puCode) {
-        this.puCode = puCode == null ? null : puCode.trim();
-    }
-
-    public Date getPuDate() {
-        return puDate;
-    }
-
-    public void setPuDate(Date puDate) {
-        this.puDate = puDate;
-    }
-
-    public Integer getPuVendid() {
-        return puVendid;
-    }
-
-    public void setPuVendid(Integer puVendid) {
-        this.puVendid = puVendid;
-    }
-
-    public String getPuVendcode() {
-        return puVendcode;
-    }
-
-    public void setPuVendcode(String puVendcode) {
-        this.puVendcode = puVendcode == null ? null : puVendcode.trim();
-    }
-
-    public String getPuVendname() {
-        return puVendname;
-    }
-
-    public void setPuVendname(String puVendname) {
-        this.puVendname = puVendname == null ? null : puVendname.trim();
-    }
-
-    public Integer getPuBuyerid() {
-        return puBuyerid;
-    }
-
-    public void setPuBuyerid(Integer puBuyerid) {
-        this.puBuyerid = puBuyerid;
-    }
-
-    public String getPuBuyercode() {
-        return puBuyercode;
-    }
-
-    public void setPuBuyercode(String puBuyercode) {
-        this.puBuyercode = puBuyercode == null ? null : puBuyercode.trim();
-    }
-
-    public String getPuBuyername() {
-        return puBuyername;
-    }
-
-    public void setPuBuyername(String puBuyername) {
-        this.puBuyername = puBuyername == null ? null : puBuyername.trim();
-    }
-
-    public Date getPuDelivery() {
-        return puDelivery;
-    }
-
-    public void setPuDelivery(Date puDelivery) {
-        this.puDelivery = puDelivery;
-    }
-
-    public Double getPuTaxtotal() {
-        return puTaxtotal;
-    }
-
-    public void setPuTaxtotal(Double puTaxtotal) {
-        this.puTaxtotal = puTaxtotal;
-    }
-
-    public Double getPuTotal() {
-        return puTotal;
-    }
-
-    public void setPuTotal(Double puTotal) {
-        this.puTotal = puTotal;
-    }
-
-    public String getPuRemark() {
-        return puRemark;
-    }
-
-    public void setPuRemark(String puRemark) {
-        this.puRemark = puRemark == null ? null : puRemark.trim();
-    }
-
-    public String getPuTotalupper() {
-        return puTotalupper;
-    }
-
-    public void setPuTotalupper(String puTotalupper) {
-        this.puTotalupper = puTotalupper == null ? null : puTotalupper.trim();
-    }
-
-    public String getPuPrintstatus() {
-        return puPrintstatus;
-    }
-
-    public void setPuPrintstatus(String puPrintstatus) {
-        this.puPrintstatus = puPrintstatus == null ? null : puPrintstatus.trim();
-    }
-
-    public String getPuPrintstatuscode() {
-        return puPrintstatuscode;
-    }
-
-    public void setPuPrintstatuscode(String puPrintstatuscode) {
-        this.puPrintstatuscode = puPrintstatuscode == null ? null : puPrintstatuscode.trim();
-    }
-
-    public String getPuAcceptstatuscode() {
-        return puAcceptstatuscode;
-    }
-
-    public void setPuAcceptstatuscode(String puAcceptstatuscode) {
-        this.puAcceptstatuscode = puAcceptstatuscode == null ? null : puAcceptstatuscode.trim();
-    }
-
-    public String getPuAcceptstatus() {
-        return puAcceptstatus;
-    }
-
-    public void setPuAcceptstatus(String puAcceptstatus) {
-        this.puAcceptstatus = puAcceptstatus == null ? null : puAcceptstatus.trim();
-    }
-
-    public String getPuStatuscode() {
-        return puStatuscode;
-    }
-
-    public void setPuStatuscode(String puStatuscode) {
-        this.puStatuscode = puStatuscode == null ? null : puStatuscode.trim();
-    }
-
-    public String getPuStatus() {
-        return puStatus;
-    }
-
-    public void setPuStatus(String puStatus) {
-        this.puStatus = puStatus == null ? null : puStatus.trim();
-    }
-
-    public String getPuText1() {
-        return puText1;
-    }
-
-    public void setPuText1(String puText1) {
-        this.puText1 = puText1 == null ? null : puText1.trim();
-    }
-
-    public String getPuText2() {
-        return puText2;
-    }
-
-    public void setPuText2(String puText2) {
-        this.puText2 = puText2 == null ? null : puText2.trim();
-    }
-
-    public String getPuText3() {
-        return puText3;
-    }
-
-    public void setPuText3(String puText3) {
-        this.puText3 = puText3 == null ? null : puText3.trim();
-    }
-
-    public String getPuText4() {
-        return puText4;
-    }
-
-    public void setPuText4(String puText4) {
-        this.puText4 = puText4 == null ? null : puText4.trim();
-    }
-
-    public String getPuText5() {
-        return puText5;
-    }
-
-    public void setPuText5(String puText5) {
-        this.puText5 = puText5 == null ? null : puText5.trim();
-    }
-
-    public String getPuShipaddresscode() {
-        return puShipaddresscode;
-    }
-
-    public void setPuShipaddresscode(String puShipaddresscode) {
-        this.puShipaddresscode = puShipaddresscode == null ? null : puShipaddresscode.trim();
-    }
 }

+ 0 - 2121
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/PurchaseExample.java

@@ -1,2121 +0,0 @@
-package com.usoftchina.saas.purchase.po;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-public class PurchaseExample {
-    protected String orderByClause;
-
-    protected boolean distinct;
-
-    protected List<Criteria> oredCriteria;
-
-    public PurchaseExample() {
-        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 andPuIdIsNull() {
-            addCriterion("pu_id is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuIdIsNotNull() {
-            addCriterion("pu_id is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuIdEqualTo(Integer value) {
-            addCriterion("pu_id =", value, "puId");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuIdNotEqualTo(Integer value) {
-            addCriterion("pu_id <>", value, "puId");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuIdGreaterThan(Integer value) {
-            addCriterion("pu_id >", value, "puId");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuIdGreaterThanOrEqualTo(Integer value) {
-            addCriterion("pu_id >=", value, "puId");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuIdLessThan(Integer value) {
-            addCriterion("pu_id <", value, "puId");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuIdLessThanOrEqualTo(Integer value) {
-            addCriterion("pu_id <=", value, "puId");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuIdIn(List<Integer> values) {
-            addCriterion("pu_id in", values, "puId");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuIdNotIn(List<Integer> values) {
-            addCriterion("pu_id not in", values, "puId");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuIdBetween(Integer value1, Integer value2) {
-            addCriterion("pu_id between", value1, value2, "puId");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuIdNotBetween(Integer value1, Integer value2) {
-            addCriterion("pu_id not between", value1, value2, "puId");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuCodeIsNull() {
-            addCriterion("pu_code is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuCodeIsNotNull() {
-            addCriterion("pu_code is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuCodeEqualTo(String value) {
-            addCriterion("pu_code =", value, "puCode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuCodeNotEqualTo(String value) {
-            addCriterion("pu_code <>", value, "puCode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuCodeGreaterThan(String value) {
-            addCriterion("pu_code >", value, "puCode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuCodeGreaterThanOrEqualTo(String value) {
-            addCriterion("pu_code >=", value, "puCode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuCodeLessThan(String value) {
-            addCriterion("pu_code <", value, "puCode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuCodeLessThanOrEqualTo(String value) {
-            addCriterion("pu_code <=", value, "puCode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuCodeLike(String value) {
-            addCriterion("pu_code like", value, "puCode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuCodeNotLike(String value) {
-            addCriterion("pu_code not like", value, "puCode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuCodeIn(List<String> values) {
-            addCriterion("pu_code in", values, "puCode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuCodeNotIn(List<String> values) {
-            addCriterion("pu_code not in", values, "puCode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuCodeBetween(String value1, String value2) {
-            addCriterion("pu_code between", value1, value2, "puCode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuCodeNotBetween(String value1, String value2) {
-            addCriterion("pu_code not between", value1, value2, "puCode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuDateIsNull() {
-            addCriterion("pu_date is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuDateIsNotNull() {
-            addCriterion("pu_date is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuDateEqualTo(Date value) {
-            addCriterion("pu_date =", value, "puDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuDateNotEqualTo(Date value) {
-            addCriterion("pu_date <>", value, "puDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuDateGreaterThan(Date value) {
-            addCriterion("pu_date >", value, "puDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuDateGreaterThanOrEqualTo(Date value) {
-            addCriterion("pu_date >=", value, "puDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuDateLessThan(Date value) {
-            addCriterion("pu_date <", value, "puDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuDateLessThanOrEqualTo(Date value) {
-            addCriterion("pu_date <=", value, "puDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuDateIn(List<Date> values) {
-            addCriterion("pu_date in", values, "puDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuDateNotIn(List<Date> values) {
-            addCriterion("pu_date not in", values, "puDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuDateBetween(Date value1, Date value2) {
-            addCriterion("pu_date between", value1, value2, "puDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuDateNotBetween(Date value1, Date value2) {
-            addCriterion("pu_date not between", value1, value2, "puDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendidIsNull() {
-            addCriterion("pu_vendid is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendidIsNotNull() {
-            addCriterion("pu_vendid is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendidEqualTo(Integer value) {
-            addCriterion("pu_vendid =", value, "puVendid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendidNotEqualTo(Integer value) {
-            addCriterion("pu_vendid <>", value, "puVendid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendidGreaterThan(Integer value) {
-            addCriterion("pu_vendid >", value, "puVendid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendidGreaterThanOrEqualTo(Integer value) {
-            addCriterion("pu_vendid >=", value, "puVendid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendidLessThan(Integer value) {
-            addCriterion("pu_vendid <", value, "puVendid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendidLessThanOrEqualTo(Integer value) {
-            addCriterion("pu_vendid <=", value, "puVendid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendidIn(List<Integer> values) {
-            addCriterion("pu_vendid in", values, "puVendid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendidNotIn(List<Integer> values) {
-            addCriterion("pu_vendid not in", values, "puVendid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendidBetween(Integer value1, Integer value2) {
-            addCriterion("pu_vendid between", value1, value2, "puVendid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendidNotBetween(Integer value1, Integer value2) {
-            addCriterion("pu_vendid not between", value1, value2, "puVendid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendcodeIsNull() {
-            addCriterion("PU_VENDCODE is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendcodeIsNotNull() {
-            addCriterion("PU_VENDCODE is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendcodeEqualTo(String value) {
-            addCriterion("PU_VENDCODE =", value, "puVendcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendcodeNotEqualTo(String value) {
-            addCriterion("PU_VENDCODE <>", value, "puVendcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendcodeGreaterThan(String value) {
-            addCriterion("PU_VENDCODE >", value, "puVendcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendcodeGreaterThanOrEqualTo(String value) {
-            addCriterion("PU_VENDCODE >=", value, "puVendcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendcodeLessThan(String value) {
-            addCriterion("PU_VENDCODE <", value, "puVendcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendcodeLessThanOrEqualTo(String value) {
-            addCriterion("PU_VENDCODE <=", value, "puVendcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendcodeLike(String value) {
-            addCriterion("PU_VENDCODE like", value, "puVendcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendcodeNotLike(String value) {
-            addCriterion("PU_VENDCODE not like", value, "puVendcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendcodeIn(List<String> values) {
-            addCriterion("PU_VENDCODE in", values, "puVendcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendcodeNotIn(List<String> values) {
-            addCriterion("PU_VENDCODE not in", values, "puVendcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendcodeBetween(String value1, String value2) {
-            addCriterion("PU_VENDCODE between", value1, value2, "puVendcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendcodeNotBetween(String value1, String value2) {
-            addCriterion("PU_VENDCODE not between", value1, value2, "puVendcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendnameIsNull() {
-            addCriterion("PU_VENDNAME is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendnameIsNotNull() {
-            addCriterion("PU_VENDNAME is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendnameEqualTo(String value) {
-            addCriterion("PU_VENDNAME =", value, "puVendname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendnameNotEqualTo(String value) {
-            addCriterion("PU_VENDNAME <>", value, "puVendname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendnameGreaterThan(String value) {
-            addCriterion("PU_VENDNAME >", value, "puVendname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendnameGreaterThanOrEqualTo(String value) {
-            addCriterion("PU_VENDNAME >=", value, "puVendname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendnameLessThan(String value) {
-            addCriterion("PU_VENDNAME <", value, "puVendname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendnameLessThanOrEqualTo(String value) {
-            addCriterion("PU_VENDNAME <=", value, "puVendname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendnameLike(String value) {
-            addCriterion("PU_VENDNAME like", value, "puVendname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendnameNotLike(String value) {
-            addCriterion("PU_VENDNAME not like", value, "puVendname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendnameIn(List<String> values) {
-            addCriterion("PU_VENDNAME in", values, "puVendname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendnameNotIn(List<String> values) {
-            addCriterion("PU_VENDNAME not in", values, "puVendname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendnameBetween(String value1, String value2) {
-            addCriterion("PU_VENDNAME between", value1, value2, "puVendname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuVendnameNotBetween(String value1, String value2) {
-            addCriterion("PU_VENDNAME not between", value1, value2, "puVendname");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyeridIsNull() {
-            addCriterion("PU_BUYERID is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyeridIsNotNull() {
-            addCriterion("PU_BUYERID is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyeridEqualTo(Integer value) {
-            addCriterion("PU_BUYERID =", value, "puBuyerid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyeridNotEqualTo(Integer value) {
-            addCriterion("PU_BUYERID <>", value, "puBuyerid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyeridGreaterThan(Integer value) {
-            addCriterion("PU_BUYERID >", value, "puBuyerid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyeridGreaterThanOrEqualTo(Integer value) {
-            addCriterion("PU_BUYERID >=", value, "puBuyerid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyeridLessThan(Integer value) {
-            addCriterion("PU_BUYERID <", value, "puBuyerid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyeridLessThanOrEqualTo(Integer value) {
-            addCriterion("PU_BUYERID <=", value, "puBuyerid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyeridIn(List<Integer> values) {
-            addCriterion("PU_BUYERID in", values, "puBuyerid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyeridNotIn(List<Integer> values) {
-            addCriterion("PU_BUYERID not in", values, "puBuyerid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyeridBetween(Integer value1, Integer value2) {
-            addCriterion("PU_BUYERID between", value1, value2, "puBuyerid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyeridNotBetween(Integer value1, Integer value2) {
-            addCriterion("PU_BUYERID not between", value1, value2, "puBuyerid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyercodeIsNull() {
-            addCriterion("PU_BUYERCODE is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyercodeIsNotNull() {
-            addCriterion("PU_BUYERCODE is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyercodeEqualTo(String value) {
-            addCriterion("PU_BUYERCODE =", value, "puBuyercode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyercodeNotEqualTo(String value) {
-            addCriterion("PU_BUYERCODE <>", value, "puBuyercode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyercodeGreaterThan(String value) {
-            addCriterion("PU_BUYERCODE >", value, "puBuyercode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyercodeGreaterThanOrEqualTo(String value) {
-            addCriterion("PU_BUYERCODE >=", value, "puBuyercode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyercodeLessThan(String value) {
-            addCriterion("PU_BUYERCODE <", value, "puBuyercode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyercodeLessThanOrEqualTo(String value) {
-            addCriterion("PU_BUYERCODE <=", value, "puBuyercode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyercodeLike(String value) {
-            addCriterion("PU_BUYERCODE like", value, "puBuyercode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyercodeNotLike(String value) {
-            addCriterion("PU_BUYERCODE not like", value, "puBuyercode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyercodeIn(List<String> values) {
-            addCriterion("PU_BUYERCODE in", values, "puBuyercode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyercodeNotIn(List<String> values) {
-            addCriterion("PU_BUYERCODE not in", values, "puBuyercode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyercodeBetween(String value1, String value2) {
-            addCriterion("PU_BUYERCODE between", value1, value2, "puBuyercode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyercodeNotBetween(String value1, String value2) {
-            addCriterion("PU_BUYERCODE not between", value1, value2, "puBuyercode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyernameIsNull() {
-            addCriterion("PU_BUYERNAME is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyernameIsNotNull() {
-            addCriterion("PU_BUYERNAME is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyernameEqualTo(String value) {
-            addCriterion("PU_BUYERNAME =", value, "puBuyername");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyernameNotEqualTo(String value) {
-            addCriterion("PU_BUYERNAME <>", value, "puBuyername");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyernameGreaterThan(String value) {
-            addCriterion("PU_BUYERNAME >", value, "puBuyername");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyernameGreaterThanOrEqualTo(String value) {
-            addCriterion("PU_BUYERNAME >=", value, "puBuyername");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyernameLessThan(String value) {
-            addCriterion("PU_BUYERNAME <", value, "puBuyername");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyernameLessThanOrEqualTo(String value) {
-            addCriterion("PU_BUYERNAME <=", value, "puBuyername");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyernameLike(String value) {
-            addCriterion("PU_BUYERNAME like", value, "puBuyername");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyernameNotLike(String value) {
-            addCriterion("PU_BUYERNAME not like", value, "puBuyername");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyernameIn(List<String> values) {
-            addCriterion("PU_BUYERNAME in", values, "puBuyername");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyernameNotIn(List<String> values) {
-            addCriterion("PU_BUYERNAME not in", values, "puBuyername");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyernameBetween(String value1, String value2) {
-            addCriterion("PU_BUYERNAME between", value1, value2, "puBuyername");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuBuyernameNotBetween(String value1, String value2) {
-            addCriterion("PU_BUYERNAME not between", value1, value2, "puBuyername");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuDeliveryIsNull() {
-            addCriterion("PU_DELIVERY is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuDeliveryIsNotNull() {
-            addCriterion("PU_DELIVERY is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuDeliveryEqualTo(Date value) {
-            addCriterion("PU_DELIVERY =", value, "puDelivery");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuDeliveryNotEqualTo(Date value) {
-            addCriterion("PU_DELIVERY <>", value, "puDelivery");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuDeliveryGreaterThan(Date value) {
-            addCriterion("PU_DELIVERY >", value, "puDelivery");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuDeliveryGreaterThanOrEqualTo(Date value) {
-            addCriterion("PU_DELIVERY >=", value, "puDelivery");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuDeliveryLessThan(Date value) {
-            addCriterion("PU_DELIVERY <", value, "puDelivery");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuDeliveryLessThanOrEqualTo(Date value) {
-            addCriterion("PU_DELIVERY <=", value, "puDelivery");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuDeliveryIn(List<Date> values) {
-            addCriterion("PU_DELIVERY in", values, "puDelivery");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuDeliveryNotIn(List<Date> values) {
-            addCriterion("PU_DELIVERY not in", values, "puDelivery");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuDeliveryBetween(Date value1, Date value2) {
-            addCriterion("PU_DELIVERY between", value1, value2, "puDelivery");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuDeliveryNotBetween(Date value1, Date value2) {
-            addCriterion("PU_DELIVERY not between", value1, value2, "puDelivery");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTaxtotalIsNull() {
-            addCriterion("PU_TAXTOTAL is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTaxtotalIsNotNull() {
-            addCriterion("PU_TAXTOTAL is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTaxtotalEqualTo(Double value) {
-            addCriterion("PU_TAXTOTAL =", value, "puTaxtotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTaxtotalNotEqualTo(Double value) {
-            addCriterion("PU_TAXTOTAL <>", value, "puTaxtotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTaxtotalGreaterThan(Double value) {
-            addCriterion("PU_TAXTOTAL >", value, "puTaxtotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTaxtotalGreaterThanOrEqualTo(Double value) {
-            addCriterion("PU_TAXTOTAL >=", value, "puTaxtotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTaxtotalLessThan(Double value) {
-            addCriterion("PU_TAXTOTAL <", value, "puTaxtotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTaxtotalLessThanOrEqualTo(Double value) {
-            addCriterion("PU_TAXTOTAL <=", value, "puTaxtotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTaxtotalIn(List<Double> values) {
-            addCriterion("PU_TAXTOTAL in", values, "puTaxtotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTaxtotalNotIn(List<Double> values) {
-            addCriterion("PU_TAXTOTAL not in", values, "puTaxtotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTaxtotalBetween(Double value1, Double value2) {
-            addCriterion("PU_TAXTOTAL between", value1, value2, "puTaxtotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTaxtotalNotBetween(Double value1, Double value2) {
-            addCriterion("PU_TAXTOTAL not between", value1, value2, "puTaxtotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTotalIsNull() {
-            addCriterion("PU_TOTAL is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTotalIsNotNull() {
-            addCriterion("PU_TOTAL is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTotalEqualTo(Double value) {
-            addCriterion("PU_TOTAL =", value, "puTotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTotalNotEqualTo(Double value) {
-            addCriterion("PU_TOTAL <>", value, "puTotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTotalGreaterThan(Double value) {
-            addCriterion("PU_TOTAL >", value, "puTotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTotalGreaterThanOrEqualTo(Double value) {
-            addCriterion("PU_TOTAL >=", value, "puTotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTotalLessThan(Double value) {
-            addCriterion("PU_TOTAL <", value, "puTotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTotalLessThanOrEqualTo(Double value) {
-            addCriterion("PU_TOTAL <=", value, "puTotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTotalIn(List<Double> values) {
-            addCriterion("PU_TOTAL in", values, "puTotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTotalNotIn(List<Double> values) {
-            addCriterion("PU_TOTAL not in", values, "puTotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTotalBetween(Double value1, Double value2) {
-            addCriterion("PU_TOTAL between", value1, value2, "puTotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTotalNotBetween(Double value1, Double value2) {
-            addCriterion("PU_TOTAL not between", value1, value2, "puTotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuRemarkIsNull() {
-            addCriterion("PU_REMARK is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuRemarkIsNotNull() {
-            addCriterion("PU_REMARK is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuRemarkEqualTo(String value) {
-            addCriterion("PU_REMARK =", value, "puRemark");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuRemarkNotEqualTo(String value) {
-            addCriterion("PU_REMARK <>", value, "puRemark");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuRemarkGreaterThan(String value) {
-            addCriterion("PU_REMARK >", value, "puRemark");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuRemarkGreaterThanOrEqualTo(String value) {
-            addCriterion("PU_REMARK >=", value, "puRemark");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuRemarkLessThan(String value) {
-            addCriterion("PU_REMARK <", value, "puRemark");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuRemarkLessThanOrEqualTo(String value) {
-            addCriterion("PU_REMARK <=", value, "puRemark");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuRemarkLike(String value) {
-            addCriterion("PU_REMARK like", value, "puRemark");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuRemarkNotLike(String value) {
-            addCriterion("PU_REMARK not like", value, "puRemark");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuRemarkIn(List<String> values) {
-            addCriterion("PU_REMARK in", values, "puRemark");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuRemarkNotIn(List<String> values) {
-            addCriterion("PU_REMARK not in", values, "puRemark");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuRemarkBetween(String value1, String value2) {
-            addCriterion("PU_REMARK between", value1, value2, "puRemark");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuRemarkNotBetween(String value1, String value2) {
-            addCriterion("PU_REMARK not between", value1, value2, "puRemark");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTotalupperIsNull() {
-            addCriterion("PU_TOTALUPPER is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTotalupperIsNotNull() {
-            addCriterion("PU_TOTALUPPER is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTotalupperEqualTo(String value) {
-            addCriterion("PU_TOTALUPPER =", value, "puTotalupper");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTotalupperNotEqualTo(String value) {
-            addCriterion("PU_TOTALUPPER <>", value, "puTotalupper");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTotalupperGreaterThan(String value) {
-            addCriterion("PU_TOTALUPPER >", value, "puTotalupper");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTotalupperGreaterThanOrEqualTo(String value) {
-            addCriterion("PU_TOTALUPPER >=", value, "puTotalupper");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTotalupperLessThan(String value) {
-            addCriterion("PU_TOTALUPPER <", value, "puTotalupper");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTotalupperLessThanOrEqualTo(String value) {
-            addCriterion("PU_TOTALUPPER <=", value, "puTotalupper");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTotalupperLike(String value) {
-            addCriterion("PU_TOTALUPPER like", value, "puTotalupper");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTotalupperNotLike(String value) {
-            addCriterion("PU_TOTALUPPER not like", value, "puTotalupper");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTotalupperIn(List<String> values) {
-            addCriterion("PU_TOTALUPPER in", values, "puTotalupper");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTotalupperNotIn(List<String> values) {
-            addCriterion("PU_TOTALUPPER not in", values, "puTotalupper");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTotalupperBetween(String value1, String value2) {
-            addCriterion("PU_TOTALUPPER between", value1, value2, "puTotalupper");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuTotalupperNotBetween(String value1, String value2) {
-            addCriterion("PU_TOTALUPPER not between", value1, value2, "puTotalupper");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuIndateIsNull() {
-            addCriterion("PU_INDATE is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuIndateIsNotNull() {
-            addCriterion("PU_INDATE is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuIndateEqualTo(Date value) {
-            addCriterion("PU_INDATE =", value, "puIndate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuIndateNotEqualTo(Date value) {
-            addCriterion("PU_INDATE <>", value, "puIndate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuIndateGreaterThan(Date value) {
-            addCriterion("PU_INDATE >", value, "puIndate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuIndateGreaterThanOrEqualTo(Date value) {
-            addCriterion("PU_INDATE >=", value, "puIndate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuIndateLessThan(Date value) {
-            addCriterion("PU_INDATE <", value, "puIndate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuIndateLessThanOrEqualTo(Date value) {
-            addCriterion("PU_INDATE <=", value, "puIndate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuIndateIn(List<Date> values) {
-            addCriterion("PU_INDATE in", values, "puIndate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuIndateNotIn(List<Date> values) {
-            addCriterion("PU_INDATE not in", values, "puIndate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuIndateBetween(Date value1, Date value2) {
-            addCriterion("PU_INDATE between", value1, value2, "puIndate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuIndateNotBetween(Date value1, Date value2) {
-            addCriterion("PU_INDATE not between", value1, value2, "puIndate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuPrintstatusIsNull() {
-            addCriterion("PU_PRINTSTATUS is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuPrintstatusIsNotNull() {
-            addCriterion("PU_PRINTSTATUS is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuPrintstatusEqualTo(String value) {
-            addCriterion("PU_PRINTSTATUS =", value, "puPrintstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuPrintstatusNotEqualTo(String value) {
-            addCriterion("PU_PRINTSTATUS <>", value, "puPrintstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuPrintstatusGreaterThan(String value) {
-            addCriterion("PU_PRINTSTATUS >", value, "puPrintstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuPrintstatusGreaterThanOrEqualTo(String value) {
-            addCriterion("PU_PRINTSTATUS >=", value, "puPrintstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuPrintstatusLessThan(String value) {
-            addCriterion("PU_PRINTSTATUS <", value, "puPrintstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuPrintstatusLessThanOrEqualTo(String value) {
-            addCriterion("PU_PRINTSTATUS <=", value, "puPrintstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuPrintstatusLike(String value) {
-            addCriterion("PU_PRINTSTATUS like", value, "puPrintstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuPrintstatusNotLike(String value) {
-            addCriterion("PU_PRINTSTATUS not like", value, "puPrintstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuPrintstatusIn(List<String> values) {
-            addCriterion("PU_PRINTSTATUS in", values, "puPrintstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuPrintstatusNotIn(List<String> values) {
-            addCriterion("PU_PRINTSTATUS not in", values, "puPrintstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuPrintstatusBetween(String value1, String value2) {
-            addCriterion("PU_PRINTSTATUS between", value1, value2, "puPrintstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuPrintstatusNotBetween(String value1, String value2) {
-            addCriterion("PU_PRINTSTATUS not between", value1, value2, "puPrintstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuPrintstatuscodeIsNull() {
-            addCriterion("PU_PRINTSTATUSCODE is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuPrintstatuscodeIsNotNull() {
-            addCriterion("PU_PRINTSTATUSCODE is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuPrintstatuscodeEqualTo(String value) {
-            addCriterion("PU_PRINTSTATUSCODE =", value, "puPrintstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuPrintstatuscodeNotEqualTo(String value) {
-            addCriterion("PU_PRINTSTATUSCODE <>", value, "puPrintstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuPrintstatuscodeGreaterThan(String value) {
-            addCriterion("PU_PRINTSTATUSCODE >", value, "puPrintstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuPrintstatuscodeGreaterThanOrEqualTo(String value) {
-            addCriterion("PU_PRINTSTATUSCODE >=", value, "puPrintstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuPrintstatuscodeLessThan(String value) {
-            addCriterion("PU_PRINTSTATUSCODE <", value, "puPrintstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuPrintstatuscodeLessThanOrEqualTo(String value) {
-            addCriterion("PU_PRINTSTATUSCODE <=", value, "puPrintstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuPrintstatuscodeLike(String value) {
-            addCriterion("PU_PRINTSTATUSCODE like", value, "puPrintstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuPrintstatuscodeNotLike(String value) {
-            addCriterion("PU_PRINTSTATUSCODE not like", value, "puPrintstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuPrintstatuscodeIn(List<String> values) {
-            addCriterion("PU_PRINTSTATUSCODE in", values, "puPrintstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuPrintstatuscodeNotIn(List<String> values) {
-            addCriterion("PU_PRINTSTATUSCODE not in", values, "puPrintstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuPrintstatuscodeBetween(String value1, String value2) {
-            addCriterion("PU_PRINTSTATUSCODE between", value1, value2, "puPrintstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuPrintstatuscodeNotBetween(String value1, String value2) {
-            addCriterion("PU_PRINTSTATUSCODE not between", value1, value2, "puPrintstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuAcceptstatuscodeIsNull() {
-            addCriterion("PU_ACCEPTSTATUSCODE is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuAcceptstatuscodeIsNotNull() {
-            addCriterion("PU_ACCEPTSTATUSCODE is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuAcceptstatuscodeEqualTo(String value) {
-            addCriterion("PU_ACCEPTSTATUSCODE =", value, "puAcceptstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuAcceptstatuscodeNotEqualTo(String value) {
-            addCriterion("PU_ACCEPTSTATUSCODE <>", value, "puAcceptstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuAcceptstatuscodeGreaterThan(String value) {
-            addCriterion("PU_ACCEPTSTATUSCODE >", value, "puAcceptstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuAcceptstatuscodeGreaterThanOrEqualTo(String value) {
-            addCriterion("PU_ACCEPTSTATUSCODE >=", value, "puAcceptstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuAcceptstatuscodeLessThan(String value) {
-            addCriterion("PU_ACCEPTSTATUSCODE <", value, "puAcceptstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuAcceptstatuscodeLessThanOrEqualTo(String value) {
-            addCriterion("PU_ACCEPTSTATUSCODE <=", value, "puAcceptstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuAcceptstatuscodeLike(String value) {
-            addCriterion("PU_ACCEPTSTATUSCODE like", value, "puAcceptstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuAcceptstatuscodeNotLike(String value) {
-            addCriterion("PU_ACCEPTSTATUSCODE not like", value, "puAcceptstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuAcceptstatuscodeIn(List<String> values) {
-            addCriterion("PU_ACCEPTSTATUSCODE in", values, "puAcceptstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuAcceptstatuscodeNotIn(List<String> values) {
-            addCriterion("PU_ACCEPTSTATUSCODE not in", values, "puAcceptstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuAcceptstatuscodeBetween(String value1, String value2) {
-            addCriterion("PU_ACCEPTSTATUSCODE between", value1, value2, "puAcceptstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuAcceptstatuscodeNotBetween(String value1, String value2) {
-            addCriterion("PU_ACCEPTSTATUSCODE not between", value1, value2, "puAcceptstatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuAcceptstatusIsNull() {
-            addCriterion("PU_ACCEPTSTATUS is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuAcceptstatusIsNotNull() {
-            addCriterion("PU_ACCEPTSTATUS is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuAcceptstatusEqualTo(String value) {
-            addCriterion("PU_ACCEPTSTATUS =", value, "puAcceptstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuAcceptstatusNotEqualTo(String value) {
-            addCriterion("PU_ACCEPTSTATUS <>", value, "puAcceptstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuAcceptstatusGreaterThan(String value) {
-            addCriterion("PU_ACCEPTSTATUS >", value, "puAcceptstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuAcceptstatusGreaterThanOrEqualTo(String value) {
-            addCriterion("PU_ACCEPTSTATUS >=", value, "puAcceptstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuAcceptstatusLessThan(String value) {
-            addCriterion("PU_ACCEPTSTATUS <", value, "puAcceptstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuAcceptstatusLessThanOrEqualTo(String value) {
-            addCriterion("PU_ACCEPTSTATUS <=", value, "puAcceptstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuAcceptstatusLike(String value) {
-            addCriterion("PU_ACCEPTSTATUS like", value, "puAcceptstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuAcceptstatusNotLike(String value) {
-            addCriterion("PU_ACCEPTSTATUS not like", value, "puAcceptstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuAcceptstatusIn(List<String> values) {
-            addCriterion("PU_ACCEPTSTATUS in", values, "puAcceptstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuAcceptstatusNotIn(List<String> values) {
-            addCriterion("PU_ACCEPTSTATUS not in", values, "puAcceptstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuAcceptstatusBetween(String value1, String value2) {
-            addCriterion("PU_ACCEPTSTATUS between", value1, value2, "puAcceptstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuAcceptstatusNotBetween(String value1, String value2) {
-            addCriterion("PU_ACCEPTSTATUS not between", value1, value2, "puAcceptstatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuStatuscodeIsNull() {
-            addCriterion("PU_STATUSCODE is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuStatuscodeIsNotNull() {
-            addCriterion("PU_STATUSCODE is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuStatuscodeEqualTo(String value) {
-            addCriterion("PU_STATUSCODE =", value, "puStatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuStatuscodeNotEqualTo(String value) {
-            addCriterion("PU_STATUSCODE <>", value, "puStatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuStatuscodeGreaterThan(String value) {
-            addCriterion("PU_STATUSCODE >", value, "puStatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuStatuscodeGreaterThanOrEqualTo(String value) {
-            addCriterion("PU_STATUSCODE >=", value, "puStatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuStatuscodeLessThan(String value) {
-            addCriterion("PU_STATUSCODE <", value, "puStatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuStatuscodeLessThanOrEqualTo(String value) {
-            addCriterion("PU_STATUSCODE <=", value, "puStatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuStatuscodeLike(String value) {
-            addCriterion("PU_STATUSCODE like", value, "puStatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuStatuscodeNotLike(String value) {
-            addCriterion("PU_STATUSCODE not like", value, "puStatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuStatuscodeIn(List<String> values) {
-            addCriterion("PU_STATUSCODE in", values, "puStatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuStatuscodeNotIn(List<String> values) {
-            addCriterion("PU_STATUSCODE not in", values, "puStatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuStatuscodeBetween(String value1, String value2) {
-            addCriterion("PU_STATUSCODE between", value1, value2, "puStatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuStatuscodeNotBetween(String value1, String value2) {
-            addCriterion("PU_STATUSCODE not between", value1, value2, "puStatuscode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuStatusIsNull() {
-            addCriterion("PU_STATUS is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuStatusIsNotNull() {
-            addCriterion("PU_STATUS is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuStatusEqualTo(String value) {
-            addCriterion("PU_STATUS =", value, "puStatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuStatusNotEqualTo(String value) {
-            addCriterion("PU_STATUS <>", value, "puStatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuStatusGreaterThan(String value) {
-            addCriterion("PU_STATUS >", value, "puStatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuStatusGreaterThanOrEqualTo(String value) {
-            addCriterion("PU_STATUS >=", value, "puStatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuStatusLessThan(String value) {
-            addCriterion("PU_STATUS <", value, "puStatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuStatusLessThanOrEqualTo(String value) {
-            addCriterion("PU_STATUS <=", value, "puStatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuStatusLike(String value) {
-            addCriterion("PU_STATUS like", value, "puStatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuStatusNotLike(String value) {
-            addCriterion("PU_STATUS not like", value, "puStatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuStatusIn(List<String> values) {
-            addCriterion("PU_STATUS in", values, "puStatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuStatusNotIn(List<String> values) {
-            addCriterion("PU_STATUS not in", values, "puStatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuStatusBetween(String value1, String value2) {
-            addCriterion("PU_STATUS between", value1, value2, "puStatus");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuStatusNotBetween(String value1, String value2) {
-            addCriterion("PU_STATUS not between", value1, value2, "puStatus");
-            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 andUpdatemanidIsNull() {
-            addCriterion("updatemanid is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatemanidIsNotNull() {
-            addCriterion("updatemanid is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatemanidEqualTo(Integer value) {
-            addCriterion("updatemanid =", value, "updatemanid");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatemanidNotEqualTo(Integer value) {
-            addCriterion("updatemanid <>", value, "updatemanid");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatemanidGreaterThan(Integer value) {
-            addCriterion("updatemanid >", value, "updatemanid");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatemanidGreaterThanOrEqualTo(Integer value) {
-            addCriterion("updatemanid >=", value, "updatemanid");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatemanidLessThan(Integer value) {
-            addCriterion("updatemanid <", value, "updatemanid");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatemanidLessThanOrEqualTo(Integer value) {
-            addCriterion("updatemanid <=", value, "updatemanid");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatemanidIn(List<Integer> values) {
-            addCriterion("updatemanid in", values, "updatemanid");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatemanidNotIn(List<Integer> values) {
-            addCriterion("updatemanid not in", values, "updatemanid");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatemanidBetween(Integer value1, Integer value2) {
-            addCriterion("updatemanid between", value1, value2, "updatemanid");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatemanidNotBetween(Integer value1, Integer value2) {
-            addCriterion("updatemanid not between", value1, value2, "updatemanid");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatedateIsNull() {
-            addCriterion("updatedate is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatedateIsNotNull() {
-            addCriterion("updatedate is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatedateEqualTo(Date value) {
-            addCriterion("updatedate =", value, "updatedate");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatedateNotEqualTo(Date value) {
-            addCriterion("updatedate <>", value, "updatedate");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatedateGreaterThan(Date value) {
-            addCriterion("updatedate >", value, "updatedate");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatedateGreaterThanOrEqualTo(Date value) {
-            addCriterion("updatedate >=", value, "updatedate");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatedateLessThan(Date value) {
-            addCriterion("updatedate <", value, "updatedate");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatedateLessThanOrEqualTo(Date value) {
-            addCriterion("updatedate <=", value, "updatedate");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatedateIn(List<Date> values) {
-            addCriterion("updatedate in", values, "updatedate");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatedateNotIn(List<Date> values) {
-            addCriterion("updatedate not in", values, "updatedate");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatedateBetween(Date value1, Date value2) {
-            addCriterion("updatedate between", value1, value2, "updatedate");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatedateNotBetween(Date value1, Date value2) {
-            addCriterion("updatedate not between", value1, value2, "updatedate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText1IsNull() {
-            addCriterion("pu_text1 is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText1IsNotNull() {
-            addCriterion("pu_text1 is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText1EqualTo(String value) {
-            addCriterion("pu_text1 =", value, "puText1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText1NotEqualTo(String value) {
-            addCriterion("pu_text1 <>", value, "puText1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText1GreaterThan(String value) {
-            addCriterion("pu_text1 >", value, "puText1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText1GreaterThanOrEqualTo(String value) {
-            addCriterion("pu_text1 >=", value, "puText1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText1LessThan(String value) {
-            addCriterion("pu_text1 <", value, "puText1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText1LessThanOrEqualTo(String value) {
-            addCriterion("pu_text1 <=", value, "puText1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText1Like(String value) {
-            addCriterion("pu_text1 like", value, "puText1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText1NotLike(String value) {
-            addCriterion("pu_text1 not like", value, "puText1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText1In(List<String> values) {
-            addCriterion("pu_text1 in", values, "puText1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText1NotIn(List<String> values) {
-            addCriterion("pu_text1 not in", values, "puText1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText1Between(String value1, String value2) {
-            addCriterion("pu_text1 between", value1, value2, "puText1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText1NotBetween(String value1, String value2) {
-            addCriterion("pu_text1 not between", value1, value2, "puText1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText2IsNull() {
-            addCriterion("pu_text2 is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText2IsNotNull() {
-            addCriterion("pu_text2 is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText2EqualTo(String value) {
-            addCriterion("pu_text2 =", value, "puText2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText2NotEqualTo(String value) {
-            addCriterion("pu_text2 <>", value, "puText2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText2GreaterThan(String value) {
-            addCriterion("pu_text2 >", value, "puText2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText2GreaterThanOrEqualTo(String value) {
-            addCriterion("pu_text2 >=", value, "puText2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText2LessThan(String value) {
-            addCriterion("pu_text2 <", value, "puText2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText2LessThanOrEqualTo(String value) {
-            addCriterion("pu_text2 <=", value, "puText2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText2Like(String value) {
-            addCriterion("pu_text2 like", value, "puText2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText2NotLike(String value) {
-            addCriterion("pu_text2 not like", value, "puText2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText2In(List<String> values) {
-            addCriterion("pu_text2 in", values, "puText2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText2NotIn(List<String> values) {
-            addCriterion("pu_text2 not in", values, "puText2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText2Between(String value1, String value2) {
-            addCriterion("pu_text2 between", value1, value2, "puText2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText2NotBetween(String value1, String value2) {
-            addCriterion("pu_text2 not between", value1, value2, "puText2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText3IsNull() {
-            addCriterion("pu_text3 is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText3IsNotNull() {
-            addCriterion("pu_text3 is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText3EqualTo(String value) {
-            addCriterion("pu_text3 =", value, "puText3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText3NotEqualTo(String value) {
-            addCriterion("pu_text3 <>", value, "puText3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText3GreaterThan(String value) {
-            addCriterion("pu_text3 >", value, "puText3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText3GreaterThanOrEqualTo(String value) {
-            addCriterion("pu_text3 >=", value, "puText3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText3LessThan(String value) {
-            addCriterion("pu_text3 <", value, "puText3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText3LessThanOrEqualTo(String value) {
-            addCriterion("pu_text3 <=", value, "puText3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText3Like(String value) {
-            addCriterion("pu_text3 like", value, "puText3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText3NotLike(String value) {
-            addCriterion("pu_text3 not like", value, "puText3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText3In(List<String> values) {
-            addCriterion("pu_text3 in", values, "puText3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText3NotIn(List<String> values) {
-            addCriterion("pu_text3 not in", values, "puText3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText3Between(String value1, String value2) {
-            addCriterion("pu_text3 between", value1, value2, "puText3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText3NotBetween(String value1, String value2) {
-            addCriterion("pu_text3 not between", value1, value2, "puText3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText4IsNull() {
-            addCriterion("pu_text4 is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText4IsNotNull() {
-            addCriterion("pu_text4 is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText4EqualTo(String value) {
-            addCriterion("pu_text4 =", value, "puText4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText4NotEqualTo(String value) {
-            addCriterion("pu_text4 <>", value, "puText4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText4GreaterThan(String value) {
-            addCriterion("pu_text4 >", value, "puText4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText4GreaterThanOrEqualTo(String value) {
-            addCriterion("pu_text4 >=", value, "puText4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText4LessThan(String value) {
-            addCriterion("pu_text4 <", value, "puText4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText4LessThanOrEqualTo(String value) {
-            addCriterion("pu_text4 <=", value, "puText4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText4Like(String value) {
-            addCriterion("pu_text4 like", value, "puText4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText4NotLike(String value) {
-            addCriterion("pu_text4 not like", value, "puText4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText4In(List<String> values) {
-            addCriterion("pu_text4 in", values, "puText4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText4NotIn(List<String> values) {
-            addCriterion("pu_text4 not in", values, "puText4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText4Between(String value1, String value2) {
-            addCriterion("pu_text4 between", value1, value2, "puText4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText4NotBetween(String value1, String value2) {
-            addCriterion("pu_text4 not between", value1, value2, "puText4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText5IsNull() {
-            addCriterion("pu_text5 is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText5IsNotNull() {
-            addCriterion("pu_text5 is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText5EqualTo(String value) {
-            addCriterion("pu_text5 =", value, "puText5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText5NotEqualTo(String value) {
-            addCriterion("pu_text5 <>", value, "puText5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText5GreaterThan(String value) {
-            addCriterion("pu_text5 >", value, "puText5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText5GreaterThanOrEqualTo(String value) {
-            addCriterion("pu_text5 >=", value, "puText5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText5LessThan(String value) {
-            addCriterion("pu_text5 <", value, "puText5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText5LessThanOrEqualTo(String value) {
-            addCriterion("pu_text5 <=", value, "puText5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText5Like(String value) {
-            addCriterion("pu_text5 like", value, "puText5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText5NotLike(String value) {
-            addCriterion("pu_text5 not like", value, "puText5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText5In(List<String> values) {
-            addCriterion("pu_text5 in", values, "puText5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText5NotIn(List<String> values) {
-            addCriterion("pu_text5 not in", values, "puText5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText5Between(String value1, String value2) {
-            addCriterion("pu_text5 between", value1, value2, "puText5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPuText5NotBetween(String value1, String value2) {
-            addCriterion("pu_text5 not between", value1, value2, "puText5");
-            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);
-        }
-    }
-}

+ 41 - 179
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/PurchaseItem.java

@@ -1,191 +1,53 @@
 package com.usoftchina.saas.purchase.po;
 
 import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import lombok.Data;
 
 import java.io.Serializable;
 
-/**
- * 采购明细
- *
- * @author yingp
- * @date 2018/10/9
- */
+@Data
 public class PurchaseItem extends CommonBaseEntity implements Serializable {
-    private Long mainId;
-    /**
-     * 序号
-     */
-    private Integer orderNum;
-    /**
-     * 商品
-     */
-    private Long productId;
-    /**
-     * 仓库
-     */
-    private Long warehouseId;
-    /**
-     * 数量
-     */
-    private Double qty;
-    /**
-     * 单价
-     */
-    private Double price;
-    /**
-     * 含税单价
-     */
-    private Double taxPrice;
-    /**
-     * 税率
-     */
-    private Float taxRate;
-    /**
-     * 税额
-     */
-    private Double taxAmount;
-    /**
-     * 折扣率
-     */
-    private Float disRate;
-    /**
-     * 折扣额
-     */
-    private Double disAmount;
-    /**
-     * 金额
-     */
-    private Double amount;
-    /**
-     * 价税合计
-     */
-    private Double totalTaxAmount;
-    /**
-     * 备注
-     */
-    private String remark;
-    /**
-     * 关联订单
-     */
-    private Long srcOrderId;
-
-    public Long getMainId() {
-        return mainId;
-    }
-
-    public void setMainId(Long mainId) {
-        this.mainId = mainId;
-    }
-
-    public Integer getOrderNum() {
-        return orderNum;
-    }
-
-    public void setOrderNum(Integer orderNum) {
-        this.orderNum = orderNum;
-    }
-
-    public Long getProductId() {
-        return productId;
-    }
-
-    public void setProductId(Long productId) {
-        this.productId = productId;
-    }
-
-    public Long getWarehouseId() {
-        return warehouseId;
-    }
-
-    public void setWarehouseId(Long warehouseId) {
-        this.warehouseId = warehouseId;
-    }
-
-    public Double getQty() {
-        return qty;
-    }
-
-    public void setQty(Double qty) {
-        this.qty = qty;
-    }
-
-    public Double getPrice() {
-        return price;
-    }
-
-    public void setPrice(Double price) {
-        this.price = price;
-    }
-
-    public Double getTaxPrice() {
-        return taxPrice;
-    }
-
-    public void setTaxPrice(Double taxPrice) {
-        this.taxPrice = taxPrice;
-    }
-
-    public Float getTaxRate() {
-        return taxRate;
-    }
-
-    public void setTaxRate(Float taxRate) {
-        this.taxRate = taxRate;
-    }
-
-    public Double getTaxAmount() {
-        return taxAmount;
-    }
-
-    public void setTaxAmount(Double taxAmount) {
-        this.taxAmount = taxAmount;
-    }
-
-    public Float getDisRate() {
-        return disRate;
-    }
-
-    public void setDisRate(Float disRate) {
-        this.disRate = disRate;
-    }
-
-    public Double getDisAmount() {
-        return disAmount;
-    }
-
-    public void setDisAmount(Double disAmount) {
-        this.disAmount = disAmount;
-    }
-
-    public Double getAmount() {
-        return amount;
-    }
-
-    public void setAmount(Double amount) {
-        this.amount = amount;
-    }
-
-    public Double getTotalTaxAmount() {
-        return totalTaxAmount;
-    }
 
-    public void setTotalTaxAmount(Double totalTaxAmount) {
-        this.totalTaxAmount = totalTaxAmount;
-    }
+    private  Long pd_puid;
 
-    public String getRemark() {
-        return remark;
-    }
+    private String pd_code;
 
-    public void setRemark(String remark) {
-        this.remark = remark;
-    }
+    private Integer pd_detno;
 
-    public Long getSrcOrderId() {
-        return srcOrderId;
-    }
+    private Integer pd_prodid;
 
-    public void setSrcOrderId(Long srcOrderId) {
-        this.srcOrderId = srcOrderId;
-    }
-}
+    private String pd_prodcode;
+
+    private String pd_unit;
+
+    private Double pd_qty;
+
+    private Double pd_price;
+
+    private Double pd_total;
+
+    private Double pd_taxtotal;
+
+    private Double pd_acceptqty;
+
+    private Double pd_delivery;
+
+    private String pd_salecode;
+
+    private Integer pd_saledetno;
+
+    private Integer pd_sdid;
+
+    private String pd_text1;
+
+    private String pd_text2;
+
+    private String pd_text3;
+
+    private String pd_text4;
+
+    private String pd_text5;
+
+    private Double pd_yqty;
+
+}

+ 54 - 464
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/PurchaseList.java

@@ -1,6 +1,8 @@
 package com.usoftchina.saas.purchase.po;
 
 
+import lombok.Data;
+
 import java.io.Serializable;
 import java.util.Date;
 
@@ -8,524 +10,112 @@ import java.util.Date;
  * @author: guq
  * @create: 2018-10-10 16:42
  **/
+@Data
 public class PurchaseList implements Serializable {
 
+    //主表信息
     protected long companyId;
-    protected Date createTime;
 
-    public Date getCreateTime() {
-        return createTime;
-    }
-
-    public void setCreateTime(Date createTime) {
-        this.createTime = createTime;
-    }
+    protected Date createTime;
 
     protected Date updateTime;
 
-    public long getCompanyId() {
-        return companyId;
-    }
-
-    public void setCompanyId(long companyId) {
-        this.companyId = companyId;
-    }
-
-    public Date getUpdateTime() {
-        return updateTime;
-    }
-
-    public void setUpdateTime(Date updateTime) {
-        this.updateTime = updateTime;
-    }
-
-    public long getUpdaterId() {
-        return updaterId;
-    }
-
-    public void setUpdaterId(long updaterId) {
-        this.updaterId = updaterId;
-    }
-
-    public Integer getPuId() {
-        return puId;
-    }
-
-    public void setPuId(Integer puId) {
-        this.puId = puId;
-    }
-
-    public String getPuCode() {
-        return puCode;
-    }
-
-    public void setPuCode(String puCode) {
-        this.puCode = puCode;
-    }
-
-    public Date getPuDate() {
-        return puDate;
-    }
-
-    public void setPuDate(Date puDate) {
-        this.puDate = puDate;
-    }
-
-    public Integer getPuVendid() {
-        return puVendid;
-    }
-
-    public void setPuVendid(Integer puVendid) {
-        this.puVendid = puVendid;
-    }
-
-    public String getPuVendcode() {
-        return puVendcode;
-    }
-
-    public void setPuVendcode(String puVendcode) {
-        this.puVendcode = puVendcode;
-    }
-
-    public String getPuVendname() {
-        return puVendname;
-    }
-
-    public void setPuVendname(String puVendname) {
-        this.puVendname = puVendname;
-    }
-
-    public Integer getPuBuyerid() {
-        return puBuyerid;
-    }
-
-    public void setPuBuyerid(Integer puBuyerid) {
-        this.puBuyerid = puBuyerid;
-    }
-
-    public String getPuBuyercode() {
-        return puBuyercode;
-    }
-
-    public void setPuBuyercode(String puBuyercode) {
-        this.puBuyercode = puBuyercode;
-    }
-
-    public String getPuBuyername() {
-        return puBuyername;
-    }
-
-    public void setPuBuyername(String puBuyername) {
-        this.puBuyername = puBuyername;
-    }
-
-    public Date getPuDelivery() {
-        return puDelivery;
-    }
-
-    public void setPuDelivery(Date puDelivery) {
-        this.puDelivery = puDelivery;
-    }
-
-    public Double getPuTaxtotal() {
-        return puTaxtotal;
-    }
-
-    public void setPuTaxtotal(Double puTaxtotal) {
-        this.puTaxtotal = puTaxtotal;
-    }
-
-    public Double getPuTotal() {
-        return puTotal;
-    }
-
-    public void setPuTotal(Double puTotal) {
-        this.puTotal = puTotal;
-    }
-
-    public String getPuRemark() {
-        return puRemark;
-    }
-
-    public void setPuRemark(String puRemark) {
-        this.puRemark = puRemark;
-    }
-
-    public String getPuTotalupper() {
-        return puTotalupper;
-    }
-
-    public void setPuTotalupper(String puTotalupper) {
-        this.puTotalupper = puTotalupper;
-    }
-
-    public String getPuPrintstatus() {
-        return puPrintstatus;
-    }
-
-    public void setPuPrintstatus(String puPrintstatus) {
-        this.puPrintstatus = puPrintstatus;
-    }
-
-    public String getPuPrintstatuscode() {
-        return puPrintstatuscode;
-    }
-
-    public void setPuPrintstatuscode(String puPrintstatuscode) {
-        this.puPrintstatuscode = puPrintstatuscode;
-    }
-
-    public String getPuAcceptstatuscode() {
-        return puAcceptstatuscode;
-    }
-
-    public void setPuAcceptstatuscode(String puAcceptstatuscode) {
-        this.puAcceptstatuscode = puAcceptstatuscode;
-    }
-
-    public String getPuAcceptstatus() {
-        return puAcceptstatus;
-    }
-
-    public void setPuAcceptstatus(String puAcceptstatus) {
-        this.puAcceptstatus = puAcceptstatus;
-    }
-
-    public String getPuStatuscode() {
-        return puStatuscode;
-    }
-
-    public void setPuStatuscode(String puStatuscode) {
-        this.puStatuscode = puStatuscode;
-    }
-
-    public String getPuStatus() {
-        return puStatus;
-    }
-
-    public void setPuStatus(String puStatus) {
-        this.puStatus = puStatus;
-    }
-
-    public String getPuText1() {
-        return puText1;
-    }
-
-    public void setPuText1(String puText1) {
-        this.puText1 = puText1;
-    }
-
-    public String getPuText2() {
-        return puText2;
-    }
-
-    public void setPuText2(String puText2) {
-        this.puText2 = puText2;
-    }
-
-    public String getPuText3() {
-        return puText3;
-    }
-
-    public void setPuText3(String puText3) {
-        this.puText3 = puText3;
-    }
-
-    public String getPuText4() {
-        return puText4;
-    }
-
-    public void setPuText4(String puText4) {
-        this.puText4 = puText4;
-    }
-
-    public String getPuText5() {
-        return puText5;
-    }
-
-    public void setPuText5(String puText5) {
-        this.puText5 = puText5;
-    }
-
-    public String getPuShipaddresscode() {
-        return puShipaddresscode;
-    }
-
-    public void setPuShipaddresscode(String puShipaddresscode) {
-        this.puShipaddresscode = puShipaddresscode;
-    }
-
-    public Integer getPdId() {
-        return pdId;
-    }
-
-    public void setPdId(Integer pdId) {
-        this.pdId = pdId;
-    }
-
-    public Integer getPdPuid() {
-        return pdPuid;
-    }
-
-    public void setPdPuid(Integer pdPuid) {
-        this.pdPuid = pdPuid;
-    }
-
-    public String getPdCode() {
-        return pdCode;
-    }
-
-    public void setPdCode(String pdCode) {
-        this.pdCode = pdCode;
-    }
-
-    public Integer getPdDetno() {
-        return pdDetno;
-    }
-
-    public void setPdDetno(Integer pdDetno) {
-        this.pdDetno = pdDetno;
-    }
-
-    public Integer getPdProdid() {
-        return pdProdid;
-    }
-
-    public void setPdProdid(Integer pdProdid) {
-        this.pdProdid = pdProdid;
-    }
-
-    public String getPdProdcode() {
-        return pdProdcode;
-    }
-
-    public void setPdProdcode(String pdProdcode) {
-        this.pdProdcode = pdProdcode;
-    }
-
-    public String getPdUnit() {
-        return pdUnit;
-    }
-
-    public void setPdUnit(String pdUnit) {
-        this.pdUnit = pdUnit;
-    }
-
-    public Double getPdQty() {
-        return pdQty;
-    }
-
-    public void setPdQty(Double pdQty) {
-        this.pdQty = pdQty;
-    }
-
-    public Double getPdPrice() {
-        return pdPrice;
-    }
-
-    public void setPdPrice(Double pdPrice) {
-        this.pdPrice = pdPrice;
-    }
-
-    public Double getPdTotal() {
-        return pdTotal;
-    }
-
-    public void setPdTotal(Double pdTotal) {
-        this.pdTotal = pdTotal;
-    }
-
-    public Double getPdTaxtotal() {
-        return pdTaxtotal;
-    }
-
-    public void setPdTaxtotal(Double pdTaxtotal) {
-        this.pdTaxtotal = pdTaxtotal;
-    }
-
-    public Double getPdAcceptqty() {
-        return pdAcceptqty;
-    }
-
-    public void setPdAcceptqty(Double pdAcceptqty) {
-        this.pdAcceptqty = pdAcceptqty;
-    }
-
-    public Double getPdDelivery() {
-        return pdDelivery;
-    }
-
-    public void setPdDelivery(Double pdDelivery) {
-        this.pdDelivery = pdDelivery;
-    }
-
-    public String getPdSalecode() {
-        return pdSalecode;
-    }
-
-    public void setPdSalecode(String pdSalecode) {
-        this.pdSalecode = pdSalecode;
-    }
-
-    public Integer getPdSaledetno() {
-        return pdSaledetno;
-    }
-
-    public void setPdSaledetno(Integer pdSaledetno) {
-        this.pdSaledetno = pdSaledetno;
-    }
-
-    public Integer getPdSdid() {
-        return pdSdid;
-    }
-
-    public void setPdSdid(Integer pdSdid) {
-        this.pdSdid = pdSdid;
-    }
-
-    public String getPdText1() {
-        return pdText1;
-    }
-
-    public void setPdText1(String pdText1) {
-        this.pdText1 = pdText1;
-    }
-
-    public String getPdText2() {
-        return pdText2;
-    }
-
-    public void setPdText2(String pdText2) {
-        this.pdText2 = pdText2;
-    }
-
-    public String getPdText3() {
-        return pdText3;
-    }
-
-    public void setPdText3(String pdText3) {
-        this.pdText3 = pdText3;
-    }
-
-    public String getPdText4() {
-        return pdText4;
-    }
-
-    public void setPdText4(String pdText4) {
-        this.pdText4 = pdText4;
-    }
-
-    public String getPdText5() {
-        return pdText5;
-    }
-
-    public void setPdText5(String pdText5) {
-        this.pdText5 = pdText5;
-    }
-
-    public Double getPdYqty() {
-        return pdYqty;
-    }
-
-    public void setPdYqty(Double pdYqty) {
-        this.pdYqty = pdYqty;
-    }
-
     protected long updaterId;
 
-    private  Integer puId;
+    private  Integer pu_id;
 
-    private String puCode;
+    private String pu_code;
 
-    private Date puDate;
+    private Date pu_date;
 
-    private Integer puVendid;
+    private Integer pu_vendid;
 
-    private String puVendcode;
+    private String pu_vendcode;
 
-    private String puVendname;
+    private String pu_vendname;
 
-    private Integer puBuyerid;
+    private Integer pu_buyerid;
 
-    private String puBuyercode;
+    private String pu_buyercode;
 
-    private String puBuyername;
+    private String pu_buyername;
 
-    private Date puDelivery;
+    private Date pu_delivery;
 
-    private Double puTaxtotal;
+    private Double pu_taxtotal;
 
-    private Double puTotal;
+    private Double pu_total;
 
-    private String puRemark;
+    private String pu_remark;
 
-    private String puTotalupper;
+    private String pu_totalupper;
 
-    private String puPrintstatus;
+    private String pu_printstatus;
 
-    private String puPrintstatuscode;
+    private String pu_printstatuscode;
 
-    private String puAcceptstatuscode;
+    private String pu_acceptstatuscode;
 
-    private String puAcceptstatus;
+    private String pu_acceptstatus;
 
-    private String puStatuscode;
+    private String pu_statuscode;
 
-    private String puStatus;
+    private String pu_status;
 
-    private String puText1;
+    private String pu_text1;
 
-    private String puText2;
+    private String pu_text2;
 
-    private String puText3;
+    private String pu_text3;
 
-    private String puText4;
+    private String pu_text4;
 
-    private String puText5;
+    private String pu_text5;
 
-    private String puShipaddresscode;
+    private String pu_shipaddresscode;
 
-    private Integer pdId;
+    //从表字段
+    private Long pd_id;
 
-    private Integer pdPuid;
+    private  Long pd_puid;
 
-    private String pdCode;
+    private String pd_code;
 
-    private Integer pdDetno;
+    private Integer pd_detno;
 
-    private Integer pdProdid;
+    private Integer pd_prodid;
 
-    private String pdProdcode;
+    private String pd_prodcode;
 
-    private String pdUnit;
+    private String pd_unit;
 
-    private Double pdQty;
+    private Double pd_qty;
 
-    private Double pdPrice;
+    private Double pd_price;
 
-    private Double pdTotal;
+    private Double pd_total;
 
-    private Double pdTaxtotal;
+    private Double pd_taxtotal;
 
-    private Double pdAcceptqty;
+    private Double pd_acceptqty;
 
-    private Double pdDelivery;
+    private Double pd_delivery;
 
-    private String pdSalecode;
+    private String pd_salecode;
 
-    private Integer pdSaledetno;
+    private Integer pd_saledetno;
 
-    private Integer pdSdid;
+    private Integer pd_sdid;
 
-    private String pdText1;
+    private String pd_text1;
 
-    private String pdText2;
+    private String pd_text2;
 
-    private String pdText3;
+    private String pd_text3;
 
-    private String pdText4;
+    private String pd_text4;
 
-    private String pdText5;
+    private String pd_text5;
 
-    private Double pdYqty;
+    private Double pd_yqty;
 }

+ 0 - 218
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/Purchasedetail.java

@@ -1,218 +0,0 @@
-package com.usoftchina.saas.purchase.po;
-
-import com.usoftchina.saas.base.entity.CommonBaseEntity;
-
-import java.io.Serializable;
-
-public class Purchasedetail extends CommonBaseEntity implements Serializable {
-
-    private Integer pdPuid;
-
-    private String pdCode;
-
-    private Integer pdDetno;
-
-    private Integer pdProdid;
-
-    private String pdProdcode;
-
-    private String pdUnit;
-
-    private Double pdQty;
-
-    private Double pdPrice;
-
-    private Double pdTotal;
-
-    private Double pdTaxtotal;
-
-    private Double pdAcceptqty;
-
-    private Double pdDelivery;
-
-    private String pdSalecode;
-
-    private Integer pdSaledetno;
-
-    private Integer pdSdid;
-
-    private String pdText1;
-
-    private String pdText2;
-
-    private String pdText3;
-
-    private String pdText4;
-
-    private String pdText5;
-
-    private Double pdYqty;
-
-    public Integer getPdPuid() {
-        return pdPuid;
-    }
-
-    public void setPdPuid(Integer pdPuid) {
-        this.pdPuid = pdPuid;
-    }
-
-    public String getPdCode() {
-        return pdCode;
-    }
-
-    public void setPdCode(String pdCode) {
-        this.pdCode = pdCode == null ? null : pdCode.trim();
-    }
-
-    public Integer getPdDetno() {
-        return pdDetno;
-    }
-
-    public void setPdDetno(Integer pdDetno) {
-        this.pdDetno = pdDetno;
-    }
-
-    public Integer getPdProdid() {
-        return pdProdid;
-    }
-
-    public void setPdProdid(Integer pdProdid) {
-        this.pdProdid = pdProdid;
-    }
-
-    public String getPdProdcode() {
-        return pdProdcode;
-    }
-
-    public void setPdProdcode(String pdProdcode) {
-        this.pdProdcode = pdProdcode == null ? null : pdProdcode.trim();
-    }
-
-    public String getPdUnit() {
-        return pdUnit;
-    }
-
-    public void setPdUnit(String pdUnit) {
-        this.pdUnit = pdUnit == null ? null : pdUnit.trim();
-    }
-
-    public Double getPdQty() {
-        return pdQty;
-    }
-
-    public void setPdQty(Double pdQty) {
-        this.pdQty = pdQty;
-    }
-
-    public Double getPdPrice() {
-        return pdPrice;
-    }
-
-    public void setPdPrice(Double pdPrice) {
-        this.pdPrice = pdPrice;
-    }
-
-    public Double getPdTotal() {
-        return pdTotal;
-    }
-
-    public void setPdTotal(Double pdTotal) {
-        this.pdTotal = pdTotal;
-    }
-
-    public Double getPdTaxtotal() {
-        return pdTaxtotal;
-    }
-
-    public void setPdTaxtotal(Double pdTaxtotal) {
-        this.pdTaxtotal = pdTaxtotal;
-    }
-
-    public Double getPdAcceptqty() {
-        return pdAcceptqty;
-    }
-
-    public void setPdAcceptqty(Double pdAcceptqty) {
-        this.pdAcceptqty = pdAcceptqty;
-    }
-
-    public Double getPdDelivery() {
-        return pdDelivery;
-    }
-
-    public void setPdDelivery(Double pdDelivery) {
-        this.pdDelivery = pdDelivery;
-    }
-
-    public String getPdSalecode() {
-        return pdSalecode;
-    }
-
-    public void setPdSalecode(String pdSalecode) {
-        this.pdSalecode = pdSalecode == null ? null : pdSalecode.trim();
-    }
-
-    public Integer getPdSaledetno() {
-        return pdSaledetno;
-    }
-
-    public void setPdSaledetno(Integer pdSaledetno) {
-        this.pdSaledetno = pdSaledetno;
-    }
-
-    public Integer getPdSdid() {
-        return pdSdid;
-    }
-
-    public void setPdSdid(Integer pdSdid) {
-        this.pdSdid = pdSdid;
-    }
-
-    public String getPdText1() {
-        return pdText1;
-    }
-
-    public void setPdText1(String pdText1) {
-        this.pdText1 = pdText1 == null ? null : pdText1.trim();
-    }
-
-    public String getPdText2() {
-        return pdText2;
-    }
-
-    public void setPdText2(String pdText2) {
-        this.pdText2 = pdText2 == null ? null : pdText2.trim();
-    }
-
-    public String getPdText3() {
-        return pdText3;
-    }
-
-    public void setPdText3(String pdText3) {
-        this.pdText3 = pdText3 == null ? null : pdText3.trim();
-    }
-
-    public String getPdText4() {
-        return pdText4;
-    }
-
-    public void setPdText4(String pdText4) {
-        this.pdText4 = pdText4 == null ? null : pdText4.trim();
-    }
-
-    public String getPdText5() {
-        return pdText5;
-    }
-
-    public void setPdText5(String pdText5) {
-        this.pdText5 = pdText5 == null ? null : pdText5.trim();
-    }
-
-    public Double getPdYqty() {
-        return pdYqty;
-    }
-
-    public void setPdYqty(Double pdYqty) {
-        this.pdYqty = pdYqty;
-    }
-}

+ 0 - 1791
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/PurchasedetailExample.java

@@ -1,1791 +0,0 @@
-package com.usoftchina.saas.purchase.po;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-public class PurchasedetailExample {
-    protected String orderByClause;
-
-    protected boolean distinct;
-
-    protected List<Criteria> oredCriteria;
-
-    public PurchasedetailExample() {
-        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 andPdIdIsNull() {
-            addCriterion("PD_ID is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdIdIsNotNull() {
-            addCriterion("PD_ID is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdIdEqualTo(Integer value) {
-            addCriterion("PD_ID =", value, "pdId");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdIdNotEqualTo(Integer value) {
-            addCriterion("PD_ID <>", value, "pdId");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdIdGreaterThan(Integer value) {
-            addCriterion("PD_ID >", value, "pdId");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdIdGreaterThanOrEqualTo(Integer value) {
-            addCriterion("PD_ID >=", value, "pdId");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdIdLessThan(Integer value) {
-            addCriterion("PD_ID <", value, "pdId");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdIdLessThanOrEqualTo(Integer value) {
-            addCriterion("PD_ID <=", value, "pdId");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdIdIn(List<Integer> values) {
-            addCriterion("PD_ID in", values, "pdId");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdIdNotIn(List<Integer> values) {
-            addCriterion("PD_ID not in", values, "pdId");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdIdBetween(Integer value1, Integer value2) {
-            addCriterion("PD_ID between", value1, value2, "pdId");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdIdNotBetween(Integer value1, Integer value2) {
-            addCriterion("PD_ID not between", value1, value2, "pdId");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdPuidIsNull() {
-            addCriterion("PD_PUID is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdPuidIsNotNull() {
-            addCriterion("PD_PUID is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdPuidEqualTo(Integer value) {
-            addCriterion("PD_PUID =", value, "pdPuid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdPuidNotEqualTo(Integer value) {
-            addCriterion("PD_PUID <>", value, "pdPuid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdPuidGreaterThan(Integer value) {
-            addCriterion("PD_PUID >", value, "pdPuid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdPuidGreaterThanOrEqualTo(Integer value) {
-            addCriterion("PD_PUID >=", value, "pdPuid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdPuidLessThan(Integer value) {
-            addCriterion("PD_PUID <", value, "pdPuid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdPuidLessThanOrEqualTo(Integer value) {
-            addCriterion("PD_PUID <=", value, "pdPuid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdPuidIn(List<Integer> values) {
-            addCriterion("PD_PUID in", values, "pdPuid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdPuidNotIn(List<Integer> values) {
-            addCriterion("PD_PUID not in", values, "pdPuid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdPuidBetween(Integer value1, Integer value2) {
-            addCriterion("PD_PUID between", value1, value2, "pdPuid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdPuidNotBetween(Integer value1, Integer value2) {
-            addCriterion("PD_PUID not between", value1, value2, "pdPuid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdCodeIsNull() {
-            addCriterion("PD_CODE is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdCodeIsNotNull() {
-            addCriterion("PD_CODE is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdCodeEqualTo(String value) {
-            addCriterion("PD_CODE =", value, "pdCode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdCodeNotEqualTo(String value) {
-            addCriterion("PD_CODE <>", value, "pdCode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdCodeGreaterThan(String value) {
-            addCriterion("PD_CODE >", value, "pdCode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdCodeGreaterThanOrEqualTo(String value) {
-            addCriterion("PD_CODE >=", value, "pdCode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdCodeLessThan(String value) {
-            addCriterion("PD_CODE <", value, "pdCode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdCodeLessThanOrEqualTo(String value) {
-            addCriterion("PD_CODE <=", value, "pdCode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdCodeLike(String value) {
-            addCriterion("PD_CODE like", value, "pdCode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdCodeNotLike(String value) {
-            addCriterion("PD_CODE not like", value, "pdCode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdCodeIn(List<String> values) {
-            addCriterion("PD_CODE in", values, "pdCode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdCodeNotIn(List<String> values) {
-            addCriterion("PD_CODE not in", values, "pdCode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdCodeBetween(String value1, String value2) {
-            addCriterion("PD_CODE between", value1, value2, "pdCode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdCodeNotBetween(String value1, String value2) {
-            addCriterion("PD_CODE not between", value1, value2, "pdCode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdDetnoIsNull() {
-            addCriterion("PD_DETNO is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdDetnoIsNotNull() {
-            addCriterion("PD_DETNO is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdDetnoEqualTo(Integer value) {
-            addCriterion("PD_DETNO =", value, "pdDetno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdDetnoNotEqualTo(Integer value) {
-            addCriterion("PD_DETNO <>", value, "pdDetno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdDetnoGreaterThan(Integer value) {
-            addCriterion("PD_DETNO >", value, "pdDetno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdDetnoGreaterThanOrEqualTo(Integer value) {
-            addCriterion("PD_DETNO >=", value, "pdDetno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdDetnoLessThan(Integer value) {
-            addCriterion("PD_DETNO <", value, "pdDetno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdDetnoLessThanOrEqualTo(Integer value) {
-            addCriterion("PD_DETNO <=", value, "pdDetno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdDetnoIn(List<Integer> values) {
-            addCriterion("PD_DETNO in", values, "pdDetno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdDetnoNotIn(List<Integer> values) {
-            addCriterion("PD_DETNO not in", values, "pdDetno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdDetnoBetween(Integer value1, Integer value2) {
-            addCriterion("PD_DETNO between", value1, value2, "pdDetno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdDetnoNotBetween(Integer value1, Integer value2) {
-            addCriterion("PD_DETNO not between", value1, value2, "pdDetno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdProdidIsNull() {
-            addCriterion("PD_PRODID is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdProdidIsNotNull() {
-            addCriterion("PD_PRODID is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdProdidEqualTo(Integer value) {
-            addCriterion("PD_PRODID =", value, "pdProdid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdProdidNotEqualTo(Integer value) {
-            addCriterion("PD_PRODID <>", value, "pdProdid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdProdidGreaterThan(Integer value) {
-            addCriterion("PD_PRODID >", value, "pdProdid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdProdidGreaterThanOrEqualTo(Integer value) {
-            addCriterion("PD_PRODID >=", value, "pdProdid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdProdidLessThan(Integer value) {
-            addCriterion("PD_PRODID <", value, "pdProdid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdProdidLessThanOrEqualTo(Integer value) {
-            addCriterion("PD_PRODID <=", value, "pdProdid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdProdidIn(List<Integer> values) {
-            addCriterion("PD_PRODID in", values, "pdProdid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdProdidNotIn(List<Integer> values) {
-            addCriterion("PD_PRODID not in", values, "pdProdid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdProdidBetween(Integer value1, Integer value2) {
-            addCriterion("PD_PRODID between", value1, value2, "pdProdid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdProdidNotBetween(Integer value1, Integer value2) {
-            addCriterion("PD_PRODID not between", value1, value2, "pdProdid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdProdcodeIsNull() {
-            addCriterion("PD_PRODCODE is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdProdcodeIsNotNull() {
-            addCriterion("PD_PRODCODE is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdProdcodeEqualTo(String value) {
-            addCriterion("PD_PRODCODE =", value, "pdProdcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdProdcodeNotEqualTo(String value) {
-            addCriterion("PD_PRODCODE <>", value, "pdProdcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdProdcodeGreaterThan(String value) {
-            addCriterion("PD_PRODCODE >", value, "pdProdcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdProdcodeGreaterThanOrEqualTo(String value) {
-            addCriterion("PD_PRODCODE >=", value, "pdProdcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdProdcodeLessThan(String value) {
-            addCriterion("PD_PRODCODE <", value, "pdProdcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdProdcodeLessThanOrEqualTo(String value) {
-            addCriterion("PD_PRODCODE <=", value, "pdProdcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdProdcodeLike(String value) {
-            addCriterion("PD_PRODCODE like", value, "pdProdcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdProdcodeNotLike(String value) {
-            addCriterion("PD_PRODCODE not like", value, "pdProdcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdProdcodeIn(List<String> values) {
-            addCriterion("PD_PRODCODE in", values, "pdProdcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdProdcodeNotIn(List<String> values) {
-            addCriterion("PD_PRODCODE not in", values, "pdProdcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdProdcodeBetween(String value1, String value2) {
-            addCriterion("PD_PRODCODE between", value1, value2, "pdProdcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdProdcodeNotBetween(String value1, String value2) {
-            addCriterion("PD_PRODCODE not between", value1, value2, "pdProdcode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdUnitIsNull() {
-            addCriterion("PD_UNIT is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdUnitIsNotNull() {
-            addCriterion("PD_UNIT is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdUnitEqualTo(String value) {
-            addCriterion("PD_UNIT =", value, "pdUnit");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdUnitNotEqualTo(String value) {
-            addCriterion("PD_UNIT <>", value, "pdUnit");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdUnitGreaterThan(String value) {
-            addCriterion("PD_UNIT >", value, "pdUnit");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdUnitGreaterThanOrEqualTo(String value) {
-            addCriterion("PD_UNIT >=", value, "pdUnit");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdUnitLessThan(String value) {
-            addCriterion("PD_UNIT <", value, "pdUnit");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdUnitLessThanOrEqualTo(String value) {
-            addCriterion("PD_UNIT <=", value, "pdUnit");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdUnitLike(String value) {
-            addCriterion("PD_UNIT like", value, "pdUnit");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdUnitNotLike(String value) {
-            addCriterion("PD_UNIT not like", value, "pdUnit");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdUnitIn(List<String> values) {
-            addCriterion("PD_UNIT in", values, "pdUnit");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdUnitNotIn(List<String> values) {
-            addCriterion("PD_UNIT not in", values, "pdUnit");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdUnitBetween(String value1, String value2) {
-            addCriterion("PD_UNIT between", value1, value2, "pdUnit");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdUnitNotBetween(String value1, String value2) {
-            addCriterion("PD_UNIT not between", value1, value2, "pdUnit");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdQtyIsNull() {
-            addCriterion("PD_QTY is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdQtyIsNotNull() {
-            addCriterion("PD_QTY is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdQtyEqualTo(Double value) {
-            addCriterion("PD_QTY =", value, "pdQty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdQtyNotEqualTo(Double value) {
-            addCriterion("PD_QTY <>", value, "pdQty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdQtyGreaterThan(Double value) {
-            addCriterion("PD_QTY >", value, "pdQty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdQtyGreaterThanOrEqualTo(Double value) {
-            addCriterion("PD_QTY >=", value, "pdQty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdQtyLessThan(Double value) {
-            addCriterion("PD_QTY <", value, "pdQty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdQtyLessThanOrEqualTo(Double value) {
-            addCriterion("PD_QTY <=", value, "pdQty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdQtyIn(List<Double> values) {
-            addCriterion("PD_QTY in", values, "pdQty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdQtyNotIn(List<Double> values) {
-            addCriterion("PD_QTY not in", values, "pdQty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdQtyBetween(Double value1, Double value2) {
-            addCriterion("PD_QTY between", value1, value2, "pdQty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdQtyNotBetween(Double value1, Double value2) {
-            addCriterion("PD_QTY not between", value1, value2, "pdQty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdPriceIsNull() {
-            addCriterion("PD_PRICE is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdPriceIsNotNull() {
-            addCriterion("PD_PRICE is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdPriceEqualTo(Double value) {
-            addCriterion("PD_PRICE =", value, "pdPrice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdPriceNotEqualTo(Double value) {
-            addCriterion("PD_PRICE <>", value, "pdPrice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdPriceGreaterThan(Double value) {
-            addCriterion("PD_PRICE >", value, "pdPrice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdPriceGreaterThanOrEqualTo(Double value) {
-            addCriterion("PD_PRICE >=", value, "pdPrice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdPriceLessThan(Double value) {
-            addCriterion("PD_PRICE <", value, "pdPrice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdPriceLessThanOrEqualTo(Double value) {
-            addCriterion("PD_PRICE <=", value, "pdPrice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdPriceIn(List<Double> values) {
-            addCriterion("PD_PRICE in", values, "pdPrice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdPriceNotIn(List<Double> values) {
-            addCriterion("PD_PRICE not in", values, "pdPrice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdPriceBetween(Double value1, Double value2) {
-            addCriterion("PD_PRICE between", value1, value2, "pdPrice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdPriceNotBetween(Double value1, Double value2) {
-            addCriterion("PD_PRICE not between", value1, value2, "pdPrice");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdTotalIsNull() {
-            addCriterion("PD_TOTAL is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdTotalIsNotNull() {
-            addCriterion("PD_TOTAL is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdTotalEqualTo(Double value) {
-            addCriterion("PD_TOTAL =", value, "pdTotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdTotalNotEqualTo(Double value) {
-            addCriterion("PD_TOTAL <>", value, "pdTotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdTotalGreaterThan(Double value) {
-            addCriterion("PD_TOTAL >", value, "pdTotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdTotalGreaterThanOrEqualTo(Double value) {
-            addCriterion("PD_TOTAL >=", value, "pdTotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdTotalLessThan(Double value) {
-            addCriterion("PD_TOTAL <", value, "pdTotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdTotalLessThanOrEqualTo(Double value) {
-            addCriterion("PD_TOTAL <=", value, "pdTotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdTotalIn(List<Double> values) {
-            addCriterion("PD_TOTAL in", values, "pdTotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdTotalNotIn(List<Double> values) {
-            addCriterion("PD_TOTAL not in", values, "pdTotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdTotalBetween(Double value1, Double value2) {
-            addCriterion("PD_TOTAL between", value1, value2, "pdTotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdTotalNotBetween(Double value1, Double value2) {
-            addCriterion("PD_TOTAL not between", value1, value2, "pdTotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdTaxtotalIsNull() {
-            addCriterion("PD_TAXTOTAL is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdTaxtotalIsNotNull() {
-            addCriterion("PD_TAXTOTAL is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdTaxtotalEqualTo(Double value) {
-            addCriterion("PD_TAXTOTAL =", value, "pdTaxtotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdTaxtotalNotEqualTo(Double value) {
-            addCriterion("PD_TAXTOTAL <>", value, "pdTaxtotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdTaxtotalGreaterThan(Double value) {
-            addCriterion("PD_TAXTOTAL >", value, "pdTaxtotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdTaxtotalGreaterThanOrEqualTo(Double value) {
-            addCriterion("PD_TAXTOTAL >=", value, "pdTaxtotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdTaxtotalLessThan(Double value) {
-            addCriterion("PD_TAXTOTAL <", value, "pdTaxtotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdTaxtotalLessThanOrEqualTo(Double value) {
-            addCriterion("PD_TAXTOTAL <=", value, "pdTaxtotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdTaxtotalIn(List<Double> values) {
-            addCriterion("PD_TAXTOTAL in", values, "pdTaxtotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdTaxtotalNotIn(List<Double> values) {
-            addCriterion("PD_TAXTOTAL not in", values, "pdTaxtotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdTaxtotalBetween(Double value1, Double value2) {
-            addCriterion("PD_TAXTOTAL between", value1, value2, "pdTaxtotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdTaxtotalNotBetween(Double value1, Double value2) {
-            addCriterion("PD_TAXTOTAL not between", value1, value2, "pdTaxtotal");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdAcceptqtyIsNull() {
-            addCriterion("PD_ACCEPTQTY is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdAcceptqtyIsNotNull() {
-            addCriterion("PD_ACCEPTQTY is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdAcceptqtyEqualTo(Double value) {
-            addCriterion("PD_ACCEPTQTY =", value, "pdAcceptqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdAcceptqtyNotEqualTo(Double value) {
-            addCriterion("PD_ACCEPTQTY <>", value, "pdAcceptqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdAcceptqtyGreaterThan(Double value) {
-            addCriterion("PD_ACCEPTQTY >", value, "pdAcceptqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdAcceptqtyGreaterThanOrEqualTo(Double value) {
-            addCriterion("PD_ACCEPTQTY >=", value, "pdAcceptqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdAcceptqtyLessThan(Double value) {
-            addCriterion("PD_ACCEPTQTY <", value, "pdAcceptqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdAcceptqtyLessThanOrEqualTo(Double value) {
-            addCriterion("PD_ACCEPTQTY <=", value, "pdAcceptqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdAcceptqtyIn(List<Double> values) {
-            addCriterion("PD_ACCEPTQTY in", values, "pdAcceptqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdAcceptqtyNotIn(List<Double> values) {
-            addCriterion("PD_ACCEPTQTY not in", values, "pdAcceptqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdAcceptqtyBetween(Double value1, Double value2) {
-            addCriterion("PD_ACCEPTQTY between", value1, value2, "pdAcceptqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdAcceptqtyNotBetween(Double value1, Double value2) {
-            addCriterion("PD_ACCEPTQTY not between", value1, value2, "pdAcceptqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdDeliveryIsNull() {
-            addCriterion("PD_DELIVERY is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdDeliveryIsNotNull() {
-            addCriterion("PD_DELIVERY is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdDeliveryEqualTo(Double value) {
-            addCriterion("PD_DELIVERY =", value, "pdDelivery");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdDeliveryNotEqualTo(Double value) {
-            addCriterion("PD_DELIVERY <>", value, "pdDelivery");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdDeliveryGreaterThan(Double value) {
-            addCriterion("PD_DELIVERY >", value, "pdDelivery");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdDeliveryGreaterThanOrEqualTo(Double value) {
-            addCriterion("PD_DELIVERY >=", value, "pdDelivery");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdDeliveryLessThan(Double value) {
-            addCriterion("PD_DELIVERY <", value, "pdDelivery");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdDeliveryLessThanOrEqualTo(Double value) {
-            addCriterion("PD_DELIVERY <=", value, "pdDelivery");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdDeliveryIn(List<Double> values) {
-            addCriterion("PD_DELIVERY in", values, "pdDelivery");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdDeliveryNotIn(List<Double> values) {
-            addCriterion("PD_DELIVERY not in", values, "pdDelivery");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdDeliveryBetween(Double value1, Double value2) {
-            addCriterion("PD_DELIVERY between", value1, value2, "pdDelivery");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdDeliveryNotBetween(Double value1, Double value2) {
-            addCriterion("PD_DELIVERY not between", value1, value2, "pdDelivery");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSalecodeIsNull() {
-            addCriterion("PD_SALECODE is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSalecodeIsNotNull() {
-            addCriterion("PD_SALECODE is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSalecodeEqualTo(String value) {
-            addCriterion("PD_SALECODE =", value, "pdSalecode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSalecodeNotEqualTo(String value) {
-            addCriterion("PD_SALECODE <>", value, "pdSalecode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSalecodeGreaterThan(String value) {
-            addCriterion("PD_SALECODE >", value, "pdSalecode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSalecodeGreaterThanOrEqualTo(String value) {
-            addCriterion("PD_SALECODE >=", value, "pdSalecode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSalecodeLessThan(String value) {
-            addCriterion("PD_SALECODE <", value, "pdSalecode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSalecodeLessThanOrEqualTo(String value) {
-            addCriterion("PD_SALECODE <=", value, "pdSalecode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSalecodeLike(String value) {
-            addCriterion("PD_SALECODE like", value, "pdSalecode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSalecodeNotLike(String value) {
-            addCriterion("PD_SALECODE not like", value, "pdSalecode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSalecodeIn(List<String> values) {
-            addCriterion("PD_SALECODE in", values, "pdSalecode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSalecodeNotIn(List<String> values) {
-            addCriterion("PD_SALECODE not in", values, "pdSalecode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSalecodeBetween(String value1, String value2) {
-            addCriterion("PD_SALECODE between", value1, value2, "pdSalecode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSalecodeNotBetween(String value1, String value2) {
-            addCriterion("PD_SALECODE not between", value1, value2, "pdSalecode");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSaledetnoIsNull() {
-            addCriterion("PD_SALEDETNO is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSaledetnoIsNotNull() {
-            addCriterion("PD_SALEDETNO is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSaledetnoEqualTo(Integer value) {
-            addCriterion("PD_SALEDETNO =", value, "pdSaledetno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSaledetnoNotEqualTo(Integer value) {
-            addCriterion("PD_SALEDETNO <>", value, "pdSaledetno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSaledetnoGreaterThan(Integer value) {
-            addCriterion("PD_SALEDETNO >", value, "pdSaledetno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSaledetnoGreaterThanOrEqualTo(Integer value) {
-            addCriterion("PD_SALEDETNO >=", value, "pdSaledetno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSaledetnoLessThan(Integer value) {
-            addCriterion("PD_SALEDETNO <", value, "pdSaledetno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSaledetnoLessThanOrEqualTo(Integer value) {
-            addCriterion("PD_SALEDETNO <=", value, "pdSaledetno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSaledetnoIn(List<Integer> values) {
-            addCriterion("PD_SALEDETNO in", values, "pdSaledetno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSaledetnoNotIn(List<Integer> values) {
-            addCriterion("PD_SALEDETNO not in", values, "pdSaledetno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSaledetnoBetween(Integer value1, Integer value2) {
-            addCriterion("PD_SALEDETNO between", value1, value2, "pdSaledetno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSaledetnoNotBetween(Integer value1, Integer value2) {
-            addCriterion("PD_SALEDETNO not between", value1, value2, "pdSaledetno");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSdidIsNull() {
-            addCriterion("PD_SDID is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSdidIsNotNull() {
-            addCriterion("PD_SDID is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSdidEqualTo(Integer value) {
-            addCriterion("PD_SDID =", value, "pdSdid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSdidNotEqualTo(Integer value) {
-            addCriterion("PD_SDID <>", value, "pdSdid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSdidGreaterThan(Integer value) {
-            addCriterion("PD_SDID >", value, "pdSdid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSdidGreaterThanOrEqualTo(Integer value) {
-            addCriterion("PD_SDID >=", value, "pdSdid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSdidLessThan(Integer value) {
-            addCriterion("PD_SDID <", value, "pdSdid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSdidLessThanOrEqualTo(Integer value) {
-            addCriterion("PD_SDID <=", value, "pdSdid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSdidIn(List<Integer> values) {
-            addCriterion("PD_SDID in", values, "pdSdid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSdidNotIn(List<Integer> values) {
-            addCriterion("PD_SDID not in", values, "pdSdid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSdidBetween(Integer value1, Integer value2) {
-            addCriterion("PD_SDID between", value1, value2, "pdSdid");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdSdidNotBetween(Integer value1, Integer value2) {
-            addCriterion("PD_SDID not between", value1, value2, "pdSdid");
-            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 andUpdatemanidIsNull() {
-            addCriterion("updatemanid is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatemanidIsNotNull() {
-            addCriterion("updatemanid is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatemanidEqualTo(Integer value) {
-            addCriterion("updatemanid =", value, "updatemanid");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatemanidNotEqualTo(Integer value) {
-            addCriterion("updatemanid <>", value, "updatemanid");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatemanidGreaterThan(Integer value) {
-            addCriterion("updatemanid >", value, "updatemanid");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatemanidGreaterThanOrEqualTo(Integer value) {
-            addCriterion("updatemanid >=", value, "updatemanid");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatemanidLessThan(Integer value) {
-            addCriterion("updatemanid <", value, "updatemanid");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatemanidLessThanOrEqualTo(Integer value) {
-            addCriterion("updatemanid <=", value, "updatemanid");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatemanidIn(List<Integer> values) {
-            addCriterion("updatemanid in", values, "updatemanid");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatemanidNotIn(List<Integer> values) {
-            addCriterion("updatemanid not in", values, "updatemanid");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatemanidBetween(Integer value1, Integer value2) {
-            addCriterion("updatemanid between", value1, value2, "updatemanid");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatemanidNotBetween(Integer value1, Integer value2) {
-            addCriterion("updatemanid not between", value1, value2, "updatemanid");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatedateIsNull() {
-            addCriterion("updatedate is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatedateIsNotNull() {
-            addCriterion("updatedate is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatedateEqualTo(Date value) {
-            addCriterion("updatedate =", value, "updatedate");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatedateNotEqualTo(Date value) {
-            addCriterion("updatedate <>", value, "updatedate");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatedateGreaterThan(Date value) {
-            addCriterion("updatedate >", value, "updatedate");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatedateGreaterThanOrEqualTo(Date value) {
-            addCriterion("updatedate >=", value, "updatedate");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatedateLessThan(Date value) {
-            addCriterion("updatedate <", value, "updatedate");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatedateLessThanOrEqualTo(Date value) {
-            addCriterion("updatedate <=", value, "updatedate");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatedateIn(List<Date> values) {
-            addCriterion("updatedate in", values, "updatedate");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatedateNotIn(List<Date> values) {
-            addCriterion("updatedate not in", values, "updatedate");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatedateBetween(Date value1, Date value2) {
-            addCriterion("updatedate between", value1, value2, "updatedate");
-            return (Criteria) this;
-        }
-
-        public Criteria andUpdatedateNotBetween(Date value1, Date value2) {
-            addCriterion("updatedate not between", value1, value2, "updatedate");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText1IsNull() {
-            addCriterion("pd_text1 is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText1IsNotNull() {
-            addCriterion("pd_text1 is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText1EqualTo(String value) {
-            addCriterion("pd_text1 =", value, "pdText1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText1NotEqualTo(String value) {
-            addCriterion("pd_text1 <>", value, "pdText1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText1GreaterThan(String value) {
-            addCriterion("pd_text1 >", value, "pdText1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText1GreaterThanOrEqualTo(String value) {
-            addCriterion("pd_text1 >=", value, "pdText1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText1LessThan(String value) {
-            addCriterion("pd_text1 <", value, "pdText1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText1LessThanOrEqualTo(String value) {
-            addCriterion("pd_text1 <=", value, "pdText1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText1Like(String value) {
-            addCriterion("pd_text1 like", value, "pdText1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText1NotLike(String value) {
-            addCriterion("pd_text1 not like", value, "pdText1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText1In(List<String> values) {
-            addCriterion("pd_text1 in", values, "pdText1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText1NotIn(List<String> values) {
-            addCriterion("pd_text1 not in", values, "pdText1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText1Between(String value1, String value2) {
-            addCriterion("pd_text1 between", value1, value2, "pdText1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText1NotBetween(String value1, String value2) {
-            addCriterion("pd_text1 not between", value1, value2, "pdText1");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText2IsNull() {
-            addCriterion("pd_text2 is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText2IsNotNull() {
-            addCriterion("pd_text2 is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText2EqualTo(String value) {
-            addCriterion("pd_text2 =", value, "pdText2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText2NotEqualTo(String value) {
-            addCriterion("pd_text2 <>", value, "pdText2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText2GreaterThan(String value) {
-            addCriterion("pd_text2 >", value, "pdText2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText2GreaterThanOrEqualTo(String value) {
-            addCriterion("pd_text2 >=", value, "pdText2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText2LessThan(String value) {
-            addCriterion("pd_text2 <", value, "pdText2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText2LessThanOrEqualTo(String value) {
-            addCriterion("pd_text2 <=", value, "pdText2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText2Like(String value) {
-            addCriterion("pd_text2 like", value, "pdText2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText2NotLike(String value) {
-            addCriterion("pd_text2 not like", value, "pdText2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText2In(List<String> values) {
-            addCriterion("pd_text2 in", values, "pdText2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText2NotIn(List<String> values) {
-            addCriterion("pd_text2 not in", values, "pdText2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText2Between(String value1, String value2) {
-            addCriterion("pd_text2 between", value1, value2, "pdText2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText2NotBetween(String value1, String value2) {
-            addCriterion("pd_text2 not between", value1, value2, "pdText2");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText3IsNull() {
-            addCriterion("pd_text3 is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText3IsNotNull() {
-            addCriterion("pd_text3 is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText3EqualTo(String value) {
-            addCriterion("pd_text3 =", value, "pdText3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText3NotEqualTo(String value) {
-            addCriterion("pd_text3 <>", value, "pdText3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText3GreaterThan(String value) {
-            addCriterion("pd_text3 >", value, "pdText3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText3GreaterThanOrEqualTo(String value) {
-            addCriterion("pd_text3 >=", value, "pdText3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText3LessThan(String value) {
-            addCriterion("pd_text3 <", value, "pdText3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText3LessThanOrEqualTo(String value) {
-            addCriterion("pd_text3 <=", value, "pdText3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText3Like(String value) {
-            addCriterion("pd_text3 like", value, "pdText3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText3NotLike(String value) {
-            addCriterion("pd_text3 not like", value, "pdText3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText3In(List<String> values) {
-            addCriterion("pd_text3 in", values, "pdText3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText3NotIn(List<String> values) {
-            addCriterion("pd_text3 not in", values, "pdText3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText3Between(String value1, String value2) {
-            addCriterion("pd_text3 between", value1, value2, "pdText3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText3NotBetween(String value1, String value2) {
-            addCriterion("pd_text3 not between", value1, value2, "pdText3");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText4IsNull() {
-            addCriterion("pd_text4 is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText4IsNotNull() {
-            addCriterion("pd_text4 is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText4EqualTo(String value) {
-            addCriterion("pd_text4 =", value, "pdText4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText4NotEqualTo(String value) {
-            addCriterion("pd_text4 <>", value, "pdText4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText4GreaterThan(String value) {
-            addCriterion("pd_text4 >", value, "pdText4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText4GreaterThanOrEqualTo(String value) {
-            addCriterion("pd_text4 >=", value, "pdText4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText4LessThan(String value) {
-            addCriterion("pd_text4 <", value, "pdText4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText4LessThanOrEqualTo(String value) {
-            addCriterion("pd_text4 <=", value, "pdText4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText4Like(String value) {
-            addCriterion("pd_text4 like", value, "pdText4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText4NotLike(String value) {
-            addCriterion("pd_text4 not like", value, "pdText4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText4In(List<String> values) {
-            addCriterion("pd_text4 in", values, "pdText4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText4NotIn(List<String> values) {
-            addCriterion("pd_text4 not in", values, "pdText4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText4Between(String value1, String value2) {
-            addCriterion("pd_text4 between", value1, value2, "pdText4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText4NotBetween(String value1, String value2) {
-            addCriterion("pd_text4 not between", value1, value2, "pdText4");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText5IsNull() {
-            addCriterion("pd_text5 is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText5IsNotNull() {
-            addCriterion("pd_text5 is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText5EqualTo(String value) {
-            addCriterion("pd_text5 =", value, "pdText5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText5NotEqualTo(String value) {
-            addCriterion("pd_text5 <>", value, "pdText5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText5GreaterThan(String value) {
-            addCriterion("pd_text5 >", value, "pdText5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText5GreaterThanOrEqualTo(String value) {
-            addCriterion("pd_text5 >=", value, "pdText5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText5LessThan(String value) {
-            addCriterion("pd_text5 <", value, "pdText5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText5LessThanOrEqualTo(String value) {
-            addCriterion("pd_text5 <=", value, "pdText5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText5Like(String value) {
-            addCriterion("pd_text5 like", value, "pdText5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText5NotLike(String value) {
-            addCriterion("pd_text5 not like", value, "pdText5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText5In(List<String> values) {
-            addCriterion("pd_text5 in", values, "pdText5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText5NotIn(List<String> values) {
-            addCriterion("pd_text5 not in", values, "pdText5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText5Between(String value1, String value2) {
-            addCriterion("pd_text5 between", value1, value2, "pdText5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdText5NotBetween(String value1, String value2) {
-            addCriterion("pd_text5 not between", value1, value2, "pdText5");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdYqtyIsNull() {
-            addCriterion("pd_yqty is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdYqtyIsNotNull() {
-            addCriterion("pd_yqty is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdYqtyEqualTo(Double value) {
-            addCriterion("pd_yqty =", value, "pdYqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdYqtyNotEqualTo(Double value) {
-            addCriterion("pd_yqty <>", value, "pdYqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdYqtyGreaterThan(Double value) {
-            addCriterion("pd_yqty >", value, "pdYqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdYqtyGreaterThanOrEqualTo(Double value) {
-            addCriterion("pd_yqty >=", value, "pdYqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdYqtyLessThan(Double value) {
-            addCriterion("pd_yqty <", value, "pdYqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdYqtyLessThanOrEqualTo(Double value) {
-            addCriterion("pd_yqty <=", value, "pdYqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdYqtyIn(List<Double> values) {
-            addCriterion("pd_yqty in", values, "pdYqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdYqtyNotIn(List<Double> values) {
-            addCriterion("pd_yqty not in", values, "pdYqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdYqtyBetween(Double value1, Double value2) {
-            addCriterion("pd_yqty between", value1, value2, "pdYqty");
-            return (Criteria) this;
-        }
-
-        public Criteria andPdYqtyNotBetween(Double value1, Double value2) {
-            addCriterion("pd_yqty not between", value1, value2, "pdYqty");
-            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);
-        }
-    }
-}

+ 25 - 4
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/PurchaseService.java

@@ -2,6 +2,7 @@ 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.page.PageRequest;
 import com.usoftchina.saas.purchase.dto.PurchaseFormDTO;
 import com.usoftchina.saas.purchase.dto.PurchaseListDTO;
@@ -9,6 +10,8 @@ import com.usoftchina.saas.purchase.dto.PurchaseReqDTO;
 import com.usoftchina.saas.purchase.mapper.PurchaseMapper;
 import com.usoftchina.saas.purchase.po.Purchase;
 
+import java.util.List;
+
 /**
  * @author yingp
  * @date 2018/10/9
@@ -36,7 +39,7 @@ public interface PurchaseService extends CommonBaseService<PurchaseMapper, Purch
      * @param id
      * @return
      */
-    PurchaseFormDTO getFormData(Integer id);
+    PurchaseFormDTO getFormData(Long id);
 
     /**
      * 保存
@@ -52,7 +55,7 @@ public interface PurchaseService extends CommonBaseService<PurchaseMapper, Purch
      * @param id
      * @return
      */
-    void delete(Integer id);
+    void delete(Long id);
 
     /**
      * 删除明细
@@ -60,7 +63,7 @@ public interface PurchaseService extends CommonBaseService<PurchaseMapper, Purch
      * @param id
      * @return
      */
-    int deleteItem(Integer id);
+    int deleteItem(Long id);
 
     /**
      * 删除明细
@@ -68,6 +71,24 @@ public interface PurchaseService extends CommonBaseService<PurchaseMapper, Purch
      * @param formData
      * @return
      */
-    int audit(PurchaseFormDTO formData);
+    Long audit(PurchaseFormDTO formData);
+
+    /**
+    * @Description 批量审核
+    * @Param: [baseDTOs]
+    * @return: void
+    * @Author: guq
+    * @Date: 2018/10/15
+    */
+    void batchAudit(BatchDealBaseDTO baseDTOs);
+
+    /**
+    * @Description 批量删除
+    * @Param: [baseDTOs]
+    * @return: void
+    * @Author: guq
+    * @Date: 2018/10/15
+    */
+    void batchDelete(BatchDealBaseDTO baseDTOs);
 
 }

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

@@ -4,6 +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.document.api.ProductApi;
+import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.purchase.dto.*;
 import com.usoftchina.saas.purchase.mapper.PurchaseListMapper;
@@ -13,13 +17,15 @@ import com.usoftchina.saas.purchase.po.*;
 import com.usoftchina.saas.purchase.service.PurchaseService;
 import com.usoftchina.saas.utils.BeanMapper;
 
-import org.apache.commons.lang.StringUtils;
+import com.usoftchina.saas.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 
+
 /**
  * @author yingp
  * @date 2018/10/9
@@ -33,10 +39,12 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
     private PurchasedetailMapper purchasedetailMapper;
     @Autowired
     private PurchaseListMapper purchaseListMapper;
+    @Autowired
+    private ProductApi productApi;
 
     @Override
     public PageInfo<PurchaseListDTO> getListData(PageRequest page, PurchaseReqDTO req) {
-        //设置分页
+        //设置默认分页
         if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
             page = new PageRequest();
             page.setNumber(1);
@@ -44,7 +52,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         }
         PageHelper.startPage(page.getNumber(), page.getSize());
         //查询数据
-        List<PurchaseList> lists = purchaseListMapper.selectByCondition(req);
+        List<PurchaseList> lists = getListByMode(req);
         //转换成传输对象
         List<PurchaseListDTO> purchaseListDTOS = new ArrayList<>();
         for (PurchaseList list : lists) {
@@ -52,26 +60,22 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         }
         //取分页信息
         PageInfo<PurchaseListDTO> pageInfo = new PageInfo<PurchaseListDTO>(purchaseListDTOS);
+        pageInfo.getTotal();
         return pageInfo;
     }
 
     @Override
-    public PurchaseFormDTO getFormData(Integer id) {
+    public PurchaseFormDTO getFormData(Long id) {
         PurchaseFormDTO purchaseFormDTO = new PurchaseFormDTO();
         //查询主表信息
         Purchase purchase = getMapper().selectByPrimaryKey(id);
-        //创建从表查询模板
-        PurchasedetailExample purchasedetailExample = new PurchasedetailExample();
-        PurchasedetailExample.Criteria cta = purchasedetailExample.createCriteria();
-        //设置查询条件
-        cta.andPdPuidEqualTo(id);
         //查询从表
-        List<Purchasedetail> purchasedetails = purchasedetailMapper.selectByExample(purchasedetailExample);
+        List<PurchaseItem> purchaseItems = purchasedetailMapper.selectByFK(id);
         //将purchase实体对象转化成传输对象
         PurchaseDTO main = BeanMapper.map(purchase, PurchaseDTO.class);
         List<PurchaseItemDTO> items = new ArrayList<>();
         //添加从表传输对象
-        for (Purchasedetail detail : purchasedetails) {
+        for (PurchaseItem detail : purchaseItems) {
             items.add(BeanMapper.map(detail, PurchaseItemDTO.class));
         }
         purchaseFormDTO.setMain(main);
@@ -81,71 +85,139 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
 
     @Override
     public Long saveFormData(PurchaseFormDTO formdata) {
+        if (null == formdata || null == formdata.getMain()){
+            throw new BizException(500, "数据为空,请填写后再保存");
+        }
         //获取主表信息
         PurchaseDTO main = formdata.getMain();
-        //转换实体类
+        List<PurchaseItemDTO> items = formdata.getItems();
+        List<PurchaseItem> insertDetails = new ArrayList<>();
+        List<PurchaseItem> updateDetails = new ArrayList<>();
+        Long pu_id = main.getId();
+        String pu_code = main.getPu_code();
         Purchase purchase = BeanMapper.map(main, Purchase.class);
-        // TODO: 2018/10/11 字段处理...
-        //插入对象
+        //编号获取
+        if (!StringUtils.hasText(pu_code)) {
+            pu_code = "PU" + Math.random() * 1000;
+        }
+        //判断更新与保存动作
+        if (StringUtils.hasText(pu_id)) {
+            //更新主表
+            purchaseMapper.updateByPrimaryKey(purchase);
+            //添加从表传输对象
+            for (PurchaseItemDTO item : items) {
+                PurchaseItem detail = BeanMapper.map(item, PurchaseItem.class);
+                detail.setPd_puid(pu_id);
+                detail.setPd_code(pu_code);
+                if (StringUtils.hasText(detail.getId())) {
+                    updateDetails.add(detail);
+                } else {
+                    insertDetails.add(detail);
+                }
+            }
+            //插入从表
+            if (insertDetails.size() > 0) {
+                purchasedetailMapper.batchInsert(insertDetails);
+            }
+            //更新从表
+            if (updateDetails.size() > 0) {
+                purchasedetailMapper.batchUpdate(updateDetails);
+            }
+            return pu_id;
+        }
+        //插入操作
         purchaseMapper.insertSelective(purchase);
-        Long pu_id = purchase.getId();
-        //获取从表信息
-        List<PurchaseItemDTO> items = formdata.getItems();
+        pu_id = purchase.getId();
         //添加从表传输对象
-        List<Purchasedetail> details = new ArrayList<>();
         for (PurchaseItemDTO item : items) {
-            Purchasedetail detail = BeanMapper.map(item, Purchasedetail.class);
-            // TODO: 2018/10/11 字段处理...
-            details.add(detail);
+            PurchaseItem detail = BeanMapper.map(item, PurchaseItem.class);
+            detail.setPd_puid(pu_id);
+            detail.setPd_code(pu_code);
+            insertDetails.add(detail);
         }
         //插入从表
-        purchasedetailMapper.batchInsert(details);
+        if (insertDetails.size() > 0) {
+            purchasedetailMapper.batchInsert(insertDetails);
+        }
         return pu_id;
     }
 
     @Override
-    public void delete(Integer id) {
-        //从表删除
-        PurchasedetailExample purchasedetailExample = new PurchasedetailExample();
-        PurchasedetailExample.Criteria cta = purchasedetailExample.createCriteria();
-        cta.andPdPuidEqualTo(id);
-        purchasedetailMapper.deleteByExample(purchasedetailExample);
-        //主表删除
-        getMapper().deleteByPrimaryKey(id);
+    public void delete(Long id) {
+        singleDelete(id);
     }
 
     @Override
-    public int deleteItem(Integer id) {
+    public int deleteItem(Long id) {
         return purchasedetailMapper.deleteByPrimaryKey(id);
     }
 
     @Override
-    public int audit(PurchaseFormDTO formData) {
-        int affect = 0;
+    public Long audit(PurchaseFormDTO formData) {
+        Long id = null;
         if (null != formData) {
-            String code = formData.getMain().getPuCode();
-            if (StringUtils.isEmpty(code)) {
-                return affect;
-            }
-            //查询是否存在该采购单
-            PurchaseExample purchaseExample = new PurchaseExample();
-            PurchaseExample.Criteria cta = purchaseExample.createCriteria();
-            cta.andPuCodeEqualTo(code);
-            int count = purchaseMapper.countByExample(purchaseExample);
-            Long id = null;
-            //不存在则保存
-            if (count == 0) {
+            id = formData.getMain().getId();
+            if (!StringUtils.hasText(id)) {
                 id = saveFormData(formData);
             }
-            Purchase purchase = new Purchase();
-            //生成更新对象
-            purchase.setId(id);
-            purchase.setPuStatus(Status.AUDITED.getDisplay());
-            purchase.setPuStatuscode(Status.AUDITED.name());
-            //更新存在字段
-            affect = purchaseMapper.updateByPrimaryKeySelective(purchase);
+            singleAudit(id);
+        }
+        return id;
+    }
+
+    @Override
+    public void batchAudit(BatchDealBaseDTO baseDTOs) {
+        if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
+                baseDTOs.getBaseDTOs().size() == 0)
+            return;
+        String validate = purchaseMapper.validateAudit(baseDTOs.getBaseDTOs());
+        if (StringUtils.hasText(validate)) {
+            throw new BizException(500, "存在已审核单据,单据编号:" + validate);
+        }
+        for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
+            singleAudit(base.getId());
+        }
+    }
+
+    @Override
+    public void batchDelete(BatchDealBaseDTO baseDTOs) {
+        if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
+                baseDTOs.getBaseDTOs().size() == 0)
+            return;
+        for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
+            singleDelete(base.getId());
         }
-        return affect;
     }
 
+    private void singleAudit(Long id) {
+        Purchase purchase = new Purchase();
+        //生成更新对象
+        purchase.setId(id);
+        purchase.setPu_status(Status.AUDITED.getDisplay());
+        purchase.setPu_statuscode(Status.AUDITED.name());
+        purchase.setUpdateTime(new Date());
+        //更新存在字段
+        purchaseMapper.updateByPrimaryKeySelective(purchase);
+        //更新最新采购单价
+        productApi.updateLatestPurchasePrice(id);
+    }
+
+    private void singleDelete(Long id) {
+        if (null != id) {
+            //从表删除
+            purchasedetailMapper.deleteByForeignKey(id);
+            //主表删除
+            purchaseMapper.deleteByPrimaryKey(id);
+        }
+    }
+
+    private List<PurchaseList> getListByMode(PurchaseReqDTO req) {
+        List<PurchaseList> list = null;
+        if (null == req || !StringUtils.hasText(req.getMode()) || "Main".equals(req.getMode())) {
+            list = purchaseListMapper.selectPurchaseBycondition(req);
+        } else {
+            list = purchaseListMapper.selectPurchaseListByCondition(req);
+        }
+        return list;
+    }
 }

+ 1 - 1
applications/purchase/purchase-server/src/main/resources/application.yml

@@ -7,7 +7,7 @@ spring:
       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
+    url: jdbc:mysql://192.168.253.12:3306/saas_biz?characterEncoding=utf-8&useSSL=false&allowMultiQueries=true
     username: root
     password: select111***
     hikari:

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

@@ -2,60 +2,60 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
 <mapper namespace="com.usoftchina.saas.purchase.mapper.PurchaseListMapper">
     <resultMap id="BaseResultMap" type="com.usoftchina.saas.purchase.po.PurchaseList">
-        <id column="pu_id" property="puId" jdbcType="INTEGER" />
-        <result column="pu_code" property="puCode" jdbcType="VARCHAR" />
-        <result column="pu_date" property="puDate" jdbcType="TIMESTAMP" />
-        <result column="pu_vendid" property="puVendid" jdbcType="INTEGER" />
-        <result column="PU_VENDCODE" property="puVendcode" jdbcType="VARCHAR" />
-        <result column="PU_VENDNAME" property="puVendname" jdbcType="VARCHAR" />
-        <result column="PU_BUYERID" property="puBuyerid" jdbcType="INTEGER" />
-        <result column="PU_BUYERCODE" property="puBuyercode" jdbcType="VARCHAR" />
-        <result column="PU_BUYERNAME" property="puBuyername" jdbcType="VARCHAR" />
-        <result column="PU_DELIVERY" property="puDelivery" jdbcType="TIMESTAMP" />
-        <result column="PU_TAXTOTAL" property="puTaxtotal" jdbcType="DOUBLE" />
-        <result column="PU_TOTAL" property="puTotal" jdbcType="DOUBLE" />
-        <result column="PU_REMARK" property="puRemark" jdbcType="VARCHAR" />
-        <result column="PU_TOTALUPPER" property="puTotalupper" jdbcType="VARCHAR" />
+        <id column="pu_id" property="pu_id" jdbcType="INTEGER" />
+        <result column="pu_code" property="pu_code" jdbcType="VARCHAR" />
+        <result column="pu_date" property="pu_date" jdbcType="TIMESTAMP" />
+        <result column="pu_vendid" property="pu_vendid" jdbcType="INTEGER" />
+        <result column="PU_VENDCODE" property="pu_vendcode" jdbcType="VARCHAR" />
+        <result column="PU_VENDNAME" property="pu_vendname" jdbcType="VARCHAR" />
+        <result column="PU_BUYERID" property="pu_buyerid" jdbcType="INTEGER" />
+        <result column="PU_BUYERCODE" property="pu_buyercode" jdbcType="VARCHAR" />
+        <result column="PU_BUYERNAME" property="pu_buyername" jdbcType="VARCHAR" />
+        <result column="PU_DELIVERY" property="pu_delivery" jdbcType="TIMESTAMP" />
+        <result column="PU_TAXTOTAL" property="pu_taxtotal" jdbcType="DOUBLE" />
+        <result column="PU_TOTAL" property="pu_total" jdbcType="DOUBLE" />
+        <result column="PU_REMARK" property="pu_remark" jdbcType="VARCHAR" />
+        <result column="PU_TOTALUPPER" property="pu_totalupper" jdbcType="VARCHAR" />
         <result column="PU_INDATE" property="createTime" jdbcType="TIMESTAMP" />
-        <result column="PU_PRINTSTATUS" property="puPrintstatus" jdbcType="VARCHAR" />
-        <result column="PU_PRINTSTATUSCODE" property="puPrintstatuscode" jdbcType="VARCHAR" />
-        <result column="PU_ACCEPTSTATUSCODE" property="puAcceptstatuscode" jdbcType="VARCHAR" />
-        <result column="PU_ACCEPTSTATUS" property="puAcceptstatus" jdbcType="VARCHAR" />
-        <result column="PU_STATUSCODE" property="puStatuscode" jdbcType="VARCHAR" />
-        <result column="PU_STATUS" property="puStatus" jdbcType="VARCHAR" />
+        <result column="PU_PRINTSTATUS" property="pu_printstatus" jdbcType="VARCHAR" />
+        <result column="PU_PRINTSTATUSCODE" property="pu_printstatuscode" jdbcType="VARCHAR" />
+        <result column="PU_ACCEPTSTATUSCODE" property="pu_acceptstatuscode" jdbcType="VARCHAR" />
+        <result column="PU_ACCEPTSTATUS" property="pu_acceptstatus" jdbcType="VARCHAR" />
+        <result column="PU_STATUSCODE" property="pu_statuscode" jdbcType="VARCHAR" />
+        <result column="PU_STATUS" property="pu_status" jdbcType="VARCHAR" />
         <result column="companyid" property="companyId" jdbcType="BIGINT" />
         <result column="updatemanid" property="updaterId" jdbcType="INTEGER" />
         <result column="updatedate" property="updateTime" jdbcType="TIMESTAMP" />
-        <result column="pu_text1" property="puText1" jdbcType="VARCHAR" />
-        <result column="pu_text2" property="puText2" jdbcType="VARCHAR" />
-        <result column="pu_text3" property="puText3" jdbcType="VARCHAR" />
-        <result column="pu_text4" property="puText4" jdbcType="VARCHAR" />
-        <result column="pu_text5" property="puText5" jdbcType="VARCHAR" />
-        <result column="PD_ID" property="pdId" jdbcType="INTEGER" />
-        <result column="PD_PUID" property="pdPuid" jdbcType="INTEGER" />
-        <result column="PD_CODE" property="pdCode" jdbcType="VARCHAR" />
-        <result column="PD_DETNO" property="pdDetno" jdbcType="INTEGER" />
-        <result column="PD_PRODID" property="pdProdid" jdbcType="INTEGER" />
-        <result column="PD_PRODCODE" property="pdProdcode" jdbcType="VARCHAR" />
-        <result column="PD_UNIT" property="pdUnit" jdbcType="VARCHAR" />
-        <result column="PD_QTY" property="pdQty" jdbcType="DOUBLE" />
-        <result column="PD_PRICE" property="pdPrice" jdbcType="DOUBLE" />
-        <result column="PD_TOTAL" property="pdTotal" jdbcType="DOUBLE" />
-        <result column="PD_TAXTOTAL" property="pdTaxtotal" jdbcType="DOUBLE" />
-        <result column="PD_ACCEPTQTY" property="pdAcceptqty" jdbcType="DOUBLE" />
-        <result column="PD_DELIVERY" property="pdDelivery" jdbcType="DOUBLE" />
-        <result column="PD_SALECODE" property="pdSalecode" jdbcType="VARCHAR" />
-        <result column="PD_SALEDETNO" property="pdSaledetno" jdbcType="INTEGER" />
-        <result column="PD_SDID" property="pdSdid" jdbcType="INTEGER" />
-        <result column="pd_text1" property="pdText1" jdbcType="VARCHAR" />
-        <result column="pd_text2" property="pdText2" jdbcType="VARCHAR" />
-        <result column="pd_text3" property="pdText3" jdbcType="VARCHAR" />
-        <result column="pd_text4" property="pdText4" jdbcType="VARCHAR" />
-        <result column="pd_text5" property="pdText5" jdbcType="VARCHAR" />
-        <result column="pd_yqty" property="pdYqty" jdbcType="DOUBLE" />
+        <result column="pu_text1" property="pu_text1" jdbcType="VARCHAR" />
+        <result column="pu_text2" property="pu_text2" jdbcType="VARCHAR" />
+        <result column="pu_text3" property="pu_text3" jdbcType="VARCHAR" />
+        <result column="pu_text4" property="pu_text4" jdbcType="VARCHAR" />
+        <result column="pu_text5" property="pu_text5" jdbcType="VARCHAR" />
+        <result column="PD_ID" property="pd_id" jdbcType="INTEGER" />
+        <result column="PD_PUID" property="pd_puid" jdbcType="INTEGER" />
+        <result column="PD_CODE" property="pd_code" jdbcType="VARCHAR" />
+        <result column="PD_DETNO" property="pd_detno" jdbcType="INTEGER" />
+        <result column="PD_PRODID" property="pd_prodid" jdbcType="INTEGER" />
+        <result column="PD_PRODCODE" property="pd_prodcode" jdbcType="VARCHAR" />
+        <result column="PD_UNIT" property="pd_unit" jdbcType="VARCHAR" />
+        <result column="PD_QTY" property="pd_qty" jdbcType="DOUBLE" />
+        <result column="PD_PRICE" property="pd_price" jdbcType="DOUBLE" />
+        <result column="PD_TOTAL" property="pd_total" jdbcType="DOUBLE" />
+        <result column="PD_TAXTOTAL" property="pd_taxtotal" jdbcType="DOUBLE" />
+        <result column="PD_ACCEPTQTY" property="pd_acceptqty" jdbcType="DOUBLE" />
+        <result column="PD_DELIVERY" property="pd_delivery" jdbcType="DOUBLE" />
+        <result column="PD_SALECODE" property="pd_salecode" jdbcType="VARCHAR" />
+        <result column="PD_SALEDETNO" property="pd_saledetno" jdbcType="INTEGER" />
+        <result column="PD_SDID" property="pd_sdid" jdbcType="INTEGER" />
+        <result column="pd_text1" property="pd_text1" jdbcType="VARCHAR" />
+        <result column="pd_text2" property="pd_text2" jdbcType="VARCHAR" />
+        <result column="pd_text3" property="pd_text3" jdbcType="VARCHAR" />
+        <result column="pd_text4" property="pd_text4" jdbcType="VARCHAR" />
+        <result column="pd_text5" property="pd_text5" jdbcType="VARCHAR" />
+        <result column="pd_yqty" property="pd_yqty" jdbcType="DOUBLE" />
     </resultMap>
 
-    <select id="selectByCondition" parameterType="com.usoftchina.saas.purchase.dto.PurchaseReqDTO" resultMap="BaseResultMap">
+    <select id="selectPurchaseListByCondition" parameterType="com.usoftchina.saas.purchase.dto.PurchaseReqDTO" resultMap="BaseResultMap">
         select  *  from purchase left join purchasedetail on pu_id=pd_puid
         <where>
             <if test="begin != null">
@@ -72,4 +72,82 @@
             </if>
         </where>
     </select>
+
+    <select id="selectPurchaseBycondition" parameterType="com.usoftchina.saas.purchase.dto.PurchaseReqDTO" resultMap="BaseResultMap">
+        select  *  from purchase
+        <where>
+            <if test="begin != null">
+                pu_date &gt;= ${begin}
+            </if>
+            <if test="end!= null">
+                AND  pu_date &lt;= ${end}
+            </if>
+            <if test="status != null">
+                AND pu_status=${status}
+            </if>
+            <if test="keyword != null">
+                AND ${keyword}
+            </if>
+        </where>
+    </select>
+    <insert id="batchInsert" parameterType="java.util.List" >
+        insert into purchasedetail ( PD_PUID, PD_CODE,
+        PD_DETNO, PD_PRODID, PD_PRODCODE,
+        PD_UNIT, PD_QTY, PD_PRICE,
+        PD_TOTAL, PD_TAXTOTAL, PD_ACCEPTQTY,
+        PD_DELIVERY, PD_SALECODE, PD_SALEDETNO,
+        PD_SDID, companyId, updaterId,
+        updateTime, pd_text1, pd_text2,
+        pd_text3, pd_text4, pd_text5,
+        pd_yqty)
+        values
+        <foreach collection="list" item="item" index="index" open="" close="" separator=",">
+            (
+            #{item.pdPuid,jdbcType=INTEGER}, #{item.pdCode,jdbcType=VARCHAR},
+            #{item.pdDetno,jdbcType=INTEGER}, #{item.pdProdid,jdbcType=INTEGER}, #{item.pdProdcode,jdbcType=VARCHAR},
+            #{item.pdUnit,jdbcType=VARCHAR}, #{item.pdQty,jdbcType=DOUBLE}, #{item.pdPrice,jdbcType=DOUBLE},
+            #{item.pdTotal,jdbcType=DOUBLE}, #{item.pdTaxtotal,jdbcType=DOUBLE}, #{item.pdAcceptqty,jdbcType=DOUBLE},
+            #{item.pdDelivery,jdbcType=DOUBLE}, #{item.pdSalecode,jdbcType=VARCHAR}, #{item.pdSaledetno,jdbcType=INTEGER},
+            #{item.pdSdid,jdbcType=INTEGER}, #{item.companyId,jdbcType=INTEGER}, #{item.updaterId,jdbcType=INTEGER},
+            #{item.updateTime,jdbcType=TIMESTAMP}, #{item.pdText1,jdbcType=VARCHAR}, #{item.pdText2,jdbcType=VARCHAR},
+            #{item.pdText3,jdbcType=VARCHAR}, #{item.pdText4,jdbcType=VARCHAR}, #{item.pdText5,jdbcType=VARCHAR},
+            #{item.pdYqty,jdbcType=DOUBLE}
+            )
+        </foreach>
+    </insert>
+    <update id="batchUpdate" parameterType="com.usoftchina.saas.purchase.po.PurchaseItem" >
+        <foreach collection="list" item="item" index="index" open="" close="" separator=";">
+            update purchasedetail <set>
+            PD_PUID = #{item.pdPuid},
+            PD_CODE = #{item.pdCode},
+            PD_DETNO = #{item.pdDetno},
+            PD_PRODID = #{item.pdProdid},
+            PD_PRODCODE = #{item.pdProdcode},
+            PD_UNIT = #{item.pdUnit},
+            PD_QTY = #{item.pdQty},
+            PD_PRICE = #{item.pdPrice},
+            PD_TOTAL = #{item.pdTotal},
+            PD_TAXTOTAL = #{item.pdTaxtotal},
+            PD_ACCEPTQTY = #{item.pdAcceptqty},
+            PD_DELIVERY = #{item.pdDelivery},
+            PD_SALECODE = #{item.pdSalecode},
+            PD_SALEDETNO = #{item.pdSaledetno},
+            PD_SDID = #{item.pdSdid},
+            companyId = #{item.companyId},
+            updaterId = #{item.updaterId},
+            updateTime = #{item.updateTime},
+            pd_text1 = #{item.pdText1},
+            pd_text2 = #{item.pdText2},
+            pd_text3 = #{item.pdText3},
+            pd_text4 = #{item.pdText4},
+            pd_text5 = #{item.pdText5},
+            pd_yqty = #{item.pdYqty}
+        </set>
+            where PD_ID = #{item.id,jdbcType=INTEGER}
+        </foreach>
+    </update>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+        delete from purchasedetail
+        where PD_ID = #{id}
+    </delete>
 </mapper>

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

@@ -3,153 +3,60 @@
 <mapper namespace="com.usoftchina.saas.purchase.mapper.PurchaseMapper" >
   <resultMap id="BaseResultMap" type="com.usoftchina.saas.purchase.po.Purchase" >
     <id column="pu_id" property="id" jdbcType="INTEGER" />
-    <result column="pu_code" property="puCode" jdbcType="VARCHAR" />
-    <result column="pu_date" property="puDate" jdbcType="TIMESTAMP" />
-    <result column="pu_vendid" property="puVendid" jdbcType="INTEGER" />
-    <result column="PU_VENDCODE" property="puVendcode" jdbcType="VARCHAR" />
-    <result column="PU_VENDNAME" property="puVendname" jdbcType="VARCHAR" />
-    <result column="PU_BUYERID" property="puBuyerid" jdbcType="INTEGER" />
-    <result column="PU_BUYERCODE" property="puBuyercode" jdbcType="VARCHAR" />
-    <result column="PU_BUYERNAME" property="puBuyername" jdbcType="VARCHAR" />
-    <result column="PU_DELIVERY" property="puDelivery" jdbcType="TIMESTAMP" />
-    <result column="PU_TAXTOTAL" property="puTaxtotal" jdbcType="DOUBLE" />
-    <result column="PU_TOTAL" property="puTotal" jdbcType="DOUBLE" />
-    <result column="PU_REMARK" property="puRemark" jdbcType="VARCHAR" />
-    <result column="PU_TOTALUPPER" property="puTotalupper" jdbcType="VARCHAR" />
+    <result column="pu_code" property="pu_code" jdbcType="VARCHAR" />
+    <result column="pu_date" property="pu_date" jdbcType="TIMESTAMP" />
+    <result column="pu_vendid" property="pu_vendid" jdbcType="INTEGER" />
+    <result column="PU_VENDCODE" property="pu_vendcode" jdbcType="VARCHAR" />
+    <result column="PU_VENDNAME" property="pu_vendname" jdbcType="VARCHAR" />
+    <result column="PU_BUYERID" property="pu_buyerid" jdbcType="INTEGER" />
+    <result column="PU_BUYERCODE" property="pu_buyercode" jdbcType="VARCHAR" />
+    <result column="PU_BUYERNAME" property="pu_buyername" jdbcType="VARCHAR" />
+    <result column="PU_DELIVERY" property="pu_delivery" jdbcType="TIMESTAMP" />
+    <result column="PU_TAXTOTAL" property="pu_taxtotal" jdbcType="DOUBLE" />
+    <result column="PU_TOTAL" property="pu_total" jdbcType="DOUBLE" />
+    <result column="PU_REMARK" property="pu_remark" jdbcType="VARCHAR" />
+    <result column="PU_TOTALUPPER" property="pu_totalupper" jdbcType="VARCHAR" />
     <result column="PU_INDATE" property="createTime" jdbcType="TIMESTAMP" />
-    <result column="PU_PRINTSTATUS" property="puPrintstatus" jdbcType="VARCHAR" />
-    <result column="PU_PRINTSTATUSCODE" property="puPrintstatuscode" jdbcType="VARCHAR" />
-    <result column="PU_ACCEPTSTATUSCODE" property="puAcceptstatuscode" jdbcType="VARCHAR" />
-    <result column="PU_ACCEPTSTATUS" property="puAcceptstatus" jdbcType="VARCHAR" />
-    <result column="PU_STATUSCODE" property="puStatuscode" jdbcType="VARCHAR" />
-    <result column="PU_STATUS" property="puStatus" jdbcType="VARCHAR" />
+    <result column="PU_PRINTSTATUS" property="pu_printstatus" jdbcType="VARCHAR" />
+    <result column="PU_PRINTSTATUSCODE" property="pu_printstatuscode" jdbcType="VARCHAR" />
+    <result column="PU_ACCEPTSTATUSCODE" property="pu_acceptstatuscode" jdbcType="VARCHAR" />
+    <result column="PU_ACCEPTSTATUS" property="pu_acceptstatus" jdbcType="VARCHAR" />
+    <result column="PU_STATUSCODE" property="pu_statuscode" jdbcType="VARCHAR" />
+    <result column="PU_STATUS" property="pu_status" jdbcType="VARCHAR" />
     <result column="companyid" property="companyId" jdbcType="BIGINT" />
     <result column="updatemanid" property="updaterId" jdbcType="INTEGER" />
-    <result column="updatedate" property="updateTime" jdbcType="TIMESTAMP" />
-    <result column="pu_text1" property="puText1" jdbcType="VARCHAR" />
-    <result column="pu_text2" property="puText2" jdbcType="VARCHAR" />
-    <result column="pu_text3" property="puText3" jdbcType="VARCHAR" />
-    <result column="pu_text4" property="puText4" jdbcType="VARCHAR" />
-    <result column="pu_text5" property="puText5" jdbcType="VARCHAR" />
+    <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+    <result column="pu_text1" property="pu_text1" jdbcType="VARCHAR" />
+    <result column="pu_text2" property="pu_text2" jdbcType="VARCHAR" />
+    <result column="pu_text3" property="pu_text3" jdbcType="VARCHAR" />
+    <result column="pu_text4" property="pu_text4" jdbcType="VARCHAR" />
+    <result column="pu_text5" property="pu_text5" jdbcType="VARCHAR" />
   </resultMap>
-  <resultMap id="ResultMapWithBLOBs" type="com.usoftchina.saas.purchase.po.Purchase" extends="BaseResultMap" >
-    <result column="PU_SHIPADDRESSCODE" property="puShipaddresscode" jdbcType="LONGVARCHAR" />
+ <resultMap id="ResultMapWithBLOBs" type="com.usoftchina.saas.purchase.po.Purchase" extends="BaseResultMap" >
+    <result column="PU_SHIPADDRESSCODE" property="pu_shipaddresscode" jdbcType="LONGVARCHAR" />
   </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" >
     pu_id, pu_code, pu_date, pu_vendid, PU_VENDCODE, PU_VENDNAME, PU_BUYERID, PU_BUYERCODE, 
     PU_BUYERNAME, PU_DELIVERY, PU_TAXTOTAL, PU_TOTAL, PU_REMARK, PU_TOTALUPPER, PU_INDATE, 
     PU_PRINTSTATUS, PU_PRINTSTATUSCODE, PU_ACCEPTSTATUSCODE, PU_ACCEPTSTATUS, PU_STATUSCODE, 
-    PU_STATUS, companyid, updatemanid, updatedate, pu_text1, pu_text2, pu_text3, pu_text4, 
+    PU_STATUS, companyid, updaterId, updateTime, pu_text1, pu_text2, pu_text3, pu_text4,
     pu_text5
   </sql>
   <sql id="Blob_Column_List" >
     PU_SHIPADDRESSCODE
   </sql>
-  <select id="selectByExampleWithBLOBs" resultMap="ResultMapWithBLOBs" parameterType="com.usoftchina.saas.purchase.po.PurchaseExample" >
-    select
-    <if test="distinct" >
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    ,
-    <include refid="Blob_Column_List" />
-    from purchase
-    <if test="_parameter != null" >
-      <include refid="Example_Where_Clause" />
-    </if>
-    <if test="orderByClause != null" >
-      order by ${orderByClause}
-    </if>
-  </select>
-  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.usoftchina.saas.purchase.po.PurchaseExample" >
-    select
-    <if test="distinct" >
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    from purchase
-    <if test="_parameter != null" >
-      <include refid="Example_Where_Clause" />
-    </if>
-    <if test="orderByClause != null" >
-      order by ${orderByClause}
-    </if>
-  </select>
-  <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Integer" >
+<select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="long" >
     select 
     <include refid="Base_Column_List" />
     ,
     <include refid="Blob_Column_List" />
     from purchase
-    where pu_id = #{id,jdbcType=INTEGER}
+    where pu_id = #{id}
   </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
-    delete from purchase
-    where pu_id = #{id,jdbcType=INTEGER}
-  </delete>
-  <delete id="deleteByExample" parameterType="com.usoftchina.saas.purchase.po.PurchaseExample" >
+  <delete id="deleteByPrimaryKey" parameterType="long" >
     delete from purchase
-    <if test="_parameter != null" >
-      <include refid="Example_Where_Clause" />
-    </if>
+    where pu_id = #{id}
   </delete>
   <insert id="insert" parameterType="com.usoftchina.saas.purchase.po.Purchase" >
     insert into purchase (pu_id, pu_code, pu_date, 
@@ -159,7 +66,7 @@
       PU_REMARK, PU_TOTALUPPER, PU_INDATE, 
       PU_PRINTSTATUS, PU_PRINTSTATUSCODE, PU_ACCEPTSTATUSCODE, 
       PU_ACCEPTSTATUS, PU_STATUSCODE, PU_STATUS, 
-      companyid, updatemanid, updatedate, 
+      companyid, updaterId, updateTime,
       pu_text1, pu_text2, pu_text3, 
       pu_text4, pu_text5, PU_SHIPADDRESSCODE
       )
@@ -181,154 +88,154 @@
     </selectKey>
     insert into purchase
     <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="puCode != null" >
+      <if test="pu_code != null" >
         pu_code,
       </if>
-      <if test="puDate != null" >
+      <if test="pu_date != null" >
         pu_date,
       </if>
-      <if test="puVendid != null" >
+      <if test="pu_vendid != null" >
         pu_vendid,
       </if>
-      <if test="puVendcode != null" >
+      <if test="pu_vendcode != null" >
         PU_VENDCODE,
       </if>
-      <if test="puVendname != null" >
+      <if test="pu_vendname != null" >
         PU_VENDNAME,
       </if>
-      <if test="puBuyerid != null" >
+      <if test="pu_buyerid != null" >
         PU_BUYERID,
       </if>
-      <if test="puBuyercode != null" >
+      <if test="pu_buyercode != null" >
         PU_BUYERCODE,
       </if>
-      <if test="puBuyername != null" >
+      <if test="pu_buyername != null" >
         PU_BUYERNAME,
       </if>
-      <if test="puDelivery != null" >
+      <if test="pu_delivery != null" >
         PU_DELIVERY,
       </if>
-      <if test="puTaxtotal != null" >
+      <if test="pu_taxtotal != null" >
         PU_TAXTOTAL,
       </if>
-      <if test="puTotal != null" >
+      <if test="pu_total != null" >
         PU_TOTAL,
       </if>
-      <if test="puRemark != null" >
+      <if test="pu_remark != null" >
         PU_REMARK,
       </if>
-      <if test="puTotalupper != null" >
+      <if test="pu_totalupper != null" >
         PU_TOTALUPPER,
       </if>
       <if test="createTime != null" >
         PU_INDATE,
       </if>
-      <if test="puPrintstatus != null" >
+      <if test="pu_printstatus != null" >
         PU_PRINTSTATUS,
       </if>
-      <if test="puPrintstatuscode != null" >
+      <if test="pu_printstatuscode != null" >
         PU_PRINTSTATUSCODE,
       </if>
-      <if test="puAcceptstatuscode != null" >
+      <if test="pu_acceptstatuscode != null" >
         PU_ACCEPTSTATUSCODE,
       </if>
-      <if test="puAcceptstatus != null" >
+      <if test="pu_acceptstatus != null" >
         PU_ACCEPTSTATUS,
       </if>
-      <if test="puStatuscode != null" >
+      <if test="pu_statuscode != null" >
         PU_STATUSCODE,
       </if>
-      <if test="puStatus != null" >
+      <if test="pu_status != null" >
         PU_STATUS,
       </if>
       <if test="companyId != null" >
         companyid,
       </if>
       <if test="updaterId != null" >
-        updatemanid,
+        updaterId,
       </if>
       <if test="updateTime != null" >
-        updatedate,
+        updateTime,
       </if>
-      <if test="puText1 != null" >
+      <if test="pu_text1 != null" >
         pu_text1,
       </if>
-      <if test="puText2 != null" >
+      <if test="pu_text2 != null" >
         pu_text2,
       </if>
-      <if test="puText3 != null" >
+      <if test="pu_text3 != null" >
         pu_text3,
       </if>
-      <if test="puText4 != null" >
+      <if test="pu_text4 != null" >
         pu_text4,
       </if>
-      <if test="puText5 != null" >
+      <if test="pu_text5 != null" >
         pu_text5,
       </if>
-      <if test="puShipaddresscode != null" >
+      <if test="pu_shipaddresscode != null" >
         PU_SHIPADDRESSCODE,
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="puCode != null" >
-        #{puCode,jdbcType=VARCHAR},
+      <if test="pu_code != null" >
+        #{pu_code,jdbcType=VARCHAR},
       </if>
-      <if test="puDate != null" >
-        #{puDate,jdbcType=TIMESTAMP},
+      <if test="pu_date != null" >
+        #{pu_date,jdbcType=TIMESTAMP},
       </if>
-      <if test="puVendid != null" >
-        #{puVendid,jdbcType=INTEGER},
+      <if test="pu_vendid != null" >
+        #{pu_vendid,jdbcType=INTEGER},
       </if>
-      <if test="puVendcode != null" >
-        #{puVendcode,jdbcType=VARCHAR},
+      <if test="pu_vendcode != null" >
+        #{pu_vendcode,jdbcType=VARCHAR},
       </if>
-      <if test="puVendname != null" >
-        #{puVendname,jdbcType=VARCHAR},
+      <if test="pu_vendname != null" >
+        #{pu_vendname,jdbcType=VARCHAR},
       </if>
-      <if test="puBuyerid != null" >
-        #{puBuyerid,jdbcType=INTEGER},
+      <if test="pu_buyerid != null" >
+        #{pu_buyerid,jdbcType=INTEGER},
       </if>
-      <if test="puBuyercode != null" >
-        #{puBuyercode,jdbcType=VARCHAR},
+      <if test="pu_buyercode != null" >
+        #{pu_buyercode,jdbcType=VARCHAR},
       </if>
-      <if test="puBuyername != null" >
-        #{puBuyername,jdbcType=VARCHAR},
+      <if test="pu_buyername != null" >
+        #{pu_buyername,jdbcType=VARCHAR},
       </if>
-      <if test="puDelivery != null" >
-        #{puDelivery,jdbcType=TIMESTAMP},
+      <if test="pu_delivery != null" >
+        #{pu_delivery,jdbcType=TIMESTAMP},
       </if>
-      <if test="puTaxtotal != null" >
-        #{puTaxtotal,jdbcType=DOUBLE},
+      <if test="pu_taxtotal != null" >
+        #{pu_taxtotal,jdbcType=DOUBLE},
       </if>
-      <if test="puTotal != null" >
-        #{puTotal,jdbcType=DOUBLE},
+      <if test="pu_total != null" >
+        #{pu_total,jdbcType=DOUBLE},
       </if>
-      <if test="puRemark != null" >
-        #{puRemark,jdbcType=VARCHAR},
+      <if test="pu_remark != null" >
+        #{pu_remark,jdbcType=VARCHAR},
       </if>
-      <if test="puTotalupper != null" >
-        #{puTotalupper,jdbcType=VARCHAR},
+      <if test="pu_totalupper != null" >
+        #{pu_totalupper,jdbcType=VARCHAR},
       </if>
       <if test="createTime != null" >
         #{createTime,jdbcType=TIMESTAMP},
       </if>
-      <if test="puPrintstatus != null" >
-        #{puPrintstatus,jdbcType=VARCHAR},
+      <if test="pu_printstatus != null" >
+        #{pu_printstatus,jdbcType=VARCHAR},
       </if>
-      <if test="puPrintstatuscode != null" >
-        #{puPrintstatuscode,jdbcType=VARCHAR},
+      <if test="pu_printstatuscode != null" >
+        #{pu_printstatuscode,jdbcType=VARCHAR},
       </if>
-      <if test="puAcceptstatuscode != null" >
-        #{puAcceptstatuscode,jdbcType=VARCHAR},
+      <if test="pu_acceptstatuscode != null" >
+        #{pu_acceptstatuscode,jdbcType=VARCHAR},
       </if>
-      <if test="puAcceptstatus != null" >
-        #{puAcceptstatus,jdbcType=VARCHAR},
+      <if test="pu_acceptstatus != null" >
+        #{pu_acceptstatus,jdbcType=VARCHAR},
       </if>
-      <if test="puStatuscode != null" >
-        #{puStatuscode,jdbcType=VARCHAR},
+      <if test="pu_statuscode != null" >
+        #{pu_statuscode,jdbcType=VARCHAR},
       </if>
-      <if test="puStatus != null" >
-        #{puStatus,jdbcType=VARCHAR},
+      <if test="pu_status != null" >
+        #{pu_status,jdbcType=VARCHAR},
       </if>
       <if test="companyId != null" >
         #{companyId,jdbcType=INTEGER},
@@ -339,357 +246,162 @@
       <if test="updateTime != null" >
         #{updateTime,jdbcType=TIMESTAMP},
       </if>
-      <if test="puText1 != null" >
-        #{puText1,jdbcType=VARCHAR},
+      <if test="pu_text1 != null" >
+        #{pu_text1,jdbcType=VARCHAR},
       </if>
-      <if test="puText2 != null" >
-        #{puText2,jdbcType=VARCHAR},
+      <if test="pu_text2 != null" >
+        #{pu_text1,jdbcType=VARCHAR},
       </if>
-      <if test="puText3 != null" >
-        #{puText3,jdbcType=VARCHAR},
+      <if test="pu_text3 != null" >
+        #{pu_text1,jdbcType=VARCHAR},
       </if>
-      <if test="puText4 != null" >
-        #{puText4,jdbcType=VARCHAR},
+      <if test="pu_text4 != null" >
+        #{pu_text1,jdbcType=VARCHAR},
       </if>
-      <if test="puText5 != null" >
-        #{puText5,jdbcType=VARCHAR},
+      <if test="pu_text5 != null" >
+        #{pu_text1,jdbcType=VARCHAR},
       </if>
-      <if test="puShipaddresscode != null" >
-        #{puShipaddresscode,jdbcType=LONGVARCHAR},
+      <if test="pu_shipaddresscode != null" >
+        #{pu_shipaddresscode,jdbcType=LONGVARCHAR},
       </if>
     </trim>
   </insert>
-  <select id="countByExample" parameterType="com.usoftchina.saas.purchase.po.PurchaseExample" resultType="java.lang.Integer" >
-    select count(*) from purchase
-    <if test="_parameter != null" >
-      <include refid="Example_Where_Clause" />
-    </if>
-  </select>
-  <update id="updateByExampleSelective" parameterType="map" >
-    update purchase
-    <set >
-      <if test="record.id != null" >
-        pu_id = #{record.id,jdbcType=INTEGER},
-      </if>
-      <if test="record.puCode != null" >
-        pu_code = #{record.puCode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.puDate != null" >
-        pu_date = #{record.puDate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.puVendid != null" >
-        pu_vendid = #{record.puVendid,jdbcType=INTEGER},
-      </if>
-      <if test="record.puVendcode != null" >
-        PU_VENDCODE = #{record.puVendcode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.puVendname != null" >
-        PU_VENDNAME = #{record.puVendname,jdbcType=VARCHAR},
-      </if>
-      <if test="record.puBuyerid != null" >
-        PU_BUYERID = #{record.puBuyerid,jdbcType=INTEGER},
-      </if>
-      <if test="record.puBuyercode != null" >
-        PU_BUYERCODE = #{record.puBuyercode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.puBuyername != null" >
-        PU_BUYERNAME = #{record.puBuyername,jdbcType=VARCHAR},
-      </if>
-      <if test="record.puDelivery != null" >
-        PU_DELIVERY = #{record.puDelivery,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.puTaxtotal != null" >
-        PU_TAXTOTAL = #{record.puTaxtotal,jdbcType=DOUBLE},
-      </if>
-      <if test="record.puTotal != null" >
-        PU_TOTAL = #{record.puTotal,jdbcType=DOUBLE},
-      </if>
-      <if test="record.puRemark != null" >
-        PU_REMARK = #{record.puRemark,jdbcType=VARCHAR},
-      </if>
-      <if test="record.puTotalupper != null" >
-        PU_TOTALUPPER = #{record.puTotalupper,jdbcType=VARCHAR},
-      </if>
-      <if test="record.createTime != null" >
-        PU_INDATE = #{record.createTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.puPrintstatus != null" >
-        PU_PRINTSTATUS = #{record.puPrintstatus,jdbcType=VARCHAR},
-      </if>
-      <if test="record.puPrintstatuscode != null" >
-        PU_PRINTSTATUSCODE = #{record.puPrintstatuscode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.puAcceptstatuscode != null" >
-        PU_ACCEPTSTATUSCODE = #{record.puAcceptstatuscode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.puAcceptstatus != null" >
-        PU_ACCEPTSTATUS = #{record.puAcceptstatus,jdbcType=VARCHAR},
-      </if>
-      <if test="record.puStatuscode != null" >
-        PU_STATUSCODE = #{record.puStatuscode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.puStatus != null" >
-        PU_STATUS = #{record.puStatus,jdbcType=VARCHAR},
-      </if>
-      <if test="record.companyId != null" >
-        companyid = #{record.companyId,jdbcType=INTEGER},
-      </if>
-      <if test="record.updaterId != null" >
-        updatemanid = #{record.updaterId,jdbcType=INTEGER},
-      </if>
-      <if test="record.updateTime != null" >
-        updatedate = #{record.updateTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.puText1 != null" >
-        pu_text1 = #{record.puText1,jdbcType=VARCHAR},
-      </if>
-      <if test="record.puText2 != null" >
-        pu_text2 = #{record.puText2,jdbcType=VARCHAR},
-      </if>
-      <if test="record.puText3 != null" >
-        pu_text3 = #{record.puText3,jdbcType=VARCHAR},
-      </if>
-      <if test="record.puText4 != null" >
-        pu_text4 = #{record.puText4,jdbcType=VARCHAR},
-      </if>
-      <if test="record.puText5 != null" >
-        pu_text5 = #{record.puText5,jdbcType=VARCHAR},
-      </if>
-      <if test="record.puShipaddresscode != null" >
-        PU_SHIPADDRESSCODE = #{record.puShipaddresscode,jdbcType=LONGVARCHAR},
-      </if>
-    </set>
-    <if test="_parameter != null" >
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByExampleWithBLOBs" parameterType="map" >
-    update purchase
-    set pu_id = #{record.id,jdbcType=INTEGER},
-      pu_code = #{record.puCode,jdbcType=VARCHAR},
-      pu_date = #{record.puDate,jdbcType=TIMESTAMP},
-      pu_vendid = #{record.puVendid,jdbcType=INTEGER},
-      PU_VENDCODE = #{record.puVendcode,jdbcType=VARCHAR},
-      PU_VENDNAME = #{record.puVendname,jdbcType=VARCHAR},
-      PU_BUYERID = #{record.puBuyerid,jdbcType=INTEGER},
-      PU_BUYERCODE = #{record.puBuyercode,jdbcType=VARCHAR},
-      PU_BUYERNAME = #{record.puBuyername,jdbcType=VARCHAR},
-      PU_DELIVERY = #{record.puDelivery,jdbcType=TIMESTAMP},
-      PU_TAXTOTAL = #{record.puTaxtotal,jdbcType=DOUBLE},
-      PU_TOTAL = #{record.puTotal,jdbcType=DOUBLE},
-      PU_REMARK = #{record.puRemark,jdbcType=VARCHAR},
-      PU_TOTALUPPER = #{record.puTotalupper,jdbcType=VARCHAR},
-      PU_INDATE = #{record.createTime,jdbcType=TIMESTAMP},
-      PU_PRINTSTATUS = #{record.puPrintstatus,jdbcType=VARCHAR},
-      PU_PRINTSTATUSCODE = #{record.puPrintstatuscode,jdbcType=VARCHAR},
-      PU_ACCEPTSTATUSCODE = #{record.puAcceptstatuscode,jdbcType=VARCHAR},
-      PU_ACCEPTSTATUS = #{record.puAcceptstatus,jdbcType=VARCHAR},
-      PU_STATUSCODE = #{record.puStatuscode,jdbcType=VARCHAR},
-      PU_STATUS = #{record.puStatus,jdbcType=VARCHAR},
-      companyid = #{record.companyId,jdbcType=INTEGER},
-      updatemanid = #{record.updaterId,jdbcType=INTEGER},
-      updatedate = #{record.updateTime,jdbcType=TIMESTAMP},
-      pu_text1 = #{record.puText1,jdbcType=VARCHAR},
-      pu_text2 = #{record.puText2,jdbcType=VARCHAR},
-      pu_text3 = #{record.puText3,jdbcType=VARCHAR},
-      pu_text4 = #{record.puText4,jdbcType=VARCHAR},
-      pu_text5 = #{record.puText5,jdbcType=VARCHAR},
-      PU_SHIPADDRESSCODE = #{record.puShipaddresscode,jdbcType=LONGVARCHAR}
-    <if test="_parameter != null" >
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByExample" parameterType="map" >
-    update purchase
-    set pu_id = #{record.id,jdbcType=INTEGER},
-      pu_code = #{record.puCode,jdbcType=VARCHAR},
-      pu_date = #{record.puDate,jdbcType=TIMESTAMP},
-      pu_vendid = #{record.puVendid,jdbcType=INTEGER},
-      PU_VENDCODE = #{record.puVendcode,jdbcType=VARCHAR},
-      PU_VENDNAME = #{record.puVendname,jdbcType=VARCHAR},
-      PU_BUYERID = #{record.puBuyerid,jdbcType=INTEGER},
-      PU_BUYERCODE = #{record.puBuyercode,jdbcType=VARCHAR},
-      PU_BUYERNAME = #{record.puBuyername,jdbcType=VARCHAR},
-      PU_DELIVERY = #{record.puDelivery,jdbcType=TIMESTAMP},
-      PU_TAXTOTAL = #{record.puTaxtotal,jdbcType=DOUBLE},
-      PU_TOTAL = #{record.puTotal,jdbcType=DOUBLE},
-      PU_REMARK = #{record.puRemark,jdbcType=VARCHAR},
-      PU_TOTALUPPER = #{record.puTotalupper,jdbcType=VARCHAR},
-      PU_INDATE = #{record.createTime,jdbcType=TIMESTAMP},
-      PU_PRINTSTATUS = #{record.puPrintstatus,jdbcType=VARCHAR},
-      PU_PRINTSTATUSCODE = #{record.puPrintstatuscode,jdbcType=VARCHAR},
-      PU_ACCEPTSTATUSCODE = #{record.puAcceptstatuscode,jdbcType=VARCHAR},
-      PU_ACCEPTSTATUS = #{record.puAcceptstatus,jdbcType=VARCHAR},
-      PU_STATUSCODE = #{record.puStatuscode,jdbcType=VARCHAR},
-      PU_STATUS = #{record.puStatus,jdbcType=VARCHAR},
-      companyid = #{record.companyId,jdbcType=INTEGER},
-      updatemanid = #{record.updaterId,jdbcType=INTEGER},
-      updatedate = #{record.updateTime,jdbcType=TIMESTAMP},
-      pu_text1 = #{record.puText1,jdbcType=VARCHAR},
-      pu_text2 = #{record.puText2,jdbcType=VARCHAR},
-      pu_text3 = #{record.puText3,jdbcType=VARCHAR},
-      pu_text4 = #{record.puText4,jdbcType=VARCHAR},
-      pu_text5 = #{record.puText5,jdbcType=VARCHAR}
-    <if test="_parameter != null" >
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.purchase.po.Purchase" >
     update purchase
     <set >
-      <if test="puCode != null" >
-        pu_code = #{puCode,jdbcType=VARCHAR},
+      <if test="pu_code != null" >
+        pu_code = #{pu_code,jdbcType=VARCHAR},
       </if>
-      <if test="puDate != null" >
-        pu_date = #{puDate,jdbcType=TIMESTAMP},
+      <if test="pu_date != null" >
+        pu_date = #{pu_date,jdbcType=TIMESTAMP},
       </if>
-      <if test="puVendid != null" >
-        pu_vendid = #{puVendid,jdbcType=INTEGER},
+      <if test="pu_vendid != null" >
+        pu_vendid = #{pu_vendid,jdbcType=INTEGER},
       </if>
-      <if test="puVendcode != null" >
-        PU_VENDCODE = #{puVendcode,jdbcType=VARCHAR},
+      <if test="pu_vendcode != null" >
+        PU_VENDCODE = #{pu_vendcode,jdbcType=VARCHAR},
       </if>
-      <if test="puVendname != null" >
-        PU_VENDNAME = #{puVendname,jdbcType=VARCHAR},
+      <if test="pu_vendname != null" >
+        PU_VENDNAME = #{pu_vendname,jdbcType=VARCHAR},
       </if>
-      <if test="puBuyerid != null" >
-        PU_BUYERID = #{puBuyerid,jdbcType=INTEGER},
+      <if test="pu_buyerid != null" >
+        PU_BUYERID = #{pu_buyerid,jdbcType=INTEGER},
       </if>
-      <if test="puBuyercode != null" >
-        PU_BUYERCODE = #{puBuyercode,jdbcType=VARCHAR},
+      <if test="pu_buyercode != null" >
+        PU_BUYERCODE = #{pu_buyercode,jdbcType=VARCHAR},
       </if>
-      <if test="puBuyername != null" >
-        PU_BUYERNAME = #{puBuyername,jdbcType=VARCHAR},
+      <if test="pu_buyername != null" >
+        PU_BUYERNAME = #{pu_buyername,jdbcType=VARCHAR},
       </if>
-      <if test="puDelivery != null" >
-        PU_DELIVERY = #{puDelivery,jdbcType=TIMESTAMP},
+      <if test="pu_delivery != null" >
+        PU_DELIVERY = #{pu_delivery,jdbcType=TIMESTAMP},
       </if>
-      <if test="puTaxtotal != null" >
-        PU_TAXTOTAL = #{puTaxtotal,jdbcType=DOUBLE},
+      <if test="pu_taxtotal != null" >
+        PU_TAXTOTAL = #{pu_taxtotal,jdbcType=DOUBLE},
       </if>
-      <if test="puTotal != null" >
-        PU_TOTAL = #{puTotal,jdbcType=DOUBLE},
+      <if test="pu_total != null" >
+        PU_TOTAL = #{pu_total,jdbcType=DOUBLE},
       </if>
-      <if test="puRemark != null" >
-        PU_REMARK = #{puRemark,jdbcType=VARCHAR},
+      <if test="pu_remark != null" >
+        PU_REMARK = #{pu_remark,jdbcType=VARCHAR},
       </if>
-      <if test="puTotalupper != null" >
-        PU_TOTALUPPER = #{puTotalupper,jdbcType=VARCHAR},
+      <if test="pu_totalupper != null" >
+        PU_TOTALUPPER = #{pu_totalupper,jdbcType=VARCHAR},
       </if>
       <if test="createTime != null" >
         PU_INDATE = #{createTime,jdbcType=TIMESTAMP},
       </if>
-      <if test="puPrintstatus != null" >
-        PU_PRINTSTATUS = #{puPrintstatus,jdbcType=VARCHAR},
+      <if test="pu_printstatus != null" >
+        PU_PRINTSTATUS = #{pu_printstatus,jdbcType=VARCHAR},
       </if>
-      <if test="puPrintstatuscode != null" >
-        PU_PRINTSTATUSCODE = #{puPrintstatuscode,jdbcType=VARCHAR},
+      <if test="pu_printstatuscode != null" >
+        PU_PRINTSTATUSCODE = #{pu_printstatuscode,jdbcType=VARCHAR},
       </if>
-      <if test="puAcceptstatuscode != null" >
-        PU_ACCEPTSTATUSCODE = #{puAcceptstatuscode,jdbcType=VARCHAR},
+      <if test="pu_acceptstatuscode != null" >
+        PU_ACCEPTSTATUSCODE = #{pu_acceptstatuscode,jdbcType=VARCHAR},
       </if>
-      <if test="puAcceptstatus != null" >
-        PU_ACCEPTSTATUS = #{puAcceptstatus,jdbcType=VARCHAR},
+      <if test="pu_acceptstatus != null" >
+        PU_ACCEPTSTATUS = #{pu_acceptstatus,jdbcType=VARCHAR},
       </if>
-      <if test="puStatuscode != null" >
-        PU_STATUSCODE = #{puStatuscode,jdbcType=VARCHAR},
+      <if test="pu_statuscode != null" >
+        PU_STATUSCODE = #{pu_statuscode,jdbcType=VARCHAR},
       </if>
-      <if test="puStatus != null" >
-        PU_STATUS = #{puStatus,jdbcType=VARCHAR},
+      <if test="pu_status != null" >
+        PU_STATUS = #{pu_status,jdbcType=VARCHAR},
       </if>
       <if test="companyId != null" >
         companyid = #{companyId,jdbcType=INTEGER},
       </if>
       <if test="updaterId != null" >
-        updatemanid = #{updaterId,jdbcType=INTEGER},
+        updaterId = #{updaterId,jdbcType=INTEGER},
       </if>
       <if test="updateTime != null" >
-        updatedate = #{updateTime,jdbcType=TIMESTAMP},
+        updateTime = #{updateTime,jdbcType=TIMESTAMP},
       </if>
-      <if test="puText1 != null" >
-        pu_text1 = #{puText1,jdbcType=VARCHAR},
+      <if test="pu_text1 != null" >
+        pu_text1 = #{pu_text1,jdbcType=VARCHAR},
       </if>
-      <if test="puText2 != null" >
-        pu_text2 = #{puText2,jdbcType=VARCHAR},
+      <if test="pu_text2 != null" >
+        pu_text2 = #{pu_text2,jdbcType=VARCHAR},
       </if>
-      <if test="puText3 != null" >
-        pu_text3 = #{puText3,jdbcType=VARCHAR},
+      <if test="pu_text3 != null" >
+        pu_text3 = #{pu_text3,jdbcType=VARCHAR},
       </if>
-      <if test="puText4 != null" >
-        pu_text4 = #{puText4,jdbcType=VARCHAR},
+      <if test="pu_text4 != null" >
+        pu_text4 = #{pu_text4,jdbcType=VARCHAR},
       </if>
-      <if test="puText5 != null" >
-        pu_text5 = #{puText5,jdbcType=VARCHAR},
+      <if test="pu_text5 != null" >
+        pu_text5 = #{pu_text5,jdbcType=VARCHAR},
       </if>
-      <if test="puShipaddresscode != null" >
-        PU_SHIPADDRESSCODE = #{puShipaddresscode,jdbcType=LONGVARCHAR},
+      <if test="pu_shipaddresscode != null" >
+        PU_SHIPADDRESSCODE = #{pu_shipaddresscode,jdbcType=LONGVARCHAR},
       </if>
     </set>
     where pu_id = #{id,jdbcType=INTEGER}
   </update>
-  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.saas.purchase.po.Purchase" >
-    update purchase
-    set pu_code = #{puCode,jdbcType=VARCHAR},
-      pu_date = #{puDate,jdbcType=TIMESTAMP},
-      pu_vendid = #{puVendid,jdbcType=INTEGER},
-      PU_VENDCODE = #{puVendcode,jdbcType=VARCHAR},
-      PU_VENDNAME = #{puVendname,jdbcType=VARCHAR},
-      PU_BUYERID = #{puBuyerid,jdbcType=INTEGER},
-      PU_BUYERCODE = #{puBuyercode,jdbcType=VARCHAR},
-      PU_BUYERNAME = #{puBuyername,jdbcType=VARCHAR},
-      PU_DELIVERY = #{puDelivery,jdbcType=TIMESTAMP},
-      PU_TAXTOTAL = #{puTaxtotal,jdbcType=DOUBLE},
-      PU_TOTAL = #{puTotal,jdbcType=DOUBLE},
-      PU_REMARK = #{puRemark,jdbcType=VARCHAR},
-      PU_TOTALUPPER = #{puTotalupper,jdbcType=VARCHAR},
-      PU_INDATE = #{createTime,jdbcType=TIMESTAMP},
-      PU_PRINTSTATUS = #{puPrintstatus,jdbcType=VARCHAR},
-      PU_PRINTSTATUSCODE = #{puPrintstatuscode,jdbcType=VARCHAR},
-      PU_ACCEPTSTATUSCODE = #{puAcceptstatuscode,jdbcType=VARCHAR},
-      PU_ACCEPTSTATUS = #{puAcceptstatus,jdbcType=VARCHAR},
-      PU_STATUSCODE = #{puStatuscode,jdbcType=VARCHAR},
-      PU_STATUS = #{puStatus,jdbcType=VARCHAR},
-      companyid = #{companyId,jdbcType=INTEGER},
-      updatemanid = #{updaterId,jdbcType=INTEGER},
-      updatedate = #{updateTime,jdbcType=TIMESTAMP},
-      pu_text1 = #{puText1,jdbcType=VARCHAR},
-      pu_text2 = #{puText2,jdbcType=VARCHAR},
-      pu_text3 = #{puText3,jdbcType=VARCHAR},
-      pu_text4 = #{puText4,jdbcType=VARCHAR},
-      pu_text5 = #{puText5,jdbcType=VARCHAR},
-      PU_SHIPADDRESSCODE = #{puShipaddresscode,jdbcType=LONGVARCHAR}
-    where pu_id = #{id,jdbcType=INTEGER}
-  </update>
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.purchase.po.Purchase" >
     update purchase
-    set pu_code = #{puCode,jdbcType=VARCHAR},
-      pu_date = #{puDate,jdbcType=TIMESTAMP},
-      pu_vendid = #{puVendid,jdbcType=INTEGER},
-      PU_VENDCODE = #{puVendcode,jdbcType=VARCHAR},
-      PU_VENDNAME = #{puVendname,jdbcType=VARCHAR},
-      PU_BUYERID = #{puBuyerid,jdbcType=INTEGER},
-      PU_BUYERCODE = #{puBuyercode,jdbcType=VARCHAR},
-      PU_BUYERNAME = #{puBuyername,jdbcType=VARCHAR},
-      PU_DELIVERY = #{puDelivery,jdbcType=TIMESTAMP},
-      PU_TAXTOTAL = #{puTaxtotal,jdbcType=DOUBLE},
-      PU_TOTAL = #{puTotal,jdbcType=DOUBLE},
-      PU_REMARK = #{puRemark,jdbcType=VARCHAR},
-      PU_TOTALUPPER = #{puTotalupper,jdbcType=VARCHAR},
+    set pu_code = #{pu_code,jdbcType=VARCHAR},
+      pu_date = #{pu_date,jdbcType=TIMESTAMP},
+      pu_vendid = #{pu_vendid,jdbcType=INTEGER},
+      PU_VENDCODE = #{pu_vendcode,jdbcType=VARCHAR},
+      PU_VENDNAME = #{pu_vendname,jdbcType=VARCHAR},
+      PU_BUYERID = #{pu_buyerid,jdbcType=INTEGER},
+      PU_BUYERCODE = #{pu_buyercode,jdbcType=VARCHAR},
+      PU_BUYERNAME = #{pu_buyername,jdbcType=VARCHAR},
+      PU_DELIVERY = #{pu_delivery,jdbcType=TIMESTAMP},
+      PU_TAXTOTAL = #{pu_taxtotal,jdbcType=DOUBLE},
+      PU_TOTAL = #{pu_total,jdbcType=DOUBLE},
+      PU_REMARK = #{pu_remark,jdbcType=VARCHAR},
+      PU_TOTALUPPER = #{pu_totalupper,jdbcType=VARCHAR},
       PU_INDATE = #{createTime,jdbcType=TIMESTAMP},
-      PU_PRINTSTATUS = #{puPrintstatus,jdbcType=VARCHAR},
-      PU_PRINTSTATUSCODE = #{puPrintstatuscode,jdbcType=VARCHAR},
-      PU_ACCEPTSTATUSCODE = #{puAcceptstatuscode,jdbcType=VARCHAR},
-      PU_ACCEPTSTATUS = #{puAcceptstatus,jdbcType=VARCHAR},
-      PU_STATUSCODE = #{puStatuscode,jdbcType=VARCHAR},
-      PU_STATUS = #{puStatus,jdbcType=VARCHAR},
+      PU_PRINTSTATUS = #{pu_printstatus,jdbcType=VARCHAR},
+      PU_PRINTSTATUSCODE = #{pu_printstatuscode,jdbcType=VARCHAR},
+      PU_ACCEPTSTATUSCODE = #{pu_acceptstatuscode,jdbcType=VARCHAR},
+      PU_ACCEPTSTATUS = #{pu_acceptstatus,jdbcType=VARCHAR},
+      PU_STATUSCODE = #{pu_statuscode,jdbcType=VARCHAR},
+      PU_STATUS = #{pu_status,jdbcType=VARCHAR},
       companyid = #{companyId,jdbcType=INTEGER},
-      updatemanid = #{updaterId,jdbcType=INTEGER},
-      updatedate = #{updateTime,jdbcType=TIMESTAMP},
-      pu_text1 = #{puText1,jdbcType=VARCHAR},
-      pu_text2 = #{puText2,jdbcType=VARCHAR},
-      pu_text3 = #{puText3,jdbcType=VARCHAR},
-      pu_text4 = #{puText4,jdbcType=VARCHAR},
-      pu_text5 = #{puText5,jdbcType=VARCHAR}
+      updaterId = #{updaterId,jdbcType=INTEGER},
+      updateTime = #{updateTime,jdbcType=TIMESTAMP},
+      pu_text1 = #{pu_text1,jdbcType=VARCHAR},
+      pu_text2 = #{pu_text2,jdbcType=VARCHAR},
+      pu_text3 = #{pu_text3,jdbcType=VARCHAR},
+      pu_text4 = #{pu_text4,jdbcType=VARCHAR},
+      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 wm_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="selectByTest" resultMap="BaseResultMap" parameterType="string" >
+    select * from purchase <where>
+    <if test="_parameter != null">
+       ${value}
+    </if>
+  </where>
+  </select>
 </mapper>

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

@@ -1,128 +1,50 @@
 <?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.purchase.mapper.PurchasedetailMapper" >
-  <resultMap id="BaseResultMap" type="com.usoftchina.saas.purchase.po.Purchasedetail" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.purchase.po.PurchaseItem" >
     <id column="PD_ID" property="id" jdbcType="INTEGER" />
-    <result column="PD_PUID" property="pdPuid" jdbcType="INTEGER" />
-    <result column="PD_CODE" property="pdCode" jdbcType="VARCHAR" />
-    <result column="PD_DETNO" property="pdDetno" jdbcType="INTEGER" />
-    <result column="PD_PRODID" property="pdProdid" jdbcType="INTEGER" />
-    <result column="PD_PRODCODE" property="pdProdcode" jdbcType="VARCHAR" />
-    <result column="PD_UNIT" property="pdUnit" jdbcType="VARCHAR" />
-    <result column="PD_QTY" property="pdQty" jdbcType="DOUBLE" />
-    <result column="PD_PRICE" property="pdPrice" jdbcType="DOUBLE" />
-    <result column="PD_TOTAL" property="pdTotal" jdbcType="DOUBLE" />
-    <result column="PD_TAXTOTAL" property="pdTaxtotal" jdbcType="DOUBLE" />
-    <result column="PD_ACCEPTQTY" property="pdAcceptqty" jdbcType="DOUBLE" />
-    <result column="PD_DELIVERY" property="pdDelivery" jdbcType="DOUBLE" />
-    <result column="PD_SALECODE" property="pdSalecode" jdbcType="VARCHAR" />
-    <result column="PD_SALEDETNO" property="pdSaledetno" jdbcType="INTEGER" />
-    <result column="PD_SDID" property="pdSdid" jdbcType="INTEGER" />
+    <result column="PD_PUID" property="pd_puid" jdbcType="INTEGER" />
+    <result column="PD_CODE" property="pd_code" jdbcType="VARCHAR" />
+    <result column="PD_DETNO" property="pd_detno" jdbcType="INTEGER" />
+    <result column="PD_PRODID" property="pd_prodid" jdbcType="INTEGER" />
+    <result column="PD_PRODCODE" property="pd_prodcode" jdbcType="VARCHAR" />
+    <result column="PD_UNIT" property="pd_unit" jdbcType="VARCHAR" />
+    <result column="PD_QTY" property="pd_qty" jdbcType="DOUBLE" />
+    <result column="PD_PRICE" property="pd_price" jdbcType="DOUBLE" />
+    <result column="PD_TOTAL" property="pd_total" jdbcType="DOUBLE" />
+    <result column="PD_TAXTOTAL" property="pd_taxtotal" jdbcType="DOUBLE" />
+    <result column="PD_ACCEPTQTY" property="pd_acceptqty" jdbcType="DOUBLE" />
+    <result column="PD_DELIVERY" property="pd_delivery" jdbcType="DOUBLE" />
+    <result column="PD_SALECODE" property="pd_salecode" jdbcType="VARCHAR" />
+    <result column="PD_SALEDETNO" property="pd_saledetno" jdbcType="INTEGER" />
+    <result column="PD_SDID" property="pd_sdid" jdbcType="INTEGER" />
     <result column="companyid" property="companyId" jdbcType="INTEGER" />
     <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
     <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
-    <result column="pd_text1" property="pdText1" jdbcType="VARCHAR" />
-    <result column="pd_text2" property="pdText2" jdbcType="VARCHAR" />
-    <result column="pd_text3" property="pdText3" jdbcType="VARCHAR" />
-    <result column="pd_text4" property="pdText4" jdbcType="VARCHAR" />
-    <result column="pd_text5" property="pdText5" jdbcType="VARCHAR" />
-    <result column="pd_yqty" property="pdYqty" jdbcType="DOUBLE" />
+    <result column="pd_text1" property="pd_text1" jdbcType="VARCHAR" />
+    <result column="pd_text2" property="pd_text2" jdbcType="VARCHAR" />
+    <result column="pd_text3" property="pd_text3" jdbcType="VARCHAR" />
+    <result column="pd_text4" property="pd_text4" jdbcType="VARCHAR" />
+    <result column="pd_text5" property="pd_text5" jdbcType="VARCHAR" />
+    <result column="pd_yqty" property="pd_yqty" jdbcType="DOUBLE" />
   </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" >
     PD_ID, PD_PUID, PD_CODE, PD_DETNO, PD_PRODID, PD_PRODCODE, PD_UNIT, PD_QTY, PD_PRICE,
     PD_TOTAL, PD_TAXTOTAL, PD_ACCEPTQTY, PD_DELIVERY, PD_SALECODE, PD_SALEDETNO, PD_SDID,
     companyId, updaterId, updateTime, pd_text1, pd_text2, pd_text3, pd_text4, pd_text5,
     pd_yqty
   </sql>
-  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.usoftchina.saas.purchase.po.PurchasedetailExample" >
-    select
-    <if test="distinct" >
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    from purchasedetail
-    <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 purchasedetail
     where PD_ID = #{id,jdbcType=INTEGER}
   </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+  <delete id="deleteByPrimaryKey" parameterType="long" >
     delete from purchasedetail
-    where PD_ID = #{id,jdbcType=INTEGER}
-  </delete>
-  <delete id="deleteByExample" parameterType="com.usoftchina.saas.purchase.po.PurchasedetailExample" >
-    delete from purchasedetail
-    <if test="_parameter != null" >
-      <include refid="Example_Where_Clause" />
-    </if>
+    where PD_ID = #{id}
   </delete>
-  <insert id="insert" parameterType="com.usoftchina.saas.purchase.po.Purchasedetail" >
+  <insert id="insert" parameterType="com.usoftchina.saas.purchase.po.PurchaseItem" >
     insert into purchasedetail (PD_PUID, PD_CODE,
     PD_DETNO, PD_PRODID, PD_PRODCODE,
     PD_UNIT, PD_QTY, PD_PRICE,
@@ -142,7 +64,7 @@
     #{pdText3,jdbcType=VARCHAR}, #{pdText4,jdbcType=VARCHAR}, #{pdText5,jdbcType=VARCHAR},
     #{pdYqty,jdbcType=DOUBLE})
   </insert>
-  <insert id="insertSelective" parameterType="com.usoftchina.saas.purchase.po.Purchasedetail" >
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.purchase.po.PurchaseItem" >
     insert into purchasedetail
     <trim prefix="(" suffix=")" suffixOverrides="," >
       <if test="pdPuid != null" >
@@ -293,127 +215,7 @@
       </if>
     </trim>
   </insert>
-  <select id="countByExample" parameterType="com.usoftchina.saas.purchase.po.PurchasedetailExample" resultType="java.lang.Integer" >
-    select count(*) from purchasedetail
-    <if test="_parameter != null" >
-      <include refid="Example_Where_Clause" />
-    </if>
-  </select>
-  <update id="updateByExampleSelective" parameterType="map" >
-    update purchasedetail
-    <set >
-      <if test="record.id != null" >
-        PD_ID = #{record.id,jdbcType=INTEGER},
-      </if>
-      <if test="record.pdPuid != null" >
-        PD_PUID = #{record.pdPuid,jdbcType=INTEGER},
-      </if>
-      <if test="record.pdCode != null" >
-        PD_CODE = #{record.pdCode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pdDetno != null" >
-        PD_DETNO = #{record.pdDetno,jdbcType=INTEGER},
-      </if>
-      <if test="record.pdProdid != null" >
-        PD_PRODID = #{record.pdProdid,jdbcType=INTEGER},
-      </if>
-      <if test="record.pdProdcode != null" >
-        PD_PRODCODE = #{record.pdProdcode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pdUnit != null" >
-        PD_UNIT = #{record.pdUnit,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pdQty != null" >
-        PD_QTY = #{record.pdQty,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pdPrice != null" >
-        PD_PRICE = #{record.pdPrice,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pdTotal != null" >
-        PD_TOTAL = #{record.pdTotal,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pdTaxtotal != null" >
-        PD_TAXTOTAL = #{record.pdTaxtotal,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pdAcceptqty != null" >
-        PD_ACCEPTQTY = #{record.pdAcceptqty,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pdDelivery != null" >
-        PD_DELIVERY = #{record.pdDelivery,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pdSalecode != null" >
-        PD_SALECODE = #{record.pdSalecode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pdSaledetno != null" >
-        PD_SALEDETNO = #{record.pdSaledetno,jdbcType=INTEGER},
-      </if>
-      <if test="record.pdSdid != null" >
-        PD_SDID = #{record.pdSdid,jdbcType=INTEGER},
-      </if>
-      <if test="record.companyId != null" >
-        companyId = #{record.companyId,jdbcType=INTEGER},
-      </if>
-      <if test="record.updaterId != null" >
-        updaterId = #{record.updaterId,jdbcType=INTEGER},
-      </if>
-      <if test="record.updateTime != null" >
-        updateTime = #{record.updateTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.pdText1 != null" >
-        pd_text1 = #{record.pdText1,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pdText2 != null" >
-        pd_text2 = #{record.pdText2,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pdText3 != null" >
-        pd_text3 = #{record.pdText3,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pdText4 != null" >
-        pd_text4 = #{record.pdText4,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pdText5 != null" >
-        pd_text5 = #{record.pdText5,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pdYqty != null" >
-        pd_yqty = #{record.pdYqty,jdbcType=DOUBLE},
-      </if>
-    </set>
-    <if test="_parameter != null" >
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByExample" parameterType="map" >
-    update purchasedetail
-    set PD_ID = #{record.id,jdbcType=INTEGER},
-    PD_PUID = #{record.pdPuid,jdbcType=INTEGER},
-    PD_CODE = #{record.pdCode,jdbcType=VARCHAR},
-    PD_DETNO = #{record.pdDetno,jdbcType=INTEGER},
-    PD_PRODID = #{record.pdProdid,jdbcType=INTEGER},
-    PD_PRODCODE = #{record.pdProdcode,jdbcType=VARCHAR},
-    PD_UNIT = #{record.pdUnit,jdbcType=VARCHAR},
-    PD_QTY = #{record.pdQty,jdbcType=DOUBLE},
-    PD_PRICE = #{record.pdPrice,jdbcType=DOUBLE},
-    PD_TOTAL = #{record.pdTotal,jdbcType=DOUBLE},
-    PD_TAXTOTAL = #{record.pdTaxtotal,jdbcType=DOUBLE},
-    PD_ACCEPTQTY = #{record.pdAcceptqty,jdbcType=DOUBLE},
-    PD_DELIVERY = #{record.pdDelivery,jdbcType=DOUBLE},
-    PD_SALECODE = #{record.pdSalecode,jdbcType=VARCHAR},
-    PD_SALEDETNO = #{record.pdSaledetno,jdbcType=INTEGER},
-    PD_SDID = #{record.pdSdid,jdbcType=INTEGER},
-    companyId = #{record.companyId,jdbcType=INTEGER},
-    updaterId = #{record.updaterId,jdbcType=INTEGER},
-    updateTime = #{record.updateTime,jdbcType=TIMESTAMP},
-    pd_text1 = #{record.pdText1,jdbcType=VARCHAR},
-    pd_text2 = #{record.pdText2,jdbcType=VARCHAR},
-    pd_text3 = #{record.pdText3,jdbcType=VARCHAR},
-    pd_text4 = #{record.pdText4,jdbcType=VARCHAR},
-    pd_text5 = #{record.pdText5,jdbcType=VARCHAR},
-    pd_yqty = #{record.pdYqty,jdbcType=DOUBLE}
-    <if test="_parameter != null" >
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.purchase.po.Purchasedetail" >
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.purchase.po.PurchaseItem" >
     update purchasedetail
     <set >
       <if test="pdPuid != null" >
@@ -491,7 +293,7 @@
     </set>
     where PD_ID = #{id,jdbcType=INTEGER}
   </update>
-  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.purchase.po.Purchasedetail" >
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.purchase.po.PurchaseItem" >
     update purchasedetail
     set PD_PUID = #{pdPuid,jdbcType=INTEGER},
     PD_CODE = #{pdCode,jdbcType=VARCHAR},
@@ -532,16 +334,53 @@
     values
     <foreach collection="list" item="item" index="index" open="" close="" separator=",">
       (
-      #{item.pdPuid,jdbcType=INTEGER}, #{item.pdCode,jdbcType=VARCHAR},
-      #{item.pdDetno,jdbcType=INTEGER}, #{item.pdProdid,jdbcType=INTEGER}, #{item.pdProdcode,jdbcType=VARCHAR},
-      #{item.pdUnit,jdbcType=VARCHAR}, #{item.pdQty,jdbcType=DOUBLE}, #{item.pdPrice,jdbcType=DOUBLE},
-      #{item.pdTotal,jdbcType=DOUBLE}, #{item.pdTaxtotal,jdbcType=DOUBLE}, #{item.pdAcceptqty,jdbcType=DOUBLE},
-      #{item.pdDelivery,jdbcType=DOUBLE}, #{item.pdSalecode,jdbcType=VARCHAR}, #{item.pdSaledetno,jdbcType=INTEGER},
-      #{item.pdSdid,jdbcType=INTEGER}, #{item.companyId,jdbcType=INTEGER}, #{item.updaterId,jdbcType=INTEGER},
-      #{item.updateTime,jdbcType=TIMESTAMP}, #{item.pdText1,jdbcType=VARCHAR}, #{item.pdText2,jdbcType=VARCHAR},
-      #{item.pdText3,jdbcType=VARCHAR}, #{item.pdText4,jdbcType=VARCHAR}, #{item.pdText5,jdbcType=VARCHAR},
-      #{item.pdYqty,jdbcType=DOUBLE}
+      #{item.pd_puid,jdbcType=INTEGER}, #{item.pd_code,jdbcType=VARCHAR},
+      #{item.pd_detno,jdbcType=INTEGER}, #{item.pd_prodid,jdbcType=INTEGER}, #{item.pd_prodcode,jdbcType=VARCHAR},
+      #{item.pd_unit,jdbcType=VARCHAR}, #{item.pd_qty,jdbcType=DOUBLE}, #{item.pd_price,jdbcType=DOUBLE},
+      #{item.pd_total,jdbcType=DOUBLE}, #{item.pd_taxtotal,jdbcType=DOUBLE}, #{item.pd_acceptqty,jdbcType=DOUBLE},
+      #{item.pd_delivery,jdbcType=DOUBLE}, #{item.pd_salecode,jdbcType=VARCHAR}, #{item.pd_saledetno,jdbcType=INTEGER},
+      #{item.pd_sdid,jdbcType=INTEGER}, #{item.companyId,jdbcType=INTEGER}, #{item.updaterId,jdbcType=INTEGER},
+      #{item.updateTime,jdbcType=TIMESTAMP}, #{item.pd_text1,jdbcType=VARCHAR}, #{item.pd_text2,jdbcType=VARCHAR},
+      #{item.pd_text3,jdbcType=VARCHAR}, #{item.pd_text4,jdbcType=VARCHAR}, #{item.pd_text5,jdbcType=VARCHAR},
+      #{item.pd_yqty,jdbcType=DOUBLE}
       )
     </foreach>
   </insert>
+  <update id="batchUpdate" parameterType="com.usoftchina.saas.purchase.po.PurchaseItem" >
+    <foreach collection="list" item="item" index="index" open="" close="" separator=";">
+      update purchasedetail <set>
+      PD_PUID = #{item.pd_puid},
+      PD_CODE = #{item.pd_code},
+      PD_DETNO = #{item.pd_detno},
+      PD_PRODID = #{item.pd_prodid},
+      PD_PRODCODE = #{item.pd_prodcode},
+      PD_UNIT = #{item.pd_unit},
+      PD_QTY = #{item.pd_qty},
+      PD_PRICE = #{item.pd_pice},
+      PD_TOTAL = #{item.pd_total},
+      PD_TAXTOTAL = #{item.pd_taxtotal},
+      PD_ACCEPTQTY = #{item.pd_acceptqty},
+      PD_DELIVERY = #{item.pd_delivery},
+      PD_SALECODE = #{item.pd_salecode},
+      PD_SALEDETNO = #{item.pd_saledetno},
+      PD_SDID = #{item.pd_sdid},
+      companyId = #{item.companyId},
+      updaterId = #{item.updaterId},
+      updateTime = #{item.updateTime},
+      pd_text1 = #{item.pd_text1},
+      pd_text2 = #{item.pd_text2},
+      pd_text3 = #{item.pd_text3},
+      pd_text4 = #{item.pd_text4},
+      pd_text5 = #{item.pd_text5},
+      pd_yqty = #{item.pd_yqty}
+      </set>
+      where PD_ID = #{item.id,jdbcType=INTEGER}
+    </foreach>
+  </update>
+  <delete id="deleteByForeignKey" parameterType="java.lang.Long">
+    delete from purchasedetail where pd_puid=#{id}
+  </delete>
+  <select id="selectByFK" parameterType="long" resultMap="BaseResultMap">
+    select * from purchasedetail where pd_puid=#{pu_id}
+  </select>
 </mapper>

+ 10 - 0
framework/core/src/main/java/com/usoftchina/saas/utils/StringUtils.java

@@ -15,4 +15,14 @@ public class StringUtils {
     public static String nullIf(String target, String nullValue) {
         return (null == target || target.isEmpty()) ? nullValue : target;
     }
+
+    /**
+     * 判断参数是否为空、空字符串、空白格
+     *
+     * @param object
+     * @return
+     */
+    public static boolean hasText(Object object) {
+        return object == null ? false : org.springframework.util.StringUtils.hasText(object.toString());
+    }
 }

+ 8 - 4
frontend/saas-web/app/util/FormUtil.js

@@ -19,7 +19,7 @@ Ext.define('saas.util.FormUtil', {
         formModel = form.getViewModel(),
         url = me.baseUrl.replace(me.urlRe, '$1' + viewName);
         
-        this.BaseUtil.request({url, })
+        this.BaseUtil.request({url, async: false})
         .then(function(response) {
             var res = Ext.decode(response.responseText);
             if(res.success) {
@@ -51,12 +51,16 @@ Ext.define('saas.util.FormUtil', {
                             };
                         }
                     });
-                    form.addItems(items);
                 }
-
-                form.fireEvent('afterSetItems', form, items);
+                form.addItems(items);
+            }else {
+                return []
             }
         })
+        .then(function(items) {
+            form.addItems(items);
+            form.fireEvent('afterSetItems', form, items);
+        })
         .catch(function(response) {
             console.error(response);
         });

+ 280 - 0
frontend/saas-web/app/util/QueryUtil.js

@@ -0,0 +1,280 @@
+Ext.define('saas.util.QueryUtil', {
+
+    BaseUtil: Ext.create('saas.util.BaseUtil'),
+
+    // 请求页面组件接口模板
+    baseUrl: 'http://192.168.0.181:8560/api/ui/co_view/config?name={xtype}',
+    // 模板替换正则
+    urlRe: /(.*){xtype}(.*)/g,
+    
+    /**
+     * 获得form的字段配置
+     * @param form: form组件
+     */
+    setItems: function(form) {
+        var me = this;
+        debuggre;
+        Ext.each(form.items.items, function(f){
+            if(f.xtype=='core-query-queryformpanel'){
+
+            }else if(f.xtype=='core-query-gridpanel'){
+                
+            }
+
+        });
+        // xtype = form.xtype,
+        //     url = me.baseUrl.replace(me.urlRe, '$1' + xtype);
+        //     me.BaseUtil.request({url})
+        // .then(function(response) {
+        //     var res = Ext.decode(response.responseText);
+        //     if(res.success) {
+        //         var config = res.data, items = [];
+        //         if(config) {
+        //             items = config.items;
+        //             //_baseItems
+        //             // _BaseColumn: '',
+        //             // _RelativeColumn: '',
+        //             form.add(items);
+        //         }
+        //         form.fireEvent('afterSetItems', form, items);               
+        //     }
+        // })
+        // .catch(function(response) {
+        //     console.error(response);
+        // });
+    },
+     /**
+     * 获得form的字段查询条件
+     * @param form: form组件
+     * @returns Mode: 字段模式,默认MAIN 当f.fieldMode = "DETAIL",Mode->"DETAIL"
+     */
+    getStoreMode: function(form){
+        var Mode = "MAIN";
+        Ext.each(form.items.items, function(f){
+            if(!Ext.isEmpty(f.value)&&f.fieldMode == "DETAIL") {
+                Mode = "DETAIL";
+                break;
+            }
+        });
+        return Mode;
+    },
+      /**
+     * 获得form的字段查询条件
+     * @param form: form组件
+     */
+    getFormCondition: function(form){
+        var condition = "",
+        me = this;
+        Ext.each(form.items.items, function(f){
+				if((f.xtype == 'checkbox' || f.xtype == 'radio')&&f.logic){
+					if(f.value == true) {
+						if(condition == ''){
+							condition += "("+f.logic+")";
+						} else {
+							condition += ' AND (' + f.logic+')';
+						}
+					}
+				} else if(f.xtype == 'datefield' && f.value != null && f.value != '' ){
+					var v = Ext.Date.format(new Date(f.value), 'Y-m-d');
+					if(condition == ''){
+						condition += "to_char("+f.name+",'yyyy-MM-dd')='"+v+"'";
+					} else {
+						condition += " AND to_char("+f.name+",'yyyy-MM-dd')='"+v+"'";
+					}
+				} else if(f.xtype == 'datetimefield' && f.value != null){
+					var v = Ext.Date.format(new Date(f.value), 'Y-m-d H:i:s');
+					if(condition == ''){
+						condition += f.name + "=to_date('" + v + "', 'yyyy-MM-dd HH24:mi:ss')";
+					} else {
+						condition += ' AND ' + f.name + "=to_date('" + v + "', 'yyyy-MM-dd HH24:mi:ss')";
+					}
+				} else if(f.xtype == 'numberfield' && f.value != null && f.value != ''){
+					var endChar = '=';
+					if(condition == ''){
+						condition += f.name + endChar + f.value;
+					} else {
+						condition += ' AND ' + f.name + endChar + f.value;
+					}
+				} else if(f.xtype == 'combo' && f.value != '$ALL'){
+					if(f.store.data.length > 1) {
+						if(condition == ''){
+							condition += '(';
+						} else {
+							condition += ' AND (';
+						}
+						var _a = '';
+						f.store.each(function(d, idx){
+							if(d.data.value != '$ALL') {
+								if(_a == ''){
+									_a += f.name +' '+  d.data.value+' ' ;
+								} else {
+									_a += ' OR ' + f.name +' '+ d.data.value +' ';
+								}
+							}
+						});
+						condition += _a + ')';
+					}
+				}  else {
+                    if(!Ext.isEmpty(f.value)){
+                        if(me.contains(f.value.toString(), 'BETWEEN', true) && me.contains(f.value.toString(), 'AND', true)){
+                            if(condition == ''){
+                                condition += f.name + " " + f.value;
+                            } else {
+                                condition += ' AND (' + f.name + " " + f.value + ")";
+                            }
+                        } else if(me.contains(f.value.toString(), '||', true)){
+                            var str = '';
+                            Ext.each(f.value.split('||'), function(v){
+                                if(v != null && v != ''){
+                                    if(str == ''){
+                                        str += f.name + "='" + v + "'";
+                                    } else {
+                                        str += ' OR ' + f.name + "='" + v + "'";
+                                    }
+                                }
+                            });
+                            if(condition == ''){
+                                condition += "(" + str + ")";
+                            } else {
+                                condition += ' AND (' + str + ")";
+                            }
+                        } else if(f.value.toString().charAt(0) == '!'){ 
+                            if(condition == ''){
+                                condition += 'nvl(' + f.name + ",' ')<>'" + f.value.substr(1) + "'";
+                            } else {
+                                condition += ' AND (nvl(' + f.name + ",' ')<>'" + f.value.substr(1) + "')";
+                            }
+                        } else {
+                            if(f.value.toString().indexOf('%') >= 0) {
+                                if(condition == ''){
+                                    condition += f.name + " like '" + f.value + "'";
+                                } else {
+                                    condition += ' AND (' + f.name + " like '" + f.value + "')";
+                                }
+                            } else {
+                                if(condition == ''){
+                                    condition += '('+f.name + "='" + f.value + "')";
+                                } else {
+                                    condition += ' AND (' + f.name + "='" + f.value + "')";
+                                }
+                            }
+                        }
+                    }
+                    
+				}
+        });
+        return condition;
+    },
+    /**
+	 * string:原始字符串
+	 * substr:子字符串
+	 * isIgnoreCase:忽略大小写
+	 */
+    contains: function(string, substr, isIgnoreCase){
+		if (string == null || substr == null) return false;
+		if (isIgnoreCase === undefined || isIgnoreCase === true) {
+			string = string.toLowerCase();
+			substr = substr.toLowerCase();
+		}
+		return string.indexOf(substr) > -1;
+    },
+    /**
+     * 
+     */
+    queryData: function(grid,condition){
+        var me = this;
+            if(Ext.isEmpty(condition)){
+                condition =" 1=1 ";
+            }
+            var params = { keyword: condition,number:1,size:15 };
+            var dataRes = {
+                url :grid.listUrl,
+                async:false,
+                params:params
+            };
+            me.BaseUtil.request(dataRes)
+            .then(function(response) {
+                var res = Ext.decode(response.responseText);
+                if(res.success) {
+                    var data = res.data;
+                    console.log(data);
+                     grid.getStore().loadData(data.list);
+                     grid.fireEvent('afterLoadData', grid, data.list);
+                }
+            })
+            .catch(function(response) {
+                console.log(response);
+                // something...
+            });
+    },
+    onQuery: function(parentForm,queryMoreForm){
+        var me = this,
+            grid = parentForm.down('grid'),
+            queryForm = parentForm.down('form'),
+            condition = me.getFormCondition(queryForm),
+            Mode = me.getStoreMode(queryForm);
+        if(queryMoreForm){//更多查询
+            if(!Ext.isEmpty(condition)){
+                condition = " and ( "+me.getStoreMode(queryMoreForm)+" ) ";
+            }else{
+                condition = me.getStoreMode(queryMoreForm);
+            }
+            if(Mode=="MAIN"){
+                me.getStoreMode(queryMoreForm);
+            }
+        }
+        console.log("condition:"+condition);
+        condition = " 1=1 ";
+        if(Mode=="MAIN"){
+            console.log("Mode:"+Mode+",查询当前列表");
+            grid.loadPage(1);
+        }else{
+            console.log("Mode:"+Mode+",查询当前关联列表");
+            //若明细字段含明细字段注意切换数据源 grid.reconfigure(store, columns);
+            //关联viewName = 关联viewName+"-RelativeGrid"
+            grid.loadPage(1);
+        }
+
+    },
+    add10EmptyRow: function(grid) {
+        var store = grid.getStore(),
+            selectedRecord = grid.selModel.lastSelected,
+            datas = [];
+        Ext.Array.each(new Array(10), function() {
+            datas.push({});
+        })
+        store.insert(store.indexOf(selectedRecord) + 1, datas);
+    },
+    /**
+     * 获取grid被选数据
+	 * grid:原始字符串
+	 */
+    getGridSelected:function(grid){
+        var items = grid.selModel.getSelection(),
+        data = new Array();
+		Ext.each(items, function(item, index){
+			if(!Ext.isEmpty(item.data[grid._idField])&&!Ext.isEmpty(item.data[grid._codeField])){
+				var o = new Object();
+				if(grid._idField){
+					o[grid._idField] = item.data[grid._idField];
+                }
+                if(grid._codeField){
+					o[grid._codeField] = item.data[grid._codeField];
+				}
+				data.push(o);
+            }
+		});
+		return JSON.stringify(data);
+    }
+    // me.BaseUtil.request({
+    //     url: form._saveUrl,
+    //     params: JSON.stringify(params),
+    //     method: 'POST',
+    // })
+    // .then(function() {
+    //     Ext.Msg.alert('提示','保存成功');
+    // })
+    // .catch(function() {
+    //     Ext.Msg.alert('提示','保存失败');
+    // });
+});

+ 1 - 1
frontend/saas-web/app/view/core/dbfind/DbfindGridPanel.js

@@ -59,7 +59,7 @@ Ext.define('saas.view.core.dbfind.DbfindGridPanel', {
                         if(field){
                             var val = record.get(item.from);
                             if(field.xtype=='dbfindtrigger'){
-                                field.setRawValue(val);
+                                field.setValue(val);
                                 field.lastTriggerValue=val;
                             }else{
                                 field.setValue(val);

+ 7 - 126
frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js

@@ -1,101 +1,17 @@
 Ext.define('saas.view.core.dbfind.DbfindTrigger', {
-    extend: 'Ext.form.ComboBox',
+    extend: 'Ext.form.field.Trigger',
     xtype: 'dbfindtrigger',
-    queryMode: 'local',
-    displayField: 'dispaly',
-    valueField: 'value',
     triggerCls: 'x-form-search-trigger',
+
     GridUtil: Ext.create('saas.util.GridUtil'),
     BaseUtil: Ext.create('saas.util.BaseUtil'),
+
     minChars:1, // 设置用户输入字符多少时触发查询
     tpl: '',
     enableKeyEvents:true,
     initComponent:function() {
         var me = this;
-        me.store=Ext.create('Ext.data.Store', {
-            fields: ['display','value'],
-            data : [{
-                'display':me.value,
-                'value':me.value
-            }]
-        });
-        this.callParent();
-    },
-    //输入值之后进行模糊查询
-    doQuery: function(queryString, forceAll, rawQuery) {
-    	queryString = queryString || '';
-    	var me = this;
-    	if(me.lastQueryValue!=queryString){
-    		var judge=me.judge(me);
-    		var field=[];
-    		var sfield='';
-            var dbfinds=me.dbfinds;
-            var dbtpls=me.dbtpls;
-    		var name=me.name;
-    		me.lastQueryValue=queryString;
-            if(queryString.trim()==''){
-                me.collapse( );
-            }else{
-                if(!dbfinds||!dbtpls){
-                    me.collapse( );
-                }else{                   
-                    //加载tpl模板
-                    if(dbtpls.length>0){
-                        var span="";
-                        var width=0;
-                        for(var i=0;i<dbtpls.length;i++){
-                            if(i==0){
-                                span=span+'<span style="width:'+dbtpls[i].width+'px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;float:left;">{'+dbtpls[i].field+'}</span>';//display:block;
-                            }else{
-                                span=span+'<span style="width:'+dbtpls[i].width+'px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;float:left;margin-left:10px;">{'+dbtpls[i].field+'}</span>';
-                            }
-                            if(dbtpls[i].dbField=="true"){
-                                me.searchFieldArray=dbtpls[i].field;
-                            }
-                            width=width+dbtpls[i].width+20;
-                            field.push(dbtpls[i].field);
-                            sfield=sfield+dbtpls[i].field+',';
-                        }
-                        me.defaultListConfig.minWidth=width+10;
-                        me.defaultListConfig.maxHeight=210;
-                        me.defaultListConfig.autoScroll=true;
-                        me.searchField=sfield.substring(0,sfield.length-1);
-                        me.tpl=Ext.create('Ext.XTemplate',
-                                '<ul style="padding-left: 0px;"><tpl for=".">',
-                                '<li role="option" class="x-boundlist-item" style="list-style:none;">' ,
-                                '<div style="height:30px;">',
-                                ''+span+'',
-                                '</li>',
-                            '</tpl></ul>'
-                        );
-                        me.store.setFields(field);
-                    }
-                }
-                //加载数据
-                var data;
-                Ext.Ajax.request({
-                    url: me.dataUrl,
-                    params: '',
-                    success: function(response, opts) {
-                        data = Ext.decode(response.responseText);
-                        data = data.data;
-                        if(data!=null && data.length>0 && me.store && field.length>0){
-                            me.store.loadData(data,false);
-                            me.expand();
-                        }else{
-                            me.collapse( );
-                        }
-                    },
-                    failure: function(response, opts) {
-                        console.log('server-side failure with status code ' + response.status);
-                        return reject(response);
-                    }
-                });                
-            }
-            return true;
-    	}else{
-    		return false;
-    	}
+        this.callParent(arguments);
     },
     onTriggerClick:function(f){
         //判断dbfindtrigger归属
@@ -137,44 +53,9 @@ Ext.define('saas.view.core.dbfind.DbfindTrigger', {
     },
 
     listeners: {
-		select:function(combo,record,eOpts){
-            var me = combo;
-            var dbfinds = me.dbfinds;
-            if(dbfinds&&dbfinds.length>0){
-                if(me.belong=='grid'){
-                    for (let index = 0; index < dbfinds.length; index++) {
-                        var item = dbfinds[index];
-                        var rec = me.column.ownerCt.ownerCt.selModel.getLastSelected();
-                        if(rec){
-                            var nowRec = me.column.ownerCt.ownerCt.store.getData().getByKey(rec.id);
-                            nowRec.set(item.to,record.get(item.from));
-                            me.column.getEditor().setValue(record.get(item.from));
-                        }
-                    }
-                }else if(me.belong=='form'){
-                    for (let index = 0; index < dbfinds.length; index++) {
-                        var item = dbfinds[index];
-                        var field = me.ownerCt.down('[name='+item.to+']');
-                        if(field){
-                            var val = record.get(item.from);
-                            if(field.xtype=='dbfindtrigger'){
-                                field.setRawValue(val);
-                                field.value = val;
-                                field.lastTriggerValue=val;
-                            }else{
-                                field.setValue(val);
-                            }    
-                        }
-                    }
-                }
-            }
-        }
-    },
-
-    getValue: function(f) {
-        var me = this,val = me.rawToValue(me.processRawValue(me.getRawValue()));
-        me.value = val;
-        return val;
+        focus: function(f) {
+            return true;
+		}
     },
 
     autoSetValue: function(data, dbfinds) {

+ 232 - 0
frontend/saas-web/app/view/core/dbfind/DbfindTrigger2.js

@@ -0,0 +1,232 @@
+Ext.define('saas.view.core.dbfind.DbfindTrigger2', {
+    extend: 'Ext.form.ComboBox',
+    xtype: 'dbfindtrigger2',
+    queryMode: 'local',
+    displayField: 'dispaly',
+    valueField: 'value',
+    triggerCls: 'x-form-search-trigger',
+    GridUtil: Ext.create('saas.util.GridUtil'),
+    BaseUtil: Ext.create('saas.util.BaseUtil'),
+    minChars:1, // 设置用户输入字符多少时触发查询
+    tpl: '',
+    enableKeyEvents:true,
+    initComponent:function() {
+        var me = this;
+        me.store=Ext.create('Ext.data.Store', {
+            fields: ['display','value'],
+            data : [{
+                'display':me.value,
+                'value':me.value
+            }]
+        });
+        this.callParent();
+    },
+    //输入值之后进行模糊查询
+    doQuery: function(queryString, forceAll, rawQuery) {
+    	queryString = queryString || '';
+    	var me = this;
+    	if(me.lastQueryValue!=queryString){
+    		var judge=me.judge(me);
+    		var field=[];
+    		var sfield='';
+            var dbfinds=me.dbfinds;
+            var dbtpls=me.dbtpls;
+    		var name=me.name;
+    		me.lastQueryValue=queryString;
+            if(queryString.trim()==''){
+                me.collapse( );
+            }else{
+                if(!dbfinds||!dbtpls){
+                    me.collapse( );
+                }else{                   
+                    //加载tpl模板
+                    if(dbtpls.length>0){
+                        var span="";
+                        var width=0;
+                        for(var i=0;i<dbtpls.length;i++){
+                            if(i==0){
+                                span=span+'<span style="width:'+dbtpls[i].width+'px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;float:left;">{'+dbtpls[i].field+'}</span>';//display:block;
+                            }else{
+                                span=span+'<span style="width:'+dbtpls[i].width+'px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;float:left;margin-left:10px;">{'+dbtpls[i].field+'}</span>';
+                            }
+                            if(dbtpls[i].dbField=="true"){
+                                me.searchFieldArray=dbtpls[i].field;
+                            }
+                            width=width+dbtpls[i].width+20;
+                            field.push(dbtpls[i].field);
+                            sfield=sfield+dbtpls[i].field+',';
+                        }
+                        me.defaultListConfig.minWidth=width+10;
+                        me.defaultListConfig.maxHeight=210;
+                        me.defaultListConfig.autoScroll=true;
+                        me.searchField=sfield.substring(0,sfield.length-1);
+                        me.tpl=Ext.create('Ext.XTemplate',
+                                '<ul style="padding-left: 0px;"><tpl for=".">',
+                                '<li role="option" class="x-boundlist-item" style="list-style:none;">' ,
+                                '<div style="height:30px;">',
+                                ''+span+'',
+                                '</li>',
+                            '</tpl></ul>'
+                        );
+                        me.store.setFields(field);
+                    }
+                }
+                //加载数据
+                var data;
+                Ext.Ajax.request({
+                    url: me.dataUrl,
+                    params: '',
+                    success: function(response, opts) {
+                        data = Ext.decode(response.responseText);
+                        data = data.data;
+                        if(data!=null && data.length>0 && me.store && field.length>0){
+                            me.store.loadData(data,false);
+                            me.expand();
+                        }else{
+                            me.collapse( );
+                        }
+                    },
+                    failure: function(response, opts) {
+                        console.log('server-side failure with status code ' + response.status);
+                        return reject(response);
+                    }
+                });                
+            }
+            return true;
+    	}else{
+    		return false;
+    	}
+    },
+    onTriggerClick:function(f){
+        //判断dbfindtrigger归属
+        var belong = f.judge(f);
+        var win = Ext.create('Ext.window.Window', {   
+            trigger:f,
+            belong:f.ownerCt,  
+            modal:true,
+            height: '80%',
+            width: '80%',
+            title: '查找',
+            scrollable: true,
+            bodyPadding: 10,
+            constrain: true,
+            closable: true,
+            layout:'fit',
+            renderTo:Ext.getCmp('main-tab-panel').getActiveTab().getEl(),
+            items:[{
+                xtype:'dbfindgridpanel',
+                columns: f.dbColumns,
+                dataUrl: f.dataUrl,
+                dbfinds: f.dbfinds
+            }]
+        });
+        win.show();
+    },
+
+    judge:function(f){
+        if(f.ownerCt.xtype.trim().toUpperCase().indexOf('FORMPANEL')>-1){
+            f.belong = 'form';
+            return 'form'
+        }
+        else if(f.column){
+            f.belong = 'grid';
+            return 'grid'
+        }
+    },
+
+    listeners: {
+        focus: function(f) {
+            return true;
+		},
+		select:function(combo,record,eOpts){
+            var me = combo;
+            var dbfinds = me.dbfinds;
+            if(dbfinds&&dbfinds.length>0){
+                if(me.belong=='grid'){
+                    for (let index = 0; index < dbfinds.length; index++) {
+                        var item = dbfinds[index];
+                        debugger
+                        var field = me.ownerCt.down('[name='+item.to+']');
+                        if(field){
+                            var val = record.get(item.from);
+                            if(field.xtype=='dbfindtrigger'){
+                                field.setRawValue(val);
+                                field.value = val;
+                                field.lastTriggerValue=val;
+                            }else{
+                                field.setValue(val);
+                            }    
+                        }
+                    }
+                }else if(me.belong=='form'){
+                    for (let index = 0; index < dbfinds.length; index++) {
+                        var item = dbfinds[index];
+                        var field = me.ownerCt.down('[name='+item.to+']');
+                        if(field){
+                            var val = record.get(item.from);
+                            if(field.xtype=='dbfindtrigger'){
+                                field.setRawValue(val);
+                                field.value = val;
+                                field.lastTriggerValue=val;
+                            }else{
+                                field.setValue(val);
+                            }    
+                        }
+                    }
+                }
+            }
+        }
+    },
+
+    getValue: function(f) {
+        var me = this,val = me.rawToValue(me.processRawValue(me.getRawValue()));
+        me.value = val;
+        return val;
+    },
+
+    autoSetValue: function(data, dbfinds) {
+		var trigger = this;
+		var triggerV = null;
+		if (!trigger.ownerCt || trigger.column) { //如果是grid的dbfind
+			var grid = trigger.owner;
+			var record = grid.lastSelectedRecord || trigger.record || grid.getSelectionModel().selected.items[0] || grid.selModel.lastSelected; //detailgrid里面selected
+			Ext.Array.each(Ext.Object.getKeys(data),
+					function(k) {
+				Ext.Array.each(dbfinds,
+						function(ds) {
+					if (ds.trigger == trigger.name || Ext.isEmpty(ds.trigger)) {
+						if (Ext.Array.contains(ds.dbGridField.split(';'), k)) { //k == ds.dbGridField//支持多dbgrid的字段对应grid同一字段
+							if (ds.field == trigger.name) {
+								triggerV = data[k]; //trigger所在位置赋值
+							}
+							record.set(ds.field, data[k]);
+						}
+					}
+				});
+			});
+		} else {
+			var ff;
+			Ext.Array.each(Ext.Object.getKeys(data),
+					function(k) {
+				Ext.Array.each(dbfinds,
+						function(ds) {
+					if (k == ds.dbGridField) {
+							if (trigger.name == ds.field||trigger.name.substring(0,trigger.name.indexOf('-new'))==ds.field) {
+								triggerV = data[k];
+							} else {
+								ff = Ext.getCmp(ds.field);
+								if (ff && ff.setValue) ff.setValue(data[k]);
+							}
+					}
+				});
+			});
+		}
+		trigger.setValue(triggerV);
+		data.data = data;
+		trigger.lastTriggerValue='';
+		trigger.fireEvent('aftertrigger', trigger, data);
+		trigger.lastTriggerId = null;
+		trigger.lastQueryValue='';
+	}
+
+});

+ 63 - 0
frontend/saas-web/app/view/core/query/MoreQueryFormPanel.js

@@ -0,0 +1,63 @@
+Ext.define('saas.view.core.query.MoreQueryFormPanel', {
+    extend: 'Ext.form.Panel',
+    xtype: 'core-query-morequeryformpanel',
+
+    layout: 'column',
+    autoScroll: true,
+    buttonAlign : 'center',
+    bodyPadding: 5,
+    frame:true,
+    defaults: {
+        xtype:'textfield',
+        margin: '0 5 5 0',
+        labelAlign: 'right',
+        labelWidth: 90,
+        columnWidth: 0.5,
+        blankText: '该字段不能为空'
+    },
+
+    initComponent: function() {
+        var me = this;
+        Ext.apply(me, {
+            dockedItems: [{
+                xtype: 'toolbar',
+                dock: 'bottom',
+                style: {
+                    'border-bottom': '1px solid #35baf6 !important'
+                },
+                items: [{
+                    xtype: 'button',
+                    text: '重置',
+                    handler: me.resetQuery
+                },'->',{
+                    xtype: 'button',
+                    text: '查询',
+                    handler: me.onQueryMore
+                }, {
+                    xtype: 'button',
+                    text: '关闭',
+                    handler: function(btn){
+                        var win = Ext.getCmp('queryMoreWin');
+                        win.close();
+                        win.destroy();
+                    }
+                }]
+            }]
+        });
+        me.callParent(arguments);
+    },
+    resetQuery: function(btn){
+        console.log("重置窗口");
+        btn.ownerCt.ownerCt.reset();
+    },
+    onQueryMore: function(btn){
+        console.log("更多查询");
+        var me = this,
+            queryMoreForm = me.up('core-query-queryformpanel'),
+            parentForm = queryMoreForm.up('core-query-formpanel')
+            debugger;
+            console.log(parentForm);
+            parentForm.QueryUtil.onQuery(parentForm,queryMoreForm);
+    }
+    
+});

+ 47 - 0
frontend/saas-web/app/view/core/query/QueryFormPanel.js

@@ -0,0 +1,47 @@
+Ext.define('saas.view.core.query.QueryFormPanel', {
+    extend: 'Ext.form.Panel',
+    xtype: 'core-query-queryformpanel',
+
+    layout: 'column',
+    autoScroll: true,
+    bodyPadding: 5,
+    labelSeparator : ':',
+    defaults:{
+		xtype:'textfield',
+		columnWidth:0.33,
+		margin:'5 5 5 5'
+	},
+    fieldDefaults: {
+        margin: '0 5 5 0',
+        labelAlign: 'right',
+        labelWidth: 90,
+        columnWidth: 0.25,
+        blankText: '该字段不能为空'
+    },
+
+    dockedItems: [{
+        xtype: 'toolbar',
+        dock: 'bottom',
+        style: {
+            'border-bottom': '1px solid #35baf6 !important'
+        },
+        items: ['->', {
+            xtype: 'button',
+            text: '更多查询',
+            handler: 'moreQuery'
+        }, {
+            xtype: 'button',
+            text: '查询',
+            handler: 'onQuery'
+        }, '->', {
+            xtype: 'button',
+            text: 'Debugger',
+            handler: function(btn) {
+                var queryFormPanel = btn.up('form'),
+                queryPanel = queryFormPanel.up('panel');
+                debugger;
+            }
+        }]
+    }]
+
+});

+ 197 - 0
frontend/saas-web/app/view/core/query/QueryGridPanel.js

@@ -0,0 +1,197 @@
+Ext.define('saas.view.core.query.QueryGridPanel', {
+    extend: 'Ext.grid.Panel',
+    xtype: 'core-query-querygridpanel',
+
+    //工具类
+    QueryUtil: Ext.create('saas.util.QueryUtil'),
+    GridUtil: Ext.create('saas.util.GridUtil'),
+
+    //字段属性
+    _BaseColumn: '',
+    _RelativeColumn: '',
+    _auditUrl:'',
+    _printUrl:'',
+    _deleteUrl:'',
+    //数据属性
+    listUrl:'http://192.168.253.58:8800/purchase/list',
+
+    //基础属性
+    border: 1,
+    anchor: '100% 70%',
+    loadMask: true,
+    frame: true,
+    showIndex: true,
+    columnWidth: 1.0,
+    showRowNum: true,
+    autoQuery: true,
+    selModel: 'checkboxmodel',
+
+    initComponent: function () {
+        var me = this;
+        Ext.apply(me, {
+            store: Ext.create('Ext.data.Store', {
+                fields: me.getFields(),
+                autoLoad: true,
+                pageSize: 5,
+                data: [],
+                proxy: {
+                    type: 'ajax',
+                    url: me.listUrl,
+                    actionMethods: {
+                        read: 'GET'
+                    },
+                    reader: {
+                        type: 'json',
+                        rootProperty: 'data.list',
+                        totalProperty: 'data.total',
+                    }
+                },
+                listeners: {
+                    beforeload: function (store, op) {
+                        var condition = '';
+                        if (Ext.isEmpty(condition)) {
+                            condition = " 1=1 ";
+                        }
+                        console.log("condition:" + condition);
+                        Ext.apply(store.proxy.extraParams, {
+                            number: op._start + 1,
+                            size: store.pageSize,
+                            keyword: condition
+                        });
+
+                    }
+                }
+            }),
+            store:Ext.create('Ext.data.Store',{
+                fields:me.fields,
+                autoLoad: true,
+                pageSize:5,
+                data:[],
+                proxy:{
+                    type:'ajax',
+                    url:me.listUrl ,
+                    actionMethods: {
+                        read   : 'GET'
+                    },
+                    reader:{
+                        type:'json',
+                        rootProperty:'data.list'
+                        ,totalProperty:'data.total',
+                        }
+                },
+                listeners : {
+                    beforeload : function(store,op) {
+                        var condition = '';
+                        // var queryForm = Ext.getCmp('core-query-queryformpanel'),
+                        // queryMoreForm = Ext.getCmp('core-query-querymoreformpanel'),
+                        // condition = me.up('core-query-formpanel').QueryUtil.getFormCondition(queryForm);
+                        // if(queryMoreForm){//更多查询
+                        //     if(!Ext.isEmpty(condition)){
+                        //         condition = " and ( "+me.up('core-query-formpanel').QueryUtil.getStoreMode(queryMoreForm)+" ) ";
+                        //     }else{
+                        //         condition = me.getStoreMode(queryMoreForm);
+                        //     }
+                        // }
+                        if(Ext.isEmpty(condition)){
+                            condition = " 1=1 ";
+                        }
+                        console.log("condition:"+condition);
+                        Ext.apply(store.proxy.extraParams, {
+                            number:op._start+1,
+                            size:store.pageSize,
+                            keyword: condition
+                        });
+                        
+                    }
+                }
+            }),
+            dockedItems: [{
+                xtype: 'toolbar',
+                dock: 'top',
+                items: ['->', {
+                    text: '新增',
+                    handler: me.onAddMore
+                }, {
+                    text: '审核',
+                    handler: me.onAudit
+                }, {
+                    text: '打印',
+                    handler: me.onPrint
+                }, {
+                    text: '导出',
+                    handler: me.onExport
+                }, {
+                    text: '删除',
+                    handler: me.onDelete
+                }]
+            }, {
+                xtype: 'pagingtoolbar',
+                dock: 'bottom',
+                id: 'query-bbar',
+                displayInfo: true,
+                emptyMsg: "暂无数据",
+                store: me.store,
+                displayMsg: '当前显示第{0}到{1}条数据,一共有{2}条',
+                beforePageText: "当前第",
+                afterPageText: "页,共{0}页"
+            }],
+        });
+        me.callParent(arguments);
+    },
+
+    listeners: {
+        itemClick: function (tableView, record, item, index, e, eOpts) {
+            var grid = tableView.up('grid'),
+                _idField = grid._idField,
+                store = grid.store,
+                count = store.getCount();
+            console.log("store");
+            console.log(store);
+        }
+    },
+
+    getFields: function() {
+        var me = this;
+
+        return me.columns.filter(function(c) {
+            return !!c.dataIndex;
+        }).map(function(c) {
+            return c.dataIndex;
+        });
+    },
+    onAddMore: function (btn) {
+        console.log("跳转到主从表");
+        var form = btn.ownerCt.ownerCt;
+        var mainTab = Ext.getCmp('main-tab-panel'),
+        id = 'test-order-formpanel' + '_add',
+        existingItem = mainTab.down('[id=' + id + ']');
+        if (!existingItem) {
+            var form = {
+                id,
+                title:'采购单',
+                xtype:'test-order-formpanel'
+            };
+            mainTab.setActiveTab(mainTab.add(form));
+        }else{
+            mainTab.setActiveTab(existingItem);
+        }
+    },
+    onAudit: function(btn){
+        var grid = btn.ownerCt.ownerCt;
+        console.log("审核");
+        console.log("grid");
+        var selectsd = grid.up('core-query-formpanel').QueryUtil.getGridSelected(grid);
+        console.log(selectsd);
+        //_baseVastUrl+"batchAudit"
+
+    },
+    onPrint: function () {
+        console.log("打印");
+    },
+    onExport: function () {
+        console.log("导出");
+    },
+    onDelete: function () {
+        console.log("删除该行");
+    }
+});

+ 57 - 0
frontend/saas-web/app/view/core/query/QueryPanel.js

@@ -0,0 +1,57 @@
+Ext.define('saas.view.core.query.QueryPanel', {
+    extend: 'Ext.panel.Panel',
+    xtype: 'core-query-querypanel',
+
+    controller: 'core-query-querypanel',
+    viewModel: 'core-query-querypanel',
+
+    layout: 'anchor',
+    autoScroll: true,
+    margin: '0',
+
+    items: [{
+        anchor: '100% 30%',
+        reference: 'queryform',
+        xtype: 'core-query-queryformpanel'
+    }, {
+        anchor: '100% 70%',
+        reference: 'querygrid',
+        xtype: 'core-query-querygridpanel'
+    }],
+
+    initComponent: function () {
+        var me = this;
+        me.setQueryItems(me.queryFormItems);
+        me.setQuertGridColumns(me.queryGridConfig);
+        me.callParent(arguments);
+    },
+
+    getQueryForm: function () {
+        var me = this,
+            refs = me.getReferences();
+
+        return refs['queryform'];
+    },
+
+    getQueryGrid: function () {
+        var me = this,
+            refs = me.getReferences();
+
+        return refs['querygrid'];
+    },
+
+    setQueryItems: function (items) {
+        var me = this,
+        queryForm = me.items[0];
+
+        queryForm.items = items;
+    },
+
+    setQuertGridColumns: function(config) {
+        var me = this,
+        queryGrid = me.items[1];
+
+        Ext.apply(queryGrid, config);
+    }
+
+});

+ 36 - 0
frontend/saas-web/app/view/core/query/QueryPanelController.js

@@ -0,0 +1,36 @@
+Ext.define('saas.view.core.query.QueryPanelController', {
+    extend: 'Ext.app.ViewController',
+    alias: 'controller.core-query-querypanel',
+
+    moreQuery: function (btn) {
+        var me = this;
+        var panel = me.getView();
+        var win = Ext.getCmp('queryMoreWin');
+        if (!win) {
+            win = Ext.create('Ext.window.Window', {
+                id: 'queryMoreWin',
+                modal: true,
+                height: '50%',
+                width: '50%',
+                title: '更多查询',
+                scrollable: true,
+                bodyPadding: 10,
+                constrain: true,
+                closable: true,
+                layout: 'fit',
+                renderTo: Ext.getCmp('main-tab-panel').getActiveTab().getEl(),
+                items: [{
+                    xtype: 'core-query-morequeryformpanel',
+                    items: panel.moreQueryFormItems
+                }]
+            });
+        };
+        win.show();
+    },
+    onQuery: function (btn) {
+        var me = this,
+        panel = me.getView(),
+        model = me.getViewModel();
+        console.log("查询: ", model.getData());
+    }
+});

+ 4 - 0
frontend/saas-web/app/view/core/query/QueryPanelModel.js

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

+ 6 - 0
frontend/saas-web/app/view/main/MainModel.js

@@ -53,6 +53,12 @@ Ext.define('saas.view.main.MainModel', {
                                         viewType: 'test-myform-formpanel',
                                         leaf: true
                                     },
+                                    {
+                                        id: 'myquerytest',
+                                        text: '测试-采购单查询界面',
+                                        viewType: 'test-query-querypanel',
+                                        leaf: true
+                                    },
                                     {
                                         id: 'ghdd',
                                         text: '购货订单',

+ 22 - 0
frontend/saas-web/app/view/test/myform/FormPanel.js

@@ -7,4 +7,26 @@ Ext.define('saas.view.test.myform.FormPanel',{
     viewModel: {
         type: 'test-myform-formpanel'
     },
+
+    defaultItems: [{
+        xtype: 'detailGridField',
+        store: Ext.create('Ext.data.Store', {
+            fields: ['col1', 'col2'],
+            data: []
+        }),
+        columns: [{
+            text : "col1", 
+            editor : {
+                xtype : "textfield"
+            }, 
+            dataIndex : "col1", 
+            width : 120.0
+        }, {
+            text : "col2", 
+            editor : {
+                xtype : "textfield"
+            }, 
+            dataIndex : "col2"
+        }]
+    }]
 });

+ 177 - 0
frontend/saas-web/app/view/test/query/QueryPanel.js

@@ -0,0 +1,177 @@
+Ext.define('saas.view.test.query.QueryPanel', {
+    extend: 'saas.view.core.query.QueryPanel',
+    xtype: 'test-query-querypanel',
+
+    // controller: 'test-query-formcontroller',
+    viewModel: 'test-query-querypanel',
+    viewName: 'test-query-formpanel',
+
+    queryFormItems: [{
+        xtype: 'hidden',
+        name: 'pu_id',
+        bind: '{pu_id}',
+        fieldLabel: 'ID',
+        allowBlank: true,
+        columnWidth: 0
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pu_code',
+        bind: '{pu_code}',
+        fieldLabel: '单据编号',
+        allowBlank: true,
+        columnWidth: 0.25,
+        dataUrl:'http://192.168.253.41:9480/api/document/vendor/getVendorsByCondition',
+        dbfinds:[{
+            from:'ve_code',to:'pu_code'
+        }],
+        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
+        }]
+    }, {
+        xtype: 'condatefield',
+        name: 'pu_date',
+        bind: '{pu_date}',
+        fieldLabel: '采购日期',
+        allowBlank: true,
+        columnWidth: 0.5
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pu_vendcode',
+        bind: '{pu_vendcode}',
+        fieldLabel: '供应商编号',
+        allowBlank: true,
+        columnWidth: 0.25,
+        configUrl: 'resources/json/purchase/vendorColumnsDbfind.json',
+        dataUrl: 'resources/json/purchase/vendorDataDbfind.json'
+    }, {
+        xtype: 'textfield',
+        name: 'pu_vendname',
+        bind: '{pu_vendname}',
+        fieldLabel: '供应商名称',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pd_prodcode',
+        bind: '{pd_prodcode}',
+        fieldLabel: '物料编号',
+        fieldMode: 'DETAIL',
+        allowBlank: true,
+        columnWidth: 0.25,
+        configUrl: 'resources/json/purchase/vendorColumnsDbfind.json',
+        dataUrl: 'resources/json/purchase/vendorDataDbfind.json'
+    }, {
+        xtype: 'textfield',
+        name: 'pr_detail',
+        bind: '{pr_detail}',
+        fieldLabel: '物料名称',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'remotecombo',
+        name: 'pr_statuscode',
+        bind: '{pr_statuscode}',
+        fieldLabel: '审核状态',
+        allowBlank: true,
+        columnWidth: 0.25,
+        store: Ext.create('Ext.data.Store', {
+            fields: ['pr_statuscode', 'pr_status'],
+            queryMode: 'local',
+            displayField: 'pr_status',
+            valueField: 'pr_statuscode',
+            data: [
+                ["$ALL", "全部"],
+                ["=AUDITED", "已审核"],
+                ["<>AUDITED", "未审核"]
+            ]
+        })
+    }, {
+        xtype: 'remotecombo',
+        name: 'pu_acceptstatuscode',
+        bind: '{pu_acceptstatuscode}',
+        fieldLabel: '入库状态',
+        allowBlank: true,
+        columnWidth: 0.25,
+        store: Ext.create('Ext.data.Store', {
+            fields: ['pu_acceptstatuscode', 'pu_acceptstatus'],
+            queryMode: 'local',
+            displayField: 'pu_acceptstatus',
+            valueField: 'pu_acceptstatuscode',
+            data: [
+                ["$ALL", "全部"],
+                ["=TURNOUT", "已入库"],
+                ["=NULL", "未入库"],
+                ["=PARTOUT", "部分入库"]
+            ]
+        })
+    }],
+    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: {
+        columns: [{
+            text: '序号',
+            width: 80,
+            xtype: 'rownumberer'
+        }, {
+            text: 'id',
+            dataIndex: 'pu_id',
+            width: 100,
+            xtype: 'numbercolumn'
+        }, {
+            text: '单据编号',
+            dataIndex: 'pu_code',
+            width: 120
+        }, {
+            text: '单据状态',
+            dataIndex: 'pu_status',
+            width: 120
+        }]
+    }
+});

+ 5 - 0
frontend/saas-web/app/view/test/query/QueryPanelController.js

@@ -0,0 +1,5 @@
+Ext.define('saas.view.test.query.QueryPanelController', {
+    extend: 'saas.view.core.query.QueryPanelController',
+    alias: 'controller.test-query-querypanel',
+
+});

+ 9 - 0
frontend/saas-web/app/view/test/query/QueryPanelModel.js

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