hy пре 7 година
родитељ
комит
dcdb175b1b
100 измењених фајлова са 3776 додато и 408 уклоњено
  1. 3 2
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java
  2. 2 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/BillCodeSeq.java
  3. 22 0
      applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/EmployeeDTO.java
  4. 23 0
      applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/EmployeeFormDTO.java
  5. 31 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Bom.java
  6. 12 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/BomDetail.java
  7. 33 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Employee.java
  8. 2 2
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Vendor.java
  9. 93 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/EmployeeController.java
  10. 24 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/EmployeeMapper.java
  11. 29 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/EmployeeService.java
  12. 3 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/BomServiceImpl.java
  13. 120 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/EmployeeServiceImpl.java
  14. 6 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java
  15. 2 1
      applications/document/document-server/src/main/resources/mapper/BankinformationMapper.xml
  16. 47 16
      applications/document/document-server/src/main/resources/mapper/BomDetailMapper.xml
  17. 5 2
      applications/document/document-server/src/main/resources/mapper/BomMapper.xml
  18. 2 2
      applications/document/document-server/src/main/resources/mapper/CustomerMapper.xml
  19. 204 0
      applications/document/document-server/src/main/resources/mapper/EmployeeMapper.xml
  20. 1 1
      applications/document/document-server/src/main/resources/mapper/VendorMapper.xml
  21. 10 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/PaybalanceMapper.java
  22. 9 2
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/RecbalanceMapper.java
  23. 189 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Bankinformation.java
  24. 271 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Customer.java
  25. 9 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalancedet.java
  26. 9 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalancedetail.java
  27. 9 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalancedet.java
  28. 10 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalancedetail.java
  29. 319 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Vendor.java
  30. 2 2
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/FundtransferServiceImpl.java
  31. 2 2
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthreceiptsServiceImpl.java
  32. 2 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthspendingsServiceImpl.java
  33. 81 15
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/PaybalanceServiceImpl.java
  34. 84 11
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/RecbalanceServiceImpl.java
  35. 1 1
      applications/money/money-server/src/main/resources/mapper/AcountbalanceViewMapper.xml
  36. 2 2
      applications/money/money-server/src/main/resources/mapper/FundtransferMapper.xml
  37. 6 6
      applications/money/money-server/src/main/resources/mapper/FundtransferdetailMapper.xml
  38. 2 2
      applications/money/money-server/src/main/resources/mapper/OthreceiptsMapper.xml
  39. 3 3
      applications/money/money-server/src/main/resources/mapper/OthreceiptsdetailMapper.xml
  40. 2 2
      applications/money/money-server/src/main/resources/mapper/OthspendingsMapper.xml
  41. 3 3
      applications/money/money-server/src/main/resources/mapper/OthspendingsdetailMapper.xml
  42. 255 1
      applications/money/money-server/src/main/resources/mapper/PaybalanceMapper.xml
  43. 6 5
      applications/money/money-server/src/main/resources/mapper/PaybalancedetMapper.xml
  44. 6 5
      applications/money/money-server/src/main/resources/mapper/PaybalancedetailMapper.xml
  45. 255 2
      applications/money/money-server/src/main/resources/mapper/RecbalanceMapper.xml
  46. 6 5
      applications/money/money-server/src/main/resources/mapper/RecbalancedetMapper.xml
  47. 6 5
      applications/money/money-server/src/main/resources/mapper/RecbalancedetailMapper.xml
  48. 1 1
      applications/money/money-server/src/main/resources/mapper/SubledgerMapper.xml
  49. 2 4
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/ProdInOutController.java
  50. 29 1
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/PurchaseList.java
  51. 17 5
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java
  52. 30 32
      applications/purchase/purchase-server/src/main/resources/mapper/PurchaseListMapper.xml
  53. 29 1
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/po/SaleList.java
  54. 29 31
      applications/sale/sale-server/src/main/resources/mapper/SaleListMapper.xml
  55. 4 188
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/Make.java
  56. 19 0
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/report/ProdinoutCountView.java
  57. 2 0
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/MakeMapper.java
  58. 21 3
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/MakeServiceImpl.java
  59. 15 5
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/ProdInOutServiceImpl.java
  60. 45 6
      applications/storage/storage-server/src/main/resources/mapper/MakeMapper.xml
  61. 23 3
      applications/storage/storage-server/src/main/resources/mapper/ProdInOutReportMapper.xml
  62. 34 0
      base-servers/account/account-dto/src/main/java/com/usoftchina/saas/account/dto/OtherPowerDTO.java
  63. 123 0
      base-servers/account/account-dto/src/main/java/com/usoftchina/saas/account/dto/PowerDTO.java
  64. 5 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/controller/RoleController.java
  65. 7 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/mapper/ResourceMapper.java
  66. 15 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/mapper/RoleResourceMapper.java
  67. 43 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/po/OtherPower.java
  68. 1 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/ResourceService.java
  69. 8 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/RoleService.java
  70. 97 5
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/impl/RoleServiceImpl.java
  71. 3 0
      base-servers/account/account-server/src/main/resources/mapper/ResourceMapper.xml
  72. 18 0
      base-servers/account/account-server/src/main/resources/mapper/RoleResourceMapper.xml
  73. 1 0
      base-servers/auth/auth-client/src/main/java/com/usoftchina/saas/auth/client/interceptor/AuthRestInterceptor.java
  74. 1 0
      base-servers/gateway-server/src/main/java/com/usoftchina/saas/gateway/config/AuthFilter.java
  75. 5 1
      framework/core/src/main/java/com/usoftchina/saas/constant/CommonConstants.java
  76. 9 0
      framework/core/src/main/java/com/usoftchina/saas/context/BaseContextHolder.java
  77. 67 0
      frontend/saas-web/app/Application.scss
  78. 12 0
      frontend/saas-web/app/model/chart/DataXY.js
  79. 21 0
      frontend/saas-web/app/model/chart/MultiDataXY.js
  80. 4 0
      frontend/saas-web/app/util/FormUtil.js
  81. 1 2
      frontend/saas-web/app/view/auth/LoginController.js
  82. 89 0
      frontend/saas-web/app/view/core/chart/Area.js
  83. 67 0
      frontend/saas-web/app/view/core/chart/Bar.js
  84. 22 0
      frontend/saas-web/app/view/core/chart/ChartBase.js
  85. 38 0
      frontend/saas-web/app/view/core/chart/Gauge.js
  86. 75 0
      frontend/saas-web/app/view/core/chart/Line.js
  87. 55 0
      frontend/saas-web/app/view/core/chart/Pie.js
  88. 42 0
      frontend/saas-web/app/view/core/chart/Pie3D.js
  89. 55 0
      frontend/saas-web/app/view/core/chart/Polar.js
  90. 71 0
      frontend/saas-web/app/view/core/chart/Stacked.js
  91. 1 0
      frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js
  92. 1 0
      frontend/saas-web/app/view/core/dbfind/MultiDbfindTrigger.js
  93. 1 0
      frontend/saas-web/app/view/core/form/ConDateField.js
  94. 28 1
      frontend/saas-web/app/view/core/form/FormPanel.js
  95. 233 0
      frontend/saas-web/app/view/core/form/MseeageLog.js
  96. 4 4
      frontend/saas-web/app/view/core/form/field/DetailGridField.js
  97. 1 1
      frontend/saas-web/app/view/core/query/QueryPanel.js
  98. 14 4
      frontend/saas-web/app/view/core/report/ReportPanel.js
  99. 6 0
      frontend/saas-web/app/view/core/report/ReportPanel.scss
  100. 9 9
      frontend/saas-web/app/view/document/bom/BasePanel.js

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

@@ -36,7 +36,8 @@ public enum BizExceptionCode implements BaseExceptionCode {
 
 
 
-    //采购
+    //采购 70000-71999
+    PURCCHECKIN_POST_ERROR(70000,""),
 
     //销售
     SALE_ALL_TURNOUT(72000, "该销售单已全部转出货,无法转出货单"),
@@ -58,7 +59,7 @@ public enum BizExceptionCode implements BaseExceptionCode {
 
     //库存
     EMPTY_DATA(76100,"数据为空,请填写后再保存"),
-
+    STORAGE_POST_ERROR(76200,""),
     ;
     private int code;
     private String message;

+ 2 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/BillCodeSeq.java

@@ -6,6 +6,8 @@ package com.usoftchina.saas.commons.po;
  **/
 public enum  BillCodeSeq {
 
+    EMPLOYEE("人员资料", "Employee"),
+
     PRODUCT("物料资料", "Product"),
 
     CUSTOMER("客户资料", "Customer"),

+ 22 - 0
applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/EmployeeDTO.java

@@ -0,0 +1,22 @@
+package com.usoftchina.saas.document.dto;
+
+import com.usoftchina.saas.base.dto.CommonBaseDTO;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * Created by zdw
+ * 2018-11-12 11:18.
+ */
+@Data
+public class EmployeeDTO extends CommonBaseDTO implements Serializable {
+
+
+
+
+
+
+
+
+}

+ 23 - 0
applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/EmployeeFormDTO.java

@@ -0,0 +1,23 @@
+package com.usoftchina.saas.document.dto;
+
+import com.usoftchina.saas.document.entities.Employee;
+
+import java.io.Serializable;
+
+/**
+ * Created by zdw
+ * 2018-11-12 15:49.
+ */
+public class EmployeeFormDTO implements Serializable {
+
+    private Employee main;
+
+    public Employee getMain() {
+        return main;
+    }
+
+    public void setMain(Employee main) {
+        this.main = main;
+    }
+
+}

+ 31 - 0
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Bom.java

@@ -1,6 +1,7 @@
 package com.usoftchina.saas.document.entities;
 
 import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import com.usoftchina.saas.document.dto.ProductDTO;
 
 import java.io.Serializable;
 import java.util.Date;
@@ -34,6 +35,36 @@ public class Bom extends CommonBaseEntity implements Serializable {
 
     private String bo_text5;
 
+    private String pr_spec;
+
+    private String pr_brand;
+
+    private String pr_orispeccode;
+
+    public String getPr_spec() {
+        return pr_spec;
+    }
+
+    public void setPr_spec(String pr_spec) {
+        this.pr_spec = pr_spec;
+    }
+
+    public String getPr_brand() {
+        return pr_brand;
+    }
+
+    public void setPr_brand(String pr_brand) {
+        this.pr_brand = pr_brand;
+    }
+
+    public String getPr_orispeccode() {
+        return pr_orispeccode;
+    }
+
+    public void setPr_orispeccode(String pr_orispeccode) {
+        this.pr_orispeccode = pr_orispeccode;
+    }
+
     public Integer getBo_motherid() {
         return bo_motherid;
     }

+ 12 - 0
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/BomDetail.java

@@ -1,6 +1,8 @@
 package com.usoftchina.saas.document.entities;
 
 import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import com.usoftchina.saas.document.dto.ProductDTO;
+
 import java.io.Serializable;
 
 public class BomDetail extends CommonBaseEntity implements Serializable {
@@ -30,6 +32,16 @@ public class BomDetail extends CommonBaseEntity implements Serializable {
 
     private String bd_text5;
 
+    private ProductDTO productDTO;
+
+    public ProductDTO getProductDTO() {
+        return productDTO;
+    }
+
+    public void setProductDTO(ProductDTO productDTO) {
+        this.productDTO = productDTO;
+    }
+
     public Long getBd_bomid() {
         return bd_bomid;
     }

+ 33 - 0
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Employee.java

@@ -0,0 +1,33 @@
+package com.usoftchina.saas.document.entities;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class Employee extends CommonBaseEntity implements Serializable {
+
+    private String em_code;
+
+    private String em_name;
+
+    private String em_password;
+
+    private String em_class;
+
+    private String em_mobile;
+
+    private String em_email;
+
+    private String em_text1;
+
+    private String em_text2;
+
+    private String em_text3;
+
+    private String em_text4;
+
+    private String em_text5;
+
+}

+ 2 - 2
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Vendor.java

@@ -197,11 +197,11 @@ public class Vendor extends CommonBaseEntity implements Serializable{
         this.ve_promisedays = ve_promisedays;
     }
 
-    public double getVe_taxrate() {
+    public Double getVe_taxrate() {
         return ve_taxrate;
     }
 
-    public void setVe_taxrate(double ve_taxrate) {
+    public void setVe_taxrate(Double ve_taxrate) {
         this.ve_taxrate = ve_taxrate;
     }
 

+ 93 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/EmployeeController.java

@@ -0,0 +1,93 @@
+package com.usoftchina.saas.document.controller;
+
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.document.dto.CustomerFormDTO;
+import com.usoftchina.saas.document.dto.EmployeeDTO;
+import com.usoftchina.saas.document.dto.EmployeeFormDTO;
+import com.usoftchina.saas.document.service.EmployeeService;
+import com.usoftchina.saas.page.PageRequest;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Created by zdw
+ * 2018-10-23 11:39.
+ */
+@RestController
+@RequestMapping("/employee")
+public class EmployeeController {
+
+    @Autowired
+    private EmployeeService employeeService;
+
+
+    /**
+     * 人员资料列表
+     *
+     * @param page
+     * @param req
+     * @return
+     */
+    @GetMapping("/list")
+    public Result<PageInfo<EmployeeDTO>> getListData(PageRequest page, ListReqDTO req) {
+        PageInfo<EmployeeDTO> listData = employeeService.getListData(page, req);
+        return Result.success(listData);
+    }
+
+    /**
+     * 获取人员资料表单
+     *
+     * @return
+     */
+    @GetMapping("/read/{id}")
+    public Result<CustomerFormDTO> getFormData(@PathVariable("id") Long id) {
+        Map<String, Object> map = new HashMap<String, Object>();
+        map.put("main", employeeService.getFormData(id));
+        return Result.success(map);
+    }
+
+    /**
+     * 客户资料表单保存
+     *
+     * @param
+     * @return
+     */
+    @PostMapping("/save")
+    public Result<DocBaseDTO> saveFormData(@RequestBody EmployeeFormDTO data) {
+        DocBaseDTO save = employeeService.saveFormData(data.getMain());
+        return Result.success(save);
+    }
+
+    /**
+     * 人员资料删除
+     *
+     * @param id
+     * @return
+     */
+    @PostMapping("/delete/{id}")
+    public Result delete(@PathVariable("id") Long id) {
+        employeeService.delete(id);
+        return Result.success();
+    }
+
+
+    /**
+     * 人员资料批量删除
+     *
+     * @param baseDTOs
+     * @return
+     */
+    @PostMapping("/batchDelete")
+    public Result batchDelete(@RequestBody BatchDealBaseDTO baseDTOs) {
+        employeeService.batchDelete(baseDTOs);
+        return Result.success();
+    }
+
+}

+ 24 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/EmployeeMapper.java

@@ -0,0 +1,24 @@
+package com.usoftchina.saas.document.mapper;
+
+import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.document.dto.EmployeeDTO;
+import com.usoftchina.saas.document.entities.Employee;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface EmployeeMapper extends CommonBaseMapper<Employee> {
+    int deleteByPrimaryKey(Long em_id);
+
+    int insertSelective(Employee record);
+
+    Employee selectByPrimaryKey(Long em_id);
+
+    int updateByPrimaryKeySelective(Employee record);
+
+    List<EmployeeDTO> selectEmployeeListByCondition(@Param("con") String con,@Param("companyId") Long companyId);
+
+    Integer validateCodeWhenInsert(@Param("code") String code, @Param("companyId") Long companyId);
+
+    Integer validateCodeWhenUpdate(@Param("code") String code, @Param("id") Long id, @Param("companyId") Long company);
+}

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

@@ -0,0 +1,29 @@
+package com.usoftchina.saas.document.service;
+
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.document.dto.EmployeeDTO;
+import com.usoftchina.saas.document.entities.Employee;
+import com.usoftchina.saas.document.mapper.EmployeeMapper;
+import com.usoftchina.saas.page.PageRequest;
+
+/**
+ * Created by zdw
+ * 2018-10-23 15:26.
+ */
+public interface EmployeeService extends CommonBaseService<EmployeeMapper, Employee> {
+
+    PageInfo<EmployeeDTO> getListData(PageRequest page, ListReqDTO req);
+
+    Employee getFormData(Long id);
+
+    DocBaseDTO saveFormData(Employee employee);
+
+    void delete(Long id);
+
+    void batchDelete(BatchDealBaseDTO baseDTOs);
+
+}

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

@@ -112,8 +112,11 @@ public class BomServiceImpl extends CommonBaseServiceImpl<BomMapper, Bom> implem
         if(id == null || id <= 0){
             throw new BizException(BizExceptionCode.ILLEGAL_ID);
         }
+        String code = getMapper().selectByPrimaryKey(id).getBo_mothercode();
         getMapper().deleteByPrimaryKey(id);
         bomDetailMapper.deleteByFK(id);
+        //记录LOG
+        messageLogService.delete(generateMsgObj(id, code));
     }
 
     @Override

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

@@ -0,0 +1,120 @@
+package com.usoftchina.saas.document.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.commons.api.MaxnumberService;
+import com.usoftchina.saas.commons.api.MessageLogService;
+import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.commons.exception.BizExceptionCode;
+import com.usoftchina.saas.commons.po.BillCodeSeq;
+import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.document.dto.EmployeeDTO;
+import com.usoftchina.saas.document.entities.Employee;
+import com.usoftchina.saas.document.mapper.EmployeeMapper;
+import com.usoftchina.saas.document.service.EmployeeService;
+import com.usoftchina.saas.exception.BizException;
+import com.usoftchina.saas.page.PageRequest;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Created by zdw
+ * 2018-11-12 11:13.
+ */
+@Service
+public class EmployeeServiceImpl extends CommonBaseServiceImpl<EmployeeMapper, Employee> implements EmployeeService {
+
+    @Autowired
+    private MessageLogService messageLogService;
+    @Autowired
+    private MaxnumberService maxnumberService;
+
+
+    @Override
+    public PageInfo<EmployeeDTO> getListData(PageRequest page, ListReqDTO req) {
+        //设置分页
+        if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
+            page = new PageRequest();
+            page.setNumber(1);
+            page.setSize(10);
+        }
+        PageHelper.startPage(page.getNumber(), page.getSize());
+        List<EmployeeDTO> employeeList = getList(req);
+        //取分页信息
+        PageInfo<EmployeeDTO> pageInfo = new PageInfo<EmployeeDTO>(employeeList);
+        return pageInfo;
+    }
+
+    @Override
+    public Employee getFormData(Long id) {
+        return getMapper().selectByPrimaryKey(id);
+    }
+
+    @Override
+    public DocBaseDTO saveFormData(Employee employee) {
+        DocBaseDTO docBaseDTO = null;
+        if(employee.getId() == 0){
+            String code = pushMaxnubmer(employee.getEm_code(), employee.getId());
+            employee.setCompanyId(BaseContextHolder.getCompanyId());
+            employee.setCreatorId(BaseContextHolder.getUserId());
+            employee.setCreateTime(new Date());
+            getMapper().insertSelective(employee);
+            docBaseDTO = generateMsgObj(employee.getId(), code);
+            //记录LOG
+            messageLogService.save(docBaseDTO);
+        }else{
+            employee.setUpdaterId(BaseContextHolder.getUserId());
+            employee.setUpdateTime(new Date());
+            getMapper().updateByPrimaryKeySelective(employee);
+            docBaseDTO = generateMsgObj(employee.getId(), employee.getEm_code());
+            //记录LOG
+            messageLogService.update(docBaseDTO);
+        }
+        return docBaseDTO;
+    }
+
+    @Override
+    public void delete(Long id) {
+        getMapper().deleteByPrimaryKey(id);
+    }
+
+    @Override
+    public void batchDelete(BatchDealBaseDTO baseDTOs) {
+        for(DocBaseDTO docBaseDTO : baseDTOs.getBaseDTOs()){
+            getMapper().deleteByPrimaryKey(docBaseDTO.getId());
+        }
+    }
+
+    private List<EmployeeDTO> getList(ListReqDTO listReqDTO){
+        Long companyId = BaseContextHolder.getCompanyId();
+        String condition = listReqDTO.getFinalCondition();
+        if(condition == null){
+            condition = "1=1";
+        }
+        List<EmployeeDTO> employeeDTOList = getMapper().selectEmployeeListByCondition(condition, companyId);
+        return employeeDTOList;
+    }
+
+    private DocBaseDTO generateMsgObj(Long id, String code){
+        return new DocBaseDTO(id, code, "Employee");
+    }
+
+    private String pushMaxnubmer(String code, Long id) {
+        if (null == code) {
+            throw new BizException(BizExceptionCode.NULL_CODE);
+        }
+        Long companyId = BaseContextHolder.getCompanyId();
+        Integer count = "0".equals(String.valueOf(id)) ? getMapper().validateCodeWhenInsert(code, companyId) :
+                getMapper().validateCodeWhenUpdate(code, id, companyId);
+        return maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.EMPLOYEE.getCaller()).getData();
+    }
+
+}
+
+

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

@@ -170,7 +170,12 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
     public boolean deleteByPrimaryKey(Long id) {
         //校验物料是否已经在使用状态(采购单、销售单、BOM、出入库单)
         validEnableDel(id);
-        return false;
+        String code = getMapper().getCodeById(id);
+        getMapper().deleteByPrimaryKey(id);
+        DocBaseDTO docBaseDTO = generateMsgObj(id, code);
+        //记录LOG
+        messageLogService.delete(docBaseDTO);
+        return true;
     }
 
     private void validEnableDel(Long id) {

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

@@ -23,6 +23,7 @@
     <result column="bk_text3" property="bk_text3" jdbcType="VARCHAR" />
     <result column="bk_text4" property="bk_text4" jdbcType="VARCHAR" />
     <result column="bk_text5" property="bk_text5" jdbcType="VARCHAR" />
+    <result column="bk_remark" property="bk_remark" jdbcType="VARCHAR" />
   </resultMap>
   <resultMap id="ResultMapWithBLOBs" type="com.usoftchina.saas.document.entities.Bankinformation" extends="BaseResultMap" >
     <result column="bk_remark" property="bk_remark" jdbcType="LONGVARCHAR" />
@@ -30,7 +31,7 @@
   <sql id="Base_Column_List" >
     bk_id, bk_bankcode, bk_bankname, bk_date, bk_type, bk_beginamount, bk_thisamount, 
     bk_status, bk_statuscode, bk_recorderid, bk_recorder, bk_recorddate, bk_ym, companyid, 
-    updaterId, updateTime, bk_text1, bk_text2, bk_text3, bk_text4, bk_text5
+    updaterId, updateTime, bk_text1, bk_text2, bk_text3, bk_text4, bk_text5, bk_remark
   </sql>
   <sql id="Blob_Column_List" >
     bk_remark

+ 47 - 16
applications/document/document-server/src/main/resources/mapper/BomDetailMapper.xml

@@ -19,6 +19,37 @@
     <result column="bd_text3" property="bd_text3" jdbcType="VARCHAR" />
     <result column="bd_text4" property="bd_text4" jdbcType="VARCHAR" />
     <result column="bd_text5" property="bd_text5" jdbcType="VARCHAR" />
+    <association property="productDTO" javaType="com.usoftchina.saas.document.dto.ProductDTO">
+        <id column="pr_id" property="id" jdbcType="INTEGER" />
+        <result column="pr_code" property="pr_code" jdbcType="VARCHAR" />
+        <result column="pr_detail" property="pr_detail" jdbcType="VARCHAR" />
+        <result column="pr_spec" property="pr_spec" jdbcType="VARCHAR" />
+        <result column="pr_unit" property="pr_unit" jdbcType="VARCHAR" />
+        <result column="pr_kind" property="pr_kind" jdbcType="VARCHAR" />
+        <result column="pr_orispeccode" property="pr_orispeccode" jdbcType="VARCHAR" />
+        <result column="pr_whid" property="pr_whid" jdbcType="INTEGER" />
+        <result column="pr_whcode" property="pr_whcode" jdbcType="VARCHAR" />
+        <result column="pr_whname" property="pr_whname" jdbcType="VARCHAR" />
+        <result column="pr_zxbzs" property="pr_zxbzs" jdbcType="INTEGER" />
+        <result column="pr_leadtime" property="pr_leadtime" jdbcType="INTEGER" />
+        <result column="pr_brand" property="pr_brand" jdbcType="VARCHAR" />
+        <result column="pr_standardprice" property="pr_standardprice" jdbcType="DOUBLE" />
+        <result column="pr_purcprice" property="pr_purcprice" jdbcType="DOUBLE" />
+        <result column="pr_saleprice" property="pr_saleprice" jdbcType="DOUBLE" />
+        <result column="pr_vendid" property="pr_vendid" jdbcType="INTEGER" />
+        <result column="pr_vendcode" property="pr_vendcode" jdbcType="VARCHAR" />
+        <result column="pr_vendname" property="pr_vendname" jdbcType="VARCHAR" />
+        <result column="pr_docdate" property="pr_docdate" jdbcType="TIMESTAMP" />
+        <result column="pr_recordmanid" property="pr_recordmanid" jdbcType="INTEGER" />
+        <result column="pr_recordman" property="pr_recordman" jdbcType="VARCHAR" />
+        <result column="pr_status" property="pr_status" jdbcType="VARCHAR" />
+        <result column="pr_statuscode" property="pr_statuscode" jdbcType="VARCHAR" />
+        <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+        <result column="pr_text1" property="pr_text1" jdbcType="VARCHAR" />
+        <result column="pr_text2" property="pr_text2" jdbcType="VARCHAR" />
+        <result column="pr_text3" property="pr_text3" jdbcType="VARCHAR" />
+        <result column="pr_text4" property="pr_text4" jdbcType="VARCHAR" />
+    </association>
   </resultMap>
   <sql id="Base_Column_List" >
     bd_id, bd_bomid, bd_detno, bd_sonid, bd_soncode, bd_unit, bd_baseqty, bd_replace, 
@@ -253,49 +284,49 @@
         <if test="item.bd_bomid != null" >
           bd_bomid = #{item.bd_bomid},
         </if>
-        <if test="bd_detno != null" >
+        <if test="item.bd_detno != null" >
           bd_detno = #{item.bd_detno,jdbcType=INTEGER},
         </if>
-        <if test="bd_sonid != null" >
+        <if test="item.bd_sonid != null" >
           bd_sonid = #{item.bd_sonid,jdbcType=INTEGER},
         </if>
-        <if test="bd_soncode != null" >
+        <if test="item.bd_soncode != null" >
           bd_soncode = #{item.bd_soncode,jdbcType=VARCHAR},
         </if>
-        <if test="bd_unit != null" >
+        <if test="item.bd_unit != null" >
           bd_unit = #{item.bd_unit,jdbcType=VARCHAR},
         </if>
-        <if test="bd_baseqty != null" >
+        <if test="item.bd_baseqty != null" >
           bd_baseqty = #{item.bd_baseqty,jdbcType=INTEGER},
         </if>
-        <if test="bd_replace != null" >
+        <if test="item.bd_replace != null" >
           bd_replace = #{item.bd_replace,jdbcType=VARCHAR},
         </if>
-        <if test="bd_remark != null" >
+        <if test="item.bd_remark != null" >
           bd_remark = #{item.bd_remark,jdbcType=VARCHAR},
         </if>
-        <if test="companyId != null" >
+        <if test="item.companyId != null" >
           companyId = #{item.companyId,jdbcType=INTEGER},
         </if>
-        <if test="updaterId != null" >
+        <if test="item.updaterId != null" >
           updaterId = #{item.updaterId,jdbcType=INTEGER},
         </if>
-        <if test="updateTime != null" >
+        <if test="item.updateTime != null" >
           updateTime = #{item.updateTime,jdbcType=TIMESTAMP},
         </if>
-        <if test="bd_text1 != null" >
+        <if test="item.bd_text1 != null" >
           bd_text1 = #{item.bd_text1,jdbcType=VARCHAR},
         </if>
-        <if test="bd_text2 != null" >
+        <if test="item.bd_text2 != null" >
           bd_text2 = #{item.bd_text2,jdbcType=VARCHAR},
         </if>
-        <if test="bd_text3 != null" >
+        <if test="item.bd_text3 != null" >
           bd_text3 = #{item.bd_text3,jdbcType=VARCHAR},
         </if>
-        <if test="bd_text4 != null" >
+        <if test="item.bd_text4 != null" >
           bd_text4 = #{item.bd_text4,jdbcType=VARCHAR},
         </if>
-        <if test="bd_text5 != null" >
+        <if test="item.bd_text5 != null" >
           bd_text5 = #{item.bd_text5,jdbcType=VARCHAR},
         </if>
       </set>
@@ -308,6 +339,6 @@
     WHERE BD_BOMID=#{id}
   </delete>
   <select id="selectByFK" resultMap="BaseResultMap">
-    SELECT * FROM BOMDETAIL WHERE BD_BOMID = #{id}
+    SELECT * FROM BOMDETAIL LEFT JOIN PRODUCT ON PR_ID=BD_SONID AND BOMDETAIL.COMPANYID=PRODUCT.COMPANYID WHERE BD_BOMID = #{id}
   </select>
 </mapper>

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

@@ -20,6 +20,9 @@
     <result column="bo_text3" property="bo_text3" jdbcType="VARCHAR" />
     <result column="bo_text4" property="bo_text4" jdbcType="VARCHAR" />
     <result column="bo_text5" property="bo_text5" jdbcType="VARCHAR" />
+    <result column="pr_brand" property="pr_brand" jdbcType="VARCHAR" />
+    <result column="pr_spec" property="pr_spec" jdbcType="VARCHAR" />
+    <result column="pr_orispeccode" property="pr_orispeccode" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
     bo_id, bo_motherid, bo_mothercode, bo_mothername, bo_version, bo_status, bo_statuscode, 
@@ -258,13 +261,13 @@
       SELECT BO_MOTHERCODE FROM BOM WHERE BO_ID = #{id} and COMPANYID = #{companyId}
   </select>
   <select id="getListData" resultMap="BaseResultMap">
-    SELECT * FROM BOM
+    SELECT * FROM BOM LEFT JOIN PRODUCT ON PR_ID=BO_MOTHERID
     <where>
       <if test="condition!=null">
         ${condition}
       </if>
       <if test="companyId!=null">
-        AND companyId = #{companyId}
+        AND BOM.companyId = #{companyId}
       </if>
     </where>
     ORDER BY BO_ID DESC

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

@@ -370,12 +370,12 @@
   </select>
 
   <select id="validNameAndCodeWhenInsert" parameterType="com.usoftchina.saas.document.entities.Customer" resultType="int">
-    select count(1) from customer where cu_code = #{cu_code,jdbcType=VARCHAR} or cu_name = #{cu_name,jdbcType=VARCHAR}
+    select count(1) from customer where (cu_code = #{cu_code,jdbcType=VARCHAR} or cu_name = #{cu_name,jdbcType=VARCHAR}) and companyId =#{companyId}
   </select>
 
   <select id="validNameAndCodeWhenUpdate" parameterType="com.usoftchina.saas.document.entities.Customer" resultType="int">
     select count(1) from customer where (cu_code = #{cu_code,jdbcType=VARCHAR} or cu_name = #{cu_name,jdbcType=VARCHAR})
-    and cu_id != #{id}
+    and cu_id != #{id} and companyId =#{companyId}
   </select>
 
 

+ 204 - 0
applications/document/document-server/src/main/resources/mapper/EmployeeMapper.xml

@@ -0,0 +1,204 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.usoftchina.saas.document.mapper.EmployeeMapper">
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Employee">
+    <id column="em_id" jdbcType="INTEGER" property="id" />
+    <result column="em_code" jdbcType="VARCHAR" property="em_code" />
+    <result column="em_name" jdbcType="VARCHAR" property="em_name" />
+    <result column="em_password" jdbcType="VARCHAR" property="em_password" />
+    <result column="em_class" jdbcType="VARCHAR" property="em_class" />
+    <result column="em_mobile" jdbcType="VARCHAR" property="em_mobile" />
+    <result column="em_email" jdbcType="VARCHAR" property="em_email" />
+    <result column="companyId" jdbcType="INTEGER" property="companyId" />
+    <result column="updaterId" jdbcType="INTEGER" property="updaterId" />
+    <result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="em_text1" jdbcType="VARCHAR" property="em_text1" />
+    <result column="em_text2" jdbcType="VARCHAR" property="em_text2" />
+    <result column="em_text3" jdbcType="VARCHAR" property="em_text3" />
+    <result column="em_text4" jdbcType="VARCHAR" property="em_text4" />
+    <result column="em_text5" jdbcType="VARCHAR" property="em_text5" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    em_id, em_code, em_name, em_password, em_class, em_mobile, em_email, companyId, updaterId, 
+    updateTime, em_text1, em_text2, em_text3, em_text4, em_text5
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from employee
+    where em_id = #{em_id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="long">
+    delete from employee
+    where em_id = #{em_id,jdbcType=INTEGER}
+  </delete>
+
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Employee">
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
+    insert into employee
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+
+      <if test="em_code != null">
+        em_code,
+      </if>
+      <if test="em_name != null">
+        em_name,
+      </if>
+      <if test="em_password != null">
+        em_password,
+      </if>
+      <if test="em_class != null">
+        em_class,
+      </if>
+      <if test="em_mobile != null">
+        em_mobile,
+      </if>
+      <if test="em_email != null">
+        em_email,
+      </if>
+      <if test="companyId != null">
+        companyId,
+      </if>
+      <if test="updaterId != null">
+        updaterId,
+      </if>
+      <if test="updateTime != null">
+        updateTime,
+      </if>
+      <if test="em_text1 != null">
+        em_text1,
+      </if>
+      <if test="em_text2 != null">
+        em_text2,
+      </if>
+      <if test="em_text3 != null">
+        em_text3,
+      </if>
+      <if test="em_text4 != null">
+        em_text4,
+      </if>
+      <if test="em_text5 != null">
+        em_text5,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+
+      <if test="em_code != null">
+        #{em_code,jdbcType=VARCHAR},
+      </if>
+      <if test="em_name != null">
+        #{em_name,jdbcType=VARCHAR},
+      </if>
+      <if test="em_password != null">
+        #{em_password,jdbcType=VARCHAR},
+      </if>
+      <if test="em_class != null">
+        #{em_class,jdbcType=VARCHAR},
+      </if>
+      <if test="em_mobile != null">
+        #{em_mobile,jdbcType=VARCHAR},
+      </if>
+      <if test="em_email != null">
+        #{em_email,jdbcType=VARCHAR},
+      </if>
+      <if test="companyId != null">
+        #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null">
+        #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="em_text1 != null">
+        #{em_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="em_text2 != null">
+        #{em_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="em_text3 != null">
+        #{em_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="em_text4 != null">
+        #{em_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="em_text5 != null">
+        #{em_text5,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Employee">
+    update employee
+    <set>
+      <if test="em_code != null">
+        em_code = #{em_code,jdbcType=VARCHAR},
+      </if>
+      <if test="em_name != null">
+        em_name = #{em_name,jdbcType=VARCHAR},
+      </if>
+      <if test="em_password != null">
+        em_password = #{em_password,jdbcType=VARCHAR},
+      </if>
+      <if test="em_class != null">
+        em_class = #{em_class,jdbcType=VARCHAR},
+      </if>
+      <if test="em_mobile != null">
+        em_mobile = #{em_mobile,jdbcType=VARCHAR},
+      </if>
+      <if test="em_email != null">
+        em_email = #{em_email,jdbcType=VARCHAR},
+      </if>
+      <if test="companyId != null">
+        companyId = #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null">
+        updaterId = #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null">
+        updateTime = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="em_text1 != null">
+        em_text1 = #{em_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="em_text2 != null">
+        em_text2 = #{em_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="em_text3 != null">
+        em_text3 = #{em_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="em_text4 != null">
+        em_text4 = #{em_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="em_text5 != null">
+        em_text5 = #{em_text5,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where em_id = #{id,jdbcType=INTEGER}
+  </update>
+
+  <!--查询所有物料信息-->
+  <select id="selectEmployeeListByCondition" resultMap="BaseResultMap" parameterType="com.usoftchina.saas.commons.dto.DocReqDTO">
+    SELECT * FROM Employee
+    <where>
+      <if test="con != null">
+        ${con}
+      </if>
+      <if test="companyId != null">
+        and  companyid = #{companyId}
+      </if>
+    </where>
+    ORDER BY em_ID DESC
+  </select>
+
+
+  <select id="validateCodeWhenInsert" resultType="int">
+    select count(*) from Employee where em_code = #{code} and companyId =#{companyId}
+  </select>
+  <select id="validateCodeWhenUpdate" resultType="int" >
+    select count(*) from Employee where em_code = #{code} and em_id != #{id} and companyId =#{companyId}
+  </select>
+
+
+</mapper>

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

@@ -101,7 +101,7 @@
             </if>
             AND VENDOR.COMPANYID = #{companyId}
         </where>
-        order by VE_ID,VC_DETNO
+        order by VE_ID,VC_DETNO DESC
     </select>
 
     <sql id="Base_Column_List" >

+ 10 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/PaybalanceMapper.java

@@ -1,8 +1,10 @@
 package com.usoftchina.saas.money.mapper;
 
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.money.po.Bankinformation;
 import com.usoftchina.saas.money.po.Paybalance;
 import com.usoftchina.saas.money.po.Recbalance;
+import com.usoftchina.saas.money.po.Vendor;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -28,4 +30,12 @@ public interface PaybalanceMapper extends CommonBaseMapper<Paybalance> {
 
     Integer validateCodeWhenUpdate(@Param("code") String code, @Param("id") Long id,
                                    @Param("companyId") Long companyId);
+
+    Bankinformation selectBankInformationByPrimaryKey(Integer bkId);
+
+    int updateBankByPrimaryKeySelective(Bankinformation record);
+
+    Vendor selectVendorByPrimaryKey(Integer bkId);
+
+    int updateVendorByPrimaryKeySelective(Vendor record);
 }

+ 9 - 2
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/RecbalanceMapper.java

@@ -2,11 +2,10 @@ package com.usoftchina.saas.money.mapper;
 
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
-import com.usoftchina.saas.money.po.Recbalance;
+import com.usoftchina.saas.money.po.*;
 
 import java.util.List;
 
-import com.usoftchina.saas.money.po.RecbalanceExample;
 import org.apache.ibatis.annotations.Param;
 
 
@@ -42,4 +41,12 @@ public interface RecbalanceMapper extends CommonBaseMapper<Recbalance> {
 
     Integer validateCodeWhenUpdate(@Param("code") String code, @Param("id") Long id,
                                    @Param("companyId") Long companyId);
+
+    Bankinformation selectBankInformationByPrimaryKey(Integer bkId);
+
+    int updateBankByPrimaryKeySelective(Bankinformation record);
+
+    Customer selectCustomerByPrimaryKey(Integer bkId);
+
+    int updateCustomerByPrimaryKeySelective(Customer record);
 }

+ 189 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Bankinformation.java

@@ -0,0 +1,189 @@
+package com.usoftchina.saas.money.po;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class Bankinformation extends CommonBaseEntity implements Serializable {
+
+    private String bk_bankcode;
+
+    private String bk_bankname;
+
+    private Date bk_date;
+
+    private String bk_type;
+
+    private Double bk_beginamount;
+
+    private Double bk_thisamount;
+
+    private String bk_status;
+
+    private String bk_statuscode;
+
+    private Integer bk_recorderid;
+
+    private String bk_recorder;
+
+    private Date bk_recorddate;
+
+    private Integer bk_ym;
+
+    private String bk_text1;
+
+    private String bk_text2;
+
+    private String bk_text3;
+
+    private String bk_text4;
+
+    private String bk_text5;
+
+    private String bk_remark;
+
+    public String getBk_bankcode() {
+        return bk_bankcode;
+    }
+
+    public void setBk_bankcode(String bk_bankcode) {
+        this.bk_bankcode = bk_bankcode;
+    }
+
+    public String getBk_bankname() {
+        return bk_bankname;
+    }
+
+    public void setBk_bankname(String bk_bankname) {
+        this.bk_bankname = bk_bankname;
+    }
+
+    public Date getBk_date() {
+        return bk_date;
+    }
+
+    public void setBk_date(Date bk_date) {
+        this.bk_date = bk_date;
+    }
+
+    public String getBk_type() {
+        return bk_type;
+    }
+
+    public void setBk_type(String bk_type) {
+        this.bk_type = bk_type;
+    }
+
+    public Double getBk_beginamount() {
+        return bk_beginamount;
+    }
+
+    public void setBk_beginamount(Double bk_beginamount) {
+        this.bk_beginamount = bk_beginamount;
+    }
+
+    public Double getBk_thisamount() {
+        return bk_thisamount;
+    }
+
+    public void setBk_thisamount(Double bk_thisamount) {
+        this.bk_thisamount = bk_thisamount;
+    }
+
+    public String getBk_status() {
+        return bk_status;
+    }
+
+    public void setBk_status(String bk_status) {
+        this.bk_status = bk_status;
+    }
+
+    public String getBk_statuscode() {
+        return bk_statuscode;
+    }
+
+    public void setBk_statuscode(String bk_statuscode) {
+        this.bk_statuscode = bk_statuscode;
+    }
+
+    public Integer getBk_recorderid() {
+        return bk_recorderid;
+    }
+
+    public void setBk_recorderid(Integer bk_recorderid) {
+        this.bk_recorderid = bk_recorderid;
+    }
+
+    public String getBk_recorder() {
+        return bk_recorder;
+    }
+
+    public void setBk_recorder(String bk_recorder) {
+        this.bk_recorder = bk_recorder;
+    }
+
+    public Date getBk_recorddate() {
+        return bk_recorddate;
+    }
+
+    public void setBk_recorddate(Date bk_recorddate) {
+        this.bk_recorddate = bk_recorddate;
+    }
+
+    public Integer getBk_ym() {
+        return bk_ym;
+    }
+
+    public void setBk_ym(Integer bk_ym) {
+        this.bk_ym = bk_ym;
+    }
+
+    public String getBk_text1() {
+        return bk_text1;
+    }
+
+    public void setBk_text1(String bk_text1) {
+        this.bk_text1 = bk_text1;
+    }
+
+    public String getBk_text2() {
+        return bk_text2;
+    }
+
+    public void setBk_text2(String bk_text2) {
+        this.bk_text2 = bk_text2;
+    }
+
+    public String getBk_text3() {
+        return bk_text3;
+    }
+
+    public void setBk_text3(String bk_text3) {
+        this.bk_text3 = bk_text3;
+    }
+
+    public String getBk_text4() {
+        return bk_text4;
+    }
+
+    public void setBk_text4(String bk_text4) {
+        this.bk_text4 = bk_text4;
+    }
+
+    public String getBk_text5() {
+        return bk_text5;
+    }
+
+    public void setBk_text5(String bk_text5) {
+        this.bk_text5 = bk_text5;
+    }
+
+    public String getBk_remark() {
+        return bk_remark;
+    }
+
+    public void setBk_remark(String bk_remark) {
+        this.bk_remark = bk_remark;
+    }
+}

+ 271 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Customer.java

@@ -0,0 +1,271 @@
+package com.usoftchina.saas.money.po;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+public class Customer extends CommonBaseEntity implements Serializable {
+
+    private String cu_code;
+
+    private String cu_name;
+
+    private String cu_uu;
+
+    private String cu_type;
+
+    private Date cu_begindate;
+
+    private Double cu_beginaramount;
+
+    private Double cu_beginprerecamount;
+
+    private Double cu_promisedays;
+
+    private Double cu_taxrate;
+
+    private Integer cu_sellerid;
+
+    private String cu_sellercode;
+
+    private String cu_sellername;
+
+    private Double cu_credit;
+
+    private String cu_status;
+
+    private String cu_statuscode;
+
+    private Integer cu_recordmanid;
+
+    private String cu_recordman;
+
+    private Date cu_recorddate;
+
+    private String cu_text1;
+
+    private String cu_text2;
+
+    private String cu_text3;
+
+    private String cu_text4;
+
+    private String cu_text5;
+
+    private Double cu_leftamount;
+
+    private Double cu_recamount;
+
+    private Double cu_preamount;
+
+    public String getCu_code() {
+        return cu_code;
+    }
+
+    public void setCu_code(String cu_code) {
+        this.cu_code = cu_code;
+    }
+
+    public String getCu_name() {
+        return cu_name;
+    }
+
+    public void setCu_name(String cu_name) {
+        this.cu_name = cu_name;
+    }
+
+    public String getCu_uu() {
+        return cu_uu;
+    }
+
+    public void setCu_uu(String cu_uu) {
+        this.cu_uu = cu_uu;
+    }
+
+    public String getCu_type() {
+        return cu_type;
+    }
+
+    public void setCu_type(String cu_type) {
+        this.cu_type = cu_type;
+    }
+
+    public Date getCu_begindate() {
+        return cu_begindate;
+    }
+
+    public void setCu_begindate(Date cu_begindate) {
+        this.cu_begindate = cu_begindate;
+    }
+
+    public Double getCu_beginaramount() {
+        return cu_beginaramount;
+    }
+
+    public void setCu_beginaramount(Double cu_beginaramount) {
+        this.cu_beginaramount = cu_beginaramount;
+    }
+
+    public Double getCu_beginprerecamount() {
+        return cu_beginprerecamount;
+    }
+
+    public void setCu_beginprerecamount(Double cu_beginprerecamount) {
+        this.cu_beginprerecamount = cu_beginprerecamount;
+    }
+
+    public Double getCu_promisedays() {
+        return cu_promisedays;
+    }
+
+    public void setCu_promisedays(Double cu_promisedays) {
+        this.cu_promisedays = cu_promisedays;
+    }
+
+    public Double getCu_taxrate() {
+        return cu_taxrate;
+    }
+
+    public void setCu_taxrate(Double cu_taxrate) {
+        this.cu_taxrate = cu_taxrate;
+    }
+
+    public Integer getCu_sellerid() {
+        return cu_sellerid;
+    }
+
+    public void setCu_sellerid(Integer cu_sellerid) {
+        this.cu_sellerid = cu_sellerid;
+    }
+
+    public String getCu_sellercode() {
+        return cu_sellercode;
+    }
+
+    public void setCu_sellercode(String cu_sellercode) {
+        this.cu_sellercode = cu_sellercode;
+    }
+
+    public String getCu_sellername() {
+        return cu_sellername;
+    }
+
+    public void setCu_sellername(String cu_sellername) {
+        this.cu_sellername = cu_sellername;
+    }
+
+    public Double getCu_credit() {
+        return cu_credit;
+    }
+
+    public void setCu_credit(Double cu_credit) {
+        this.cu_credit = cu_credit;
+    }
+
+    public String getCu_status() {
+        return cu_status;
+    }
+
+    public void setCu_status(String cu_status) {
+        this.cu_status = cu_status;
+    }
+
+    public String getCu_statuscode() {
+        return cu_statuscode;
+    }
+
+    public void setCu_statuscode(String cu_statuscode) {
+        this.cu_statuscode = cu_statuscode;
+    }
+
+    public Integer getCu_recordmanid() {
+        return cu_recordmanid;
+    }
+
+    public void setCu_recordmanid(Integer cu_recordmanid) {
+        this.cu_recordmanid = cu_recordmanid;
+    }
+
+    public String getCu_recordman() {
+        return cu_recordman;
+    }
+
+    public void setCu_recordman(String cu_recordman) {
+        this.cu_recordman = cu_recordman;
+    }
+
+    public Date getCu_recorddate() {
+        return cu_recorddate;
+    }
+
+    public void setCu_recorddate(Date cu_recorddate) {
+        this.cu_recorddate = cu_recorddate;
+    }
+
+    public String getCu_text1() {
+        return cu_text1;
+    }
+
+    public void setCu_text1(String cu_text1) {
+        this.cu_text1 = cu_text1;
+    }
+
+    public String getCu_text2() {
+        return cu_text2;
+    }
+
+    public void setCu_text2(String cu_text2) {
+        this.cu_text2 = cu_text2;
+    }
+
+    public String getCu_text3() {
+        return cu_text3;
+    }
+
+    public void setCu_text3(String cu_text3) {
+        this.cu_text3 = cu_text3;
+    }
+
+    public String getCu_text4() {
+        return cu_text4;
+    }
+
+    public void setCu_text4(String cu_text4) {
+        this.cu_text4 = cu_text4;
+    }
+
+    public String getCu_text5() {
+        return cu_text5;
+    }
+
+    public void setCu_text5(String cu_text5) {
+        this.cu_text5 = cu_text5;
+    }
+
+    public Double getCu_leftamount() {
+        return cu_leftamount;
+    }
+
+    public void setCu_leftamount(Double cu_leftamount) {
+        this.cu_leftamount = cu_leftamount;
+    }
+
+    public Double getCu_recamount() {
+        return cu_recamount;
+    }
+
+    public void setCu_recamount(Double cu_recamount) {
+        this.cu_recamount = cu_recamount;
+    }
+
+    public Double getCu_preamount() {
+        return cu_preamount;
+    }
+
+    public void setCu_preamount(Double cu_preamount) {
+        this.cu_preamount = cu_preamount;
+    }
+}

+ 9 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalancedet.java

@@ -38,6 +38,15 @@ public class Paybalancedet extends CommonBaseEntity implements Serializable {
     private String pd_text4;
 
     private String pd_text5;
+    private Date pb_date;
+
+    public Date getPb_date() {
+        return pb_date;
+    }
+
+    public void setPb_date(Date pb_date) {
+        this.pb_date = pb_date;
+    }
 
     public Integer getPd_pbid() {
         return pd_pbid;

+ 9 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalancedetail.java

@@ -38,6 +38,15 @@ public class Paybalancedetail extends CommonBaseEntity implements Serializable {
     private String pbd_text4;
 
     private String pbd_text5;
+    private Date pb_date;
+
+    public Date getPb_date() {
+        return pb_date;
+    }
+
+    public void setPb_date(Date pb_date) {
+        this.pb_date = pb_date;
+    }
 
     public Integer getPbd_pbid() {
         return pbd_pbid;

+ 9 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalancedet.java

@@ -44,6 +44,15 @@ public class Recbalancedet extends CommonBaseEntity implements Serializable{
     private String rd_text4;
 
     private String rd_text5;
+    private Date rb_date;
+
+    public Date getRb_date() {
+        return rb_date;
+    }
+
+    public void setRb_date(Date rb_date) {
+        this.rb_date = rb_date;
+    }
 
     public Date getUpdatedate() {
         return updatedate;

+ 10 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalancedetail.java

@@ -37,6 +37,16 @@ public class Recbalancedetail extends CommonBaseEntity implements Serializable {
     private String rbd_text4;
 
     private String rbd_text5;
+    private Date rb_date;
+
+
+    public Date getRb_date() {
+        return rb_date;
+    }
+
+    public void setRb_date(Date rb_date) {
+        this.rb_date = rb_date;
+    }
 
     public Integer getRbd_rbid() {
         return rbd_rbid;

+ 319 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Vendor.java

@@ -0,0 +1,319 @@
+package com.usoftchina.saas.money.po;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 供应商资料
+ * @author chenwei
+ * @Date 2018/10/13
+ */
+public class Vendor extends CommonBaseEntity implements Serializable{
+
+    /**
+     * 供应商编号
+     */
+    private String ve_code;
+    /**
+     * 供应商名称
+     */
+    private String ve_name;
+    /**
+     * 供应商UU
+     */
+    private String ve_uu;
+    /**
+     * 供应商类型
+     */
+    private String ve_type;
+    /**
+     * 期初日期
+     */
+    private Date ve_begindate;
+    /**
+     * 期初应付
+     */
+    private Double ve_beginapamount;
+    /**
+     * 期初预付
+     */
+    private Double ve_beginprepayamount;
+    /**
+     * 承付天数
+     */
+    private Long ve_promisedays;
+    /**
+     * 税率
+     */
+    private Double ve_taxrate;
+    /**
+     * 纳税人识别号
+     */
+    private String ve_nsrzh;
+    /**
+     * 银行账号
+     */
+    private String ve_bankaccount;
+    /**
+     * 银行行号
+     */
+    private String ve_bankcode;
+    /**
+     * 状态   defualt "启用"
+     */
+    private String ve_status;
+    /**
+     * 状态码
+     */
+    private String ve_statuscode;
+    /**
+     * 录入人ID
+     */
+    private Long ve_recordid;
+    /**
+     * 录入人
+     */
+    private String ve_recordname;
+    /**
+     * 建立日期
+     */
+    private Date ve_initdate;
+    /**
+     * 自定义字段
+     */
+    private String ve_text1;
+    /**
+     * 自定义字段
+     */
+    private String ve_text2;
+    /**
+     * 自定义字段
+     */
+    private String ve_text3;
+    /**
+     * 自定义字段
+     */
+    private String ve_text4;
+    /**
+     * 自定义字段
+     */
+    private String ve_text5;
+
+    private Double ve_payamount;
+
+    private Double ve_leftamount;
+
+    private Integer ve_beginym;
+
+    private Double ve_preamount;
+
+    public Double getVe_payamount() {
+        return ve_payamount;
+    }
+
+    public void setVe_payamount(Double ve_payamount) {
+        this.ve_payamount = ve_payamount;
+    }
+
+    public Double getVe_leftamount() {
+        return ve_leftamount;
+    }
+
+    public void setVe_leftamount(Double ve_leftamount) {
+        this.ve_leftamount = ve_leftamount;
+    }
+
+    public Integer getVe_beginym() {
+        return ve_beginym;
+    }
+
+    public void setVe_beginym(Integer ve_beginym) {
+        this.ve_beginym = ve_beginym;
+    }
+
+    public String getVe_code() {
+        return ve_code;
+    }
+
+    public void setVe_code(String ve_code) {
+        this.ve_code = ve_code;
+    }
+
+    public String getVe_name() {
+        return ve_name;
+    }
+
+    public void setVe_name(String ve_name) {
+        this.ve_name = ve_name;
+    }
+
+    public String getVe_uu() {
+        return ve_uu;
+    }
+
+    public void setVe_uu(String ve_uu) {
+        this.ve_uu = ve_uu;
+    }
+
+    public String getVe_type() {
+        return ve_type;
+    }
+
+    public void setVe_type(String ve_type) {
+        this.ve_type = ve_type;
+    }
+
+    public Date getVe_begindate() {
+        return ve_begindate;
+    }
+
+    public void setVe_begindate(Date ve_begindate) {
+        this.ve_begindate = ve_begindate;
+    }
+
+    public Double getVe_beginapamount() {
+        return ve_beginapamount;
+    }
+
+    public void setVe_beginapamount(Double ve_beginapamount) {
+        this.ve_beginapamount = ve_beginapamount;
+    }
+
+    public Double getVe_beginprepayamount() {
+        return ve_beginprepayamount;
+    }
+
+    public void setVe_beginprepayamount(Double ve_beginprepayamount) {
+        this.ve_beginprepayamount = ve_beginprepayamount;
+    }
+
+    public Long getVe_promisedays() {
+        return ve_promisedays;
+    }
+
+    public void setVe_promisedays(Long ve_promisedays) {
+        this.ve_promisedays = ve_promisedays;
+    }
+
+    public Double getVe_taxrate() {
+        return ve_taxrate;
+    }
+
+    public void setVe_taxrate(Double ve_taxrate) {
+        this.ve_taxrate = ve_taxrate;
+    }
+
+    public String getVe_nsrzh() {
+        return ve_nsrzh;
+    }
+
+    public void setVe_nsrzh(String ve_nsrzh) {
+        this.ve_nsrzh = ve_nsrzh;
+    }
+
+    public String getVe_bankaccount() {
+        return ve_bankaccount;
+    }
+
+    public void setVe_bankaccount(String ve_bankaccount) {
+        this.ve_bankaccount = ve_bankaccount;
+    }
+
+    public String getVe_bankcode() {
+        return ve_bankcode;
+    }
+
+    public void setVe_bankcode(String ve_bankcode) {
+        this.ve_bankcode = ve_bankcode;
+    }
+
+    public String getVe_status() {
+        return ve_status;
+    }
+
+    public void setVe_status(String ve_status) {
+        this.ve_status = ve_status;
+    }
+
+    public String getVe_statuscode() {
+        return ve_statuscode;
+    }
+
+    public void setVe_statuscode(String ve_statuscode) {
+        this.ve_statuscode = ve_statuscode;
+    }
+
+    public Long getVe_recordid() {
+        return ve_recordid;
+    }
+
+    public void setVe_recordid(Long ve_recordid) {
+        this.ve_recordid = ve_recordid;
+    }
+
+    public String getVe_recordname() {
+        return ve_recordname;
+    }
+
+    public void setVe_recordname(String ve_recordname) {
+        this.ve_recordname = ve_recordname;
+    }
+
+    public Date getVe_initdate() {
+        return ve_initdate;
+    }
+
+    public void setVe_initdate(Date ve_initdate) {
+        this.ve_initdate = ve_initdate;
+    }
+
+    public String getVe_text1() {
+        return ve_text1;
+    }
+
+    public void setVe_text1(String ve_text1) {
+        this.ve_text1 = ve_text1;
+    }
+
+    public String getVe_text2() {
+        return ve_text2;
+    }
+
+    public void setVe_text2(String ve_text2) {
+        this.ve_text2 = ve_text2;
+    }
+
+    public String getVe_text3() {
+        return ve_text3;
+    }
+
+    public void setVe_text3(String ve_text3) {
+        this.ve_text3 = ve_text3;
+    }
+
+    public String getVe_text4() {
+        return ve_text4;
+    }
+
+    public void setVe_text4(String ve_text4) {
+        this.ve_text4 = ve_text4;
+    }
+
+    public String getVe_text5() {
+        return ve_text5;
+    }
+
+    public void setVe_text5(String ve_text5) {
+        this.ve_text5 = ve_text5;
+    }
+
+    public Double getVe_preamount() {
+        return ve_preamount;
+    }
+
+    public void setVe_preamount(Double ve_preamount) {
+        this.ve_preamount = ve_preamount;
+    }
+}

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

@@ -44,14 +44,12 @@ public class FundtransferServiceImpl implements FundtransferService {
         Fundtransfer fundtransfer = fundtran.getMain();
         List<Fundtransferdetail> fundtransferdetails = fundtran.getItems();
 
-        System.out.println("fun:"+fundtransferdetails);
 
         String ft_code = fundtransfer.getFt_code();
 
         //编号校验
         ft_code = pushMaxnubmer(ft_code, fundtransfer.getId());
 
-        System.out.println("ft_code" + ft_code);
         //单号赋值
         fundtransfer.setFt_code(ft_code);
 
@@ -61,6 +59,7 @@ public class FundtransferServiceImpl implements FundtransferService {
             fundtransferMapper.updateByPrimaryKeySelective(fundtransfer);
         }else {
             fundtransfer.setCompanyId(BaseContextHolder.getCompanyId());
+            fundtransfer.setFt_recorder(BaseContextHolder.getUserName());
             fundtransferMapper.insertSelective(fundtransfer);
             id = fundtransfer.getId();
         }
@@ -70,6 +69,7 @@ public class FundtransferServiceImpl implements FundtransferService {
             Fundtransferdetail fundtransferdetail= (Fundtransferdetail) isdet.next();
             fundtransferdetail.setCompanyId(BaseContextHolder.getCompanyId());
             fundtransferdetail.setFtd_ftid(Math.toIntExact(id));
+            fundtransferdetail.setFt_date(fundtransfer.getFt_date());
             if (fundtransferdetail.getId() > 0 ){
                 fundtransferdetailMapper.updateByPrimaryKeySelective(fundtransferdetail);
             }else {

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

@@ -48,14 +48,12 @@ public class OthreceiptsServiceImpl implements OthreceiptsService {
         Othreceipts othreceipts = othte.getMain();
         List<Othreceiptsdetail> othreceiptsdetail = othte.getItems();
 
-        System.out.println("oth:" + othreceipts);
 
         String or_code = othreceipts.getOr_code();
 
         //编号校验
         or_code = pushMaxnubmer(or_code, othreceipts.getId());
 
-        System.out.println("or_code" + or_code);
         //单号赋值
         othreceipts.setOr_code(or_code);
 
@@ -65,6 +63,7 @@ public class OthreceiptsServiceImpl implements OthreceiptsService {
             othreceiptsMapper.updateByPrimaryKeySelective(othreceipts);
         }else {
             othreceipts.setCompanyId(BaseContextHolder.getCompanyId());
+            othreceipts.setOr_recorder(BaseContextHolder.getUserName());
             othreceiptsMapper.insertSelective(othreceipts);
             id = othreceipts.getId();
         }
@@ -74,6 +73,7 @@ public class OthreceiptsServiceImpl implements OthreceiptsService {
             Othreceiptsdetail othreceiptsdetail1 = (Othreceiptsdetail) isdet.next();
             othreceiptsdetail1.setOrd_orid(Math.toIntExact(id));
             othreceiptsdetail1.setCompanyId(BaseContextHolder.getCompanyId());
+            othreceiptsdetail1.setOr_date(othreceipts.getOr_date());
             if (othreceiptsdetail1.getId() > 0 ){
                 othreceiptsdetailMapper.updateByPrimaryKeySelective(othreceiptsdetail1);
             }else {

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

@@ -61,6 +61,7 @@ public class OthspendingsServiceImpl implements OthspendingsService {
             othspendingsMapper.updateByPrimaryKeySelective(othspendings);
         }else {
             othspendings.setCompanyId(BaseContextHolder.getCompanyId());
+            othspendings.setOs_recorder(BaseContextHolder.getUserName());
             othspendingsMapper.insertSelective(othspendings);
             id = othspendings.getId();
         }
@@ -70,6 +71,7 @@ public class OthspendingsServiceImpl implements OthspendingsService {
             Othspendingsdetail othspendingsdetail = (Othspendingsdetail) isdet.next();
             othspendingsdetail.setOsd_orid(Math.toIntExact(id));
             othspendingsdetail.setCompanyId(BaseContextHolder.getCompanyId());
+            othspendingsdetail.setOs_date(othspendings.getOs_date());
             if (othspendingsdetail.getId() > 0 ){
                 othspendingsdetailMapper.updateByPrimaryKeySelective(othspendingsdetail);
             }else {

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

@@ -15,12 +15,10 @@ import com.usoftchina.saas.money.mapper.*;
 import com.usoftchina.saas.money.po.*;
 import com.usoftchina.saas.money.service.PaybalanceService;
 import com.usoftchina.saas.page.PageRequest;
-import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
 
-import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
@@ -48,14 +46,12 @@ public class PaybalanceServiceImpl implements PaybalanceService {
         List<Paybalancedet> paybalancedet = pay.getItems1();
         List<Paybalancedetail> paybalancedetail = pay.getItems2();
 
-        System.out.println("paybal:"+paybalance);
         String pb_code = paybalance.getPb_code();
         //编号校验
         pb_code = pushMaxnubmer(pb_code, paybalance.getId());
         //单号赋值
         paybalance.setPb_code(pb_code);
 
-        System.out.println("code:"+paybalance.getPb_code());
 
         Long pbId = paybalance.getId();
 
@@ -66,6 +62,7 @@ public class PaybalanceServiceImpl implements PaybalanceService {
             paybalanceMapper.updateByPrimaryKeySelective(paybalance);
         }else {
             paybalance.setCompanyId(BaseContextHolder.getCompanyId());
+            paybalance.setPb_recorder(BaseContextHolder.getUserName());
             paybalanceMapper.insertSelective(paybalance);
             pbId = paybalance.getId();
             System.out.println("rbid:" + pbId);
@@ -76,6 +73,7 @@ public class PaybalanceServiceImpl implements PaybalanceService {
             Paybalancedet paybalancedet1 = (Paybalancedet) isdet.next();
             paybalancedet1.setPd_pbid(Math.toIntExact(pbId));
             paybalancedet1.setCompanyId(BaseContextHolder.getCompanyId());
+            paybalancedet1.setPb_date(paybalance.getPb_date());
             if (paybalancedet1.getId() > 0 ){
                 paybalancedetMapper.updateByPrimaryKeySelective(paybalancedet1);
             }else {
@@ -88,6 +86,7 @@ public class PaybalanceServiceImpl implements PaybalanceService {
             Paybalancedetail paybalancedetail1 = (Paybalancedetail) isdetl.next();
             paybalancedetail1.setPbd_pbid(Math.toIntExact(pbId));
             paybalancedetail1.setCompanyId(BaseContextHolder.getCompanyId());
+            paybalancedetail1.setPb_date(paybalance.getPb_date());
             if (paybalancedetail1.getId() > 0 ){
                 paybalancedetailMapper.updateByPrimaryKeySelective(paybalancedetail1);
             }else {
@@ -151,7 +150,13 @@ public class PaybalanceServiceImpl implements PaybalanceService {
         //更新本次预付款金额
         Paybalance updatePay = new Paybalance();
         updatePay.setId(paybalance.getId());
-        updatePay.setPb_preamount(amountTotal+paybalance.getPb_discounts()-nowbalanceTotal);
+
+        //折扣
+        Double discounts = paybalance.getPb_discounts();
+        if(discounts == null){
+            discounts = 0.0;
+        }
+        updatePay.setPb_preamount(amountTotal + discounts - nowbalanceTotal);
         paybalanceMapper.updateByPrimaryKeySelective(updatePay);
     }
 
@@ -159,7 +164,7 @@ public class PaybalanceServiceImpl implements PaybalanceService {
     public void audit(Pay pay) {
         Long companyId = BaseContextHolder.getCompanyId();
         int id = Math.toIntExact(pay.getMain().getId());
-        Paybalance paybalance = paybalanceMapper.selectByPrimaryKey(id);
+        Paybalance paybalance = paybalanceMapper.selectByPrimaryKey(Long.valueOf(id));
         paybalance.setPb_status(Status.AUDITED.getDisplay());
         paybalance.setPb_statuscode(Status.AUDITED.name());
         paybalance.setCompanyId(companyId);
@@ -184,15 +189,81 @@ public class PaybalanceServiceImpl implements PaybalanceService {
         Double amountTotal = new Double(0);
         for (Paybalancedet det: paybalancedet) {
             amountTotal = amountTotal + det.getPd_amount();
+            //更新账户资料金额
+            Bankinformation bankinformation = new Bankinformation();
+            Bankinformation nowBankInformation = paybalanceMapper.selectBankInformationByPrimaryKey(det.getPd_bankid());
+            bankinformation.setBk_thisamount(nowBankInformation.getBk_thisamount()+det.getPd_amount());
+            paybalanceMapper.updateBankByPrimaryKeySelective(bankinformation);
+        }
+        //更新主表pb_pbdamount=从表二金额合计
+        Double amountTotal2 = new Double(0);
+        for (Paybalancedetail detail : paybalancedetail){
+            amountTotal2 = amountTotal2 + detail.getPbd_amount();
         }
         updatePay.setId(pay.getMain().getId());
         updatePay.setPb_pdamount(amountTotal);
+        updatePay.setPb_pbdamount(amountTotal2);
+        paybalanceMapper.updateByPrimaryKeySelective(updatePay);
         //updateByPrimaryKeySelective
-
+        /**
+         * ve_preamount=nvl(ve_preamount,0)+pb_preamount,
+         * ve_payamount=nvl(ve_payamount,0)-pb_pbdamount,
+         * ve_leftamount=ve_beginapamount-ve_beginprepayamount+ve_payamount-ve_preamount;
+         */
+        Vendor vendorData = paybalanceMapper.selectVendorByPrimaryKey(paybalance.getPb_vendid());
+        Double preamount = vendorData.getVe_preamount()==null?new Double(0):vendorData.getVe_preamount();
+        Double beginapamount = vendorData.getVe_beginapamount()==null?new Double(0):vendorData.getVe_beginapamount();
+        Double beginprepayamount= vendorData.getVe_beginprepayamount()==null?new Double(0):vendorData.getVe_beginprepayamount();
+        Double payamount = vendorData.getVe_payamount()==null?new Double(0):vendorData.getVe_payamount();
+
+        Vendor vendor = new Vendor();
+        vendor.setId(Long.valueOf(String.valueOf(paybalance.getPb_vendid())));
+        vendor.setVe_preamount(preamount+amountTotal);
+        vendor.setVe_payamount(payamount-amountTotal2);
+        vendor.setVe_leftamount(beginapamount-beginprepayamount+payamount-amountTotal2-preamount-amountTotal);
+        paybalanceMapper.updateVendorByPrimaryKeySelective(vendor);
+
+        for (Paybalancedetail detail:paybalancedetail) {
+            Subledger subledger1 = new Subledger();
+            subledger1.setId(Long.valueOf(String.valueOf(detail.getPbd_slid())));
+            subledger1.setSl_yamount(detail.getPbd_nowbalance()+detail.getPbd_amount());
+            subledgerMapper.updateByPrimaryKeySelective(subledger1);
+        }
     }
 
     @Override
     public void unAudit(int id) {
+        //更新供应商资料
+        /**
+         * ve_preamount=nvl(ve_preamount,0)-pb_preamount,
+         * ve_payamount=nvl(ve_payamount,0)+pb_pbdamount,
+         * ve_leftamount=ve_beginapamount-ve_beginprepayamount+ve_payamount-ve_preamount;
+         */
+        Paybalance pay = paybalanceMapper.selectByPrimaryKey(Long.valueOf(id));
+        Double pay_preamount = pay.getPb_preamount();
+        Double pay_pbdamount = pay.getPb_pbdamount();
+        Vendor vendorData = paybalanceMapper.selectVendorByPrimaryKey(pay.getPb_vendid());
+        Double preamount = vendorData.getVe_preamount();
+        Double beginapamount = vendorData.getVe_beginapamount();
+        Double beginprepayamount= vendorData.getVe_beginprepayamount();
+        Double payamount = vendorData.getVe_payamount();
+        Vendor vendor = new Vendor();
+        vendor.setId(Long.valueOf(String.valueOf(pay.getPb_vendid())));
+        vendor.setVe_preamount(preamount-pay_preamount);
+        vendor.setVe_payamount(payamount+pay_pbdamount);
+        vendor.setVe_leftamount(beginapamount-beginprepayamount+payamount+pay_pbdamount-preamount+pay_preamount);
+        paybalanceMapper.updateVendorByPrimaryKeySelective(vendor);
+
+        //更新账户资料金额
+        List<Paybalancedet> paybalancedet = paybalancedetMapper.selectByPrimaryKey(id);
+        for (Paybalancedet det:paybalancedet) {
+            Bankinformation bankinformation = new Bankinformation();
+            Bankinformation nowBankInformation = paybalanceMapper.selectBankInformationByPrimaryKey(det.getPd_bankid());
+            bankinformation.setBk_thisamount(nowBankInformation.getBk_thisamount()-det.getPd_amount());
+            paybalanceMapper.updateBankByPrimaryKeySelective(bankinformation);
+        }
+
+
         Paybalance paybalance = new Paybalance();
         paybalance.setId(Long.valueOf(id));
         paybalance.setPb_status(com.usoftchina.saas.commons.po.Status.UNAUDITED.getDisplay());
@@ -200,16 +271,11 @@ public class PaybalanceServiceImpl implements PaybalanceService {
         paybalanceMapper.updateByPrimaryKeySelective(paybalance);
 
         //删除中间表
-        paybalance = paybalanceMapper.selectByPrimaryKey(id);
+        paybalance = paybalanceMapper.selectByPrimaryKey(Long.valueOf(id));
         subledgerMapper.deleteByPrimaryKey(paybalance.getPb_code(), paybalance.getPb_kind());
         banksubledgerMapper.deleteByPrimaryKey(paybalance.getPb_code(), paybalance.getPb_kind());
 
-        //更新供应商资料
-        /**
-         * ve_preamount=nvl(ve_preamount,0)-pb_preamount,
-         * ve_payamount=nvl(ve_payamount,0)+pb_pbdamount,
-         * ve_leftamount=ve_beginapamount-e_beginprepayamount+ve_payamount-ve_preamount;
-         */
+
     }
 
 
@@ -231,7 +297,7 @@ public class PaybalanceServiceImpl implements PaybalanceService {
 
     public Pay select(int id){
         Pay pay = new Pay();
-        pay.setMain(paybalanceMapper.selectByPrimaryKey(id));
+        pay.setMain(paybalanceMapper.selectByPrimaryKey(Long.valueOf(id)));
         pay.setItems1(paybalancedetMapper.selectByPrimaryKey(id));
         pay.setItems2(paybalancedetailMapper.selectByPrimaryKey(id));
         return pay;

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

@@ -46,8 +46,6 @@ public class RecbalanceServiceImpl implements RecbalanceService {
         Recbalance recbalance = rec.getMain();
         List<Recbalancedet> recbalancedet = rec.getItems1();
         List<Recbalancedetail> recbalancedetail = rec.getItems2();
-        System.out.println("recbalance:" + recbalance);
-
 
         String pu_code = recbalance.getRb_code();
 
@@ -64,9 +62,9 @@ public class RecbalanceServiceImpl implements RecbalanceService {
             recbalanceMapper.updateByPrimaryKeySelective(recbalance);
         }else {
             recbalance.setCompanyId(BaseContextHolder.getCompanyId());
+            recbalance.setRb_recorder(BaseContextHolder.getUserName());
             recbalanceMapper.insertSelective(recbalance);
             rbId = recbalance.getId();
-            System.out.println("rbid:" + rbId);
         }
 
         Iterator isdet = recbalancedet.iterator();
@@ -74,6 +72,7 @@ public class RecbalanceServiceImpl implements RecbalanceService {
             Recbalancedet recbalancedet1 = (Recbalancedet) isdet.next();
             recbalancedet1.setRd_rbid(Math.toIntExact(rbId));
             recbalancedet1.setCompanyId(BaseContextHolder.getCompanyId());
+            recbalancedet1.setRb_date(recbalance.getRb_date());
             if (recbalancedet1.getId() > 0 ){
                 recbalancedetMapper.updateByPrimaryKeySelective(recbalancedet1);
             }else {
@@ -86,7 +85,7 @@ public class RecbalanceServiceImpl implements RecbalanceService {
             Recbalancedetail recbalancedetail1 = (Recbalancedetail) isdetl.next();
             recbalancedetail1.setRbd_rbid(Math.toIntExact(rbId));
             recbalancedetail1.setCompanyId(BaseContextHolder.getCompanyId());
-            System.out.println("rectail:" + recbalancedetail1);
+            recbalancedetail1.setRb_date(recbalance.getRb_date());
             if (recbalancedetail1.getId() > 0 ){
                 recbalancedetailMapper.updateByPrimaryKeySelective(recbalancedetail1);
             }else {
@@ -98,7 +97,7 @@ public class RecbalanceServiceImpl implements RecbalanceService {
 
     /**
      * 校验数据
-     * @param pay
+     * @param rec
      */
     private void checkRecbalance(Rec rec){
         Recbalance recbalance = rec.getMain();
@@ -149,7 +148,13 @@ public class RecbalanceServiceImpl implements RecbalanceService {
         //更新本次预付款金额
         Recbalance updatePay = new Recbalance();
         updatePay.setId(recbalance.getId());
-        updatePay.setRb_preamount(amountTotal+recbalance.getRb_discounts()-nowbalanceTotal);
+
+        //折扣
+        Double discount = recbalance.getRb_discounts();
+        if (discount == null){
+            discount = 0.0;
+        }
+        updatePay.setRb_preamount(amountTotal + discount - nowbalanceTotal);
         recbalanceMapper.updateByPrimaryKeySelective(updatePay);
     }
 
@@ -203,21 +208,89 @@ public class RecbalanceServiceImpl implements RecbalanceService {
             recbalanceMapper.updateByPrimaryKeySelective(recbalance);
         }
 
-        Recbalance updatePay = new Recbalance();
+        Recbalance updateRay = new Recbalance();
         List<Recbalancedet> recbalancedet = rec.getItems1();
         List<Recbalancedetail> recbalancedetail = rec.getItems2();
-        //更新主表付款金额:pb_pdamount=从表一金额合计
+        //更新主表付款金额:rb_rdamount=从表一金额合计
         Double amountTotal = new Double(0);
         for (Recbalancedet det: recbalancedet) {
             amountTotal = amountTotal + det.getRd_amount();
+            //更新账户资料金额
+            Bankinformation bankinformation = new Bankinformation();
+            Bankinformation nowBankInformation = recbalanceMapper.selectBankInformationByPrimaryKey(det.getRd_bankid());
+            bankinformation.setBk_thisamount(nowBankInformation.getBk_thisamount()+det.getRd_amount());
+            recbalanceMapper.updateBankByPrimaryKeySelective(bankinformation);
+        }
+        //更新主表pb_pbdamount=从表二金额合计
+        Double amountTotal2 = new Double(0);
+        for (Recbalancedetail detail : recbalancedetail){
+            amountTotal2 = amountTotal2 + detail.getRbd_amount();
+        }
+        updateRay.setId(rec.getMain().getId());
+        updateRay.setRb_rdamount(amountTotal);
+        updateRay.setRb_rbdamount(amountTotal2);
+        recbalanceMapper.updateByPrimaryKeySelective(updateRay);
+        /**
+         * 更新客户资料
+         * cu_preamount=nvl(cu_preamount,0)+rb_preamount,
+         * cu_recamount=nvl(cu_recamount,0)-rb_rbdamount,
+         * cu_leftamount=cu_beginaramount-cu_beginprerecamount+cu_recamount-cu_preamount;
+         */
+        Customer customerData = recbalanceMapper.selectCustomerByPrimaryKey(recbalance.getRb_custid());
+        Double preamount = customerData.getCu_preamount()==null?new Double(0):customerData.getCu_preamount();
+        Double beginapamount = customerData.getCu_beginaramount()==null?new Double(0):customerData.getCu_beginaramount();
+        Double beginprepayamount= customerData.getCu_beginprerecamount()==null?new Double(0):customerData.getCu_beginprerecamount();
+        Double recamount = customerData.getCu_recamount()==null?new Double(0):customerData.getCu_recamount();
+
+        Customer customer = new Customer();
+        customer.setId(Long.valueOf(String.valueOf(recbalance.getRb_custid())));
+        customer.setCu_preamount(preamount+amountTotal);
+        customer.setCu_recamount(recamount-amountTotal2);
+        customer.setCu_leftamount(beginapamount-beginprepayamount+recamount-amountTotal2-preamount-amountTotal);
+        recbalanceMapper.updateCustomerByPrimaryKeySelective(customer);
+
+        //更新本次核销金额
+        for (Recbalancedetail detail:recbalancedetail) {
+            Subledger subledger1 = new Subledger();
+            subledger1.setId(Long.valueOf(String.valueOf(detail.getRbd_slid())));
+            subledger1.setSl_yamount(detail.getRbd_nowbalance() - detail.getRbd_amount());
+            subledgerMapper.updateByPrimaryKeySelective(subledger1);
         }
-        updatePay.setId(rec.getMain().getId());
-        updatePay.setRb_rdamount(amountTotal);
-        //updateByPrimaryKeySelective
     }
 
     @Override
     public void unAudit(Long id) {
+        //更新供应商资料
+        /**
+         * ve_preamount=nvl(ve_preamount,0)-pb_preamount,
+         * ve_payamount=nvl(ve_payamount,0)+pb_pbdamount,
+         * ve_leftamount=ve_beginapamount-ve_beginprepayamount+ve_payamount-ve_preamount;
+         */
+        Recbalance rec = recbalanceMapper.selectByPrimaryKey(Math.toIntExact(id));
+        Double pay_preamount = rec.getRb_preamount()==null?new Double(0):rec.getRb_preamount();
+        Double pay_pbdamount = rec.getRb_rbdamount()==null?new Double(0):rec.getRb_rbdamount();
+        Customer customerData = recbalanceMapper.selectCustomerByPrimaryKey(rec.getRb_custid());
+        Double preamount = customerData.getCu_preamount()==null?(new Double(0)):customerData.getCu_preamount();
+        Double beginapamount = customerData.getCu_beginaramount()==null?new Double(0):customerData.getCu_beginaramount();
+        Double beginprepayamount= customerData.getCu_beginprerecamount()==null?new Double(0):customerData.getCu_beginprerecamount();
+        Double recamount = customerData.getCu_recamount()==null?new Double(0):customerData.getCu_recamount();
+        Customer customer = new Customer();
+        customer.setId(Long.valueOf(String.valueOf(rec.getRb_custid())));
+        customer.setCu_preamount(preamount-pay_preamount);
+        customer.setCu_recamount(recamount+pay_pbdamount);
+        customer.setCu_leftamount(beginapamount-beginprepayamount+recamount+pay_pbdamount-preamount+pay_preamount);
+        recbalanceMapper.updateCustomerByPrimaryKeySelective(customer);
+
+        //更新账户资料金额
+        List<Recbalancedet> recbalancedet = recbalancedetMapper.selectByPrimaryKey(Math.toIntExact(id));
+        for (Recbalancedet det:recbalancedet) {
+            Bankinformation bankinformation = new Bankinformation();
+            Bankinformation nowBankInformation = recbalanceMapper.selectBankInformationByPrimaryKey(det.getRd_bankid());
+            bankinformation.setBk_thisamount(nowBankInformation.getBk_thisamount()-det.getRd_amount());
+            recbalanceMapper.updateBankByPrimaryKeySelective(bankinformation);
+        }
+
+
         Recbalance recbalance = new Recbalance();
         recbalance.setId(id);
         recbalance.setRb_status(Status.UNAUDITED.getDisplay());

+ 1 - 1
applications/money/money-server/src/main/resources/mapper/AcountbalanceViewMapper.xml

@@ -27,7 +27,7 @@
         and  companyId = #{companyId}
       </if>
     </where>
-    order by date desc
+    order by date, bankid desc
   </select>
 
 </mapper>

+ 2 - 2
applications/money/money-server/src/main/resources/mapper/FundtransferMapper.xml

@@ -241,7 +241,7 @@
       <if test="companyId != null">
         and   Fundtransfer.companyId = #{companyId}
       </if>
-    </where>  order by ft_id
+    </where>  order by ft_date desc
   </select>
 
   <select id="selectFundtransferListByCondition" resultMap="BaseResultMap">
@@ -256,6 +256,6 @@
       <if test="companyId != null">
         and   fundtransfer.companyId = #{companyId}
       </if>
-    </where>  order by ft_id
+    </where>  order by ft_date desc
   </select>
 </mapper>

+ 6 - 6
applications/money/money-server/src/main/resources/mapper/FundtransferdetailMapper.xml

@@ -75,9 +75,9 @@
       <if test="ftd_detno != null" >
         ftd_detno,
       </if>
-      <if test="ftd_ym != null" >
-        ftd_ym,
-      </if>
+      <!--<if test="ft_date != null" >-->
+        <!--ftd_ym,-->
+      <!--</if>-->
       <if test="ftd_bankid != null" >
         ftd_bankid,
       </if>
@@ -140,9 +140,9 @@
       <if test="ftd_detno != null" >
         #{ftd_detno,jdbcType=INTEGER},
       </if>
-      <if test="ftd_ym != null" >
-        #{ftd_ym,jdbcType=INTEGER},
-      </if>
+      <!--<if test="ft_date != null" >-->
+        <!--CONVERT(date_format(#{ft_date,jdbcType=TIMESTAMP},'%Y%m'),SIGNED),-->
+      <!--</if>-->
       <if test="ftd_bankid != null" >
         #{ftd_bankid,jdbcType=INTEGER},
       </if>

+ 2 - 2
applications/money/money-server/src/main/resources/mapper/OthreceiptsMapper.xml

@@ -326,7 +326,7 @@
       <if test="companyId != null">
         and   othreceipts.companyId = #{companyId}
       </if>
-    </where>  order by or_id
+    </where>  order by or_date desc
   </select>
 
   <select id="selectOthreceiptsListByCondition" resultMap="BaseResultMap">
@@ -341,6 +341,6 @@
       <if test="companyId != null">
         and   othreceipts.companyId = #{companyId}
       </if>
-    </where>  order by or_id
+    </where>  order by or_date desc
   </select>
 </mapper>

+ 3 - 3
applications/money/money-server/src/main/resources/mapper/OthreceiptsdetailMapper.xml

@@ -62,7 +62,7 @@
       <if test="ord_detno != null" >
         ord_detno,
       </if>
-      <if test="ord_ym != null" >
+      <if test="or_date != null" >
         ord_ym,
       </if>
       <if test="ord_type != null" >
@@ -106,8 +106,8 @@
       <if test="ord_detno != null" >
         #{ord_detno,jdbcType=INTEGER},
       </if>
-      <if test="ord_ym != null" >
-        #{ord_ym,jdbcType=INTEGER},
+      <if test="or_date != null" >
+        CONVERT(date_format(#{or_date,jdbcType=TIMESTAMP},'%Y%m'),SIGNED),
       </if>
       <if test="ord_type != null" >
         #{ord_type,jdbcType=VARCHAR},

+ 2 - 2
applications/money/money-server/src/main/resources/mapper/OthspendingsMapper.xml

@@ -321,7 +321,7 @@
       <if test="companyId != null">
         and   othspendings.companyId = #{companyId}
       </if>
-    </where>  order by os_id
+    </where>  order by os_date desc
   </select>
 
   <select id="selectOthspendingsListByCondition" resultMap="BaseResultMap">
@@ -336,6 +336,6 @@
       <if test="companyId != null">
         and   othspendings.companyId = #{companyId}
       </if>
-    </where>  order by os_id
+    </where>  order by os_date desc
   </select>
 </mapper>

+ 3 - 3
applications/money/money-server/src/main/resources/mapper/OthspendingsdetailMapper.xml

@@ -62,7 +62,7 @@
       <if test="osd_detno != null" >
         osd_detno,
       </if>
-      <if test="osd_ym != null" >
+      <if test="os_date != null" >
         osd_ym,
       </if>
       <if test="osd_type != null" >
@@ -106,8 +106,8 @@
       <if test="osd_detno != null" >
         #{osd_detno,jdbcType=INTEGER},
       </if>
-      <if test="osd_ym != null" >
-        #{osd_ym,jdbcType=INTEGER},
+      <if test="os_date != null" >
+        CONVERT(date_format(#{os_date,jdbcType=TIMESTAMP},'%Y%m'),SIGNED),
       </if>
       <if test="osd_type != null" >
         #{osd_type,jdbcType=VARCHAR},

+ 255 - 1
applications/money/money-server/src/main/resources/mapper/PaybalanceMapper.xml

@@ -100,7 +100,7 @@
     from paybalance
   </select>
 
-  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     select 
     <include refid="Base_Column_List" />
     from paybalance
@@ -449,4 +449,258 @@
     select count(1) from paybalance where pb_code = #{code} and pb_id != #{id} and companyId =#{companyId}
   </select>
 
+
+  <!-- 银行账户-->
+  <sql id="Bank_Column_List" >
+    bk_id, bk_bankcode, bk_bankname, bk_date, bk_type, bk_beginamount, bk_thisamount,
+    bk_status, bk_statuscode, bk_recorderid, bk_recorder, bk_recorddate, bk_ym, companyid,
+    updaterId, updateTime, bk_text1, bk_text2, bk_text3, bk_text4, bk_text5, bk_remark
+  </sql>
+  <sql id="Blob_Column_List" >
+    bk_remark
+  </sql>
+  <select id="selectBankInformationByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Integer" >
+    select
+    <include refid="Bank_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from bankinformation
+    where bk_id = #{id,jdbcType=INTEGER}
+  </select>
+  <resultMap id="ResultMapWithBLOBs" type="com.usoftchina.saas.money.po.Bankinformation" extends="BankInformationResultMap" >
+    <result column="bk_remark" property="bk_remark" jdbcType="LONGVARCHAR" />
+  </resultMap>
+  <resultMap id="BankInformationResultMap" type="com.usoftchina.saas.money.po.Bankinformation" >
+    <id column="bk_id" property="id" jdbcType="INTEGER" />
+    <result column="bk_bankcode" property="bk_bankcode" jdbcType="VARCHAR" />
+    <result column="bk_bankname" property="bk_bankname" jdbcType="VARCHAR" />
+    <result column="bk_date" property="bk_date" jdbcType="TIMESTAMP" />
+    <result column="bk_type" property="bk_type" jdbcType="VARCHAR" />
+    <result column="bk_beginamount" property="bk_beginamount" jdbcType="DOUBLE" />
+    <result column="bk_thisamount" property="bk_thisamount" jdbcType="DOUBLE" />
+    <result column="bk_status" property="bk_status" jdbcType="VARCHAR" />
+    <result column="bk_statuscode" property="bk_statuscode" jdbcType="VARCHAR" />
+    <result column="bk_recorderid" property="bk_recorderid" jdbcType="INTEGER" />
+    <result column="bk_recorder" property="bk_recorder" jdbcType="VARCHAR" />
+    <result column="bk_recorddate" property="bk_recorddate" jdbcType="TIMESTAMP" />
+    <result column="bk_ym" property="bk_ym" jdbcType="INTEGER" />
+    <result column="companyid" property="companyId" jdbcType="INTEGER" />
+    <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
+    <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+    <result column="bk_text1" property="bk_text1" jdbcType="VARCHAR" />
+    <result column="bk_text2" property="bk_text2" jdbcType="VARCHAR" />
+    <result column="bk_text3" property="bk_text3" jdbcType="VARCHAR" />
+    <result column="bk_text4" property="bk_text4" jdbcType="VARCHAR" />
+    <result column="bk_text5" property="bk_text5" jdbcType="VARCHAR" />
+    <result column="bk_remark" property="bk_remark" jdbcType="VARCHAR" />
+  </resultMap>
+  <update id="updateBankByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Bankinformation" >
+    update bankinformation
+    <set >
+      <if test="bk_bankcode != null" >
+        bk_bankcode = #{bk_bankcode,jdbcType=VARCHAR},
+      </if>
+      <if test="bk_bankname != null" >
+        bk_bankname = #{bk_bankname,jdbcType=VARCHAR},
+      </if>
+      <if test="bk_date != null" >
+        bk_date = #{bk_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="bk_type != null" >
+        bk_type = #{bk_type,jdbcType=VARCHAR},
+      </if>
+      <if test="bk_beginamount != null" >
+        bk_beginamount = #{bk_beginamount,jdbcType=DOUBLE},
+      </if>
+      <if test="bk_thisamount != null" >
+        bk_thisamount = #{bk_thisamount,jdbcType=DOUBLE},
+      </if>
+      <if test="bk_status != null" >
+        bk_status = #{bk_status,jdbcType=VARCHAR},
+      </if>
+      <if test="bk_statuscode != null" >
+        bk_statuscode = #{bk_statuscode,jdbcType=VARCHAR},
+      </if>
+      <if test="bk_recorderid != null" >
+        bk_recorderid = #{bk_recorderid,jdbcType=INTEGER},
+      </if>
+      <if test="bk_recorder != null" >
+        bk_recorder = #{bk_recorder,jdbcType=VARCHAR},
+      </if>
+      <if test="bk_recorddate != null" >
+        bk_recorddate = #{bk_recorddate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="bk_ym != null" >
+        bk_ym = #{bk_ym,jdbcType=INTEGER},
+      </if>
+      <if test="companyId != null" >
+        companyid = #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null" >
+        updaterId = #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null" >
+        updateTime = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="bk_text1 != null" >
+        bk_text1 = #{bk_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="bk_text2 != null" >
+        bk_text2 = #{bk_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="bk_text3 != null" >
+        bk_text3 = #{bk_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="bk_text4 != null" >
+        bk_text4 = #{bk_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="bk_text5 != null" >
+        bk_text5 = #{bk_text5,jdbcType=VARCHAR},
+      </if>
+      <if test="bk_remark != null" >
+        bk_remark = #{bk_remark,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    where bk_id = #{id,jdbcType=INTEGER}
+  </update>
+
+<!-- 供应商-->
+  <resultMap id="VendorResultMapper" type="com.usoftchina.saas.money.po.Vendor">
+    <id column="ve_id" property="id" jdbcType="INTEGER" />
+    <result column="ve_code" property="ve_code" jdbcType="VARCHAR" />
+    <result column="ve_uu" property="ve_uu" jdbcType="VARCHAR" />
+    <result column="ve_name" property="ve_name" jdbcType="VARCHAR" />
+    <result column="ve_type" property="ve_type" jdbcType="VARCHAR" />
+    <result column="ve_begindate" property="ve_begindate" jdbcType="TIMESTAMP" />
+    <result column="ve_beginapamount" property="ve_beginapamount" jdbcType="DOUBLE" />
+    <result column="ve_beginprepayamount" property="ve_beginprepayamount" jdbcType="DOUBLE" />
+    <result column="ve_promisedays" property="ve_promisedays" jdbcType="INTEGER" />
+    <result column="ve_taxrate" property="ve_taxrate" jdbcType="DOUBLE" />
+    <result column="ve_nsrzh" property="ve_nsrzh" jdbcType="VARCHAR" />
+    <result column="ve_bankaccount" property="ve_bankaccount" jdbcType="VARCHAR" />
+    <result column="ve_bankcode" property="ve_bankcode" jdbcType="VARCHAR" />
+    <result column="ve_status" property="ve_status" jdbcType="VARCHAR" />
+    <result column="ve_statuscode" property="ve_statuscode" jdbcType="VARCHAR" />
+    <result column="ve_recordid" property="ve_recordid" jdbcType="INTEGER" />
+    <result column="ve_recordname" property="ve_recordname" jdbcType="VARCHAR" />
+    <result column="ve_initdate" property="ve_initdate" jdbcType="TIMESTAMP" />
+    <result column="companyId" property="companyId" jdbcType="INTEGER" />
+    <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
+    <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+    <result column="ve_text1" property="ve_text1" jdbcType="VARCHAR" />
+    <result column="ve_text2" property="ve_text2" jdbcType="VARCHAR" />
+    <result column="ve_text3" property="ve_text3" jdbcType="VARCHAR" />
+    <result column="ve_text4" property="ve_text4" jdbcType="VARCHAR" />
+    <result column="ve_text5" property="ve_text5" jdbcType="VARCHAR" />
+    <result column="ve_payamount" property="ve_payamount" jdbcType="DOUBLE" />
+    <result column="ve_leftamount" property="ve_leftamount" jdbcType="DOUBLE" />
+    <result column="ve_beginym" property="ve_beginym" jdbcType="INTEGER" />
+    <result column="ve_preamount" property="ve_preamount" jdbcType="DOUBLE" />
+  </resultMap>
+  <select id="selectVendorByPrimaryKey" resultMap="VendorResultMapper" parameterType="java.lang.Integer" >
+    select
+    <include refid="Vendor_Column_List" />
+    from vendor
+    where ve_id = #{id}
+  </select>
+  <sql id="Vendor_Column_List" >
+        ve_id, ve_code, ve_name, ve_uu, ve_type, ve_begindate, ve_beginapamount, ve_beginprepayamount,
+        ve_promisedays, ve_taxrate, ve_nsrzh, ve_bankaccount, ve_bankcode, ve_status, ve_statuscode,
+        ve_recordid, ve_recordname, ve_initdate, companyId, updaterId, updateTime, ve_text1,
+        ve_text2, ve_text3, ve_text4, ve_text5, ve_payamount, ve_leftamount, ve_beginym, ve_preamount
+    </sql>
+
+  <update id="updateVendorByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Vendor" >
+    update vendor
+    <set >
+      <if test="ve_code != null" >
+        ve_code = #{ve_code,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_name != null" >
+        ve_name = #{ve_name,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_uu != null" >
+        ve_uu = #{ve_uu,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_type != null" >
+        ve_type = #{ve_type,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_begindate != null" >
+        ve_begindate = #{ve_begindate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="ve_beginapamount != null" >
+        ve_beginapamount = #{ve_beginapamount,jdbcType=DOUBLE},
+      </if>
+      <if test="ve_beginprepayamount != null" >
+        ve_beginprepayamount = #{ve_beginprepayamount,jdbcType=DOUBLE},
+      </if>
+      <if test="ve_promisedays != null" >
+        ve_promisedays = #{ve_promisedays,jdbcType=DECIMAL},
+      </if>
+      <if test="ve_taxrate != null" >
+        ve_taxrate = #{ve_taxrate,jdbcType=DOUBLE},
+      </if>
+      <if test="ve_nsrzh != null" >
+        ve_nsrzh = #{ve_nsrzh,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_bankaccount != null" >
+        ve_bankaccount = #{ve_bankaccount,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_bankcode != null" >
+        ve_bankcode = #{ve_bankcode,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_status != null" >
+        ve_status = #{ve_status,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_statuscode != null" >
+        ve_statuscode = #{ve_statuscode,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_recordid != null" >
+        ve_recordid = #{ve_recordid,jdbcType=DECIMAL},
+      </if>
+      <if test="ve_recordname != null" >
+        ve_recordname = #{ve_recordname,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_initdate != null" >
+        ve_initdate = #{ve_initdate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="companyId != null" >
+        companyId = #{companyId,jdbcType=DECIMAL},
+      </if>
+      <if test="updaterId != null" >
+        updaterId = #{updaterId,jdbcType=DECIMAL},
+      </if>
+      <if test="updateTime != null" >
+        updateTime = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="ve_text1 != null" >
+        ve_text1 = #{ve_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_text2 != null" >
+        ve_text2 = #{ve_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_text3 != null" >
+        ve_text3 = #{ve_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_text4 != null" >
+        ve_text4 = #{ve_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_text5 != null" >
+        ve_text5 = #{ve_text5,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_payamount != null" >
+        ve_payamount = #{ve_payamount,jdbcType=DOUBLE},
+      </if>
+      <if test="ve_leftamount != null" >
+        ve_leftamount = #{ve_leftamount,jdbcType=DOUBLE},
+      </if>
+      <if test="ve_beginym != null" >
+        ve_beginym = #{ve_beginym,jdbcType=INTEGER},
+      </if>
+      <if test="ve_preamount !=null" >
+        ve_preamount = #{ve_preamount,jdbcType=DOUBLE}
+      </if>
+    </set>
+    where ve_id = #{id}
+  </update>
 </mapper>

+ 6 - 5
applications/money/money-server/src/main/resources/mapper/PaybalancedetMapper.xml

@@ -6,6 +6,7 @@
     <result column="pd_pbid" property="pd_pbid" jdbcType="INTEGER" />
     <result column="pd_detno" property="pd_detno" jdbcType="INTEGER" />
     <result column="pd_ym" property="pd_ym" jdbcType="INTEGER" />
+    <result column="pb_date" property="pb_date" jdbcType="TIMESTAMP" />
     <result column="pd_bankid" property="pd_bankid" jdbcType="INTEGER" />
     <result column="pd_bankcode" property="pd_bankcode" jdbcType="VARCHAR" />
     <result column="pd_bankname" property="pd_bankname" jdbcType="VARCHAR" />
@@ -70,7 +71,7 @@
       <if test="pd_detno != null" >
         pd_detno,
       </if>
-      <if test="pd_ym != null" >
+      <if test="pb_date != null" >
         pd_ym,
       </if>
       <if test="pd_bankid != null" >
@@ -126,8 +127,8 @@
       <if test="pd_detno != null" >
         #{pd_detno,jdbcType=INTEGER},
       </if>
-      <if test="pd_ym != null" >
-        #{pd_ym,jdbcType=INTEGER},
+      <if test="pb_date != null" >
+        CONVERT(date_format(#{pb_date,jdbcType=TIMESTAMP},'%Y%m'),SIGNED),
       </if>
       <if test="pd_bankid != null" >
         #{pd_bankid,jdbcType=INTEGER},
@@ -185,8 +186,8 @@
       <if test="pd_detno != null" >
         pd_detno = #{pd_detno,jdbcType=INTEGER},
       </if>
-      <if test="pd_ym != null" >
-        pd_ym = #{pd_ym,jdbcType=INTEGER},
+      <if test="pb_date != null" >
+        pd_ym = CONVERT(date_format(#{pb_date,jdbcType=TIMESTAMP},'%Y%m'),SIGNED),
       </if>
       <if test="pd_bankid != null" >
         pd_bankid = #{pd_bankid,jdbcType=INTEGER},

+ 6 - 5
applications/money/money-server/src/main/resources/mapper/PaybalancedetailMapper.xml

@@ -6,6 +6,7 @@
     <result column="pbd_pbid" property="pbd_pbid" jdbcType="INTEGER" />
     <result column="pbd_detno" property="pbd_detno" jdbcType="INTEGER" />
     <result column="pbd_ym" property="pbd_ym" jdbcType="INTEGER" />
+    <result column="pb_date" property="pb_date" jdbcType="TIMESTAMP" />
     <result column="pbd_slid" property="pbd_slid" jdbcType="INTEGER" />
     <result column="pbd_slcode" property="pbd_slcode" jdbcType="VARCHAR" />
     <result column="pbd_slkind" property="pbd_slkind" jdbcType="VARCHAR" />
@@ -68,7 +69,7 @@
       <if test="pbd_detno != null" >
         pbd_detno,
       </if>
-      <if test="pbd_ym != null" >
+      <if test="pb_date != null" >
         pbd_ym,
       </if>
       <if test="pbd_slid != null" >
@@ -124,8 +125,8 @@
       <if test="pbd_detno != null" >
         #{pbd_detno,jdbcType=INTEGER},
       </if>
-      <if test="pbd_ym != null" >
-        #{pbd_ym,jdbcType=INTEGER},
+      <if test="pb_date != null" >
+        CONVERT(date_format(#{pb_date,jdbcType=TIMESTAMP},'%Y%m'),SIGNED),
       </if>
       <if test="pbd_slid != null" >
         #{pbd_slid,jdbcType=INTEGER},
@@ -183,8 +184,8 @@
       <if test="pbd_detno != null" >
         pbd_detno = #{pbd_detno,jdbcType=INTEGER},
       </if>
-      <if test="pbd_ym != null" >
-        pbd_ym = #{pbd_ym,jdbcType=INTEGER},
+      <if test="pb_date != null" >
+        pbd_ym = CONVERT(date_format(#{pb_date,jdbcType=TIMESTAMP},'%Y%m'),SIGNED),
       </if>
       <if test="pbd_slid != null" >
         pbd_slid = #{pbd_slid,jdbcType=INTEGER},

+ 255 - 2
applications/money/money-server/src/main/resources/mapper/RecbalanceMapper.xml

@@ -126,7 +126,7 @@
       <if test="companyId != null">
         and   recbalance.companyId = #{companyId}
       </if>
-    </where>  order by rb_id
+    </where>  order by rb_date desc
   </select>
 
   <select id="selectRecbalanceListByCondition" resultMap="BaseResultMap">
@@ -141,7 +141,7 @@
       <if test="companyId != null">
         and   recbalance.companyId = #{companyId}
       </if>
-    </where>  order by rb_id
+    </where>  order by rb_date desc
   </select>
 
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
@@ -582,4 +582,257 @@
     select count(1) from recbalance where rb_code = #{code} and rb_id != #{id} and companyId =#{companyId}
   </select>
 
+  <!-- 银行账户-->
+  <sql id="Bank_Column_List" >
+    bk_id, bk_bankcode, bk_bankname, bk_date, bk_type, bk_beginamount, bk_thisamount,
+    bk_status, bk_statuscode, bk_recorderid, bk_recorder, bk_recorddate, bk_ym, companyid,
+    updaterId, updateTime, bk_text1, bk_text2, bk_text3, bk_text4, bk_text5, bk_remark
+  </sql>
+  <sql id="Blob_Column_List" >
+    bk_remark
+  </sql>
+  <select id="selectBankInformationByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Integer" >
+    select
+    <include refid="Bank_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from bankinformation
+    where bk_id = #{id,jdbcType=INTEGER}
+  </select>
+  <resultMap id="ResultMapWithBLOBs" type="com.usoftchina.saas.money.po.Bankinformation" extends="BankInformationResultMap" >
+    <result column="bk_remark" property="bk_remark" jdbcType="LONGVARCHAR" />
+  </resultMap>
+  <resultMap id="BankInformationResultMap" type="com.usoftchina.saas.money.po.Bankinformation" >
+    <id column="bk_id" property="id" jdbcType="INTEGER" />
+    <result column="bk_bankcode" property="bk_bankcode" jdbcType="VARCHAR" />
+    <result column="bk_bankname" property="bk_bankname" jdbcType="VARCHAR" />
+    <result column="bk_date" property="bk_date" jdbcType="TIMESTAMP" />
+    <result column="bk_type" property="bk_type" jdbcType="VARCHAR" />
+    <result column="bk_beginamount" property="bk_beginamount" jdbcType="DOUBLE" />
+    <result column="bk_thisamount" property="bk_thisamount" jdbcType="DOUBLE" />
+    <result column="bk_status" property="bk_status" jdbcType="VARCHAR" />
+    <result column="bk_statuscode" property="bk_statuscode" jdbcType="VARCHAR" />
+    <result column="bk_recorderid" property="bk_recorderid" jdbcType="INTEGER" />
+    <result column="bk_recorder" property="bk_recorder" jdbcType="VARCHAR" />
+    <result column="bk_recorddate" property="bk_recorddate" jdbcType="TIMESTAMP" />
+    <result column="bk_ym" property="bk_ym" jdbcType="INTEGER" />
+    <result column="companyid" property="companyId" jdbcType="INTEGER" />
+    <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
+    <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+    <result column="bk_text1" property="bk_text1" jdbcType="VARCHAR" />
+    <result column="bk_text2" property="bk_text2" jdbcType="VARCHAR" />
+    <result column="bk_text3" property="bk_text3" jdbcType="VARCHAR" />
+    <result column="bk_text4" property="bk_text4" jdbcType="VARCHAR" />
+    <result column="bk_text5" property="bk_text5" jdbcType="VARCHAR" />
+    <result column="bk_remark" property="bk_remark" jdbcType="VARCHAR" />
+  </resultMap>
+  <update id="updateBankByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Bankinformation" >
+    update bankinformation
+    <set >
+      <if test="bk_bankcode != null" >
+        bk_bankcode = #{bk_bankcode,jdbcType=VARCHAR},
+      </if>
+      <if test="bk_bankname != null" >
+        bk_bankname = #{bk_bankname,jdbcType=VARCHAR},
+      </if>
+      <if test="bk_date != null" >
+        bk_date = #{bk_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="bk_type != null" >
+        bk_type = #{bk_type,jdbcType=VARCHAR},
+      </if>
+      <if test="bk_beginamount != null" >
+        bk_beginamount = #{bk_beginamount,jdbcType=DOUBLE},
+      </if>
+      <if test="bk_thisamount != null" >
+        bk_thisamount = #{bk_thisamount,jdbcType=DOUBLE},
+      </if>
+      <if test="bk_status != null" >
+        bk_status = #{bk_status,jdbcType=VARCHAR},
+      </if>
+      <if test="bk_statuscode != null" >
+        bk_statuscode = #{bk_statuscode,jdbcType=VARCHAR},
+      </if>
+      <if test="bk_recorderid != null" >
+        bk_recorderid = #{bk_recorderid,jdbcType=INTEGER},
+      </if>
+      <if test="bk_recorder != null" >
+        bk_recorder = #{bk_recorder,jdbcType=VARCHAR},
+      </if>
+      <if test="bk_recorddate != null" >
+        bk_recorddate = #{bk_recorddate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="bk_ym != null" >
+        bk_ym = #{bk_ym,jdbcType=INTEGER},
+      </if>
+      <if test="companyId != null" >
+        companyid = #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null" >
+        updaterId = #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null" >
+        updateTime = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="bk_text1 != null" >
+        bk_text1 = #{bk_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="bk_text2 != null" >
+        bk_text2 = #{bk_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="bk_text3 != null" >
+        bk_text3 = #{bk_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="bk_text4 != null" >
+        bk_text4 = #{bk_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="bk_text5 != null" >
+        bk_text5 = #{bk_text5,jdbcType=VARCHAR},
+      </if>
+      <if test="bk_remark != null" >
+        bk_remark = #{bk_remark,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    where bk_id = #{id,jdbcType=INTEGER}
+  </update>
+
+  <!--客户资料-->
+  <resultMap id="CustomerResultMap" type="com.usoftchina.saas.money.po.Customer">
+    <id column="cu_id" jdbcType="INTEGER" property="id" />
+    <result column="cu_code" jdbcType="VARCHAR" property="cu_code" />
+    <result column="cu_name" jdbcType="VARCHAR" property="cu_name" />
+    <result column="cu_uu" jdbcType="VARCHAR" property="cu_uu" />
+    <result column="cu_type" jdbcType="VARCHAR" property="cu_type" />
+    <result column="cu_begindate" jdbcType="TIMESTAMP" property="cu_begindate" />
+    <result column="cu_beginaramount" jdbcType="DOUBLE" property="cu_beginaramount" />
+    <result column="cu_beginprerecamount" jdbcType="DOUBLE" property="cu_beginprerecamount" />
+    <result column="cu_promisedays" jdbcType="DOUBLE" property="cu_promisedays" />
+    <result column="cu_taxrate" jdbcType="DOUBLE" property="cu_taxrate" />
+    <result column="cu_sellerid" jdbcType="INTEGER" property="cu_sellerid" />
+    <result column="cu_sellercode" jdbcType="VARCHAR" property="cu_sellercode" />
+    <result column="cu_sellername" jdbcType="VARCHAR" property="cu_sellername" />
+    <result column="cu_credit" jdbcType="DOUBLE" property="cu_credit" />
+    <result column="cu_status" jdbcType="VARCHAR" property="cu_status" />
+    <result column="cu_statuscode" jdbcType="VARCHAR" property="cu_statuscode" />
+    <result column="cu_recordmanid" jdbcType="INTEGER" property="cu_recordmanid" />
+    <result column="cu_recordman" jdbcType="VARCHAR" property="cu_recordman" />
+    <result column="cu_recorddate" jdbcType="TIMESTAMP" property="cu_recorddate" />
+    <result column="companyid" jdbcType="INTEGER" property="companyId" />
+    <result column="updaterid" jdbcType="INTEGER" property="updaterId" />
+    <result column="updatetime" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="cu_text1" jdbcType="VARCHAR" property="cu_text1" />
+    <result column="cu_text2" jdbcType="VARCHAR" property="cu_text2" />
+    <result column="cu_text3" jdbcType="VARCHAR" property="cu_text3" />
+    <result column="cu_text4" jdbcType="VARCHAR" property="cu_text4" />
+    <result column="cu_text5" jdbcType="VARCHAR" property="cu_text5" />
+    <result column="cu_leftamount" jdbcType="DOUBLE" property="cu_leftamount" />
+    <result column="cu_recamount" jdbcType="DOUBLE" property="cu_recamount" />
+  </resultMap>
+  <sql id="Customer_Column_List">
+    cu_id, cu_code, cu_name, cu_uu, cu_type, cu_begindate, cu_beginaramount, cu_beginprerecamount,
+    cu_promisedays, cu_taxrate, cu_sellerid, cu_sellercode, cu_sellername, cu_credit,
+    cu_status, cu_statuscode, cu_recordmanid, cu_recordman, cu_recorddate, companyid,
+    updaterid, updatetime, cu_text1, cu_text2, cu_text3, cu_text4, cu_text5, cu_leftamount,
+    cu_recamount,cu_preamount
+  </sql>
+  <select id="selectCustomerByPrimaryKey" parameterType="java.lang.Integer" resultMap="CustomerResultMap">
+    select
+    <include refid="Customer_Column_List" />
+    from customer
+    where cu_id = #{cu_id,jdbcType=INTEGER}
+  </select>
+
+  <update id="updateCustomerByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Customer">
+    update customer
+    <set>
+      <if test="cu_code != null">
+        cu_code = #{cu_code,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_name != null">
+        cu_name = #{cu_name,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_uu != null">
+        cu_uu = #{cu_uu,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_type != null">
+        cu_type = #{cu_type,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_begindate != null">
+        cu_begindate = #{cu_begindate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="cu_beginaramount != null">
+        cu_beginaramount = #{cu_beginaramount,jdbcType=DOUBLE},
+      </if>
+      <if test="cu_beginprerecamount != null">
+        cu_beginprerecamount = #{cu_beginprerecamount,jdbcType=DOUBLE},
+      </if>
+      <if test="cu_promisedays != null">
+        cu_promisedays = #{cu_promisedays,jdbcType=DOUBLE},
+      </if>
+      <if test="cu_taxrate != null">
+        cu_taxrate = #{cu_taxrate,jdbcType=DOUBLE},
+      </if>
+      <if test="cu_sellerid != null">
+        cu_sellerid = #{cu_sellerid,jdbcType=INTEGER},
+      </if>
+      <if test="cu_sellercode != null">
+        cu_sellercode = #{cu_sellercode,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_sellername != null">
+        cu_sellername = #{cu_sellername,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_credit != null">
+        cu_credit = #{cu_credit,jdbcType=DOUBLE},
+      </if>
+      <if test="cu_status != null">
+        cu_status = #{cu_status,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_statuscode != null">
+        cu_statuscode = #{cu_statuscode,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_recordmanid != null">
+        cu_recordmanid = #{cu_recordmanid,jdbcType=INTEGER},
+      </if>
+      <if test="cu_recordman != null">
+        cu_recordman = #{cu_recordman,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_recorddate != null">
+        cu_recorddate = #{cu_recorddate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="companyId != null">
+        companyid = #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null">
+        updaterid = #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null">
+        updatetime = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="cu_text1 != null">
+        cu_text1 = #{cu_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_text2 != null">
+        cu_text2 = #{cu_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_text3 != null">
+        cu_text3 = #{cu_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_text4 != null">
+        cu_text4 = #{cu_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_text5 != null">
+        cu_text5 = #{cu_text5,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_leftamount != null">
+        cu_leftamount = #{cu_leftamount,jdbcType=DOUBLE},
+      </if>
+      <if test="cu_recamount != null">
+        cu_recamount = #{cu_recamount,jdbcType=DOUBLE},
+      </if>
+      <if test="cu_preamount != null">
+        cu_preamount = #{cu_preamount,jdbcType=DOUBLE},
+      </if>
+    </set>
+    where cu_id = #{id}
+  </update>
 </mapper>

+ 6 - 5
applications/money/money-server/src/main/resources/mapper/RecbalancedetMapper.xml

@@ -6,6 +6,7 @@
     <result column="rd_rbid" jdbcType="INTEGER" property="rd_rbid" />
     <result column="rd_detno" jdbcType="INTEGER" property="rd_detno" />
     <result column="rd_ym" jdbcType="INTEGER" property="rd_ym" />
+    <result column="rb_date" property="rb_date" jdbcType="TIMESTAMP" />
     <result column="rd_bankid" jdbcType="INTEGER" property="rd_bankid" />
     <result column="rd_bankcode" jdbcType="VARCHAR" property="rd_bankcode" />
     <result column="rd_bankname" jdbcType="VARCHAR" property="rd_bankname" />
@@ -126,7 +127,7 @@
       <if test="rd_detno != null">
         rd_detno,
       </if>
-      <if test="rd_ym != null">
+      <if test="rb_date != null">
         rd_ym,
       </if>
       <if test="rd_bankid != null">
@@ -182,8 +183,8 @@
       <if test="rd_detno != null">
         #{rd_detno,jdbcType=INTEGER},
       </if>
-      <if test="rd_ym != null">
-        #{rd_ym,jdbcType=INTEGER},
+      <if test="rb_date != null">
+        CONVERT(date_format(#{rb_date,jdbcType=TIMESTAMP},'%Y%m'),SIGNED),
       </if>
       <if test="rd_bankid != null">
         #{rd_bankid,jdbcType=INTEGER},
@@ -241,8 +242,8 @@
       <if test="rd_detno != null">
         rd_detno = #{rd_detno,jdbcType=INTEGER},
       </if>
-      <if test="rd_ym != null">
-        rd_ym = #{rd_ym,jdbcType=INTEGER},
+      <if test="rb_date != null">
+        rd_ym = CONVERT(date_format(#{rb_date,jdbcType=TIMESTAMP},'%Y%m'),SIGNED),
       </if>
       <if test="rd_bankid != null">
         rd_bankid = #{rd_bankid,jdbcType=INTEGER},

+ 6 - 5
applications/money/money-server/src/main/resources/mapper/RecbalancedetailMapper.xml

@@ -6,6 +6,7 @@
     <result column="rbd_rbid" property="rbd_rbid" jdbcType="INTEGER" />
     <result column="rbd_detno" property="rbd_detno" jdbcType="INTEGER" />
     <result column="rbd_ym" property="rbd_ym" jdbcType="INTEGER" />
+    <result column="rb_date" property="rb_date" jdbcType="TIMESTAMP" />
     <result column="rbd_slid" property="rbd_slid" jdbcType="INTEGER" />
     <result column="rbd_slcode" property="rbd_slcode" jdbcType="VARCHAR" />
     <result column="rbd_slkind" property="rbd_slkind" jdbcType="VARCHAR" />
@@ -68,7 +69,7 @@
       <if test="rbd_detno != null" >
         rbd_detno,
       </if>
-      <if test="rbd_ym != null" >
+      <if test="rb_date != null" >
         rbd_ym,
       </if>
       <if test="rbd_slid != null" >
@@ -124,8 +125,8 @@
       <if test="rbd_detno != null" >
         #{rbd_detno,jdbcType=INTEGER},
       </if>
-      <if test="rbd_ym != null" >
-        #{rbd_ym,jdbcType=INTEGER},
+      <if test="rb_date != null" >
+        CONVERT(date_format(#{rb_date,jdbcType=TIMESTAMP},'%Y%m'),SIGNED),
       </if>
       <if test="rbd_slid != null" >
         #{rbd_slid,jdbcType=INTEGER},
@@ -183,8 +184,8 @@
       <if test="rbd_detno != null" >
         rbd_detno = #{rbd_detno,jdbcType=INTEGER},
       </if>
-      <if test="rbd_ym != null" >
-        rbd_ym = #{rbd_ym,jdbcType=INTEGER},
+      <if test="rb_date != null" >
+        rbd_ym = CONVERT(date_format(#{rb_date,jdbcType=TIMESTAMP},'%Y%m'),SIGNED),
       </if>
       <if test="rbd_slid != null" >
         rbd_slid = #{rbd_slid,jdbcType=INTEGER},

+ 1 - 1
applications/money/money-server/src/main/resources/mapper/SubledgerMapper.xml

@@ -238,7 +238,7 @@
       <if test="companyId != null">
         and   subledger.companyId = #{companyId}
       </if>
-    </where>  order by sl_id
+    </where>  order by sl_date desc
   </select>
 
   <select id="selectCode" parameterType="java.lang.String" resultMap="BaseResultMap">

+ 2 - 4
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/ProdInOutController.java

@@ -130,8 +130,7 @@ public class ProdInOutController {
      */
     @PostMapping("/batchAudit")
     public Result batchAudit(@RequestBody BatchDealBaseDTO baseDTOs) {
-        prodInOutService.batchAudit(baseDTOs);
-        return Result.success();
+        return Result.success(prodInOutService.batchAudit(baseDTOs));
     }
 
     /**
@@ -142,8 +141,7 @@ public class ProdInOutController {
      */
     @PostMapping("/batchUnAudit")
     public Result batchUnAudit(@RequestBody BatchDealBaseDTO baseDTOs) {
-        prodInOutService.batchUnAudit(baseDTOs);
-        return Result.success();
+        return Result.success(prodInOutService.batchUnAudit(baseDTOs));
     }
 
     /**

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

@@ -118,5 +118,33 @@ public class PurchaseList extends CommonBaseEntity implements Serializable {
 
     private Double pd_yqty;
 
-    private ProductDTO productDTO;
+    //private ProductDTO productDTO;
+    private Long pr_id;
+    private String pr_code;
+    private String pr_detail;
+    private String pr_spec;
+    private String pr_unit;
+    private String pr_kind;
+    private String pr_orispeccode;
+    private long pr_whid;
+    private String pr_whcode;
+    private String pr_whname;
+    private long pr_zxbzs;
+    private long pr_leadtime;
+    private String pr_brand;
+    private String pr_standardprice;
+    private String pr_purcprice;
+    private String pr_saleprice;
+    private long pr_vendid;
+    private String pr_vendname;
+    private String pr_vendcode;
+    private Date pr_docdate;
+    private long pr_recordmanid;
+    private String pr_recordman;
+    private String pr_status;
+    private String pr_statuscode;
+    private String pr_text1;
+    private String pr_text2;
+    private String pr_text3;
+    private String pr_text4;
 }

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

@@ -250,8 +250,13 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
 
     private void singleAudit(ProdInOutDTO prodInOutDTO) {
         String pi_class= prodInOutDTO.getPi_class();
+        String pi_inoutno = prodInOutDTO.getPi_inoutno();
+        String pi_statuscode = prodInOutDTO.getPi_statuscode();
+        if(StringUtils.isEmpty(pi_statuscode)||(!StringUtils.isEmpty(pi_statuscode)&&!pi_statuscode.equals(Status.UNAUDITED.name()))){
+            throw  new BizException(BizExceptionCode.BIZ_AUDITED);
+        };
         Map<String, Object> map = new HashMap<String, Object>();
-        map.put("inoutNo",prodInOutDTO.getPi_inoutno() );
+        map.put("inoutNo",pi_inoutno);
         map.put("class", pi_class);
         map.put("commitid",BaseContextHolder.getUserId());
         map.put("companyId",BaseContextHolder.getCompanyId());
@@ -259,7 +264,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         Result res = warehouseApi.post(map);
         Object result =  res.getData();
         if(!StringUtils.isEmpty(result)){
-            throw new BizException(BizExceptionCode.SALEOUT_POST_ERROR.getCode(),result.toString());
+            throw new BizException(BizExceptionCode.PURCCHECKIN_POST_ERROR.getCode(),result.toString());
         }else{
             //记录日志
             DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class,prodInOutDTO.getPi_inoutno());
@@ -296,9 +301,14 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
     }
 
     private void singleUnAudit(ProdInOutDTO prodInOutDTO) {
-        String pi_class= prodInOutDTO.getPi_class();
+        String pi_class = prodInOutDTO.getPi_class();
+        String  pi_inoutno = prodInOutDTO.getPi_inoutno();
+        String pi_statuscode = prodInOutDTO.getPi_statuscode();
+        if(StringUtils.isEmpty(pi_statuscode)||(!StringUtils.isEmpty(pi_statuscode)&&!pi_statuscode.equals(Status.AUDITED.name()))){
+            throw  new BizException(BizExceptionCode.BIZ_UNAUDITED);
+        };
         Map<String, Object> map = new HashMap<String, Object>();
-        map.put("inoutNo",prodInOutDTO.getPi_inoutno() );
+        map.put("inoutNo",pi_inoutno);
         map.put("class", pi_class);
         map.put("commitid",BaseContextHolder.getUserId());
         map.put("companyId",BaseContextHolder.getCompanyId());
@@ -306,7 +316,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         Result res = warehouseApi.unPost(map);
         Object result = res.getData();
         if(!StringUtils.isEmpty(result)){
-            throw new BizException(BizExceptionCode.SALEOUT_POST_ERROR.getCode(),result.toString());
+            throw new BizException(BizExceptionCode.PURCCHECKIN_POST_ERROR.getCode(),result.toString());
         }else{
             //记录日志
             DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class,prodInOutDTO.getPi_inoutno());
@@ -418,6 +428,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         targetPi.setPi_inoutno(piInoutno);
         targetPi.setPi_class(BillCodeSeq.PURCHASEOUT.getName());
         targetPi.setPi_date(new Date());
+        targetPi.setPi_status("未审核");
+        targetPi.setPi_statuscode("UNAUDITED");
         targetPi.setPi_recorddate(new Date());
         targetPi.setPi_vendid(sourcePi.getPi_vendid());
         targetPi.setPi_vendcode(sourcePi.getPi_vendcode());

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

@@ -54,36 +54,34 @@
         <result column="pd_text4" property="pd_text4" jdbcType="VARCHAR" />
         <result column="pd_text5" property="pd_text5" jdbcType="VARCHAR" />
         <result column="pd_yqty" property="pd_yqty" jdbcType="DOUBLE" />
-        <association property="productDTO" javaType="com.usoftchina.saas.document.dto.ProductDTO">
-            <id column="pr_id" property="id"/>
-            <result column="pr_code" property="pr_code"/>
-            <result column="pr_detail" property="pr_detail"/>
-            <result column="pr_spec" property="pr_spec"/>
-            <result column="pr_unit" property="pr_unit"/>
-            <result column="pr_kind" property="pr_kind"/>
-            <result column="pr_orispeccode" property="pr_orispeccode"/>
-            <result column="pr_whid" property="pr_whid"/>
-            <result column="pr_whcode" property="pr_whcode"/>
-            <result column="pr_whname" property="pr_whname"/>
-            <result column="pr_zxbzs" property="pr_zxbzs"/>
-            <result column="pr_leadtime" property="pr_leadtime"/>
-            <result column="pr_brand" property="pr_brand"/>
-            <result column="pr_standardprice" property="pr_standardprice"/>
-            <result column="pr_purcprice" property="pr_purcprice"/>
-            <result column="pr_saleprice" property="pr_saleprice"/>
-            <result column="pr_vendid" property="pr_vendid"/>
-            <result column="pr_vendname" property="pr_vendname"/>
-            <result column="pr_vendcode" property="pr_vendcode"/>
-            <result column="pr_docdate" property="pr_docdate"/>
-            <result column="pr_recordmanid" property="pr_recordmanid"/>
-            <result column="pr_recordman" property="pr_recordman"/>
-            <result column="pr_status" property="pr_status"/>
-            <result column="pr_statuscode" property="pr_statuscode"/>
-            <result column="pr_text1" property="pr_text1"/>
-            <result column="pr_text2" property="pr_text2"/>
-            <result column="pr_text3" property="pr_text3"/>
-            <result column="pr_text4" property="pr_text4"/>
-        </association>
+        <result column="pr_id" property="pr_id"/>
+        <result column="pr_code" property="pr_code"/>
+        <result column="pr_detail" property="pr_detail"/>
+        <result column="pr_spec" property="pr_spec"/>
+        <result column="pr_unit" property="pr_unit"/>
+        <result column="pr_kind" property="pr_kind"/>
+        <result column="pr_orispeccode" property="pr_orispeccode"/>
+        <result column="pr_whid" property="pr_whid"/>
+        <result column="pr_whcode" property="pr_whcode"/>
+        <result column="pr_whname" property="pr_whname"/>
+        <result column="pr_zxbzs" property="pr_zxbzs"/>
+        <result column="pr_leadtime" property="pr_leadtime"/>
+        <result column="pr_brand" property="pr_brand"/>
+        <result column="pr_standardprice" property="pr_standardprice"/>
+        <result column="pr_purcprice" property="pr_purcprice"/>
+        <result column="pr_saleprice" property="pr_saleprice"/>
+        <result column="pr_vendid" property="pr_vendid"/>
+        <result column="pr_vendname" property="pr_vendname"/>
+        <result column="pr_vendcode" property="pr_vendcode"/>
+        <result column="pr_docdate" property="pr_docdate"/>
+        <result column="pr_recordmanid" property="pr_recordmanid"/>
+        <result column="pr_recordman" property="pr_recordman"/>
+        <result column="pr_status" property="pr_status"/>
+        <result column="pr_statuscode" property="pr_statuscode"/>
+        <result column="pr_text1" property="pr_text1"/>
+        <result column="pr_text2" property="pr_text2"/>
+        <result column="pr_text3" property="pr_text3"/>
+        <result column="pr_text4" property="pr_text4"/>
     </resultMap>
 
     <select id="selectPurchaseListByCondition"  resultMap="BaseResultMap">
@@ -96,7 +94,7 @@
             <if test="companyId != null">
               and   purchase.companyId = #{companyId}
             </if>
-        </where>  order by pu_id desc,pd_detno desc
+        </where>  order by pu_date desc
     </select>
 
     <select id="selectPurchaseBycondition"  resultMap="BaseResultMap">
@@ -109,7 +107,7 @@
                and  companyId = #{companyId}
             </if>
         </where>
-        order by pu_id desc
+        order by pu_date desc
     </select>
 
 </mapper>

+ 29 - 1
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/po/SaleList.java

@@ -106,5 +106,33 @@ public class SaleList implements Serializable{
 
     private String sd_text5;
 
-    private ProductDTO productDTO;
+    //private ProductDTO productDTO;级联属性会导致分页查询出现BUG,设置数与查询数量不一致
+    private Long pr_id;
+    private String pr_code;
+    private String pr_detail;
+    private String pr_spec;
+    private String pr_unit;
+    private String pr_kind;
+    private String pr_orispeccode;
+    private long pr_whid;
+    private String pr_whcode;
+    private String pr_whname;
+    private long pr_zxbzs;
+    private long pr_leadtime;
+    private String pr_brand;
+    private String pr_standardprice;
+    private String pr_purcprice;
+    private String pr_saleprice;
+    private long pr_vendid;
+    private String pr_vendname;
+    private String pr_vendcode;
+    private Date pr_docdate;
+    private long pr_recordmanid;
+    private String pr_recordman;
+    private String pr_status;
+    private String pr_statuscode;
+    private String pr_text1;
+    private String pr_text2;
+    private String pr_text3;
+    private String pr_text4;
 }

+ 29 - 31
applications/sale/sale-server/src/main/resources/mapper/SaleListMapper.xml

@@ -49,36 +49,34 @@
         <result column="sd_text3" property="sd_text3" jdbcType="VARCHAR" />
         <result column="sd_text4" property="sd_text4" jdbcType="VARCHAR" />
         <result column="sd_text5" property="sd_text5" jdbcType="VARCHAR" />
-        <association property="productDTO" javaType="com.usoftchina.saas.document.dto.ProductDTO">
-            <id column="pr_id" property="id"/>
-            <result column="pr_code" property="pr_code"/>
-            <result column="pr_detail" property="pr_detail"/>
-            <result column="pr_spec" property="pr_spec"/>
-            <result column="pr_unit" property="pr_unit"/>
-            <result column="pr_kind" property="pr_kind"/>
-            <result column="pr_orispeccode" property="pr_orispeccode"/>
-            <result column="pr_whid" property="pr_whid"/>
-            <result column="pr_whcode" property="pr_whcode"/>
-            <result column="pr_whname" property="pr_whname"/>
-            <result column="pr_zxbzs" property="pr_zxbzs"/>
-            <result column="pr_leadtime" property="pr_leadtime"/>
-            <result column="pr_brand" property="pr_brand"/>
-            <result column="pr_standardprice" property="pr_standardprice"/>
-            <result column="pr_purcprice" property="pr_purcprice"/>
-            <result column="pr_saleprice" property="pr_saleprice"/>
-            <result column="pr_vendid" property="pr_vendid"/>
-            <result column="pr_vendname" property="pr_vendname"/>
-            <result column="pr_vendcode" property="pr_vendcode"/>
-            <result column="pr_docdate" property="pr_docdate"/>
-            <result column="pr_recordmanid" property="pr_recordmanid"/>
-            <result column="pr_recordman" property="pr_recordman"/>
-            <result column="pr_status" property="pr_status"/>
-            <result column="pr_statuscode" property="pr_statuscode"/>
-            <result column="pr_text1" property="pr_text1"/>
-            <result column="pr_text2" property="pr_text2"/>
-            <result column="pr_text3" property="pr_text3"/>
-            <result column="pr_text4" property="pr_text4"/>
-        </association>
+        <result column="pr_id" property="pr_id"/>
+        <result column="pr_code" property="pr_code"/>
+        <result column="pr_detail" property="pr_detail"/>
+        <result column="pr_spec" property="pr_spec"/>
+        <result column="pr_unit" property="pr_unit"/>
+        <result column="pr_kind" property="pr_kind"/>
+        <result column="pr_orispeccode" property="pr_orispeccode"/>
+        <result column="pr_whid" property="pr_whid"/>
+        <result column="pr_whcode" property="pr_whcode"/>
+        <result column="pr_whname" property="pr_whname"/>
+        <result column="pr_zxbzs" property="pr_zxbzs"/>
+        <result column="pr_leadtime" property="pr_leadtime"/>
+        <result column="pr_brand" property="pr_brand"/>
+        <result column="pr_standardprice" property="pr_standardprice"/>
+        <result column="pr_purcprice" property="pr_purcprice"/>
+        <result column="pr_saleprice" property="pr_saleprice"/>
+        <result column="pr_vendid" property="pr_vendid"/>
+        <result column="pr_vendname" property="pr_vendname"/>
+        <result column="pr_vendcode" property="pr_vendcode"/>
+        <result column="pr_docdate" property="pr_docdate"/>
+        <result column="pr_recordmanid" property="pr_recordmanid"/>
+        <result column="pr_recordman" property="pr_recordman"/>
+        <result column="pr_status" property="pr_status"/>
+        <result column="pr_statuscode" property="pr_statuscode"/>
+        <result column="pr_text1" property="pr_text1"/>
+        <result column="pr_text2" property="pr_text2"/>
+        <result column="pr_text3" property="pr_text3"/>
+        <result column="pr_text4" property="pr_text4"/>
     </resultMap>
 
     <select id="selectSaleListByCondition" resultMap="BaseResultMap">
@@ -91,7 +89,7 @@
             <if test="companyId != null">
                 and   sale.companyId = #{companyId}
             </if>
-        </where>  order by sd_detno desc
+        </where>  order by sa_date desc
     </select>
 
     <select id="selectSaleByCondition" resultMap="BaseResultMap">

+ 4 - 188
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/Make.java

@@ -1,10 +1,12 @@
 package com.usoftchina.saas.storage.po;
 
 import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import lombok.Data;
 
 import java.io.Serializable;
 import java.util.Date;
 
+@Data
 public class Make extends CommonBaseEntity implements Serializable {
     private String ma_code;
 
@@ -54,195 +56,9 @@ public class Make extends CommonBaseEntity implements Serializable {
 
     private String ma_text5;
 
-    public String getMa_whname() {
-        return ma_whname;
-    }
+    private String ma_auditman;
 
-    public void setMa_whname(String ma_whname) {
-        this.ma_whname = ma_whname;
-    }
+    private Date ma_auditdate;
 
-    public String getMa_code() {
-        return ma_code;
-    }
 
-    public void setMa_code(String ma_code) {
-        this.ma_code = ma_code == null ? null : ma_code.trim();
-    }
-
-    public String getMa_status() {
-        return ma_status;
-    }
-
-    public void setMa_status(String ma_status) {
-        this.ma_status = ma_status == null ? null : ma_status.trim();
-    }
-
-    public String getMa_statuscode() {
-        return ma_statuscode;
-    }
-
-    public void setMa_statuscode(String ma_statuscode) {
-        this.ma_statuscode = ma_statuscode == null ? null : ma_statuscode.trim();
-    }
-
-    public String getMa_type() {
-        return ma_type;
-    }
-
-    public void setMa_type(String ma_type) {
-        this.ma_type = ma_type == null ? null : ma_type.trim();
-    }
-
-    public Long getMa_prodid() {
-        return ma_prodid;
-    }
-
-    public void setMa_prodid(Long ma_prodid) {
-        this.ma_prodid = ma_prodid;
-    }
-
-    public String getMa_prodcode() {
-        return ma_prodcode;
-    }
-
-    public void setMa_prodcode(String ma_prodcode) {
-        this.ma_prodcode = ma_prodcode == null ? null : ma_prodcode.trim();
-    }
-
-    public String getMa_proddetail() {
-        return ma_proddetail;
-    }
-
-    public void setMa_proddetail(String ma_proddetail) {
-        this.ma_proddetail = ma_proddetail == null ? null : ma_proddetail.trim();
-    }
-
-    public String getMa_prodspec() {
-        return ma_prodspec;
-    }
-
-    public void setMa_prodspec(String ma_prodspec) {
-        this.ma_prodspec = ma_prodspec == null ? null : ma_prodspec.trim();
-    }
-
-    public String getMa_version() {
-        return ma_version;
-    }
-
-    public void setMa_version(String ma_version) {
-        this.ma_version = ma_version == null ? null : ma_version.trim();
-    }
-
-    public String getMa_produnit() {
-        return ma_produnit;
-    }
-
-    public void setMa_produnit(String ma_produnit) {
-        this.ma_produnit = ma_produnit == null ? null : ma_produnit.trim();
-    }
-
-    public Double getMa_qty() {
-        return ma_qty;
-    }
-
-    public void setMa_qty(Double ma_qty) {
-        this.ma_qty = ma_qty;
-    }
-
-    public Integer getMa_whid() {
-        return ma_whid;
-    }
-
-    public void setMa_whid(Integer ma_whid) {
-        this.ma_whid = ma_whid;
-    }
-
-    public String getMa_whcode() {
-        return ma_whcode;
-    }
-
-    public void setMa_whcode(String ma_whcode) {
-        this.ma_whcode = ma_whcode == null ? null : ma_whcode.trim();
-    }
-
-    public Date getMa_recorddate() {
-        return ma_recorddate;
-    }
-
-    public void setMa_recorddate(Date ma_recorddate) {
-        this.ma_recorddate = ma_recorddate;
-    }
-
-    public Integer getMa_recordid() {
-        return ma_recordid;
-    }
-
-    public void setMa_recordid(Integer ma_recordid) {
-        this.ma_recordid = ma_recordid;
-    }
-
-    public String getMa_recorder() {
-        return ma_recorder;
-    }
-
-    public void setMa_recorder(String ma_recorder) {
-        this.ma_recorder = ma_recorder == null ? null : ma_recorder.trim();
-    }
-
-    public Double getMa_price() {
-        return ma_price;
-    }
-
-    public void setMa_price(Double ma_price) {
-        this.ma_price = ma_price;
-    }
-
-    public Double getMa_total() {
-        return ma_total;
-    }
-
-    public void setMa_total(Double ma_total) {
-        this.ma_total = ma_total;
-    }
-
-    public String getMa_text1() {
-        return ma_text1;
-    }
-
-    public void setMa_text1(String ma_text1) {
-        this.ma_text1 = ma_text1 == null ? null : ma_text1.trim();
-    }
-
-    public String getMa_text2() {
-        return ma_text2;
-    }
-
-    public void setMa_text2(String ma_text2) {
-        this.ma_text2 = ma_text2 == null ? null : ma_text2.trim();
-    }
-
-    public String getMa_text3() {
-        return ma_text3;
-    }
-
-    public void setMa_text3(String ma_text3) {
-        this.ma_text3 = ma_text3 == null ? null : ma_text3.trim();
-    }
-
-    public String getMa_text4() {
-        return ma_text4;
-    }
-
-    public void setMa_text4(String ma_text4) {
-        this.ma_text4 = ma_text4 == null ? null : ma_text4.trim();
-    }
-
-    public String getMa_text5() {
-        return ma_text5;
-    }
-
-    public void setMa_text5(String ma_text5) {
-        this.ma_text5 = ma_text5 == null ? null : ma_text5.trim();
-    }
 }

+ 19 - 0
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/report/ProdinoutCountView.java

@@ -10,4 +10,23 @@ import java.io.Serializable;
  */
 @Data
 public class ProdinoutCountView implements Serializable{
+
+    private String  pwm_yearmonth;
+    private String pr_kind;
+    private String pr_code;
+    private String pr_detail;
+    private String pr_spec;
+    private String pr_unit;
+    private String wh_description;
+    private Double pwm_beginqty;
+    private Double pwm_beginamount;
+    private Double pwm_nowinqty;
+    private Double pwm_nowinamount;
+    private Double pwm_nowoutqty;
+    private Double pwm_nowoutamount;
+    private Double pwm_endqty;
+    private Double pwm_endamount;
+    private Integer companyid;
+
+
 }

+ 2 - 0
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/MakeMapper.java

@@ -28,4 +28,6 @@ public interface MakeMapper extends CommonBaseMapper<Make> {
     double getOnHand(@Param("prodcode") String prodcode, @Param("whcode") String whcode, @Param("companyId") Long companyId);
 
     String selectMakeInOutCode(@Param("code") String code, @Param("companyId") Long companyId, @Param("type") String type);
+
+    void calcMakePriceAndTotal(Long id);
 }

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

@@ -2,7 +2,6 @@ package com.usoftchina.saas.storage.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;
@@ -28,7 +27,6 @@ import com.usoftchina.saas.storage.po.ProdInOut;
 import com.usoftchina.saas.storage.service.MakeService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Isolation;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.StringUtils;
 
@@ -106,6 +104,12 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             //记录LOG
             docBaseDTO = generateMsgObj(make.getId(), make.getMa_code());
             messageLogService.save(docBaseDTO);
+
+
+            //抓取出库单位成本,计算出库成本
+            calcMakePriceAndTotal(make.getId());
+
+
         }else{
             //更新主表
             make.setUpdaterId(BaseContextHolder.getUserId());
@@ -142,10 +146,19 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             //记录LOG
             docBaseDTO = generateMsgObj(make.getId(), make.getMa_code());
             messageLogService.update(docBaseDTO);
+
+            //抓取出库单位成本,计算出库成本
+            calcMakePriceAndTotal(make.getId());
+
         }
         return docBaseDTO;
     }
 
+    private void calcMakePriceAndTotal(Long id) {
+        getMapper().calcMakePriceAndTotal(id);
+    }
+
+
     /**
      * 校验库存是否足够
      * @param makeListDTO
@@ -158,7 +171,7 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             int i = 0;
             for(MakeMaterial makeMaterial : makeMaterialList){
                 i++;
-                double qty = makeMaterial.getMm_qty() * makeMaterial.getMm_oneuseqty();
+                double qty = makeMaterial.getMm_qty();
                 double onHand = getMapper().getOnHand(makeMaterial.getMm_prodcode(),makeMaterial.getMm_whcode(), BaseContextHolder.getCompanyId());
                 if(onHand < qty){
                     throw new BizException(79402, "行" + i + "库存不足");
@@ -252,6 +265,9 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             DocBaseDTO docBaseDTO = saveOrUpdate(makeListDTO);
             make.setId(docBaseDTO.getId());
         }
+        //抓取出库单位成本,计算出库成本
+        calcMakePriceAndTotal(make.getId());
+
         //2.校验库存是否足够
         validStorage(makeListDTO);
         //3.生成  完工入库单和领料单 并 过账
@@ -262,6 +278,8 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
         make.setMa_statuscode(Status.AUDITED.name());
         make.setUpdateTime(new Date());
         make.setUpdaterId(BaseContextHolder.getUserId());
+        make.setMa_auditman("");
+        make.setMa_auditdate(new Date());
         getMapper().updateByPrimaryKeySelective(make);
         DocBaseDTO docBaseDTO = generateMsgObj(make.getId(), make.getMa_code());
         //5.记录LOG

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

@@ -235,8 +235,13 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
 
     private void singleAudit(ProdInOutDTO prodInOutDTO) {
         String pi_class= prodInOutDTO.getPi_class();
+        String pi_inoutno = prodInOutDTO.getPi_inoutno();
+        String pi_statuscode = prodInOutDTO.getPi_statuscode();
+        if(StringUtils.isEmpty(pi_statuscode)||(!StringUtils.isEmpty(pi_statuscode)&&!pi_statuscode.equals(Status.UNAUDITED.name()))){
+            throw  new BizException(BizExceptionCode.BIZ_AUDITED);
+        };
         Map<String, Object> map = new HashMap<String, Object>();
-        map.put("inoutNo",prodInOutDTO.getPi_inoutno() );
+        map.put("inoutNo",pi_inoutno);
         map.put("class", pi_class);
         map.put("commitid",BaseContextHolder.getUserId());
         map.put("companyId",BaseContextHolder.getCompanyId());
@@ -244,7 +249,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         Result res = warehouseApi.post(map);
         Object result =  res.getData();
         if(!StringUtils.isEmpty(result)){
-            throw new BizException(BizExceptionCode.SALEOUT_POST_ERROR.getCode(),result.toString());
+            throw new BizException(BizExceptionCode.STORAGE_POST_ERROR.getCode(),result.toString());
         }else{
             //记录日志
             DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class,prodInOutDTO.getPi_inoutno());
@@ -281,9 +286,14 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
     }
 
     private void singleUnAudit(ProdInOutDTO prodInOutDTO) {
-        String pi_class= prodInOutDTO.getPi_class();
+        String pi_class = prodInOutDTO.getPi_class();
+        String  pi_inoutno = prodInOutDTO.getPi_inoutno();
+        String pi_statuscode = prodInOutDTO.getPi_statuscode();
+        if(StringUtils.isEmpty(pi_statuscode)||(!StringUtils.isEmpty(pi_statuscode)&&!pi_statuscode.equals(Status.AUDITED.name()))){
+            throw  new BizException(BizExceptionCode.BIZ_UNAUDITED);
+        };
         Map<String, Object> map = new HashMap<String, Object>();
-        map.put("inoutNo",prodInOutDTO.getPi_inoutno() );
+        map.put("inoutNo",pi_inoutno);
         map.put("class", pi_class);
         map.put("commitid",BaseContextHolder.getUserId());
         map.put("companyId",BaseContextHolder.getCompanyId());
@@ -291,7 +301,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         Result res = warehouseApi.unPost(map);
         Object result =  res.getData();
         if(!StringUtils.isEmpty(result)){
-            throw new BizException(BizExceptionCode.SALEOUT_POST_ERROR.getCode(),result.toString());
+            throw new BizException(BizExceptionCode.STORAGE_POST_ERROR.getCode(),result.toString());
         }else{
             //记录日志
             DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class,prodInOutDTO.getPi_inoutno());

+ 45 - 6
applications/storage/storage-server/src/main/resources/mapper/MakeMapper.xml

@@ -17,11 +17,13 @@
     <result column="ma_whid" property="ma_whid" jdbcType="INTEGER" />
     <result column="ma_whcode" property="ma_whcode" jdbcType="VARCHAR" />
     <result column="ma_whname" property="ma_whname" jdbcType="VARCHAR" />
-    <result column="ma_recorddate" property="ma_recorddate" jdbcType="TIMESTAMP" />
+    <result column="ma_recorddate" property="createTime" jdbcType="TIMESTAMP" />
     <result column="ma_recordid" property="ma_recordid" jdbcType="INTEGER" />
     <result column="ma_recorder" property="ma_recorder" jdbcType="VARCHAR" />
     <result column="ma_price" property="ma_price" jdbcType="DOUBLE" />
     <result column="ma_total" property="ma_total" jdbcType="DOUBLE" />
+    <result column="ma_auditman" property="ma_auditman" jdbcType="DOUBLE" />
+    <result column="ma_auditdate" property="ma_auditdate" jdbcType="DOUBLE" />
     <result column="companyId" property="companyId" jdbcType="INTEGER" />
     <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
     <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
@@ -34,7 +36,7 @@
   <sql id="Base_Column_List" >
     ma_id, ma_code, ma_status, ma_statuscode, ma_type, ma_prodid, ma_prodcode, ma_proddetail, 
     ma_prodspec, ma_version, ma_produnit, ma_qty, ma_whid, ma_whcode, ma_whname, ma_recorddate,
-    ma_recordid, ma_recorder, ma_price, ma_total, companyId, updaterId, updateTime, ma_text1, 
+    ma_recordid, ma_recorder, ma_price, ma_total,ma_auditman,ma_auditdate, companyId, updaterId, updateTime, ma_text1,
     ma_text2, ma_text3, ma_text4, ma_text5
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
@@ -57,7 +59,7 @@
       ma_version, ma_produnit, ma_qty, 
       ma_whid, ma_whcode, ma_whname, ma_recorddate,
       ma_recordid, ma_recorder, ma_price, 
-      ma_total, companyId, updaterId, 
+      ma_total, ma_auditman,ma_auditdate,companyId, updaterId,
       updateTime, ma_text1, ma_text2, 
       ma_text3, ma_text4, ma_text5
       )
@@ -67,7 +69,7 @@
       #{ma_version,jdbcType=VARCHAR}, #{ma_produnit,jdbcType=VARCHAR}, #{ma_qty,jdbcType=DOUBLE}, 
       #{ma_whid,jdbcType=INTEGER}, #{ma_whcode,jdbcType=VARCHAR}, #{ma_whname,jdbcType=VARCHAR}, #{ma_recorddate,jdbcType=TIMESTAMP},
       #{ma_recordid,jdbcType=INTEGER}, #{ma_recorder,jdbcType=VARCHAR}, #{ma_price,jdbcType=DOUBLE}, 
-      #{ma_total,jdbcType=DOUBLE}, #{companyId,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER}, 
+      #{ma_total,jdbcType=DOUBLE}, #{ma_auditman,jdbcType=VARCHAR},#{ma_auditdate.jdbcType=TIMESTAMP},#{companyId,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER},
       #{updateTime,jdbcType=TIMESTAMP}, #{ma_text1,jdbcType=VARCHAR}, #{ma_text2,jdbcType=VARCHAR}, 
       #{ma_text3,jdbcType=VARCHAR}, #{ma_text4,jdbcType=VARCHAR}, #{ma_text5,jdbcType=VARCHAR}
       )
@@ -120,7 +122,7 @@
       <if test="ma_whname != null" >
           ma_whname,
       </if>
-      <if test="ma_recorddate != null" >
+      <if test="createTime != null" >
         ma_recorddate,
       </if>
       <if test="ma_recordid != null" >
@@ -135,6 +137,12 @@
       <if test="ma_total != null" >
         ma_total,
       </if>
+      <if test="ma_auditman !=null">
+        ma_auditman,
+      </if>
+      <if test="ma_auditdate !=null">
+        ma_auditdate,
+      </if>
       <if test="companyId != null" >
         companyId,
       </if>
@@ -218,6 +226,16 @@
       <if test="ma_total != null" >
         #{ma_total,jdbcType=DOUBLE},
       </if>
+      <if test="ma_auditman !=null">
+        #{ma_auditman,jdbcType=VARCHAR},
+      </if>
+      <if test="ma_auditdate !=null">
+        #{ma_auditdate,jdbcType=TIMESTAMP},
+      </if>
+
+
+
+
       <if test="companyId != null" >
         #{companyId,jdbcType=INTEGER},
       </if>
@@ -304,6 +322,15 @@
       <if test="ma_total != null" >
         ma_total = #{ma_total,jdbcType=DOUBLE},
       </if>
+      <if test="ma_auditman !=null">
+        ma_auditman = #{ma_auditman,jdbcType=VARCHAR},
+      </if>
+      <if test="ma_auditdate !=null">
+        ma_auditdate =  #{ma_auditdate,jdbcType=TIMESTAMP},
+      </if>
+
+
+
       <if test="companyId != null" >
         companyId = #{companyId,jdbcType=INTEGER},
       </if>
@@ -352,6 +379,9 @@
       ma_recorder = #{ma_recorder,jdbcType=VARCHAR},
       ma_price = #{ma_price,jdbcType=DOUBLE},
       ma_total = #{ma_total,jdbcType=DOUBLE},
+      ma_auditman = #{ma_auditman,jdbcType=VARCHAR},
+      ma_auditdate = #{ma_auditdate,jdbcType=TIMESTAMP},
+
       companyId = #{companyId,jdbcType=INTEGER},
       updaterId = #{updaterId,jdbcType=INTEGER},
       updateTime = #{updateTime,jdbcType=TIMESTAMP},
@@ -370,7 +400,7 @@
       </if>
       AND MAKE.COMPANYID = #{companyId}
     </where>
-    order by MA_ID
+    order by MA_ID desc
   </select>
   <select id="validateCodeWhenInsert" resultType="int">
     select count(*) from MAKE where MA_CODE = #{code} and companyId =#{companyId}
@@ -386,4 +416,13 @@
     <select id="selectMakeInOutCode" resultType="string">
         SELECT PI_INOUTNO FROM PRODINOUT WHERE COMPANYID=#{companyId} AND PI_TEXT1=#{code} AND PI_CLASS=#{type}
     </select>
+
+  <update id="calcMakePriceAndTotal" parameterType="long" >
+  update makematerial set mm_price = (select pw_avprice from productwh where pw_prodid = mm_prodid and pw_whid = mm_whid) where mm_maid = #{id};
+  update makematerial set mm_amount = round(mm_price*mm_qty,2) where mm_maid = #{id};
+  update make set ma_total = round((select sum(mm_amount) from makematerial where mm_maid = #{id} ),2) where ma_id = #{id};
+  update make set ma_price = ma_total/ma_qty where ma_id = #{id};
+  </update>
+
+
 </mapper>

+ 23 - 3
applications/storage/storage-server/src/main/resources/mapper/ProdInOutReportMapper.xml

@@ -22,6 +22,27 @@
   </resultMap>
 
 
+  <resultMap id="ProdinoutCountMap" type="com.usoftchina.saas.storage.po.report.ProdinoutCountView">
+    <result column="pwm_yearmonth" jdbcType="VARCHAR" property="pwm_yearmonth" />
+    <result column="pr_kind" jdbcType="VARCHAR" property="pr_kind" />
+    <result column="pr_code" jdbcType="VARCHAR" property="pr_code" />
+    <result column="pr_detail" jdbcType="VARCHAR" property="pr_detail" />
+    <result column="pr_spec" jdbcType="VARCHAR" property="pr_spec" />
+    <result column="pr_unit" jdbcType="VARCHAR" property="pr_unit" />
+    <result column="wh_description" jdbcType="VARCHAR" property="wh_description" />
+    <result column="pwm_beginqty" jdbcType="DOUBLE" property="pwm_beginqty" />
+    <result column="pwm_beginamount" jdbcType="DOUBLE" property="pwm_beginamount" />
+    <result column="pwm_nowinqty" jdbcType="DOUBLE" property="pwm_nowinqty" />
+    <result column="pwm_nowinamount" jdbcType="DOUBLE" property="pwm_nowinamount" />
+    <result column="pwm_nowoutqty" jdbcType="DOUBLE" property="pwm_nowoutqty" />
+    <result column="pwm_nowoutamount" jdbcType="DOUBLE" property="pwm_nowoutamount" />
+    <result column="pwm_endqty" jdbcType="DOUBLE" property="pwm_endqty" />
+    <result column="pwm_endamount" jdbcType="DOUBLE" property="pwm_endamount" />
+    <result column="companyid" jdbcType="INTEGER" property="companyid" />
+  </resultMap>
+
+
+
 
   <select id="selectProdiodetailByCondition" resultMap="ProdiodetailMap">
     select  *  from prodiodetail_view
@@ -37,8 +58,8 @@
   </select>
 
 
-  <select id="selectProdinoutCountByCondition"  resultMap="ProdiodetailMap">
-    select  *  from prodinout
+  <select id="selectProdinoutCountByCondition"  resultMap="ProdinoutCountMap">
+    select  *  from prodinoutcount_view
     <where>
       <if test="con != null">
         ${con}
@@ -47,7 +68,6 @@
         and  companyid = #{companyId}
       </if>
     </where>
-    order by pi_id
   </select>
 
 

+ 34 - 0
base-servers/account/account-dto/src/main/java/com/usoftchina/saas/account/dto/OtherPowerDTO.java

@@ -0,0 +1,34 @@
+package com.usoftchina.saas.account.dto;
+
+import java.io.Serializable;
+
+public class OtherPowerDTO implements Serializable {
+
+    private Long resourceId;
+    private String name;
+    private boolean checked;
+
+    public boolean isChecked() {
+        return checked;
+    }
+
+    public void setChecked(boolean checked) {
+        this.checked = checked;
+    }
+
+    public Long getResourceId() {
+        return resourceId;
+    }
+
+    public void setResourceId(Long resourceId) {
+        this.resourceId = resourceId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+}

+ 123 - 0
base-servers/account/account-dto/src/main/java/com/usoftchina/saas/account/dto/PowerDTO.java

@@ -0,0 +1,123 @@
+package com.usoftchina.saas.account.dto;
+
+import java.util.List;
+
+public class PowerDTO {
+    private Long groupId;
+    private String moduleName;
+    private String groupName;
+    private boolean query;
+    private boolean add;
+    private boolean update;
+    private boolean delete;
+    private boolean audit;
+    private boolean unAudit;
+    private boolean print;
+    private boolean fileExport;
+    private boolean fileImport;
+    private List<OtherPowerDTO> other;
+
+    public Long getGroupId() {
+        return groupId;
+    }
+
+    public void setGroupId(Long groupId) {
+        this.groupId = groupId;
+    }
+
+    public String getGroupName() {
+        return groupName;
+    }
+
+    public void setGroupName(String groupName) {
+        this.groupName = groupName;
+    }
+
+    public String getModuleName() {
+        return moduleName;
+    }
+
+    public void setModuleName(String moduleName) {
+        this.moduleName = moduleName;
+    }
+
+    public boolean getQuery() {
+        return query;
+    }
+
+    public void setQuery(boolean query) {
+        this.query = query;
+    }
+
+    public boolean getAdd() {
+        return add;
+    }
+
+    public void setAdd(boolean add) {
+        this.add = add;
+    }
+
+    public boolean getUpdate() {
+        return update;
+    }
+
+    public void setUpdate(boolean update) {
+        this.update = update;
+    }
+
+    public boolean getDelete() {
+        return delete;
+    }
+
+    public void setDelete(boolean delete) {
+        this.delete = delete;
+    }
+
+    public boolean getAudit() {
+        return audit;
+    }
+
+    public void setAudit(boolean audit) {
+        this.audit = audit;
+    }
+
+    public boolean getUnAudit() {
+        return unAudit;
+    }
+
+    public void setUnAudit(boolean unAudit) {
+        this.unAudit = unAudit;
+    }
+
+    public boolean getPrint() {
+        return print;
+    }
+
+    public void setPrint(boolean print) {
+        this.print = print;
+    }
+
+    public boolean getFileExport() {
+        return fileExport;
+    }
+
+    public void setFileExport(boolean fileExport) {
+        this.fileExport = fileExport;
+    }
+
+    public boolean getFileImport() {
+        return fileImport;
+    }
+
+    public void setFileImport(boolean fileImport) {
+        this.fileImport = fileImport;
+    }
+
+    public List<OtherPowerDTO> getOther() {
+        return other;
+    }
+
+    public void setOther(List<OtherPowerDTO> other) {
+        this.other = other;
+    }
+}

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

@@ -130,6 +130,11 @@ public class RoleController {
         return Result.success();
     }
 
+    @GetMapping("/power/resource")
+    public Result getResourcePower(Long id){
+        return Result.success(roleService.getResourcePowerById(id));
+    }
+
     /**
      * 清除角色相关所有账户的缓存
      *

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

@@ -42,4 +42,11 @@ public interface ResourceMapper {
      * @return
      */
     Resource selectByPrimaryKey(@Param("id") Long id);
+
+    /**
+     * 按资源组查找Classify
+     * @param id
+     * @return
+     */
+    List<String> selectClassifyByGroupId(@Param("id") Long id);
 }

+ 15 - 0
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/mapper/RoleResourceMapper.java

@@ -1,9 +1,11 @@
 package com.usoftchina.saas.account.mapper;
 
+import com.usoftchina.saas.account.po.OtherPower;
 import com.usoftchina.saas.account.po.RoleResource;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * @author yingp
@@ -53,4 +55,17 @@ public interface RoleResourceMapper {
      * @return
      */
     List<RoleResource> selectByAccountId(@Param("accountId") Long accountId);
+
+    /**
+     * 按角色ID查找角色绑定的资源Classify
+     * @param id
+     */
+    List<Map<String, Object>> selectClassifyByRoleId(@Param("id") Long id);
+
+    /**
+     * 通过资源groupId和角色ID查询 角色是否具有改资源的权限
+     * @param roleId
+     * @return
+     */
+    List<OtherPower> selectOthersPower(@Param("roleId") Long roleId);
 }

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

@@ -0,0 +1,43 @@
+package com.usoftchina.saas.account.po;
+
+import java.io.Serializable;
+
+public class OtherPower implements Serializable {
+
+    private Long resourceId;
+    private String name;
+    private boolean checked;
+    private Long groupId;
+
+    public Long getResourceId() {
+        return resourceId;
+    }
+
+    public void setResourceId(Long resourceId) {
+        this.resourceId = resourceId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public boolean isChecked() {
+        return checked;
+    }
+
+    public void setChecked(boolean checked) {
+        this.checked = checked;
+    }
+
+    public Long getGroupId() {
+        return groupId;
+    }
+
+    public void setGroupId(Long groupId) {
+        this.groupId = groupId;
+    }
+}

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

@@ -1,5 +1,6 @@
 package com.usoftchina.saas.account.service;
 
+import com.usoftchina.saas.account.dto.ResourceGroupDTO;
 import com.usoftchina.saas.account.dto.ResourceModuleDTO;
 import com.usoftchina.saas.account.dto.UrlResourceDTO;
 import com.usoftchina.saas.account.po.Resource;

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

@@ -1,5 +1,6 @@
 package com.usoftchina.saas.account.service;
 
+import com.usoftchina.saas.account.dto.PowerDTO;
 import com.usoftchina.saas.account.dto.RoleBaseDTO;
 import com.usoftchina.saas.account.mapper.RoleMapper;
 import com.usoftchina.saas.account.po.Role;
@@ -36,4 +37,11 @@ public interface RoleService extends CommonBaseService<RoleMapper, Role> {
      * @return
      */
     List<RoleBaseDTO> findByAccountId(Long accountId);
+
+    /**
+     * 查找用户权限
+     * @param id
+     * @return
+     */
+    List<PowerDTO> getResourcePowerById(Long id);
 }

+ 97 - 5
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/impl/RoleServiceImpl.java

@@ -1,15 +1,15 @@
 package com.usoftchina.saas.account.service.impl;
 
 import com.usoftchina.saas.account.constant.RoleType;
+import com.usoftchina.saas.account.dto.OtherPowerDTO;
+import com.usoftchina.saas.account.dto.PowerDTO;
 import com.usoftchina.saas.account.dto.RoleBaseDTO;
-import com.usoftchina.saas.account.mapper.AccountRoleMapper;
-import com.usoftchina.saas.account.mapper.RoleMapper;
-import com.usoftchina.saas.account.mapper.RoleResourceMapper;
-import com.usoftchina.saas.account.po.Resource;
-import com.usoftchina.saas.account.po.Role;
+import com.usoftchina.saas.account.mapper.*;
+import com.usoftchina.saas.account.po.*;
 import com.usoftchina.saas.account.service.ResourceService;
 import com.usoftchina.saas.account.service.RoleService;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.utils.BeanMapper;
 import com.usoftchina.saas.utils.CollectionUtils;
 import com.usoftchina.saas.utils.StringUtils;
@@ -18,7 +18,9 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 
 /**
  * @author yingp
@@ -38,6 +40,15 @@ public class RoleServiceImpl extends CommonBaseServiceImpl<RoleMapper, Role> imp
     @Autowired
     private ResourceService resourceService;
 
+    @Autowired
+    private ResourceModuleMapper resourceModuleMapper;
+
+    @Autowired
+    private ResourceGroupMapper resourceGroupMapper;
+
+    @Autowired
+    private ResourceMapper resourceMapper;
+
     @Override
     public boolean save(Role role) {
         if (StringUtils.isEmpty(role.getCode())) {
@@ -78,4 +89,85 @@ public class RoleServiceImpl extends CommonBaseServiceImpl<RoleMapper, Role> imp
         }
         return null;
     }
+
+    @Override
+    public List<PowerDTO> getResourcePowerById(Long id) {
+        List<PowerDTO> powerDTOList = new ArrayList<PowerDTO>();
+        List<Map<String, Object>> classifyList = roleResourceMapper.selectClassifyByRoleId(id);
+        List<OtherPower> otherPowerList = roleResourceMapper.selectOthersPower(id);
+        //查询所有模块
+        List<ResourceModule> modules = resourceModuleMapper.selectByAppId(BaseContextHolder.getAppId());
+        for (ResourceModule module : modules){
+            //查询所有分组
+            List<ResourceGroup> groups = resourceGroupMapper.selectByModuleId(module.getId());
+            for (ResourceGroup group : groups) {
+                PowerDTO powerDTO = new PowerDTO();
+                powerDTO.setGroupId(group.getId());
+                powerDTO.setModuleName(module.getName());
+                powerDTO.setGroupName(group.getName());
+                //赋值权限
+                for (Map<String, Object> map : classifyList){
+                    if (group.getId().equals(map.get("group_id"))){
+                        String classify = String.valueOf(map.get("classify"));
+                        setPowerValue(powerDTO, classify);
+                        if (classify.contains("OTHER")){
+                            setOtherPower(powerDTO, group.getId(), otherPowerList);
+                        }
+                    }
+                }
+                powerDTOList.add(powerDTO);
+            }
+        }
+        return powerDTOList;
+    }
+
+    private void setOtherPower(PowerDTO powerDTO, Long groupId, List<OtherPower> otherPowerList) {
+        List<OtherPower> otherPowers = new ArrayList<OtherPower>();
+        for (OtherPower otherPower : otherPowerList){
+            if (otherPower.getGroupId().equals(groupId)){
+                otherPowers.add(otherPower);
+            }
+        }
+        List<OtherPowerDTO> otherPowerDTOList = BeanMapper.mapList(otherPowers, OtherPowerDTO.class);
+        powerDTO.setOther(otherPowerDTOList);
+    }
+
+    private void setPowerValue(PowerDTO powerDTO, String classify) {
+        String[] array = classify.split(",");
+        for(int i = 0; i < array.length; i++){
+            switch (array[i]){
+                case "QUERY":
+                    powerDTO.setQuery(true);
+                    break;
+                case "ADD":
+                    powerDTO.setAdd(true);
+                    break;
+                case "UPDATE":
+                    powerDTO.setUpdate(true);
+                    break;
+                case "AUDIT":
+                    powerDTO.setAudit(true);
+                    break;
+                case "UNAUDIT":
+                    powerDTO.setUnAudit(true);
+                    break;
+                case "DELETE":
+                    powerDTO.setDelete(true);
+                    break;
+                case "PRINT":
+                    powerDTO.setPrint(true);
+                    break;
+                case "EXPORT":
+                    powerDTO.setFileExport(true);
+                    break;
+                case "IMPORT":
+                    powerDTO.setFileImport(true);
+                    break;
+                default:
+                    break;
+            }
+        }
+    }
+
+
 }

+ 3 - 0
base-servers/account/account-server/src/main/resources/mapper/ResourceMapper.xml

@@ -29,4 +29,7 @@
     <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
         select <include refid="baseColumns"/> from ac_resource where id=#{id,jdbcType=BIGINT}
     </select>
+    <select id="selectClassifyByGroupId" parameterType="java.lang.Long" resultType="string">
+        SELECT DISTINCT CLASSIFY FROM AC_RESOURCE WHERE ID=#{id,jdbcType=BIGINT}
+    </select>
 </mapper>

+ 18 - 0
base-servers/account/account-server/src/main/resources/mapper/RoleResourceMapper.xml

@@ -24,4 +24,22 @@
         where ac_account_role.role_id=ac_role_resource.role_id
         and ac_account_role.account_id=#{accountId,jdbcType=BIGINT}
     </select>
+    <select id="selectClassifyByRoleId" parameterType="java.lang.Long" resultType="java.util.HashMap">
+        SELECT GROUP_CONCAT(classify) classify,group_id FROM (
+          SELECT classify,group_id FROM AC_RESOURCE
+          WHERE ID IN (SELECT RESOURCE_ID FROM AC_ROLE_RESOURCE WHERE ROLE_ID=#{id})
+          GROUP BY GROUP_ID,CLASSIFY) A
+        GROUP BY GROUP_ID
+    </select>
+    <resultMap id="OtherPowerResultMap" type="com.usoftchina.saas.account.po.OtherPower">
+        <result column="name" property="name" jdbcType="VARCHAR" />
+        <result column="id" property="resourceId" jdbcType="BIGINT" />
+        <result column="group_id" property="groupId" jdbcType="BIGINT" />
+        <result column="checked" property="checked" jdbcType="BOOLEAN" />
+    </resultMap>
+    <select id="selectOthersPower" resultMap="OtherPowerResultMap">
+      SELECT name,id,group_id,CASE WHEN ROLE_ID IS NULL THEN false ELSE true end checked FROM AC_RESOURCE
+      LEFT JOIN ac_role_resource ON ID = RESOURCE_ID
+      WHERE CLASSIFY='OTHER' AND ROLE_ID=#{roleId}
+    </select>
 </mapper>

+ 1 - 0
base-servers/auth/auth-client/src/main/java/com/usoftchina/saas/auth/client/interceptor/AuthRestInterceptor.java

@@ -42,6 +42,7 @@ public class AuthRestInterceptor extends HandlerInterceptorAdapter {
                 JwtInfo infoFromToken = JwtHelper.getInfoFromToken(token, authConfig.getPublicKey());
                 BaseContextHolder.setAppId(infoFromToken.getAppId());
                 BaseContextHolder.setUserId(infoFromToken.getUserId());
+                BaseContextHolder.setUserName(infoFromToken.getUserName());
                 BaseContextHolder.setCompanyId(infoFromToken.getCompanyId());
                 BaseContextHolder.setToken(token);
                 log.info("request={} token={} \\r\\n userName={}", request.getRequestURI(),

+ 1 - 0
base-servers/gateway-server/src/main/java/com/usoftchina/saas/gateway/config/AuthFilter.java

@@ -49,6 +49,7 @@ public class AuthFilter implements GlobalFilter, Ordered {
                 BaseContextHolder.setAppId(jwt.getAppId());
                 BaseContextHolder.setUserId(jwt.getUserId());
                 BaseContextHolder.setCompanyId(jwt.getCompanyId());
+                BaseContextHolder.setUserName(jwt.getUserName());
                 BaseContextHolder.setToken(token);
                 AccountDTO accountDTO = AccountCache.current().getAccount();
                 if (null == accountDTO) {

+ 5 - 1
framework/core/src/main/java/com/usoftchina/saas/constant/CommonConstants.java

@@ -20,7 +20,11 @@ public class CommonConstants {
      */
     public static final String CONTEXT_KEY_APP_ID = "currentAppId";
     /***
-     * ThreadLocal中的登录用户Id key
+     * ThreadLocal中的登录用户token key
      */
     public static final String CONTEXT_KEY_TOKEN = "currentToken";
+    /**
+     * threadLocal中的登录用户name key
+     */
+    public static final String CONTEXT_KEY_USER_NAME = "currentUserName";
 }

+ 9 - 0
framework/core/src/main/java/com/usoftchina/saas/context/BaseContextHolder.java

@@ -67,6 +67,15 @@ public class BaseContextHolder {
         set(CommonConstants.CONTEXT_KEY_TOKEN, token);
     }
 
+    public static String getUserName(){
+        Object value = get(CommonConstants.CONTEXT_KEY_USER_NAME);
+        return ObjectUtils.getStringValue(value);
+    }
+
+    public static void setUserName(String userName){
+        set(CommonConstants.CONTEXT_KEY_USER_NAME, userName);
+    }
+
     public static void remove() {
         threadLocal.remove();
     }

+ 67 - 0
frontend/saas-web/app/Application.scss

@@ -272,4 +272,71 @@ div::-webkit-scrollbar-track {
   background: #fff;
   border: 1px solid #e5e5e5;
   border-radius: 8px;
+}
+/**date-picker*/
+.x-datepicker-month .x-btn-inner {
+  font-size: 12px;
+}
+.x-datepicker {
+  width: 212px;
+}
+.x-datepicker-column-header {
+  width: 30px;
+}
+.x-datepicker-column-header-inner {
+  line-height: 25px;
+  padding: 0 9px 0 0;
+}
+.x-datepicker-cell {
+  text-align: right;
+  border: 1px solid #fff;
+}
+.x-datepicker-date {
+  padding: 0 7px 0 0;
+  cursor: pointer;
+  line-height: 23px;
+}
+.x-datepicker-footer, .x-monthpicker-buttons {
+  padding: 3px 0;
+  text-align: center;
+}
+.x-monthpicker {
+  width: 212px;
+  border-width: 1px;
+}
+.x-monthpicker-months {
+  width: 105px;
+}
+.x-monthpicker-item-inner {
+  margin: 0 5px 0 5px;
+  line-height: 22px;
+}
+.x-monthpicker-months .x-monthpicker-item {
+  width: 52px;
+}
+.x-monthpicker-years {
+  width: 105px;
+}
+.x-monthpicker-years .x-monthpicker-item {
+  width: 52px;
+}
+.x-monthpicker-yearnav {
+  height: 34px;
+}
+.x-monthpicker-yearnav-button-ct {
+  width: 52px;
+}
+.x-monthpicker-yearnav-button {
+  height: 12px;
+  width: 12px;
+  cursor: pointer;
+  margin-top: 11px;
+}
+.x-datepicker-footer .x-btn-default-toolbar-small{
+  padding: 2px 2px 2px 2px;
+  min-width: 56px;
+}
+.x-monthpicker-buttons .x-btn-default-toolbar-small{
+  padding: 2px 2px 2px 2px;
+  min-width: 56px;
 }

+ 12 - 0
frontend/saas-web/app/model/chart/DataXY.js

@@ -0,0 +1,12 @@
+Ext.define('saas.model.chart.DataXY', {
+    extend: 'saas.model.Base',
+
+    fields: [
+        {
+            name: 'xvalue'
+        },
+        {
+            name: 'yvalue'
+        }
+    ]
+});

+ 21 - 0
frontend/saas-web/app/model/chart/MultiDataXY.js

@@ -0,0 +1,21 @@
+Ext.define('saas.model.chart.MultiDataXY', {
+    extend: 'saas.model.Base',
+
+    fields: [
+        {
+            name: 'xvalue'
+        },
+        {
+            name: 'y1value'
+        },
+        {
+            name: 'y2value'
+        },
+        {
+            name: 'y3value'
+        },
+        {
+            name: 'y4value'
+        }
+    ]
+});

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

@@ -50,6 +50,7 @@ Ext.define('saas.util.FormUtil', {
                         
                         if(item.xtype == 'datefield') {
                             Ext.applyIf(item, {
+                                editable: false,
                                 format: 'Y-m-d'
                             });
                         }
@@ -122,6 +123,9 @@ Ext.define('saas.util.FormUtil', {
                                         Ext.apply(editor, {
                                             format: 'Y-m-d'
                                         });
+                                        Ext.applyIf(editor, {
+                                            editable: false
+                                        });
                                     }
                                 }
                             });

+ 1 - 2
frontend/saas-web/app/view/auth/LoginController.js

@@ -10,14 +10,13 @@ Ext.define('saas.view.auth.LoginController', {
         var me = this, view = me.getView(),
             form = me.lookup('authdialog'),
             values = form.getValues();
-
         view.mask('请稍等...');
 
         saas.model.Session.login(values.username, values.password)
             .then(function(session) {
                 view.isMasked() && view.unmask();
                 me.getViewModel().set('session', session);
-				var cos = session.get("account").companies;
+                var cos = session.get("account").companies;
 				if (cos && cos.length) {
                     if (cos.length == 1) {
                         session.get('account').companyId = cos[0].id;

+ 89 - 0
frontend/saas-web/app/view/core/chart/Area.js

@@ -0,0 +1,89 @@
+Ext.define('saas.view.core.chart.Area', {
+    extend: 'saas.view.core.chart.ChartBase',
+    xtype: 'core-chart-area',
+
+    requires: [
+        'Ext.chart.CartesianChart',
+        'Ext.chart.axis.Category',
+        'Ext.chart.axis.Numeric',
+        'Ext.chart.series.Line',
+        'Ext.chart.interactions.PanZoom'
+    ],
+
+    title: 'Area Chart',
+    iconCls: 'x-fa fa-area-chart',
+
+    items: [{
+        xtype: 'cartesian',
+        colors: [
+            '#115fa6',
+            '#94ae0a'
+        ],
+        bind: '{areaData}',
+        series: [
+            {
+                type: 'line',
+                colors: [
+                    'rgba(103, 144, 199, 0.6)'
+                ],
+                xField: 'xvalue',
+                yField: [
+                    'y1value'
+                ],
+                fill: true,
+                smooth: true
+            },
+            {
+                type: 'line',
+                colors: [
+                    'rgba(238, 146, 156, 0.6)'
+                ],
+                xField: 'xvalue',
+                yField: [
+                    'y2value'
+                ],
+                fill: true,
+                smooth: true
+            }
+        ],
+        platformConfig: {
+            phone: {
+                // On a phone the whole view becomes a vertical strip of charts,
+                // which makes it impossible to scroll the view if touch action
+                // started on a chart. So we use a custom touchAction config.
+                touchAction: {
+                    panX: true,
+                    panY: true
+                }
+            },
+            '!phone': {
+                interactions: {
+                    type: 'panzoom',
+                    zoomOnPanGesture: true
+                }
+            }
+        },
+        axes: [{
+            type: 'category',
+            fields: [
+                'xvalue'
+            ],
+            hidden: true,
+            position: 'bottom'
+        },{
+            type: 'numeric',
+            fields: [
+                'y1value',
+                'y2value',
+                'y3value'
+            ],
+            grid: {
+                odd: {
+                    fill: '#e8e8e8'
+                }
+            },
+            hidden: true,
+            position: 'left'
+        }]
+    }]
+});

+ 67 - 0
frontend/saas-web/app/view/core/chart/Bar.js

@@ -0,0 +1,67 @@
+Ext.define('saas.view.core.chart.Bar', {
+    extend: 'saas.view.core.chart.ChartBase',
+    xtype: 'core-chart-bar',
+
+    requires: [
+        'Ext.chart.CartesianChart',
+        'Ext.chart.axis.Category',
+        'Ext.chart.axis.Numeric',
+        'Ext.chart.interactions.PanZoom',
+        'Ext.chart.series.Bar'
+    ],
+
+    title: 'Bar Chart',
+    iconCls: 'x-fa fa-bar-chart',
+
+    items: [{
+        xtype: 'cartesian',
+        colors: [
+            '#6aa5db'
+        ],
+        bind: '{barData}',
+        axes: [{
+            type: 'category',
+            fields: [
+                'xvalue'
+            ],
+            hidden: true,
+            position: 'bottom'
+        },{
+            type: 'numeric',
+            fields: [
+                'yvalue'
+            ],
+            grid: {
+                odd: {
+                    fill: '#e8e8e8'
+                }
+            },
+            hidden: true,
+            position: 'left'
+        }],
+        series: [{
+            type: 'bar',
+            xField: 'xvalue',
+            yField: [
+                'yvalue'
+            ]
+        }],
+        platformConfig: {
+            phone: {
+                // On a phone the whole view becomes a vertical strip of charts,
+                // which makes it impossible to scroll the view if touch action
+                // started on a chart. So we use a custom touchAction config.
+                touchAction: {
+                    panX: true,
+                    panY: true
+                }
+            },
+            '!phone': {
+                interactions: {
+                    type: 'panzoom',
+                    zoomOnPanGesture: true
+                }
+            }
+        }
+    }]
+});

+ 22 - 0
frontend/saas-web/app/view/core/chart/ChartBase.js

@@ -0,0 +1,22 @@
+Ext.define('saas.view.core.chart.ChartBase', {
+    extend: 'Ext.panel.Panel',
+
+    height: 300,
+
+    layout: 'fit',
+
+    cls: 'quick-graph-panel shadow',
+    // headerPosition: 'bottom',
+
+    defaults: {
+        width: '100%'
+    },
+
+    initComponent: function() {
+        var me = this;
+        
+
+
+        me.callParent(arguments);
+    }
+});

+ 38 - 0
frontend/saas-web/app/view/core/chart/Gauge.js

@@ -0,0 +1,38 @@
+Ext.define('saas.view.core.chart.Gauge', {
+    extend: 'saas.view.core.chart.ChartBase',
+    xtype: 'core-chart-gauge',
+
+    requires: [
+        'Ext.chart.PolarChart',
+        'Ext.chart.series.Gauge'
+    ],
+
+    title: 'Gauge Chart',
+    iconCls: 'x-fa fa-wifi',
+
+    items: [{
+        xtype: 'polar',
+        colors: [
+            '#6aa5db',
+            '#aed581'
+        ],
+        bind: '{gaugeData}',
+        series: [{
+            type: 'gauge',
+            angleField: 'position',
+            needleLength: 100
+        }],
+        platformConfig: {
+            phone: {
+                // On a phone the whole view becomes a vertical strip of charts,
+                // which makes it impossible to scroll the view if touch action
+                // started on a chart. So we use a custom touchAction config.
+                touchAction: {
+                    panX: true,
+                    panY: true
+                }
+            }
+        }
+    }]
+
+});

+ 75 - 0
frontend/saas-web/app/view/core/chart/Line.js

@@ -0,0 +1,75 @@
+Ext.define('saas.view.core.chart.Line', {
+    extend: 'saas.view.core.chart.ChartBase',
+    xtype: 'core-chart-line',
+
+    requires: [
+        'Ext.chart.CartesianChart',
+        'Ext.chart.axis.Category',
+        'Ext.chart.axis.Numeric',
+        'Ext.chart.interactions.PanZoom',
+        'Ext.chart.series.Line'
+
+    ],
+
+    title: 'Line Chart',
+    iconCls: 'x-fa fa-line-chart',
+
+    items: [{
+        xtype: 'cartesian',
+        colors: [
+            '#6aa5db',
+            '#94ae0a'
+        ],
+        bind: '{lineData}',
+        axes: [{
+            type: 'category',
+            fields: [
+                'xvalue'
+            ],
+            hidden: true,
+            position: 'bottom'
+        },{
+            type: 'numeric',
+            fields: [
+                'yvalue',
+                'y1value',
+                'y2value',
+                'y3value',
+                'y4value',
+                'y5value'
+            ],
+            hidden: true,
+            position: 'left'
+        }],
+        series: [{
+            type: 'line',
+            xField: 'xvalue',
+            yField: [
+                'yvalue'
+            ]
+        },{
+            type: 'line',
+            xField: 'xvalue',
+            yField: [
+                'y1value'
+            ]
+        }],
+        platformConfig: {
+            phone: {
+                // On a phone the whole view becomes a vertical strip of charts,
+                // which makes it impossible to scroll the view if touch action
+                // started on a chart. So we use a custom touchAction config.
+                touchAction: {
+                    panX: true,
+                    panY: true
+                }
+            },
+            '!phone': {
+                interactions: {
+                    type: 'panzoom',
+                    zoomOnPanGesture: true
+                }
+            }
+        }
+    }]
+});

+ 55 - 0
frontend/saas-web/app/view/core/chart/Pie.js

@@ -0,0 +1,55 @@
+Ext.define('saas.view.core.chart.Pie', {
+    extend: 'saas.view.core.chart.ChartBase',
+    xtype: 'core-chart-pie',
+
+    requires: [
+        'Ext.chart.PolarChart',
+        'Ext.chart.interactions.Rotate',
+        'Ext.chart.series.Pie',
+        'Ext.chart.series.sprite.PieSlice'
+    ],
+
+    iconCls: 'x-fa fa-pie-chart',
+
+    items: [{
+        xtype: 'polar',
+        colors: [
+            '#aed581',
+            '#6aa5db',
+            '#ee929c',
+            '#61A0A8',
+            '#D48265',
+            '#91C7AE',
+            '#CA8622',
+            '#BDA29A'
+        ],
+        bind: '{pieData}',
+        // series: [{
+        //     type: 'pie',
+        //     angleField: 'yvalue',
+        //     label: {
+        //         field: 'xvalue',
+        //         display: 'rotate',
+        //         contrast: true,
+        //         font: '12px Open Sans',
+        //     },
+        //     // xField: 'yvalue'
+        // }],
+        series: [{
+            type: 'pie',
+            angleField: 'yvalue',
+            label: {
+                field: 'xvalue',
+            },
+            highlight: true,
+            tooltip: {
+                trackMouse: true,
+                renderer: 'onSeriesTooltipRender'
+            }
+        }],
+        // legend: {
+        //     docked: 'bottom'
+        // },
+        interactions: 'rotate'
+    }]
+});

+ 42 - 0
frontend/saas-web/app/view/core/chart/Pie3D.js

@@ -0,0 +1,42 @@
+Ext.define('saas.view.core.chart.Pie3D', {
+    extend: 'saas.view.core.chart.ChartBase',
+    xtype: 'core-chart-pie3d',
+
+    requires: [
+        'Ext.chart.PolarChart',
+        'Ext.chart.interactions.Rotate',
+        'Ext.chart.series.Pie3D'
+    ],
+
+    title: '3D Pie Chart',
+    iconCls: 'x-fa fa-pie-chart',
+
+    items: [{
+        xtype: 'polar',
+        colors: [
+            '#aed581',
+            '#6aa5db',
+            '#ee929c'
+        ],
+        platformConfig: {
+            phone: {
+                // On a phone the whole view becomes a vertical strip of charts,
+                // which makes it impossible to scroll the view if touch action
+                // started on a chart. So we use a custom touchAction config.
+                touchAction: {
+                    panX: true,
+                    panY: true
+                }
+            },
+            '!phone': {
+                interactions: 'rotate'
+            }
+        },
+        bind: '{pieData}',
+        series: [{
+            type: 'pie3d',
+            angleField: 'yvalue',
+            donut: 30
+        }]
+    }]
+});

+ 55 - 0
frontend/saas-web/app/view/core/chart/Polar.js

@@ -0,0 +1,55 @@
+Ext.define('saas.view.core.chart.Polar', {
+    extend: 'saas.view.core.chart.ChartBase',
+    xtype: 'core-chart-polar',
+
+    requires: [
+        'Ext.chart.PolarChart',
+        'Ext.chart.axis.Category',
+        'Ext.chart.axis.Numeric',
+        'Ext.chart.interactions.Rotate',
+        'Ext.chart.series.Radar'
+    ],
+
+    title: 'Radial Chart',
+    iconCls: 'x-fa fa-dot-circle-o',
+
+    items: [{
+        xtype: 'polar',
+        colors: ['#6aa5db'],
+        bind: '{radialData}',
+        axes: [{
+            type: 'numeric',
+            fields: [
+                'yvalue'
+            ],
+            grid: true,
+            position: 'radial'
+        },{
+            type: 'category',
+            fields: [
+                'xvalue'
+            ],
+            grid: true,
+            position: 'angular'
+        }],
+        series: [{
+            type: 'radar',
+            xField: 'xvalue',
+            yField: 'yvalue'
+        }],
+        platformConfig: {
+            phone: {
+                // On a phone the whole view becomes a vertical strip of charts,
+                // which makes it impossible to scroll the view if touch action
+                // started on a chart. So we use a custom touchAction config.
+                touchAction: {
+                    panX: true,
+                    panY: true
+                }
+            },
+            '!phone': {
+                interactions: 'rotate'
+            }
+        }
+    }]
+});

+ 71 - 0
frontend/saas-web/app/view/core/chart/Stacked.js

@@ -0,0 +1,71 @@
+Ext.define('saas.view.core.chart.Stacked', {
+    extend: 'saas.view.core.chart.ChartBase',
+    xtype: 'core-chart-stacked',
+
+    requires: [
+        'Ext.chart.CartesianChart',
+        'Ext.chart.axis.Category',
+        'Ext.chart.axis.Numeric',
+        'Ext.chart.series.Bar',
+        'Ext.chart.interactions.PanZoom'
+    ],
+
+    title: 'Stacked Bar Chart',
+    iconCls: 'x-fa fa-bar-chart',
+
+    items: [{
+        xtype: 'cartesian',
+        colors: [
+            '#6aa5db',
+            '#ee929c'
+        ],
+        bind: '{stackedData}',
+        axes: [{
+            type: 'category',
+            fields: [
+                'xvalue'
+            ],
+            hidden: true,
+            position: 'bottom'
+        },{
+            type: 'numeric',
+            fields: [
+                'y1value',
+                'y2value',
+                'y3value'
+            ],
+            grid: {
+                odd: {
+                    fill: '#e8e8e8'
+                }
+            },
+            hidden: true,
+            position: 'left'
+        }],
+        series: [{
+            type: 'bar',
+            xField: 'xvalue',
+            yField: [
+                'y2value',
+                'y3value'
+            ]
+        }],
+        platformConfig: {
+            phone: {
+                // On a phone the whole view becomes a vertical strip of charts,
+                // which makes it impossible to scroll the view if touch action
+                // started on a chart. So we use a custom touchAction config.
+                touchAction: {
+                    panX: true,
+                    panY: true
+                }
+            },
+            '!phone': {
+                interactions: {
+                    type: 'panzoom',
+                    zoomOnPanGesture: true
+                }
+            }
+        }
+    }]
+});

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

@@ -122,6 +122,7 @@ Ext.define('saas.view.core.dbfind.DbfindTrigger', {
     	}
     },
     onTriggerClick:function(f){
+        this.fireEvent('beforetriggerclick', this);
         f.blur(f);
         //判断dbfindtrigger归属
         f.judge(f);//form

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

@@ -129,6 +129,7 @@ Ext.define('saas.view.core.dbfind.MultiDbfindTrigger', {
     	}
     },
     onTriggerClick:function(f){
+        this.fireEvent('beforetriggerclick', this);
         f.blur(f);
         //判断dbfindtrigger归属
         f.judge(f);

+ 1 - 0
frontend/saas-web/app/view/core/form/ConDateField.js

@@ -57,6 +57,7 @@ Ext.define('saas.view.core.form.ConDateField', {
             allowBlank: allowBlank,
             flex: 1,
             fieldStyle: me.fieldStyle,
+            //matchFieldWidth:true,
             listeners: {
                 change: function(f){
                     var from =me.from.value,to = me.to.value;

+ 28 - 1
frontend/saas-web/app/view/core/form/FormPanel.js

@@ -47,7 +47,34 @@ Ext.define('saas.view.core.form.FormPanel', {
         auditBtnText: '审核',
         unAuditBtnText: '反审核',
     },
-
+    buttons:[{
+        text:'操作日志',
+        handler:function(btn){
+            var form = btn.up('form'),
+            mlKeyvalue = form.viewModel.get(form._idField)||0,
+            win = Ext.getCmp(form.xtype+mlKeyvalue);
+            if (!win) {
+                win = Ext.create('Ext.window.Window', {
+                    modal: true,
+                    id:form.xtype+mlKeyvalue,
+                    height: '80%',
+                    width: '80%',
+                    title: '操作日志('+form.viewModel.get(form._codeField)+')',
+                    scrollable: true,
+                    //bodyPadding: 10,
+                    constrain: true,
+                    closable: true,
+                    layout: 'fit',
+                    renderTo: Ext.getCmp('main-tab-panel').getActiveTab().down('form').getEl(),
+                    items: [{
+                        xtype: 'core-form-mseeageLog',
+                        mlKeyvalue:mlKeyvalue
+                    }]
+                });
+            };
+            win.show();
+        }
+    }],
     initComponent: function () {
         var me = this,
         auditTexts = me.auditTexts;

+ 233 - 0
frontend/saas-web/app/view/core/form/MseeageLog.js

@@ -0,0 +1,233 @@
+Ext.define('saas.view.core.form.MseeageLog', {
+    extend: 'Ext.grid.Panel',
+    xtype: 'core-form-mseeageLog',
+
+    autoScroll: true,
+    frame:true,
+    layout:'fit',
+    dataUrl:'/api/commons/messagelog/list',
+
+    tbar: [{
+        width: 150,
+        name: 'ml_man',
+        xtype: 'textfield',
+        emptyText : '操作人员'
+    },{
+        cls:'x-formpanel-btn-orange',
+        xtype:'button',
+        text:'查询',
+        listeners: {
+            click:function(b){
+                var grid = b.ownerCt.ownerCt;
+                var tbar = b.ownerCt;
+                grid.condition = '';
+                var items = [];
+                var fields = tbar.items.items.map(f => f.name);
+                Ext.each(fields, function(f, index){
+                    var field = tbar.down('[name='+f+']');
+                    if(field){
+                        items.push(field);
+                    }
+                });
+                grid.condition = grid.getCondition(items);
+                grid.store.loadPage(1);
+            }
+        }
+    },'->'],
+
+    //字段属性
+    columns : [{
+        text : "id", 
+        width : 0, 
+        dataIndex : "id", 
+        xtype : "numbercolumn",   
+    },{
+        text:'单据类型',
+        dataIndex : "ml_name",
+        width : 0, 
+    },{
+        text : "单据编号", 
+        width : 0, 
+        dataIndex : "ml_code"
+    },{
+        xtype:'datecolumn',
+        format:'Y-m-d H:i:s',
+        text : "操作时间", 
+        dataIndex : "createTime", 
+        width : 200.0, 
+    }, {
+        text : "操作人员", 
+        dataIndex : "ml_man", 
+        width : 200
+    },
+    {
+        text : "操作", 
+        dataIndex : "ml_content", 
+        width : 220.0, 
+    }, 
+    {
+        text : "结果", 
+        dataIndex : "ml_result", 
+        width : 120.0, 
+        flex:1
+    }],
+
+    initComponent: function() {
+        var me = this;
+        me.condition = [{
+            type: 'number',
+            field: 'ml_keyvalue',
+            operation: '=',
+            value: me.mlKeyvalue
+        }];
+        if(me.columns){
+            var fields = me.columns.map(column => column.dataIndex);
+            me.store = Ext.create('Ext.data.Store',{
+                fields:fields,
+                autoLoad: true,
+                pageSize: 11,
+                data: [],
+                proxy: {
+                    timeout:8000,
+                    type: 'ajax',
+                    url: me.dataUrl,
+                    actionMethods: {
+                        read: 'GET'
+                    },
+                    reader: {
+                        type: 'json',
+                        rootProperty: 'data.list',
+                        totalProperty: 'data.total',
+                    }
+                },
+                listeners: {
+                    beforeload: function (store, op) {
+                        var condition = me.condition;
+                        if (Ext.isEmpty(condition)) {
+                            condition = "";
+                        }
+                        
+                        Ext.apply(store.proxy.extraParams, {
+                            number: op._page,
+                            size: store.pageSize,
+                            condition: JSON.stringify(condition)
+                        });
+                    }
+                }
+            });
+
+            Ext.apply(me, {
+                dockedItems:[{
+                    xtype: 'pagingtoolbar',
+                    dock: 'bottom',
+                    displayInfo: true,
+                    store: me.store
+                }]
+            });
+        }
+        me.callParent(arguments);
+    },
+
+     /**
+     * 获得过滤条件
+     */
+    getCondition: function(items) {
+        var me = this,
+        conditions = [];
+        for(var i = 0; i < items.length; i++) {
+            var item = items[i];
+            var field = item.name,
+            func = item.getCondition,
+            value = item.value,
+            condition;
+
+            if(typeof func == 'function') {
+                condition = {
+                    type: 'condition',
+                    value: func(value)
+                }
+            }else {
+                var xtype = item.xtype || 'textfield',
+                type = item.fieldType || me.getDefaultFieldType(xtype),
+                operation = item.operation || me.getDefaultFieldOperation(xtype),
+                conditionValue = me.getConditionValue(xtype, value);
+    
+                if(!conditionValue) {
+                    continue;
+                }
+                condition = {
+                    type: type,
+                    field: field,
+                    operation: operation,
+                    value: conditionValue
+                }
+            }
+            conditions.push(condition);
+        };
+        return conditions;
+    },
+
+    getDefaultFieldType: function(xtype) {
+        var type;
+
+        if(Ext.Array.contains(['numberfield'], xtype)) {
+            type = 'number';
+        }else if(Ext.Array.contains(['datefield', 'condatefield'], xtype)) {
+            type = 'date';
+        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo', 'radiofield', 'radio'], xtype)) {
+            type = 'enum';
+        }else {
+            type = 'string';
+        }
+
+        return type;
+    },
+
+    getDefaultFieldOperation: function(xtype) {
+        var operation;
+
+        if(Ext.Array.contains(['numberfield'], xtype)) {
+            operation = '=';
+        }else if(Ext.Array.contains(['datefield'], xtype)) {
+            operation = '=';
+        }else if(Ext.Array.contains(['condatefield'], xtype)) {
+            operation = 'between';
+        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo'], xtype)) {
+            operation = 'in';
+        }else {
+            operation = 'like';
+        }
+
+        return operation;
+    },
+
+    /**
+     * 处理部分字段值
+     */
+    getConditionValue: function(xtype, value) {
+        var conditionValue;
+        if(xtype == 'datefield') {
+            conditionValue = Ext.Date.format(new Date(from), 'Y-m-d H:i:s');
+        }else if(xtype == 'condatefield') {
+            var from = value.from,
+            to = value.to;
+
+            conditionValue = Ext.Date.format(new Date(from), 'Y-m-d 00:00:00') + ',' + Ext.Date.format(new Date(to), 'Y-m-d 23:59:59');
+        }else if(xtype == 'combobox' || xtype == 'combo') {
+            conditionValue = '\'' + value + '\'';
+        }else if(xtype == 'multicombo') {
+            conditionValue = value.map(function(v) {
+                return '\'' + v.value + '\'';
+            }).join(',');
+        }else {
+            conditionValue = value;
+        }
+
+        return conditionValue;
+    },
+
+    refresh:function(){
+        //debugger
+    }
+
+});

+ 4 - 4
frontend/saas-web/app/view/core/form/field/DetailGridField.js

@@ -193,7 +193,7 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
     },
 
     addDetail: function(v, d) {
-        var me = this;
+        d = d || {};
         var me = this;
         if(!me.editable) {
             return;
@@ -211,9 +211,9 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
             detno = selectedRecord.data[detnoColumn];
             var store = me.store;
             store.each(function(item){
-                d = item.data[detnoColumn];
-                if(Number(d) > detno) {
-                    item.set(detnoColumn, Number(d) + 1);
+                var t = item.data[detnoColumn];
+                if(Number(t) > detno) {
+                    item.set(detnoColumn, Number(t) + 1);
                 }
             });
         }

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

@@ -17,7 +17,7 @@ Ext.define('saas.view.core.query.QueryPanel', {
         xtype: 'core-query-queryformpanel',
         width: '100%',
     }, {
-        margin: '32 0 0 0',
+        margin: '24 0 0 0',
         padding: '24',
         reference: 'querygrid',
         xtype: 'core-query-querygridpanel',

+ 14 - 4
frontend/saas-web/app/view/core/report/ReportPanel.js

@@ -13,7 +13,7 @@ Ext.define('saas.view.core.report.ReportPanel', {
 
     layout: 'vbox',
     autoScroll: true,
-    border: 1,
+    bodyBorder:false,
     bodyPadding: 5,
 
     groupField: null, // 分组字段
@@ -49,7 +49,7 @@ Ext.define('saas.view.core.report.ReportPanel', {
                         style: {
                             float: 'right'
                         },
-                        text: '导出为...',
+                        text: '导出',
                         menu: {
                             defaults: {
                                 handler: 'exportTo'
@@ -112,7 +112,7 @@ Ext.define('saas.view.core.report.ReportPanel', {
                 width: '100%',
                 cls: 'x-report-grid',
                 flex: 1,
-                border: 1,
+                border: 0,
                 sortableColumns: false,
                 enableColumnHide: false,
                 rowLines: false,
@@ -239,7 +239,7 @@ Ext.define('saas.view.core.report.ReportPanel', {
         columns = me.reportColumns;
 
         Ext.Array.each(columns, function(c) {
-            Ext.applyIf(c, {
+            c.columns || Ext.applyIf(c, {
                 width: 120
             });
 
@@ -247,6 +247,16 @@ Ext.define('saas.view.core.report.ReportPanel', {
                 Ext.applyIf(c, {
                     format: 'Y-m-d'
                 })
+            }else if(c.xtype == 'numbercolumn') {
+                Ext.applyIf(c, {
+                    align: 'end',
+                    renderer : function(v) {
+                        var arr = (v + '.').split('.');
+                        var xr = (new Array(arr[1].length)).fill('0');
+                        var format = '0.' + xr.join();
+                        return Ext.util.Format.number(v, format);
+                    }
+                });
             }
         })
 

+ 6 - 0
frontend/saas-web/app/view/core/report/ReportPanel.scss

@@ -34,6 +34,12 @@
                 border-color: #999 !important;
                 border-width: 1px !important;
             }
+            .x-panel-default-outer-border-rl {
+                border-right-color: #999 !important;
+                border-right-width: 1px !important;
+                border-left-color:  #999 !important;
+                border-left-width: 1px !important;
+            }
         }
     }
 }

+ 9 - 9
frontend/saas-web/app/view/document/bom/BasePanel.js

@@ -8,17 +8,17 @@ Ext.define('saas.view.document.bom.BasePanel', {
     searchField:[{ 
         xtype : "textfield", 
         name : "bo_mothercode", 
-        emptyText : "母件编号", 
+        emptyText : "产品编号", 
         width:120
     },{
         xtype : "textfield", 
         name : "bo_mothername", 
-        emptyText : "母件名称", 
+        emptyText : "产品名称", 
         width:120
     },{
         xtype : "textfield", 
         name : "bo_status", 
-        emptyText : "BOM状态",    
+        emptyText : "产品状态",    
         width:100
     }],
 
@@ -42,32 +42,32 @@ Ext.define('saas.view.document.bom.BasePanel', {
             dataIndex : "id", 
             xtype : "numbercolumn",   
         },{
-            text : "母件id", 
+            text : "产品id", 
             width : 0, 
             dataIndex : "bo_motherid", 
             xtype : "numbercolumn",   
         },{
-            text : "母件编号", 
+            text : "产品编号", 
             dataIndex : "bo_mothercode",
             width : 200.0,
         }, 
         {
-            text : "母件名称", 
+            text : "产品名称", 
             dataIndex : "bo_mothername", 
             width : 120.0, 
         }, 
         {
-            text : "BOM状态", 
+            text : "产品状态", 
             dataIndex : "bo_status", 
             width : 120.0, 
         }, 
         {
-            text : "BOM状态码", 
+            text : "产品状态码", 
             dataIndex : "bo_statuscode", 
             width : 0, 
         },
         {   
-            text : "BOM版本", 
+            text : "产品版本", 
             dataIndex : "bo_version", 
             width : 120.0, 
         }]

Неке датотеке нису приказане због велике количине промена