车车 пре 9 месеци
родитељ
комит
7edaa0ae90

+ 2 - 0
yudao-module-iscs/src/main/java/cn/iocoder/yudao/module/iscs/service/notifyconfig/NotifyConfigServiceImpl.java

@@ -39,6 +39,7 @@ public class NotifyConfigServiceImpl extends ServiceImpl<NotifyConfigMapper, Not
         notifyConfigMapper.insert(notifyConfig);
         // 开始新增detail
         if (!createReqVO.getNotifyConfigDetailSaveReqVOS().isEmpty()) {
+            createReqVO.getNotifyConfigDetailSaveReqVOS().forEach( item -> item.setConfigId(notifyConfig.getId()));
             notifyConfigDetailService.insertOrUpdateList(BeanUtils.toBean(createReqVO.getNotifyConfigDetailSaveReqVOS(), NotifyConfigDetailDO.class));
         }
 
@@ -53,6 +54,7 @@ public class NotifyConfigServiceImpl extends ServiceImpl<NotifyConfigMapper, Not
         notifyConfigMapper.updateById(updateObj);
         // 开始新增detail
         if (!updateReqVO.getNotifyConfigDetailSaveReqVOS().isEmpty()) {
+            updateReqVO.getNotifyConfigDetailSaveReqVOS().forEach( item -> item.setConfigId(updateObj.getId()));
             notifyConfigDetailService.insertOrUpdateList(BeanUtils.toBean(updateReqVO.getNotifyConfigDetailSaveReqVOS(), NotifyConfigDetailDO.class));
         }
     }

+ 3 - 2
yudao-module-iscs/src/main/resources/mapper/NotifyConfigDetailMapper.xml

@@ -11,9 +11,10 @@
 
     <select id="selectNotifyConfigDetailByConfigId"
             resultType="cn.iocoder.yudao.module.iscs.controller.admin.notifyconfig.vo.NotifyConfigDetailRespVO">
-        select d.*, t.name as notify_template_name
+        select d.*, t.name as notify_template_name, r.name as role_name
         from isc_notify_config_detail d
-            left join system_notify_template t on t.id = d.notify_template_id
+            left join system_notify_template t on t.code = d.notify_template_code
+            left join system_role r on r.id = d.role_id
         where d.config_id = #{configId}
     </select>
 </mapper>

+ 1 - 1
yudao-module-iscs/src/main/resources/mapper/NotifyConfigMapper.xml

@@ -20,7 +20,7 @@
         LEFT JOIN isc_workstation w ON w.id = n.workstation_id
         LEFT JOIN isc_sop_workflow_step ws ON ws.id = n.rule and n.type = 3
         <where>
-            <if test="vo.nextExecutDate != null and vo.nextExecutDate.trim != ''">
+            <if test="vo.sopId != null and vo.sopId.trim != ''">
                 n.sop_id #{vo.sopId}
             </if>
         </where>