From acdbf06288c8cbeac4abe3518e8157d753e72574 Mon Sep 17 00:00:00 2001
From: Administrator <zhubaomin>
Date: 星期三, 19 六月 2024 17:49:47 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
---
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/ValveCtrl.java | 44 ++++++++++++++++++++++----------------------
1 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/ValveCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/ValveCtrl.java
index 4b13527..d3fc309 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/ValveCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/ValveCtrl.java
@@ -68,7 +68,7 @@
public BaseResponse<Boolean> open(@RequestBody @Valid ValveOpen valve, BindingResult bindingResult) {
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyMMddHHmmss");
if(bindingResult != null && bindingResult.hasErrors()){
- return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
Long intakeId = valve.getIntakeId();
@@ -84,7 +84,7 @@
if(vcId == null) {
vcId = commandSv.getVcIdByIntakeId(intakeId);
if(vcId == null) {
- return BaseResponseUtils.buildFail(WechatResultCode.PLEASE_SELECT_A_VC.getMessage());
+ return BaseResponseUtils.buildErrorMsg(WechatResultCode.PLEASE_SELECT_A_VC.getMessage());
}
}
@@ -96,10 +96,10 @@
// 铏氭嫙鍗D鎹㈣櫄鎷熷崱瀵硅薄
VoVirtualCard vc = commandSv.getVcById(vcId);
if(vc == null) {
- return BaseResponseUtils.buildFail(WechatResultCode.PLEASE_SELECT_A_VC.getMessage());
+ return BaseResponseUtils.buildErrorMsg(WechatResultCode.PLEASE_SELECT_A_VC.getMessage());
}
if(vc.getInUse() == 1) {
- return BaseResponseUtils.buildFail(WechatResultCode.IN_USE_VC_CANNOT_OPEN_VALVE.getMessage());
+ return BaseResponseUtils.buildErrorMsg(WechatResultCode.IN_USE_VC_CANNOT_OPEN_VALVE.getMessage());
}
// 鑾峰彇姘翠环
@@ -151,8 +151,8 @@
// 鍥炶皟澶辫触
if(!response_CallBack.getCode().equals("0001")) {
- return BaseResponseUtils.buildFail(response_CallBack.getMsg());
- //return BaseResponseUtils.buildFail(response_CallBack.getContent().toString());
+ return BaseResponseUtils.buildErrorMsg(response_CallBack.getMsg());
+ //return BaseResponseUtils.buildErrorMsg(response_CallBack.getContent().toString());
}
// 鍥炶皟鎴愬姛锛屽啀鍒ゆ柇鎵ц鏄惁鎴愬姛
@@ -162,7 +162,7 @@
System.out.println(job_subData);
Boolean dealResult = job_subData.getBoolean("success");
if(!dealResult) {
- return BaseResponseUtils.buildFail(response_CallBack.getContent().toString());
+ return BaseResponseUtils.buildErrorMsg(response_CallBack.getContent().toString());
}
/**
@@ -182,7 +182,7 @@
} else {
// 璇锋眰澶辫触
JSONObject job_param = response_SendCom.getJSONObject("content").getJSONObject("param");
- return BaseResponseUtils.buildFail(job_param.getString("message"));
+ return BaseResponseUtils.buildErrorMsg(job_param.getString("message"));
}
} else if(protocol.equals("p206V1_0_1")) {
// 鑾峰彇鍔熻兘鐮�
@@ -219,7 +219,7 @@
rmCommandHistory.setId(comId);
rmCommandHistory.setResult((byte)0);
commandSv.update(rmCommandHistory);
- return BaseResponseUtils.buildFail(response_CallBack.getContent().toString());
+ return BaseResponseUtils.buildErrorMsg(response_CallBack.getContent().toString());
}
// 鍥炶皟瓒呮椂
@@ -241,7 +241,7 @@
//virtualCard.setLastOperate(LastOperateENUM.OPEN_VALVE.getCode());
//virtualCard.setLastOperateTime(new Date());
//seVirtualCardMapper.updateByPrimaryKeySelective(virtualCard);
- return BaseResponseUtils.buildFail(WechatResultCode.GET_RESULT_IN_ONE_MINUTE.getMessage());
+ return BaseResponseUtils.buildErrorMsg(WechatResultCode.GET_RESULT_IN_ONE_MINUTE.getMessage());
}
// 鍥炶皟鎴愬姛锛屽啀鍒ゆ柇鎵ц鏄惁鎴愬姛
@@ -251,7 +251,7 @@
System.out.println(job_subData);
Boolean dealResult = job_subData.getBoolean("success");
if(!dealResult) {
- return BaseResponseUtils.buildFail(response_CallBack.getContent().toString());
+ return BaseResponseUtils.buildErrorMsg(response_CallBack.getContent().toString());
}
/**
@@ -271,10 +271,10 @@
} else {
// 璇锋眰澶辫触
JSONObject job_param = response_SendCom.getJSONObject("content").getJSONObject("param");
- return BaseResponseUtils.buildFail(job_param.getString("message"));
+ return BaseResponseUtils.buildErrorMsg(job_param.getString("message"));
}
} else {
- return BaseResponseUtils.buildFail("绯荤粺鏆備笉鏀寔璇ュ崗璁�");
+ return BaseResponseUtils.buildErrorMsg("绯荤粺鏆備笉鏀寔璇ュ崗璁�");
}
}
@@ -342,7 +342,7 @@
// 鍥炶皟澶辫触
if(!response_CallBack.getCode().equals("0001")) {
- return BaseResponseUtils.buildFail(response_CallBack.getMsg());
+ return BaseResponseUtils.buildErrorMsg(response_CallBack.getMsg());
//return BaseResponseUtils.buildErrorMsg(WechatResultCode.GET_RESULT_ERROR.getMessage());
}
@@ -353,7 +353,7 @@
System.out.println(job_subData);
Boolean dealResult = job_subData.getBoolean("success");
if(!dealResult) {
- return BaseResponseUtils.buildFail(response_CallBack.getContent().toString());
+ return BaseResponseUtils.buildErrorMsg(response_CallBack.getContent().toString());
}
/**
@@ -374,7 +374,7 @@
} else {
// 璇锋眰澶辫触
JSONObject job_param = response_SendCom.getJSONObject("content").getJSONObject("param");
- return BaseResponseUtils.buildFail(job_param.getString("message"));
+ return BaseResponseUtils.buildErrorMsg(job_param.getString("message"));
}
} else if(protocol.equals("p206V1_0_1")) {
// 鑾峰彇鍔熻兘鐮�
@@ -409,7 +409,7 @@
rmCommandHistory.setId(comId);
rmCommandHistory.setResult((byte)0);
commandSv.update(rmCommandHistory);
- return BaseResponseUtils.buildFail(response_CallBack.getContent().toString());
+ return BaseResponseUtils.buildErrorMsg(response_CallBack.getContent().toString());
}
// 鍥炶皟瓒呮椂
@@ -432,7 +432,7 @@
//virtualCard.setLastOperate(LastOperateENUM.OPEN_VALVE.getCode());
//virtualCard.setLastOperateTime(new Date());
//seVirtualCardMapper.updateByPrimaryKeySelective(virtualCard);
- return BaseResponseUtils.buildFail(WechatResultCode.GET_RESULT_IN_ONE_MINUTE.getMessage());
+ return BaseResponseUtils.buildErrorMsg(WechatResultCode.GET_RESULT_IN_ONE_MINUTE.getMessage());
}
// 鍥炶皟鎴愬姛锛屽啀鍒ゆ柇鎵ц鏄惁鎴愬姛
@@ -442,7 +442,7 @@
System.out.println(job_subData);
Boolean dealResult = job_subData.getBoolean("success");
if(!dealResult) {
- return BaseResponseUtils.buildFail(response_CallBack.getContent().toString());
+ return BaseResponseUtils.buildErrorMsg(response_CallBack.getContent().toString());
}
/**
@@ -463,10 +463,10 @@
} else {
// 璇锋眰澶辫触
JSONObject job_param = response_SendCom.getJSONObject("content").getJSONObject("param");
- return BaseResponseUtils.buildFail(job_param.getString("message"));
+ return BaseResponseUtils.buildErrorMsg(job_param.getString("message"));
}
} else {
- return BaseResponseUtils.buildFail("绯荤粺鏆備笉鏀寔璇ュ崗璁�");
+ return BaseResponseUtils.buildErrorMsg("绯荤粺鏆備笉鏀寔璇ュ崗璁�");
}
}
@@ -476,7 +476,7 @@
* @return
*/
@GetMapping(path = "/get")
- @SsoAop()
+ //@SsoAop()
public BaseResponse<List<VoUnclosedValve>> getUnclosedValves(@RequestParam Long operator){
try {
List<VoUnclosedValve> res = commandSv.getUnclosedValves(operator);
--
Gitblit v1.8.0