From 2dbc49184bd74845c8da694c20d6fd03d7ac87e0 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期四, 21 九月 2023 16:16:21 +0800
Subject: [PATCH] 修改 9.21
---
standard-server/src/main/java/com/yuanchu/mom/controller/TechnologyController.java | 32 ++++++++++++++++++++++----------
1 files changed, 22 insertions(+), 10 deletions(-)
diff --git a/standard-server/src/main/java/com/yuanchu/mom/controller/TechnologyController.java b/standard-server/src/main/java/com/yuanchu/mom/controller/TechnologyController.java
index 176ae9b..b8824bd 100644
--- a/standard-server/src/main/java/com/yuanchu/mom/controller/TechnologyController.java
+++ b/standard-server/src/main/java/com/yuanchu/mom/controller/TechnologyController.java
@@ -29,7 +29,7 @@
@Autowired
private TechnologyService technologyService;
- @ApiOperation("鍙充笂瑙掓柊澧�-->宸ヨ壓璺嚎-->閫夋嫨璁惧缁�")
+ @ApiOperation("鍙充笂瑙掓柊澧�-->宸ヨ壓璺嚎-->閫夋嫨鐢熶骇璁惧缁�")
@GetMapping("/chooseDevice")
public Result<?> chooseDevice() {
return Result.success(technologyService.chooseDevice());
@@ -37,21 +37,18 @@
@ApiOperation("鍙充笂瑙掓柊澧�-->宸ヨ壓璺嚎-->閫夋嫨宸ュ簭")
@ApiImplicitParams(value = {
- @ApiImplicitParam(name = "specificationsId", value = "鍨嬪彿id", dataTypeClass = Integer.class, required = true)
+ @ApiImplicitParam(name = "specificationsId", value = "鍨嬪彿id", dataTypeClass = Integer.class, required = true),
+ @ApiImplicitParam(name = "version", value = "鐗堟湰", dataTypeClass = Integer.class, required = true)
})
@GetMapping("/chooseFather")
- public Result<?> chooseFather(Integer specificationsId) {
- return Result.success(technologyService.chooseFather(specificationsId));
+ public Result<?> chooseFather(Integer specificationsId,Integer version) {
+ return Result.success(technologyService.chooseFather(specificationsId,version));
}
@ApiOperation("鍙充笂瑙掓柊澧�-->宸ヨ壓璺嚎")
- @ApiImplicitParams(value = {
- @ApiImplicitParam(name = "specificationsId", value = "鍨嬪彿id", dataTypeClass = Integer.class, required = true)
- })
@PostMapping("/add")
- public Result<?> addTechnology(Integer specificationsId, @Validated @RequestBody TechnologyDto technologyDto) {
- technologyService.addTechnology(specificationsId, technologyDto);
- return Result.success("娣诲姞宸ヨ壓銆�" + technologyDto.getName() + "銆戞垚鍔�");
+ public Result<?> addTechnology(@Validated @RequestBody TechnologyDto technologyDto) {
+ return Result.success(technologyService.addTechnology(technologyDto));
}
@ApiOperation("濉啓鐢熶骇瀹氶,榧犳爣绉诲紑淇濆瓨")
@@ -69,6 +66,21 @@
return Result.fail("鏇存柊澶辫触");
}
+ @ApiOperation("閫夋嫨璁惧缁�,榧犳爣绉诲紑淇濆瓨")
+ @ApiImplicitParams(value = {
+ @ApiImplicitParam(name = "id", value = "宸ヨ壓璺嚎id", dataTypeClass = Integer.class, required = true),
+ @ApiImplicitParam(name = "deviceGroup", value = "璁惧缁�", dataTypeClass = String.class, required = true)
+
+ })
+ @PostMapping("/writeDevice")
+ public Result<?> writeDevice(Integer id, String deviceGroup) {
+ Integer write = technologyService.writeDevice(id, deviceGroup);
+ if (write >= 1) {
+ return Result.success("鏇存柊鎴愬姛");
+ }
+ return Result.fail("鏇存柊澶辫触");
+ }
+
@ApiOperation(value = "鍒犻櫎")
@ApiImplicitParams(value = {
--
Gitblit v1.9.3