diff --git a/jsowell-admin/src/test/java/SpringBootTestController.java b/jsowell-admin/src/test/java/SpringBootTestController.java
index 31c6214e3..ae890db54 100644
--- a/jsowell-admin/src/test/java/SpringBootTestController.java
+++ b/jsowell-admin/src/test/java/SpringBootTestController.java
@@ -41,6 +41,7 @@ import com.jsowell.common.enums.DelFlagEnum;
import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
import com.jsowell.common.enums.ykc.*;
import com.jsowell.common.exception.BusinessException;
+import com.jsowell.common.service.ProtocolService;
import com.jsowell.common.util.*;
import com.jsowell.common.util.Cp56Time2a.Cp56Time2aUtil;
import com.jsowell.common.util.http.HttpUtils;
@@ -94,6 +95,7 @@ import com.jsowell.wxpay.response.WechatPayRefundRequest;
import com.jsowell.wxpay.service.WxAppletRemoteService;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.RandomStringUtils;
+import org.apache.dubbo.config.annotation.DubboReference;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
@@ -292,6 +294,15 @@ public class SpringBootTestController {
@Autowired
private QcyunsService qcyunsService;
+ @DubboReference
+ private ProtocolService protocolService;
+
+ @Test
+ public void testDubbo() {
+ String s = protocolService.sayHello("jsowell-charger-web");
+ System.out.println(s);
+ }
+
@Test
public void testCommonVerificationCode() {
String phoneNumber = "18612341234";
diff --git a/jsowell-pile/pom.xml b/jsowell-pile/pom.xml
index 201064808..c4ee39f54 100644
--- a/jsowell-pile/pom.xml
+++ b/jsowell-pile/pom.xml
@@ -156,6 +156,15 @@
+
+ org.apache.dubbo
+ dubbo
+
+
+
+ com.jsowell
+ charge-common-api
+
@@ -182,4 +191,4 @@
-
\ No newline at end of file
+
diff --git a/jsowell-pile/src/main/java/com/jsowell/dubbo/JCPPService.java b/jsowell-pile/src/main/java/com/jsowell/dubbo/JCPPService.java
new file mode 100644
index 000000000..23b4e61ac
--- /dev/null
+++ b/jsowell-pile/src/main/java/com/jsowell/dubbo/JCPPService.java
@@ -0,0 +1,30 @@
+package com.jsowell.dubbo;
+
+import com.jsowell.common.service.ProtocolService;
+import org.apache.dubbo.config.annotation.DubboReference;
+
+import java.math.BigDecimal;
+
+public class JCPPService {
+
+ @DubboReference
+ ProtocolService protocolService;
+
+ /**
+ * 调用jcpp的下发计费模板
+ */
+
+ /**
+ * 调用jcpp的启动充电
+ */
+ public void startCharge(String pileCode, String gunCode, BigDecimal limitYuan, String orderNo) {
+ protocolService.startCharge(pileCode, gunCode, limitYuan, orderNo);
+ }
+
+ /**
+ * 调用jcpp的停止充电
+ */
+ public void stopCharge(String pileCode, String gunCode, String orderNo) {
+ // protocolService.stopCharge(pileCode, gunCode, orderNo);
+ }
+}
diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileBillingTemplateServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileBillingTemplateServiceImpl.java
index 42cc30092..aac2e143e 100644
--- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileBillingTemplateServiceImpl.java
+++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileBillingTemplateServiceImpl.java
@@ -849,6 +849,7 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic
}
BillingTemplateVO billingTemplateVO = pileBillingTemplateMapper.selectBillingTemplateByPileSn(pileSn);
if (billingTemplateVO != null) {
+ billingTemplateVO.setPileSn(pileSn);
redisCache.setCacheObject(redisKey, JSON.toJSONString(billingTemplateVO), CacheConstants.cache_expire_time_1d);
}
return billingTemplateVO;
diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/vo/web/BillingTemplateVO.java b/jsowell-pile/src/main/java/com/jsowell/pile/vo/web/BillingTemplateVO.java
index 1d052c769..a0fcf627b 100644
--- a/jsowell-pile/src/main/java/com/jsowell/pile/vo/web/BillingTemplateVO.java
+++ b/jsowell-pile/src/main/java/com/jsowell/pile/vo/web/BillingTemplateVO.java
@@ -19,6 +19,7 @@ import java.util.Map;
@AllArgsConstructor
@Builder
public class BillingTemplateVO {
+ private String pileSn;
// 站点id
private String stationId;
diff --git a/pom.xml b/pom.xml
index 0ba5adf88..71e585dc9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -343,7 +343,7 @@
com.jsowell
charge-common-api
- 1.0.0
+ 1.0.1