From 66a6b31ddc84644dfcae8a341a99796db76e60a7 Mon Sep 17 00:00:00 2001
From: wl <173@qq.com>
Date: 星期一, 17 十月 2022 17:17:24 +0800
Subject: [PATCH] 上传时间处置 结案处理人添加

---
 ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java b/ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java
index d6e7b01..5ee1b2c 100644
--- a/ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java
+++ b/ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java
@@ -28,6 +28,8 @@
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
 import java.util.List;
 
 
@@ -121,7 +123,7 @@
     @ApiImplicitParams({
             @ApiImplicitParam(name = "type", value = "1 杩濊,2 杩濆缓", dataType = "Integer")
     })
-    @LogSave(operationType = "浜嬮」澶勭疆绠$悊",contain = "鍒犻櫎妗堜欢")
+    @LogSave(operationType = "浜嬮」澶勭疆绠$悊", contain = "鍒犻櫎妗堜欢")
     public CommonResult removeCase(@RequestParam Integer id, @RequestParam Integer type) {
         Integer violationType = 1;
         Integer illegalBuildingType = 2;
@@ -146,7 +148,7 @@
     @ApiImplicitParams({
             @ApiImplicitParam(name = "type", value = "1 杩濊,2 杩濆缓", dataType = "Integer")
     })
-    @LogSave(operationType = "浜嬮」澶勭疆绠$悊",contain = "鎵归噺鍒犻櫎妗堜欢")
+    @LogSave(operationType = "浜嬮」澶勭疆绠$悊", contain = "鎵归噺鍒犻櫎妗堜欢")
     public CommonResult removeCases(@RequestParam List<Long> ids, @RequestParam Integer type) {
         Integer violationType = 1;
         Integer illegalBuildingType = 2;
@@ -168,7 +170,7 @@
      **/
     @ApiOperation(value = "娣诲姞杩濊妗堜欢")
     @PostMapping("/addition_violation")
-    @LogSave(operationType = "浜嬮」澶勭疆绠$悊",contain = "鏂板杩濆缓妗堜欢")
+    @LogSave(operationType = "浜嬮」澶勭疆绠$悊", contain = "鏂板杩濆缓妗堜欢")
     public CommonResult addViolationCase(@RequestBody @Validated ViolationParam violationParam) {
         Integer violation = 1;
         Integer resource = 2;
@@ -178,6 +180,7 @@
         baseCase.setCategory(violation);
         baseCase.setCode(utilNumber.createCaseCode());
         baseCase.setState(BaseCaseStatus.PENDING);
+        baseCase.setAlarmTime(LocalDateTime.parse(violationParam.getAlarmTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
         baseCaseService.save(baseCase);
         return CommonResult.success(baseCaseService.saveViolationCase(violationParam, baseCase.getId()));
     }
@@ -189,7 +192,7 @@
      **/
     @ApiOperation(value = "娣诲姞杩濆缓妗堜欢")
     @PostMapping("/addition_illegal_building")
-    @LogSave(operationType = "浜嬮」澶勭疆绠$悊",contain = "鏂板杩濊妗堜欢")
+    @LogSave(operationType = "浜嬮」澶勭疆绠$悊", contain = "鏂板杩濊妗堜欢")
     public CommonResult addIllegalBuildingCase(@RequestBody @Validated IllegalBuildingParam illegalBuildingParam) {
         Integer illegalBuilding = 2;
         Integer resource = 2;
@@ -199,6 +202,7 @@
         baseCase.setEventSource(resource);
         baseCase.setCode(utilNumber.createCaseCode());
         baseCase.setState(BaseCaseStatus.PENDING);
+        baseCase.setAlarmTime(LocalDateTime.parse(illegalBuildingParam.getAlarmTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
         baseCaseService.save(baseCase);
         return CommonResult.success(baseCaseService.saveIllegalBuildingCase(illegalBuildingParam, baseCase.getId()));
     }
@@ -259,9 +263,9 @@
 
     @ApiOperation(value = "缁撴")
     @PutMapping("/end_case")
-    @LogSave(operationType = "浜嬮」澶勭疆绠$悊",contain = "妗堜欢缁撴")
-    public CommonResult endCase(@RequestParam Long caseId, @RequestParam String result,@RequestParam String opinion) {
-        baseCaseService.endCase(caseId, result,opinion);
+    @LogSave(operationType = "浜嬮」澶勭疆绠$悊", contain = "妗堜欢缁撴")
+    public CommonResult endCase(@RequestParam Long caseId, @RequestParam String result, @RequestParam String opinion) {
+        baseCaseService.endCase(caseId, result, opinion);
         return CommonResult.success("end case success~!");
     }
 

--
Gitblit v1.8.0