Browse Source

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

zhuth 7 years ago
parent
commit
dc1ea34b6e
35 changed files with 619 additions and 106 deletions
  1. 1 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java
  2. 102 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/Configs.java
  3. 44 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/ConfigsController.java
  4. 24 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/ConfigsMapper.java
  5. 15 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/ConfigsService.java
  6. 92 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/ConfigsServiceImpl.java
  7. 159 0
      applications/commons/commons-server/src/main/resources/mapper/ConfigsMapper.xml
  8. 4 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomerMapper.java
  9. 3 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/VendorMapper.java
  10. 25 14
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java
  11. 23 11
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/VendorServiceImpl.java
  12. 9 1
      applications/document/document-server/src/main/resources/mapper/CustomerMapper.xml
  13. 9 0
      applications/document/document-server/src/main/resources/mapper/VendorMapper.xml
  14. 2 2
      applications/money/money-server/src/main/resources/mapper/OthspendingsMapper.xml
  15. 1 4
      applications/sale/sale-server/src/main/resources/mapper/SaleMapper.xml
  16. 1 1
      frontend/saas-web/app/view/core/form/FormPanel.js
  17. 1 1
      frontend/saas-web/app/view/document/product/BasePanel.js
  18. 12 3
      frontend/saas-web/app/view/money/fundtransfer/FormPanel.js
  19. 13 6
      frontend/saas-web/app/view/money/fundtransfer/QueryPanel.js
  20. 11 3
      frontend/saas-web/app/view/money/othreceipts/FormPanel.js
  21. 14 15
      frontend/saas-web/app/view/money/othreceipts/QueryPanel.js
  22. 11 2
      frontend/saas-web/app/view/money/othspendings/FormPanel.js
  23. 8 14
      frontend/saas-web/app/view/money/othspendings/QueryPanel.js
  24. 10 0
      frontend/saas-web/app/view/money/payBalance/FormPanel.js
  25. 1 6
      frontend/saas-web/app/view/money/payBalance/QueryPanel.js
  26. 10 0
      frontend/saas-web/app/view/money/recBalance/FormPanel.js
  27. 1 6
      frontend/saas-web/app/view/money/recBalance/QueryPanel.js
  28. 2 6
      frontend/saas-web/app/view/purchase/purchase/FormPanel.js
  29. 1 1
      frontend/saas-web/app/view/purchase/purchase/QueryPanel.js
  30. 2 2
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js
  31. 2 2
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js
  32. 2 2
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js
  33. 2 2
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js
  34. 1 1
      frontend/saas-web/app/view/purchase/report/PurchasePay.js
  35. 1 1
      frontend/saas-web/app/view/sale/sale/FormPanel.js

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

@@ -39,6 +39,7 @@ public enum BizExceptionCode implements BaseExceptionCode {
     PRODUCT_HAS_WAREHOUSE(79502, "存在物料默认仓库资料为该仓库资料,无法删除"),
     PRODUCTWH_HAS_WAREHOUSE(79503, "该仓库资料存在库存,无法删除"),
     ACCOUNT_EXISTS(79503, "账号已存在"),
+    USING_EXISTS(79504, ""),
 
 
 

+ 102 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/Configs.java

@@ -0,0 +1,102 @@
+package com.usoftchina.saas.commons.po;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+
+import java.util.Date;
+
+/** 系统参数
+ * @author: guq
+ * @create: 2018-11-16 11:19
+ **/
+public class Configs {
+
+    private Long id;
+
+    private String code;
+
+    private String description;
+
+    private String data;
+
+    private Long companyId;
+
+    private String creatorName;
+
+    private Integer creatorId;
+
+    private Date createTime;
+
+    private String updaterName;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code == null ? null : code.trim();
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description == null ? null : description.trim();
+    }
+
+    public String getData() {
+        return data;
+    }
+
+    public void setData(String data) {
+        this.data = data == null ? null : data.trim();
+    }
+
+    public Long getCompanyId() {
+        return companyId;
+    }
+
+    public void setCompanyId(Long companyId) {
+        this.companyId = companyId;
+    }
+
+    public String getCreatorName() {
+        return creatorName;
+    }
+
+    public void setCreatorName(String creatorName) {
+        this.creatorName = creatorName == null ? null : creatorName.trim();
+    }
+
+    public Integer getCreatorId() {
+        return creatorId;
+    }
+
+    public void setCreatorId(Integer creatorId) {
+        this.creatorId = creatorId;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getUpdaterName() {
+        return updaterName;
+    }
+
+    public void setUpdaterName(String updaterName) {
+        this.updaterName = updaterName == null ? null : updaterName.trim();
+    }
+}

+ 44 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/ConfigsController.java

@@ -0,0 +1,44 @@
+package com.usoftchina.saas.commons.controller;
+
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.commons.po.Configs;
+import com.usoftchina.saas.commons.service.ConfigsService;
+import com.usoftchina.saas.page.PageRequest;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author: guq
+ * @create: 2018-11-16 10:05
+ **/
+@RestController
+@RequestMapping("/configs")
+public class ConfigsController {
+
+    @Autowired
+    private ConfigsService configsService;
+
+    @GetMapping("/list")
+    public Result<Configs> getListData(PageRequest page, ListReqDTO req) {
+        PageInfo<Configs> listData = configsService.getListData(page, req);
+        return Result.success(listData);
+    }
+
+    @GetMapping("/getConfigByCode")
+    public Result<Configs> getConfigByCode(String code) {
+        Configs data = configsService.getConfigByCode(code);
+        return Result.success(data);
+    }
+
+    @GetMapping("/save")
+    public Result<DocBaseDTO> save(Configs data) {
+        DocBaseDTO baseDTO = configsService.save(data);
+        return Result.success(baseDTO);
+    }
+
+}

+ 24 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/ConfigsMapper.java

@@ -0,0 +1,24 @@
+package com.usoftchina.saas.commons.mapper;
+
+import com.usoftchina.saas.commons.po.Configs;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface ConfigsMapper {
+    int deleteByPrimaryKey(Integer id);
+
+    int insert(Configs record);
+
+    int insertSelective(Configs record);
+
+    Configs selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(Configs record);
+
+    int updateByPrimaryKey(Configs record);
+
+    List<Configs> selectByCondition(@Param("con") String con, @Param("companyId") Long companyId);
+
+    void updateCreator(@Param("userId") Long userId, @Param("userName") String userName, @Param("id") Long id);
+}

+ 15 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/ConfigsService.java

@@ -0,0 +1,15 @@
+package com.usoftchina.saas.commons.service;
+
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.commons.po.Configs;
+import com.usoftchina.saas.page.PageRequest;
+
+public interface ConfigsService {
+    PageInfo getListData(PageRequest page, ListReqDTO req);
+
+    Configs getConfigByCode(String code);
+
+    DocBaseDTO save(Configs data);
+}

+ 92 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/ConfigsServiceImpl.java

@@ -0,0 +1,92 @@
+package com.usoftchina.saas.commons.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.commons.mapper.ConfigsMapper;
+import com.usoftchina.saas.commons.po.Configs;
+import com.usoftchina.saas.commons.po.Status;
+import com.usoftchina.saas.commons.service.ConfigsService;
+import com.usoftchina.saas.commons.service.MessageLogService;
+import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.exception.BizException;
+import com.usoftchina.saas.page.PageDefault;
+import com.usoftchina.saas.page.PageRequest;
+import com.usoftchina.saas.utils.BeanMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
+
+import java.util.List;
+
+/**
+ * @author: guq
+ * @create: 2018-11-16 11:35
+ **/
+@Service
+public class ConfigsServiceImpl implements ConfigsService{
+
+    @Autowired
+    private ConfigsMapper configsMapper;
+    @Autowired
+    private MessageLogService messageLogService;
+
+
+    @Override
+    public PageInfo getListData(@PageDefault(size = 10) PageRequest page, ListReqDTO req) {
+        Long companyId = BaseContextHolder.getCompanyId();
+        PageHelper.startPage(page.getNumber(), page.getSize());
+        List<Configs> list = configsMapper.selectByCondition(req.getFinalCondition(), companyId);
+        //取分页信息
+        PageInfo<Configs> pageInfo = new PageInfo<Configs>(list);
+        return pageInfo;
+    }
+
+    @Override
+    public Configs getConfigByCode(String code) {
+        if (StringUtils.isEmpty(code)) {
+            return null;
+        }
+        List<Configs> list = configsMapper.selectByCondition(code, BaseContextHolder.getCompanyId());
+        if (null != list && list.size() > 0) {
+            return list.get(0);
+        }
+        return null;
+    }
+
+    @Override
+    public DocBaseDTO save(Configs formdata) {
+        if (null == formdata){
+            throw new BizException(50000, "数据为空,请填写后再保存");
+        }
+        //公司ID
+        Long companyId = BaseContextHolder.getCompanyId();
+        //人员Id
+        Long userId = BaseContextHolder.getUserId();
+        String name = BaseContextHolder.getUserName();
+        //返回对象
+        DocBaseDTO baseDTO = null;
+        Long id = formdata.getId();
+
+        //判断更新与保存动作
+        if (StringUtils.isEmpty(id) || "0".equals(id.toString())) {
+            //插入操作
+            formdata.setCompanyId(companyId);
+            configsMapper.insertSelective(formdata);
+            id = formdata.getId();
+            configsMapper.updateCreator(userId, name, id);
+            baseDTO = new DocBaseDTO(id, formdata.getCode(), "Configs");
+            //日志记录
+            messageLogService.save(baseDTO);
+            return baseDTO;
+        }
+
+        //更新操作
+        configsMapper.updateByPrimaryKeySelective(formdata);
+        baseDTO = new DocBaseDTO(id, formdata.getCode(), "Configs");
+        //日志
+        messageLogService.update(baseDTO);
+        return baseDTO;
+    }
+}

+ 159 - 0
applications/commons/commons-server/src/main/resources/mapper/ConfigsMapper.xml

@@ -0,0 +1,159 @@
+<?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.commons.mapper.ConfigsMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.commons.po.Configs" >
+    <id column="id" property="id" jdbcType="INTEGER" />
+    <result column="code" property="code" jdbcType="VARCHAR" />
+    <result column="description" property="description" jdbcType="VARCHAR" />
+    <result column="data" property="data" jdbcType="VARCHAR" />
+    <result column="companyId" property="companyId" jdbcType="INTEGER" />
+    <result column="creatorName" property="creatorName" jdbcType="VARCHAR" />
+    <result column="creatorId" property="creatorId" jdbcType="INTEGER" />
+    <result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
+    <result column="updaterName" property="updaterName" jdbcType="VARCHAR" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    id, code, description, data, companyId, creatorName, creatorId, createTime, updaterName
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    select
+    <include refid="Base_Column_List" />
+    from configs
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+    delete from configs
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.saas.commons.po.Configs" >
+    insert into configs (id, code, description,
+    data, companyId, creatorName,
+    creatorId, createTime, updaterName
+    )
+    values (#{id,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
+    #{data,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}, #{creatorName,jdbcType=VARCHAR},
+    #{creatorId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updaterName,jdbcType=VARCHAR}
+    )
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.commons.po.Configs" >
+    insert into configs
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        id,
+      </if>
+      <if test="code != null" >
+        code,
+      </if>
+      <if test="description != null" >
+        description,
+      </if>
+      <if test="data != null" >
+        data,
+      </if>
+      <if test="companyId != null" >
+        companyId,
+      </if>
+      <if test="creatorName != null" >
+        creatorName,
+      </if>
+      <if test="creatorId != null" >
+        creatorId,
+      </if>
+      <if test="createTime != null" >
+        createTime,
+      </if>
+      <if test="updaterName != null" >
+        updaterName,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="code != null" >
+        #{code,jdbcType=VARCHAR},
+      </if>
+      <if test="description != null" >
+        #{description,jdbcType=VARCHAR},
+      </if>
+      <if test="data != null" >
+        #{data,jdbcType=VARCHAR},
+      </if>
+      <if test="companyId != null" >
+        #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="creatorName != null" >
+        #{creatorName,jdbcType=VARCHAR},
+      </if>
+      <if test="creatorId != null" >
+        #{creatorId,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null" >
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updaterName != null" >
+        #{updaterName,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.commons.po.Configs" >
+    update configs
+    <set >
+      <if test="code != null" >
+        code = #{code,jdbcType=VARCHAR},
+      </if>
+      <if test="description != null" >
+        description = #{description,jdbcType=VARCHAR},
+      </if>
+      <if test="data != null" >
+        data = #{data,jdbcType=VARCHAR},
+      </if>
+      <if test="companyId != null" >
+        companyId = #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="creatorName != null" >
+        creatorName = #{creatorName,jdbcType=VARCHAR},
+      </if>
+      <if test="creatorId != null" >
+        creatorId = #{creatorId,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null" >
+        createTime = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updaterName != null" >
+        updaterName = #{updaterName,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.commons.po.Configs" >
+    update configs
+    set code = #{code,jdbcType=VARCHAR},
+    description = #{description,jdbcType=VARCHAR},
+    data = #{data,jdbcType=VARCHAR},
+    companyId = #{companyId,jdbcType=INTEGER},
+    creatorName = #{creatorName,jdbcType=VARCHAR},
+    creatorId = #{creatorId,jdbcType=INTEGER},
+    createTime = #{createTime,jdbcType=TIMESTAMP},
+    updaterName = #{updaterName,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+
+  <select id="selectByCondition" resultMap="BaseResultMap">
+    select  *  from configs
+    <where>
+      <if test="con != null">
+        ${con}
+      </if>
+      <if test="companyId != null">
+        and  companyId = #{companyId}
+      </if>
+    </where>
+    order by id desc
+  </select>
+
+  <update id="updateCreator">
+    update configs set creatorId = #{userId} , creatorName=#{userName} where id=#{id}
+  </update>
+
+</mapper>

+ 4 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomerMapper.java

@@ -4,6 +4,8 @@ import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.document.entities.Customer;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.Map;
+
 public interface CustomerMapper extends CommonBaseMapper<Customer> {
     int deleteByPrimaryKey(Long cu_id);
 
@@ -27,4 +29,6 @@ public interface CustomerMapper extends CommonBaseMapper<Customer> {
     int validNameAndCodeWhenUpdate(Customer record);
 
     int validFinish(@Param("id") Long id,@Param("companyId") Long companyId);
+
+    void check(Map<String, Object> map);
 }

+ 3 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/VendorMapper.java

@@ -10,6 +10,7 @@ import com.usoftchina.saas.document.entities.VendorList;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
+import java.util.Map;
 
 public interface VendorMapper extends CommonBaseMapper<Vendor> {
 
@@ -28,4 +29,6 @@ public interface VendorMapper extends CommonBaseMapper<Vendor> {
     int getCountByName(@Param("name") String name, @Param("companyId") Long companyId);
 
     int validFinish(@Param("id") Long id,@Param("companyId") Long companyId);
+
+    void check(Map<String, Object> map);
 }

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

@@ -28,9 +28,7 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.StringUtils;
 
 import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
 
 /**
  * Created by zdw
@@ -55,6 +53,8 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
     private MaxnumberService maxnumberService;
     @Autowired
     private SubledgerMapper subledgerMapper;
+    @Autowired
+    private CustomerMapper customerMapper;
 
 
     @Override
@@ -294,17 +294,28 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
     private void singleDelete(Long id) {
         if (null!=id) {
             DocBaseDTO docBaseDTO = getBaseDTOById(id);
-            //主表删除
-            getMapper().deleteByPrimaryKey(id);
-            //从表删除
-            customercontactMapper.deleteByFK(id);
-            customeraddressMapper.deleteByFK(id);
-
-            //删除中间表
-            subledgerMapper.deleteCustomer("期初余额", "期初余额", Math.toIntExact(id));
-
-            //日志
-            messageLogService.delete(docBaseDTO);
+            Map<String, Object> map = new HashMap<String, Object>();
+            map.put("v_id",id);
+            map.put("v_code", docBaseDTO.getCode());
+            map.put("v_type","cust");
+            map.put("v_res","");
+            customerMapper.check(map);
+            Object result =  map.get("v_res");
+            if(!StringUtils.isEmpty(result)){
+                throw new BizException(BizExceptionCode.USING_EXISTS.getCode(),result.toString());
+            }else{
+                //主表删除
+                getMapper().deleteByPrimaryKey(id);
+                //从表删除
+                customercontactMapper.deleteByFK(id);
+                customeraddressMapper.deleteByFK(id);
+
+                //删除中间表
+                subledgerMapper.deleteCustomer("期初余额", "期初余额", Math.toIntExact(id));
+
+                //日志
+                messageLogService.delete(docBaseDTO);
+            }
         }
     }
 

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

@@ -2,6 +2,7 @@ package com.usoftchina.saas.document.service.impl;
 
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.MaxnumberService;
 import com.usoftchina.saas.commons.api.MessageLogService;
@@ -27,11 +28,10 @@ import com.usoftchina.saas.page.PageRequest;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.StringUtils;
 
 import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
 
 /**
  * @author chenwei
@@ -48,6 +48,8 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
     private MaxnumberService maxnumberService;
     @Autowired
     private SubledgerMapper subledgerMapper;
+    @Autowired
+    private VendorMapper vendorMapper;
 
     @Override
     public PageInfo<VendorDTO> getVendorsByCondition(PageRequest page, ListReqDTO listReqDTO) {
@@ -257,14 +259,24 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
     @Override
     public void deleteById(Long id) {
         if(id != null && id > 0){
-            getMapper().deleteByPrimaryKey(id);
-            vendorcontactMapper.deleteByFK(id);
-            String code = getMapper().getCodeById(id, BaseContextHolder.getCompanyId());
-
-            //删除中间表
-            subledgerMapper.deleteVendor("期初余额", "期初余额", Math.toIntExact(id));
-            //记录LOG
-            messageLogService.delete(generateMsgObj(id, code));
+            String code = getMapper().getCodeById(id, new Long(1));
+            Map<String, Object> map = new HashMap<String, Object>();
+            map.put("v_id",id);
+            map.put("v_code", code);
+            map.put("v_type","vend");
+            map.put("v_res","");
+            vendorMapper.check(map);
+            Object result =  map.get("v_res");
+            if(!StringUtils.isEmpty(result)){
+                throw new BizException(BizExceptionCode.USING_EXISTS.getCode(),result.toString());
+            }else{
+                getMapper().deleteByPrimaryKey(id);
+                vendorcontactMapper.deleteByFK(id);
+                //删除中间表
+                subledgerMapper.deleteVendor("期初余额", "期初余额", Math.toIntExact(id));
+                //记录LOG
+                messageLogService.delete(generateMsgObj(id, code));
+            }
         }
     }
 

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

@@ -391,7 +391,15 @@
   select count(1) from periodsdetail where pd_status=99 and pd_detno=(select DATE_FORMAT(cu_begindate,'%Y%m') from customer where cu_id =#{id})
   and companyId =#{companyId};
   </select>
-
+  <select id="check" parameterMap="checkParamMap" statementType="CALLABLE">
+        CALL SP_LIMITBASE(?, ?, ?, ?)
+    </select>
+  <parameterMap id="checkParamMap" type="java.util.Map">
+    <parameter property="v_type" jdbcType="VARCHAR" mode="IN" />
+    <parameter property="v_id" jdbcType="INTEGER" mode="IN" />
+    <parameter property="v_code" jdbcType="VARCHAR" mode="IN" />
+    <parameter property="v_res" jdbcType="VARCHAR" mode="OUT" />
+  </parameterMap>
 
 
 </mapper>

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

@@ -477,5 +477,14 @@
         and companyId =#{companyId};
     </select>
 
+    <select id="check" parameterMap="checkParamMap" statementType="CALLABLE">
+        CALL SP_LIMITBASE(?, ?, ?, ?)
+    </select>
+    <parameterMap id="checkParamMap" type="java.util.Map">
+        <parameter property="v_type" jdbcType="VARCHAR" mode="IN" />
+        <parameter property="v_id" jdbcType="INTEGER" mode="IN" />
+        <parameter property="v_code" jdbcType="VARCHAR" mode="IN" />
+        <parameter property="v_res" jdbcType="VARCHAR" mode="OUT" />
+    </parameterMap>
 </mapper>
 

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

@@ -33,8 +33,8 @@
   <sql id="Base_Column_List" >
     os_id, os_code, os_date, os_vendid, os_vendcode, os_vendname, os_bankid, os_bankcode, 
     os_bankname, os_amount, os_recorderid, os_recorder, os_recorddate, os_status, os_statuscode, 
-    os_remark, companyId, updaterId,
-    updatedate, os_text1, os_text2, os_text3, os_text4,
+    os_remark, othspendings.companyId, othspendings.updaterId,
+    othspendings.updatedate, os_text1, os_text2, os_text3, os_text4,
     os_text5
   </sql>
   <sql id="Detail_Column_List" >

+ 1 - 4
applications/sale/sale-server/src/main/resources/mapper/SaleMapper.xml

@@ -44,10 +44,7 @@
     sa_seller,sa_sellercode,sa_date
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
-    select 
-    <include refid="Base_Column_List" />
-    from sale
-    where sa_id = #{id}
+    select * from sale where sa_id = #{id}
   </select>
   <delete id="deleteByPrimaryKey" parameterType="long" >
     delete from sale

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

@@ -204,7 +204,7 @@ Ext.define('saas.view.core.form.FormPanel', {
         viewModel.set('createTime', Ext.Date.format(new Date(), 'Y-m-d H:i:s'));
         viewModel.set('updateTime', Ext.Date.format(new Date(), 'Y-m-d H:i:s'));
         viewModel.set('creatorId', saas.util.BaseUtil.getCurrentUser().id);
-        viewModel.set('creator', saas.util.BaseUtil.getCurrentUser().realname);
+        viewModel.set('creatorName', saas.util.BaseUtil.getCurrentUser().realname);
 
         if (statusCodeField) {
             var o = {};

+ 1 - 1
frontend/saas-web/app/view/document/product/BasePanel.js

@@ -56,7 +56,7 @@ Ext.define('saas.view.document.product.BasePanel', {
         ]
         }),
         getCondition: function(value) {
-            if(value == 'ALL') {
+            if(value == 'ALL' || !value) {
                 return '1=1';
             }else {
                 return 'pr_statuscode=\'' + value + '\'';

+ 12 - 3
frontend/saas-web/app/view/money/fundtransfer/FormPanel.js

@@ -182,7 +182,7 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
         hidden:true
     }, {
         xtype : "textfield", 
-        name : "creator", 
+        name : "creatorName", 
         fieldLabel : "录入人", 
         readOnly:true
     }, {
@@ -190,6 +190,15 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
         name : "createTime",
         fieldLabel : "录入日期",
         readOnly:true
-    }
-    ]
+    },{
+        xtype: 'textfield',
+        name: 'ft_auditman',
+        fieldLabel: '审核人',
+        hidden: true
+    },{
+        xtype: "datefield",
+        name: "ft_auditdate",
+        fieldLabel: "审核日期",
+        hidden: true
+    }]
 });

+ 13 - 6
frontend/saas-web/app/view/money/fundtransfer/QueryPanel.js

@@ -11,17 +11,23 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
         xtype : "textfield",
         name : "ft_code",
         fieldLabel : "单据编号",
-        columnWidth: 0.3
+    },{
+        xtype : "textfield",
+        name : "ft_recorder",
+        fieldLabel : "制单人",
+    },{
+        xtype : "textfield",
+        name : "ft_auditman",
+        fieldLabel : "审核人",
     },{
         xtype : "condatefield",
         name : "ft_date",
         fieldLabel : "单据日期",
-        columnWidth: 0.6
+        columnWidth: 0.5
     },{
         xtype: 'multicombo',
         name: 'ft_status',
         fieldLabel: '审核状态',
-        columnWidth: 0.3,
         datas: [
             ["已审核", "已审核"],
             ["未审核", "未审核"]
@@ -29,7 +35,6 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
     },{
         name : "ft_status",
         fieldLabel : "结算方式",
-        columnWidth: 0.3,
         xtype:'combo',
         queryMode: 'local',
         displayField: 'display',
@@ -50,12 +55,10 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
         xtype : "dbfindtrigger",
         name : "ftd_bankname",
         fieldLabel : "转出账号",
-        columnWidth: 0.3
     },{
         xtype : "dbfindtrigger",
         name : "ftd_inbankname",
         fieldLabel : "转入账号",
-        columnWidth: 0.3
     }],
     moreQueryFormItems: [],
     queryGridConfig: {
@@ -88,6 +91,10 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
             dataIndex: 'ft_recorder',
             width: 120
         }, {
+            text: '审核人',
+            dataIndex: 'ft_auditman',
+            width: 120
+        },{
             text: '转出账户',
             dataIndex: 'ftd_bankname',
             width: 120

+ 11 - 3
frontend/saas-web/app/view/money/othreceipts/FormPanel.js

@@ -160,7 +160,15 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
         name : "or_recorddate",
         fieldLabel : "录入日期",
         readOnly:true
-    }
-
-    ]
+    },{
+        xtype: 'textfield',
+        name: 'or_auditman',
+        fieldLabel: '审核人',
+        hidden: true
+    },{
+        xtype: "datefield",
+        name: "or_auditdate",
+        fieldLabel: "审核日期",
+        hidden: true
+    }]
 });

+ 14 - 15
frontend/saas-web/app/view/money/othreceipts/QueryPanel.js

@@ -21,7 +21,6 @@ Ext.define('saas.view.money.othreceipts.QueryPanel', {
         xtype: 'textfield',
         name: 'or_code',
         fieldLabel: '单据编号',
-        columnWidth: 0.3
     }, {
         xtype: 'hidden',
         name: 'or_custcode',
@@ -30,31 +29,28 @@ Ext.define('saas.view.money.othreceipts.QueryPanel', {
         xtype: 'dbfindtrigger',
         name: 'or_custname',
         fieldLabel: '客户名称',
-        columnWidth: 0.3
-    }, {
-        xtype : 'hidden',
-        name : 'or_bankid', 
-        fieldLabel : '账户ID'
-     }, {
-        xtype: 'hidden',
-        name: 'or_bankcode',
-        fieldLabel: '账户编号'
     }, {
+        xtype: 'textfield',
+        name: 'or_recorder',
+        fieldLabel: '制单人'
+    },{
+        xtype: 'textfield',
+        name: 'or_auditman',
+        fieldLabel: '审核人'
+    },  {
         xtype: 'dbfindtrigger',
         name: 'or_bankname',
-        columnWidth: 0.3,
         fieldLabel: '账户名称'
     }, {
         xtype: 'condatefield',
         name: 'or_date',
         fieldLabel: '单据日期',
-        columnWidth: 0.6,
+        columnWidth: 0.5,
         operation: 'between'
     }, {
         xtype: 'multicombo',
         name: 'or_status',
         fieldLabel: '审核状态',
-        columnWidth: 0.3,
         datas: [
             ["已审核", "已审核"],
             ["未审核", "未审核"]
@@ -62,7 +58,6 @@ Ext.define('saas.view.money.othreceipts.QueryPanel', {
     }, {
         name: 'ord_type',
         fieldLabel: '收入类别',
-        columnWidth: 0.3,
         xtype : "remotecombo",
         storeUrl:'/api/document/fundinouttype/getCombo?condition=收入',
     }],
@@ -102,7 +97,7 @@ Ext.define('saas.view.money.othreceipts.QueryPanel', {
             dataIndex: 'or_bankname',
             width: 120
         },{
-            text: '金额',
+            text: '收款金额',
             xtype: 'numbercolumn',
             dataIndex: 'or_amount',
             width: 120,
@@ -116,6 +111,10 @@ Ext.define('saas.view.money.othreceipts.QueryPanel', {
             text: '录入人',
             dataIndex: 'or_recorder',
             width: 120
+        },{
+            text: '审核人',
+            dataIndex: 'or_auditman',
+            width: 120
         }, {
             text: '收入类别',
             dataIndex: 'ord_type',

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

@@ -160,6 +160,15 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
         name : "os_recorddate",
         fieldLabel : "录入日期",
         readOnly:true
-    }
-    ]
+    },{
+        xtype: 'textfield',
+        name: 'os_auditman',
+        fieldLabel: '审核人',
+        hidden: true
+    },{
+        xtype: "datefield",
+        name: "os_auditdate",
+        fieldLabel: "审核日期",
+        hidden: true
+    }]
 });

+ 8 - 14
frontend/saas-web/app/view/money/othspendings/QueryPanel.js

@@ -21,40 +21,35 @@ Ext.define('saas.view.money.othspendings.QueryPanel', {
         xtype : 'textfield',
         name : 'os_code',
         fieldLabel : '单据编号',
-        columnWidth: 0.3,
     }, {
         xtype: 'hidden',
         name: 'os_vendcode',
         fieldLabel: '供应商编号',
-        columnWidth: 0.3,
     }, {
         xtype: 'dbfindtrigger',
         name: 'os_vendname',
-        fieldLabel: '供应商名称',
-        columnWidth: 0.3
+        fieldLabel: '供应商名称'
+    }, {
+        xtype: 'textfield',
+        name: 'os_recorder',
+        fieldLabel: '制单人',
     }, {
-        xtype : 'hidden',
-        name : 'os_bankid', 
-        fieldLabel : '结算账户ID'
-     }, {
         xtype: 'hidden',
-        name: 'os_bankcode',
-        fieldLabel: '结算账户编号'
+        name: 'os_auditman',
+        fieldLabel: '审核人',
     }, {
         xtype: 'dbfindtrigger',
         name: 'os_bankname',
         fieldLabel: '结算账户',
-        columnWidth: 0.3
     },{
         xtype: 'condatefield',
         name: 'os_date',
-        columnWidth: 0.6,
+        columnWidth: 0.5,
         fieldLabel: '单据日期'
     },{
         xtype: 'multicombo',
         name: 'os_status',
         fieldLabel: '审核状态',
-        columnWidth: 0.3,
         datas: [
             ["已审核", "已审核"],
             ["未审核", "未审核"]
@@ -62,7 +57,6 @@ Ext.define('saas.view.money.othspendings.QueryPanel', {
     },{
         name: 'ord_type',
         fieldLabel: '支出类别',
-        columnWidth: 0.3,
         xtype : "remotecombo",
         storeUrl:'/api/document/fundinouttype/getCombo?condition=支出',
     }],

+ 10 - 0
frontend/saas-web/app/view/money/payBalance/FormPanel.js

@@ -374,6 +374,16 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         xtype: 'hidden',
         name: 'pb_text5',
         fieldLabel: '自定义字段5'
+    },{
+        xtype: 'textfield',
+        name: 'pb_auditman',
+        fieldLabel: '审核人',
+        hidden: true
+    },{
+        xtype: "datefield",
+        name: "pb_auditdate",
+        fieldLabel: "审核日期",
+        hidden: true
     }],
 
     beforeAudit: function() {

+ 1 - 6
frontend/saas-web/app/view/money/payBalance/QueryPanel.js

@@ -11,33 +11,28 @@ Ext.define('saas.view.money.paybalance.QueryPanel', {
         xtype: 'textfield',
         name: 'pb_code',
         fieldLabel: '单据编号',
-        columnWidth: 0.3
     },{
         xtype: 'dbfindtrigger',
         name: 'pb_vendname',
         fieldLabel: '供应商',
-        columnWidth: 0.3
     },{
         xtype: 'textfield',
         name: 'pb_manname',
         fieldLabel: '付款人',
-        columnWidth: 0.3
     },{
         xtype: 'dbfindtrigger',
         name: 'pd_bankname',
         fieldLabel: '资金账户',
-        columnWidth: 0.3
     },{
         xtype: 'condatefield',
         name: 'pb_date',
         fieldLabel: '单据日期',
-        columnWidth: 0.6,
+        columnWidth: 0.5,
         operation: 'between'
     },{
         xtype: 'multicombo',
         name: 'pb_status',
         fieldLabel: '审核状态',
-        columnWidth: 0.3,
         datas: [
             ["已审核", "已审核"],
             ["未审核", "未审核"]

+ 10 - 0
frontend/saas-web/app/view/money/recBalance/FormPanel.js

@@ -343,6 +343,16 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         name: "rb_recorddate",
         fieldLabel: "录入日期",
         hidden: true
+    }, {
+        xtype: 'textfield',
+        name: 'rb_auditman',
+        fieldLabel: '审核人',
+        hidden: true
+    },{
+        xtype: "datefield",
+        name: "rb_auditdate",
+        fieldLabel: "审核日期",
+        hidden: true
     }],
 
     beforeAudit: function() {

+ 1 - 6
frontend/saas-web/app/view/money/recBalance/QueryPanel.js

@@ -19,33 +19,28 @@ Ext.define('saas.view.money.recBalance.QueryPanel', {
         xtype: 'textfield',
         name: 'rb_code',
         fieldLabel: '单据编号',
-        columnWidth: 0.3,
     }, {
         xtype: 'dbfindtrigger',
         name: 'rb_custname',
         fieldLabel: '客户名',
-        columnWidth: 0.3,
     }, {
         xtype: 'textfield',
         name: 'rb_manname',
         fieldLabel: '收款人',
-        columnWidth: 0.3,
     },{
         xtype: 'textfield',
         name: 'rd_bankname',
         fieldLabel: '资金账户',
-        columnWidth: 0.3,
     },  {
         xtype: 'condatefield',
         name: 'rb_date',
         fieldLabel: '单据日期',
-        columnWidth: 0.6,
+        columnWidth: 0.5,
         operation: 'between'
     },{
         xtype: 'multicombo',
         name: 'rb_status',
         fieldLabel: '审核状态',
-        columnWidth: 0.3,
         datas: [
             ["已审核", "已审核"],
             ["未审核", "未审核"]

+ 2 - 6
frontend/saas-web/app/view/purchase/purchase/FormPanel.js

@@ -38,10 +38,6 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
         xtype: 'hidden',
         name: 'id',
         fieldLabel: 'id'
-    },{
-        xtype: 'numberfield',
-        name: 'pi_ioid',
-        fieldLabel: 'pi_ioid'
     },{
         xtype : "hidden", 
         name : "pu_vendid", 
@@ -359,7 +355,7 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
     },
     {
         xtype : "textfield", 
-        name : "creator", 
+        name : "creatorName", 
         fieldLabel : "录入人", 
         readOnly:true
     }, {
@@ -375,7 +371,7 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
         readOnly:true
     },{
         xtype : "hidden", 
-        name : "updater", 
+        name : "updaterName", 
         fieldLabel : "更新人", 
         readOnly:true
     }, {

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

@@ -143,7 +143,7 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
             width: 0
         }, {
             text: '录入人',
-            dataIndex: 'creator',
+            dataIndex: 'creatorName',
             width: 0
         }, {
             text: '录入日期',

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

@@ -350,7 +350,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
     },
     {
         xtype : "textfield", 
-        name : "creator", 
+        name : "creatorName", 
         fieldLabel : "录入人", 
         readOnly:true
     }, {
@@ -366,7 +366,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
         readOnly:true
     },{
         xtype : "hidden", 
-        name : "updater", 
+        name : "updaterName", 
         fieldLabel : "更新人", 
         readOnly:true
     }, {

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

@@ -133,7 +133,7 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
             width: 0
         }, {
             text: '录入人',
-            dataIndex: 'creator',
+            dataIndex: 'creatorName',
             width: 0
         }, {
             text: '录入日期',
@@ -146,7 +146,7 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
             width: 0
         }, {
             text: '更新人',
-            dataIndex: 'updater',
+            dataIndex: 'updaterName',
             width: 0
         }, {
             text: '更新日期',

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

@@ -335,7 +335,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
     },
     {
         xtype : "textfield", 
-        name : "creator", 
+        name : "creatorName", 
         fieldLabel : "录入人", 
         readOnly:true
     }, {
@@ -351,7 +351,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
         readOnly:true
     },{
         xtype : "hidden", 
-        name : "updater", 
+        name : "updaterName", 
         fieldLabel : "更新人", 
         readOnly:true
     }, {

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

@@ -137,7 +137,7 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
             width: 0
         }, {
             text: '录入人',
-            dataIndex: 'creator',
+            dataIndex: 'creatorName',
             width: 0
         }, {
             text: '录入日期',
@@ -150,7 +150,7 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
             width: 0
         }, {
             text: '更新人',
-            dataIndex: 'updater',
+            dataIndex: 'updaterName',
             width: 0
         }, {
             text: '更新日期',

+ 1 - 1
frontend/saas-web/app/view/purchase/report/PurchasePay.js

@@ -44,7 +44,7 @@ Ext.define('saas.view.purchase.report.PurchasePay', {
         width: 200
     }, {
         text: '录入人',
-        dataIndex: 'creator',
+        dataIndex: 'creatorName',
         width: 200
     }, {
         text : "日期", 

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

@@ -316,7 +316,7 @@ Ext.define('saas.view.sale.sale.FormPanel', {
         readOnly:true
      }, {
         xtype : "textfield", 
-        name : "sa_recorder", 
+        name : "creatorName", 
         fieldLabel : "录入人", 
         readOnly:true
     }, {