mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
update
This commit is contained in:
@@ -9,9 +9,12 @@ import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.common.util.YKCUtils;
|
||||
import com.jsowell.netty.factory.YKCOperateFactory;
|
||||
import com.jsowell.pile.domain.OrderBasicInfo;
|
||||
import com.jsowell.pile.domain.StationSettingRelation;
|
||||
import com.jsowell.pile.domain.ThirdPartySettingInfo;
|
||||
import com.jsowell.pile.service.IOrderBasicInfoService;
|
||||
import com.jsowell.pile.service.IStationSettingRelationService;
|
||||
import com.jsowell.pile.service.IThirdPartySettingInfoService;
|
||||
import com.jsowell.pile.vo.base.StationSettingRelationVO;
|
||||
import com.jsowell.thirdparty.lianlian.service.LianLianService;
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -42,6 +45,9 @@ public class ChargeEndHandler extends AbstractHandler{
|
||||
@Autowired
|
||||
private LianLianService lianLianService;
|
||||
|
||||
@Autowired
|
||||
private IStationSettingRelationService stationSettingRelationService;
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
YKCOperateFactory.register(type, this);
|
||||
@@ -127,8 +133,12 @@ public class ChargeEndHandler extends AbstractHandler{
|
||||
|
||||
try {
|
||||
// 查询该站点是否已对接互联互通平台,如果对接则发送充电结束
|
||||
ThirdPartySettingInfo info = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId()));
|
||||
if (Objects.nonNull(info)) {
|
||||
// 通过站点id查询相关配置信息
|
||||
StationSettingRelation relation = new StationSettingRelation();
|
||||
relation.setStationId(Long.parseLong(orderInfo.getStationId()));
|
||||
StationSettingRelationVO relationInfo = stationSettingRelationService.selectRelationInfo(relation);
|
||||
// ThirdPartySettingInfo info = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId()));
|
||||
if (Objects.nonNull(relationInfo)) {
|
||||
// 推送停止充电结果
|
||||
lianLianService.pushStopChargeResult(orderInfo.getOrderCode());
|
||||
}
|
||||
|
||||
@@ -19,11 +19,10 @@ import com.jsowell.common.util.id.IdUtils;
|
||||
import com.jsowell.netty.factory.YKCOperateFactory;
|
||||
import com.jsowell.pile.domain.OrderBasicInfo;
|
||||
import com.jsowell.pile.domain.PileAuthCard;
|
||||
import com.jsowell.pile.domain.StationSettingRelation;
|
||||
import com.jsowell.pile.domain.ThirdPartySettingInfo;
|
||||
import com.jsowell.pile.service.IOrderBasicInfoService;
|
||||
import com.jsowell.pile.service.IPileAuthCardService;
|
||||
import com.jsowell.pile.service.IPileMsgRecordService;
|
||||
import com.jsowell.pile.service.IThirdPartySettingInfoService;
|
||||
import com.jsowell.pile.service.*;
|
||||
import com.jsowell.pile.vo.base.StationSettingRelationVO;
|
||||
import com.jsowell.thirdparty.lianlian.service.LianLianService;
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -72,6 +71,9 @@ public class TransactionRecordsRequestHandler extends AbstractHandler {
|
||||
@Autowired
|
||||
private LianLianService lianLianService;
|
||||
|
||||
@Autowired
|
||||
private IStationSettingRelationService stationSettingRelationService;
|
||||
|
||||
public static void main(String[] args) {
|
||||
// 获取消息体
|
||||
String msg = "000000000000000000000000000000008823000000030601a08c2e0d0404170000380d0404170000000000000000000000000000000000000000000000000000000000000000400d0300ee250000ee250000c84b000000000000000000000000000000000000e0bb040000cee1040000ee250000ee250000c84b00000000000000000000000000000000000000010000380d04041745a511101970000000";
|
||||
@@ -620,9 +622,11 @@ public class TransactionRecordsRequestHandler extends AbstractHandler {
|
||||
try {
|
||||
// 联联平台 推送订单信息 notification_orderInfo
|
||||
// 查询该站点是否推送联联平台
|
||||
String stationId = orderBasicInfo.getStationId();
|
||||
ThirdPartySettingInfo infoByStationId = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(stationId));
|
||||
if (Objects.nonNull(infoByStationId)) {
|
||||
StationSettingRelation relation = new StationSettingRelation();
|
||||
relation.setStationId(Long.parseLong(orderBasicInfo.getStationId()));
|
||||
StationSettingRelationVO relationInfo = stationSettingRelationService.selectRelationInfo(relation);
|
||||
// ThirdPartySettingInfo infoByStationId = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(stationId));
|
||||
if (Objects.nonNull(relationInfo)) {
|
||||
// 推送订单信息
|
||||
lianLianService.pushOrderInfo(orderBasicInfo.getOrderCode());
|
||||
// 推送充电订单信息
|
||||
|
||||
@@ -13,11 +13,10 @@ import com.jsowell.common.util.YKCUtils;
|
||||
import com.jsowell.netty.factory.YKCOperateFactory;
|
||||
import com.jsowell.pile.domain.OrderBasicInfo;
|
||||
import com.jsowell.pile.domain.PileBasicInfo;
|
||||
import com.jsowell.pile.domain.StationSettingRelation;
|
||||
import com.jsowell.pile.domain.ThirdPartySettingInfo;
|
||||
import com.jsowell.pile.service.IOrderBasicInfoService;
|
||||
import com.jsowell.pile.service.IPileBasicInfoService;
|
||||
import com.jsowell.pile.service.IPileConnectorInfoService;
|
||||
import com.jsowell.pile.service.IThirdPartySettingInfoService;
|
||||
import com.jsowell.pile.service.*;
|
||||
import com.jsowell.pile.vo.base.StationSettingRelationVO;
|
||||
import com.jsowell.thirdparty.lianlian.service.LianLianService;
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -61,6 +60,9 @@ public class UploadRealTimeMonitorHandler extends AbstractHandler {
|
||||
@Autowired
|
||||
private LianLianService lianLianService;
|
||||
|
||||
@Autowired
|
||||
private IStationSettingRelationService stationSettingRelationService;
|
||||
|
||||
@Override
|
||||
public byte[] supplyProcess(YKCDataProtocol ykcDataProtocol, Channel channel) {
|
||||
log.info("[===获取桩上传的实时监测数据===] param:{}, channel:{}", JSONObject.toJSONString(ykcDataProtocol), channel.toString());
|
||||
@@ -288,9 +290,12 @@ public class UploadRealTimeMonitorHandler extends AbstractHandler {
|
||||
return null;
|
||||
}
|
||||
// 状态不一样,传给联联
|
||||
PileBasicInfo pileBasicInfo = pileBasicInfoService.selectPileBasicInfoBySN(pileSn);
|
||||
ThirdPartySettingInfo thirdPartySettingInfo = thirdPartySettingInfoService.getInfoByStationId(pileBasicInfo.getStationId());
|
||||
if (Objects.nonNull(thirdPartySettingInfo)) {
|
||||
// 查询该站点是否推送联联平台
|
||||
StationSettingRelation relation = new StationSettingRelation();
|
||||
relation.setStationId(Long.parseLong(orderInfo.getStationId()));
|
||||
StationSettingRelationVO relationInfo = stationSettingRelationService.selectRelationInfo(relation);
|
||||
// ThirdPartySettingInfo thirdPartySettingInfo = thirdPartySettingInfoService.getInfoByStationId(pileBasicInfo.getStationId());
|
||||
if (Objects.nonNull(relationInfo)) {
|
||||
String pileConnectorCode = pileSn + connectorCode;
|
||||
// 设备状态变化推送 notification_stationStatus
|
||||
lianLianService.pushConnectorStatus(pileConnectorCode, connectorStatus);
|
||||
|
||||
Reference in New Issue
Block a user