Browse Source

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

chenw 7 years ago
parent
commit
52a6dfb22e
100 changed files with 4655 additions and 526 deletions
  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. 33 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Employee.java
  6. 93 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/EmployeeController.java
  7. 24 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/EmployeeMapper.java
  8. 29 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/EmployeeService.java
  9. 120 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/EmployeeServiceImpl.java
  10. 2 1
      applications/document/document-server/src/main/resources/mapper/BankinformationMapper.xml
  11. 15 15
      applications/document/document-server/src/main/resources/mapper/BomDetailMapper.xml
  12. 2 2
      applications/document/document-server/src/main/resources/mapper/CustomerMapper.xml
  13. 204 0
      applications/document/document-server/src/main/resources/mapper/EmployeeMapper.xml
  14. 10 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/PaybalanceMapper.java
  15. 9 2
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/RecbalanceMapper.java
  16. 189 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Bankinformation.java
  17. 271 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Customer.java
  18. 9 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalancedet.java
  19. 9 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalancedetail.java
  20. 9 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalancedet.java
  21. 10 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalancedetail.java
  22. 319 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Vendor.java
  23. 2 2
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/FundtransferServiceImpl.java
  24. 2 2
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthreceiptsServiceImpl.java
  25. 2 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthspendingsServiceImpl.java
  26. 81 15
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/PaybalanceServiceImpl.java
  27. 84 11
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/RecbalanceServiceImpl.java
  28. 1 1
      applications/money/money-server/src/main/resources/mapper/AcountbalanceViewMapper.xml
  29. 2 2
      applications/money/money-server/src/main/resources/mapper/FundtransferMapper.xml
  30. 6 6
      applications/money/money-server/src/main/resources/mapper/FundtransferdetailMapper.xml
  31. 2 2
      applications/money/money-server/src/main/resources/mapper/OthreceiptsMapper.xml
  32. 3 3
      applications/money/money-server/src/main/resources/mapper/OthreceiptsdetailMapper.xml
  33. 2 2
      applications/money/money-server/src/main/resources/mapper/OthspendingsMapper.xml
  34. 3 3
      applications/money/money-server/src/main/resources/mapper/OthspendingsdetailMapper.xml
  35. 255 1
      applications/money/money-server/src/main/resources/mapper/PaybalanceMapper.xml
  36. 6 5
      applications/money/money-server/src/main/resources/mapper/PaybalancedetMapper.xml
  37. 6 5
      applications/money/money-server/src/main/resources/mapper/PaybalancedetailMapper.xml
  38. 255 2
      applications/money/money-server/src/main/resources/mapper/RecbalanceMapper.xml
  39. 6 5
      applications/money/money-server/src/main/resources/mapper/RecbalancedetMapper.xml
  40. 6 5
      applications/money/money-server/src/main/resources/mapper/RecbalancedetailMapper.xml
  41. 1 1
      applications/money/money-server/src/main/resources/mapper/SubledgerMapper.xml
  42. 2 4
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/ProdInOutController.java
  43. 29 1
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/PurchaseList.java
  44. 17 5
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java
  45. 30 32
      applications/purchase/purchase-server/src/main/resources/mapper/PurchaseListMapper.xml
  46. 29 1
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/po/SaleList.java
  47. 29 31
      applications/sale/sale-server/src/main/resources/mapper/SaleListMapper.xml
  48. 4 188
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/Make.java
  49. 19 0
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/report/ProdinoutCountView.java
  50. 2 0
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/MakeMapper.java
  51. 20 2
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/MakeServiceImpl.java
  52. 15 5
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/ProdInOutServiceImpl.java
  53. 45 6
      applications/storage/storage-server/src/main/resources/mapper/MakeMapper.xml
  54. 23 3
      applications/storage/storage-server/src/main/resources/mapper/ProdInOutReportMapper.xml
  55. 67 0
      frontend/saas-web/app/Application.scss
  56. 12 0
      frontend/saas-web/app/model/chart/DataXY.js
  57. 21 0
      frontend/saas-web/app/model/chart/MultiDataXY.js
  58. 4 0
      frontend/saas-web/app/util/FormUtil.js
  59. 1 2
      frontend/saas-web/app/view/auth/LoginController.js
  60. 89 0
      frontend/saas-web/app/view/core/chart/Area.js
  61. 67 0
      frontend/saas-web/app/view/core/chart/Bar.js
  62. 22 0
      frontend/saas-web/app/view/core/chart/ChartBase.js
  63. 38 0
      frontend/saas-web/app/view/core/chart/Gauge.js
  64. 75 0
      frontend/saas-web/app/view/core/chart/Line.js
  65. 55 0
      frontend/saas-web/app/view/core/chart/Pie.js
  66. 42 0
      frontend/saas-web/app/view/core/chart/Pie3D.js
  67. 55 0
      frontend/saas-web/app/view/core/chart/Polar.js
  68. 71 0
      frontend/saas-web/app/view/core/chart/Stacked.js
  69. 1 0
      frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js
  70. 1 0
      frontend/saas-web/app/view/core/dbfind/MultiDbfindTrigger.js
  71. 1 0
      frontend/saas-web/app/view/core/form/ConDateField.js
  72. 28 1
      frontend/saas-web/app/view/core/form/FormPanel.js
  73. 233 0
      frontend/saas-web/app/view/core/form/MseeageLog.js
  74. 1 0
      frontend/saas-web/app/view/core/query/QueryGridPanel.js
  75. 1 1
      frontend/saas-web/app/view/core/query/QueryPanel.js
  76. 14 4
      frontend/saas-web/app/view/core/report/ReportPanel.js
  77. 6 0
      frontend/saas-web/app/view/core/report/ReportPanel.scss
  78. 9 9
      frontend/saas-web/app/view/document/bom/BasePanel.js
  79. 11 5
      frontend/saas-web/app/view/document/bom/FormController.js
  80. 14 14
      frontend/saas-web/app/view/document/bom/FormPanel.js
  81. 2 3
      frontend/saas-web/app/view/document/customer/FormPanel.js
  82. 76 0
      frontend/saas-web/app/view/document/employee/BasePanel.js
  83. 10 0
      frontend/saas-web/app/view/document/employee/BasePanelController.js
  84. 4 0
      frontend/saas-web/app/view/document/employee/BasePanelModel.js
  85. 196 0
      frontend/saas-web/app/view/document/employee/FormController.js
  86. 17 0
      frontend/saas-web/app/view/document/employee/FormModel.js
  87. 73 0
      frontend/saas-web/app/view/document/employee/FormPanel.js
  88. 5 2
      frontend/saas-web/app/view/document/kind/ChildForm.js
  89. 3 3
      frontend/saas-web/app/view/document/vendor/BasePanel.js
  90. 3 4
      frontend/saas-web/app/view/document/vendor/FormPanel.js
  91. 403 0
      frontend/saas-web/app/view/home/ChartsModel.js
  92. 123 74
      frontend/saas-web/app/view/home/Home.js
  93. 30 0
      frontend/saas-web/app/view/home/Home.scss
  94. 8 0
      frontend/saas-web/app/view/home/HomeController.js
  95. 128 0
      frontend/saas-web/app/view/home/InfoCard.js
  96. 88 0
      frontend/saas-web/app/view/home/InfoCard.scss
  97. 99 29
      frontend/saas-web/app/view/main/Main.js
  98. 47 0
      frontend/saas-web/app/view/main/Main.scss
  99. 1 0
      frontend/saas-web/app/view/main/Navigation.js
  100. 4 2
      frontend/saas-web/app/view/money/fundtransfer/FormPanel.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;
+    }
+
+}

+ 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;
+
+}

+ 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);
+
+}

+ 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();
+    }
+
+}
+
+

+ 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

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

@@ -284,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>

+ 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>

+ 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);
 }

+ 20 - 2
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
@@ -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>
 
 

+ 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
+    }
+
+});

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

@@ -288,6 +288,7 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
     },
     onExport: function (me) {
         var grid = me.ownerCt.ownerCmp.ownerCt.ownerCt;
+
         grid.store.exportPageSize = 5000;
         grid.store.exportNumber = 1;
         grid.store.load(function(records, operation, success) {

+ 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, 
         }]

+ 11 - 5
frontend/saas-web/app/view/document/bom/FormController.js

@@ -75,7 +75,8 @@ Ext.define('saas.view.document.bom.FormController', {
                             "text": "总库存数",
                             "dataIndex": "po_onhand",
                             "width": 100,
-                            align:'right'
+                            xtype: 'numbercolumn',
+                            align:'end'
                         },{
                             "text": "类型",
                             "dataIndex": "pr_kind",
@@ -96,7 +97,7 @@ Ext.define('saas.view.document.bom.FormController', {
                             "text": "最小包装",
                             "dataIndex": "pr_zxbzs",
                             "width": 100,
-                            align:'right'
+                            align:'end'
                         },{
                             "text": "L/T",
                             "dataIndex": "pr_leadtime",
@@ -169,7 +170,8 @@ Ext.define('saas.view.document.bom.FormController', {
                             "text": "最新采购单价",
                             "dataIndex": "pr_purcprice",
                             "width": 0,
-                            align:'right'
+                            xtype: 'numbercolumn',
+                            align:'end'
                         },{
                             "text": "仓库id",
                             "dataIndex": "pr_whid",
@@ -186,7 +188,8 @@ Ext.define('saas.view.document.bom.FormController', {
                             "text": "总库存数",
                             "dataIndex": "po_onhand",
                             "width": 100,
-                            align:'right'
+                            xtype: 'numbercolumn',
+                            align:'end'
                         },{
                             "text": "类型",
                             "dataIndex": "pr_kind",
@@ -207,7 +210,7 @@ Ext.define('saas.view.document.bom.FormController', {
                             "text": "最小包装",
                             "dataIndex": "pr_zxbzs",
                             "width": 100,
-                            align:'right'
+                            align:'end'
                         },{
                             "text": "L/T",
                             "dataIndex": "pr_leadtime",
@@ -277,6 +280,7 @@ Ext.define('saas.view.document.bom.FormController', {
                             "text": "最新采购单价",
                             "dataIndex": "pr_purcprice",
                             "width": 0,
+                            xtype: 'numbercolumn',
                         },{
                             "text": "仓库id",
                             "dataIndex": "pr_whid",
@@ -292,6 +296,7 @@ Ext.define('saas.view.document.bom.FormController', {
                         },{
                             "text": "总库存数",
                             "dataIndex": "po_onhand",
+                            xtype: 'numbercolumn',
                             "width": 100,
                         },{
                             "text": "类型",
@@ -313,6 +318,7 @@ Ext.define('saas.view.document.bom.FormController', {
                             "text": "最小包装",
                             "dataIndex": "pr_zxbzs",
                             "width": 100,
+                            xtype: 'numbercolumn',
                         },{
                             "text": "L/T",
                             "dataIndex": "pr_leadtime",

+ 14 - 14
frontend/saas-web/app/view/document/bom/FormPanel.js

@@ -10,7 +10,7 @@ Ext.define('saas.view.document.bom.FormPanel', {
     //字段属性
     _title:'BOM资料',
     _idField: 'id',
-    _codeField: 'bo_mothercode',
+    _codeField: 'codefied',
     _statusField: 'bo_status',
     _statusCodeField: 'bo_statuscode',
     _readUrl:'/api/document/bom/read/',
@@ -63,6 +63,7 @@ Ext.define('saas.view.document.bom.FormPanel', {
         xtype: 'textfield',
         name: 'bo_mothername',
         fieldLabel: '产品名称',
+        reddOnly:true,
         allowBlank: false
     },{
         xtype: 'textfield',
@@ -70,10 +71,6 @@ Ext.define('saas.view.document.bom.FormPanel', {
         fieldLabel: '产品规格',
         reddOnly:true,
         ignore:true
-    },{
-        xtype: 'textfield',
-        name: 'bo_status',
-        fieldLabel: '产品状态'
     },{
         xtype: 'hidden',
         name: 'bo_statuscode',
@@ -105,6 +102,7 @@ Ext.define('saas.view.document.bom.FormPanel', {
                 allowBlank:false,
                 text : "物料编号", 
                 dataIndex : "bd_soncode", 
+                width : 160, 
                 editor : {
                     displayField : "display", 
                     editable : true, 
@@ -148,11 +146,7 @@ Ext.define('saas.view.document.bom.FormPanel', {
                     return v;
                 }
             }, {
-                allowBlank:false,
                 text : "单位", 
-                editor : {
-                    xtype : "textfield"
-                },
                 dataIndex : "bd_unit", 
             },
             {
@@ -196,13 +190,19 @@ Ext.define('saas.view.document.bom.FormPanel', {
                 },
             }]
     },{
-        xtype : "datefield", 
-        name : "createTime", 
-        fieldLabel : "创建时间"
+        xtype: 'textfield',
+        name: 'bo_status',
+        fieldLabel: '产品状态',
+        reddOnly:true
     },{  
+        xtype : "textfield", 
+        name : "bo_recorder", 
+        reddOnly:true,
+        fieldLabel : "录入人"
+    },{
         xtype : "datefield", 
-        name : "updateTime", 
-        fieldLabel : "更新时间"
+        name : "bo_recorddate", 
+        fieldLabel : "录入时间"
     }],
 
     auditTexts: {

+ 2 - 3
frontend/saas-web/app/view/document/customer/FormPanel.js

@@ -46,7 +46,6 @@ Ext.define('saas.view.document.customer.FormPanel', {
         storeUrl:'/api/document/customerkind/getCombo',
         name : "cu_type", 
         fieldLabel : "客户类型", 
-        allowBlank : false, 
         columnWidth : 0.25,
         hiddenBtn:false,//true 则会关闭新增按钮功能
         addHandler:function(b){
@@ -92,7 +91,7 @@ Ext.define('saas.view.document.customer.FormPanel', {
         fieldLabel : "期初应收", 
         allowBlank : true, 
         columnWidth : 0.25,
-        decimalPrecision: 8,
+        decimalPrecision: 2,
         minValue:0,
         renderer : function(v) {
             var arr = (v + '.').split('.');
@@ -107,7 +106,7 @@ Ext.define('saas.view.document.customer.FormPanel', {
         fieldLabel : "期初预收", 
         allowBlank : true, 
         columnWidth : 0.25,
-        decimalPrecision: 8,
+        decimalPrecision: 2,
         minValue:0,
         renderer : function(v) {
             var arr = (v + '.').split('.');

+ 76 - 0
frontend/saas-web/app/view/document/employee/BasePanel.js

@@ -0,0 +1,76 @@
+Ext.define('saas.view.document.employee.BasePanel', {
+    extend: 'saas.view.core.base.BasePanel',
+    xtype: 'document-employee-basepanel',
+
+    controller: 'document-employee-basepanel',
+    viewModel: 'document-employee-basepanel',
+
+    searchField:[{ 
+        xtype : "textfield", 
+        name : "em_code", 
+        emptyText : "账号", 
+        width:120
+    },{
+        xtype : "textfield", 
+        name : "em_name", 
+        emptyText : "姓名", 
+        width:120
+    },{
+        xtype : "textfield", 
+        name : "em_class", 
+        emptyText : "类型",    
+        width:100
+    }],
+
+    //字段属性
+    _formXtype:'document-employee-formpanel',
+    _title:'人员资料',
+    _deleteUrl:'/api/document/employee/delete/',
+
+    gridConfig: {
+        idField: 'id',
+        codeField: 'pr_code',
+        statusCodeField:'pr_statuscode',
+        dataUrl: '/api/document/employee/list',
+        columns : [{
+            text : "id", 
+            width : 0, 
+            dataIndex : "id", 
+            xtype : "numbercolumn", 
+        },{
+            text : "账号", 
+            width : 200.0, 
+            dataIndex : "em_code", 
+            xtype : "", 
+        }, 
+        {
+            text : "姓名", 
+            dataIndex : "em_name", 
+            width : 120.0, 
+            xtype : "", 
+        },
+        {
+            text : "密码", 
+            dataIndex : "em_password", 
+            width : 120.0, 
+            xtype : ""
+        }, 
+        {
+            text : "类型", 
+            dataIndex : "em_class", 
+            width : 0, 
+            xtype : ""
+        }, 
+        {
+            text : "电话", 
+            dataIndex : "em_mobile", 
+            width : 120.0, 
+            xtype : "",
+        }]
+    },
+
+    refresh:function(){
+        this.items.items[0].store.load()
+    }
+
+});

+ 10 - 0
frontend/saas-web/app/view/document/employee/BasePanelController.js

@@ -0,0 +1,10 @@
+Ext.define('saas.view.document.employee.BasePanelController', {
+    extend: 'saas.view.core.base.BasePanelController',
+    alias: 'controller.document-employee-basepanel',
+
+    init: function (form) {
+        var me = this;
+        this.control({
+        });
+    }
+});

+ 4 - 0
frontend/saas-web/app/view/document/employee/BasePanelModel.js

@@ -0,0 +1,4 @@
+Ext.define('saas.view.document.employee.BasePanelModel', {
+    extend: 'saas.view.core.base.BasePanelModel',
+    alias: 'viewmodel.document-employee-basepanel'
+});

+ 196 - 0
frontend/saas-web/app/view/document/employee/FormController.js

@@ -0,0 +1,196 @@
+Ext.define('saas.view.document.employee.FormController', {
+    extend: 'saas.view.core.form.FormPanelController',
+    alias: 'controller.document-employee-formpanel',
+    init: function (form) {
+        var me = this;
+        this.control({
+            //主表单选放大镜模板
+            'dbfindtrigger[name=pr_vendcode]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        //数据接口
+                        dataUrl:'/api/document/vendor/getVendorsByCondition',
+                        //赋值 
+                        dbfinds:[{
+                            from:'id',to:'pr_vendid',ignore:true
+                        },{
+                            from:'ve_code',to:'pr_vendcode'
+                        },{
+                            from:'ve_name',to:'pr_vendname'
+                        }],
+                        //新增地址
+                        addXtype:'document-vendor-formpanel',
+                        //新增标题
+                        addTitle:'供应商资料', 
+                        //联想设置
+                        dbtpls:[{
+                            field:'ve_code',width:100
+                        },{
+                            field:'ve_name',width:100
+                        }],
+                        defaultCondition: 've_statuscode="OPEN"',
+                        //放大镜窗口字段
+                        dbSearchFields:[{
+                            xtype : "textfield",
+                            name: 'name',
+                            getCondition: function(v) {
+                                return "((ve_code) like '%"+v.toUpperCase()+"%' or (ve_name) like '%"+v.toUpperCase()+"%')";
+                            },
+                            emptyText : "请输入供应商编号或名称", 
+                            columnWidth : 0.25
+                        }],
+                        //放大镜窗口列表
+                        dbColumns:[{
+                            "text": "供应商ID",
+                            "flex": 0,
+                            "dataIndex": "id",
+                            "width": 0,
+                            "xtype": "",
+                        },{
+                            "text": "供应商编号",
+                            "flex": 1,
+                            "dataIndex": "ve_code",
+                            "width": 100,
+                            "xtype": "",
+                        }, {
+                            "text": "供应商名称",
+                            "flex": 1,
+                            "dataIndex": "ve_name",
+                            "xtype": "",
+                        }, {
+                            "text": "供应商类型",
+                            "flex": 0,
+                            "dataIndex": "ve_type",
+                            "width": 200,
+                            "xtype": "",
+                        }]
+                    }) ;   
+
+                }
+            },
+            // 仓库编号
+            'dbfindtrigger[name=pr_whcode]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        //数据接口
+                        dataUrl:'/api/document/warehouse/list',
+                        //放大镜赋值设置
+                        dbfinds:[{
+                            from:'id',to:'pr_whid',ignore:true
+                        },{
+                            from:'wh_code',to:'pr_whcode'
+                        },{
+                            from:'wh_description',to:'pr_whname'
+                        }],
+                        //新增地址
+                        addXtype:'other-warehouse',
+                        //新增标题
+                        addTitle:'仓库资料', 
+                        //联想查询条件
+                        defaultCondition:"wh_statuscode='OPEN'",
+                        //联想设置
+                        dbtpls:[{
+                            field:'wh_code',width:180
+                        },{
+                            field:'wh_description',width:100
+                        }],
+                        //窗口字段设置
+                        dbSearchFields:[{
+                            emptyText:'输入仓库编号或仓库名称或仓库类型',
+                            xtype : "textfield", 
+                            name : "name", 
+                            allowBlank : true, 
+                            width:260,
+                            getCondition:function(v){
+                                return "((wh_code) like '%"+v.toUpperCase()+"%' or (wh_description) like '%"+v.toUpperCase()+"%'"+
+                                " or (wh_type) like '%"+v.toUpperCase()+"%')";
+                            }
+                        }],
+                        //窗口列设置
+                        dbColumns:[{
+                            "text": "ID",
+                            "flex": 0,
+                            "dataIndex": "id",
+                            "width": 0,
+                            "xtype": "",
+                        },{
+                            "text": "仓库编号",
+                            "flex": 1,
+                            "dataIndex": "wh_code",
+                            "width": 100,
+                            "xtype": "",
+                        },{
+                            "text": "仓库名称",
+                            "flex": 1,
+                            "dataIndex": "wh_description",
+                            "xtype": "",
+                        },{
+                            "text": "仓库类型",
+                            "flex": 1,
+                            "dataIndex": "wh_type",
+                            "xtype": "",
+                        }]
+                    }) ;   
+
+                }
+            }
+        });
+
+    },
+
+    auditBtnClick: function() {
+        var me = this,
+        form = me.getView(),
+        statusCodeField = form._statusCodeField,
+        viewModel = me.getViewModel(),
+        status = viewModel.data[statusCodeField];
+        status == 'OPEN' ? me.unAudit() : me.audit();
+    },
+
+    audit: function(){
+        var me = this,
+        form = this.getView(),
+        viewModel = me.getViewModel();
+        
+        me.BaseUtil.request({
+            url: form._openUrl+'/'+viewModel.data.id,
+            params: '',
+            method: 'POST',
+        })
+        .then(function(localJson) {
+            if(localJson.success){
+                form.initId = localJson.data.id;
+                form.FormUtil.loadData(form);
+                viewModel.set('base.editable', false);
+                showToast('启用成功');
+            }
+        })
+        .catch(function(res) {
+            console.error(res);
+            showToast('启用失败: ' + res.message);
+        });
+    },
+    unAudit: function() {
+        var me = this,
+        form = this.getView(),
+        viewModel = me.getViewModel();
+        
+        me.BaseUtil.request({
+            url: form._closeUrl+'/'+viewModel.data.id,
+            params: '',
+            method: 'POST',
+        })
+        .then(function(localJson) {
+            if(localJson.success){
+                form.initId = localJson.data.id;
+                form.FormUtil.loadData(form);
+                viewModel.set('base.editable', false);
+                showToast('禁用成功');
+            }
+        })
+        .catch(function(res) {
+            console.error(res);
+            showToast('禁用失败: ' + res.message);
+        });
+    }
+});

+ 17 - 0
frontend/saas-web/app/view/document/employee/FormModel.js

@@ -0,0 +1,17 @@
+Ext.define('saas.view.document.employee.FormModel', {
+    extend: 'saas.view.core.form.FormPanelModel',
+    alias: 'viewmodel.document-employee-formpanel',
+
+    data: {
+        id: 0
+    },
+
+    formulas:{
+        showAuditBtn:{
+            bind:'{id}',
+            get:function(value){
+                return value;
+            }
+        }
+    }
+});

+ 73 - 0
frontend/saas-web/app/view/document/employee/FormPanel.js

@@ -0,0 +1,73 @@
+Ext.define('saas.view.document.employee.FormPanel', {
+    extend: 'saas.view.core.form.FormPanel',
+    xtype: 'document-employee-formpanel',
+    controller: 'document-employee-formpanel',
+    viewModel: 'document-employee-formpanel',
+    caller:'Employee',
+    //字段属性
+    _title:'物料资料',
+    _idField: 'id',
+    _codeField: 'em_code',
+    _readUrl:'/api/document/employee/read/',
+    _saveUrl:'/api/document/employee/save',
+    _deleteUrl:'/api/document/employee/delete/',
+    _deleteMsg:'删除的人员资料将不能恢复,请确认是否删除?',
+    initId:0,
+    codeInHeader: false,
+    defaultItems: [{
+        xtype: 'hidden',
+        name: 'id',
+        fieldLabel: 'id',
+        allowBlank: true,
+        columnWidth: 0.25
+    },{
+        xtype: 'textfield',
+        name: 'em_code',
+        fieldLabel: '账号',
+        allowBlank: false,
+        columnWidth: 0.25
+    },{
+        xtype: 'textfield',
+        name: 'em_name',
+        fieldLabel: '姓名',
+        allowBlank: false,
+        columnWidth: 0.25
+    },{
+        xtype: 'textfield',
+        name: 'em_password',
+        fieldLabel: '密码',
+        allowBlank: false,
+        columnWidth: 0.25
+    },{
+        xtype: 'combobox',
+        name: 'em_class',
+        columnWidth: 0.25,
+        fieldLabel: '类型',
+        queryMode: 'local',
+        displayField: 'name',
+        valueField: 'value',
+        editable:false,
+        store: Ext.create('Ext.data.ArrayStore', {
+            fields: ['name', 'value'],
+            data: [
+                ["正式", "正式"],
+                ["离职", "离职"],
+            ]
+        })
+    },{
+        xtype: 'textfield',
+        name: 'em_mobile',
+        fieldLabel: '电话',
+        allowBlank: false,
+        columnWidth: 0.25
+    },{
+        xtype: 'textfield',
+        name: 'em_email',
+        fieldLabel: '邮箱',
+        // allowBlank: false,
+        columnWidth: 0.25
+    }],
+    auditTexts: {
+
+    }
+});

+ 5 - 2
frontend/saas-web/app/view/document/kind/ChildForm.js

@@ -115,15 +115,17 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
             },{
                 xtype:'numberfield',
                 name:'bk_thisamount',
-                allowBlank:false,
-                fieldLabel:'当前额',
+                allowBlank:true,
+                fieldLabel:'当前额',
                 hideTrigger: true,
                 mouseWheelEnabled: false,
+                beforeLabelTextTpl:'',
                 minValue: 0
             },{
                 xtype:'combo',
                 name:'bk_type',
                 allowBlank:false,
+                editable:false,
                 fieldLabel:'账户类别',
                 store: [
                     '现金',
@@ -144,6 +146,7 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 name:'bk_remark',
                 allowBlank:true,
                 fieldLabel:'备注',
+                beforeLabelTextTpl:''
             }]
         },
         productbrand:{

+ 3 - 3
frontend/saas-web/app/view/document/vendor/BasePanel.js

@@ -71,13 +71,13 @@ Ext.define('saas.view.document.vendor.BasePanel', {
             dataIndex : "ve_taxrate", 
             width : 120.0, 
             xtype : "",
-            align:'right'
+            align:'end'
         }, {
             text : "承付天数", 
+            xtype: 'numbercolumn',
             dataIndex : "ve_promisedays", 
             width : 120.0, 
-            xtype : "",
-            align:'right'
+            align:'end'
         }, {
             text : "纳税人识别号", 
             dataIndex : "ve_nsrzh", 

+ 3 - 4
frontend/saas-web/app/view/document/vendor/FormPanel.js

@@ -58,7 +58,6 @@ Ext.define('saas.view.document.vendor.FormPanel', {
         storeUrl:'/api/document/vendorkind/getCombo',
         name : "ve_type", 
         fieldLabel : "供应商类型", 
-        allowBlank : false, 
         columnWidth : 0.25,
         addHandler:function(b){
             var document = Ext.create('saas.view.document.kind.Kind',{});
@@ -95,10 +94,10 @@ Ext.define('saas.view.document.vendor.FormPanel', {
         xtype : "numberfield", 
         hideTrigger:true,
         name : "ve_beginapamount", 
-        fieldLabel : "期初应付", 
+        fieldLabel : "期初应付",
         allowBlank : true, 
         columnWidth : 0.25,
-        decimalPrecision: 8,
+        decimalPrecision: 2,
         minValue:0,
         renderer : function(v) {
             var arr = (v + '.').split('.');
@@ -113,7 +112,7 @@ Ext.define('saas.view.document.vendor.FormPanel', {
         fieldLabel : "期初预付", 
         allowBlank : true, 
         columnWidth : 0.25,
-        decimalPrecision: 8,
+        decimalPrecision: 2,
         minValue:0,
         renderer : function(v) {
             var arr = (v + '.').split('.');

+ 403 - 0
frontend/saas-web/app/view/home/ChartsModel.js

@@ -0,0 +1,403 @@
+Ext.define('saas.view.home.ChartsModel', {
+    extend: 'Ext.app.ViewModel',
+    alias: 'viewmodel.chartsmodel',
+
+    stores: {
+        barData: {
+            model: 'saas.model.chart.DataXY',
+            data: [
+                {
+                    "xvalue": 2004,
+                    "yvalue": 239
+                },
+                {
+                    "xvalue": 2005,
+                    "yvalue": 402
+                },
+                {
+                    "xvalue": 2006,
+                    "yvalue": 706
+                },
+                {
+                    "xvalue": 2007,
+                    "yvalue": 432
+                },
+                {
+                    "xvalue": 2008,
+                    "yvalue": 200
+                },
+                {
+                    "xvalue": 2009,
+                    "yvalue": 763
+                },
+                {
+                    "xvalue": 2010,
+                    "yvalue": 550
+                },
+                {
+                    "xvalue": 2011,
+                    "yvalue": 630
+                },
+                {
+                    "xvalue": 2012,
+                    "yvalue": 278
+                },
+                {
+                    "xvalue": 2013,
+                    "yvalue": 312
+                },
+                {
+                    "xvalue": 2014,
+                    "yvalue": 600
+                },
+                {
+                    "xvalue": 2015,
+                    "yvalue": 283
+                }
+            ]
+        },
+
+        stackedData: {
+            model: 'saas.model.chart.MultiDataXY',
+            data: [
+                {
+                    "xvalue": 1997,
+                    "y1value": 281,
+                    "y2value": 72,
+                    "y3value": 269,
+                    "y4value": 762
+                },
+                {
+                    "xvalue": 1981,
+                    "y1value": 518,
+                    "y2value": 999,
+                    "y3value": 43,
+                    "y4value": 310
+                },
+                {
+                    "xvalue": 1985,
+                    "y1value": 38,
+                    "y2value": 311,
+                    "y3value": 942,
+                    "y4value": 77
+                },
+                {
+                    "xvalue": 1984,
+                    "y1value": 936,
+                    "y2value": 415,
+                    "y3value": 562,
+                    "y4value": 412
+                },
+                {
+                    "xvalue": 1979,
+                    "y1value": 978,
+                    "y2value": 331,
+                    "y3value": 927,
+                    "y4value": 114
+                },
+                {
+                    "xvalue": 1982,
+                    "y1value": 196,
+                    "y2value": 240,
+                    "y3value": 72,
+                    "y4value": 888
+                },
+                {
+                    "xvalue": 1992,
+                    "y1value": 481,
+                    "y2value": 375,
+                    "y3value": 139,
+                    "y4value": 762
+                },
+                {
+                    "xvalue": 19895,
+                    "y1value": 623,
+                    "y2value": 999,
+                    "y3value": 260,
+                    "y4value": 310
+                },
+                {
+                    "xvalue": 1988,
+                    "y1value": 328,
+                    "y2value": 451,
+                    "y3value": 542,
+                    "y4value": 77
+                },
+                {
+                    "xvalue": 1980,
+                    "y1value": 456,
+                    "y2value": 615,
+                    "y3value": 342,
+                    "y4value": 412
+                },
+                {
+                    "xvalue": 1990,
+                    "y1value": 788,
+                    "y2value": 531,
+                    "y3value": 489,
+                    "y4value": 114
+                }
+            ]
+        },
+
+        gaugeData: {
+            data: [
+                {
+                    position: 40
+                }
+            ],
+
+            fields: [
+                {
+                    name: 'position'
+                }
+            ]
+        },
+
+        radialData: {
+            model: 'saas.model.chart.DataXY',
+            data: [
+                {
+                    "xvalue": "A",
+                    "yvalue": 417
+                },
+                {
+                    "xvalue": "B",
+                    "yvalue": 676
+                },
+                {
+                    "xvalue": "C",
+                    "yvalue": 606
+                },
+                {
+                    "xvalue": "D",
+                    "yvalue": 124
+                },
+                {
+                    "xvalue": "E",
+                    "yvalue": 473
+                },
+                {
+                    "xvalue": "F",
+                    "yvalue": 108
+                },
+                {
+                    "xvalue": "G",
+                    "yvalue": 847
+                },
+                {
+                    "xvalue": "H",
+                    "yvalue": 947
+                },
+                {
+                    "xvalue": "I",
+                    "yvalue": 694
+                },
+                {
+                    "xvalue": "J",
+                    "yvalue": 603
+                }
+            ]
+        },
+
+        lineData: {
+            model: 'saas.model.chart.DataXY',
+            data: [
+                {
+                    "xvalue": 2011,
+                    "yvalue": 0.1,
+                    "y1value": 0.2,
+                    "y2value": 0.3,
+                    "y3value": 0.1,
+                    "y4value": 0,
+                    "y5value": 1
+                },
+                {
+                    "xvalue": 2012,
+                    "yvalue": 0.2,
+                    "y1value": 0.4,
+                    "y2value": 0.2,
+                    "y3value": 0.2,
+                    "y4value": 0,
+                    "y5value": 1
+                },
+                {
+                    "xvalue": 2013,
+                    "yvalue": 0.3,
+                    "y1value": 0.2,
+                    "y2value": 0.4,
+                    "y3value": 0.3,
+                    "y4value": 0,
+                    "y5value": 1
+        
+                },
+                {
+                    "xvalue": 2014,
+                    "yvalue": 0.2,
+                    "y1value": 0.4,
+                    "y2value": 0.1,
+                    "y3value": 0.2,
+                    "y4value": 0,
+                    "y5value": 1
+                },{
+                    "xvalue": 2015,
+                    "yvalue": 0.4,
+                    "y1value": 0.3,
+                    "y2value": 0.4,
+                    "y3value": 0.4,
+                    "y4value": 0,
+                    "y5value": 1
+                }
+            ]
+        },
+
+        pieData: {
+            model: 'saas.model.chart.DataXY',
+            data: [{
+                "xvalue": "华商龙",
+                "yvalue": 200.19
+            }, {
+                "xvalue": "维泰",
+                "yvalue": 180.17
+            }, {
+                "xvalue": "数码",
+                "yvalue": 150.15
+            }, {
+                "xvalue": "优企",
+                "yvalue": 150.15
+            }, {
+                "xvalue": "云服",
+                "yvalue": 120.12
+            }, {
+                "xvalue": "其他",
+                "yvalue": 230.22
+            }]
+        },
+
+        areaData: {
+            model: 'saas.model.chart.MultiDataXY',
+            data: [
+                {
+                    "xvalue": 250,
+                    "y1value": 94,
+                    "y2value": 40
+                },
+                {
+                    "xvalue": 500,
+                    "y1value": 78,
+                    "y2value": 46
+                },
+                {
+                    "xvalue": 750,
+                    "y1value": 60,
+                    "y2value": 53
+                },
+                {
+                    "xvalue": 1250,
+                    "y1value": 51,
+                    "y2value": 48
+                },
+                {
+                    "xvalue": 1500,
+                    "y1value": 60,
+                    "y2value": 36
+                },
+                {
+                    "xvalue": 1750,
+                    "y1value": 68,
+                    "y2value": 26
+                },
+                {
+                    "xvalue": 2250,
+                    "y1value": 59,
+                    "y2value": 37
+                },
+                {
+                    "xvalue": 2500,
+                    "y1value": 40,
+                    "y2value": 58
+                },
+                {
+                    "xvalue": 2750,
+                    "y1value": 24,
+                    "y2value": 78
+                },
+                {
+                    "xvalue": 3250,
+                    "y1value": 36,
+                    "y2value": 85
+                },
+                {
+                    "xvalue": 3500,
+                    "y1value": 65,
+                    "y2value": 70
+                },
+                {
+                    "xvalue": 3750,
+                    "y1value": 94,
+                    "y2value": 55
+                },
+                {
+                    "xvalue": 4250,
+                    "y1value": 103,
+                    "y2value": 61
+                },
+                {
+                    "xvalue": 4500,
+                    "y1value": 83,
+                    "y2value": 82
+                },
+                {
+                    "xvalue": 4750,
+                    "y1value": 61,
+                    "y2value": 102
+                },
+                {
+                    "xvalue": 5250,
+                    "y1value": 55,
+                    "y2value": 95
+                },
+                {
+                    "xvalue": 5500,
+                    "y1value": 70,
+                    "y2value": 67
+                },
+                {
+                    "xvalue": 5750,
+                    "y1value": 84,
+                    "y2value": 39
+                },
+                {
+                    "xvalue": 6250,
+                    "y1value": 78,
+                    "y2value": 31
+                },
+                {
+                    "xvalue": 6500,
+                    "y1value": 58,
+                    "y2value": 49
+                },
+                {
+                    "xvalue": 6750,
+                    "y1value": 38,
+                    "y2value": 69
+                },
+                {
+                    "xvalue": 7250,
+                    "y1value": 41,
+                    "y2value": 74
+                },
+                {
+                    "xvalue": 7500,
+                    "y1value": 65,
+                    "y2value": 60
+                },
+                {
+                    "xvalue": 7750,
+                    "y1value": 89,
+                    "y2value": 46
+                }
+            ]
+        }
+    }
+});

+ 123 - 74
frontend/saas-web/app/view/home/Home.js

@@ -3,90 +3,139 @@ Ext.define('saas.view.home.Home', {
     xtype: 'home',
 
     requires: [
-        'saas.view.home.MsgCard',
         'Ext.slider.Single',
         'Ext.form.field.Display',
-        'Ext.layout.container.Border'
+        'Ext.layout.container.Border',
+        'Ext.ux.layout.ResponsiveColumn'
     ],
 
-    layout: {
-        type: 'vbox',
-        pack: 'start',
-        align: 'stretch'
+    controller: 'home',
+    viewModel: {
+        type: 'chartsmodel'
     },
 
-    bodyPadding: 5,
+    layout: 'responsivecolumn',
+
+    scrollable: true,
 
     defaults: {
-        xtype: 'container'
+        shadow: true,
+        xtype: 'panel',
+        layout: 'column',
+        cls: 'x-home-panel',
+        userCls: 'big-100 small-100',
     },
 
-    items: [
-        {
-            height: 200,
-            layout: 'column',
-            margin: '0 0 20 0',
-            items: [
-                {
-                    xtype: 'msgcard',
-                    containerColor: 'cornflower-blue',
-                    columnWidth: 0.25,
-                    margin: '0 15 0 0',
-                    data: {
-                        count: 0,
-                        title: '库存预警',
-                        icon: 'exclamation-triangle'
-                    }
-                },
-                {
-                    xtype: 'msgcard',
-                    containerColor: 'green',
-                    columnWidth: 0.25,
-                    margin: '0 15 0 0',
-                    data: {
-                        count: 11,
-                        title: '未发货销售订单',
-                        icon: 'shopping-cart'
-                    }
-                },
-                {
-                    xtype: 'msgcard',
-                    containerColor: 'magenta',
-                    columnWidth: 0.25,
-                    margin: '0 15 0 0',
-                    data: {
-                        count: 6,
-                        title: '未审核销售订单',
-                        icon: 'check'
-                    }
-                },
-                {
-                    xtype: 'msgcard',
-                    containerColor: 'orange',
-                    columnWidth: 0.25,
-                    data: {
-                        count: 5,
-                        title: '未审核购货订单',
-                        icon: 'calendar-check-o'
+    items: [{
+        title: '实时数据',
+        xtype: 'infocard',
+        infoData: [{
+            title: '七天内待出货销售',
+            content: '168件',
+            color: 'yellow',
+        }, {
+            title: '七天内待入库采购',
+            content: '168件',
+            color: 'purple',
+        }, {
+            title: '七天内代付款',
+            content: '168件',
+            color: 'red',
+        }, {
+            title: '七天内代收款',
+            content: '168件',
+            color: 'yellow',
+        }, {
+            title: '未审核验收',
+            content: '168件'
+        }, {
+            title: '七天内待出货销售',
+            content: '168件'
+        }, {
+            title: '未审核出货',
+            content: '168件'
+        }]
+    }, {
+        title: '2018年11月经营分析',
+        latyout: 'column',
+        // items: [{
+        //     xtype: 'core-chart-pie',
+        //     columnWidth: 0.33,
+        //     chartConfig: {
+        //         captions: {
+        //             credits: {
+        //                 text: 'Data: IDC Predictions - 2017\n' +
+        //                     'Source: Internet',
+        //                 align: 'left'
+        //             }
+        //         },
+        //     }
+        // }, {
+        //     xtype: 'core-chart-bar',
+        //     columnWidth: 0.33
+        // }, {
+        //     xtype: 'core-chart-gauge',
+        //     columnWidth: 0.33
+        // }]
+    }, {
+        title: '2018年11月经营分析',
+        latyout: 'column',
+        // items: [{
+        //     xtype: 'core-chart-line',
+        //     columnWidth: 0.33
+        // }, {
+        //     xtype: 'core-chart-pie',
+        //     columnWidth: 0.33
+        // }, {
+        //     xtype: 'core-chart-pie3d',
+        //     columnWidth: 0.33
+        // }]
+    }],
+
+    items1: [{
+        title: '2018年11月经营分析',
+        userCls: 'big-50 small-100',
+        items: [{
+            xtype: 'core-chart-pie',
+            columnWidth: 0.33,
+            chartConfig: {
+                captions: {
+                    credits: {
+                        text: 'Data: IDC Predictions - 2017\n' +
+                            'Source: Internet',
+                        align: 'left'
                     }
                 },
-            ]
-        },
-        {
-            xtype: 'tabpanel',
-            flex: 10,
-            cls: 'shadow',
-            items: [
-                {
-                    title: '销货'
-                },
-                {
-                    title: '购货'
-                },
-                {
-                    title: '仓库'
-                }
-            ]
-        }
-    ]
+            }
+        }, {
+            xtype: 'core-chart-bar',
+            columnWidth: 0.33
+        }, {
+            xtype: 'core-chart-gauge',
+            columnWidth: 0.33
+        }]
+    }, {
+        title: '经营趋势分析',
+        userCls: 'big-50 small-100',
+        items: [{
+            xtype: 'core-chart-line',
+            columnWidth: 0.33
+        }, {
+            xtype: 'core-chart-pie',
+            columnWidth: 0.33
+        }, {
+            xtype: 'core-chart-pie3d',
+            columnWidth: 0.33
+        }]
+    }, {
+        title: '待办事宜',
+        userCls: 'big-100 small-100',
+        items: [{
+            xtype: 'core-chart-polar',
+            columnWidth: 0.5
+        }, {
+            xtype: 'core-chart-stacked',
+            columnWidth: 0.5
+        }]
+    }],
 });

+ 30 - 0
frontend/saas-web/app/view/home/Home.scss

@@ -91,6 +91,36 @@ $unaudit-purc-container-color: dynamic(#e91e63);
     left: 0
 }
 
+.x-home-panel {
+    border-radius: 2px;
+
+    &>.x-panel-header {
+        background-color: #fff;
+
+        &>.x-box-inner {
+            &>.x-box-target {
+                &>.x-title {
+                    &>.x-title-text {
+                        font-size: 16px;
+                        color: #505363;
+                        padding-left: 10px;
+            
+                        &:before {
+                            content: ' ';
+                            position: absolute;
+                            width: 4px;
+                            height: 100%;
+                            background: #34BAF6;
+                            left: 0;
+                            border-radius: 2px;
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
+
 .x-responsivecolumn {
     padding: 0;
 }

+ 8 - 0
frontend/saas-web/app/view/home/HomeController.js

@@ -0,0 +1,8 @@
+Ext.define('saas.view.home.HomeController', {
+    extend: 'Ext.app.ViewController',
+    alias: 'controller.home',
+
+    onSeriesTooltipRender: function (tooltip, record, item) {
+        tooltip.setHtml(record.get('os') + ': ' + record.get('data1') + '%');
+    }
+});

+ 128 - 0
frontend/saas-web/app/view/home/InfoCard.js

@@ -0,0 +1,128 @@
+Ext.define('saas.view.home.InfoCard', {
+    extend: 'Ext.panel.Panel',
+    xtype: 'infocard',
+
+    latyou: 'fit',
+
+    initComponent: function() {
+        var me = this;
+
+        var view = Ext.create('Ext.view.View', {
+            store : Ext.create('Ext.data.Store', {
+				fields: ['title', 'content', 'color'],
+				data: me.infoData,
+			}),
+            tpl: new Ext.XTemplate([
+                '<div class="x-row">',
+                    '<tpl for=".">',
+                    '<div class="x-col">',
+                        '<div>',
+                            '<div class="x-box ',
+                                '<tpl if="color"> x-bg-{color}</tpl>',
+                                '<tpl else"> x-bg-default</tpl>',
+                            '">',
+                                '<h3>{title}</h3>',
+                                '<p>{content}</p>',
+                            '</div>',
+                        '</div>',
+                    '</div>',
+                    '</tpl>',
+                '</div>'
+            ]),
+            itemSelector: 'div.x-info-card-body',
+        });
+
+        Ext.apply(me, {
+            userCls: 'x-info-card ' + me.userCls,
+            items: [{
+                xtype: 'button',
+                cls: 'x-scroller-button x-scroller-button-left',
+                // iconCls: 'x-sa sa-arrows-left',
+                disabled: true,
+                handler: function() {
+                    me.scrollBody(1);
+                }
+            }, view, {
+                xtype: 'button',
+                cls: 'x-scroller-button x-scroller-button-right',
+                // iconCls: 'x-sa sa-arrows-right',
+                handler: function() {
+                    me.scrollBody(-1);
+                }
+            }]
+        });
+
+        me.callParent(arguments);
+    },
+
+    listeners: {
+        boxready: function(th) {
+            var list = Ext.fly(th.items.items[1].el.dom);
+            var listWidth = Number(list.getStyle('width').replace('px', ''));
+            var bodyWidth = th.body.getBox().width;
+            var btns = th.query('button');
+
+            if(listWidth <= (bodyWidth-88)) {
+                btns[0].setVisible(false);
+                btns[1].setVisible(false);
+                return;
+            }
+
+            Ext.fly(th.body).on('mousewheel', function() {
+                var ev = window.event;
+                var delta = ev.wheelDelta;
+
+                if(ev.preventDefault) {
+                    ev.preventDefault();  
+                }
+                else {
+                    ev.cancel=true;
+                }
+                th.scrollBody(delta/120);
+            })
+        }
+    },
+
+    scrollBody: function(delta) {
+        var me = this;
+        var list = Ext.fly(me.items.items[1].el.dom);
+        var marginLeft = Number(list.getStyle('marginLeft').replace('px', ''));
+        var le = marginLeft + delta * 50;
+        var MAX_LEN = list.getBox().width - (me.body.getBox().width - 88);
+
+        if(le > 0) {
+            le = 0;
+            me.scrollLeftDisabled();
+        }else if(le < -MAX_LEN) {
+            le = -MAX_LEN;
+            me.scrollRightDisabled();
+        }else {
+            me.scrollEnable();
+        }
+
+        list.setStyle({
+            marginLeft: le + 'px'
+        });
+    },
+    
+    scrollLeftDisabled: function() {
+        var me = this;
+        var leftBtn = me.query('button')[0];
+        leftBtn.setDisabled(true);
+    },
+
+    scrollRightDisabled: function() {
+        var me = this;
+        var rightBtn = me.query('button')[1];
+        rightBtn.setDisabled(true);
+    },
+
+    scrollEnable: function() {
+        var me = this;
+        var btns = me.query('button');
+
+        for(var i = 0; i < btns.length; i ++) {
+            btns[i].setDisabled(false);
+        }
+    }
+});

+ 88 - 0
frontend/saas-web/app/view/home/InfoCard.scss

@@ -0,0 +1,88 @@
+$card-width: 200px;
+
+.x-info-card {
+
+    .x-panel-bodyWrap {
+        .x-autocontainer-innerCt {
+            padding: 0 44px;
+        }
+        .x-row {
+            display: flex;
+            flex-wrap: nowrap;
+        
+            .x-col {
+        
+                color: #fff;
+                padding: 10px;
+        
+                .x-box {
+                    padding: 16px;
+                    width: 235px;
+                    height: 131px;
+                    border-radius: 0.5rem;
+                    box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2);
+                    position: relative;
+                    display: block;
+        
+                    h3 {
+                        font-size: 16px;
+                    }
+        
+                    p {
+                        font-size: 24px;
+                        text-align: center;
+                        margin-top: 32px;
+                    }
+        
+                }
+            }
+        }
+    }
+}
+
+.x-scroller-button {
+    position: absolute;
+    z-index: 1;
+    width: 44px;
+    height: 100%;
+    padding: 0;
+    background-color: white;
+    border: none !important;
+    box-shadow: none !important;
+    background-repeat: no-repeat !important;
+    background-size: 30px !important;
+    background-position-y: center !important;
+    background-position-x: 6px !important;
+}
+
+.x-scroller-button-left {
+    left: 0;
+    background-image: url('images/default/arrows-left.png') !important;
+}
+
+.x-scroller-button-right {
+    right: 0;
+    background-image: url('images/default/arrows-right.png') !important;
+}
+
+.x-btn-over.x-btn-default-small.x-scroller-button-left,
+.x-btn.x-btn-disabled.x-btn-default-small.x-scroller-button-left,
+.x-btn-over.x-btn-default-small.x-scroller-button-right,
+.x-btn.x-btn-disabled.x-btn-default-small.x-scroller-button-right,
+.x-keyboard-mode .x-btn-focus.x-btn-default-small.x-scroller-button-left,
+.x-keyboard-mode .x-btn-focus.x-btn-default-small.x-scroller-button-right {
+    background: white;
+}
+
+.x-bg-default {
+    background: linear-gradient(to right, #25CBDB , #5161F1);
+}
+.x-bg-yellow {
+    background: linear-gradient(to right, #F4BF59 , #F99A50);
+}
+.x-bg-purple {
+    background: linear-gradient(to right, #946DFF , #7460FF);
+}
+.x-bg-red {
+    background: linear-gradient(to right, #FA8B86 , #F36487);
+}

+ 99 - 29
frontend/saas-web/app/view/main/Main.js

@@ -41,56 +41,126 @@ Ext.define('saas.view.main.Main', {
                     iconCls:'x-fa fa-navicon',
                     id: 'main-navigation-btn',
                     handler: 'onToggleNavigationSize'
-                },
-                {
-                    margin: '0 0 0 8',
-                    xtype: 'tbtext',
+                },{
+                    reference: 'mainprofile',
+                    arrowVisible: false,
+                    ui: 'header',
+                    tooltip: '所属公司',
                     bind: {
-                        html: '{company.name}'
+                        text: '{company.name}'
+                    },
+                    menu: {
+                        items: [{
+                            xtype: 'menuseparator'
+                        }]
                     }
                 },
                 '->',
                 {
-                    iconCls:'x-fa fa-search',
+                    iconCls:'icon-usoftchina',
                     ui: 'header',
-                    tooltip: '搜索'
-                },
-                {
-                    iconCls:'x-fa fa-bell',
-                    ui: 'header',
-                    tooltip: '消息'
+                    tooltip: '优软云',
+                    handler:function(){
+					    window.open('http://www.usoftchina.com','_blank');
+                    }
                 },
                 {
                     iconCls:'x-fa fa-question',
                     ui: 'header',
-                    tooltip: '帮助'
-                },
-                {
-                    reference: 'mainprofile',
-                    iconCls:'x-fa fa-th-large',
                     arrowVisible: false,
-                    ui: 'header',
-                    tooltip: '账户',
-                    bind: {
-                        text: '{account.realname}'
+                    //tooltip: '帮助',
+                    width:50, 
+                    listeners:{
+                        'mouseover':function(){
+                            this.showMenu(); 
+                        },
+                        'mouseout':function(btn,e){
+                            var cx = e.browserEvent.clientX, cy = e.browserEvent.clientY;
+                            var btnLayout = btn.el.dom.getBoundingClientRect();
+                            if(cx <= btnLayout.left || cx >= btnLayout.left+btnLayout.width || cy <= btnLayout.top) {
+                                btn.hideMenu();
+                            }
+                        },'mouseleave':function(enu){
+                            this.hide();
+                        } 
                     },
                     menu: {
                         items: [{
-                            xtype: 'menuseparator'
-                        }, {
-                            text: '退出',
-                            handler: 'onLogout'
+                            text: '新手导航',
+                            iconCls:'x-fa icon-userGuite',
+                            handler:function(){
+                               console.log("新手导航");
+                            }
+                        },{
+                            text: '用户手册',
+                            iconCls:'x-fa icon-userBook',
+                            handler:function(){
+                                console.log("用户手册");
+                            }
+                        },{
+                            text: '常见问题',
+                            iconCls:'x-fa icon-commonQuestion',
+                            handler:function(){
+                                console.log("常见问题");
+                            }
+                        },{
+                            text: '客服热线',
+                            iconCls:'x-fa icon-serviceOnline',
+                            handler:function(){
+                                console.log("客服热线");
+                            }
                         }]
                     }
                 },
                 {
-                    xtype: 'image',
-                    cls: 'header-right-profile-image',
-                    height: 35,
-                    width: 35,
+                    ui: 'header',
                     bind: {
+                        tooltip: '{account.realname}',
+                        text: '{account.realname}'
+                    }
+                },
+                {
+                    ui: 'header',
+                    arrowVisible: false,
+                    cls: 'header-right-profile-image',
+                    height: 70,
+                    width: 70,
+                   /*  bind: {
                         src: '{avatarUrl}'
+                    }, */
+                    menu: {
+                        items: [ {  
+                            text: '账户中心',
+                            iconCls:'x-fa icon-accountCenter',
+                            handler:function(){
+                            console.log("账户中心");
+                            }
+                        },{  
+                            text: '意见反馈',
+                            iconCls:'x-fa icon-feedback',
+                            handler:function(){
+                            console.log("意见反馈");
+                            }
+                        }, {
+                            text: '退出',
+                            handler: 'onLogout'
+                        }]
+                    } ,
+                    listeners:{
+                        'mouseover':function(){
+                            this.showMenu(); 
+                        },
+                        'mouseout':function(btn,e){
+                            var cx = e.browserEvent.clientX, cy = e.browserEvent.clientY;
+                            var btnLayout = btn.el.dom.getBoundingClientRect();
+                            if(cx <= btnLayout.left || cx >= btnLayout.left+btnLayout.width || cy <= btnLayout.top) {
+                                btn.hideMenu();
+                            }
+                        },'mouseleave':function(enu){
+                            this.hide();
+                        } 
                     }
+                    
                 }
             ]
         },

+ 47 - 0
frontend/saas-web/app/view/main/Main.scss

@@ -92,6 +92,8 @@ $treelist-nav-ui: (
 
     .header-right-profile-image {
         border-radius: 20px;
+        background: url(../../../../resources/images/default/user-profile-default.png) 0 0 no-repeat;
+        background-position: center;
     }
 }
 .top-english-button {
@@ -153,3 +155,48 @@ $treelist-nav-ui: (
     height: 21px;
     background: url(../../../../resources/images/grid/check.png) 0 0 no-repeat;
 }
+body > .x-mask {
+    background-image: none;
+    background-color: rgba(142, 141, 141, 0.75);
+}
+.icon-usoftchina{
+    margin-top: 0px;
+    background: url(../../../../resources/images/nav/usoftchina.png) 0 0 no-repeat; 
+   
+}
+.icon-userGuite{
+    margin-top: 0px;
+    background: url(../../../../resources/images/nav/userGuite.png) 0 0 no-repeat;
+    background-size: 16px 16px;
+    background-position: center;
+}
+.icon-userBook{
+    margin-top: 0px;
+    background: url(../../../../resources/images/nav/userBook.png) 0 0 no-repeat; 
+    background-size: 16px 16px;
+    background-position: center;
+}
+.icon-commonQuestion{
+    margin-top: 0px;
+    background: url(../../../../resources/images/nav/commonQuestion.png) 0 0 no-repeat; 
+    background-size: 16px 16px;
+    background-position: center;
+}
+.icon-serviceOnline{
+    margin-top: 0px;
+    background: url(../../../../resources/images/nav/serviceOnline.png) 0 0 no-repeat; 
+    background-size: 16px 16px;
+    background-position: center;
+}
+.icon-accountCenter{
+    margin-top: 0px;
+    background: url(../../../../resources/images/nav/accountCenter.png) 0 0 no-repeat; 
+    background-size: 16px 16px;
+    background-position: center;
+}
+.icon-feedback{
+    margin-top: 0px;
+    background: url(../../../../resources/images/nav/feedback.png) 0 0 no-repeat; 
+    background-size: 16px 16px;
+    background-position: center;
+} 

+ 1 - 0
frontend/saas-web/app/view/main/Navigation.js

@@ -115,6 +115,7 @@ Ext.define('saas.view.main.Navigation', {
                         menu.updateLayout();
 
                         view.el.dom.addEventListener('mouseenter', function (e) {
+                            menu.show();
                             menu.navItem.classList.add(menu.navView.overItemCls);
                         });
 

+ 4 - 2
frontend/saas-web/app/view/money/fundtransfer/FormPanel.js

@@ -30,7 +30,8 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
         xtype : "datefield", 
         name : "ft_date", 
         fieldLabel : "单据日期",
-        defaultValue: new Date()
+        defaultValue: new Date(),
+        allowBlank : false
     }, {
         name : "detailGridField", 
         xtype : "detailGridField", 
@@ -109,6 +110,7 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
                 }
             }, {
                 text : "金额", 
+                xtype: 'numbercolumn',
                 dataIndex : "ftd_nowbalance", 
                 width : 120.0, 
                 editor : {
@@ -183,7 +185,7 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
         readOnly:true
     }, {
         xtype : "datefield", 
-        name : "ft_date",
+        name : "ft_recorddate",
         fieldLabel : "录入日期",
         readOnly:true
     }

Some files were not shown because too many files changed in this diff