Bladeren bron

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

zhuth 7 jaren geleden
bovenliggende
commit
83737f55c9
47 gewijzigde bestanden met toevoegingen van 1794 en 291 verwijderingen
  1. 4 1
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/dto/ListReqDTO.java
  2. 1 1
      applications/commons/commons-server/src/main/resources/application.yml
  3. 58 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Fundinouttype.java
  4. 48 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Productunit.java
  5. 118 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Vendorcontact.java
  6. 36 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/CustomerController.java
  7. 35 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/FundinouttypeController.java
  8. 37 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductunitController.java
  9. 1 4
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/VendorController.java
  10. 0 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomerMapper.java
  11. 4 4
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomeraddressMapper.java
  12. 3 4
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomercontactMapper.java
  13. 19 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/FundinouttypeMapper.java
  14. 18 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProductunitMapper.java
  15. 18 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/VendorcontactMapper.java
  16. 7 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/CustomerService.java
  17. 9 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/FundinouttypeService.java
  18. 9 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProductunitService.java
  19. 135 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java
  20. 42 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/FundinouttypeServiceImpl.java
  21. 38 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductunitServiceImpl.java
  22. 1 1
      applications/document/document-server/src/main/resources/mapper/CustomerListMapper.xml
  23. 16 39
      applications/document/document-server/src/main/resources/mapper/CustomerMapper.xml
  24. 173 59
      applications/document/document-server/src/main/resources/mapper/CustomeraddressMapper.xml
  25. 136 55
      applications/document/document-server/src/main/resources/mapper/CustomercontactMapper.xml
  26. 139 0
      applications/document/document-server/src/main/resources/mapper/FundinouttypeMapper.xml
  27. 1 1
      applications/document/document-server/src/main/resources/mapper/ProductbrandMapper.xml
  28. 125 0
      applications/document/document-server/src/main/resources/mapper/ProductunitMapper.xml
  29. 206 0
      applications/document/document-server/src/main/resources/mapper/VendorcontactMapper.xml
  30. 66 0
      applications/document/document-server/src/test/java/com/usoftchina/saas/document/mapper/CustomeraddressMapperTest.java
  31. 82 0
      applications/document/document-server/src/test/java/com/usoftchina/saas/document/mapper/CustomercontactMapperTest.java
  32. 77 0
      applications/document/document-server/src/test/java/com/usoftchina/saas/document/service/CustomerServiceTest.java
  33. 8 1
      applications/document/document-server/src/test/java/com/usoftchina/saas/document/service/CustomerTest.java
  34. 3 3
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdIODetailDTO.java
  35. 3 3
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdInOutListDTO.java
  36. 1 1
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdIODetail.java
  37. 3 3
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOutList.java
  38. 3 3
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java
  39. 31 31
      applications/purchase/purchase-server/src/main/resources/mapper/ProdIODetailMapper.xml
  40. 3 3
      applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutListMapper.xml
  41. 1 1
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/entities/ProdIODetail.java
  42. 6 0
      applications/storage/storage-server/src/main/docker/Dockerfile
  43. 3 2
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/ProdInoutServiceImpl.java
  44. 1 1
      applications/storage/storage-server/src/main/resources/config/application-docker.yml
  45. 31 31
      applications/storage/storage-server/src/main/resources/mapper/ProdIODetailMapper.xml
  46. 34 34
      framework/server-starter/src/main/java/com/usoftchina/saas/server/ServerAutoConfiguration.java
  47. 1 1
      frontend/saas-web/app/util/FormUtil.js

+ 4 - 1
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/dto/ListReqDTO.java

@@ -62,7 +62,10 @@ public class ListReqDTO implements Serializable {
                     //字符串默认是模糊查询
                     if ("string".equals(type)) {
                         con = " " + field + " like '%" + value + "%' and";
-                    } else {
+                    } else if ("condition".equals(type)) {
+                        //type为condition为前端拼的条件
+                        con = " " + value + " and";
+                    }  else {
                         con = " " + field + " " + operation + " '" + value + "' and";
                     }
 

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

@@ -47,7 +47,7 @@ eureka:
     serviceUrl:
       defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8500/eureka/
 server:
-  port: 8900
+  port: 8920
   tomcat:
     uri-encoding: UTF-8
 info:

+ 58 - 0
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Fundinouttype.java

@@ -0,0 +1,58 @@
+package com.usoftchina.saas.document.entities;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class Fundinouttype extends CommonBaseEntity implements Serializable {
+    private String ft_name;
+
+    private String ft_kind;
+
+    private Integer ft_recordid;
+
+    private String ft_recorder;
+
+    private Date ft_date;
+
+    public String getFt_name() {
+        return ft_name;
+    }
+
+    public void setFt_name(String ft_name) {
+        this.ft_name = ft_name == null ? null : ft_name.trim();
+    }
+
+    public String getFt_kind() {
+        return ft_kind;
+    }
+
+    public void setFt_kind(String ft_kind) {
+        this.ft_kind = ft_kind == null ? null : ft_kind.trim();
+    }
+
+    public Integer getFt_recordid() {
+        return ft_recordid;
+    }
+
+    public void setFt_recordid(Integer ft_recordid) {
+        this.ft_recordid = ft_recordid;
+    }
+
+    public String getFt_recorder() {
+        return ft_recorder;
+    }
+
+    public void setFt_recorder(String ft_recorder) {
+        this.ft_recorder = ft_recorder == null ? null : ft_recorder.trim();
+    }
+
+    public Date getFt_date() {
+        return ft_date;
+    }
+
+    public void setFt_date(Date ft_date) {
+        this.ft_date = ft_date;
+    }
+}

+ 48 - 0
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Productunit.java

@@ -0,0 +1,48 @@
+package com.usoftchina.saas.document.entities;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class Productunit extends CommonBaseEntity implements Serializable {
+    private String pu_name;
+
+    private Integer pu_recordid;
+
+    private String pu_recorder;
+
+    private Date pu_date;
+
+    public String getPu_name() {
+        return pu_name;
+    }
+
+    public void setPu_name(String pu_name) {
+        this.pu_name = pu_name == null ? null : pu_name.trim();
+    }
+
+    public Integer getPu_recordid() {
+        return pu_recordid;
+    }
+
+    public void setPu_recordid(Integer pu_recordid) {
+        this.pu_recordid = pu_recordid;
+    }
+
+    public String getPu_recorder() {
+        return pu_recorder;
+    }
+
+    public void setPu_recorder(String pu_recorder) {
+        this.pu_recorder = pu_recorder == null ? null : pu_recorder.trim();
+    }
+
+    public Date getPu_date() {
+        return pu_date;
+    }
+
+    public void setPu_date(Date pu_date) {
+        this.pu_date = pu_date;
+    }
+}

+ 118 - 0
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Vendorcontact.java

@@ -0,0 +1,118 @@
+package com.usoftchina.saas.document.entities;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class Vendorcontact extends CommonBaseEntity implements Serializable {
+    private Integer vc_veid;
+
+    private Integer vc_detno;
+
+    private String vc_name;
+
+    private Integer vc_tel;
+
+    private String vc_qq;
+
+    private String vc_email;
+
+    private String ve_text1;
+
+    private String ve_text2;
+
+    private String ve_text3;
+
+    private String ve_text4;
+
+    private String ve_text5;
+
+    public Integer getVc_veid() {
+        return vc_veid;
+    }
+
+    public void setVc_veid(Integer vc_veid) {
+        this.vc_veid = vc_veid;
+    }
+
+    public Integer getVc_detno() {
+        return vc_detno;
+    }
+
+    public void setVc_detno(Integer vc_detno) {
+        this.vc_detno = vc_detno;
+    }
+
+    public String getVc_name() {
+        return vc_name;
+    }
+
+    public void setVc_name(String vc_name) {
+        this.vc_name = vc_name == null ? null : vc_name.trim();
+    }
+
+    public Integer getVc_tel() {
+        return vc_tel;
+    }
+
+    public void setVc_tel(Integer vc_tel) {
+        this.vc_tel = vc_tel;
+    }
+
+    public String getVc_qq() {
+        return vc_qq;
+    }
+
+    public void setVc_qq(String vc_qq) {
+        this.vc_qq = vc_qq == null ? null : vc_qq.trim();
+    }
+
+    public String getVc_email() {
+        return vc_email;
+    }
+
+    public void setVc_email(String vc_email) {
+        this.vc_email = vc_email == null ? null : vc_email.trim();
+    }
+
+    public String getVe_text1() {
+        return ve_text1;
+    }
+
+    public void setVe_text1(String ve_text1) {
+        this.ve_text1 = ve_text1 == null ? null : ve_text1.trim();
+    }
+
+    public String getVe_text2() {
+        return ve_text2;
+    }
+
+    public void setVe_text2(String ve_text2) {
+        this.ve_text2 = ve_text2 == null ? null : ve_text2.trim();
+    }
+
+    public String getVe_text3() {
+        return ve_text3;
+    }
+
+    public void setVe_text3(String ve_text3) {
+        this.ve_text3 = ve_text3 == null ? null : ve_text3.trim();
+    }
+
+    public String getVe_text4() {
+        return ve_text4;
+    }
+
+    public void setVe_text4(String ve_text4) {
+        this.ve_text4 = ve_text4 == null ? null : ve_text4.trim();
+    }
+
+    public String getVe_text5() {
+        return ve_text5;
+    }
+
+    public void setVe_text5(String ve_text5) {
+        this.ve_text5 = ve_text5 == null ? null : ve_text5.trim();
+    }
+}

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

@@ -2,6 +2,7 @@ package com.usoftchina.saas.document.controller;
 
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.document.dto.CustomerFormDTO;
@@ -15,7 +16,7 @@ import org.springframework.web.bind.annotation.*;
  * Created by zdw
  * 2018-10-23 11:39.
  */
-
+@CrossOrigin
 @RestController
 @RequestMapping("/customer")
 public class CustomerController {
@@ -71,7 +72,41 @@ public class CustomerController {
         return Result.success();
     }
 
+    /**
+     * 采购订单批量删除
+     *
+     * @param baseDTOs
+     * @return
+     */
+    @PostMapping("/batchDelete")
+    public Result batchDelete(@RequestBody BatchDealBaseDTO baseDTOs) {
+        customerService.batchDelete(baseDTOs);
+        return Result.success();
+    }
+
+    /**
+     * 客户资料关闭
+     *
+     * @param id
+     * @return
+     */
+    @PostMapping("/close/{id}")
+    public Result close(@PathVariable(value = "id") long id){
+        customerService.close(id);
+        return Result.success();
+    }
 
+    /**
+     * 客户资料启用
+     *
+     * @param id
+     * @return
+     */
+    @PostMapping("/open/{id}")
+    public Result open(@PathVariable(value = "id") long id){
+        customerService.open(id);
+        return Result.success();
+    }
 
 
 

+ 35 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/FundinouttypeController.java

@@ -0,0 +1,35 @@
+package com.usoftchina.saas.document.controller;
+
+import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.document.entities.Fundinouttype;
+import com.usoftchina.saas.document.service.FundinouttypeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("/fundinoutType")
+public class FundinouttypeController {
+
+    @Autowired
+    private FundinouttypeService fundinouttypeService;
+
+    @PostMapping("/save")
+    public Result save(@RequestBody Fundinouttype fundinouttype){
+        fundinouttypeService.save(fundinouttype);
+        return Result.success();
+    }
+
+    @PostMapping("/delete/{id}")
+    public Result delete(@PathVariable("id") Long id){
+        fundinouttypeService.removeByPrimaryKey(id);
+        return Result.success();
+    }
+
+    @GetMapping("/getAll")
+    public Result getAll(){
+        List<Fundinouttype> fundinouttypeList = fundinouttypeService.findAll();
+        return Result.success(fundinouttypeList);
+    }
+}

+ 37 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductunitController.java

@@ -0,0 +1,37 @@
+package com.usoftchina.saas.document.controller;
+
+
+import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.document.entities.Productunit;
+import com.usoftchina.saas.document.service.ProductunitService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("/productUnit")
+public class ProductunitController {
+
+    @Autowired
+    private ProductunitService productunitService;
+
+    @PostMapping("/save")
+    public Result save(@RequestBody Productunit productunit){
+        productunitService.save(productunit);
+        return Result.success();
+    }
+
+    @PostMapping("/delete/{id}")
+    public Result delete(@PathVariable("id") Long id){
+        productunitService.removeByPrimaryKey(id);
+        return Result.success();
+    }
+
+    @GetMapping("/getAll")
+    public Result getAll(){
+        List<Productunit> productunitList = productunitService.findAll();
+        return Result.success(productunitList);
+    }
+
+}

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

@@ -9,10 +9,7 @@ import com.usoftchina.saas.document.dto.VendorDTO;
 import com.usoftchina.saas.document.service.VendorService;
 import com.usoftchina.saas.page.PageRequest;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.CrossOrigin;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
 

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

@@ -6,8 +6,6 @@ import com.usoftchina.saas.document.entities.Customer;
 public interface CustomerMapper extends CommonBaseMapper<Customer> {
     int deleteByPrimaryKey(Integer cu_id);
 
-    int insert(Customer record);
-
     int insertSelective(Customer record);
 
     Customer selectByPrimaryKey(Long cu_id);

+ 4 - 4
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomeraddressMapper.java

@@ -9,8 +9,6 @@ import java.util.List;
 public interface CustomeraddressMapper extends CommonBaseMapper<Customer> {
     int deleteByPrimaryKey(Integer ca_id);
 
-    int insert(Customeraddress record);
-
     int insertSelective(Customeraddress record);
 
     Customeraddress selectByPrimaryKey(Integer ca_id);
@@ -19,7 +17,9 @@ public interface CustomeraddressMapper extends CommonBaseMapper<Customer> {
 
     int updateByPrimaryKeyWithBLOBs(Customeraddress record);
 
-    int updateByPrimaryKey(Customeraddress record);
-
     List<Customeraddress> selectByFK(Long fk_i);
+
+    void batchInsert(List<Customeraddress> list);
+
+    void batchUpdate(List<Customeraddress> list);
 }

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

@@ -9,17 +9,16 @@ import java.util.List;
 public interface CustomercontactMapper extends CommonBaseMapper<Customercontact> {
     int deleteByPrimaryKey(Integer cc_id);
 
-    int insert(Customercontact record);
-
     int insertSelective(Customercontact record);
 
     Customercontact selectByPrimaryKey(Integer cc_id);
 
     int updateByPrimaryKeySelective(Customercontact record);
 
-    int updateByPrimaryKey(Customercontact record);
-
     List<Customercontact> selectByFK(Long fk_i);
 
 
+    void batchInsert(List<Customercontact> insertDetail1);
+
+    void batchUpdate(List<Customercontact> updateDetail1);
 }

+ 19 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/FundinouttypeMapper.java

@@ -0,0 +1,19 @@
+package com.usoftchina.saas.document.mapper;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.document.entities.Fundinouttype;
+
+public interface FundinouttypeMapper extends CommonBaseMapper<Fundinouttype> {
+    int deleteByPrimaryKey(Long ft_id);
+
+    int insert(Fundinouttype record);
+
+    int insertSelective(Fundinouttype record);
+
+    Fundinouttype selectByPrimaryKey(Long ft_id);
+
+    int updateByPrimaryKeySelective(Fundinouttype record);
+
+    int updateByPrimaryKey(Fundinouttype record);
+}

+ 18 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProductunitMapper.java

@@ -0,0 +1,18 @@
+package com.usoftchina.saas.document.mapper;
+
+import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.document.entities.Productunit;
+
+public interface ProductunitMapper extends CommonBaseMapper<Productunit> {
+    int deleteByPrimaryKey(Long pu_id);
+
+    int insert(Productunit record);
+
+    int insertSelective(Productunit record);
+
+    Productunit selectByPrimaryKey(Long pu_id);
+
+    int updateByPrimaryKeySelective(Productunit record);
+
+    int updateByPrimaryKey(Productunit record);
+}

+ 18 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/VendorcontactMapper.java

@@ -0,0 +1,18 @@
+package com.usoftchina.saas.document.mapper;
+
+import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.document.entities.Vendorcontact;
+
+public interface VendorcontactMapper extends CommonBaseMapper<Vendorcontact> {
+    int deleteByPrimaryKey(Long vc_id);
+
+    int insert(Vendorcontact record);
+
+    int insertSelective(Vendorcontact record);
+
+    Vendorcontact selectByPrimaryKey(Long vc_id);
+
+    int updateByPrimaryKeySelective(Vendorcontact record);
+
+    int updateByPrimaryKey(Vendorcontact record);
+}

+ 7 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/CustomerService.java

@@ -2,6 +2,7 @@ package com.usoftchina.saas.document.service;
 
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.document.dto.CustomerFormDTO;
@@ -22,4 +23,10 @@ public interface CustomerService extends CommonBaseService<CustomerMapper, Custo
     DocBaseDTO saveFormData(CustomerFormDTO data);
 
     void delete(Long id);
+
+    void close(long id);
+
+    void open(long id);
+
+    void batchDelete(BatchDealBaseDTO baseDTOs);
 }

+ 9 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/FundinouttypeService.java

@@ -0,0 +1,9 @@
+package com.usoftchina.saas.document.service;
+
+import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.document.entities.Fundinouttype;
+import com.usoftchina.saas.document.mapper.FundinouttypeMapper;
+
+public interface FundinouttypeService extends CommonBaseService<FundinouttypeMapper, Fundinouttype> {
+
+}

+ 9 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProductunitService.java

@@ -0,0 +1,9 @@
+package com.usoftchina.saas.document.service;
+
+import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.document.entities.Productunit;
+import com.usoftchina.saas.document.mapper.ProductunitMapper;
+
+public interface ProductunitService extends CommonBaseService<ProductunitMapper, Productunit> {
+
+}

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

@@ -3,6 +3,7 @@ package com.usoftchina.saas.document.service.impl;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.context.BaseContextHolder;
@@ -19,12 +20,15 @@ import com.usoftchina.saas.document.mapper.CustomerMapper;
 import com.usoftchina.saas.document.mapper.CustomeraddressMapper;
 import com.usoftchina.saas.document.mapper.CustomercontactMapper;
 import com.usoftchina.saas.document.service.CustomerService;
+import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.utils.BeanMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
 
+import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -86,7 +90,122 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
 
     @Override
     public DocBaseDTO saveFormData(CustomerFormDTO data) {
-        return null;
+        if (null == data || null == data.getMain()){
+            throw new BizException(500, "数据为空,请填写后再保存");
+        }
+        //公司ID
+        Long companyId = BaseContextHolder.getCompanyId();
+        //人员Id
+        Long userId = BaseContextHolder.getUserId();
+        //获取主表信息
+        CustomerDTO main = data.getMain();
+        //更新从表数据
+        List<CustomercontactDTO> items1 = data.getItems1();
+        List<CustomeraddressDTO> items2 = data.getItems2();
+        //插入从表数据
+        List<Customercontact> insertDetail1 = new ArrayList<>();
+        List<Customeraddress> insertDetail2 = new ArrayList<>();
+        //更新从表数据
+        List<Customercontact> updateDetail1 = new ArrayList<>();
+        List<Customeraddress> updateDetail2 = new ArrayList<>();
+        //返回对象
+        DocBaseDTO baseDTO = null;
+        Long cu_id = main.getId();
+        String cu_code = main.getCu_code();
+        Customer customer = BeanMapper.map(main,Customer.class);
+        customer.setCompanyId(companyId);
+        customer.setCreatorId(userId);
+        customer.setCreateTime(new Date());
+
+        //编号校验
+//        pu_code = pushMaxnubmer(pu_code, pu_id);
+        //单号赋值
+//        purchase.setPu_code(pu_code);
+        if (StringUtils.isEmpty(cu_id) || "0".equals(cu_id.toString())) {
+            //插入操作
+            getMapper().insertSelective(customer);
+            cu_id = customer.getId();
+            //添加从表传输对象
+            for (CustomercontactDTO item : items1) {
+                Customercontact detail1 = BeanMapper.map(item,Customercontact.class);
+                detail1.setCc_cuid(cu_id);
+                detail1.setCompanyId(companyId);
+                detail1.setCreatorId(userId);
+                detail1.setCreateTime(new Date());
+                insertDetail1.add(detail1);
+            }
+            //插入从表
+            if (insertDetail1.size()>0) {
+                customercontactMapper.batchInsert(insertDetail1);
+            }
+
+            for (CustomeraddressDTO item : items2) {
+                Customeraddress detail2 = BeanMapper.map(item,Customeraddress.class);
+                detail2.setCa_cuid(cu_id);
+                detail2.setCompanyId(companyId);
+                detail2.setCreatorId(userId);
+                detail2.setCreateTime(new Date());
+            }
+            //插入从表
+            if (insertDetail2.size()>0) {
+                customeraddressMapper.batchInsert(insertDetail2);
+            }
+//            baseDTO = getBaseDTOById(pu_id);
+            //日志记录
+//            messageLogService.save(baseDTO);
+            return baseDTO;
+        }
+        //更新操作
+        getMapper().updateByPrimaryKeySelective(customer);
+        //添加从表传输对象
+        for (CustomercontactDTO item : items1) {
+            Customercontact detail1 = BeanMapper.map(item,Customercontact.class);
+            detail1.setCc_cuid(cu_id);
+            detail1.setCompanyId(companyId);
+            detail1.setCreatorId(userId);
+            detail1.setCreateTime(new Date());
+            if (StringUtils.isEmpty(detail1.getId()) || "0".equals(detail1.getId().toString())) {
+                insertDetail1.add(detail1);
+            } else {
+                updateDetail1.add(detail1);
+            }
+        }
+        //插入从表
+        if (insertDetail1.size()>0) {
+            customercontactMapper.batchInsert(insertDetail1);
+        }
+        //更新从表
+        if (updateDetail1.size()>0) {
+            customercontactMapper.batchUpdate(updateDetail1);
+        }
+
+        for (CustomeraddressDTO item : items2) {
+            Customeraddress detail2 = BeanMapper.map(item,Customeraddress.class);
+            detail2.setCa_cuid(cu_id);
+            detail2.setCompanyId(companyId);
+            detail2.setCreatorId(userId);
+            detail2.setCreateTime(new Date());
+            if (StringUtils.isEmpty(detail2.getId()) || "0".equals(detail2.getId().toString())) {
+                insertDetail2.add(detail2);
+            } else {
+                updateDetail2.add(detail2);
+            }
+
+        }
+        //插入从表
+        if (insertDetail2.size()>0) {
+            customeraddressMapper.batchInsert(insertDetail2);
+        }
+        //更新从表
+        if (updateDetail2.size()>0) {
+            customeraddressMapper.batchUpdate(updateDetail2);
+        }
+
+
+        //            baseDTO = getBaseDTOById(pu_id);
+        //日志记录
+//            messageLogService.save(baseDTO);
+        return baseDTO;
     }
 
     @Override
@@ -94,6 +213,21 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
 
     }
 
+    @Override
+    public void close(long id) {
+
+    }
+
+    @Override
+    public void open(long id) {
+
+    }
+
+    @Override
+    public void batchDelete(BatchDealBaseDTO baseDTOs) {
+
+    }
+
     private List<CustomerList> getListByMode(ListReqDTO req) {
         List<CustomerList> list = null;
         Long companyId = BaseContextHolder.getCompanyId();

+ 42 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/FundinouttypeServiceImpl.java

@@ -0,0 +1,42 @@
+package com.usoftchina.saas.document.service.impl;
+
+import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.document.entities.Fundinouttype;
+import com.usoftchina.saas.document.mapper.FundinouttypeMapper;
+import com.usoftchina.saas.document.service.FundinouttypeService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class FundinouttypeServiceImpl extends CommonBaseServiceImpl<FundinouttypeMapper, Fundinouttype> implements FundinouttypeService {
+
+    /**
+     * 保存/更新
+     * @param fundinouttype
+     * @return
+     */
+    @Override
+    public boolean save(Fundinouttype fundinouttype){
+        fundinouttype.setCompanyId(BaseContextHolder.getCompanyId());
+        if(fundinouttype.getId() == 0){
+            getMapper().insertSelective(fundinouttype);
+        }else{
+            getMapper().updateByPrimaryKeySelective(fundinouttype);
+        }
+        return true;
+    }
+
+    /**
+     * 删除
+     * @param id
+     * @return
+     */
+    @Override
+    public boolean removeByPrimaryKey(Long id){
+        getMapper().deleteByPrimaryKey(id);
+        return true;
+    }
+
+}

+ 38 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductunitServiceImpl.java

@@ -0,0 +1,38 @@
+package com.usoftchina.saas.document.service.impl;
+
+import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.document.entities.Productunit;
+import com.usoftchina.saas.document.mapper.ProductunitMapper;
+import com.usoftchina.saas.document.service.ProductunitService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class ProductunitServiceImpl extends CommonBaseServiceImpl<ProductunitMapper, Productunit> implements ProductunitService {
+
+    @Override
+    public boolean save(Productunit productunit){
+        productunit.setCompanyId(BaseContextHolder.getCompanyId());
+        if(productunit.getId() == 0){
+            getMapper().insertSelective(productunit);
+        }else{
+            getMapper().updateByPrimaryKeySelective(productunit);
+        }
+        return true;
+    }
+
+    @Override
+    public boolean removeByPrimaryKey(Long id){
+        getMapper().deleteByPrimaryKey(id);
+        return true;
+    }
+
+    @Override
+    public List<Productunit> findAll(){
+        List<Productunit> productunitList = getMapper().selectAll();
+        return productunitList;
+    }
+
+}

+ 1 - 1
applications/document/document-server/src/main/resources/mapper/CustomerListMapper.xml

@@ -31,7 +31,7 @@
         ${con}
       </if>
       <if test="companyId != null">
-        and   companyid = #{companyId}
+        and   customer.companyid = #{companyId}
       </if>
     </where>  order by cu_id
   </select>

+ 16 - 39
applications/document/document-server/src/main/resources/mapper/CustomerMapper.xml

@@ -49,34 +49,13 @@
     delete from customer
     where cu_id = #{cu_id,jdbcType=INTEGER}
   </delete>
-  <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Customer">
-    insert into customer (cu_id, cu_code, cu_name, 
-      cu_uu, cu_type, cu_begindate, 
-      cu_beginaramount, cu_beginprerecamount, cu_promisedays, 
-      cu_taxrate, cu_sellerid, cu_sellercode, 
-      cu_sellername, cu_credit, cu_status, 
-      cu_statuscode, cu_recordmanid, cu_recordman, 
-      cu_recorddate, companyid, updaterid, 
-      updatetime, cu_text1, cu_text2, 
-      cu_text3, cu_text4, cu_text5, 
-      cu_leftamount, cu_recamount)
-    values (#{cu_id,jdbcType=INTEGER}, #{cu_code,jdbcType=VARCHAR}, #{cu_name,jdbcType=VARCHAR}, 
-      #{cu_uu,jdbcType=VARCHAR}, #{cu_type,jdbcType=VARCHAR}, #{cu_begindate,jdbcType=TIMESTAMP}, 
-      #{cu_beginaramount,jdbcType=DOUBLE}, #{cu_beginprerecamount,jdbcType=DOUBLE}, #{cu_promisedays,jdbcType=DOUBLE}, 
-      #{cu_taxrate,jdbcType=DOUBLE}, #{cu_sellerid,jdbcType=INTEGER}, #{cu_sellercode,jdbcType=VARCHAR}, 
-      #{cu_sellername,jdbcType=VARCHAR}, #{cu_credit,jdbcType=DOUBLE}, #{cu_status,jdbcType=VARCHAR}, 
-      #{cu_statuscode,jdbcType=VARCHAR}, #{cu_recordmanid,jdbcType=INTEGER}, #{cu_recordman,jdbcType=VARCHAR}, 
-      #{cu_recorddate,jdbcType=TIMESTAMP}, #{companyid,jdbcType=INTEGER}, #{updaterid,jdbcType=INTEGER}, 
-      #{updatetime,jdbcType=TIMESTAMP}, #{cu_text1,jdbcType=VARCHAR}, #{cu_text2,jdbcType=VARCHAR}, 
-      #{cu_text3,jdbcType=VARCHAR}, #{cu_text4,jdbcType=VARCHAR}, #{cu_text5,jdbcType=VARCHAR}, 
-      #{cu_leftamount,jdbcType=DOUBLE}, #{cu_recamount,jdbcType=DOUBLE})
-  </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Customer">
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
     insert into customer
     <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="cu_id != null">
-        cu_id,
-      </if>
+
       <if test="cu_code != null">
         cu_code,
       </if>
@@ -131,13 +110,13 @@
       <if test="cu_recorddate != null">
         cu_recorddate,
       </if>
-      <if test="companyid != null">
+      <if test="companyId != null">
         companyid,
       </if>
-      <if test="updaterid != null">
+      <if test="updaterId != null">
         updaterid,
       </if>
-      <if test="updatetime != null">
+      <if test="updateTime != null">
         updatetime,
       </if>
       <if test="cu_text1 != null">
@@ -163,9 +142,7 @@
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="cu_id != null">
-        #{cu_id,jdbcType=INTEGER},
-      </if>
+
       <if test="cu_code != null">
         #{cu_code,jdbcType=VARCHAR},
       </if>
@@ -220,14 +197,14 @@
       <if test="cu_recorddate != null">
         #{cu_recorddate,jdbcType=TIMESTAMP},
       </if>
-      <if test="companyid != null">
-        #{companyid,jdbcType=INTEGER},
+      <if test="companyId != null">
+        #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="updaterid != null">
-        #{updaterid,jdbcType=INTEGER},
+      <if test="updaterId != null">
+        #{updaterId,jdbcType=INTEGER},
       </if>
-      <if test="updatetime != null">
-        #{updatetime,jdbcType=TIMESTAMP},
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
       </if>
       <if test="cu_text1 != null">
         #{cu_text1,jdbcType=VARCHAR},
@@ -340,7 +317,7 @@
         cu_recamount = #{cu_recamount,jdbcType=DOUBLE},
       </if>
     </set>
-    where cu_id = #{cu_id,jdbcType=INTEGER}
+    where cu_id = #{id,jdbcType=INTEGER}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Customer">
     update customer
@@ -372,6 +349,6 @@
       cu_text5 = #{cu_text5,jdbcType=VARCHAR},
       cu_leftamount = #{cu_leftamount,jdbcType=DOUBLE},
       cu_recamount = #{cu_recamount,jdbcType=DOUBLE}
-    where cu_id = #{cu_id,jdbcType=INTEGER}
+    where cu_id = #{id,jdbcType=INTEGER}
   </update>
 </mapper>

+ 173 - 59
applications/document/document-server/src/main/resources/mapper/CustomeraddressMapper.xml

@@ -37,26 +37,13 @@
     delete from customeraddress
     where ca_id = #{ca_id,jdbcType=INTEGER}
   </delete>
-  <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Customeraddress">
-    insert into customeraddress (ca_id, ca_cuid, ca_detno, 
-      ca_person, ca_phone, ca_default, 
-      companyid, updaterid, updatetime, 
-      ca_text1, ca_text2, ca_text3, 
-      ca_text4, ca_text5, ca_address
-      )
-    values (#{ca_id,jdbcType=INTEGER}, #{ca_cuid,jdbcType=INTEGER}, #{ca_detno,jdbcType=INTEGER}, 
-      #{ca_person,jdbcType=VARCHAR}, #{ca_phone,jdbcType=INTEGER}, #{ca_default,jdbcType=INTEGER}, 
-      #{companyid,jdbcType=INTEGER}, #{updaterid,jdbcType=INTEGER}, #{updatetime,jdbcType=TIMESTAMP}, 
-      #{ca_text1,jdbcType=VARCHAR}, #{ca_text2,jdbcType=VARCHAR}, #{ca_text3,jdbcType=VARCHAR}, 
-      #{ca_text4,jdbcType=VARCHAR}, #{ca_text5,jdbcType=VARCHAR}, #{ca_address,jdbcType=LONGVARCHAR}
-      )
-  </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Customeraddress">
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
     insert into customeraddress
     <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="ca_id != null">
-        ca_id,
-      </if>
+
       <if test="ca_cuid != null">
         ca_cuid,
       </if>
@@ -72,13 +59,13 @@
       <if test="ca_default != null">
         ca_default,
       </if>
-      <if test="companyid != null">
+      <if test="companyId != null">
         companyid,
       </if>
-      <if test="updaterid != null">
+      <if test="updaterId != null">
         updaterid,
       </if>
-      <if test="updatetime != null">
+      <if test="updateTime != null">
         updatetime,
       </if>
       <if test="ca_text1 != null">
@@ -101,9 +88,7 @@
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="ca_id != null">
-        #{ca_id,jdbcType=INTEGER},
-      </if>
+
       <if test="ca_cuid != null">
         #{ca_cuid,jdbcType=INTEGER},
       </if>
@@ -119,14 +104,14 @@
       <if test="ca_default != null">
         #{ca_default,jdbcType=INTEGER},
       </if>
-      <if test="companyid != null">
-        #{companyid,jdbcType=INTEGER},
+      <if test="companyId != null">
+        #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="updaterid != null">
-        #{updaterid,jdbcType=INTEGER},
+      <if test="updaterId != null">
+        #{updaterId,jdbcType=INTEGER},
       </if>
-      <if test="updatetime != null">
-        #{updatetime,jdbcType=TIMESTAMP},
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
       </if>
       <if test="ca_text1 != null">
         #{ca_text1,jdbcType=VARCHAR},
@@ -151,8 +136,8 @@
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Customeraddress">
     update customeraddress
     <set>
-      <if test="ca_cuid != null">
-        ca_cuid = #{ca_cuid,jdbcType=INTEGER},
+      <if test="id != null">
+        ca_cuid = #{id,jdbcType=INTEGER},
       </if>
       <if test="ca_detno != null">
         ca_detno = #{ca_detno,jdbcType=INTEGER},
@@ -166,14 +151,14 @@
       <if test="ca_default != null">
         ca_default = #{ca_default,jdbcType=INTEGER},
       </if>
-      <if test="companyid != null">
-        companyid = #{companyid,jdbcType=INTEGER},
+      <if test="companyId != null">
+        companyid = #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="updaterid != null">
-        updaterid = #{updaterid,jdbcType=INTEGER},
+      <if test="updaterId != null">
+        updaterid = #{updaterId,jdbcType=INTEGER},
       </if>
-      <if test="updatetime != null">
-        updatetime = #{updatetime,jdbcType=TIMESTAMP},
+      <if test="updateTime != null">
+        updatetime = #{updateTime,jdbcType=TIMESTAMP},
       </if>
       <if test="ca_text1 != null">
         ca_text1 = #{ca_text1,jdbcType=VARCHAR},
@@ -194,7 +179,7 @@
         ca_address = #{ca_address,jdbcType=LONGVARCHAR},
       </if>
     </set>
-    where ca_id = #{ca_id,jdbcType=INTEGER}
+    where ca_id = #{id,jdbcType=INTEGER}
   </update>
   <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.saas.document.entities.Customeraddress">
     update customeraddress
@@ -203,35 +188,19 @@
       ca_person = #{ca_person,jdbcType=VARCHAR},
       ca_phone = #{ca_phone,jdbcType=INTEGER},
       ca_default = #{ca_default,jdbcType=INTEGER},
-      companyid = #{companyid,jdbcType=INTEGER},
-      updaterid = #{updaterid,jdbcType=INTEGER},
-      updatetime = #{updatetime,jdbcType=TIMESTAMP},
+      companyid = #{companyId,jdbcType=INTEGER},
+      updaterid = #{updaterId,jdbcType=INTEGER},
+      updatetime = #{updateTime,jdbcType=TIMESTAMP},
       ca_text1 = #{ca_text1,jdbcType=VARCHAR},
       ca_text2 = #{ca_text2,jdbcType=VARCHAR},
       ca_text3 = #{ca_text3,jdbcType=VARCHAR},
       ca_text4 = #{ca_text4,jdbcType=VARCHAR},
       ca_text5 = #{ca_text5,jdbcType=VARCHAR},
       ca_address = #{ca_address,jdbcType=LONGVARCHAR}
-    where ca_id = #{ca_id,jdbcType=INTEGER}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Customeraddress">
-    update customeraddress
-    set ca_cuid = #{ca_cuid,jdbcType=INTEGER},
-      ca_detno = #{ca_detno,jdbcType=INTEGER},
-      ca_person = #{ca_person,jdbcType=VARCHAR},
-      ca_phone = #{ca_phone,jdbcType=INTEGER},
-      ca_default = #{ca_default,jdbcType=INTEGER},
-      companyid = #{companyid,jdbcType=INTEGER},
-      updaterid = #{updaterid,jdbcType=INTEGER},
-      updatetime = #{updatetime,jdbcType=TIMESTAMP},
-      ca_text1 = #{ca_text1,jdbcType=VARCHAR},
-      ca_text2 = #{ca_text2,jdbcType=VARCHAR},
-      ca_text3 = #{ca_text3,jdbcType=VARCHAR},
-      ca_text4 = #{ca_text4,jdbcType=VARCHAR},
-      ca_text5 = #{ca_text5,jdbcType=VARCHAR}
-    where ca_id = #{ca_id,jdbcType=INTEGER}
+    where ca_id = #{id,jdbcType=INTEGER}
   </update>
 
+
   <select id="selectByFK" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
     select
     <include refid="Base_Column_List" />
@@ -241,5 +210,150 @@
     where ca_cuid = #{fk_i,jdbcType=INTEGER}
   </select>
 
+  <insert id="batchInsert" parameterType="java.util.List" >
+    <foreach collection="list" item="item" index="index" open="" close="" separator=",">
+      insert into customeraddress
+      <trim prefix="(" suffix=")" suffixOverrides=",">
+
+        <if test="item.ca_cuid != null">
+          ca_cuid,
+        </if>
+        <if test="item.ca_detno != null">
+          ca_detno,
+        </if>
+        <if test="item.ca_person != null">
+          ca_person,
+        </if>
+        <if test="item.ca_phone != null">
+          ca_phone,
+        </if>
+        <if test="item.ca_default != null">
+          ca_default,
+        </if>
+        <if test="item.companyId != null">
+          companyid,
+        </if>
+        <if test="item.updaterId != null">
+          updaterid,
+        </if>
+        <if test="item.updateTime != null">
+          updatetime,
+        </if>
+        <if test="item.ca_text1 != null">
+          ca_text1,
+        </if>
+        <if test="item.ca_text2 != null">
+          ca_text2,
+        </if>
+        <if test="item.ca_text3 != null">
+          ca_text3,
+        </if>
+        <if test="item.ca_text4 != null">
+          ca_text4,
+        </if>
+        <if test="item.ca_text5 != null">
+          ca_text5,
+        </if>
+        <if test="item.ca_address != null">
+          ca_address,
+        </if>
+      </trim>
+      <trim prefix="values (" suffix=")" suffixOverrides=",">
+
+        <if test="item.ca_cuid != null">
+          #{item.ca_cuid,jdbcType=INTEGER},
+        </if>
+        <if test="item.ca_detno != null">
+          #{item.ca_detno,jdbcType=INTEGER},
+        </if>
+        <if test="item.ca_person != null">
+          #{item.ca_person,jdbcType=VARCHAR},
+        </if>
+        <if test="item.ca_phone != null">
+          #{item.ca_phone,jdbcType=INTEGER},
+        </if>
+        <if test="item.ca_default != null">
+          #{item.ca_default,jdbcType=INTEGER},
+        </if>
+        <if test="item.companyId != null">
+          #{item.companyId,jdbcType=INTEGER},
+        </if>
+        <if test="item.updaterId != null">
+          #{item.updaterId,jdbcType=INTEGER},
+        </if>
+        <if test="item.updateTime != null">
+          #{item.updateTime,jdbcType=TIMESTAMP},
+        </if>
+        <if test="item.ca_text1 != null">
+          #{item.ca_text1,jdbcType=VARCHAR},
+        </if>
+        <if test="item.ca_text2 != null">
+          #{item.ca_text2,jdbcType=VARCHAR},
+        </if>
+        <if test="item.ca_text3 != null">
+          #{item.ca_text3,jdbcType=VARCHAR},
+        </if>
+        <if test="item.ca_text4 != null">
+          #{item.ca_text4,jdbcType=VARCHAR},
+        </if>
+        <if test="item.ca_text5 != null">
+          #{item.ca_text5,jdbcType=VARCHAR},
+        </if>
+        <if test="item.ca_address != null">
+          #{item.ca_address,jdbcType=LONGVARCHAR},
+        </if>
+      </trim>
+    </foreach>
+  </insert>
+
+
+  <update id="batchUpdate" parameterType="com.usoftchina.saas.document.entities.Customeraddress" >
+    <foreach collection="list" item="item" index="index" open="" close="" separator=";">
+      update customeraddress
+      <set>
+        <if test="item.ca_detno != null">
+          ca_detno = #{item.ca_detno,jdbcType=INTEGER},
+        </if>
+        <if test="item.ca_person != null">
+          ca_person = #{item.ca_person,jdbcType=VARCHAR},
+        </if>
+        <if test="item.ca_phone != null">
+          ca_phone = #{item.ca_phone,jdbcType=INTEGER},
+        </if>
+        <if test="item.ca_default != null">
+          ca_default = #{item.ca_default,jdbcType=INTEGER},
+        </if>
+        <if test="item.companyId != null">
+          companyid = #{item.companyId,jdbcType=INTEGER},
+        </if>
+        <if test="item.updaterId != null">
+          updaterid = #{item.updaterId,jdbcType=INTEGER},
+        </if>
+        <if test="item.updateTime != null">
+          updatetime = #{item.updateTime,jdbcType=TIMESTAMP},
+        </if>
+        <if test="item.ca_text1 != null">
+          ca_text1 = #{item.ca_text1,jdbcType=VARCHAR},
+        </if>
+        <if test="item.ca_text2 != null">
+          ca_text2 = #{item.ca_text2,jdbcType=VARCHAR},
+        </if>
+        <if test="item.ca_text3 != null">
+          ca_text3 = #{item.ca_text3,jdbcType=VARCHAR},
+        </if>
+        <if test="item.ca_text4 != null">
+          ca_text4 = #{item.ca_text4,jdbcType=VARCHAR},
+        </if>
+        <if test="item.ca_text5 != null">
+          ca_text5 = #{item.ca_text5,jdbcType=VARCHAR},
+        </if>
+        <if test="item.ca_address != null">
+          ca_address = #{item.ca_address,jdbcType=LONGVARCHAR},
+        </if>
+      </set>
+      where ca_id = #{item.id,jdbcType=INTEGER}
+    </foreach>
+  </update>
+
 
 </mapper>

+ 136 - 55
applications/document/document-server/src/main/resources/mapper/CustomercontactMapper.xml

@@ -32,26 +32,13 @@
     delete from customercontact
     where cc_id = #{cc_id,jdbcType=INTEGER}
   </delete>
-  <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Customercontact">
-    insert into customercontact (cc_id, cc_cuid, cc_detno, 
-      cc_name, cc_tel, cc_qq, 
-      cc_email, companyid, updaterid, 
-      updatetime, cc_text1, cc_text2, 
-      cc_text3, cc_text4, cc_text5
-      )
-    values (#{cc_id,jdbcType=INTEGER}, #{cc_cuid,jdbcType=INTEGER}, #{cc_detno,jdbcType=INTEGER}, 
-      #{cc_name,jdbcType=VARCHAR}, #{cc_tel,jdbcType=INTEGER}, #{cc_qq,jdbcType=VARCHAR}, 
-      #{cc_email,jdbcType=VARCHAR}, #{companyid,jdbcType=INTEGER}, #{updaterid,jdbcType=INTEGER}, 
-      #{updatetime,jdbcType=TIMESTAMP}, #{cc_text1,jdbcType=VARCHAR}, #{cc_text2,jdbcType=VARCHAR}, 
-      #{cc_text3,jdbcType=VARCHAR}, #{cc_text4,jdbcType=VARCHAR}, #{cc_text5,jdbcType=VARCHAR}
-      )
-  </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Customercontact">
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
     insert into customercontact
     <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="cc_id != null">
-        cc_id,
-      </if>
+
       <if test="cc_cuid != null">
         cc_cuid,
       </if>
@@ -70,13 +57,13 @@
       <if test="cc_email != null">
         cc_email,
       </if>
-      <if test="companyid != null">
+      <if test="companyId != null">
         companyid,
       </if>
-      <if test="updaterid != null">
+      <if test="updaterId != null">
         updaterid,
       </if>
-      <if test="updatetime != null">
+      <if test="updateTime != null">
         updatetime,
       </if>
       <if test="cc_text1 != null">
@@ -96,9 +83,7 @@
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="cc_id != null">
-        #{cc_id,jdbcType=INTEGER},
-      </if>
+
       <if test="cc_cuid != null">
         #{cc_cuid,jdbcType=INTEGER},
       </if>
@@ -117,14 +102,14 @@
       <if test="cc_email != null">
         #{cc_email,jdbcType=VARCHAR},
       </if>
-      <if test="companyid != null">
-        #{companyid,jdbcType=INTEGER},
+      <if test="companyId != null">
+        #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="updaterid != null">
-        #{updaterid,jdbcType=INTEGER},
+      <if test="updaterId != null">
+        #{updaterId,jdbcType=INTEGER},
       </if>
-      <if test="updatetime != null">
-        #{updatetime,jdbcType=TIMESTAMP},
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
       </if>
       <if test="cc_text1 != null">
         #{cc_text1,jdbcType=VARCHAR},
@@ -164,14 +149,14 @@
       <if test="cc_email != null">
         cc_email = #{cc_email,jdbcType=VARCHAR},
       </if>
-      <if test="companyid != null">
-        companyid = #{companyid,jdbcType=INTEGER},
+      <if test="companyId != null">
+        companyid = #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="updaterid != null">
-        updaterid = #{updaterid,jdbcType=INTEGER},
+      <if test="updaterId != null">
+        updaterid = #{updaterId,jdbcType=INTEGER},
       </if>
-      <if test="updatetime != null">
-        updatetime = #{updatetime,jdbcType=TIMESTAMP},
+      <if test="updateTime != null">
+        updatetime = #{updateTime,jdbcType=TIMESTAMP},
       </if>
       <if test="cc_text1 != null">
         cc_text1 = #{cc_text1,jdbcType=VARCHAR},
@@ -189,27 +174,8 @@
         cc_text5 = #{cc_text5,jdbcType=VARCHAR},
       </if>
     </set>
-    where cc_id = #{cc_id,jdbcType=INTEGER}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Customercontact">
-    update customercontact
-    set cc_cuid = #{cc_cuid,jdbcType=INTEGER},
-      cc_detno = #{cc_detno,jdbcType=INTEGER},
-      cc_name = #{cc_name,jdbcType=VARCHAR},
-      cc_tel = #{cc_tel,jdbcType=INTEGER},
-      cc_qq = #{cc_qq,jdbcType=VARCHAR},
-      cc_email = #{cc_email,jdbcType=VARCHAR},
-      companyid = #{companyid,jdbcType=INTEGER},
-      updaterid = #{updaterid,jdbcType=INTEGER},
-      updatetime = #{updatetime,jdbcType=TIMESTAMP},
-      cc_text1 = #{cc_text1,jdbcType=VARCHAR},
-      cc_text2 = #{cc_text2,jdbcType=VARCHAR},
-      cc_text3 = #{cc_text3,jdbcType=VARCHAR},
-      cc_text4 = #{cc_text4,jdbcType=VARCHAR},
-      cc_text5 = #{cc_text5,jdbcType=VARCHAR}
-    where cc_id = #{cc_id,jdbcType=INTEGER}
+    where cc_id = #{id,jdbcType=INTEGER}
   </update>
-
   <select id="selectByFK" parameterType="java.lang.Long" resultMap="BaseResultMap">
     select
     <include refid="Base_Column_List" />
@@ -217,6 +183,121 @@
     where cc_cuid = #{fk_i,jdbcType=INTEGER}
   </select>
 
+  <insert id="batchInsert" parameterType="java.util.List" >
+    <foreach collection="list" item="item" index="index" open="" close="" separator=",">
+      insert into customercontact
+      <trim prefix="(" suffix=")" suffixOverrides=",">
+        <if test="item.cc_cuid != null">
+          cc_cuid,
+        </if>
+        <if test="item.cc_detno != null">
+          cc_detno,
+        </if>
+        <if test="item.cc_name != null">
+          cc_name,
+        </if>
+        <if test="item.cc_tel != null">
+          cc_tel,
+        </if>
+        <if test="item.cc_qq != null">
+          cc_qq,
+        </if>
+        <if test="item.cc_email != null">
+          cc_email,
+        </if>
+        <if test="item.companyId != null">
+          companyid,
+        </if>
+        <if test="item.updaterId != null">
+          updaterid,
+        </if>
+        <if test="item.updateTime != null">
+          updatetime
+        </if>
+      </trim>
+      <trim prefix="values (" suffix=")" suffixOverrides=",">
+        <if test="item.cc_cuid != null">
+          #{item.cc_cuid,jdbcType=INTEGER},
+        </if>
+        <if test="item.cc_detno != null">
+          #{item.cc_detno,jdbcType=INTEGER},
+        </if>
+        <if test="item.cc_name != null">
+          #{item.cc_name,jdbcType=VARCHAR},
+        </if>
+        <if test="item.cc_tel != null">
+          #{item.cc_tel,jdbcType=INTEGER},
+        </if>
+        <if test="item.cc_qq != null">
+          #{item.cc_qq,jdbcType=VARCHAR},
+        </if>
+        <if test="item.cc_email != null">
+          #{item.cc_email,jdbcType=VARCHAR},
+        </if>
+        <if test="item.companyId != null">
+          #{item.companyId,jdbcType=INTEGER},
+        </if>
+        <if test="item.updaterId != null">
+          #{item.updaterId,jdbcType=INTEGER},
+        </if>
+        <if test="item.updatetime != null">
+          #{item.updateTime,jdbcType=TIMESTAMP},
+        </if>
+      </trim>
+    </foreach>
+  </insert>
+
+
+  <update id="batchUpdate" parameterType="com.usoftchina.saas.document.entities.Customercontact" >
+    <foreach collection="list" item="item" index="index" open="" close="" separator=";">
+      update customercontact
+      <set>
+        <if test="item.cc_cuid != null">
+          cc_cuid = #{item.cc_cuid,jdbcType=INTEGER},
+        </if>
+        <if test="item.cc_detno != null">
+          cc_detno = #{item.cc_detno,jdbcType=INTEGER},
+        </if>
+        <if test="item.cc_name != null">
+          cc_name = #{item.cc_name,jdbcType=VARCHAR},
+        </if>
+        <if test="item.cc_tel != null">
+          cc_tel = #{item.cc_tel,jdbcType=INTEGER},
+        </if>
+        <if test="item.cc_qq != null">
+          cc_qq = #{item.cc_qq,jdbcType=VARCHAR},
+        </if>
+        <if test="item.cc_email != null">
+          cc_email = #{item.cc_email,jdbcType=VARCHAR},
+        </if>
+        <if test="item.companyId != null">
+          companyid = #{item.companyId,jdbcType=INTEGER},
+        </if>
+        <if test="item.updaterId != null">
+          updaterid = #{item.updaterId,jdbcType=INTEGER},
+        </if>
+        <if test="item.updateTime != null">
+          updatetime = #{item.updateTime,jdbcType=TIMESTAMP},
+        </if>
+        <if test="item.cc_text1 != null">
+          cc_text1 = #{item.cc_text1,jdbcType=VARCHAR},
+        </if>
+        <if test="item.cc_text2 != null">
+          cc_text2 = #{item.cc_text2,jdbcType=VARCHAR},
+        </if>
+        <if test="item.cc_text3 != null">
+          cc_text3 = #{item.cc_text3,jdbcType=VARCHAR},
+        </if>
+        <if test="item.cc_text4 != null">
+          cc_text4 = #{item.cc_text4,jdbcType=VARCHAR},
+        </if>
+        <if test="item.cc_text5 != null">
+          cc_text5 = #{item.cc_text5,jdbcType=VARCHAR},
+        </if>
+      </set>
+      where cc_id = #{item.id,jdbcType=INTEGER}
+    </foreach>
+  </update>
 
 
 </mapper>

+ 139 - 0
applications/document/document-server/src/main/resources/mapper/FundinouttypeMapper.xml

@@ -0,0 +1,139 @@
+<?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.document.mapper.FundinouttypeMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Fundinouttype" >
+    <id column="ft_id" property="id" jdbcType="INTEGER" />
+    <result column="ft_name" property="ft_name" jdbcType="VARCHAR" />
+    <result column="ft_kind" property="ft_kind" jdbcType="VARCHAR" />
+    <result column="ft_recordid" property="ft_recordid" jdbcType="INTEGER" />
+    <result column="ft_recorder" property="ft_recorder" jdbcType="VARCHAR" />
+    <result column="ft_date" property="ft_date" jdbcType="TIMESTAMP" />
+    <result column="companyId" property="companyId" jdbcType="INTEGER" />
+    <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
+    <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    ft_id, ft_name, ft_kind, ft_recordid, ft_recorder, ft_date, companyId, updaterId, 
+    updateTime
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
+    select 
+    <include refid="Base_Column_List" />
+    from fundinouttype
+    where ft_id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+    delete from fundinouttype
+    where ft_id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Fundinouttype" >
+    insert into fundinouttype (ft_name, ft_kind,
+      ft_recordid, ft_recorder, ft_date, 
+      companyId, updaterId, updateTime
+      )
+    values (#{ft_name,jdbcType=VARCHAR}, #{ft_kind,jdbcType=VARCHAR},
+      #{ft_recordid,jdbcType=INTEGER}, #{ft_recorder,jdbcType=VARCHAR}, #{ft_date,jdbcType=TIMESTAMP}, 
+      #{companyId,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Fundinouttype" >
+    insert into fundinouttype
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="ft_name != null" >
+        ft_name,
+      </if>
+      <if test="ft_kind != null" >
+        ft_kind,
+      </if>
+      <if test="ft_recordid != null" >
+        ft_recordid,
+      </if>
+      <if test="ft_recorder != null" >
+        ft_recorder,
+      </if>
+      <if test="ft_date != null" >
+        ft_date,
+      </if>
+      <if test="companyId != null" >
+        companyId,
+      </if>
+      <if test="updaterId != null" >
+        updaterId,
+      </if>
+      <if test="updateTime != null" >
+        updateTime,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="ft_name != null" >
+        #{ft_name,jdbcType=VARCHAR},
+      </if>
+      <if test="ft_kind != null" >
+        #{ft_kind,jdbcType=VARCHAR},
+      </if>
+      <if test="ft_recordid != null" >
+        #{ft_recordid,jdbcType=INTEGER},
+      </if>
+      <if test="ft_recorder != null" >
+        #{ft_recorder,jdbcType=VARCHAR},
+      </if>
+      <if test="ft_date != null" >
+        #{ft_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="companyId != null" >
+        #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null" >
+        #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null" >
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Fundinouttype" >
+    update fundinouttype
+    <set >
+      <if test="ft_name != null" >
+        ft_name = #{ft_name,jdbcType=VARCHAR},
+      </if>
+      <if test="ft_kind != null" >
+        ft_kind = #{ft_kind,jdbcType=VARCHAR},
+      </if>
+      <if test="ft_recordid != null" >
+        ft_recordid = #{ft_recordid,jdbcType=INTEGER},
+      </if>
+      <if test="ft_recorder != null" >
+        ft_recorder = #{ft_recorder,jdbcType=VARCHAR},
+      </if>
+      <if test="ft_date != null" >
+        ft_date = #{ft_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="companyId != null" >
+        companyId = #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null" >
+        updaterId = #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null" >
+        updateTime = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where ft_id = #{id}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Fundinouttype" >
+    update fundinouttype
+    set ft_name = #{ft_name,jdbcType=VARCHAR},
+      ft_kind = #{ft_kind,jdbcType=VARCHAR},
+      ft_recordid = #{ft_recordid,jdbcType=INTEGER},
+      ft_recorder = #{ft_recorder,jdbcType=VARCHAR},
+      ft_date = #{ft_date,jdbcType=TIMESTAMP},
+      companyId = #{companyId,jdbcType=INTEGER},
+      updaterId = #{updaterId,jdbcType=INTEGER},
+      updateTime = #{updateTime,jdbcType=TIMESTAMP}
+    where ft_id = #{id,jdbcType=INTEGER}
+  </update>
+  <select id="selectAll" resultMap="BaseResultMap">
+    SELECT * FROM FUNDINOUTTYPE
+  </select>
+</mapper>

+ 1 - 1
applications/document/document-server/src/main/resources/mapper/ProductbrandMapper.xml

@@ -13,7 +13,7 @@
   </resultMap>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
     select 
-    <include refid="Base_Column_List" />
+    *
     from productbrand
     where pb_id = #{id}
   </select>

+ 125 - 0
applications/document/document-server/src/main/resources/mapper/ProductunitMapper.xml

@@ -0,0 +1,125 @@
+<?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.document.mapper.ProductunitMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Productunit" >
+    <id column="pu_id" property="id" jdbcType="INTEGER" />
+    <result column="pu_name" property="pu_name" jdbcType="VARCHAR" />
+    <result column="pu_recordid" property="pu_recordid" jdbcType="INTEGER" />
+    <result column="pu_recorder" property="pu_recorder" jdbcType="VARCHAR" />
+    <result column="pu_date" property="pu_date" jdbcType="TIMESTAMP" />
+    <result column="companyId" property="companyId" jdbcType="INTEGER" />
+    <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
+    <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    pu_id, pu_name, pu_recordid, pu_recorder, pu_date, companyId, updaterId, updateTime
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
+    select 
+    <include refid="Base_Column_List" />
+    from productunit
+    where pu_id = #{id}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+    delete from productunit
+    where pu_id = #{id}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Productunit" >
+    insert into productunit (pu_name, pu_recordid,
+      pu_recorder, pu_date, companyId, 
+      updaterId, updateTime)
+    values (#{pu_name,jdbcType=VARCHAR}, #{pu_recordid,jdbcType=INTEGER},
+      #{pu_recorder,jdbcType=VARCHAR}, #{pu_date,jdbcType=TIMESTAMP}, #{companyId,jdbcType=INTEGER}, 
+      #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Productunit" >
+    insert into productunit
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="pu_name != null" >
+        pu_name,
+      </if>
+      <if test="pu_recordid != null" >
+        pu_recordid,
+      </if>
+      <if test="pu_recorder != null" >
+        pu_recorder,
+      </if>
+      <if test="pu_date != null" >
+        pu_date,
+      </if>
+      <if test="companyId != null" >
+        companyId,
+      </if>
+      <if test="updaterId != null" >
+        updaterId,
+      </if>
+      <if test="updateTime != null" >
+        updateTime,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="pu_name != null" >
+        #{pu_name,jdbcType=VARCHAR},
+      </if>
+      <if test="pu_recordid != null" >
+        #{pu_recordid,jdbcType=INTEGER},
+      </if>
+      <if test="pu_recorder != null" >
+        #{pu_recorder,jdbcType=VARCHAR},
+      </if>
+      <if test="pu_date != null" >
+        #{pu_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="companyId != null" >
+        #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null" >
+        #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null" >
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Productunit" >
+    update productunit
+    <set >
+      <if test="pu_name != null" >
+        pu_name = #{pu_name,jdbcType=VARCHAR},
+      </if>
+      <if test="pu_recordid != null" >
+        pu_recordid = #{pu_recordid,jdbcType=INTEGER},
+      </if>
+      <if test="pu_recorder != null" >
+        pu_recorder = #{pu_recorder,jdbcType=VARCHAR},
+      </if>
+      <if test="pu_date != null" >
+        pu_date = #{pu_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="companyId != null" >
+        companyId = #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null" >
+        updaterId = #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null" >
+        updateTime = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where pu_id = #{id}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Productunit" >
+    update productunit
+    set pu_name = #{pu_name,jdbcType=VARCHAR},
+      pu_recordid = #{pu_recordid,jdbcType=INTEGER},
+      pu_recorder = #{pu_recorder,jdbcType=VARCHAR},
+      pu_date = #{pu_date,jdbcType=TIMESTAMP},
+      companyId = #{companyId,jdbcType=INTEGER},
+      updaterId = #{updaterId,jdbcType=INTEGER},
+      updateTime = #{updateTime,jdbcType=TIMESTAMP}
+    where pu_id = #{id}
+  </update>
+  <select id="selectAll" resultMap="BaseResultMap">
+    SELECT * FROM PRODUCTUNIT
+  </select>
+</mapper>

+ 206 - 0
applications/document/document-server/src/main/resources/mapper/VendorcontactMapper.xml

@@ -0,0 +1,206 @@
+<?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.document.mapper.VendorcontactMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Vendorcontact" >
+    <id column="vc_id" property="id" jdbcType="INTEGER" />
+    <result column="vc_veid" property="vc_veid" jdbcType="INTEGER" />
+    <result column="vc_detno" property="vc_detno" jdbcType="INTEGER" />
+    <result column="vc_name" property="vc_name" jdbcType="VARCHAR" />
+    <result column="vc_tel" property="vc_tel" jdbcType="INTEGER" />
+    <result column="vc_qq" property="vc_qq" jdbcType="VARCHAR" />
+    <result column="vc_email" property="vc_email" jdbcType="VARCHAR" />
+    <result column="companyId" property="companyId" jdbcType="INTEGER" />
+    <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
+    <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+    <result column="ve_text1" property="ve_text1" jdbcType="VARCHAR" />
+    <result column="ve_text2" property="ve_text2" jdbcType="VARCHAR" />
+    <result column="ve_text3" property="ve_text3" jdbcType="VARCHAR" />
+    <result column="ve_text4" property="ve_text4" jdbcType="VARCHAR" />
+    <result column="ve_text5" property="ve_text5" jdbcType="VARCHAR" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    vc_id, vc_veid, vc_detno, vc_name, vc_tel, vc_qq, vc_email, companyId, updaterId, 
+    updateTime, ve_text1, ve_text2, ve_text3, ve_text4, ve_text5
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
+    select 
+    <include refid="Base_Column_List" />
+    from vendorcontact
+    where vc_id = #{id}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+    delete from vendorcontact
+    where vc_id = #{id}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Vendorcontact" >
+    insert into vendorcontact (vc_veid, vc_detno,
+      vc_name, vc_tel, vc_qq, 
+      vc_email, companyId, updaterId, 
+      updateTime, ve_text1, ve_text2, 
+      ve_text3, ve_text4, ve_text5
+      )
+    values (#{vc_veid,jdbcType=INTEGER}, #{vc_detno,jdbcType=INTEGER},
+      #{vc_name,jdbcType=VARCHAR}, #{vc_tel,jdbcType=INTEGER}, #{vc_qq,jdbcType=VARCHAR}, 
+      #{vc_email,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER}, 
+      #{updateTime,jdbcType=TIMESTAMP}, #{ve_text1,jdbcType=VARCHAR}, #{ve_text2,jdbcType=VARCHAR}, 
+      #{ve_text3,jdbcType=VARCHAR}, #{ve_text4,jdbcType=VARCHAR}, #{ve_text5,jdbcType=VARCHAR}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Vendorcontact" >
+    insert into vendorcontact
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="vc_veid != null" >
+        vc_veid,
+      </if>
+      <if test="vc_detno != null" >
+        vc_detno,
+      </if>
+      <if test="vc_name != null" >
+        vc_name,
+      </if>
+      <if test="vc_tel != null" >
+        vc_tel,
+      </if>
+      <if test="vc_qq != null" >
+        vc_qq,
+      </if>
+      <if test="vc_email != null" >
+        vc_email,
+      </if>
+      <if test="companyId != null" >
+        companyId,
+      </if>
+      <if test="updaterId != null" >
+        updaterId,
+      </if>
+      <if test="updateTime != null" >
+        updateTime,
+      </if>
+      <if test="ve_text1 != null" >
+        ve_text1,
+      </if>
+      <if test="ve_text2 != null" >
+        ve_text2,
+      </if>
+      <if test="ve_text3 != null" >
+        ve_text3,
+      </if>
+      <if test="ve_text4 != null" >
+        ve_text4,
+      </if>
+      <if test="ve_text5 != null" >
+        ve_text5,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="vc_veid != null" >
+        #{vc_veid,jdbcType=INTEGER},
+      </if>
+      <if test="vc_detno != null" >
+        #{vc_detno,jdbcType=INTEGER},
+      </if>
+      <if test="vc_name != null" >
+        #{vc_name,jdbcType=VARCHAR},
+      </if>
+      <if test="vc_tel != null" >
+        #{vc_tel,jdbcType=INTEGER},
+      </if>
+      <if test="vc_qq != null" >
+        #{vc_qq,jdbcType=VARCHAR},
+      </if>
+      <if test="vc_email != null" >
+        #{vc_email,jdbcType=VARCHAR},
+      </if>
+      <if test="companyId != null" >
+        #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null" >
+        #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null" >
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="ve_text1 != null" >
+        #{ve_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_text2 != null" >
+        #{ve_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_text3 != null" >
+        #{ve_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_text4 != null" >
+        #{ve_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_text5 != null" >
+        #{ve_text5,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Vendorcontact" >
+    update vendorcontact
+    <set >
+      <if test="vc_veid != null" >
+        vc_veid = #{vc_veid,jdbcType=INTEGER},
+      </if>
+      <if test="vc_detno != null" >
+        vc_detno = #{vc_detno,jdbcType=INTEGER},
+      </if>
+      <if test="vc_name != null" >
+        vc_name = #{vc_name,jdbcType=VARCHAR},
+      </if>
+      <if test="vc_tel != null" >
+        vc_tel = #{vc_tel,jdbcType=INTEGER},
+      </if>
+      <if test="vc_qq != null" >
+        vc_qq = #{vc_qq,jdbcType=VARCHAR},
+      </if>
+      <if test="vc_email != null" >
+        vc_email = #{vc_email,jdbcType=VARCHAR},
+      </if>
+      <if test="companyId != null" >
+        companyId = #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null" >
+        updaterId = #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null" >
+        updateTime = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="ve_text1 != null" >
+        ve_text1 = #{ve_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_text2 != null" >
+        ve_text2 = #{ve_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_text3 != null" >
+        ve_text3 = #{ve_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_text4 != null" >
+        ve_text4 = #{ve_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_text5 != null" >
+        ve_text5 = #{ve_text5,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where vc_id = #{id}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Vendorcontact" >
+    update vendorcontact
+    set vc_veid = #{vc_veid,jdbcType=INTEGER},
+      vc_detno = #{vc_detno,jdbcType=INTEGER},
+      vc_name = #{vc_name,jdbcType=VARCHAR},
+      vc_tel = #{vc_tel,jdbcType=INTEGER},
+      vc_qq = #{vc_qq,jdbcType=VARCHAR},
+      vc_email = #{vc_email,jdbcType=VARCHAR},
+      companyId = #{companyId,jdbcType=INTEGER},
+      updaterId = #{updaterId,jdbcType=INTEGER},
+      updateTime = #{updateTime,jdbcType=TIMESTAMP},
+      ve_text1 = #{ve_text1,jdbcType=VARCHAR},
+      ve_text2 = #{ve_text2,jdbcType=VARCHAR},
+      ve_text3 = #{ve_text3,jdbcType=VARCHAR},
+      ve_text4 = #{ve_text4,jdbcType=VARCHAR},
+      ve_text5 = #{ve_text5,jdbcType=VARCHAR}
+    where vc_id = #{id}
+  </update>
+</mapper>

+ 66 - 0
applications/document/document-server/src/test/java/com/usoftchina/saas/document/mapper/CustomeraddressMapperTest.java

@@ -0,0 +1,66 @@
+package com.usoftchina.saas.document.mapper;
+
+import com.usoftchina.saas.document.DocumentApplication;
+import com.usoftchina.saas.document.entities.Customeraddress;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by zdw
+ * 2018-10-24 15:16.
+ */
+@RunWith(SpringJUnit4ClassRunner.class)
+@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = DocumentApplication.class)
+@EnableAutoConfiguration
+public class CustomeraddressMapperTest {
+    @Autowired
+    private CustomeraddressMapper customeraddressMapper;
+
+
+    @Test
+    public void deleteByPrimaryKey() throws Exception {
+    }
+
+    @Test
+    public void insertSelective() throws Exception {
+    }
+
+    @Test
+    public void selectByPrimaryKey() throws Exception {
+    }
+
+    @Test
+    public void updateByPrimaryKeyWithBLOBs() throws Exception {
+    }
+
+    @Test
+    public void selectByFK() throws Exception {
+    }
+
+    @Test
+    public void batchInsert() throws Exception {
+        List<Customeraddress> list = new ArrayList<>();
+        Customeraddress customeraddress = new Customeraddress();
+        customeraddress.setCa_address("地址1");
+        list.add(customeraddress);
+        customeraddressMapper.batchInsert(list);
+    }
+
+    @Test
+    public void batchUpdate() throws Exception {
+        List<Customeraddress> list = new ArrayList<>();
+        Customeraddress customeraddress = new Customeraddress();
+        customeraddress.setId(new Long(2));
+        customeraddress.setCa_person("人2");
+        list.add(customeraddress);
+        customeraddressMapper.batchUpdate(list);
+    }
+
+}

+ 82 - 0
applications/document/document-server/src/test/java/com/usoftchina/saas/document/mapper/CustomercontactMapperTest.java

@@ -0,0 +1,82 @@
+package com.usoftchina.saas.document.mapper;
+
+import com.usoftchina.saas.document.DocumentApplication;
+import com.usoftchina.saas.document.entities.Customercontact;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Created by zdw
+ * 2018-10-24 14:33.
+ */
+@RunWith(SpringJUnit4ClassRunner.class)
+@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = DocumentApplication.class)
+@EnableAutoConfiguration
+public class CustomercontactMapperTest {
+    @Autowired
+    private CustomercontactMapper customercontactMapper;
+
+    @Test
+    public void deleteByPrimaryKey() throws Exception {
+    }
+
+    @Test
+    public void insertSelective() throws Exception {
+    }
+
+    @Test
+    public void selectByPrimaryKey() throws Exception {
+    }
+
+    @Test
+    public void updateByPrimaryKeySelective() throws Exception {
+    }
+
+    @Test
+    public void selectByFK() throws Exception {
+    }
+
+    @Test
+    public void batchInsert() throws Exception {
+        List<Customercontact> insertDetail1 = new ArrayList<>();
+        Customercontact customercontact = new Customercontact();
+        customercontact.setCc_cuid(new Long(1));
+        customercontact.setCc_detno(1);
+        customercontact.setCc_name("zdw");
+        customercontact.setCc_tel(1881);
+        customercontact.setCc_qq("qq");
+        customercontact.setCc_email("@qq");
+        customercontact.setCompanyId(1);
+        customercontact.setUpdaterId(1);
+        customercontact.setUpdateTime(new Date());
+        insertDetail1.add(customercontact);
+        customercontactMapper.batchInsert(insertDetail1);
+    }
+
+    @Test
+    public void batchUpdate() throws Exception {
+        List<Customercontact> insertDetail1 = new ArrayList<>();
+        Customercontact customercontact = new Customercontact();
+        customercontact.setCc_cuid(new Long(1));
+        customercontact.setCc_detno(1);
+        customercontact.setCc_name("ssszdw");
+        customercontact.setCc_tel(1881);
+        customercontact.setCc_qq("qq");
+        customercontact.setCc_email("@qq");
+        customercontact.setCompanyId(1);
+        customercontact.setUpdaterId(1);
+        customercontact.setUpdateTime(new Date());
+        customercontact.setId(new Long(5));
+        insertDetail1.add(customercontact);
+        customercontactMapper.batchUpdate(insertDetail1);
+    }
+
+}

+ 77 - 0
applications/document/document-server/src/test/java/com/usoftchina/saas/document/service/CustomerServiceTest.java

@@ -0,0 +1,77 @@
+package com.usoftchina.saas.document.service;
+
+import com.usoftchina.saas.document.DocumentApplication;
+import com.usoftchina.saas.document.dto.CustomerDTO;
+import com.usoftchina.saas.document.dto.CustomerFormDTO;
+import com.usoftchina.saas.document.dto.CustomercontactDTO;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by zdw
+ * 2018-10-24 11:48.
+ */
+@RunWith(SpringJUnit4ClassRunner.class)
+@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = DocumentApplication.class)
+@EnableAutoConfiguration
+public class CustomerServiceTest {
+    @Autowired
+    private CustomerService customerService;
+
+    @Test
+    public void getListData() throws Exception {
+    }
+
+    @Test
+    public void getFormData() throws Exception {
+    }
+
+    @Test
+    public void saveFormData() throws Exception {
+        CustomerFormDTO customerFormDTO = new CustomerFormDTO();
+        CustomerDTO main = new CustomerDTO();
+
+        main.setCu_name("客户2");
+
+        List<CustomercontactDTO> items1 = new ArrayList<>();
+        CustomercontactDTO item = new CustomercontactDTO();
+        item.setCc_name("联系人1");
+        item.setCc_detno(1);
+        item.setCc_tel(112);
+        item.setCc_qq("396996717");
+        item.setCc_email("@qq.com");
+
+
+
+
+        items1.add(item);
+
+        customerFormDTO.setMain(main);
+        customerFormDTO.setItems1(items1);
+        customerService.saveFormData(customerFormDTO);
+    }
+
+    @Test
+    public void delete() throws Exception {
+    }
+
+    @Test
+    public void close() throws Exception {
+    }
+
+    @Test
+    public void open() throws Exception {
+    }
+
+    @Test
+    public void batchDelete() throws Exception {
+    }
+
+}

+ 8 - 1
applications/document/document-server/src/test/java/com/usoftchina/saas/document/service/CustomerTest.java

@@ -2,6 +2,7 @@ package com.usoftchina.saas.document.service;
 
 
 import com.usoftchina.saas.document.DocumentApplication;
+import com.usoftchina.saas.document.mapper.CustomerListMapper;
 import com.usoftchina.saas.document.mapper.CustomeraddressMapper;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -17,6 +18,9 @@ public class CustomerTest {
 
     @Autowired
     private CustomerService customerService;
+    @Autowired
+    private CustomerListMapper customerListMapper;
+
     @Autowired
     private CustomeraddressMapper customeraddressMapper;
 
@@ -27,6 +31,9 @@ public class CustomerTest {
 
     @Test
     public void test1(){
-        System.out.println(customeraddressMapper.selectByPrimaryKey(1));
+        System.out.println("---");
+        System.out.println(customerListMapper.selectCustomerListByCondition(null,null));
     }
+
+
 }

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

@@ -31,9 +31,9 @@ public class ProdIODetailDTO extends CommonBaseEntity implements Serializable {
 
     private String pd_unit;
 
-    private Integer pd_inqty;
+    private Double pd_inqty;
 
-    private Integer pd_outqty;
+    private Double pd_outqty;
 
     private Double pd_orderprice;
 
@@ -79,7 +79,7 @@ public class ProdIODetailDTO extends CommonBaseEntity implements Serializable {
 
     private Integer pd_ym;
 
-    private Integer pd_yqty;
+    private Double pd_yqty;
 
     private String pd_remark;
 

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

@@ -85,9 +85,9 @@ public class ProdInOutListDTO extends CommonBaseEntity implements Serializable {
 
     private String pd_unit;
 
-    private Integer pd_inqty;
+    private Double pd_inqty;
 
-    private Integer pd_outqty;
+    private Double pd_outqty;
 
     private Double pd_orderprice;
 
@@ -133,7 +133,7 @@ public class ProdInOutListDTO extends CommonBaseEntity implements Serializable {
 
     private Integer pd_ym;
 
-    private Integer pd_yqty;
+    private Double pd_yqty;
 
     private String pd_remark;
 

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

@@ -74,7 +74,7 @@ public class ProdIODetail extends CommonBaseEntity implements Serializable {
 
     private Integer pd_ym;
 
-    private Integer pd_yqty;
+    private Double pd_yqty;
 
     private String pd_remark;
 

+ 3 - 3
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOutList.java

@@ -84,9 +84,9 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private String pd_unit;
 
-    private Integer pd_inqty;
+    private Double pd_inqty;
 
-    private Integer pd_outqty;
+    private Double pd_outqty;
 
     private Double pd_orderprice;
 
@@ -132,7 +132,7 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private Integer pd_ym;
 
-    private Integer pd_yqty;
+    private Double pd_yqty;
 
     private String pd_remark;
 

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

@@ -136,7 +136,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 detail.setPd_piid(pi_id);
                 detail.setPd_inoutno(pi_inoutno);
                 detail.setPd_piclass(prodInOut.getPi_class());
-                detail.setPd_yqty(0);
+                detail.setPd_yqty(new Double(0));
                 insertDetails.add(detail);
             }
             //插入从表
@@ -331,7 +331,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                  targetPid.setPd_outqty(sourcePid.getPd_inqty()-sourcePid.getPd_yqty());
                  prodIODetailMapper.insertSelective(targetPid);
                  //更新已转数
-               //  sourcePid.setPd_yqty(sourcePid.getPd_inqty());
+                 sourcePid.setPd_yqty(sourcePid.getPd_inqty());
                  prodIODetailMapper.updateByPrimaryKeySelective(sourcePid);
              }
          }
@@ -344,7 +344,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         }
         Integer count = "0".equals(String.valueOf(id)) ? purchaseMapper.validateCodeWhenInsert(code) :
                 purchaseMapper.validateCodeWhenUpdate(code, id);
-        return maxnumberService.pushMaxnubmer(count, code, "Purchase").getData();
+        return maxnumberService.pushMaxnubmer(count, code, "Purchase").toString();
     }
 
 

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

@@ -12,8 +12,8 @@
     <result column="pd_prodid" jdbcType="INTEGER" property="pd_prodid" />
     <result column="pd_prodcode" jdbcType="VARCHAR" property="pd_prodcode" />
     <result column="pd_unit" jdbcType="VARCHAR" property="pd_unit" />
-    <result column="pd_inqty" jdbcType="INTEGER" property="pd_inqty" />
-    <result column="pd_outqty" jdbcType="INTEGER" property="pd_outqty" />
+    <result column="pd_inqty" jdbcType="DOUBLE" property="pd_inqty" />
+    <result column="pd_outqty" jdbcType="DOUBLE" property="pd_outqty" />
     <result column="pd_orderprice" jdbcType="DOUBLE" property="pd_orderprice" />
     <result column="pd_sendprice" jdbcType="DOUBLE" property="pd_sendprice" />
     <result column="pd_price" jdbcType="DOUBLE" property="pd_price" />
@@ -39,7 +39,7 @@
     <result column="pd_text4" jdbcType="VARCHAR" property="pd_text4" />
     <result column="pd_text5" jdbcType="VARCHAR" property="pd_text5" />
     <result column="pd_ym" jdbcType="INTEGER" property="pd_ym" />
-    <result column="pd_yqty" jdbcType="INTEGER" property="pd_yqty" />
+    <result column="pd_yqty" jdbcType="DOUBLE" property="pd_yqty" />
     <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
     <association property="product" javaType="com.usoftchina.saas.document.entities.Product">
       <id column="pr_id" property="id"/>
@@ -206,7 +206,7 @@
     values (#{pd_id,jdbcType=INTEGER}, #{pd_piid,jdbcType=INTEGER}, #{pd_inoutno,jdbcType=VARCHAR}, 
       #{pd_piclass,jdbcType=VARCHAR}, #{pd_pdno,jdbcType=INTEGER}, #{pd_ordercode,jdbcType=VARCHAR}, 
       #{pd_orderdetno,jdbcType=INTEGER}, #{pd_prodid,jdbcType=INTEGER}, #{pd_prodcode,jdbcType=VARCHAR}, 
-      #{pd_unit,jdbcType=VARCHAR}, #{pd_inqty,jdbcType=INTEGER}, #{pd_outqty,jdbcType=INTEGER}, 
+      #{pd_unit,jdbcType=VARCHAR}, #{pd_inqty,jdbcType=DOUBLE}, #{pd_outqty,jdbcType=DOUBLE},
       #{pd_orderprice,jdbcType=DOUBLE}, #{pd_sendprice,jdbcType=DOUBLE}, #{pd_price,jdbcType=DOUBLE}, 
       #{pd_total,jdbcType=DOUBLE}, #{pd_taxrate,jdbcType=DOUBLE}, #{pd_netprice,jdbcType=DOUBLE},
       #{pd_nettotal,jdbcType=DOUBLE}, #{pd_whid,jdbcType=INTEGER}, #{pd_whcode,jdbcType=VARCHAR}, 
@@ -215,7 +215,7 @@
       #{pd_status,jdbcType=INTEGER}, #{companyid,jdbcType=INTEGER}, #{updaterid,jdbcType=INTEGER}, 
       #{updatetime,jdbcType=TIMESTAMP}, #{pd_text1,jdbcType=VARCHAR}, #{pd_text2,jdbcType=VARCHAR}, 
       #{pd_text3,jdbcType=VARCHAR}, #{pd_text4,jdbcType=VARCHAR}, #{pd_text5,jdbcType=VARCHAR}, 
-      #{pd_ym,jdbcType=INTEGER}, #{pd_yqty,jdbcType=INTEGER}, #{pd_remark,jdbcType=LONGVARCHAR},
+      #{pd_ym,jdbcType=INTEGER}, #{pd_yqty,jdbcType=DOUBLE}, #{pd_remark,jdbcType=LONGVARCHAR},
       #{pd_ioid,jdbcType=INTEGER}
       )
   </insert>
@@ -372,10 +372,10 @@
         #{pd_unit,jdbcType=VARCHAR},
       </if>
       <if test="pd_inqty != null">
-        #{pd_inqty,jdbcType=INTEGER},
+        #{pd_inqty,jdbcType=DOUBLE},
       </if>
       <if test="pd_outqty != null">
-        #{pd_outqty,jdbcType=INTEGER},
+        #{pd_outqty,jdbcType=DOUBLE},
       </if>
       <if test="pd_orderprice != null">
         #{pd_orderprice,jdbcType=DOUBLE},
@@ -453,7 +453,7 @@
         #{pd_ym,jdbcType=INTEGER},
       </if>
       <if test="pd_yqty != null">
-        #{pd_yqty,jdbcType=INTEGER},
+        #{pd_yqty,jdbcType=DOUBLE},
       </if>
       <if test="pd_remark != null">
         #{pd_remark,jdbcType=LONGVARCHAR},
@@ -503,10 +503,10 @@
         pd_unit = #{record.pd_unit,jdbcType=VARCHAR},
       </if>
       <if test="record.pd_inqty != null">
-        pd_inqty = #{record.pd_inqty,jdbcType=INTEGER},
+        pd_inqty = #{record.pd_inqty,jdbcType=DOUBLE},
       </if>
       <if test="record.pd_outqty != null">
-        pd_outqty = #{record.pd_outqty,jdbcType=INTEGER},
+        pd_outqty = #{record.pd_outqty,jdbcType=DOUBLE},
       </if>
       <if test="record.pd_orderprice != null">
         pd_orderprice = #{record.pd_orderprice,jdbcType=DOUBLE},
@@ -584,7 +584,7 @@
         pd_ym = #{record.pd_ym,jdbcType=INTEGER},
       </if>
       <if test="record.pd_yqty != null">
-        pd_yqty = #{record.pd_yqty,jdbcType=INTEGER},
+        pd_yqty = #{record.pd_yqty,jdbcType=DOUBLE},
       </if>
       <if test="record.pd_remark != null">
         pd_remark = #{record.pd_remark,jdbcType=LONGVARCHAR},
@@ -610,8 +610,8 @@
       pd_prodid = #{record.pd_prodid,jdbcType=INTEGER},
       pd_prodcode = #{record.pd_prodcode,jdbcType=VARCHAR},
       pd_unit = #{record.pd_unit,jdbcType=VARCHAR},
-      pd_inqty = #{record.pd_inqty,jdbcType=INTEGER},
-      pd_outqty = #{record.pd_outqty,jdbcType=INTEGER},
+      pd_inqty = #{record.pd_inqty,jdbcType=DOUBLE},
+      pd_outqty = #{record.pd_outqty,jdbcType=DOUBLE},
       pd_orderprice = #{record.pd_orderprice,jdbcType=DOUBLE},
       pd_sendprice = #{record.pd_sendprice,jdbcType=DOUBLE},
       pd_price = #{record.pd_price,jdbcType=DOUBLE},
@@ -637,7 +637,7 @@
       pd_text4 = #{record.pd_text4,jdbcType=VARCHAR},
       pd_text5 = #{record.pd_text5,jdbcType=VARCHAR},
       pd_ym = #{record.pd_ym,jdbcType=INTEGER},
-      pd_yqty = #{record.pd_yqty,jdbcType=INTEGER},
+      pd_yqty = #{record.pd_yqty,jdbcType=DOUBLE},
       pd_remark = #{record.pd_remark,jdbcType=LONGVARCHAR},
       pd_ioid = #{record.pd_ioid,jdbcType=INTEGER}
     <if test="_parameter != null">
@@ -656,8 +656,8 @@
       pd_prodid = #{record.pd_prodid,jdbcType=INTEGER},
       pd_prodcode = #{record.pd_prodcode,jdbcType=VARCHAR},
       pd_unit = #{record.pd_unit,jdbcType=VARCHAR},
-      pd_inqty = #{record.pd_inqty,jdbcType=INTEGER},
-      pd_outqty = #{record.pd_outqty,jdbcType=INTEGER},
+      pd_inqty = #{record.pd_inqty,jdbcType=DOUBLE},
+      pd_outqty = #{record.pd_outqty,jdbcType=DOUBLE},
       pd_orderprice = #{record.pd_orderprice,jdbcType=DOUBLE},
       pd_sendprice = #{record.pd_sendprice,jdbcType=DOUBLE},
       pd_price = #{record.pd_price,jdbcType=DOUBLE},
@@ -683,7 +683,7 @@
       pd_text4 = #{record.pd_text4,jdbcType=VARCHAR},
       pd_text5 = #{record.pd_text5,jdbcType=VARCHAR},
       pd_ym = #{record.pd_ym,jdbcType=INTEGER},
-      pd_yqty = #{record.pd_yqty,jdbcType=INTEGER},
+      pd_yqty = #{record.pd_yqty,jdbcType=DOUBLE},
       pd_ioid = #{record.pd_ioid,jdbcType=INTEGER}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -720,10 +720,10 @@
         pd_unit = #{pd_unit,jdbcType=VARCHAR},
       </if>
       <if test="pd_inqty != null">
-        pd_inqty = #{pd_inqty,jdbcType=INTEGER},
+        pd_inqty = #{pd_inqty,jdbcType=DOUBLE},
       </if>
       <if test="pd_outqty != null">
-        pd_outqty = #{pd_outqty,jdbcType=INTEGER},
+        pd_outqty = #{pd_outqty,jdbcType=DOUBLE},
       </if>
       <if test="pd_orderprice != null">
         pd_orderprice = #{pd_orderprice,jdbcType=DOUBLE},
@@ -801,7 +801,7 @@
         pd_ym = #{pd_ym,jdbcType=INTEGER},
       </if>
       <if test="pd_yqty != null">
-        pd_yqty = #{pd_yqty,jdbcType=INTEGER},
+        pd_yqty = #{pd_yqty,jdbcType=DOUBLE},
       </if>
       <if test="pd_remark != null">
         pd_remark = #{pd_remark,jdbcType=LONGVARCHAR},
@@ -823,8 +823,8 @@
       pd_prodid = #{pd_prodid,jdbcType=INTEGER},
       pd_prodcode = #{pd_prodcode,jdbcType=VARCHAR},
       pd_unit = #{pd_unit,jdbcType=VARCHAR},
-      pd_inqty = #{pd_inqty,jdbcType=INTEGER},
-      pd_outqty = #{pd_outqty,jdbcType=INTEGER},
+      pd_inqty = #{pd_inqty,jdbcType=DOUBLE},
+      pd_outqty = #{pd_outqty,jdbcType=DOUBLE},
       pd_orderprice = #{pd_orderprice,jdbcType=DOUBLE},
       pd_sendprice = #{pd_sendprice,jdbcType=DOUBLE},
       pd_price = #{pd_price,jdbcType=DOUBLE},
@@ -850,7 +850,7 @@
       pd_text4 = #{pd_text4,jdbcType=VARCHAR},
       pd_text5 = #{pd_text5,jdbcType=VARCHAR},
       pd_ym = #{pd_ym,jdbcType=INTEGER},
-      pd_yqty = #{pd_yqty,jdbcType=INTEGER},
+      pd_yqty = #{pd_yqty,jdbcType=DOUBLE},
       pd_remark = #{pd_remark,jdbcType=LONGVARCHAR},
       pd_ioid = #{pd_ioid,jdbcType=INTEGER}
     where pd_id = #{pd_id,jdbcType=INTEGER}
@@ -866,8 +866,8 @@
       pd_prodid = #{pd_prodid,jdbcType=INTEGER},
       pd_prodcode = #{pd_prodcode,jdbcType=VARCHAR},
       pd_unit = #{pd_unit,jdbcType=VARCHAR},
-      pd_inqty = #{pd_inqty,jdbcType=INTEGER},
-      pd_outqty = #{pd_outqty,jdbcType=INTEGER},
+      pd_inqty = #{pd_inqty,jdbcType=DOUBLE},
+      pd_outqty = #{pd_outqty,jdbcType=DOUBLE},
       pd_orderprice = #{pd_orderprice,jdbcType=DOUBLE},
       pd_sendprice = #{pd_sendprice,jdbcType=DOUBLE},
       pd_price = #{pd_price,jdbcType=DOUBLE},
@@ -893,7 +893,7 @@
       pd_text4 = #{pd_text4,jdbcType=VARCHAR},
       pd_text5 = #{pd_text5,jdbcType=VARCHAR},
       pd_ym = #{pd_ym,jdbcType=INTEGER},
-      pd_yqty = #{pd_yqty,jdbcType=INTEGER},
+      pd_yqty = #{pd_yqty,jdbcType=DOUBLE},
       pd_ioid = #{pd_ioid,jdbcType=INTEGER}
     where pd_id = #{pd_id,jdbcType=INTEGER}
   </update>
@@ -915,12 +915,12 @@
       (
       #{item.pd_piid,jdbcType=INTEGER},#{item.pd_inoutno,jdbcType=VARCHAR},#{item.pd_piclass,jdbcType=VARCHAR},#{item.pd_pdno,jdbcType=INTEGER},#{item.pd_ordercode,jdbcType=VARCHAR},
       #{item.pd_orderdetno,jdbcType=INTEGER},#{item.pd_prodid,jdbcType=INTEGER},#{item.pd_prodcode,jdbcType=VARCHAR},#{item.pd_unit,jdbcType=VARCHAR},
-      #{item.pd_inqty,jdbcType=INTEGER},#{item.pd_outqty,jdbcType=INTEGER},#{item.pd_orderprice,jdbcType=DOUBLE},#{item.pd_sendprice,jdbcType=DOUBLE},#{item.pd_price,jdbcType=DOUBLE},
+      #{item.pd_inqty,jdbcType=DOUBLE},#{item.pd_outqty,jdbcType=DOUBLE},#{item.pd_orderprice,jdbcType=DOUBLE},#{item.pd_sendprice,jdbcType=DOUBLE},#{item.pd_price,jdbcType=DOUBLE},
       #{item.pd_total,jdbcType=DOUBLE},#{item.pd_taxrate,jdbcType=DOUBLE},#{item.pd_netprice,jdbcType=DOUBLE},#{item.pd_nettotal,jdbcType=DOUBLE},
       #{item.pd_whid,jdbcType=INTEGER},#{item.pd_whcode,jdbcType=VARCHAR},#{item.pd_whname,jdbcType=VARCHAR},#{item.pd_inwhid,jdbcType=INTEGER},#{item.pd_inwhcode,jdbcType=VARCHAR},
       #{item.pd_inwhname,jdbcType=VARCHAR},#{item.pd_orderid,jdbcType=INTEGER},#{item.pd_sdid,jdbcType=INTEGER},#{item.pd_status,jdbcType=VARCHAR},#{item.pd_remark,jdbcType=VARCHAR},
       #{item.companyId,jdbcType=INTEGER},#{item.updaterId,jdbcType=INTEGER},#{item.updateTime,jdbcType=TIMESTAMP},#{item.pd_text1,jdbcType=VARCHAR},#{item.pd_text2,jdbcType=VARCHAR},
-      #{item.pd_text3,jdbcType=VARCHAR},#{item.pd_text4,jdbcType=VARCHAR},#{item.pd_text5,jdbcType=VARCHAR},#{item.pd_ym,jdbcType=INTEGER},#{item.pd_yqty,jdbcType=INTEGER}
+      #{item.pd_text3,jdbcType=VARCHAR},#{item.pd_text4,jdbcType=VARCHAR},#{item.pd_text5,jdbcType=VARCHAR},#{item.pd_ym,jdbcType=INTEGER},#{item.pd_yqty,jdbcType=DOUBLE}
       )
     </foreach>
   </insert>
@@ -1076,10 +1076,10 @@
           #{item.pd_unit,jdbcType=VARCHAR},
         </if>
         <if test="item.pd_inqty != null">
-          #{item.pd_inqty,jdbcType=INTEGER},
+          #{item.pd_inqty,jdbcType=DOUBLE},
         </if>
         <if test="item.pd_outqty != null">
-          #{item.pd_outqty,jdbcType=INTEGER},
+          #{item.pd_outqty,jdbcType=DOUBLE},
         </if>
         <if test="item.pd_orderprice != null">
           #{item.pd_orderprice,jdbcType=DOUBLE},
@@ -1157,7 +1157,7 @@
           #{item.pd_ym,jdbcType=INTEGER},
         </if>
         <if test="item.pd_yqty != null">
-          #{item.pd_yqty,jdbcType=INTEGER},
+          #{item.pd_yqty,jdbcType=DOUBLE},
         </if>
         <if test="item.pd_remark != null">
           #{item.pd_remark,jdbcType=LONGVARCHAR},

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

@@ -39,8 +39,8 @@
     <result column="pd_prodid" jdbcType="INTEGER" property="pd_prodid" />
     <result column="pd_prodcode" jdbcType="VARCHAR" property="pd_prodcode" />
     <result column="pd_unit" jdbcType="VARCHAR" property="pd_unit" />
-    <result column="pd_inqty" jdbcType="INTEGER" property="pd_inqty" />
-    <result column="pd_outqty" jdbcType="INTEGER" property="pd_outqty" />
+    <result column="pd_inqty" jdbcType="DOUBLE" property="pd_inqty" />
+    <result column="pd_outqty" jdbcType="DOUBLE" property="pd_outqty" />
     <result column="pd_orderprice" jdbcType="DOUBLE" property="pd_orderprice" />
     <result column="pd_sendprice" jdbcType="DOUBLE" property="pd_sendprice" />
     <result column="pd_price" jdbcType="DOUBLE" property="pd_price" />
@@ -66,7 +66,7 @@
     <result column="pd_text4" jdbcType="VARCHAR" property="pd_text4" />
     <result column="pd_text5" jdbcType="VARCHAR" property="pd_text5" />
     <result column="pd_ym" jdbcType="INTEGER" property="pd_ym" />
-    <result column="pd_yqty" jdbcType="INTEGER" property="pd_yqty" />
+    <result column="pd_yqty" jdbcType="DOUBLE" property="pd_yqty" />
     <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
 
   </resultMap>

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

@@ -75,7 +75,7 @@ public class ProdIODetail extends CommonBaseEntity implements Serializable {
 
     private Integer pd_ym;
 
-    private Integer pd_yqty;
+    private Double pd_yqty;
 
     private String pd_remark;
 

+ 6 - 0
applications/storage/storage-server/src/main/docker/Dockerfile

@@ -0,0 +1,6 @@
+FROM frolvlad/alpine-oraclejdk8:slim
+VOLUME /tmp
+ADD storage-server-1.0.0-SNAPSHOT.jar app.jar
+RUN sh -c 'touch /app.jar'
+ENV JAVA_OPTS=""
+ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar" ]

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

@@ -27,10 +27,12 @@ import com.usoftchina.saas.storage.mapper.ProdInOutMapper;
 import com.usoftchina.saas.storage.service.ProdInOutService;
 import com.usoftchina.saas.utils.BeanMapper;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
 
 import java.util.*;
 
+@Service
 public class ProdInoutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper, ProdInOut> implements ProdInOutService {
 
     @Autowired
@@ -39,7 +41,6 @@ public class ProdInoutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
     private ProdInOutListMapper prodInOutListMapper;
     @Autowired
     private WarehouseApi warehouseApi;
-
     @Autowired
     private MaxnumberService maxnumberService;
 
@@ -129,7 +130,7 @@ public class ProdInoutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 detail.setPd_piid(pi_id);
                 detail.setPd_inoutno(pi_inoutno);
                 detail.setPd_piclass(prodInOut.getPi_class());
-                detail.setPd_yqty(0);
+                detail.setPd_yqty(new Double(0));
                 insertDetails.add(detail);
             }
             //插入从表

+ 1 - 1
applications/storage/storage-server/src/main/resources/config/application-docker.yml

@@ -1,6 +1,6 @@
 eureka:
   instance:
-    hostname: saas-document-server
+    hostname: saas-storage-server
     prefer-ip-address: false
   client:
     serviceUrl:

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

@@ -12,8 +12,8 @@
     <result column="pd_prodid" jdbcType="INTEGER" property="pd_prodid" />
     <result column="pd_prodcode" jdbcType="VARCHAR" property="pd_prodcode" />
     <result column="pd_unit" jdbcType="VARCHAR" property="pd_unit" />
-    <result column="pd_inqty" jdbcType="INTEGER" property="pd_inqty" />
-    <result column="pd_outqty" jdbcType="INTEGER" property="pd_outqty" />
+    <result column="pd_inqty" jdbcType="DOUBLE" property="pd_inqty" />
+    <result column="pd_outqty" jdbcType="DOUBLE" property="pd_outqty" />
     <result column="pd_orderprice" jdbcType="DOUBLE" property="pd_orderprice" />
     <result column="pd_sendprice" jdbcType="DOUBLE" property="pd_sendprice" />
     <result column="pd_price" jdbcType="DOUBLE" property="pd_price" />
@@ -39,7 +39,7 @@
     <result column="pd_text4" jdbcType="VARCHAR" property="pd_text4" />
     <result column="pd_text5" jdbcType="VARCHAR" property="pd_text5" />
     <result column="pd_ym" jdbcType="INTEGER" property="pd_ym" />
-    <result column="pd_yqty" jdbcType="INTEGER" property="pd_yqty" />
+    <result column="pd_yqty" jdbcType="DOUBLE" property="pd_yqty" />
     <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
     <association property="product" javaType="com.usoftchina.saas.document.entities.Product">
       <id column="pr_id" property="id"/>
@@ -206,7 +206,7 @@
     values (#{pd_id,jdbcType=INTEGER}, #{pd_piid,jdbcType=INTEGER}, #{pd_inoutno,jdbcType=VARCHAR}, 
       #{pd_piclass,jdbcType=VARCHAR}, #{pd_pdno,jdbcType=INTEGER}, #{pd_ordercode,jdbcType=VARCHAR}, 
       #{pd_orderdetno,jdbcType=INTEGER}, #{pd_prodid,jdbcType=INTEGER}, #{pd_prodcode,jdbcType=VARCHAR}, 
-      #{pd_unit,jdbcType=VARCHAR}, #{pd_inqty,jdbcType=INTEGER}, #{pd_outqty,jdbcType=INTEGER}, 
+      #{pd_unit,jdbcType=VARCHAR}, #{pd_inqty,jdbcType=DOUBLE}, #{pd_outqty,jdbcType=DOUBLE},
       #{pd_orderprice,jdbcType=DOUBLE}, #{pd_sendprice,jdbcType=DOUBLE}, #{pd_price,jdbcType=DOUBLE}, 
       #{pd_total,jdbcType=DOUBLE}, #{pd_taxrate,jdbcType=DOUBLE}, #{pd_netprice,jdbcType=DOUBLE},
       #{pd_nettotal,jdbcType=DOUBLE}, #{pd_whid,jdbcType=INTEGER}, #{pd_whcode,jdbcType=VARCHAR}, 
@@ -215,7 +215,7 @@
       #{pd_status,jdbcType=INTEGER}, #{companyid,jdbcType=INTEGER}, #{updaterid,jdbcType=INTEGER}, 
       #{updatetime,jdbcType=TIMESTAMP}, #{pd_text1,jdbcType=VARCHAR}, #{pd_text2,jdbcType=VARCHAR}, 
       #{pd_text3,jdbcType=VARCHAR}, #{pd_text4,jdbcType=VARCHAR}, #{pd_text5,jdbcType=VARCHAR}, 
-      #{pd_ym,jdbcType=INTEGER}, #{pd_yqty,jdbcType=INTEGER}, #{pd_remark,jdbcType=LONGVARCHAR},
+      #{pd_ym,jdbcType=INTEGER}, #{pd_yqty,jdbcType=DOUBLE}, #{pd_remark,jdbcType=LONGVARCHAR},
       #{pd_ioid,jdbcType=INTEGER}
       )
   </insert>
@@ -372,10 +372,10 @@
         #{pd_unit,jdbcType=VARCHAR},
       </if>
       <if test="pd_inqty != null">
-        #{pd_inqty,jdbcType=INTEGER},
+        #{pd_inqty,jdbcType=DOUBLE},
       </if>
       <if test="pd_outqty != null">
-        #{pd_outqty,jdbcType=INTEGER},
+        #{pd_outqty,jdbcType=DOUBLE},
       </if>
       <if test="pd_orderprice != null">
         #{pd_orderprice,jdbcType=DOUBLE},
@@ -453,7 +453,7 @@
         #{pd_ym,jdbcType=INTEGER},
       </if>
       <if test="pd_yqty != null">
-        #{pd_yqty,jdbcType=INTEGER},
+        #{pd_yqty,jdbcType=DOUBLE},
       </if>
       <if test="pd_remark != null">
         #{pd_remark,jdbcType=LONGVARCHAR},
@@ -503,10 +503,10 @@
         pd_unit = #{record.pd_unit,jdbcType=VARCHAR},
       </if>
       <if test="record.pd_inqty != null">
-        pd_inqty = #{record.pd_inqty,jdbcType=INTEGER},
+        pd_inqty = #{record.pd_inqty,jdbcType=DOUBLE},
       </if>
       <if test="record.pd_outqty != null">
-        pd_outqty = #{record.pd_outqty,jdbcType=INTEGER},
+        pd_outqty = #{record.pd_outqty,jdbcType=DOUBLE},
       </if>
       <if test="record.pd_orderprice != null">
         pd_orderprice = #{record.pd_orderprice,jdbcType=DOUBLE},
@@ -584,7 +584,7 @@
         pd_ym = #{record.pd_ym,jdbcType=INTEGER},
       </if>
       <if test="record.pd_yqty != null">
-        pd_yqty = #{record.pd_yqty,jdbcType=INTEGER},
+        pd_yqty = #{record.pd_yqty,jdbcType=DOUBLE},
       </if>
       <if test="record.pd_remark != null">
         pd_remark = #{record.pd_remark,jdbcType=LONGVARCHAR},
@@ -610,8 +610,8 @@
       pd_prodid = #{record.pd_prodid,jdbcType=INTEGER},
       pd_prodcode = #{record.pd_prodcode,jdbcType=VARCHAR},
       pd_unit = #{record.pd_unit,jdbcType=VARCHAR},
-      pd_inqty = #{record.pd_inqty,jdbcType=INTEGER},
-      pd_outqty = #{record.pd_outqty,jdbcType=INTEGER},
+      pd_inqty = #{record.pd_inqty,jdbcType=DOUBLE},
+      pd_outqty = #{record.pd_outqty,jdbcType=DOUBLE},
       pd_orderprice = #{record.pd_orderprice,jdbcType=DOUBLE},
       pd_sendprice = #{record.pd_sendprice,jdbcType=DOUBLE},
       pd_price = #{record.pd_price,jdbcType=DOUBLE},
@@ -637,7 +637,7 @@
       pd_text4 = #{record.pd_text4,jdbcType=VARCHAR},
       pd_text5 = #{record.pd_text5,jdbcType=VARCHAR},
       pd_ym = #{record.pd_ym,jdbcType=INTEGER},
-      pd_yqty = #{record.pd_yqty,jdbcType=INTEGER},
+      pd_yqty = #{record.pd_yqty,jdbcType=DOUBLE},
       pd_remark = #{record.pd_remark,jdbcType=LONGVARCHAR},
       pd_ioid = #{record.pd_ioid,jdbcType=INTEGER}
     <if test="_parameter != null">
@@ -656,8 +656,8 @@
       pd_prodid = #{record.pd_prodid,jdbcType=INTEGER},
       pd_prodcode = #{record.pd_prodcode,jdbcType=VARCHAR},
       pd_unit = #{record.pd_unit,jdbcType=VARCHAR},
-      pd_inqty = #{record.pd_inqty,jdbcType=INTEGER},
-      pd_outqty = #{record.pd_outqty,jdbcType=INTEGER},
+      pd_inqty = #{record.pd_inqty,jdbcType=DOUBLE},
+      pd_outqty = #{record.pd_outqty,jdbcType=DOUBLE},
       pd_orderprice = #{record.pd_orderprice,jdbcType=DOUBLE},
       pd_sendprice = #{record.pd_sendprice,jdbcType=DOUBLE},
       pd_price = #{record.pd_price,jdbcType=DOUBLE},
@@ -683,7 +683,7 @@
       pd_text4 = #{record.pd_text4,jdbcType=VARCHAR},
       pd_text5 = #{record.pd_text5,jdbcType=VARCHAR},
       pd_ym = #{record.pd_ym,jdbcType=INTEGER},
-      pd_yqty = #{record.pd_yqty,jdbcType=INTEGER},
+      pd_yqty = #{record.pd_yqty,jdbcType=DOUBLE},
       pd_ioid = #{record.pd_ioid,jdbcType=INTEGER}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -720,10 +720,10 @@
         pd_unit = #{pd_unit,jdbcType=VARCHAR},
       </if>
       <if test="pd_inqty != null">
-        pd_inqty = #{pd_inqty,jdbcType=INTEGER},
+        pd_inqty = #{pd_inqty,jdbcType=DOUBLE},
       </if>
       <if test="pd_outqty != null">
-        pd_outqty = #{pd_outqty,jdbcType=INTEGER},
+        pd_outqty = #{pd_outqty,jdbcType=DOUBLE},
       </if>
       <if test="pd_orderprice != null">
         pd_orderprice = #{pd_orderprice,jdbcType=DOUBLE},
@@ -801,7 +801,7 @@
         pd_ym = #{pd_ym,jdbcType=INTEGER},
       </if>
       <if test="pd_yqty != null">
-        pd_yqty = #{pd_yqty,jdbcType=INTEGER},
+        pd_yqty = #{pd_yqty,jdbcType=DOUBLE},
       </if>
       <if test="pd_remark != null">
         pd_remark = #{pd_remark,jdbcType=LONGVARCHAR},
@@ -823,8 +823,8 @@
       pd_prodid = #{pd_prodid,jdbcType=INTEGER},
       pd_prodcode = #{pd_prodcode,jdbcType=VARCHAR},
       pd_unit = #{pd_unit,jdbcType=VARCHAR},
-      pd_inqty = #{pd_inqty,jdbcType=INTEGER},
-      pd_outqty = #{pd_outqty,jdbcType=INTEGER},
+      pd_inqty = #{pd_inqty,jdbcType=DOUBLE},
+      pd_outqty = #{pd_outqty,jdbcType=DOUBLE},
       pd_orderprice = #{pd_orderprice,jdbcType=DOUBLE},
       pd_sendprice = #{pd_sendprice,jdbcType=DOUBLE},
       pd_price = #{pd_price,jdbcType=DOUBLE},
@@ -850,7 +850,7 @@
       pd_text4 = #{pd_text4,jdbcType=VARCHAR},
       pd_text5 = #{pd_text5,jdbcType=VARCHAR},
       pd_ym = #{pd_ym,jdbcType=INTEGER},
-      pd_yqty = #{pd_yqty,jdbcType=INTEGER},
+      pd_yqty = #{pd_yqty,jdbcType=DOUBLE},
       pd_remark = #{pd_remark,jdbcType=LONGVARCHAR},
       pd_ioid = #{pd_ioid,jdbcType=INTEGER}
     where pd_id = #{pd_id,jdbcType=INTEGER}
@@ -866,8 +866,8 @@
       pd_prodid = #{pd_prodid,jdbcType=INTEGER},
       pd_prodcode = #{pd_prodcode,jdbcType=VARCHAR},
       pd_unit = #{pd_unit,jdbcType=VARCHAR},
-      pd_inqty = #{pd_inqty,jdbcType=INTEGER},
-      pd_outqty = #{pd_outqty,jdbcType=INTEGER},
+      pd_inqty = #{pd_inqty,jdbcType=DOUBLE},
+      pd_outqty = #{pd_outqty,jdbcType=DOUBLE},
       pd_orderprice = #{pd_orderprice,jdbcType=DOUBLE},
       pd_sendprice = #{pd_sendprice,jdbcType=DOUBLE},
       pd_price = #{pd_price,jdbcType=DOUBLE},
@@ -893,7 +893,7 @@
       pd_text4 = #{pd_text4,jdbcType=VARCHAR},
       pd_text5 = #{pd_text5,jdbcType=VARCHAR},
       pd_ym = #{pd_ym,jdbcType=INTEGER},
-      pd_yqty = #{pd_yqty,jdbcType=INTEGER},
+      pd_yqty = #{pd_yqty,jdbcType=DOUBLE},
       pd_ioid = #{pd_ioid,jdbcType=INTEGER}
     where pd_id = #{pd_id,jdbcType=INTEGER}
   </update>
@@ -915,12 +915,12 @@
       (
       #{item.pd_piid,jdbcType=INTEGER},#{item.pd_inoutno,jdbcType=VARCHAR},#{item.pd_piclass,jdbcType=VARCHAR},#{item.pd_pdno,jdbcType=INTEGER},#{item.pd_ordercode,jdbcType=VARCHAR},
       #{item.pd_orderdetno,jdbcType=INTEGER},#{item.pd_prodid,jdbcType=INTEGER},#{item.pd_prodcode,jdbcType=VARCHAR},#{item.pd_unit,jdbcType=VARCHAR},
-      #{item.pd_inqty,jdbcType=INTEGER},#{item.pd_outqty,jdbcType=INTEGER},#{item.pd_orderprice,jdbcType=DOUBLE},#{item.pd_sendprice,jdbcType=DOUBLE},#{item.pd_price,jdbcType=DOUBLE},
+      #{item.pd_inqty,jdbcType=DOUBLE},#{item.pd_outqty,jdbcType=DOUBLE},#{item.pd_orderprice,jdbcType=DOUBLE},#{item.pd_sendprice,jdbcType=DOUBLE},#{item.pd_price,jdbcType=DOUBLE},
       #{item.pd_total,jdbcType=DOUBLE},#{item.pd_taxrate,jdbcType=DOUBLE},#{item.pd_netprice,jdbcType=DOUBLE},#{item.pd_nettotal,jdbcType=DOUBLE},
       #{item.pd_whid,jdbcType=INTEGER},#{item.pd_whcode,jdbcType=VARCHAR},#{item.pd_whname,jdbcType=VARCHAR},#{item.pd_inwhid,jdbcType=INTEGER},#{item.pd_inwhcode,jdbcType=VARCHAR},
       #{item.pd_inwhname,jdbcType=VARCHAR},#{item.pd_orderid,jdbcType=INTEGER},#{item.pd_sdid,jdbcType=INTEGER},#{item.pd_status,jdbcType=VARCHAR},#{item.pd_remark,jdbcType=VARCHAR},
       #{item.companyId,jdbcType=INTEGER},#{item.updaterId,jdbcType=INTEGER},#{item.updateTime,jdbcType=TIMESTAMP},#{item.pd_text1,jdbcType=VARCHAR},#{item.pd_text2,jdbcType=VARCHAR},
-      #{item.pd_text3,jdbcType=VARCHAR},#{item.pd_text4,jdbcType=VARCHAR},#{item.pd_text5,jdbcType=VARCHAR},#{item.pd_ym,jdbcType=INTEGER},#{item.pd_yqty,jdbcType=INTEGER}
+      #{item.pd_text3,jdbcType=VARCHAR},#{item.pd_text4,jdbcType=VARCHAR},#{item.pd_text5,jdbcType=VARCHAR},#{item.pd_ym,jdbcType=INTEGER},#{item.pd_yqty,jdbcType=DOUBLE}
       )
     </foreach>
   </insert>
@@ -1076,10 +1076,10 @@
           #{item.pd_unit,jdbcType=VARCHAR},
         </if>
         <if test="item.pd_inqty != null">
-          #{item.pd_inqty,jdbcType=INTEGER},
+          #{item.pd_inqty,jdbcType=DOUBLE},
         </if>
         <if test="item.pd_outqty != null">
-          #{item.pd_outqty,jdbcType=INTEGER},
+          #{item.pd_outqty,jdbcType=DOUBLE},
         </if>
         <if test="item.pd_orderprice != null">
           #{item.pd_orderprice,jdbcType=DOUBLE},
@@ -1157,7 +1157,7 @@
           #{item.pd_ym,jdbcType=INTEGER},
         </if>
         <if test="item.pd_yqty != null">
-          #{item.pd_yqty,jdbcType=INTEGER},
+          #{item.pd_yqty,jdbcType=DOUBLE},
         </if>
         <if test="item.pd_remark != null">
           #{item.pd_remark,jdbcType=LONGVARCHAR},

+ 34 - 34
framework/server-starter/src/main/java/com/usoftchina/saas/server/ServerAutoConfiguration.java

@@ -1,20 +1,20 @@
 package com.usoftchina.saas.server;
 
-import com.usoftchina.saas.server.error.ServletErrorUtils;
-import com.usoftchina.saas.server.error.UnCaughtErrorFilter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.annotation.Bean;
+//import com.usoftchina.saas.server.error.ServletErrorUtils;
+//import com.usoftchina.saas.server.error.UnCaughtErrorFilter;
+//import org.slf4j.Logger;
+//import org.slf4j.LoggerFactory;
+//import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.lang.Nullable;
-import org.springframework.web.servlet.HandlerExceptionResolver;
-import org.springframework.web.servlet.ModelAndView;
-import org.springframework.web.util.NestedServletException;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
+//import org.springframework.lang.Nullable;
+//import org.springframework.web.servlet.HandlerExceptionResolver;
+//import org.springframework.web.servlet.ModelAndView;
+//import org.springframework.web.util.NestedServletException;
+//
+//import javax.servlet.http.HttpServletRequest;
+//import javax.servlet.http.HttpServletResponse;
+//import java.io.IOException;
 
 /**
  * @author yingp
@@ -24,25 +24,25 @@ import java.io.IOException;
 @ComponentScan(basePackages = {"com.usoftchina.saas.server"})
 public class ServerAutoConfiguration {
 
-    private Logger logger = LoggerFactory.getLogger(UnCaughtErrorFilter.class);
-
-    @Bean
-    public HandlerExceptionResolver handlerExceptionResolver() {
-        return new HandlerExceptionResolver(){
-            @Nullable
-            @Override
-            public ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response, @Nullable Object o, Exception e) {
-                Throwable cause = e;
-                if (e instanceof NestedServletException) {
-                    cause = ((NestedServletException) e).getRootCause();
-                }
-                logger.error(ServletErrorUtils.buildMessage(request, cause), cause);
-                try {
-                    ServletErrorUtils.writerErrorResult(response, cause);
-                } catch (IOException ex) {
-                }
-                return null;
-            }
-        };
-    }
+//    private Logger logger = LoggerFactory.getLogger(UnCaughtErrorFilter.class);
+//
+//    @Bean
+//    public HandlerExceptionResolver handlerExceptionResolver() {
+//        return new HandlerExceptionResolver(){
+//            @Nullable
+//            @Override
+//            public ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response, @Nullable Object o, Exception e) {
+//                Throwable cause = e;
+//                if (e instanceof NestedServletException) {
+//                    cause = ((NestedServletException) e).getRootCause();
+//                }
+//                logger.error(ServletErrorUtils.buildMessage(request, cause), cause);
+//                try {
+//                    ServletErrorUtils.writerErrorResult(response, cause);
+//                } catch (IOException ex) {
+//                }
+//                return null;
+//            }
+//        };
+//    }
 }

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

@@ -115,7 +115,7 @@ Ext.define('saas.util.FormUtil', {
         }else{
             //取后台编号
             me.BaseUtil.request({
-                url: 'http://192.168.253.228:8900/number/getMaxnumber',
+                url: basePath + 'commons/number/getMaxnumber',
                 params: {
                     caller:form.caller
                 },