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-10-08 16:42:56 +08:00
|
|
|
|
import com.huifu.adapay.model.PaymentReverse;
|
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-11-03 16:07:28 +08:00
|
|
|
|
import com.jsowell.adapay.common.AdaPayment;
|
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;
|
2024-01-03 17:07:01 +08:00
|
|
|
|
import com.jsowell.adapay.dto.QueryConfirmReverseDTO;
|
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-09-28 16:48:24 +08:00
|
|
|
|
import com.jsowell.adapay.operation.PaymentReverseOperation;
|
2024-01-03 17:07:01 +08:00
|
|
|
|
import com.jsowell.adapay.response.*;
|
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-12-20 16:17:34 +08:00
|
|
|
|
import com.jsowell.netty.service.camera.impl.CameraBusinessServiceImpl;
|
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-12-07 11:01:45 +08:00
|
|
|
|
import com.jsowell.pile.service.programlogic.AbstractProgramLogic;
|
|
|
|
|
|
import com.jsowell.pile.service.programlogic.ProgramLogicFactory;
|
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-11-21 14:57:58 +08:00
|
|
|
|
import com.jsowell.pile.vo.base.MemberWalletVO;
|
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-10-24 13:14:33 +08:00
|
|
|
|
import com.jsowell.service.TempService;
|
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-12-01 13:29:35 +08:00
|
|
|
|
import java.util.stream.Collectors;
|
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-10-31 15:17:39 +08:00
|
|
|
|
String wechatAppId1 = "wxbb3e0d474569481d"; // 万车充
|
|
|
|
|
|
|
|
|
|
|
|
String wechatAppId2 = "wx20abc5210391649c"; // 嘉佳充电
|
|
|
|
|
|
|
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
|
2023-11-29 11:55:33 +08:00
|
|
|
|
private AdapayMemberAccountService 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
|
2023-12-01 13:29:35 +08:00
|
|
|
|
private PileAuthCardService 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 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-12-20 16:17:34 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private CameraBusinessServiceImpl cameraBusinessServiceImpl;
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
2023-10-24 13:14:33 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private TempService tempService;
|
|
|
|
|
|
|
2023-11-21 14:57:58 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private MemberWalletInfoService memberWalletInfoService;
|
|
|
|
|
|
|
2023-12-27 16:27:14 +08:00
|
|
|
|
@Test
|
|
|
|
|
|
public void queryPaymentRefundTest() {
|
|
|
|
|
|
String paymentId = "002212023122615542010585629628950949888";
|
|
|
|
|
|
try {
|
|
|
|
|
|
adapayService.queryPaymentRefund(paymentId, wechatAppId2);
|
|
|
|
|
|
} catch (BaseAdaPayException e) {
|
|
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-11-21 14:57:58 +08:00
|
|
|
|
@Test
|
|
|
|
|
|
public void selectByMemberWalletListTest() {
|
|
|
|
|
|
String memberId = "12345678";
|
|
|
|
|
|
List<MemberWalletVO> memberWalletVOS = memberWalletInfoService.selectByMemberWalletList(memberId);
|
|
|
|
|
|
System.out.println(JSON.toJSONString(memberWalletVOS));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-12-20 16:17:34 +08:00
|
|
|
|
@Test
|
|
|
|
|
|
public void testMqttSendMsg() throws InterruptedException {
|
|
|
|
|
|
String channelId = "94dd42b6";
|
|
|
|
|
|
String topic = "/GroundlockStatus";
|
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
|
|
jsonObject.put("sign","F4213AD90EBC72C678E03450E4E091EE");
|
|
|
|
|
|
jsonObject.put("sn","e27f089d-5fadf6c6");
|
|
|
|
|
|
jsonObject.put("timestamp","2021-07-01 12:00:01");
|
|
|
|
|
|
jsonObject.put("msg_id","GS2021070112000101");
|
|
|
|
|
|
jsonObject.put("msg_type","GroundlockStatus");
|
|
|
|
|
|
jsonObject.put("msg_data",null);
|
|
|
|
|
|
|
|
|
|
|
|
// ChannelFuture future = cameraBusinessServiceImpl.sendMsg(channelId, topic, jsonObject.toJSONString());
|
|
|
|
|
|
// System.out.println(future.toString());
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-11-03 16:07:28 +08:00
|
|
|
|
@Test
|
|
|
|
|
|
public void queryPaymentByOrderNoTest() {
|
|
|
|
|
|
String orderNo = "C44903356969";
|
2023-11-03 16:43:33 +08:00
|
|
|
|
String wechatAppId = "wxbb3e0d474569481d";
|
2023-11-03 16:07:28 +08:00
|
|
|
|
try {
|
2023-11-03 16:43:33 +08:00
|
|
|
|
List<AdaPayment> adaPayments = adapayService.queryPaymentByOrderNo(orderNo, wechatAppId);
|
2023-11-03 16:07:28 +08:00
|
|
|
|
System.out.println(JSON.toJSONString(adaPayments));
|
|
|
|
|
|
} catch (BaseAdaPayException e) {
|
|
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-10-24 13:14:33 +08:00
|
|
|
|
@Test
|
|
|
|
|
|
public void checkPaymentTest() {
|
|
|
|
|
|
QueryOrderDTO dto = new QueryOrderDTO();
|
2023-10-26 16:54:50 +08:00
|
|
|
|
String startTime = "2023-09-01 00:00:00";
|
|
|
|
|
|
String endTime = "2023-09-30 23:59:59";
|
2023-10-24 14:49:49 +08:00
|
|
|
|
dto.setStartTime(startTime);
|
|
|
|
|
|
dto.setEndTime(endTime);
|
2023-10-24 13:14:33 +08:00
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
tempService.checkPayment(dto);
|
|
|
|
|
|
} catch (BaseAdaPayException e) {
|
|
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-10-13 14:57:28 +08:00
|
|
|
|
@Test
|
|
|
|
|
|
public void toStringTest() {
|
|
|
|
|
|
String jsonString = "{\"business\":\"00\",\"communicationVersion\":\"v1.5\",\"connectorNum\":\"01\",\"iccid\":\"89860620180085681816\",\"internetConnection\":\"00\",\"pileSn\":\"88230000000259\",\"pileType\":\"01\",\"programVersion\":\"gyk-V29\\u0000\"}";
|
|
|
|
|
|
LoginRequestData loginRequestData = JSONObject.parseObject(jsonString, LoginRequestData.class);
|
|
|
|
|
|
System.out.println(loginRequestData.toString());
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 单元测试,测试订单流程
|
|
|
|
|
|
*/
|
|
|
|
|
|
@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-12-07 11:01:45 +08:00
|
|
|
|
AbstractProgramLogic orderLogic = ProgramLogicFactory.getProgramLogic("1");
|
2023-09-14 17:36:45 +08:00
|
|
|
|
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 paymentId = "002212023082514501110541039779091623936";
|
|
|
|
|
|
// 在完成初始化设置情况下,调用查询方法,获取 Payment 查询结果
|
2023-10-31 15:17:39 +08:00
|
|
|
|
Map<String, Object> response = Payment.query(paymentId, wechatAppId1);
|
2023-08-30 11:02:18 +08:00
|
|
|
|
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-10-31 15:17:39 +08:00
|
|
|
|
adapayService.createSettleAccountRequest(dto, adapayMemberId, wechatAppId1);
|
2023-08-30 11:02:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void createDeleteSettleAccountRequestTest() throws BaseAdaPayException {
|
|
|
|
|
|
String adapayMemberId = "ACM69424215";
|
|
|
|
|
|
String settleAccountId = "0498291998695360";
|
2023-10-31 15:17:39 +08:00
|
|
|
|
adapayService.createDeleteSettleAccountRequest(adapayMemberId, settleAccountId, wechatAppId1);
|
2023-08-30 11:02:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void queryDrawcashDetailTest() throws BaseAdaPayException {
|
|
|
|
|
|
String orderNo = "drawcash_1692339516947";
|
2023-10-31 15:17:39 +08:00
|
|
|
|
DrawCashDetailVO drawCashDetailVO = adapayService.queryDrawCashDetail(orderNo, wechatAppId1);
|
2023-08-30 11:02:18 +08:00
|
|
|
|
System.out.println(drawCashDetailVO);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void queryPaymentConfirmListTest() {
|
|
|
|
|
|
QueryPaymentConfirmDTO dto = new QueryPaymentConfirmDTO();
|
2023-10-31 15:17:39 +08:00
|
|
|
|
dto.setWechatAppId(wechatAppId1);
|
2023-09-25 16:08:30 +08:00
|
|
|
|
// dto.setPaymentId("0022120230910032226990546664907296944128");
|
2023-10-11 17:01:23 +08:00
|
|
|
|
dto.setPaymentConfirmId("0022120231009032351990557174514064834560");
|
2023-09-25 16:08:30 +08:00
|
|
|
|
QueryPaymentConfirmDetailResponse.PaymentConfirmInfo paymentConfirmInfo = adapayService.queryPaymentConfirmDetail(dto);
|
|
|
|
|
|
System.out.println(JSON.toJSONString(paymentConfirmInfo));
|
2023-08-30 11:02:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void queryAcctFlowListTest() {
|
|
|
|
|
|
QueryAcctFlowDTO dto = new QueryAcctFlowDTO();
|
|
|
|
|
|
try {
|
|
|
|
|
|
dto.setPageNo(1);
|
|
|
|
|
|
dto.setPageSize(100);
|
|
|
|
|
|
dto.setAcctType("01");
|
2023-10-31 15:17:39 +08:00
|
|
|
|
dto.setWechatAppId(wechatAppId1);
|
2023-08-30 11:02:18 +08:00
|
|
|
|
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);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-01-03 17:07:01 +08:00
|
|
|
|
@Test
|
|
|
|
|
|
public void testQueryConfirmReverse() throws BaseAdaPayException {
|
|
|
|
|
|
QueryConfirmReverseDTO dto = QueryConfirmReverseDTO.builder()
|
|
|
|
|
|
.paymentConfirmId("0022120231023104957990562360205131259904")
|
|
|
|
|
|
.wechatAppId(wechatAppId1)
|
|
|
|
|
|
.build();
|
|
|
|
|
|
adapayService.queryConfirmReverse(dto);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-12-27 13:46:37 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Test
|
|
|
|
|
|
public void testStopOccupyPileOrder() {
|
|
|
|
|
|
String wechatAppId = "54135135";
|
|
|
|
|
|
AbstractAdapayConfig config = AdapayConfigFactory.getConfig(wechatAppId);
|
|
|
|
|
|
System.out.println(JSON.toJSONString(config));
|
|
|
|
|
|
|
2023-10-31 15:17:39 +08:00
|
|
|
|
AbstractAdapayConfig config2 = AdapayConfigFactory.getConfig(wechatAppId1);
|
2023-08-30 11:02:18 +08:00
|
|
|
|
System.out.println(JSON.toJSONString(config2));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-12-26 13:16:15 +08:00
|
|
|
|
// 需要重新分账的订单信息(针对未分账的订单)
|
|
|
|
|
|
public JSONArray getPaymentList() {
|
|
|
|
|
|
String jsonArrayString = "[" +
|
2024-01-04 11:20:52 +08:00
|
|
|
|
"{\"orderCode\":\"C88010897730\", \"settleAmount\":\"48.01\", \"paymentId\":\"002212023121909551210583002536778248192\"}" +
|
|
|
|
|
|
"{\"orderCode\":\"C46042080481\", \"settleAmount\":\"57.91\", \"paymentId\":\"002212023122323045310584650817480536064\"}" +
|
|
|
|
|
|
"{\"orderCode\":\"C65229739884\", \"settleAmount\":\"0.19\", \"paymentId\":\"002212023122511185910585197948225941504\"}" +
|
|
|
|
|
|
"{\"orderCode\":\"C25728450539\", \"settleAmount\":\"29.90\", \"paymentId\":\"002212023122622060710585723192105005056\"}" +
|
|
|
|
|
|
"{\"orderCode\":\"C42071678890\", \"settleAmount\":\"56.28\", \"paymentId\":\"002212023122810183410586269908255485952\"}" +
|
|
|
|
|
|
"{\"orderCode\":\"C42419958694\", \"settleAmount\":\"64.83\", \"paymentId\":\"002212023122815363710586349948830945280\"}" +
|
|
|
|
|
|
"{\"orderCode\":\"C42419958694\", \"settleAmount\":\"49.90\", \"paymentId\":\"002212023122920370010586787931174236160\"}" +
|
|
|
|
|
|
"{\"orderCode\":\"C61828252955\", \"settleAmount\":\"60.73\", \"paymentId\":\"002212023123008222510586965454179905536\"}" +
|
2023-12-26 13:16:15 +08:00
|
|
|
|
"]";
|
|
|
|
|
|
return JSONArray.parseArray(jsonArrayString);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 批量执行分账
|
|
|
|
|
|
*/
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void batchCreatePaymentConfirm() {
|
|
|
|
|
|
JSONArray paymentList = getPaymentList();
|
|
|
|
|
|
// TODO 获取默认结算账户,如需分给对应商户就填写正确的汇付会员id
|
|
|
|
|
|
// AdapayMemberAccount adapayMemberAccount = adapayMemberAccountService.getDefault();
|
|
|
|
|
|
AdapayMemberAccount adapayMemberAccount = new AdapayMemberAccount();
|
2024-01-04 11:20:52 +08:00
|
|
|
|
adapayMemberAccount.setAdapayMemberId("ACM42016718");
|
2023-12-26 13:16:15 +08:00
|
|
|
|
for (int i = 0; i < paymentList.size(); i++) {
|
|
|
|
|
|
JSONObject jsonObject = (JSONObject) paymentList.get(i);
|
|
|
|
|
|
BigDecimal confirmAmt = jsonObject.getBigDecimal("settleAmount"); // 确认金额就是结算金额
|
|
|
|
|
|
String paymentId = jsonObject.getString("paymentId"); // 支付id
|
|
|
|
|
|
String orderCode = jsonObject.getString("orderCode"); // 订单编号
|
|
|
|
|
|
|
|
|
|
|
|
// 延时分账,使用确认交易API
|
|
|
|
|
|
PaymentConfirmResponse paymentConfirmResponse = adapayService.createPaymentConfirmRequest(paymentId,
|
|
|
|
|
|
adapayMemberAccount, confirmAmt, orderCode, wechatAppId1);
|
|
|
|
|
|
System.out.println(JSON.toJSONString(paymentConfirmResponse));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
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-12-13 17:11:35 +08:00
|
|
|
|
List<String> paymentIdList = getPaymentIdList(); // 查询分账信息
|
2023-09-28 09:16:44 +08:00
|
|
|
|
// 用于verify的汇付会员id
|
2023-12-13 16:48:07 +08:00
|
|
|
|
// String verifyAdapayMemberId = "AM27665969";
|
2023-09-11 16:43:26 +08:00
|
|
|
|
|
2023-12-14 20:17:15 +08:00
|
|
|
|
List<String> unSplitList = Lists.newArrayList(); //
|
2023-12-13 16:48:07 +08:00
|
|
|
|
// List<QueryPaymentConfirmDetailResponse.PaymentConfirmInfo> successList= Lists.newArrayList();
|
2023-09-06 14:30:06 +08:00
|
|
|
|
|
2023-12-13 16:48:07 +08:00
|
|
|
|
BigDecimal total = BigDecimal.ZERO;
|
2023-12-14 20:17:15 +08:00
|
|
|
|
List<String> selfList = Lists.newArrayList();
|
2023-12-13 16:48:07 +08:00
|
|
|
|
|
|
|
|
|
|
Map<String, BigDecimal> map = Maps.newHashMap();
|
2023-12-13 17:11:35 +08:00
|
|
|
|
for (String paymentId : paymentIdList) {
|
|
|
|
|
|
if (StringUtils.isBlank(paymentId)) {
|
|
|
|
|
|
continue;
|
|
|
|
|
|
}
|
2023-09-06 14:30:06 +08:00
|
|
|
|
// 查询支付确认id
|
|
|
|
|
|
QueryPaymentConfirmDTO dto = new QueryPaymentConfirmDTO();
|
2023-12-13 17:11:35 +08:00
|
|
|
|
dto.setPaymentId(paymentId);
|
2023-10-31 15:17:39 +08:00
|
|
|
|
dto.setWechatAppId(wechatAppId1);
|
2023-09-06 14:30:06 +08:00
|
|
|
|
QueryPaymentConfirmDetailResponse response = adapayService.queryPaymentConfirmList(dto);
|
2023-12-13 16:48:07 +08:00
|
|
|
|
// System.out.println("response==" + JSON.toJSONString(response));
|
2023-09-06 14:30:06 +08:00
|
|
|
|
if (response != null) {
|
|
|
|
|
|
List<QueryPaymentConfirmDetailResponse.PaymentConfirmInfo> confirms = response.getPaymentConfirms();
|
2023-09-08 14:26:13 +08:00
|
|
|
|
if (CollectionUtils.isEmpty(confirms)) {
|
2023-12-14 20:17:15 +08:00
|
|
|
|
unSplitList.add(paymentId);
|
2023-09-27 11:25:01 +08:00
|
|
|
|
} else {
|
2023-09-28 09:16:44 +08:00
|
|
|
|
for (QueryPaymentConfirmDetailResponse.PaymentConfirmInfo confirm : confirms) {
|
2024-01-03 17:07:01 +08:00
|
|
|
|
if (queryConfirmReverseStatus(confirm)) {
|
|
|
|
|
|
System.out.println("支付确认id:" + confirm.getId() + "撤销了。。。");
|
|
|
|
|
|
continue;
|
|
|
|
|
|
}
|
2023-09-28 09:16:44 +08:00
|
|
|
|
JSONObject jsonObject = JSON.parseObject(confirm.getDescription());
|
|
|
|
|
|
String adapayMemberId = jsonObject.getString("adapayMemberId");
|
2023-12-13 16:48:07 +08:00
|
|
|
|
BigDecimal confirmedAmt = new BigDecimal(confirm.getConfirmedAmt());
|
|
|
|
|
|
|
|
|
|
|
|
total = total.add(confirmedAmt);
|
|
|
|
|
|
|
|
|
|
|
|
// 放map
|
|
|
|
|
|
map.merge(adapayMemberId, confirmedAmt, BigDecimal::add);
|
2023-12-14 20:17:15 +08:00
|
|
|
|
|
|
|
|
|
|
if (StringUtils.equals(adapayMemberId, "0")) {
|
|
|
|
|
|
selfList.add(paymentId);
|
|
|
|
|
|
}
|
2023-09-28 09:16:44 +08:00
|
|
|
|
}
|
2023-09-06 14:30:06 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2023-08-30 11:02:18 +08:00
|
|
|
|
}
|
2023-12-14 20:17:15 +08:00
|
|
|
|
System.out.println("=================未分账:" + JSON.toJSONString(unSplitList));
|
2023-12-13 17:11:35 +08:00
|
|
|
|
System.out.println("=================已分账:" + JSON.toJSONString(map) + ", 总分账:" + total);
|
2023-12-14 20:17:15 +08:00
|
|
|
|
System.out.println("=================自己:" + JSON.toJSONString(selfList));
|
2023-08-30 11:02:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-01-03 17:07:01 +08:00
|
|
|
|
private boolean queryConfirmReverseStatus(QueryPaymentConfirmDetailResponse.PaymentConfirmInfo confirm) throws BaseAdaPayException {
|
|
|
|
|
|
boolean result = false;
|
|
|
|
|
|
|
|
|
|
|
|
QueryConfirmReverseDTO dto = QueryConfirmReverseDTO.builder()
|
|
|
|
|
|
.paymentConfirmId(confirm.getId())
|
|
|
|
|
|
.wechatAppId(wechatAppId1)
|
|
|
|
|
|
.build();
|
|
|
|
|
|
ConfirmReverseResponse confirmReverseResponse = adapayService.queryConfirmReverse(dto);
|
|
|
|
|
|
if (confirmReverseResponse.isSuccess()) {
|
|
|
|
|
|
result = true;
|
|
|
|
|
|
}
|
2023-12-13 16:48:07 +08:00
|
|
|
|
|
2024-01-03 17:07:01 +08:00
|
|
|
|
return result;
|
|
|
|
|
|
}
|
2023-12-13 16:48:07 +08:00
|
|
|
|
|
2023-10-08 16:42:56 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 延迟分账未确认调撤销调撤销接口退款
|
|
|
|
|
|
*/
|
2023-09-28 16:48:24 +08:00
|
|
|
|
@Test
|
|
|
|
|
|
public void createPaymentReverseRequestTest() {
|
2023-10-08 16:42:56 +08:00
|
|
|
|
String paymentId = "002212023082409392010540599165461884928";
|
|
|
|
|
|
BigDecimal refundAmount = new BigDecimal("0.09");
|
|
|
|
|
|
String memberId = null;
|
2023-09-28 16:48:24 +08:00
|
|
|
|
|
|
|
|
|
|
// 延迟分账未确认调撤销调撤销接口退款
|
|
|
|
|
|
PaymentReverseOperation operation = new PaymentReverseOperation();
|
|
|
|
|
|
operation.setPaymentId(paymentId);
|
|
|
|
|
|
operation.setReverseAmt(refundAmount);
|
2023-10-31 15:17:39 +08:00
|
|
|
|
operation.setMerchantKey(wechatAppId2);
|
2023-09-28 16:48:24 +08:00
|
|
|
|
operation.setMemberId(memberId);
|
|
|
|
|
|
operation.setScenarioType(ScenarioEnum.ORDER.getValue());
|
|
|
|
|
|
operation.setOrderCode(null);
|
|
|
|
|
|
PaymentReverseResponse response = adapayService.createPaymentReverseRequest(operation);
|
|
|
|
|
|
System.out.println(JSON.toJSONString(response));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-10-31 15:17:39 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 测试创建退款请求
|
|
|
|
|
|
*/
|
2023-09-28 16:48:24 +08:00
|
|
|
|
@Test
|
|
|
|
|
|
public void createRefundRequestTest() {
|
2023-12-27 14:25:20 +08:00
|
|
|
|
String paymentId = "0022120231226155420105856296289509498883333";
|
|
|
|
|
|
BigDecimal refundAmount = new BigDecimal("11.62");
|
|
|
|
|
|
String memberId = "46487809";
|
|
|
|
|
|
String orderCode = "C80414417003";
|
2023-09-28 16:48:24 +08:00
|
|
|
|
// 调汇付的交易退款接口
|
|
|
|
|
|
RefundResponse response = adapayService.createRefundRequest(paymentId, refundAmount,
|
2023-12-27 14:25:20 +08:00
|
|
|
|
wechatAppId2, memberId, ScenarioEnum.ORDER.getValue(), orderCode);
|
2023-09-28 16:48:24 +08:00
|
|
|
|
System.out.println(JSON.toJSONString(response));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-09-25 15:05:12 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 批量支付确认撤销
|
|
|
|
|
|
* @throws BaseAdaPayException
|
|
|
|
|
|
*/
|
2023-09-08 14:26:13 +08:00
|
|
|
|
@Test
|
2023-09-11 16:43:26 +08:00
|
|
|
|
public void testCreateConfirmReverse() throws BaseAdaPayException {
|
2023-12-13 17:11:35 +08:00
|
|
|
|
List<String> list = getPaymentIdList(); // 批量支付确认撤销
|
2023-10-31 15:17:39 +08:00
|
|
|
|
for (String paymentId : list) {
|
2023-09-08 14:26:13 +08:00
|
|
|
|
// 查询支付确认id
|
|
|
|
|
|
QueryPaymentConfirmDTO dto = new QueryPaymentConfirmDTO();
|
2023-10-31 15:17:39 +08:00
|
|
|
|
dto.setPaymentId(paymentId);
|
|
|
|
|
|
dto.setWechatAppId(wechatAppId1);
|
2023-09-08 14:26:13 +08:00
|
|
|
|
QueryPaymentConfirmDetailResponse response = adapayService.queryPaymentConfirmList(dto);
|
|
|
|
|
|
if (response != null) {
|
|
|
|
|
|
List<QueryPaymentConfirmDetailResponse.PaymentConfirmInfo> confirms = response.getPaymentConfirms();
|
2023-10-31 15:17:39 +08:00
|
|
|
|
System.out.println("支付id:" + paymentId + ", 确认信息:" + JSON.toJSONString(confirms));
|
2023-10-11 17:01:23 +08:00
|
|
|
|
if (CollectionUtils.isNotEmpty(confirms)) {
|
|
|
|
|
|
for (QueryPaymentConfirmDetailResponse.PaymentConfirmInfo confirm : confirms) {
|
2023-10-31 15:17:39 +08:00
|
|
|
|
adapayService.createConfirmReverse(confirm.getId(), wechatAppId1);
|
2023-10-11 17:01:23 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2023-09-08 14:26:13 +08:00
|
|
|
|
}
|
2023-08-30 11:02:18 +08:00
|
|
|
|
}
|
2023-09-08 14:26:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2023-10-31 15:17:39 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 查询撤销列表
|
|
|
|
|
|
* @throws BaseAdaPayException
|
|
|
|
|
|
*/
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void queryPaymentReverseListTest() throws BaseAdaPayException {
|
|
|
|
|
|
JSONArray jsonList = getJsonList();
|
|
|
|
|
|
|
|
|
|
|
|
List<String> idList = Lists.newArrayList();
|
|
|
|
|
|
for (int i = 0; i < jsonList.size(); i++) {
|
|
|
|
|
|
JSONObject jsonObject = (JSONObject) jsonList.get(i);
|
|
|
|
|
|
// System.out.println(jsonObject.toJSONString());
|
|
|
|
|
|
BigDecimal refundAmount = jsonObject.getBigDecimal("refundAmount");
|
|
|
|
|
|
String paymentId = jsonObject.getString("paymentId");
|
|
|
|
|
|
|
2023-11-24 15:40:26 +08:00
|
|
|
|
adapayService.createPaymentReverseRequest(paymentId, refundAmount, wechatAppId1, "", ScenarioEnum.ORDER.getValue(), "");
|
2023-10-31 15:17:39 +08:00
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
System.out.println("需要撤销idList:" + idList);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public JSONArray getJsonList() {
|
2023-11-24 15:40:26 +08:00
|
|
|
|
String jsonArrayString = "[{\"refundAmount\":\"354.84\", \"paymentId\":\"002212023102509474610563069333816762368\"}]";
|
2023-10-31 15:17:39 +08:00
|
|
|
|
JSONArray jsonArray = JSONArray.parseArray(jsonArrayString);
|
|
|
|
|
|
return jsonArray;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-12-13 17:11:35 +08:00
|
|
|
|
public List<String> getPaymentIdList() {
|
2023-09-08 14:26:13 +08:00
|
|
|
|
List<String> list = Lists.newArrayList();
|
2024-01-04 11:20:52 +08:00
|
|
|
|
list.add("002212023120100491310576342154756444160");
|
|
|
|
|
|
list.add("002212023120101535910576358454479773696");
|
|
|
|
|
|
list.add("002212023120101590810576359747337474048");
|
|
|
|
|
|
list.add("002212023120102024410576360653964922880");
|
|
|
|
|
|
list.add("002212023120102405810576370278634860544");
|
|
|
|
|
|
list.add("002212023120108360310576459638364442624");
|
|
|
|
|
|
list.add("002212023120108374510576460066082217984");
|
|
|
|
|
|
list.add("002212023120108455110576462101252751360");
|
|
|
|
|
|
list.add("002212023120108514910576463602993745920");
|
|
|
|
|
|
list.add("002212023120109351310576474525332889600");
|
|
|
|
|
|
list.add("002212023120109360410576474742134968320");
|
|
|
|
|
|
list.add("002212023120109372110576475065244672000");
|
|
|
|
|
|
list.add("002212023120109385810576475470789496832");
|
|
|
|
|
|
list.add("002212023120110334910576489274709721088");
|
|
|
|
|
|
list.add("002212023120110363710576489977779736576");
|
|
|
|
|
|
list.add("002212023120110394710576490777167376384");
|
|
|
|
|
|
list.add("002212023120110424310576491515193671680");
|
|
|
|
|
|
list.add("002212023120111290710576503191671128064");
|
|
|
|
|
|
list.add("002212023120111550310576509718666657792");
|
|
|
|
|
|
list.add("002212023120112021810576511541954719744");
|
|
|
|
|
|
list.add("002212023120112232710576516861966376960");
|
|
|
|
|
|
list.add("002212023120112534310576524481543049216");
|
|
|
|
|
|
list.add("002212023120113003310576526201898094592");
|
|
|
|
|
|
list.add("002212023120113480910576538179274952704");
|
|
|
|
|
|
list.add("002212023120114165310576545409515655168");
|
|
|
|
|
|
list.add("002212023120115151210576560086358384640");
|
|
|
|
|
|
list.add("002212023120116301210576578962061606912");
|
|
|
|
|
|
list.add("002212023120118373110576611000970977280");
|
|
|
|
|
|
list.add("002212023120118420410576612147248742400");
|
|
|
|
|
|
list.add("002212023120120051310576633070902292480");
|
|
|
|
|
|
list.add("002212023120121160510576650904654688256");
|
|
|
|
|
|
list.add("002212023120121280810576653939741536256");
|
|
|
|
|
|
list.add("002212023120121412610576657284984360960");
|
|
|
|
|
|
list.add("002212023120122274210576668928905134080");
|
|
|
|
|
|
list.add("002212023120122311110576669806605189120");
|
|
|
|
|
|
list.add("002212023120122330110576670266561642496");
|
|
|
|
|
|
list.add("002212023120122581010576676595576188928");
|
|
|
|
|
|
list.add("002212023120123213710576682496338411520");
|
|
|
|
|
|
list.add("002212023120200110110576694930046435328");
|
|
|
|
|
|
list.add("002212023120200434210576703153860583424");
|
|
|
|
|
|
list.add("002212023120206493810576795244685119488");
|
|
|
|
|
|
list.add("002212023120207573410576812341934428160");
|
|
|
|
|
|
list.add("002212023120208461710576824601575665664");
|
|
|
|
|
|
list.add("002212023120208545510576826774479396864");
|
|
|
|
|
|
list.add("002212023120209342910576836729289293824");
|
|
|
|
|
|
list.add("002212023120209460110576839630560727040");
|
|
|
|
|
|
list.add("002212023120209530510576841408637939712");
|
|
|
|
|
|
list.add("002212023120210511210576856037859344384");
|
|
|
|
|
|
list.add("002212023120211075410576860240870621184");
|
|
|
|
|
|
list.add("002212023120211253210576864677276946432");
|
|
|
|
|
|
list.add("002212023120211312810576866167573803008");
|
|
|
|
|
|
list.add("002212023120211384710576868011924742144");
|
|
|
|
|
|
list.add("002212023120211554510576872282076463104");
|
|
|
|
|
|
list.add("002212023120212001210576873400314056704");
|
|
|
|
|
|
list.add("002212023120212385010576883124843388928");
|
|
|
|
|
|
list.add("002212023120214105010576906274190397440");
|
|
|
|
|
|
list.add("002212023120214284110576910768505597952");
|
|
|
|
|
|
list.add("002212023120217520410576961952476520448");
|
|
|
|
|
|
list.add("002212023120218125010576967177202024448");
|
|
|
|
|
|
list.add("002212023120218171110576968270339858432");
|
|
|
|
|
|
list.add("002212023120219135010576982529954811904");
|
|
|
|
|
|
list.add("002212023120221230910577015072424968192");
|
|
|
|
|
|
list.add("002212023120221330910577017589375778816");
|
|
|
|
|
|
list.add("002212023120222105610577027095639052288");
|
|
|
|
|
|
list.add("002212023120300521610577067695857299456");
|
|
|
|
|
|
list.add("002212023120302050710577086029222461440");
|
|
|
|
|
|
list.add("002212023120308515410577188400262131712");
|
|
|
|
|
|
list.add("002212023120308595610577190423142690816");
|
|
|
|
|
|
list.add("002212023120309360710577199530502672384");
|
|
|
|
|
|
list.add("002212023120309535110577203992986370048");
|
|
|
|
|
|
list.add("002212023120310005410577205763699982336");
|
|
|
|
|
|
list.add("002212023120310021510577206104901029888");
|
|
|
|
|
|
list.add("002212023120310181710577210140689698816");
|
|
|
|
|
|
list.add("002212023120310380510577215121322037248");
|
|
|
|
|
|
list.add("002212023120310421610577216177452859392");
|
|
|
|
|
|
list.add("002212023120311043010577221769528852480");
|
|
|
|
|
|
list.add("002212023120311480110577232722974625792");
|
|
|
|
|
|
list.add("002212023120312095010577238212709191680");
|
|
|
|
|
|
list.add("002212023120312124510577238948462440448");
|
|
|
|
|
|
list.add("002212023120312425410577246532706766848");
|
|
|
|
|
|
list.add("002212023120312435410577246784614600704");
|
|
|
|
|
|
list.add("002212023120319361110577350539404595200");
|
|
|
|
|
|
list.add("002212023120321141610577375224133693440");
|
|
|
|
|
|
list.add("002212023120321185810577376406517825536");
|
|
|
|
|
|
list.add("002212023120321234410577377606770364416");
|
|
|
|
|
|
list.add("002212023120321281810577378756098371584");
|
|
|
|
|
|
list.add("002212023120322075510577388724427902976");
|
|
|
|
|
|
list.add("002212023120322192910577391637050724352");
|
|
|
|
|
|
list.add("002212023120323310210577409640471293952");
|
|
|
|
|
|
list.add("002212023120400381110577426541761269760");
|
|
|
|
|
|
list.add("002212023120407513710577535617878941696");
|
|
|
|
|
|
list.add("002212023120408450610577549079050080256");
|
|
|
|
|
|
list.add("002212023120409170210577557112882704384");
|
|
|
|
|
|
list.add("002212023120409380210577562397731082240");
|
|
|
|
|
|
list.add("002212023120409415610577563381711540224");
|
|
|
|
|
|
list.add("002212023120410572710577582383793922048");
|
|
|
|
|
|
list.add("002212023120411005410577583254256578560");
|
|
|
|
|
|
list.add("002212023120411032810577583897884573696");
|
|
|
|
|
|
list.add("002212023120411261610577589635508584448");
|
|
|
|
|
|
list.add("002212023120411341510577591643948408832");
|
|
|
|
|
|
list.add("002212023120411531610577596430624116736");
|
|
|
|
|
|
list.add("002212023120413204810577618461642813440");
|
|
|
|
|
|
list.add("002212023120413295010577620732871217152");
|
|
|
|
|
|
list.add("002212023120413511010577626100286992384");
|
|
|
|
|
|
list.add("002212023120414191110577633153663324160");
|
|
|
|
|
|
list.add("002212023120414290510577635645662433280");
|
|
|
|
|
|
list.add("002212023120417225510577679391684857856");
|
|
|
|
|
|
list.add("002212023120417294710577681118466297856");
|
|
|
|
|
|
list.add("002212023120419411310577714196979740672");
|
|
|
|
|
|
list.add("002212023120420015410577719400512339968");
|
|
|
|
|
|
list.add("002212023120420120510577721963261542400");
|
|
|
|
|
|
list.add("002212023120421113310577736930090848256");
|
|
|
|
|
|
list.add("002212023120421214910577739513419227136");
|
|
|
|
|
|
list.add("002212023120421521810577747184242876416");
|
|
|
|
|
|
list.add("002212023120421594010577749037569359872");
|
|
|
|
|
|
list.add("002212023120422204210577754330913792000");
|
|
|
|
|
|
list.add("002212023120423464310577775978704519168");
|
|
|
|
|
|
list.add("002212023120500315110577787333952180224");
|
|
|
|
|
|
list.add("002212023120502540410577823124383313920");
|
|
|
|
|
|
list.add("002212023120502572610577823973481385984");
|
|
|
|
|
|
list.add("002212023120503051210577825928811384832");
|
|
|
|
|
|
list.add("002212023120508090810577902413049122816");
|
|
|
|
|
|
list.add("002212023120508541510577913766951239680");
|
|
|
|
|
|
list.add("002212023120509105610577917965292908544");
|
|
|
|
|
|
list.add("002212023120509441610577926355752042496");
|
|
|
|
|
|
list.add("002212023120509484110577927467648569344");
|
|
|
|
|
|
list.add("002212023120510041710577931391058010112");
|
|
|
|
|
|
list.add("002212023120510063310577931962147123200");
|
|
|
|
|
|
list.add("002212023120510404910577940584901595136");
|
|
|
|
|
|
list.add("002212023120510503510577943045423476736");
|
|
|
|
|
|
list.add("002212023120510595010577945370935410688");
|
|
|
|
|
|
list.add("002212023120511543910577959169573761024");
|
|
|
|
|
|
list.add("002212023120511550110577959260587016192");
|
|
|
|
|
|
list.add("002212023120512045210577961737234001920");
|
|
|
|
|
|
list.add("002212023120512110510577963303848488960");
|
|
|
|
|
|
list.add("002212023120512110710577963310718758912");
|
|
|
|
|
|
list.add("002212023120512114510577963471387062272");
|
|
|
|
|
|
list.add("002212023120514020810577991248168202240");
|
|
|
|
|
|
list.add("002212023120514070810577992507806433280");
|
|
|
|
|
|
list.add("002212023120514495410578003271758626816");
|
|
|
|
|
|
list.add("002212023120515311210578013663740256256");
|
|
|
|
|
|
list.add("002212023120516213110578026325201461248");
|
|
|
|
|
|
list.add("002212023120517171310578040344888569856");
|
|
|
|
|
|
list.add("002212023120518095810578053618281701376");
|
|
|
|
|
|
list.add("002212023120521163110578100567531044864");
|
|
|
|
|
|
list.add("002212023120521503910578109156789538816");
|
|
|
|
|
|
list.add("002212023120521544810578110201654300672");
|
|
|
|
|
|
list.add("002212023120522123810578114689311395840");
|
|
|
|
|
|
list.add("002212023120522230810578117330667606016");
|
|
|
|
|
|
list.add("002212023120522273210578118437195563008");
|
|
|
|
|
|
list.add("002212023120522290710578118834728038400");
|
|
|
|
|
|
list.add("002212023120600301210578149308281872384");
|
|
|
|
|
|
list.add("002212023120608195910578267532852940800");
|
|
|
|
|
|
list.add("002212023120608444910578273783147491328");
|
|
|
|
|
|
list.add("002212023120608451910578273906042822656");
|
|
|
|
|
|
list.add("002212023120609130310578280885961703424");
|
|
|
|
|
|
list.add("002212023120610264410578299432177983488");
|
|
|
|
|
|
list.add("002212023120610342310578301354441289728");
|
|
|
|
|
|
list.add("002212023120610545210578306508586987520");
|
|
|
|
|
|
list.add("002212023120611071110578309608428277760");
|
|
|
|
|
|
list.add("002212023120611221610578313405582495744");
|
|
|
|
|
|
list.add("002212023120611263410578314488577503232");
|
|
|
|
|
|
list.add("002212023120611345710578316595640250368");
|
|
|
|
|
|
list.add("002212023120611510810578320671942995969");
|
|
|
|
|
|
list.add("002212023120612153610578326828571168768");
|
|
|
|
|
|
list.add("002212023120614033010578353983490605056");
|
|
|
|
|
|
list.add("002212023120615331810578376580281098240");
|
|
|
|
|
|
list.add("002212023120619404810578438865351041024");
|
|
|
|
|
|
list.add("002212023120619522210578441778008408064");
|
|
|
|
|
|
list.add("002212023120621013910578459214241841152");
|
|
|
|
|
|
list.add("002212023120621495210578471348178763776");
|
|
|
|
|
|
list.add("002212023120621515510578471862249791488");
|
|
|
|
|
|
list.add("002212023120621520110578471888663089152");
|
|
|
|
|
|
list.add("002212023120622051510578475216467902464");
|
|
|
|
|
|
list.add("002212023120622061510578475468776108032");
|
|
|
|
|
|
list.add("002212023120622291410578481253092122624");
|
|
|
|
|
|
list.add("002212023120700151810578507944696631296");
|
|
|
|
|
|
list.add("002212023120700375510578513637109551104");
|
|
|
|
|
|
list.add("002212023120700505210578516895722876928");
|
|
|
|
|
|
list.add("002212023120701054510578520644227940352");
|
|
|
|
|
|
list.add("002212023120703083910578551571514085376");
|
|
|
|
|
|
list.add("002212023120707200710578614853901443072");
|
|
|
|
|
|
list.add("002212023120709203410578645168305975296");
|
|
|
|
|
|
list.add("002212023120709324610578648235802923008");
|
|
|
|
|
|
list.add("002212023120709412710578650423132758016");
|
|
|
|
|
|
list.add("002212023120709564610578654276682813440");
|
|
|
|
|
|
list.add("002212023120710011210578655392321540096");
|
|
|
|
|
|
list.add("002212023120710170810578659402339299328");
|
|
|
|
|
|
list.add("002212023120710242410578661229160284160");
|
|
|
|
|
|
list.add("002212023120710293110578662520535494656");
|
|
|
|
|
|
list.add("002212023120710373410578664543928262656");
|
|
|
|
|
|
list.add("002212023120710384910578664857540214784");
|
|
|
|
|
|
list.add("002212023120710402110578665246141599744");
|
|
|
|
|
|
list.add("002212023120710441810578666240986800128");
|
|
|
|
|
|
list.add("002212023120710551510578668996385525760");
|
|
|
|
|
|
list.add("002212023120711024110578670865701888000");
|
|
|
|
|
|
list.add("002212023120711045010578671406881943552");
|
|
|
|
|
|
list.add("002212023120711055110578671660255825920");
|
|
|
|
|
|
list.add("002212023120711070610578671978988810240");
|
|
|
|
|
|
list.add("002212023120711085810578672447224696832");
|
|
|
|
|
|
list.add("002212023120711174510578674656047079424");
|
|
|
|
|
|
list.add("002212023120711213810578675634390654976");
|
|
|
|
|
|
list.add("002212023120711214310578675654986452992");
|
|
|
|
|
|
list.add("002212023120711280410578677251661709312");
|
|
|
|
|
|
list.add("002212023120711291110578677536030961664");
|
|
|
|
|
|
list.add("002212023120711294810578677691522371584");
|
|
|
|
|
|
list.add("002212023120711322110578678331802652672");
|
|
|
|
|
|
list.add("002212023120712081610578687368371331072");
|
|
|
|
|
|
list.add("002212023120712100510578687827016044544");
|
|
|
|
|
|
list.add("002212023120714033710578716400704589824");
|
|
|
|
|
|
list.add("002212023120715520910578743710186827776");
|
|
|
|
|
|
list.add("002212023120715555410578744655612514304");
|
|
|
|
|
|
list.add("002212023120721323710578829394577567744");
|
|
|
|
|
|
list.add("002212023120722031710578837111012102144");
|
|
|
|
|
|
list.add("002212023120722162610578840420376678400");
|
|
|
|
|
|
list.add("002212023120722223910578841985757986816");
|
|
|
|
|
|
list.add("002212023120722252310578842673517383680");
|
|
|
|
|
|
list.add("002212023120722283810578843492401262592");
|
|
|
|
|
|
list.add("002212023120722415310578846823730339840");
|
|
|
|
|
|
list.add("002212023120723061210578852944318828544");
|
|
|
|
|
|
list.add("002212023120723093510578853796429910016");
|
|
|
|
|
|
list.add("002212023120800431510578877369212026880");
|
|
|
|
|
|
list.add("002212023120801304010578889301682556928");
|
|
|
|
|
|
list.add("002212023120801314010578889552441098240");
|
|
|
|
|
|
list.add("002212023120802061510578898254470582272");
|
|
|
|
|
|
list.add("002212023120807464310578983937636114432");
|
|
|
|
|
|
list.add("002212023120808421310578997904959037440");
|
|
|
|
|
|
list.add("002212023120808464110578999028635250688");
|
|
|
|
|
|
list.add("002212023120808485710578999598369099776");
|
|
|
|
|
|
list.add("002212023120809442710579013566930575360");
|
|
|
|
|
|
list.add("002212023120809533310579015854988816384");
|
|
|
|
|
|
list.add("002212023120809534810579015916964356096");
|
|
|
|
|
|
list.add("002212023120810404610579027738638307328");
|
|
|
|
|
|
list.add("002212023120811124410579035781295747072");
|
|
|
|
|
|
list.add("002212023120811194210579037535697612800");
|
|
|
|
|
|
list.add("002212023120811242010579038701013127168");
|
|
|
|
|
|
list.add("002212023120811293010579040002510401536");
|
|
|
|
|
|
list.add("002212023120814183510579082555004010496");
|
|
|
|
|
|
list.add("002212023120814250610579084193031352320");
|
|
|
|
|
|
list.add("002212023120815390110579102795410784256");
|
|
|
|
|
|
list.add("002212023120815573110579107449758437376");
|
|
|
|
|
|
list.add("002212023120820533110579181941416300544");
|
|
|
|
|
|
list.add("002212023120820562410579182665724964864");
|
|
|
|
|
|
list.add("002212023120821264110579190288429387776");
|
|
|
|
|
|
list.add("002212023120821350110579192385261780992");
|
|
|
|
|
|
list.add("002212023120821470710579195428550959104");
|
|
|
|
|
|
list.add("002212023120822321810579206799687110656");
|
|
|
|
|
|
list.add("002212023120900034910579229829897891840");
|
|
|
|
|
|
list.add("002212023120901102310579246583508348928");
|
|
|
|
|
|
list.add("002212023120903215310579279676444250112");
|
|
|
|
|
|
list.add("002212023120908273110579356590173327360");
|
|
|
|
|
|
list.add("002212023120908580910579364302093246464");
|
|
|
|
|
|
list.add("002212023120909054810579366227808600064");
|
|
|
|
|
|
list.add("002212023120909355910579373821390471168");
|
|
|
|
|
|
list.add("002212023120909534110579378278300631040");
|
|
|
|
|
|
list.add("002212023120910142810579383507635621888");
|
|
|
|
|
|
list.add("002212023120910202610579385009591267328");
|
|
|
|
|
|
list.add("002212023120911062810579396593109676032");
|
|
|
|
|
|
list.add("002212023120911212110579400338864824320");
|
|
|
|
|
|
list.add("002212023120911492210579407388399898624");
|
|
|
|
|
|
list.add("002212023120912145710579413828302835712");
|
|
|
|
|
|
list.add("002212023120913195910579430194917240832");
|
|
|
|
|
|
list.add("002212023120916102410579473081346560000");
|
|
|
|
|
|
list.add("002212023120918482210579512835489742848");
|
|
|
|
|
|
list.add("002212023120919130710579519062399234048");
|
|
|
|
|
|
list.add("002212023120921035710579546954070450176");
|
|
|
|
|
|
list.add("002212023120921043010579547092794454016");
|
|
|
|
|
|
list.add("002212023120921120610579549004265721856");
|
|
|
|
|
|
list.add("002212023120921173910579550401030213632");
|
|
|
|
|
|
list.add("002212023120921204010579551163261992960");
|
|
|
|
|
|
list.add("002212023120921293710579553413874429952");
|
|
|
|
|
|
list.add("002212023120921373610579555421246722048");
|
|
|
|
|
|
list.add("002212023120921430710579556810310062080");
|
|
|
|
|
|
list.add("002212023120922044910579562274472947712");
|
|
|
|
|
|
list.add("002212023120922105910579563822745108480");
|
|
|
|
|
|
list.add("002212023120922201910579566173376462848");
|
|
|
|
|
|
list.add("002212023120922493210579573524825411584");
|
|
|
|
|
|
list.add("002212023121000221010579596836371279872");
|
|
|
|
|
|
list.add("002212023121006433510579692825326985216");
|
|
|
|
|
|
list.add("002212023121007143810579700637573296128");
|
|
|
|
|
|
list.add("002212023121009105310579729894478925824");
|
|
|
|
|
|
list.add("002212023121009122510579730280142585856");
|
|
|
|
|
|
list.add("002212023121009383010579736844780941312");
|
|
|
|
|
|
list.add("002212023121009412210579737566962999296");
|
|
|
|
|
|
list.add("002212023121009485010579739445858496512");
|
|
|
|
|
|
list.add("002212023121010081610579744336018501632");
|
|
|
|
|
|
list.add("002212023121012030910579773247690883072");
|
|
|
|
|
|
list.add("002212023121013201810579792660316819456");
|
|
|
|
|
|
list.add("002212023121013500710579800164560490496");
|
|
|
|
|
|
list.add("002212023121014104210579805343833870336");
|
|
|
|
|
|
list.add("002212023121021101510579910927252938752");
|
|
|
|
|
|
list.add("002212023121021155510579912355058892800");
|
|
|
|
|
|
list.add("002212023121021295410579915875141009408");
|
|
|
|
|
|
list.add("002212023121021330410579916669649948672");
|
|
|
|
|
|
list.add("002212023121021452510579919776787447808");
|
|
|
|
|
|
list.add("002212023121022030410579924221352984576");
|
|
|
|
|
|
list.add("002212023121022123410579926611845402624");
|
|
|
|
|
|
list.add("002212023121022401610579933583461801984");
|
|
|
|
|
|
list.add("002212023121023091110579940860606377984");
|
|
|
|
|
|
list.add("002212023121100103910579956328438435840");
|
|
|
|
|
|
list.add("002212023121100123110579956798386057216");
|
|
|
|
|
|
list.add("002212023121100224810579959384026603520");
|
|
|
|
|
|
list.add("002212023121102501310579996483209641984");
|
|
|
|
|
|
list.add("002212023121104385610580023840945950720");
|
|
|
|
|
|
list.add("002212023121106314110580052218353631232");
|
|
|
|
|
|
list.add("002212023121106480910580056363497234432");
|
|
|
|
|
|
list.add("002212023121107161310580063423575920640");
|
|
|
|
|
|
list.add("002212023121108234310580080409783570432");
|
|
|
|
|
|
list.add("002212023121108535510580088010599772160");
|
|
|
|
|
|
list.add("002212023121109464010580101286600335360");
|
|
|
|
|
|
list.add("002212023121110000910580104680565993472");
|
|
|
|
|
|
list.add("002212023121110120110580107667232501760");
|
|
|
|
|
|
list.add("002212023121110144110580108335443300352");
|
|
|
|
|
|
list.add("002212023121110163410580108809187397632");
|
|
|
|
|
|
list.add("002212023121110371710580114023989071872");
|
|
|
|
|
|
list.add("002212023121110375910580114202449920000");
|
|
|
|
|
|
list.add("002212023121110413910580115123762700288");
|
|
|
|
|
|
list.add("002212023121110560510580118754250539008");
|
|
|
|
|
|
list.add("002212023121111150410580123532603723776");
|
|
|
|
|
|
list.add("002212023121111381110580129349885267968");
|
|
|
|
|
|
list.add("002212023121111515310580132796857790464");
|
|
|
|
|
|
list.add("002212023121111533310580133216551157760");
|
|
|
|
|
|
list.add("002212023121111541310580133383979233280");
|
|
|
|
|
|
list.add("002212023121111582710580134452166897664");
|
|
|
|
|
|
list.add("002212023121111590610580134613374971904");
|
|
|
|
|
|
list.add("002212023121115041910580181225971728384");
|
|
|
|
|
|
list.add("002212023121116164910580199469779214336");
|
|
|
|
|
|
list.add("002212023121116334710580203740146962432");
|
|
|
|
|
|
list.add("002212023121118323410580233633638866944");
|
|
|
|
|
|
list.add("002212023121119490510580252890936004608");
|
|
|
|
|
|
list.add("002212023121120531610580269043964166144");
|
|
|
|
|
|
list.add("002212023121121280310580277795066949632");
|
|
|
|
|
|
list.add("002212023121121415610580281287914328064");
|
|
|
|
|
|
list.add("002212023121121531010580284115707191296");
|
|
|
|
|
|
list.add("002212023121122212910580291242977431552");
|
|
|
|
|
|
list.add("002212023121122400510580295922253246464");
|
|
|
|
|
|
list.add("002212023121201163210580335295480934400");
|
|
|
|
|
|
list.add("002212023121204350910580385279487320064");
|
|
|
|
|
|
list.add("002212023121206451410580418016439848960");
|
|
|
|
|
|
list.add("002212023121206541710580420294910414848");
|
|
|
|
|
|
list.add("002212023121208170510580441128217944064");
|
|
|
|
|
|
list.add("002212023121209015310580452403227475968");
|
|
|
|
|
|
list.add("002212023121209255910580458468518023168");
|
|
|
|
|
|
list.add("002212023121209290010580459227580948480");
|
|
|
|
|
|
list.add("002212023121209440010580463004163751936");
|
|
|
|
|
|
list.add("002212023121210084110580469215695687680");
|
|
|
|
|
|
list.add("002212023121210491210580479412620050432");
|
|
|
|
|
|
list.add("002212023121210492410580479463797559296");
|
|
|
|
|
|
list.add("002212023121211172610580486515963281408");
|
|
|
|
|
|
list.add("002212023121211201310580487218772008960");
|
|
|
|
|
|
list.add("002212023121211480510580494231400833024");
|
|
|
|
|
|
list.add("002212023121212190510580502030662459392");
|
|
|
|
|
|
list.add("002212023121213030910580513122443366400");
|
|
|
|
|
|
list.add("002212023121213162310580516450848428032");
|
|
|
|
|
|
list.add("002212023121213541610580525987152224256");
|
|
|
|
|
|
list.add("002212023121214330810580535766667694080");
|
|
|
|
|
|
list.add("002212023121219040710580603961392345088");
|
|
|
|
|
|
list.add("002212023121220352810580626951314444288");
|
|
|
|
|
|
list.add("002212023121221113810580636051451375616");
|
|
|
|
|
|
list.add("002212023121221152210580636992279539712");
|
|
|
|
|
|
list.add("002212023121221254010580639584063352832");
|
|
|
|
|
|
list.add("002212023121222120010580651243651084288");
|
|
|
|
|
|
list.add("002212023121222121310580651297641967616");
|
|
|
|
|
|
list.add("002212023121222122310580651341997871104");
|
|
|
|
|
|
list.add("002212023121222420410580658808698552320");
|
|
|
|
|
|
list.add("002212023121222424410580658978105024512");
|
|
|
|
|
|
list.add("002212023121223115610580666325955612672");
|
|
|
|
|
|
list.add("002212023121223144210580667023682637824");
|
|
|
|
|
|
list.add("002212023121223501310580675962616111104");
|
|
|
|
|
|
list.add("002212023121223514910580676363618988032");
|
|
|
|
|
|
list.add("002212023121302594810580723671632556032");
|
|
|
|
|
|
list.add("002212023121303025510580724455282962432");
|
|
|
|
|
|
list.add("002212023121303081410580725793858883584");
|
|
|
|
|
|
list.add("002212023121307285610580791400134807552");
|
|
|
|
|
|
list.add("002212023121307501510580796763115761664");
|
|
|
|
|
|
list.add("002212023121308013610580799622236966912");
|
|
|
|
|
|
list.add("002212023121308221610580804820427718656");
|
|
|
|
|
|
list.add("002212023121308351810580808103455199232");
|
|
|
|
|
|
list.add("002212023121308474910580811254404702208");
|
|
|
|
|
|
list.add("002212023121308522310580812402804355072");
|
|
|
|
|
|
list.add("002212023121308592610580814174129508352");
|
|
|
|
|
|
list.add("002212023121309262710580820972803420160");
|
|
|
|
|
|
list.add("002212023121309592010580829252140019712");
|
|
|
|
|
|
list.add("002212023121310272510580836316151648256");
|
|
|
|
|
|
list.add("002212023121310315410580837446757265408");
|
|
|
|
|
|
list.add("002212023121311011510580844831170932736");
|
|
|
|
|
|
list.add("002212023121311114210580847460076089344");
|
|
|
|
|
|
list.add("002212023121311145310580848261539672064");
|
|
|
|
|
|
list.add("002212023121311330510580852843329073152");
|
|
|
|
|
|
list.add("002212023121312064110580861300710600704");
|
|
|
|
|
|
list.add("002212023121313295310580882237125148672");
|
|
|
|
|
|
list.add("002212023121314271810580896686473068544");
|
|
|
|
|
|
list.add("002212023121314423610580900537194622976");
|
|
|
|
|
|
list.add("002212023121315012210580905257675026432");
|
|
|
|
|
|
list.add("002212023121315105610580907665159557120");
|
|
|
|
|
|
list.add("002212023121315471510580916806122754048");
|
|
|
|
|
|
list.add("002212023121315484410580917178366017536");
|
|
|
|
|
|
list.add("002212023121316124110580923204981862400");
|
|
|
|
|
|
list.add("002212023121316300110580927567453089792");
|
|
|
|
|
|
list.add("002212023121318584910580965015618424832");
|
|
|
|
|
|
list.add("002212023121320124210580983609426849792");
|
|
|
|
|
|
list.add("002212023121321311310581003367337017344");
|
|
|
|
|
|
list.add("002212023121321361110581004617344466944");
|
|
|
|
|
|
list.add("002212023121321435210581006553450909696");
|
|
|
|
|
|
list.add("002212023121321445010581006794662752256");
|
|
|
|
|
|
list.add("002212023121321452910581006960051994624");
|
|
|
|
|
|
list.add("002212023121321465310581007311353442304");
|
|
|
|
|
|
list.add("002212023121321594810581010563289608192");
|
|
|
|
|
|
list.add("002212023121322415910581021177822535680");
|
|
|
|
|
|
list.add("002212023121322425810581021424882307072");
|
|
|
|
|
|
list.add("002212023121322491010581022983043354624");
|
|
|
|
|
|
list.add("002212023121402161910581075116727164928");
|
|
|
|
|
|
list.add("002212023121403133910581089544023453696");
|
|
|
|
|
|
list.add("002212023121408292610581169012704653312");
|
|
|
|
|
|
list.add("002212023121408325610581169893547405312");
|
|
|
|
|
|
list.add("002212023121408451910581173011870167040");
|
|
|
|
|
|
list.add("002212023121408522710581174805199368192");
|
|
|
|
|
|
list.add("002212023121408565610581175935322058752");
|
|
|
|
|
|
list.add("002212023121409285510581183983603638272");
|
|
|
|
|
|
list.add("002212023121409300910581184295362654208");
|
|
|
|
|
|
list.add("002212023121410181910581196417071443968");
|
|
|
|
|
|
list.add("002212023121410235610581197828180525056");
|
|
|
|
|
|
list.add("002212023121411052610581208271198728192");
|
|
|
|
|
|
list.add("002212023121411201910581212017031340032");
|
|
|
|
|
|
list.add("002212023121411234010581212859754721280");
|
|
|
|
|
|
list.add("002212023121411334410581215396250906624");
|
|
|
|
|
|
list.add("002212023121412113910581224936495058944");
|
|
|
|
|
|
list.add("002212023121415005310581267524569935872");
|
|
|
|
|
|
list.add("002212023121415373110581276745931829248");
|
|
|
|
|
|
list.add("002212023121416082110581284504182075392");
|
|
|
|
|
|
list.add("002212023121416345810581291204236390400");
|
|
|
|
|
|
list.add("002212023121417311810581305379842994176");
|
|
|
|
|
|
list.add("002212023121419552410581341641112530944");
|
|
|
|
|
|
list.add("002212023121420253610581349241205575680");
|
|
|
|
|
|
list.add("002212023121420375010581352323017306112");
|
|
|
|
|
|
list.add("002212023121421092610581360275758977024");
|
|
|
|
|
|
list.add("002212023121421181210581362481434038272");
|
|
|
|
|
|
list.add("002212023121421302610581365558048485376");
|
|
|
|
|
|
list.add("002212023121421355010581366916691226624");
|
|
|
|
|
|
list.add("002212023121421435510581368953121558528");
|
|
|
|
|
|
list.add("002212023121421440710581369002284912640");
|
|
|
|
|
|
list.add("002212023121421481610581370046317703168");
|
|
|
|
|
|
list.add("002212023121422122910581376140108328960");
|
|
|
|
|
|
list.add("002212023121422313310581380938438586368");
|
|
|
|
|
|
list.add("002212023121422354010581381974695981056");
|
|
|
|
|
|
list.add("002212023121502391210581443261349720064");
|
|
|
|
|
|
list.add("002212023121507030510581509671791210496");
|
|
|
|
|
|
list.add("002212023121508325010581532256291373056");
|
|
|
|
|
|
list.add("002212023121508325410581532273510576128");
|
|
|
|
|
|
list.add("002212023121509004310581539274556469248");
|
|
|
|
|
|
list.add("002212023121509032110581539935107280896");
|
|
|
|
|
|
list.add("002212023121509200410581544145260752896");
|
|
|
|
|
|
list.add("002212023121509583110581553821701599232");
|
|
|
|
|
|
list.add("002212023121510294810581561693216681984");
|
|
|
|
|
|
list.add("002212023121510515010581567236747923456");
|
|
|
|
|
|
list.add("002212023121511081110581571353124032512");
|
|
|
|
|
|
list.add("002212023121511132910581572687621107712");
|
|
|
|
|
|
list.add("002212023121511193210581574208930230272");
|
|
|
|
|
|
list.add("002212023121511474810581581321485660160");
|
|
|
|
|
|
list.add("002212023121511502110581581964376391680");
|
|
|
|
|
|
list.add("002212023121512511310581597281397370880");
|
|
|
|
|
|
list.add("002212023121513034510581600435602763776");
|
|
|
|
|
|
list.add("002212023121513271310581606342676406272");
|
|
|
|
|
|
list.add("002212023121513383410581609196818411520");
|
|
|
|
|
|
list.add("002212023121513393810581609466071986176");
|
|
|
|
|
|
list.add("002212023121514185010581619332859518976");
|
|
|
|
|
|
list.add("002212023121514324610581622839646384128");
|
|
|
|
|
|
list.add("002212023121515461010581641307515498496");
|
|
|
|
|
|
list.add("002212023121516093410581647198351482880");
|
|
|
|
|
|
list.add("002212023121516363810581654009447411712");
|
|
|
|
|
|
list.add("002212023121517093910581662320217157632");
|
|
|
|
|
|
list.add("002212023121518412110581685393536446464");
|
|
|
|
|
|
list.add("002212023121519332210581698484783050752");
|
|
|
|
|
|
list.add("002212023121519364310581699328589807616");
|
|
|
|
|
|
list.add("002212023121519564210581704356056903680");
|
|
|
|
|
|
list.add("002212023121521222710581725936566517760");
|
|
|
|
|
|
list.add("002212023121521412510581730711239684096");
|
|
|
|
|
|
list.add("002212023121521512810581733240422248448");
|
|
|
|
|
|
list.add("002212023121521535310581733847677112320");
|
|
|
|
|
|
list.add("002212023121608343910581895103848099840");
|
|
|
|
|
|
list.add("002212023121608382810581896064525021184");
|
|
|
|
|
|
list.add("002212023121609012410581901835084959744");
|
|
|
|
|
|
list.add("002212023121609591510581916391755591680");
|
|
|
|
|
|
list.add("002212023121610090510581918868965650432");
|
|
|
|
|
|
list.add("002212023121610305610581924367685611520");
|
|
|
|
|
|
list.add("002212023121610384410581926330222612480");
|
|
|
|
|
|
list.add("002212023121610405010581926858080325632");
|
|
|
|
|
|
list.add("002212023121611144510581935393710903296");
|
|
|
|
|
|
list.add("002212023121611185410581936438317543424");
|
|
|
|
|
|
list.add("002212023121611255510581938203060277248");
|
|
|
|
|
|
list.add("002212023121611274810581938678515912704");
|
|
|
|
|
|
list.add("002212023121611365110581940956511035392");
|
|
|
|
|
|
list.add("002212023121612094610581949239497699328");
|
|
|
|
|
|
list.add("002212023121612262910581953443749449728");
|
|
|
|
|
|
list.add("002212023121613273910581968837879205888");
|
|
|
|
|
|
list.add("002212023121613572510581976329527209984");
|
|
|
|
|
|
list.add("002212023121614284410581984211210186752");
|
|
|
|
|
|
list.add("002212023121615051210581993388187545600");
|
|
|
|
|
|
list.add("002212023121615355010582001095835762688");
|
|
|
|
|
|
list.add("002212023121615472110582003994335490048");
|
|
|
|
|
|
list.add("002212023121618390210582047200957280256");
|
|
|
|
|
|
list.add("002212023121620173710582072008322707456");
|
|
|
|
|
|
list.add("002212023121620420110582078152006537216");
|
|
|
|
|
|
list.add("002212023121621095910582085188689883136");
|
|
|
|
|
|
list.add("002212023121621233810582088623412785152");
|
|
|
|
|
|
list.add("002212023121621300110582090230016204800");
|
|
|
|
|
|
list.add("002212023121621444010582093917506269184");
|
|
|
|
|
|
list.add("002212023121621481910582094834803716096");
|
|
|
|
|
|
list.add("002212023121622250610582104093652561920");
|
|
|
|
|
|
list.add("002212023121622385010582107548334026752");
|
|
|
|
|
|
list.add("002212023121623015710582113367368790016");
|
|
|
|
|
|
list.add("002212023121623314910582120883815124992");
|
|
|
|
|
|
list.add("002212023121700154710582131947517915136");
|
|
|
|
|
|
list.add("002212023121705160810582207533949677568");
|
|
|
|
|
|
list.add("002212023121707490310582246015694827520");
|
|
|
|
|
|
list.add("002212023121708261510582255375358668800");
|
|
|
|
|
|
list.add("002212023121708304010582256488742367232");
|
|
|
|
|
|
list.add("002212023121708344110582257496946683904");
|
|
|
|
|
|
list.add("002212023121709320410582271939242471424");
|
|
|
|
|
|
list.add("002212023121709544510582277646664183808");
|
|
|
|
|
|
list.add("002212023121710060810582280512180961280");
|
|
|
|
|
|
list.add("002212023121710304510582286708058378240");
|
|
|
|
|
|
list.add("002212023121710340410582287540993765376");
|
|
|
|
|
|
list.add("002212023121711201910582299183036739584");
|
|
|
|
|
|
list.add("002212023121711202810582299220792795136");
|
|
|
|
|
|
list.add("002212023121711264510582300802053009408");
|
|
|
|
|
|
list.add("002212023121712132110582312526828736512");
|
|
|
|
|
|
list.add("002212023121712155010582313151569551360");
|
|
|
|
|
|
list.add("002212023121712370810582318511703568384");
|
|
|
|
|
|
list.add("002212023121712441910582320318986039296");
|
|
|
|
|
|
list.add("002212023121713192810582329168455299072");
|
|
|
|
|
|
list.add("002212023121715245310582360728584302592");
|
|
|
|
|
|
list.add("002212023121716250910582375893852336128");
|
|
|
|
|
|
list.add("002212023121716412810582380003325399040");
|
|
|
|
|
|
list.add("002212023121718482510582411947837796352");
|
|
|
|
|
|
list.add("002212023121721323610582453267352629248");
|
|
|
|
|
|
list.add("002212023121721400010582455131487318016");
|
|
|
|
|
|
list.add("002212023121721423210582455767207006208");
|
|
|
|
|
|
list.add("002212023121721530010582458402749394944");
|
|
|
|
|
|
list.add("002212023121722360610582469246167924736");
|
|
|
|
|
|
list.add("002212023121722472010582472073651269632");
|
|
|
|
|
|
list.add("002212023121723455910582486836745646080");
|
|
|
|
|
|
list.add("002212023121723580910582489898267725824");
|
|
|
|
|
|
list.add("002212023121800412410582500781314117632");
|
|
|
|
|
|
list.add("002212023121800492110582502779560898560");
|
|
|
|
|
|
list.add("002212023121802051410582521877925400576");
|
|
|
|
|
|
list.add("002212023121802204410582525778135838720");
|
|
|
|
|
|
list.add("002212023121802463510582532283328212992");
|
|
|
|
|
|
list.add("002212023121808385310582620945413353472");
|
|
|
|
|
|
list.add("002212023121808405710582621463794700288");
|
|
|
|
|
|
list.add("002212023121809082710582628386160013312");
|
|
|
|
|
|
list.add("002212023121810052210582642707750858752");
|
|
|
|
|
|
list.add("002212023121810055410582642840677773312");
|
|
|
|
|
|
list.add("002212023121810580610582655977273364480");
|
|
|
|
|
|
list.add("002212023121811092310582658816958230529");
|
|
|
|
|
|
list.add("002212023121811141510582660042716463104");
|
|
|
|
|
|
list.add("002212023121811230410582662260499001344");
|
|
|
|
|
|
list.add("002212023121811352710582665376683290624");
|
|
|
|
|
|
list.add("002212023121812031710582672382979588096");
|
|
|
|
|
|
list.add("002212023121812254010582678015439679488");
|
|
|
|
|
|
list.add("002212023121812280610582678626487087104");
|
|
|
|
|
|
list.add("002212023121813194510582691624325238784");
|
|
|
|
|
|
list.add("002212023121813303610582694356645425152");
|
|
|
|
|
|
list.add("002212023121813593710582701657814577152");
|
|
|
|
|
|
list.add("002212023121814303410582709446897930240");
|
|
|
|
|
|
list.add("002212023121816301110582739549856952320");
|
|
|
|
|
|
list.add("002212023121817172010582751415201284096");
|
|
|
|
|
|
list.add("002212023121818152010582766012862521344");
|
|
|
|
|
|
list.add("002212023121818342510582770813649858560");
|
|
|
|
|
|
list.add("002212023121820074310582794296134578176");
|
|
|
|
|
|
list.add("002212023121822030510582823326634577920");
|
|
|
|
|
|
list.add("002212023121822080310582824578658709504");
|
|
|
|
|
|
list.add("002212023121822314110582830524696997888");
|
|
|
|
|
|
list.add("002212023121823160110582841682073350144");
|
|
|
|
|
|
list.add("002212023121823173710582842082330783744");
|
|
|
|
|
|
list.add("002212023121900053910582854171566759936");
|
|
|
|
|
|
list.add("002212023121901400310582877927294332928");
|
|
|
|
|
|
list.add("002212023121902104110582885637741367296");
|
|
|
|
|
|
list.add("002212023121903385410582907837830512640");
|
|
|
|
|
|
list.add("002212023121908435310582984590220791808");
|
|
|
|
|
|
list.add("002212023121908452110582984956693909504");
|
|
|
|
|
|
list.add("002212023121908591410582988452229509120");
|
|
|
|
|
|
list.add("002212023121909033410582989544166567936");
|
|
|
|
|
|
list.add("002212023121909551210583002536778248192");
|
|
|
|
|
|
list.add("002212023121910050510583005026181492736");
|
|
|
|
|
|
list.add("002212023121911054010583020270946643968");
|
|
|
|
|
|
list.add("002212023121911070410583020623740030976");
|
|
|
|
|
|
list.add("002212023121911321410583026956708196352");
|
|
|
|
|
|
list.add("002212023121912205710583039215703928832");
|
|
|
|
|
|
list.add("002212023121912292810583041357825814528");
|
|
|
|
|
|
list.add("002212023121912330010583042249770692608");
|
|
|
|
|
|
list.add("002212023121913595110583064105854054400");
|
|
|
|
|
|
list.add("002212023121914000010583064141275983872");
|
|
|
|
|
|
list.add("002212023121914112910583067032168673280");
|
|
|
|
|
|
list.add("002212023121914132410583067514454609920");
|
|
|
|
|
|
list.add("002212023121915111810583082085361487872");
|
|
|
|
|
|
list.add("002212023121915342610583087908158541824");
|
|
|
|
|
|
list.add("002212023121916045110583095564595064832");
|
|
|
|
|
|
list.add("002212023121918171910583128898456645632");
|
|
|
|
|
|
list.add("002212023121918263510583131228973068288");
|
|
|
|
|
|
list.add("002212023121918400010583134607358922752");
|
|
|
|
|
|
list.add("002212023121918404110583134781020946432");
|
|
|
|
|
|
list.add("002212023121918473710583136524882526208");
|
|
|
|
|
|
list.add("002212023121919123010583142786015293440");
|
|
|
|
|
|
list.add("002212023121919205610583144909562408960");
|
|
|
|
|
|
list.add("002212023121920184010583159436989149184");
|
|
|
|
|
|
list.add("002212023121920210010583160025263239168");
|
|
|
|
|
|
list.add("002212023121920524810583168025848147968");
|
|
|
|
|
|
list.add("002212023121921402110583179993520914432");
|
|
|
|
|
|
list.add("002212023121922142710583188574933233664");
|
|
|
|
|
|
list.add("002212023121922152010583188796339351552");
|
|
|
|
|
|
list.add("002212023121922243910583191143658668032");
|
|
|
|
|
|
list.add("002212023121922385310583194724197183488");
|
|
|
|
|
|
list.add("002212023121923071810583201875339882496");
|
|
|
|
|
|
list.add("002212023122000592710583230099554693120");
|
|
|
|
|
|
list.add("002212023122001161810583234337888514048");
|
|
|
|
|
|
list.add("002212023122001191010583235059753095168");
|
|
|
|
|
|
list.add("002212023122002361110583254442870681600");
|
|
|
|
|
|
list.add("002212023122003004710583260635204640768");
|
|
|
|
|
|
list.add("002212023122007311910583328717085020160");
|
|
|
|
|
|
list.add("002212023122008181110583340510026510336");
|
|
|
|
|
|
list.add("002212023122008573810583350436522643456");
|
|
|
|
|
|
list.add("002212023122009043510583352188457824256");
|
|
|
|
|
|
list.add("002212023122009082910583353167283351552");
|
|
|
|
|
|
list.add("002212023122009310710583358864893718528");
|
|
|
|
|
|
list.add("002212023122009411910583361430838947840");
|
|
|
|
|
|
list.add("002212023122009472410583362962873237504");
|
|
|
|
|
|
list.add("002212023122009472610583362969396596736");
|
|
|
|
|
|
list.add("002212023122010030510583366907735945216");
|
|
|
|
|
|
list.add("002212023122010062610583367750711730176");
|
|
|
|
|
|
list.add("002212023122010063710583367796657602560");
|
|
|
|
|
|
list.add("002212023122010344510583374875991937024");
|
|
|
|
|
|
list.add("002212023122010352010583375024101199872");
|
|
|
|
|
|
list.add("002212023122010484310583378392983252992");
|
|
|
|
|
|
list.add("002212023122011112210583384093588045824");
|
|
|
|
|
|
list.add("002212023122011201610583386334666526720");
|
|
|
|
|
|
list.add("002212023122011344410583389974361497600");
|
|
|
|
|
|
list.add("002212023122012023010583396960843436032");
|
|
|
|
|
|
list.add("002212023122012042010583397421539676160");
|
|
|
|
|
|
list.add("002212023122014325210583434802767638528");
|
|
|
|
|
|
list.add("002212023122017551110583485715237154816");
|
|
|
|
|
|
list.add("002212023122017573710583486329940586496");
|
|
|
|
|
|
list.add("002212023122018492410583499362377515008");
|
|
|
|
|
|
list.add("002212023122018580310583501537523814400");
|
|
|
|
|
|
list.add("002212023122020462510583528810081116160");
|
|
|
|
|
|
list.add("002212023122021020810583532766214975488");
|
|
|
|
|
|
list.add("002212023122021245310583538491216474112");
|
|
|
|
|
|
list.add("002212023122021293710583539681751707648");
|
|
|
|
|
|
list.add("002212023122021542910583545940224880640");
|
|
|
|
|
|
list.add("002212023122021545810583546062014103552");
|
|
|
|
|
|
list.add("002212023122022085810583549584345247744");
|
|
|
|
|
|
list.add("002212023122022180010583551856086315008");
|
|
|
|
|
|
list.add("002212023122022404310583557575298891776");
|
|
|
|
|
|
list.add("002212023122022444710583558596115927040");
|
|
|
|
|
|
list.add("002212023122022480810583559439522947072");
|
|
|
|
|
|
list.add("002212023122100524110583590784020361216");
|
|
|
|
|
|
list.add("002212023122101221610583598227033624576");
|
|
|
|
|
|
list.add("002212023122102090410583610007499005952");
|
|
|
|
|
|
list.add("002212023122103250810583629148186357760");
|
|
|
|
|
|
list.add("002212023122104013510583638322282868736");
|
|
|
|
|
|
list.add("002212023122107333510583691674918019072");
|
|
|
|
|
|
list.add("002212023122108292810583705736932601856");
|
|
|
|
|
|
list.add("002212023122108503710583711060443672576");
|
|
|
|
|
|
list.add("002212023122109025510583714155158089728");
|
|
|
|
|
|
list.add("002212023122109230410583719225477939200");
|
|
|
|
|
|
list.add("002212023122109511310583726309822558208");
|
|
|
|
|
|
list.add("002212023122109584010583728185840177152");
|
|
|
|
|
|
list.add("002212023122110190010583733304212090880");
|
|
|
|
|
|
list.add("002212023122110273710583735470592733184");
|
|
|
|
|
|
list.add("002212023122110385310583738307270176768");
|
|
|
|
|
|
list.add("002212023122110450210583739852857585664");
|
|
|
|
|
|
list.add("002212023122110465810583740339556671488");
|
|
|
|
|
|
list.add("002212023122110480210583740606855032832");
|
|
|
|
|
|
list.add("002212023122110572610583742972590493696");
|
|
|
|
|
|
list.add("002212023122111434910583754645722492928");
|
|
|
|
|
|
list.add("002212023122111475010583755659666829312");
|
|
|
|
|
|
list.add("002212023122111575210583758182945796096");
|
|
|
|
|
|
list.add("002212023122112043810583759885454307328");
|
|
|
|
|
|
list.add("002212023122112065610583760465673162752");
|
|
|
|
|
|
list.add("002212023122112091810583761060512362496");
|
|
|
|
|
|
list.add("002212023122112114210583761663776763904");
|
|
|
|
|
|
list.add("002212023122112152710583762606763847680");
|
|
|
|
|
|
list.add("002212023122112170510583763019538325504");
|
|
|
|
|
|
list.add("002212023122112280210583765775578140672");
|
|
|
|
|
|
list.add("002212023122112392210583768628098281472");
|
|
|
|
|
|
list.add("002212023122113045810583775069833506816");
|
|
|
|
|
|
list.add("002212023122113073710583775736938508288");
|
|
|
|
|
|
list.add("002212023122113430710583784670095765504");
|
|
|
|
|
|
list.add("002212023122117431310583845091130880000");
|
|
|
|
|
|
list.add("002212023122118041910583850402462584832");
|
|
|
|
|
|
list.add("002212023122120112910583882404281823232");
|
|
|
|
|
|
list.add("002212023122121035610583895604787171328");
|
|
|
|
|
|
list.add("002212023122121514510583907640214581248");
|
|
|
|
|
|
list.add("002212023122122050610583910997375709184");
|
|
|
|
|
|
list.add("002212023122122332110583918108680499200");
|
|
|
|
|
|
list.add("002212023122122341010583918315097403392");
|
|
|
|
|
|
list.add("002212023122122410210583920039398694912");
|
|
|
|
|
|
list.add("002212023122123051310583926125685747712");
|
|
|
|
|
|
list.add("002212023122123080510583926848964485120");
|
|
|
|
|
|
list.add("002212023122200210210583945208609517568");
|
|
|
|
|
|
list.add("002212023122200300810583947495997419520");
|
|
|
|
|
|
list.add("002212023122200303410583947606101790720");
|
|
|
|
|
|
list.add("002212023122200440610583951012515655680");
|
|
|
|
|
|
list.add("002212023122201562910583969227788881920");
|
|
|
|
|
|
list.add("002212023122202024910583970823528976384");
|
|
|
|
|
|
list.add("002212023122203165910583989485270929408");
|
|
|
|
|
|
list.add("002212023122204193610584005245095579648");
|
|
|
|
|
|
list.add("002212023122204251710584006674207838208");
|
|
|
|
|
|
list.add("002212023122206270410584037322869030912");
|
|
|
|
|
|
list.add("002212023122207524910584058902814769152");
|
|
|
|
|
|
list.add("002212023122207574510584060144618942464");
|
|
|
|
|
|
list.add("002212023122209102310584078423493750784");
|
|
|
|
|
|
list.add("002212023122209310110584083615666520064");
|
|
|
|
|
|
list.add("002212023122209323610584084013307510784");
|
|
|
|
|
|
list.add("002212023122209383110584085502279331840");
|
|
|
|
|
|
list.add("002212023122210042310584092011484131328");
|
|
|
|
|
|
list.add("002212023122210055910584092412681891840");
|
|
|
|
|
|
list.add("002212023122210441710584102052160704512");
|
|
|
|
|
|
list.add("002212023122211160610584110057879269376");
|
|
|
|
|
|
list.add("002212023122211382010584115654300381184");
|
|
|
|
|
|
list.add("002212023122211533010584119471955881984");
|
|
|
|
|
|
list.add("002212023122211582910584120724685025280");
|
|
|
|
|
|
list.add("002212023122212045810584122359145410560");
|
|
|
|
|
|
list.add("002212023122212274010584128072189882368");
|
|
|
|
|
|
list.add("002212023122212301110584128703220461568");
|
|
|
|
|
|
list.add("002212023122212334610584129604497137664");
|
|
|
|
|
|
list.add("002212023122213193310584141127505788928");
|
|
|
|
|
|
list.add("002212023122215153210584170315255582720");
|
|
|
|
|
|
list.add("002212023122215350510584175233375518720");
|
|
|
|
|
|
list.add("002212023122216160810584185566612381696");
|
|
|
|
|
|
list.add("002212023122217114210584199550624010241");
|
|
|
|
|
|
list.add("002212023122219142310584230424297885696");
|
|
|
|
|
|
list.add("002212023122220080510584243937146531840");
|
|
|
|
|
|
list.add("002212023122220384110584251640605421568");
|
|
|
|
|
|
list.add("002212023122221363410584266205957746688");
|
|
|
|
|
|
list.add("002212023122221583910584271763315503104");
|
|
|
|
|
|
list.add("002212023122222132910584275497784422400");
|
|
|
|
|
|
list.add("002212023122222172210584276472739786752");
|
|
|
|
|
|
list.add("002212023122222211810584277464320532480");
|
|
|
|
|
|
list.add("002212023122222471610584283999064010752");
|
|
|
|
|
|
list.add("002212023122222505810584284930663624704");
|
|
|
|
|
|
list.add("002212023122223270210584294006365728768");
|
|
|
|
|
|
list.add("002212023122300212610584307694270173184");
|
|
|
|
|
|
list.add("002212023122301033110584318285287305216");
|
|
|
|
|
|
list.add("002212023122301541010584331034222096384");
|
|
|
|
|
|
list.add("002212023122301562210584331584574689280");
|
|
|
|
|
|
list.add("002212023122302000410584332516937191424");
|
|
|
|
|
|
list.add("002212023122307352310584416903288606720");
|
|
|
|
|
|
list.add("002212023122307592710584422960749654016");
|
|
|
|
|
|
list.add("002212023122308271510584429956796657664");
|
|
|
|
|
|
list.add("002212023122308294110584430567167602688");
|
|
|
|
|
|
list.add("002212023122308531010584436476397629440");
|
|
|
|
|
|
list.add("002212023122309263510584444888465035264");
|
|
|
|
|
|
list.add("002212023122309373110584447639962742784");
|
|
|
|
|
|
list.add("002212023122311191710584473249179545600");
|
|
|
|
|
|
list.add("002212023122311541010584482026485207040");
|
|
|
|
|
|
list.add("002212023122312083710584485665388933120");
|
|
|
|
|
|
list.add("002212023122312113410584486406378336256");
|
|
|
|
|
|
list.add("002212023122312411010584493855317385216");
|
|
|
|
|
|
list.add("002212023122313241910584504715657719808");
|
|
|
|
|
|
list.add("002212023122313395410584508635968745472");
|
|
|
|
|
|
list.add("002212023122314221810584519307937558528");
|
|
|
|
|
|
list.add("002212023122314572910584528160301363200");
|
|
|
|
|
|
list.add("002212023122315293210584536226880253952");
|
|
|
|
|
|
list.add("002212023122315400410584538875010461696");
|
|
|
|
|
|
list.add("002212023122317200510584564048682004480");
|
|
|
|
|
|
list.add("002212023122317490310584571336133906432");
|
|
|
|
|
|
list.add("002212023122318335710584582637588017152");
|
|
|
|
|
|
list.add("002212023122318561010584588225654312960");
|
|
|
|
|
|
list.add("002212023122321003810584619550218514432");
|
|
|
|
|
|
list.add("002212023122321113210584622291849687040");
|
|
|
|
|
|
list.add("002212023122322045810584635739231064064");
|
|
|
|
|
|
list.add("002212023122322050810584635782800715776");
|
|
|
|
|
|
list.add("002212023122322232110584640367465361408");
|
|
|
|
|
|
list.add("002212023122322282410584641639094448128");
|
|
|
|
|
|
list.add("002212023122322343810584643206528249856");
|
|
|
|
|
|
list.add("002212023122322430510584645331926867968");
|
|
|
|
|
|
list.add("002212023122322534710584648026784370688");
|
|
|
|
|
|
list.add("002212023122323011010584649881627422720");
|
|
|
|
|
|
list.add("002212023122323045310584650817480536064");
|
|
|
|
|
|
list.add("002212023122323451810584660991642464256");
|
|
|
|
|
|
list.add("002212023122323533610584663077394345984");
|
|
|
|
|
|
list.add("002212023122400060810584666233271185408");
|
|
|
|
|
|
list.add("002212023122400353310584673636273819648");
|
|
|
|
|
|
list.add("002212023122401160610584683841993424896");
|
|
|
|
|
|
list.add("002212023122401164010584683985111068672");
|
|
|
|
|
|
list.add("002212023122401200910584684860410540032");
|
|
|
|
|
|
list.add("002212023122402213510584700317957337088");
|
|
|
|
|
|
list.add("002212023122403111010584712800015446016");
|
|
|
|
|
|
list.add("002212023122408051710584786815833190400");
|
|
|
|
|
|
list.add("002212023122408293310584792920386744320");
|
|
|
|
|
|
list.add("002212023122408481010584797608951017472");
|
|
|
|
|
|
list.add("002212023122408563910584799740487921664");
|
|
|
|
|
|
list.add("002212023122409110710584803384402399232");
|
|
|
|
|
|
list.add("002212023122409302610584808242135576576");
|
|
|
|
|
|
list.add("002212023122409503310584813306582528000");
|
|
|
|
|
|
list.add("002212023122409593110584815562577375232");
|
|
|
|
|
|
list.add("002212023122410171210584820011009331200");
|
|
|
|
|
|
list.add("002212023122410390010584825499741990912");
|
|
|
|
|
|
list.add("002212023122410592610584830642988101632");
|
|
|
|
|
|
list.add("002212023122411462310584842457423851520");
|
|
|
|
|
|
list.add("002212023122411525310584844093844140032");
|
|
|
|
|
|
list.add("002212023122411554310584844805538869248");
|
|
|
|
|
|
list.add("002212023122411560910584844914322509824");
|
|
|
|
|
|
list.add("002212023122413411710584871370164908032");
|
|
|
|
|
|
list.add("002212023122414213910584881529399144448");
|
|
|
|
|
|
list.add("002212023122414433810584887063809986560");
|
|
|
|
|
|
list.add("002212023122414460910584887697938014208");
|
|
|
|
|
|
list.add("002212023122416253010584912697079230464");
|
|
|
|
|
|
list.add("002212023122419005810584951823580147712");
|
|
|
|
|
|
list.add("002212023122421082610584983902988124160");
|
|
|
|
|
|
list.add("002212023122421193710584986715469582336");
|
|
|
|
|
|
list.add("002212023122421234510584987757734637568");
|
|
|
|
|
|
list.add("002212023122421420110584992352274419712");
|
|
|
|
|
|
list.add("002212023122422043210584998017923485696");
|
|
|
|
|
|
list.add("002212023122422170710585001187226529792");
|
|
|
|
|
|
list.add("002212023122422435410585007926978064384");
|
|
|
|
|
|
list.add("002212023122423165210585016223968374784");
|
|
|
|
|
|
list.add("002212023122423440010585023052836352000");
|
|
|
|
|
|
list.add("002212023122500195410585032086286983168");
|
|
|
|
|
|
list.add("002212023122500500710585039691472982016");
|
|
|
|
|
|
list.add("002212023122502204410585062495832895488");
|
|
|
|
|
|
list.add("002212023122502471310585069157562757120");
|
|
|
|
|
|
list.add("002212023122506344310585126412824711168");
|
|
|
|
|
|
list.add("002212023122507072910585134659044073472");
|
|
|
|
|
|
list.add("002212023122508095510585150369067806720");
|
|
|
|
|
|
list.add("002212023122508252810585154281013800960");
|
|
|
|
|
|
list.add("002212023122508311610585155743311564800");
|
|
|
|
|
|
list.add("002212023122508564910585162172378484736");
|
|
|
|
|
|
list.add("002212023122509141410585166555218292736");
|
|
|
|
|
|
list.add("002212023122509285010585170227203366912");
|
|
|
|
|
|
list.add("002212023122509594310585178001748111360");
|
|
|
|
|
|
list.add("002212023122511015410585193651087372288");
|
|
|
|
|
|
list.add("002212023122511035610585194160480366592");
|
|
|
|
|
|
list.add("002212023122511185910585197948225941504");
|
|
|
|
|
|
list.add("002212023122511220910585198744677773312");
|
|
|
|
|
|
list.add("002212023122511393710585203143051800576");
|
|
|
|
|
|
list.add("002212023122511522410585206359421456384");
|
|
|
|
|
|
list.add("002212023122512062810585209899011567616");
|
|
|
|
|
|
list.add("002212023122512115810585211281355591680");
|
|
|
|
|
|
list.add("002212023122512521210585221406319947776");
|
|
|
|
|
|
list.add("002212023122512544610585222054678990848");
|
|
|
|
|
|
list.add("002212023122513194710585228349940838400");
|
|
|
|
|
|
list.add("002212023122515521110585266700598603776");
|
|
|
|
|
|
list.add("002212023122516185110585273412982370304");
|
|
|
|
|
|
list.add("002212023122516212410585274053458333696");
|
|
|
|
|
|
list.add("002212023122520073010585330955440402432");
|
|
|
|
|
|
list.add("002212023122520361710585338197854236672");
|
|
|
|
|
|
list.add("002212023122520490310585341410061955072");
|
|
|
|
|
|
list.add("002212023122521055510585345654570201088");
|
|
|
|
|
|
list.add("002212023122521085710585346418383892480");
|
|
|
|
|
|
list.add("002212023122521105310585346906542530560");
|
|
|
|
|
|
list.add("002212023122521301410585351773677273088");
|
|
|
|
|
|
list.add("002212023122522101210585361833273954304");
|
|
|
|
|
|
list.add("002212023122522203010585364424142733312");
|
|
|
|
|
|
list.add("002212023122522262410585365911105482752");
|
|
|
|
|
|
list.add("002212023122522390810585369114961997824");
|
|
|
|
|
|
list.add("002212023122522575610585373846632247296");
|
|
|
|
|
|
list.add("002212023122523285410585381638789619712");
|
|
|
|
|
|
list.add("002212023122523545910585388204525760512");
|
|
|
|
|
|
list.add("002212023122600255910585396003611979776");
|
|
|
|
|
|
list.add("002212023122601490210585416904250781696");
|
|
|
|
|
|
list.add("002212023122602110110585422435198742528");
|
|
|
|
|
|
list.add("002212023122602215510585425179730886656");
|
|
|
|
|
|
list.add("002212023122602380010585429229062262784");
|
|
|
|
|
|
list.add("002212023122603501810585447421244747776");
|
|
|
|
|
|
list.add("002212023122606032610585480925971083264");
|
|
|
|
|
|
list.add("002212023122608172610585514647969353728");
|
|
|
|
|
|
list.add("002212023122608364610585519512649691136");
|
|
|
|
|
|
list.add("002212023122609305310585533133821251584");
|
|
|
|
|
|
list.add("002212023122609452910585536806683979776");
|
|
|
|
|
|
list.add("002212023122610003410585540604610678784");
|
|
|
|
|
|
list.add("002212023122611050310585556828905418752");
|
|
|
|
|
|
list.add("002212023122611215810585561086189068288");
|
|
|
|
|
|
list.add("002212023122611402810585565742160703488");
|
|
|
|
|
|
list.add("002212023122611520710585568673201876992");
|
|
|
|
|
|
list.add("002212023122612060910585572207311695872");
|
|
|
|
|
|
list.add("002212023122612071310585572475349872640");
|
|
|
|
|
|
list.add("002212023122612370510585579991857213440");
|
|
|
|
|
|
list.add("002212023122612403310585580863132397568");
|
|
|
|
|
|
list.add("002212023122613021510585586322768801792");
|
|
|
|
|
|
list.add("002212023122614002410585600959007551488");
|
|
|
|
|
|
list.add("002212023122614154010585604801391865856");
|
|
|
|
|
|
list.add("002212023122614270210585607660049117184");
|
|
|
|
|
|
list.add("002212023122615171610585620302688808960");
|
|
|
|
|
|
list.add("002212023122616082510585633176485728256");
|
|
|
|
|
|
list.add("002212023122619075310585678341242122240");
|
|
|
|
|
|
list.add("002212023122619245110585682609863258112");
|
|
|
|
|
|
list.add("002212023122620373510585700912233410560");
|
|
|
|
|
|
list.add("002212023122620570910585705838885048320");
|
|
|
|
|
|
list.add("002212023122621282110585713688098226176");
|
|
|
|
|
|
list.add("002212023122621363910585715779095277568");
|
|
|
|
|
|
list.add("002212023122621483810585718795359600640");
|
|
|
|
|
|
list.add("002212023122621522810585719758155984896");
|
|
|
|
|
|
list.add("002212023122621551810585720469388374016");
|
|
|
|
|
|
list.add("002212023122622034010585722576438161408");
|
|
|
|
|
|
list.add("002212023122622060710585723192105005056");
|
|
|
|
|
|
list.add("002212023122622124910585724879739400192");
|
|
|
|
|
|
list.add("002212023122622215510585727170542850048");
|
|
|
|
|
|
list.add("002212023122622472510585733585740279808");
|
|
|
|
|
|
list.add("002212023122700451610585763243649773568");
|
|
|
|
|
|
list.add("002212023122700494010585764351958429696");
|
|
|
|
|
|
list.add("002212023122701003210585767086888873984");
|
|
|
|
|
|
list.add("002212023122701033910585767872711323648");
|
|
|
|
|
|
list.add("002212023122701562610585781155569184768");
|
|
|
|
|
|
list.add("002212023122702534710585795585283158016");
|
|
|
|
|
|
list.add("002212023122708074510585874600004272128");
|
|
|
|
|
|
list.add("002212023122708275910585879692124991488");
|
|
|
|
|
|
list.add("002212023122708390710585882493579145216");
|
|
|
|
|
|
list.add("002212023122708393010585882591251599360");
|
|
|
|
|
|
list.add("002212023122708395310585882684429979648");
|
|
|
|
|
|
list.add("002212023122709594110585902767420231680");
|
|
|
|
|
|
list.add("002212023122710261910585909469710413824");
|
|
|
|
|
|
list.add("002212023122710460510585914446271705088");
|
|
|
|
|
|
list.add("002212023122710535310585916408771317760");
|
|
|
|
|
|
list.add("002212023122710565610585917176607027200");
|
|
|
|
|
|
list.add("002212023122711140010585921468635148288");
|
|
|
|
|
|
list.add("002212023122711175710585922466784940032");
|
|
|
|
|
|
list.add("002212023122711241710585924057345961984");
|
|
|
|
|
|
list.add("002212023122711390010585927763992621056");
|
|
|
|
|
|
list.add("002212023122711392510585927864888442880");
|
|
|
|
|
|
list.add("002212023122711532410585931384799907840");
|
|
|
|
|
|
list.add("002212023122712232710585938949683916800");
|
|
|
|
|
|
list.add("002212023122714262810585969907623636992");
|
|
|
|
|
|
list.add("002212023122715450410585989686742331392");
|
|
|
|
|
|
list.add("002212023122716112210585996307112595456");
|
|
|
|
|
|
list.add("002212023122716155710585997459607924736");
|
|
|
|
|
|
list.add("002212023122716280410586000506926706688");
|
|
|
|
|
|
list.add("002212023122716281810586000565963440128");
|
|
|
|
|
|
list.add("002212023122720540910586067470189293568");
|
|
|
|
|
|
list.add("002212023122721252310586075330122833920");
|
|
|
|
|
|
list.add("002212023122721264810586075688428498944");
|
|
|
|
|
|
list.add("002212023122721275510586075968158846976");
|
|
|
|
|
|
list.add("002212023122721345210586077717352460288");
|
|
|
|
|
|
list.add("002212023122721425410586079739337994240");
|
|
|
|
|
|
list.add("002212023122721562110586083122416300032");
|
|
|
|
|
|
list.add("002212023122722151210586087868494376960");
|
|
|
|
|
|
list.add("002212023122722281110586091132927586304");
|
|
|
|
|
|
list.add("002212023122722311810586091918491062272");
|
|
|
|
|
|
list.add("002212023122722540110586097635054018560");
|
|
|
|
|
|
list.add("002212023122800383910586123965692784640");
|
|
|
|
|
|
list.add("002212023122801465910586141162823331840");
|
|
|
|
|
|
list.add("002212023122801594910586144393818779648");
|
|
|
|
|
|
list.add("002212023122802325410586152717699211264");
|
|
|
|
|
|
list.add("002212023122804101710586177228784734208");
|
|
|
|
|
|
list.add("002212023122808311710586242908244430848");
|
|
|
|
|
|
list.add("002212023122808363810586244255648952320");
|
|
|
|
|
|
list.add("002212023122809075510586252130000588800");
|
|
|
|
|
|
list.add("002212023122809245010586256386332233728");
|
|
|
|
|
|
list.add("002212023122809363410586259340044996608");
|
|
|
|
|
|
list.add("002212023122809570810586264516399443968");
|
|
|
|
|
|
list.add("002212023122810034510586266179582517248");
|
|
|
|
|
|
list.add("002212023122810183410586269908255485952");
|
|
|
|
|
|
list.add("002212023122811042410586281442753261568");
|
|
|
|
|
|
list.add("002212023122811052510586281696876138496");
|
|
|
|
|
|
list.add("002212023122811173610586284764098506752");
|
|
|
|
|
|
list.add("002212023122811181410586284925236482048");
|
|
|
|
|
|
list.add("002212023122811234510586286313236172800");
|
|
|
|
|
|
list.add("002212023122811353710586289299449819136");
|
|
|
|
|
|
list.add("002212023122812060510586296965759348736");
|
|
|
|
|
|
list.add("002212023122813051710586311863415885824");
|
|
|
|
|
|
list.add("002212023122815043810586341898181636096");
|
|
|
|
|
|
list.add("002212023122815363710586349948830945280");
|
|
|
|
|
|
list.add("002212023122816223210586361502474809344");
|
|
|
|
|
|
list.add("002212023122817585710586385766850605056");
|
|
|
|
|
|
list.add("002212023122820033110586417117227347968");
|
|
|
|
|
|
list.add("002212023122820321010586424325882351616");
|
|
|
|
|
|
list.add("002212023122821103110586433975796477952");
|
|
|
|
|
|
list.add("002212023122821180910586435896570572800");
|
|
|
|
|
|
list.add("002212023122821204110586436537477476352");
|
|
|
|
|
|
list.add("002212023122821283110586438507766706176");
|
|
|
|
|
|
list.add("002212023122821353710586440292162039808");
|
|
|
|
|
|
list.add("002212023122821415010586441857373286400");
|
|
|
|
|
|
list.add("002212023122900111510586479460678742016");
|
|
|
|
|
|
list.add("002212023122900313410586484573656543232");
|
|
|
|
|
|
list.add("002212023122900425210586487416513490944");
|
|
|
|
|
|
list.add("002212023122901041510586492796848418816");
|
|
|
|
|
|
list.add("002212023122901263710586498425846874112");
|
|
|
|
|
|
list.add("002212023122901383410586501432990478336");
|
|
|
|
|
|
list.add("002212023122904283910586544237093343232");
|
|
|
|
|
|
list.add("002212023122907593810586597334510321664");
|
|
|
|
|
|
list.add("002212023122908274010586604386764320768");
|
|
|
|
|
|
list.add("002212023122908381310586607042729545728");
|
|
|
|
|
|
list.add("002212023122908463810586609162119385088");
|
|
|
|
|
|
list.add("002212023122909152110586616387290370048");
|
|
|
|
|
|
list.add("002212023122909511410586625417309958144");
|
|
|
|
|
|
list.add("002212023122910250810586633946990342144");
|
|
|
|
|
|
list.add("002212023122910253310586634052356640768");
|
|
|
|
|
|
list.add("002212023122910270110586634422796021760");
|
|
|
|
|
|
list.add("002212023122910541910586641291099205632");
|
|
|
|
|
|
list.add("002212023122910561910586641796688269312");
|
|
|
|
|
|
list.add("002212023122911262010586649350229397504");
|
|
|
|
|
|
list.add("002212023122912414810586668342292623360");
|
|
|
|
|
|
list.add("002212023122912565010586672123978551296");
|
|
|
|
|
|
list.add("002212023122914322110586696163993300992");
|
|
|
|
|
|
list.add("002212023122914550410586701880112427008");
|
|
|
|
|
|
list.add("002212023122914592610586702978760028160");
|
|
|
|
|
|
list.add("002212023122915190610586707927830212608");
|
|
|
|
|
|
list.add("002212023122915264810586709867148709888");
|
|
|
|
|
|
list.add("002212023122915535810586716704210440192");
|
|
|
|
|
|
list.add("002212023122916501510586730866156990464");
|
|
|
|
|
|
list.add("002212023122920205410586783879675129856");
|
|
|
|
|
|
list.add("002212023122920370010586787931174236160");
|
|
|
|
|
|
list.add("002212023122920533110586792086294016000");
|
|
|
|
|
|
list.add("002212023122921132010586797071962955776");
|
|
|
|
|
|
list.add("002212023122921170110586797999786012672");
|
|
|
|
|
|
list.add("002212023122921313910586801683392507904");
|
|
|
|
|
|
list.add("002212023122921342210586802367847841792");
|
|
|
|
|
|
list.add("002212023122921412910586804159262601216");
|
|
|
|
|
|
list.add("002212023122921500410586806316127768576");
|
|
|
|
|
|
list.add("002212023122922011910586809148039860224");
|
|
|
|
|
|
list.add("002212023122922060810586810359749308416");
|
|
|
|
|
|
list.add("002212023122922290910586816152341803008");
|
|
|
|
|
|
list.add("002212023122923190710586828727860621312");
|
|
|
|
|
|
list.add("002212023123000245310586845279199031296");
|
|
|
|
|
|
list.add("002212023123000432510586849944191217664");
|
|
|
|
|
|
list.add("002212023123002373410586878671312609280");
|
|
|
|
|
|
list.add("002212023123005502510586927201389228032");
|
|
|
|
|
|
list.add("002212023123008115310586962801056911360");
|
|
|
|
|
|
list.add("002212023123008222510586965454179905536");
|
|
|
|
|
|
list.add("002212023123008291410586967167723483136");
|
|
|
|
|
|
list.add("002212023123010153610586993938720641024");
|
|
|
|
|
|
list.add("002212023123010335210586998532775366656");
|
|
|
|
|
|
list.add("002212023123010484610587002285700173824");
|
|
|
|
|
|
list.add("002212023123010492710587002454959394816");
|
|
|
|
|
|
list.add("002212023123011150610587008912851488768");
|
|
|
|
|
|
list.add("002212023123011310210587012918824767488");
|
|
|
|
|
|
list.add("002212023123013021110587035859633770496");
|
|
|
|
|
|
list.add("002212023123013094810587037775078223872");
|
|
|
|
|
|
list.add("002212023123013222010587040932288245760");
|
|
|
|
|
|
list.add("002212023123013534210587048823899074560");
|
|
|
|
|
|
list.add("002212023123014572610587064864163717120");
|
|
|
|
|
|
list.add("002212023123015545110587079313053675520");
|
|
|
|
|
|
list.add("002212023123019030410587126679502262272");
|
|
|
|
|
|
list.add("002212023123021003910587156269859442688");
|
|
|
|
|
|
list.add("002212023123021110810587158909536464896");
|
|
|
|
|
|
list.add("002212023123021192210587160980791799808");
|
|
|
|
|
|
list.add("002212023123021314710587164104084905984");
|
|
|
|
|
|
list.add("002212023123021330010587164412215848960");
|
|
|
|
|
|
list.add("002212023123021412110587166513906085888");
|
|
|
|
|
|
list.add("002212023123021545910587169943167660032");
|
|
|
|
|
|
list.add("002212023123021562610587170307420827648");
|
|
|
|
|
|
list.add("002212023123022093110587173598916886528");
|
|
|
|
|
|
list.add("002212023123022111210587174022264766464");
|
|
|
|
|
|
list.add("002212023123022144510587174918891106304");
|
|
|
|
|
|
list.add("002212023123022352410587180115663482880");
|
|
|
|
|
|
list.add("002212023123101233710587222447917756416");
|
|
|
|
|
|
list.add("002212023123101511710587229411753873408");
|
|
|
|
|
|
list.add("002212023123103100210587249228993392640");
|
|
|
|
|
|
list.add("002212023123105201410587281993700495360");
|
|
|
|
|
|
list.add("002212023123108175710587326718056697856");
|
|
|
|
|
|
list.add("002212023123108225310587327957788291072");
|
|
|
|
|
|
list.add("002212023123108433910587333184664481792");
|
|
|
|
|
|
list.add("002212023123108523410587335428652621824");
|
|
|
|
|
|
list.add("002212023123109402310587347462361313280");
|
|
|
|
|
|
list.add("002212023123109440310587348387093647360");
|
|
|
|
|
|
list.add("002212023123109443310587348510026346496");
|
|
|
|
|
|
list.add("002212023123110102210587355006682820608");
|
|
|
|
|
|
list.add("002212023123110330410587360721704693760");
|
|
|
|
|
|
list.add("002212023123110381110587362010192261120");
|
|
|
|
|
|
list.add("002212023123111135610587371005188345856");
|
|
|
|
|
|
list.add("002212023123112020310587383114661507072");
|
|
|
|
|
|
list.add("002212023123112471010587394468498403328");
|
|
|
|
|
|
list.add("002212023123113114610587400660988424192");
|
|
|
|
|
|
list.add("002212023123118101810587475788695560192");
|
|
|
|
|
|
list.add("002212023123120223310587509071064797184");
|
|
|
|
|
|
list.add("002212023123120325710587511686953824256");
|
|
|
|
|
|
list.add("002212023123120480510587515495796289536");
|
|
|
|
|
|
list.add("002212023123120562610587517597268422656");
|
|
|
|
|
|
list.add("002212023123121112710587521377357488128");
|
|
|
|
|
|
list.add("002212023123121121810587521590805180416");
|
|
|
|
|
|
list.add("002212023123121153510587522414303277056");
|
|
|
|
|
|
list.add("002212023123121155010587522476620509184");
|
|
|
|
|
|
list.add("002212023123121201310587523582419030016");
|
|
|
|
|
|
list.add("002212023123121351610587527369578115072");
|
|
|
|
|
|
list.add("002212023123122015310587534069005676544");
|
|
|
|
|
|
list.add("002212023123122083410587535749191942144");
|
|
|
|
|
|
list.add("002212023123122094810587536058879594496");
|
|
|
|
|
|
list.add("002212023123122262110587540222682181632");
|
|
|
|
|
|
list.add("002212023123123082810587550825020174336");
|
2023-12-13 16:48:07 +08:00
|
|
|
|
|
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)) {
|
2023-12-01 13:29:35 +08:00
|
|
|
|
List<String> ids = accountList.stream().map(x -> x.getId() + "").collect(Collectors.toList());
|
2023-08-30 11:02:18 +08:00
|
|
|
|
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 {
|
2023-10-26 16:54:50 +08:00
|
|
|
|
String data = "{\"app_id2\":\"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\":\"\"}";
|
2023-08-30 11:02:18 +08:00
|
|
|
|
JSONObject jsonObject = JSON.parseObject(data);
|
|
|
|
|
|
ObjectMapper mapper = new ObjectMapper();
|
|
|
|
|
|
mapper.setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE);
|
2023-10-26 16:54:50 +08:00
|
|
|
|
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
2023-08-30 11:02:18 +08:00
|
|
|
|
AdapayCallbackRecord adapayCallbackRecord = mapper.readValue(jsonObject.toJSONString(), AdapayCallbackRecord.class);
|
|
|
|
|
|
adapayCallbackRecord.setExpend(jsonObject.getString("expend"));
|
|
|
|
|
|
adapayCallbackRecord.setPaymentId(jsonObject.getString("id"));
|
2023-10-26 16:54:50 +08:00
|
|
|
|
// adapayCallbackRecordService.saveAdapayCallbackRecord(adapayCallbackRecord);
|
2023-08-30 11:02:18 +08:00
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@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);
|
|
|
|
|
|
|
|
|
|
|
|
// 保存时间
|
2023-11-24 11:30:53 +08:00
|
|
|
|
// saveLastTime(pileSn, channel);
|
2023-08-30 11:02:18 +08:00
|
|
|
|
|
|
|
|
|
|
// 枪号
|
|
|
|
|
|
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());
|
2023-12-15 16:06:21 +08:00
|
|
|
|
String dataStr = new String(plainText, StandardCharsets.UTF_8);
|
2023-08-30 11:02:18 +08:00
|
|
|
|
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);
|
|
|
|
|
|
}
|
2023-10-08 16:42:56 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 查询退款信息
|
|
|
|
|
|
*/
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void queryRefundTest() {
|
2023-12-13 17:11:35 +08:00
|
|
|
|
List<String> list = getPaymentIdList(); // 查询退款信息
|
2023-10-08 16:42:56 +08:00
|
|
|
|
for (String paymentId : list) {
|
|
|
|
|
|
Map<String, Object> refundParams = Maps.newHashMap();
|
|
|
|
|
|
refundParams.put("payment_id", paymentId);
|
|
|
|
|
|
try {
|
2023-10-31 15:17:39 +08:00
|
|
|
|
Map<String, Object> refund = Refund.query(refundParams, wechatAppId2);
|
2023-10-08 16:42:56 +08:00
|
|
|
|
System.out.println("支付id:" + paymentId + ", 退款信息:" + JSON.toJSONString(refund));
|
|
|
|
|
|
System.out.println();
|
|
|
|
|
|
} catch (BaseAdaPayException e) {
|
|
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 查询支付撤销信息
|
|
|
|
|
|
*/
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void queryPaymentReverseTest() {
|
2023-12-13 17:11:35 +08:00
|
|
|
|
List<String> list = getPaymentIdList(); // 查询支付撤销信息
|
2023-10-08 16:42:56 +08:00
|
|
|
|
for (String paymentId : list) {
|
|
|
|
|
|
try {
|
|
|
|
|
|
Map<String, Object> reverse = Maps.newHashMap();
|
|
|
|
|
|
reverse.put("payment_id", paymentId);
|
2023-10-31 15:17:39 +08:00
|
|
|
|
reverse.put("app_id", wechatAppId2);
|
|
|
|
|
|
Map<String, Object> response = PaymentReverse.queryList(reverse, wechatAppId2);
|
2023-10-08 16:42:56 +08:00
|
|
|
|
System.out.printf("支付id: %s, 支付撤销信息: %s%n", paymentId, JSON.toJSONString(response));
|
|
|
|
|
|
System.out.println();
|
|
|
|
|
|
} catch (BaseAdaPayException e) {
|
|
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2023-08-30 11:02:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@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-10-19 11:21:02 +08:00
|
|
|
|
String s = RandomStringUtils.randomAlphanumeric(16).toUpperCase(Locale.ROOT);
|
2023-08-30 11:02:18 +08:00
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
}
|