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
|
2024-01-06 15:20:28 +08:00
|
|
|
|
private PileMsgRecordService pileMsgRecordService;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Autowired
|
2024-01-06 15:20:28 +08:00
|
|
|
|
private PileStationInfoService 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
|
2024-01-06 15:20:28 +08:00
|
|
|
|
private PileBillingTemplateService 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
|
2024-01-06 15:20:28 +08:00
|
|
|
|
private PileBasicInfoService 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
|
2024-01-06 15:13:50 +08:00
|
|
|
|
private OrderBasicInfoService 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
|
2024-01-06 15:20:28 +08:00
|
|
|
|
private MemberPlateNumberRelationService 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
|
2024-01-06 15:20:28 +08:00
|
|
|
|
private AdapayRefundRecordService 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
|
2024-01-06 15:20:28 +08:00
|
|
|
|
private PileConnectorInfoService 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
|
2024-01-06 15:20:28 +08:00
|
|
|
|
private MemberBasicInfoService 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
|
2024-01-06 15:20:28 +08:00
|
|
|
|
private PileMerchantInfoService pileMerchantInfoService;
|
2023-08-30 11:02:18 +08:00
|
|
|
|
|
|
|
|
|
|
@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);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-01-05 15:26:22 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 测试多笔支付情况,解冻部分金额
|
|
|
|
|
|
*/
|
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();
|
2024-01-05 15:26:22 +08:00
|
|
|
|
dto.setCardId("398899991013000296800");
|
|
|
|
|
|
dto.setCardName("瑞桩(宿迁)新能源科技有限公司");
|
|
|
|
|
|
dto.setTelNo("16652725453");
|
|
|
|
|
|
dto.setBankCode("03010000");
|
2023-08-30 11:02:18 +08:00
|
|
|
|
dto.setBankAcctType("1");
|
2024-01-05 15:26:22 +08:00
|
|
|
|
dto.setProvCode("0032");
|
|
|
|
|
|
dto.setAreaCode("3207");
|
|
|
|
|
|
String adapayMemberId = "ACM84693947";
|
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 {
|
2024-01-05 16:04:47 +08:00
|
|
|
|
String adapayMemberId = "ACM84693947";
|
2024-01-05 16:17:55 +08:00
|
|
|
|
String settleAccountId = "0561354988505792";
|
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);
|
2024-01-11 14:26:02 +08:00
|
|
|
|
dto.setPaymentId("002212023122208033310584061601344237568");
|
|
|
|
|
|
QueryPaymentConfirmDetailResponse response = adapayService.queryPaymentConfirmList(dto);
|
|
|
|
|
|
List<QueryPaymentConfirmDetailResponse.PaymentConfirmInfo> paymentConfirms = response.getPaymentConfirms();
|
|
|
|
|
|
// 如果没有分账信息,说明没有清分
|
|
|
|
|
|
String clearingStatus = null;
|
|
|
|
|
|
if (org.springframework.util.CollectionUtils.isEmpty(paymentConfirms)) {
|
|
|
|
|
|
clearingStatus = "未清分";
|
|
|
|
|
|
} else {
|
|
|
|
|
|
clearingStatus = "已清分";
|
|
|
|
|
|
}
|
|
|
|
|
|
System.out.println(clearingStatus);
|
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-11 14:26:02 +08:00
|
|
|
|
"{\"orderCode\":\"C82585387230\", \"settleAmount\":\"20.10\", \"paymentId\":\"002212023122208033310584061601344237568\"}" +
|
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-11 14:26:02 +08:00
|
|
|
|
adapayMemberAccount.setAdapayMemberId("ACM65835351");
|
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-11 16:43:26 +08:00
|
|
|
|
|
2023-12-14 20:17:15 +08:00
|
|
|
|
List<String> unSplitList = Lists.newArrayList(); //
|
2024-01-04 15:39:25 +08:00
|
|
|
|
List<String> splitList = 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);
|
|
|
|
|
|
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 {
|
2024-01-04 15:39:25 +08:00
|
|
|
|
splitList.add(paymentId);
|
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
|
|
|
|
}
|
2024-01-04 15:39:25 +08:00
|
|
|
|
} else {
|
|
|
|
|
|
unSplitList.add(paymentId);
|
2023-09-06 14:30:06 +08:00
|
|
|
|
}
|
2023-08-30 11:02:18 +08:00
|
|
|
|
}
|
2024-01-04 15:39:25 +08:00
|
|
|
|
System.out.println("=================未分账:" + JSON.toJSONString(unSplitList) + ", 数量:" + unSplitList.size());
|
|
|
|
|
|
System.out.println("=================已分账:" + JSON.toJSONString(map) + ", 总分账:" + total + ", 数量:" + splitList.size());
|
|
|
|
|
|
System.out.println("=================自己:" + JSON.toJSONString(selfList) + ", 数量:" + selfList.size());
|
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-09 14:22:40 +08:00
|
|
|
|
list.add("002212023093021493610554191294142091264");
|
|
|
|
|
|
list.add("002212023100102493110554266767129260032");
|
|
|
|
|
|
list.add("002212023100107160310554333843078488064");
|
|
|
|
|
|
list.add("002212023100108063810554346573874163712");
|
|
|
|
|
|
list.add("002212023100109254310554366476556664832");
|
|
|
|
|
|
list.add("002212023100110105510554377850984837120");
|
|
|
|
|
|
list.add("002212023100110152110554378965465935872");
|
|
|
|
|
|
list.add("002212023100111453810554401687851679744");
|
|
|
|
|
|
list.add("002212023100112171510554409644528476160");
|
|
|
|
|
|
list.add("002212023100114252110554441883209412608");
|
|
|
|
|
|
list.add("002212023100114481110554447625852211200");
|
|
|
|
|
|
list.add("002212023100115433810554461580441640960");
|
|
|
|
|
|
list.add("002212023100120052710554527470191280128");
|
|
|
|
|
|
list.add("002212023100202302910554624367348146176");
|
|
|
|
|
|
list.add("002212023100207404210554702433816387584");
|
|
|
|
|
|
list.add("002212023100209270010554729186313850880");
|
|
|
|
|
|
list.add("002212023100209373210554731837943443456");
|
|
|
|
|
|
list.add("002212023100209451810554733791104987136");
|
|
|
|
|
|
list.add("002212023100212320510554775765620015104");
|
|
|
|
|
|
list.add("002212023100214280310554804946443612160");
|
|
|
|
|
|
list.add("002212023100214504710554810668848496640");
|
|
|
|
|
|
list.add("002212023100214575210554812451984949248");
|
|
|
|
|
|
list.add("002212023100215025510554813722138230784");
|
|
|
|
|
|
list.add("002212023100215595110554828048920207360");
|
|
|
|
|
|
list.add("002212023100217121910554846287728955392");
|
|
|
|
|
|
list.add("002212023100217440610554854285079969792");
|
|
|
|
|
|
list.add("002212023100220090810554890786694213632");
|
|
|
|
|
|
list.add("002212023100221092910554905973836972032");
|
|
|
|
|
|
list.add("002212023100307064510555056277579362304");
|
|
|
|
|
|
list.add("002212023100307503010555067288496844800");
|
|
|
|
|
|
list.add("002212023100309344810555093536337776640");
|
|
|
|
|
|
list.add("002212023100310301810555107504090509312");
|
|
|
|
|
|
list.add("002212023100310303710555107584157138944");
|
|
|
|
|
|
list.add("002212023100311271410555121833109602304");
|
|
|
|
|
|
list.add("002212023100312244910555136322564960256");
|
|
|
|
|
|
list.add("002212023100312281410555137184035483648");
|
|
|
|
|
|
list.add("002212023100314025710555161018088538112");
|
|
|
|
|
|
list.add("002212023100314140310555163814611378176");
|
|
|
|
|
|
list.add("002212023100314284510555167514443214848");
|
|
|
|
|
|
list.add("002212023100315000910555175414894649344");
|
|
|
|
|
|
list.add("002212023100315133510555178794163892224");
|
|
|
|
|
|
list.add("002212023100316114210555193421865070592");
|
|
|
|
|
|
list.add("002212023100319414510555246283611942912");
|
|
|
|
|
|
list.add("002212023100321005110555266189170683904");
|
|
|
|
|
|
list.add("002212023100321394210555275963558621184");
|
|
|
|
|
|
list.add("002212023100322025210555281795593003008");
|
|
|
|
|
|
list.add("002212023100400064810555312983585796096");
|
|
|
|
|
|
list.add("002212023100401181710555330971294453760");
|
|
|
|
|
|
list.add("002212023100407402610555427142159794176");
|
|
|
|
|
|
list.add("002212023100408275210555439082005299200");
|
|
|
|
|
|
list.add("002212023100410225210555468023636946944");
|
|
|
|
|
|
list.add("002212023100410272210555469155549216768");
|
|
|
|
|
|
list.add("002212023100411324310555485600300060672");
|
|
|
|
|
|
list.add("002212023100411450810555488725242183680");
|
|
|
|
|
|
list.add("002212023100411503810555490107234455552");
|
|
|
|
|
|
list.add("002212023100411583910555492124862803968");
|
|
|
|
|
|
list.add("002212023100413132310555510935854870528");
|
|
|
|
|
|
list.add("002212023100413371910555516956532269056");
|
|
|
|
|
|
list.add("002212023100414113810555525593474244608");
|
|
|
|
|
|
list.add("002212023100414191810555527522302504960");
|
|
|
|
|
|
list.add("002212023100414271410555529518577008640");
|
|
|
|
|
|
list.add("002212023100415043710555538928129531904");
|
|
|
|
|
|
list.add("002212023100416415110555563396157382656");
|
|
|
|
|
|
list.add("002212023100421470510555640209074237440");
|
|
|
|
|
|
list.add("002212023100500102410555676277345595392");
|
|
|
|
|
|
list.add("002212023100502413410555714320954023936");
|
|
|
|
|
|
list.add("002212023100507172310555783731974459392");
|
|
|
|
|
|
list.add("002212023100507233110555785273959993344");
|
|
|
|
|
|
list.add("002212023100508585610555809285826105344");
|
|
|
|
|
|
list.add("002212023100509045810555810804613218304");
|
|
|
|
|
|
list.add("002212023100510252810555831063714422784");
|
|
|
|
|
|
list.add("002212023100511263110555846425917255680");
|
|
|
|
|
|
list.add("002212023100511461010555851372294778880");
|
|
|
|
|
|
list.add("002212023100512271210555861697110978560");
|
|
|
|
|
|
list.add("002212023100513051310555871266696249344");
|
|
|
|
|
|
list.add("002212023100513505710555882774896316416");
|
|
|
|
|
|
list.add("002212023100515045610555901394448117760");
|
|
|
|
|
|
list.add("002212023100515174510555904617470078976");
|
|
|
|
|
|
list.add("002212023100516145810555919017068122112");
|
|
|
|
|
|
list.add("002212023100521500510556003351552774144");
|
|
|
|
|
|
list.add("002212023100522285510556013128086421504");
|
|
|
|
|
|
list.add("002212023100603053110556082733899427840");
|
|
|
|
|
|
list.add("002212023100606294710556134142301134848");
|
|
|
|
|
|
list.add("002212023100606565010556140946636091392");
|
|
|
|
|
|
list.add("002212023100607244910556147990866927616");
|
|
|
|
|
|
list.add("002212023100607334410556150232133386240");
|
|
|
|
|
|
list.add("002212023100607414410556152247411011584");
|
|
|
|
|
|
list.add("002212023100609410810556182293342531584");
|
|
|
|
|
|
list.add("002212023100610011710556187364188991488");
|
|
|
|
|
|
list.add("002212023100610152410556190916679299072");
|
|
|
|
|
|
list.add("002212023100610363310556196242185957376");
|
|
|
|
|
|
list.add("002212023100611024310556202824542429184");
|
|
|
|
|
|
list.add("002212023100612541810556230905774989312");
|
|
|
|
|
|
list.add("002212023100613131510556235674634342400");
|
|
|
|
|
|
list.add("002212023100613223410556238020255592448");
|
|
|
|
|
|
list.add("002212023100613445310556243636195905536");
|
|
|
|
|
|
list.add("002212023100613561110556246481046298624");
|
|
|
|
|
|
list.add("002212023100614050910556248738888675328");
|
|
|
|
|
|
list.add("002212023100614133810556250873098919936");
|
|
|
|
|
|
list.add("002212023100614422410556258111712878592");
|
|
|
|
|
|
list.add("002212023100614431710556258333159309312");
|
|
|
|
|
|
list.add("002212023100614435310556258483804565504");
|
|
|
|
|
|
list.add("002212023100615014710556262990450094080");
|
|
|
|
|
|
list.add("002212023100615394310556272534428233728");
|
|
|
|
|
|
list.add("002212023100618011810556308165051527168");
|
|
|
|
|
|
list.add("002212023100618592310556322784176758784");
|
|
|
|
|
|
list.add("002212023100619414110556333427736358912");
|
|
|
|
|
|
list.add("002212023100621162110556357250079969280");
|
|
|
|
|
|
list.add("002212023100622043610556369392561782784");
|
|
|
|
|
|
list.add("002212023100622454910556379768362627072");
|
|
|
|
|
|
list.add("002212023100623032910556384213802147840");
|
|
|
|
|
|
list.add("002212023100702315810556436677884633088");
|
|
|
|
|
|
list.add("002212023100707190610556508937532477440");
|
|
|
|
|
|
list.add("002212023100707234310556510101162328064");
|
|
|
|
|
|
list.add("002212023100707511010556517009443217408");
|
|
|
|
|
|
list.add("002212023100707511410556517024173109248");
|
|
|
|
|
|
list.add("002212023100708212810556524633510555648");
|
|
|
|
|
|
list.add("002212023100708423810556529961220354048");
|
|
|
|
|
|
list.add("002212023100708473510556531204773900288");
|
|
|
|
|
|
list.add("002212023100709020810556534870068912128");
|
|
|
|
|
|
list.add("002212023100709304010556542048988803072");
|
|
|
|
|
|
list.add("002212023100709511910556547244318253056");
|
|
|
|
|
|
list.add("002212023100710020810556549969540542464");
|
|
|
|
|
|
list.add("002212023100711584010556579294286688256");
|
|
|
|
|
|
list.add("002212023100712493610556592113761595392");
|
|
|
|
|
|
list.add("002212023100713172910556599127932661760");
|
|
|
|
|
|
list.add("002212023100714005810556610072638881792");
|
|
|
|
|
|
list.add("002212023100714223510556615512809369600");
|
|
|
|
|
|
list.add("002212023100714592910556624796217249792");
|
|
|
|
|
|
list.add("002212023100715025510556625662892294144");
|
|
|
|
|
|
list.add("002212023100715055810556626431786094592");
|
|
|
|
|
|
list.add("002212023100717114310556658074668240896");
|
|
|
|
|
|
list.add("002212023100717531210556668516368338944");
|
|
|
|
|
|
list.add("002212023100719162410556689455261409280");
|
|
|
|
|
|
list.add("002212023100719540210556698926137692160");
|
|
|
|
|
|
list.add("002212023100720091110556702738533822464");
|
|
|
|
|
|
list.add("002212023100721013510556715922879369216");
|
|
|
|
|
|
list.add("002212023100721014810556715979837980672");
|
|
|
|
|
|
list.add("002212023100721115210556718510663454720");
|
|
|
|
|
|
list.add("002212023100722143010556734275304402944");
|
|
|
|
|
|
list.add("002212023100722213410556736051984986112");
|
|
|
|
|
|
list.add("002212023100723035810556746721452867584");
|
|
|
|
|
|
list.add("002212023100807015410556866999419645952");
|
|
|
|
|
|
list.add("002212023100807234510556872497895043072");
|
|
|
|
|
|
list.add("002212023100807512110556879444170166272");
|
|
|
|
|
|
list.add("002212023100808181710556886220690141184");
|
|
|
|
|
|
list.add("002212023100808272610556888521639165952");
|
|
|
|
|
|
list.add("002212023100809290710556904047041753088");
|
|
|
|
|
|
list.add("002212023100810171410556916153746378752");
|
|
|
|
|
|
list.add("002212023100810283710556919021745954816");
|
|
|
|
|
|
list.add("002212023100810481510556923960696500224");
|
|
|
|
|
|
list.add("002212023100810530110556925159673421824");
|
|
|
|
|
|
list.add("002212023100811442010556938076316233728");
|
|
|
|
|
|
list.add("002212023100815004510556987504294309888");
|
|
|
|
|
|
list.add("002212023100815090910556989618071015424");
|
|
|
|
|
|
list.add("002212023100815242810556993471794851840");
|
|
|
|
|
|
list.add("002212023100815294910556994821861617664");
|
|
|
|
|
|
list.add("002212023100816185810557007190293995520");
|
|
|
|
|
|
list.add("002212023100816392410557012330555879424");
|
|
|
|
|
|
list.add("002212023100818141010557036179628457984");
|
|
|
|
|
|
list.add("002212023100819080510557049748596678656");
|
|
|
|
|
|
list.add("002212023100820011910557063146809245696");
|
|
|
|
|
|
list.add("002212023100820242510557068957237751808");
|
|
|
|
|
|
list.add("002212023100820433010557073761221132288");
|
|
|
|
|
|
list.add("002212023100821512910557090870043291648");
|
|
|
|
|
|
list.add("002212023100822240810557099086184087552");
|
|
|
|
|
|
list.add("002212023100822411610557103398356520960");
|
|
|
|
|
|
list.add("002212023100823063110557109753609699328");
|
|
|
|
|
|
list.add("002212023100823464010557119858014924800");
|
|
|
|
|
|
list.add("002212023100900400010557133279128113152");
|
|
|
|
|
|
list.add("002212023100902294210557160883032600576");
|
|
|
|
|
|
list.add("002212023100906174110557218259050414080");
|
|
|
|
|
|
list.add("002212023100907234610557234888949575680");
|
|
|
|
|
|
list.add("002212023100907294910557236411607920640");
|
|
|
|
|
|
list.add("002212023100907413010557239353054306304");
|
|
|
|
|
|
list.add("002212023100907470610557240759343755264");
|
|
|
|
|
|
list.add("002212023100907524110557242165033955328");
|
|
|
|
|
|
list.add("002212023100909013610557259509219192832");
|
|
|
|
|
|
list.add("002212023100909094810557261574950854656");
|
|
|
|
|
|
list.add("002212023100909100110557261627310583808");
|
|
|
|
|
|
list.add("002212023100909110310557261887160672256");
|
|
|
|
|
|
list.add("002212023100909154610557263073355476992");
|
|
|
|
|
|
list.add("002212023100909285710557266392776699904");
|
|
|
|
|
|
list.add("002212023100909331810557267488979021824");
|
|
|
|
|
|
list.add("002212023100909552910557273070582267904");
|
|
|
|
|
|
list.add("002212023100909594210557274131223011328");
|
|
|
|
|
|
list.add("002212023100910060110557275722574942208");
|
|
|
|
|
|
list.add("002212023100910064310557275898203308032");
|
|
|
|
|
|
list.add("002212023100910344110557282933733011456");
|
|
|
|
|
|
list.add("002212023100912123410557307566759305216");
|
|
|
|
|
|
list.add("002212023100912193810557309346283442176");
|
|
|
|
|
|
list.add("002212023100913482710557331697982726144");
|
|
|
|
|
|
list.add("002212023100914434710557345623151161344");
|
|
|
|
|
|
list.add("002212023100914533610557348093587992576");
|
|
|
|
|
|
list.add("002212023100915055910557351209687572480");
|
|
|
|
|
|
list.add("002212023100915284710557356946625400832");
|
|
|
|
|
|
list.add("002212023100915364510557358952813158400");
|
|
|
|
|
|
list.add("002212023100916325210557373074114703360");
|
|
|
|
|
|
list.add("002212023100917523410557393130409406464");
|
|
|
|
|
|
list.add("002212023100918285310557402273010933760");
|
|
|
|
|
|
list.add("002212023100919154710557414072782082048");
|
|
|
|
|
|
list.add("002212023100919545910557423937407160320");
|
|
|
|
|
|
list.add("002212023100920020910557425741310455808");
|
|
|
|
|
|
list.add("002212023100921192910557445202939379712");
|
|
|
|
|
|
list.add("002212023100921202410557445433249939456");
|
|
|
|
|
|
list.add("002212023100922072710557457276347527168");
|
|
|
|
|
|
list.add("002212023100922111710557458238888181760");
|
|
|
|
|
|
list.add("002212023100922130410557458688708096000");
|
|
|
|
|
|
list.add("002212023100922251710557461762963652608");
|
|
|
|
|
|
list.add("002212023100922304110557463124235681792");
|
|
|
|
|
|
list.add("002212023100923094310557472945180946432");
|
|
|
|
|
|
list.add("002212023100923152910557474396784197632");
|
|
|
|
|
|
list.add("002212023101000405810557495907044995072");
|
|
|
|
|
|
list.add("002212023101007214710557596779379408896");
|
|
|
|
|
|
list.add("002212023101007324610557599540030185472");
|
|
|
|
|
|
list.add("002212023101007355210557600323601670144");
|
|
|
|
|
|
list.add("002212023101007442710557602482909966336");
|
|
|
|
|
|
list.add("002212023101007494610557603821493891072");
|
|
|
|
|
|
list.add("002212023101008222610557612040438263808");
|
|
|
|
|
|
list.add("002212023101008384910557616164273762304");
|
|
|
|
|
|
list.add("002212023101009354010557630472419012608");
|
|
|
|
|
|
list.add("002212023101009445110557632780575289344");
|
|
|
|
|
|
list.add("002212023101009455010557633028519337984");
|
|
|
|
|
|
list.add("002212023101010124710557639812957958144");
|
|
|
|
|
|
list.add("002212023101011441010557662808692482048");
|
|
|
|
|
|
list.add("002212023101012255410557673312441253888");
|
|
|
|
|
|
list.add("002212023101014012210557697338405019648");
|
|
|
|
|
|
list.add("002212023101014231410557702840899256320");
|
|
|
|
|
|
list.add("002212023101014434510557708004188180480");
|
|
|
|
|
|
list.add("002212023101014592610557711950663340032");
|
|
|
|
|
|
list.add("002212023101015072610557713961571241984");
|
|
|
|
|
|
list.add("002212023101015174610557716563017814016");
|
|
|
|
|
|
list.add("002212023101015370510557721424212209664");
|
|
|
|
|
|
list.add("002212023101015594210557727116101140480");
|
|
|
|
|
|
list.add("002212023101017102710557744919403282432");
|
|
|
|
|
|
list.add("002212023101017212410557747675419029504");
|
|
|
|
|
|
list.add("002212023101018585010557772196326846464");
|
|
|
|
|
|
list.add("002212023101019111110557775303102345216");
|
|
|
|
|
|
list.add("002212023101019475310557784541315457024");
|
|
|
|
|
|
list.add("002212023101020123310557790747075256320");
|
|
|
|
|
|
list.add("002212023101020384010557797320134701056");
|
|
|
|
|
|
list.add("002212023101022003510557817935361191936");
|
|
|
|
|
|
list.add("002212023101022080310557819813024157696");
|
|
|
|
|
|
list.add("002212023101022133710557821215444037632");
|
|
|
|
|
|
list.add("002212023101023560410557846995625947136");
|
|
|
|
|
|
list.add("002212023101101130510557866378146295808");
|
|
|
|
|
|
list.add("002212023101102124910557881412095045632");
|
|
|
|
|
|
list.add("002212023101106544010557952341302841344");
|
|
|
|
|
|
list.add("002212023101107275210557960695855144960");
|
|
|
|
|
|
list.add("002212023101107452110557965097176870912");
|
|
|
|
|
|
list.add("002212023101107535910557967271101710336");
|
|
|
|
|
|
list.add("002212023101108283610557975980680327168");
|
|
|
|
|
|
list.add("002212023101109212910557989288584069120");
|
|
|
|
|
|
list.add("002212023101109280510557990949724614656");
|
|
|
|
|
|
list.add("002212023101109531910557997299519188992");
|
|
|
|
|
|
list.add("002212023101110061910558000573374787584");
|
|
|
|
|
|
list.add("002212023101112055010558030649673101312");
|
|
|
|
|
|
list.add("002212023101113180410558048825928237056");
|
|
|
|
|
|
list.add("002212023101115375810558084035978145792");
|
|
|
|
|
|
list.add("002212023101117124310558107878682267648");
|
|
|
|
|
|
list.add("002212023101118524810558133065436196864");
|
|
|
|
|
|
list.add("002212023101119284010558142091864780800");
|
|
|
|
|
|
list.add("002212023101120234610558155956378849280");
|
|
|
|
|
|
list.add("002212023101120472510558161910043754496");
|
|
|
|
|
|
list.add("002212023101121115910558168091469987840");
|
|
|
|
|
|
list.add("002212023101121280510558172145780994048");
|
|
|
|
|
|
list.add("002212023101122032710558181044038905856");
|
|
|
|
|
|
list.add("002212023101201450210558236809382285312");
|
|
|
|
|
|
list.add("002212023101202235510558246592974139392");
|
|
|
|
|
|
list.add("002212023101207191110558320900570001408");
|
|
|
|
|
|
list.add("002212023101207374510558325571521314816");
|
|
|
|
|
|
list.add("002212023101207380110558325638045081600");
|
|
|
|
|
|
list.add("002212023101208024610558331866341433344");
|
|
|
|
|
|
list.add("002212023101208211510558336520634466304");
|
|
|
|
|
|
list.add("002212023101208230110558336965549973504");
|
|
|
|
|
|
list.add("002212023101208283810558338378551767040");
|
|
|
|
|
|
list.add("002212023101208580710558345796579848192");
|
|
|
|
|
|
list.add("002212023101209511010558359145179983872");
|
|
|
|
|
|
list.add("002212023101210351310558370232935563264");
|
|
|
|
|
|
list.add("002212023101212443510558402788823638016");
|
|
|
|
|
|
list.add("002212023101213550410558420527308820480");
|
|
|
|
|
|
list.add("002212023101214090510558424055184338944");
|
|
|
|
|
|
list.add("002212023101214293510558429214214713344");
|
|
|
|
|
|
list.add("002212023101215005210558437083879825408");
|
|
|
|
|
|
list.add("002212023101215410010558447186704293888");
|
|
|
|
|
|
list.add("002212023101215593610558451865234698240");
|
|
|
|
|
|
list.add("002212023101216191210558456800093401088");
|
|
|
|
|
|
list.add("002212023101216431810558462861942042624");
|
|
|
|
|
|
list.add("002212023101217023010558467697205669888");
|
|
|
|
|
|
list.add("002212023101219460610558508866352144384");
|
|
|
|
|
|
list.add("002212023101220022510558512971547328512");
|
|
|
|
|
|
list.add("002212023101222005310558542786576084992");
|
|
|
|
|
|
list.add("002212023101222050210558543832145952768");
|
|
|
|
|
|
list.add("002212023101222205910558547845078675456");
|
|
|
|
|
|
list.add("002212023101222225510558548329344274432");
|
|
|
|
|
|
list.add("002212023101222403910558552794795073536");
|
|
|
|
|
|
list.add("002212023101300005410558572990538874880");
|
|
|
|
|
|
list.add("002212023101300040710558573800429166592");
|
|
|
|
|
|
list.add("002212023101302112410558605832912728064");
|
|
|
|
|
|
list.add("002212023101305530110558661602905153536");
|
|
|
|
|
|
list.add("002212023101307070610558680246924791808");
|
|
|
|
|
|
list.add("002212023101307290610558685784246026240");
|
|
|
|
|
|
list.add("002212023101307293110558685885580423168");
|
|
|
|
|
|
list.add("002212023101308133510558696977996439552");
|
|
|
|
|
|
list.add("002212023101308253610558699999928958976");
|
|
|
|
|
|
list.add("002212023101308584410558708341362294784");
|
|
|
|
|
|
list.add("002212023101309122610558711787202752512");
|
|
|
|
|
|
list.add("002212023101309455710558720221489844224");
|
|
|
|
|
|
list.add("002212023101309582810558723373890981888");
|
|
|
|
|
|
list.add("002212023101310401210558733876179415040");
|
|
|
|
|
|
list.add("002212023101311424110558749597826244608");
|
|
|
|
|
|
list.add("002212023101311493910558751351483113472");
|
|
|
|
|
|
list.add("002212023101313295810558776597268320256");
|
|
|
|
|
|
list.add("002212023101313421510558779690179059712");
|
|
|
|
|
|
list.add("002212023101314375510558793699975987200");
|
|
|
|
|
|
list.add("002212023101314501410558796799641866240");
|
|
|
|
|
|
list.add("002212023101314562610558798359197626368");
|
|
|
|
|
|
list.add("002212023101314582110558798838911107072");
|
|
|
|
|
|
list.add("002212023101315274210558806227678363648");
|
|
|
|
|
|
list.add("002212023101316135510558817855323860992");
|
|
|
|
|
|
list.add("002212023101316454110558825853674545152");
|
|
|
|
|
|
list.add("002212023101316502310558827034939748352");
|
|
|
|
|
|
list.add("002212023101316571510558828762986168320");
|
|
|
|
|
|
list.add("002212023101318274710558851547779284992");
|
|
|
|
|
|
list.add("002212023101319444210558870904236630016");
|
|
|
|
|
|
list.add("002212023101321575310558904417748627456");
|
|
|
|
|
|
list.add("002212023101322004910558905158424965120");
|
|
|
|
|
|
list.add("002212023101322021410558905514520047616");
|
|
|
|
|
|
list.add("002212023101322510210558917795908636672");
|
|
|
|
|
|
list.add("002212023101400081010558937205461991424");
|
|
|
|
|
|
list.add("002212023101406472310559037671006449664");
|
|
|
|
|
|
list.add("002212023101407514810559053883977871360");
|
|
|
|
|
|
list.add("002212023101408475910559068023591792640");
|
|
|
|
|
|
list.add("002212023101409292210559078436108222464");
|
|
|
|
|
|
list.add("002212023101410295010559093653992873984");
|
|
|
|
|
|
list.add("002212023101410471810559098050040934400");
|
|
|
|
|
|
list.add("002212023101411044910559102458531397632");
|
|
|
|
|
|
list.add("002212023101413245010559137694886227968");
|
|
|
|
|
|
list.add("002212023101414064010559148220539449344");
|
|
|
|
|
|
list.add("002212023101414353010559155476559814656");
|
|
|
|
|
|
list.add("002212023101415050310559162913126346752");
|
|
|
|
|
|
list.add("002212023101415082910559163778754838528");
|
|
|
|
|
|
list.add("002212023101415171010559165963182272512");
|
|
|
|
|
|
list.add("002212023101415194810559166627890245632");
|
|
|
|
|
|
list.add("002212023101416042610559177857893842944");
|
|
|
|
|
|
list.add("002212023101416101710559179332660133888");
|
|
|
|
|
|
list.add("002212023101416223310559182418113708032");
|
|
|
|
|
|
list.add("002212023101422025510559268073290952704");
|
|
|
|
|
|
list.add("002212023101501332410559321043722301440");
|
|
|
|
|
|
list.add("002212023101507263010559409904888762368");
|
|
|
|
|
|
list.add("002212023101508455910559429905554587648");
|
|
|
|
|
|
list.add("002212023101509221910559439050121506816");
|
|
|
|
|
|
list.add("002212023101510345910559457336200712192");
|
|
|
|
|
|
list.add("002212023101510372610559457953854992384");
|
|
|
|
|
|
list.add("002212023101510553810559462534670876672");
|
|
|
|
|
|
list.add("002212023101511075910559465641425948672");
|
|
|
|
|
|
list.add("002212023101511125910559466901245255680");
|
|
|
|
|
|
list.add("002212023101511244310559469854681186304");
|
|
|
|
|
|
list.add("002212023101511572110559478065956745216");
|
|
|
|
|
|
list.add("002212023101512433210559489686543958016");
|
|
|
|
|
|
list.add("002212023101513072610559495702812028928");
|
|
|
|
|
|
list.add("002212023101513425610559504634994720768");
|
|
|
|
|
|
list.add("002212023101513545410559507648564682752");
|
|
|
|
|
|
list.add("002212023101514002510559509037378428928");
|
|
|
|
|
|
list.add("002212023101514082810559511062512304128");
|
|
|
|
|
|
list.add("002212023101514375410559518471427903488");
|
|
|
|
|
|
list.add("002212023101514570510559523296643215360");
|
|
|
|
|
|
list.add("002212023101515024310559524715833294848");
|
|
|
|
|
|
list.add("002212023101515063910559525704733024256");
|
|
|
|
|
|
list.add("002212023101516270410559545940826132480");
|
|
|
|
|
|
list.add("002212023101516495710559551702819586048");
|
|
|
|
|
|
list.add("002212023101518305510559577111393722368");
|
|
|
|
|
|
list.add("002212023101520374210559609018122985472");
|
|
|
|
|
|
list.add("002212023101521011310559614933620936704");
|
|
|
|
|
|
list.add("002212023101522032410559630584582238208");
|
|
|
|
|
|
list.add("002212023101522065710559631475024687104");
|
|
|
|
|
|
list.add("002212023101522093010559632118667264000");
|
|
|
|
|
|
list.add("002212023101522151210559633552913432576");
|
|
|
|
|
|
list.add("002212023101522170810559634037727653888");
|
|
|
|
|
|
list.add("002212023101523210410559650127225470976");
|
|
|
|
|
|
list.add("002212023101523382010559654473535242240");
|
|
|
|
|
|
list.add("002212023101600131910559663278126514176");
|
|
|
|
|
|
list.add("002212023101607273710559772574975176704");
|
|
|
|
|
|
list.add("002212023101607363910559774846411321344");
|
|
|
|
|
|
list.add("002212023101608001110559780768293064704");
|
|
|
|
|
|
list.add("002212023101608042010559781815128780800");
|
|
|
|
|
|
list.add("002212023101608281010559787809402761216");
|
|
|
|
|
|
list.add("002212023101609075510559797815472926720");
|
|
|
|
|
|
list.add("002212023101610225210559816677176995840");
|
|
|
|
|
|
list.add("002212023101611014410559826459422281728");
|
|
|
|
|
|
list.add("002212023101611020810559826556693995520");
|
|
|
|
|
|
list.add("002212023101611395710559836075838652416");
|
|
|
|
|
|
list.add("002212023101612565710559855450498760704");
|
|
|
|
|
|
list.add("002212023101613294910559863725399465984");
|
|
|
|
|
|
list.add("002212023101614291710559878688805191680");
|
|
|
|
|
|
list.add("002212023101614510210559884163017814016");
|
|
|
|
|
|
list.add("002212023101614563010559885538294472704");
|
|
|
|
|
|
list.add("002212023101615005710559886657310609408");
|
|
|
|
|
|
list.add("002212023101616351610559910395804569600");
|
|
|
|
|
|
list.add("002212023101616522710559914719818801152");
|
|
|
|
|
|
list.add("002212023101619104310559949514701803520");
|
|
|
|
|
|
list.add("002212023101619304910559954573474377728");
|
|
|
|
|
|
list.add("002212023101620312710559969829996900352");
|
|
|
|
|
|
list.add("002212023101621174310559981472844513280");
|
|
|
|
|
|
list.add("002212023101622164310559996321684762624");
|
|
|
|
|
|
list.add("002212023101622433510560003083846529024");
|
|
|
|
|
|
list.add("002212023101623210610560012523772407808");
|
|
|
|
|
|
list.add("002212023101623402510560017387184984064");
|
|
|
|
|
|
list.add("002212023101700533710560035808125104128");
|
|
|
|
|
|
list.add("002212023101704554010560096722228576256");
|
|
|
|
|
|
list.add("002212023101706030110560113671499264000");
|
|
|
|
|
|
list.add("002212023101706580910560127546330714112");
|
|
|
|
|
|
list.add("002212023101706592010560127843438784512");
|
|
|
|
|
|
list.add("002212023101707155810560132029059346432");
|
|
|
|
|
|
list.add("002212023101707454110560139505616715776");
|
|
|
|
|
|
list.add("002212023101708200010560148144207151104");
|
|
|
|
|
|
list.add("002212023101708435010560154143072399360");
|
|
|
|
|
|
list.add("002212023101708590610560157981903425536");
|
|
|
|
|
|
list.add("002212023101709111710560161048356700160");
|
|
|
|
|
|
list.add("002212023101709392310560168120162369536");
|
|
|
|
|
|
list.add("002212023101709422610560168888626798592");
|
|
|
|
|
|
list.add("002212023101710332010560181699358654464");
|
|
|
|
|
|
list.add("002212023101710332710560181728426962944");
|
|
|
|
|
|
list.add("002212023101710414010560183795251912704");
|
|
|
|
|
|
list.add("002212023101711081710560190493111611392");
|
|
|
|
|
|
list.add("002212023101711082510560190526624198656");
|
|
|
|
|
|
list.add("002212023101711261510560195013180375040");
|
|
|
|
|
|
list.add("002212023101712103910560206188810809344");
|
|
|
|
|
|
list.add("002212023101713102010560221209581244416");
|
|
|
|
|
|
list.add("002212023101714323210560241895737577472");
|
|
|
|
|
|
list.add("002212023101714554810560247748835893248");
|
|
|
|
|
|
list.add("002212023101715082310560250917543968768");
|
|
|
|
|
|
list.add("002212023101715164810560253036537491456");
|
|
|
|
|
|
list.add("002212023101716121110560266970699374592");
|
|
|
|
|
|
list.add("002212023101716261410560270510304247808");
|
|
|
|
|
|
list.add("002212023101717115910560282019780616192");
|
|
|
|
|
|
list.add("002212023101718555210560308166554284032");
|
|
|
|
|
|
list.add("002212023101719451810560320604888625152");
|
|
|
|
|
|
list.add("002212023101720211510560329650837905408");
|
|
|
|
|
|
list.add("002212023101720272310560331194609905664");
|
|
|
|
|
|
list.add("002212023101721400610560349493740077056");
|
|
|
|
|
|
list.add("002212023101722125610560357757208739840");
|
|
|
|
|
|
list.add("002212023101722130610560357801784430592");
|
|
|
|
|
|
list.add("002212023101723181310560374186879926272");
|
|
|
|
|
|
list.add("002212023101807031410560491213440114688");
|
|
|
|
|
|
list.add("002212023101807274910560497398536163328");
|
|
|
|
|
|
list.add("002212023101807295610560497932327636992");
|
|
|
|
|
|
list.add("002212023101807352910560499326544752640");
|
|
|
|
|
|
list.add("002212023101807374010560499879664902144");
|
|
|
|
|
|
list.add("002212023101807492410560502830339190784");
|
|
|
|
|
|
list.add("002212023101808150910560509311297232896");
|
|
|
|
|
|
list.add("002212023101809025510560521330205818880");
|
|
|
|
|
|
list.add("002212023101809121310560523673531273216");
|
|
|
|
|
|
list.add("002212023101809485310560532900228284416");
|
|
|
|
|
|
list.add("002212023101810022110560536287317819392");
|
|
|
|
|
|
list.add("002212023101810030310560536464997212160");
|
|
|
|
|
|
list.add("002212023101810290010560542995788587008");
|
|
|
|
|
|
list.add("002212023101811182010560555410536534016");
|
|
|
|
|
|
list.add("002212023101811224110560556503829544960");
|
|
|
|
|
|
list.add("002212023101812512010560578813678235648");
|
|
|
|
|
|
list.add("002212023101813314010560588964899045376");
|
|
|
|
|
|
list.add("002212023101814040210560597109922250752");
|
|
|
|
|
|
list.add("002212023101814062810560597724354523136");
|
|
|
|
|
|
list.add("002212023101815032010560612034158485504");
|
|
|
|
|
|
list.add("002212023101815165310560615442514972672");
|
|
|
|
|
|
list.add("002212023101816242010560632420002414592");
|
|
|
|
|
|
list.add("002212023101816290710560633621435039744");
|
|
|
|
|
|
list.add("002212023101818414910560667015464308736");
|
|
|
|
|
|
list.add("002212023101819005810560671837223604224");
|
|
|
|
|
|
list.add("002212023101820125110560689927070945280");
|
|
|
|
|
|
list.add("002212023101821335010560710306222551040");
|
|
|
|
|
|
list.add("002212023101822095810560719397825536000");
|
|
|
|
|
|
list.add("002212023101822385810560726696392048640");
|
|
|
|
|
|
list.add("002212023101823343210560740679581118464");
|
|
|
|
|
|
list.add("002212023101907275010560859789577105408");
|
|
|
|
|
|
list.add("002212023101907372910560862220786249728");
|
|
|
|
|
|
list.add("002212023101908025210560868608896114688");
|
|
|
|
|
|
list.add("002212023101908041610560868958636191744");
|
|
|
|
|
|
list.add("002212023101908554010560881893844705280");
|
|
|
|
|
|
list.add("002212023101908570410560882246480527360");
|
|
|
|
|
|
list.add("002212023101909514610560896014107525120");
|
|
|
|
|
|
list.add("002212023101910012310560898434316849152");
|
|
|
|
|
|
list.add("002212023101910384010560907815761481728");
|
|
|
|
|
|
list.add("002212023101911242010560919309900496896");
|
|
|
|
|
|
list.add("002212023101912170310560932576500043776");
|
|
|
|
|
|
list.add("002212023101912204110560933487834132480");
|
|
|
|
|
|
list.add("002212023101913050010560944641706012672");
|
|
|
|
|
|
list.add("002212023101913452110560954795558420480");
|
|
|
|
|
|
list.add("002212023101913531510560956784408997888");
|
|
|
|
|
|
list.add("002212023101913550710560957253541609472");
|
|
|
|
|
|
list.add("002212023101913572010560957812163211264");
|
|
|
|
|
|
list.add("002212023101914025910560959232493056000");
|
|
|
|
|
|
list.add("002212023101915024810560974285687861248");
|
|
|
|
|
|
list.add("002212023101915123210560976734880514048");
|
|
|
|
|
|
list.add("002212023101916155310560992677346140160");
|
|
|
|
|
|
list.add("002212023101919054110561035410409959424");
|
|
|
|
|
|
list.add("002212023101919091310561036298298855424");
|
|
|
|
|
|
list.add("002212023101919361110561043086554611712");
|
|
|
|
|
|
list.add("002212023101920222510561054721701031936");
|
|
|
|
|
|
list.add("002212023101920315010561057090509979648");
|
|
|
|
|
|
list.add("002212023101921254510561070659773665280");
|
|
|
|
|
|
list.add("002212023101922095610561081778466721792");
|
|
|
|
|
|
list.add("002212023101922124310561082477980160000");
|
|
|
|
|
|
list.add("002212023101922460610561090878941933568");
|
|
|
|
|
|
list.add("002212023102007062710561216797480300544");
|
|
|
|
|
|
list.add("002212023102007235810561221206213885952");
|
|
|
|
|
|
list.add("002212023102007244110561221387949170688");
|
|
|
|
|
|
list.add("002212023102007293810561222631013224448");
|
|
|
|
|
|
list.add("002212023102007353710561224138101596160");
|
|
|
|
|
|
list.add("002212023102007370110561224491669393408");
|
|
|
|
|
|
list.add("002212023102007374310561224664798121984");
|
|
|
|
|
|
list.add("002212023102007525110561228476780339200");
|
|
|
|
|
|
list.add("002212023102009175610561249887937286144");
|
|
|
|
|
|
list.add("002212023102010041610561261544986857472");
|
|
|
|
|
|
list.add("002212023102010072210561262326583078912");
|
|
|
|
|
|
list.add("002212023102011071510561277398507245568");
|
|
|
|
|
|
list.add("002212023102013062410561307383717347328");
|
|
|
|
|
|
list.add("002212023102013071010561307575900356608");
|
|
|
|
|
|
list.add("002212023102013230310561311571440807936");
|
|
|
|
|
|
list.add("002212023102013254110561312235487211520");
|
|
|
|
|
|
list.add("002212023102013482910561317973085634560");
|
|
|
|
|
|
list.add("002212023102013531310561319163176079360");
|
|
|
|
|
|
list.add("002212023102013570910561320154881421312");
|
|
|
|
|
|
list.add("002212023102014080910561322921641373696");
|
|
|
|
|
|
list.add("002212023102015135710561339479696789504");
|
|
|
|
|
|
list.add("002212023102015453810561347452663226368");
|
|
|
|
|
|
list.add("002212023102018172310561385643372150784");
|
|
|
|
|
|
list.add("002212023102019475410561408425041289216");
|
|
|
|
|
|
list.add("002212023102020355510561420505043398656");
|
|
|
|
|
|
list.add("002212023102021345410561435349513490432");
|
|
|
|
|
|
list.add("002212023102021401210561436682581221376");
|
|
|
|
|
|
list.add("002212023102022182110561446284984655872");
|
|
|
|
|
|
list.add("002212023102022423010561452364418838528");
|
|
|
|
|
|
list.add("002212023102100030210561472627551526912");
|
|
|
|
|
|
list.add("002212023102102295510561509595326930944");
|
|
|
|
|
|
list.add("002212023102107050710561578849844895744");
|
|
|
|
|
|
list.add("002212023102107234210561583524817100800");
|
|
|
|
|
|
list.add("002212023102107241110561583650262507520");
|
|
|
|
|
|
list.add("002212023102107291210561584910515269632");
|
|
|
|
|
|
list.add("002212023102107320410561585630591623168");
|
|
|
|
|
|
list.add("002212023102107360010561586622521110528");
|
|
|
|
|
|
list.add("002212023102107382110561587213663494144");
|
|
|
|
|
|
list.add("002212023102107423410561588275666001920");
|
|
|
|
|
|
list.add("002212023102108000910561592700804046848");
|
|
|
|
|
|
list.add("002212023102108562210561606847455256576");
|
|
|
|
|
|
list.add("002212023102109245810561614043043815424");
|
|
|
|
|
|
list.add("002212023102109245810561614045402669056");
|
|
|
|
|
|
list.add("002212023102109271610561614621853163520");
|
|
|
|
|
|
list.add("002212023102109570910561622142813249536");
|
|
|
|
|
|
list.add("002212023102110105210561625597147410432");
|
|
|
|
|
|
list.add("002212023102110420010561633430765105152");
|
|
|
|
|
|
list.add("002212023102112131110561656378737778688");
|
|
|
|
|
|
list.add("002212023102113393110561678102698090496");
|
|
|
|
|
|
list.add("002212023102113503310561680880185724928");
|
|
|
|
|
|
list.add("002212023102113542410561681849160265728");
|
|
|
|
|
|
list.add("002212023102113584510561682942536998912");
|
|
|
|
|
|
list.add("002212023102114402710561693437610127360");
|
|
|
|
|
|
list.add("002212023102115155210561702352775774208");
|
|
|
|
|
|
list.add("002212023102115500110561710946982543360");
|
|
|
|
|
|
list.add("002212023102116291310561720810841796608");
|
|
|
|
|
|
list.add("002212023102116500510561726063784980480");
|
|
|
|
|
|
list.add("002212023102117290610561735881465569280");
|
|
|
|
|
|
list.add("002212023102117540010561742145377517568");
|
|
|
|
|
|
list.add("002212023102119520110561771844847501312");
|
|
|
|
|
|
list.add("002212023102119550710561772625143754752");
|
|
|
|
|
|
list.add("002212023102119582410561773454204321792");
|
|
|
|
|
|
list.add("002212023102120523010561787066135572480");
|
|
|
|
|
|
list.add("002212023102121071210561790766073028608");
|
|
|
|
|
|
list.add("002212023102121084310561791148314390528");
|
|
|
|
|
|
list.add("002212023102121445810561800272135364608");
|
|
|
|
|
|
list.add("002212023102122460810561815665595408384");
|
|
|
|
|
|
list.add("002212023102122495610561816622372708352");
|
|
|
|
|
|
list.add("002212023102122590510561818924035047424");
|
|
|
|
|
|
list.add("002212023102201253010561855770324598784");
|
|
|
|
|
|
list.add("002212023102207262410561946592113545216");
|
|
|
|
|
|
list.add("002212023102207341710561948577546330112");
|
|
|
|
|
|
list.add("002212023102207524810561953236422578176");
|
|
|
|
|
|
list.add("002212023102208255110561961554189971456");
|
|
|
|
|
|
list.add("002212023102209364210561979384399880192");
|
|
|
|
|
|
list.add("002212023102210093610561987662781411328");
|
|
|
|
|
|
list.add("002212023102210421910561995899764166656");
|
|
|
|
|
|
list.add("002212023102212084710562017658538250240");
|
|
|
|
|
|
list.add("002212023102212195610562020463698309120");
|
|
|
|
|
|
list.add("002212023102212252210562021831378817024");
|
|
|
|
|
|
list.add("002212023102213560010562044640518008832");
|
|
|
|
|
|
list.add("002212023102214013410562046041867911169");
|
|
|
|
|
|
list.add("002212023102214225010562051392359931904");
|
|
|
|
|
|
list.add("002212023102214330610562053975193219072");
|
|
|
|
|
|
list.add("002212023102215022810562061368840388608");
|
|
|
|
|
|
list.add("002212023102215073310562062647102562304");
|
|
|
|
|
|
list.add("002212023102215105810562063505804185600");
|
|
|
|
|
|
list.add("002212023102215250610562067062079049728");
|
|
|
|
|
|
list.add("002212023102215274810562067744074194944");
|
|
|
|
|
|
list.add("002212023102215565910562075085939105792");
|
|
|
|
|
|
list.add("002212023102216044410562077035068608512");
|
|
|
|
|
|
list.add("002212023102216115810562078856508043264");
|
|
|
|
|
|
list.add("002212023102216403610562086064860766208");
|
|
|
|
|
|
list.add("002212023102218572110562120477074321408");
|
|
|
|
|
|
list.add("002212023102219274910562128143182942208");
|
|
|
|
|
|
list.add("002212023102221413910562161824497889280");
|
|
|
|
|
|
list.add("002212023102222150010562170217891069952");
|
|
|
|
|
|
list.add("002212023102222231510562172293998428160");
|
|
|
|
|
|
list.add("002212023102223094310562183986872279040");
|
|
|
|
|
|
list.add("002212023102306431210562298111445782528");
|
|
|
|
|
|
list.add("002212023102307313010562310265483526144");
|
|
|
|
|
|
list.add("002212023102307423210562313043459145728");
|
|
|
|
|
|
list.add("002212023102307451810562313738174668800");
|
|
|
|
|
|
list.add("002212023102307480210562314427880927232");
|
|
|
|
|
|
list.add("002212023102307532610562315783898222592");
|
|
|
|
|
|
list.add("002212023102308080510562319473704394752");
|
|
|
|
|
|
list.add("002212023102308150910562321251479670784");
|
|
|
|
|
|
list.add("002212023102308182810562322083316191232");
|
|
|
|
|
|
list.add("002212023102309293810562339994684841984");
|
|
|
|
|
|
list.add("002212023102310270110562354435757133824");
|
|
|
|
|
|
list.add("002212023102311082510562364852391964672");
|
|
|
|
|
|
list.add("002212023102311120710562365787007569920");
|
|
|
|
|
|
list.add("002212023102311350710562371574348890112");
|
|
|
|
|
|
list.add("002212023102312003210562377971757203456");
|
|
|
|
|
|
list.add("002212023102313244510562399165518143488");
|
|
|
|
|
|
list.add("002212023102313410710562403280839995392");
|
|
|
|
|
|
list.add("002212023102313572210562407373102628864");
|
|
|
|
|
|
list.add("002212023102314072810562409915573563392");
|
|
|
|
|
|
list.add("002212023102315095310562425621565628416");
|
|
|
|
|
|
list.add("002212023102315235510562429153081356288");
|
|
|
|
|
|
list.add("002212023102315292410562430531006439424");
|
|
|
|
|
|
list.add("002212023102315384210562432874118144000");
|
|
|
|
|
|
list.add("002212023102315424410562433889337430016");
|
|
|
|
|
|
list.add("002212023102317310410562461152148152320");
|
|
|
|
|
|
list.add("002212023102317351910562462222572122112");
|
|
|
|
|
|
list.add("002212023102317385310562463118377132032");
|
|
|
|
|
|
list.add("002212023102318501210562481067462553600");
|
|
|
|
|
|
list.add("002212023102319110610562486326812696576");
|
|
|
|
|
|
list.add("002212023102320105910562501393913520128");
|
|
|
|
|
|
list.add("002212023102320173510562503056056410112");
|
|
|
|
|
|
list.add("002212023102320595810562513722158899200");
|
|
|
|
|
|
list.add("002212023102322004010562528998402334720");
|
|
|
|
|
|
list.add("002212023102322020510562529356308094976");
|
|
|
|
|
|
list.add("002212023102322142110562532443618078720");
|
|
|
|
|
|
list.add("002212023102322204410562534050054561792");
|
|
|
|
|
|
list.add("002212023102322222010562534451989245952");
|
|
|
|
|
|
list.add("002212023102407225710562670502224293888");
|
|
|
|
|
|
list.add("002212023102407244710562670962511400960");
|
|
|
|
|
|
list.add("002212023102407330110562673035276537856");
|
|
|
|
|
|
list.add("002212023102407430910562675586775932928");
|
|
|
|
|
|
list.add("002212023102407561410562678876442165248");
|
|
|
|
|
|
list.add("002212023102407573310562679210903826432");
|
|
|
|
|
|
list.add("002212023102409563810562709176907419648");
|
|
|
|
|
|
list.add("002212023102410291410562717379770675200");
|
|
|
|
|
|
list.add("002212023102411023110562725758919331840");
|
|
|
|
|
|
list.add("002212023102411405210562735409707130880");
|
|
|
|
|
|
list.add("002212023102413074110562757258049994752");
|
|
|
|
|
|
list.add("002212023102413093310562757728125018112");
|
|
|
|
|
|
list.add("002212023102414110610562773215483326464");
|
|
|
|
|
|
list.add("002212023102414335410562778953519550464");
|
|
|
|
|
|
list.add("002212023102414401910562780570440474624");
|
|
|
|
|
|
list.add("002212023102415023110562786153690525696");
|
|
|
|
|
|
list.add("002212023102415113610562788441053421568");
|
|
|
|
|
|
list.add("002212023102415244710562791760491167744");
|
|
|
|
|
|
list.add("002212023102415251310562791867792289792");
|
|
|
|
|
|
list.add("002212023102417033310562816615190085632");
|
|
|
|
|
|
list.add("002212023102418071810562832656911532032");
|
|
|
|
|
|
list.add("002212023102418141110562834387823579136");
|
|
|
|
|
|
list.add("002212023102420054110562862451354980352");
|
|
|
|
|
|
list.add("002212023102420395110562871048391434240");
|
|
|
|
|
|
list.add("002212023102421580810562890748767281152");
|
|
|
|
|
|
list.add("002212023102421595410562891191494860800");
|
|
|
|
|
|
list.add("002212023102423273610562913262658211840");
|
|
|
|
|
|
list.add("002212023102504055510562983304637935616");
|
|
|
|
|
|
list.add("002212023102507150510563030909280804864");
|
|
|
|
|
|
list.add("002212023102507295210563034631262216192");
|
|
|
|
|
|
list.add("002212023102507351010563035962611408896");
|
|
|
|
|
|
list.add("002212023102507582510563041815565139968");
|
|
|
|
|
|
list.add("002212023102507585210563041926676815872");
|
|
|
|
|
|
list.add("002212023102508034810563043168837132288");
|
|
|
|
|
|
list.add("002212023102509275710563064348165038080");
|
|
|
|
|
|
list.add("002212023102509412010563067714578108416");
|
|
|
|
|
|
list.add("002212023102509590410563072177855590400");
|
|
|
|
|
|
list.add("002212023102514111510563135640478720000");
|
|
|
|
|
|
list.add("002212023102514450710563144163293097984");
|
|
|
|
|
|
list.add("002212023102515212610563153305503047680");
|
|
|
|
|
|
list.add("002212023102515251310563154254989139968");
|
|
|
|
|
|
list.add("002212023102515425010563158688032444416");
|
|
|
|
|
|
list.add("002212023102516051210563164317499744256");
|
|
|
|
|
|
list.add("002212023102516323510563171208482824192");
|
|
|
|
|
|
list.add("002212023102516493910563175505742491648");
|
|
|
|
|
|
list.add("002212023102518475510563205267774853120");
|
|
|
|
|
|
list.add("002212023102520090910563225712047120384");
|
|
|
|
|
|
list.add("002212023102521070710563240299874971648");
|
|
|
|
|
|
list.add("002212023102521502710563251203298512896");
|
|
|
|
|
|
list.add("002212023102522414010563264092616302592");
|
|
|
|
|
|
list.add("002212023102601572310563313347911184384");
|
|
|
|
|
|
list.add("002212023102604274710563351194297212928");
|
|
|
|
|
|
list.add("002212023102607380310563399078340157440");
|
|
|
|
|
|
list.add("002212023102607502510563402189752061952");
|
|
|
|
|
|
list.add("002212023102607565410563403820092055552");
|
|
|
|
|
|
list.add("002212023102608354010563413575395688448");
|
|
|
|
|
|
list.add("002212023102608405410563414892673572864");
|
|
|
|
|
|
list.add("002212023102608514610563417629771755520");
|
|
|
|
|
|
list.add("002212023102610281510563441908059807744");
|
|
|
|
|
|
list.add("002212023102610313410563442745974218752");
|
|
|
|
|
|
list.add("002212023102610482810563446996932714496");
|
|
|
|
|
|
list.add("002212023102610554510563448829284274176");
|
|
|
|
|
|
list.add("002212023102611311310563457755383357440");
|
|
|
|
|
|
list.add("002212023102612521910563478166923595776");
|
|
|
|
|
|
list.add("002212023102613580710563494724795330560");
|
|
|
|
|
|
list.add("002212023102614162410563499325604798464");
|
|
|
|
|
|
list.add("002212023102614192510563500082946596864");
|
|
|
|
|
|
list.add("002212023102614290210563502505159802880");
|
|
|
|
|
|
list.add("002212023102614580810563509828230619136");
|
|
|
|
|
|
list.add("002212023102615035210563511271240982528");
|
|
|
|
|
|
list.add("002212023102615301510563517909685063680");
|
|
|
|
|
|
list.add("002212023102615452110563521711569879040");
|
|
|
|
|
|
list.add("002212023102615554210563524316408881152");
|
|
|
|
|
|
list.add("002212023102617180510563545047308394496");
|
|
|
|
|
|
list.add("002212023102618490410563567946080944128");
|
|
|
|
|
|
list.add("002212023102618553810563569594873901056");
|
|
|
|
|
|
list.add("002212023102619504010563583445461065728");
|
|
|
|
|
|
list.add("002212023102620282410563592943384436736");
|
|
|
|
|
|
list.add("002212023102621023710563601554055667712");
|
|
|
|
|
|
list.add("002212023102622022010563616581711253504");
|
|
|
|
|
|
list.add("002212023102622041310563617056596975616");
|
|
|
|
|
|
list.add("002212023102622073010563617881920327680");
|
|
|
|
|
|
list.add("002212023102622145110563619733427494912");
|
|
|
|
|
|
list.add("002212023102622444210563627242880061440");
|
|
|
|
|
|
list.add("002212023102700032610563647055686311936");
|
|
|
|
|
|
list.add("002212023102703151410563695323942965248");
|
|
|
|
|
|
list.add("002212023102703345510563700277920210944");
|
|
|
|
|
|
list.add("002212023102707302710563759552475979776");
|
|
|
|
|
|
list.add("002212023102707381610563761521296633856");
|
|
|
|
|
|
list.add("002212023102707524310563765155498369024");
|
|
|
|
|
|
list.add("002212023102708322010563775125000331264");
|
|
|
|
|
|
list.add("002212023102709153610563786014707642368");
|
|
|
|
|
|
list.add("002212023102710031110563797987445010432");
|
|
|
|
|
|
list.add("002212023102710191710563802039524532224");
|
|
|
|
|
|
list.add("002212023102710464410563808949781282816");
|
|
|
|
|
|
list.add("002212023102711023210563812925727637504");
|
|
|
|
|
|
list.add("002212023102712080110563829406240751616");
|
|
|
|
|
|
list.add("002212023102712253310563833817311105024");
|
|
|
|
|
|
list.add("002212023102713151010563846304894435328");
|
|
|
|
|
|
list.add("002212023102714373910563867060178624512");
|
|
|
|
|
|
list.add("002212023102714592810563872550145060864");
|
|
|
|
|
|
list.add("002212023102715241910563878804339539968");
|
|
|
|
|
|
list.add("002212023102715551910563886605535846400");
|
|
|
|
|
|
list.add("002212023102716175310563892286090223616");
|
|
|
|
|
|
list.add("002212023102717582410563917580340862976");
|
|
|
|
|
|
list.add("002212023102718333810563926449023623168");
|
|
|
|
|
|
list.add("002212023102719282310563940224997007360");
|
|
|
|
|
|
list.add("002212023102721174010563967728621023232");
|
|
|
|
|
|
list.add("002212023102721423810563974013104943104");
|
|
|
|
|
|
list.add("002212023102721514610563976310997233665");
|
|
|
|
|
|
list.add("002212023102722104510563981087487406080");
|
|
|
|
|
|
list.add("002212023102722475510563990442441687040");
|
|
|
|
|
|
list.add("002212023102723102010563996082682970112");
|
|
|
|
|
|
list.add("002212023102800194010564013530344570880");
|
|
|
|
|
|
list.add("002212023102806331510564107545946865664");
|
|
|
|
|
|
list.add("002212023102807511010564127153024397312");
|
|
|
|
|
|
list.add("002212023102808024910564130086438408192");
|
|
|
|
|
|
list.add("002212023102808313310564137317358104576");
|
|
|
|
|
|
list.add("002212023102808411910564139773237985280");
|
|
|
|
|
|
list.add("002212023102808543510564143111744266240");
|
|
|
|
|
|
list.add("002212023102808544510564143156517650432");
|
|
|
|
|
|
list.add("002212023102809174410564148940068089856");
|
|
|
|
|
|
list.add("002212023102809261410564151077603749888");
|
|
|
|
|
|
list.add("002212023102810170210564163863774642176");
|
|
|
|
|
|
list.add("002212023102812571410564204176212381696");
|
|
|
|
|
|
list.add("002212023102813030010564205627969892352");
|
|
|
|
|
|
list.add("002212023102813103110564207519220994048");
|
|
|
|
|
|
list.add("002212023102815031010564235868787699712");
|
|
|
|
|
|
list.add("002212023102815285310564242341997903872");
|
|
|
|
|
|
list.add("002212023102815445610564246380531826688");
|
|
|
|
|
|
list.add("002212023102815521310564248216025952256");
|
|
|
|
|
|
list.add("002212023102816010310564250437107994624");
|
|
|
|
|
|
list.add("002212023102816285810564257463640408064");
|
|
|
|
|
|
list.add("002212023102817360710564274361112993792");
|
|
|
|
|
|
list.add("002212023102818592110564295307849932800");
|
|
|
|
|
|
list.add("002212023102820134710564314039668424704");
|
|
|
|
|
|
list.add("002212023102820394010564320554977325056");
|
|
|
|
|
|
list.add("002212023102821082610564327792259211264");
|
|
|
|
|
|
list.add("002212023102822003610564340922041864192");
|
|
|
|
|
|
list.add("002212023102822115410564343766421172224");
|
|
|
|
|
|
list.add("002212023102822545610564354596226199552");
|
|
|
|
|
|
list.add("002212023102822565710564355099934392320");
|
|
|
|
|
|
list.add("002212023102900093510564373380199882752");
|
|
|
|
|
|
list.add("002212023102902132510564404544251895808");
|
|
|
|
|
|
list.add("002212023102906524210564474828074356736");
|
|
|
|
|
|
list.add("002212023102907384610564486422578372608");
|
|
|
|
|
|
list.add("002212023102908501510564504409196003328");
|
|
|
|
|
|
list.add("002212023102909423710564517589366075392");
|
|
|
|
|
|
list.add("002212023102911251610564543422442614784");
|
|
|
|
|
|
list.add("002212023102911505710564549884874477568");
|
|
|
|
|
|
list.add("002212023102911523310564550289633202176");
|
|
|
|
|
|
list.add("002212023102913350110564576075707686912");
|
|
|
|
|
|
list.add("002212023102914230210564588156792668160");
|
|
|
|
|
|
list.add("002212023102914570210564596715571474432");
|
|
|
|
|
|
list.add("002212023102915032610564598325018689536");
|
|
|
|
|
|
list.add("002212023102915365410564606746777985024");
|
|
|
|
|
|
list.add("002212023102915524510564610734493790208");
|
|
|
|
|
|
list.add("002212023102915571310564611861224865792");
|
|
|
|
|
|
list.add("002212023102916254710564619047426072576");
|
|
|
|
|
|
list.add("002212023102916284510564619797265641472");
|
|
|
|
|
|
list.add("002212023102917471610564639556493529088");
|
|
|
|
|
|
list.add("002212023102917501910564640322039062528");
|
|
|
|
|
|
list.add("002212023102917542910564641371068547072");
|
|
|
|
|
|
list.add("002212023102919100410564660393352871936");
|
|
|
|
|
|
list.add("002212023102920435410564684007219810304");
|
|
|
|
|
|
list.add("002212023102922003510564703303620345856");
|
|
|
|
|
|
list.add("002212023102922245210564709415323058176");
|
|
|
|
|
|
list.add("002212023102922542110564716836304711680");
|
|
|
|
|
|
list.add("002212023102923210610564723566057877504");
|
|
|
|
|
|
list.add("002212023102923465310564730055337852928");
|
|
|
|
|
|
list.add("002212023103007053010564840437639028736");
|
|
|
|
|
|
list.add("002212023103007340210564847616452870144");
|
|
|
|
|
|
list.add("002212023103007410210564849378911993856");
|
|
|
|
|
|
list.add("002212023103007440610564850151885991936");
|
|
|
|
|
|
list.add("002212023103007525310564852361725366272");
|
|
|
|
|
|
list.add("002212023103007553810564853053324152832");
|
|
|
|
|
|
list.add("002212023103008283410564861340632846336");
|
|
|
|
|
|
list.add("002212023103008472310564866077545209856");
|
|
|
|
|
|
list.add("002212023103008564410564868430516023296");
|
|
|
|
|
|
list.add("002212023103009315610564877288173715456");
|
|
|
|
|
|
list.add("002212023103009442610564880433640992768");
|
|
|
|
|
|
list.add("002212023103010235810564890384984424448");
|
|
|
|
|
|
list.add("002212023103010540510564897961741275136");
|
|
|
|
|
|
list.add("002212023103011473510564911426045984768");
|
|
|
|
|
|
list.add("002212023103012103110564917195603427328");
|
|
|
|
|
|
list.add("002212023103012404210564924793643331584");
|
|
|
|
|
|
list.add("002212023103012481410564926688424869888");
|
|
|
|
|
|
list.add("002212023103013542810564943358564872192");
|
|
|
|
|
|
list.add("002212023103014002110564944839363899392");
|
|
|
|
|
|
list.add("002212023103014083310564946899451092992");
|
|
|
|
|
|
list.add("002212023103014273710564951701194911744");
|
|
|
|
|
|
list.add("002212023103014414510564955255362547712");
|
|
|
|
|
|
list.add("002212023103015101010564962407105961984");
|
|
|
|
|
|
list.add("002212023103015565610564974178112786432");
|
|
|
|
|
|
list.add("002212023103016290610564982273699311616");
|
|
|
|
|
|
list.add("002212023103018361610565014273871310848");
|
|
|
|
|
|
list.add("002212023103018402210565015305290842112");
|
|
|
|
|
|
list.add("002212023103018533010565018609857171456");
|
|
|
|
|
|
list.add("002212023103020275010565042351033434112");
|
|
|
|
|
|
list.add("002212023103021133310565053855503810560");
|
|
|
|
|
|
list.add("002212023103021162910565054592679669760");
|
|
|
|
|
|
list.add("002212023103021215610565055964112220160");
|
|
|
|
|
|
list.add("002212023103022044710565066750264078336");
|
|
|
|
|
|
list.add("002212023103022055110565067015838015488");
|
|
|
|
|
|
list.add("002212023103022344710565074299883200512");
|
|
|
|
|
|
list.add("002212023103023120710565083693098475520");
|
|
|
|
|
|
list.add("002212023103100524510565109021539672064");
|
|
|
|
|
|
list.add("002212023103107262710565208097214164992");
|
|
|
|
|
|
list.add("002212023103107283910565208649081823232");
|
|
|
|
|
|
list.add("002212023103107324810565209693765509120");
|
|
|
|
|
|
list.add("002212023103107350310565210261170790400");
|
|
|
|
|
|
list.add("002212023103107542210565215123502108672");
|
|
|
|
|
|
list.add("002212023103108214710565222023247577088");
|
|
|
|
|
|
list.add("002212023103108284310565223768510582784");
|
|
|
|
|
|
list.add("002212023103108320710565224623620861952");
|
|
|
|
|
|
list.add("002212023103109371810565241025204305920");
|
|
|
|
|
|
list.add("002212023103110004510565246929108987904");
|
|
|
|
|
|
list.add("002212023103110573110565261212684644352");
|
|
|
|
|
|
list.add("002212023103113111810565294882382778368");
|
|
|
|
|
|
list.add("002212023103113225910565297822367227904");
|
|
|
|
|
|
list.add("002212023103114134410565310594719662080");
|
|
|
|
|
|
list.add("002212023103114200710565312198227066880");
|
|
|
|
|
|
list.add("002212023103115273910565329197467062272");
|
|
|
|
|
|
list.add("002212023103115282310565329381728022528");
|
|
|
|
|
|
list.add("002212023103115455310565333784387121152");
|
|
|
|
|
|
list.add("002212023103116134010565340774007672832");
|
|
|
|
|
|
list.add("002212023103116375710565346886088900608");
|
|
|
|
|
|
list.add("002212023103118351910565376422500470784");
|
|
|
|
|
|
list.add("002212023103118574410565382064874811392");
|
|
|
|
|
|
list.add("002212023103119120810565385689626378240");
|
|
|
|
|
|
list.add("002212023103119562110565396817437356032");
|
|
|
|
|
|
list.add("002212023103122173210565432347412201472");
|
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());
|
2024-01-11 16:14:35 +08:00
|
|
|
|
recordList.add(RefundableWxPayOrderData.builder().outTradeNo("3").transactionId("3").payerAmount(Constants.whitelistDefaultAmount).refundableAmount(new BigDecimal("300")).build());
|
2023-08-30 11:02:18 +08:00
|
|
|
|
|
|
|
|
|
|
// 也许需要多笔支付订单才够退款
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
}
|