mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-27 22:45:05 +08:00
update 江苏省平台(原南瑞平台)结构调整
This commit is contained in:
@@ -16,7 +16,7 @@ import com.jsowell.common.util.DateUtils;
|
||||
import com.jsowell.common.util.PageUtils;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.pile.domain.*;
|
||||
import com.jsowell.pile.domain.nanrui.NROrderInfo;
|
||||
import com.jsowell.pile.domain.nanrui.JiangSuOrderInfo;
|
||||
import com.jsowell.pile.dto.PushStationInfoDTO;
|
||||
import com.jsowell.pile.dto.QueryConnectorListDTO;
|
||||
import com.jsowell.pile.dto.QueryStationInfoDTO;
|
||||
@@ -26,7 +26,7 @@ import com.jsowell.pile.service.*;
|
||||
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
||||
import com.jsowell.pile.vo.base.ThirdPartyStationInfoVO;
|
||||
import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO;
|
||||
import com.jsowell.pile.vo.nanrui.NROrderInfoVO;
|
||||
import com.jsowell.pile.vo.nanrui.JiangSuOrderInfoVO;
|
||||
import com.jsowell.pile.vo.uniapp.CurrentTimePriceDetails;
|
||||
import com.jsowell.pile.vo.web.PileConnectorInfoVO;
|
||||
import com.jsowell.pile.vo.web.PileModelInfoVO;
|
||||
@@ -537,11 +537,6 @@ public class NRServiceImpl implements NRService {
|
||||
|
||||
String url = urlAddress + BusinessInformationExchangeEnum.NOTIFICATION_STATION_STATUS.getValue();
|
||||
|
||||
// 获取令牌
|
||||
String token = getToken(urlAddress, operatorId, operatorSecret, dataSecretIv, signSecret, dataSecret);
|
||||
if (StringUtils.isBlank(token)) {
|
||||
return null;
|
||||
}
|
||||
Date chargeStartTime = new Date();
|
||||
if (StringUtils.equals(connectorStatus, "03")) {
|
||||
// 根据交易流水号查询订单信息
|
||||
@@ -571,6 +566,11 @@ public class NRServiceImpl implements NRService {
|
||||
json.put("ConnectorStatusInfo", nrConnectorStatusInfo);
|
||||
String jsonString = JSON.toJSONString(json);
|
||||
|
||||
// 获取令牌
|
||||
String token = getToken(urlAddress, operatorId, operatorSecret, dataSecretIv, signSecret, dataSecret);
|
||||
if (StringUtils.isBlank(token)) {
|
||||
return null;
|
||||
}
|
||||
String result = HttpRequestUtil.nrSendPost(token, jsonString, url, dataSecret, dataSecretIv, operatorId, signSecret);
|
||||
return result;
|
||||
}
|
||||
@@ -672,12 +672,12 @@ public class NRServiceImpl implements NRService {
|
||||
@Override
|
||||
public String pushOrderInfo(String orderCode) {
|
||||
// 根据订单号查询订单信息
|
||||
NROrderInfoVO nrOrderInfoVO = orderBasicInfoService.getNROrderInfoByOrderCode(orderCode);
|
||||
NROrderInfo nrOrderInfo = formatNROrderInfo((nrOrderInfoVO));
|
||||
JiangSuOrderInfoVO nrOrderInfoVO = orderBasicInfoService.getNROrderInfoByOrderCode(orderCode);
|
||||
JiangSuOrderInfo jiangSuOrderInfo = formatNROrderInfo((nrOrderInfoVO));
|
||||
|
||||
// 通过三方平台类型查询相关配置信息
|
||||
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
|
||||
relation.setThirdPartyType(nrOrderInfo.getThirdPartyType());
|
||||
relation.setThirdPartyType(jiangSuOrderInfo.getThirdPartyType());
|
||||
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
|
||||
if (relationInfo == null) {
|
||||
return null;
|
||||
@@ -699,7 +699,7 @@ public class NRServiceImpl implements NRService {
|
||||
|
||||
// 发送请求
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("OrderInfo", nrOrderInfo);
|
||||
jsonObject.put("OrderInfo", jiangSuOrderInfo);
|
||||
|
||||
String jsonString = JSON.toJSONString(jsonObject);
|
||||
|
||||
@@ -715,18 +715,18 @@ public class NRServiceImpl implements NRService {
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> query_order_info(NRQueryOrderDTO dto) {
|
||||
List<NROrderInfo> resultList = new ArrayList<>();
|
||||
List<JiangSuOrderInfo> resultList = new ArrayList<>();
|
||||
ThirdPartyPlatformConfig configInfo = thirdPartyPlatformConfigService.getInfoByOperatorId(dto.getOperatorId());
|
||||
if (configInfo == null) {
|
||||
return null;
|
||||
}
|
||||
List<NROrderInfoVO> nrOrderInfos = orderBasicInfoService.getNROrderInfos(dto);
|
||||
List<JiangSuOrderInfoVO> nrOrderInfos = orderBasicInfoService.getNROrderInfos(dto);
|
||||
if (CollectionUtils.isEmpty(nrOrderInfos)) {
|
||||
return Maps.newLinkedHashMap();
|
||||
}
|
||||
for (NROrderInfoVO nrOrderInfoVO : nrOrderInfos) {
|
||||
NROrderInfo nrOrderInfo = formatNROrderInfo(nrOrderInfoVO);
|
||||
resultList.add(nrOrderInfo);
|
||||
for (JiangSuOrderInfoVO nrOrderInfoVO : nrOrderInfos) {
|
||||
JiangSuOrderInfo jiangSuOrderInfo = formatNROrderInfo(nrOrderInfoVO);
|
||||
resultList.add(jiangSuOrderInfo);
|
||||
}
|
||||
// 加密
|
||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
@@ -748,7 +748,7 @@ public class NRServiceImpl implements NRService {
|
||||
* @param nrOrderInfoVO
|
||||
* @return
|
||||
*/
|
||||
private NROrderInfo formatNROrderInfo(NROrderInfoVO nrOrderInfoVO) {
|
||||
private JiangSuOrderInfo formatNROrderInfo(JiangSuOrderInfoVO nrOrderInfoVO) {
|
||||
// 将组织机构代码截取后九位
|
||||
// String organizationCode = nrOrderInfoVO.getOperatorId();
|
||||
// if (StringUtils.isBlank(organizationCode)) {
|
||||
@@ -756,7 +756,7 @@ public class NRServiceImpl implements NRService {
|
||||
// }
|
||||
// String operatorId = StringUtils.substring(organizationCode, organizationCode.length() - 9);
|
||||
|
||||
NROrderInfo nrOrderInfo = NROrderInfo.builder()
|
||||
JiangSuOrderInfo jiangSuOrderInfo = JiangSuOrderInfo.builder()
|
||||
.operatorId(Constants.OPERATORID_JIANG_SU)
|
||||
.connectorId(nrOrderInfoVO.getConnectorId())
|
||||
.startChargeSeq(nrOrderInfoVO.getStartChargeSeq())
|
||||
@@ -773,9 +773,9 @@ public class NRServiceImpl implements NRService {
|
||||
// TODO 获取电表总起、止值
|
||||
// pileMsgRecordService.getPileFeedList()
|
||||
|
||||
nrOrderInfo.setMeterValueStart(BigDecimal.ZERO);
|
||||
nrOrderInfo.setMeterValueEnd(BigDecimal.ZERO);
|
||||
return nrOrderInfo;
|
||||
jiangSuOrderInfo.setMeterValueStart(BigDecimal.ZERO);
|
||||
jiangSuOrderInfo.setMeterValueEnd(BigDecimal.ZERO);
|
||||
return jiangSuOrderInfo;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
Reference in New Issue
Block a user