2023-05-26 19:25:35 +08:00
|
|
|
|
import cn.hutool.json.JSONUtil;
|
2023-05-27 11:55:45 +08:00
|
|
|
|
import com.alibaba.fastjson2.JSON;
|
2023-09-14 17:36:45 +08:00
|
|
|
|
import com.alibaba.fastjson2.JSONArray;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
|
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
2023-05-31 16:05:18 +08:00
|
|
|
|
import com.fasterxml.jackson.databind.DeserializationFeature;
|
2023-05-30 16:33:49 +08:00
|
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
|
|
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
import com.google.common.collect.ImmutableMap;
|
2023-06-26 17:10:36 +08:00
|
|
|
|
import com.google.common.collect.Lists;
|
2023-05-27 16:01:27 +08:00
|
|
|
|
import com.google.common.collect.Maps;
|
2023-07-17 16:44:04 +08:00
|
|
|
|
import com.google.common.collect.Sets;
|
2023-06-12 17:38:16 +08:00
|
|
|
|
import com.google.common.primitives.Bytes;
|
2023-06-15 14:06:33 +08:00
|
|
|
|
import com.huifu.adapay.core.exception.BaseAdaPayException;
|
2023-08-25 16:07:15 +08:00
|
|
|
|
import com.huifu.adapay.model.Payment;
|
2023-05-27 16:01:27 +08:00
|
|
|
|
import com.huifu.adapay.model.Refund;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
import com.jsowell.JsowellApplication;
|
2023-08-15 11:02:02 +08:00
|
|
|
|
import com.jsowell.adapay.config.AbstractAdapayConfig;
|
2023-08-21 08:52:32 +08:00
|
|
|
|
import com.jsowell.adapay.dto.QueryAcctFlowDTO;
|
2023-08-21 16:19:33 +08:00
|
|
|
|
import com.jsowell.adapay.dto.QueryPaymentConfirmDTO;
|
2023-08-21 15:37:00 +08:00
|
|
|
|
import com.jsowell.adapay.dto.SettleAccountDTO;
|
2023-08-15 11:02:02 +08:00
|
|
|
|
import com.jsowell.adapay.factory.AdapayConfigFactory;
|
2023-08-21 16:19:33 +08:00
|
|
|
|
import com.jsowell.adapay.response.QueryPaymentConfirmDetailResponse;
|
2023-08-18 09:52:12 +08:00
|
|
|
|
import com.jsowell.adapay.service.AdapayService;
|
2023-08-21 13:20:17 +08:00
|
|
|
|
import com.jsowell.adapay.vo.DrawCashDetailVO;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
import com.jsowell.common.constant.CacheConstants;
|
|
|
|
|
|
import com.jsowell.common.constant.Constants;
|
2023-05-30 13:45:56 +08:00
|
|
|
|
import com.jsowell.common.core.domain.entity.SysDictData;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
import com.jsowell.common.core.domain.ykc.LoginRequestData;
|
|
|
|
|
|
import com.jsowell.common.core.domain.ykc.TransactionRecordsData;
|
|
|
|
|
|
import com.jsowell.common.core.redis.RedisCache;
|
2023-08-30 10:13:56 +08:00
|
|
|
|
import com.jsowell.common.enums.AcquirerEnum;
|
2023-08-01 16:16:34 +08:00
|
|
|
|
import com.jsowell.common.enums.DelFlagEnum;
|
2023-07-08 11:33:45 +08:00
|
|
|
|
import com.jsowell.common.enums.ykc.*;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
import com.jsowell.common.exception.BusinessException;
|
2023-05-10 08:49:01 +08:00
|
|
|
|
import com.jsowell.common.util.*;
|
2023-07-08 09:58:20 +08:00
|
|
|
|
import com.jsowell.common.util.Cp56Time2a.Cp56Time2aUtil;
|
2023-05-30 14:22:34 +08:00
|
|
|
|
import com.jsowell.common.util.http.HttpUtils;
|
2023-07-08 09:58:20 +08:00
|
|
|
|
import com.jsowell.common.util.id.IdUtils;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
import com.jsowell.common.util.id.SnowflakeIdWorker;
|
|
|
|
|
|
import com.jsowell.common.util.ip.AddressUtils;
|
|
|
|
|
|
import com.jsowell.netty.handler.HeartbeatRequestHandler;
|
2023-07-08 09:58:20 +08:00
|
|
|
|
import com.jsowell.netty.handler.TransactionRecordsRequestHandler;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
import com.jsowell.netty.service.yunkuaichong.YKCBusinessService;
|
2023-05-26 19:25:35 +08:00
|
|
|
|
import com.jsowell.pile.domain.*;
|
2023-06-26 17:10:36 +08:00
|
|
|
|
import com.jsowell.pile.domain.ykcCommond.IssueQRCodeCommand;
|
|
|
|
|
|
import com.jsowell.pile.domain.ykcCommond.ProofreadTimeCommand;
|
2023-05-10 08:49:01 +08:00
|
|
|
|
import com.jsowell.pile.dto.*;
|
2023-06-26 17:10:36 +08:00
|
|
|
|
import com.jsowell.pile.dto.amap.GetStationInfoDTO;
|
2023-08-24 10:33:26 +08:00
|
|
|
|
import com.jsowell.pile.dto.lutongyunting.BindCouponDTO;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
import com.jsowell.pile.mapper.MemberBasicInfoMapper;
|
|
|
|
|
|
import com.jsowell.pile.mapper.PileBillingTemplateMapper;
|
2023-05-26 19:25:35 +08:00
|
|
|
|
import com.jsowell.pile.service.*;
|
2023-09-14 17:36:45 +08:00
|
|
|
|
import com.jsowell.pile.service.orderlogic.AbstractOrderLogic;
|
|
|
|
|
|
import com.jsowell.pile.service.orderlogic.OrderLogicFactory;
|
2023-08-29 16:03:43 +08:00
|
|
|
|
import com.jsowell.pile.transaction.dto.OrderTransactionDTO;
|
|
|
|
|
|
import com.jsowell.pile.transaction.service.TransactionService;
|
|
|
|
|
|
import com.jsowell.pile.util.SnUtils;
|
2023-06-26 14:40:03 +08:00
|
|
|
|
import com.jsowell.pile.vo.base.PileInfoVO;
|
2023-07-08 11:33:45 +08:00
|
|
|
|
import com.jsowell.pile.vo.uniapp.MemberVO;
|
2023-08-30 10:13:56 +08:00
|
|
|
|
import com.jsowell.pile.vo.uniapp.PileConnectorDetailVO;
|
2023-08-11 11:04:28 +08:00
|
|
|
|
import com.jsowell.pile.vo.web.BalanceDeductionAmountVO;
|
2023-03-07 16:55:03 +08:00
|
|
|
|
import com.jsowell.pile.vo.web.BillingTemplateVO;
|
|
|
|
|
|
import com.jsowell.pile.vo.web.OrderListVO;
|
|
|
|
|
|
import com.jsowell.pile.vo.web.PileDetailVO;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
import com.jsowell.service.MemberService;
|
|
|
|
|
|
import com.jsowell.service.OrderService;
|
|
|
|
|
|
import com.jsowell.service.PileService;
|
2023-06-17 10:37:02 +08:00
|
|
|
|
import com.jsowell.thirdparty.amap.service.AMapService;
|
2023-05-27 15:56:26 +08:00
|
|
|
|
import com.jsowell.thirdparty.lianlian.dto.CommonParamsDTO;
|
2023-05-26 16:14:45 +08:00
|
|
|
|
import com.jsowell.thirdparty.lianlian.service.LianLianService;
|
2023-05-26 19:25:35 +08:00
|
|
|
|
import com.jsowell.thirdparty.lianlian.util.Cryptos;
|
|
|
|
|
|
import com.jsowell.thirdparty.lianlian.util.Encodes;
|
|
|
|
|
|
import com.jsowell.thirdparty.lianlian.util.GBSignUtils;
|
2023-08-23 14:13:11 +08:00
|
|
|
|
import com.jsowell.thirdparty.lutongyunting.service.LTYTService;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
import com.jsowell.wxpay.common.WeChatPayParameter;
|
|
|
|
|
|
import com.jsowell.wxpay.dto.AppletTemplateMessageSendDTO;
|
|
|
|
|
|
import com.jsowell.wxpay.response.WechatPayRefundRequest;
|
|
|
|
|
|
import com.jsowell.wxpay.service.WxAppletRemoteService;
|
|
|
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
2023-07-28 14:47:26 +08:00
|
|
|
|
import org.apache.commons.lang3.RandomStringUtils;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
import org.junit.Test;
|
|
|
|
|
|
import org.junit.runner.RunWith;
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
|
|
|
|
import org.springframework.test.context.ActiveProfiles;
|
|
|
|
|
|
import org.springframework.test.context.junit4.SpringRunner;
|
|
|
|
|
|
import org.springframework.util.StopWatch;
|
|
|
|
|
|
|
2023-05-26 19:25:35 +08:00
|
|
|
|
import java.io.UnsupportedEncodingException;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
import java.math.BigDecimal;
|
2023-06-08 11:50:06 +08:00
|
|
|
|
import java.nio.charset.StandardCharsets;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
import java.text.ParseException;
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
2023-05-10 08:49:01 +08:00
|
|
|
|
import java.util.*;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
|
|
|
|
|
@ActiveProfiles("dev")
|
|
|
|
|
|
@SpringBootTest(classes = JsowellApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
|
|
|
|
|
@RunWith(SpringRunner.class)
|
|
|
|
|
|
public class SpringBootTestController {
|
|
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private SnUtils snUtils;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private PileService pileService;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private YKCPushCommandService ykcPushCommandService;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private IAdapayMemberAccountService adapayMemberAccountService;
|
2023-07-13 15:27:09 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private IPileMsgRecordService pileMsgRecordService;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private IPileStationInfoService pileStationInfoService;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private YKCPushCommandService ykcPushBusinessService;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private HeartbeatRequestHandler heartbeatRequestHandler;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private YKCBusinessService ykcBusinessService;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private PileBillingTemplateMapper pileBillingTemplateMapper;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private PileRemoteService pileRemoteService;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private MemberService memberService;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private OrderService orderService;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private IPileBillingTemplateService pileBillingTemplateService;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private MemberBasicInfoMapper memberBasicInfoMapper;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private SimCardService simCardService;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private IPileBasicInfoService pileBasicInfoService;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private WechatPayService wechatPayService;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private IOrderBasicInfoService orderBasicInfoService;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private WxpayCallbackRecordService wxpayCallbackRecordService;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private WxAppletRemoteService wxAppletRemoteService;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private RedisCache redisCache;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private IPileAuthCardService pileAuthCardService;
|
2023-04-01 15:33:36 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private LianLianService lianLianService;
|
2023-05-10 08:49:01 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private IMemberTransactionRecordService memberTransactionRecordService;
|
2023-05-30 15:02:57 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private IMemberPlateNumberRelationService memberPlateNumberRelationService;
|
2023-06-12 17:38:16 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
static final String MAC_KEY = "53TtFpc4gdVZbF3x";
|
2023-05-10 08:49:01 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
static final String ALGORITHM_MAC = "HmacMD5";
|
2023-05-10 08:49:01 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private AdapayCallbackRecordService adapayCallbackRecordService;
|
2023-05-27 11:20:43 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private IAdapayRefundRecordService adapayRefundRecordService;
|
2023-05-31 16:05:18 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private AdapayService adapayService;
|
2023-06-15 14:06:33 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private AMapService aMapService;
|
2023-06-17 10:37:02 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private IPileConnectorInfoService pileConnectorInfoService;
|
2023-07-08 15:37:53 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private TransactionRecordsRequestHandler transactionRecordsRequestHandler;
|
2023-07-08 09:58:20 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private IMemberBasicInfoService memberBasicInfoService;
|
2023-07-08 11:33:45 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private ClearingWithdrawInfoService clearingWithdrawInfoService;
|
2023-08-01 16:16:34 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private OrderPileOccupyService orderPileOccupyService;
|
2023-08-08 08:43:50 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private LTYTService ltytService;
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
private IPileMerchantInfoService pileMerchantInfoService;
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
private MemberAdapayRecordService memberAdapayRecordService;
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
private TransactionService transactionService;
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
private OrderPayRecordService orderPayRecordService;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 单元测试,测试订单流程
|
|
|
|
|
|
*/
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testTheOrderProcess() throws Exception {
|
|
|
|
|
|
// 生成订单
|
|
|
|
|
|
// OrderBasicInfo orderBasicInfo = generateAnOrder();
|
|
|
|
|
|
// System.out.println(orderBasicInfo);
|
|
|
|
|
|
// // 支付订单
|
|
|
|
|
|
// int a = payOrder(orderBasicInfo);
|
|
|
|
|
|
// System.out.println(a);
|
|
|
|
|
|
// 结算订单
|
|
|
|
|
|
OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode("C46006767636");
|
|
|
|
|
|
settleOrder(orderBasicInfo);
|
|
|
|
|
|
// 订单退款
|
|
|
|
|
|
BigDecimal payAmount = orderBasicInfo.getPayAmount();
|
|
|
|
|
|
BigDecimal settleAmount = orderBasicInfo.getSettleAmount();
|
|
|
|
|
|
|
|
|
|
|
|
BigDecimal refundAmt = payAmount.subtract(settleAmount);
|
|
|
|
|
|
// 延时分账的,可以部分解冻
|
|
|
|
|
|
memberAdapayRecordService.updateRefundAmountFromFreezeAmount("1234", refundAmt);
|
|
|
|
|
|
|
|
|
|
|
|
// 实时分账,全部解冻
|
|
|
|
|
|
// memberAdapayRecordService.unfreezeAmountAndUpdateSpendAmount("test01", payAmount, refundAmt);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 生成订单
|
|
|
|
|
|
private OrderBasicInfo generateAnOrder() throws ParseException {
|
|
|
|
|
|
GenerateOrderDTO dto = new GenerateOrderDTO();
|
|
|
|
|
|
PileConnectorDetailVO vo = new PileConnectorDetailVO();
|
|
|
|
|
|
vo.setStationId("2");
|
|
|
|
|
|
dto.setPileConnector(vo);
|
|
|
|
|
|
|
|
|
|
|
|
dto.setMemberId("1");
|
|
|
|
|
|
dto.setStartMode("1");
|
|
|
|
|
|
dto.setPayMode("4");
|
|
|
|
|
|
dto.setPileSn("88000000000001");
|
|
|
|
|
|
dto.setConnectorCode("01");
|
|
|
|
|
|
dto.setChargeAmount(new BigDecimal("10"));
|
|
|
|
|
|
// 查询充电桩的计费模板
|
|
|
|
|
|
BillingTemplateVO billingTemplateVO = pileBillingTemplateService.selectBillingTemplateDetailByPileSn(dto.getPileSn());
|
|
|
|
|
|
dto.setBillingTemplate(billingTemplateVO);
|
|
|
|
|
|
OrderBasicInfo orderBasicInfo = orderBasicInfoService.saveOrder2Database(dto);
|
|
|
|
|
|
|
|
|
|
|
|
return orderBasicInfo;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 支付订单
|
|
|
|
|
|
private int payOrder(OrderBasicInfo orderBasicInfo) throws Exception {
|
|
|
|
|
|
// PayOrderDTO dto = new PayOrderDTO();
|
|
|
|
|
|
// dto.setMemberId(orderBasicInfo.getMemberId());
|
|
|
|
|
|
// dto.setOrderCode(orderBasicInfo.getOrderCode());
|
|
|
|
|
|
// dto.setStartMode(orderBasicInfo.getStartMode());
|
|
|
|
|
|
// dto.setPayMode(orderBasicInfo.getPayMode());
|
|
|
|
|
|
// dto.setPayAmount(orderBasicInfo.getPayAmount());
|
|
|
|
|
|
//
|
|
|
|
|
|
// Map<String, Object> map = orderBasicInfoService.payOrder(dto);
|
|
|
|
|
|
// return map;
|
|
|
|
|
|
String paymentId = "1234";
|
|
|
|
|
|
BigDecimal amount = orderBasicInfo.getPayAmount();
|
|
|
|
|
|
String orderCode = orderBasicInfo.getOrderCode();
|
|
|
|
|
|
|
|
|
|
|
|
JSONObject json = new JSONObject();
|
|
|
|
|
|
json.put("paymentId", paymentId);
|
|
|
|
|
|
json.put("amount", amount);
|
|
|
|
|
|
|
|
|
|
|
|
// 记录订单支付流水
|
|
|
|
|
|
OrderPayRecord orderPayRecord = OrderPayRecord.builder()
|
|
|
|
|
|
.orderCode(orderCode)
|
|
|
|
|
|
.payMode(OrderPayRecordEnum.WECHATPAY_PAYMENT.getValue())
|
|
|
|
|
|
.payAmount(amount)
|
|
|
|
|
|
.acquirer(AcquirerEnum.ADAPAY.getValue())
|
|
|
|
|
|
.deductionRecord(json.toJSONString())
|
|
|
|
|
|
.createBy(null)
|
2023-08-31 10:30:05 +08:00
|
|
|
|
.delFlag(DelFlagEnum.NORMAL.getValue())
|
2023-08-30 11:02:18 +08:00
|
|
|
|
.build();
|
|
|
|
|
|
orderPayRecordService.batchInsert(Lists.newArrayList(orderPayRecord));
|
|
|
|
|
|
|
|
|
|
|
|
// 更新冻结金额 支付成功后全部冻结
|
|
|
|
|
|
memberAdapayRecordService.updateFreezeAmount(paymentId, amount);
|
|
|
|
|
|
|
|
|
|
|
|
// 支付订单成功
|
|
|
|
|
|
PayOrderSuccessCallbackDTO callbackDTO = PayOrderSuccessCallbackDTO.builder()
|
|
|
|
|
|
.orderCode(orderCode)
|
|
|
|
|
|
.payAmount(amount)
|
|
|
|
|
|
.payMode(OrderPayModeEnum.PAYMENT_OF_WECHATPAY.getValue())
|
|
|
|
|
|
.acquirer(AcquirerEnum.ADAPAY.getValue())
|
|
|
|
|
|
.build();
|
|
|
|
|
|
// 订单支付成功 支付回调
|
|
|
|
|
|
// orderBasicInfoService.payOrderSuccessCallback(callbackDTO);
|
|
|
|
|
|
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(callbackDTO.getOrderCode());
|
|
|
|
|
|
|
|
|
|
|
|
// 修改订单
|
|
|
|
|
|
orderInfo.setPayMode(callbackDTO.getPayMode());
|
|
|
|
|
|
orderInfo.setPayStatus(Constants.ONE);
|
|
|
|
|
|
orderInfo.setPayAmount(callbackDTO.getPayAmount());
|
|
|
|
|
|
orderInfo.setPayTime(new Date());
|
|
|
|
|
|
orderInfo.setChargeStartTime(new Date());
|
|
|
|
|
|
orderInfo.setOrderStatus(OrderStatusEnum.IN_THE_CHARGING.getValue());
|
|
|
|
|
|
return orderBasicInfoService.updateOrderBasicInfo(orderInfo);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 结算订单
|
|
|
|
|
|
private void settleOrder(OrderBasicInfo orderBasicInfo) {
|
|
|
|
|
|
TransactionRecordsData data = TransactionRecordsData.builder()
|
|
|
|
|
|
.transactionCode(orderBasicInfo.getTransactionCode())
|
|
|
|
|
|
.pileSn(orderBasicInfo.getPileSn())
|
|
|
|
|
|
.connectorCode(orderBasicInfo.getConnectorCode())
|
|
|
|
|
|
.startTime("2023-03-10 17:10:24")
|
|
|
|
|
|
.endTime("2023-03-10 17:10:46")
|
|
|
|
|
|
.sharpPrice("1.10000")
|
|
|
|
|
|
.sharpUsedElectricity("2.0000")
|
|
|
|
|
|
.sharpAmount("2.2000")
|
|
|
|
|
|
.peakPrice("1.20000")
|
|
|
|
|
|
.peakUsedElectricity("0")
|
|
|
|
|
|
.peakAmount("0")
|
|
|
|
|
|
.flatPrice("1.30000")
|
|
|
|
|
|
.flatUsedElectricity("0")
|
|
|
|
|
|
.flatAmount("0")
|
|
|
|
|
|
.valleyPrice("1.40000")
|
|
|
|
|
|
.valleyUsedElectricity("0")
|
|
|
|
|
|
.valleyAmount("0")
|
|
|
|
|
|
.totalElectricity("2")
|
|
|
|
|
|
.consumptionAmount("5.3000")
|
|
|
|
|
|
.vinCode("\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000")
|
|
|
|
|
|
.transactionIdentifier("01")
|
|
|
|
|
|
.transactionTime("2023-03-10 17:10:46")
|
|
|
|
|
|
.stopReasonMsg("结束充电,APP远程停止")
|
|
|
|
|
|
.logicCard("0")
|
|
|
|
|
|
.createTime(new Date())
|
|
|
|
|
|
|
|
|
|
|
|
.build();
|
|
|
|
|
|
|
|
|
|
|
|
// orderBasicInfoService.settleOrder(data, orderBasicInfo);
|
|
|
|
|
|
// 获取更新数据后的orderBasicInfo对象
|
|
|
|
|
|
orderBasicInfoService.returnUpdateOrderBasicInfo(orderBasicInfo, data);
|
|
|
|
|
|
// 获取更新数据后的orderDetail对象/更新订单详情 查询订单详情 修改订单数据
|
|
|
|
|
|
OrderDetail orderDetail = orderBasicInfoService.returnUpdateOrderDetail(orderBasicInfo, data);
|
|
|
|
|
|
// 更新数据库
|
|
|
|
|
|
OrderTransactionDTO dto = new OrderTransactionDTO();
|
|
|
|
|
|
dto.setOrderBasicInfo(orderBasicInfo);
|
|
|
|
|
|
dto.setOrderDetail(orderDetail);
|
|
|
|
|
|
transactionService.doUpdateOrder(dto);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-09-14 17:36:45 +08:00
|
|
|
|
public static List<BigDecimal> calculateRefund(BigDecimal totalAmount, List<BigDecimal> payments) {
|
|
|
|
|
|
List<BigDecimal> refundList = new ArrayList<>();
|
|
|
|
|
|
BigDecimal remainingAmount = totalAmount;
|
|
|
|
|
|
|
|
|
|
|
|
for (BigDecimal payment : payments) {
|
|
|
|
|
|
if (remainingAmount.compareTo(BigDecimal.ZERO) <= 0) {
|
|
|
|
|
|
// refundList.add(BigDecimal.ZERO);
|
|
|
|
|
|
refundList.add(payment);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
BigDecimal refundPerPayment = remainingAmount.min(payment);
|
|
|
|
|
|
// refundList.add(refundPerPayment);
|
|
|
|
|
|
refundList.add(payment.subtract(refundPerPayment));
|
|
|
|
|
|
remainingAmount = remainingAmount.subtract(refundPerPayment);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return refundList;
|
|
|
|
|
|
}
|
2023-08-30 11:02:18 +08:00
|
|
|
|
|
2023-09-14 17:36:45 +08:00
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
|
BigDecimal totalAmount = new BigDecimal("0.1");
|
|
|
|
|
|
List<BigDecimal> payments = Lists.newArrayList(new BigDecimal("0.97"), new BigDecimal("1.00"));
|
|
|
|
|
|
|
|
|
|
|
|
List<BigDecimal> refunds = calculateRefund(totalAmount, payments);
|
|
|
|
|
|
System.out.println("每笔单需要退还的金额: " + refunds);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 测试多笔支付情况,解冻部分金额
|
|
|
|
|
|
*/
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Test
|
|
|
|
|
|
public void calculateUnfreezeAmountTest() {
|
2023-09-14 17:36:45 +08:00
|
|
|
|
BigDecimal orderAmount = new BigDecimal("0.06");
|
2023-08-30 11:02:18 +08:00
|
|
|
|
List<OrderPayRecord> payRecordList = Lists.newArrayList();
|
|
|
|
|
|
// 第一笔支付记录
|
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
2023-08-31 18:35:16 +08:00
|
|
|
|
jsonObject.put("paymentId", "002212023083114213410543206907226374144");
|
2023-09-14 17:36:45 +08:00
|
|
|
|
jsonObject.put("amount", "0.97");
|
|
|
|
|
|
|
|
|
|
|
|
JSONObject jsonObject2 = new JSONObject();
|
|
|
|
|
|
jsonObject2.put("paymentId", "002212023083114213410543206907226374144");
|
|
|
|
|
|
jsonObject2.put("amount", "1");
|
|
|
|
|
|
|
|
|
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
|
|
|
jsonArray.add(jsonObject);
|
|
|
|
|
|
jsonArray.add(jsonObject2);
|
|
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
OrderPayRecord build = OrderPayRecord.builder()
|
2023-09-14 17:36:45 +08:00
|
|
|
|
.payAmount(new BigDecimal("1.97"))
|
|
|
|
|
|
.deductionRecord(jsonArray.toJSONString())
|
2023-08-30 11:02:18 +08:00
|
|
|
|
.build();
|
|
|
|
|
|
payRecordList.add(build);
|
|
|
|
|
|
|
2023-09-14 17:36:45 +08:00
|
|
|
|
AbstractOrderLogic orderLogic = OrderLogicFactory.getOrderLogic("1");
|
|
|
|
|
|
List<Map<String, Object>> maps = orderLogic.calculateUnfreezeAmount(orderAmount, payRecordList);
|
2023-08-30 11:02:18 +08:00
|
|
|
|
System.out.println(maps);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void unfreezeAmountAndUpdateSpendAmountTest() {
|
|
|
|
|
|
String paymentId = "123";
|
|
|
|
|
|
memberAdapayRecordService.updateRefundAmount(paymentId, new BigDecimal("5"));
|
|
|
|
|
|
// memberAdapayRecordService.updateRefundAmountFromFreezeAmount(paymentId, new BigDecimal("20"));
|
|
|
|
|
|
// BigDecimal unfreezeAmount = new BigDecimal("32");
|
|
|
|
|
|
// BigDecimal spendAmount = new BigDecimal("10");
|
|
|
|
|
|
// memberAdapayRecordService.unfreezeAmountAndUpdateSpendAmount(paymentId, unfreezeAmount, spendAmount);
|
|
|
|
|
|
// memberAdapayRecordService.updateRefundAmountFromFreezeAmount(paymentId, new BigDecimal("2"));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void getFirstLevelMerchantByMerchantIdTest() {
|
|
|
|
|
|
String merchantId = "13";
|
|
|
|
|
|
PileMerchantInfo merchantInfo = pileMerchantInfoService.getFirstLevelMerchantByMerchantId(merchantId);
|
|
|
|
|
|
System.out.println(JSON.toJSONString(merchantInfo));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void queryPaymentInfoTest() throws BaseAdaPayException {
|
|
|
|
|
|
String wechatAppId = "wxbb3e0d474569481d";
|
|
|
|
|
|
String paymentId = "002212023082514501110541039779091623936";
|
|
|
|
|
|
// 在完成初始化设置情况下,调用查询方法,获取 Payment 查询结果
|
|
|
|
|
|
Map<String, Object> response = Payment.query(paymentId, wechatAppId);
|
|
|
|
|
|
System.out.println(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 手动变更银行卡信息
|
|
|
|
|
|
*/
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void createSettleAccountRequestTest() throws BaseAdaPayException {
|
|
|
|
|
|
SettleAccountDTO dto = new SettleAccountDTO();
|
2023-09-05 08:42:05 +08:00
|
|
|
|
dto.setCardId("31050180460000002469");
|
|
|
|
|
|
dto.setCardName("上海擎昆物业管理有限公司");
|
2023-08-31 10:29:17 +08:00
|
|
|
|
dto.setTelNo("18021373333");
|
2023-09-05 08:42:05 +08:00
|
|
|
|
dto.setBankCode("01050000");
|
2023-08-30 11:02:18 +08:00
|
|
|
|
dto.setBankAcctType("1");
|
2023-09-05 08:42:05 +08:00
|
|
|
|
dto.setProvCode("0031");
|
|
|
|
|
|
dto.setAreaCode("3100");
|
|
|
|
|
|
String adapayMemberId = "ACM80899105";
|
2023-08-30 11:02:18 +08:00
|
|
|
|
String wechatAppId = "wxbb3e0d474569481d";
|
|
|
|
|
|
adapayService.createSettleAccountRequest(dto, adapayMemberId, wechatAppId);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void createDeleteSettleAccountRequestTest() throws BaseAdaPayException {
|
|
|
|
|
|
String adapayMemberId = "ACM69424215";
|
|
|
|
|
|
String settleAccountId = "0498291998695360";
|
|
|
|
|
|
String wechatAppId = "wxbb3e0d474569481d";
|
|
|
|
|
|
adapayService.createDeleteSettleAccountRequest(adapayMemberId, settleAccountId, wechatAppId);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void queryDrawcashDetailTest() throws BaseAdaPayException {
|
|
|
|
|
|
String orderNo = "drawcash_1692339516947";
|
|
|
|
|
|
String wechatAppId = "wxbb3e0d474569481d";
|
|
|
|
|
|
DrawCashDetailVO drawCashDetailVO = adapayService.queryDrawCashDetail(orderNo, wechatAppId);
|
|
|
|
|
|
System.out.println(drawCashDetailVO);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void queryPaymentConfirmListTest() {
|
|
|
|
|
|
QueryPaymentConfirmDTO dto = new QueryPaymentConfirmDTO();
|
|
|
|
|
|
dto.setWechatAppId("wxbb3e0d474569481d");
|
|
|
|
|
|
dto.setPaymentId("002212023081712452810538109291674042368");
|
|
|
|
|
|
QueryPaymentConfirmDetailResponse queryPaymentConfirmDetailResponse = adapayService.queryPaymentConfirmList(dto);
|
|
|
|
|
|
System.out.println(queryPaymentConfirmDetailResponse);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void queryAcctFlowListTest() {
|
|
|
|
|
|
QueryAcctFlowDTO dto = new QueryAcctFlowDTO();
|
|
|
|
|
|
try {
|
|
|
|
|
|
dto.setPageNo(1);
|
|
|
|
|
|
dto.setPageSize(100);
|
|
|
|
|
|
dto.setAcctType("01");
|
|
|
|
|
|
dto.setWechatAppId("wxbb3e0d474569481d");
|
|
|
|
|
|
dto.setAdapayMemberId("ACM69424215");
|
|
|
|
|
|
dto.setBeginDate("20230823");
|
|
|
|
|
|
dto.setEndDate("20230823");
|
|
|
|
|
|
adapayService.queryAcctFlowList(dto);
|
|
|
|
|
|
} catch (BaseAdaPayException e) {
|
|
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testCalculateTheBalanceDeductionAmount() {
|
|
|
|
|
|
String memberId = "123456";
|
|
|
|
|
|
BigDecimal amount = new BigDecimal("20");
|
|
|
|
|
|
|
|
|
|
|
|
List<BalanceDeductionAmountVO> resultList = Lists.newArrayList();
|
|
|
|
|
|
// 查询会员的余额充值记录 按照充值时间正序
|
|
|
|
|
|
List<MemberAdapayRecord> memberAdapayRecords = Lists.newArrayList();
|
|
|
|
|
|
memberAdapayRecords.add(MemberAdapayRecord.builder().paymentId("1").balanceAmt(new BigDecimal("50")).build());
|
|
|
|
|
|
memberAdapayRecords.add(MemberAdapayRecord.builder().paymentId("2").balanceAmt(new BigDecimal("60")).build());
|
|
|
|
|
|
memberAdapayRecords.add(MemberAdapayRecord.builder().paymentId("3").balanceAmt(new BigDecimal("10")).build());
|
|
|
|
|
|
|
|
|
|
|
|
// 定义一个临时金额等于消费金额
|
|
|
|
|
|
BigDecimal tempAmount = new BigDecimal(amount.toString());
|
|
|
|
|
|
for (MemberAdapayRecord memberAdapayRecord : memberAdapayRecords) {
|
|
|
|
|
|
// 该笔支付剩余金额 取出一笔判断是否剩余金额够支付订单消费吗
|
|
|
|
|
|
BigDecimal balanceAmt = memberAdapayRecord.getBalanceAmt();
|
|
|
|
|
|
// 该笔支付扣除金额
|
|
|
|
|
|
BigDecimal deductionAmount;
|
|
|
|
|
|
// 获取延时分账模式 延时分账的使用撤销方法退款,实时分账的使用退款方法
|
|
|
|
|
|
// AdapayCallbackRecord callbackRecord = adapayCallbackRecordService.selectByPaymentId(memberAdapayRecord.getPaymentId());
|
|
|
|
|
|
// String payMode = null;
|
|
|
|
|
|
// if (callbackRecord != null) {
|
|
|
|
|
|
// JSONObject expendJsonObject = JSON.parseObject(callbackRecord.getExpend());
|
|
|
|
|
|
// payMode = expendJsonObject.getString("payMode");
|
|
|
|
|
|
// }
|
|
|
|
|
|
// 消费金额 - 剩余金额
|
|
|
|
|
|
tempAmount = tempAmount.subtract(balanceAmt);
|
|
|
|
|
|
if (tempAmount.compareTo(BigDecimal.ZERO) >= 0) {
|
|
|
|
|
|
// 计算以后,大于等于0,说明这笔支付剩余金额需要扣完
|
|
|
|
|
|
deductionAmount = balanceAmt;
|
|
|
|
|
|
BalanceDeductionAmountVO build = BalanceDeductionAmountVO.builder()
|
|
|
|
|
|
.memberId(memberId)
|
|
|
|
|
|
.paymentId(memberAdapayRecord.getPaymentId())
|
|
|
|
|
|
.deductionAmount(deductionAmount)
|
|
|
|
|
|
.build();
|
|
|
|
|
|
resultList.add(build);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
// 如果小于0,则说明剩余的钱用不完,扣除金额等于消费金额,并结束循环
|
|
|
|
|
|
deductionAmount = balanceAmt.add(tempAmount);
|
|
|
|
|
|
BalanceDeductionAmountVO build = BalanceDeductionAmountVO.builder()
|
|
|
|
|
|
.memberId(memberId)
|
|
|
|
|
|
.paymentId(memberAdapayRecord.getPaymentId())
|
|
|
|
|
|
.deductionAmount(deductionAmount)
|
|
|
|
|
|
.build();
|
|
|
|
|
|
resultList.add(build);
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
System.out.println(JSON.toJSONString(resultList));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testGenerateOccupyPileOrder() {
|
|
|
|
|
|
String memberId = "67569684";
|
|
|
|
|
|
String pileSn = "88230000000135";
|
|
|
|
|
|
String connectorCode = "01";
|
|
|
|
|
|
GenerateOccupyOrderDTO dto = new GenerateOccupyOrderDTO();
|
|
|
|
|
|
dto.setMemberId(memberId);
|
|
|
|
|
|
dto.setPileSn(pileSn);
|
|
|
|
|
|
dto.setConnectorCode(connectorCode);
|
|
|
|
|
|
|
|
|
|
|
|
orderPileOccupyService.generateOccupyPileOrder(dto);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testStopOccupyPileOrder() {
|
|
|
|
|
|
String wechatAppId = "54135135";
|
|
|
|
|
|
AbstractAdapayConfig config = AdapayConfigFactory.getConfig(wechatAppId);
|
|
|
|
|
|
System.out.println(JSON.toJSONString(config));
|
|
|
|
|
|
|
|
|
|
|
|
String wechatAppId2 = "wxbb3e0d474569481d";
|
|
|
|
|
|
AbstractAdapayConfig config2 = AdapayConfigFactory.getConfig(wechatAppId2);
|
|
|
|
|
|
System.out.println(JSON.toJSONString(config2));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-09-20 14:57:59 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 查询分账信息
|
|
|
|
|
|
* @throws BaseAdaPayException
|
|
|
|
|
|
*/
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Test
|
2023-09-11 16:43:26 +08:00
|
|
|
|
public void queryCreateConfirmReverse() throws BaseAdaPayException {
|
2023-09-06 14:30:06 +08:00
|
|
|
|
String wechatAppId = "wxbb3e0d474569481d";
|
2023-09-11 16:43:26 +08:00
|
|
|
|
List<String> list = getList();
|
|
|
|
|
|
|
|
|
|
|
|
List<String> resultList = Lists.newArrayList();
|
2023-09-06 14:30:06 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
for (String s : list) {
|
2023-09-06 14:30:06 +08:00
|
|
|
|
// 查询支付确认id
|
|
|
|
|
|
QueryPaymentConfirmDTO dto = new QueryPaymentConfirmDTO();
|
|
|
|
|
|
dto.setPaymentId(s);
|
|
|
|
|
|
dto.setWechatAppId(wechatAppId);
|
|
|
|
|
|
QueryPaymentConfirmDetailResponse response = adapayService.queryPaymentConfirmList(dto);
|
|
|
|
|
|
if (response != null) {
|
|
|
|
|
|
List<QueryPaymentConfirmDetailResponse.PaymentConfirmInfo> confirms = response.getPaymentConfirms();
|
2023-09-08 14:26:13 +08:00
|
|
|
|
// System.out.println("支付id:" + s + ", 确认信息:" + JSON.toJSONString(confirms));
|
|
|
|
|
|
if (CollectionUtils.isEmpty(confirms)) {
|
2023-09-11 16:43:26 +08:00
|
|
|
|
// for (QueryPaymentConfirmDetailResponse.PaymentConfirmInfo confirm : confirms) {
|
|
|
|
|
|
// adapayService.createConfirmReverse(confirm.getId(), wechatAppId);
|
|
|
|
|
|
// }
|
|
|
|
|
|
// System.out.println("=================未分账:" + s);
|
|
|
|
|
|
resultList.add(s);
|
2023-09-06 14:30:06 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2023-08-30 11:02:18 +08:00
|
|
|
|
}
|
2023-09-11 16:43:26 +08:00
|
|
|
|
|
|
|
|
|
|
System.out.println("=================未分账:" + JSON.toJSONString(resultList));
|
2023-08-30 11:02:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2023-09-08 14:26:13 +08:00
|
|
|
|
@Test
|
2023-09-11 16:43:26 +08:00
|
|
|
|
public void testCreateConfirmReverse() throws BaseAdaPayException {
|
2023-09-08 14:26:13 +08:00
|
|
|
|
String wechatAppId = "wxbb3e0d474569481d";
|
|
|
|
|
|
List<String> list = getList();
|
2023-08-30 11:02:18 +08:00
|
|
|
|
for (String s : list) {
|
2023-09-08 14:26:13 +08:00
|
|
|
|
// 查询支付确认id
|
|
|
|
|
|
QueryPaymentConfirmDTO dto = new QueryPaymentConfirmDTO();
|
|
|
|
|
|
dto.setPaymentId(s);
|
|
|
|
|
|
dto.setWechatAppId(wechatAppId);
|
|
|
|
|
|
QueryPaymentConfirmDetailResponse response = adapayService.queryPaymentConfirmList(dto);
|
|
|
|
|
|
if (response != null) {
|
|
|
|
|
|
List<QueryPaymentConfirmDetailResponse.PaymentConfirmInfo> confirms = response.getPaymentConfirms();
|
2023-09-11 16:43:26 +08:00
|
|
|
|
System.out.println("支付id:" + s + ", 确认信息:" + JSON.toJSONString(confirms));
|
|
|
|
|
|
if (CollectionUtils.isNotEmpty(confirms)) {
|
|
|
|
|
|
for (QueryPaymentConfirmDetailResponse.PaymentConfirmInfo confirm : confirms) {
|
|
|
|
|
|
adapayService.createConfirmReverse(confirm.getId(), wechatAppId);
|
|
|
|
|
|
}
|
2023-09-08 14:26:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2023-08-30 11:02:18 +08:00
|
|
|
|
}
|
2023-09-08 14:26:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public List<String> getList() {
|
|
|
|
|
|
List<String> list = Lists.newArrayList();
|
2023-09-20 14:57:59 +08:00
|
|
|
|
list.add("002212023073123215710532108874861424640");
|
|
|
|
|
|
list.add("002212023080101190010532138330183380992");
|
|
|
|
|
|
list.add("002212023080115002110532345030453702656");
|
|
|
|
|
|
list.add("002212023080122091410532452960300138496");
|
|
|
|
|
|
list.add("002212023080201452210532507351824236544");
|
|
|
|
|
|
list.add("002212023080222290310532820337787875328");
|
|
|
|
|
|
list.add("002212023080311205210533014570378493952");
|
|
|
|
|
|
list.add("002212023080312072810533026296867807232");
|
|
|
|
|
|
list.add("002212023080401465110533232503514877952");
|
|
|
|
|
|
list.add("002212023080402241710533241922198335488");
|
|
|
|
|
|
list.add("002212023080501423310533593807979171840");
|
|
|
|
|
|
list.add("002212023080518414210533850284853280768");
|
|
|
|
|
|
list.add("002212023080522192410533905069717245952");
|
|
|
|
|
|
list.add("002212023080523402710533925468827185152");
|
|
|
|
|
|
list.add("002212023080600085510533932630651240448");
|
|
|
|
|
|
list.add("002212023080615044110534158060516794368");
|
|
|
|
|
|
list.add("002212023080622023010534263204679413760");
|
|
|
|
|
|
list.add("002212023080622042310534263679416524800");
|
|
|
|
|
|
list.add("002212023080722043610534626121444798464");
|
|
|
|
|
|
list.add("002212023080815504510534894430029889536");
|
|
|
|
|
|
list.add("002212023080820175810534961674308595712");
|
|
|
|
|
|
list.add("002212023080823314610535010446587265024");
|
|
|
|
|
|
list.add("002212023081001565410535409359635890176");
|
|
|
|
|
|
list.add("002212023081023544210535740994674819072");
|
|
|
|
|
|
list.add("002212023081100211510535747675983986688");
|
|
|
|
|
|
list.add("002212023081118042310536015221827465216");
|
|
|
|
|
|
list.add("002212023081122595110536089577786720256");
|
|
|
|
|
|
list.add("002212023081201103810536122491576332288");
|
|
|
|
|
|
list.add("002212023081222480510536449005027143680");
|
|
|
|
|
|
list.add("002212023081300092710536469482693013504");
|
|
|
|
|
|
list.add("002212023081300251910536473476084436992");
|
|
|
|
|
|
list.add("002212023081300314110536475078082318336");
|
|
|
|
|
|
list.add("002212023081300341510536475723275079680");
|
|
|
|
|
|
list.add("002212023081300360210536476173358874624");
|
|
|
|
|
|
list.add("002212023081300411010536477462489370624");
|
|
|
|
|
|
list.add("002212023081300424810536477874723741696");
|
|
|
|
|
|
list.add("002212023081322414710536809806853029888");
|
|
|
|
|
|
list.add("002212023081323383910536824117642301440");
|
|
|
|
|
|
list.add("002212023081418353610537110240120582144");
|
|
|
|
|
|
list.add("002212023081622003010537886581605191680");
|
|
|
|
|
|
list.add("002212023081622073810537888376951853056");
|
|
|
|
|
|
list.add("002212023081711484410538095013996941312");
|
|
|
|
|
|
list.add("002212023081712440310538108933431775232");
|
|
|
|
|
|
list.add("002212023081713480710538125059141447680");
|
|
|
|
|
|
list.add("002212023081714421310538138673481506816");
|
|
|
|
|
|
list.add("002212023081718202410538193580575731712");
|
|
|
|
|
|
list.add("002212023081722351610538257717906358272");
|
|
|
|
|
|
list.add("002212023081722485410538261149405302784");
|
|
|
|
|
|
list.add("002212023081807261810538391357441626112");
|
|
|
|
|
|
list.add("002212023081807310610538392564774776832");
|
|
|
|
|
|
list.add("002212023081807351810538393623917121536");
|
|
|
|
|
|
list.add("002212023081807354810538393748265930752");
|
|
|
|
|
|
list.add("002212023081807431110538395606067175424");
|
|
|
|
|
|
list.add("002212023081807522810538397941960585216");
|
|
|
|
|
|
list.add("002212023081807532010538398161161056256");
|
|
|
|
|
|
list.add("002212023081807555910538398828536680448");
|
|
|
|
|
|
list.add("002212023081807585010538399543239192576");
|
|
|
|
|
|
list.add("002212023081808033910538400759045066752");
|
|
|
|
|
|
list.add("002212023081808051710538401166929326080");
|
|
|
|
|
|
list.add("002212023081808074210538401776746795008");
|
|
|
|
|
|
list.add("002212023081808104010538402521630265344");
|
|
|
|
|
|
list.add("002212023081808225010538405584818311168");
|
|
|
|
|
|
list.add("002212023081808232610538405735436013568");
|
|
|
|
|
|
list.add("002212023081808250310538406143060422656");
|
|
|
|
|
|
list.add("002212023081808285810538407130044137472");
|
|
|
|
|
|
list.add("002212023081808295210538407354654044160");
|
|
|
|
|
|
list.add("002212023081808300110538407392982765568");
|
|
|
|
|
|
list.add("002212023081808323410538408035071709184");
|
|
|
|
|
|
list.add("002212023081808372910538409270865219584");
|
|
|
|
|
|
list.add("002212023081808380710538409429641715712");
|
|
|
|
|
|
list.add("002212023081808382710538409515382571008");
|
|
|
|
|
|
list.add("002212023081808384710538409597697691648");
|
|
|
|
|
|
list.add("002212023081808411610538410221634244608");
|
|
|
|
|
|
list.add("002212023081808463010538411538958823424");
|
|
|
|
|
|
list.add("002212023081808472110538411753847992320");
|
|
|
|
|
|
list.add("002212023081808544310538413607531728896");
|
|
|
|
|
|
list.add("002212023081808553410538413823775834112");
|
|
|
|
|
|
list.add("002212023081810523910538443287112372224");
|
|
|
|
|
|
list.add("002212023081811082310538447245843095552");
|
|
|
|
|
|
list.add("002212023081811540310538458738164776960");
|
|
|
|
|
|
list.add("002212023081812145610538463996709081088");
|
|
|
|
|
|
list.add("002212023081813240010538481374448750592");
|
|
|
|
|
|
list.add("002212023081814014410538490870089011200");
|
|
|
|
|
|
list.add("002212023081822200610538616288626442240");
|
|
|
|
|
|
list.add("002212023081823425810538637145842200576");
|
|
|
|
|
|
list.add("002212023081903423210538697433593491456");
|
|
|
|
|
|
list.add("002212023081905550310538730779861209088");
|
|
|
|
|
|
list.add("002212023081907231110538752961714913280");
|
|
|
|
|
|
list.add("002212023081911083410538809680973332480");
|
|
|
|
|
|
list.add("002212023081913200510538842776372170752");
|
|
|
|
|
|
list.add("002212023081914195210538857823522156544");
|
|
|
|
|
|
list.add("002212023081915100110538870444593934336");
|
|
|
|
|
|
list.add("002212023081917400510538908210945478656");
|
|
|
|
|
|
list.add("002212023081923134210538992165652250624");
|
|
|
|
|
|
list.add("002212023082002275810539041055918305280");
|
|
|
|
|
|
list.add("002212023082008011710539124939168137216");
|
|
|
|
|
|
list.add("002212023082009095310539142201049509888");
|
|
|
|
|
|
list.add("002212023082012025610539185749500776448");
|
|
|
|
|
|
list.add("002212023082012240410539191067334164480");
|
|
|
|
|
|
list.add("002212023082022261510539342612800114688");
|
|
|
|
|
|
list.add("002212023082100093610539368620085198848");
|
|
|
|
|
|
list.add("002212023082107225610539477674564407296");
|
|
|
|
|
|
list.add("002212023082107254710539478389638713344");
|
|
|
|
|
|
list.add("002212023082107262410539478547936641024");
|
|
|
|
|
|
list.add("002212023082107271810539478772987215872");
|
|
|
|
|
|
list.add("002212023082107333310539480347456458752");
|
|
|
|
|
|
list.add("002212023082107395610539481953082167296");
|
|
|
|
|
|
list.add("002212023082107400210539481979057668096");
|
|
|
|
|
|
list.add("002212023082107404210539482146431193088");
|
|
|
|
|
|
list.add("002212023082107501710539484556966154240");
|
|
|
|
|
|
list.add("002212023082107580910539486536471953408");
|
|
|
|
|
|
list.add("002212023082107595110539486963740364800");
|
|
|
|
|
|
list.add("002212023082108001910539487080003420160");
|
|
|
|
|
|
list.add("002212023082108010010539487251887599616");
|
|
|
|
|
|
list.add("002212023082108015410539487479134990336");
|
|
|
|
|
|
list.add("002212023082108051910539488341977194496");
|
|
|
|
|
|
list.add("002212023082108121610539490087869009920");
|
|
|
|
|
|
list.add("002212023082108153510539490921881001984");
|
|
|
|
|
|
list.add("002212023082108172410539491381728608256");
|
|
|
|
|
|
list.add("002212023082108220110539492542945767424");
|
|
|
|
|
|
list.add("002212023082108235010539492998095060992");
|
|
|
|
|
|
list.add("002212023082108240110539493045369061376");
|
|
|
|
|
|
list.add("002212023082108260610539493572185227264");
|
|
|
|
|
|
list.add("002212023082108291810539494373807403008");
|
|
|
|
|
|
list.add("002212023082108325510539495287572033536");
|
|
|
|
|
|
list.add("002212023082108344010539495727651803136");
|
|
|
|
|
|
list.add("002212023082108345010539495769622859776");
|
|
|
|
|
|
list.add("002212023082108352710539495924192325632");
|
|
|
|
|
|
list.add("002212023082108355010539496020245106688");
|
|
|
|
|
|
list.add("002212023082108380210539496571742707712");
|
|
|
|
|
|
list.add("002212023082108411410539497377525551104");
|
|
|
|
|
|
list.add("002212023082111523910539545549443092480");
|
|
|
|
|
|
list.add("002212023082112102710539550030475026432");
|
|
|
|
|
|
list.add("002212023082117280510539629965040832512");
|
|
|
|
|
|
list.add("002212023082118005010539638208636641280");
|
|
|
|
|
|
list.add("002212023082200052910539729974162194432");
|
|
|
|
|
|
list.add("002212023082201204310539748907803029504");
|
|
|
|
|
|
list.add("002212023082201350410539752519935242240");
|
|
|
|
|
|
list.add("002212023082207010910539834581233942528");
|
|
|
|
|
|
list.add("002212023082207295810539841831756881920");
|
|
|
|
|
|
list.add("002212023082207321210539842395179364352");
|
|
|
|
|
|
list.add("002212023082207434810539845313343967232");
|
|
|
|
|
|
list.add("002212023082207435610539845348148301824");
|
|
|
|
|
|
list.add("002212023082207473610539846268418768896");
|
|
|
|
|
|
list.add("002212023082207503210539847006096084992");
|
|
|
|
|
|
list.add("002212023082207511710539847194995232768");
|
|
|
|
|
|
list.add("002212023082208003810539849549028802560");
|
|
|
|
|
|
list.add("002212023082208014410539849827285618688");
|
|
|
|
|
|
list.add("002212023082208125210539852628208369664");
|
|
|
|
|
|
list.add("002212023082208142210539853007459110912");
|
|
|
|
|
|
list.add("002212023082208150410539853182423691264");
|
|
|
|
|
|
list.add("002212023082208180110539853925444288512");
|
|
|
|
|
|
list.add("002212023082208254710539855880157024256");
|
|
|
|
|
|
list.add("002212023082208255110539855893948174336");
|
|
|
|
|
|
list.add("002212023082208292610539856796031139840");
|
|
|
|
|
|
list.add("002212023082208304210539857116446605312");
|
|
|
|
|
|
list.add("002212023082208311710539857264735223808");
|
|
|
|
|
|
list.add("002212023082208322910539857564392935424");
|
|
|
|
|
|
list.add("002212023082208355710539858437603635200");
|
|
|
|
|
|
list.add("002212023082208453410539860856796864512");
|
|
|
|
|
|
list.add("002212023082208460510539860987263488000");
|
|
|
|
|
|
list.add("002212023082208500710539862002697519104");
|
|
|
|
|
|
list.add("002212023082211220210539900231826952192");
|
|
|
|
|
|
list.add("002212023082211564010539908948710113280");
|
|
|
|
|
|
list.add("002212023082212262210539916424688078848");
|
|
|
|
|
|
list.add("002212023082212334310539918274436259840");
|
|
|
|
|
|
list.add("002212023082213185810539929662498521088");
|
|
|
|
|
|
list.add("002212023082213371810539934274648436736");
|
|
|
|
|
|
list.add("002212023082214214210539945446061944832");
|
|
|
|
|
|
list.add("002212023082215402710539965267971305472");
|
|
|
|
|
|
list.add("002212023082220235910540036620846620672");
|
|
|
|
|
|
list.add("002212023082223133210540079290307411968");
|
|
|
|
|
|
list.add("002212023082223362510540085047795691520");
|
|
|
|
|
|
list.add("002212023082307393410540206635814039552");
|
|
|
|
|
|
list.add("002212023082307424010540207416834445312");
|
|
|
|
|
|
list.add("002212023082307445510540207979967012864");
|
|
|
|
|
|
list.add("002212023082307564210540210948464889856");
|
|
|
|
|
|
list.add("002212023082307593110540211657514401792");
|
|
|
|
|
|
list.add("002212023082308051310540213088852475904");
|
|
|
|
|
|
list.add("002212023082308062710540213400168022016");
|
|
|
|
|
|
list.add("002212023082308063810540213448248934400");
|
|
|
|
|
|
list.add("002212023082308103810540214454081650688");
|
|
|
|
|
|
list.add("002212023082308104110540214466396860416");
|
|
|
|
|
|
list.add("002212023082308182910540216429795966976");
|
|
|
|
|
|
list.add("002212023082308245310540218041816920064");
|
|
|
|
|
|
list.add("002212023082308272110540218661704286208");
|
|
|
|
|
|
list.add("002212023082308284510540219014445436928");
|
|
|
|
|
|
list.add("002212023082308315610540219813121388544");
|
|
|
|
|
|
list.add("002212023082308320810540219866181578752");
|
|
|
|
|
|
list.add("002212023082308340010540220334058950656");
|
|
|
|
|
|
list.add("002212023082308400910540221881171357696");
|
|
|
|
|
|
list.add("002212023082308414210540222272518115328");
|
|
|
|
|
|
list.add("002212023082308433610540222748601155584");
|
|
|
|
|
|
list.add("002212023082308434410540222783142047744");
|
|
|
|
|
|
list.add("002212023082308451210540223153024335872");
|
|
|
|
|
|
list.add("002212023082308491910540224188418613248");
|
|
|
|
|
|
list.add("002212023082308502510540224464131186688");
|
|
|
|
|
|
list.add("002212023082308540810540225399547908096");
|
|
|
|
|
|
list.add("002212023082308550810540225652231602176");
|
|
|
|
|
|
list.add("002212023082313204510540292497363865600");
|
|
|
|
|
|
list.add("002212023082313355110540296295968653312");
|
|
|
|
|
|
list.add("002212023082314020010540302878551293952");
|
|
|
|
|
|
list.add("002212023082314124310540305573275947008");
|
|
|
|
|
|
list.add("002212023082315424510540328234239037440");
|
|
|
|
|
|
list.add("002212023082321223210540413742592716800");
|
|
|
|
|
|
list.add("002212023082322002510540423275753025536");
|
|
|
|
|
|
list.add("002212023082407335710540567610270670848");
|
|
|
|
|
|
list.add("002212023082407364210540568301441830912");
|
|
|
|
|
|
list.add("002212023082407393910540569042449326080");
|
|
|
|
|
|
list.add("002212023082407500210540571657005498368");
|
|
|
|
|
|
list.add("002212023082407545010540572866643939328");
|
|
|
|
|
|
list.add("002212023082407564910540573364283936768");
|
|
|
|
|
|
list.add("002212023082407583710540573818156789760");
|
|
|
|
|
|
list.add("002212023082408093110540576561193123840");
|
|
|
|
|
|
list.add("002212023082408093610540576580463906816");
|
|
|
|
|
|
list.add("002212023082408105310540576905080647680");
|
|
|
|
|
|
list.add("002212023082408124310540577366386978816");
|
|
|
|
|
|
list.add("002212023082408160310540578203492958208");
|
|
|
|
|
|
list.add("002212023082408165310540578414940205056");
|
|
|
|
|
|
list.add("002212023082408183310540578834470825984");
|
|
|
|
|
|
list.add("002212023082408211610540579519572103168");
|
|
|
|
|
|
list.add("002212023082408240310540580216411619328");
|
|
|
|
|
|
list.add("002212023082408265710540580946490576896");
|
|
|
|
|
|
list.add("002212023082408323810540582379631226880");
|
|
|
|
|
|
list.add("002212023082408374610540583668671070208");
|
|
|
|
|
|
list.add("002212023082408383610540583880580759552");
|
|
|
|
|
|
list.add("002212023082408391910540584059830439936");
|
|
|
|
|
|
list.add("002212023082408395710540584220877225984");
|
|
|
|
|
|
list.add("002212023082408420510540584758461169664");
|
|
|
|
|
|
list.add("002212023082408432510540585091625451520");
|
|
|
|
|
|
list.add("002212023082413060010540651171424747520");
|
|
|
|
|
|
list.add("002212023082413122210540652775406751744");
|
|
|
|
|
|
list.add("002212023082413241510540655767593865216");
|
|
|
|
|
|
list.add("002212023082414133910540668197430513664");
|
|
|
|
|
|
list.add("002212023082414353910540673733661478912");
|
|
|
|
|
|
list.add("002212023082418171010540729479545901056");
|
|
|
|
|
|
list.add("002212023082419345810540749058944348160");
|
|
|
|
|
|
list.add("002212023082422004410540785741453774848");
|
|
|
|
|
|
list.add("002212023082422311110540793407316586496");
|
|
|
|
|
|
list.add("002212023082507094310540923898454757376");
|
|
|
|
|
|
list.add("002212023082507110810540924257995390976");
|
|
|
|
|
|
list.add("002212023082507144310540925156965928960");
|
|
|
|
|
|
list.add("002212023082507294410540928936170471424");
|
|
|
|
|
|
list.add("002212023082507335510540929988141244416");
|
|
|
|
|
|
list.add("002212023082507392510540931374747811840");
|
|
|
|
|
|
list.add("002212023082507440310540932540765122560");
|
|
|
|
|
|
list.add("002212023082507444910540932733877862400");
|
|
|
|
|
|
list.add("002212023082507520710540934570983976960");
|
|
|
|
|
|
list.add("002212023082507530510540934813792235520");
|
|
|
|
|
|
list.add("002212023082507550010540935294701780992");
|
|
|
|
|
|
list.add("002212023082507563710540935703143534592");
|
|
|
|
|
|
list.add("002212023082507565710540935785146548224");
|
|
|
|
|
|
list.add("002212023082508094410540939003545858048");
|
|
|
|
|
|
list.add("002212023082508100410540939085557084160");
|
|
|
|
|
|
list.add("002212023082508114010540939487764267008");
|
|
|
|
|
|
list.add("002212023082508123410540939716991832064");
|
|
|
|
|
|
list.add("002212023082508134310540940006257344512");
|
|
|
|
|
|
list.add("002212023082508203410540941730312421376");
|
|
|
|
|
|
list.add("002212023082508224910540942295000956928");
|
|
|
|
|
|
list.add("002212023082508232710540942453044920320");
|
|
|
|
|
|
list.add("002212023082508252510540942950615666688");
|
|
|
|
|
|
list.add("002212023082508263710540943250140422144");
|
|
|
|
|
|
list.add("002212023082508292210540943942295470080");
|
|
|
|
|
|
list.add("002212023082508305410540944328779796480");
|
|
|
|
|
|
list.add("002212023082508312510540944461605793792");
|
|
|
|
|
|
list.add("002212023082508331410540944917043515392");
|
|
|
|
|
|
list.add("002212023082508382410540946216372064256");
|
|
|
|
|
|
list.add("002212023082508393910540946531721953280");
|
|
|
|
|
|
list.add("002212023082508472910540948502991908864");
|
|
|
|
|
|
list.add("002212023082508474010540948549094965248");
|
|
|
|
|
|
list.add("002212023082512433910541007937305759744");
|
|
|
|
|
|
list.add("002212023082514501110541039779091623936");
|
|
|
|
|
|
list.add("002212023082518112710541090429319155712");
|
|
|
|
|
|
list.add("002212023082520180110541122282875092992");
|
|
|
|
|
|
list.add("002212023082522013810541148355985068032");
|
|
|
|
|
|
list.add("002212023082602022210541208939376070656");
|
|
|
|
|
|
list.add("002212023082607495310541296397117075456");
|
|
|
|
|
|
list.add("002212023082608424010541309680424304640");
|
|
|
|
|
|
list.add("002212023082613302010541382070797844480");
|
|
|
|
|
|
list.add("002212023082614421510541400173050609664");
|
|
|
|
|
|
list.add("002212023082616055010541421204757696512");
|
|
|
|
|
|
list.add("002212023082620131310541483462279450624");
|
|
|
|
|
|
list.add("002212023082622010110541510590503419904");
|
|
|
|
|
|
list.add("002212023082623271110541532276283330560");
|
|
|
|
|
|
list.add("002212023082707312710541654142436868096");
|
|
|
|
|
|
list.add("002212023082720432710541853458567069696");
|
|
|
|
|
|
list.add("002212023082722012710541873088366968832");
|
|
|
|
|
|
list.add("002212023082722343210541881414744879104");
|
|
|
|
|
|
list.add("002212023082723175610541892336557506560");
|
|
|
|
|
|
list.add("002212023082800395510541912965506584576");
|
|
|
|
|
|
list.add("002212023082801311110541925869100302336");
|
|
|
|
|
|
list.add("002212023082807213210542014038531559424");
|
|
|
|
|
|
list.add("002212023082807280710542015692015394816");
|
|
|
|
|
|
list.add("002212023082807422710542019299100057600");
|
|
|
|
|
|
list.add("002212023082807470310542020458714943488");
|
|
|
|
|
|
list.add("002212023082807483410542020841521180672");
|
|
|
|
|
|
list.add("002212023082807530510542021975498022912");
|
|
|
|
|
|
list.add("002212023082807533610542022107896315904");
|
|
|
|
|
|
list.add("002212023082807593410542023608792158208");
|
|
|
|
|
|
list.add("002212023082808012210542024060341366784");
|
|
|
|
|
|
list.add("002212023082808042610542024833159548928");
|
|
|
|
|
|
list.add("002212023082808073910542025642371870720");
|
|
|
|
|
|
list.add("002212023082808100710542026265259036672");
|
|
|
|
|
|
list.add("002212023082808111710542026554741080064");
|
|
|
|
|
|
list.add("002212023082808170910542028032329744384");
|
|
|
|
|
|
list.add("002212023082808253410542030149692084224");
|
|
|
|
|
|
list.add("002212023082808254110542030178856390656");
|
|
|
|
|
|
list.add("002212023082808265610542030496641859584");
|
|
|
|
|
|
list.add("002212023082808314410542031701178859520");
|
|
|
|
|
|
list.add("002212023082808320410542031786745856000");
|
|
|
|
|
|
list.add("002212023082808353610542032678288281600");
|
|
|
|
|
|
list.add("002212023082808382310542033377668935680");
|
|
|
|
|
|
list.add("002212023082808392310542033628516941824");
|
|
|
|
|
|
list.add("002212023082808402910542033906928078848");
|
|
|
|
|
|
list.add("002212023082808455310542035266232401920");
|
|
|
|
|
|
list.add("002212023082808470710542035574362918912");
|
|
|
|
|
|
list.add("002212023082808502410542036398774173696");
|
|
|
|
|
|
list.add("002212023082811081510542071091480416256");
|
|
|
|
|
|
list.add("002212023082811385610542078813357195264");
|
|
|
|
|
|
list.add("002212023082811582610542083721857904640");
|
|
|
|
|
|
list.add("002212023082811592110542083950779715584");
|
|
|
|
|
|
list.add("002212023082812013810542084526341455872");
|
|
|
|
|
|
list.add("002212023082814083910542116489779662848");
|
|
|
|
|
|
list.add("002212023082815345510542138201917423616");
|
|
|
|
|
|
list.add("002212023082822301510542242722522849280");
|
|
|
|
|
|
list.add("002212023082823031510542251026157293568");
|
|
|
|
|
|
list.add("002212023082900534710542278842145062912");
|
|
|
|
|
|
list.add("002212023082907222510542376647587696640");
|
|
|
|
|
|
list.add("002212023082907281610542378119986753536");
|
|
|
|
|
|
list.add("002212023082907304810542378756752461824");
|
|
|
|
|
|
list.add("002212023082907344610542379756306378752");
|
|
|
|
|
|
list.add("002212023082907471010542382877464346624");
|
|
|
|
|
|
list.add("002212023082907490410542383352820174848");
|
|
|
|
|
|
list.add("002212023082907521010542384132224110592");
|
|
|
|
|
|
list.add("002212023082908003510542386252584628224");
|
|
|
|
|
|
list.add("002212023082908005810542386347297099776");
|
|
|
|
|
|
list.add("002212023082908071810542387942073200640");
|
|
|
|
|
|
list.add("002212023082908081510542388182692651008");
|
|
|
|
|
|
list.add("002212023082908112210542388963617353728");
|
|
|
|
|
|
list.add("002212023082908163910542390294226944000");
|
|
|
|
|
|
list.add("002212023082908164310542390313125302272");
|
|
|
|
|
|
list.add("002212023082908190910542390925387411456");
|
|
|
|
|
|
list.add("002212023082908220710542391672634789888");
|
|
|
|
|
|
list.add("002212023082908222510542391747854626816");
|
|
|
|
|
|
list.add("002212023082908232610542392003482189824");
|
|
|
|
|
|
list.add("002212023082908242710542392259296284672");
|
|
|
|
|
|
list.add("002212023082908291210542393453933137920");
|
|
|
|
|
|
list.add("002212023082908375210542395633398075392");
|
|
|
|
|
|
list.add("002212023082908382410542395770595434496");
|
|
|
|
|
|
list.add("002212023082908404510542396359521853440");
|
|
|
|
|
|
list.add("002212023082908412610542396530464731136");
|
|
|
|
|
|
list.add("002212023082908420010542396675860279296");
|
|
|
|
|
|
list.add("002212023082908421410542396734264987648");
|
|
|
|
|
|
list.add("002212023082908521010542399234520137728");
|
|
|
|
|
|
list.add("002212023082908524610542399383194025984");
|
|
|
|
|
|
list.add("002212023082909072110542403053512200192");
|
|
|
|
|
|
list.add("002212023082912573810542461005669224448");
|
|
|
|
|
|
list.add("002212023082916103910542509583049854976");
|
|
|
|
|
|
list.add("002212023082916244310542513122616901632");
|
|
|
|
|
|
list.add("002212023082922370510542606829373612032");
|
|
|
|
|
|
list.add("002212023082923041910542613683529940992");
|
|
|
|
|
|
list.add("002212023083007132910542736784848490496");
|
|
|
|
|
|
list.add("002212023083007230210542739190391308288");
|
|
|
|
|
|
list.add("002212023083007291210542740741627150336");
|
|
|
|
|
|
list.add("002212023083007403110542743588528500736");
|
|
|
|
|
|
list.add("002212023083007460210542744978712158208");
|
|
|
|
|
|
list.add("002212023083007544610542747177897410560");
|
|
|
|
|
|
list.add("002212023083007561310542747541845987328");
|
|
|
|
|
|
list.add("002212023083007592410542748340289949696");
|
|
|
|
|
|
list.add("002212023083007593810542748399157284864");
|
|
|
|
|
|
list.add("002212023083008054510542749940102447104");
|
|
|
|
|
|
list.add("002212023083008090710542750787704782848");
|
|
|
|
|
|
list.add("002212023083008122310542751610529165312");
|
|
|
|
|
|
list.add("002212023083008181710542753096048377856");
|
|
|
|
|
|
list.add("002212023083008182310542753117828792320");
|
|
|
|
|
|
list.add("002212023083008224010542754197591916544");
|
|
|
|
|
|
list.add("002212023083008252510542754889829957632");
|
|
|
|
|
|
list.add("002212023083008261710542755107988197376");
|
|
|
|
|
|
list.add("002212023083008283410542755680133906432");
|
|
|
|
|
|
list.add("002212023083008332210542756888155766784");
|
|
|
|
|
|
list.add("002212023083008332110542756887216148480");
|
|
|
|
|
|
list.add("002212023083008352110542757388467404800");
|
|
|
|
|
|
list.add("002212023083008374410542757987017461760");
|
|
|
|
|
|
list.add("002212023083008430810542759346026729472");
|
|
|
|
|
|
list.add("002212023083008444810542759767939727360");
|
|
|
|
|
|
list.add("002212023083008455410542760043553042432");
|
|
|
|
|
|
list.add("002212023083008491010542760867644723200");
|
|
|
|
|
|
list.add("002212023083008501510542761140468596736");
|
|
|
|
|
|
list.add("002212023083008524410542761765050769408");
|
|
|
|
|
|
list.add("002212023083008583510542763236998664192");
|
|
|
|
|
|
list.add("002212023083009195210542768593306402816");
|
|
|
|
|
|
list.add("002212023083011333810542802256684806144");
|
|
|
|
|
|
list.add("002212023083011385510542803586496221184");
|
|
|
|
|
|
list.add("002212023083011464210542805544403021824");
|
|
|
|
|
|
list.add("002212023083013521410542837134213234688");
|
|
|
|
|
|
list.add("002212023083013544310542837758989950976");
|
|
|
|
|
|
list.add("002212023083015505510542867004290490368");
|
|
|
|
|
|
list.add("002212023083017171910542888747662471168");
|
|
|
|
|
|
list.add("002212023083020295910542937232370319360");
|
|
|
|
|
|
list.add("002212023083022541210542973526543532032");
|
|
|
|
|
|
list.add("002212023083101360810543014279465480192");
|
|
|
|
|
|
list.add("002212023083107045410543097013810774016");
|
|
|
|
|
|
list.add("002212023083107182710543100422884933632");
|
|
|
|
|
|
list.add("002212023083107331610543104151206416384");
|
|
|
|
|
|
list.add("002212023083107331810543104162090356736");
|
|
|
|
|
|
list.add("002212023083107401210543105899400433664");
|
|
|
|
|
|
list.add("002212023083107430610543106627237822464");
|
|
|
|
|
|
list.add("002212023083107503010543108490827214848");
|
|
|
|
|
|
list.add("002212023083107511210543108665912741888");
|
|
|
|
|
|
list.add("002212023083107543310543109510341058560");
|
|
|
|
|
|
list.add("002212023083107583310543110517955678208");
|
|
|
|
|
|
list.add("002212023083108025310543111606071382016");
|
|
|
|
|
|
list.add("002212023083108031610543111701399154688");
|
|
|
|
|
|
list.add("002212023083108061610543112457888194560");
|
|
|
|
|
|
list.add("002212023083108115610543113885594324992");
|
|
|
|
|
|
list.add("002212023083108115710543113888123912192");
|
|
|
|
|
|
list.add("002212023083108130610543114175802658816");
|
|
|
|
|
|
list.add("002212023083108213910543116328860291072");
|
|
|
|
|
|
list.add("002212023083108225610543116651365298176");
|
|
|
|
|
|
list.add("002212023083108234010543116835210674176");
|
|
|
|
|
|
list.add("002212023083108274610543117869141032960");
|
|
|
|
|
|
list.add("002212023083108320810543118967651848192");
|
|
|
|
|
|
list.add("002212023083108321910543119015100383232");
|
|
|
|
|
|
list.add("002212023083108333810543119344587259904");
|
|
|
|
|
|
list.add("002212023083108411710543121272036720640");
|
|
|
|
|
|
list.add("002212023083108432410543121804794019840");
|
|
|
|
|
|
list.add("002212023083108444210543122129003630592");
|
|
|
|
|
|
list.add("002212023083108482310543123055336640512");
|
|
|
|
|
|
list.add("002212023083111373410543165632397721600");
|
|
|
|
|
|
list.add("002212023083111511810543169088765132800");
|
|
|
|
|
|
list.add("002212023083113243210543192551338954752");
|
|
|
|
|
|
list.add("002212023083114151710543205322852204544");
|
|
|
|
|
|
list.add("002212023083116120110543234698849857536");
|
|
|
|
|
|
list.add("002212023083118102510543264498760671232");
|
|
|
|
|
|
list.add("002212023083120031510543292893740683264");
|
|
|
|
|
|
list.add("002212023083121511810543320085096624128");
|
|
|
|
|
|
list.add("002212023083122335810543330823555051520");
|
|
|
|
|
|
list.add("002212023090106052710543444440198701056");
|
|
|
|
|
|
list.add("002212023090107191510543463015423954944");
|
|
|
|
|
|
list.add("002212023090107301410543465777017344000");
|
|
|
|
|
|
list.add("002212023090107310610543465996415774720");
|
|
|
|
|
|
list.add("002212023090107321710543466295591948288");
|
|
|
|
|
|
list.add("002212023090107374310543467662110683136");
|
|
|
|
|
|
list.add("002212023090107401310543468289312444416");
|
|
|
|
|
|
list.add("002212023090107461910543469825376751616");
|
|
|
|
|
|
list.add("002212023090107464110543469917361692672");
|
|
|
|
|
|
list.add("002212023090107520110543471257722015744");
|
|
|
|
|
|
list.add("002212023090107533810543471664389971968");
|
|
|
|
|
|
list.add("002212023090108035710543474264678195200");
|
|
|
|
|
|
list.add("002212023090108040410543474290372333568");
|
|
|
|
|
|
list.add("002212023090108092110543475621020532736");
|
|
|
|
|
|
list.add("002212023090108105210543476005077913600");
|
|
|
|
|
|
list.add("002212023090108110110543476042819653632");
|
|
|
|
|
|
list.add("002212023090108120310543476299696017408");
|
|
|
|
|
|
list.add("002212023090108130310543476552834846720");
|
|
|
|
|
|
list.add("002212023090108163110543477423689457664");
|
|
|
|
|
|
list.add("002212023090108201010543478345446412288");
|
|
|
|
|
|
list.add("002212023090108225310543479025392029696");
|
|
|
|
|
|
list.add("002212023090108231310543479109328416768");
|
|
|
|
|
|
list.add("002212023090108274110543480236649865216");
|
|
|
|
|
|
list.add("002212023090108291910543480646926708736");
|
|
|
|
|
|
list.add("002212023090108364910543482532569763840");
|
|
|
|
|
|
list.add("002212023090108381010543482875105267712");
|
|
|
|
|
|
list.add("002212023090108390810543483115670294528");
|
|
|
|
|
|
list.add("002212023090108392010543483168268021760");
|
|
|
|
|
|
list.add("002212023090108415010543483797207015424");
|
|
|
|
|
|
list.add("002212023090108431110543484135120326656");
|
|
|
|
|
|
list.add("002212023090111433710543529543524782080");
|
|
|
|
|
|
list.add("002212023090111462910543530264769490944");
|
|
|
|
|
|
list.add("002212023090112474810543545693986516992");
|
|
|
|
|
|
list.add("002212023090113044610543549963883536384");
|
|
|
|
|
|
list.add("002212023090113175110543553257878450176");
|
|
|
|
|
|
list.add("002212023090113223910543554465610133504");
|
|
|
|
|
|
list.add("002212023090113505910543561595971272704");
|
|
|
|
|
|
list.add("002212023090114344610543572615636701184");
|
|
|
|
|
|
list.add("002212023090114503610543576600867229696");
|
|
|
|
|
|
list.add("002212023090122325110543692928236146688");
|
|
|
|
|
|
list.add("002212023090200472310543726784720277504");
|
|
|
|
|
|
list.add("002212023090208060110543837169591504896");
|
|
|
|
|
|
list.add("002212023090208103110543838304211202048");
|
|
|
|
|
|
list.add("002212023090208564110543849920925118464");
|
|
|
|
|
|
list.add("002212023090212203710543901243407720448");
|
|
|
|
|
|
list.add("002212023090217453710543983030360035328");
|
|
|
|
|
|
list.add("002212023090219185910544006526774824960");
|
|
|
|
|
|
list.add("002212023090220533410544030333035483136");
|
|
|
|
|
|
list.add("002212023090223102810544064782695264256");
|
|
|
|
|
|
list.add("002212023090307474310544194955269656576");
|
|
|
|
|
|
list.add("002212023090308101510544200623431831552");
|
|
|
|
|
|
list.add("002212023090308155110544202033443758080");
|
|
|
|
|
|
list.add("002212023090308334110544206521760972800");
|
|
|
|
|
|
list.add("002212023090308362610544207215177633792");
|
|
|
|
|
|
list.add("002212023090308365210544207322080243712");
|
|
|
|
|
|
list.add("002212023090314052610544290008072409088");
|
|
|
|
|
|
list.add("002212023090314165510544292898959847424");
|
|
|
|
|
|
list.add("002212023090314441310544299767890829312");
|
|
|
|
|
|
list.add("002212023090316555410544332908458270720");
|
|
|
|
|
|
list.add("002212023090323004010544424703444545536");
|
|
|
|
|
|
list.add("002212023090323391610544434418389749760");
|
|
|
|
|
|
list.add("002212023090407090210544547604795338752");
|
|
|
|
|
|
list.add("002212023090407150810544549142197194752");
|
|
|
|
|
|
list.add("002212023090407261910544551956508147712");
|
|
|
|
|
|
list.add("002212023090407320210544553395649990656");
|
|
|
|
|
|
list.add("002212023090407390010544555147691524096");
|
|
|
|
|
|
list.add("002212023090407403910544555561673453568");
|
|
|
|
|
|
list.add("002212023090407441810544556481031335936");
|
|
|
|
|
|
list.add("002212023090407452710544556771784753152");
|
|
|
|
|
|
list.add("002212023090407592110544560270465925120");
|
|
|
|
|
|
list.add("002212023090408050810544561724043145216");
|
|
|
|
|
|
list.add("002212023090408063210544562077414031360");
|
|
|
|
|
|
list.add("002212023090408072410544562293476265984");
|
|
|
|
|
|
list.add("002212023090408202410544565566100860928");
|
|
|
|
|
|
list.add("002212023090408232210544566314555269120");
|
|
|
|
|
|
list.add("002212023090408245110544566685917384704");
|
|
|
|
|
|
list.add("002212023090408262010544567058262528000");
|
|
|
|
|
|
list.add("002212023090408274210544567401751531520");
|
|
|
|
|
|
list.add("002212023090408311010544568276265791488");
|
|
|
|
|
|
list.add("002212023090408312410544568334492495872");
|
|
|
|
|
|
list.add("002212023090408340110544568992818139136");
|
|
|
|
|
|
list.add("002212023090408340610544569013730914304");
|
|
|
|
|
|
list.add("002212023090408340810544569020878008320");
|
|
|
|
|
|
list.add("002212023090408393810544570406324424704");
|
|
|
|
|
|
list.add("002212023090408420510544571023319846912");
|
|
|
|
|
|
list.add("002212023090408442710544571619052867584");
|
|
|
|
|
|
list.add("002212023090409012810544575902017228800");
|
|
|
|
|
|
list.add("002212023090409190710544580342357028864");
|
|
|
|
|
|
list.add("002212023090411532110544619155695464448");
|
|
|
|
|
|
list.add("002212023090411565510544620054280622080");
|
|
|
|
|
|
list.add("002212023090412085510544623075371094016");
|
|
|
|
|
|
list.add("002212023090412210010544626116435177472");
|
|
|
|
|
|
list.add("002212023090412305810544628623812702208");
|
|
|
|
|
|
list.add("002212023090412370510544630162914041856");
|
|
|
|
|
|
list.add("002212023090412561110544634967368560640");
|
|
|
|
|
|
list.add("002212023090413474110544647931151011840");
|
|
|
|
|
|
list.add("002212023090414433510544661997790552064");
|
|
|
|
|
|
list.add("002212023090417181510544700919445327872");
|
|
|
|
|
|
list.add("002212023090418314710544719425479401472");
|
|
|
|
|
|
list.add("002212023090418362210544720578875351040");
|
|
|
|
|
|
list.add("002212023090418483610544723656046641152");
|
|
|
|
|
|
list.add("002212023090420423810544752357246341120");
|
|
|
|
|
|
list.add("002212023090422523310544785048116944896");
|
|
|
|
|
|
list.add("002212023090506220310544898170015084544");
|
|
|
|
|
|
list.add("002212023090507102710544910350903209984");
|
|
|
|
|
|
list.add("002212023090507143710544911398600691712");
|
|
|
|
|
|
list.add("002212023090507300710544915298385612800");
|
|
|
|
|
|
list.add("002212023090507311610544915588925460480");
|
|
|
|
|
|
list.add("002212023090507334110544916197272088576");
|
|
|
|
|
|
list.add("002212023090507460110544919299570630656");
|
|
|
|
|
|
list.add("002212023090507494610544920246117695488");
|
|
|
|
|
|
list.add("002212023090507504010544920470471016448");
|
|
|
|
|
|
list.add("002212023090507533410544921200404750336");
|
|
|
|
|
|
list.add("002212023090507555110544921773808971776");
|
|
|
|
|
|
list.add("002212023090508060110544924335966679040");
|
|
|
|
|
|
list.add("002212023090508173810544927258946785280");
|
|
|
|
|
|
list.add("002212023090508235710544928847128383488");
|
|
|
|
|
|
list.add("002212023090508253410544929254859452416");
|
|
|
|
|
|
list.add("002212023090508265910544929611861831680");
|
|
|
|
|
|
list.add("002212023090508281510544929929677492224");
|
|
|
|
|
|
list.add("002212023090508291710544930187759120384");
|
|
|
|
|
|
list.add("002212023090508293010544930242001481728");
|
|
|
|
|
|
list.add("002212023090508295110544930332814929920");
|
|
|
|
|
|
list.add("002212023090508352410544931730171727872");
|
|
|
|
|
|
list.add("002212023090509145010544941651310170112");
|
|
|
|
|
|
list.add("002212023090510301210544960618394390528");
|
|
|
|
|
|
list.add("002212023090511481310544980250705547264");
|
|
|
|
|
|
list.add("002212023090511524710544981401137737728");
|
|
|
|
|
|
list.add("002212023090512024910544983928069296128");
|
|
|
|
|
|
list.add("002212023090512095410544985707525132288");
|
|
|
|
|
|
list.add("002212023090514052010545014757401526272");
|
|
|
|
|
|
list.add("002212023090514491310545025804324032512");
|
|
|
|
|
|
list.add("002212023090515074610545030469387661312");
|
|
|
|
|
|
list.add("002212023090519145710545092676486017024");
|
|
|
|
|
|
list.add("002212023090522021410545134776260255744");
|
|
|
|
|
|
list.add("002212023090607074310545272050649497600");
|
|
|
|
|
|
list.add("002212023090607081710545272194338676736");
|
|
|
|
|
|
list.add("002212023090607341210545278713642938368");
|
|
|
|
|
|
list.add("002212023090607370910545279459145011200");
|
|
|
|
|
|
list.add("002212023090607372210545279513998118912");
|
|
|
|
|
|
list.add("002212023090607380610545279695939461120");
|
|
|
|
|
|
list.add("002212023090607391610545279992100352000");
|
|
|
|
|
|
list.add("002212023090607492310545282535150456832");
|
|
|
|
|
|
list.add("002212023090607511010545282985786208256");
|
|
|
|
|
|
list.add("002212023090607573910545284618475638784");
|
|
|
|
|
|
list.add("002212023090608001610545285273717035008");
|
|
|
|
|
|
list.add("002212023090608024810545285911106351104");
|
|
|
|
|
|
list.add("002212023090608042810545286332671651840");
|
|
|
|
|
|
list.add("002212023090608042610545286325632524288");
|
|
|
|
|
|
list.add("002212023090608054410545286649427111936");
|
|
|
|
|
|
list.add("002212023090608080310545287232923734016");
|
|
|
|
|
|
list.add("002212023090608081310545287277756649472");
|
|
|
|
|
|
list.add("002212023090608114310545288157327945728");
|
|
|
|
|
|
list.add("002212023090608131810545288555484835840");
|
|
|
|
|
|
list.add("002212023090608140910545288770875092992");
|
|
|
|
|
|
list.add("002212023090608145910545288977506734080");
|
|
|
|
|
|
list.add("002212023090608190810545290025154740224");
|
|
|
|
|
|
list.add("002212023090608294010545292672424075264");
|
|
|
|
|
|
list.add("002212023090608315010545293219646431232");
|
|
|
|
|
|
list.add("002212023090608333910545293677646188544");
|
|
|
|
|
|
list.add("002212023090608411710545295596766760960");
|
|
|
|
|
|
list.add("002212023090608425810545296019943313408");
|
|
|
|
|
|
list.add("002212023090608441810545296356793970688");
|
|
|
|
|
|
list.add("002212023090612045510545346845274300416");
|
|
|
|
|
|
list.add("002212023090612213210545351023424573440");
|
|
|
|
|
|
list.add("002212023090612333610545354060662681600");
|
|
|
|
|
|
list.add("002212023090613210310545366003888820224");
|
|
|
|
|
|
list.add("002212023090613365410545369992135028736");
|
|
|
|
|
|
list.add("002212023090614281410545382909192036352");
|
|
|
|
|
|
list.add("002212023090616173510545410430315106304");
|
|
|
|
|
|
list.add("002212023090617105910545423865516904448");
|
|
|
|
|
|
list.add("002212023090618424610545446963781464064");
|
|
|
|
|
|
list.add("002212023090619323610545459504636186624");
|
|
|
|
|
|
list.add("002212023090620043110545467537042919424");
|
|
|
|
|
|
list.add("002212023090620061010545467955603435520");
|
|
|
|
|
|
list.add("002212023090622010210545496860219269120");
|
|
|
|
|
|
list.add("002212023090706402410545627565663158272");
|
|
|
|
|
|
list.add("002212023090707071110545634303269654528");
|
|
|
|
|
|
list.add("002212023090707221010545638075874136064");
|
|
|
|
|
|
list.add("002212023090707262610545639150181552128");
|
|
|
|
|
|
list.add("002212023090707270710545639322037153792");
|
|
|
|
|
|
list.add("002212023090707395910545642556717031424");
|
|
|
|
|
|
list.add("002212023090707543010545646212294774784");
|
|
|
|
|
|
list.add("002212023090707552510545646441676795904");
|
|
|
|
|
|
list.add("002212023090707554910545646541946847232");
|
|
|
|
|
|
list.add("002212023090707565110545646801683238912");
|
|
|
|
|
|
list.add("002212023090708000710545647623510028288");
|
|
|
|
|
|
list.add("002212023090708014510545648034222542848");
|
|
|
|
|
|
list.add("002212023090708091710545649930197782528");
|
|
|
|
|
|
list.add("002212023090708113910545650529464905728");
|
|
|
|
|
|
list.add("002212023090708115910545650611371343872");
|
|
|
|
|
|
list.add("002212023090708124810545650815351115776");
|
|
|
|
|
|
list.add("002212023090708133310545651006680301568");
|
|
|
|
|
|
list.add("002212023090708183410545652267727253504");
|
|
|
|
|
|
list.add("002212023090708191510545652439385657344");
|
|
|
|
|
|
list.add("002212023090708203210545652764431634432");
|
|
|
|
|
|
list.add("002212023090708243110545653765342892033");
|
|
|
|
|
|
list.add("002212023090708292910545655015885471744");
|
|
|
|
|
|
list.add("002212023090708295310545655114870054912");
|
|
|
|
|
|
list.add("002212023090708302710545655260390608896");
|
|
|
|
|
|
list.add("002212023090708415510545658146471964672");
|
|
|
|
|
|
list.add("002212023090708440210545658677325590528");
|
|
|
|
|
|
list.add("002212023090708474410545659606717190144");
|
|
|
|
|
|
list.add("002212023090708582610545662302410829824");
|
|
|
|
|
|
list.add("002212023090709073410545664598287077376");
|
|
|
|
|
|
list.add("002212023090711453010545704345471651840");
|
|
|
|
|
|
list.add("002212023090712274810545714988837564416");
|
|
|
|
|
|
list.add("002212023090714065010545739911733047296");
|
|
|
|
|
|
list.add("002212023090715432810545764232721096704");
|
|
|
|
|
|
list.add("002212023090718161310545802673134088192");
|
|
|
|
|
|
list.add("002212023090721343610545852596722200576");
|
|
|
|
|
|
list.add("002212023090722091610545861321185841152");
|
|
|
|
|
|
list.add("002212023090723520010545887175250771968");
|
|
|
|
|
|
list.add("002212023090807080710545996925248057344");
|
|
|
|
|
|
list.add("002212023090807193410545999807697227776");
|
|
|
|
|
|
list.add("002212023090807195410545999890308984832");
|
|
|
|
|
|
list.add("002212023090807262710546001539872346112");
|
|
|
|
|
|
list.add("002212023090807340910546003480051822592");
|
|
|
|
|
|
list.add("002212023090807364910546004151409672192");
|
|
|
|
|
|
list.add("002212023090807373010546004320424058880");
|
|
|
|
|
|
list.add("002212023090807410410546005217920438272");
|
|
|
|
|
|
list.add("002212023090807461210546006509586604032");
|
|
|
|
|
|
list.add("002212023090807513110546007849024905216");
|
|
|
|
|
|
list.add("002212023090807544910546008678577721344");
|
|
|
|
|
|
list.add("002212023090807564210546009154664779776");
|
|
|
|
|
|
list.add("002212023090807565610546009213532659712");
|
|
|
|
|
|
list.add("002212023090808034710546010935261888512");
|
|
|
|
|
|
list.add("002212023090808045410546011214808055808");
|
|
|
|
|
|
list.add("002212023090808061310546011550192992256");
|
|
|
|
|
|
list.add("002212023090808074210546011919863640064");
|
|
|
|
|
|
list.add("002212023090808085710546012237545328640");
|
|
|
|
|
|
list.add("002212023090808094910546012453687123968");
|
|
|
|
|
|
list.add("002212023090808183510546014660131090432");
|
|
|
|
|
|
list.add("002212023090808234910546015978868051968");
|
|
|
|
|
|
list.add("002212023090808245010546016234898317312");
|
|
|
|
|
|
list.add("002212023090808283810546017189350834176");
|
|
|
|
|
|
list.add("002212023090808285510546017259222753280");
|
|
|
|
|
|
list.add("002212023090808343910546018704997855232");
|
|
|
|
|
|
list.add("002212023090808371710546019365171294208");
|
|
|
|
|
|
list.add("002212023090808393110546019927956901888");
|
|
|
|
|
|
list.add("002212023090808400010546020050561765376");
|
|
|
|
|
|
list.add("002212023090808423910546020716210053120");
|
|
|
|
|
|
list.add("002212023090808461010546021603434582016");
|
|
|
|
|
|
list.add("002212023090812053810546071801495711744");
|
|
|
|
|
|
list.add("002212023090813314910546093488100192256");
|
|
|
|
|
|
list.add("002212023090817311110546153724676534272");
|
|
|
|
|
|
list.add("002212023090822124210546224572863213568");
|
|
|
|
|
|
list.add("002212023090903443010546308071983644672");
|
|
|
|
|
|
list.add("002212023090908500310546384968905252864");
|
|
|
|
|
|
list.add("002212023090909425510546398272226545664");
|
|
|
|
|
|
list.add("002212023090911192210546422545867968512");
|
|
|
|
|
|
list.add("002212023090911374810546427183701786624");
|
|
|
|
|
|
list.add("002212023090911443210546428878120800256");
|
|
|
|
|
|
list.add("002212023090911450510546429017677877248");
|
|
|
|
|
|
list.add("002212023090911455810546429236172509184");
|
|
|
|
|
|
list.add("002212023090911525210546430973017018368");
|
|
|
|
|
|
list.add("002212023090911595410546432743907102720");
|
|
|
|
|
|
list.add("002212023090912044310546433955531423744");
|
|
|
|
|
|
list.add("002212023090912083810546434943483666432");
|
|
|
|
|
|
list.add("002212023090912120910546435827893817344");
|
|
|
|
|
|
list.add("002212023090912320310546440833365340160");
|
|
|
|
|
|
list.add("002212023090915403510546488283071762432");
|
|
|
|
|
|
list.add("002212023090921061910546570255256629248");
|
|
|
|
|
|
list.add("002212023091000110810546616763599400960");
|
|
|
|
|
|
list.add("002212023091009344910546758622662119424");
|
|
|
|
|
|
list.add("002212023091012575710546809739841474560");
|
|
|
|
|
|
list.add("002212023091014303110546833034845454336");
|
|
|
|
|
|
list.add("002212023091017571910546885079308718080");
|
|
|
|
|
|
list.add("002212023091019431910546911754289434624");
|
|
|
|
|
|
list.add("002212023091022323710546954359811440640");
|
|
|
|
|
|
list.add("002212023091023020410546961770475442176");
|
|
|
|
|
|
list.add("002212023091103441610547032789461872640");
|
|
|
|
|
|
list.add("002212023091107212610547087440203579392");
|
|
|
|
|
|
list.add("002212023091107282510547089201139396608");
|
|
|
|
|
|
list.add("002212023091107305210547089816993001472");
|
|
|
|
|
|
list.add("002212023091107404810547092314655141888");
|
|
|
|
|
|
list.add("002212023091107405610547092348568662016");
|
|
|
|
|
|
list.add("002212023091107444110547093290736545792");
|
|
|
|
|
|
list.add("002212023091107501610547094696558440448");
|
|
|
|
|
|
list.add("002212023091107515710547095122052018176");
|
|
|
|
|
|
list.add("002212023091107525010547095342450274304");
|
|
|
|
|
|
list.add("002212023091107561510547096202511405056");
|
|
|
|
|
|
list.add("002212023091107591910547096976320262144");
|
|
|
|
|
|
list.add("002212023091108022510547097754392432640");
|
|
|
|
|
|
list.add("002212023091108063810547098814629343232");
|
|
|
|
|
|
list.add("002212023091108093910547099576631808000");
|
|
|
|
|
|
list.add("002212023091108121110547100213190651904");
|
|
|
|
|
|
list.add("002212023091108114310547100097307873280");
|
|
|
|
|
|
list.add("002212023091108135610547100655064027136");
|
|
|
|
|
|
list.add("002212023091108144110547100843841261568");
|
|
|
|
|
|
list.add("002212023091108170910547101465079435264");
|
|
|
|
|
|
list.add("002212023091108173910547101590602403840");
|
|
|
|
|
|
list.add("002212023091108210210547102441207975936");
|
|
|
|
|
|
list.add("002212023091108231610547103003010985984");
|
|
|
|
|
|
list.add("002212023091108275010547104151005949952");
|
|
|
|
|
|
list.add("002212023091108274910547104147850457088");
|
|
|
|
|
|
list.add("002212023091108280610547104219446239232");
|
|
|
|
|
|
list.add("002212023091108330210547105458786652160");
|
|
|
|
|
|
list.add("002212023091108575710547111730528759808");
|
|
|
|
|
|
list.add("002212023091112192510547162431538036736");
|
|
|
|
|
|
list.add("002212023091112560310547171651706966016");
|
|
|
|
|
|
list.add("002212023091113121110547175710592995328");
|
|
|
|
|
|
list.add("002212023091113393010547182584629432320");
|
|
|
|
|
|
list.add("002212023091113443910547183880388079616");
|
|
|
|
|
|
list.add("002212023091114253610547194186385346560");
|
|
|
|
|
|
list.add("002212023091114340510547196323323572224");
|
|
|
|
|
|
list.add("002212023091116443510547229162993307648");
|
|
|
|
|
|
list.add("002212023091122192910547313444275744768");
|
|
|
|
|
|
list.add("002212023091122212210547313918634995712");
|
|
|
|
|
|
list.add("002212023091207172310547448810716631040");
|
|
|
|
|
|
list.add("002212023091207212610547449828452659200");
|
|
|
|
|
|
list.add("002212023091207444810547455708872708096");
|
|
|
|
|
|
list.add("002212023091207483310547456654533046272");
|
|
|
|
|
|
list.add("002212023091207594410547459468308877312");
|
|
|
|
|
|
list.add("002212023091208054610547460984607363072");
|
|
|
|
|
|
list.add("002212023091208081210547461598142652416");
|
|
|
|
|
|
list.add("002212023091208201910547464647883907072");
|
|
|
|
|
|
list.add("002212023091208271810547466405673947136");
|
|
|
|
|
|
list.add("002212023091208275110547466543736942592");
|
|
|
|
|
|
list.add("002212023091208352710547468457476493312");
|
|
|
|
|
|
list.add("002212023091208504910547472323370414080");
|
|
|
|
|
|
list.add("002212023091208512910547472493359890432");
|
|
|
|
|
|
list.add("002212023091209311010547482480055373824");
|
|
|
|
|
|
list.add("002212023091209543810547488381551144961");
|
|
|
|
|
|
list.add("002212023091211213410547510260471230464");
|
|
|
|
|
|
list.add("002212023091212044310547521119938777088");
|
|
|
|
|
|
list.add("002212023091212104810547522649450209280");
|
|
|
|
|
|
list.add("002212023091213091310547537351566938112");
|
|
|
|
|
|
list.add("002212023091213320110547543091018338304");
|
|
|
|
|
|
list.add("002212023091214575610547564713334935552");
|
|
|
|
|
|
list.add("002212023091215160710547569286385336320");
|
|
|
|
|
|
list.add("002212023091216004310547580511127887872");
|
|
|
|
|
|
list.add("002212023091216303810547588042213916672");
|
|
|
|
|
|
list.add("002212023091216425510547591133090607104");
|
|
|
|
|
|
list.add("002212023091222160110547674958520877056");
|
|
|
|
|
|
list.add("002212023091302414410547741827707981824");
|
|
|
|
|
|
list.add("002212023091307103810547809497545146368");
|
|
|
|
|
|
list.add("002212023091307265810547813608902590464");
|
|
|
|
|
|
list.add("002212023091307302610547814481487310848");
|
|
|
|
|
|
list.add("002212023091307324510547815065515556864");
|
|
|
|
|
|
list.add("002212023091307385110547816600811098112");
|
|
|
|
|
|
list.add("002212023091307390010547816639881007104");
|
|
|
|
|
|
list.add("002212023091307405810547817132436717568");
|
|
|
|
|
|
list.add("002212023091307421910547817472154300416");
|
|
|
|
|
|
list.add("002212023091307422510547817497269862400");
|
|
|
|
|
|
list.add("002212023091307483210547819039341023232");
|
|
|
|
|
|
list.add("002212023091307500010547819404935790592");
|
|
|
|
|
|
list.add("002212023091307543110547820543497859072");
|
|
|
|
|
|
list.add("002212023091307550210547820673458638848");
|
|
|
|
|
|
list.add("002212023091307591010547821712046190592");
|
|
|
|
|
|
list.add("002212023091308022510547822530579759104");
|
|
|
|
|
|
list.add("002212023091308035110547822891054247936");
|
|
|
|
|
|
list.add("002212023091308054810547823381114941440");
|
|
|
|
|
|
list.add("002212023091308060410547823450178420736");
|
|
|
|
|
|
list.add("002212023091308072510547823789671960576");
|
|
|
|
|
|
list.add("002212023091308102410547824540708982784");
|
|
|
|
|
|
list.add("002212023091308124710547825141864574976");
|
|
|
|
|
|
list.add("002212023091308144010547825615206772736");
|
|
|
|
|
|
list.add("002212023091308172710547826313509867520");
|
|
|
|
|
|
list.add("002212023091308202110547827046221971456");
|
|
|
|
|
|
list.add("002212023091308251210547828265889624064");
|
|
|
|
|
|
list.add("002212023091308313410547829866284941312");
|
|
|
|
|
|
list.add("002212023091310150410547855914010796032");
|
|
|
|
|
|
list.add("002212023091310524310547865387738955776");
|
|
|
|
|
|
list.add("002212023091311434610547878235839909888");
|
|
|
|
|
|
list.add("002212023091311574410547881751306010624");
|
|
|
|
|
|
list.add("002212023091312284510547889556529737728");
|
|
|
|
|
|
list.add("002212023091312334010547890794023215104");
|
|
|
|
|
|
list.add("002212023091313243510547903607563456512");
|
|
|
|
|
|
list.add("002212023091313563310547911651431395328");
|
|
|
|
|
|
list.add("002212023091314092710547914896381435904");
|
|
|
|
|
|
list.add("002212023091314175010547917006362890240");
|
|
|
|
|
|
list.add("002212023091320184810548007848514785280");
|
|
|
|
|
|
list.add("002212023091321274910548025218227490816");
|
|
|
|
|
|
list.add("002212023091322072210548035171413946368");
|
|
|
|
|
|
list.add("002212023091323464110548060163750744064");
|
|
|
|
|
|
list.add("002212023091406591010548169001683460096");
|
|
|
|
|
|
list.add("002212023091407154410548173172433666048");
|
|
|
|
|
|
list.add("002212023091407251310548175556112986112");
|
|
|
|
|
|
list.add("002212023091407305210548176978987847680");
|
|
|
|
|
|
list.add("002212023091407351910548178097496305664");
|
|
|
|
|
|
list.add("002212023091407445110548180497214189568");
|
|
|
|
|
|
list.add("002212023091407475010548181250339274752");
|
|
|
|
|
|
list.add("002212023091407510710548182074352332800");
|
|
|
|
|
|
list.add("002212023091407514810548182245714669568");
|
|
|
|
|
|
list.add("002212023091407540810548182834232676352");
|
|
|
|
|
|
list.add("002212023091407542310548182896364302336");
|
|
|
|
|
|
list.add("002212023091407560410548183319090479104");
|
|
|
|
|
|
list.add("002212023091407562610548183412247916544");
|
|
|
|
|
|
list.add("002212023091407585910548184055579807744");
|
|
|
|
|
|
list.add("002212023091407592410548184162049581056");
|
|
|
|
|
|
list.add("002212023091408000710548184339913449472");
|
|
|
|
|
|
list.add("002212023091408024710548185010447761408");
|
|
|
|
|
|
list.add("002212023091408030310548185079060992000");
|
|
|
|
|
|
list.add("002212023091408044710548185514644779008");
|
|
|
|
|
|
list.add("002212023091408182410548188940694736896");
|
|
|
|
|
|
list.add("002212023091408203710548189497266450432");
|
|
|
|
|
|
list.add("002212023091408220710548189874997080064");
|
|
|
|
|
|
list.add("002212023091408224910548190051372969984");
|
|
|
|
|
|
list.add("002212023091408243310548190489824755712");
|
|
|
|
|
|
list.add("002212023091408353510548193266619518976");
|
|
|
|
|
|
list.add("002212023091408374110548193795984187392");
|
|
|
|
|
|
list.add("002212023091410431910548225410597367808");
|
|
|
|
|
|
list.add("002212023091411350410548238432190980096");
|
|
|
|
|
|
list.add("002212023091412021710548245283325784064");
|
|
|
|
|
|
list.add("002212023091412085810548246965958086656");
|
|
|
|
|
|
list.add("002212023091412262710548251363560640512");
|
|
|
|
|
|
list.add("002212023091413053310548261203341656064");
|
|
|
|
|
|
list.add("002212023091414094310548277354949496832");
|
|
|
|
|
|
list.add("002212023091414263910548281616377495552");
|
|
|
|
|
|
list.add("002212023091417191510548325051895107584");
|
|
|
|
|
|
list.add("002212023091417231410548326051700662272");
|
|
|
|
|
|
list.add("002212023091422405610548406004404793344");
|
|
|
|
|
|
list.add("002212023091423075410548412791164862464");
|
|
|
|
|
|
list.add("002212023091506144310548520204600709120");
|
|
|
|
|
|
list.add("002212023091507074710548533559799873536");
|
|
|
|
|
|
list.add("002212023091507084410548533799012917248");
|
|
|
|
|
|
list.add("002212023091507223610548537288280059904");
|
|
|
|
|
|
list.add("002212023091507350710548540437280616448");
|
|
|
|
|
|
list.add("002212023091507435010548542628804608000");
|
|
|
|
|
|
list.add("002212023091507500710548544211677859840");
|
|
|
|
|
|
list.add("002212023091508014210548547128396034048");
|
|
|
|
|
|
list.add("002212023091508021310548547258031779840");
|
|
|
|
|
|
list.add("002212023091508025710548547442241253376");
|
|
|
|
|
|
list.add("002212023091508030410548547468629585920");
|
|
|
|
|
|
list.add("002212023091508033410548547597763710976");
|
|
|
|
|
|
list.add("002212023091508042610548547813972627456");
|
|
|
|
|
|
list.add("002212023091508093110548549092832694272");
|
|
|
|
|
|
list.add("002212023091508094410548549149653041152");
|
|
|
|
|
|
list.add("002212023091508100810548549247528415232");
|
|
|
|
|
|
list.add("002212023091508135510548550202422407168");
|
|
|
|
|
|
list.add("002212023091508171910548551058454687744");
|
|
|
|
|
|
list.add("002212023091508232910548552609807384576");
|
|
|
|
|
|
list.add("002212023091508242110548552825922670592");
|
|
|
|
|
|
list.add("002212023091508243910548552900780933120");
|
|
|
|
|
|
list.add("002212023091508245410548552966126772224");
|
|
|
|
|
|
list.add("002212023091508261010548553282763169792");
|
|
|
|
|
|
list.add("002212023091508265910548553490256654336");
|
|
|
|
|
|
list.add("002212023091508294210548554172492972032");
|
|
|
|
|
|
list.add("002212023091508375310548556233204858880");
|
|
|
|
|
|
list.add("002212023091511550010548605837726810112");
|
|
|
|
|
|
list.add("002212023091512412710548617526757130240");
|
|
|
|
|
|
list.add("002212023091513002710548622311433646080");
|
|
|
|
|
|
list.add("002212023091513023410548622842849996800");
|
|
|
|
|
|
list.add("002212023091513171210548626523361296384");
|
|
|
|
|
|
list.add("002212023091513252810548628604090155008");
|
|
|
|
|
|
list.add("002212023091514342910548645973620633600");
|
|
|
|
|
|
list.add("002212023091514521410548650440808013824");
|
|
|
|
|
|
list.add("002212023091514550310548651148851986432");
|
|
|
|
|
|
list.add("002212023091516205410548672754990886912");
|
|
|
|
|
|
list.add("002212023091517314410548690581345656832");
|
|
|
|
|
|
list.add("002212023091517380110548692163263303680");
|
|
|
|
|
|
list.add("002212023091523023710548773851404730368");
|
|
|
|
|
|
list.add("002212023091523224210548778904098156544");
|
|
|
|
|
|
list.add("002212023091523572310548787633646981120");
|
|
|
|
|
|
list.add("002212023091606490610548891242356781056");
|
|
|
|
|
|
list.add("002212023091607412210548904397122179072");
|
|
|
|
|
|
list.add("002212023091607591110548908881553571840");
|
|
|
|
|
|
list.add("002212023091608012210548909432544608256");
|
|
|
|
|
|
list.add("002212023091608042210548910184944971776");
|
|
|
|
|
|
list.add("002212023091608271210548915933848743936");
|
|
|
|
|
|
list.add("002212023091610323710548947492090695680");
|
|
|
|
|
|
list.add("002212023091612522610548982680596541440");
|
|
|
|
|
|
list.add("002212023091613422410548995252501999616");
|
|
|
|
|
|
list.add("002212023091616592910549044852726296576");
|
|
|
|
|
|
list.add("002212023091620024810549090983467204608");
|
|
|
|
|
|
list.add("002212023091623135710549139089968541696");
|
|
|
|
|
|
list.add("002212023091700495510549163242299449344");
|
|
|
|
|
|
list.add("002212023091709070110549288340736389120");
|
|
|
|
|
|
list.add("002212023091711541910549330441272504320");
|
|
|
|
|
|
list.add("002212023091717430610549418216478130176");
|
|
|
|
|
|
list.add("002212023091717460710549418975540199424");
|
|
|
|
|
|
list.add("002212023091718254510549428951534825472");
|
|
|
|
|
|
list.add("002212023091720573210549467149061505024");
|
|
|
|
|
|
list.add("002212023091721020810549468304729681920");
|
|
|
|
|
|
list.add("002212023091722055310549484348355514368");
|
|
|
|
|
|
list.add("002212023091722133210549486274972135424");
|
|
|
|
|
|
list.add("002212023091806500510549616265271885824");
|
|
|
|
|
|
list.add("002212023091807215510549624280387256320");
|
|
|
|
|
|
list.add("002212023091807223310549624437442891776");
|
|
|
|
|
|
list.add("002212023091807250410549625070245892096");
|
|
|
|
|
|
list.add("002212023091807403510549628974150266880");
|
|
|
|
|
|
list.add("002212023091807452310549630185104072704");
|
|
|
|
|
|
list.add("002212023091807463910549630502690828288");
|
|
|
|
|
|
list.add("002212023091807494410549631279148961792");
|
|
|
|
|
|
list.add("002212023091807513610549631747448291328");
|
|
|
|
|
|
list.add("002212023091807533410549632245176569856");
|
|
|
|
|
|
list.add("002212023091807581210549633408944934912");
|
|
|
|
|
|
list.add("002212023091808004610549634056043089920");
|
|
|
|
|
|
list.add("002212023091808013410549634255586275328");
|
|
|
|
|
|
list.add("002212023091808022010549634447862497280");
|
|
|
|
|
|
list.add("002212023091808132610549637244199735296");
|
|
|
|
|
|
list.add("002212023091808143210549637519231971328");
|
|
|
|
|
|
list.add("002212023091808150710549637668058611712");
|
|
|
|
|
|
list.add("002212023091808164110549638061980897280");
|
|
|
|
|
|
list.add("002212023091808201210549638945138663424");
|
|
|
|
|
|
list.add("002212023091808282510549641011641323520");
|
|
|
|
|
|
list.add("002212023091808310810549641695453327360");
|
|
|
|
|
|
list.add("002212023091808333610549642317953110016");
|
|
|
|
|
|
list.add("002212023091808402810549644045976997888");
|
|
|
|
|
|
list.add("002212023091808423110549644561640505344");
|
|
|
|
|
|
list.add("002212023091808431310549644738119888896");
|
|
|
|
|
|
list.add("002212023091808443910549645099112845312");
|
|
|
|
|
|
list.add("002212023091810171210549668391420301312");
|
|
|
|
|
|
list.add("002212023091811010010549679413405102080");
|
|
|
|
|
|
list.add("002212023091812044210549695442937020416");
|
|
|
|
|
|
list.add("002212023091812074310549696201202364416");
|
|
|
|
|
|
list.add("002212023091812480110549706343004422144");
|
|
|
|
|
|
list.add("002212023091814320710549732543745249280");
|
|
|
|
|
|
list.add("002212023091815003310549739695458779136");
|
|
|
|
|
|
list.add("002212023091817594010549784771637227520");
|
|
|
|
|
|
list.add("002212023091821280610549837226935091200");
|
|
|
|
|
|
list.add("002212023091822204410549850473446453248");
|
|
|
|
|
|
list.add("002212023091822474110549857253402206208");
|
|
|
|
|
|
list.add("002212023091900520410549888556777205760");
|
|
|
|
|
|
list.add("002212023091906593410549981040959762432");
|
|
|
|
|
|
list.add("002212023091907144310549984855777001472");
|
|
|
|
|
|
list.add("002212023091907161210549985227107123200");
|
|
|
|
|
|
list.add("002212023091907241510549987254213152768");
|
|
|
|
|
|
list.add("002212023091907270410549987963199369216");
|
|
|
|
|
|
list.add("002212023091907390610549990989804462080");
|
|
|
|
|
|
list.add("002212023091907485010549993439330963456");
|
|
|
|
|
|
list.add("002212023091908082210549998357821071360");
|
|
|
|
|
|
list.add("002212023091908090110549998521413742592");
|
|
|
|
|
|
list.add("002212023091908092210549998608214863872");
|
|
|
|
|
|
list.add("002212023091908104810549998969948311552");
|
|
|
|
|
|
list.add("002212023091908134110549999692480385024");
|
|
|
|
|
|
list.add("002212023091908182310550000875696734208");
|
|
|
|
|
|
list.add("002212023091908260710550002822558281728");
|
|
|
|
|
|
list.add("002212023091908293210550003681613967360");
|
|
|
|
|
|
list.add("002212023091908311310550004107198959616");
|
|
|
|
|
|
list.add("002212023091908331710550004624973500416");
|
|
|
|
|
|
list.add("002212023091908343610550004959119273984");
|
|
|
|
|
|
list.add("002212023091908374710550005759361515520");
|
|
|
|
|
|
list.add("002212023091911400710550051644725768192");
|
|
|
|
|
|
list.add("002212023091911541310550055194133913600");
|
|
|
|
|
|
list.add("002212023091912211210550061981553311744");
|
|
|
|
|
|
list.add("002212023091912582210550071335179067392");
|
|
|
|
|
|
list.add("002212023091913160710550075802166251520");
|
|
|
|
|
|
list.add("002212023091914552310550100786763866112");
|
|
|
|
|
|
list.add("002212023091915120410550104983182225408");
|
|
|
|
|
|
list.add("002212023091915252010550108321252454400");
|
|
|
|
|
|
list.add("002212023091917162910550136293765066752");
|
|
|
|
|
|
|
2023-09-08 14:26:13 +08:00
|
|
|
|
return list;
|
2023-08-30 11:02:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testClearingWithdraw() {
|
|
|
|
|
|
// 保存提现记录
|
|
|
|
|
|
ClearingWithdrawInfo record = new ClearingWithdrawInfo();
|
|
|
|
|
|
record.setWithdrawCode("132321354");
|
|
|
|
|
|
record.setWithdrawStatus(Constants.ZERO);
|
|
|
|
|
|
Date now = new Date();
|
|
|
|
|
|
record.setApplicationTime(now);
|
|
|
|
|
|
record.setCreateTime(now);
|
|
|
|
|
|
record.setDelFlag(DelFlagEnum.NORMAL.getValue());
|
|
|
|
|
|
clearingWithdrawInfoService.insertOrUpdate(record);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testGetPileTypeNum() {
|
|
|
|
|
|
Long stationId = 1L;
|
|
|
|
|
|
pileConnectorInfoService.getPileTypeNum(stationId);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testUpdateStatus() {
|
|
|
|
|
|
String pileConnectorCode = "8800000000012601";
|
|
|
|
|
|
String status = "0";
|
|
|
|
|
|
pileConnectorInfoService.updateConnectorStatus(pileConnectorCode, status);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testRedisSet() {
|
|
|
|
|
|
String redisKey = "push_station_connector";
|
|
|
|
|
|
redisCache.setCacheSet(redisKey, Sets.newHashSet("1"));
|
|
|
|
|
|
|
|
|
|
|
|
redisCache.setCacheSet(redisKey, Sets.newHashSet("3"));
|
|
|
|
|
|
|
|
|
|
|
|
redisCache.setCacheSet(redisKey, Sets.newHashSet("5"));
|
|
|
|
|
|
|
|
|
|
|
|
redisCache.setCacheSet(redisKey, Sets.newHashSet("1"));
|
|
|
|
|
|
|
|
|
|
|
|
redisCache.setCacheSet(redisKey, Sets.newHashSet("1"));
|
|
|
|
|
|
|
|
|
|
|
|
redisCache.setCacheSet(redisKey, Sets.newHashSet("7"));
|
|
|
|
|
|
|
|
|
|
|
|
redisCache.setCacheSet(redisKey, Sets.newHashSet("3"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Set<Object> cacheSet = redisCache.getCacheSet(redisKey);
|
|
|
|
|
|
System.out.println(cacheSet);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testSettleOrder() {
|
|
|
|
|
|
Map<String, BigDecimal> returnAmountMap = Maps.newHashMap();
|
|
|
|
|
|
returnAmountMap.put("returnPrincipal", new BigDecimal("16.8700"));
|
|
|
|
|
|
// 更新会员钱包
|
|
|
|
|
|
BigDecimal returnPrincipal = returnAmountMap.get("returnPrincipal");
|
|
|
|
|
|
// if (returnPrincipal != null && principalPayRecord != null) {
|
|
|
|
|
|
// principalPayRecord.setRefundAmount(returnPrincipal);
|
|
|
|
|
|
// updatePayRecordList.add(principalPayRecord);
|
|
|
|
|
|
// }
|
|
|
|
|
|
BigDecimal returnGift = returnAmountMap.get("returnGift");
|
|
|
|
|
|
|
|
|
|
|
|
System.out.println(returnPrincipal);
|
|
|
|
|
|
// if (returnGift != null && giftPayRecord != null) {
|
|
|
|
|
|
// giftPayRecord.setRefundAmount(returnGift);
|
|
|
|
|
|
// updatePayRecordList.add(giftPayRecord);
|
|
|
|
|
|
// // 支付的赠送金额-退回的赠送金额 = 实际使用赠送金额消费的部分
|
|
|
|
|
|
// virtualAmount = giftPay.subtract(returnGift);
|
|
|
|
|
|
// }
|
|
|
|
|
|
// UpdateMemberBalanceDTO updateMemberBalanceDTO = UpdateMemberBalanceDTO.builder()
|
|
|
|
|
|
// .memberId(orderBasicInfo.getMemberId())
|
|
|
|
|
|
// .type(MemberWalletEnum.TYPE_IN.getValue()) // 进账
|
|
|
|
|
|
// .subType(MemberWalletEnum.SUBTYPE_ORDER_SETTLEMENT_REFUND.getValue()) // 订单结算退款
|
|
|
|
|
|
// .updatePrincipalBalance(returnPrincipal)
|
|
|
|
|
|
// .updateGiftBalance(returnGift)
|
|
|
|
|
|
// .relatedOrderCode(orderBasicInfo.getOrderCode())
|
|
|
|
|
|
// .build();
|
|
|
|
|
|
// memberBasicInfoService.updateMemberBalance(updateMemberBalanceDTO);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testVin() {
|
|
|
|
|
|
String vinCode = "tango";
|
|
|
|
|
|
MemberPlateNumberRelation memberPlateInfoByVinCode = memberPlateNumberRelationService.getMemberPlateInfoByVinCode(vinCode);
|
|
|
|
|
|
System.out.println(memberPlateInfoByVinCode);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testParking() throws UnsupportedEncodingException {
|
|
|
|
|
|
// GetTokenDTO dto = new GetTokenDTO();
|
|
|
|
|
|
// dto.setAppId("I2qa3hdr116100dc");
|
|
|
|
|
|
// dto.setSecretKey("2qa3hdr13754a8e");
|
|
|
|
|
|
// String token = ltytService.getToken(dto);
|
|
|
|
|
|
// System.out.println(token);
|
|
|
|
|
|
|
|
|
|
|
|
BindCouponDTO dto = new BindCouponDTO();
|
|
|
|
|
|
dto.setAppId("I2qa3hdr116100dc");
|
|
|
|
|
|
dto.setSecretKey("2qa3hdr13754a8e");
|
|
|
|
|
|
dto.setMerchantId("3prv98bm8db70a9");
|
|
|
|
|
|
dto.setCouponId("3prvd0q7a4817bf");
|
|
|
|
|
|
dto.setPlateNumber("贵A12345");
|
|
|
|
|
|
dto.setPlateColor(1);
|
|
|
|
|
|
String s = ltytService.bindCoupon(dto);
|
|
|
|
|
|
System.out.println(s);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testUpdateConnectorStatus() {
|
|
|
|
|
|
String pileConnectorCode = "8800000000000101";
|
|
|
|
|
|
String status = PileConnectorStatusEnum.FREE.getValue();
|
|
|
|
|
|
pileConnectorInfoService.updateConnectorStatus(pileConnectorCode, status);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testOrder() throws Exception {
|
|
|
|
|
|
// 通过vin码查询数据库绑定用户信息
|
|
|
|
|
|
MemberPlateNumberRelation plateInfo = memberPlateNumberRelationService.getMemberPlateInfoByVinCode("LNBSCC4H1LT107646");
|
|
|
|
|
|
GenerateOrderDTO dto = new GenerateOrderDTO();
|
|
|
|
|
|
dto.setMemberPlateNumberRelation(plateInfo);
|
|
|
|
|
|
dto.setPileSn("88000000000126");
|
|
|
|
|
|
dto.setConnectorCode("01");
|
|
|
|
|
|
dto.setStartMode(StartModeEnum.VIN_CODE.getValue());
|
|
|
|
|
|
dto.setMemberId(plateInfo.getMemberId());
|
|
|
|
|
|
// 通过memberId获取账户余额
|
|
|
|
|
|
MemberVO memberVO = memberBasicInfoService.queryMemberInfoByMemberId(dto.getMemberId());
|
|
|
|
|
|
if (memberVO == null) {
|
|
|
|
|
|
throw new BusinessException(ReturnCodeEnum.CODE_GET_MEMBER_ACCOUNT_AMOUNT_ERROR);
|
|
|
|
|
|
}
|
|
|
|
|
|
BigDecimal totalAccountAmount = memberVO.getTotalAccountAmount();
|
|
|
|
|
|
if (totalAccountAmount.compareTo(BigDecimal.ZERO) <= 0) {
|
|
|
|
|
|
throw new BusinessException(ReturnCodeEnum.CODE_BALANCE_IS_INSUFFICIENT);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
dto.setChargeAmount(totalAccountAmount); // 充电金额
|
|
|
|
|
|
dto.setPayMode(OrderPayModeEnum.PAYMENT_OF_BALANCE.getValue()); // 1-余额支付
|
|
|
|
|
|
|
|
|
|
|
|
OrderBasicInfo basicInfo = orderBasicInfoService.generateOrder(dto);
|
|
|
|
|
|
|
|
|
|
|
|
// 支付订单
|
|
|
|
|
|
PayOrderDTO payOrderDTO = new PayOrderDTO();
|
|
|
|
|
|
payOrderDTO.setOrderCode(basicInfo.getOrderCode());
|
|
|
|
|
|
payOrderDTO.setPayAmount(totalAccountAmount);
|
|
|
|
|
|
payOrderDTO.setPayMode(dto.getPayMode());
|
|
|
|
|
|
payOrderDTO.setMemberId(dto.getMemberId());
|
|
|
|
|
|
// payOrderDTO.setCode();
|
|
|
|
|
|
// payOrderDTO.setLockValue();
|
|
|
|
|
|
// payOrderDTO.setOrderBasicInfo(basicInfo);
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> map = orderBasicInfoService.payOrder(payOrderDTO);
|
|
|
|
|
|
|
|
|
|
|
|
System.out.println(map);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testTransactionRecord() {
|
|
|
|
|
|
// 获取消息体
|
|
|
|
|
|
String msg = "8823000000123302230707215317078588230000001233020000341507071763023615070717b02a0200a00f0000000000003016000090dc010000000000000000000000000020c50100000000000000000000000000888a0100000000000000000000000000b0220749005032074900a00f000000000000e01500004c4e425343433448314c543130373634360563023615070717450000000000000000";
|
|
|
|
|
|
byte[] msgBody = BytesUtil.str2Bcd(msg);
|
|
|
|
|
|
|
|
|
|
|
|
int startIndex = 0;
|
|
|
|
|
|
int length = 16;
|
|
|
|
|
|
|
|
|
|
|
|
// 交易流水号
|
|
|
|
|
|
byte[] orderCodeByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String transactionCode = BytesUtil.bcd2Str(orderCodeByteArr);
|
|
|
|
|
|
|
|
|
|
|
|
// 桩编码
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
length = 7;
|
|
|
|
|
|
byte[] pileSnByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String pileSn = BytesUtil.bcd2Str(pileSnByteArr);
|
|
|
|
|
|
|
|
|
|
|
|
// 枪号
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
length = 1;
|
|
|
|
|
|
byte[] connectorCodeByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String connectorCode = BytesUtil.bcd2Str(connectorCodeByteArr);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 开始时间 CP56Time2a 格式
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
length = 7;
|
|
|
|
|
|
byte[] startTimeByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
// String binary = BytesUtil.binary(startTimeByteArr, 16);
|
|
|
|
|
|
Date startDate = Cp56Time2aUtil.byte2Hdate(startTimeByteArr);
|
|
|
|
|
|
String startTime = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, startDate);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 结束时间 CP56Time2a 格式
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
byte[] endTimeByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
Date endDate = Cp56Time2aUtil.byte2Hdate(endTimeByteArr);
|
|
|
|
|
|
String endTime = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, endDate);
|
|
|
|
|
|
|
|
|
|
|
|
// 尖单价 精确到小数点后五位(尖电费+尖服务费,见费率帧)
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
length = 4;
|
|
|
|
|
|
byte[] sharpPriceByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String sharpPrice = YKCUtils.convertDecimalPoint(sharpPriceByteArr, 5);
|
|
|
|
|
|
|
|
|
|
|
|
// 尖电量 精确到小数点后四位
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
length = 4;
|
|
|
|
|
|
byte[] sharpUsedElectricityByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String sharpUsedElectricity = YKCUtils.convertDecimalPoint(sharpUsedElectricityByteArr, 4);
|
|
|
|
|
|
|
|
|
|
|
|
// 计损尖电量
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
byte[] sharpPlanLossElectricityByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String sharpPlanLossElectricity = YKCUtils.convertDecimalPoint(sharpPlanLossElectricityByteArr, 4);
|
|
|
|
|
|
|
|
|
|
|
|
// 尖金额
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
byte[] sharpAmountByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String sharpAmount = YKCUtils.convertDecimalPoint(sharpAmountByteArr, 4);
|
|
|
|
|
|
|
|
|
|
|
|
// 峰单价 精确到小数点后五位(峰电费+峰服务费)
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
byte[] peakPriceByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String peakPrice = YKCUtils.convertDecimalPoint(peakPriceByteArr, 5);
|
|
|
|
|
|
|
|
|
|
|
|
// 峰电量
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
byte[] peakUsedElectricityByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String peakUsedElectricity = YKCUtils.convertDecimalPoint(peakUsedElectricityByteArr, 4);
|
|
|
|
|
|
|
|
|
|
|
|
// 计损峰电量
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
byte[] peakPlanLossElectricityByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String peakPlanLossElectricity = YKCUtils.convertDecimalPoint(peakPlanLossElectricityByteArr, 4);
|
|
|
|
|
|
|
|
|
|
|
|
// 峰金额
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
byte[] peakAmountByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String peakAmount = YKCUtils.convertDecimalPoint(peakAmountByteArr, 4);
|
|
|
|
|
|
|
|
|
|
|
|
// 平单价 精确到小数点后五位(平电费+平服务费)
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
byte[] flatPriceByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String flatPrice = YKCUtils.convertDecimalPoint(flatPriceByteArr, 5);
|
|
|
|
|
|
|
|
|
|
|
|
// 平电量
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
byte[] flatUsedElectricityByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String flatUsedElectricity = YKCUtils.convertDecimalPoint(flatUsedElectricityByteArr, 4);
|
|
|
|
|
|
|
|
|
|
|
|
// 计损平电量
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
byte[] flatPlanLossElectricityByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String flatPlanLossElectricity = YKCUtils.convertDecimalPoint(flatPlanLossElectricityByteArr, 4);
|
|
|
|
|
|
|
|
|
|
|
|
// 平金额
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
byte[] flatAmountByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String flatAmount = YKCUtils.convertDecimalPoint(flatAmountByteArr, 4);
|
|
|
|
|
|
|
|
|
|
|
|
// 谷单价 精确到小数点后五位(谷电费+谷 服务费)
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
byte[] valleyPriceByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String valleyPrice = YKCUtils.convertDecimalPoint(valleyPriceByteArr, 5);
|
|
|
|
|
|
|
|
|
|
|
|
// 谷电量
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
byte[] valleyUsedElectricityByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String valleyUsedElectricity = YKCUtils.convertDecimalPoint(valleyUsedElectricityByteArr, 4);
|
|
|
|
|
|
|
|
|
|
|
|
// 计损谷电量
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
byte[] valleyPlanLossElectricityByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String valleyPlanLossElectricity = YKCUtils.convertDecimalPoint(valleyPlanLossElectricityByteArr, 4);
|
|
|
|
|
|
|
|
|
|
|
|
// 谷金额
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
byte[] valleyAmountByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String valleyAmount = YKCUtils.convertDecimalPoint(valleyAmountByteArr, 4);
|
|
|
|
|
|
|
|
|
|
|
|
// 电表总起值
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
length = 5;
|
|
|
|
|
|
byte[] ammeterTotalStartByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String ammeterTotalStart = YKCUtils.convertDecimalPoint(ammeterTotalStartByteArr, 4);
|
|
|
|
|
|
|
|
|
|
|
|
// 电表总止值
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
byte[] ammeterTotalEndByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String ammeterTotalEnd = YKCUtils.convertDecimalPoint(ammeterTotalEndByteArr, 4);
|
|
|
|
|
|
|
|
|
|
|
|
// 总电量
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
length = 4;
|
|
|
|
|
|
byte[] totalElectricityByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String totalElectricity = YKCUtils.convertDecimalPoint(totalElectricityByteArr, 4);
|
|
|
|
|
|
|
|
|
|
|
|
// 计损总电量
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
byte[] planLossTotalElectricityByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String planLossTotalElectricity = YKCUtils.convertDecimalPoint(planLossTotalElectricityByteArr, 4);
|
|
|
|
|
|
|
|
|
|
|
|
// 消费金额 精确到小数点后四位,包含电费、 服务费
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
byte[] consumptionAmountByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String consumptionAmount = YKCUtils.convertDecimalPoint(consumptionAmountByteArr, 4);
|
|
|
|
|
|
|
|
|
|
|
|
// VIN 码 VIN 码,此处 VIN 码和充电时 VIN 码不同, 正序直接上传, 无需补 0 和反序
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
length = 17;
|
|
|
|
|
|
byte[] vinCodeByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String vinCode = BytesUtil.ascii2Str(vinCodeByteArr);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 交易标识
|
|
|
|
|
|
* 0x01: app 启动
|
|
|
|
|
|
* 0x02:卡启动
|
|
|
|
|
|
* 0x04:离线卡启动
|
|
|
|
|
|
* 0x05: vin 码启动充电
|
|
|
|
|
|
*/
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
length = 1;
|
|
|
|
|
|
byte[] transactionIdentifierByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String transactionIdentifier = BytesUtil.bcd2Str(transactionIdentifierByteArr);
|
|
|
|
|
|
|
|
|
|
|
|
// 交易时间 CP56Time2a 格式
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
length = 7;
|
|
|
|
|
|
byte[] transactionTimeByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
Date transactionDate = Cp56Time2aUtil.byte2Hdate(transactionTimeByteArr);
|
|
|
|
|
|
String transactionTime = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, transactionDate);
|
|
|
|
|
|
|
|
|
|
|
|
// 停止原因
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
length = 1;
|
|
|
|
|
|
byte[] stopReasonByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String stopReason = BytesUtil.bin2HexStr(stopReasonByteArr);
|
|
|
|
|
|
String stopReasonMsg = YKCChargingStopReasonEnum.getMsgByCode(Integer.parseInt(stopReason, 16));
|
|
|
|
|
|
|
|
|
|
|
|
// 物理卡号 不足 8 位补 0
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
length = 8;
|
|
|
|
|
|
byte[] cardNumByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
// byte[] logicCardNum = BytesUtil.checkLengthAndBehindAppendZero(cardNumByteArr, 16);
|
|
|
|
|
|
String logicCard = BytesUtil.binary(cardNumByteArr, 16);
|
|
|
|
|
|
// log.info("桩号:{}发送交易记录物理卡号:{}", pileSn, logicCard);
|
|
|
|
|
|
//
|
|
|
|
|
|
// log.info("[===交易记录===]交易流水号:{}, 桩编号:{}, 枪号:{}, 开始时间:{}, 结束时间:{}, 尖单价:{}, 尖电量:{}, 计损尖电量:{}, 尖金额:{}, " +
|
|
|
|
|
|
// "峰单价:{}, 峰电量:{}, 计损峰电量:{}, 峰金额:{}, 平单价:{}, 平电量:{}, 计损平电量:{}, 平金额:{}, " +
|
|
|
|
|
|
// "谷单价:{}, 谷电量:{}, 计损谷电量:{}, 谷金额:{}, 电表总起值:{}, 电表总止值:{}, 总电量:{}, 计损总电量:{}, 消费金额:{}, " +
|
|
|
|
|
|
// "电动汽车唯一标识:{}, 交易标识:{}, 交易日期、时间:{}, 停止原因码:{}, 停止原因描述:{}, 物理卡号:{}",
|
|
|
|
|
|
// transactionCode, pileSn, connectorCode, startTime, endTime, sharpPrice, sharpUsedElectricity, sharpPlanLossElectricity, sharpAmount,
|
|
|
|
|
|
// peakPrice, peakUsedElectricity, peakPlanLossElectricity, peakAmount, flatPrice, flatUsedElectricity, flatPlanLossElectricity, flatAmount,
|
|
|
|
|
|
// valleyPrice, valleyUsedElectricity, valleyPlanLossElectricity, valleyAmount, ammeterTotalStart, ammeterTotalEnd, totalElectricity, planLossTotalElectricity,
|
|
|
|
|
|
// consumptionAmount, vinCode, transactionIdentifier, transactionTime, stopReason, stopReasonMsg, logicCard);
|
|
|
|
|
|
|
|
|
|
|
|
// 交易记录封装到对象里
|
|
|
|
|
|
TransactionRecordsData data = TransactionRecordsData.builder()
|
|
|
|
|
|
// .orderCode(transactionCode)
|
|
|
|
|
|
.transactionCode(transactionCode)
|
|
|
|
|
|
.pileSn(pileSn)
|
|
|
|
|
|
.connectorCode(connectorCode)
|
|
|
|
|
|
.startTime(startTime)
|
|
|
|
|
|
.endTime(endTime)
|
|
|
|
|
|
.sharpPrice(sharpPrice)
|
|
|
|
|
|
.sharpUsedElectricity(sharpUsedElectricity)
|
|
|
|
|
|
.sharpPlanLossElectricity(sharpPlanLossElectricity)
|
|
|
|
|
|
.sharpAmount(sharpAmount)
|
|
|
|
|
|
.peakPrice(peakPrice)
|
|
|
|
|
|
.peakUsedElectricity(peakUsedElectricity)
|
|
|
|
|
|
.peakPlanLossElectricity(peakPlanLossElectricity)
|
|
|
|
|
|
.peakAmount(peakAmount)
|
|
|
|
|
|
.flatPrice(flatPrice)
|
|
|
|
|
|
.flatUsedElectricity(flatUsedElectricity)
|
|
|
|
|
|
.flatPlanLossElectricity(flatPlanLossElectricity)
|
|
|
|
|
|
.flatAmount(flatAmount)
|
|
|
|
|
|
.valleyPrice(valleyPrice)
|
|
|
|
|
|
.valleyUsedElectricity(valleyUsedElectricity)
|
|
|
|
|
|
.valleyPlanLossElectricity(valleyPlanLossElectricity)
|
|
|
|
|
|
.valleyAmount(valleyAmount)
|
|
|
|
|
|
.ammeterTotalStart(ammeterTotalStart)
|
|
|
|
|
|
.ammeterTotalEnd(ammeterTotalEnd)
|
|
|
|
|
|
.totalElectricity(totalElectricity)
|
|
|
|
|
|
.planLossTotalElectricity(planLossTotalElectricity)
|
|
|
|
|
|
.consumptionAmount(consumptionAmount)
|
|
|
|
|
|
.vinCode(vinCode)
|
|
|
|
|
|
.transactionIdentifier(transactionIdentifier)
|
|
|
|
|
|
.transactionTime(transactionTime)
|
|
|
|
|
|
.stopReasonMsg(stopReasonMsg)
|
|
|
|
|
|
.logicCard(logicCard)
|
|
|
|
|
|
.build();
|
|
|
|
|
|
|
|
|
|
|
|
// boolean flag = !StringUtils.equals("0000000000000000", "a511101970000000");
|
|
|
|
|
|
// System.out.println(flag);
|
|
|
|
|
|
|
|
|
|
|
|
// 处理订单加锁
|
|
|
|
|
|
String lockKey = "settle_order_" + transactionCode;
|
|
|
|
|
|
String uuid = IdUtils.fastUUID();
|
|
|
|
|
|
try {
|
|
|
|
|
|
// redis锁
|
|
|
|
|
|
Boolean isLock = redisCache.lock(lockKey, uuid, 1500);
|
|
|
|
|
|
if (isLock) {
|
|
|
|
|
|
// transactionRecordsRequestHandler.processOrder(data);
|
|
|
|
|
|
}
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
System.out.println("处理订单发生异常: " + e);
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
if (uuid.equals(redisCache.getCacheObject(lockKey).toString())) {
|
|
|
|
|
|
redisCache.unLock(lockKey);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testFault() {
|
|
|
|
|
|
StringBuffer sb = new StringBuffer("0100");
|
|
|
|
|
|
String lowOrder = sb.substring(0, 2);
|
|
|
|
|
|
String highOrder = sb.substring(2, 4);
|
|
|
|
|
|
|
|
|
|
|
|
// String hardwareFault = highOrder + lowOrder;
|
|
|
|
|
|
byte[] hardwareFaultByteArr = BytesUtil.str2Bcd(highOrder + lowOrder);
|
|
|
|
|
|
String binStr = BytesUtil.bytes2BinStr(hardwareFaultByteArr);
|
|
|
|
|
|
// log.info("binStr:{}", binStr); // 0000 0000 0000 0001
|
|
|
|
|
|
int faultCode = 0;
|
|
|
|
|
|
for (int i = 0; i < binStr.length(); i++) {
|
|
|
|
|
|
if (binStr.charAt(i) == '1') {
|
|
|
|
|
|
faultCode = 15 - i;
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
String faultReason = YKCPileFaultReasonEnum.getValueByCode(faultCode);
|
|
|
|
|
|
System.out.println(faultReason);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testQueryCorpMember() {
|
|
|
|
|
|
List<AdapayMemberAccount> accountList = adapayMemberAccountService.selectAdapayMemberAccountList(new AdapayMemberAccount());
|
|
|
|
|
|
if (CollectionUtils.isNotEmpty(accountList)) {
|
|
|
|
|
|
Long[] ids = accountList.stream().map(AdapayMemberAccount::getId).toArray(Long[]::new);
|
|
|
|
|
|
adapayMemberAccountService.deleteAdapayMemberAccountByIds(ids);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// try {
|
|
|
|
|
|
// Map<String, Object> map = adapayMemberService.selectAdapayMember("5");
|
|
|
|
|
|
//
|
|
|
|
|
|
// String adapayMemberId = "ACM29562569";
|
|
|
|
|
|
// AdapayCorpMemberVO adapayCorpMemberVO = adapayMemberService.queryCorpAdapayMemberInfo(adapayMemberId);
|
|
|
|
|
|
// System.out.println(adapayCorpMemberVO);
|
|
|
|
|
|
//
|
|
|
|
|
|
//
|
|
|
|
|
|
// } catch (BaseAdaPayException e) {
|
|
|
|
|
|
// throw new RuntimeException(e);
|
|
|
|
|
|
// }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testGetPileListByStationIdList() {
|
|
|
|
|
|
|
|
|
|
|
|
// List<String> stationIdList = Lists.newArrayList("2");
|
|
|
|
|
|
// Map<String, List<AMapEquipmentInfo>> pileListByStationIdList = aMapService.getPileListByStationIdList(stationIdList);
|
|
|
|
|
|
// System.out.println(pileListByStationIdList);
|
|
|
|
|
|
|
|
|
|
|
|
GetStationInfoDTO dto = new GetStationInfoDTO();
|
|
|
|
|
|
dto.setType("page");
|
|
|
|
|
|
aMapService.getStationInfosV2(dto);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testMultiSave() {
|
|
|
|
|
|
String prefix = "test_multi_save:";
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> redisMap = Maps.newHashMap();
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 1000; i++) {
|
|
|
|
|
|
redisMap.put(prefix + i, PileInfoVO.builder().pileSn(i + "").build());
|
|
|
|
|
|
}
|
|
|
|
|
|
redisCache.multiSave(redisMap, 60);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testBillingTemplate() {
|
|
|
|
|
|
pileBillingTemplateService.queryStationBillingTemplateListForUniApp("2");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testQueryAdapayMemberInfo() {
|
|
|
|
|
|
String adapayMemberId = "AM25703321";
|
|
|
|
|
|
String settleAccountId = "0489089447022976";
|
|
|
|
|
|
try {
|
|
|
|
|
|
// adapayMemberService.queryAdapayMemberInfo(adapayMemberId);
|
|
|
|
|
|
|
|
|
|
|
|
adapayService.queryAdapaySettleAccount(adapayMemberId, settleAccountId, "");
|
|
|
|
|
|
} catch (BaseAdaPayException e) {
|
|
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testSaveAdapayCallbackRecord() throws JsonProcessingException {
|
|
|
|
|
|
String data = "{\n" +
|
|
|
|
|
|
" \"object\": \"refund\",\n" +
|
|
|
|
|
|
" \"status\": \"succeeded\",\n" +
|
|
|
|
|
|
" \"prod_mode\": \"true\",\n" +
|
|
|
|
|
|
" \"id\": \"0022120230531111946980509821471137853440\",\n" +
|
|
|
|
|
|
" \"refund_order_no\": \"823725974557265920\",\n" +
|
|
|
|
|
|
" \"payment_id\": \"002212023053110524210509814658135928832\",\n" +
|
|
|
|
|
|
" \"payment_order_no\": \"C27262970851\",\n" +
|
|
|
|
|
|
" \"refund_amt\": \"7.82\",\n" +
|
|
|
|
|
|
" \"fee_amt\": \"0.04\",\n" +
|
|
|
|
|
|
" \"channel_no\": \"2023053121R064uj\",\n" +
|
|
|
|
|
|
" \"created_time\": \"1685503187000\",\n" +
|
|
|
|
|
|
" \"succeed_time\": \"1685503199000\",\n" +
|
|
|
|
|
|
" \"app_id\": \"app_d0c80cb1-ffc8-48cb-a030-fe9bec823aaa\",\n" +
|
|
|
|
|
|
" \"reason\": \"\",\n" +
|
|
|
|
|
|
" \"notify_url\": \"https://api.jsowellcloud.com/uniapp/pay/adapayRefundCallback\"\n" +
|
|
|
|
|
|
"}";
|
|
|
|
|
|
|
|
|
|
|
|
JSONObject jsonObject = JSON.parseObject(data);
|
|
|
|
|
|
ObjectMapper mapper = new ObjectMapper();
|
|
|
|
|
|
mapper.setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE);
|
|
|
|
|
|
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
|
|
|
|
|
AdapayRefundRecord adapayRefundRecord = mapper.readValue(jsonObject.toJSONString(), AdapayRefundRecord.class);
|
|
|
|
|
|
adapayRefundRecord.setRefundId(jsonObject.getString("id"));
|
|
|
|
|
|
// 保存到数据库
|
|
|
|
|
|
adapayRefundRecordService.insertAdapayRefundRecord(adapayRefundRecord);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testQueryCallback() {
|
|
|
|
|
|
AdapayCallbackRecord aaaa = adapayCallbackRecordService.selectByOrderCode("aaaa");
|
|
|
|
|
|
System.out.println(aaaa);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testAdapayRefund() {
|
|
|
|
|
|
// 创建汇付退款对象 在完成初始化设置情况下,调用方法,获取 Refund对象
|
|
|
|
|
|
try {
|
|
|
|
|
|
String id = "002212023052710075810508353847861903360";
|
|
|
|
|
|
String refundAmount = "0.01";
|
|
|
|
|
|
Map<String, Object> refundParams = Maps.newHashMap();
|
|
|
|
|
|
refundParams.put("refund_amt", AdapayUtil.formatAmount(refundAmount));
|
|
|
|
|
|
refundParams.put("refund_order_no", SnowflakeIdWorker.getSnowflakeId());
|
|
|
|
|
|
refundParams.put("notify_url", "https://api.jsowellcloud.com/uniapp/pay/adapayRefundCallback");
|
|
|
|
|
|
Map<String, Object> response = Refund.create(id, refundParams);
|
|
|
|
|
|
System.out.println(JSON.toJSONString(response));
|
|
|
|
|
|
// if (response != null && !response.isEmpty()) {
|
|
|
|
|
|
// JSONObject jsonObject = JSONObject.parseObject(response.get("expend").toString());
|
|
|
|
|
|
// JSONObject pay_info = jsonObject.getJSONObject("pay_info");
|
|
|
|
|
|
// Map<String, Object> resultMap = JSONObject.parseObject(pay_info.toJSONString(), new TypeReference<Map<String, Object>>() {});
|
|
|
|
|
|
// }
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
System.out.println(e);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testSaveCallback() throws JsonProcessingException {
|
|
|
|
|
|
String data = "{\"app_id\":\"app_d0c80cb1-ffc8-48cb-a030-fe9bec823aaa\",\"created_time\":\"20230530132956\",\"description\":\"{\\\"orderCode\\\":\\\"C29505932783\\\",\\\"type\\\":\\\"order\\\"}\",\"end_time\":\"20230530133027\",\"expend\":{\"bank_type\":\"OTHERS\",\"open_id\":\"o8jhot6PJF93EPhNISsXi28dKdS8\",\"sub_open_id\":\"o4REX5MprZfTaLnVNxfdOY-wnwGI\"},\"fee_amt\":\"0.11\",\"id\":\"002212023053013295610509491838664794112\",\"order_no\":\"C29505932783\",\"out_trans_id\":\"4200001855202305308670391485\",\"party_order_id\":\"02212305304859640306711\",\"pay_amt\":\"20.00\",\"pay_channel\":\"wx_lite\",\"real_amt\":\"20.00\",\"share_eq\":\"Y\",\"status\":\"succeeded\",\"wx_user_id\":\"\"}";
|
|
|
|
|
|
JSONObject jsonObject = JSON.parseObject(data);
|
|
|
|
|
|
ObjectMapper mapper = new ObjectMapper();
|
|
|
|
|
|
mapper.setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE);
|
|
|
|
|
|
AdapayCallbackRecord adapayCallbackRecord = mapper.readValue(jsonObject.toJSONString(), AdapayCallbackRecord.class);
|
|
|
|
|
|
adapayCallbackRecord.setExpend(jsonObject.getString("expend"));
|
|
|
|
|
|
adapayCallbackRecord.setPaymentId(jsonObject.getString("id"));
|
|
|
|
|
|
adapayCallbackRecordService.saveAdapayCallbackRecord(adapayCallbackRecord);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testAMap() throws Exception {
|
|
|
|
|
|
String pileConnectorCode = "8800000000012601";
|
|
|
|
|
|
// String s = aMapService.pushChargingDeviceDynamics(pileConnectorCode);
|
|
|
|
|
|
GetStationInfoDTO dto = new GetStationInfoDTO();
|
|
|
|
|
|
dto.setType("page");
|
|
|
|
|
|
aMapService.getStationInfos(dto);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testVinCode() {
|
|
|
|
|
|
String msg = "880000000000210203000000000000000000000000000000000000000000000000004C5257594743454B584D43303437313434";
|
|
|
|
|
|
// 获取消息体
|
|
|
|
|
|
byte[] msgBody = BytesUtil.str2Bcd(msg);
|
|
|
|
|
|
|
|
|
|
|
|
int startIndex = 0;
|
|
|
|
|
|
int length = 7;
|
|
|
|
|
|
|
|
|
|
|
|
// 桩编码
|
|
|
|
|
|
byte[] pileSnByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String pileSn = BytesUtil.binary(pileSnByteArr, 16);
|
|
|
|
|
|
|
|
|
|
|
|
// 保存时间
|
|
|
|
|
|
// saveLastTime(pileSn);
|
|
|
|
|
|
|
|
|
|
|
|
// 枪号
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
length = 1;
|
|
|
|
|
|
byte[] connectorNumByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String connectorCode = BytesUtil.bcd2Str(connectorNumByteArr);
|
|
|
|
|
|
|
|
|
|
|
|
// 启动方式
|
|
|
|
|
|
// 0x01 表示通过刷卡启动充电
|
|
|
|
|
|
// 0x02 表求通过帐号启动充电 (暂不支持)
|
|
|
|
|
|
// 0x03 表示vin码启动充电
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
byte[] startModeByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String startMode = BytesUtil.bcd2Str(startModeByteArr);
|
|
|
|
|
|
|
|
|
|
|
|
// 是否需要密码 0x00 不需要 0x01 需要
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
byte[] needPasswordFlagByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String needPasswordFlag = BytesUtil.bcd2Str(needPasswordFlagByteArr);
|
|
|
|
|
|
|
|
|
|
|
|
// 物理卡号 不足 8 位补 0
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
length = 8;
|
|
|
|
|
|
byte[] cardNumByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String physicsCard = BytesUtil.binary(cardNumByteArr, 16);
|
|
|
|
|
|
|
|
|
|
|
|
// 输入密码 对用户输入的密码进行16 位MD5 加密,采用小写上传
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
length = 16;
|
|
|
|
|
|
byte[] inputPasswordByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
|
|
|
|
|
|
// VIN码
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
length = 17;
|
|
|
|
|
|
byte[] vinCodeByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String vinCode = BytesUtil.ascii2Str(vinCodeByteArr);
|
|
|
|
|
|
System.out.println("桩号:" + pileSn + "申请充电VIN码:" + vinCode);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 刷卡启动充电
|
|
|
|
|
|
*/
|
|
|
|
|
|
String logicCard = "";
|
|
|
|
|
|
byte[] authenticationFlagByteArr = Constants.zeroByteArray; // 鉴权成功标识
|
|
|
|
|
|
byte[] accountBalanceByteArr = Constants.zeroByteArray; // 账户余额
|
|
|
|
|
|
String transactionCode = "";
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
/**
|
|
|
|
|
|
* VIN码启动充电
|
|
|
|
|
|
*/
|
|
|
|
|
|
if (StringUtils.equals("03", startMode)) {
|
|
|
|
|
|
// 通过vin码查询数据库绑定用户信息
|
|
|
|
|
|
MemberPlateNumberRelation plateInfo = memberPlateNumberRelationService.getMemberPlateInfoByVinCode(vinCode);
|
|
|
|
|
|
if (plateInfo == null) {
|
|
|
|
|
|
throw new BusinessException("", "未查到绑定用户信息");
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!StringUtils.equals("1", plateInfo.getVinStatus())) {
|
|
|
|
|
|
// 1- 正常使用
|
|
|
|
|
|
throw new BusinessException("", "vin状态不正确");
|
|
|
|
|
|
}
|
|
|
|
|
|
// vin码生成订单 vin启动充电
|
|
|
|
|
|
GenerateOrderDTO dto = new GenerateOrderDTO();
|
|
|
|
|
|
dto.setMemberPlateNumberRelation(plateInfo);
|
|
|
|
|
|
dto.setPileSn(pileSn);
|
|
|
|
|
|
dto.setConnectorCode(connectorCode);
|
|
|
|
|
|
dto.setStartMode(StartModeEnum.VIN_CODE.getValue());
|
|
|
|
|
|
Map<String, Object> map = orderBasicInfoService.generateOrderByCard(dto);
|
|
|
|
|
|
if (map != null) {
|
|
|
|
|
|
transactionCode = (String) map.get("transactionCode");
|
|
|
|
|
|
accountBalanceByteArr = YKCUtils.getPriceByte(String.valueOf(map.get("accountBalance")), 2);
|
|
|
|
|
|
// 鉴权成功标识 0x00 失败 0x01 成功
|
|
|
|
|
|
authenticationFlagByteArr = Constants.oneByteArray;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
throw new BusinessException("", "生成vin订单失败");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
} catch (BusinessException e) {
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
System.out.println("1");
|
|
|
|
|
|
// log.error("VIN码启动充电鉴权 error:{}, {}", e.getCode(), e.getMessage());
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
System.out.println("2");
|
|
|
|
|
|
transactionCode = "00000000000000000000000000000000";
|
|
|
|
|
|
accountBalanceByteArr = BytesUtil.checkLengthAndBehindAppendZero(accountBalanceByteArr, 8);
|
|
|
|
|
|
authenticationFlagByteArr = Constants.zeroByteArray;
|
|
|
|
|
|
// log.error("VIN码启动充电鉴权 error", e);
|
|
|
|
|
|
}
|
|
|
|
|
|
byte[] serialNumByteArr = BytesUtil.str2Bcd(transactionCode);
|
|
|
|
|
|
|
|
|
|
|
|
byte[] defeatReasonByteArr = Constants.zeroByteArray;
|
|
|
|
|
|
|
|
|
|
|
|
// 不足位数的值补零
|
|
|
|
|
|
// cardNumByteArr = BytesUtil.checkLengthAndBehindAppendZero(cardNumByteArr, 16);
|
|
|
|
|
|
// serialNumByteArr = BytesUtil.checkLengthAndBehindAppendZero(serialNumByteArr, 32);
|
|
|
|
|
|
// pileSnByteArr = BytesUtil.checkLengthAndBehindAppendZero(pileSnByteArr, 14);
|
|
|
|
|
|
// accountBalanceByteArr = BytesUtil.checkLengthAndBehindAppendZero(accountBalanceByteArr, 8);
|
|
|
|
|
|
|
|
|
|
|
|
// 拼装消息体
|
|
|
|
|
|
byte[] msgBodyByteArr = Bytes.concat(serialNumByteArr, pileSnByteArr, connectorNumByteArr, cardNumByteArr, accountBalanceByteArr,
|
|
|
|
|
|
authenticationFlagByteArr, defeatReasonByteArr);
|
|
|
|
|
|
|
|
|
|
|
|
String s = BytesUtil.bin2HexStr(msgBodyByteArr);
|
|
|
|
|
|
System.out.println(s);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testGenerateLianlianToken() throws UnsupportedEncodingException {
|
|
|
|
|
|
String OperatorID = "425010765";
|
|
|
|
|
|
String OperatorSecret = "123123123123aaaa"; // 1234567890abcdef
|
|
|
|
|
|
|
|
|
|
|
|
//请求dataX
|
|
|
|
|
|
Map<String, String> data = new HashMap<>();
|
|
|
|
|
|
data.put("OperatorID", OperatorID);
|
|
|
|
|
|
data.put("OperatorSecret", OperatorSecret);
|
|
|
|
|
|
String dataJson = JSONUtil.toJsonStr(data);
|
|
|
|
|
|
|
|
|
|
|
|
//加密
|
|
|
|
|
|
byte[] encryptText = Cryptos.aesEncrypt(dataJson.getBytes(StandardCharsets.UTF_8),
|
|
|
|
|
|
OperatorSecret.getBytes(), OperatorSecret.getBytes());
|
|
|
|
|
|
String strData = Encodes.encodeBase64(encryptText);
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, String> request = new LinkedHashMap<>();
|
|
|
|
|
|
request.put("OperatorID", OperatorID);
|
|
|
|
|
|
request.put("Data", strData);
|
|
|
|
|
|
request.put("TimeStamp", System.currentTimeMillis() + "");
|
|
|
|
|
|
request.put("Seq", "0001");
|
|
|
|
|
|
|
|
|
|
|
|
//生成签名
|
|
|
|
|
|
String sig = GBSignUtils.sign(request, OperatorSecret);
|
|
|
|
|
|
request.put("Sig", sig);
|
|
|
|
|
|
String tokenRequest = JSONUtil.toJsonStr(request);
|
|
|
|
|
|
|
|
|
|
|
|
CommonParamsDTO dto = JSONObject.parseObject(tokenRequest, CommonParamsDTO.class);
|
|
|
|
|
|
|
|
|
|
|
|
lianLianService.generateToken(dto);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testupdateElecAmount() {
|
|
|
|
|
|
// orderBasicInfoService.updateElecAmount();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testSelectSomeStatusCardInfo() {
|
|
|
|
|
|
PileAuthCard pileAuthCard = pileAuthCardService.selectCardInfoByLogicCard("1111111111111111");
|
|
|
|
|
|
System.out.println(pileAuthCard);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testLianLian() throws UnsupportedEncodingException {
|
|
|
|
|
|
// 获取令牌
|
|
|
|
|
|
// LianLianGetTokenDTO dto = new LianLianGetTokenDTO();
|
|
|
|
|
|
// dto.setOperatorId("MA1JLFUU8");
|
|
|
|
|
|
// dto.setOperatorSecret("Nh62XxlIR5OjAzFj");
|
|
|
|
|
|
// String token = lianLianService.getToken("", "MA1JLFUU8", "fGwLsxW1HdzLw7jp");
|
|
|
|
|
|
// System.out.println("token:" + token);
|
|
|
|
|
|
|
|
|
|
|
|
String operatorId = "425010765";
|
|
|
|
|
|
String operatorSecret = "3DSBTWHVIC6KVCKI";
|
|
|
|
|
|
// 请求data
|
|
|
|
|
|
// Map<String, String> data = new HashMap<>();
|
|
|
|
|
|
// data.put("OperatorID", operatorId);
|
|
|
|
|
|
// data.put("OperatorSecret", operatorSecret);
|
|
|
|
|
|
// String dataJson = JSONUtil.toJsonStr(data);
|
|
|
|
|
|
|
|
|
|
|
|
JSONObject json = new JSONObject();
|
|
|
|
|
|
// json.put("StationIDs", com.google.common.collect.Lists.newArrayList("1", "2"));
|
|
|
|
|
|
json.put("LastQueryTime", "2023-05-29 10:00:00");
|
|
|
|
|
|
json.put("PageNo", 1);
|
|
|
|
|
|
json.put("PageSize", 10);
|
|
|
|
|
|
|
|
|
|
|
|
String dataJson = JSONObject.toJSONString(json);
|
|
|
|
|
|
// 加密
|
|
|
|
|
|
byte[] encryptText = Cryptos.aesEncrypt(dataJson.getBytes(StandardCharsets.UTF_8),
|
|
|
|
|
|
operatorSecret.getBytes(), operatorSecret.getBytes());
|
|
|
|
|
|
String strData = Encodes.encodeBase64(encryptText);
|
|
|
|
|
|
String timeStamp = DateUtils.parseDateToStr(DateUtils.YYYYMMDDHHMMSS, new Date());
|
|
|
|
|
|
Map<String, String> request = new LinkedHashMap<>();
|
|
|
|
|
|
request.put("OperatorID", operatorId);
|
|
|
|
|
|
request.put("Data", strData);
|
|
|
|
|
|
request.put("TimeStamp", timeStamp);
|
|
|
|
|
|
request.put("Seq", "0001");
|
|
|
|
|
|
|
|
|
|
|
|
// 生成签名
|
|
|
|
|
|
String sig = GBSignUtils.sign(request, operatorSecret);
|
|
|
|
|
|
request.put("Sig", sig);
|
|
|
|
|
|
JSONObject jsonObject = new JSONObject(request);
|
|
|
|
|
|
System.out.println(jsonObject);
|
|
|
|
|
|
// CommonParamsDTO dto = new CommonParamsDTO();
|
|
|
|
|
|
// dto.setOperatorID(operatorId);
|
|
|
|
|
|
// dto.setData(strData);
|
|
|
|
|
|
// dto.setTimeStamp(timeStamp);
|
|
|
|
|
|
// dto.setSeq("0001");
|
|
|
|
|
|
// dto.setSig(sig);
|
|
|
|
|
|
// Map<String, String> map = lianLianService.generateToken(dto);
|
|
|
|
|
|
QueryStationInfoDTO dto = new QueryStationInfoDTO();
|
|
|
|
|
|
dto.setOperatorId(operatorId);
|
|
|
|
|
|
Map<String, String> map = lianLianService.query_stations_info(dto);
|
|
|
|
|
|
// String data1 = map.get("Data");
|
|
|
|
|
|
// 解密data
|
|
|
|
|
|
// String data1 = "JudlP17tnYuQc2zwOzmjJAb9hgghIymefG5v3ZzSOlPDh5+bJHIedsYzKMD56tHlmlg6Cb7vG+o6KjMSSpn1fyqBH3UVaEFF7uEc+lOuEc9c1vUzq20vBQ7N3EpDKqVBKjZbOezMsKYaCX7Br8XTsCYT8VCQui/np3cn+phi3VC+0s1coNxBX7xoEDZ7iuPjPoSWL7g3J0uOw2SoGaIdBQG3eTxaZJ5L+vBmuDF0pEXgazTMnuKml1mx1QHkig2F7h/ILT0VEKVXWMmmogYgiBk5ItO0DyzRl+ASb184gOhYGo82GJmWRiXrAXmceCiSNvTGg6aL26imIGKkJNfOx9/9mTqjGvy6kzxvWJ29PBU=";
|
|
|
|
|
|
// byte[] plainText = Cryptos.aesDecrypt(Encodes.decodeBase64(data1),
|
|
|
|
|
|
// operatorSecret.getBytes(), operatorSecret.getBytes());
|
|
|
|
|
|
// String dataStr = new String(plainText, "UTF-8");
|
|
|
|
|
|
// Map<String, String> resultMap = (Map<String, String>) JSON.parse(dataStr);
|
|
|
|
|
|
//
|
|
|
|
|
|
// String token = resultMap.get("AccessToken");
|
|
|
|
|
|
//
|
|
|
|
|
|
// System.out.println("解密后token:" + token);
|
|
|
|
|
|
|
|
|
|
|
|
// LianLianPushStationInfoDTO dto1 = LianLianPushStationInfoDTO.builder()
|
|
|
|
|
|
// .OperatorID("MA1JLFUU8")
|
|
|
|
|
|
// .DataSecret("HVicnbRZbhPdIdpF")
|
|
|
|
|
|
// .DataSecretIV("JNvcjSOn1vhrE11M")
|
|
|
|
|
|
// .SigSecret("53TtFpc4gdVZbF3x")
|
|
|
|
|
|
// // .token(token)
|
|
|
|
|
|
// .stationId(2L)
|
|
|
|
|
|
//
|
|
|
|
|
|
// .build();
|
|
|
|
|
|
// lianLianService.pushStationInfo(dto1);
|
|
|
|
|
|
|
|
|
|
|
|
// 推送订单状态
|
|
|
|
|
|
// lianLianService.pushConnectorStatus("8800000000000101", "1");
|
|
|
|
|
|
|
|
|
|
|
|
// 推送订单信息
|
|
|
|
|
|
// lianLianService.pushOrderInfo("C27680791529");
|
|
|
|
|
|
|
|
|
|
|
|
// 推送启动充电结果
|
|
|
|
|
|
// lianLianService.pushStartChargeResult("C27680791529");
|
|
|
|
|
|
|
|
|
|
|
|
// 推送充电状态
|
|
|
|
|
|
// lianLianService.pushChargeStatus("C27680791529");
|
|
|
|
|
|
|
|
|
|
|
|
// 推送停止充电结果
|
|
|
|
|
|
// lianLianService.pushStopChargeResult("C27680791529");
|
|
|
|
|
|
|
|
|
|
|
|
// 推送充电订单信息
|
|
|
|
|
|
// lianLianService.pushChargeOrderInfo("C27680791529");
|
|
|
|
|
|
|
|
|
|
|
|
// 推送订单结算信息
|
|
|
|
|
|
// lianLianService.pushOrderSettlementInfo("C27680791529");
|
|
|
|
|
|
|
|
|
|
|
|
// 查询订单结算信息
|
|
|
|
|
|
// lianLianService.queryOrderSettlementInfo("C27680791529");
|
|
|
|
|
|
|
|
|
|
|
|
// 推送订单对账结果信息
|
|
|
|
|
|
// lianLianService.pushOrderReconciliationInfo("C27680791529");
|
|
|
|
|
|
|
|
|
|
|
|
// 测试生成、解密令牌
|
|
|
|
|
|
// long ttlMillis = 60 * 60 * 24 * 1000;
|
|
|
|
|
|
// String token = JWTUtils.createToken(operatorId, operatorSecret, ttlMillis);
|
|
|
|
|
|
// System.out.println(JWTUtils.checkThirdPartyToken(token));
|
|
|
|
|
|
|
|
|
|
|
|
JSONObject jsonObject1 = new JSONObject(map);
|
|
|
|
|
|
jsonObject1.put("OperatorID", "425010765");
|
|
|
|
|
|
jsonObject1.put("Data", "Ntu99RpveEOm2VUNq6RpD7OuOPXRbNxMOPmaBl67nkLk0nD/VmhipdSpq/Qfswhe1o55YMT+3Z7e6xe3fiJA3cZcvetxOEUF6sjvKLRq2rU=");
|
|
|
|
|
|
jsonObject1.put("TimeStamp", "20230530090132");
|
|
|
|
|
|
jsonObject1.put("Seq", "0001");
|
|
|
|
|
|
jsonObject1.put("Sig", "1568D2D35B245A0205B33D0EF92E7981");
|
|
|
|
|
|
|
|
|
|
|
|
String jsonString = JSONObject.toJSONString(jsonObject1);
|
|
|
|
|
|
|
|
|
|
|
|
String result = HttpUtils.sendPostContentType("http://localhost:8080/LianLian/v1/query_stations_info", jsonString, "application/json");
|
|
|
|
|
|
JSONObject object = JSONObject.parseObject(result);
|
|
|
|
|
|
String data1 = (String) object.get("data");
|
|
|
|
|
|
// 解密data
|
|
|
|
|
|
byte[] plainText = Cryptos.aesDecrypt(Encodes.decodeBase64(data1),
|
|
|
|
|
|
operatorSecret.getBytes(), operatorSecret.getBytes());
|
|
|
|
|
|
String dataStr = new String(plainText, "UTF-8");
|
|
|
|
|
|
Map<String, String> resultMap = (Map<String, String>) JSON.parse(dataStr);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testRefundForBalance() {
|
|
|
|
|
|
BigDecimal refundAmount = new BigDecimal("2");
|
|
|
|
|
|
// 退款金额 元转分 123
|
|
|
|
|
|
int refundTotalCents = refundAmount.multiply(new BigDecimal(100)).intValue();
|
|
|
|
|
|
|
|
|
|
|
|
// 查询用户充值余额订单 过滤掉已经退款的充值订单 refundableOrder
|
|
|
|
|
|
List<RefundableWxPayOrderData> recordList = Lists.newArrayList();
|
|
|
|
|
|
// recordList.add(RefundableWxPayOrderData.builder().outTradeNo("1").transactionId("1").payerAmount(new BigDecimal("1000")).refundableAmount(new BigDecimal("0")).build());
|
|
|
|
|
|
// recordList.add(RefundableWxPayOrderData.builder().outTradeNo("2").transactionId("2").payerAmount(new BigDecimal("1000")).refundableAmount(new BigDecimal("0")).build());
|
|
|
|
|
|
recordList.add(RefundableWxPayOrderData.builder().outTradeNo("3").transactionId("3").payerAmount(new BigDecimal("500")).refundableAmount(new BigDecimal("300")).build());
|
|
|
|
|
|
|
|
|
|
|
|
// 也许需要多笔支付订单才够退款
|
|
|
|
|
|
List<WechatPayRefundRequest> requestList = com.google.common.collect.Lists.newArrayList();
|
|
|
|
|
|
WechatPayRefundRequest request;
|
|
|
|
|
|
for (RefundableWxPayOrderData record : recordList) {
|
|
|
|
|
|
int refundableTotal = record.getRefundableAmount().intValue(); // 该笔支付订单的可退金额,单位分
|
|
|
|
|
|
int payerTotal = record.getPayerAmount().intValue(); // 该笔支付订单的支付金额,单位分
|
|
|
|
|
|
// 用户申请退款金额-可退金额
|
|
|
|
|
|
refundTotalCents = refundTotalCents - refundableTotal; // 123 - 100
|
|
|
|
|
|
request = new WechatPayRefundRequest();
|
|
|
|
|
|
request.setTransaction_id(record.getTransactionId()); // 微信支付单号
|
|
|
|
|
|
request.setOut_trade_no(record.getOutTradeNo()); // 商户订单号
|
|
|
|
|
|
request.setOut_refund_no(SnowflakeIdWorker.getSnowflakeId()); // 商户退款单号
|
|
|
|
|
|
request.setNotify_url(WeChatPayParameter.refundNotifyUrl); // 回调接口
|
|
|
|
|
|
request.setReason("用户余额退款");
|
|
|
|
|
|
request.setFunds_account("AVAILABLE");
|
|
|
|
|
|
if (refundTotalCents > 0) {
|
|
|
|
|
|
// 如果大于0说明,这笔单退完也不够
|
|
|
|
|
|
WechatPayRefundRequest.Amount amount = new WechatPayRefundRequest.Amount();
|
|
|
|
|
|
amount.setRefund(refundableTotal); // 退款金额
|
|
|
|
|
|
amount.setTotal(payerTotal); // 原订单金额
|
|
|
|
|
|
request.setAmount(amount);
|
|
|
|
|
|
requestList.add(request);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
// 如果小于0,这笔单退一部分
|
|
|
|
|
|
// 生成退款单号
|
|
|
|
|
|
WechatPayRefundRequest.Amount amount = new WechatPayRefundRequest.Amount();
|
|
|
|
|
|
// 部分退
|
|
|
|
|
|
int i = refundableTotal + refundTotalCents;
|
|
|
|
|
|
amount.setRefund(i); // 退款金额
|
|
|
|
|
|
amount.setTotal(payerTotal); // 原订单金额
|
|
|
|
|
|
request.setAmount(amount);
|
|
|
|
|
|
requestList.add(request);
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
System.out.println(requestList);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testCloseStartFailedOrder() {
|
|
|
|
|
|
String startTime = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, DateUtils.addDays(new Date(), -2));
|
|
|
|
|
|
String endTime = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, new Date());
|
|
|
|
|
|
orderBasicInfoService.closeStartFailedOrder(startTime, endTime);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testRedisSaveRealTimeData() {
|
|
|
|
|
|
String pileSn = "88000000000001";
|
|
|
|
|
|
String connectorCode = "01";
|
|
|
|
|
|
String orderCode = "88000000000001012211161342359448";
|
|
|
|
|
|
|
|
|
|
|
|
String pileConnectorCode = pileSn + connectorCode;
|
|
|
|
|
|
String redisKey = CacheConstants.PILE_REAL_TIME_MONITOR_DATA + pileConnectorCode + "_" + orderCode;
|
|
|
|
|
|
|
|
|
|
|
|
// for (int i = 0; i < 10; i++) {
|
|
|
|
|
|
// try {
|
|
|
|
|
|
// Thread.sleep(10000);
|
|
|
|
|
|
// } catch (InterruptedException e) {
|
|
|
|
|
|
// e.printStackTrace();
|
|
|
|
|
|
// }
|
|
|
|
|
|
// Date now = new Date();
|
|
|
|
|
|
// redisCache.hset(redisKey, DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:00", now), i + ":" + DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", now));
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
orderBasicInfoService.getChargingRealTimeData(orderCode);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testuniformMessageSend() {
|
|
|
|
|
|
AppletTemplateMessageSendDTO appletTemplateMessageSendDTO = new AppletTemplateMessageSendDTO();
|
|
|
|
|
|
// String openId = wxAppletRemoteService.getOpenIdByCode("0537u2100jTXsP1Y0Y300j426t47u210");
|
|
|
|
|
|
// System.out.println("openId:" + openId);
|
|
|
|
|
|
|
|
|
|
|
|
appletTemplateMessageSendDTO.setTouser("o4REX5MprZfTaLnVNxfdOY-wnwGI"); // openid
|
|
|
|
|
|
|
|
|
|
|
|
String templateId = "UyBPbADlZfsCj89rh_xvfZGlxTW5J5KURpZtt9CNFrY";
|
|
|
|
|
|
appletTemplateMessageSendDTO.setTemplate_id(templateId);
|
|
|
|
|
|
// appletTemplateMessageSendDTO.setPage("跳转的页面");
|
|
|
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
|
|
|
map.put("amount17", ImmutableMap.of("value", "¥100")); // 结束时间
|
|
|
|
|
|
map.put("time3", ImmutableMap.of("value", "2022-12-30")); // 结束时间
|
|
|
|
|
|
map.put("thing7", ImmutableMap.of("value", "thing7")); // 结束原因
|
|
|
|
|
|
|
|
|
|
|
|
// map.put("thing5", ImmutableMap.of("value", "thing5")); // 结束原因
|
|
|
|
|
|
// map.put("time2", ImmutableMap.of("value", "time2")); // 结束原因
|
|
|
|
|
|
appletTemplateMessageSendDTO.setData(map);
|
|
|
|
|
|
|
|
|
|
|
|
wxAppletRemoteService.uniformMessageSend(appletTemplateMessageSendDTO);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testWeChatRefund() {
|
|
|
|
|
|
ApplyRefundDTO dto = new ApplyRefundDTO();
|
|
|
|
|
|
dto.setRefundType("2");
|
|
|
|
|
|
dto.setMemberId("82100864");
|
|
|
|
|
|
dto.setRefundAmount(new BigDecimal("1.23"));
|
|
|
|
|
|
orderBasicInfoService.weChatRefund(dto);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testSelectBalanceRechargeRecord() {
|
|
|
|
|
|
List<WxpayCallbackRecord> list = wxpayCallbackRecordService.queryBalanceRechargeRecordOfTheLatestYear("82100864");
|
|
|
|
|
|
System.out.println(list);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testSelectOrderBasicInfoList() {
|
|
|
|
|
|
QueryOrderDTO orderBasicInfo = new QueryOrderDTO();
|
|
|
|
|
|
orderBasicInfo.setPileSn("88000000000001");
|
|
|
|
|
|
orderBasicInfo.setOrderStatus(OrderStatusEnum.IN_THE_CHARGING.getValue());
|
|
|
|
|
|
List<OrderListVO> orderListVOS = orderBasicInfoService.selectOrderBasicInfoList(orderBasicInfo);
|
|
|
|
|
|
System.out.println(orderListVOS);
|
|
|
|
|
|
for (OrderListVO orderListVO : orderListVOS) {
|
|
|
|
|
|
if (StringUtils.equals(orderListVO.getOrderStatus(), OrderStatusEnum.IN_THE_CHARGING.getValue())) {
|
|
|
|
|
|
// 修改数据库订单状态
|
|
|
|
|
|
OrderBasicInfo info = OrderBasicInfo.builder()
|
|
|
|
|
|
.id(Long.parseLong(orderListVO.getId()))
|
|
|
|
|
|
.orderStatus(OrderStatusEnum.ABNORMAL.getValue())
|
|
|
|
|
|
.build();
|
|
|
|
|
|
orderBasicInfoService.updateOrderBasicInfo(info);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testWechatRefund() throws JsonProcessingException {
|
|
|
|
|
|
WechatPayRefundRequest request = new WechatPayRefundRequest();
|
|
|
|
|
|
request.setTransaction_id("4200001656202212302746036536"); // 微信支付单号
|
|
|
|
|
|
request.setOut_trade_no("768677222373363712"); // 商户订单号
|
|
|
|
|
|
// 生成退款单号
|
|
|
|
|
|
request.setOut_refund_no(SnowflakeIdWorker.getSnowflakeId()); // 商户退款单号
|
|
|
|
|
|
request.setNotify_url(WeChatPayParameter.refundNotifyUrl); // 回调接口
|
|
|
|
|
|
WechatPayRefundRequest.Amount amount = new WechatPayRefundRequest.Amount();
|
|
|
|
|
|
amount.setRefund(10 * 100); // 退款金额
|
|
|
|
|
|
amount.setTotal(10 * 100); // 原订单金额
|
|
|
|
|
|
request.setAmount(amount);
|
|
|
|
|
|
request.setReason("结算退款");
|
|
|
|
|
|
request.setFunds_account("AVAILABLE");
|
|
|
|
|
|
|
|
|
|
|
|
wechatPayService.ApplyForWechatPayRefundV3(request);
|
|
|
|
|
|
|
|
|
|
|
|
// 退款方法
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testUpdatePileSimInfo() {
|
|
|
|
|
|
String pileSn = "88000000000001";
|
|
|
|
|
|
String iccid = "89860402102091089943";
|
|
|
|
|
|
pileBasicInfoService.updatePileSimInfo(pileSn, iccid);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testPay() {
|
|
|
|
|
|
String code = "081zIoGa11GamE0iVVIa1aaJ4G0zIoGE";
|
|
|
|
|
|
String openId = memberService.getOpenIdByCode(code);
|
|
|
|
|
|
Map<String, Object> pay = null;
|
|
|
|
|
|
try {
|
|
|
|
|
|
WeixinPayDTO dto = new WeixinPayDTO();
|
|
|
|
|
|
dto.setOpenId(openId);
|
|
|
|
|
|
dto.setAmount("0.01");
|
|
|
|
|
|
pay = orderService.weixinPayV3(dto);
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
}
|
|
|
|
|
|
System.out.println(JSONObject.toJSONString(pay));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testMemberRegisterAndLogin() throws BaseAdaPayException {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testMemberBasicInfoMapper() {
|
|
|
|
|
|
// String memberId = "21772870";
|
|
|
|
|
|
// BigDecimal principalBalance = new BigDecimal("-10");
|
|
|
|
|
|
// BigDecimal giftBalance = new BigDecimal("-110");
|
|
|
|
|
|
// Integer version = 2;
|
|
|
|
|
|
// int i = memberBasicInfoMapper.updateMemberBalance(memberId, principalBalance, giftBalance, version);
|
|
|
|
|
|
// if (i == 1) {
|
|
|
|
|
|
// System.out.println("更新余额成功");
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
// System.out.println("更新余额失败");
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> refundParams = new HashMap<>(2);
|
|
|
|
|
|
refundParams.put("payment_id", "002212023071011321210524320114191904768");
|
|
|
|
|
|
// refundParams.put("refund_id", refund_id);
|
|
|
|
|
|
// refundParams.put("refund_order_no", refund_order_no);
|
|
|
|
|
|
try {
|
|
|
|
|
|
Map<String, Object> refund = Refund.query(refundParams);
|
|
|
|
|
|
System.out.println(refund);
|
|
|
|
|
|
} catch (BaseAdaPayException e) {
|
|
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testGenerateBillingTemplateMsgBody() {
|
|
|
|
|
|
String pileSn = "88000000000001";
|
|
|
|
|
|
// 根据桩号查询计费模板
|
|
|
|
|
|
BillingTemplateVO billingTemplateVO = pileBillingTemplateService.selectBillingTemplateDetailByPileSn(pileSn);
|
|
|
|
|
|
|
|
|
|
|
|
byte[] messageBody = pileBillingTemplateService.generateBillingTemplateMsgBody(pileSn, billingTemplateVO);
|
|
|
|
|
|
System.out.println(BytesUtil.binary(messageBody, 16));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testAnalysisPileParameter() {
|
|
|
|
|
|
BasicPileDTO dto = new BasicPileDTO();
|
|
|
|
|
|
// 3个都不传的情况
|
|
|
|
|
|
try {
|
|
|
|
|
|
System.out.println("3个都不传的情况");
|
|
|
|
|
|
dto.setPileSn("");
|
|
|
|
|
|
dto.setConnectorCode("");
|
|
|
|
|
|
dto.setPileConnectorCode("");
|
|
|
|
|
|
// orderService.analysisPileParameter(dto);
|
|
|
|
|
|
System.out.println("数据正确");
|
|
|
|
|
|
} catch (BusinessException e) {
|
|
|
|
|
|
System.out.println(e.getMessage());
|
|
|
|
|
|
}
|
|
|
|
|
|
System.out.println();
|
|
|
|
|
|
|
|
|
|
|
|
// 只传sn的情况
|
|
|
|
|
|
try {
|
|
|
|
|
|
System.out.println("只传sn的情况");
|
|
|
|
|
|
dto.setConnectorCode("");
|
|
|
|
|
|
dto.setPileConnectorCode("");
|
|
|
|
|
|
dto.setPileSn("88000000000001");
|
|
|
|
|
|
// orderService.analysisPileParameter(dto);
|
|
|
|
|
|
System.out.println("数据正确");
|
|
|
|
|
|
} catch (BusinessException e) {
|
|
|
|
|
|
System.out.println(e.getMessage());
|
|
|
|
|
|
}
|
|
|
|
|
|
System.out.println();
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
try {
|
|
|
|
|
|
System.out.println("只穿枪口号的情况");
|
|
|
|
|
|
dto.setConnectorCode("01");
|
|
|
|
|
|
dto.setPileConnectorCode("");
|
|
|
|
|
|
dto.setPileSn("");
|
|
|
|
|
|
// orderService.analysisPileParameter(dto);
|
|
|
|
|
|
System.out.println("数据正确");
|
|
|
|
|
|
} catch (BusinessException e) {
|
|
|
|
|
|
System.out.println(e.getMessage());
|
|
|
|
|
|
}
|
|
|
|
|
|
System.out.println();
|
|
|
|
|
|
|
|
|
|
|
|
// 只传充电桩枪口编号的情况
|
|
|
|
|
|
try {
|
|
|
|
|
|
System.out.println("只传充电桩枪口编号的情况");
|
|
|
|
|
|
dto.setPileConnectorCode("8800000000000101");
|
|
|
|
|
|
dto.setConnectorCode("");
|
|
|
|
|
|
dto.setPileSn("");
|
|
|
|
|
|
// orderService.analysisPileParameter(dto);
|
|
|
|
|
|
System.out.println("数据正确");
|
|
|
|
|
|
} catch (BusinessException e) {
|
|
|
|
|
|
System.out.println(e.getMessage());
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
System.out.println();
|
|
|
|
|
|
System.out.println("传充电桩枪sn+枪口号的情况");
|
|
|
|
|
|
dto.setPileConnectorCode("");
|
|
|
|
|
|
dto.setConnectorCode("01");
|
|
|
|
|
|
dto.setPileSn("88000000000001");
|
|
|
|
|
|
// orderService.analysisPileParameter(dto);
|
|
|
|
|
|
System.out.println("数据正确");
|
|
|
|
|
|
} catch (BusinessException e) {
|
|
|
|
|
|
System.out.println(e.getMessage());
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testImportBillingTemplate() {
|
|
|
|
|
|
ImportBillingTemplateDTO dto = new ImportBillingTemplateDTO();
|
|
|
|
|
|
dto.setBillingTemplateId("1");
|
|
|
|
|
|
// 查询公共计费模板是否存在
|
|
|
|
|
|
PileBillingTemplate pileBillingTemplate = pileBillingTemplateMapper.selectPileBillingTemplateById(Long.valueOf(dto.getBillingTemplateId()));
|
|
|
|
|
|
if (pileBillingTemplate == null) {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
List<PileBillingDetail> billingDetailList = pileBillingTemplate.getPileBillingDetailList();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testProcess() {
|
|
|
|
|
|
// 62 68
|
|
|
|
|
|
String msgString = "680da300000388000000000001010020d06840a40000130000000000000000000000000000000088000000000001010202000000000000000000000000000000000000000000000000000000000000000000001516";
|
|
|
|
|
|
byte[] msg = BytesUtil.str2Bcd(msgString);
|
|
|
|
|
|
boolean b = YKCUtils.checkMsg(msg);
|
|
|
|
|
|
// ykcBusinessService.process(msg, null);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testHeartbeat() {
|
|
|
|
|
|
// heartbeatRequestHandler.updateStatus("88000000000001", "01", "0");
|
|
|
|
|
|
|
|
|
|
|
|
// heartbeatRequestHandler.updateStatus("88000000000001", "02", "0");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testPush() {
|
|
|
|
|
|
byte[] msg = new byte[]{};
|
|
|
|
|
|
String pileSn = "88000000000001";
|
|
|
|
|
|
// ykcPushBusinessService.push(msg, pileSn, YKCFrameTypeCode.READ_REAL_TIME_MONITOR_DATA_CODE);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void TestMapUtils() {
|
|
|
|
|
|
String address = "淀山湖镇黄浦江南路278号";
|
|
|
|
|
|
String areaCode = "320000,320500,320583";
|
|
|
|
|
|
Map<String, String> longitudeAndLatitude = AddressUtils.getLongitudeAndLatitude(areaCode, address);
|
|
|
|
|
|
System.out.println(longitudeAndLatitude);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testCreatePile() {
|
|
|
|
|
|
BatchCreatePileDTO dto = BatchCreatePileDTO.builder()
|
|
|
|
|
|
.merchantId("1")
|
|
|
|
|
|
.stationId("1")
|
|
|
|
|
|
.softwareProtocol("1")
|
|
|
|
|
|
// .connectorNum(1)
|
|
|
|
|
|
// .num(10)
|
|
|
|
|
|
// .productionDate(new Date())
|
|
|
|
|
|
.build();
|
|
|
|
|
|
pileService.batchCreatePile(dto);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testGetIncre() {
|
|
|
|
|
|
StopWatch stopWatch = new StopWatch();
|
|
|
|
|
|
|
|
|
|
|
|
// 生成100个
|
|
|
|
|
|
stopWatch.start("生成100个sn号");
|
|
|
|
|
|
List<String> list2 = snUtils.generateSN(1);
|
|
|
|
|
|
stopWatch.stop();
|
|
|
|
|
|
System.out.println(list2);
|
|
|
|
|
|
|
|
|
|
|
|
System.out.println(stopWatch.getLastTaskTimeMillis());
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testDict() {
|
|
|
|
|
|
// String dictValue = DictUtils.getDictValue("query_pile_info", "url");
|
|
|
|
|
|
// String station_type = DictUtils.getDictLabel("station_type", "1");
|
|
|
|
|
|
// System.out.println(station_type);
|
|
|
|
|
|
// System.out.println("123");
|
|
|
|
|
|
|
|
|
|
|
|
List<SysDictData> adapay_station = DictUtils.getDictCache("adapay_station");
|
|
|
|
|
|
List<String> stationIdList = com.google.common.collect.Lists.newArrayList();
|
|
|
|
|
|
if (CollectionUtils.isNotEmpty(adapay_station)) {
|
|
|
|
|
|
for (SysDictData sysDictData : adapay_station) {
|
|
|
|
|
|
stationIdList.add(sysDictData.getDictValue());
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
System.out.println(stationIdList);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testSelectByMerchantId() {
|
|
|
|
|
|
List<PileStationInfo> list = pileStationInfoService.selectStationListByMerchantId(Long.valueOf(Constants.ONE));
|
|
|
|
|
|
System.out.println(list);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testStr2Bcd() {
|
|
|
|
|
|
String logicCardNum = "00000000";
|
|
|
|
|
|
byte[] logicCardNumByteArr = BytesUtil.str2Bcd(logicCardNum);
|
|
|
|
|
|
System.out.println(Arrays.toString(logicCardNumByteArr));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testBigDecimalMultiply() {
|
|
|
|
|
|
BigDecimal a = new BigDecimal("216.5");
|
|
|
|
|
|
BigDecimal b = new BigDecimal("11.5");
|
|
|
|
|
|
|
|
|
|
|
|
BigDecimal result = a.multiply(b).setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
|
|
|
System.out.println(result);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testRemoteUpdate() {
|
|
|
|
|
|
ArrayList<String> list = new ArrayList<>();
|
|
|
|
|
|
list.add("88000000000001");
|
|
|
|
|
|
// pileRemoteService.updateFirmware(list);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testGetUserPhoneNum() {
|
|
|
|
|
|
String code = "0e5394cfa4eb41c6181ed257f2368a86dfe4ebdac0a4fac85df63657637e6cc3";
|
|
|
|
|
|
wxAppletRemoteService.getMobileNumberByCode(code);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testDistance() {
|
|
|
|
|
|
QueryStationDTO dto = new QueryStationDTO();
|
|
|
|
|
|
dto.setStationLat("123.2222");
|
|
|
|
|
|
dto.setStationLng("55.6232");
|
|
|
|
|
|
|
|
|
|
|
|
// pileStationInfoService.uniAppQueryStationInfos(dto);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 生成英文字母随机数 RandomStringUtils.randomAlphabetic(10);
|
|
|
|
|
|
* 生成数字随机数 RandomStringUtils.randomNumeric(10);
|
|
|
|
|
|
* 字母+数字结合 RandomStringUtils.randomAlphanumeric(10);
|
|
|
|
|
|
*/
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void Test() throws ParseException {
|
2023-03-04 16:29:55 +08:00
|
|
|
|
/*String s = RandomStringUtils.randomAlphanumeric(32);
|
|
|
|
|
|
System.out.println(s); // PuLe4Tyyg1jSFNPhF5d2Ts9ejRn6E8KQ
|
|
|
|
|
|
String str = "JS160829";
|
|
|
|
|
|
System.out.println(Md5Utils.hash(str).toUpperCase(Locale.ROOT));
|
|
|
|
|
|
*/
|
2023-08-30 11:02:18 +08:00
|
|
|
|
String s = RandomStringUtils.randomAlphanumeric(43).toUpperCase(Locale.ROOT);
|
|
|
|
|
|
System.out.println(s);
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
Date startTimeDate = sdf.parse("2022-11-26 10:44:11");
|
|
|
|
|
|
Date endTimeDate = sdf.parse("2022-11-27 12:45:11");
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
System.out.println(DateUtils.getDatePoor(endTimeDate, startTimeDate)); // 1天2小时1分钟
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*String stra = "sp_mchid=1632405339&sub_mchid=1632405339&out_trade_no=1217752501201407033233368318&sp_appid=wxbb3e0d474569481d&sub_appid=wxbb3e0d474569481d" +
|
|
|
|
|
|
"bbac689f4654b209de4d6944808ec80b";
|
|
|
|
|
|
System.out.println(Md5Utils.hash(stra).toUpperCase(Locale.ROOT));*/
|
2023-08-30 11:02:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testSimCard() throws ParseException {
|
|
|
|
|
|
ArrayList<String> list = Lists.newArrayList();
|
|
|
|
|
|
Collections.addAll(list, "898607B9102090253556", "898607B9102090253560");
|
|
|
|
|
|
// String s = list.toString().replaceAll("(?:\\[|null|\\]| +)", "");
|
|
|
|
|
|
// System.out.println(s);
|
|
|
|
|
|
// List<SimCardVO> simCardVOList = simCardService.selectSimCardInfoByIccId(list);
|
|
|
|
|
|
// System.out.println(simCardVOList.toString());
|
|
|
|
|
|
|
|
|
|
|
|
// simCardService.XunZhongSimRenewal(list, 12);
|
|
|
|
|
|
// System.out.println(s);
|
|
|
|
|
|
|
|
|
|
|
|
// SimCardVO simCardVO = simCardService.searchByLoop("898607B9102090253556");
|
|
|
|
|
|
//
|
|
|
|
|
|
// System.out.println(simCardVO.toString());
|
|
|
|
|
|
|
|
|
|
|
|
simCardService.WuLianSimRenew(list, 1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testRefund() {
|
|
|
|
|
|
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode("88000000000001012212171045412218");
|
|
|
|
|
|
orderInfo.setReason("充电异常中止,急停开入");
|
|
|
|
|
|
|
|
|
|
|
|
TransactionRecordsData data = TransactionRecordsData.builder()
|
|
|
|
|
|
.transactionCode("88000000000001012212171045412218")
|
|
|
|
|
|
.consumptionAmount(String.valueOf(0.00))
|
|
|
|
|
|
.stopReasonMsg(orderInfo.getReason())
|
|
|
|
|
|
.totalElectricity("0")
|
|
|
|
|
|
.sharpUsedElectricity("0")
|
|
|
|
|
|
.peakUsedElectricity("0")
|
|
|
|
|
|
.flatUsedElectricity("0")
|
|
|
|
|
|
.valleyUsedElectricity("0")
|
|
|
|
|
|
.build();
|
|
|
|
|
|
|
2023-09-01 15:45:04 +08:00
|
|
|
|
// orderBasicInfoService.settleOrder(data, orderInfo);
|
2023-08-30 11:02:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testLoginHandler() {
|
|
|
|
|
|
String msg = "8800000000001001010f63362d333000000000898604b319227036282200";
|
|
|
|
|
|
byte[] msgBody = BytesUtil.str2Bcd(msg);
|
|
|
|
|
|
|
|
|
|
|
|
int startIndex = 0;
|
|
|
|
|
|
int length = 7;
|
|
|
|
|
|
|
|
|
|
|
|
// 桩编码
|
|
|
|
|
|
byte[] pileSnByte = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String pileSn = BytesUtil.binary(pileSnByte, 16);
|
|
|
|
|
|
// log.info("桩号:{}", pileSn);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 桩类型 0 表示直流桩, 1 表示交流桩
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
length = 1;
|
|
|
|
|
|
byte[] pileTypeByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String pileType = BytesUtil.bcd2Str(pileTypeByteArr);
|
|
|
|
|
|
|
|
|
|
|
|
// 充电枪数量
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
byte[] connectorNumByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String connectorNum = BytesUtil.bcd2Str(connectorNumByteArr);
|
|
|
|
|
|
|
|
|
|
|
|
// 通信协议版本 版本号乘 10,v1.0 表示 0x0A
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
byte[] communicationVersionByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
// int i = Integer.parseInt(BytesUtil.bcd2Str(communicationVersionByteArr)); // 0F --> 15
|
|
|
|
|
|
BigDecimal bigDecimal = new BigDecimal(BytesUtil.bcd2Str(communicationVersionByteArr));
|
|
|
|
|
|
BigDecimal communicationVersionTemp = bigDecimal.divide(new BigDecimal(10));
|
|
|
|
|
|
String communicationVersion = "v" + communicationVersionTemp;
|
|
|
|
|
|
|
|
|
|
|
|
// 程序版本
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
length = 8;
|
|
|
|
|
|
byte[] programVersionByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String programVersion = BytesUtil.bcd2Str(programVersionByteArr);
|
|
|
|
|
|
|
|
|
|
|
|
// 网络连接类型 0x00 SIM 卡 0x01 LAN 0x02 WAN 0x03 其他
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
length = 1;
|
|
|
|
|
|
byte[] internetConnectionTypeByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String internetConnection = BytesUtil.bcd2Str(internetConnectionTypeByteArr);
|
|
|
|
|
|
|
|
|
|
|
|
// sim卡
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
length = 10;
|
|
|
|
|
|
byte[] simCardNumByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String iccid = BytesUtil.bin2HexStr(simCardNumByteArr);
|
|
|
|
|
|
|
|
|
|
|
|
// 运营商 0x00 移动 0x02 电信 0x03 联通 0x04 其他
|
|
|
|
|
|
startIndex += length;
|
|
|
|
|
|
length = 1;
|
|
|
|
|
|
byte[] businessTypeByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
|
|
|
|
|
String business = BytesUtil.bcd2Str(businessTypeByteArr);
|
|
|
|
|
|
|
|
|
|
|
|
LoginRequestData loginRequestData = LoginRequestData.builder()
|
|
|
|
|
|
.pileSn(pileSn)
|
|
|
|
|
|
.pileType(pileType)
|
|
|
|
|
|
.connectorNum(connectorNum)
|
|
|
|
|
|
.communicationVersion(communicationVersion)
|
|
|
|
|
|
.programVersion(programVersion)
|
|
|
|
|
|
.internetConnection(internetConnection)
|
|
|
|
|
|
.iccid(iccid)
|
|
|
|
|
|
.business(business)
|
|
|
|
|
|
.build();
|
|
|
|
|
|
|
|
|
|
|
|
// 结果(默认 0x01:登录失败)
|
|
|
|
|
|
byte[] flag = Constants.oneByteArray;
|
|
|
|
|
|
|
|
|
|
|
|
// 通过桩编码SN查询数据库,如果有数据,则登录成功,否则登录失败
|
|
|
|
|
|
QueryPileDTO dto = new QueryPileDTO();
|
|
|
|
|
|
dto.setPileSn(pileSn);
|
|
|
|
|
|
List<PileDetailVO> list = pileBasicInfoService.queryPileInfos(dto);
|
|
|
|
|
|
if (CollectionUtils.isNotEmpty(list)) {
|
|
|
|
|
|
flag = Constants.zeroByteArray;
|
|
|
|
|
|
// 登录成功,保存桩号和channel的关系
|
|
|
|
|
|
|
|
|
|
|
|
// PileChannelEntity.put(pileSn, channel);
|
|
|
|
|
|
// 更改桩和该桩下的枪口状态分别为 在线、空闲
|
|
|
|
|
|
// pileBasicInfoService.updatePileStatus(pileSn, PileStatusEnum.ON_LINE.getValue());
|
|
|
|
|
|
// pileConnectorInfoService.updateConnectorStatusByPileSn(pileSn, PileConnectorDataBaseStatusEnum.FREE.getValue());
|
|
|
|
|
|
|
|
|
|
|
|
// 对时
|
|
|
|
|
|
ProofreadTimeCommand command = ProofreadTimeCommand.builder().pileSn(pileSn).build();
|
|
|
|
|
|
ykcPushCommandService.pushProofreadTimeCommand(command);
|
|
|
|
|
|
|
|
|
|
|
|
// 公共方法修改状态
|
|
|
|
|
|
pileBasicInfoService.updateStatus(BytesUtil.bcd2Str(new byte[]{0x01}), pileSn, null, null, null);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 下发二维码
|
|
|
|
|
|
IssueQRCodeCommand issueQRCodeCommand = IssueQRCodeCommand.builder().pileSn(pileSn).build();
|
|
|
|
|
|
ykcPushCommandService.pushIssueQRCodeCommand(issueQRCodeCommand);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 充电桩使用的sim卡,把信息存库
|
|
|
|
|
|
if (StringUtils.equals("00", internetConnection)) {
|
|
|
|
|
|
try {
|
|
|
|
|
|
pileBasicInfoService.updatePileSimInfo(pileSn, iccid);
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
// log.error("更新充电桩sim卡信息失败", e);
|
|
|
|
|
|
System.out.println(e.getMessage());
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 保存报文
|
|
|
|
|
|
String jsonMsg = JSONObject.toJSONString(loginRequestData);
|
|
|
|
|
|
// pileMsgRecordService.save(pileSn, pileSn, type, jsonMsg, ykcDataProtocol.getHEXString());
|
|
|
|
|
|
|
|
|
|
|
|
// // 消息体
|
|
|
|
|
|
// byte[] messageBody = Bytes.concat(pileSnByte, flag);
|
|
|
|
|
|
// return getResult(ykcDataProtocol, messageBody);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void testGetMemberToken() {
|
|
|
|
|
|
String memberId = JWTUtils.getMemberId("eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2NzY1MTY5MzgsImV4cCI6MTY3OTEwODkzOH0.4MwhZIOpnCfQloR7zEm2hwPOh2yyI2qxbBbTcv_SnZ4");
|
|
|
|
|
|
System.out.println(memberId);
|
|
|
|
|
|
}
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
|
|
|
|
|
}
|