瀏覽代碼

往来账款输入名称限制,平台审批拒绝消息标题中拒绝原因修改

ch 4 年之前
父節點
當前提交
e7d1a26f3a

+ 8 - 2
sc-service/src/main/java/com/huyi/service/bill/controller/OwnBillController.java

@@ -1,6 +1,5 @@
 package com.huyi.service.bill.controller;
 
-import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.TypeReference;
@@ -10,7 +9,6 @@ import com.huyi.service.base.entity.*;
 import com.huyi.service.base.service.*;
 import com.huyi.service.bill.service.IOwnBillService;
 import com.keao.tianhu.starter.mybatis.plus.entity.QueryRequest;
-import com.tianhu.common.core.constant.SalaryConstants;
 import com.tianhu.common.core.domain.R;
 import com.tianhu.common.core.utils.*;
 import com.tianhu.common.core.web.controller.BaseController;
@@ -79,6 +77,8 @@ public class OwnBillController extends BaseController {
     @Autowired
     private RemoteFileService remoteFileService;
 
+    private static final String REGEX = "^[\\u4E00-\\u9FA5A-Za-z0-9]+$";
+
     /**
      * 往来账款列表
      *
@@ -180,6 +180,9 @@ public class OwnBillController extends BaseController {
         zcBillInf.setZbiId(zbiId);
         //账款名称
         String zbiName = CommonUtil.objToString(map.get("zbiName"));
+        if(!zbiName.matches(REGEX)){
+            return R.fail(500,"往来账款名称只能包含中文、英文、数字");
+        }
         zcBillInf.setZbiName(zbiName);
         //查询账款名称是否重复
         LambdaQueryWrapper<ZcBillInf> lambdaQueryWrapper = new LambdaQueryWrapper<>();
@@ -372,6 +375,9 @@ public class OwnBillController extends BaseController {
         zcBillInf.setZbiId(zbiId);
         //账款名称
         String zbiName = CommonUtil.objToString(map.get("zbiName"));
+        if(!zbiName.matches(REGEX)){
+            return R.fail(500,"往来账款名称只能包含中文、英文、数字");
+        }
         zcBillInf.setZbiName(zbiName);
         //查询账款名称是否重复
         LambdaQueryWrapper<ZcBillInf> lambdaQueryWrapperBill = new LambdaQueryWrapper<>();

+ 1 - 1
sc-service/src/main/java/com/huyi/service/common/flowable/controller/FlowableController.java

@@ -722,7 +722,7 @@ public class  FlowableController extends BaseController
             //企业名称
             String coreName = coreCompany.getScyName();
             //标题
-            String title = "【审批拒绝】您提交于【"+coreName +"】的融信【"+zfiNumber+"】审批被拒绝,拒绝的理由为:【审批意见】";
+            String title = "【审批拒绝】您提交于【"+coreName +"】的融信【"+zfiNumber+"】审批被拒绝,拒绝的理由为:【"+reason+"】";
             remoteSystemService.sendNotice(zfiSupplierId, zfiId,title,"01","02","","0",supplierUserId.toString(),"", null, null);
 
             /**融信操作日志*/