huangx 7 år sedan
förälder
incheckning
49899d5a8c
31 ändrade filer med 202 tillägg och 118 borttagningar
  1. 3 2
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java
  2. 1 1
      applications/commons/commons-server/src/main/resources/application.yml
  3. 3 3
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Bom.java
  4. 2 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/BomMapper.java
  5. 16 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/BomServiceImpl.java
  6. 2 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java
  7. 5 3
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java
  8. 3 3
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/VendorServiceImpl.java
  9. 4 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/WarehouseServiceImpl.java
  10. 1 1
      applications/document/document-server/src/main/resources/application.yml
  11. 3 0
      applications/document/document-server/src/main/resources/mapper/BomMapper.xml
  12. 2 0
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/ProdInOutMapper.java
  13. 1 0
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/ProdInOutServiceImpl.java
  14. 5 6
      applications/sale/sale-server/src/main/resources/mapper/ProdIODetailMapper.xml
  15. 4 4
      applications/sale/sale-server/src/main/resources/mapper/ProdInOutMapper.xml
  16. 1 0
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/MakeMapper.java
  17. 19 6
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/MakeServiceImpl.java
  18. 96 74
      applications/storage/storage-server/src/main/resources/mapper/MakeMapper.xml
  19. 2 1
      base-servers/account/account-server/src/main/resources/mapper/AccountRoleMapper.xml
  20. 6 0
      framework/core/src/main/java/com/usoftchina/saas/utils/RegexpUtils.java
  21. 11 2
      frontend/saas-web/app/view/core/dbfind/types/VendorDbfindTrigger.js
  22. 2 2
      frontend/saas-web/app/view/document/customer/FormPanel.js
  23. 2 2
      frontend/saas-web/app/view/document/product/BasePanel.js
  24. 1 1
      frontend/saas-web/app/view/document/vendor/FormPanel.js
  25. 1 0
      frontend/saas-web/app/view/money/othreceipts/FormPanel.js
  26. 1 0
      frontend/saas-web/app/view/money/othreceipts/QueryPanel.js
  27. 1 0
      frontend/saas-web/app/view/money/othspendings/FormPanel.js
  28. 1 0
      frontend/saas-web/app/view/money/othspendings/QueryPanel.js
  29. 0 1
      frontend/saas-web/app/view/purchase/purchase/QueryPanel.js
  30. 2 2
      frontend/saas-web/app/view/purchase/report/PurchasePay.js
  31. 1 1
      frontend/saas-web/app/view/stock/make/FormPanel.js

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

@@ -39,9 +39,10 @@ public enum BizExceptionCode implements BaseExceptionCode {
     REPEAT_TEL(79504, "电话号码重复"),
     NO_DATA(79998, "未找到数据"),
     ILLEGAL_ID(79999, "id不正确"),
-    PRODUCT_HAS_WAREHOUSE(79502, "存在物料默认仓库资料为该仓库资料,无法删除"),
+    PRODUCT_HAS_WAREHOUSE(79502, "存在物料默认仓库资料为该仓库,无法删除"),
+    CLOSE_WAREHOUSE(79506, "存在物料默认仓库资料为该仓库,无法关闭"),
     PRODUCTWH_HAS_WAREHOUSE(79503, "该仓库资料存在库存,无法删除"),
-    ACCOUNT_EXISTS(79503, "账号已存在"),
+    ACCOUNT_EXISTS(79505, "账号已存在"),
     DEAL_FAILED(79800, "编号:<u>%s</u>处理失败,%s"),
     USING_EXISTS(79504, ""),
 

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

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

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

@@ -7,7 +7,7 @@ import java.io.Serializable;
 import java.util.Date;
 
 public class Bom extends CommonBaseEntity implements Serializable {
-    private Integer bo_motherid;
+    private Long bo_motherid;
 
     private String bo_mothercode;
 
@@ -75,11 +75,11 @@ public class Bom extends CommonBaseEntity implements Serializable {
         this.pr_orispeccode = pr_orispeccode;
     }
 
-    public Integer getBo_motherid() {
+    public Long getBo_motherid() {
         return bo_motherid;
     }
 
-    public void setBo_motherid(Integer bo_motherid) {
+    public void setBo_motherid(Long bo_motherid) {
         this.bo_motherid = bo_motherid;
     }
 

+ 2 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/BomMapper.java

@@ -26,4 +26,6 @@ public interface BomMapper extends CommonBaseMapper<Bom> {
     int validateCodeWhenUpdate(@Param("code") String code, @Param("id") Long id, @Param("companyId") Long company);
 
     List<Bom> getListData(@Param("condition") String condition, @Param("companyId") Long companyId);
+
+    int getCountFromMake(Long id);
 }

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

@@ -112,9 +112,17 @@ public class BomServiceImpl extends CommonBaseServiceImpl<BomMapper, Bom> implem
         if(id == null || id <= 0){
             throw new BizException(BizExceptionCode.ILLEGAL_ID);
         }
+        //校验BOM资料是否已被使用
+        Long prodId = getMapper().selectByPrimaryKey(id).getBo_motherid();
+        int count = getMapper().getCountFromMake(prodId);
+        if (count > 0){
+            throw new BizException(BizExceptionCode.BIZ_RELDELETE);
+        }
+
         String code = getMapper().selectByPrimaryKey(id).getBo_mothercode();
-        getMapper().deleteByPrimaryKey(id);
         bomDetailMapper.deleteByFK(id);
+        getMapper().deleteByPrimaryKey(id);
+
         //记录LOG
         messageLogService.delete(generateMsgObj(id, code));
     }
@@ -174,6 +182,13 @@ public class BomServiceImpl extends CommonBaseServiceImpl<BomMapper, Bom> implem
     @Override
     public DocBaseDTO close(Long id) {
         if(id != null && id > 0){
+            //校验BOM资料是否已被使用
+            Long prodId = getMapper().selectByPrimaryKey(id).getBo_motherid();
+            int count = getMapper().getCountFromMake(prodId);
+            if (count > 0){
+                throw new BizException(BizExceptionCode.BIZ_RELDELETE);
+            }
+
             Bom bom = new Bom();
             bom.setId(id);
             bom.setBo_status(Status.CLOSE.getDisplay());

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

@@ -291,7 +291,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
     }
 
     @Transactional
-    private void singleDelete(Long id) {
+    public void singleDelete(Long id) {
         if (null!=id) {
             DocBaseDTO docBaseDTO = getBaseDTOById(id);
             Map<String, Object> map = new HashMap<String, Object>();
@@ -398,7 +398,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
             getMapper().updateByPrimaryKeySelective(customer);
             docBaseDTO = getBaseDTOById(id);
             //日志
-            messageLogService.close(docBaseDTO);
+        messageLogService.open(docBaseDTO);
         }
         return docBaseDTO;
     }

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

@@ -24,6 +24,7 @@ import com.usoftchina.saas.document.service.ProductService;
 import com.usoftchina.saas.document.service.WarehouseService;
 import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.page.PageRequest;
+import com.usoftchina.saas.utils.RegexpUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -88,10 +89,11 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
         //校验明细仓库是否重复
         validRepeatWarehouse(productDetailList);
 
-        //保存
-        String code = pushMaxnubmer(product.getPr_code(), product.getId());
-
+        String prCode = product.getPr_code().trim().toUpperCase();
+        prCode = RegexpUtils.replaceSpecCharacter(prCode);
+        String code = pushMaxnubmer(prCode, product.getId());
         if(product.getId() == 0){
+            //保存
             product.setCompanyId(companyId);
             product.setCreatorId(userId);
             product.setCreateTime(new Date());

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

@@ -113,11 +113,10 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
             throw new BizException(BizExceptionCode.EMPTY_DATA);
         }
         Vendor main = vendorListDTO.getMain();
-        String code = null;
         main.setCompanyId(BaseContextHolder.getCompanyId());
         List<Vendorcontact> items = vendorListDTO.getItems();
+        String code = pushMaxnubmer(main.getVe_code(), main.getId());
         if(main.getId() == 0){
-            code = pushMaxnubmer(main.getVe_code(), main.getId());
             int count = getMapper().getCountByCode(code, companyId);
             if(count > 0){
                 throw new BizException(BizExceptionCode.REPEAT_NAME);
@@ -150,9 +149,10 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
             //记录LOG
             messageLogService.save(generateMsgObj(mainId, code));
         }else{
-            code = main.getVe_code();
+            main.setVe_code(code);
             Long mainId = main.getId();
             Vendor oldVendor = getMapper().selectByPrimaryKey(main.getId());
+
             int count = getMapper().getCountByCode(code, companyId);
             if (!code.equals(oldVendor.getVe_code())){
                 if (count > 0){

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

@@ -162,6 +162,10 @@ public class WarehouseServiceImpl extends CommonBaseServiceImpl<WarehouseMapper,
     @Override
     public DocBaseDTO close(Long id) {
         if(id != null && id > 0){
+            int num = warehouseMapper.deleteCheckProduct(id, BaseContextHolder.getCompanyId());
+            if (num > 0) {
+                throw new BizException(BizExceptionCode.CLOSE_WAREHOUSE);
+            }
             Warehouse warehouse = new Warehouse();
             warehouse.setId(id);
             warehouse.setWh_status(Status.CLOSE.getDisplay());

+ 1 - 1
applications/document/document-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}@192.168.0.181:8510/eureka/
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@127.0.0.1:8500/eureka/
 management:
   endpoints:
     web:

+ 3 - 0
applications/document/document-server/src/main/resources/mapper/BomMapper.xml

@@ -273,4 +273,7 @@
     </where>
     ORDER BY BO_ID DESC
   </select>
+    <select id="getCountFromMake" parameterType="java.lang.Long">
+        SELECT COUNT(*) FROM MAKE WHERE MA_PRODID = #{id}
+    </select>
 </mapper>

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

@@ -43,4 +43,6 @@ public interface ProdInOutMapper extends CommonBaseMapper<ProdInOut> {
     void updatePiTotal(Long id);
 
     List<HashMap<String, Object>> getWareHouseByCode(@Param("code") String code, @Param("companyId") Long companyId);
+
+    void updateCreator(@Param("userId") Long userId, @Param("userName") String userName, @Param("id") Long id);
 }

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

@@ -116,6 +116,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             //插入操作
             prodInOutMapper.insertSelective(prodInOut);
             pi_id = prodInOut.getId();
+            prodInOutMapper.updateCreator(userId, BaseContextHolder.getUserName(), pi_id);
             //添加从表传输对象
             for (ProdIODetailDTO item : items) {
                 ProdIODetail detail = BeanMapper.map(item,ProdIODetail.class);

+ 5 - 6
applications/sale/sale-server/src/main/resources/mapper/ProdIODetailMapper.xml

@@ -38,6 +38,7 @@
     <result column="pd_text3" jdbcType="VARCHAR" property="pd_text3" />
     <result column="pd_text4" jdbcType="VARCHAR" property="pd_text4" />
     <result column="pd_text5" jdbcType="VARCHAR" property="pd_text5" />
+    <result column="pd_remark" jdbcType="VARCHAR" property="pd_remark" />
     <result column="pd_ym" jdbcType="INTEGER" property="pd_ym" />
     <result column="pd_yqty" jdbcType="INTEGER" property="pd_yqty" />
     <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
@@ -73,9 +74,9 @@
       <result column="pr_text4" property="pr_text4"/>
     </association>
   </resultMap>
-  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.storage.po.ProdIODetail">
+<!--  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.storage.po.ProdIODetail">
     <result column="pd_remark" jdbcType="LONGVARCHAR" property="pd_remark" />
-  </resultMap>
+  </resultMap>-->
   <sql id="Example_Where_Clause">
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -144,11 +145,9 @@
   <sql id="Blob_Column_List">
     pd_remark
   </sql>
-   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
+   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     select 
-    <include refid="Base_Column_List" />
-    ,
-    <include refid="Blob_Column_List" />
+    *
     from prodiodetail
     where pd_id = #{pd_id,jdbcType=INTEGER}
   </select>

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

@@ -109,9 +109,7 @@
   </sql>
     <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
     select 
-    <include refid="Base_Column_List" />
-    ,
-    <include refid="Blob_Column_List" />
+    *
     from prodinout
     where pi_id = #{pi_id,jdbcType=INTEGER}
   </select>
@@ -560,5 +558,7 @@ update ProdInOut SET
   <select id="getWareHouseByCode" resultType="java.util.HashMap">
     select pr_whid,pr_whcode,pr_whname from product where pr_code=#{code} and companyid=#{companyId} and pr_statuscode='OPEN'
   </select>
-
+  <update id="updateCreator">
+    update ProdInOut set creatorId = #{userId} , creatorName=#{userName} where pi_id=#{id}
+  </update>
 </mapper>

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

@@ -29,4 +29,5 @@ public interface MakeMapper extends CommonBaseMapper<Make> {
 
     String selectMakeInOutCode(@Param("code") String code, @Param("companyId") Long companyId, @Param("type") String type);
 
+    void updateCreator(@Param("userId") Long userId,@Param("userName") String userName,@Param("id") Long ma_id);
 }

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

@@ -3,6 +3,7 @@ package com.usoftchina.saas.storage.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.CommonService;
 import com.usoftchina.saas.commons.api.MaxnumberService;
 import com.usoftchina.saas.commons.api.MessageLogService;
 import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
@@ -48,6 +49,9 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
     private ProdIODetailMapper prodIODetailMapper;
     @Autowired
     private WarehouseApi warehouseApi;
+    @Autowired
+    private CommonService commonService;
+
 
     @Override
     public PageInfo<Make> getList(PageRequest page, ListReqDTO listReqDTO) {
@@ -78,20 +82,29 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
     @Override
     @Transactional
     public DocBaseDTO saveOrUpdate(MakeListDTO makeListDTO) {
+        if (null == makeListDTO || null == makeListDTO.getMain()){
+            throw new BizException(BizExceptionCode.EMPTY_DATA);
+        }
+
+        //公司ID
+        Long companyId = BaseContextHolder.getCompanyId();
+        //人员Id
+        Long userId = BaseContextHolder.getUserId();
+        //人员名称
+        String userName = BaseContextHolder.getUserName();
         Make make = makeListDTO.getMain();
+        Long ma_id = make.getId();
         List<MakeMaterial> makeMaterialList = makeListDTO.getItems();
+        String code = pushMaxnubmer(make.getMa_code(), make.getId());
         DocBaseDTO docBaseDTO = null;
-
         if(make.getId() == 0){
             //保存主表
-            String code = pushMaxnubmer(make.getMa_code(), make.getId());
-            make.setMa_code(code);
             make.setCompanyId(BaseContextHolder.getCompanyId());
-            //make.setCreateTime(new Date());
-            make.setMa_recorddate(make.getCreateTime());
-            make.setCreatorId(BaseContextHolder.getUserId());
 
+            make.setMa_code(code);
             getMapper().insertSelective(make);
+            //录入人
+            getMapper().updateCreator(userId, userName, ma_id);
             if (makeMaterialList.size() > 0) {
                 //保存明细
                 for (MakeMaterial makeMaterial : makeMaterialList) {

+ 96 - 74
applications/storage/storage-server/src/main/resources/mapper/MakeMapper.xml

@@ -26,7 +26,11 @@
     <result column="ma_auditdate" property="ma_auditdate" jdbcType="DOUBLE" />
     <result column="companyId" property="companyId" jdbcType="INTEGER" />
     <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
+    <result column="updaterName" property="updaterName" jdbcType="VARCHAR" />
     <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+    <result column="creatorid" property="creatorId" jdbcType="INTEGER"/>
+    <result column="creatorName" property="creatorName" jdbcType="VARCHAR" />
+    <result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
     <result column="ma_text1" property="ma_text1" jdbcType="VARCHAR" />
     <result column="ma_text2" property="ma_text2" jdbcType="VARCHAR" />
     <result column="ma_text3" property="ma_text3" jdbcType="VARCHAR" />
@@ -36,7 +40,7 @@
   <sql id="Base_Column_List" >
     ma_id, ma_code, ma_status, ma_statuscode, ma_type, ma_prodid, ma_prodcode, ma_proddetail, 
     ma_prodspec, ma_version, ma_produnit, ma_qty, ma_whid, ma_whcode, ma_whname, ma_recorddate,
-    ma_recordid, ma_recorder, ma_price, ma_total,ma_auditman,ma_auditdate, companyId, updaterId, updateTime, ma_text1,
+    ma_recordid, ma_recorder, ma_price, ma_total,ma_auditman,ma_auditdate, companyId, updaterId,updaterName,updateTime,creatorid,creatorName,createtime, ma_text1,
     ma_text2, ma_text3, ma_text4, ma_text5
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
@@ -74,192 +78,214 @@
       #{ma_text3,jdbcType=VARCHAR}, #{ma_text4,jdbcType=VARCHAR}, #{ma_text5,jdbcType=VARCHAR}
       )
   </insert>
-  <insert id="insertSelective" parameterType="com.usoftchina.saas.storage.po.Make" >
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.storage.po.Make">
     <selectKey resultType="java.lang.Long" keyProperty="id">
       SELECT LAST_INSERT_ID() AS ID
     </selectKey>
     insert into make
-    <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="ma_code != null" >
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+
+      <if test="ma_code != null">
         ma_code,
       </if>
-      <if test="ma_status != null" >
+      <if test="ma_status != null">
         ma_status,
       </if>
-      <if test="ma_statuscode != null" >
+      <if test="ma_statuscode != null">
         ma_statuscode,
       </if>
-      <if test="ma_type != null" >
+      <if test="ma_type != null">
         ma_type,
       </if>
-      <if test="ma_prodid != null" >
+      <if test="ma_prodid != null">
         ma_prodid,
       </if>
-      <if test="ma_prodcode != null" >
+      <if test="ma_prodcode != null">
         ma_prodcode,
       </if>
-      <if test="ma_proddetail != null" >
+      <if test="ma_proddetail != null">
         ma_proddetail,
       </if>
-      <if test="ma_prodspec != null" >
+      <if test="ma_prodspec != null">
         ma_prodspec,
       </if>
-      <if test="ma_version != null" >
+      <if test="ma_version != null">
         ma_version,
       </if>
-      <if test="ma_produnit != null" >
+      <if test="ma_produnit != null">
         ma_produnit,
       </if>
-      <if test="ma_qty != null" >
+      <if test="ma_qty != null">
         ma_qty,
       </if>
-      <if test="ma_whid != null" >
+      <if test="ma_whid != null">
         ma_whid,
       </if>
-      <if test="ma_whcode != null" >
+      <if test="ma_whcode != null">
         ma_whcode,
       </if>
-      <if test="ma_whname != null" >
-          ma_whname,
+      <if test="ma_whname != null">
+        ma_whname,
       </if>
-      <if test="createTime != null" >
+      <if test="ma_recorddate != null">
         ma_recorddate,
       </if>
-      <if test="ma_recordid != null" >
+      <if test="ma_recordid != null">
         ma_recordid,
       </if>
-      <if test="ma_recorder != null" >
+      <if test="ma_recorder != null">
         ma_recorder,
       </if>
-      <if test="ma_price != null" >
+      <if test="ma_price != null">
         ma_price,
       </if>
-      <if test="ma_total != null" >
+      <if test="ma_total != null">
         ma_total,
       </if>
-      <if test="ma_auditman !=null">
+      <if test="ma_auditman != null">
         ma_auditman,
       </if>
-      <if test="ma_auditdate !=null">
+      <if test="ma_auditdate != null">
         ma_auditdate,
       </if>
-      <if test="companyId != null" >
+      <if test="companyId != null">
         companyId,
       </if>
-      <if test="updaterId != null" >
+      <if test="updaterId != null">
         updaterId,
       </if>
-      <if test="updateTime != null" >
+      <if test="updateTime != null">
         updateTime,
       </if>
-      <if test="ma_text1 != null" >
+      <if test="ma_text1 != null">
         ma_text1,
       </if>
-      <if test="ma_text2 != null" >
+      <if test="ma_text2 != null">
         ma_text2,
       </if>
-      <if test="ma_text3 != null" >
+      <if test="ma_text3 != null">
         ma_text3,
       </if>
-      <if test="ma_text4 != null" >
+      <if test="ma_text4 != null">
         ma_text4,
       </if>
-      <if test="ma_text5 != null" >
+      <if test="ma_text5 != null">
         ma_text5,
       </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="ma_code != null" >
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+
+      <if test="ma_code != null">
         #{ma_code,jdbcType=VARCHAR},
       </if>
-      <if test="ma_status != null" >
+      <if test="ma_status != null">
         #{ma_status,jdbcType=VARCHAR},
       </if>
-      <if test="ma_statuscode != null" >
+      <if test="ma_statuscode != null">
         #{ma_statuscode,jdbcType=VARCHAR},
       </if>
-      <if test="ma_type != null" >
+      <if test="ma_type != null">
         #{ma_type,jdbcType=VARCHAR},
       </if>
-      <if test="ma_prodid != null" >
+      <if test="ma_prodid != null">
         #{ma_prodid,jdbcType=INTEGER},
       </if>
-      <if test="ma_prodcode != null" >
+      <if test="ma_prodcode != null">
         #{ma_prodcode,jdbcType=VARCHAR},
       </if>
-      <if test="ma_proddetail != null" >
+      <if test="ma_proddetail != null">
         #{ma_proddetail,jdbcType=VARCHAR},
       </if>
-      <if test="ma_prodspec != null" >
+      <if test="ma_prodspec != null">
         #{ma_prodspec,jdbcType=VARCHAR},
       </if>
-      <if test="ma_version != null" >
+      <if test="ma_version != null">
         #{ma_version,jdbcType=VARCHAR},
       </if>
-      <if test="ma_produnit != null" >
+      <if test="ma_produnit != null">
         #{ma_produnit,jdbcType=VARCHAR},
       </if>
-      <if test="ma_qty != null" >
+      <if test="ma_qty != null">
         #{ma_qty,jdbcType=DOUBLE},
       </if>
-      <if test="ma_whid != null" >
+      <if test="ma_whid != null">
         #{ma_whid,jdbcType=INTEGER},
       </if>
-      <if test="ma_whcode != null" >
+      <if test="ma_whcode != null">
         #{ma_whcode,jdbcType=VARCHAR},
       </if>
-      <if test="ma_whname != null" >
-          #{ma_whname,jdbcType=VARCHAR},
+      <if test="ma_whname != null">
+        #{ma_whname,jdbcType=VARCHAR},
       </if>
-      <if test="ma_recorddate != null" >
+      <if test="ma_recorddate != null">
         #{ma_recorddate,jdbcType=TIMESTAMP},
       </if>
-      <if test="ma_recordid != null" >
+      <if test="ma_recordid != null">
         #{ma_recordid,jdbcType=INTEGER},
       </if>
-      <if test="ma_recorder != null" >
+      <if test="ma_recorder != null">
         #{ma_recorder,jdbcType=VARCHAR},
       </if>
-      <if test="ma_price != null" >
+      <if test="ma_price != null">
         #{ma_price,jdbcType=DOUBLE},
       </if>
-      <if test="ma_total != null" >
+      <if test="ma_total != null">
         #{ma_total,jdbcType=DOUBLE},
       </if>
-      <if test="ma_auditman !=null">
+      <if test="ma_auditman != null">
         #{ma_auditman,jdbcType=VARCHAR},
       </if>
-      <if test="ma_auditdate !=null">
+      <if test="ma_auditdate != null">
         #{ma_auditdate,jdbcType=TIMESTAMP},
       </if>
-
-
-
-
-      <if test="companyId != null" >
+      <if test="companyId != null">
         #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="updaterId != null" >
+      <if test="updaterId != null">
         #{updaterId,jdbcType=INTEGER},
       </if>
-      <if test="updateTime != null" >
+      <if test="updateTime != null">
         #{updateTime,jdbcType=TIMESTAMP},
       </if>
-      <if test="ma_text1 != null" >
+      <if test="ma_text1 != null">
         #{ma_text1,jdbcType=VARCHAR},
       </if>
-      <if test="ma_text2 != null" >
+      <if test="ma_text2 != null">
         #{ma_text2,jdbcType=VARCHAR},
       </if>
-      <if test="ma_text3 != null" >
+      <if test="ma_text3 != null">
         #{ma_text3,jdbcType=VARCHAR},
       </if>
-      <if test="ma_text4 != null" >
+      <if test="ma_text4 != null">
         #{ma_text4,jdbcType=VARCHAR},
       </if>
-      <if test="ma_text5 != null" >
+      <if test="ma_text5 != null">
         #{ma_text5,jdbcType=VARCHAR},
       </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.storage.po.Make" >
@@ -417,12 +443,8 @@
         SELECT PI_INOUTNO FROM PRODINOUT WHERE COMPANYID=#{companyId} AND PI_MACODE=#{code} AND PI_CLASS=#{type}
     </select>
 
-  <update id="calcMakePriceAndTotal" parameterType="long" >
-  update makematerial set mm_price = (select pw_avprice from productwh where pw_prodid = mm_prodid and pw_whid = mm_whid) where mm_maid = #{id};
-  update makematerial set mm_amount = round(mm_price*mm_qty,2) where mm_maid = #{id};
-  update make set ma_total = round((select sum(mm_amount) from makematerial where mm_maid = #{id} ),2) where ma_id = #{id};
-  update make set ma_price = ma_total/ma_qty where ma_id = #{id};
+  <update id="updateCreator">
+    update make set creatorId = #{userId} , creatorName=#{userName} where ma_id=#{id}
   </update>
 
-
 </mapper>

+ 2 - 1
base-servers/account/account-server/src/main/resources/mapper/AccountRoleMapper.xml

@@ -19,6 +19,7 @@
     <select id="selectAccountRole" resultType="com.usoftchina.saas.account.dto.AccountRoleDTO">
         SELECT a.id id,a.username,a.realname,a.email,a.mobile,GROUP_CONCAT(c.name) roleNames,GROUP_CONCAT(c.id) roleIds
         FROM ac_account a
+        left join ac_account_company d on a.id = d.account_id
         left join ac_account_role b on a.id=b.account_id
         left join ac_role c  on b.role_id = c.id
         <where>
@@ -26,7 +27,7 @@
                 ${condition}
             </if>
             <if test="companyId!=null">
-                AND C.COMPANY_ID = #{companyId}
+                AND d.COMPANY_ID = #{companyId}
             </if>
         </where>
         group by a.id,a.username,a.realname,a.email,a.mobile

+ 6 - 0
framework/core/src/main/java/com/usoftchina/saas/utils/RegexpUtils.java

@@ -11,6 +11,7 @@ public class RegexpUtils {
     private static final String CN_MOBILE_EXP = "^((13[0-9])|(15[0-3, 5-9])|(18[0,2,3,5-9])|(17[0-8])|(147))\\d{8}$";
     private static final String HK_MOBILE_EXP = "^(5|6|8|9)\\d{7}$";
     private static final String EMAIL_EXP = "^\\w+([-.]\\w+)*@\\w+([-]\\w+)*\\.(\\w+([-]\\w+)*\\.)*[a-z]{2,4}$";
+    private static final String SPECCHARACTER_EXP = "[\\\\s~·`!!@#¥$%^……&*(())\\\\-——\\\\-_=+【\\\\[\\\\]】{{}}\\\\|、\\\\\\\\;;::‘'“”\\\",,《<。.》>、/??]";
 
     /**
      * 匹配手机号码
@@ -55,4 +56,9 @@ public class RegexpUtils {
         return m.matches();
     }
 
+    public static String replaceSpecCharacter(String str){
+        Pattern p = Pattern.compile(SPECCHARACTER_EXP);
+        Matcher m = p.matcher(str);
+        return m.replaceAll("");
+    }
 }

+ 11 - 2
frontend/saas-web/app/view/core/dbfind/types/VendorDbfindTrigger.js

@@ -52,7 +52,16 @@ Ext.define('saas.view.core.dbfind.types.VendorDbfindTrigger', {
         dataIndex: "ve_taxrate",
         width: 100,
         xtype: 'numbercolumn',
-        align:'end'
+        align:'end',
+        renderer : function(v) {
+            if(!v) {
+                return 0;
+            }
+            var arr = (v + '.').split('.');
+            var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
+            var format = '0.' + xr.join();
+            return Ext.util.Format.number(v, format);
+        }
     }, {
         text: "承付天数",
         dataIndex: "ve_promisedays",
@@ -73,7 +82,7 @@ Ext.define('saas.view.core.dbfind.types.VendorDbfindTrigger', {
     }, {
         text: "银行账户",
         dataIndex: "ve_bankcode",
-        flex:1
+        width: 200
     }]
 
 });

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

@@ -305,7 +305,7 @@ Ext.define('saas.view.document.customer.FormPanel', {
                         }
                     }
                 }, 
-                text : "是否默认联系人", 
+                text : "默认联系人", 
                 width : 200.0, 
                 dataIndex : "cc_default", 
                 xtype : "",
@@ -401,7 +401,7 @@ Ext.define('saas.view.document.customer.FormPanel', {
                         }
                     }
                 }, 
-                text : "是否默认地址", 
+                text : "默认地址", 
                 dataIndex : "ca_default", 
                 xtype : "",
                 renderer: function (v, m, r) {

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

@@ -125,7 +125,7 @@ Ext.define('saas.view.document.product.BasePanel', {
             xtype: 'numbercolumn',
             renderer : function(v) {
                 var arr = (v + '.').split('.');
-                var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
+                var xr = (new Array(arr[1].length > 8 ? 8 : arr[1].length)).fill('0');
                 var format = '0.' + xr.join();
                 return Ext.util.Format.number(v, format);
             }, 
@@ -136,7 +136,7 @@ Ext.define('saas.view.document.product.BasePanel', {
             xtype: 'numbercolumn',
             renderer : function(v) {
                 var arr = (v + '.').split('.');
-                var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
+                var xr = (new Array(arr[1].length > 8 ? 8 : arr[1].length)).fill('0');
                 var format = '0.' + xr.join();
                 return Ext.util.Format.number(v, format);
             }, 

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

@@ -275,7 +275,7 @@ Ext.define('saas.view.document.vendor.FormPanel', {
                         }
                     }
                 }, 
-                text : "是否默认联系人", 
+                text : "默认联系人", 
                 dataIndex : "vc_default", 
                 xtype : "",
                 renderer: function (v, m, r) {

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

@@ -87,6 +87,7 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
                 width : 200.0, 
                 dataIndex : "ord_type",
                 items : null,
+                hiddenBtn:false,//true 则会关闭新增按钮功能
                 editor : {
                     xtype : "remotecombo", 
                     storeUrl:'/api/document/fundinouttype/getCombo?condition=收入',

+ 1 - 0
frontend/saas-web/app/view/money/othreceipts/QueryPanel.js

@@ -76,6 +76,7 @@ Ext.define('saas.view.money.othreceipts.QueryPanel', {
         fieldLabel: '收入类别',
         xtype : "remotecombo",
         storeUrl:'/api/document/fundinouttype/getCombo?condition=收入',
+        hiddenBtn:true//true 则会关闭新增按钮功能
     }],
     moreQueryFormItems: [],
     queryGridConfig: {

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

@@ -87,6 +87,7 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
                 width : 200.0, 
                 dataIndex : "osd_type",
                 items : null,
+                hiddenBtn:false,//true 则会关闭新增按钮功能
                 editor : {
                     xtype : "remotecombo",
                     storeUrl:'/api/document/fundinouttype/getCombo?condition=支出',

+ 1 - 0
frontend/saas-web/app/view/money/othspendings/QueryPanel.js

@@ -75,6 +75,7 @@ Ext.define('saas.view.money.othspendings.QueryPanel', {
         fieldLabel: '支出类别',
         xtype : "remotecombo",
         storeUrl:'/api/document/fundinouttype/getCombo?condition=支出',
+        hiddenBtn:true//true 则会关闭新增按钮功能
     }],
     moreQueryFormItems: [],
     queryGridConfig: {

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

@@ -269,7 +269,6 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
         },{
             text: '备注',
             dataIndex: 'pd_remark',
-            xtype: 'numbercolumn',
             width: 250
         }]
     }

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

@@ -94,10 +94,10 @@ Ext.define('saas.view.purchase.report.PurchasePay', {
         dataIndex: 'pb_payrate',
         xtype: 'numbercolumn',
         renderer : function(v) {
-            var arr = (v*100 + '.').split('.');
+            var arr = (v + '.').split('.');
             var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
             var format = '0.' + xr.join();
-            return Ext.util.Format.number(v*100, format);
+            return Ext.util.Format.number(v, format);
         }
     }, {
         text: '备注',

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

@@ -327,7 +327,7 @@ Ext.define('saas.view.stock.make.FormPanel', {
             },{
                 text : "替代料",
                 dataIndex : "mm_repprodcode",
-                width : 200.0,
+                width : 0,
                 editor : {
                     xtype : "textfield"
                 },