From 68f6642d4d1fff10c6bd898d69dd7bff27adbc16 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期日, 24 九月 2023 15:18:29 +0800
Subject: [PATCH] 修改2.0 9.24
---
inspect-server/src/main/java/com/yuanchu/mom/controller/RawInspectController.java | 41 ++++++++++++++++-------------------------
1 files changed, 16 insertions(+), 25 deletions(-)
diff --git a/inspect-server/src/main/java/com/yuanchu/mom/controller/RawInspectController.java b/inspect-server/src/main/java/com/yuanchu/mom/controller/RawInspectController.java
index 399a283..4dc32e3 100644
--- a/inspect-server/src/main/java/com/yuanchu/mom/controller/RawInspectController.java
+++ b/inspect-server/src/main/java/com/yuanchu/mom/controller/RawInspectController.java
@@ -14,6 +14,7 @@
import org.json.JSONException;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -33,12 +34,20 @@
@Resource
Jwt jwt;
+ @ApiOperation(value = "鏂板鍘熸潗鏂欐楠屽崟-->鏍规嵁鍘熸潗鏂欑紪鐮佸緱鍒癷fs涓殑鎶ユ鏁版嵁")
+ @ApiImplicitParams(value = {
+ @ApiImplicitParam(name = "code", value = "鍘熸潗鏂欑紪鐮�", dataTypeClass = String.class, required = true)
+ })
+ @PostMapping("/chooseIFS")
+ public Result chooseIFS(String code){
+ return Result.success(rawInspectService.chooseIFS(code));
+ }
@ApiOperation(value = "鏂板鍘熸潗鏂欐楠屽崟")
@PostMapping("/addRawInspects")
- public Result addRawInspects(@RequestHeader("token") String token, @RequestBody RawInspectVo rawInspectVo) throws Exception {
+ public Result addRawInspects(@RequestHeader("token") String token,@Validated @RequestBody RawInspectVo rawInspectVo) throws Exception {
Map<String, String> data = JackSonUtil.unmarshal(jwt.readJWT(token).get("data"), Map.class);
- return Result.success(rawInspectService.addRawInspects(data.get("id").replaceAll("\"", ""), rawInspectVo));
+ return Result.success("鎻愪氦鎴愬姛锛�",rawInspectService.addRawInspects(data.get("id").replaceAll("\"", ""), rawInspectVo));
}
@ApiOperation(value = "鍒嗛〉鏌ヨ鍘熸潗鏂欐楠屽崟鍒楄〃")
@@ -50,7 +59,7 @@
@ApiImplicitParam(name = "insState", value = "妫�娴嬬姸鎬�(涓虹┖=鍏ㄩ儴)", dataTypeClass = Integer.class),
@ApiImplicitParam(name = "name", value = "鍘熸潗鏂欏悕绉�", dataTypeClass = String.class)
})
- @PostMapping("/selectRawInspectsList")
+ @GetMapping("/selectRawInspectsList")
public Result selectRawInspectsList(Integer pageSize, Integer countSize, String formTime, String code, Integer insState, String name) {
IPage<Map<String, Object>> page = rawInspectService.selectRawInspectsList(new Page<Object>(pageSize, countSize), formTime, code, insState, name);
Map<String, Object> map = new HashMap<>();
@@ -70,35 +79,17 @@
@ApiOperation(value = "涓婃姤(鏇存柊妫�楠岀姸鎬�)")
@ApiImplicitParams(value = {
- @ApiImplicitParam(name = "id", value = "妫�楠屽崟id", dataTypeClass = Integer.class, required = true)
+ @ApiImplicitParam(name = "id", value = "妫�楠屽崟id", dataTypeClass = Integer.class, required = true),
+ @ApiImplicitParam(name = "number", value = "涓嶅悎鏍兼暟閲�", dataTypeClass = Integer.class)
})
@PostMapping("/updateRawInspectsById/{id}")
- public Result updateRawInspectsById(@PathVariable Integer id) {
+ public Result updateRawInspectsById(@PathVariable Integer id,Integer number) {
//濡傛灉宸茬粡涓婃姤浜嗕笉鑳藉啀涓�娆′笂鎶�
RawInspect rawInspect = rawInspectService.getById(id);
if (rawInspect.getInsState() == 1) {
return Result.fail("宸茬粡涓婃姤杩囦簡,涓嶈兘鍐嶆涓婃姤!");
}
- return Result.success(rawInspectService.updateRawInspectsById(id));
+ return Result.success(rawInspectService.updateRawInspectsById(id,number));
}
- @ApiOperation(value = "鍒犻櫎")
- @ApiImplicitParams(value = {
- @ApiImplicitParam(name = "id", value = "鍘熸潗鏂欐楠屽崟id", dataTypeClass = Integer.class, required = true)
- })
- @PostMapping("/delRawInsById")
- public Result delRawInsById(Integer id) {
- rawInspectService.delRawInsById(id);
- return Result.success("鍒犻櫎" + id + "鎴愬姛!");
- }
-
- @ApiOperation(value = "鎵归噺鍒犻櫎")
- @ApiImplicitParams(value = {
- @ApiImplicitParam(name = "ids", value = "鍘熸潗鏂欐楠屽崟id", dataTypeClass = String.class, required = true)
- })
- @PostMapping("/delAllRawIns")
- public Result delAllRawIns(String ids) {
- rawInspectService.delAllRawIns(ids);
- return Result.success("鎵归噺鍒犻櫎鎴愬姛!");
- }
}
--
Gitblit v1.9.3