Просмотр исходного кода

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

rainco 7 лет назад
Родитель
Сommit
7c1aeef67f
67 измененных файлов с 2672 добавлено и 149 удалено
  1. 2 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/BillCodeSeq.java
  2. 22 0
      applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/EmployeeDTO.java
  3. 23 0
      applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/EmployeeFormDTO.java
  4. 33 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Employee.java
  5. 93 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/EmployeeController.java
  6. 24 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/EmployeeMapper.java
  7. 29 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/EmployeeService.java
  8. 120 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/EmployeeServiceImpl.java
  9. 204 0
      applications/document/document-server/src/main/resources/mapper/EmployeeMapper.xml
  10. 189 0
      applications/money/money-dto/src/main/java/com/usoftchina/saas/money/po/Bankinformation.java
  11. 271 0
      applications/money/money-dto/src/main/java/com/usoftchina/saas/money/po/Customer.java
  12. 319 0
      applications/money/money-dto/src/main/java/com/usoftchina/saas/money/po/Vendor.java
  13. 10 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/PaybalanceMapper.java
  14. 9 2
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/RecbalanceMapper.java
  15. 9 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalancedet.java
  16. 9 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalancedetail.java
  17. 9 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalancedet.java
  18. 10 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalancedetail.java
  19. 1 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/FundtransferServiceImpl.java
  20. 1 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthreceiptsServiceImpl.java
  21. 1 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthspendingsServiceImpl.java
  22. 63 9
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/PaybalanceServiceImpl.java
  23. 67 6
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/RecbalanceServiceImpl.java
  24. 1 1
      applications/money/money-server/src/main/resources/mapper/AcountbalanceViewMapper.xml
  25. 2 2
      applications/money/money-server/src/main/resources/mapper/FundtransferMapper.xml
  26. 6 6
      applications/money/money-server/src/main/resources/mapper/FundtransferdetailMapper.xml
  27. 2 2
      applications/money/money-server/src/main/resources/mapper/OthreceiptsMapper.xml
  28. 3 3
      applications/money/money-server/src/main/resources/mapper/OthreceiptsdetailMapper.xml
  29. 2 2
      applications/money/money-server/src/main/resources/mapper/OthspendingsMapper.xml
  30. 3 3
      applications/money/money-server/src/main/resources/mapper/OthspendingsdetailMapper.xml
  31. 254 0
      applications/money/money-server/src/main/resources/mapper/PaybalanceMapper.xml
  32. 6 5
      applications/money/money-server/src/main/resources/mapper/PaybalancedetMapper.xml
  33. 6 5
      applications/money/money-server/src/main/resources/mapper/PaybalancedetailMapper.xml
  34. 255 2
      applications/money/money-server/src/main/resources/mapper/RecbalanceMapper.xml
  35. 6 5
      applications/money/money-server/src/main/resources/mapper/RecbalancedetMapper.xml
  36. 6 5
      applications/money/money-server/src/main/resources/mapper/RecbalancedetailMapper.xml
  37. 1 1
      applications/money/money-server/src/main/resources/mapper/SubledgerMapper.xml
  38. 29 1
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/PurchaseList.java
  39. 1 1
      applications/purchase/purchase-server/src/main/resources/application.yml
  40. 29 31
      applications/purchase/purchase-server/src/main/resources/mapper/PurchaseListMapper.xml
  41. 29 1
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/po/SaleList.java
  42. 28 30
      applications/sale/sale-server/src/main/resources/mapper/SaleListMapper.xml
  43. 1 0
      frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js
  44. 1 0
      frontend/saas-web/app/view/core/dbfind/MultiDbfindTrigger.js
  45. 2 3
      frontend/saas-web/app/view/document/customer/FormPanel.js
  46. 76 0
      frontend/saas-web/app/view/document/employee/BasePanel.js
  47. 10 0
      frontend/saas-web/app/view/document/employee/BasePanelController.js
  48. 4 0
      frontend/saas-web/app/view/document/employee/BasePanelModel.js
  49. 196 0
      frontend/saas-web/app/view/document/employee/FormController.js
  50. 17 0
      frontend/saas-web/app/view/document/employee/FormModel.js
  51. 73 0
      frontend/saas-web/app/view/document/employee/FormPanel.js
  52. 3 4
      frontend/saas-web/app/view/document/vendor/FormPanel.js
  53. 2 1
      frontend/saas-web/app/view/money/fundtransfer/FormPanel.js
  54. 2 1
      frontend/saas-web/app/view/money/othreceipts/FormPanel.js
  55. 2 1
      frontend/saas-web/app/view/money/othspendings/FormPanel.js
  56. 8 3
      frontend/saas-web/app/view/money/payBalance/FormPanel.js
  57. 23 2
      frontend/saas-web/app/view/money/payBalance/FormPanelController.js
  58. 9 0
      frontend/saas-web/app/view/money/payBalance/FormPanelModel.js
  59. 8 4
      frontend/saas-web/app/view/money/recBalance/FormPanel.js
  60. 17 1
      frontend/saas-web/app/view/money/recBalance/FormPanelController.js
  61. 8 0
      frontend/saas-web/app/view/money/recBalance/FormPanelModel.js
  62. 2 2
      frontend/saas-web/app/view/sale/sale/FormPanelController.js
  63. 4 1
      frontend/saas-web/app/view/stock/make/FormPanel.js
  64. 6 1
      frontend/saas-web/app/view/stock/make/FormPanelController.js
  65. 3 0
      frontend/saas-web/app/view/stock/make/FormPanelModel.js
  66. 4 0
      frontend/saas-web/app/view/stock/otherOut/QueryPanelController.js
  67. 4 2
      frontend/saas-web/resources/json/navigation.json

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

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

+ 189 - 0
applications/money/money-dto/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-dto/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;
+    }
+}

+ 319 - 0
applications/money/money-dto/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;
+    }
+}

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

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

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

@@ -69,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 {

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

@@ -73,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 {

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

@@ -71,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 {

+ 63 - 9
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;
 
@@ -75,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 {
@@ -87,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 {
@@ -189,15 +189,74 @@ 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();
+        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(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);
     }
 
     @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());
@@ -209,12 +268,7 @@ public class PaybalanceServiceImpl implements PaybalanceService {
         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;
-         */
+
     }
 
 

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

@@ -72,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 {
@@ -84,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 {
@@ -207,21 +208,81 @@ 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();
         }
-        updatePay.setId(rec.getMain().getId());
-        updatePay.setRb_rdamount(amountTotal);
-        //updateByPrimaryKeySelective
+        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();
+        Double beginapamount = customerData.getCu_beginaramount();
+        Double beginprepayamount= customerData.getCu_beginprerecamount();
+        Double recamount = 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);
     }
 
     @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(Long.valueOf(id));
+        Double pay_preamount = rec.getRb_preamount();
+        Double pay_pbdamount = rec.getRb_rbdamount();
+        Customer customerData = recbalanceMapper.selectCustomerByPrimaryKey(rec.getRb_custid());
+        Double preamount = customerData.getCu_preamount();
+        Double beginapamount = customerData.getCu_beginaramount();
+        Double beginprepayamount= customerData.getCu_beginprerecamount();
+        Double recamount = 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},

+ 254 - 0
applications/money/money-server/src/main/resources/mapper/PaybalanceMapper.xml

@@ -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.Long" >
+    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,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.Long" 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,jdbcType=INTEGER}
+  </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="pb_date" property="pb_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="pb_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="pb_date != null">
+        CONVERT(date_format(#{pb_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="pb_date != null">
+        rd_ym = CONVERT(date_format(#{pb_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="pb_date" property="pb_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="pb_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="pb_date != null" >
+        CONVERT(date_format(#{pb_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="pb_date != null" >
+        rbd_ym = CONVERT(date_format(#{pb_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">

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

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

@@ -47,7 +47,7 @@ eureka:
   client:
     registryFetchIntervalSeconds: 5
     serviceUrl:
-      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@127.0.0.1:8500/eureka/
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8510/eureka/
 management:
   endpoints:
     web:

+ 29 - 31
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">
@@ -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;
 }

+ 28 - 30
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">

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

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

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

+ 2 - 1
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", 

+ 2 - 1
frontend/saas-web/app/view/money/othreceipts/FormPanel.js

@@ -55,7 +55,8 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
      }, {
         xtype:'datefield',
         name : 'or_date',
-        fieldLabel : '单据日期'
+        fieldLabel : '单据日期',
+        allowBlank : false
     },{
         name : "detailGridField", 
         xtype : "detailGridField", 

+ 2 - 1
frontend/saas-web/app/view/money/othspendings/FormPanel.js

@@ -55,7 +55,8 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
      }, {
         xtype:'datefield',
         name : 'os_date',
-        fieldLabel : '单据日期'
+        fieldLabel : '单据日期',
+        allowBlank : false
     },{
         name : "detailGridField", 
         xtype : "detailGridField", 

+ 8 - 3
frontend/saas-web/app/view/money/payBalance/FormPanel.js

@@ -63,7 +63,8 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
     },{
         xtype: "datefield",
         name: "pb_date",
-        fieldLabel: "日期"
+        fieldLabel: "日期",
+        allowBlank : false
     },{
         xtype: 'textfield',
         name: 'pb_manname',
@@ -206,8 +207,12 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
                 queryMode : "local",
                 store : null,
                 valueField : "value",
-                xtype : "multidbfindtrigger"
-            }
+                xtype : "multidbfindtrigger",
+                listeners:{
+                    beforetriggerclick:'vendnamechange'
+                }
+            },
+
         }, {
             text: "业务类型",
             dataIndex: "pbd_slkind"

+ 23 - 2
frontend/saas-web/app/view/money/payBalance/FormPanelController.js

@@ -21,6 +21,9 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
                         },{
                             from: 've_leftamount',
                             to: 've_leftamount'
+                        },{
+                            from: 'id',
+                            to: 'pb_vendid'
                         }],
                         dbtpls: [{
                             field: 've_code',
@@ -113,12 +116,15 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
                         },{
                             from:'sl_kind',
                             to:'pbd_slkind'
+                        },{
+                            from:'sl_namount',
+                            to:'pbd_nowbalance'
                         }],
                         dbtpls: [{
                             field: 'sl_code',
                             width: 100
                         }],
-                        defaultCondition: "sl_vendid<>0 and sl_kind in ('期初余额','采购验收单','采购验退单') and sl_namount<>0",
+                        defaultCondition: "sl_vendid<>0 and sl_kind in ('期初余额','采购验收单','采购验退单') and sl_namount<>0" ,
                         dbSearchFields:[{
                             emptyText:'输入源单编号',
                             xtype : "textfield",
@@ -171,7 +177,7 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
                             "text": "单据日期",
                             "flex": 1,
                             "dataIndex": "sl_date",
-                            "width": 100,
+                            "width": 150,
                             align:'end'
                         }]
                     });
@@ -202,6 +208,7 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
                             width: 100
                         }],
                         defaultCondition: "1=1",
+                        otherConditon:'',
                         dbSearchFields:[{
                             emptyText:'输入账户名称或者编号',
                             xtype : "textfield",
@@ -313,4 +320,18 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
             me.save();
         }
     },
+    vendnamechange:function(dbfindtrigger){
+        var me = this,
+            viewModel = me.getViewModel();
+
+        var c = viewModel.get('pb_vendname_change');
+        if(c!=null&&c!=''){
+            c = ' and sl_vendid='+c;
+        }else{
+            c ='';
+        }
+        dbfindtrigger.defaultCondition = "sl_vendid<>0 and sl_kind in ('期初余额','采购验收单','采购验退单') and sl_namount<>0" + c;
+        console.log(dbfindtrigger.defaultCondition);
+
+    }
 });

+ 9 - 0
frontend/saas-web/app/view/money/payBalance/FormPanelModel.js

@@ -2,4 +2,13 @@ Ext.define('saas.view.money.payBalance.FormPanelModel', {
     extend: 'saas.view.core.form.FormPanelModel',
     alias: 'viewmodel.money-paybalance-formpanel',
 
+    formulas: {
+        pb_vendname_change: {
+            bind: '{pb_vendid}',
+            get: function(v) {
+                return v;
+            }
+        }
+    }
+
 });

+ 8 - 4
frontend/saas-web/app/view/money/recBalance/FormPanel.js

@@ -62,7 +62,8 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
     }, {
         xtype: "datefield",
         name: "rb_date",
-        fieldLabel: "日期"
+        fieldLabel: "日期",
+        allowBlank : false
     }, {
         xtype: "textfield",
         name: "rb_manname",
@@ -214,7 +215,10 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
                 queryMode : "local",
                 store : null,
                 valueField : "value",
-                xtype : "multidbfindtrigger"
+                xtype : "multidbfindtrigger",
+                listeners:{
+                    beforetriggerclick:'custnamechange'
+                }
             }
         }, {
             text: "业务类型",
@@ -260,7 +264,7 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         }, {
             text: "未核销金额",
             xtype: 'numbercolumn',
-            dataIndex: "pbd_nowbalance",
+            dataIndex: "rbd_nowbalance",
             renderer : function(v) {
                 var arr = (v + '.').split('.');
                 var xr = (new Array(arr[1].length)).fill('0');
@@ -277,7 +281,7 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         }, {
             text: "本次核销金额",
             xtype: 'numbercolumn',
-            dataIndex: "pbd_nowbalance",
+            dataIndex: "rbd_nowbalance",
             editor : {
                 xtype : "numberfield",
                 decimalPrecision: 2

+ 17 - 1
frontend/saas-web/app/view/money/recBalance/FormPanelController.js

@@ -194,6 +194,9 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
                         },{
                             from:'sl_kind',
                             to:'rbd_slkind'
+                        },{
+                            from: 'sl_namount',
+                            to: 'rbd_nowbalance'
                         }],
                         dbtpls: [{
                             field: 'sl_code',
@@ -252,7 +255,7 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
                             "text": "单据日期",
                             "flex": 1,
                             "dataIndex": "sl_date",
-                            "width": 100,
+                            "width": 150,
                             align:'end'
                         }]
                     });
@@ -391,5 +394,18 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
         }else {
             me.save();
         }
+    },
+    custnamechange:function(dbfindtrigger){
+        var me = this,
+            viewModel = me.getViewModel();
+
+        var c = viewModel.get('rb_custname_change');
+        if(c!=null&&c!=''){
+            c = ' and sl_custid='+c;
+        }else{
+            c ='';
+        }
+        dbfindtrigger.defaultCondition = "sl_custid<>0 and sl_kind in ('期初余额','出货单','销售退货单') and sl_namount<>0" + c;
+
     }
 });

+ 8 - 0
frontend/saas-web/app/view/money/recBalance/FormPanelModel.js

@@ -2,4 +2,12 @@ Ext.define('saas.view.money.recBalance.FormPanelModel', {
     extend: 'saas.view.core.form.FormPanelModel',
     alias: 'viewmodel.money-recbalance-formpanel',
 
+    formulas: {
+        rb_custname_change: {
+            bind: '{rb_custid}',
+            get: function(v) {
+                return v;
+            }
+        }
+    }
 });

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

@@ -102,9 +102,9 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
                                 align:'end'
                             }, {
                                 "text": "客户地址",
-                                "flex": 1,
+                                "flex": 2,
                                 "dataIndex": "ca_address",
-                                "width": 250
+                                "width": 300
                             }]
                     }) ;   
 

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

@@ -104,11 +104,13 @@ Ext.define('saas.view.stock.make.FormPanel', {
         xtype : "numberfield", 
         name : "ma_price", 
         fieldLabel : "单位成本",
+        readOnly:true,
         decimals:8,
         columnWidth: 0.25
     },{
         xtype : "numberfield", 
-        name : "ma_total", 
+        name : "ma_total",
+        readOnly:true, 
         fieldLabel : "总成本",
         decimals:2,
         columnWidth: 0.25
@@ -219,6 +221,7 @@ Ext.define('saas.view.stock.make.FormPanel', {
                 xtype: 'numbercolumn',
                 dataIndex : "mm_oneuseqty", 
                 width : 120.0,
+                // hidden:true,
                 editor : {
                     xtype : "numberfield",
                     decimalPrecision: 8,

+ 6 - 1
frontend/saas-web/app/view/stock/make/FormPanelController.js

@@ -505,7 +505,12 @@ Ext.define('saas.view.stock.make.FormPanelController', {
                         mm_oneuseqty:item.bd_baseqty,
                         pr_detail:item.productDTO.pr_detail,
                         pr_spec:item.productDTO.pr_spec,
-                        pr_unit:item.productDTO.pr_unit
+                        pr_unit:item.productDTO.pr_unit,
+                        mm_repprodcode:item.bd_replace,
+                        mm_remark:item.bd_remark,                        
+                        mm_whid:item.productDTO.pr_whid,                        
+                        mm_whcode:item.productDTO.pr_whcode,
+                        mm_whname:item.productDTO.pr_whname
                     })                
                 });
                 store.loadData(loadData);

+ 3 - 0
frontend/saas-web/app/view/stock/make/FormPanelModel.js

@@ -14,6 +14,9 @@ Ext.define('saas.view.stock.make.FormPanelModel', {
                     oneuseqty = item.get('mm_oneuseqty');
                     item.set('mm_qty', oneuseqty*v);               
                 });
+
+                debugger;
+
                 return v;
             }
         }

+ 4 - 0
frontend/saas-web/app/view/stock/otherOut/QueryPanelController.js

@@ -56,11 +56,13 @@ Ext.define('saas.view.stock.otherOut.QueryPanelController', {
                             "text": "税率",
                             "dataIndex": "ve_taxrate",
                             "width": 100,
+                            xtype: 'numbercolumn',
                             align: 'end'
                         }, {
                             "text": "承付天数",
                             "dataIndex": "ve_promisedays",
                             "width": 100,
+                            xtype: 'numbercolumn',
                             align: 'end'
                         }, {
                             "text": "纳税人识别号",
@@ -145,6 +147,7 @@ Ext.define('saas.view.stock.otherOut.QueryPanelController', {
                             "text": "总库存数",
                             "dataIndex": "po_onhand",
                             "width": 100,
+                            xtype: 'numbercolumn',
                             align: 'end'
                         },{
                             "text": "类型",
@@ -166,6 +169,7 @@ Ext.define('saas.view.stock.otherOut.QueryPanelController', {
                             "text": "最小包装",
                             "dataIndex": "pr_zxbzs",
                             "width": 100,
+                            xtype: 'numbercolumn',
                             align: 'end'
                         },{
                             "text": "L/T",

+ 4 - 2
frontend/saas-web/resources/json/navigation.json

@@ -224,9 +224,11 @@
             "text": "资金账户",
             "viewType": "other-bankinformation",
             "leaf": true
-        }, {
+        },{
+            "id":"employee-list-formpanel",
             "text": "人员资料",
-            "viewType": "mainlist",
+            "viewType": "document-employee-basepanel",
+            "addType":"document-employee-formpanel",
             "leaf": true
         }]
     }, {