Parcourir la source

巡检定时优化

guarantee-lsq il y a 2 ans
Parent
commit
588dcf8914

+ 7 - 5
platform-rest/src/main/java/com/platform/rest/task/FillGatherTaskTask.java

@@ -18,7 +18,6 @@ import com.platform.dao.mapper.fill.FillGatherTaskDetailMapper;
 import com.platform.dao.mapper.fill.FillInfoMapper;
 import com.platform.dao.mapper.upms.SysUserMapper;
 import com.platform.dao.util.MessageTemplateUtil;
-import com.platform.dao.vo.query.fill.FillGatherTaskDetailVO;
 import com.platform.dao.vo.query.fill.FillInfoVO;
 import com.platform.service.event.WorkplaceBacklogEvent;
 import com.platform.service.fill.FillGatherTaskService;
@@ -90,13 +89,16 @@ public class FillGatherTaskTask {
 
     private void saveDetails(String content,String newTaskId,String taskId){
         List<FillGatherTaskDetail> details = new ArrayList<>();
-        List<FillGatherTaskDetailVO> detailVOs = fillGatherTaskDetailMapper.selectVOByTaskId(taskId);
-        for(FillGatherTaskDetailVO vo : detailVOs){
+        FillGatherTaskDetail queryDetail = new FillGatherTaskDetail();
+        queryDetail.setTaskId(taskId);
+        List<FillGatherTaskDetail> detailVOs = fillGatherTaskDetailMapper.select(queryDetail);
+        //List<FillGatherTaskDetailVO> detailVOs = fillGatherTaskDetailMapper.selectVOByTaskId(taskId);
+        for(FillGatherTaskDetail vo : detailVOs){
             FillGatherTaskDetail detail = new FillGatherTaskDetail();
             detail.setContent(content);
             detail.setCreatedTime(LocalDateTime.now());
-            detail.setCreatedUserId(SecurityUtils.getUserInfo().getUserId());
-            detail.setCreatedUserName(SecurityUtils.getUserInfo().getUsername());
+            detail.setCreatedUserId(detail.getCreatedUserId());
+            detail.setCreatedUserName(detail.getCreatedUserName());
             detail.setSbId(vo.getSbId());
             detail.setTaskId(newTaskId);
             detail.setId(IdGeneratorUtils.getObjectId());