From 247a4a1f10f233c89a4bd054dee3cb9b7d4a76f1 Mon Sep 17 00:00:00 2001
From: heheng <475597332@qq.com>
Date: 星期三, 19 十一月 2025 08:40:12 +0800
Subject: [PATCH] 新增数据上传准东
---
src/main/java/com/ruoyi/project/tr/specialCheck/controller/TBSpecialCheckTaskLogController.java | 71 ++++++++++++++++++++++++++---------
1 files changed, 53 insertions(+), 18 deletions(-)
diff --git a/src/main/java/com/ruoyi/project/tr/specialCheck/controller/TBSpecialCheckTaskLogController.java b/src/main/java/com/ruoyi/project/tr/specialCheck/controller/TBSpecialCheckTaskLogController.java
index c4eba28..a806eaa 100644
--- a/src/main/java/com/ruoyi/project/tr/specialCheck/controller/TBSpecialCheckTaskLogController.java
+++ b/src/main/java/com/ruoyi/project/tr/specialCheck/controller/TBSpecialCheckTaskLogController.java
@@ -1,19 +1,15 @@
package com.ruoyi.project.tr.specialCheck.controller;
-import com.ruoyi.doublePrevention.entity.PreventRiskControlMeasure;
-import com.ruoyi.doublePrevention.entity.dto.req.PreventRiskControlMeasureDeleteReqDTO;
+import com.ruoyi.common.utils.BeanCopyUtils;
import com.ruoyi.doublePrevention.vo.ResultVO;
-import com.ruoyi.framework.aspectj.lang.annotation.Log;
-import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.tr.riskList.domain.RiskList;
import com.ruoyi.project.tr.riskList.service.IRiskListService;
-import com.ruoyi.project.tr.specialCheck.domin.BO.TbBaseCheckTaskBO;
-import com.ruoyi.project.tr.specialCheck.domin.BO.TbSpecialCheckTaskLogBO;
-import com.ruoyi.project.tr.specialCheck.domin.BO.TbSpecialCheckTaskLogUpdateBO;
+import com.ruoyi.project.tr.specialCheck.domin.BO.*;
import com.ruoyi.project.tr.specialCheck.domin.DTO.TbSpecialCheckTaskLogDTO;
+import com.ruoyi.project.tr.specialCheck.domin.DTO.TbSpecialCheckTaskLogDateDTO;
import com.ruoyi.project.tr.specialCheck.domin.TbBaseCheckTask;
import com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckTaskLog;
import com.ruoyi.project.tr.specialCheck.service.SpecialCheckTaskService;
@@ -23,6 +19,9 @@
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
+import java.sql.Date;
+import java.time.Instant;
+import java.time.ZoneId;
import java.util.List;
/**
@@ -81,6 +80,8 @@
{
List<RiskList> riskList = riskListService.listHazardSource();
mmap.put("hazardList", riskList);
+ List<TbBaseCheckTask> listResult = tbBaseCheckService.listTbBaseCheckTask();
+ mmap.put("tbBaseCheckTask", listResult);
return prefix + "/add";
}
@@ -90,9 +91,9 @@
*/
@PostMapping("/add")
@ResponseBody
- public AjaxResult addSpecialTask(TbSpecialCheckTaskLog tbSpecialCheckTaskLog){
+ public AjaxResult addSpecialTask(TbSpecialCheckTaskLogEditBO taskLogEditBO){
- ResultVO<TbSpecialCheckTaskLog> resultVO = specialCheckTaskService.addSpecialTask(tbSpecialCheckTaskLog);
+ ResultVO<TbSpecialCheckTaskLog> resultVO = specialCheckTaskService.addSpecialTask(taskLogEditBO);
String code = resultVO.getCode();
if ("200".equals(code)){
return toAjax(1);
@@ -101,17 +102,39 @@
}
}
- @GetMapping("/edit/{id}")
+ @GetMapping("/edit/{indexId}")
public String edit(@PathVariable("indexId") Long indexId, ModelMap mmap)
{
- TbSpecialCheckTaskLog specialCheckTaskLogByIndexId = specialCheckTaskService.getSpecialCheckTaskLogByIndexId(indexId);
- mmap.put("specialCheckTaskLog",specialCheckTaskLogByIndexId);
+ TbSpecialCheckTaskLog specialCheckTaskLog = specialCheckTaskService.getSpecialCheckTaskLogByIndexId(indexId);
- TbBaseCheckTaskBO tbBaseCheckTaskBO = new TbBaseCheckTaskBO();
- ResultVO<List<TbBaseCheckTask>> listResultVO = tbBaseCheckService.selectTbBaseCheckTaskPage(tbBaseCheckTaskBO);
- Object data = listResultVO.getData();
- mmap.put("tbBaseCheckTask", data);
+ TbSpecialCheckTaskLogDateDTO tbSpecialCheckTaskLogDateDTO = BeanCopyUtils.copyBean(specialCheckTaskLog, TbSpecialCheckTaskLogDateDTO.class);
+ Instant instant = specialCheckTaskLog.getCheckDate().atZone(ZoneId.systemDefault()).toInstant();
+ tbSpecialCheckTaskLogDateDTO.setCheckDate(Date.from(instant));
+ mmap.put("specialCheckTaskLog",tbSpecialCheckTaskLogDateDTO);
+ List<RiskList> riskList = riskListService.listHazardSource();
+ mmap.put("hazardList", riskList);
+ List<TbBaseCheckTask> listResult = tbBaseCheckService.listTbBaseCheckTask();
+ mmap.put("tbBaseCheckTask", listResult);
return prefix + "/edit";
+ }
+
+ /**
+ *
+ */
+ @GetMapping("/detail/{indexId}")
+ public String detail(@PathVariable("indexId") Long indexId, ModelMap mmap)
+ {
+ TbSpecialCheckTaskLog specialCheckTaskLog = specialCheckTaskService.getSpecialCheckTaskLogByIndexId(indexId);
+
+ TbSpecialCheckTaskLogDateDTO tbSpecialCheckTaskLogDateDTO = BeanCopyUtils.copyBean(specialCheckTaskLog, TbSpecialCheckTaskLogDateDTO.class);
+ Instant instant = specialCheckTaskLog.getCheckDate().atZone(ZoneId.systemDefault()).toInstant();
+ tbSpecialCheckTaskLogDateDTO.setCheckDate(Date.from(instant));
+ mmap.put("specialCheckTaskLog",tbSpecialCheckTaskLogDateDTO);
+ List<RiskList> riskList = riskListService.listHazardSource();
+ mmap.put("hazardList", riskList);
+ List<TbBaseCheckTask> listResult = tbBaseCheckService.listTbBaseCheckTask();
+ mmap.put("tbBaseCheckTask", listResult);
+ return prefix + "/detail";
}
/**
@@ -119,9 +142,9 @@
*/
@PostMapping("/edit")
@ResponseBody
- public AjaxResult editSave(TbSpecialCheckTaskLogUpdateBO updateBO)
+ public AjaxResult editSave(TbSpecialCheckTaskLogEditBO taskLogEditBO)
{
- ResultVO<TbSpecialCheckTaskLog> resultVO = specialCheckTaskService.updateSpecialCheckTaskLog(updateBO);
+ ResultVO<TbSpecialCheckTaskLog> resultVO = specialCheckTaskService.updateSpecialCheckTaskLog(taskLogEditBO);
String code = resultVO.getCode();
if ("200".equals(code)){
return toAjax(1);
@@ -143,6 +166,18 @@
}
}
+
+//
+// @Autowired
+// private DealDataTask dealDataTask;
+//
+// @GetMapping("/dealDataTask")
+// public AjaxResult dealDataTask()
+// {
+// dealDataTask.dealData();
+// return success();
+// }
+
}
--
Gitblit v1.9.2