From ae42d2da37fe9d161e7058b51367b95f24c3d97a Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期二, 13 六月 2023 15:11:36 +0800
Subject: [PATCH] optimize
---
service-common/src/main/java/com/java110/common/cmd/chargeMachine/StopChargeCmd.java | 36 +++++++++++++-----------------------
1 files changed, 13 insertions(+), 23 deletions(-)
diff --git a/service-common/src/main/java/com/java110/common/cmd/chargeMachine/StopChargeCmd.java b/service-common/src/main/java/com/java110/common/cmd/chargeMachine/StopChargeCmd.java
index 8517775..2405964 100644
--- a/service-common/src/main/java/com/java110/common/cmd/chargeMachine/StopChargeCmd.java
+++ b/service-common/src/main/java/com/java110/common/cmd/chargeMachine/StopChargeCmd.java
@@ -6,28 +6,19 @@
import com.java110.core.context.ICmdDataFlowContext;
import com.java110.core.event.cmd.Cmd;
import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.dto.account.AccountDto;
import com.java110.dto.chargeMachine.ChargeMachineDto;
-import com.java110.dto.chargeMachineOrder.ChargeMachineOrderDto;
-import com.java110.dto.chargeMachinePort.ChargeMachinePortDto;
-import com.java110.dto.user.UserDto;
+import com.java110.dto.chargeMachine.ChargeMachinePortDto;
import com.java110.intf.acct.IAccountInnerServiceSMO;
import com.java110.intf.common.IChargeMachineOrderV1InnerServiceSMO;
import com.java110.intf.common.IChargeMachinePortV1InnerServiceSMO;
import com.java110.intf.common.IChargeMachineV1InnerServiceSMO;
import com.java110.intf.user.IUserV1InnerServiceSMO;
-import com.java110.po.chargeMachineOrder.ChargeMachineOrderPo;
-import com.java110.po.chargeMachinePort.ChargeMachinePortPo;
import com.java110.utils.exception.CmdException;
import com.java110.utils.util.Assert;
-import com.java110.utils.util.DateUtil;
import com.java110.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
-import java.math.BigDecimal;
import java.text.ParseException;
-import java.util.Calendar;
import java.util.List;
/**
@@ -61,7 +52,6 @@
Assert.hasKeyAndValue(reqJson, "communityId", "鏈寘鍚皬鍖轰俊鎭�");
Assert.hasKeyAndValue(reqJson, "machineId", "鏈寘鍚厖鐢垫々");
Assert.hasKeyAndValue(reqJson, "portId", "鏈寘鍚彃妲�");
- Assert.hasKeyAndValue(reqJson, "orderId", "鏈寘鍚鍗曞彿");
String userId = context.getReqHeaders().get("user-id");
Assert.hasLength(userId, "鐢ㄦ埛涓嶅瓨鍦�");
@@ -98,7 +88,6 @@
chargeMachinePortDto.setPortId(reqJson.getString("portId"));
List<ChargeMachinePortDto> chargeMachinePortDtos = chargeMachinePortV1InnerServiceSMOImpl.queryChargeMachinePorts(chargeMachinePortDto);
- String orderId = reqJson.getString("orderId");
//璋冪敤鍏呯數妗╁厖鐢�
ResultVo resultVo = chargeCoreImpl.stopCharge(chargeMachineDtos.get(0), chargeMachinePortDtos.get(0));
@@ -107,18 +96,19 @@
return;
}
- // todo 鐢熸垚 鍏呯數璁㈠崟
- ChargeMachineOrderPo chargeMachineOrderPo = new ChargeMachineOrderPo();
- chargeMachineOrderPo.setEndTime(DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
- chargeMachineOrderPo.setState(ChargeMachineOrderDto.STATE_FINISH);
- chargeMachineOrderPo.setCommunityId(chargeMachineDtos.get(0).getCommunityId());
- chargeMachineOrderPo.setOrderId(orderId);
- chargeMachineOrderV1InnerServiceSMOImpl.updateChargeMachineOrder(chargeMachineOrderPo);
+// // todo 鐢熸垚 鍏呯數璁㈠崟
+// ChargeMachineOrderPo chargeMachineOrderPo = new ChargeMachineOrderPo();
+// chargeMachineOrderPo.setEndTime(DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
+// chargeMachineOrderPo.setState(ChargeMachineOrderDto.STATE_FINISH);
+// chargeMachineOrderPo.setCommunityId(chargeMachineDtos.get(0).getCommunityId());
+// chargeMachineOrderPo.setOrderId(orderId);
+// chargeMachineOrderV1InnerServiceSMOImpl.updateChargeMachineOrder(chargeMachineOrderPo);
- ChargeMachinePortPo chargeMachinePortPo = new ChargeMachinePortPo();
- chargeMachinePortPo.setPortId(reqJson.getString("portId"));
- chargeMachinePortPo.setState(ChargeMachinePortDto.STATE_FREE);
- chargeMachinePortV1InnerServiceSMOImpl.updateChargeMachinePort(chargeMachinePortPo);
+ //todo 杩欓噷涓嶆搷浣� 浠ヨ澶囬�氱煡涓轰富
+// ChargeMachinePortPo chargeMachinePortPo = new ChargeMachinePortPo();
+// chargeMachinePortPo.setPortId(reqJson.getString("portId"));
+// chargeMachinePortPo.setState(ChargeMachinePortDto.STATE_FREE);
+// chargeMachinePortV1InnerServiceSMOImpl.updateChargeMachinePort(chargeMachinePortPo);
context.setResponseEntity(ResultVo.createResponseEntity(resultVo));
}
--
Gitblit v1.8.0