src/main/java/com/whyc/controller/CKPowerDevAlmParamController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/whyc/controller/CKPowerDevModecontrolController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/whyc/controller/CKPowerDevModeparamController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/whyc/mapper/CKPowerDevModecontrolMapper.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/whyc/mapper/CKPowerDevModeparamMapper.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/whyc/service/CKPowerDevModecontrolService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/whyc/service/CKPowerDevModeparamService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/whyc/controller/CKPowerDevAlmParamController.java
@@ -9,7 +9,7 @@ import org.springframework.web.bind.annotation.*; @RestController @Api(tags = "测控电源告警模块") @Api(tags = "测控电源告警参数") @RequestMapping("ckPowerDevAlmParam") public class CKPowerDevAlmParamController { src/main/java/com/whyc/controller/CKPowerDevModecontrolController.java
New file @@ -0,0 +1,32 @@ package com.whyc.controller; import com.whyc.dto.Response; import com.whyc.pojo.db_ckpwrdev_data_rt.CKPowerDevModecontrol; import com.whyc.pojo.db_ckpwrdev_data_rt.CKPowerDevModeparam; import com.whyc.service.CKPowerDevModecontrolService; import com.whyc.service.CKPowerDevModeparamService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @RestController @Api(tags = "测控电源模块控制") @RequestMapping("cKPowerDevModecontrol") public class CKPowerDevModecontrolController { @Autowired private CKPowerDevModecontrolService service; @ApiOperation("读取模块控制") @GetMapping("getModeControl") public Response getModeControl(){ return service.getModeControl(); } @ApiOperation("设置模块控制") @PostMapping("setModeControl") public Response setModeControl(@RequestBody CKPowerDevModecontrol modeConrol){ return service.setModeControl(modeConrol); } } src/main/java/com/whyc/controller/CKPowerDevModeparamController.java
New file @@ -0,0 +1,32 @@ package com.whyc.controller; import com.whyc.dto.Response; import com.whyc.pojo.db_ckpwrdev_data_rt.CKPowerDevAlmParam; import com.whyc.pojo.db_ckpwrdev_data_rt.CKPowerDevModeparam; import com.whyc.service.CKPowerDevAlmParamService; import com.whyc.service.CKPowerDevModeparamService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @RestController @Api(tags = "测控电源模块参数") @RequestMapping("cKPowerDevModeparam") public class CKPowerDevModeparamController { @Autowired private CKPowerDevModeparamService service; @ApiOperation("读取模块参数") @GetMapping("getModeParam") public Response getModeParam(){ return service.getModeParam(); } @ApiOperation("设置模块参数") @PostMapping("setModeParam") public Response setModeParam(@RequestBody CKPowerDevModeparam modeParam){ return service.setModeParam(modeParam); } } src/main/java/com/whyc/mapper/CKPowerDevModecontrolMapper.java
New file @@ -0,0 +1,6 @@ package com.whyc.mapper; import com.whyc.pojo.db_ckpwrdev_data_rt.CKPowerDevModecontrol; public interface CKPowerDevModecontrolMapper extends CustomMapper<CKPowerDevModecontrol>{ } src/main/java/com/whyc/mapper/CKPowerDevModeparamMapper.java
New file @@ -0,0 +1,6 @@ package com.whyc.mapper; import com.whyc.pojo.db_ckpwrdev_data_rt.CKPowerDevModeparam; public interface CKPowerDevModeparamMapper extends CustomMapper<CKPowerDevModeparam>{ } src/main/java/com/whyc/service/CKPowerDevModecontrolService.java
New file @@ -0,0 +1,33 @@ package com.whyc.service; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.whyc.constant.CMD_Constant; import com.whyc.dto.Response; import com.whyc.mapper.CKPowerDevModecontrolMapper; import com.whyc.pojo.db_ckpwrdev_data_rt.CKPowerDevModecontrol; import com.whyc.pojo.db_ckpwrdev_data_rt.CKPowerDevModeparam; import com.whyc.util.OpCmdUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service public class CKPowerDevModecontrolService { @Autowired(required = false) private CKPowerDevModecontrolMapper mapper; //读取模块控制 public Response getModeControl() { //读取opCmd返回是否成功 QueryWrapper<CKPowerDevModecontrol> query = Wrappers.query(); Response res= OpCmdUtil.readByUpdateOpCmd(mapper,query, CMD_Constant.CMD_GetModelControl,20,null); return res; } //设置模块控制 public Response setModeControl(CKPowerDevModecontrol modeConrol) { mapper.update(modeConrol,null); //读取opCmd返回是否成功 QueryWrapper<CKPowerDevModecontrol> query = Wrappers.query(); return OpCmdUtil.getOpStatus(mapper,query, CMD_Constant.CMD_SetModelControl,20); } } src/main/java/com/whyc/service/CKPowerDevModeparamService.java
New file @@ -0,0 +1,33 @@ package com.whyc.service; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.whyc.constant.CMD_Constant; import com.whyc.dto.Response; import com.whyc.mapper.CKPowerDevModeparamMapper; import com.whyc.pojo.db_ckpwrdev_data_rt.CKPowerDevAlmParam; import com.whyc.pojo.db_ckpwrdev_data_rt.CKPowerDevModeparam; import com.whyc.util.OpCmdUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service public class CKPowerDevModeparamService { @Autowired(required = false) private CKPowerDevModeparamMapper mapper; //读取模块参数 public Response getModeParam() { //读取opCmd返回是否成功 QueryWrapper<CKPowerDevModeparam> query = Wrappers.query(); Response res= OpCmdUtil.readByUpdateOpCmd(mapper,query, CMD_Constant.CMD_GetModelParam,20,null); return res; } //设置模块参数 public Response setModeParam(CKPowerDevModeparam modeParam) { mapper.update(modeParam,null); //读取opCmd返回是否成功 QueryWrapper<CKPowerDevModeparam> query = Wrappers.query(); return OpCmdUtil.getOpStatus(mapper,query, CMD_Constant.CMD_SetModelParam,20); } }