gongdecai 3 anos atrás
pai
commit
20a760e9d2

+ 18 - 5
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/TranProcessInfoServiceImpl.java

@@ -416,7 +416,23 @@ public class TranProcessInfoServiceImpl extends ServiceImpl<TranProcessInfoMappe
         //物流部提交
         if ("1".equals(tranProcessInfo.getFlag())) {
             tranProcessInfo.setPriceStatus("审核中");
-            tesk(tranProcessInfo);
+            List<String> roleIdList = Lists.newArrayList();
+            if("1".equals(tranProcessInfo.getTranTypeKey())){
+                roleIdList = roleResourceService.getBindRoleIdsByResourceIds(AuthSecurityUtils.getCurrentUserInfo().getCompId(),
+                        Lists.newArrayList("transportationInfo-Exe"));
+                tesk(tranProcessInfo,roleIdList);
+            }
+            else if("2".equals(tranProcessInfo.getTranTypeKey())){
+                roleIdList = roleResourceService.getBindRoleIdsByResourceIds(AuthSecurityUtils.getCurrentUserInfo().getCompId(),
+                        Lists.newArrayList("transportationInfo-Trian"));
+                tesk(tranProcessInfo,roleIdList);
+            }
+            else{
+                roleIdList = roleResourceService.getBindRoleIdsByResourceIds(AuthSecurityUtils.getCurrentUserInfo().getCompId(),
+                        Lists.newArrayList("transportationInfo-Ship"));
+                tesk(tranProcessInfo,roleIdList);
+            }
+
         }
 
         //决策人审核
@@ -446,7 +462,7 @@ public class TranProcessInfoServiceImpl extends ServiceImpl<TranProcessInfoMappe
      *
      * @param tranProcessInfo
      */
-    private void tesk(TranProcessInfo tranProcessInfo) {
+    private void tesk(TranProcessInfo tranProcessInfo, List<String> roleIdList) {
         // 先删除任务
         noticeService.removeNotice(BaseNotice.NoticeStatus.TASK, "TRAN-TASK-APPROVE",
                 tranProcessInfo.getId(), null);
@@ -458,9 +474,6 @@ public class TranProcessInfoServiceImpl extends ServiceImpl<TranProcessInfoMappe
                     : commitUserInfo.getStaffName();
         }
         String taskContent = "";
-        List<String> roleIdList = Lists.newArrayList();
-        roleIdList = roleResourceService.getBindRoleIdsByResourceIds(AuthSecurityUtils.getCurrentUserInfo().getCompId(),
-                Lists.newArrayList("transportationInfo-Exe"));
         // 向下一步操作人发送任务通知
             taskContent =  staffName + "提交的运输单价等待审核";
         NoticeTaskInfo taskInfo = new NoticeTaskInfo();