From b81dcbba7174fc935cbe29d867f493d45cc701c5 Mon Sep 17 00:00:00 2001
From: wuzeyu <1223318623@qq.com>
Date: 星期四, 06 六月 2024 11:28:03 +0800
Subject: [PATCH] 修改农户模块添加接口
---
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/valve/ValveCtrl.java | 91 ++++++++++++++++++++++-----------------------
1 files changed, 44 insertions(+), 47 deletions(-)
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/valve/ValveCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/valve/ValveCtrl.java
index b6036ba..f79bf18 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/valve/ValveCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/valve/ValveCtrl.java
@@ -17,14 +17,12 @@
import com.dy.pipIrrGlobal.command.ComSupport;
import com.dy.pipIrrGlobal.daoSe.SeVirtualCardMapper;
import com.dy.pipIrrGlobal.pojoRm.RmCommandHistory;
-import com.dy.pipIrrGlobal.pojoSe.SeVirtualCard;
import com.dy.pipIrrGlobal.voRm.VoUnclosedValve;
import com.dy.pipIrrGlobal.voSe.VoVirtualCard;
import com.dy.pipIrrRemote.common.CommandSv;
import com.dy.pipIrrRemote.common.dto.ValveClose;
import com.dy.pipIrrRemote.common.dto.ValveOpen;
import com.dy.pipIrrRemote.result.RemoteResultCode;
-import com.dy.pipIrrSell.virtualCard.enums.LastOperateENUM;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
@@ -35,7 +33,6 @@
import org.springframework.web.bind.annotation.*;
import java.time.format.DateTimeFormatter;
-import java.util.Date;
import java.util.List;
import java.util.Objects;
@@ -58,7 +55,7 @@
private String rtuResultSendWebUrl = "http://127.0.0.1:8081/remote/comRes/receive" ;
/**
- * 灏忕▼搴忚繙绋嬪紑闃�
+ * 骞冲彴杩滅▼寮�闃�
* @param valve
* @param bindingResult
* @return
@@ -155,10 +152,10 @@
// 鍥炶皟澶辫触
if(!response_CallBack.getCode().equals("0001")) {
// 鍛戒护鏃ュ織鎵ц缁撴灉鏀逛负澶辫触
- rmCommandHistory = new RmCommandHistory();
- rmCommandHistory.setId(comId);
- rmCommandHistory.setResult((byte)0);
- commandSv.updateCommandResult(rmCommandHistory);
+ //rmCommandHistory = new RmCommandHistory();
+ //rmCommandHistory.setId(comId);
+ //rmCommandHistory.setResult((byte)0);
+ //commandSv.updateCommandResult(rmCommandHistory);
return BaseResponseUtils.buildFail(response_CallBack.getMsg());
//return BaseResponseUtils.buildFail(response_CallBack.getContent().toString());
}
@@ -177,12 +174,12 @@
* 鎵ц鎴愬姛
* 鏇存敼铏氭嫙鍗$姸鎬侊細鏄惁浣跨敤涓�佹渶鍚庢搷浣溿�佹渶鍚庢搷浣滄椂闂�
*/
- SeVirtualCard virtualCard = new SeVirtualCard();
- virtualCard.setId(vcId);
- virtualCard.setInUse((byte) 1);
- virtualCard.setLastOperate(LastOperateENUM.OPEN_VALVE.getCode());
- virtualCard.setLastOperateTime(new Date());
- seVirtualCardMapper.updateByPrimaryKeySelective(virtualCard);
+ //SeVirtualCard virtualCard = new SeVirtualCard();
+ //virtualCard.setId(vcId);
+ //virtualCard.setInUse((byte) 1);
+ //virtualCard.setLastOperate(LastOperateENUM.OPEN_VALVE.getCode());
+ //virtualCard.setLastOperateTime(new Date());
+ //seVirtualCardMapper.updateByPrimaryKeySelective(virtualCard);
// 鍥炶皟杩斿洖鐨勫唴瀹�
Data myData = (Data)response_CallBack.getContent();
@@ -223,10 +220,10 @@
//鍥炶皟澶辫触
if(!response_CallBack.getCode().equals("0001")) {
// 鍛戒护鏃ュ織鎵ц缁撴灉鏀逛负澶辫触
- rmCommandHistory = new RmCommandHistory();
- rmCommandHistory.setId(comId);
- rmCommandHistory.setResult((byte)0);
- commandSv.updateCommandResult(rmCommandHistory);
+ //rmCommandHistory = new RmCommandHistory();
+ //rmCommandHistory.setId(comId);
+ //rmCommandHistory.setResult((byte)0);
+ //commandSv.updateCommandResult(rmCommandHistory);
return BaseResponseUtils.buildFail(response_CallBack.getMsg());
//return BaseResponseUtils.buildFail(response_CallBack.getContent().toString());
}
@@ -245,12 +242,12 @@
* 鎵ц鎴愬姛
* 鏇存敼铏氭嫙鍗$姸鎬侊細鏄惁浣跨敤涓�佹渶鍚庢搷浣溿�佹渶鍚庢搷浣滄椂闂�
*/
- SeVirtualCard virtualCard = new SeVirtualCard();
- virtualCard.setId(vcId);
- virtualCard.setInUse((byte) 1);
- virtualCard.setLastOperate(LastOperateENUM.OPEN_VALVE.getCode());
- virtualCard.setLastOperateTime(new Date());
- seVirtualCardMapper.updateByPrimaryKeySelective(virtualCard);
+ //SeVirtualCard virtualCard = new SeVirtualCard();
+ //virtualCard.setId(vcId);
+ //virtualCard.setInUse((byte) 1);
+ //virtualCard.setLastOperate(LastOperateENUM.OPEN_VALVE.getCode());
+ //virtualCard.setLastOperateTime(new Date());
+ //seVirtualCardMapper.updateByPrimaryKeySelective(virtualCard);
// 鍥炶皟杩斿洖鐨勫唴瀹�
Data myData = (Data)response_CallBack.getContent();
@@ -266,7 +263,7 @@
}
/**
- * 灏忕▼搴忚繙绋嬪叧闃�
+ * 骞冲彴杩滅▼鍏抽榾
* @param valve
* @param bindingResult
* @return
@@ -330,10 +327,10 @@
// 鍥炶皟澶辫触
if(!response_CallBack.getCode().equals("0001")) {
// 鍛戒护鏃ュ織鎵ц缁撴灉鏀逛负澶辫触
- rmCommandHistory = new RmCommandHistory();
- rmCommandHistory.setId(comId);
- rmCommandHistory.setResult((byte)0);
- commandSv.updateCommandResult(rmCommandHistory);
+ //rmCommandHistory = new RmCommandHistory();
+ //rmCommandHistory.setId(comId);
+ //rmCommandHistory.setResult((byte)0);
+ //commandSv.updateCommandResult(rmCommandHistory);
return BaseResponseUtils.buildFail(response_CallBack.getMsg());
//return BaseResponseUtils.buildError(WechatResultCode.GET_RESULT_ERROR.getMessage());
}
@@ -352,13 +349,13 @@
* 鎵ц鎴愬姛
* 鏇存敼铏氭嫙鍗$姸鎬侊細鏄惁浣跨敤涓�佹渶鍚庢搷浣溿�佹渶鍚庢搷浣滄椂闂�
*/
- Long vcId = seVirtualCardMapper.getVcIdByNum(vcNum);
- SeVirtualCard virtualCard = new SeVirtualCard();
- virtualCard.setId(vcId);
- virtualCard.setInUse((byte) 0);
- virtualCard.setLastOperate(LastOperateENUM.OPEN_VALVE.getCode());
- virtualCard.setLastOperateTime(new Date());
- seVirtualCardMapper.updateByPrimaryKeySelective(virtualCard);
+ //Long vcId = seVirtualCardMapper.getVcIdByNum(vcNum);
+ //SeVirtualCard virtualCard = new SeVirtualCard();
+ //virtualCard.setId(vcId);
+ //virtualCard.setInUse((byte) 0);
+ //virtualCard.setLastOperate(LastOperateENUM.OPEN_VALVE.getCode());
+ //virtualCard.setLastOperateTime(new Date());
+ //seVirtualCardMapper.updateByPrimaryKeySelective(virtualCard);
// 鍥炶皟杩斿洖鐨勫唴瀹�
Data myData = (Data)response_CallBack.getContent();
@@ -397,10 +394,10 @@
// 鍥炶皟澶辫触
if(!response_CallBack.getCode().equals("0001")) {
// 鍛戒护鏃ュ織鎵ц缁撴灉鏀逛负澶辫触
- rmCommandHistory = new RmCommandHistory();
- rmCommandHistory.setId(comId);
- rmCommandHistory.setResult((byte)0);
- commandSv.updateCommandResult(rmCommandHistory);
+ //rmCommandHistory = new RmCommandHistory();
+ //rmCommandHistory.setId(comId);
+ //rmCommandHistory.setResult((byte)0);
+ //commandSv.updateCommandResult(rmCommandHistory);
return BaseResponseUtils.buildFail(response_CallBack.getMsg());
//return BaseResponseUtils.buildError(WechatResultCode.GET_RESULT_ERROR.getMessage());
}
@@ -419,13 +416,13 @@
* 鎵ц鎴愬姛
* 鏇存敼铏氭嫙鍗$姸鎬侊細鏄惁浣跨敤涓�佹渶鍚庢搷浣溿�佹渶鍚庢搷浣滄椂闂�
*/
- Long vcId = seVirtualCardMapper.getVcIdByNum(vcNum);
- SeVirtualCard virtualCard = new SeVirtualCard();
- virtualCard.setId(vcId);
- virtualCard.setInUse((byte) 0);
- virtualCard.setLastOperate(LastOperateENUM.OPEN_VALVE.getCode());
- virtualCard.setLastOperateTime(new Date());
- seVirtualCardMapper.updateByPrimaryKeySelective(virtualCard);
+ //Long vcId = seVirtualCardMapper.getVcIdByNum(vcNum);
+ //SeVirtualCard virtualCard = new SeVirtualCard();
+ //virtualCard.setId(vcId);
+ //virtualCard.setInUse((byte) 0);
+ //virtualCard.setLastOperate(LastOperateENUM.OPEN_VALVE.getCode());
+ //virtualCard.setLastOperateTime(new Date());
+ //seVirtualCardMapper.updateByPrimaryKeySelective(virtualCard);
// 鍥炶皟杩斿洖鐨勫唴瀹�
Data myData = (Data)response_CallBack.getContent();
--
Gitblit v1.8.0