Browse Source

生产问题管理 定时任务修改controller

huangpeng 10 months ago
parent
commit
b01098a235

+ 1 - 1
cx-question/cx-question-common/src/main/java/com/rongwei/bscommon/sys/service/impl/SrmIssuesListServiceImpl.java

@@ -268,7 +268,7 @@ public class SrmIssuesListServiceImpl extends ServiceImpl<SrmIssuesListDao, SrmI
                 }
                 f=false;
             }catch (Exception e){
-                log.error(" 节点 {} 出现问题 {} ",taskname,e.getMessage());
+                log.error(" 节点 {} 问题编号 {} 出现问题 {} ",taskname,vo.getQuestionno(),e.getMessage());
             }
         }
 

+ 7 - 5
cx-question/cx-question-server/src/main/java/com/rongwei/businessServer/controller/SrmIssuesListController.java

@@ -10,6 +10,7 @@ import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.RestController;
 
 import static com.rongwei.safecommon.utils.SaveConstans.IssuesListNotice.ISSUES_EMAIL_TITLE;
 
@@ -18,9 +19,9 @@ import static com.rongwei.safecommon.utils.SaveConstans.IssuesListNotice.ISSUES_
  * 生产问题管理
  * 2024-09-25 hp
  */
-@Controller
-@RequestMapping("/srmIssueslist")
-@Slf4j
+
+@RestController
+@RequestMapping("srmIssueslist")
 public class SrmIssuesListController {
 
     @Autowired
@@ -33,8 +34,9 @@ public class SrmIssuesListController {
      * @return
      */
     @Scheduled(cron = "0 0/10 * * * ? ")
-    @PostMapping("approvalTimeoutReminder")
+    @PostMapping("/approvalTimeoutReminder")
     public R batchSavePlansTiming(){
-         return srmIssuesListService.approvalTimeoutReminder();
+        R r = srmIssuesListService.approvalTimeoutReminder();
+        return r;
     }
 }