| | |
| | | package com.dy.pipIrrWechat.command; |
| | | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.dy.common.aop.SsoAop; |
| | | import com.dy.common.mw.protocol.p206V1_0_0.CodeV1_0_1; |
| | | import com.dy.common.mw.protocol.p206V1_0_0.downVos.*; |
| | | import com.dy.common.mw.protocol.p206V202404.CodeV202404; |
| | |
| | | */ |
| | | @PostMapping(path = "timed_close", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @SsoAop() |
| | | public BaseResponse<Boolean> timedClose(@RequestBody @Valid AutomaticClose automaticClose, BindingResult bindingResult) { |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | |
| | | myParam.setComId(comId); |
| | | myParam.setComType((byte)2); |
| | | myParam.setCommandCode(commandCode); |
| | | myParam.setCommandName(CodeV202404.getCodeName(commandCode)); |
| | | myParam.setCommandName(CodeV1_0_1.getCodeName(commandCode)); |
| | | myParam.setIntakeId(intakeId); |
| | | myParam.setRtuAddr(rtuAddr); |
| | | myParam.setProtocol(protocol); |
| | |
| | | */ |
| | | @PostMapping(path = "quantify_close", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @SsoAop() |
| | | public BaseResponse<Boolean> quantifyClose(@RequestBody @Valid AutomaticClose automaticClose, BindingResult bindingResult) { |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | |
| | | myParam.setComId(comId); |
| | | myParam.setComType((byte)2); |
| | | myParam.setCommandCode(commandCode); |
| | | myParam.setCommandName(CodeV202404.getCodeName(commandCode)); |
| | | myParam.setCommandName(CodeV1_0_1.getCodeName(commandCode)); |
| | | myParam.setIntakeId(intakeId); |
| | | myParam.setRtuAddr(rtuAddr); |
| | | myParam.setProtocol(protocol); |
| | |
| | | */ |
| | | @PostMapping(path = "planed_open_timed_close", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @SsoAop() |
| | | public BaseResponse<Boolean> planedOpenTimedClose(@RequestBody @Valid AutomaticClose automaticClose, BindingResult bindingResult) { |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | |
| | | myParam.setComId(comId); |
| | | myParam.setComType((byte)2); |
| | | myParam.setCommandCode(commandCode); |
| | | myParam.setCommandName(CodeV202404.getCodeName(commandCode)); |
| | | myParam.setCommandName(CodeV1_0_1.getCodeName(commandCode)); |
| | | myParam.setIntakeId(intakeId); |
| | | myParam.setRtuAddr(rtuAddr); |
| | | myParam.setProtocol(protocol); |
| | |
| | | */ |
| | | @PostMapping(path = "planed_open_quantify_close", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @SsoAop() |
| | | public BaseResponse<Boolean> planedOpenQuantifyClose(@RequestBody @Valid AutomaticClose automaticClose, BindingResult bindingResult) { |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | |
| | | myParam.setComId(comId); |
| | | myParam.setComType((byte)2); |
| | | myParam.setCommandCode(commandCode); |
| | | myParam.setCommandName(CodeV202404.getCodeName(commandCode)); |
| | | myParam.setCommandName(CodeV1_0_1.getCodeName(commandCode)); |
| | | myParam.setIntakeId(intakeId); |
| | | myParam.setRtuAddr(rtuAddr); |
| | | myParam.setProtocol(protocol); |