Browse Source

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

hy 7 years ago
parent
commit
10aa9f6074
52 changed files with 598 additions and 42 deletions
  1. 1 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java
  2. 6 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/AddressController.java
  3. 7 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/CustomerController.java
  4. 7 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/FundinouttypeController.java
  5. 6 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProducttypeController.java
  6. 8 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductunitController.java
  7. 7 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/AddressMapper.java
  8. 1 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomerListMapper.java
  9. 8 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/FundinouttypeMapper.java
  10. 2 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProductbrandMapper.java
  11. 8 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProducttypeMapper.java
  12. 8 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProductunitMapper.java
  13. 2 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/VendorkindMapper.java
  14. 2 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/WarehouseMapper.java
  15. 4 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/AddressService.java
  16. 4 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/CustomerService.java
  17. 5 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/FundinouttypeService.java
  18. 5 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProducttypeService.java
  19. 5 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProductunitService.java
  20. 32 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/AddressServiceImpl.java
  21. 16 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java
  22. 31 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/FundinouttypeServiceImpl.java
  23. 26 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductbrandServiceImpl.java
  24. 29 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProducttypeServiceImpl.java
  25. 30 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductunitServiceImpl.java
  26. 24 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/VendorkindServiceImpl.java
  27. 17 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/WarehouseServiceImpl.java
  28. 14 2
      applications/document/document-server/src/main/resources/mapper/AddressMapper.xml
  29. 13 0
      applications/document/document-server/src/main/resources/mapper/CustomerListMapper.xml
  30. 2 2
      applications/document/document-server/src/main/resources/mapper/CustomerkindMapper.xml
  31. 15 3
      applications/document/document-server/src/main/resources/mapper/FundinouttypeMapper.xml
  32. 6 0
      applications/document/document-server/src/main/resources/mapper/ProductMapper.xml
  33. 11 2
      applications/document/document-server/src/main/resources/mapper/ProductbrandMapper.xml
  34. 14 2
      applications/document/document-server/src/main/resources/mapper/ProducttypeMapper.xml
  35. 6 0
      applications/document/document-server/src/main/resources/mapper/ProductunitMapper.xml
  36. 5 2
      applications/document/document-server/src/main/resources/mapper/VendorkindMapper.xml
  37. 5 2
      applications/document/document-server/src/main/resources/mapper/WarehouseMapper.xml
  38. 58 0
      applications/document/document-server/src/test/java/com/usoftchina/saas/document/mapper/WarehouseMapperTest.java
  39. 13 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/VerificationController.java
  40. 13 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/VerificationService.java
  41. 30 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/VerificationServiceImpl.java
  42. 52 0
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/config/WebConfig.java
  43. 20 8
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/ProdInOutServiceImpl.java
  44. 2 2
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java
  45. 11 11
      applications/sale/sale-server/src/main/resources/mapper/ProdIODetailMapper.xml
  46. 1 0
      applications/sale/sale-server/src/main/resources/mapper/ProdInOutMapper.xml
  47. 1 0
      applications/sale/sale-server/src/main/resources/mapper/SaledetailMapper.xml
  48. 1 1
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdInOutDTO.java
  49. 1 1
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdInOutListDTO.java
  50. 1 1
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOut.java
  51. 1 1
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOutList.java
  52. 1 1
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js

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

@@ -23,6 +23,7 @@ public enum BizExceptionCode implements BaseExceptionCode {
     BIZ_CLOSE(79301, "只能关闭已审核的单据"),
     BIZ_OPEN(79302, "只能打开已关闭的单据"),
     BOM_SAVE(79401, "产品编号+版本号已存在"),
+    REPEAT_NAME(79501, "名称重复"),
     NO_DATA(79998, "未找到数据"),
     ILLEGAL_ID(79999, "id不正确"),
 

+ 6 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/AddressController.java

@@ -1,6 +1,7 @@
 package com.usoftchina.saas.document.controller;
 
 import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.document.entities.Address;
 import com.usoftchina.saas.document.service.AddressService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -39,4 +40,9 @@ public class AddressController {
         return Result.success(addresseList);
     }
 
+    @GetMapping("/getCombo")
+    public Result getCombo(){
+        List<ComboDTO> comboDTOList = addressService.getCombo();
+        return Result.success(comboDTOList);
+    }
 }

+ 7 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/CustomerController.java

@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.*;
  * Created by zdw
  * 2018-10-23 11:39.
  */
+@CrossOrigin
 @RestController
 @RequestMapping("/customer")
 public class CustomerController {
@@ -36,6 +37,12 @@ public class CustomerController {
         return Result.success(listData);
     }
 
+    @GetMapping("/dbfind")
+    public Result getDbfind(PageRequest page, ListReqDTO listReqDTO){
+        PageInfo<CustomerList> dbfindData = customerService.getDbfind(page, listReqDTO);
+        return Result.success(dbfindData);
+    }
+
     /**
      * 获取客户资料表单
      *

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

@@ -1,6 +1,7 @@
 package com.usoftchina.saas.document.controller;
 
 import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.document.entities.Fundinouttype;
 import com.usoftchina.saas.document.service.FundinouttypeService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -32,4 +33,10 @@ public class FundinouttypeController {
         List<Fundinouttype> fundinouttypeList = fundinouttypeService.findAll();
         return Result.success(fundinouttypeList);
     }
+
+    @GetMapping("/getCombo")
+    public Result getCombo(){
+        List<ComboDTO> comboDTOList = fundinouttypeService.getCombo();
+        return Result.success(comboDTOList);
+    }
 }

+ 6 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProducttypeController.java

@@ -1,6 +1,7 @@
 package com.usoftchina.saas.document.controller;
 
 import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.document.entities.Producttype;
 import com.usoftchina.saas.document.service.ProducttypeService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -33,5 +34,10 @@ public class ProducttypeController {
         return Result.success();
     }
 
+    @GetMapping("/getCombo")
+    public Result getCombo(){
+        List<ComboDTO> comboDTOList = producttypeService.getCombo();
+        return Result.success(comboDTOList);
+    }
 
 }

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

@@ -2,6 +2,7 @@ package com.usoftchina.saas.document.controller;
 
 
 import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.document.entities.Productunit;
 import com.usoftchina.saas.document.service.ProductunitService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -10,7 +11,7 @@ import org.springframework.web.bind.annotation.*;
 import java.util.List;
 
 @RestController
-@RequestMapping("/productUnit")
+@RequestMapping("/productunit")
 public class ProductunitController {
 
     @Autowired
@@ -34,4 +35,10 @@ public class ProductunitController {
         return Result.success(productunitList);
     }
 
+    @GetMapping("/getCombo")
+    public Result getCombo(){
+        List<ComboDTO> comboDTOList = productunitService.getCombo();
+        return Result.success(comboDTOList);
+    }
+
 }

+ 7 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/AddressMapper.java

@@ -1,7 +1,10 @@
 package com.usoftchina.saas.document.mapper;
 
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.document.entities.Address;
+import org.apache.ibatis.annotations.Param;
+
 import java.util.List;
 
 public interface AddressMapper extends CommonBaseMapper<Address> {
@@ -21,4 +24,8 @@ public interface AddressMapper extends CommonBaseMapper<Address> {
     int updateByPrimaryKey(Address record);
 
     int deleteByIds(String ids);
+
+    int selectCountByName(@Param("name") String name, @Param("companyId") Long companyId);
+
+    List<ComboDTO> getCombo(@Param("companyId") Long companyId);
 }

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

@@ -8,4 +8,5 @@ import java.util.List;
 public interface CustomerListMapper {
     List<CustomerList> selectCustomerListByCondition(@Param("con") String con, @Param("companyId") Long companyId);
     List<CustomerList> selectCustomerBycondition(@Param("con") String con, @Param("companyId") Long companyId);
+    List<CustomerList> selectDbFind(@Param("condition") String condition, @Param("companyId") Long companyId);
 }

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

@@ -2,7 +2,11 @@ package com.usoftchina.saas.document.mapper;
 
 import com.usoftchina.saas.base.entity.CommonBaseEntity;
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.document.entities.Fundinouttype;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 public interface FundinouttypeMapper extends CommonBaseMapper<Fundinouttype> {
     int deleteByPrimaryKey(Long ft_id);
@@ -16,4 +20,8 @@ public interface FundinouttypeMapper extends CommonBaseMapper<Fundinouttype> {
     int updateByPrimaryKeySelective(Fundinouttype record);
 
     int updateByPrimaryKey(Fundinouttype record);
+
+    int selectCountByName(@Param("name") String name, @Param("companyId") Long companyId);
+
+    List<ComboDTO> getCombo(@Param("companyId") Long companyId);
 }

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

@@ -22,4 +22,6 @@ public interface ProductbrandMapper extends CommonBaseMapper<Productbrand> {
     int updateByPrimaryKey(Productbrand record);
 
     List<ComboDTO> getCombo(@Param("companyId") Long companyId);
+
+    int selectCountByName(@Param("name") String name, @Param("companyId") Long companyId);
 }

+ 8 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProducttypeMapper.java

@@ -1,7 +1,11 @@
 package com.usoftchina.saas.document.mapper;
 
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.document.entities.Producttype;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 public interface ProducttypeMapper extends CommonBaseMapper<Producttype> {
     int deleteByPrimaryKey(Long id);
@@ -15,4 +19,8 @@ public interface ProducttypeMapper extends CommonBaseMapper<Producttype> {
     int updateByPrimaryKeySelective(Producttype record);
 
     int updateByPrimaryKey(Producttype record);
+
+    int selectCountByName(@Param("name") String name, @Param("companyId") Long companyId);
+
+    List<ComboDTO> getCombo(@Param("companyId") Long companyId);
 }

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

@@ -1,7 +1,11 @@
 package com.usoftchina.saas.document.mapper;
 
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.document.entities.Productunit;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 public interface ProductunitMapper extends CommonBaseMapper<Productunit> {
     int deleteByPrimaryKey(Long pu_id);
@@ -15,4 +19,8 @@ public interface ProductunitMapper extends CommonBaseMapper<Productunit> {
     int updateByPrimaryKeySelective(Productunit record);
 
     int updateByPrimaryKey(Productunit record);
+
+    int selectCountByName(@Param("name") String name, @Param("companyId") Long companyId);
+
+    List<ComboDTO> getCombo(@Param("companyId") Long companyId);
 }

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

@@ -22,4 +22,6 @@ public interface VendorkindMapper extends CommonBaseMapper<Vendorkind> {
     int updateByPrimaryKey(Vendorkind record);
 
     List<ComboDTO> getCombo(@Param("companyId") Long companyId);
+
+    int selectCountByName(@Param("name") String name, @Param("companyId") Long companyId);
 }

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

@@ -32,4 +32,6 @@ public interface WarehouseMapper extends CommonBaseMapper<Warehouse> {
     int validateCodeWhenUpdate(@Param("code") String code, @Param("id") Long id, @Param("companyId") Long company);
 
     List<Warehouse> selectWarehouseListByCondition(@Param("con") String con,@Param("companyId") Long companyId);
+
+    int selectCountByName(@Param("name") String name, @Param("companyId") Long companyId);
 }

+ 4 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/AddressService.java

@@ -1,11 +1,15 @@
 package com.usoftchina.saas.document.service;
 
 import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.document.entities.Address;
 import com.usoftchina.saas.document.mapper.AddressMapper;
 
+import java.util.List;
+
 public interface AddressService extends CommonBaseService<AddressMapper, Address>  {
 
     void removeByIds(String ids);
 
+    List<ComboDTO> getCombo();
 }

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

@@ -11,6 +11,8 @@ import com.usoftchina.saas.document.entities.CustomerList;
 import com.usoftchina.saas.document.mapper.CustomerMapper;
 import com.usoftchina.saas.page.PageRequest;
 
+import java.util.List;
+
 /**
  * Created by zdw
  * 2018-10-23 15:26.
@@ -37,4 +39,6 @@ public interface CustomerService extends CommonBaseService<CustomerMapper, Custo
     void batchClose(BatchDealBaseDTO baseDTOs);
 
     void batchOpen(BatchDealBaseDTO baseDTOs);
+
+    PageInfo<CustomerList> getDbfind(PageRequest page, ListReqDTO listReqDTO);
 }

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

@@ -1,9 +1,14 @@
 package com.usoftchina.saas.document.service;
 
 import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.document.entities.Fundinouttype;
 import com.usoftchina.saas.document.mapper.FundinouttypeMapper;
 
+import java.util.List;
+
 public interface FundinouttypeService extends CommonBaseService<FundinouttypeMapper, Fundinouttype> {
 
+    List<ComboDTO> getCombo();
+
 }

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

@@ -1,9 +1,14 @@
 package com.usoftchina.saas.document.service;
 
 import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.document.entities.Producttype;
 import com.usoftchina.saas.document.mapper.ProducttypeMapper;
 
+import java.util.List;
+
 public interface ProducttypeService extends CommonBaseService<ProducttypeMapper, Producttype> {
 
+    List<ComboDTO> getCombo();
+
 }

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

@@ -1,9 +1,14 @@
 package com.usoftchina.saas.document.service;
 
 import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.document.entities.Productunit;
 import com.usoftchina.saas.document.mapper.ProductunitMapper;
 
+import java.util.List;
+
 public interface ProductunitService extends CommonBaseService<ProductunitMapper, Productunit> {
 
+    List<ComboDTO> getCombo();
+
 }

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

@@ -2,14 +2,20 @@ package com.usoftchina.saas.document.service.impl;
 
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.MessageLogService;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.exception.BizExceptionCode;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.entities.Address;
 import com.usoftchina.saas.document.mapper.AddressMapper;
 import com.usoftchina.saas.document.service.AddressService;
+import com.usoftchina.saas.exception.BizException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.Date;
+import java.util.List;
+
 @Service
 public class AddressServiceImpl extends CommonBaseServiceImpl<AddressMapper, Address> implements AddressService {
 
@@ -29,10 +35,18 @@ public class AddressServiceImpl extends CommonBaseServiceImpl<AddressMapper, Add
     public boolean save(Address address){
         if(address.getId() == 0){
             address.setCompanyId(BaseContextHolder.getCompanyId());
+            address.setCreateTime(new Date());
+            address.setCreatorId(BaseContextHolder.getUserId());
+            //验证名称是否重复
+            validName(address.getAd_address());
             addressMapper.insertSelective(address);
             //记录LOG
             messageLogService.save(generateMsgObj(address.getId()));
         }else{
+            address.setUpdaterId(BaseContextHolder.getUserId());
+            address.setUpdateTime(new Date());
+            //验证名称是否重复
+            validName(address.getAd_address());
             addressMapper.updateByPrimaryKeySelective(address);
             //记录LOG
             messageLogService.update(generateMsgObj(address.getId()));
@@ -65,7 +79,25 @@ public class AddressServiceImpl extends CommonBaseServiceImpl<AddressMapper, Add
         }
     }
 
+    @Override
+    public List<ComboDTO> getCombo() {
+       return getMapper().getCombo(BaseContextHolder.getCompanyId());
+    }
+
     private DocBaseDTO generateMsgObj(Long id){
         return new DocBaseDTO(id, "", "Address");
     }
+
+    /**
+     * 校验
+     * @param name
+     * @return
+     */
+    private boolean validName(String name){
+        int count = getMapper().selectCountByName(name, BaseContextHolder.getCompanyId());
+        if (count > 0){
+            throw new BizException(BizExceptionCode.REPEAT_NAME);
+        }
+        return true;
+    }
 }

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

@@ -331,6 +331,22 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
         }
     }
 
+    @Override
+    public PageInfo<CustomerList> getDbfind(PageRequest page, ListReqDTO listReqDTO) {
+        //设置默认分页
+        if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
+            page = new PageRequest();
+            page.setNumber(1);
+            page.setSize(10);
+        }
+        PageHelper.startPage(page.getNumber(), page.getSize());
+        //查询数据
+        List<CustomerList> lists = customerListMapper.selectDbFind(listReqDTO.getFinalCondition(), BaseContextHolder.getCompanyId());
+        //取分页信息
+        PageInfo<CustomerList> pageInfo = new PageInfo<CustomerList>(lists);
+        return pageInfo;
+    }
+
 
     private List<CustomerList> getListByMode(ListReqDTO req) {
         List<CustomerList> list = null;

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

@@ -2,15 +2,19 @@ package com.usoftchina.saas.document.service.impl;
 
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.MessageLogService;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.exception.BizExceptionCode;
 import com.usoftchina.saas.commons.po.Messagelog;
 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 com.usoftchina.saas.exception.BizException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.Date;
 import java.util.List;
 
 @Service
@@ -28,10 +32,20 @@ public class FundinouttypeServiceImpl extends CommonBaseServiceImpl<Fundinouttyp
     public boolean save(Fundinouttype fundinouttype){
         if(fundinouttype.getId() == 0){
             fundinouttype.setCompanyId(BaseContextHolder.getCompanyId());
+            fundinouttype.setCreatorId(BaseContextHolder.getUserId());
+            fundinouttype.setCreateTime(new Date());
+            //验证名称是否重复
+            validName(fundinouttype.getFt_name());
+
             getMapper().insertSelective(fundinouttype);
             //记录LOG
             messageLogService.save(generateMsgObj(fundinouttype.getId()));
         }else{
+            fundinouttype.setUpdaterId(BaseContextHolder.getUserId());
+            fundinouttype.setUpdateTime(new Date());
+            //验证名称是否重复
+            validName(fundinouttype.getFt_name());
+
             getMapper().updateByPrimaryKeySelective(fundinouttype);
             //记录LOG
             messageLogService.update(generateMsgObj(fundinouttype.getId()));
@@ -58,4 +72,21 @@ public class FundinouttypeServiceImpl extends CommonBaseServiceImpl<Fundinouttyp
         return new DocBaseDTO(id, null, "FundInOutType");
     }
 
+    /**
+     * 校验
+     * @param name
+     * @return
+     */
+    private boolean validName(String name){
+        int count = getMapper().selectCountByName(name, BaseContextHolder.getCompanyId());
+        if (count > 0){
+            throw new BizException(BizExceptionCode.REPEAT_NAME);
+        }
+        return true;
+    }
+
+    @Override
+    public List<ComboDTO> getCombo() {
+        return getMapper().getCombo(BaseContextHolder.getCompanyId());
+    }
 }

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

@@ -4,13 +4,16 @@ import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.MessageLogService;
 import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.exception.BizExceptionCode;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.entities.Productbrand;
 import com.usoftchina.saas.document.mapper.ProductbrandMapper;
 import com.usoftchina.saas.document.service.ProductbrandService;
+import com.usoftchina.saas.exception.BizException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.Date;
 import java.util.List;
 
 @Service
@@ -27,11 +30,21 @@ public class ProductbrandServiceImpl extends CommonBaseServiceImpl<ProductbrandM
     public boolean save(Productbrand productbrand){
         productbrand.setCompanyId(BaseContextHolder.getCompanyId());
         if(productbrand.getId() == 0){
+            productbrand.setCompanyId(BaseContextHolder.getCompanyId());
+            productbrand.setCreatorId(BaseContextHolder.getUserId());
+            productbrand.setCreateTime(new Date());
+            //验证名称是否重复
+            validName(productbrand.getPb_name());
+
             productbrandMapper.insertSelective(productbrand);
             //记录日志
             DocBaseDTO docBaseDTO = new DocBaseDTO(productbrand.getId(), null, LOG_NAME);
             messageLogService.save(docBaseDTO);
         }else{
+            productbrand.setUpdaterId(BaseContextHolder.getUserId());
+            productbrand.setUpdateTime(new Date());
+            //验证名称是否重复
+            validName(productbrand.getPb_name());
             productbrandMapper.updateByPrimaryKeySelective(productbrand);
             //记录日志
             DocBaseDTO docBaseDTO = new DocBaseDTO(productbrand.getId(), null, LOG_NAME);
@@ -53,4 +66,17 @@ public class ProductbrandServiceImpl extends CommonBaseServiceImpl<ProductbrandM
     public List<ComboDTO> getCombo() {
         return getMapper().getCombo(BaseContextHolder.getCompanyId());
     }
+
+    /**
+     * 校验
+     * @param name
+     * @return
+     */
+    private boolean validName(String name){
+        int count = getMapper().selectCountByName(name, BaseContextHolder.getCompanyId());
+        if (count > 0){
+            throw new BizException(BizExceptionCode.REPEAT_NAME);
+        }
+        return true;
+    }
 }

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

@@ -2,14 +2,18 @@ package com.usoftchina.saas.document.service.impl;
 
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.MessageLogService;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.exception.BizExceptionCode;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.entities.Producttype;
 import com.usoftchina.saas.document.mapper.ProducttypeMapper;
 import com.usoftchina.saas.document.service.ProducttypeService;
+import com.usoftchina.saas.exception.BizException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.Date;
 import java.util.List;
 
 @Service
@@ -29,10 +33,18 @@ public class ProducttypeServiceImpl extends CommonBaseServiceImpl<ProducttypeMap
     public boolean save(Producttype producttype){
         if(producttype.getId() == 0){
             producttype.setCompanyId(BaseContextHolder.getCompanyId());
+            producttype.setCreatorId(BaseContextHolder.getUserId());
+            producttype.setCreateTime(new Date());
+            //验证名称是否重复
+            validName(producttype.getPt_name());
             producttypeMapper.insertSelective(producttype);
             //记录LOG
             messageLogService.save(generateMsgObj(producttype.getId()));
         }else{
+            producttype.setUpdaterId(BaseContextHolder.getUserId());
+            producttype.setUpdateTime(new Date());
+            //验证名称是否重复
+            validName(producttype.getPt_name());
             producttypeMapper.updateByPrimaryKeySelective(producttype);
             //记录LOG
             messageLogService.update(generateMsgObj(producttype.getId()));
@@ -64,4 +76,21 @@ public class ProducttypeServiceImpl extends CommonBaseServiceImpl<ProducttypeMap
         return new DocBaseDTO(id, "", "ProductType");
     }
 
+    /**
+     * 校验
+     * @param name
+     * @return
+     */
+    private boolean validName(String name){
+        int count = getMapper().selectCountByName(name, BaseContextHolder.getCompanyId());
+        if (count > 0){
+            throw new BizException(BizExceptionCode.REPEAT_NAME);
+        }
+        return true;
+    }
+
+    @Override
+    public List<ComboDTO> getCombo() {
+        return getMapper().getCombo(BaseContextHolder.getCompanyId());
+    }
 }

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

@@ -2,14 +2,18 @@ package com.usoftchina.saas.document.service.impl;
 
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.MessageLogService;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.exception.BizExceptionCode;
 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 com.usoftchina.saas.exception.BizException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.Date;
 import java.util.List;
 
 @Service
@@ -22,10 +26,19 @@ public class ProductunitServiceImpl extends CommonBaseServiceImpl<ProductunitMap
     public boolean save(Productunit productunit){
         if(productunit.getId() == 0){
             productunit.setCompanyId(BaseContextHolder.getCompanyId());
+            productunit.setCreatorId(BaseContextHolder.getUserId());
+            productunit.setCreateTime(new Date());
+            //验证名称是否重复
+            validName(productunit.getPu_name());
+
             getMapper().insertSelective(productunit);
             //记录LOG
             messageLogService.save(generateMsgObj(productunit.getId()));
         }else{
+            productunit.setUpdaterId(BaseContextHolder.getUserId());
+            productunit.setUpdateTime(new Date());
+            //验证名称是否重复
+            validName(productunit.getPu_name());
             getMapper().updateByPrimaryKeySelective(productunit);
             //记录LOG
             messageLogService.update(generateMsgObj(productunit.getId()));
@@ -58,4 +71,21 @@ public class ProductunitServiceImpl extends CommonBaseServiceImpl<ProductunitMap
         return new DocBaseDTO(id, "", "ProductUnit");
     }
 
+    /**
+     * 校验
+     * @param name
+     * @return
+     */
+    private boolean validName(String name){
+        int count = getMapper().selectCountByName(name, BaseContextHolder.getCompanyId());
+        if (count > 0){
+            throw new BizException(BizExceptionCode.REPEAT_NAME);
+        }
+        return true;
+    }
+
+    @Override
+    public List<ComboDTO> getCombo() {
+        return getMapper().getCombo(BaseContextHolder.getCompanyId());
+    }
 }

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

@@ -4,13 +4,16 @@ import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.MessageLogService;
 import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.exception.BizExceptionCode;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.entities.Vendorkind;
 import com.usoftchina.saas.document.mapper.VendorkindMapper;
 import com.usoftchina.saas.document.service.VendorkindService;
+import com.usoftchina.saas.exception.BizException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.Date;
 import java.util.List;
 
 @Service
@@ -25,10 +28,18 @@ public class VendorkindServiceImpl extends CommonBaseServiceImpl<VendorkindMappe
     public boolean save(Vendorkind vendorkind){
         if(vendorkind.getId() == 0){
             vendorkind.setCompanyId(BaseContextHolder.getCompanyId());
+            vendorkind.setCreatorId(BaseContextHolder.getUserId());
+            vendorkind.setCreateTime(new Date());
+            //验证名称是否重复
+            validName(vendorkind.getVk_name());
             vendorkindMapper.insertSelective(vendorkind);
             //记录LOG
             messageLogService.save(generateMsgObj(vendorkind.getId()));
         }else{
+            vendorkind.setUpdaterId(BaseContextHolder.getUserId());
+            vendorkind.setUpdateTime(new Date());
+            //验证名称是否重复
+            validName(vendorkind.getVk_name());
             vendorkindMapper.updateByPrimaryKeySelective(vendorkind);
             //记录LOG
             messageLogService.update(generateMsgObj(vendorkind.getId()));
@@ -59,4 +70,17 @@ public class VendorkindServiceImpl extends CommonBaseServiceImpl<VendorkindMappe
     public List<ComboDTO> getCombo() {
         return getMapper().getCombo(BaseContextHolder.getCompanyId());
     }
+
+    /**
+     * 校验
+     * @param name
+     * @return
+     */
+    private boolean validName(String name){
+        int count = getMapper().selectCountByName(name, BaseContextHolder.getCompanyId());
+        if (count > 0){
+            throw new BizException(BizExceptionCode.REPEAT_NAME);
+        }
+        return true;
+    }
 }

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

@@ -107,6 +107,8 @@ public class WarehouseServiceImpl extends CommonBaseServiceImpl<WarehouseMapper,
             record.setCreatorId(BaseContextHolder.getUserId());
             record.setCreateTime(new Date());
 
+            //验证名称是否重复
+            validName(record.getWh_description());
             count = getMapper().insertSelective(record);
             //记录LOG
             docBaseDTO = generateMsgObj(record.getId(), code);
@@ -114,6 +116,8 @@ public class WarehouseServiceImpl extends CommonBaseServiceImpl<WarehouseMapper,
         }else{
             record.setUpdateTime(new Date());
             record.setUpdaterId(BaseContextHolder.getUserId());
+            //验证名称是否重复
+            validName(record.getWh_description());
 
             getMapper().updateByPrimaryKeySelective(record);
             //记录LOG
@@ -221,4 +225,17 @@ public class WarehouseServiceImpl extends CommonBaseServiceImpl<WarehouseMapper,
                 getMapper().validateCodeWhenUpdate(code, id, companyId);
         return maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.WAREHOUSE.getCaller()).getData();
     }
+
+    /**
+     * 校验
+     * @param name
+     * @return
+     */
+    private boolean validName(String name){
+        int count = getMapper().selectCountByName(name, BaseContextHolder.getCompanyId());
+        if (count > 0){
+            throw new BizException(BizExceptionCode.REPEAT_NAME);
+        }
+        return true;
+    }
 }

+ 14 - 2
applications/document/document-server/src/main/resources/mapper/AddressMapper.xml

@@ -25,6 +25,9 @@
   </sql>
 
   <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Address">
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
     insert into address (ad_recorddate, companyId,
       updaterId, updateTime, ad_text1, 
       ad_text2, ad_text3, ad_text4, 
@@ -35,6 +38,9 @@
       #{ad_text5,jdbcType=VARCHAR}, #{ad_address,jdbcType=LONGVARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Address">
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
     insert into address
     <trim prefix="(" suffix=")" suffixOverrides=",">
       <if test="ad_recorddate != null">
@@ -135,7 +141,7 @@
         ad_address = #{ad_address,jdbcType=LONGVARCHAR},
       </if>
     </set>
-    where ad_id = #{ad_id,jdbcType=INTEGER}
+    where ad_id = #{id}
   </update>
   <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.saas.document.entities.Address">
     update address
@@ -164,7 +170,7 @@
       ad_text5 = #{ad_text5,jdbcType=VARCHAR}
     where ad_id = #{id}
   </update>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
     delete from address
     where ad_id = #{id}
   </delete>
@@ -175,4 +181,10 @@
   <select id="selectAll" resultMap="ResultMapWithBLOBs">
     SELECT * FROM ADDRESS
   </select>
+  <select id="selectCountByName" resultType="int">
+    SELECT * FROM ADDRESS WHERE AD_ADDRESS=#{name} ADN COMPANYID=#{companyId}
+  </select>
+    <select id="getCombo" resultType="com.usoftchina.saas.commons.dto.ComboDTO">
+        SELECT AD_ADDRESS display,AD_ADDRESS value FROM ADDRESS WHERE COMPANYID=#{companyId}
+    </select>
 </mapper>

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

@@ -63,6 +63,19 @@
     </where>  order by cu_id
   </select>
 
+  <select id="selectDbFind" resultMap="BaseResultMap">
+    SELECT * FROM CUSTOMER LEFT JOIN CUSTOMERADDRESS ON CU_ID=CA_CUID AND CUSTOMERADDRESS.CA_DEFAULT=1
+    <where>
+      <if test="condition != null">
+        ${condition}
+      </if>
+      <if test="companyId!=null">
+        and customer.companyid = #{companyId}
+      </if>
+    </where>
+    order by cu_id
+  </select>
+
   <select id="selectCustomerBycondition"  resultMap="BaseResultMap">
     select  *  from customer
     <where>

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

@@ -11,7 +11,7 @@
     <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
     <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
   </resultMap>
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
     select 
     <include refid="Base_Column_List" />
     from customerkind
@@ -20,7 +20,7 @@
   <sql id="Base_Column_List" >
     ck_id, ck_name, ck_recordid, ck_recorder, ck_date, companyId, updaterId, updateTime
   </sql>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
     delete from customerkind
     where ck_id = #{id}
   </delete>

+ 15 - 3
applications/document/document-server/src/main/resources/mapper/FundinouttypeMapper.xml

@@ -20,13 +20,16 @@
     select 
     <include refid="Base_Column_List" />
     from fundinouttype
-    where ft_id = #{id,jdbcType=INTEGER}
+    where ft_id = #{id}
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
     delete from fundinouttype
-    where ft_id = #{id,jdbcType=INTEGER}
+    where ft_id = #{id}
   </delete>
   <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Fundinouttype" >
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
     insert into fundinouttype (ft_name, ft_kind,
       ft_recordid, ft_recorder, ft_date, 
       companyId, updaterId, updateTime
@@ -37,6 +40,9 @@
       )
   </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Fundinouttype" >
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
     insert into fundinouttype
     <trim prefix="(" suffix=")" suffixOverrides="," >
       <if test="ft_name != null" >
@@ -131,9 +137,15 @@
       companyId = #{companyId,jdbcType=INTEGER},
       updaterId = #{updaterId,jdbcType=INTEGER},
       updateTime = #{updateTime,jdbcType=TIMESTAMP}
-    where ft_id = #{id,jdbcType=INTEGER}
+    where ft_id = #{id}
   </update>
   <select id="selectAll" resultMap="BaseResultMap">
     SELECT * FROM FUNDINOUTTYPE
   </select>
+  <select id="selectCountByName" resultType="int">
+    SELECT COUNT(*) FROM FUNDINOUTTYPE WHERE FT_NAME=#{name} AND COMPANYID=#{companyId}
+  </select>
+    <select id="getCombo" resultType="com.usoftchina.saas.commons.dto.ComboDTO">
+        SELECT FT_NAME display,FT_NAME value FROM FUNDINOUTTYPE
+    </select>
 </mapper>

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

@@ -94,6 +94,9 @@
         where pr_id = #{id}
     </delete>
     <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Product" >
+        <selectKey resultType="java.lang.Long" keyProperty="id">
+            SELECT LAST_INSERT_ID() AS ID
+        </selectKey>
         insert into product (pr_code, pr_detail,
         pr_spec, pr_unit, pr_kind,
         pr_orispeccode, pr_whid, pr_whcode,
@@ -118,6 +121,9 @@
         #{pr_text4,jdbcType=VARCHAR}, #{pr_text5,jdbcType=VARCHAR})
     </insert>
     <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Product" >
+        <selectKey resultType="java.lang.Long" keyProperty="id">
+            SELECT LAST_INSERT_ID() AS ID
+        </selectKey>
         insert into product
         <trim prefix="(" suffix=")" suffixOverrides="," >
             <if test="pr_code != null" >

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

@@ -11,7 +11,7 @@
     <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
     <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
   </resultMap>
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
     select 
     *
     from productbrand
@@ -20,11 +20,14 @@
   <sql id="Base_Column_List" >
     pb_id, pb_name, pb_recordid, pb_recorder, pb_date, companyId, updaterId, updateTime
   </sql>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
     delete from productbrand
     where pb_id = #{id}
   </delete>
   <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Productbrand" >
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
     insert into productbrand (pb_name, pb_recordid,
       pb_recorder, pb_date, companyId, 
       updaterId, updateTime)
@@ -33,6 +36,9 @@
       #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP})
   </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Productbrand" >
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
     insert into productbrand
     <trim prefix="(" suffix=")" suffixOverrides="," >
       <if test="pb_name != null" >
@@ -126,4 +132,7 @@
   <select id="getCombo" resultType="com.usoftchina.saas.commons.dto.ComboDTO">
     SELECT PB_NAME display,PB_NAME value FROM PRODUCTBRAND
   </select>
+  <select id="selectCountByName" resultType="int">
+    SELECT COUNT(*) FROM PRODUCTBRAND WHERE PB_NAME=#{name} AND COMPANYID=#{companyId}
+  </select>
 </mapper>

+ 14 - 2
applications/document/document-server/src/main/resources/mapper/ProducttypeMapper.xml

@@ -14,17 +14,20 @@
   <sql id="Base_Column_List">
     pt_id, pt_name, pt_recordid, pt_recorder, pt_date, companyId, updaterId, updateTime
   </sql>
-  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     select 
     <include refid="Base_Column_List" />
     from producttype
     where pt_id = #{id}
   </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
     delete from producttype
     where pt_id = #{id}
   </delete>
   <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Producttype">
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
     insert into producttype (pt_name, pt_recordid,
       pt_recorder, pt_date, companyId, 
       updaterId, updateTime)
@@ -33,6 +36,9 @@
       #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP})
   </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Producttype">
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
     insert into producttype
     <trim prefix="(" suffix=")" suffixOverrides=",">
       <if test="pt_name != null">
@@ -122,4 +128,10 @@
   <select id="selectAll" resultMap="BaseResultMap">
     SELECT * FROM PRODUCTTYPE
   </select>
+    <select id="selectCountByName" resultType="int">
+        SELECT COUNT(*) FROM PRODUCTTYPE WHERE PT_NAME=#{name} AND COMPANYID=#{companyId}
+    </select>
+    <select id="getCombo" resultType="com.usoftchina.saas.commons.dto.ComboDTO">
+        SELECT PT_NAME display,PT_NAME value FROM PRODUCTTYPE WHERE COMPANYID=#{companyId}
+    </select>
 </mapper>

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

@@ -122,4 +122,10 @@
   <select id="selectAll" resultMap="BaseResultMap">
     SELECT * FROM PRODUCTUNIT
   </select>
+    <select id="selectCountByName" resultType="int">
+        SELECT COUNT(*) FROM productunit WHERE PU_NAME=#{name} AND COMPANYID=#{companyId}
+    </select>
+    <select id="getCombo" resultType="com.usoftchina.saas.commons.dto.ComboDTO">
+        SELECT PU_NAME display,PU_NAME value FROM PRODUCTUNIT WHERE COMPANYID=#{companyId}
+    </select>
 </mapper>

+ 5 - 2
applications/document/document-server/src/main/resources/mapper/VendorkindMapper.xml

@@ -14,13 +14,13 @@
   <sql id="Base_Column_List">
     vk_id, vk_name, vk_recordid, vk_recorder, vk_date, companyId, updaterId, updateTime
   </sql>
-  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     select
     <include refid="Base_Column_List" />
     from vendorkind
     where vk_id = #{id}
   </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
     delete from vendorkind
     where vk_id = #{id}
   </delete>
@@ -131,4 +131,7 @@
   <select id="getCombo" resultType="com.usoftchina.saas.commons.dto.ComboDTO">
     SELECT VK_NAME display, VK_NAME value FROM VENDORKIND WHERE COMPANYID=#{companyId}
   </select>
+  <select id="selectCountByName" resultType="int">
+    SELECT COUNT(*) FROM VENDORKIND WHERE VK_NAME=#{name} AND COMPANYID=#{companyId}
+  </select>
 </mapper>

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

@@ -8,7 +8,7 @@
         <result column="wh_description" property="wh_description" jdbcType="VARCHAR" />
         <result column="wh_statuscode" property="wh_statuscode" jdbcType="VARCHAR" />
         <result column="wh_status" property="wh_status" jdbcType="TIMESTAMP" />
-        <result column="wh_recordid" property="wh_recordid" jdbcType="INTEGER" />
+        <result column="wh_recordid" property="wh_recorderid" jdbcType="INTEGER" />
         <result column="wh_recorder" property="wh_recorder" jdbcType="INTEGER" />
         <result column="wh_date" property="wh_date" jdbcType="INTEGER" />
         <result column="companyId" property="companyId" jdbcType="INTEGER" />
@@ -316,7 +316,7 @@
         select count(*) from WAREHOUSE where WH_CODE = #{code} and WH_ID != #{id} and companyId =#{companyId}
     </select>
 
-    <select id="selectWarehouseListByCondition">
+    <select id="selectWarehouseListByCondition" resultMap="WarehouseResultMapper">
         select  *  from warehouse
         <where>
             <if test="con != null">
@@ -329,6 +329,9 @@
         order by wh_id
     </select>
 
+    <select id="selectCountByName" resultType="int">
+        SELECT COUNT(*) FROM warehouse WHERE wh_description=#{name} AND COMPANYID=#{companyId}
+    </select>
 
 </mapper>
 

+ 58 - 0
applications/document/document-server/src/test/java/com/usoftchina/saas/document/mapper/WarehouseMapperTest.java

@@ -0,0 +1,58 @@
+package com.usoftchina.saas.document.mapper;
+
+import org.junit.Test;
+
+/**
+ * Created by zdw
+ * 2018-10-30 14:00.
+ */
+public class WarehouseMapperTest {
+    @Test
+    public void post() throws Exception {
+    }
+
+    @Test
+    public void validPeriod() throws Exception {
+    }
+
+    @Test
+    public void deleteByPrimaryKey() throws Exception {
+    }
+
+    @Test
+    public void insert() throws Exception {
+    }
+
+    @Test
+    public void insertSelective() throws Exception {
+    }
+
+    @Test
+    public void selectByPrimaryKey() throws Exception {
+    }
+
+    @Test
+    public void updateByPrimaryKeySelective() throws Exception {
+    }
+
+    @Test
+    public void updateByPrimaryKey() throws Exception {
+    }
+
+    @Test
+    public void unPost() throws Exception {
+    }
+
+    @Test
+    public void validateCodeWhenInsert() throws Exception {
+    }
+
+    @Test
+    public void validateCodeWhenUpdate() throws Exception {
+    }
+
+    @Test
+    public void selectWarehouseListByCondition() throws Exception {
+    }
+
+}

+ 13 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/VerificationController.java

@@ -2,6 +2,7 @@ package com.usoftchina.saas.money.controller;
 
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocSavedDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.money.dto.VerificationFormDTO;
@@ -106,4 +107,16 @@ public class VerificationController {
         verificationService.resAudit(id);
         return Result.success();
     }
+
+    @RequestMapping("/batchAudit")
+    public Result batchAudit(@RequestBody  BatchDealBaseDTO body) {
+        verificationService.batchAudit(body);
+        return Result.success();
+    }
+
+    @RequestMapping("/batchUnAudit")
+    public Result batchUnAudit(@RequestBody BatchDealBaseDTO body) {
+        verificationService.batchUnAudit(body);
+        return Result.success();
+    }
 }

+ 13 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/VerificationService.java

@@ -1,6 +1,7 @@
 package com.usoftchina.saas.money.service;
 
 import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocSavedDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.money.dto.VerificationFormDTO;
@@ -69,4 +70,16 @@ public interface VerificationService {
      */
     void resAudit(Long id);
 
+    /**
+     * 批量审核核销单
+     * @param formData
+     * @return
+     */
+    void batchAudit(BatchDealBaseDTO baseDTO);
+
+    /**
+     * 批量反审核核销单
+     * @param id
+     */
+    void batchUnAudit(BatchDealBaseDTO baseDTO);
 }

+ 30 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/VerificationServiceImpl.java

@@ -5,6 +5,7 @@ import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.MaxnumberService;
 import com.usoftchina.saas.commons.api.MessageLogService;
+import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.DocSavedDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
@@ -29,6 +30,7 @@ import org.springframework.util.StringUtils;
 
 import java.util.ArrayList;
 import java.util.Date;
+import java.util.Iterator;
 import java.util.List;
 
 @Service
@@ -294,6 +296,34 @@ public class VerificationServiceImpl extends CommonBaseServiceImpl<VerificationM
         messageLogService.unAudit(baseDTO);
     }
 
+    @Override
+    public void batchAudit(BatchDealBaseDTO baseDTO) {
+        Iterator isList = baseDTO.getBaseDTOs().iterator();
+        while (isList.hasNext()){
+            DocBaseDTO docBaseDTO = (DocBaseDTO) isList.next();
+            Long id = docBaseDTO.getId();
+            Verification verification = new Verification();
+            verification.setVc_status(Status.AUDITED.getDisplay());
+            verification.setVc_statuscode(Status.AUDITED.name());
+            verification.setVc_id(Integer.valueOf(String.valueOf(id)));
+            verificationMapper.updateByPrimaryKeySelective(verification);
+        }
+    }
+
+    @Override
+    public void batchUnAudit(BatchDealBaseDTO baseDTO) {
+        Iterator isList = baseDTO.getBaseDTOs().iterator();
+        while (isList.hasNext()){
+            DocBaseDTO docBaseDTO = (DocBaseDTO) isList.next();
+            Long id = docBaseDTO.getId();
+            Verification verification = new Verification();
+            verification.setVc_status(Status.UNAUDITED.getDisplay());
+            verification.setVc_statuscode(Status.UNAUDITED.name());
+            verification.setVc_id(Integer.valueOf(String.valueOf(id)));
+            verificationMapper.updateByPrimaryKeySelective(verification);
+        }
+    }
+
     private String pushMaxnubmer(String code, Long id) {
         if (null == code) {
             throw new BizException(BizExceptionCode.NULL_CODE);

+ 52 - 0
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/config/WebConfig.java

@@ -0,0 +1,52 @@
+package com.usoftchina.saas.sale.config;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.http.converter.HttpMessageConverter;
+import org.springframework.http.converter.StringHttpMessageConverter;
+import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
+import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
+
+import java.nio.charset.Charset;
+import java.text.SimpleDateFormat;
+import java.util.List;
+
+
+/**
+ * @author: guq
+ * @create: 2018-10-30 11:20
+ **/
+
+@Configuration
+public class WebConfig extends WebMvcConfigurationSupport{
+    @Bean
+    public HttpMessageConverter<String> responseBodyConverter() {
+        StringHttpMessageConverter converter = new StringHttpMessageConverter(Charset.forName("UTF-8"));
+        return converter;
+    }
+
+    @Bean
+    public MappingJackson2HttpMessageConverter MappingJacksonHttpMessageConverter(){
+        MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
+        ObjectMapper objectMapper = new ObjectMapper();
+        objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
+        converter.setObjectMapper(objectMapper);
+        return converter;
+    }
+
+    @Override
+    public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
+        super.configureMessageConverters(converters);
+        converters.add(responseBodyConverter());
+        converters.add(MappingJacksonHttpMessageConverter());
+    }
+
+    @Override
+    public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
+        configurer.favorPathExtension(false);
+    }
+
+}
+

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

@@ -91,12 +91,16 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         prodInOut.setCompanyId(companyId);
         prodInOut.setCreatorId(userId);
         prodInOut.setCreateTime(new Date());
-        prodInOut.setPi_date(new Date());
+        prodInOut.setPi_recordmanid(userId);
+        prodInOut.setPi_recorddate(new Date());
+        prodInOut.setPi_recordman("TESTADMIN");
 
+        if(prodInOut.getPi_date() == null){
+            prodInOut.setPi_date(new Date());
+        }
         //编号获取
         pi_inoutno = pushMaxnubmer(prodInOut);
         prodInOut.setPi_inoutno(pi_inoutno);
-
         prodInOut.setPi_class(main.getPi_class());
         prodInOut.setPi_said(main.getPi_said());
         prodInOut.setPi_sacode(main.getPi_sacode());
@@ -112,6 +116,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 detail.setPd_piid(pi_id);
                 detail.setPd_inoutno(pi_inoutno);
                 detail.setPd_piclass(pi_class);
+                detail.setCompanyId(companyId);
+                detail.setCreateTime(new Date());
                 detail.setPd_yqty(0.0);
                 insertDetails.add(detail);
             }
@@ -394,10 +400,17 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         String piInoutno =
                 //BillCodeSeq.SALEIN.getCaller() + Math.abs(Math.random()*100);
                 maxnumberService.getMaxnumber(BillCodeSeq.SALEIN.getCaller(),true).getData();
+        //设置公司id
+        targetPi.setCompanyId(sourcePi.getCompanyId());
+        targetPi.setCreateTime(new Date());
+        targetPi.setCreatorId(BaseContextHolder.getUserId());
+        targetPi.setPi_recordmanid(BaseContextHolder.getUserId());
+        targetPi.setPi_recorddate(new Date());
+        targetPi.setPi_recordman("TESTADMIN");
+
         targetPi.setPi_inoutno(piInoutno);
         targetPi.setPi_class(BillCodeSeq.SALEIN.getName());
         targetPi.setPi_date(new Date());
-        targetPi.setPi_recorddate(new Date());
         targetPi.setPi_status(Status.UNAUDITED.getDisplay());
         targetPi.setPi_statuscode(Status.UNAUDITED.name());
         //客户信息
@@ -406,9 +419,6 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         targetPi.setPi_custname(sourcePi.getPi_custname());
         targetPi.setPi_said(sourcePi.getPi_said());
         targetPi.setPi_sacode(sourcePi.getPi_sacode());
-
-        //设置公司id
-        targetPi.setCompanyId(sourcePi.getCompanyId());
         //保存数据
         getMapper().insertSelective(targetPi);
         //插入销售退货单从表
@@ -419,6 +429,9 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             pdOutqty = sourcePid.getPd_outqty()==null?0.0:sourcePid.getPd_outqty();
             pdYqty = sourcePid.getPd_yqty()==null?0.0:sourcePid.getPd_yqty();
             if(pdOutqty-pdYqty>0){
+                //公司id
+                targetPid.setCompanyId(sourcePid.getCompanyId());
+                targetPid.setCreateTime(new Date());
                 targetPid.setPd_piid(pi_id);
                 targetPid.setPd_inoutno(piInoutno);
                 targetPid.setPd_piclass(BillCodeSeq.SALEIN.getName());
@@ -436,8 +449,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 targetPid.setPd_unit(sourcePid.getPd_unit());
                 targetPid.setPd_ioid(sourcePid.getId());
                 targetPid.setPd_status(0);
-                //公司id
-                targetPid.setCompanyId(sourcePid.getCompanyId());
+
                 //本次转单数
                 targetPid.setPd_inqty(pdOutqty-pdYqty);
                 prodIODetailMapper.insertSelective(targetPid);

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

@@ -439,7 +439,7 @@ public class SaleServiceImpl implements SaleService{
         String pi_inoutno = maxnumberService.getMaxnumber(BillCodeSeq.SALEOUT.getCaller(),
                 true).getData();
         prodInOut.setPi_inoutno(pi_inoutno);
-        prodInOut.setPi_class("出货单");
+        prodInOut.setPi_class(BillCodeSeq.SALEOUT.getName());
         prodInOut.setPi_date(new Date());
         prodInOut.setPi_status(Status.UNAUDITED.getDisplay());
         prodInOut.setPi_statuscode(Status.UNAUDITED.name());
@@ -461,7 +461,7 @@ public class SaleServiceImpl implements SaleService{
             ProdIODetail prodIODetail = new ProdIODetail();
             prodIODetail.setPd_piid(pi_id);
             prodIODetail.setPd_inoutno(pi_inoutno);
-            prodIODetail.setPd_piclass("出货单");
+            prodIODetail.setPd_piclass(BillCodeSeq.SALEOUT.getName());
             prodIODetail.setPd_pdno(i);
             prodIODetail.setPd_orderid(sale.getId());
             prodIODetail.setPd_ordercode(sale.getSa_code());

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

@@ -41,7 +41,7 @@
     <result column="pd_ym" jdbcType="INTEGER" property="pd_ym" />
     <result column="pd_yqty" jdbcType="INTEGER" property="pd_yqty" />
     <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
-    <association property="productDTO" javaType="com.usoftchina.saas.document.entities.Product">
+    <association property="productDTO" javaType="com.usoftchina.saas.document.dto.ProductDTO">
       <id column="pr_id" property="id"/>
       <result column="pr_code" property="pr_code"/>
       <result column="pr_detail" property="pr_detail"/>
@@ -739,16 +739,16 @@
 
   <update id="updateSaleOutYqty" parameterType="long">
 update prodiodetail
-  set a.pd_yqty =ifnull((select  b.pd_inqty  from  (select pi_said,sum(pd_inqty) pd_inqty from  prodiodetail left join prodinout on pd_piid = pi_id where pd_piclass='销售退货单'
-and pi_said=#{id}  GROUP BY pd_ioid) b where ifnull(b.pd_ioid ,0)= a.pd_id ),0)
+  set a.pd_yqty =IFNULL((select  b.pd_inqty  from  (select pi_said,sum(pd_inqty) pd_inqty from  prodiodetail left join prodinout on pd_piid = pi_id where pd_piclass='销售退货单'
+and pi_said=#{id}  GROUP BY pd_ioid) b where IFNULL(b.pd_ioid ,0)= a.pd_id ),0)
 where a.pd_piid = (select pi_id from prodinout where pi_said=#{id} and pi_class='销售出货单')
   </update>
   <update id="updateSaleYqty" parameterType="long">
     update saledtail
-    set a.sd_yqty =ifnull((
+    set a.sd_yqty =IFNULL((
     select  b.pd_ounqty  from  (select pi_said,sum(pd_outqty) pd_outqty
       from  prodiodetail left join prodinout on pd_piid = pi_id where pd_piclass='销售出货单'
-      and pi_said=#{id}  GROUP BY pi_said) b where ifnull(b.pd_ioid ,0)= a.pd_id
+      and pi_said=#{id}  GROUP BY pi_said) b where IFNULL(b.pd_ioid ,0)= a.pd_id
       ),0)
     where a.sd_said = #{id}
   </update>
@@ -760,16 +760,16 @@ where a.pd_piid = (select pi_id from prodinout where pi_said=#{id} and pi_class=
 
   <update id="updatePDSaleIN" parameterType="long">
    update prodiodetail set
-   pd_total=ifnull(pd_inqty,0)*ifnull(pd_orderprice,0),
-   pd_netprice = ifnull(pd_sendprice,0)/(1+ifnull(pd_taxrate,0)/100),
-   pd_nettotal = (ifnull(pd_sendprice,0)/(1+ifnull(pd_taxrate,0)/100))*ifnull(pd_inqty)
+   pd_total=IFNULL(pd_inqty,0)*IFNULL(pd_orderprice,0),
+   pd_netprice = IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100),
+   pd_nettotal = (IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100))*IFNULL(pd_inqty,0)
    where pd_piid=#{id}
   </update>
   <update id="updatePDSaleOut" parameterType="long">
     update prodiodetail set
-    pd_total=ifnull(pd_outqty,0)*ifnull(pd_orderprice,0),
-    pd_netprice = ifnull(pd_sendprice,0)/(1+ifnull(pd_taxrate,0)/100),
-    pd_nettotal = (ifnull(pd_sendprice,0)/(1+ifnull(pd_taxrate,0)/100))*ifnull(pd_outqty)
+    pd_total=IFNULL(pd_outqty,0)*IFNULL(pd_orderprice,0),
+    pd_netprice = IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100),
+    pd_nettotal = (IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100))*IFNULL(pd_outqty,0)
     where pd_piid=#{id}
   </update>
 </mapper>

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

@@ -34,6 +34,7 @@
     <result column="pi_text5" jdbcType="VARCHAR" property="pi_text5" />
     <result column="pi_auditdate" jdbcType="TIMESTAMP" property="pi_auditdate" />
     <result column="pi_auditman" jdbcType="VARCHAR" property="pi_auditman" />
+    <result column="pi_address" jdbcType="VARCHAR" property="pi_address" />
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.storage.po.ProdInOut">
     <result column="pi_address" jdbcType="LONGVARCHAR" property="pi_address" />

+ 1 - 0
applications/sale/sale-server/src/main/resources/mapper/SaledetailMapper.xml

@@ -16,6 +16,7 @@
     <result column="sd_delivery" property="sd_delivery" jdbcType="TIMESTAMP" />
     <result column="sd_sendqty" property="sd_sendqty" jdbcType="DOUBLE" />
     <result column="sd_pdqty" property="sd_pdqty" jdbcType="DOUBLE" />
+    <result column="sd_yqty" property="sd_yqty" jdbcType="DOUBLE" />
     <result column="sd_remark" property="sd_remark" jdbcType="VARCHAR" />
     <result column="companyId" property="companyId" jdbcType="INTEGER" />
     <result column="updaterId" property="updaterId" jdbcType="INTEGER" />

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

@@ -43,7 +43,7 @@ public class ProdInOutDTO extends CommonBaseDTO implements Serializable {
 
     private Double pi_total;
 
-    private Integer pi_recordmanid;
+    private Long pi_recordmanid;
 
     private String pi_recordman;
 

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

@@ -41,7 +41,7 @@ public class ProdInOutListDTO extends CommonBaseEntity implements Serializable {
 
     private Double pi_total;
 
-    private Integer pi_recordmanid;
+    private Long pi_recordmanid;
 
     private String pi_recordman;
 

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

@@ -37,7 +37,7 @@ public class ProdInOut extends CommonBaseEntity implements Serializable {
 
     private Double pi_total;
 
-    private Integer pi_recordmanid;
+    private Long pi_recordmanid;
 
     private String pi_recordman;
 

+ 1 - 1
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOutList.java

@@ -40,7 +40,7 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private Double pi_total;
 
-    private Integer pi_recordmanid;
+    private Long pi_recordmanid;
 
     private String pi_recordman;
 

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

@@ -153,7 +153,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
             },
             {
                 text : "数量", 
-                dataIndex : "pd_inqty", 
+                dataIndex : "pd_outqty", 
                 editor : {
                     xtype : "numberfield"
                 },