update 打印日志

This commit is contained in:
2024-03-19 16:22:40 +08:00
parent f079021ca4
commit 6a6ed9f311
92 changed files with 412 additions and 440 deletions

View File

@@ -33,7 +33,6 @@ import com.jsowell.pile.vo.lianlian.AccumulativeInfoVO;
import com.jsowell.pile.vo.lianlian.PushStationFeeVO;
import com.jsowell.pile.vo.uniapp.BillingPriceVO;
import com.jsowell.pile.vo.web.PileConnectorInfoVO;
import com.jsowell.pile.vo.web.PileDetailVO;
import com.jsowell.pile.vo.web.PileModelInfoVO;
import com.jsowell.pile.vo.web.PileStationVO;
import com.jsowell.thirdparty.common.CommonService;
@@ -56,8 +55,6 @@ import org.springframework.stereotype.Service;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import java.nio.charset.StandardCharsets;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@@ -242,11 +239,11 @@ public class LianLianServiceImpl implements LianLianService {
// 调用联联平台接口
String url = urlAddress + "notification_stationInfo";
String jsonStr = JSONObject.toJSONString(info);
String jsonStr = JSON.toJSONString(info);
JSONObject data = new JSONObject();
data.put("StationInfo", jsonStr);
String jsonString = JSONObject.toJSONString(data);
String jsonString = JSON.toJSONString(data);
System.out.println("jsonString : " + jsonString);
// 获取令牌
@@ -365,11 +362,11 @@ public class LianLianServiceImpl implements LianLianService {
// 调用联联平台接口
String url = urlAddress + "notification_stationInfo";
String jsonStr = JSONObject.toJSONString(info);
String jsonStr = JSON.toJSONString(info);
JSONObject data = new JSONObject();
data.put("StationInfo", jsonStr);
String jsonString = JSONObject.toJSONString(data);
String jsonString = JSON.toJSONString(data);
System.out.println("jsonString : " + jsonString);
// 获取令牌
@@ -404,7 +401,7 @@ public class LianLianServiceImpl implements LianLianService {
//
// Map<String, String> resultMap = Maps.newLinkedHashMap();
// 加密数据
// byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(json).getBytes(),
// byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(json).getBytes(),
// dataSecret.getBytes(), dataSecretIV.getBytes());
// String encryptData = Encodes.encodeBase64(encryptText);
//
@@ -497,7 +494,7 @@ public class LianLianServiceImpl implements LianLianService {
// 加密
Map<String, String> resultMap = Maps.newLinkedHashMap();
// 加密数据
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(map).getBytes(),
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(map).getBytes(),
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
String encryptData = Encodes.encodeBase64(encryptText);
@@ -590,7 +587,7 @@ public class LianLianServiceImpl implements LianLianService {
// 加密
Map<String, String> resultMap = Maps.newLinkedHashMap();
// 加密数据
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(map).getBytes(),
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(map).getBytes(),
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
String encryptData = Encodes.encodeBase64(encryptText);
@@ -689,7 +686,7 @@ public class LianLianServiceImpl implements LianLianService {
// 加密
Map<String, String> resultMap = Maps.newLinkedHashMap();
// 加密数据
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(map).getBytes(),
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(map).getBytes(),
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
String encryptData = Encodes.encodeBase64(encryptText);
@@ -745,7 +742,7 @@ public class LianLianServiceImpl implements LianLianService {
vo.setFailReasonMsg("未查到该桩的数据");
}
// 加密数据
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(vo).getBytes(),
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(vo).getBytes(),
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
String encryptData = Encodes.encodeBase64(encryptText);
@@ -819,7 +816,7 @@ public class LianLianServiceImpl implements LianLianService {
// 加密
Map<String, String> resultMap = Maps.newLinkedHashMap();
// 加密数据
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(vo).getBytes(),
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(vo).getBytes(),
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
String encryptData = Encodes.encodeBase64(encryptText);
@@ -906,7 +903,7 @@ public class LianLianServiceImpl implements LianLianService {
// 加密
Map<String, String> resultMap = Maps.newLinkedHashMap();
// 加密数据
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(vo).getBytes(),
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(vo).getBytes(),
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
String encryptData = Encodes.encodeBase64(encryptText);
@@ -962,7 +959,7 @@ public class LianLianServiceImpl implements LianLianService {
// 加密
Map<String, String> resultMap = Maps.newLinkedHashMap();
// 加密数据
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(vo).getBytes(),
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(vo).getBytes(),
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
String encryptData = Encodes.encodeBase64(encryptText);
@@ -1071,7 +1068,7 @@ public class LianLianServiceImpl implements LianLianService {
// 调用联联平台接口
JSONObject json = new JSONObject();
json.put("ConnectorStatusInfo", info);
String jsonString = JSONObject.toJSONString(json);
String jsonString = JSON.toJSONString(json);
// 获取令牌
String result = "";
String token = "";
@@ -1216,7 +1213,7 @@ public class LianLianServiceImpl implements LianLianService {
// 调用联联平台接口
JSONObject json = new JSONObject();
json.put("OrderInfo", orderInfo);
String jsonString = JSONObject.toJSONString(json);
String jsonString = JSON.toJSONString(json);
String result = HttpRequestUtil.sendPost(token, jsonString, url, dataSecret, dataSecretIv, operatorId, signSecret);
@@ -1274,7 +1271,7 @@ public class LianLianServiceImpl implements LianLianService {
json.put("StartChargeSeqStat", 2); // 一定要给 2-充电中
json.put("StartTime", DateUtils.getDateTime());
String jsonString = JSONObject.toJSONString(json);
String jsonString = JSON.toJSONString(json);
String token = "";
String result = "";
@@ -1343,7 +1340,7 @@ public class LianLianServiceImpl implements LianLianService {
String url = urlAddress + BusinessInformationExchangeEnum.NOTIFICATION_EQUIP_CHARGE_STATUS.getValue();
// 调用联联平台接口
String jsonString = JSONObject.toJSONString(vo);
String jsonString = JSON.toJSONString(vo);
// 获取令牌
String token = "";
@@ -1419,7 +1416,7 @@ public class LianLianServiceImpl implements LianLianService {
json.put("SuccStat", 0);
json.put("FailReason", 0);
String jsonString = JSONObject.toJSONString(json);
String jsonString = JSON.toJSONString(json);
// 获取token
String token = "";
@@ -1491,7 +1488,7 @@ public class LianLianServiceImpl implements LianLianService {
json.put("TotalMoney", orderDetail.getTotalOrderAmount().setScale(2, BigDecimal.ROUND_HALF_UP));
json.put("StopReason", 2); // 2BMS 停止充电
String jsonString = JSONObject.toJSONString(json);
String jsonString = JSON.toJSONString(json);
// 获取令牌
String token = "";
@@ -1552,7 +1549,7 @@ public class LianLianServiceImpl implements LianLianService {
Map<String, String> resultMap = Maps.newLinkedHashMap();
// 加密数据
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(map).getBytes(),
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(map).getBytes(),
platformConfig.getDataSecret().getBytes(), platformConfig.getDataSecretIv().getBytes());
String encryptData = Encodes.encodeBase64(encryptText);
@@ -1575,7 +1572,7 @@ public class LianLianServiceImpl implements LianLianService {
JSONObject json = new JSONObject();
json.put("StartChargeSeq", orderCode);
String jsonString = JSONObject.toJSONString(json);
String jsonString = JSON.toJSONString(json);
OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
@@ -1662,7 +1659,7 @@ public class LianLianServiceImpl implements LianLianService {
if (StringUtils.isBlank(token)) {
return null;
}
String jsonString = JSONObject.toJSONString(json);
String jsonString = JSON.toJSONString(json);
// 发送请求
String result = HttpRequestUtil.sendPost(token, jsonString, url, dataSecret, dataSecretIv, operatorId, signSecret);
@@ -1725,7 +1722,7 @@ public class LianLianServiceImpl implements LianLianService {
JSONObject json = new JSONObject();
json.put("ConnectorChargeStatusInfo", info);
String jsonString = JSONObject.toJSONString(json);
String jsonString = JSON.toJSONString(json);
// 发送请求
String result = HttpRequestUtil.sendPost(token, jsonString, url, dataSecret, dataSecretIv, operatorId, signSecret);
@@ -1792,7 +1789,7 @@ public class LianLianServiceImpl implements LianLianService {
}
JSONObject json = new JSONObject();
json.put("StationFee", vo);
String jsonString = JSONObject.toJSONString(json);
String jsonString = JSON.toJSONString(json);
// 发送请求
String result = HttpRequestUtil.sendPost(token, jsonString, url, dataSecret, dataSecretIv, operatorId, signSecret);
@@ -1854,7 +1851,7 @@ public class LianLianServiceImpl implements LianLianService {
Map<String, String> resultMap = Maps.newLinkedHashMap();
// 加密数据
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(vo).getBytes(),
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(vo).getBytes(),
dataSecret.getBytes(), dataSecretIv.getBytes());
String encryptData = Encodes.encodeBase64(encryptText);