Browse Source

Merge remote-tracking branch 'origin/dev' into dev

heqinwei 7 years ago
parent
commit
3eab5c2c90
59 changed files with 635 additions and 314 deletions
  1. 13 3
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java
  2. 2 1
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/EndProductServiceImpl.java
  3. 1 1
      applications/commons/commons-server/src/main/resources/application.yml
  4. 4 4
      applications/commons/commons-server/src/main/resources/i18n/messages_zh_CN.properties
  5. 1 1
      applications/commons/commons-server/src/main/resources/mapper/EndProductMapper.xml
  6. 4 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/BomServiceImpl.java
  7. 5 5
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java
  8. 2 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/EmployeeServiceImpl.java
  9. 15 12
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java
  10. 9 7
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/VendorServiceImpl.java
  11. 35 35
      applications/document/document-server/src/main/resources/mapper/ProductDetailMapper.xml
  12. 4 4
      applications/document/document-server/src/main/resources/mapper/ProductMapper.xml
  13. 10 6
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/PaybalanceServiceImpl.java
  14. 7 3
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/RecbalanceServiceImpl.java
  15. 5 2
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/VerificationServiceImpl.java
  16. 2 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/ProdInOutMapper.java
  17. 10 6
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java
  18. 12 8
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  19. 3 3
      applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutListMapper.xml
  20. 21 2
      applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutMapper.xml
  21. 11 6
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/ProdInOutServiceImpl.java
  22. 7 3
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java
  23. 4 2
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdInOutDTO.java
  24. 2 4
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOut.java
  25. 2 4
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/ProdInOutMapper.java
  26. 19 11
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/MakeServiceImpl.java
  27. 9 3
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/ProdInOutServiceImpl.java
  28. 10 7
      applications/storage/storage-server/src/main/resources/mapper/ProdInOutListMapper.xml
  29. 62 99
      applications/storage/storage-server/src/main/resources/mapper/ProdInOutMapper.xml
  30. 4 0
      base-servers/account/account-dto/pom.xml
  31. 39 0
      base-servers/account/account-dto/src/main/java/com/usoftchina/saas/account/dto/CompanyDTO.java
  32. 41 5
      base-servers/account/account-dto/src/main/java/com/usoftchina/saas/account/dto/CompanyRegDTO.java
  33. 12 0
      base-servers/account/account-server/pom.xml
  34. 2 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/AccountApplication.java
  35. 9 2
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/controller/AccountController.java
  36. 12 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/controller/CompanyController.java
  37. 7 1
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/mapper/AccountRoleMapper.java
  38. 7 1
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/mapper/CompanyMapper.java
  39. 28 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/po/Company.java
  40. 4 1
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/AccountService.java
  41. 17 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/CompanyService.java
  42. 21 2
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/impl/AccountServiceImpl.java
  43. 29 2
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/impl/CompanyServiceImpl.java
  44. 11 0
      base-servers/account/account-server/src/main/resources/mapper/AccountRoleMapper.xml
  45. 32 4
      base-servers/account/account-server/src/main/resources/mapper/CompanyMapper.xml
  46. 13 13
      base-servers/file/file-api/src/main/java/com/usoftchina/saas/file/api/FileApi.java
  47. 2 0
      base-servers/file/file-server/src/main/java/com/usoftchina/saas/file/FileApplication.java
  48. 16 16
      base-servers/file/file-server/src/main/java/com/usoftchina/saas/file/controller/FileController.java
  49. 1 6
      base-servers/gateway-server/src/main/resources/application.yml
  50. 26 0
      frontend/saas-web/app/view/purchase/purchase/QueryPanel.js
  51. 2 2
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js
  52. 1 5
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js
  53. 2 2
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js
  54. 1 1
      frontend/saas-web/app/view/stock/appropriationInOut/FormPanel.js
  55. 1 1
      frontend/saas-web/app/view/stock/appropriationInOut/QueryPanel.js
  56. 1 1
      frontend/saas-web/app/view/stock/otherIn/FormPanel.js
  57. 1 1
      frontend/saas-web/app/view/stock/otherIn/QueryPanel.js
  58. 1 1
      frontend/saas-web/app/view/stock/otherOut/FormPanel.js
  59. 1 1
      frontend/saas-web/app/view/stock/otherOut/QueryPanel.js

+ 13 - 3
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java

@@ -30,22 +30,28 @@ public enum BizExceptionCode implements BaseExceptionCode {
     BIZ_RELDELETE_UPDATEPROD(79307,"存在关联单据,不允许更新"),
     BIZ_RELDELETE_DELETEPROD(79308,"存在关联单据,不允许删除"),
     BIZ_PRODWHCODE_REPEAT(79309, "明细仓库重复"),
+    BIZ_UNENDPRODUCT(79310,"系统还未结账,不能反结账"),
     NO_OPRATIONDATA(79400,"无可操作单据"),
     BOM_SAVE(79401, "产品编号+版本号已存在"),
     REPEAT_NAME(79501, "名称重复"),
     REPEAT_CODE(79502, "编号重复"),
+    REPEAT_CUSTOMERCODE(79503, "客户名称或编号重复"),
+    REPEAT_TEL(79504, "电话号码重复"),
     NO_DATA(79998, "未找到数据"),
     ILLEGAL_ID(79999, "id不正确"),
     PRODUCT_HAS_WAREHOUSE(79502, "存在物料默认仓库资料为该仓库资料,无法删除"),
     PRODUCTWH_HAS_WAREHOUSE(79503, "该仓库资料存在库存,无法删除"),
     ACCOUNT_EXISTS(79503, "账号已存在"),
+    DEAL_FAILED(79800, "编号:<u>%s</u>处理失败,%s"),
     USING_EXISTS(79504, ""),
 
 
 
     //采购 70000-71999
     PURCCHECKIN_POST_ERROR(70000,""),
-    PURCHASE_UNAUDIT_ERROR(72006,"采购订单已转采购验收单,无法反审核"),
+    PURCHASE_UNAUDIT_ERROR(71001,"采购订单已转采购验收单,无法反审核"),
+    PURCHASE_DETAIL_OVERNUM(70001, "明细行数量超过来源采购验收单明细行数量"),
+    PURCHASE_ORDER_HASAUDIT(70002, "存在已审核单据,单据编号:%s"),
 
 
     //销售
@@ -57,19 +63,23 @@ public enum BizExceptionCode implements BaseExceptionCode {
     SALEOUT_POSTSTATUS_ERROR(72004,"当前单据状态无法进行此操作。"),
     SALEOUT_POST_ERROR(72005,""),
     SALEOUT_UNAUDIT_ERROR(72006,"销售订单已转出货单,无法反审核"),
+    SALE_ORDER_HASAUDIT(72003, "存在已审核单据,单据编号:%s"),
 
     //资金
     PAYBALANCE_OUTNOWBALANCE(74001,"本次核销金额不能大于未核销金额"),
     PAYBALANCE_UNIQUESOURCECODE(74002, "保存失败!不能选择重复的源单"),
-
+    PAYBALANCE_NOWAMOUNT_POSITIVE(74005, "单据类型为<u>%s</u>的单据,核销金额必须为正数"),
+    PAYBALANCE_NOWAMOUNT_NEGATIVE(74005, "单据类型为<u>%s</u>的单据,核销金额必须为负数"),
     RECALANCE_OUTNOWBALANCE(74003,"本次核销金额不能大于未核销金额"),
-
+    BEFORE_UNAUDIT(74006, "单据:<u>%s</u>未审核,无法反审核"),
     BANK_AMOUNT_NOTENOUGH(74004, "资金账号不足"),
 
 
 
     //库存
     EMPTY_DATA(76100,"数据为空,请填写后再保存"),
+    UNENOUGH_DETAIL_STOCK(76300, "行%s库存不足"),
+    UNENOUGH_STOCK(76400, "%s :库存不足"),
     STORAGE_POST_ERROR(76200,""),
     ;
     private int code;

+ 2 - 1
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/EndProductServiceImpl.java

@@ -5,6 +5,7 @@ import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.commons.dto.MessagelogDTO;
+import com.usoftchina.saas.commons.exception.BizExceptionCode;
 import com.usoftchina.saas.commons.mapper.EndProductMapper;
 import com.usoftchina.saas.commons.mapper.MessagelogMapper;
 import com.usoftchina.saas.commons.po.Operation;
@@ -72,7 +73,7 @@ public class EndProductServiceImpl implements EndProductService {
     public void unEndAccount() {
         String period = endProductMapper.selectUnPeriod(BaseContextHolder.getCompanyId());
         if (StringUtils.isEmpty(period)){
-            throw new BizException(79306,"系统还未结账,不能反结账");
+            throw new BizException(BizExceptionCode.BIZ_UNENDPRODUCT);
         }else{
             endProductMapper.updatePeriodStatus(0L, period, BaseContextHolder.getCompanyId());
             messageLogService.customizeLog(generateMsgObj(Long.parseLong(period)), Operation.UNENDPRODUCT);

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

@@ -53,7 +53,7 @@ eureka:
   client:
     registryFetchIntervalSeconds: 5
     serviceUrl:
-       defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8510/eureka/
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8510/eureka/
 server:
   port: 8920
   tomcat:

+ 4 - 4
applications/commons/commons-server/src/main/resources/i18n/messages_zh_CN.properties

@@ -116,7 +116,7 @@ msg.getBill=\u83b7\u53d6\u53d1\u7968\u660e\u7ec6
 msg.getARBill=\u83b7\u53d6\u5e94\u6536\u53d1\u7968
 msg.getAPBill=\u83b7\u53d6\u5e94\u4ed8\u53d1\u7968
 msg.getSuccess=\u83b7\u53d6\u6210\u529f
-msg.endProdudct=\u8bb0\u8d26\u64cd\u4f5c
-msg.endProdudctSuccess=\u8bb0\u8d26\u6210\u529f
-msg.unEndProduct=\u53cd\u8bb0\u8d26\u64cd\u4f5c
-msg.unEndProductSuccess=\u53cd\u8bb0\u8d26\u6210\u529f
+msg.endProdudct=\u7ed3\u8d26\u64cd\u4f5c
+msg.endProdudctSuccess=\u7ed3\u8d26\u6210\u529f
+msg.unEndProduct=\u53cd\u7ed3\u8d26\u64cd\u4f5c
+msg.unEndProductSuccess=\u53cd\u7ed3\u8d26\u6210\u529f

+ 1 - 1
applications/commons/commons-server/src/main/resources/mapper/EndProductMapper.xml

@@ -22,7 +22,7 @@
         <result column="ml_keyvalue" property="ml_keyvalue" jdbcType="INTEGER" />
     </resultMap>
     <select id="getListData" resultMap="MsgResult">
-        SELECT * FROM MESSAGELOG WHERE ML_CALLER='EndProduct' AND COMPANYID=#{companyId} AND ml_result like '%账成功' ORDER BY ML_ID DESC
+        SELECT * FROM MESSAGELOG WHERE ML_CALLER='EndProduct' AND COMPANYID=#{companyId} AND ml_result like '%账成功' ORDER BY ML_ID DESC
     </select>
 
     <select id="endProduct" parameterMap="spParamMap" statementType="CALLABLE">

+ 4 - 2
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/BomServiceImpl.java

@@ -228,7 +228,8 @@ public class BomServiceImpl extends CommonBaseServiceImpl<BomMapper, Bom> implem
             try{
                 close(docBaseDTO.getId());
             }catch (Exception e){
-                errorMsg.append("编号:" + docBaseDTO.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, docBaseDTO.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();
@@ -241,7 +242,8 @@ public class BomServiceImpl extends CommonBaseServiceImpl<BomMapper, Bom> implem
             try{
                 open(docBaseDTO.getId());
             }catch (Exception e){
-                errorMsg.append("编号:" + docBaseDTO.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, docBaseDTO.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();

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

@@ -99,7 +99,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
     @Transactional
     public DocBaseDTO saveFormData(CustomerFormDTO data) {
         if (null == data || null == data.getMain()){
-            throw new BizException(500, "数据为空,请填写后再保存");
+            throw new BizException(BizExceptionCode.EMPTY_DATA);
         }
         //公司ID
         Long companyId = BaseContextHolder.getCompanyId();
@@ -139,7 +139,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
             //检查名称和编号
             int count = getMapper().validNameAndCodeWhenInsert(customer);
             if (count>0) {
-                throw new BizException(500, "客户名称或编号重复");
+                throw new BizException(BizExceptionCode.REPEAT_CUSTOMERCODE);
             }
             //插入操作
             getMapper().insertSelective(customer);
@@ -174,7 +174,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
             //检查名称和编号
             int count = getMapper().validNameAndCodeWhenUpdate(customer);
             if (count > 0) {
-                throw new BizException(500, "客户名称或编号重复");
+                throw new BizException(BizExceptionCode.REPEAT_CUSTOMERCODE);
             }
 
             //检查期初日期是否已结转
@@ -350,7 +350,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
     }
 
     @Transactional
-    private DocBaseDTO singleClose(Long id) {
+    public DocBaseDTO singleClose(Long id) {
         DocBaseDTO docBaseDTO = null;
         if (null!=id) {
             Customer customer = getMapper().selectByPrimaryKey(id);
@@ -385,7 +385,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
     }
 
     @Transactional
-    private DocBaseDTO singleOpen(Long id) {
+    public DocBaseDTO singleOpen(Long id) {
         DocBaseDTO docBaseDTO = null;
         if (null!=id) {
             Customer customer = getMapper().selectByPrimaryKey(id);

+ 2 - 2
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/EmployeeServiceImpl.java

@@ -73,7 +73,7 @@ public class EmployeeServiceImpl extends CommonBaseServiceImpl<EmployeeMapper, E
             //检查电话号码
             int count = getMapper().validatePhoneWhenInsert(employee.getEm_mobile(),BaseContextHolder.getCompanyId());
             if (count>0) {
-                throw new BizException(500, "电话号码重复");
+                throw new BizException(BizExceptionCode.REPEAT_TEL);
             }
             getMapper().insertSelective(employee);
             docBaseDTO = generateMsgObj(employee.getId(), code);
@@ -85,7 +85,7 @@ public class EmployeeServiceImpl extends CommonBaseServiceImpl<EmployeeMapper, E
             //检查电话号码
             int count = getMapper().validatePhoneWhenUpdate(employee.getEm_mobile(),employee.getId(),BaseContextHolder.getCompanyId());
             if (count>0) {
-                throw new BizException(500, "电话号码重复");
+                throw new BizException(BizExceptionCode.REPEAT_TEL);
             }
             getMapper().updateByPrimaryKeySelective(employee);
             docBaseDTO = generateMsgObj(employee.getId(), employee.getEm_code());

+ 15 - 12
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java

@@ -2,6 +2,7 @@ package com.usoftchina.saas.document.service.impl;
 
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.MaxnumberService;
 import com.usoftchina.saas.commons.api.MessageLogService;
@@ -113,7 +114,7 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
         }else{
             String oldCode = getMapper().getCodeById(product.getId());
             if (!product.getPr_code().equals(oldCode)){
-                validEnableUpdate(product.getId());
+                validEnableUpdateCode(product.getId());
             }
             //物料发生过除库存初始化外的出入库单时,不能新增,修改,删除
             validProductOperation(product.getId(), BizExceptionCode.BIZ_RELDELETE_UPDATEPROD);
@@ -123,8 +124,9 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
                 //找到原始单据,反过账并删除
                 String inoutCode = getMapper().selectProdIOCode(product.getPr_code(), BaseContextHolder.getCompanyId(), "库存初始化");
                 post(inoutCode, "反过账");
-                getMapper().deleteProdIOByCode(inoutCode, BaseContextHolder.getCompanyId());
                 getMapper().deleteProdIODetailByCode(inoutCode, BaseContextHolder.getCompanyId());
+                getMapper().deleteProdIOByCode(inoutCode, BaseContextHolder.getCompanyId());
+
                 //此种情况不可能发生明细行数量,只会发生明细行数据修改/新增明细行
                 //a.更新明细行数据
                 List<ProductDetail> insertItems = new ArrayList<ProductDetail>();
@@ -226,7 +228,7 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
             List<ProdIODetail> insertItems = new ArrayList<ProdIODetail>();
             //生成库存初始化单据明细表
             for(ProductDetail productDetail : productDetailList){
-                ProdIODetail prodIODetail = generateProdIODetail(product, productDetail);
+                ProdIODetail prodIODetail = generateProdIODetail(product, productDetail, inoutCode, pi_id);
                 insertItems.add(prodIODetail);
             }
             //明细插入
@@ -253,7 +255,7 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
         }else if ("反过账".equals(type)){
             warehouseService.unPost(map);
         }
-        if (StringUtils.isEmpty(map.get("result"))){
+        if (!StringUtils.isEmpty(map.get("result"))){
             throw new BizException(76203, map.get("result").toString());
         }
     }
@@ -264,11 +266,11 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
      * @param productDetail
      * @return
      */
-    private ProdIODetail generateProdIODetail(Product product, ProductDetail productDetail){
+    private ProdIODetail generateProdIODetail(Product product, ProductDetail productDetail, String inoutCode, Long pi_id){
         ProdIODetail prodIODetail = new ProdIODetail();
         prodIODetail.setPd_piclass("库存初始化");
-        prodIODetail.setPd_inoutno(product.getPr_code());
-        prodIODetail.setPd_piid(product.getId());
+        prodIODetail.setPd_inoutno(inoutCode);
+        prodIODetail.setPd_piid(pi_id);
         prodIODetail.setPd_pdno(productDetail.getPd_detno());
         prodIODetail.setPd_ordercode(product.getPr_code());         //订单号 -> 物料编号
         prodIODetail.setPd_orderdetno(productDetail.getPd_detno()); //订单序号 -> 物料明细序号
@@ -288,7 +290,6 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
 
     @Override
     public DocBaseDTO close(Long id) {
-        validEnableUpdate(id);
         DocBaseDTO docBaseDTO = null;
         if(id != null && id > 0){
             String code = getMapper().getCodeById(id);
@@ -343,7 +344,8 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
             try{
                 close(docBaseDTO.getId());
             }catch (Exception e){
-                errorMsg.append("编号:" + docBaseDTO.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, docBaseDTO.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();
@@ -356,7 +358,8 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
             try{
                 open(docBaseDTO.getId());
             }catch (Exception e){
-                errorMsg.append("编号:" + docBaseDTO.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, docBaseDTO.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();
@@ -411,7 +414,7 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
      * 校验是否存在关联单据,不存在时才允许更新物料编号
      * @param id
      */
-    private void validEnableUpdate(Long id){
+    private void validEnableUpdateCode(Long id){
         int count = 0;
         //采购
         count = getMapper().getCountFromPurc(id, BaseContextHolder.getCompanyId());
@@ -477,8 +480,8 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
         String inoutCode = getMapper().selectProdIOCode(prCode, BaseContextHolder.getCompanyId(), "库存初始化");
         if (!StringUtils.isEmpty(inoutCode)) {
             post(inoutCode, "反过账");
-            getMapper().deleteProdIOByCode(inoutCode, BaseContextHolder.getCompanyId());
             getMapper().deleteProdIODetailByCode(inoutCode, BaseContextHolder.getCompanyId());
+            getMapper().deleteProdIOByCode(inoutCode, BaseContextHolder.getCompanyId());
         }
 
         productDetailMapper.deleteByPrimaryKey(id);

+ 9 - 7
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/VendorServiceImpl.java

@@ -110,7 +110,7 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
     public DocBaseDTO saveFormData(VendorListDTO vendorListDTO) {
         Long companyId = BaseContextHolder.getCompanyId();
         if (null == vendorListDTO || null == vendorListDTO.getMain()){
-            throw new BizException(500, "数据为空,请填写后再保存");
+            throw new BizException(BizExceptionCode.EMPTY_DATA);
         }
         Vendor main = vendorListDTO.getMain();
         String code = null;
@@ -120,11 +120,11 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
             code = pushMaxnubmer(main.getVe_code(), main.getId());
             int count = getMapper().getCountByCode(code, companyId);
             if(count > 0){
-                throw new BizException(500, "编号重复!");
+                throw new BizException(BizExceptionCode.REPEAT_NAME);
             }
             count = getMapper().getCountByName(main.getVe_name(), companyId);
             if (count > 0){
-                throw new BizException(500, "名称重复!");
+                throw new BizException(BizExceptionCode.REPEAT_NAME);
             }
             //保存主表信息
             main.setVe_code(code);
@@ -156,13 +156,13 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
             int count = getMapper().getCountByCode(code, companyId);
             if (!code.equals(oldVendor.getVe_code())){
                 if (count > 0){
-                    throw new BizException(500, "编号重复!");
+                    throw new BizException(BizExceptionCode.REPEAT_CODE);
                 }
             }
             if (!main.getVe_name().equals(oldVendor.getVe_name())){
                 count = getMapper().getCountByName(main.getVe_name(), companyId);
                 if (count > 0){
-                    throw new BizException(500, "名称重复!");
+                    throw new BizException(BizExceptionCode.REPEAT_CODE);
                 }
             }
 
@@ -344,7 +344,8 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
             try{
                 close(docBaseDTO.getId());
             }catch (Exception e){
-                errorMsg.append("编号:" + docBaseDTO.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, docBaseDTO.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();
@@ -357,7 +358,8 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
             try{
                 open(docBaseDTO.getId());
             }catch (Exception e){
-                errorMsg.append("编号:" + docBaseDTO.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, docBaseDTO.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();

+ 35 - 35
applications/document/document-server/src/main/resources/mapper/ProductDetailMapper.xml

@@ -268,59 +268,59 @@
         <foreach collection="list" item="item" index="index" separator=";">
             update productdetail
             <set >
-                <if test="pd_prodid != null" >
-                    pd_prodid = #{pd_prodid,jdbcType=INTEGER},
+                <if test="item.pd_prodid != null" >
+                    pd_prodid = #{item.pd_prodid,jdbcType=INTEGER},
                 </if>
-                <if test="pd_prodcode != null" >
-                    pd_prodcode = #{pd_prodcode,jdbcType=VARCHAR},
+                <if test="item.pd_prodcode != null" >
+                    pd_prodcode = #{item.pd_prodcode,jdbcType=VARCHAR},
                 </if>
-                <if test="pd_detno != null" >
-                    pd_detno = #{pd_detno,jdbcType=INTEGER},
+                <if test="item.pd_detno != null" >
+                    pd_detno = #{item.pd_detno,jdbcType=INTEGER},
                 </if>
-                <if test="pd_whcode != null" >
-                    pd_whcode = #{pd_whcode,jdbcType=VARCHAR},
+                <if test="item.pd_whcode != null" >
+                    pd_whcode = #{item.pd_whcode,jdbcType=VARCHAR},
                 </if>
-                <if test="pd_whname != null" >
-                    pd_whname = #{pd_whname,jdbcType=VARCHAR},
+                <if test="item.pd_whname != null" >
+                    pd_whname = #{item.pd_whname,jdbcType=VARCHAR},
                 </if>
-                <if test="pd_whid != null" >
-                    pd_whid = #{pd_whid,jdbcType=INTEGER},
+                <if test="item.pd_whid != null" >
+                    pd_whid = #{item.pd_whid,jdbcType=INTEGER},
                 </if>
-                <if test="pd_price != null" >
-                    pd_price = #{pd_price,jdbcType=DOUBLE},
+                <if test="item.pd_price != null" >
+                    pd_price = #{item.pd_price,jdbcType=DOUBLE},
                 </if>
-                <if test="pd_amount != null" >
-                    pd_amount = #{pd_amount,jdbcType=DOUBLE},
+                <if test="item.pd_amount != null" >
+                    pd_amount = #{item.pd_amount,jdbcType=DOUBLE},
                 </if>
-                <if test="companyId != null" >
-                    companyId = #{companyId,jdbcType=INTEGER},
+                <if test="item.companyId != null" >
+                    companyId = #{item.companyId,jdbcType=INTEGER},
                 </if>
-                <if test="updaterId != null" >
-                    updaterId = #{updaterId,jdbcType=INTEGER},
+                <if test="item.updaterId != null" >
+                    updaterId = #{item.updaterId,jdbcType=INTEGER},
                 </if>
-                <if test="updateTime != null" >
-                    updateTime = #{updateTime,jdbcType=TIMESTAMP},
+                <if test="item.updateTime != null" >
+                    updateTime = #{item.updateTime,jdbcType=TIMESTAMP},
                 </if>
-                <if test="pd_text1 != null" >
-                    pd_text1 = #{pd_text1,jdbcType=VARCHAR},
+                <if test="item.pd_text1 != null" >
+                    pd_text1 = #{item.pd_text1,jdbcType=VARCHAR},
                 </if>
-                <if test="pd_text2 != null" >
-                    pd_text2 = #{pd_text2,jdbcType=VARCHAR},
+                <if test="item.pd_text2 != null" >
+                    pd_text2 = #{item.pd_text2,jdbcType=VARCHAR},
                 </if>
-                <if test="pd_text3 != null" >
-                    pd_text3 = #{pd_text3,jdbcType=VARCHAR},
+                <if test="item.pd_text3 != null" >
+                    pd_text3 = #{item.pd_text3,jdbcType=VARCHAR},
                 </if>
-                <if test="pd_text4 != null" >
-                    pd_text4 = #{pd_text4,jdbcType=VARCHAR},
+                <if test="item.pd_text4 != null" >
+                    pd_text4 = #{item.pd_text4,jdbcType=VARCHAR},
                 </if>
-                <if test="pd_text5 != null" >
-                    pd_text5 = #{pd_text5,jdbcType=VARCHAR},
+                <if test="item.pd_text5 != null" >
+                    pd_text5 = #{item.pd_text5,jdbcType=VARCHAR},
                 </if>
-                <if test="pd_num != null" >
-                    pd_num = #{pd_num,jdbcType=DOUBLE},
+                <if test="item.pd_num != null" >
+                    pd_num = #{item.pd_num,jdbcType=DOUBLE},
                 </if>
             </set>
-            where id = #{id}
+            where id = #{item.id}
         </foreach>
     </update>
     <select id="selectProdidByPrimaryKey" resultType="java.lang.Long">

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

@@ -504,7 +504,7 @@
         SELECT COUNT(*) FROM BOMDETAIL WHERE BD_SONID=#{id} AND COMPANYID=#{companyId}
     </select>
     <select id="getCountFromProdIO" resultType="int">
-        SELECT COUNT(*) FROM PRODIODETAIL WHERE PD_PRODID=#{id} AND COMPANYID=#{companyId}
+        SELECT COUNT(*) FROM PRODIODETAIL WHERE PD_PRODID=#{id} AND COMPANYID=#{companyId} and pd_piclass!='库存初始化'
     </select>
 
     <insert id="saveProdInOut" parameterType="com.usoftchina.saas.document.entities.ProdInOut">
@@ -905,14 +905,14 @@
 
     <select id="selectOrderCountByProdCode" resultType="java.lang.Integer">
         SELECT COUNT(*) FROM PRODINOUT LEFT JOIN PRODIODETAIL ON PI_ID=PD_PIID AND PRODINOUT.COMPANYID=PRODIODETAIL.COMPANYID
-        WHERE PRODIODETAIL.COMPANYID = #{companyId} AND PD_PRODID = #{id}
+        WHERE PRODIODETAIL.COMPANYID = #{companyId} AND PD_PRODID = #{id} and pd_piclass != '库存初始化';
     </select>
 
     <delete id="deleteProdIOByCode" >
-        DELETE FROM PRODINOUT WHERE PI_TEXT1=#{code} AND COMPANYID = #{companyId}
+        DELETE FROM PRODINOUT WHERE PI_INOUTNO=#{code} AND COMPANYID = #{companyId}
     </delete>
     <delete id="deleteProdIODetailByCode">
-        DELETE FROM PRODIODETAIL WHERE PD_PIID IN (SELECT PI_ID FROM PRODINOUT WHERE PI_TEXT1=#{code} AND PRODINOUT.COMPANYID = #{companyId}) AND PRODIODETAIL.COMPANYID = #{companyId}
+        DELETE FROM PRODIODETAIL WHERE PD_PIID IN (SELECT PI_ID FROM PRODINOUT WHERE PI_INOUTNO=#{code} AND PRODINOUT.COMPANYID = #{companyId}) AND PRODIODETAIL.COMPANYID = #{companyId}
     </delete>
 </mapper>
 

+ 10 - 6
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/PaybalanceServiceImpl.java

@@ -138,24 +138,28 @@ public class PaybalanceServiceImpl extends CommonBaseServiceImpl<PaybalanceMappe
             }
             //本次核销金额不能大于未核销金额
             if(nowbalance>namount){
-                throw new BizException(500, BizExceptionCode.PAYBALANCE_OUTNOWBALANCE.getMessage());
+                throw new BizException(BizExceptionCode.PAYBALANCE_OUTNOWBALANCE);
             }
             //单据金额
             Double amount = detail.getPbd_amount();
             if(amount>0 && nowbalance<0){
-                String error = "单据类型为" + detail.getPbd_slkind() + "的单据,核销金额必须为正数";
-                throw new BizException(500, error);
+                String msg = BizExceptionCode.PAYBALANCE_NOWAMOUNT_POSITIVE.getMessage();
+                int code = BizExceptionCode.PAYBALANCE_NOWAMOUNT_POSITIVE.getCode();
+                String error = String.format(msg, detail.getPbd_slkind());
+                throw new BizException(code, error);
             }
             if(amount<0 && nowbalance>0){
-                String error = "单据类型为" + detail.getPbd_slkind() + "的单据,核销金额必须为负数";
-                throw new BizException(500, error);
+                String msg = BizExceptionCode.PAYBALANCE_NOWAMOUNT_NEGATIVE.getMessage();
+                int code = BizExceptionCode.PAYBALANCE_NOWAMOUNT_NEGATIVE.getCode();
+                String error = String.format(msg, detail.getPbd_slkind());
+                throw new BizException(code, error);
             }
         }
         //不能选择重复的源单
         for  ( int  i  =   0 ; i  <  paybalancedetail.size()  -   1 ; i ++ )  {
             for  ( int  j  =  paybalancedetail.size()  -   1 ; j  >  i; j -- )  {
                 if  (paybalancedetail.get(j).getPbd_slcode().equals(paybalancedetail.get(i).getPbd_slcode()))  {
-                    throw new BizException(500, BizExceptionCode.PAYBALANCE_UNIQUESOURCECODE.getMessage());
+                    throw new BizException(BizExceptionCode.PAYBALANCE_UNIQUESOURCECODE);
                 }
             }
         }

+ 7 - 3
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/RecbalanceServiceImpl.java

@@ -141,12 +141,16 @@ public class RecbalanceServiceImpl extends CommonBaseServiceImpl<RecbalanceMappe
             //单据金额
             Double amount = detail.getRbd_amount();
             if(amount>0 && nowbalance<0){
-                String error = "单据类型为" + detail.getRbd_slkind() + "的单据,核销金额必须为正数";
+                String msg = BizExceptionCode.PAYBALANCE_NOWAMOUNT_POSITIVE.getMessage();
+                int code = BizExceptionCode.PAYBALANCE_NOWAMOUNT_POSITIVE.getCode();
+                String error = String.format(msg, detail.getRbd_slkind());
                 throw new BizException(500, error);
             }
             if(amount<0 && nowbalance>0){
-                String error = "单据类型为" + detail.getRbd_slkind() + "的单据,核销金额必须为负数";
-                throw new BizException(500, error);
+                String msg = BizExceptionCode.PAYBALANCE_NOWAMOUNT_POSITIVE.getMessage();
+                int code = BizExceptionCode.PAYBALANCE_NOWAMOUNT_POSITIVE.getCode();
+                String error = String.format(msg, detail.getRbd_slkind());
+                throw new BizException(code, error);
             }
         }
         //不能选择重复的源单

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

@@ -28,6 +28,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
 
+import javax.print.DocFlavor;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.Iterator;
@@ -102,7 +103,7 @@ public class VerificationServiceImpl extends CommonBaseServiceImpl<VerificationM
     @Override
     public DocSavedDTO saveFormData(VerificationFormDTO formdata) {
         if (null == formdata || null == formdata.getMain()){
-            throw new BizException(500, "数据为空,请填写后再保存");
+            throw new BizException(BizExceptionCode.EMPTY_DATA);
         }
         //公司ID
         Long companyId = BaseContextHolder.getCompanyId();
@@ -277,7 +278,9 @@ public class VerificationServiceImpl extends CommonBaseServiceImpl<VerificationM
         }
         String code = verificationMapper.validateResAudit(id);
         if (null != code) {
-            throw new BizException(500, "单据:" + code + " 未审核,无法反审核");
+            String msg = BizExceptionCode.BEFORE_UNAUDIT.getMessage();
+            int errCode = BizExceptionCode.BEFORE_UNAUDIT.getCode();
+            throw new BizException(errCode, String.format(msg, code));
         }
         Verification verification = new Verification();
         //生成更新对象

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

@@ -24,4 +24,6 @@ public interface ProdInOutMapper extends CommonBaseMapper<ProdInOut> {
     int checkQtyFromPurchase(String pu_code);
 
     int checkQtyFromProdIn(String pu_code);
+
+    void updateCreator(@Param("userId") Long userId,@Param("userName") String userName,@Param("id") Long pi_id);
 }

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

@@ -4,6 +4,7 @@ import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.commons.api.CommonService;
 import com.usoftchina.saas.commons.api.MaxnumberService;
 import com.usoftchina.saas.commons.api.MessageLogService;
 import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
@@ -56,7 +57,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
     private WarehouseApi warehouseApi;
     @Autowired
     private MaxnumberService maxnumberService;
-
+    @Autowired
+    private CommonService commonService;
 
 
     @Override
@@ -112,7 +114,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
     @Transactional(propagation = Propagation.REQUIRED)
     public DocBaseDTO saveFormData(ProdInOutFormDTO formdata) {
         if (null == formdata || null == formdata.getMain()){
-            throw new BizException(500, "数据为空,请填写后再保存");
+            throw new BizException(BizExceptionCode.EMPTY_DATA);
         }
         //公司ID
         Long companyId = BaseContextHolder.getCompanyId();
@@ -143,10 +145,10 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         //判断更新与保存动作
         if (StringUtils.isEmpty(pi_id) || "0".equals(pi_id.toString())){
             prodInOut.setCompanyId(companyId);
-            //setCreateInfo(prodInOut);
             //插入操作
             getMapper().insertSelective(prodInOut);
             pi_id = prodInOut.getId();
+            getMapper().updateCreator(userId, userName, pi_id);
             //添加从表传输对象
             for (ProdIODetailDTO item : items) {
                 ProdIODetail detail = BeanMapper.map(item,ProdIODetail.class);
@@ -297,7 +299,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
                 singleAudit(prodInOutDTO);
             } catch (Exception e) {
-                errorMsg.append("编号:" + base.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, base.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();
@@ -349,7 +352,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
                 singleUnAudit(prodInOutDTO);
             }catch (Exception e) {
-                errorMsg.append("编号:" + base.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, base.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();
@@ -391,7 +395,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         if ("采购验退单".equals(pi_class)) {
             count = getMapper().checkQtyFromProdIn(pu_code);
             if (count>0){
-                throw new BizException(500, "明细行数量超过来源采购验收单明细行数量");
+                throw new BizException(BizExceptionCode.PURCHASE_DETAIL_OVERNUM);
             }
         }
 

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

@@ -104,7 +104,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
     @Transactional
     public DocBaseDTO saveFormData(PurchaseFormDTO formdata) {
         if (null == formdata || null == formdata.getMain()){
-            throw new BizException(500, "数据为空,请填写后再保存");
+            throw new BizException(BizExceptionCode.EMPTY_DATA);
         }
         //公司ID
         Long companyId = BaseContextHolder.getCompanyId();
@@ -242,7 +242,9 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
 
         String validate = purchaseMapper.validateAudit(baseDTOs.getBaseDTOs());
         if (!StringUtils.isEmpty(validate)) {
-            throw new BizException(500, "存在已审核单据,单据编号:" + validate);
+            String msg = BizExceptionCode.PURCHASE_ORDER_HASAUDIT.getMessage();
+            int code = BizExceptionCode.PURCHASE_ORDER_HASAUDIT.getCode();
+            throw new BizException(code, String.format(msg, validate));
         }
         for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
             singleAudit(base.getId());
@@ -268,7 +270,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         }
         String code = purchaseMapper.validateUnAudit(id);
         if (null != code) {
-            throw new BizException(500, "单据:" + code + " 未审核,无法反审核");
+            throw new BizException(BizExceptionCode.BIZ_UNAUDITED);
         }
         singleUnAudit(id);
     }
@@ -282,7 +284,9 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
 
         String msg = purchaseMapper.validateBatchUnAudit(baseDTOs.getBaseDTOs());
         if (null != msg) {
-            throw new BizException(500, "存在未审核单据,单据编号:" + msg);
+            String message = BizExceptionCode.PURCHASE_ORDER_HASAUDIT.getMessage();
+            int code = BizExceptionCode.PURCHASE_ORDER_HASAUDIT.getCode();
+            throw new BizException(code, String.format(message, msg));
         }
         for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
             singleUnAudit(base.getId());
@@ -492,7 +496,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
     }
 
     @Transactional
-    private Result singleAudit(Long id) {
+    public Result singleAudit(Long id) {
         DocBaseDTO docBaseDTO = getBaseDTOById(id);
         Result result = Result.success(docBaseDTO);
         //检查最小包装数
@@ -513,7 +517,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
     }
 
     @Transactional
-    private void singleUnAudit(Long id) {
+    public void singleUnAudit(Long id) {
         Purchase purchase = new Purchase();
         //检查是否已转验收单
         Integer num = getMapper().checkTurnInstatus(id);
@@ -533,7 +537,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
     }
 
     @Transactional
-    private void singleDelete(Long id) {
+    public void singleDelete(Long id) {
         if (null != id) {
             //从表删除
             purchasedetailMapper.deleteByForeignKey(id);
@@ -598,7 +602,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
     }
 
     @Transactional
-    private void calcPurchase(Long pu_id) {
+    public void calcPurchase(Long pu_id) {
         purchasedetailMapper.calcPurchase(pu_id);
     }
 

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

@@ -62,11 +62,11 @@
     <result column="pd_status" jdbcType="INTEGER" property="pd_status" />
     <result column="companyid" property="companyId" jdbcType="BIGINT" />
     <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
-    <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
     <result column="updaterName" jdbcType="VARCHAR" property="updaterName" />
-    <result column="creatorid" property="creatorId" jdbcType="INTEGER"/>
+    <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+    <result column="creatorId" property="creatorId" jdbcType="INTEGER"/>
     <result column="creatorName" jdbcType="VARCHAR" property="creatorName" />
-    <result column="createtime" property="createTime" jdbcType="TIMESTAMP" />
+    <result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
     <result column="pd_text1" jdbcType="VARCHAR" property="pd_text1" />
     <result column="pd_text2" jdbcType="VARCHAR" property="pd_text2" />
     <result column="pd_text3" jdbcType="VARCHAR" property="pd_text3" />

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

@@ -26,8 +26,10 @@
     <result column="pi_printstatuscode" jdbcType="VARCHAR" property="pi_printstatuscode" />
     <result column="companyid" property="companyId" jdbcType="BIGINT" />
     <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
+    <result column="updaterName" jdbcType="VARCHAR" property="updaterName" />
     <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
     <result column="creatorid" property="creatorId" jdbcType="INTEGER"/>
+    <result column="creatorName" jdbcType="VARCHAR" property="creatorName" />
     <result column="createtime" property="createTime" jdbcType="TIMESTAMP" />
     <result column="pi_text1" jdbcType="VARCHAR" property="pi_text1" />
     <result column="pi_text2" jdbcType="VARCHAR" property="pi_text2" />
@@ -38,7 +40,6 @@
     <result column="pi_auditman" jdbcType="VARCHAR" property="pi_auditman" />
     <result column="pi_remark" jdbcType="VARCHAR" property="pi_remark" />
     <result column="pi_ioid" jdbcType="INTEGER" property="pi_ioid" />
-
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.purchase.po.ProdInOut">
     <result column="pi_address" jdbcType="LONGVARCHAR" property="pi_address" />
@@ -50,7 +51,7 @@
     pi_id, pi_inoutno, pi_class, pi_date, pi_vendid, pi_vendcode, pi_vendname, pi_custid, 
     pi_custcode, pi_custname, pi_puid, pi_pucode, pi_said, pi_sacode, pi_total, pi_recordmanid, 
     pi_recordman, pi_recorddate, pi_status, pi_statuscode, pi_printstatus, pi_printstatuscode, 
-    companyid, updaterid, updatetime,creatorid,createtime, pi_text1, pi_text2, pi_text3, pi_text4, pi_text5,pi_auditdate,
+    companyid, updaterid,updaterName,updatetime,creatorid,creatorName,createtime, pi_text1, pi_text2, pi_text3, pi_text4, pi_text5,pi_auditdate,
     pi_auditman,pi_remark,pi_ioid
   </sql>
   <sql id="Blob_Column_List">
@@ -144,12 +145,18 @@
       <if test="updaterId != null" >
         updaterId,
       </if>
+      <if test="updaterName != null" >
+        updaterName,
+      </if>
       <if test="updateTime != null" >
         updateTime,
       </if>
       <if test="creatorId != null" >
         creatorId,
       </if>
+      <if test="creatorName != null" >
+        creatorName,
+      </if>
       <if test="createTime != null" >
         createTime,
       </if>
@@ -253,12 +260,19 @@
       <if test="updaterId != null" >
         #{updaterId,jdbcType=INTEGER},
       </if>
+      <if test="updaterName != null">
+        #{updaterName,jdbcType=VARCHAR},
+      </if>
       <if test="updateTime != null" >
         #{updateTime,jdbcType=TIMESTAMP},
       </if>
       <if test="creatorId != null" >
         #{creatorId,jdbcType=INTEGER},
       </if>
+      <if test="creatorName != null">
+        #{creatorName,jdbcType=VARCHAR},
+      </if>
+
       <if test="createTime != null" >
         #{createTime,jdbcType=TIMESTAMP},
       </if>
@@ -424,4 +438,9 @@
   GROUP BY b.pd_ioid) t where t.nowqty>t.totalqty
   </select>
 
+  <update id="updateCreator">
+    update prodinout set creatorId = #{userId} , creatorName=#{userName} where pi_id=#{id}
+  </update>
+
+
 </mapper>

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

@@ -71,7 +71,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
     public DocBaseDTO saveFormData(ProdInOutFormDTO formdata) {
 
         if (null == formdata || null == formdata.getMain()){
-            throw new BizException(500, "数据为空,请填写后再保存");
+            throw new BizException(BizExceptionCode.EMPTY_DATA);
         }
         //公司ID
         Long companyId = BaseContextHolder.getCompanyId();
@@ -224,7 +224,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             try{
                 singleDelete(base.getId());
             }catch (Exception e){
-                errorMsg.append("编号:" + base.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, base.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();
@@ -286,7 +287,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
                 singleAudit(prodInOutDTO);
             }catch (Exception e){
-                errorMsg.append("编号:" + base.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, base.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();
@@ -339,7 +341,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
                 singleUnAudit(prodInOutDTO);
             }catch (Exception e){
-                errorMsg.append("编号:" + base.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, base.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();
@@ -515,7 +518,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             try{
                 close(base.getId());
             }catch (Exception e){
-                errorMsg.append("编号:" + base.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, base.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();
@@ -549,7 +553,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             try{
                 open(base.getId());
             }catch (Exception e){
-                errorMsg.append("编号:" + base.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, base.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();

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

@@ -94,7 +94,7 @@ public class SaleServiceImpl implements SaleService{
     @Transactional
     public DocBaseDTO saveFormData(SaleFormDTO formdata) {
         if (null == formdata || null == formdata.getMain()){
-            throw new BizException(500, "数据为空,请填写后再保存");
+            throw new BizException(BizExceptionCode.EMPTY_DATA);
         }
         //公司ID
         Long companyId = BaseContextHolder.getCompanyId();
@@ -262,7 +262,9 @@ public class SaleServiceImpl implements SaleService{
 
         String validate = saleMapper.validateAudit(baseDTOs.getBaseDTOs());
         if (!StringUtils.isEmpty(validate)) {
-            throw new BizException(500, "存在已审核单据,单据编号:" + validate);
+            String message = BizExceptionCode.SALE_ORDER_HASAUDIT.getMessage();
+            int code = BizExceptionCode.SALE_ORDER_HASAUDIT.getCode();
+            throw new BizException(code, String.format(message, validate));
         }
         for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
             singleAudit(base.getId());
@@ -310,7 +312,9 @@ public class SaleServiceImpl implements SaleService{
 
         String msg = saleMapper.validateBatchUnAudit(baseDTOs.getBaseDTOs());
         if (null != msg) {
-            throw new BizException(500, "存在未审核单据,单据编号:" + msg);
+            String message = BizExceptionCode.SALE_ORDER_HASAUDIT.getMessage();
+            int code = BizExceptionCode.SALE_ORDER_HASAUDIT.getCode();
+            throw new BizException(code, String.format(message, msg));
         }
         for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
             singleUnAudit(base.getId());

+ 4 - 2
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 Long pi_recordmanid;
+    private Integer pi_recordmanid;
 
     private String pi_recordman;
 
@@ -71,7 +71,9 @@ public class ProdInOutDTO extends CommonBaseDTO implements Serializable {
 
     private Date pi_auditdate;
 
-    private Date pi_auditman;
+    private String pi_auditman;
 
     private String pi_remark;
+
+    private Long pi_ioid;
 }

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

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

+ 2 - 4
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/ProdInOutMapper.java

@@ -18,10 +18,6 @@ public interface ProdInOutMapper extends CommonBaseMapper<ProdInOut> {
 
     int updateByPrimaryKeySelective(ProdInOut record);
 
-    int updateByPrimaryKeyWithBLOBs(ProdInOut record);
-
-    int updateByPrimaryKey(ProdInOut record);
-
     Integer validateCodeWhenInsert(@Param("pi_inoutno") String pi_inoutno, @Param("companyId") Long companyId);
 
     Integer validateCodeWhenUpdate(@Param("pi_inoutno") String pi_inoutno, @Param("id") Long id, @Param("companyId") Long companyId);
@@ -33,4 +29,6 @@ public interface ProdInOutMapper extends CommonBaseMapper<ProdInOut> {
     void post(Map<String, Object> map);
 
     void unPost(Map<String, Object> map);
+
+    void updateCreator(@Param("userId") Long userId,@Param("userName") String userName,@Param("id") Long pi_id);
 }

+ 19 - 11
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/MakeServiceImpl.java

@@ -166,7 +166,9 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
                     onHand=0d;
                 }
                 if(onHand < qty){
-                    throw new BizException(79402, "行" + i + "库存不足");
+                    String msg = BizExceptionCode.UNENOUGH_DETAIL_STOCK.getMessage();
+                    int code = BizExceptionCode.SALE_ORDER_HASAUDIT.getCode();
+                    throw new BizException(code, String.format(msg, i));
                 }
             }
         }else if ("拆件".equals(make.getMa_type())){
@@ -175,10 +177,14 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             try {
                 onHand = getMapper().getOnHand(make.getMa_prodcode(), make.getMa_whcode(), BaseContextHolder.getCompanyId());
             }catch (Exception e){
-                throw new BizException(79402, make.getMa_prodcode() + ":库存不足");
+                String msg = BizExceptionCode.UNENOUGH_STOCK.getMessage();
+                int code = BizExceptionCode.UNENOUGH_STOCK.getCode();
+                throw new BizException(code, String.format(msg, make.getMa_prodcode()));
             }
             if(onHand < qty){
-                throw new BizException(79402, make.getMa_prodcode() + ":库存不足");
+                String msg = BizExceptionCode.UNENOUGH_STOCK.getMessage();
+                int code = BizExceptionCode.UNENOUGH_STOCK.getCode();
+                throw new BizException(code, String.format(msg, make.getMa_prodcode()));
             }
         }
     }
@@ -323,7 +329,7 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
      * @param makeListDTO
      */
     @Transactional(rollbackFor = Exception.class)
-    private void generateProdIO(MakeListDTO makeListDTO) {
+    public void generateProdIO(MakeListDTO makeListDTO) {
         Make make = makeListDTO.getMain();
         Long ma_id = make.getId();
         List<MakeMaterial> items = makeListDTO.getItems();
@@ -336,7 +342,7 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             String code = maxnumberService.getMaxnumber("MakeOut", true).getData();
             prodInOut.setPi_inoutno(code);
             prodInOut.setPi_date(new Date());       //出入库日期
-            prodInOut.setPi_recordmanid(BaseContextHolder.getUserId());     //录入人ID
+//            prodInOut.setPi_recordmanid(BaseContextHolder.getUserId());     //录入人ID
             prodInOut.setPi_recorddate(new Date());     //录入日期
             prodInOut.setPi_auditdate(new Date());      //审核日期
             prodInOut.setPi_auditman("");               //审核人
@@ -396,7 +402,7 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             code = maxnumberService.getMaxnumber("MakeIn", true).getData();
             prodInOut.setPi_inoutno(code);
             prodInOut.setPi_date(new Date());       //出入库日期
-            prodInOut.setPi_recordmanid(BaseContextHolder.getUserId());     //录入人ID
+//            prodInOut.setPi_recordmanid(BaseContextHolder.getUserId());     //录入人ID
             prodInOut.setPi_recorddate(new Date());     //录入日期
             prodInOut.setPi_auditdate(new Date());      //审核日期
             prodInOut.setPi_auditman("");               //审核人
@@ -447,7 +453,7 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             prodInOut.setPi_inoutno(code);
             prodInOut.setPi_date(new Date());       //出入库日期
             //prodInOut.setPi_total(make.getMa_price());
-            prodInOut.setPi_recordmanid(BaseContextHolder.getUserId());     //录入人ID
+//            prodInOut.setPi_recordmanid(BaseContextHolder.getUserId());     //录入人ID
             prodInOut.setPi_recorddate(new Date());     //录入日期
             prodInOut.setPi_auditdate(new Date());      //审核日期
             prodInOut.setPi_auditman("");               //审核人
@@ -505,7 +511,7 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             code = maxnumberService.getMaxnumber("MakeIn", true).getData();
             prodInOut.setPi_inoutno(code);
             prodInOut.setPi_date(new Date());       //出入库日期
-            prodInOut.setPi_recordmanid(BaseContextHolder.getUserId());     //录入人ID
+//            prodInOut.setPi_recordmanid(BaseContextHolder.getUserId());     //录入人ID
             prodInOut.setPi_recorddate(new Date());     //录入日期
             prodInOut.setPi_auditdate(new Date());      //审核日期
             prodInOut.setPi_auditman("");               //审核人
@@ -619,7 +625,8 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             try{
                 close(docBaseDTO.getId());
             }catch (Exception e){
-                errorMsg.append("编号:" + docBaseDTO.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, docBaseDTO.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();
@@ -632,7 +639,8 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             try{
                 open(docBaseDTO.getId());
             }catch (Exception e){
-                errorMsg.append("编号:" + docBaseDTO.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, docBaseDTO.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();
@@ -657,7 +665,7 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
      * @param make
      */
     @Transactional(rollbackFor = Exception.class)
-    private void selectProdIO(Make make) {
+    public void selectProdIO(Make make) {
         String code = make.getMa_code();
         String type = make.getMa_type();
         String outCode="";

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

@@ -106,12 +106,15 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
     @Transactional(propagation = Propagation.REQUIRED)
     public DocBaseDTO saveFormData(ProdInOutFormDTO formdata) {
         if (null == formdata || null == formdata.getMain()){
-            throw new BizException(500, "数据为空,请填写后再保存");
+            throw new BizException(BizExceptionCode.EMPTY_DATA);
         }
         //公司ID
         Long companyId = BaseContextHolder.getCompanyId();
         //人员Id
         Long userId = BaseContextHolder.getUserId();
+        String userName = BaseContextHolder.getUserName();
+
+
         //获取主表信息
         ProdInOutDTO main = formdata.getMain();
         List<ProdIODetailDTO> items = formdata.getItems();
@@ -139,6 +142,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             //插入操作
             getMapper().insertSelective(prodInOut);
             pi_id = prodInOut.getId();
+            getMapper().updateCreator(userId, userName, pi_id);
             //添加从表传输对象
             for (ProdIODetailDTO item : items) {
                 ProdIODetail detail = BeanMapper.map(item,ProdIODetail.class);
@@ -273,7 +277,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
                 singleAudit(prodInOutDTO);
             } catch (Exception e){
-                errorMsg.append("编号:" + base.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, base.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();
@@ -325,7 +330,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
                 singleUnAudit(prodInOutDTO);
             }catch (Exception e) {
-                errorMsg.append("编号:" + base.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, base.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();

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

@@ -29,12 +29,10 @@
     <result column="pi_text3" jdbcType="VARCHAR" property="pi_text3" />
     <result column="pi_text4" jdbcType="VARCHAR" property="pi_text4" />
     <result column="pi_text5" jdbcType="VARCHAR" property="pi_text5" />
-    <result column="pi_address" jdbcType="VARCHAR" property="pi_address" />
     <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" />
+    <result column="pi_remark" jdbcType="VARCHAR" property="pi_remark" />
     <result column="pd_piid" jdbcType="INTEGER" property="pd_piid" />
     <result column="pd_inoutno" jdbcType="VARCHAR" property="pd_inoutno" />
     <result column="pd_piclass" jdbcType="VARCHAR" property="pd_piclass" />
@@ -62,9 +60,13 @@
     <result column="pd_orderid" jdbcType="INTEGER" property="pd_orderid" />
     <result column="pd_sdid" jdbcType="INTEGER" property="pd_sdid" />
     <result column="pd_status" jdbcType="INTEGER" property="pd_status" />
-    <result column="companyid" jdbcType="INTEGER" property="companyId" />
-    <result column="updaterid" jdbcType="INTEGER" property="updaterId" />
-    <result column="updatetime" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="companyid" property="companyId" jdbcType="BIGINT" />
+    <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
+    <result column="updaterName" jdbcType="VARCHAR" property="updaterName" />
+    <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+    <result column="creatorId" property="creatorId" jdbcType="INTEGER"/>
+    <result column="creatorName" jdbcType="VARCHAR" property="creatorName" />
+    <result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
     <result column="pd_text1" jdbcType="VARCHAR" property="pd_text1" />
     <result column="pd_text2" jdbcType="VARCHAR" property="pd_text2" />
     <result column="pd_text3" jdbcType="VARCHAR" property="pd_text3" />
@@ -73,6 +75,7 @@
     <result column="pd_ym" jdbcType="INTEGER" property="pd_ym" />
     <result column="pd_yqty" jdbcType="DOUBLE" property="pd_yqty" />
     <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
+    <result column="pd_remark" jdbcType="VARCHAR" property="pd_remark" />
     <result column="pr_id" property="pr_id"/>
     <result column="pr_code" property="pr_code"/>
     <result column="pr_detail" property="pr_detail"/>

+ 62 - 99
applications/storage/storage-server/src/main/resources/mapper/ProdInOutMapper.xml

@@ -24,9 +24,13 @@
     <result column="pi_statuscode" jdbcType="VARCHAR" property="pi_statuscode" />
     <result column="pi_printstatus" jdbcType="VARCHAR" property="pi_printstatus" />
     <result column="pi_printstatuscode" jdbcType="VARCHAR" property="pi_printstatuscode" />
-    <result column="companyid" jdbcType="INTEGER" property="companyId" />
-    <result column="updaterid" jdbcType="INTEGER" property="updaterId" />
-    <result column="updatetime" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="companyid" property="companyId" jdbcType="BIGINT" />
+    <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
+    <result column="updaterName" jdbcType="VARCHAR" property="updaterName" />
+    <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+    <result column="creatorid" property="creatorId" jdbcType="INTEGER"/>
+    <result column="creatorName" jdbcType="VARCHAR" property="creatorName" />
+    <result column="createtime" property="createTime" jdbcType="TIMESTAMP" />
     <result column="pi_text1" jdbcType="VARCHAR" property="pi_text1" />
     <result column="pi_text2" jdbcType="VARCHAR" property="pi_text2" />
     <result column="pi_text3" jdbcType="VARCHAR" property="pi_text3" />
@@ -35,7 +39,7 @@
     <result column="pi_auditdate" jdbcType="TIMESTAMP" property="pi_auditdate" />
     <result column="pi_auditman" jdbcType="VARCHAR" property="pi_auditman" />
     <result column="pi_remark" jdbcType="VARCHAR" property="pi_remark" />
-
+    <result column="pi_ioid" jdbcType="INTEGER" property="pi_ioid" />
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.storage.po.ProdInOut">
     <result column="pi_address" jdbcType="LONGVARCHAR" property="pi_address" />
@@ -47,8 +51,8 @@
     pi_id, pi_inoutno, pi_class, pi_date, pi_vendid, pi_vendcode, pi_vendname, pi_custid, 
     pi_custcode, pi_custname, pi_puid, pi_pucode, pi_said, pi_sacode, pi_total, pi_recordmanid, 
     pi_recordman, pi_recorddate, pi_status, pi_statuscode, pi_printstatus, pi_printstatuscode, 
-    companyid, updaterid, updatetime, pi_text1, pi_text2, pi_text3, pi_text4, pi_text5,pi_auditdate,
-    pi_auditman,pi_remark
+    companyid, updaterid,updaterName,updatetime,creatorid,creatorName,createtime, pi_text1, pi_text2, pi_text3, pi_text4, pi_text5,pi_auditdate,
+    pi_auditman,pi_remark,pi_ioid
   </sql>
   <sql id="Blob_Column_List">
     pi_address
@@ -121,9 +125,6 @@
       <if test="pi_recordman != null">
         pi_recordman,
       </if>
-      <if test="createTime != null">
-        pi_recorddate,
-      </if>
       <if test="pi_status != null">
         pi_status,
       </if>
@@ -136,14 +137,27 @@
       <if test="pi_printstatuscode != null">
         pi_printstatuscode,
       </if>
-      <if test="companyId != null">
+
+      <if test="companyId != null" >
         companyid,
       </if>
-      <if test="updaterId != null">
-        updaterid,
+      <if test="updaterId != null" >
+        updaterId,
+      </if>
+      <if test="updaterName != null" >
+        updaterName,
+      </if>
+      <if test="updateTime != null" >
+        updateTime,
+      </if>
+      <if test="creatorId != null" >
+        creatorId,
+      </if>
+      <if test="creatorName != null" >
+        creatorName,
       </if>
-      <if test="updateTime != null">
-        updatetime,
+      <if test="createTime != null" >
+        createTime,
       </if>
       <if test="pi_text1 != null">
         pi_text1,
@@ -172,6 +186,9 @@
       <if test="pi_remark != null">
         pi_remark,
       </if>
+      <if test="pi_ioid != null">
+        pi_ioid,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
 
@@ -223,9 +240,6 @@
       <if test="pi_recordman != null">
         #{pi_recordman,jdbcType=VARCHAR},
       </if>
-      <if test="createTime != null">
-        #{createTime,jdbcType=TIMESTAMP},
-      </if>
       <if test="pi_status != null">
         #{pi_status,jdbcType=VARCHAR},
       </if>
@@ -238,15 +252,29 @@
       <if test="pi_printstatuscode != null">
         #{pi_printstatuscode,jdbcType=VARCHAR},
       </if>
-      <if test="companyId != null">
+
+      <if test="companyId != null" >
         #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="updaterId != null">
+      <if test="updaterId != null" >
         #{updaterId,jdbcType=INTEGER},
       </if>
-      <if test="updateTime != null">
+      <if test="updaterName != null">
+        #{updaterName,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null" >
         #{updateTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="creatorId != null" >
+        #{creatorId,jdbcType=INTEGER},
+      </if>
+      <if test="creatorName != null">
+        #{creatorName,jdbcType=VARCHAR},
+      </if>
+
+      <if test="createTime != null" >
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
       <if test="pi_text1 != null">
         #{pi_text1,jdbcType=VARCHAR},
       </if>
@@ -274,6 +302,9 @@
       <if test="pi_remark != null">
         #{pi_remark,jdbcType=VARCHAR},
       </if>
+      <if test="pi_ioid != null">
+        #{pi_ioid,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
 
@@ -343,14 +374,14 @@
       <if test="pi_printstatuscode != null">
         pi_printstatuscode = #{pi_printstatuscode,jdbcType=VARCHAR},
       </if>
-      <if test="companyId != null">
+      <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="pi_text1 != null">
         pi_text1 = #{pi_text1,jdbcType=VARCHAR},
@@ -382,80 +413,7 @@
     </set>
     where pi_id = #{id,jdbcType=INTEGER}
   </update>
-  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.saas.storage.po.ProdInOut">
-    update prodinout
-    set pi_inoutno = #{pi_inoutno,jdbcType=VARCHAR},
-      pi_class = #{pi_class,jdbcType=VARCHAR},
-      pi_date = #{pi_date,jdbcType=TIMESTAMP},
-      pi_vendid = #{pi_vendid,jdbcType=INTEGER},
-      pi_vendcode = #{pi_vendcode,jdbcType=VARCHAR},
-      pi_vendname = #{pi_vendname,jdbcType=VARCHAR},
-      pi_custid = #{pi_custid,jdbcType=INTEGER},
-      pi_custcode = #{pi_custcode,jdbcType=VARCHAR},
-      pi_custname = #{pi_custname,jdbcType=VARCHAR},
-      pi_puid = #{pi_puid,jdbcType=INTEGER},
-      pi_pucode = #{pi_pucode,jdbcType=VARCHAR},
-      pi_said = #{pi_said,jdbcType=INTEGER},
-      pi_sacode = #{pi_sacode,jdbcType=VARCHAR},
-      pi_total = #{pi_total,jdbcType=DOUBLE},
-      pi_recordmanid = #{pi_recordmanid,jdbcType=INTEGER},
-      pi_recordman = #{pi_recordman,jdbcType=VARCHAR},
-      pi_recorddate = #{createTime,jdbcType=TIMESTAMP},
-      pi_status = #{pi_status,jdbcType=VARCHAR},
-      pi_statuscode = #{pi_statuscode,jdbcType=VARCHAR},
-      pi_printstatus = #{pi_printstatus,jdbcType=VARCHAR},
-      pi_printstatuscode = #{pi_printstatuscode,jdbcType=VARCHAR},
-      companyid = #{companyid,jdbcType=INTEGER},
-      updaterid = #{updaterid,jdbcType=INTEGER},
-      updatetime = #{updatetime,jdbcType=TIMESTAMP},
-      pi_text1 = #{pi_text1,jdbcType=VARCHAR},
-      pi_text2 = #{pi_text2,jdbcType=VARCHAR},
-      pi_text3 = #{pi_text3,jdbcType=VARCHAR},
-      pi_text4 = #{pi_text4,jdbcType=VARCHAR},
-      pi_text5 = #{pi_text5,jdbcType=VARCHAR},
-      pi_address = #{pi_address,jdbcType=LONGVARCHAR},
-      pi_auditdate = #{pi_auditdate,jdbcType=TIMESTAMP},
-      pi_auditman = #{pi_auditman,jdbcType=VARCHAR},
-      pi_remark = #{pi_remark,jdbcType=VARCHAR}
-    where pi_id = #{pi_id,jdbcType=INTEGER}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.storage.po.ProdInOut">
-    update prodinout
-    set pi_inoutno = #{pi_inoutno,jdbcType=VARCHAR},
-      pi_class = #{pi_class,jdbcType=VARCHAR},
-      pi_date = #{pi_date,jdbcType=TIMESTAMP},
-      pi_vendid = #{pi_vendid,jdbcType=INTEGER},
-      pi_vendcode = #{pi_vendcode,jdbcType=VARCHAR},
-      pi_vendname = #{pi_vendname,jdbcType=VARCHAR},
-      pi_custid = #{pi_custid,jdbcType=INTEGER},
-      pi_custcode = #{pi_custcode,jdbcType=VARCHAR},
-      pi_custname = #{pi_custname,jdbcType=VARCHAR},
-      pi_puid = #{pi_puid,jdbcType=INTEGER},
-      pi_pucode = #{pi_pucode,jdbcType=VARCHAR},
-      pi_said = #{pi_said,jdbcType=INTEGER},
-      pi_sacode = #{pi_sacode,jdbcType=VARCHAR},
-      pi_total = #{pi_total,jdbcType=DOUBLE},
-      pi_recordmanid = #{pi_recordmanid,jdbcType=INTEGER},
-      pi_recordman = #{pi_recordman,jdbcType=VARCHAR},
-      pi_recorddate = #{createTime,jdbcType=TIMESTAMP},
-      pi_status = #{pi_status,jdbcType=VARCHAR},
-      pi_statuscode = #{pi_statuscode,jdbcType=VARCHAR},
-      pi_printstatus = #{pi_printstatus,jdbcType=VARCHAR},
-      pi_printstatuscode = #{pi_printstatuscode,jdbcType=VARCHAR},
-      companyid = #{companyId,jdbcType=INTEGER},
-      updaterid = #{updaterId,jdbcType=INTEGER},
-      updatetime = #{updateTime,jdbcType=TIMESTAMP},
-      pi_text1 = #{pi_text1,jdbcType=VARCHAR},
-      pi_text2 = #{pi_text2,jdbcType=VARCHAR},
-      pi_text3 = #{pi_text3,jdbcType=VARCHAR},
-      pi_text4 = #{pi_text4,jdbcType=VARCHAR},
-      pi_text5 = #{pi_text5,jdbcType=VARCHAR},
-      pi_address = #{pi_address,jdbcType=LONGVARCHAR},
-      pi_auditdate = #{pi_auditdate,jdbcType=TIMESTAMP},
-      pi_auditman = #{pi_auditman,jdbcType=VARCHAR},
-      pi_remark = #{pi_remark,jdbcType=VARCHAR}
-    where pi_id = #{id,jdbcType=INTEGER}
-  </update>
+
 
   <select id="validateCodeWhenInsert"  resultType="int">
     select count(1) from prodinout where pi_inoutno = #{pi_inoutno} and companyid = #{companyId}
@@ -472,6 +430,11 @@
       DELETE FROM prodinout WHERE PI_CLASS=#{type} AND PI_INOUTNO=#{code} AND COMPANYID=#{companyId}
   </delete>
 
+  <update id="updateCreator">
+    update prodinout set creatorId = #{userId} , creatorName=#{userName} where pi_id=#{id}
+  </update>
+
+
     <select id="post" parameterMap="postParamMap" statementType="CALLABLE">
         CALL SP_COMMITPRODINOUT(?, ?, ?, ?, ?)
     </select>

+ 4 - 0
base-servers/account/account-dto/pom.xml

@@ -22,6 +22,10 @@
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>commons-dto</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>file-dto</artifactId>
+        </dependency>
     </dependencies>
 
 </project>

+ 39 - 0
base-servers/account/account-dto/src/main/java/com/usoftchina/saas/account/dto/CompanyDTO.java

@@ -1,8 +1,11 @@
 package com.usoftchina.saas.account.dto;
 
+import com.usoftchina.saas.file.dto.FileInfoDTO;
 import io.swagger.annotations.ApiModel;
 
 import java.io.Serializable;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @author yingp
@@ -21,6 +24,42 @@ public class CompanyDTO implements Serializable{
     private String businessCode;
     private String address;
     private String logoUrl;
+    private String tel;
+    private String fax;
+    private String signet;      //电子章
+    private List<Map<String, FileInfoDTO>> fileInfoList;
+
+    public List<Map<String, FileInfoDTO>> getFileInfoList() {
+        return fileInfoList;
+    }
+
+    public void setFileInfoList(List<Map<String, FileInfoDTO>> fileInfoList) {
+        this.fileInfoList = fileInfoList;
+    }
+
+    public String getTel() {
+        return tel;
+    }
+
+    public void setTel(String tel) {
+        this.tel = tel;
+    }
+
+    public String getFax() {
+        return fax;
+    }
+
+    public void setFax(String fax) {
+        this.fax = fax;
+    }
+
+    public String getSignet() {
+        return signet;
+    }
+
+    public void setSignet(String signet) {
+        this.signet = signet;
+    }
     private Long uu;
 
     public Long getId() {

+ 41 - 5
base-servers/account/account-dto/src/main/java/com/usoftchina/saas/account/dto/CompanyRegDTO.java

@@ -10,6 +10,7 @@ import java.io.Serializable;
  */
 @ApiModel(value = "CompanyReg", description = "公司注册信息")
 public class CompanyRegDTO implements Serializable{
+    private Long id;
     /**
      * 唯一名称
      */
@@ -19,7 +20,42 @@ public class CompanyRegDTO implements Serializable{
      */
     private String businessCode;
     private String address;
-    private String logoUrl;
+    private String logoId;
+    private String tel;
+    private String fax;
+    private String signet;      //电子章
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getTel() {
+        return tel;
+    }
+
+    public void setTel(String tel) {
+        this.tel = tel;
+    }
+
+    public String getFax() {
+        return fax;
+    }
+
+    public void setFax(String fax) {
+        this.fax = fax;
+    }
+
+    public String getSignet() {
+        return signet;
+    }
+
+    public void setSignet(String signet) {
+        this.signet = signet;
+    }
 
     public String getName() {
         return name;
@@ -46,11 +82,11 @@ public class CompanyRegDTO implements Serializable{
     }
 
     public String getLogoUrl() {
-        return logoUrl;
+        return logoId;
     }
 
-    public void setLogoUrl(String logoUrl) {
-        this.logoUrl = logoUrl;
+    public void setLogoUrl(String logoId) {
+        this.logoId = logoId;
     }
 
     @Override
@@ -59,7 +95,7 @@ public class CompanyRegDTO implements Serializable{
                 "name='" + name + '\'' +
                 ", businessCode='" + businessCode + '\'' +
                 ", address='" + address + '\'' +
-                ", logoUrl='" + logoUrl + '\'' +
+                ", logoUrl='" + logoId + '\'' +
                 '}';
     }
 }

+ 12 - 0
base-servers/account/account-server/pom.xml

@@ -21,10 +21,18 @@
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>account-api</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>file-api</artifactId>
+        </dependency>
         <dependency>
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>auth-client</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>file-dto</artifactId>
+        </dependency>
         <!-- db -->
         <dependency>
             <groupId>mysql</groupId>
@@ -34,6 +42,10 @@
             <groupId>org.mybatis.spring.boot</groupId>
             <artifactId>mybatis-spring-boot-starter</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper-spring-boot-starter</artifactId>
+        </dependency>
         <!-- sleuth -->
         <dependency>
             <groupId>org.springframework.cloud</groupId>

+ 2 - 0
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/AccountApplication.java

@@ -5,6 +5,7 @@ import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
+import org.springframework.cloud.openfeign.EnableFeignClients;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
 
 /**
@@ -13,6 +14,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
  */
 @SpringBootApplication
 @EnableEurekaClient
+@EnableFeignClients("com.usoftchina.saas")
 @EnableTransactionManagement
 @MapperScan(basePackages = "com.usoftchina.saas.account.mapper")
 @EnableAuthClient

+ 9 - 2
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/controller/AccountController.java

@@ -9,8 +9,11 @@ import com.usoftchina.saas.account.service.RoleService;
 import com.usoftchina.saas.account.vo.CompanyBaseVO;
 import com.usoftchina.saas.auth.client.annotation.IgnoreAuth;
 import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.exception.ExceptionCode;
+import com.usoftchina.saas.page.PageDefault;
+import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.utils.BeanMapper;
 import com.usoftchina.saas.utils.CollectionUtils;
 import com.usoftchina.saas.utils.RegexpUtils;
@@ -321,9 +324,13 @@ public class AccountController {
         return Result.success();
     }
 
+    /**
+     * 账户角色列表
+     * @return
+     */
     @GetMapping("/accountRole/list")
-    public Result getAccountRole(){
-        return Result.success(accountService.selectAccountRole());
+    public Result getAccountRole(@PageDefault(number = 1, size = 10) PageRequest pageRequest, ListReqDTO listReqDTO){
+        return Result.success(accountService.selectAccountRole(pageRequest, listReqDTO));
     }
 
     /**

+ 12 - 0
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/controller/CompanyController.java

@@ -8,10 +8,14 @@ import com.usoftchina.saas.account.service.CompanyService;
 import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.exception.ExceptionCode;
+import com.usoftchina.saas.file.dto.FileInfoDTO;
 import com.usoftchina.saas.utils.BeanMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.List;
+import java.util.Map;
+
 /**
  * @author yingp
  * @date 2018/10/2
@@ -47,6 +51,12 @@ public class CompanyController {
         return Result.success();
     }
 
+    @PostMapping("/save")
+    public Result save(@RequestBody CompanyRegDTO companyRegDTO){
+        companyService.update(companyRegDTO);
+        return Result.success();
+    }
+
     /**
      * 从其他平台复制已注册企业信息
      *
@@ -143,8 +153,10 @@ public class CompanyController {
     @GetMapping(path = "/read/current")
     public Result<CompanyDTO> getCurrentCompany() {
         Company company = companyService.findByPrimaryKey(BaseContextHolder.getCompanyId());
+        List<Map<String, FileInfoDTO>> fileInfoList = companyService.getFileByCompany(company);
         if (null != company) {
             CompanyDTO companyDTO = BeanMapper.map(company, CompanyDTO.class);
+            companyDTO.setFileInfoList(fileInfoList);
             return Result.success(companyDTO);
         }
         return Result.error(ExceptionCode.COMPANY_NOT_EXIST);

+ 7 - 1
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/mapper/AccountRoleMapper.java

@@ -49,5 +49,11 @@ public interface AccountRoleMapper {
      */
     void deleteByRoleId(@Param("roleId") Long roleId);
 
-    List<AccountRoleDTO> selectAccountRole();
+    List<AccountRoleDTO> selectAccountRole(@Param("condition") String condition, @Param("companyId") Long companyId);
+
+    /**
+     * 解除账户绑定的所有角色
+     * @param id
+     */
+    void unBindRolesById(Long id);
 }

+ 7 - 1
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/mapper/CompanyMapper.java

@@ -1,5 +1,6 @@
 package com.usoftchina.saas.account.mapper;
 
+import com.usoftchina.saas.account.dto.CompanyRegDTO;
 import com.usoftchina.saas.account.po.Company;
 import com.usoftchina.saas.account.vo.CompanyBaseVO;
 import org.apache.ibatis.annotations.Param;
@@ -75,5 +76,10 @@ public interface CompanyMapper {
      */
     int deleteByPrimaryKey(@Param("id") Long id);
 
-
+    /**
+     * 更新
+     * @param companyRegDTO
+     * @return
+     */
+    int updateByPrimaryKeySelective(CompanyRegDTO companyRegDTO);
 }

+ 28 - 0
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/po/Company.java

@@ -24,6 +24,34 @@ public class Company implements Serializable {
      * 企业logo
      */
     private String logoUrl;
+    private String tel;
+    private String fax;
+    private String signet;
+
+    public String getTel() {
+        return tel;
+    }
+
+    public void setTel(String tel) {
+        this.tel = tel;
+    }
+
+    public String getFax() {
+        return fax;
+    }
+
+    public void setFax(String fax) {
+        this.fax = fax;
+    }
+
+    public String getSignet() {
+        return signet;
+    }
+
+    public void setSignet(String signet) {
+        this.signet = signet;
+    }
+
     private Date createTime;
     private long creatorId;
     private Date updateTime;

+ 4 - 1
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/AccountService.java

@@ -1,8 +1,11 @@
 package com.usoftchina.saas.account.service;
 
+import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.account.dto.AccountRoleDTO;
 import com.usoftchina.saas.account.po.Account;
 import com.usoftchina.saas.account.po.RoleResource;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.page.PageRequest;
 
 import java.util.List;
 
@@ -129,7 +132,7 @@ public interface AccountService {
      * 账号+角色信息列表
      * @return
      */
-    List<AccountRoleDTO> selectAccountRole();
+    PageInfo<AccountRoleDTO> selectAccountRole(PageRequest pageRequest, ListReqDTO listReqDTO);
 
     /**
      * 解除个人账号与角色的绑定

+ 17 - 0
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/CompanyService.java

@@ -1,9 +1,12 @@
 package com.usoftchina.saas.account.service;
 
+import com.usoftchina.saas.account.dto.CompanyRegDTO;
 import com.usoftchina.saas.account.po.Company;
 import com.usoftchina.saas.account.vo.CompanyBaseVO;
+import com.usoftchina.saas.file.dto.FileInfoDTO;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * @author yingp
@@ -50,6 +53,14 @@ public interface CompanyService {
      */
     Company findByPrimaryKey(Long id);
 
+    /**
+     * 查找公司的附件信息
+     *
+     * @param company
+     * @return
+     */
+    List<Map<String,FileInfoDTO>> getFileByCompany(Company company);
+
     /**
      * 按个人账户查找全部绑定企业
      *
@@ -81,4 +92,10 @@ public interface CompanyService {
      * @param appId
      */
     void unbindApp(long companyId, String appId);
+
+    /**
+     * 更新公司信息
+     * @param companyRegDTO
+     */
+    void update(CompanyRegDTO companyRegDTO);
 }

+ 21 - 2
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/impl/AccountServiceImpl.java

@@ -1,5 +1,7 @@
 package com.usoftchina.saas.account.service.impl;
 
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.account.cache.AccountCache;
 import com.usoftchina.saas.account.dto.AccountRoleDTO;
 import com.usoftchina.saas.account.mapper.AccountCompanyMapper;
@@ -11,7 +13,9 @@ import com.usoftchina.saas.account.po.Role;
 import com.usoftchina.saas.account.po.RoleResource;
 import com.usoftchina.saas.account.service.AccountService;
 import com.usoftchina.saas.account.service.RoleService;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.page.PageRequest;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -121,6 +125,7 @@ public class AccountServiceImpl implements AccountService {
 
     @Override
     public void bindRoles(Long accountId, String roleIds) {
+        accountRoleMapper.unBindRolesById(accountId);
         String[] array = roleIds.split(",");
         for (int i = 0; i < array.length; i++){
             bindRole(accountId, Long.parseLong(array[i]));
@@ -128,8 +133,22 @@ public class AccountServiceImpl implements AccountService {
     }
 
     @Override
-    public List<AccountRoleDTO> selectAccountRole(){
-        return accountRoleMapper.selectAccountRole();
+    public PageInfo<AccountRoleDTO> selectAccountRole(PageRequest page, ListReqDTO listReqDTO){
+        PageHelper.startPage(page.getNumber(), page.getSize());
+        List<AccountRoleDTO> accountRoleDTOList = getList(listReqDTO);
+        //取分页信息
+        PageInfo<AccountRoleDTO> pageInfo = new PageInfo<AccountRoleDTO>(accountRoleDTOList);
+        return pageInfo;
+    }
+
+    private List<AccountRoleDTO> getList(ListReqDTO listReqDTO) {
+        Long companyId = BaseContextHolder.getCompanyId();
+        String condition = listReqDTO.getFinalCondition();
+        if(condition == null){
+            condition = "1=1";
+        }
+        List<AccountRoleDTO> AccountRoleDTOList = accountRoleMapper.selectAccountRole(condition, companyId);
+        return AccountRoleDTOList;
     }
 
     @Override

+ 29 - 2
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/impl/CompanyServiceImpl.java

@@ -1,5 +1,6 @@
 package com.usoftchina.saas.account.service.impl;
 
+import com.usoftchina.saas.account.dto.CompanyRegDTO;
 import com.usoftchina.saas.account.mapper.AccountCompanyMapper;
 import com.usoftchina.saas.account.mapper.CompanyAppMapper;
 import com.usoftchina.saas.account.mapper.CompanyMapper;
@@ -7,12 +8,14 @@ import com.usoftchina.saas.account.po.Company;
 import com.usoftchina.saas.account.service.CompanyService;
 import com.usoftchina.saas.account.vo.CompanyBaseVO;
 import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.file.api.FileApi;
+import com.usoftchina.saas.file.dto.FileInfoDTO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.StringUtils;
 
-import java.util.Date;
-import java.util.List;
+import java.util.*;
 
 /**
  * @author yingp
@@ -30,6 +33,9 @@ public class CompanyServiceImpl implements CompanyService{
     @Autowired
     private CompanyAppMapper companyAppMapper;
 
+    @Autowired
+    private FileApi fileApi;
+
     @Override
     public boolean save(Company company) {
         Date nowDate = new Date();
@@ -41,6 +47,13 @@ public class CompanyServiceImpl implements CompanyService{
         return companyMapper.insert(company) > 0;
     }
 
+    @Override
+    public void update(CompanyRegDTO companyRegDTO){
+        if (companyRegDTO.getId() > 0) {
+            companyMapper.updateByPrimaryKeySelective(companyRegDTO);
+        }
+    }
+
     @Override
     public Company findByName(String name) {
         return companyMapper.selectByName(name);
@@ -61,6 +74,20 @@ public class CompanyServiceImpl implements CompanyService{
         return companyMapper.selectByPrimaryKey(id);
     }
 
+    @Override
+    public List<Map<String, FileInfoDTO>> getFileByCompany(Company company){
+        List<Map<String,FileInfoDTO>> fileInfoList = new ArrayList<Map<String, FileInfoDTO>>();
+        Map<String, FileInfoDTO> fileInfoMap = new HashMap<String, FileInfoDTO>();
+        if (!StringUtils.isEmpty(company.getLogoUrl())){
+            fileInfoMap.put("logo", fileApi.getFileInfoByPath(company.getLogoUrl()).getData());
+        }
+        if (!StringUtils.isEmpty(company.getSignet())){
+            fileInfoMap.put("signet", fileApi.getFileInfoByPath(company.getSignet()).getData());
+        }
+        fileInfoList.add(fileInfoMap);
+        return fileInfoList;
+    }
+
     @Override
     public List<CompanyBaseVO> findBaseByAccountId(Long accountId) {
         return companyMapper.selectBaseByAccountId(accountId);

+ 11 - 0
base-servers/account/account-server/src/main/resources/mapper/AccountRoleMapper.xml

@@ -21,6 +21,17 @@
         FROM ac_account a
         left join ac_account_role b on a.id=b.account_id
         left join ac_role c  on b.role_id = c.id
+        <where>
+            <if test="condition!=null">
+                ${condition}
+            </if>
+            <if test="companyId!=null">
+                AND C.COMPANY_ID = #{companyId}
+            </if>
+        </where>
         group by a.id,a.username,a.realname,a.email,a.mobile
     </select>
+    <delete id="unBindRolesById" parameterType="java.lang.Long">
+        DELETE FROM AC_ACCOUNT_COMPANY WHERE ACCOUNT_ID = #{id}
+    </delete>
 </mapper>

+ 32 - 4
base-servers/account/account-server/src/main/resources/mapper/CompanyMapper.xml

@@ -12,6 +12,11 @@
         <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
         <result column="updater_id" jdbcType="BIGINT" property="updaterId"/>
         <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
+        <result column="fax" jdbcType="VARCHAR" property="fax"/>
+        <result column="tel" jdbcType="VARCHAR" property="tel"/>
+        <result column="signet" jdbcType="VARCHAR" property="signet"/>
+        <result column="uu" jdbcType="VARCHAR" property="uu"/>
+        <result column="logo_url" jdbcType="VARCHAR" property="logoUrl"/>
     </resultMap>
     <resultMap id="BaseResultMap" type="com.usoftchina.saas.account.vo.CompanyBaseVO">
         <id column="id" jdbcType="BIGINT" property="id"/>
@@ -19,14 +24,16 @@
         <result column="logo_url" jdbcType="VARCHAR" property="logoUrl"/>
     </resultMap>
     <sql id="baseColumns">
-        id,name,business_code,address,uu,creator_id,create_time,updater_id,update_time
+        id,name,business_code,address,uu,creator_id,create_time,updater_id,update_time,fax,tel,signet,uu,logo_url
     </sql>
     <insert id="insert" parameterType="com.usoftchina.saas.account.po.Company"
             useGeneratedKeys="true" keyProperty="id">
-        insert into ac_company(name, business_code, address, logo_url, uu, creator_id, create_time, updater_id, update_time)
+        insert into ac_company(name, business_code, address, logo_url, creator_id, create_time, updater_id, update_time,
+        tel, fax, signet, uu)
         values (#{name,jdbcType=VARCHAR}, #{businessCode,jdbcType=VARCHAR},
-        #{address,jdbcType=VARCHAR}, #{logoUrl,jdbcType=VARCHAR}, #{uu,jdbcType=BIGINT}, #{creatorId,jdbcType=BIGINT},
-        #{createTime,jdbcType=TIMESTAMP}, #{updaterId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP})
+        #{address,jdbcType=VARCHAR}, #{logoUrl,jdbcType=VARCHAR}, #{creatorId,jdbcType=BIGINT},
+        #{createTime,jdbcType=TIMESTAMP}, #{updaterId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP},
+        #{tel,jdbcType=VARCHAR}, #{fax,jdbcType=VARCHAR}, #{signet,jdbcType=VARCHAR}, #{uu,jdbcType=VARCHAR})
     </insert>
     <insert id="insertSelective" parameterType="com.usoftchina.saas.account.po.Company"
             useGeneratedKeys="true" keyProperty="id">
@@ -109,4 +116,25 @@
     <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
         delete from ac_company where id=#{id,jdbcType=BIGINT}
     </delete>
+    <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.account.po.Company">
+        UPDATE ac_company
+        <set>
+            <if test="address != null">
+                address = #{address,jdbcType=VARCHAR},
+            </if>
+            <if test="logoUrl != null">
+                logo_url = #{logoUrl,jdbcType=VARCHAR},
+            </if>
+            <if test="tel != null">
+                tel = #{tel,jdbcType=VARCHAR},
+            </if>
+            <if test="fax != null">
+                fax = #{fax,jdbcType=VARCHAR},
+            </if>
+            <if test="signet != null">
+                signet = #{signet,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where id = #{id}
+    </update>
 </mapper>

+ 13 - 13
base-servers/file/file-api/src/main/java/com/usoftchina/saas/file/api/FileApi.java

@@ -39,7 +39,7 @@ public interface FileApi {
      * @return
      */
     @PostMapping(value = "/folder")
-    Result<FolderDTO> createFolder(FolderSaveDTO newFolder);
+    Result<FolderDTO> createFolder(@RequestBody FolderSaveDTO newFolder);
 
     /**
      * 根据id查看文件详情
@@ -57,7 +57,7 @@ public interface FileApi {
      * @return
      */
     @GetMapping(value = "/info")
-    Result<FileInfoDTO> getFileInfoByPath(@RequestParam String path);
+    Result<FileInfoDTO> getFileInfoByPath(@RequestParam("path") String path);
 
     /**
      * 查看子文件
@@ -66,7 +66,7 @@ public interface FileApi {
      * @return
      */
     @GetMapping(value = "/list")
-    Result<List<FileInfoDTO>> listFiles(Long folderId);
+    Result<List<FileInfoDTO>> listFiles(@RequestParam("folderId") Long folderId);
 
     /**
      * 上传文件到指定文件夹
@@ -77,7 +77,7 @@ public interface FileApi {
      * @throws Exception
      */
     @PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
-    Result<FileInfoDTO> upload(Long folderId, @RequestPart(value = "file") MultipartFile file) throws Exception;
+    Result<FileInfoDTO> upload(@RequestParam("folderId") Long folderId, @RequestPart(value = "file") MultipartFile file) throws Exception;
 
     /**
      * 文件下载
@@ -86,7 +86,7 @@ public interface FileApi {
      * @return
      */
     @GetMapping(value = "/download/{id}")
-    byte[] download(@PathVariable Long id);
+    byte[] download(@PathVariable("id") Long id);
 
     /**
      * 文件下载
@@ -95,7 +95,7 @@ public interface FileApi {
      * @return
      */
     @GetMapping(value = "/download")
-    byte[] downloadByPath(@RequestParam String path);
+    byte[] downloadByPath(@RequestParam("path") String path);
 
     /**
      * 删除文件
@@ -105,8 +105,8 @@ public interface FileApi {
      * @return
      */
     @GetMapping(value = "/delete/{id}")
-    Result delete(@PathVariable Long id,
-                  @RequestParam(required = false, defaultValue = "false") Boolean purge);
+    Result delete(@PathVariable("id") Long id,
+                  @RequestParam(required = false, defaultValue = "false", value = "purge") Boolean purge);
 
     /**
      * 删除文件
@@ -116,8 +116,8 @@ public interface FileApi {
      * @return
      */
     @GetMapping(value = "/delete")
-    Result deleteByPath(@PathVariable Long id,
-                  @RequestParam(required = false, defaultValue = "false") Boolean purge);
+    Result deleteByPath(@PathVariable("id") Long id,
+                  @RequestParam(required = false, defaultValue = "false", value = "purge") Boolean purge);
 
     /**
      * 还原文件
@@ -126,7 +126,7 @@ public interface FileApi {
      * @return
      */
     @GetMapping(value = "/restore/{id}")
-    Result restore(@PathVariable Long id);
+    Result restore(@PathVariable("id") Long id);
 
     /**
      * 还原文件
@@ -135,7 +135,7 @@ public interface FileApi {
      * @return
      */
     @GetMapping(value = "/restore")
-    Result restoreByPath(@RequestParam String path);
+    Result restoreByPath(@RequestParam("path") String path);
 
     /**
      * 移动文件到文件夹
@@ -145,5 +145,5 @@ public interface FileApi {
      * @return
      */
     @GetMapping(value = "/move")
-    Result move(@RequestParam Long fileId, @RequestParam Long folderId);
+    Result move(@RequestParam("fileId") Long fileId, @RequestParam("folderId") Long folderId);
 }

+ 2 - 0
base-servers/file/file-server/src/main/java/com/usoftchina/saas/file/FileApplication.java

@@ -10,6 +10,7 @@ import org.springframework.context.annotation.EnableMBeanExport;
 import org.springframework.context.annotation.Import;
 import org.springframework.jmx.support.RegistrationPolicy;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
 
 /**
  * @author yingp
@@ -22,6 +23,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
 @EnableAuthClient
 @Import(FdfsClientConfig.class)
 @EnableMBeanExport(registration = RegistrationPolicy.IGNORE_EXISTING)
+@EnableSwagger2
 public class FileApplication {
     public static void main(String[] args) {
         SpringApplication.run(FileApplication.class, args);

+ 16 - 16
base-servers/file/file-server/src/main/java/com/usoftchina/saas/file/controller/FileController.java

@@ -82,7 +82,7 @@ public class FileController {
 
     @ApiOperation(value = "创建文件夹")
     @PostMapping(value = "/folder")
-    public Result<FolderDTO> createFolder(FolderSaveDTO newFolder) {
+    public Result<FolderDTO> createFolder(@RequestBody FolderSaveDTO newFolder) {
         BizAssert.notNull(newFolder.getName(), ExceptionCode.FOLDER_NAME_EMPTY);
         // 检查父文件夹
         FileInfo parent = checkFolder(newFolder.getFolderId());
@@ -93,7 +93,7 @@ public class FileController {
 
     @ApiOperation(value = "上传文件")
     @PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
-    public Result<FileInfoDTO> upload(Long folderId, @RequestPart(value = "file") MultipartFile file) throws Exception {
+    public Result<FileInfoDTO> upload(@RequestParam("folderId") Long folderId, @RequestPart(value = "file") MultipartFile file) throws Exception {
         // 检查父文件夹
         FileInfo parent = checkFolder(folderId);
         FileInfo info = FileInfo.newFile(file).folder(parent.getId())
@@ -104,7 +104,7 @@ public class FileController {
 
     @ApiOperation(value = "下载文件")
     @GetMapping(value = "/download/{id}")
-    public void download(@PathVariable Long id, HttpServletResponse response) throws Exception {
+    public void download(@PathVariable("id") Long id, HttpServletResponse response) throws Exception {
         FileInfo info = fileService.findByPrimaryKey(id);
         if (null == info) {
             throw new BizException(ExceptionCode.FILE_NOT_EXISTS);
@@ -135,7 +135,7 @@ public class FileController {
 
     @ApiOperation(value = "下载文件")
     @GetMapping(value = "/download")
-    public void download(@RequestParam String path, HttpServletResponse response) throws Exception {
+    public void download(@RequestParam("path") String path, HttpServletResponse response) throws Exception {
         FileInfo info = fileService.findByFullPath(path);
         if (null == info) {
             throw new BizException(ExceptionCode.FILE_NOT_EXISTS);
@@ -145,7 +145,7 @@ public class FileController {
 
     @ApiOperation(value = "查看文件")
     @GetMapping(value = "/view/{id}")
-    public void view(@PathVariable Long id, HttpServletResponse response) throws Exception {
+    public void view(@PathVariable("id") Long id, HttpServletResponse response) throws Exception {
         FileInfo info = fileService.findByPrimaryKey(id);
         if (null == info) {
             throw new BizException(ExceptionCode.FILE_NOT_EXISTS);
@@ -169,7 +169,7 @@ public class FileController {
 
     @ApiOperation(value = "查看文件")
     @GetMapping(value = "/view")
-    public void view(@RequestParam String path, HttpServletResponse response) throws Exception {
+    public void view(@RequestParam("path") String path, HttpServletResponse response) throws Exception {
         FileInfo info = fileService.findByFullPath(path);
         if (null == info) {
             throw new BizException(ExceptionCode.FILE_NOT_EXISTS);
@@ -179,7 +179,7 @@ public class FileController {
 
     @ApiOperation(value = "查看文件信息")
     @GetMapping(value = "/info/{id}")
-    public Result<FileInfoDTO> getFileInfo(@PathVariable Long id) {
+    public Result<FileInfoDTO> getFileInfo(@PathVariable("id") Long id) {
         FileInfo info = fileService.findByPrimaryKey(id);
         if (null != info) {
             return Result.success(BeanMapper.map(info, FileInfoDTO.class));
@@ -189,7 +189,7 @@ public class FileController {
 
     @ApiOperation(value = "查看文件信息")
     @GetMapping(value = "/info")
-    public Result<FileInfoDTO> getFileInfo(@RequestParam String path) {
+    public Result<FileInfoDTO> getFileInfo(@RequestParam("path") String path) {
         FileInfo info = fileService.findByFullPath(path);
         if (null != info) {
             return Result.success(BeanMapper.map(info, FileInfoDTO.class));
@@ -199,7 +199,7 @@ public class FileController {
 
     @ApiOperation(value = "查看子文件")
     @GetMapping(value = "/list")
-    public Result<List<FileInfoDTO>> listFiles(Long folderId) {
+    public Result<List<FileInfoDTO>> listFiles(@RequestParam("folderId") Long folderId) {
         List<FileInfo> files = fileService.findByFolderId(checkFolder(folderId).getId());
         return Result.success(BeanMapper.mapList(files, FileInfoDTO.class));
     }
@@ -287,8 +287,8 @@ public class FileController {
 
     @ApiOperation(value = "删除文件")
     @GetMapping(value = "/delete/{id}")
-    public Result delete(@PathVariable Long id,
-                         @RequestParam(required = false, defaultValue = "false") Boolean purge) {
+    public Result delete(@PathVariable("id") Long id,
+                         @RequestParam(required = false, defaultValue = "false", value = "purge") Boolean purge) {
         FileInfo info = fileService.findByPrimaryKey(id);
         if (null != info) {
             if (purge) {
@@ -302,8 +302,8 @@ public class FileController {
 
     @ApiOperation(value = "删除文件")
     @GetMapping(value = "/delete")
-    public Result delete(@RequestParam String path,
-                         @RequestParam(required = false, defaultValue = "false") Boolean purge) {
+    public Result delete(@RequestParam("id") String path,
+                         @RequestParam(required = false, defaultValue = "false", value = "purge") Boolean purge) {
         FileInfo info = fileService.findByFullPath(path);
         if (null != info) {
             if (purge) {
@@ -317,7 +317,7 @@ public class FileController {
 
     @ApiOperation(value = "还原文件")
     @GetMapping(value = "/restore/{id}")
-    public Result restore(@PathVariable Long id) {
+    public Result restore(@PathVariable("id") Long id) {
         FileInfo info = fileService.findByPrimaryKey(id);
         if (null != info) {
             cascadeRestore(info);
@@ -327,7 +327,7 @@ public class FileController {
 
     @ApiOperation(value = "还原文件")
     @GetMapping(value = "/restore")
-    public Result restore(@RequestParam String path) {
+    public Result restore(@RequestParam("path") String path) {
         FileInfo info = fileService.findByFullPath(path);
         if (null != info) {
             cascadeRestore(info);
@@ -337,7 +337,7 @@ public class FileController {
 
     @ApiOperation(value = "移动文件到文件夹")
     @GetMapping(value = "/move")
-    public Result move(@RequestParam Long fileId, @RequestParam Long folderId) {
+    public Result move(@RequestParam("fileId") Long fileId, @RequestParam("folderId") Long folderId) {
         FileInfo info = fileService.findByPrimaryKey(fileId);
         if (null != info) {
             info.setFolderId(folderId);

+ 1 - 6
base-servers/gateway-server/src/main/resources/application.yml

@@ -104,10 +104,6 @@ spring:
         - Path=/api/commons/**
         filters:
         - RewritePath=/api/commons/(?<segment>.*), /$\{segment}
-      - id: SOCKET-SERVER
-        uri: lb:ws://SOCKET-SERVER
-        predicates:
-        - Path=/ws/**
   redis:
     host: 192.168.253.12
     port: 6379
@@ -179,7 +175,6 @@ auth:
   public-key: auth/pub.key
   ignores:
     - /api/auth/authorize
-    - /api/auth/sso/callback/**
     - /api/account/account/register
     - /api/auth/info
-    - /ws/**
+    - /api/file/download

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

@@ -137,6 +137,32 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
             text: '关联销售单',
             dataIndex: 'pu_salecode',
             width: 120
+        }, {
+            text: '录入人ID',
+            dataIndex: 'creatorId',
+            width: 0
+        }, {
+            text: '录入人',
+            dataIndex: 'creatorName',
+            width: 0
+        }, {
+            text: '录入日期',
+            dataIndex: 'createTime',
+            xtype: 'datecolumn',
+            width: 0
+        }, {
+            text: '更新人ID',
+            dataIndex: 'updaterId',
+            width: 0
+        }, {
+            text: '更新人',
+            dataIndex: 'updater',
+            width: 0
+        }, {
+            text: '更新日期',
+            dataIndex: 'updateTime',
+            xtype: 'datecolumn',
+            width: 0
         }],
         relativeColumn: [{
             text: 'id',

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

@@ -232,9 +232,9 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                             from:'wh_description',to:'pd_whname'
                         }],
                         dbtpls:[{
-                            field:'pd_whcode',width:100
+                            field:'wh_code',width:100
                         },{
-                            field:'pd_whname',width:100
+                            field:'wh_description',width:100
                         }],
                         dbSearchFields:[{
                             emptyText:'输入仓库编号或名称',

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

@@ -117,7 +117,7 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
             width: 120
         },{
             text: '制单人',
-            dataIndex: 'pi_recordman',
+            dataIndex: 'creatorName',
             width: 120
         },{
             text: '审核人',
@@ -131,10 +131,6 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
             text: '录入人ID',
             dataIndex: 'creatorId',
             width: 0
-        }, {
-            text: '录入人',
-            dataIndex: 'creatorName',
-            width: 0
         }, {
             text: '录入日期',
             dataIndex: 'createTime',

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

@@ -233,9 +233,9 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
                             from:'wh_description',to:'pd_whname'
                         }],
                         dbtpls:[{
-                            field:'pd_whcode',width:100
+                            field:'wh_code',width:100
                         },{
-                            field:'pd_whname',width:100
+                            field:'wh_description',width:100
                         }],
                         dbSearchFields:[{
                             emptyText:'输入仓库编号或名称',

+ 1 - 1
frontend/saas-web/app/view/stock/appropriationInOut/FormPanel.js

@@ -238,7 +238,7 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanel', {
         columnWidth : 1
     }, {
         xtype : "textfield", 
-        name : "pi_recordman", 
+        name : "creatorName", 
         fieldLabel : "录入人", 
         readOnly:true
     }, {

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

@@ -129,7 +129,7 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
             width: 120
         },{
             text: '制单人',
-            dataIndex: 'pi_recordman',
+            dataIndex: 'creatorName',
             width: 120
         },{
             text: '审核人',

+ 1 - 1
frontend/saas-web/app/view/stock/otherIn/FormPanel.js

@@ -302,7 +302,7 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
         ]
     },{
         xtype : "textfield", 
-        name : "pi_recordman", 
+        name : "creatorName", 
         fieldLabel : "录入人", 
         readOnly:true
     }, {

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

@@ -133,7 +133,7 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
             width: 120
         },{
             text: '制单人',
-            dataIndex: 'pi_recordman',
+            dataIndex: 'creatorName',
             width: 120
         },{
             text: '审核人',

+ 1 - 1
frontend/saas-web/app/view/stock/otherOut/FormPanel.js

@@ -284,7 +284,7 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
         ]
     },{
         xtype : "textfield", 
-        name : "pi_recordman", 
+        name : "creatorName", 
         fieldLabel : "录入人", 
         readOnly:true
     }, {

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

@@ -115,7 +115,7 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
             width: 120
         },{
             text: '制单人',
-            dataIndex: 'pi_recordman',
+            dataIndex: 'creatorName',
             width: 120
         },{
             text: '审核人',