From e2c14ffb0a6237bb5c397f5d0baaa4fa70cfe3b0 Mon Sep 17 00:00:00 2001
From: XiaoRuby <3114200645@qq.com>
Date: 星期一, 11 九月 2023 11:20:01 +0800
Subject: [PATCH] MOM系统-9-11
---
inspect-server/src/main/java/com/yuanchu/mom/controller/InspectUnacceptedController.java | 34 ++++++++++++++++++++++++++--------
1 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/inspect-server/src/main/java/com/yuanchu/mom/controller/InspectUnacceptedController.java b/inspect-server/src/main/java/com/yuanchu/mom/controller/InspectUnacceptedController.java
index dd389f2..8d31020 100644
--- a/inspect-server/src/main/java/com/yuanchu/mom/controller/InspectUnacceptedController.java
+++ b/inspect-server/src/main/java/com/yuanchu/mom/controller/InspectUnacceptedController.java
@@ -8,7 +8,6 @@
import com.yuanchu.mom.utils.JackSonUtil;
import com.yuanchu.mom.utils.Jwt;
import com.yuanchu.mom.utils.MyUtil;
-import com.yuanchu.mom.utils.RedisUtil;
import com.yuanchu.mom.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
@@ -42,7 +41,7 @@
@Autowired
private OpinionService opinionService;
- @ApiOperation(value = "鏌ヨ鎴愬搧涓嶅悎鏍煎搧妫�楠屽崟鍒楄〃", tags = "QMS绠$悊-->涓嶅悎鏍煎搧绠$悊")
+ @ApiOperation(value = "涓嶅悎鏍煎搧绠$悊鍒楄〃", tags = "QMS绠$悊-->涓嶅悎鏍煎搧绠$悊")
@ApiImplicitParams(value = {
@ApiImplicitParam(name = "pageSize",value = "椤垫暟",dataTypeClass = Integer.class,required = true),
@ApiImplicitParam(name = "countSize",value = "鏉℃暟/椤�",dataTypeClass = Integer.class,required = true),
@@ -86,6 +85,20 @@
return Result.success(map);
}
+ @ApiOperation(value = "璇勫", tags = "QMS绠$悊-->鍘熸潗鏂欎笉鍚堟牸鍝�")
+ @ApiImplicitParams(value = {
+ @ApiImplicitParam(name = "rawId",value = "鍘熸潗鏂橧d",dataTypeClass = Integer.class,required = true),
+ @ApiImplicitParam(name = "passOrNo",value = "鏄惁閫氳繃锛�0锛氫笉閫氳繃锛�1锛氶�氳繃",dataTypeClass = Integer.class,required = true)
+ })
+ @PostMapping("/evaluatePassOrNo")
+ public Result<?> rawEvaluate(Integer rawId, Integer passOrNo){
+ Integer integer = inspectUnacceptedService.rawEvaluate(rawId, passOrNo);
+ if (integer >= 1) {
+ return Result.success("璇勫鎴愬姛锛�");
+ }
+ return Result.fail("璇勫澶辫触锛�");
+ }
+
@ApiOperation(value = "涓嶅悎鏍煎搧鍒嗛〉鍒楄〃", tags = "QMS绠$悊-->涓嶅悎鏍煎搧澶勭疆")
@ApiImplicitParams(value = {
@ApiImplicitParam(name = "pageSize",value = "椤垫暟",dataTypeClass = Integer.class,required = true),
@@ -116,11 +129,12 @@
@ApiOperation(value = "缂栬緫鎰忚-->纭畾鎸夐挳", tags = "QMS绠$悊-->涓嶅悎鏍煎搧澶勭疆")
@PostMapping("/addOpinion")
- public Result<?> updateOpinion(@RequestHeader("token") String token, @Validated @RequestBody List<Opinion> opinion) throws Exception {
+ public Result<?> updateOpinion(@RequestHeader("token") String token, @RequestBody Map<String, Object> opinion) throws Exception {
+ List<?> opinion1 = JackSonUtil.unmarshal(JackSonUtil.marshal(opinion.get("opinion")), List.class);
Map<String, String> data = JackSonUtil.unmarshal(jwt.readJWT(token).get("data"), Map.class);
String id = data.get("id").replaceAll("\"", "");
- opinionService.updateOpinion(id, opinion);
- return Result.success();
+ opinionService.updateOpinion(id, opinion1);
+ return Result.success("娣诲姞鎴愬姛锛�");
}
@ApiOperation(value = "鏌ョ湅缂栬緫鎰忚", tags = "QMS绠$悊-->涓嶅悎鏍煎搧澶勭疆")
@@ -139,15 +153,19 @@
})
@GetMapping("/descriptionUpdate")
public Result<?> descriptionUpdate(Integer rawUnacceptedId, String tell) {
- return Result.success(inspectUnacceptedService.descriptionUpdate(rawUnacceptedId, tell));
+ Integer isUpdateSuccess = inspectUnacceptedService.descriptionUpdate(rawUnacceptedId, tell);
+ if (isUpdateSuccess == 1) {
+ return Result.success("鏇存柊鎴愬姛");
+ }
+ return Result.fail("鏇存柊澶辫触");
}
@ApiOperation(value = "鐐瑰嚮缂栬緫鎰忚瑙﹀彂鏌ヨ", tags = "QMS绠$悊-->涓嶅悎鏍煎搧澶勭疆")
@ApiImplicitParams(value = {
@ApiImplicitParam(name = "rawUnacceptedId",value = "涓嶅悎鏍煎搧澶勭疆Id",dataTypeClass = Integer.class,required = true)
})
- @PostMapping("/clickEditing")
- public Result<?> clickEditingTriggerQuery(Integer rawUnacceptedId) {
+ @GetMapping("/clickEditing")
+ public Result<?> clickEditingTriggerQuery(@RequestParam("rawUnacceptedId") Integer rawUnacceptedId) {
return Result.success(opinionService.clickEditingTriggerQuery(rawUnacceptedId));
}
}
--
Gitblit v1.9.3