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;
|
2024-06-07 11:33:26 +08:00
|
|
|
|
import com.alipay.easysdk.factory.Factory;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
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-08-15 11:02:02 +08:00
|
|
|
|
import com.jsowell.adapay.config.AbstractAdapayConfig;
|
2024-03-14 11:40:11 +08:00
|
|
|
|
import com.jsowell.adapay.dto.*;
|
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;
|
2024-01-19 16:59:54 +08:00
|
|
|
|
import com.jsowell.adapay.vo.AdapayCorpMemberVO;
|
2023-08-21 13:20:17 +08:00
|
|
|
|
import com.jsowell.adapay.vo.DrawCashDetailVO;
|
2024-03-26 09:18:09 +08:00
|
|
|
|
import com.jsowell.adapay.vo.PaymentInfo;
|
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;
|
2024-07-10 15:39:19 +08:00
|
|
|
|
import com.jsowell.netty.handler.yunkuaichong.HeartbeatRequestHandler;
|
|
|
|
|
|
import com.jsowell.netty.handler.yunkuaichong.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;
|
2024-04-01 09:57:23 +08:00
|
|
|
|
import com.jsowell.pile.thirdparty.CommonParamsDTO;
|
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;
|
2024-02-22 17:04:41 +08:00
|
|
|
|
import com.jsowell.pile.vo.uniapp.CurrentTimePriceDetails;
|
2024-07-05 14:36:57 +08:00
|
|
|
|
import com.jsowell.pile.vo.uniapp.MemberPlateNumberVO;
|
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;
|
2024-01-13 15:28:02 +08:00
|
|
|
|
import com.jsowell.pile.vo.web.*;
|
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;
|
2024-04-22 11:10:17 +08:00
|
|
|
|
import com.jsowell.thirdparty.common.NotificationDTO;
|
2024-04-20 15:55:35 +08:00
|
|
|
|
import com.jsowell.thirdparty.common.NotificationService;
|
2024-01-14 16:36:30 +08:00
|
|
|
|
import com.jsowell.thirdparty.huawei.HuaWeiService;
|
2023-05-26 16:14:45 +08:00
|
|
|
|
import com.jsowell.thirdparty.lianlian.service.LianLianService;
|
2024-04-01 09:57:23 +08:00
|
|
|
|
import com.jsowell.thirdparty.lutongyunting.service.LTYTService;
|
2024-03-27 16:13:43 +08:00
|
|
|
|
import com.jsowell.thirdparty.platform.util.Cryptos;
|
|
|
|
|
|
import com.jsowell.thirdparty.platform.util.Encodes;
|
|
|
|
|
|
import com.jsowell.thirdparty.platform.util.GBSignUtils;
|
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;
|
2024-06-11 15:12:02 +08:00
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
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;
|
2024-01-13 15:28:02 +08:00
|
|
|
|
import java.math.RoundingMode;
|
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 {
|
2024-06-11 15:12:02 +08:00
|
|
|
|
protected final Logger logger = LoggerFactory.getLogger(this.getClass());
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
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;
|
|
|
|
|
|
|
2024-01-13 15:28:02 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private MemberGroupService memberGroupService;
|
|
|
|
|
|
|
2024-01-14 16:36:30 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private HuaWeiService huaWeiService;
|
|
|
|
|
|
|
2024-04-20 15:55:35 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private NotificationService notificationService;
|
|
|
|
|
|
|
2024-07-02 15:24:36 +08:00
|
|
|
|
@Autowired
|
|
|
|
|
|
private PileReservationInfoService pileReservationInfoService;
|
|
|
|
|
|
|
2024-07-05 14:36:57 +08:00
|
|
|
|
@Test
|
|
|
|
|
|
public void selectMemberPlateNumberRelationTest() {
|
|
|
|
|
|
String memberId = "25950857";
|
|
|
|
|
|
List<MemberPlateNumberVO> plateNumberVOList = memberPlateNumberRelationService.selectMemberPlateNumberRelation(memberId);
|
|
|
|
|
|
System.out.println(JSON.toJSONString(plateNumberVOList));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-07-02 15:24:36 +08:00
|
|
|
|
@Test
|
|
|
|
|
|
public void activateReservedTest() {
|
|
|
|
|
|
PileReservationDTO dto = new PileReservationDTO();
|
|
|
|
|
|
dto.setReservedId("15");
|
|
|
|
|
|
dto.setMemberId("25950857");
|
|
|
|
|
|
// 启用
|
|
|
|
|
|
pileReservationInfoService.activateReserved(dto);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void payOrderV2Test() {
|
|
|
|
|
|
String s = "{\n" +
|
|
|
|
|
|
" \"alipayAppId\": \"2021004145642756\",\n" +
|
|
|
|
|
|
" \"code\": \"10bb693b0f2346dcb9b70d92322dNC91\",\n" +
|
|
|
|
|
|
" \"goodsDesc\": \"充电桩预付款金额\",\n" +
|
|
|
|
|
|
" \"goodsTitle\": \"充电费用\",\n" +
|
|
|
|
|
|
" \"lockValue\": \"f0f6a356-a720-49d1-ad21-bb685af91703\",\n" +
|
|
|
|
|
|
" \"memberId\": \"65622699\",\n" +
|
|
|
|
|
|
" \"orderCode\": \"C84239627240\",\n" +
|
|
|
|
|
|
" \"payAmount\": 50,\n" +
|
|
|
|
|
|
" \"payMode\": \"5\",\n" +
|
|
|
|
|
|
" \"requestSource\": \"alipay_lite\",\n" +
|
|
|
|
|
|
" \"type\": \"order\"\n" +
|
|
|
|
|
|
"}";
|
|
|
|
|
|
PayOrderDTO dto = JSON.parseObject(s, PayOrderDTO.class);
|
|
|
|
|
|
orderService.payOrderV2(dto);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-06-18 16:03:23 +08:00
|
|
|
|
@Test
|
|
|
|
|
|
public void queryPaymentReverseTest2() {
|
|
|
|
|
|
String paymentId = "002212024061717243610648707836701741056";
|
|
|
|
|
|
try {
|
|
|
|
|
|
adapayService.queryPaymentReverse(paymentId, wechatAppId1);
|
|
|
|
|
|
} catch (BaseAdaPayException e) {
|
|
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-06-12 15:38:44 +08:00
|
|
|
|
@Test
|
|
|
|
|
|
public void createBalancePaymentRequestTest() {
|
2024-06-14 15:25:58 +08:00
|
|
|
|
String outMemberId = "ACM40782726";
|
2024-06-12 15:38:44 +08:00
|
|
|
|
String inMemberId = "0";
|
2024-06-14 15:25:58 +08:00
|
|
|
|
String transAmt = "124.72";
|
2024-06-12 15:38:44 +08:00
|
|
|
|
String title = "提取余额到自己账户";
|
2024-06-14 15:25:58 +08:00
|
|
|
|
String desc = "2024年6月14日14点15分,售后需求:客户需要重新添加结算账户,原账户余额放弃提取";
|
2024-06-12 15:38:44 +08:00
|
|
|
|
String wechatAppId = wechatAppId1;
|
|
|
|
|
|
adapayService.createBalancePaymentRequest(outMemberId, inMemberId, transAmt, title, desc, wechatAppId);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-06-07 11:33:26 +08:00
|
|
|
|
@Test
|
2024-06-11 17:01:44 +08:00
|
|
|
|
public void decryptPhoneNum() throws Exception {
|
|
|
|
|
|
|
|
|
|
|
|
String content = "/CunEGSbDxsQaKllc35Q+4lJdLiprZhrHFt9er/ZriETVHv2IrtZsmC8cA6DE5l8GgzvgHCPdGp1iUJQhNyKog==";
|
|
|
|
|
|
// 通过密文解密 获取手机号码
|
|
|
|
|
|
String mobileNumber = Factory.Util.AES().decrypt(content);
|
|
|
|
|
|
System.out.println(mobileNumber);
|
2024-06-07 11:33:26 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-06-04 15:26:08 +08:00
|
|
|
|
@Test
|
|
|
|
|
|
public void getOrderRefundInfoListTest() {
|
|
|
|
|
|
String orderCode = "C44565166677";
|
|
|
|
|
|
OrderBasicInfo orderBasicInfo = new OrderBasicInfo();
|
|
|
|
|
|
orderBasicInfo.setOrderCode(orderCode);
|
|
|
|
|
|
orderBasicInfo.setMerchantId("33");
|
|
|
|
|
|
orderBasicInfo.setPayMode("4");
|
|
|
|
|
|
// 查询退款明细
|
|
|
|
|
|
List<OrderDetailInfoVO.OrderRefundInfo> orderRefundInfoList = orderBasicInfoService.getOrderRefundInfoList(orderBasicInfo);
|
|
|
|
|
|
System.out.println(JSON.toJSONString(orderRefundInfoList));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-05-28 10:51:51 +08:00
|
|
|
|
@Test
|
|
|
|
|
|
public void getSnowflakeIdTest() {
|
|
|
|
|
|
for (int i = 0; i < 100; i++) {
|
|
|
|
|
|
String snowflakeId = SnowflakeIdWorker.getSnowflakeId();
|
|
|
|
|
|
System.out.println("第" + i + "个snowflakeId:" + snowflakeId);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void getOrderCodeTest() {
|
|
|
|
|
|
for (int i = 0; i < 10; i++) {
|
|
|
|
|
|
String orderCode = IdUtils.getOrderCode();
|
|
|
|
|
|
System.out.println("第" + i + 1 + "个orderCode:" + orderCode);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-04-20 15:55:35 +08:00
|
|
|
|
@Test
|
|
|
|
|
|
public void notificationStationInfoTest() {
|
|
|
|
|
|
String stationId = "19";
|
2024-04-22 11:10:17 +08:00
|
|
|
|
NotificationDTO dto = new NotificationDTO();
|
|
|
|
|
|
dto.setStationId(stationId);
|
|
|
|
|
|
dto.setPlatformType("1");
|
|
|
|
|
|
notificationService.notificationStationInfo(dto);
|
2024-04-20 15:55:35 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-02-22 14:46:54 +08:00
|
|
|
|
@Test
|
|
|
|
|
|
public void queryBillingPriceTest() {
|
|
|
|
|
|
String stationId = "19";
|
2024-02-22 17:04:41 +08:00
|
|
|
|
// List<BillingPriceVO> billingPriceVOS = pileBillingTemplateService.queryBillingPriceOld(stationId);
|
|
|
|
|
|
// System.out.println("老版:" + JSON.toJSONString(billingPriceVOS));
|
|
|
|
|
|
//
|
|
|
|
|
|
// List<BillingPriceVO> billingPriceVOS1 = pileBillingTemplateService.queryBillingPrice(stationId);
|
|
|
|
|
|
// System.out.println("新版:" + JSON.toJSONString(billingPriceVOS1));
|
|
|
|
|
|
|
|
|
|
|
|
CurrentTimePriceDetails currentTimePriceDetails = pileBillingTemplateService.getCurrentTimePriceDetails(stationId);
|
|
|
|
|
|
System.out.println("currentTimePriceDetails:" + JSON.toJSONString(currentTimePriceDetails));
|
2024-02-22 14:46:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-01-17 11:08:16 +08:00
|
|
|
|
@Test
|
|
|
|
|
|
public void testnotificationOperationSystemInfo() {
|
|
|
|
|
|
// HWStationInfo hwStationInfo = huaWeiService.notificationOperationSystemInfo("19");
|
2024-03-19 16:22:40 +08:00
|
|
|
|
// String s = JSON.toJSONString(hwStationInfo);
|
2024-01-17 11:08:16 +08:00
|
|
|
|
// System.out.println(s);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
2024-03-19 16:22:40 +08:00
|
|
|
|
// ChannelFuture future = cameraBusinessServiceImpl.sendMsg(channelId, topic, JSON.toJSONString());
|
2023-12-20 16:17:34 +08:00
|
|
|
|
// System.out.println(future.toString());
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-01-14 16:36:30 +08:00
|
|
|
|
@Test
|
|
|
|
|
|
public void testDeliverEquipBusinessPolicy() {
|
|
|
|
|
|
|
|
|
|
|
|
String result = huaWeiService.deliverEquipBusinessPolicy("test123451694073123456", "8823000000073501");
|
|
|
|
|
|
|
|
|
|
|
|
System.out.println(result);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-01-13 15:28:02 +08:00
|
|
|
|
@Test
|
|
|
|
|
|
public void testDiscount() {
|
|
|
|
|
|
OrderBasicInfo orderBasicInfo = new OrderBasicInfo();
|
|
|
|
|
|
orderBasicInfo.setMemberId("12345678");
|
|
|
|
|
|
orderBasicInfo.setMerchantId("1");
|
|
|
|
|
|
orderBasicInfo.setStationId("19");
|
|
|
|
|
|
orderBasicInfo.setPayAmount(new BigDecimal("200"));
|
|
|
|
|
|
|
|
|
|
|
|
OrderDetail orderDetail = new OrderDetail();
|
|
|
|
|
|
orderDetail.setTotalElectricityAmount(new BigDecimal("3"));
|
|
|
|
|
|
orderDetail.setTotalServiceAmount(new BigDecimal("0.18"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String memberId = orderBasicInfo.getMemberId(); // 会员id
|
|
|
|
|
|
String merchantId = orderBasicInfo.getMerchantId(); // 运营商id
|
|
|
|
|
|
String stationId = orderBasicInfo.getStationId(); // 站点id
|
|
|
|
|
|
|
|
|
|
|
|
// 电费折扣金额
|
|
|
|
|
|
BigDecimal discountElectricityAmount = BigDecimal.ZERO;
|
|
|
|
|
|
// 服务费折扣金额
|
|
|
|
|
|
BigDecimal discountServiceAmount = BigDecimal.ZERO;
|
|
|
|
|
|
|
|
|
|
|
|
BigDecimal afterServiceAmountDiscount = BigDecimal.ZERO;
|
|
|
|
|
|
BigDecimal afterElectricityAmountDiscount = BigDecimal.ZERO;
|
|
|
|
|
|
|
|
|
|
|
|
// 查询会员在此站点会员折扣
|
|
|
|
|
|
MemberDiscountVO memberDiscountVO = memberGroupService.queryMemberDiscount(merchantId, stationId, memberId);
|
|
|
|
|
|
if (memberDiscountVO != null) {
|
|
|
|
|
|
BigDecimal discount = memberDiscountVO.getDiscount(); // 折扣率
|
|
|
|
|
|
String groupType = memberDiscountVO.getGroupType(); // 类型(1-服务费折扣,2-电费折扣 ,3-电费和服务费一起折扣)
|
|
|
|
|
|
BigDecimal totalElectricityAmount = orderDetail.getTotalElectricityAmount(); // 电费
|
|
|
|
|
|
BigDecimal totalServiceAmount = orderDetail.getTotalServiceAmount(); // 服务费
|
|
|
|
|
|
|
|
|
|
|
|
afterServiceAmountDiscount = totalServiceAmount;
|
|
|
|
|
|
afterElectricityAmountDiscount = totalElectricityAmount;
|
|
|
|
|
|
if (Constants.ONE.equals(groupType)) {
|
|
|
|
|
|
afterServiceAmountDiscount = totalServiceAmount.multiply(discount).setScale(4, RoundingMode.DOWN);
|
|
|
|
|
|
discountServiceAmount = totalServiceAmount.subtract(afterServiceAmountDiscount);
|
|
|
|
|
|
} else if (Constants.TWO.equals(groupType)) {
|
|
|
|
|
|
afterElectricityAmountDiscount = totalElectricityAmount.multiply(discount).setScale(4, RoundingMode.DOWN);
|
|
|
|
|
|
discountElectricityAmount = totalElectricityAmount.subtract(afterElectricityAmountDiscount);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
// BigDecimal afterServiceAmountDiscount = totalServiceAmount.multiply(discount).setScale(2, RoundingMode.DOWN);
|
|
|
|
|
|
// discountServiceAmount = totalServiceAmount.subtract(afterServiceAmountDiscount);
|
|
|
|
|
|
// BigDecimal afterElectricityAmountDiscount = totalElectricityAmount.multiply(discount).setScale(2, RoundingMode.DOWN);
|
|
|
|
|
|
// discountElectricityAmount = totalElectricityAmount.subtract(afterElectricityAmountDiscount);
|
|
|
|
|
|
afterServiceAmountDiscount = totalServiceAmount.multiply(discount).setScale(4, RoundingMode.DOWN);
|
|
|
|
|
|
afterElectricityAmountDiscount = totalElectricityAmount.multiply(discount).setScale(4, RoundingMode.DOWN);
|
|
|
|
|
|
|
|
|
|
|
|
discountServiceAmount = totalServiceAmount.subtract(afterServiceAmountDiscount);
|
|
|
|
|
|
discountElectricityAmount = totalElectricityAmount.subtract(afterElectricityAmountDiscount);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
// 订单折扣金额
|
|
|
|
|
|
BigDecimal discountAmount = discountServiceAmount.add(discountElectricityAmount);
|
|
|
|
|
|
orderBasicInfo.setDiscountAmount(discountAmount);
|
|
|
|
|
|
// 更新退款金额 = 退款金额 - 折扣金额
|
|
|
|
|
|
// BigDecimal refundAmount = orderBasicInfo.getRefundAmount().subtract(discountAmount);
|
|
|
|
|
|
|
|
|
|
|
|
// 总消费金额 = 折扣后电费 + 折扣后服务费
|
|
|
|
|
|
BigDecimal totalConsumeAmount = afterServiceAmountDiscount.add(afterElectricityAmountDiscount);
|
|
|
|
|
|
// 更新退款金额
|
|
|
|
|
|
BigDecimal refundAmount = orderBasicInfo.getPayAmount().subtract(totalConsumeAmount).setScale(2, RoundingMode.DOWN);
|
|
|
|
|
|
orderBasicInfo.setRefundAmount(refundAmount);
|
|
|
|
|
|
|
|
|
|
|
|
orderDetail.setDiscountElectricityAmount(discountElectricityAmount);
|
|
|
|
|
|
orderDetail.setDiscountServiceAmount(discountServiceAmount);
|
|
|
|
|
|
}
|
2023-12-20 16:17:34 +08:00
|
|
|
|
|
2023-11-03 16:07:28 +08:00
|
|
|
|
@Test
|
|
|
|
|
|
public void queryPaymentByOrderNoTest() {
|
2024-04-15 10:29:13 +08:00
|
|
|
|
String orderNo = "C88850447008_20240415083226";
|
|
|
|
|
|
String orderCode = orderNo.substring(0, orderNo.indexOf("_"));
|
2024-03-26 09:18:09 +08:00
|
|
|
|
String wechatAppId = wechatAppId1;
|
2023-11-03 16:07:28 +08:00
|
|
|
|
try {
|
2024-03-26 09:18:09 +08:00
|
|
|
|
// List<AdaPayment> adaPayments = adapayService.queryPaymentsByOrderNo(orderNo, wechatAppId);
|
|
|
|
|
|
// System.out.println(JSON.toJSONString(adaPayments));
|
|
|
|
|
|
|
|
|
|
|
|
Set<PaymentInfo> paymentInfoSet = Sets.newHashSet();
|
|
|
|
|
|
|
|
|
|
|
|
List<PaymentInfo> paymentInfos = adapayService.queryPaymentInfosByOrderNo(orderNo, wechatAppId);
|
|
|
|
|
|
paymentInfoSet.addAll(paymentInfos);
|
|
|
|
|
|
System.out.println("1111:" + JSON.toJSONString(paymentInfos));
|
|
|
|
|
|
|
2024-04-15 10:29:13 +08:00
|
|
|
|
List<OrderPayRecord> orderPayRecordList = orderPayRecordService.getOrderPayRecordList(orderCode);
|
2024-03-26 09:18:09 +08:00
|
|
|
|
if (CollectionUtils.isNotEmpty(orderPayRecordList)) {
|
|
|
|
|
|
for (OrderPayRecord orderPayRecord : orderPayRecordList) {
|
|
|
|
|
|
List<PaymentInfo> paymentInfos2 = orderPayRecordService.parseDeductionRecord(orderPayRecord.getDeductionRecord());
|
|
|
|
|
|
paymentInfoSet.addAll(paymentInfos2);
|
|
|
|
|
|
System.out.println("2222:" + JSON.toJSONString(paymentInfos2));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
System.out.println("set:" + JSON.toJSONString(paymentInfoSet));
|
|
|
|
|
|
|
2023-11-03 16:07:28 +08:00
|
|
|
|
} 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
|
|
|
|
|
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);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-01-19 15:38:38 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 【用户需要换绑银行卡 1-删除结算账户信息,2-使用新账户信息创建结算账户】
|
|
|
|
|
|
* 删除结算账户信息
|
|
|
|
|
|
* @throws BaseAdaPayException
|
|
|
|
|
|
*/
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void createDeleteSettleAccountRequestTest() throws BaseAdaPayException {
|
2024-04-24 17:08:14 +08:00
|
|
|
|
String adapayMemberId = "AM40919405";
|
|
|
|
|
|
String settleAccountId = "0540761871278208";
|
2024-01-19 15:38:38 +08:00
|
|
|
|
adapayService.createDeleteSettleAccountRequest(adapayMemberId, settleAccountId, wechatAppId1);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 手动变更银行卡信息
|
|
|
|
|
|
*/
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void createSettleAccountRequestTest() throws BaseAdaPayException {
|
|
|
|
|
|
SettleAccountDTO dto = new SettleAccountDTO();
|
2024-01-19 15:38:38 +08:00
|
|
|
|
dto.setCardId("45050160425000000627");
|
|
|
|
|
|
dto.setCardName("广西昂晟节能科技有限公司");
|
|
|
|
|
|
dto.setTelNo("19163816451");
|
|
|
|
|
|
dto.setBankCode("01050000");
|
2023-08-30 11:02:18 +08:00
|
|
|
|
dto.setBankAcctType("1");
|
2024-01-19 15:38:38 +08:00
|
|
|
|
dto.setProvCode("0045");
|
|
|
|
|
|
dto.setAreaCode("4501");
|
|
|
|
|
|
String adapayMemberId = "ACM82792551";
|
2023-10-31 15:17:39 +08:00
|
|
|
|
adapayService.createSettleAccountRequest(dto, adapayMemberId, 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);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-01-11 17:28:45 +08:00
|
|
|
|
@Test
|
|
|
|
|
|
public void refundOrderTest() {
|
|
|
|
|
|
String orderCode = "C80410085692";
|
|
|
|
|
|
OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
|
|
|
|
|
|
String mode = pileMerchantInfoService.getDelayModeByMerchantId(orderBasicInfo.getMerchantId());
|
|
|
|
|
|
AbstractProgramLogic orderLogic = ProgramLogicFactory.getProgramLogic(mode);
|
|
|
|
|
|
orderLogic.refundOrder(orderBasicInfo);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@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-06-20 14:20:42 +08:00
|
|
|
|
"{\"orderCode\":\"C44529020684\", \"settleAmount\":\"15.67\", \"paymentId\":\"002212024050317243010632400358265659392\"}" +
|
|
|
|
|
|
"{\"orderCode\":\"C63381134165\", \"settleAmount\":\"39.65\", \"paymentId\":\"002212024052518295510640389353916465152\"}" +
|
2024-06-19 17:04:01 +08:00
|
|
|
|
"{\"orderCode\":\"C44778282947\", \"settleAmount\":\"8.38\", \"paymentId\":\"002212023101608315910559788773415297024\"}" +
|
2024-06-06 09:37:22 +08:00
|
|
|
|
"{\"orderCode\":\"C44778282947\", \"settleAmount\":\"8.38\", \"paymentId\":\"002212023101608315910559788773415297024\"}" +
|
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-06-20 14:20:42 +08:00
|
|
|
|
adapayMemberAccount.setAdapayMemberId("ACM23489463");
|
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
|
|
|
|
|
2024-06-19 15:42:57 +08:00
|
|
|
|
List<String> unSplitList = Lists.newArrayList(); // 未分帐
|
|
|
|
|
|
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);
|
2024-03-14 16:42:19 +08:00
|
|
|
|
// 查询分账信息
|
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() {
|
2024-06-18 14:21:20 +08:00
|
|
|
|
String paymentId = "002212024061717243610648707836701741056";
|
|
|
|
|
|
BigDecimal refundAmount = new BigDecimal("46.49");
|
2023-10-08 16:42:56 +08:00
|
|
|
|
String memberId = null;
|
2023-09-28 16:48:24 +08:00
|
|
|
|
|
|
|
|
|
|
// 延迟分账未确认调撤销调撤销接口退款
|
|
|
|
|
|
PaymentReverseOperation operation = new PaymentReverseOperation();
|
|
|
|
|
|
operation.setPaymentId(paymentId);
|
|
|
|
|
|
operation.setReverseAmt(refundAmount);
|
2024-06-18 14:21:20 +08:00
|
|
|
|
operation.setMerchantKey(wechatAppId1);
|
2023-09-28 16:48:24 +08:00
|
|
|
|
operation.setMemberId(memberId);
|
|
|
|
|
|
operation.setScenarioType(ScenarioEnum.ORDER.getValue());
|
2024-06-18 14:21:20 +08:00
|
|
|
|
operation.setOrderCode("C82929272783");
|
2023-09-28 16:48:24 +08:00
|
|
|
|
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);
|
2024-03-19 16:22:40 +08:00
|
|
|
|
// System.out.println(JSON.toJSONString());
|
2023-10-31 15:17:39 +08:00
|
|
|
|
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-08-30 11:02:18 +08:00
|
|
|
|
|
2024-05-15 11:32:08 +08:00
|
|
|
|
private List<String> getPaymentIdList1() {
|
2024-03-14 11:40:11 +08:00
|
|
|
|
List<String> list = Lists.newArrayList();
|
2024-06-20 14:20:42 +08:00
|
|
|
|
list.add("002212024043018112310631324989830565888");
|
|
|
|
|
|
list.add("002212024043019002610631337336032174080");
|
|
|
|
|
|
list.add("002212024043021035710631368417672151040");
|
|
|
|
|
|
list.add("002212024043021230110631373218474573824");
|
|
|
|
|
|
list.add("002212024043021305910631375223113998336");
|
|
|
|
|
|
list.add("002212024043021402410631377591256563712");
|
|
|
|
|
|
list.add("002212024043022005310631382746325123072");
|
|
|
|
|
|
list.add("002212024043022082310631384634188455936");
|
|
|
|
|
|
list.add("002212024043022111010631385334689894400");
|
|
|
|
|
|
list.add("002212024043022125710631385783424430080");
|
|
|
|
|
|
list.add("002212024043023364910631406889031012352");
|
|
|
|
|
|
list.add("002212024050100555210631426784438468608");
|
|
|
|
|
|
list.add("002212024050101564310631442096641081344");
|
|
|
|
|
|
list.add("002212024050109513110631561583485607936");
|
|
|
|
|
|
list.add("002212024050112190310631598711951347712");
|
|
|
|
|
|
list.add("002212024050112193910631598863063289856");
|
|
|
|
|
|
list.add("002212024050116145010631658047457914880");
|
|
|
|
|
|
list.add("002212024050116381510631663941580558336");
|
|
|
|
|
|
list.add("002212024050117261310631676011171102720");
|
|
|
|
|
|
list.add("002212024050118082310631686625478639616");
|
|
|
|
|
|
list.add("002212024050119163710631703795541143552");
|
|
|
|
|
|
list.add("002212024050120142010631718319982743552");
|
|
|
|
|
|
list.add("002212024050121123810631732992296861696");
|
|
|
|
|
|
list.add("002212024050121190010631734593200664576");
|
|
|
|
|
|
list.add("002212024050121395610631739863741218816");
|
|
|
|
|
|
list.add("002212024050122151310631748742705299456");
|
|
|
|
|
|
list.add("002212024050122190110631749697821020160");
|
|
|
|
|
|
list.add("002212024050201233710631796154388787200");
|
|
|
|
|
|
list.add("002212024050210121710631929198479224832");
|
|
|
|
|
|
list.add("002212024050211275210631948218580688896");
|
|
|
|
|
|
list.add("002212024050211345610631949997461180416");
|
|
|
|
|
|
list.add("002212024050212045410631957538310795264");
|
|
|
|
|
|
list.add("002212024050216401010632026811084804096");
|
|
|
|
|
|
list.add("002212024050219303410632069693445677056");
|
|
|
|
|
|
list.add("002212024050221070210632093971698348032");
|
|
|
|
|
|
list.add("002212024050221294510632099687985299456");
|
|
|
|
|
|
list.add("002212024050221313510632100149706813440");
|
|
|
|
|
|
list.add("002212024050221503210632104919943057408");
|
|
|
|
|
|
list.add("002212024050222073410632109206990041088");
|
|
|
|
|
|
list.add("002212024050222123210632110455720312832");
|
|
|
|
|
|
list.add("002212024050223115310632125389015003136");
|
|
|
|
|
|
list.add("002212024050223534410632135924106735616");
|
|
|
|
|
|
list.add("002212024050302061810632169283891560448");
|
|
|
|
|
|
list.add("002212024050302072110632169550497955840");
|
|
|
|
|
|
list.add("002212024050302415410632178245208326144");
|
|
|
|
|
|
list.add("002212024050312071010632320496773603328");
|
|
|
|
|
|
list.add("002212024050313432710632344729483972608");
|
|
|
|
|
|
list.add("002212024050314473210632360852854390784");
|
|
|
|
|
|
list.add("002212024050316154610632383057880256512");
|
|
|
|
|
|
list.add("002212024050317243010632400358265659392");
|
|
|
|
|
|
list.add("002212024050317470810632406053448794112");
|
|
|
|
|
|
list.add("002212024050318272710632416199975546880");
|
|
|
|
|
|
list.add("002212024050318275010632416293608984576");
|
|
|
|
|
|
list.add("002212024050319033210632425277456105472");
|
|
|
|
|
|
list.add("002212024050319314610632432386620755968");
|
|
|
|
|
|
list.add("002212024050319414010632434873963094016");
|
|
|
|
|
|
list.add("002212024050320373710632448956266516480");
|
|
|
|
|
|
list.add("002212024050321075110632456566520229888");
|
|
|
|
|
|
list.add("002212024050321211410632459931930566656");
|
|
|
|
|
|
list.add("002212024050321213210632460006643376128");
|
|
|
|
|
|
list.add("002212024050323312510632492696384372736");
|
|
|
|
|
|
list.add("002212024050400200810632504953702948864");
|
|
|
|
|
|
list.add("002212024050403191310632550020869328896");
|
|
|
|
|
|
list.add("002212024050413471410632708069460885504");
|
|
|
|
|
|
list.add("002212024050414214210632716743376449536");
|
|
|
|
|
|
list.add("002212024050416193910632746424515403776");
|
|
|
|
|
|
list.add("002212024050416490310632753822120263680");
|
|
|
|
|
|
list.add("002212024050416592210632756418746486784");
|
|
|
|
|
|
list.add("002212024050417175710632761097847648256");
|
|
|
|
|
|
list.add("002212024050417541510632770230666211328");
|
|
|
|
|
|
list.add("002212024050418181310632776261999329280");
|
|
|
|
|
|
list.add("002212024050419441110632797897335046144");
|
|
|
|
|
|
list.add("002212024050419493610632799259694223360");
|
|
|
|
|
|
list.add("002212024050421154710632820948601737216");
|
|
|
|
|
|
list.add("002212024050421215810632822506197004288");
|
|
|
|
|
|
list.add("002212024050421315810632825023175761920");
|
|
|
|
|
|
list.add("002212024050421373710632826444136550400");
|
|
|
|
|
|
list.add("002212024050422203810632837270660923392");
|
|
|
|
|
|
list.add("002212024050423153310632851089944977408");
|
|
|
|
|
|
list.add("002212024050423253310632853606979407872");
|
|
|
|
|
|
list.add("002212024050500491810632874684050923520");
|
|
|
|
|
|
list.add("002212024050502260910632899054019194880");
|
|
|
|
|
|
list.add("002212024050510141610633016861190995968");
|
|
|
|
|
|
list.add("002212024050511083110633030514432622592");
|
|
|
|
|
|
list.add("002212024050511285110633035632103231488");
|
|
|
|
|
|
list.add("002212024050512580610633058089286045696");
|
|
|
|
|
|
list.add("002212024050513184810633063298911457280");
|
|
|
|
|
|
list.add("002212024050513375610633068113898582016");
|
|
|
|
|
|
list.add("002212024050514561510633087824426250240");
|
|
|
|
|
|
list.add("002212024050517411110633129329901801472");
|
|
|
|
|
|
list.add("002212024050519042110633150262651727872");
|
|
|
|
|
|
list.add("002212024050519171210633153492810022912");
|
|
|
|
|
|
list.add("002212024050520324910633172525882097664");
|
|
|
|
|
|
list.add("002212024050521110110633182135436259328");
|
|
|
|
|
|
list.add("002212024050521295510633186892345597952");
|
|
|
|
|
|
list.add("002212024050521343710633188078005858304");
|
|
|
|
|
|
list.add("002212024050522111810633197308627619840");
|
|
|
|
|
|
list.add("002212024050522163210633198623946874880");
|
|
|
|
|
|
list.add("002212024050523255910633216103881990144");
|
|
|
|
|
|
list.add("002212024050600044010633225835969843200");
|
|
|
|
|
|
list.add("002212024050600413310633235121563308032");
|
|
|
|
|
|
list.add("002212024050600574510633239197708009472");
|
|
|
|
|
|
list.add("002212024050602042310633255966548492288");
|
|
|
|
|
|
list.add("002212024050610174310633380116189081600");
|
|
|
|
|
|
list.add("002212024050611404710633401021852626944");
|
|
|
|
|
|
list.add("002212024050612180110633410389482094592");
|
|
|
|
|
|
list.add("002212024050612215910633411388790079488");
|
|
|
|
|
|
list.add("002212024050617145610633485113948450816");
|
|
|
|
|
|
list.add("002212024050617592210633496294620635136");
|
|
|
|
|
|
list.add("002212024050618413810633506932037992448");
|
|
|
|
|
|
list.add("002212024050618441610633507595954372608");
|
|
|
|
|
|
list.add("002212024050618452610633507890003259392");
|
|
|
|
|
|
list.add("002212024050619070210633513324855398400");
|
|
|
|
|
|
list.add("002212024050619085110633513779423780864");
|
|
|
|
|
|
list.add("002212024050619115510633514552592248832");
|
|
|
|
|
|
list.add("002212024050619141710633515148804173824");
|
|
|
|
|
|
list.add("002212024050619402010633521702214385664");
|
|
|
|
|
|
list.add("002212024050620283910633533862569549824");
|
|
|
|
|
|
list.add("002212024050620563510633540892392669184");
|
|
|
|
|
|
list.add("002212024050621041010633542802911068160");
|
|
|
|
|
|
list.add("002212024050622063810633558523614158848");
|
|
|
|
|
|
list.add("002212024050622134710633560320352141312");
|
|
|
|
|
|
list.add("002212024050622163310633561016875040768");
|
|
|
|
|
|
list.add("002212024050622210810633562170247692288");
|
|
|
|
|
|
list.add("002212024050700214210633592513776656384");
|
|
|
|
|
|
list.add("002212024050701014410633602585344942080");
|
|
|
|
|
|
list.add("002212024050701060110633603664052457472");
|
|
|
|
|
|
list.add("002212024050711570310633767504186675200");
|
|
|
|
|
|
list.add("002212024050712283510633775436918112256");
|
|
|
|
|
|
list.add("002212024050713220710633788911921213440");
|
|
|
|
|
|
list.add("002212024050715025010633814254922690560");
|
|
|
|
|
|
list.add("002212024050718152410633862716628385792");
|
|
|
|
|
|
list.add("002212024050718262610633865496176594944");
|
|
|
|
|
|
list.add("002212024050718562510633873040333152256");
|
|
|
|
|
|
list.add("002212024050719034110633874870468161536");
|
|
|
|
|
|
list.add("002212024050719051310633875253998579712");
|
|
|
|
|
|
list.add("002212024050719144710633877663755554816");
|
|
|
|
|
|
list.add("002212024050719215410633879454685421568");
|
|
|
|
|
|
list.add("002212024050719585410633888766323142656");
|
|
|
|
|
|
list.add("002212024050720202310633894172544294912");
|
|
|
|
|
|
list.add("002212024050802105510633982383785484288");
|
|
|
|
|
|
list.add("002212024050802530910633993014453022720");
|
|
|
|
|
|
list.add("002212024050810364610634109688287150080");
|
|
|
|
|
|
list.add("002212024050813165210634149978856820736");
|
|
|
|
|
|
list.add("002212024050814172610634165217385615360");
|
|
|
|
|
|
list.add("002212024050814185910634165608915505152");
|
|
|
|
|
|
list.add("002212024050816394910634201053066448896");
|
|
|
|
|
|
list.add("002212024050816402610634201205059637248");
|
|
|
|
|
|
list.add("002212024050817332010634214518833111040");
|
|
|
|
|
|
list.add("002212024050817343410634214827848458240");
|
|
|
|
|
|
list.add("002212024050817401010634216239643684864");
|
|
|
|
|
|
list.add("002212024050817541310634219776404570112");
|
|
|
|
|
|
list.add("002212024050818261110634227819848646656");
|
|
|
|
|
|
list.add("002212024050818342810634229903568314368");
|
|
|
|
|
|
list.add("002212024050818413510634231695948976128");
|
|
|
|
|
|
list.add("002212024050819054510634237774701965312");
|
|
|
|
|
|
list.add("002212024050819060710634237869035962368");
|
|
|
|
|
|
list.add("002212024050819284510634243565804756992");
|
|
|
|
|
|
list.add("002212024050819544810634250120373014528");
|
|
|
|
|
|
list.add("002212024050820591810634266351047643136");
|
|
|
|
|
|
list.add("002212024050821213710634271970180272128");
|
|
|
|
|
|
list.add("002212024050821260010634273071914881024");
|
|
|
|
|
|
list.add("002212024050822453110634293081292951552");
|
|
|
|
|
|
list.add("002212024050823071610634298555054755840");
|
|
|
|
|
|
list.add("002212024050823180410634301276052361216");
|
|
|
|
|
|
list.add("002212024050823281310634303826645823488");
|
|
|
|
|
|
list.add("002212024050900244710634318065068220416");
|
|
|
|
|
|
list.add("002212024050902263210634348703960608768");
|
|
|
|
|
|
list.add("002212024050908253710634439069299814400");
|
|
|
|
|
|
list.add("002212024050910042110634463918403944448");
|
|
|
|
|
|
list.add("002212024050911570910634492304546353152");
|
|
|
|
|
|
list.add("002212024050914130310634526503970783232");
|
|
|
|
|
|
list.add("002212024050915351010634547167421218816");
|
|
|
|
|
|
list.add("002212024050915412810634548754596573184");
|
|
|
|
|
|
list.add("002212024050916305810634561211611287552");
|
|
|
|
|
|
list.add("002212024050917432110634579427283144704");
|
|
|
|
|
|
list.add("002212024050918240510634589676605116416");
|
|
|
|
|
|
list.add("002212024050918304610634591362385096704");
|
|
|
|
|
|
list.add("002212024050918314910634591626735460352");
|
|
|
|
|
|
list.add("002212024050918341210634592225761619968");
|
|
|
|
|
|
list.add("002212024050919141910634602320656506880");
|
|
|
|
|
|
list.add("002212024050919262310634605356662493184");
|
|
|
|
|
|
list.add("002212024050920163310634617980360933376");
|
|
|
|
|
|
list.add("002212024050920564210634628085824950272");
|
|
|
|
|
|
list.add("002212024050921025810634629662570536960");
|
|
|
|
|
|
list.add("002212024050921442610634640100335988736");
|
|
|
|
|
|
list.add("002212024050923352410634668025982660608");
|
|
|
|
|
|
list.add("002212024051003105610634722264415027200");
|
|
|
|
|
|
list.add("002212024051013243510634876695873150976");
|
|
|
|
|
|
list.add("002212024051015001510634900771555348480");
|
|
|
|
|
|
list.add("002212024051018041010634947054739935232");
|
|
|
|
|
|
list.add("002212024051018392810634955936848363520");
|
|
|
|
|
|
list.add("002212024051018494510634958527208857600");
|
|
|
|
|
|
list.add("002212024051019101910634963702788845568");
|
|
|
|
|
|
list.add("002212024051019175610634965618213347328");
|
|
|
|
|
|
list.add("002212024051019284910634968355786522624");
|
|
|
|
|
|
list.add("002212024051019462010634972766938148864");
|
|
|
|
|
|
list.add("002212024051020100410634978737210068992");
|
|
|
|
|
|
list.add("002212024051020360510634985286108921856");
|
|
|
|
|
|
list.add("002212024051020460110634987786758348800");
|
|
|
|
|
|
list.add("002212024051023450110635032833252151296");
|
|
|
|
|
|
list.add("002212024051023515610635034573236813824");
|
|
|
|
|
|
list.add("002212024051102510010635079635871485952");
|
|
|
|
|
|
list.add("002212024051112035410635218779569364992");
|
|
|
|
|
|
list.add("002212024051112234910635223789487325184");
|
|
|
|
|
|
list.add("002212024051112565910635232134962823168");
|
|
|
|
|
|
list.add("002212024051114090410635250279269085184");
|
|
|
|
|
|
list.add("002212024051116405910635288508762775552");
|
|
|
|
|
|
list.add("002212024051117392010635303193458176000");
|
|
|
|
|
|
list.add("002212024051117392710635303221834092544");
|
|
|
|
|
|
list.add("002212024051118062410635310004772769792");
|
|
|
|
|
|
list.add("002212024051118093710635310814188089344");
|
|
|
|
|
|
list.add("002212024051118182210635313017281490944");
|
|
|
|
|
|
list.add("002212024051118474010635320388932677632");
|
|
|
|
|
|
list.add("002212024051119010110635323748307517440");
|
|
|
|
|
|
list.add("002212024051119355210635332519585071104");
|
|
|
|
|
|
list.add("002212024051120101610635341174348791808");
|
|
|
|
|
|
list.add("002212024051120433110635349543726415872");
|
|
|
|
|
|
list.add("002212024051121135110635357177799843840");
|
|
|
|
|
|
list.add("002212024051121440210635364773455962112");
|
|
|
|
|
|
list.add("002212024051122255910635375332370386944");
|
|
|
|
|
|
list.add("002212024051122450610635380142090563584");
|
|
|
|
|
|
list.add("002212024051210125610635553241452851200");
|
|
|
|
|
|
list.add("002212024051210240510635556044862300160");
|
|
|
|
|
|
list.add("002212024051211350010635573891182202880");
|
|
|
|
|
|
list.add("002212024051212350710635589021471432704");
|
|
|
|
|
|
list.add("002212024051212524510635593458303614976");
|
|
|
|
|
|
list.add("002212024051213515910635608365324656640");
|
|
|
|
|
|
list.add("002212024051213580410635609896170786816");
|
|
|
|
|
|
list.add("002212024051213585010635610091466334208");
|
|
|
|
|
|
list.add("002212024051216042810635641705114181632");
|
|
|
|
|
|
list.add("002212024051216451310635651962559217664");
|
|
|
|
|
|
list.add("002212024051217003810635655842823483392");
|
|
|
|
|
|
list.add("002212024051218261910635677405813735424");
|
|
|
|
|
|
list.add("002212024051218335010635679295864639488");
|
|
|
|
|
|
list.add("002212024051219431510635696766083465216");
|
|
|
|
|
|
list.add("002212024051219492810635698329485115392");
|
|
|
|
|
|
list.add("002212024051220241010635707061549572096");
|
|
|
|
|
|
list.add("002212024051220294310635708458271698944");
|
|
|
|
|
|
list.add("002212024051220483310635713197804720128");
|
|
|
|
|
|
list.add("002212024051221035410635717061037064192");
|
|
|
|
|
|
list.add("002212024051221044710635717283834298368");
|
|
|
|
|
|
list.add("002212024051221093810635718502717927424");
|
|
|
|
|
|
list.add("002212024051221362710635725253777371136");
|
|
|
|
|
|
list.add("002212024051221415210635726617612980224");
|
|
|
|
|
|
list.add("002212024051223223710635751972546621440");
|
|
|
|
|
|
list.add("002212024051223235210635752286223671296");
|
|
|
|
|
|
list.add("002212024051300091510635763705009950720");
|
|
|
|
|
|
list.add("002212024051301194310635781440261140480");
|
|
|
|
|
|
list.add("002212024051312012210635942917038321664");
|
|
|
|
|
|
list.add("002212024051314491510635985165327200256");
|
|
|
|
|
|
list.add("002212024051317492110636030490036686848");
|
|
|
|
|
|
list.add("002212024051318033010636034050730926080");
|
|
|
|
|
|
list.add("002212024051318085810636035425441488896");
|
|
|
|
|
|
list.add("002212024051318193110636038082438578176");
|
|
|
|
|
|
list.add("002212024051318282210636040307239358464");
|
|
|
|
|
|
list.add("002212024051318321010636041265365819392");
|
|
|
|
|
|
list.add("002212024051318354710636042173725609984");
|
|
|
|
|
|
list.add("002212024051319243410636054449779740672");
|
|
|
|
|
|
list.add("002212024051319314310636056249295982592");
|
|
|
|
|
|
list.add("002212024051320472410636075295044874240");
|
|
|
|
|
|
list.add("002212024051321282610636085622743711744");
|
|
|
|
|
|
list.add("002212024051322522710636106764881829888");
|
|
|
|
|
|
list.add("002212024051323224310636114383465693184");
|
|
|
|
|
|
list.add("002212024051401542110636152542163542016");
|
|
|
|
|
|
list.add("002212024051411091510636292186676416512");
|
|
|
|
|
|
list.add("002212024051414443210636346364786204672");
|
|
|
|
|
|
list.add("002212024051414510710636348024971419648");
|
|
|
|
|
|
list.add("002212024051417161410636384542022512640");
|
|
|
|
|
|
list.add("002212024051417413410636390916517343232");
|
|
|
|
|
|
list.add("002212024051418202210636400680914984960");
|
|
|
|
|
|
list.add("002212024051418423910636406291358621696");
|
|
|
|
|
|
list.add("002212024051418561210636409701818761216");
|
|
|
|
|
|
list.add("002212024051419055210636412134401216512");
|
|
|
|
|
|
list.add("002212024051419155810636414673872551936");
|
|
|
|
|
|
list.add("002212024051419555610636424733535215616");
|
|
|
|
|
|
list.add("002212024051420020010636426257679953920");
|
|
|
|
|
|
list.add("002212024051420410810636436106005286912");
|
|
|
|
|
|
list.add("002212024051421220410636446408754282496");
|
|
|
|
|
|
list.add("002212024051421412310636451268228718592");
|
|
|
|
|
|
list.add("002212024051422101110636458519020683264");
|
|
|
|
|
|
list.add("002212024051500092210636488510603214848");
|
|
|
|
|
|
list.add("002212024051500155610636490164587114496");
|
|
|
|
|
|
list.add("002212024051501581410636515909745319936");
|
|
|
|
|
|
list.add("002212024051508180010636611480052129792");
|
|
|
|
|
|
list.add("002212024051511552010636666171949543424");
|
|
|
|
|
|
list.add("002212024051512421210636677966578507776");
|
|
|
|
|
|
list.add("002212024051515591910636727575826059264");
|
|
|
|
|
|
list.add("002212024051518033910636758864609656833");
|
|
|
|
|
|
list.add("002212024051518334910636766455300321280");
|
|
|
|
|
|
list.add("002212024051518344210636766675961548800");
|
|
|
|
|
|
list.add("002212024051518452110636769358835277824");
|
|
|
|
|
|
list.add("002212024051518554110636771959643738112");
|
|
|
|
|
|
list.add("002212024051519072210636774896817000448");
|
|
|
|
|
|
list.add("002212024051519345510636781832790724608");
|
|
|
|
|
|
list.add("002212024051519521010636786170780307456");
|
|
|
|
|
|
list.add("002212024051520045510636789383330172928");
|
|
|
|
|
|
list.add("002212024051521154710636807215506477056");
|
|
|
|
|
|
list.add("002212024051521411810636813638372777984");
|
|
|
|
|
|
list.add("002212024051522085510636820588257513472");
|
|
|
|
|
|
list.add("002212024051523005010636833653856649216");
|
|
|
|
|
|
list.add("002212024051523164210636837645020786688");
|
|
|
|
|
|
list.add("002212024051600355910636857595633504256");
|
|
|
|
|
|
list.add("002212024051601055410636865126402973696");
|
|
|
|
|
|
list.add("002212024051611251710637020999640289280");
|
|
|
|
|
|
list.add("002212024051613431910637055735263252480");
|
|
|
|
|
|
list.add("002212024051614340110637068496550662144");
|
|
|
|
|
|
list.add("002212024051615185110637079776639176704");
|
|
|
|
|
|
list.add("002212024051615241910637081153550798848");
|
|
|
|
|
|
list.add("002212024051615290410637082349153980416");
|
|
|
|
|
|
list.add("002212024051617402710637115412177129472");
|
|
|
|
|
|
list.add("002212024051617463510637116956434219008");
|
|
|
|
|
|
list.add("002212024051617523810637118477021929473");
|
|
|
|
|
|
list.add("002212024051618060110637121848978837504");
|
|
|
|
|
|
list.add("002212024051618213710637125774361456640");
|
|
|
|
|
|
list.add("002212024051618293510637127776744411136");
|
|
|
|
|
|
list.add("002212024051618582710637135043843985408");
|
|
|
|
|
|
list.add("002212024051620043210637151673637855232");
|
|
|
|
|
|
list.add("002212024051620440210637161613820874752");
|
|
|
|
|
|
list.add("002212024051621053910637167055186808832");
|
|
|
|
|
|
list.add("002212024051621201610637170731393409024");
|
|
|
|
|
|
list.add("002212024051621204610637170859204841472");
|
|
|
|
|
|
list.add("002212024051621435610637176687159595008");
|
|
|
|
|
|
list.add("002212024051622445210637192022625538048");
|
|
|
|
|
|
list.add("002212024051623543510637209566863671296");
|
|
|
|
|
|
list.add("002212024051700231310637216772490956800");
|
|
|
|
|
|
list.add("002212024051701330510637234355477135360");
|
|
|
|
|
|
list.add("002212024051714213410637427748827525120");
|
|
|
|
|
|
list.add("002212024051714575110637436880934690816");
|
|
|
|
|
|
list.add("002212024051718234110637488679633350656");
|
|
|
|
|
|
list.add("002212024051718345110637491492878249984");
|
|
|
|
|
|
list.add("002212024051718405010637492998047105024");
|
|
|
|
|
|
list.add("002212024051718405710637493026242408448");
|
|
|
|
|
|
list.add("002212024051719122210637500934191558656");
|
|
|
|
|
|
list.add("002212024051719224810637503559191031808");
|
|
|
|
|
|
list.add("002212024051719404510637508073681301504");
|
|
|
|
|
|
list.add("002212024051720394910637522939224621056");
|
|
|
|
|
|
list.add("002212024051721012210637528361750573056");
|
|
|
|
|
|
list.add("002212024051721334110637536497319526400");
|
|
|
|
|
|
list.add("002212024051721351210637536876035817472");
|
|
|
|
|
|
list.add("002212024051723305610637566004730814464");
|
|
|
|
|
|
list.add("002212024051723384010637567947406536704");
|
|
|
|
|
|
list.add("002212024051800104710637576030505385984");
|
|
|
|
|
|
list.add("002212024051804343710637642425875517440");
|
|
|
|
|
|
list.add("002212024051807512510637691955573407744");
|
|
|
|
|
|
list.add("002212024051810025410637725041519308800");
|
|
|
|
|
|
list.add("002212024051812274710637761502457180160");
|
|
|
|
|
|
list.add("002212024051813512210637782536765894656");
|
|
|
|
|
|
list.add("002212024051816333610637823366838378496");
|
|
|
|
|
|
list.add("002212024051818191310637849943775686656");
|
|
|
|
|
|
list.add("002212024051818474210637857111851741184");
|
|
|
|
|
|
list.add("002212024051819514210637873219349057536");
|
|
|
|
|
|
list.add("002212024051820195710637880326874951680");
|
|
|
|
|
|
list.add("002212024051820442710637886493369495552");
|
|
|
|
|
|
list.add("002212024051820511010637888185779048448");
|
|
|
|
|
|
list.add("002212024051821233410637896338357841920");
|
|
|
|
|
|
list.add("002212024051821310010637898210528296960");
|
|
|
|
|
|
list.add("002212024051821384410637900155900735488");
|
|
|
|
|
|
list.add("002212024051823301810637928229633568768");
|
|
|
|
|
|
list.add("002212024051823471310637932490649526272");
|
|
|
|
|
|
list.add("002212024051823583510637935349289381888");
|
|
|
|
|
|
list.add("002212024051900324710637943956640497664");
|
|
|
|
|
|
list.add("002212024051901223310637956480751394816");
|
|
|
|
|
|
list.add("002212024051901434010637961792305295360");
|
|
|
|
|
|
list.add("002212024051908534810638070042186444800");
|
|
|
|
|
|
list.add("002212024051909110510638074391202164736");
|
|
|
|
|
|
list.add("002212024051910220310638092247880155136");
|
|
|
|
|
|
list.add("002212024051913062410638133608688087040");
|
|
|
|
|
|
list.add("002212024051914243010638153265296920576");
|
|
|
|
|
|
list.add("002212024051916014710638177748041822208");
|
|
|
|
|
|
list.add("002212024051916380010638186861697941504");
|
|
|
|
|
|
list.add("002212024051916473310638189265253117952");
|
|
|
|
|
|
list.add("002212024051917370010638201710251327488");
|
|
|
|
|
|
list.add("002212024051917573510638206887311572992");
|
|
|
|
|
|
list.add("002212024051918034810638208452334145536");
|
|
|
|
|
|
list.add("002212024051918513110638220463191490560");
|
|
|
|
|
|
list.add("002212024051918513410638220475464921088");
|
|
|
|
|
|
list.add("002212024051919193410638227521867419648");
|
|
|
|
|
|
list.add("002212024051920082410638239810385301504");
|
|
|
|
|
|
list.add("002212024051921224210638258506205540352");
|
|
|
|
|
|
list.add("002212024051921522810638265999373692928");
|
|
|
|
|
|
list.add("002212024051921561110638266933482942464");
|
|
|
|
|
|
list.add("002212024051923434010638293985118982144");
|
|
|
|
|
|
list.add("002212024051923583710638297745058934784");
|
|
|
|
|
|
list.add("002212024052000023710638298753347956736");
|
|
|
|
|
|
list.add("002212024052000350310638306914740424704");
|
|
|
|
|
|
list.add("002212024052009295410638441513661739008");
|
|
|
|
|
|
list.add("002212024052010395910638459152374509568");
|
|
|
|
|
|
list.add("002212024052012091110638481596937691136");
|
|
|
|
|
|
list.add("002212024052012114710638482250908758016");
|
|
|
|
|
|
list.add("002212024052016173910638544128993640448");
|
|
|
|
|
|
list.add("002212024052016205410638544943821078528");
|
|
|
|
|
|
list.add("002212024052016391110638549548109590528");
|
|
|
|
|
|
list.add("002212024052017465910638566608788852736");
|
|
|
|
|
|
list.add("002212024052018305010638577645677207552");
|
|
|
|
|
|
list.add("002212024052018452910638581329465749504");
|
|
|
|
|
|
list.add("002212024052019493410638597458114457600");
|
|
|
|
|
|
list.add("002212024052019494310638597495903940608");
|
|
|
|
|
|
list.add("002212024052019541110638598618402127872");
|
|
|
|
|
|
list.add("002212024052020053310638601478271643648");
|
|
|
|
|
|
list.add("002212024052020093110638602480346181632");
|
|
|
|
|
|
list.add("002212024052020363910638609305646645248");
|
|
|
|
|
|
list.add("002212024052020580410638614696162816000");
|
|
|
|
|
|
list.add("002212024052021414710638625696770031616");
|
|
|
|
|
|
list.add("002212024052022143310638633944575356928");
|
|
|
|
|
|
list.add("002212024052022540710638643900676378624");
|
|
|
|
|
|
list.add("002212024052023012910638645753926410240");
|
|
|
|
|
|
list.add("002212024052023063510638647037726363648");
|
|
|
|
|
|
list.add("002212024052101514210638688591886135296");
|
|
|
|
|
|
list.add("002212024052102482210638702851313614848");
|
|
|
|
|
|
list.add("002212024052109463010638808080072073216");
|
|
|
|
|
|
list.add("002212024052111310210638834384029429760");
|
|
|
|
|
|
list.add("002212024052111494210638839082504908800");
|
|
|
|
|
|
list.add("002212024052112372710638851101086810112");
|
|
|
|
|
|
list.add("002212024052115210010638892259763793920");
|
|
|
|
|
|
list.add("002212024052115521410638900117358850048");
|
|
|
|
|
|
list.add("002212024052116413510638912539323400192");
|
|
|
|
|
|
list.add("002212024052118205410638937533553012736");
|
|
|
|
|
|
list.add("002212024052118230710638938090345926656");
|
|
|
|
|
|
list.add("002212024052118310110638940079452540928");
|
|
|
|
|
|
list.add("002212024052118441610638943413191032832");
|
|
|
|
|
|
list.add("002212024052118561710638946435939414016");
|
|
|
|
|
|
list.add("002212024052118592410638947221626204160");
|
|
|
|
|
|
list.add("002212024052119093010638949764176789504");
|
|
|
|
|
|
list.add("002212024052119531610638960776527147008");
|
|
|
|
|
|
list.add("002212024052119540710638960991243730944");
|
|
|
|
|
|
list.add("002212024052120294610638969962212605952");
|
|
|
|
|
|
list.add("002212024052121003310638977707817906176");
|
|
|
|
|
|
list.add("002212024052121105810638980332102332416");
|
|
|
|
|
|
list.add("002212024052122521510639005817547190272");
|
|
|
|
|
|
list.add("002212024052123231010639013600189984768");
|
|
|
|
|
|
list.add("002212024052123340510639016345031192576");
|
|
|
|
|
|
list.add("002212024052200001410639022926672527360");
|
|
|
|
|
|
list.add("002212024052200160410639026912002240512");
|
|
|
|
|
|
list.add("002212024052201200010639043000430833664");
|
|
|
|
|
|
list.add("002212024052210402710639184044417314816");
|
|
|
|
|
|
list.add("002212024052212445510639215367360655360");
|
|
|
|
|
|
list.add("002212024052217132010639282917262028800");
|
|
|
|
|
|
list.add("002212024052217445010639290844809981952");
|
|
|
|
|
|
list.add("002212024052218063010639296296892542976");
|
|
|
|
|
|
list.add("002212024052218154210639298610751057920");
|
|
|
|
|
|
list.add("002212024052218274310639301635115974656");
|
|
|
|
|
|
list.add("002212024052218503610639307393467658240");
|
|
|
|
|
|
list.add("002212024052218572410639309105399377920");
|
|
|
|
|
|
list.add("002212024052219062210639311361612517376");
|
|
|
|
|
|
list.add("002212024052219081210639311823813238784");
|
|
|
|
|
|
list.add("002212024052219271310639316608681488384");
|
|
|
|
|
|
list.add("002212024052219415510639320308406767616");
|
|
|
|
|
|
list.add("002212024052221030010639340712080486400");
|
|
|
|
|
|
list.add("002212024052221053010639341342659051520");
|
|
|
|
|
|
list.add("002212024052221283610639347156902703104");
|
|
|
|
|
|
list.add("002212024052221541610639353617282215936");
|
|
|
|
|
|
list.add("002212024052222075410639357045141098496");
|
|
|
|
|
|
list.add("002212024052222112310639357923119955968");
|
|
|
|
|
|
list.add("002212024052222202610639360201800269824");
|
|
|
|
|
|
list.add("002212024052222494910639367593069887488");
|
|
|
|
|
|
list.add("002212024052223022010639370745487486976");
|
|
|
|
|
|
list.add("002212024052223150510639373952158224384");
|
|
|
|
|
|
list.add("002212024052223302310639377804064526336");
|
|
|
|
|
|
list.add("002212024052223331710639378534060240896");
|
|
|
|
|
|
list.add("002212024052312395110639576478608060416");
|
|
|
|
|
|
list.add("002212024052313180310639586091978293248");
|
|
|
|
|
|
list.add("002212024052314185110639601394513833984");
|
|
|
|
|
|
list.add("002212024052315063810639613417021304832");
|
|
|
|
|
|
list.add("002212024052315560210639625848828129280");
|
|
|
|
|
|
list.add("002212024052316223710639632540005494784");
|
|
|
|
|
|
list.add("002212024052317590210639656803389911040");
|
|
|
|
|
|
list.add("002212024052318101010639659606966775808");
|
|
|
|
|
|
list.add("002212024052318244610639663281071816704");
|
|
|
|
|
|
list.add("002212024052318364510639666297571831808");
|
|
|
|
|
|
list.add("002212024052319025510639672881111089152");
|
|
|
|
|
|
list.add("002212024052319055910639673653578412032");
|
|
|
|
|
|
list.add("002212024052319260410639678706244673536");
|
|
|
|
|
|
list.add("002212024052321405210639712632353918976");
|
|
|
|
|
|
list.add("002212024052323085410639734785623150592");
|
|
|
|
|
|
list.add("002212024052323254610639739028991094784");
|
|
|
|
|
|
list.add("002212024052401094910639765216491532288");
|
|
|
|
|
|
list.add("002212024052401155010639766728842194944");
|
|
|
|
|
|
list.add("002212024052411353810639922708458565632");
|
|
|
|
|
|
list.add("002212024052412190510639933640580890624");
|
|
|
|
|
|
list.add("002212024052413105310639946677096067072");
|
|
|
|
|
|
list.add("002212024052416242310639995374876332032");
|
|
|
|
|
|
list.add("002212024052417440310640015421829910528");
|
|
|
|
|
|
list.add("002212024052418420510640030027263492096");
|
|
|
|
|
|
list.add("002212024052419051010640035837305815040");
|
|
|
|
|
|
list.add("002212024052419520610640047646782353408");
|
|
|
|
|
|
list.add("002212024052420045910640050888439455744");
|
|
|
|
|
|
list.add("002212024052420255610640056161993068544");
|
|
|
|
|
|
list.add("002212024052420330310640057953969541120");
|
|
|
|
|
|
list.add("002212024052420380410640059213395283968");
|
|
|
|
|
|
list.add("002212024052420424510640060391637893120");
|
|
|
|
|
|
list.add("002212024052421362310640073892609015808");
|
|
|
|
|
|
list.add("002212024052421423910640075469052014592");
|
|
|
|
|
|
list.add("002212024052422364510640089082365108224");
|
|
|
|
|
|
list.add("002212024052422405910640090149112995840");
|
|
|
|
|
|
list.add("002212024052423062410640096543868076032");
|
|
|
|
|
|
list.add("002212024052423333810640103396406140928");
|
|
|
|
|
|
list.add("002212024052500065110640111757081546752");
|
|
|
|
|
|
list.add("002212024052501061810640126715827453952");
|
|
|
|
|
|
list.add("002212024052502085210640142463731892224");
|
|
|
|
|
|
list.add("002212024052503325110640163596476309504");
|
|
|
|
|
|
list.add("002212024052507111210640218547004862464");
|
|
|
|
|
|
list.add("002212024052508575910640245420086751232");
|
|
|
|
|
|
list.add("002212024052511061110640277681974382592");
|
|
|
|
|
|
list.add("002212024052512493910640303722588553216");
|
|
|
|
|
|
list.add("002212024052512524310640304495188021248");
|
|
|
|
|
|
list.add("002212024052513052710640307699478388736");
|
|
|
|
|
|
list.add("002212024052513121410640309406330097664");
|
|
|
|
|
|
list.add("002212024052513411910640316723898191872");
|
|
|
|
|
|
list.add("002212024052515122210640339637215109120");
|
|
|
|
|
|
list.add("002212024052515523710640349766601875456");
|
|
|
|
|
|
list.add("002212024052517240510640372784232030208");
|
|
|
|
|
|
list.add("002212024052517281010640373813960732672");
|
|
|
|
|
|
list.add("002212024052518045610640383066092965888");
|
|
|
|
|
|
list.add("002212024052518083010640383963792826368");
|
|
|
|
|
|
list.add("002212024052518105710640384577744367616");
|
|
|
|
|
|
list.add("002212024052518295510640389353916465152");
|
|
|
|
|
|
list.add("002212024052518570610640396195268956160");
|
|
|
|
|
|
list.add("002212024052519123810640400102167355392");
|
|
|
|
|
|
list.add("002212024052519525310640410230835920896");
|
|
|
|
|
|
list.add("002212024052522193410640447144601604096");
|
|
|
|
|
|
list.add("002212024052522213610640447656563990528");
|
|
|
|
|
|
list.add("002212024052522335510640450755378700288");
|
|
|
|
|
|
list.add("002212024052600270910640479251163471872");
|
|
|
|
|
|
list.add("002212024052601071710640489351803146240");
|
|
|
|
|
|
list.add("002212024052603413510640528183376252928");
|
|
|
|
|
|
list.add("002212024052604185110640537561013436416");
|
|
|
|
|
|
list.add("002212024052604541310640546460817031168");
|
|
|
|
|
|
list.add("002212024052608584210640607987523633152");
|
|
|
|
|
|
list.add("002212024052609465310640620113133080576");
|
|
|
|
|
|
list.add("002212024052610104910640626136103010304");
|
|
|
|
|
|
list.add("002212024052610365710640632716088991744");
|
|
|
|
|
|
list.add("002212024052611551210640652406221119488");
|
|
|
|
|
|
list.add("002212024052612243010640659780141158400");
|
|
|
|
|
|
list.add("002212024052614552810640697772581830656");
|
|
|
|
|
|
list.add("002212024052616164710640718238285844480");
|
|
|
|
|
|
list.add("002212024052616393810640723986623533056");
|
|
|
|
|
|
list.add("002212024052616431610640724899572236288");
|
|
|
|
|
|
list.add("002212024052617041710640730189583245312");
|
|
|
|
|
|
list.add("002212024052617055210640730588757319680");
|
|
|
|
|
|
list.add("002212024052618121210640747280405757952");
|
|
|
|
|
|
list.add("002212024052618513810640757206609182720");
|
|
|
|
|
|
list.add("002212024052618525610640757533429620736");
|
|
|
|
|
|
list.add("002212024052618595810640759303547543552");
|
|
|
|
|
|
list.add("002212024052619033310640760202974093312");
|
|
|
|
|
|
list.add("002212024052619053410640760711095799808");
|
|
|
|
|
|
list.add("002212024052619531110640772696042356736");
|
|
|
|
|
|
list.add("002212024052620401210640784526541266944");
|
|
|
|
|
|
list.add("002212024052621474010640801504633131008");
|
|
|
|
|
|
list.add("002212024052621504410640802277971476480");
|
|
|
|
|
|
list.add("002212024052621532610640802957428727808");
|
|
|
|
|
|
list.add("002212024052622004910640804816911036416");
|
|
|
|
|
|
list.add("002212024052700093910640837237465571328");
|
|
|
|
|
|
list.add("002212024052700102410640837425556299776");
|
|
|
|
|
|
list.add("002212024052708273810640962557188337664");
|
|
|
|
|
|
list.add("002212024052710101510640988381051895808");
|
|
|
|
|
|
list.add("002212024052712354410641024993289064448");
|
|
|
|
|
|
list.add("002212024052712430910641026860149784576");
|
|
|
|
|
|
list.add("002212024052714050110641047466063794176");
|
|
|
|
|
|
list.add("002212024052717484610641103772497608704");
|
|
|
|
|
|
list.add("002212024052718251810641112966796615680");
|
|
|
|
|
|
list.add("002212024052718344410641115339836977152");
|
|
|
|
|
|
list.add("002212024052718415110641117129592029184");
|
|
|
|
|
|
list.add("002212024052718441110641117719363715072");
|
|
|
|
|
|
list.add("002212024052718573410641121088452005888");
|
|
|
|
|
|
list.add("002212024052719094110641124134654611456");
|
|
|
|
|
|
list.add("002212024052719202110641126818882097152");
|
|
|
|
|
|
list.add("002212024052719343210641130389065850880");
|
|
|
|
|
|
list.add("002212024052720072710641138672747397120");
|
|
|
|
|
|
list.add("002212024052722160510641171045482512384");
|
|
|
|
|
|
list.add("002212024052722161110641171072126509056");
|
|
|
|
|
|
list.add("002212024052722422010641177649357504512");
|
|
|
|
|
|
list.add("002212024052723140810641185652054519808");
|
|
|
|
|
|
list.add("002212024052723411010641192456769343488");
|
|
|
|
|
|
list.add("002212024052800445410641208495057104896");
|
|
|
|
|
|
list.add("002212024052812014310641378822007709696");
|
|
|
|
|
|
list.add("002212024052812065410641380128689262592");
|
|
|
|
|
|
list.add("002212024052817320810641461974408458240");
|
|
|
|
|
|
list.add("002212024052817480410641465983407505408");
|
|
|
|
|
|
list.add("002212024052818350310641477808075005952");
|
|
|
|
|
|
list.add("002212024052818554510641483016985923584");
|
|
|
|
|
|
list.add("002212024052819131010641487399594377216");
|
|
|
|
|
|
list.add("002212024052819151610641487930871025664");
|
|
|
|
|
|
list.add("002212024052819253310641490518100250624");
|
|
|
|
|
|
list.add("002212024052819301810641491710871560192");
|
|
|
|
|
|
list.add("002212024052819552310641498024760729600");
|
|
|
|
|
|
list.add("002212024052821465510641526092010721280");
|
|
|
|
|
|
list.add("002212024052821480610641526392294490112");
|
|
|
|
|
|
list.add("002212024052821490310641526628583837696");
|
|
|
|
|
|
list.add("002212024052822081610641531464850210816");
|
|
|
|
|
|
list.add("002212024052822213810641534830741573632");
|
|
|
|
|
|
list.add("002212024052822454910641540914918678528");
|
|
|
|
|
|
list.add("002212024052823344910641553247676416000");
|
|
|
|
|
|
list.add("002212024052823422410641555155823726592");
|
|
|
|
|
|
list.add("002212024052900193510641564513321390080");
|
|
|
|
|
|
list.add("002212024052900403010641569775665123328");
|
|
|
|
|
|
list.add("002212024052901412310641585100208865280");
|
|
|
|
|
|
list.add("002212024052913255810641762411144122368");
|
|
|
|
|
|
list.add("002212024052916333110641809609151856640");
|
|
|
|
|
|
list.add("002212024052917131510641819612138516480");
|
|
|
|
|
|
list.add("002212024052917523410641829505509433344");
|
|
|
|
|
|
list.add("002212024052918020110641831882572505088");
|
|
|
|
|
|
list.add("002212024052918323410641839569103708160");
|
|
|
|
|
|
list.add("002212024052918334710641839875261542400");
|
|
|
|
|
|
list.add("002212024052918475110641843416680742912");
|
|
|
|
|
|
list.add("002212024052920125310641864817807429632");
|
|
|
|
|
|
list.add("002212024052921355810641885725264564224");
|
|
|
|
|
|
list.add("002212024052921471010641888544789970944");
|
|
|
|
|
|
list.add("002212024052921500610641889280507011072");
|
|
|
|
|
|
list.add("002212024052922054210641893205857091584");
|
|
|
|
|
|
list.add("002212024052922104110641894462678339584");
|
|
|
|
|
|
list.add("002212024052922123610641894945913683968");
|
|
|
|
|
|
list.add("002212024052922215610641897293401251840");
|
|
|
|
|
|
list.add("002212024052922503910641904520267943936");
|
|
|
|
|
|
list.add("002212024052922531010641905153305858048");
|
|
|
|
|
|
list.add("002212024052923373910641916349713334272");
|
|
|
|
|
|
list.add("002212024052923530710641920240082194432");
|
|
|
|
|
|
list.add("002212024053000291410641929329194782720");
|
|
|
|
|
|
list.add("002212024053004065310641984103257866240");
|
|
|
|
|
|
list.add("002212024053008564410642057044157386752");
|
|
|
|
|
|
list.add("002212024053012082610642105289063907328");
|
|
|
|
|
|
list.add("002212024053012434510642114174968684544");
|
|
|
|
|
|
list.add("002212024053014424810642144137180635136");
|
|
|
|
|
|
list.add("002212024053016443010642174761172942848");
|
|
|
|
|
|
list.add("002212024053018432710642204698525253632");
|
|
|
|
|
|
list.add("002212024053019081610642210940880236544");
|
|
|
|
|
|
list.add("002212024053019215610642214382977105920");
|
|
|
|
|
|
list.add("002212024053019274510642215844769280000");
|
|
|
|
|
|
list.add("002212024053021055210642240536005165056");
|
|
|
|
|
|
list.add("002212024053021055210642240536936300544");
|
|
|
|
|
|
list.add("002212024053021131810642242407645667328");
|
|
|
|
|
|
list.add("002212024053021231310642244903307427840");
|
|
|
|
|
|
list.add("002212024053023113310642272167870410752");
|
|
|
|
|
|
list.add("002212024053023170210642273545724440576");
|
|
|
|
|
|
list.add("002212024053023430110642280086702080000");
|
|
|
|
|
|
list.add("002212024053100041110642285412860149760");
|
|
|
|
|
|
list.add("002212024053107143010642393706322300928");
|
|
|
|
|
|
list.add("002212024053111560710642464577909002240");
|
|
|
|
|
|
list.add("002212024053112145910642469323146739712");
|
|
|
|
|
|
list.add("002212024053112454110642477050264522752");
|
|
|
|
|
|
list.add("002212024053115172610642515237973090304");
|
|
|
|
|
|
list.add("002212024053116254010642532409659699200");
|
|
|
|
|
|
list.add("002212024053118102510642558771585953792");
|
|
|
|
|
|
list.add("002212024053118291410642563507174039552");
|
|
|
|
|
|
list.add("002212024053119492410642583680556568576");
|
|
|
|
|
|
list.add("002212024053120084110642588534245376000");
|
|
|
|
|
|
list.add("002212024053120090610642588641829273600");
|
2024-06-19 15:42:57 +08:00
|
|
|
|
list.add("002212024013008060410598195363803480064");
|
|
|
|
|
|
list.add("002212024013008130010598197109908156416");
|
|
|
|
|
|
list.add("002212024013019392410598369846177918976");
|
|
|
|
|
|
list.add("002212024013108410410598566558256963584");
|
|
|
|
|
|
list.add("002212024013108505610598569040739135488");
|
|
|
|
|
|
list.add("002212024013110011810598586751293992960");
|
|
|
|
|
|
list.add("002212024013112032710598617491298971648");
|
|
|
|
|
|
list.add("002212024020108052910598919992595804160");
|
|
|
|
|
|
list.add("002212024020108304410598926348483653632");
|
|
|
|
|
|
list.add("002212024020108363910598927835231076352");
|
|
|
|
|
|
list.add("002212024020111390410598973743414730752");
|
|
|
|
|
|
list.add("002212024020114322110599017350088626176");
|
|
|
|
|
|
list.add("002212024020114474410599021222320615424");
|
|
|
|
|
|
list.add("002212024020115092510599026678041018368");
|
|
|
|
|
|
list.add("002212024020119590210599099564427669504");
|
|
|
|
|
|
list.add("002212024020207054910599267366398578688");
|
|
|
|
|
|
list.add("002212024020208262510599287646486110208");
|
|
|
|
|
|
list.add("002212024020214265010599378351836442624");
|
|
|
|
|
|
list.add("002212024020215343210599395386694881280");
|
|
|
|
|
|
list.add("002212024020307373210599637734226214912");
|
|
|
|
|
|
list.add("002212024020316072110599766035400572928");
|
|
|
|
|
|
list.add("002212024020322230010599860568206397440");
|
|
|
|
|
|
list.add("002212024020408093410600008184035123200");
|
|
|
|
|
|
list.add("002212024020409244810600027116138618880");
|
|
|
|
|
|
list.add("002212024020508184010600372861536260096");
|
|
|
|
|
|
list.add("002212024020514283510600465955553648640");
|
|
|
|
|
|
list.add("002212024020517003910600504221174415360");
|
|
|
|
|
|
list.add("002212024020521230310600570256004050944");
|
|
|
|
|
|
list.add("002212024020608155210600734545404710912");
|
|
|
|
|
|
list.add("002212024020608382510600740220346396672");
|
|
|
|
|
|
list.add("002212024020608451110600741920730718208");
|
|
|
|
|
|
list.add("002212024020609124110600748841333379072");
|
|
|
|
|
|
list.add("002212024020614411210600831517739819008");
|
|
|
|
|
|
list.add("002212024020708312310601100837498085376");
|
|
|
|
|
|
list.add("002212024020714333610601191990266511360");
|
|
|
|
|
|
list.add("002212024020808475610601467388114333696");
|
|
|
|
|
|
list.add("002212024020810053710601486939065114624");
|
|
|
|
|
|
list.add("002212024020811101310601503195798601728");
|
|
|
|
|
|
list.add("002212024020813113610601533745412943872");
|
|
|
|
|
|
list.add("002212024020908390010601827531082936320");
|
|
|
|
|
|
list.add("002212024020910022910601848539790401536");
|
|
|
|
|
|
list.add("002212024020910361810601857048976125952");
|
|
|
|
|
|
list.add("002212024020914165310601912561811931136");
|
|
|
|
|
|
list.add("002212024020914461510601919951398666240");
|
|
|
|
|
|
list.add("002212024020918534910601982251957444608");
|
|
|
|
|
|
list.add("002212024021120334410602732175872696320");
|
|
|
|
|
|
list.add("002212024021122380810602763479644069888");
|
|
|
|
|
|
list.add("002212024021214122510602998599363010560");
|
|
|
|
|
|
list.add("002212024021315415910603383530189070336");
|
|
|
|
|
|
list.add("002212024021400083110603511002905235456");
|
|
|
|
|
|
list.add("002212024021416051710603751779179274240");
|
|
|
|
|
|
list.add("002212024021423023410603856791162929152");
|
|
|
|
|
|
list.add("002212024021511412210604047750442496000");
|
|
|
|
|
|
list.add("002212024021514072810604084516702027776");
|
|
|
|
|
|
list.add("002212024021515430710604108588191272960");
|
|
|
|
|
|
list.add("002212024021523001310604218587504525312");
|
|
|
|
|
|
list.add("002212024021608381110604364039677882368");
|
|
|
|
|
|
list.add("002212024021623020310604581439817023488");
|
|
|
|
|
|
list.add("002212024021722362610604937380427948032");
|
|
|
|
|
|
list.add("002212024021808001010605079249543716864");
|
|
|
|
|
|
list.add("002212024021808104810605081925655490560");
|
|
|
|
|
|
list.add("002212024021808185910605083981192704000");
|
|
|
|
|
|
list.add("002212024021810383210605119103427313664");
|
|
|
|
|
|
list.add("002212024021908582810605456306802053120");
|
|
|
|
|
|
list.add("002212024022109131310606184796175687680");
|
|
|
|
|
|
list.add("002212024022119525210606345768395419648");
|
|
|
|
|
|
list.add("002212024022218212410606685138835025920");
|
|
|
|
|
|
list.add("002212024022307485310606888346055372800");
|
|
|
|
|
|
list.add("002212024022308550410606905004268617728");
|
|
|
|
|
|
list.add("002212024022408553910607267536671035392");
|
|
|
|
|
|
list.add("002212024022517022910607752442171338752");
|
|
|
|
|
|
list.add("002212024022521075910607814222629285888");
|
|
|
|
|
|
list.add("002212024022609245810607999689369276416");
|
|
|
|
|
|
list.add("002212024022708185910608345472558899200");
|
|
|
|
|
|
list.add("002212024022808171110608707409136111616");
|
|
|
|
|
|
list.add("002212024022808415410608713630598144000");
|
|
|
|
|
|
list.add("002212024022908220310609071021906227200");
|
|
|
|
|
|
list.add("002212024022908291710609072841400475648");
|
|
|
|
|
|
list.add("002212024022908495410609078031603834880");
|
|
|
|
|
|
list.add("002212024022908535210609079026622164992");
|
|
|
|
|
|
list.add("002212024022920294410609254148826947584");
|
|
|
|
|
|
list.add("002212024030108013710609428267015561216");
|
|
|
|
|
|
list.add("002212024030108192710609432753644294144");
|
|
|
|
|
|
list.add("002212024030109255810609449496542498816");
|
|
|
|
|
|
list.add("002212024030110432610609468990032666624");
|
|
|
|
|
|
list.add("002212024030114414110609528945117454336");
|
|
|
|
|
|
list.add("002212024030200361910609678590595244032");
|
|
|
|
|
|
list.add("002212024030300003710610031994312007680");
|
|
|
|
|
|
list.add("002212024030408224710610520757550407680");
|
|
|
|
|
|
list.add("002212024030408314410610523009898565632");
|
|
|
|
|
|
list.add("002212024030422585110610741225040171008");
|
|
|
|
|
|
list.add("002212024030508104110610880098894979072");
|
|
|
|
|
|
list.add("002212024030508365710610886712358817792");
|
|
|
|
|
|
list.add("002212024030508490010610889744259559424");
|
|
|
|
|
|
list.add("002212024030521512910611086662637559808");
|
|
|
|
|
|
list.add("002212024030608175710611244317067141120");
|
|
|
|
|
|
list.add("002212024030708090510611604472871477248");
|
|
|
|
|
|
list.add("002212024030708282910611609355581992960");
|
|
|
|
|
|
list.add("002212024030708502610611614878784106496");
|
|
|
|
|
|
list.add("002212024030709174810611621767196659712");
|
|
|
|
|
|
list.add("002212024030719534010611781785478717440");
|
|
|
|
|
|
list.add("002212024030807594010611964492124340224");
|
|
|
|
|
|
list.add("002212024030822443910612187206556524544");
|
|
|
|
|
|
list.add("002212024030906325510612305048975122432");
|
|
|
|
|
|
list.add("002212024030907350010612320673259941888");
|
|
|
|
|
|
list.add("002212024030915525410612445973697167360");
|
|
|
|
|
|
list.add("002212024030916303810612455470245429248");
|
|
|
|
|
|
list.add("002212024030921533110612536725873057792");
|
|
|
|
|
|
list.add("002212024031017202310612830374738165760");
|
|
|
|
|
|
list.add("002212024031020531910612883964449075200");
|
|
|
|
|
|
list.add("002212024031023432510612926769309773824");
|
|
|
|
|
|
list.add("002212024031108301510613059352027627520");
|
|
|
|
|
|
list.add("002212024031109563110613081060800557056");
|
|
|
|
|
|
list.add("002212024031114040910613143380055498752");
|
|
|
|
|
|
list.add("002212024031208192510613419012528644096");
|
|
|
|
|
|
list.add("002212024031208341810613422759090114560");
|
|
|
|
|
|
list.add("002212024031208412810613424562076852224");
|
|
|
|
|
|
list.add("002212024031308225010613782262091567104");
|
|
|
|
|
|
list.add("002212024031308360610613785598963986432");
|
|
|
|
|
|
list.add("002212024031308371210613785876779442176");
|
|
|
|
|
|
list.add("002212024031308422110613787173562695680");
|
|
|
|
|
|
list.add("002212024031408241810614145019098722304");
|
|
|
|
|
|
list.add("002212024031508224410614507010081640448");
|
|
|
|
|
|
list.add("002212024031508590910614516174918074368");
|
|
|
|
|
|
list.add("002212024031509281210614523487750299648");
|
|
|
|
|
|
list.add("002212024031510283910614538700956971008");
|
|
|
|
|
|
list.add("002212024031515211110614612316401750016");
|
|
|
|
|
|
list.add("002212024031520151910614686339450355712");
|
|
|
|
|
|
list.add("002212024031609341910614887414428016640");
|
|
|
|
|
|
list.add("002212024031718294510615384546949754880");
|
|
|
|
|
|
list.add("002212024031808035610615589445707841536");
|
|
|
|
|
|
list.add("002212024031808260710615595025820246016");
|
|
|
|
|
|
list.add("002212024031815323210615702336330211328");
|
|
|
|
|
|
list.add("002212024031815375110615703677041405952");
|
|
|
|
|
|
list.add("002212024031911254310616002613799657472");
|
|
|
|
|
|
list.add("002212024032008101710616315817846980608");
|
|
|
|
|
|
list.add("002212024032011532310616371961915990016");
|
|
|
|
|
|
list.add("002212024032108120110616678642146373632");
|
|
|
|
|
|
list.add("002212024032108354410616684610730549248");
|
|
|
|
|
|
list.add("002212024032108424510616686374340608000");
|
|
|
|
|
|
list.add("002212024032114381810616775853463097344");
|
|
|
|
|
|
list.add("002212024032208245610617044281046831104");
|
|
|
|
|
|
list.add("002212024032208312010617045888861618176");
|
|
|
|
|
|
list.add("002212024032208434810617049027454844928");
|
|
|
|
|
|
list.add("002212024032323465610617638697148858368");
|
|
|
|
|
|
list.add("002212024032402541210617685824652591104");
|
|
|
|
|
|
list.add("002212024032508523610618138407486066688");
|
|
|
|
|
|
list.add("002212024032520172810618310759024463872");
|
|
|
|
|
|
list.add("002212024032608315810618495600729882624");
|
|
|
|
|
|
list.add("002212024032608391310618497425932648448");
|
|
|
|
|
|
list.add("002212024032608510410618500408262008832");
|
|
|
|
|
|
list.add("002212024032708422710618860627711471616");
|
|
|
|
|
|
list.add("002212024032714244610618946776453619712");
|
|
|
|
|
|
list.add("002212024032808424210619223076450693120");
|
|
|
|
|
|
list.add("002212024032814205310619308187015802880");
|
|
|
|
|
|
list.add("002212024032907525410619572932763545600");
|
|
|
|
|
|
list.add("002212024032908303010619582395874840576");
|
|
|
|
|
|
list.add("002212024032908500610619587327303061504");
|
|
|
|
|
|
list.add("002212024032911524710619633303216230400");
|
|
|
|
|
|
list.add("002212024032923193810619806154641907712");
|
|
|
|
|
|
list.add("002212024033016321410620066014643077120");
|
|
|
|
|
|
list.add("002212024033016343310620066598362058752");
|
|
|
|
|
|
list.add("002212024033020173810620122738665811968");
|
|
|
|
|
|
list.add("002212024040108490910620674253468303360");
|
|
|
|
|
|
list.add("002212024040109022110620677573939793920");
|
|
|
|
|
|
list.add("002212024040208244810621030511414784000");
|
|
|
|
|
|
list.add("002212024040308254910621393156197027840");
|
|
|
|
|
|
list.add("002212024040308393710621396627855544320");
|
|
|
|
|
|
list.add("002212024040308404410621396912069971968");
|
|
|
|
|
|
list.add("002212024040309543710621415504291794944");
|
|
|
|
|
|
list.add("002212024040311170810621436271049670656");
|
|
|
|
|
|
list.add("002212024040323530210621626497573154816");
|
|
|
|
|
|
list.add("002212024040402372510621667866323075072");
|
|
|
|
|
|
list.add("002212024040408542210621762730175643648");
|
|
|
|
|
|
list.add("002212024040415481010621866867580702720");
|
|
|
|
|
|
list.add("002212024040512391510622181710707392512");
|
|
|
|
|
|
list.add("002212024040516392110622242135366791168");
|
|
|
|
|
|
list.add("002212024040614223510622570105679126528");
|
|
|
|
|
|
list.add("002212024040623165710622704580477042688");
|
|
|
|
|
|
list.add("002212024040809150910623217512072990720");
|
|
|
|
|
|
list.add("002212024040811153710623247826547335168");
|
|
|
|
|
|
list.add("002212024040908295510623568517415526400");
|
|
|
|
|
|
list.add("002212024040908523110623574205092974592");
|
|
|
|
|
|
list.add("002212024040911290310623613595104657408");
|
|
|
|
|
|
list.add("002212024041009232810623944378227253248");
|
|
|
|
|
|
list.add("002212024041107493210624283130019381248");
|
|
|
|
|
|
list.add("002212024041108193110624290674609082368");
|
|
|
|
|
|
list.add("002212024041208114810624651118629326848");
|
|
|
|
|
|
list.add("002212024041208300810624655733583732736");
|
|
|
|
|
|
list.add("002212024041209162410624667378518835200");
|
|
|
|
|
|
list.add("002212024041210260110624684896674537472");
|
|
|
|
|
|
list.add("002212024041214283110624745923243118592");
|
|
|
|
|
|
list.add("002212024041420442210625565287085670400");
|
|
|
|
|
|
list.add("002212024041507423510625730932126121984");
|
|
|
|
|
|
list.add("002212024041508341410625743931251539968");
|
|
|
|
|
|
list.add("002212024041521063510625933262427582464");
|
|
|
|
|
|
list.add("002212024041609581110626127442457104384");
|
|
|
|
|
|
list.add("002212024041707543510626458728699969536");
|
|
|
|
|
|
list.add("002212024041708271210626466935588491264");
|
|
|
|
|
|
list.add("002212024041708532810626473545384984576");
|
|
|
|
|
|
list.add("002212024041808322310626830625628844032");
|
|
|
|
|
|
list.add("002212024041808581710626837143647076352");
|
|
|
|
|
|
list.add("002212024041810270010626859470992621568");
|
|
|
|
|
|
list.add("002212024041810323510626860875480481792");
|
|
|
|
|
|
list.add("002212024041816371210626952633348419584");
|
|
|
|
|
|
list.add("002212024041820424210627014417214259200");
|
|
|
|
|
|
list.add("002212024041908145410627188615932936192");
|
|
|
|
|
|
list.add("002212024041908295410627192392017481728");
|
|
|
|
|
|
list.add("002212024042012450810627619008926924800");
|
|
|
|
|
|
list.add("002212024042012542310627621336262328320");
|
|
|
|
|
|
list.add("002212024042023094310627776190762885120");
|
|
|
|
|
|
list.add("002212024042109541010627938373800124416");
|
|
|
|
|
|
list.add("002212024042207451110628268298934329344");
|
|
|
|
|
|
list.add("002212024042220074210628455161424855040");
|
|
|
|
|
|
list.add("002212024042307511610628632220004851712");
|
|
|
|
|
|
list.add("002212024042308012110628634756814118912");
|
|
|
|
|
|
list.add("002212024042308204710628639647745916928");
|
|
|
|
|
|
list.add("002212024042309213010628654927362727936");
|
|
|
|
|
|
list.add("002212024042407541510628995359758417920");
|
|
|
|
|
|
list.add("002212024042419503110629175610779844608");
|
|
|
|
|
|
list.add("002212024042507593310629359080569290752");
|
|
|
|
|
|
list.add("002212024042508162210629363310436741120");
|
|
|
|
|
|
list.add("002212024042508444810629370468299612160");
|
|
|
|
|
|
list.add("002212024042510044010629390566508900352");
|
|
|
|
|
|
list.add("002212024042608042610629722695250190336");
|
|
|
|
|
|
list.add("002212024042608254110629728043720839168");
|
|
|
|
|
|
list.add("002212024042608495310629734132524331008");
|
|
|
|
|
|
list.add("002212024042613574610629811616614793216");
|
|
|
|
|
|
list.add("002212024042808054110630447788521406464");
|
|
|
|
|
|
list.add("002212024042809245110630467710966120448");
|
|
|
|
|
|
list.add("002212024042823254410630679326345379840");
|
|
|
|
|
|
list.add("002212024042907322310630801794375454720");
|
|
|
|
|
|
list.add("002212024042913113810630887168829394944");
|
|
|
|
|
|
list.add("002212024043008265210631177893526605824");
|
|
|
|
|
|
list.add("002212024043008304710631178879007895552");
|
|
|
|
|
|
list.add("002212024043008514610631184158888271872");
|
|
|
|
|
|
list.add("002212024043008590110631185985480146944");
|
|
|
|
|
|
list.add("002212024043009003010631186356933967872");
|
|
|
|
|
|
list.add("002212024043010533110631214799365967872");
|
|
|
|
|
|
list.add("002212024050107092310631520782677000192");
|
|
|
|
|
|
list.add("002212024050107525610631531743152410624");
|
|
|
|
|
|
list.add("002212024050416563310632755709779451904");
|
|
|
|
|
|
list.add("002212024050515232310633094653215678464");
|
|
|
|
|
|
list.add("002212024050520055610633165758466428928");
|
|
|
|
|
|
list.add("002212024050520481310633176399665774592");
|
|
|
|
|
|
list.add("002212024050607533110633343829061480448");
|
|
|
|
|
|
list.add("002212024050607564510633344642827370496");
|
|
|
|
|
|
list.add("002212024050608283810633352666908696576");
|
|
|
|
|
|
list.add("002212024050608393610633355426893475840");
|
2024-03-14 11:40:11 +08:00
|
|
|
|
return list;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public List<String> getPaymentIdList() {
|
|
|
|
|
|
List<String> paymentIdList1 = getPaymentIdList1();
|
|
|
|
|
|
List<String> resultList = Lists.newArrayList();
|
|
|
|
|
|
resultList.addAll(paymentIdList1);
|
|
|
|
|
|
return resultList;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
}
|
2024-07-12 17:28:21 +08:00
|
|
|
|
BigDecimal totalAccountAmount = memberVO.getTotalBalance();
|
2023-08-30 11:02:18 +08:00
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
|
|
// 支付订单
|
2024-06-17 09:31:47 +08:00
|
|
|
|
// PayOrderDTO payOrderDTO = new PayOrderDTO();
|
|
|
|
|
|
// payOrderDTO.setOrderCode(basicInfo.getOrderCode());
|
|
|
|
|
|
// payOrderDTO.setPayAmount(totalAccountAmount);
|
|
|
|
|
|
// payOrderDTO.setPayMode(dto.getPayMode());
|
|
|
|
|
|
// payOrderDTO.setMemberId(dto.getMemberId());
|
2023-08-30 11:02:18 +08:00
|
|
|
|
// payOrderDTO.setCode();
|
|
|
|
|
|
// payOrderDTO.setLockValue();
|
|
|
|
|
|
// payOrderDTO.setOrderBasicInfo(basicInfo);
|
|
|
|
|
|
|
2024-06-17 09:31:47 +08:00
|
|
|
|
PayOrderDTO build = PayOrderDTO.builder()
|
|
|
|
|
|
.orderCode(basicInfo.getOrderCode())
|
|
|
|
|
|
.payAmount(totalAccountAmount)
|
|
|
|
|
|
.payMode(dto.getPayMode())
|
|
|
|
|
|
.memberId(dto.getMemberId())
|
|
|
|
|
|
.build();
|
|
|
|
|
|
|
2024-01-22 12:32:22 +08:00
|
|
|
|
// Map<String, Object> map = orderBasicInfoService.payOrder(payOrderDTO);
|
|
|
|
|
|
// System.out.println(map);
|
2023-08-30 11:02:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@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");
|
2024-07-05 11:35:54 +08:00
|
|
|
|
dto.setIdList(Lists.newArrayList("395"));
|
2023-08-30 11:02:18 +08:00
|
|
|
|
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");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-01-19 16:59:54 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 查询汇付会员信息
|
|
|
|
|
|
*/
|
2023-08-30 11:02:18 +08:00
|
|
|
|
@Test
|
|
|
|
|
|
public void testQueryAdapayMemberInfo() {
|
2024-01-19 16:59:54 +08:00
|
|
|
|
String adapayMemberId = "ACM82792551";
|
|
|
|
|
|
String settleAccountId = null;
|
2023-08-30 11:02:18 +08:00
|
|
|
|
try {
|
2024-01-19 16:59:54 +08:00
|
|
|
|
AdapayCorpMemberVO adapayCorpMemberVO = adapayService.queryCorpAdapayMemberInfo(adapayMemberId, wechatAppId1);
|
|
|
|
|
|
// AdapaySettleAccountVO vo = adapayService.queryAdapaySettleAccount(adapayMemberId, settleAccountId, wechatAppId1);
|
|
|
|
|
|
System.out.println(JSON.toJSONString(adapayCorpMemberVO));
|
2023-08-30 11:02:18 +08:00
|
|
|
|
} 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");
|
2024-06-27 14:10:03 +08:00
|
|
|
|
// aMapService.getStationInfos(dto);
|
2023-08-30 11:02:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@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);
|
|
|
|
|
|
|
2024-03-19 16:22:40 +08:00
|
|
|
|
String dataJson = JSON.toJSONString(json);
|
2023-08-30 11:02:18 +08:00
|
|
|
|
// 加密
|
|
|
|
|
|
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");
|
|
|
|
|
|
|
2024-03-19 16:22:40 +08:00
|
|
|
|
String jsonString = JSON.toJSONString(jsonObject1);
|
2023-08-30 11:02:18 +08:00
|
|
|
|
|
|
|
|
|
|
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-05-09 10:15:44 +08:00
|
|
|
|
recordList.add(RefundableWxPayOrderData.builder().outTradeNo("3").transactionId("3").payerAmount(Constants.WHITELIST_DEFAULT_AMOUNT).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()
|
2024-01-14 15:55:53 +08:00
|
|
|
|
.id(Integer.parseInt(orderListVO.getId()))
|
2023-08-30 11:02:18 +08:00
|
|
|
|
.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() {
|
2024-06-11 16:30:42 +08:00
|
|
|
|
// 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(JSON.toJSONString(pay));
|
2023-08-30 11:02:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@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());
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 保存报文
|
2024-03-19 16:22:40 +08:00
|
|
|
|
String jsonMsg = JSON.toJSONString(loginRequestData);
|
2023-08-30 11:02:18 +08:00
|
|
|
|
// 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
|
|
|
|
|
2024-03-14 11:40:11 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 测试更新银行卡
|
|
|
|
|
|
*/
|
|
|
|
|
|
@Test
|
|
|
|
|
|
public void changeBankCardTest() throws BaseAdaPayException {
|
|
|
|
|
|
ChangeBankCardDTO dto = new ChangeBankCardDTO();
|
|
|
|
|
|
dto.setCardId("1018810800000168");
|
|
|
|
|
|
dto.setCardName("海南信祥物业管理有限公司");
|
|
|
|
|
|
dto.setTelNo("17384941319");
|
|
|
|
|
|
dto.setBankCode("88000835");
|
|
|
|
|
|
dto.setBankAcctType("1");
|
|
|
|
|
|
dto.setProvCode("0046");
|
|
|
|
|
|
dto.setAreaCode("4601");
|
|
|
|
|
|
|
|
|
|
|
|
String wechatAppId = wechatAppId1;
|
|
|
|
|
|
// 1-删除结算账户信息
|
|
|
|
|
|
// String adapayMemberId = account.getAdapayMemberId();
|
|
|
|
|
|
String adapayMemberId = "ACM69867986";
|
|
|
|
|
|
String settleAccountId = null;
|
|
|
|
|
|
AdapayCorpMemberVO adapayCorpMemberVO = adapayService.queryCorpAdapayMemberInfo(adapayMemberId, wechatAppId);
|
|
|
|
|
|
if (adapayCorpMemberVO != null) {
|
|
|
|
|
|
settleAccountId = adapayCorpMemberVO.getSettleAccountId();
|
|
|
|
|
|
}
|
|
|
|
|
|
adapayService.createDeleteSettleAccountRequest(adapayMemberId, settleAccountId, wechatAppId);
|
|
|
|
|
|
// 2-使用新账户信息创建结算账户
|
|
|
|
|
|
SettleAccountDTO settleAccountDTO = new SettleAccountDTO();
|
|
|
|
|
|
settleAccountDTO.setCardId(dto.getCardId());
|
|
|
|
|
|
settleAccountDTO.setCardName(dto.getCardName());
|
|
|
|
|
|
settleAccountDTO.setTelNo(dto.getTelNo());
|
|
|
|
|
|
settleAccountDTO.setBankCode(dto.getBankCode());
|
|
|
|
|
|
settleAccountDTO.setBankAcctType(dto.getBankAcctType());
|
|
|
|
|
|
settleAccountDTO.setProvCode(dto.getProvCode());
|
|
|
|
|
|
settleAccountDTO.setAreaCode(dto.getAreaCode());
|
|
|
|
|
|
adapayService.createSettleAccountRequest(settleAccountDTO, adapayMemberId, wechatAppId);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-04-01 09:57:23 +08:00
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
|
String data = "{\"total\":1,\"stationStatusInfo\":{\"operationID\":\"123456789\",\"stationID\":\"111111111111111\",\"connectorStatusInfos\":{\"connectorID\":1,\"equipmentID\":\"10000000000000000000001\",\"status\":4,\"currentA\":0,\"currentB\":0,\"currentC\":0,\"voltageA\":0,\"voltageB\":0,\"voltageC\":0,\"soc\":10}}}";
|
|
|
|
|
|
String dataSecret = "1234567890abcdef";
|
|
|
|
|
|
String dataSecretIv = "1234567890abcdef";
|
|
|
|
|
|
|
|
|
|
|
|
// 加密数据
|
|
|
|
|
|
String encryptData = Cryptos.encrypt(JSON.toJSONString(data), dataSecret, dataSecretIv);
|
|
|
|
|
|
String encryptData2 = Cryptos.aesEncrypt(JSON.toJSONString(data), dataSecret, dataSecretIv);
|
|
|
|
|
|
System.out.println(StringUtils.equals(encryptData, encryptData2));
|
|
|
|
|
|
String str = "il7B0BSEjFdzpyKzfOFpvg/Se1CP802RItKYFPfSLRxJ3jf0bVl9hvYOEktPAYW2nd7S8MBcyHYyacHKbI" +
|
|
|
|
|
|
"Sq5iTmDzG+ivnR+SZJv3USNTYVMz9rCQVSxd0cLlqsJauko79NnwQJbzDTyLooYoIwz75qBOH2/x" +
|
|
|
|
|
|
"OMirpeEqRJrF/EQjWekJmGk9RtboXePu2rka+Xm51syBPhiXJAq0GfbfaFu9tNqs/e2Vjja/ltE1M0lq" +
|
|
|
|
|
|
"vxfXQ6da6HrThsm5id4ClZFIi0acRfrsPLRixS/IQYtksxghvJwbqOsbIsITail9Ayy4tKcogeEZiOO+4Ed2" +
|
|
|
|
|
|
"64NSKmk7l3wKwJLAFjCFogBx8GE3OBz4pqcAn/ydA=";
|
|
|
|
|
|
|
|
|
|
|
|
System.out.println(StringUtils.equals(encryptData, str));
|
|
|
|
|
|
System.out.println(StringUtils.equals(encryptData2, str));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-03-04 16:29:55 +08:00
|
|
|
|
}
|