Procházet zdrojové kódy

SOP任务一键群发

wjj před 1 týdnem
rodič
revize
070c3ff856

+ 12 - 0
fs-company/src/main/java/com/fs/company/controller/qw/SopUserLogsInfoController.java

@@ -418,6 +418,18 @@ public class SopUserLogsInfoController extends BaseController
         return sopUserLogsInfoService.sendUserLogsInfoMsgType(param);
     }
 
+    /**
+     * 一键群发sopUserLogsInfo
+     */
+    @PreAuthorize("@ss.hasPermi('qw:sopUserLogsInfo:msg')")
+    @Log(title = "sendUserLogsInfoMsgSop", businessType = BusinessType.INSERT,isSaveRequestData=false)
+    @PostMapping("/sendUserLogsInfoMsgSop")
+    @RepeatSubmit
+    public R sendUserLogsInfoMsgSop(@RequestBody SendUserLogsInfoMsgParam param)
+    {
+        return sopUserLogsInfoService.sendUserLogsInfoMsgSop(param);
+    }
+
 
     /**
      * 删除sopUserLogsInfo

+ 10 - 4
fs-service/src/main/java/com/fs/sop/mapper/SopUserLogsMapper.java

@@ -6,10 +6,7 @@ import com.fs.qw.param.SopUserLogsVO;
 import com.fs.qw.vo.UpdateSopUserLogDateVo;
 import com.fs.sop.domain.SopUserLogs;
 import com.fs.sop.domain.SopUserLogsInfo;
-import com.fs.sop.params.GetSOPTaskDataParam;
-import com.fs.sop.params.SopUserLogsList;
-import com.fs.sop.params.SopUserLogsParam;
-import com.fs.sop.params.SopUserLogsParamByDate;
+import com.fs.sop.params.*;
 import com.fs.sop.vo.SopUserLogsInfoVo;
 import com.fs.sop.vo.SopUserLogsVo;
 import org.apache.ibatis.annotations.Param;
@@ -260,4 +257,13 @@ public interface SopUserLogsMapper {
 
     @DataSource(DataSourceType.SOP)
     List<SopUserLogs> getSopUserLogsInfoById(@Param("ids") String[] ids);
+
+    @DataSource(DataSourceType.SOP)
+    @Select({"<script> " +
+            "SELECT id FROM sop_user_logs " +
+            "WHERE corp_id = #{param.corpId} " +
+            "and sop_id in" +
+            "<foreach  item='item' index='index' collection='param.sopIds' open='(' separator=',' close=')'> #{item}    </foreach>" +
+            "</script>"})
+    List<String> getSopUserLogsIds(@Param("param")SendUserLogsInfoMsgParam param);
 }

+ 1 - 0
fs-service/src/main/java/com/fs/sop/params/SendUserLogsInfoMsgParam.java

@@ -9,6 +9,7 @@ import lombok.Data;
 public class SendUserLogsInfoMsgParam {
 
     private String[] ids;
+    private String[] sopIds;
     private String[] chatIds;
     private Integer videoId;
     private Integer courseId;

+ 1 - 0
fs-service/src/main/java/com/fs/sop/service/ISopUserLogsInfoService.java

@@ -79,6 +79,7 @@ public interface ISopUserLogsInfoService {
     public R batchUpdateSopUserLogsInfoToTime(BatchSopUserLogsInfoParam param);
     public R sendUserLogsInfoMsg(SendUserLogsInfoMsgParam param);
     public R sendUserLogsInfoMsgType(SendUserLogsInfoMsgParam param);
+    R sendUserLogsInfoMsgSop(SendUserLogsInfoMsgParam param);
 
     List<SopUserLogsInfo> selectRestoreByIsDaysNotStudy(String sopId, String userLogsId);
 

+ 9 - 0
fs-service/src/main/java/com/fs/sop/service/impl/SopUserLogsInfoServiceImpl.java

@@ -927,6 +927,15 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
         return null;
     }
 
+    @Override
+    public R sendUserLogsInfoMsgSop(SendUserLogsInfoMsgParam param) {
+        List<String> sopUserLogsIds = sopUserLogsMapper.getSopUserLogsIds(param);
+        String[] ids = sopUserLogsIds.toArray(new String[0]);
+        param.setIds(ids);
+        processQwSopLogsBySendMsg(param,param.getDraftStrategy());
+        return null;
+    }
+
     @Override
     public List<SopUserLogsInfo> selectRestoreByIsDaysNotStudy(String sopId, String userLogsId) {
         return sopUserLogsInfoMapper.selectRestoreByIsDaysNotStudy(sopId, userLogsId);