mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-03 13:38:02 +08:00
Merge branch 'dev' of https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web into dev
This commit is contained in:
@@ -487,4 +487,25 @@ public class JiLinPlatformController extends ThirdPartyBaseController{
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 推送充换电站用能统计信息
|
||||
* @param stationId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/v1/notificationOperationStatsInfo/{stationId}")
|
||||
public RestApiResponse<?> notificationOperationStatsInfo(@PathVariable("stationId") String stationId) {
|
||||
RestApiResponse<?> response = null;
|
||||
String result = null;
|
||||
try {
|
||||
result = platformLogic.notificationOperationStatsInfo(stationId);
|
||||
response = new RestApiResponse<>(result);
|
||||
} catch (Exception e) {
|
||||
logger.error("{}-推送充换电站用能统计信息 error", platformName, e);
|
||||
return new RestApiResponse<>(e);
|
||||
}
|
||||
logger.info("{}-平台推送充换电站用能统计信息 result:{}",platformName, result);
|
||||
return response;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.jsowell.web.controller.pile;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.A;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.jsowell.common.annotation.Log;
|
||||
@@ -20,10 +21,9 @@ import com.jsowell.pile.domain.MemberBasicInfo;
|
||||
import com.jsowell.pile.domain.MemberPlateNumberRelation;
|
||||
import com.jsowell.pile.domain.PileMerchantInfo;
|
||||
import com.jsowell.pile.dto.*;
|
||||
import com.jsowell.pile.service.MemberBasicInfoService;
|
||||
import com.jsowell.pile.service.MemberPlateNumberRelationService;
|
||||
import com.jsowell.pile.service.MemberTransactionRecordService;
|
||||
import com.jsowell.pile.service.*;
|
||||
import com.jsowell.pile.util.UserUtils;
|
||||
import com.jsowell.pile.vo.MemberWalletLogVO2;
|
||||
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
||||
import com.jsowell.pile.vo.uniapp.customer.MemberVO;
|
||||
import com.jsowell.pile.vo.uniapp.customer.MemberWalletLogVO;
|
||||
@@ -56,6 +56,9 @@ public class MemberBasicInfoController extends BaseController {
|
||||
@Autowired
|
||||
private MemberPlateNumberRelationService memberPlateNumberRelationService;
|
||||
|
||||
@Autowired
|
||||
private MemberWalletLogService memberWalletLogService;
|
||||
|
||||
/**
|
||||
* 查询会员基础信息列表
|
||||
*/
|
||||
@@ -318,6 +321,7 @@ public class MemberBasicInfoController extends BaseController {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询会员明细
|
||||
* @param dto
|
||||
@@ -339,4 +343,22 @@ public class MemberBasicInfoController extends BaseController {
|
||||
return AjaxResult.error("查询会员明细发生未知异常,请稍后重试");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出会员钱包流水
|
||||
* @param response
|
||||
* @param dto
|
||||
*/
|
||||
@PostMapping("/exportMemberWalletLog")
|
||||
public void exportMemberWalletLog(HttpServletResponse response, UniAppQueryMemberBalanceDTO dto){
|
||||
AuthorizedDeptVO authorizedMap = UserUtils.getAuthorizedMap();
|
||||
if (authorizedMap == null) {
|
||||
// 为空表示没有权限,返回空数组
|
||||
return;
|
||||
}
|
||||
List<MemberWalletLogVO2> memberWalletLogVO2 = memberWalletLogService.getByMemberId(dto.getMemberId());
|
||||
ExcelUtil<MemberWalletLogVO2> util = new ExcelUtil<MemberWalletLogVO2>(MemberWalletLogVO2.class);
|
||||
util.exportExcel(response, memberWalletLogVO2, "会员钱包流水");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.jsowell.common.enums.BusinessType;
|
||||
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.response.RestApiResponse;
|
||||
import com.jsowell.common.util.YKCUtils;
|
||||
import com.jsowell.common.util.poi.ExcelUtil;
|
||||
import com.jsowell.pile.domain.OrderBasicInfo;
|
||||
import com.jsowell.pile.domain.PileMerchantInfo;
|
||||
@@ -33,6 +34,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -134,7 +136,10 @@ public class OrderBasicInfoController extends BaseController {
|
||||
// 将结算金额改为实收金额
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
for (OrderListVO orderListVO : list) {
|
||||
orderListVO.setSettleAmount(String.valueOf(orderListVO.getActualReceivedAmount()));
|
||||
// orderListVO.setSettleAmount(String.valueOf(orderListVO.getActualReceivedAmount()));
|
||||
BigDecimal settleAmount = new BigDecimal(orderListVO.getSettleAmount());
|
||||
BigDecimal decimal = YKCUtils.getMinBigDecimal(settleAmount, orderListVO.getActualReceivedAmount());
|
||||
orderListVO.setSettleAmount(decimal.toString());
|
||||
}
|
||||
}
|
||||
ExcelUtil<OrderListVO> util = new ExcelUtil<OrderListVO>(OrderListVO.class);
|
||||
|
||||
@@ -19,6 +19,7 @@ import com.jsowell.adapay.response.QueryPaymentConfirmDetailResponse;
|
||||
import com.jsowell.adapay.service.AdapayService;
|
||||
import com.jsowell.adapay.vo.AdapayCorpMemberVO;
|
||||
import com.jsowell.adapay.vo.OrderSplitResult;
|
||||
import com.jsowell.api.uniapp.customer.TempController;
|
||||
import com.jsowell.common.constant.CacheConstants;
|
||||
import com.jsowell.common.constant.Constants;
|
||||
import com.jsowell.common.core.redis.RedisCache;
|
||||
@@ -28,6 +29,7 @@ import com.jsowell.common.util.DateUtils;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.pile.domain.AdapayMemberAccount;
|
||||
import com.jsowell.pile.domain.OrderUnsplitRecord;
|
||||
import com.jsowell.pile.dto.QueryOrderDTO;
|
||||
import com.jsowell.pile.service.OrderBasicInfoService;
|
||||
import com.jsowell.pile.service.OrderUnsplitRecordService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
@@ -75,8 +77,9 @@ public class PaymentTestController {
|
||||
private OrderBasicInfoService orderBasicInfoService;
|
||||
|
||||
/**
|
||||
* 查询分账信息
|
||||
* @throws BaseAdaPayException
|
||||
* 从payment_ids文件中获取支付id, 并批量查询分账信息
|
||||
* 如需撤销分账, 请使用 {@link PaymentTestController#testCreateConfirmReverse()} 可以本地运行
|
||||
* 如需重新分账, 请使用 {@link TempController#retryOrderSplit(QueryOrderDTO)} 需要使用ApiPost调用pre环境接口
|
||||
*/
|
||||
@Test
|
||||
public void queryCreateConfirmReverse() throws BaseAdaPayException {
|
||||
@@ -140,7 +143,9 @@ public class PaymentTestController {
|
||||
map.merge(divMember.getMemberId(), new BigDecimal(divMember.getAmount()), BigDecimal::add);
|
||||
}
|
||||
|
||||
if (StringUtils.equals(adapayMemberId, "0")) {
|
||||
if (StringUtils.equals(adapayMemberId, "0")
|
||||
|| StringUtils.equals(adapayMemberId, "AM29102732")) {
|
||||
// 0为默认平台id, AM29102732为罗总账户
|
||||
selfList.add(paymentId);
|
||||
}
|
||||
}
|
||||
@@ -257,12 +262,12 @@ public class PaymentTestController {
|
||||
if (str.trim().length() > 2) {
|
||||
// str根据逗号切割 002212023102515344310563156645282902016,C88208113664,20.0,2.15,17.85,2023-10-25 15:34:49
|
||||
String[] strArr = str.split(",");
|
||||
String paymentId = strArr[0];
|
||||
String orderCode = strArr[1];
|
||||
String payAmount = strArr[2];
|
||||
String refundAmount = strArr[3];
|
||||
String settleAmount = strArr[4];
|
||||
String orderTime = strArr[5];
|
||||
String paymentId = strArr[0]; // 支付id
|
||||
String orderCode = strArr[1]; // 订单编号
|
||||
String payAmount = strArr[2]; // 支付金额
|
||||
String refundAmount = strArr[3]; // 退款金额
|
||||
String settleAmount = strArr[4]; // 结算金额
|
||||
String orderTime = strArr[5]; // 订单时间
|
||||
|
||||
// 如果orderCode长度大于12并且有下划线, 则根据下划线切割只取第一部分
|
||||
if (orderCode.length() > 12 && orderCode.contains("_")) {
|
||||
@@ -307,7 +312,9 @@ public class PaymentTestController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 从文件获取分账参数
|
||||
* 从文件获取批量分账参数
|
||||
* adapayMemberId 待分账的汇付会员id
|
||||
* paymentList 待分账的订单信息(包含订单编号, 结算金额, 支付id)
|
||||
*/
|
||||
public Map<String, Object> getPaymentConfirmParamFromFile() {
|
||||
Map<String, Object> paramMap = Maps.newHashMap();
|
||||
@@ -333,6 +340,7 @@ public class PaymentTestController {
|
||||
|
||||
/**
|
||||
* 批量执行分账
|
||||
* @deprecated 2025年8月16日15点48分弃用, 此分账方法不会保存分账记录, 应使用接口执行分账
|
||||
*/
|
||||
@Test
|
||||
public void batchCreatePaymentConfirm() {
|
||||
@@ -394,6 +402,7 @@ public class PaymentTestController {
|
||||
|
||||
/**
|
||||
* 执行分账并处理重试逻辑
|
||||
* @deprecated
|
||||
*/
|
||||
private void executeWithRetry(PaymentConfirmParam param, int retryCount) {
|
||||
PaymentConfirmResponse response = adapayService.createPaymentConfirmRequest(param);
|
||||
@@ -433,6 +442,7 @@ public class PaymentTestController {
|
||||
|
||||
/**
|
||||
* 处理延迟队列中的分账任务
|
||||
* @deprecated
|
||||
*/
|
||||
@Scheduled(fixedDelay = 60000) // 每分钟执行一次
|
||||
public void processDelayedPaymentConfirm() {
|
||||
@@ -461,7 +471,7 @@ public class PaymentTestController {
|
||||
|
||||
/**
|
||||
* 批量支付确认撤销
|
||||
*
|
||||
* 用于撤销分账
|
||||
* @throws BaseAdaPayException
|
||||
*/
|
||||
@Test
|
||||
|
||||
@@ -1,270 +1,50 @@
|
||||
002212025010312233010721109634712432640
|
||||
002212025010511395410721823438163660800
|
||||
002212025010618280110722288531017486336
|
||||
002212025010715335410722607101620756480
|
||||
002212025010718002910722643992939560960
|
||||
002212025010718012310722644217850478592
|
||||
002212025010718060410722645396540407808
|
||||
002212025011018205810723736310183727104
|
||||
002212025011018321710723739159185690624
|
||||
002212025011116210310724068519130157056
|
||||
002212025011310420210724707980096671744
|
||||
002212025011311441610724723639892930560
|
||||
002212025011318154210724822149206626304
|
||||
002212025011319030810724834085954048000
|
||||
002212025011413331110725113438574858240
|
||||
002212025011517524110725541132409995264
|
||||
002212025011618112110725908216719314944
|
||||
002212025011618190510725910161285685248
|
||||
002212025011718382010726277396412993536
|
||||
002212025011808442810726490329845841920
|
||||
002212025011812071810726541377822244864
|
||||
002212025012113235010727647798636810240
|
||||
002212025012216571910728063910461665280
|
||||
002212025012309061710728307759910051840
|
||||
002212025012312233810728357424359510016
|
||||
002212025020718224810733883632906772480
|
||||
002212025020910081810734483962516905984
|
||||
002212025021114333510735275496150630400
|
||||
002212025021219400410735715016713003008
|
||||
002212025021418451910736426013719355392
|
||||
002212025021608242610736994539230171136
|
||||
002212025021614104510737081692663672832
|
||||
002212025021708153810737354709680492544
|
||||
002212025021811523110737771677491879936
|
||||
002212025021910103810738108425874923520
|
||||
002212025021911361010738129954535469056
|
||||
002212025022010082310738470250781085696
|
||||
002212025022017423510738584551070339072
|
||||
002212025022020015510738619616562741248
|
||||
002212025022108292310738807722325008384
|
||||
002212025022117430010738947046897709056
|
||||
002212025022212362410739232274985259008
|
||||
002212025022215034410739269351327539200
|
||||
002212025022308152110739528966891261952
|
||||
002212025022408221210739893076744863744
|
||||
002212025022408224210739893202453405696
|
||||
002212025022418473510740050462035120128
|
||||
002212025022518032410740401728922726401
|
||||
002212025022518440910740411986514296832
|
||||
002212025022608255810740618800661000192
|
||||
002212025022609001310740627420205645824
|
||||
002212025022617395810740758221619281920
|
||||
002212025022717415610741121103409590272
|
||||
002212025022809444510741363402955288576
|
||||
002212025022817365110741482213523939328
|
||||
002212025022818552610741501989554241536
|
||||
002212025030108314510741707421688844288
|
||||
002212025030113170510741779228571783168
|
||||
002212025030115311310741812985282310144
|
||||
002212025030208023110742062451713982464
|
||||
002212025030210101010742094575161815040
|
||||
002212025030316140910742548562885455872
|
||||
002212025030417384510742932240415080448
|
||||
002212025030418282510742944739742969856
|
||||
002212025030515141410743258261610835968
|
||||
002212025030518552010743313902547251200
|
||||
002212025030518563310743314208083447808
|
||||
002212025030615342210743625715060289536
|
||||
002212025030618403610743672584841736192
|
||||
002212025030717350810744018496464969728
|
||||
002212025030813225510744317411919749120
|
||||
002212025030908263910744605241428914176
|
||||
002212025031008194710744965899169443840
|
||||
002212025031017390610745106656476565504
|
||||
002212025031115013910745429419838926848
|
||||
002212025031118193010745479211732840448
|
||||
002212025031218323710745844899212578816
|
||||
002212025031308355010746057104936980480
|
||||
002212025031309071910746065026482257920
|
||||
002212025031317464310746195736192667648
|
||||
002212025031508272110746779744416055296
|
||||
002212025031511055310746819641957953536
|
||||
002212025031513005510746848590964248576
|
||||
002212025031513042010746849447662600192
|
||||
002212025031609123410747153510681800704
|
||||
002212025031813023710747936182459748352
|
||||
002212025031817403010748006111407648768
|
||||
002212025031909372410748246923995394048
|
||||
002212025031916141110748346776630018048
|
||||
002212025032010331310748623357191434240
|
||||
002212025032017383410748730402749640704
|
||||
002212025032018320810748743881261289472
|
||||
002212025032113522310749035869626789888
|
||||
002212025032117555410749097153108037632
|
||||
002212025032210515810749352851345055744
|
||||
002212025032212030110749370734091386880
|
||||
002212025032310181310749706749476524032
|
||||
002212025032312122810749735499925786624
|
||||
002212025032517481310750544768694960128
|
||||
002212025032618063710750911787057328128
|
||||
002212025032713435210751208054068596736
|
||||
002212025032717563510751271652772896768
|
||||
002212025032721215910751323340967845888
|
||||
002212025032806273310751460636267737088
|
||||
002212025032909590410751876255525990400
|
||||
002212025032915011410751952300168658944
|
||||
002212025032916281410751974192431329280
|
||||
002212025033008261910752215304013320192
|
||||
002212025033118021810752722640020103168
|
||||
002212025033119450310752748499328290816
|
||||
002212025033119575710752751744599027712
|
||||
002212025040117325310753077626790789120
|
||||
002212025040210284610753333282284224512
|
||||
002212025040210333610753334495618420736
|
||||
002212025040210412410753336461826359296
|
||||
002212025040210483410753338264797433856
|
||||
002212025040217335810753440286187241472
|
||||
002212025040219292110753469323218989056
|
||||
002212025040312411410753729005884166144
|
||||
002212025040317480510753806225146826752
|
||||
002212025040317512510753807067348848640
|
||||
002212025040411423410754076629982552064
|
||||
002212025040508465110754394796462161920
|
||||
002212025040608330010754753697578930176
|
||||
002212025040717471910755255587231481856
|
||||
002212025040908310910755840397767290880
|
||||
002212025040916322010755961490079465472
|
||||
002212025040920275410756020771788726272
|
||||
002212025041011312110756248133497307136
|
||||
002212025041208070810756921518777880576
|
||||
002212025041408305810757652288682942464
|
||||
002212025041417492110757792812764901376
|
||||
002212025041508141810758010485145751552
|
||||
002212025041513242810758088537941684224
|
||||
002212025041513292510758089785893924864
|
||||
002212025041708285810758738950629605376
|
||||
002212025041715444810758848629766660096
|
||||
002212025041718135110758886139545964544
|
||||
002212025041818484010759257289566871552
|
||||
002212025041909061610759473112839069696
|
||||
002212025041915020210759562644875800576
|
||||
002212025041915032910759563009752309760
|
||||
002212025041918533310759620908063137792
|
||||
002212025042008390010759828638282702848
|
||||
002212025042117371010760326461189152768
|
||||
002212025042210371910760583189709578240
|
||||
002212025042212390810760613847324471296
|
||||
002212025042216161810760668500097044480
|
||||
002212025042217524110760692752278249472
|
||||
002212025042317454110761053381239779328
|
||||
002212025042518523510761794990252744704
|
||||
002212025042608515610762006222775672832
|
||||
002212025042609175310762012751844110336
|
||||
002212025042609202610762013392594427904
|
||||
002212025042609211310762013591531188224
|
||||
002212025042609224610762013981311229952
|
||||
002212025042609252510762014645440790528
|
||||
002212025042710323210762393926702903296
|
||||
002212025042711132810762404226109976576
|
||||
002212025042711215710762406361371492352
|
||||
002212025042718313910762514501142470656
|
||||
002212025042911074410763127561645350912
|
||||
002212025042911093910763128043013447680
|
||||
002212025042912572510763155160903966720
|
||||
002212025043013020710763518731867111424
|
||||
002212025043015034010763549322996244480
|
||||
002212025050618033410765768924140658688
|
||||
002212025050708245110765985670659203072
|
||||
002212025050714473210766081979332321280
|
||||
002212025050714524210766083278920638464
|
||||
002212025050912150210766768374820663296
|
||||
002212025050913513510766792671450521600
|
||||
002212025050917423610766850808739966976
|
||||
002212025051015063710767173942789713920
|
||||
002212025051108285910767436264674992128
|
||||
002212025051211595110767851718841757696
|
||||
002212025051220074310767974492804636672
|
||||
002212025051317382510768299309969227776
|
||||
002212025051320044810768336148596510720
|
||||
002212025051408412410768526551529865216
|
||||
002212025051418113910768670060587499520
|
||||
002212025051420293110768704754705281024
|
||||
002212025051711484410769660860241010688
|
||||
002212025051715110110769711763870437376
|
||||
002212025051716013710769724498383192064
|
||||
002212025051808350310769974506976436224
|
||||
002212025051919274310770501141468049408
|
||||
002212025052009141710770709153968545792
|
||||
002212025052018272110770848338087686144
|
||||
002212025052317464310771925274990374912
|
||||
002212025052408303510772147708867555328
|
||||
002212025052508282310772509542127841280
|
||||
002212025052608294310772872264091856896
|
||||
002212025052608492510772877225203355648
|
||||
002212025052611444410772921342750257152
|
||||
002212025052810175710773624280070975488
|
||||
002212025052810443710773630989890912256
|
||||
002212025052811451610773646252271366144
|
||||
002212025052813115410773668057356513280
|
||||
002212025052817493910773737954751455232
|
||||
002212025052909270210773973854057578496
|
||||
002212025052916590910774087633092870144
|
||||
002212025053013045210774391060426248192
|
||||
002212025053015030310774420801913843712
|
||||
002212025053015311910774427917047058432
|
||||
002212025053015590210774434890648829952
|
||||
002212025060211572710775461260357693440
|
||||
002212025060315450110775880917645656064
|
||||
002212025060413183710776206460583530496
|
||||
002212025060417425310776272963961999360
|
||||
002212025060619424110777027891996995584
|
||||
002212025060708132810777216832941707264
|
||||
002212025060808142810777579468792229888
|
||||
002212025060812134010777639666656292864
|
||||
002212025060912355610778007659949142016
|
||||
002212025060914045710778030059458998272
|
||||
002212025060918160110778093243819380736
|
||||
002212025060918445710778100522723799040
|
||||
002212025060920361110778128518575161344
|
||||
002212025061017470110778448331703701504
|
||||
002212025061218255910779182913943056384
|
||||
002212025061219075510779193466884366336
|
||||
002212025061317453610779535139644534784
|
||||
002212025061410010110779780612443504640
|
||||
002212025061415583210779870584995954688
|
||||
002212025061417480010779898130494881792
|
||||
002212025061508240110780118589981929472
|
||||
002212025061617305310780618601641967616
|
||||
002212025061708272110780844202413703168
|
||||
002212025061708321110780845418258706432
|
||||
002212025061713270110780919618405560320
|
||||
002212025061716281610780965229756071936
|
||||
002212025061718530510781001672502935552
|
||||
002212025061808331110781208058550104064
|
||||
002212025061811521110781258137657954304
|
||||
002212025061817455910781347177186357248
|
||||
002212025061818500010781363287814422528
|
||||
002212025062012573410781999368443080704
|
||||
002212025062017173110782064789755379712
|
||||
002212025062017470510782072226553962496
|
||||
002212025062211451010782705924662964224
|
||||
002212025062413024210783450211964928000
|
||||
002212025062418154110783528978758483968
|
||||
002212025062519062410783904127150579712
|
||||
002212025062613455610784185868762996736
|
||||
002212025062614343010784198089371475968
|
||||
002212025062617520710784247821972025344
|
||||
002212025062621562110784309285481701377
|
||||
002212025062717472210784609016881070080
|
||||
002212025062815342210784937932169486336
|
||||
002212025062915081210785293737018998784
|
||||
002212025063010540810785592184039628800
|
||||
002212025063018014310785699791389736960
|
||||
002212025070112062610785972766079791104
|
||||
002212025070209463310786299954057535488
|
||||
002212025070209530410786301594771726336
|
||||
002212025070213442010786359794903130112
|
||||
002212025070214042110786364830683586560
|
||||
002212025070314554210786740140835061760
|
||||
002212025070316211110786761654028451840
|
||||
002212025070318465010786798309144600576
|
||||
002212025070411065910787044968341204992
|
||||
002212025070515045410787467231634640896
|
||||
002212025070607530810787720962216898560
|
||||
002212025070717504810788233756076032000
|
||||
002212025070813271210788529809422807040
|
||||
002212025070908165510788814112488681472
|
||||
002212025070911342910788863829036843008
|
||||
002212025070919205710788981219712122880
|
||||
002212025071108401510789544757095559168
|
||||
002212025061013125610778379356349255680
|
||||
002212025061123105710778892241991266304
|
||||
002212025061221303510779229370579795968
|
||||
002212025061303153510779316194076340224
|
||||
002212025061314443510779489584637919232
|
||||
002212025061315441210779504586955866112
|
||||
002212025061320591710779583883106959360
|
||||
002212025061419440810779927359011442688
|
||||
002212025061717244510780979443778531328
|
||||
002212025061718153310780992227450421248
|
||||
002212025061723101910781066410718736384
|
||||
002212025061818135810781354218055647232
|
||||
002212025061917211910781703355569188864
|
||||
002212025061921220610781763951553019904
|
||||
002212025062018490410782087825938300928
|
||||
002212025062020494210782118184272429056
|
||||
002212025062523183010783967571297222656
|
||||
002212025062721425810784668306892759040
|
||||
002212025063008151410785552196408438784
|
||||
002212025063022234310785765725773119488
|
||||
002212025070317205910786776703700713472
|
||||
002212025070417331610787142180850999296
|
||||
002212025070607591810787722515721306112
|
||||
002212025070621515210787932035059351552
|
||||
002212025070720302810788273941156712448
|
||||
002212025070821160910788647824212873216
|
||||
002212025070922104810789023964148084736
|
||||
002212025071018504310789335999055200256
|
||||
002212025071021134310789371988704075776
|
||||
002212025071121201110789736000253403136
|
||||
002212025071221524210790106575025577984
|
||||
002212025071310411710790299992383381504
|
||||
002212025071313373010790344340634427392
|
||||
002212025071317565110790409605765394432
|
||||
002212025071417494610790770214739144704
|
||||
002212025071620025710791528504852729856
|
||||
002212025071815494910792189576742203392
|
||||
002212025072223080410793749417253052416
|
||||
002212025072514182310794703283065589760
|
||||
002212025073017352210796564794989776896
|
||||
002212025073020461810796612844542365696
|
||||
002212025080320163210798054905066217472
|
||||
002212025080417572310798382276562251776
|
||||
002212025080521240710798796688082350080
|
||||
002212025080723403110799555791754485760
|
||||
002212025080917141810800183373002268672
|
||||
002212025081112594010800844066818973696
|
||||
002212025081116282210800896589396779008
|
||||
002212025081308251110801499764861669376
|
||||
002212025081519435110802395335161372672
|
||||
@@ -2,6 +2,7 @@ package com.jsowell.pile.mapper;
|
||||
|
||||
import com.jsowell.pile.domain.MemberWalletLog;
|
||||
import com.jsowell.pile.dto.UniAppQueryMemberBalanceDTO;
|
||||
import com.jsowell.pile.vo.MemberWalletLogVO2;
|
||||
import com.jsowell.pile.vo.uniapp.customer.MemberBalanceVO;
|
||||
import com.jsowell.pile.vo.uniapp.customer.MemberWalletLogVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -102,4 +103,6 @@ public interface MemberWalletLogMapper {
|
||||
List<MemberBalanceVO> getMemberRefundAmount(List<String> memberIds);
|
||||
|
||||
List<MemberWalletLog> getOrderRecord(@Param("orderCode") String orderCode, @Param("type") String type);
|
||||
|
||||
List<MemberWalletLogVO2> getByMemberId(String memberId);
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.jsowell.pile.service;
|
||||
|
||||
import com.jsowell.pile.domain.MemberWalletLog;
|
||||
import com.jsowell.pile.vo.MemberWalletLogVO2;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -30,5 +31,7 @@ public interface MemberWalletLogService {
|
||||
int batchInsert(List<MemberWalletLog> list);
|
||||
|
||||
List<MemberWalletLog> getOrderRecord(String orderCode, String type);
|
||||
|
||||
List<MemberWalletLogVO2> getByMemberId(String memberId);
|
||||
}
|
||||
|
||||
|
||||
@@ -36,10 +36,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -612,9 +609,16 @@ public class MemberBasicInfoServiceImpl implements MemberBasicInfoService {
|
||||
*/
|
||||
@Override
|
||||
public List<MemberWalletLogVO> getMemberWalletDetail(UniAppQueryMemberBalanceDTO dto) {
|
||||
return memberWalletLogMapper.getMemberWalletDetail(dto);
|
||||
List<MemberWalletLogVO> memberWalletDetail = memberWalletLogMapper.getMemberWalletDetail(dto);
|
||||
for (MemberWalletLogVO log : memberWalletDetail) {
|
||||
if ("2".equals(log.getType()) && "21".equals(log.getSubType())) {
|
||||
log.setAmount(null);
|
||||
}
|
||||
}
|
||||
return memberWalletDetail;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<MemberWalletLogVO> getMemberWalletDetailV2(UniAppQueryMemberBalanceDTO dto) {
|
||||
return memberWalletLogMapper.getMemberWalletDetailV2(dto);
|
||||
|
||||
@@ -1,12 +1,21 @@
|
||||
package com.jsowell.pile.service.impl;
|
||||
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.pile.domain.MemberWalletLog;
|
||||
import com.jsowell.pile.dto.QueryMemberInfoDTO;
|
||||
import com.jsowell.pile.mapper.MemberWalletLogMapper;
|
||||
import com.jsowell.pile.service.MemberWalletLogService;
|
||||
import com.jsowell.pile.vo.MemberWalletLogVO2;
|
||||
import com.jsowell.pile.vo.uniapp.customer.MemberVO;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class MemberWalletLogServiceImpl implements MemberWalletLogService {
|
||||
@@ -73,5 +82,11 @@ public class MemberWalletLogServiceImpl implements MemberWalletLogService {
|
||||
public int batchInsert(List<MemberWalletLog> list) {
|
||||
return memberWalletLogMapper.batchInsert(list);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<MemberWalletLogVO2> getByMemberId(String memberId) {
|
||||
return memberWalletLogMapper.getByMemberId(memberId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -557,6 +557,10 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
||||
resultVO.setDateDescription("结算时间 " + startSettleTime + " - " + endSettleTime);
|
||||
resultList.add(resultVO);
|
||||
}
|
||||
// 前端总结算金额取sumActualReceivedAmount字段
|
||||
resultList.forEach(resultVO -> {
|
||||
resultVO.setSumActualReceivedAmount(YKCUtils.getMinBigDecimal(resultVO.getSumSettleAmount(), resultVO.getSumActualReceivedAmount()));
|
||||
});
|
||||
return resultList;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.jsowell.pile.vo;
|
||||
import com.jsowell.common.annotation.Excel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import java.math.BigDecimal;
|
||||
/**
|
||||
* 会员钱包余额明细相关
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class MemberWalletLogVO2 {
|
||||
/**
|
||||
* 会员id
|
||||
*/
|
||||
@Excel(name = "会员id")
|
||||
private String memberId;
|
||||
|
||||
/**
|
||||
* 交易类型 1-进账;2-出账
|
||||
*/
|
||||
@Excel(name = "交易类型", readConverterExp = "1=进账,2=出账")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 钱包编号
|
||||
*/
|
||||
@Excel(name = "钱包编号")
|
||||
private String walletCode;
|
||||
|
||||
/**
|
||||
* 子类型 10-充值, 11-赠送, 12-订单结算退款,20-后管扣款, 21-订单付款, 22-用户退款
|
||||
*/
|
||||
@Excel(name = "操作类型(10-充值, 11-赠送, 12-订单结算退款,20-后管扣款, 21-订单付款, 22-用户退款)",
|
||||
readConverterExp = "10=充值,11=赠送,12=订单结算退款,20=后管扣款,21=订单付款,22=用户退款")
|
||||
private String subType;
|
||||
|
||||
/**
|
||||
* 充值/消费人员
|
||||
*/
|
||||
@Excel(name = "充值/消费人员")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 出账/入账金额
|
||||
*/
|
||||
@Excel(name = "出账/入账金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
/**
|
||||
* 交易时间
|
||||
*/
|
||||
@Excel(name = "交易时间")
|
||||
private String transactionTime;
|
||||
|
||||
/**
|
||||
* 余额类型(1-本金,2-赠送)
|
||||
*/
|
||||
private String category;
|
||||
|
||||
/**
|
||||
* 关联订单
|
||||
*/
|
||||
private String relatedOrderCode;
|
||||
|
||||
/**
|
||||
* 支付金额
|
||||
*/
|
||||
private BigDecimal payAmount;
|
||||
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
private BigDecimal orderAmount;
|
||||
|
||||
/**
|
||||
* 退款金额
|
||||
*/
|
||||
private BigDecimal refundAmount;
|
||||
|
||||
/**
|
||||
* 变动前金额
|
||||
*/
|
||||
private BigDecimal beforeAmount;
|
||||
|
||||
/**
|
||||
* 变动后金额
|
||||
*/
|
||||
private BigDecimal afterAmount;
|
||||
}
|
||||
@@ -31,6 +31,8 @@ public class MemberWalletLogVO {
|
||||
/**
|
||||
* 子类型 10-充值, 11-赠送, 12-订单结算退款,20-后管扣款, 21-订单付款, 22-用户退款
|
||||
*/
|
||||
@Excel(name = "操作类型(10-充值, 11-赠送, 12-订单结算退款,20-后管扣款, 21-订单付款, 22-用户退款)",
|
||||
readConverterExp = "10=充值,11=赠送,12=订单结算退款,20=后管扣款,21=订单付款,22=用户退款")
|
||||
private String subType;
|
||||
|
||||
/**
|
||||
@@ -42,6 +44,7 @@ public class MemberWalletLogVO {
|
||||
/**
|
||||
* 出账/入账金额
|
||||
*/
|
||||
@Excel(name = "金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
/**
|
||||
@@ -53,6 +56,7 @@ public class MemberWalletLogVO {
|
||||
/**
|
||||
* 余额类型(1-本金,2-赠送)
|
||||
*/
|
||||
@Excel(name = "余额类型(1-本金,2-赠送)", readConverterExp = "1=本金,2=赠送")
|
||||
private String category;
|
||||
|
||||
/**
|
||||
@@ -94,6 +98,7 @@ public class MemberWalletLogVO {
|
||||
/**
|
||||
* 操作人员
|
||||
*/
|
||||
@Excel(name = "操作人员")
|
||||
private String createBy;
|
||||
|
||||
public String getSubTypeName() {
|
||||
|
||||
@@ -651,4 +651,26 @@
|
||||
where related_order_code = #{orderCode,jdbcType=VARCHAR}
|
||||
and type = #{type,jdbcType=VARCHAR}
|
||||
</select>
|
||||
|
||||
<select id="getByMemberId" resultType="com.jsowell.pile.vo.MemberWalletLogVO2">
|
||||
SELECT
|
||||
member_id AS memberId,
|
||||
type,
|
||||
wallet_code AS walletCode,
|
||||
sub_type AS subType,
|
||||
create_by AS createBy,
|
||||
amount,
|
||||
create_time AS transactionTime,
|
||||
create_time AS createTime,
|
||||
category,
|
||||
related_order_code AS relatedOrderCode,
|
||||
before_amount AS beforeAmount,
|
||||
after_amount AS afterAmount
|
||||
FROM member_wallet_log
|
||||
where
|
||||
<if test="memberId != null and memberId != ''">
|
||||
member_id = #{memberId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -27,7 +27,10 @@ import com.jsowell.pile.service.*;
|
||||
import com.jsowell.pile.vo.base.StationInfoVO;
|
||||
import com.jsowell.pile.vo.web.BillingTemplateVO;
|
||||
import com.jsowell.thirdparty.amap.service.AMapService;
|
||||
import com.jsowell.thirdparty.common.NotificationDTO;
|
||||
import com.jsowell.thirdparty.common.NotificationService;
|
||||
import com.jsowell.thirdparty.platform.service.impl.GuiZhouPlatformServiceImpl;
|
||||
import com.jsowell.thirdparty.platform.service.impl.JiLinPlatformServiceImpl;
|
||||
import com.jsowell.thirdparty.platform.service.impl.SiChuanPlatformServiceImpl;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.slf4j.Logger;
|
||||
@@ -66,6 +69,9 @@ public class JsowellTask {
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
|
||||
@Autowired
|
||||
private NotificationService notificationService;
|
||||
|
||||
@Autowired
|
||||
private AMapService aMapService;
|
||||
|
||||
@@ -234,28 +240,34 @@ public class JsowellTask {
|
||||
log.debug("PRE环境不执行");
|
||||
return;
|
||||
}
|
||||
// 查询出要推送的站点(贵州、)
|
||||
String thirdPartyType = ThirdPlatformTypeEnum.GUI_ZHOU_PLATFORM.getTypeCode();
|
||||
List<StationInfoVO> stationInfoVOS = thirdPartyStationRelationService.selectStationList(thirdPartyType);
|
||||
|
||||
List<String> stationIdList = stationInfoVOS.stream()
|
||||
.map(StationInfoVO::getStationId)
|
||||
.collect(Collectors.toList());
|
||||
List<String> thirdPartyTypeList = Lists.newArrayList(
|
||||
ThirdPlatformTypeEnum.GUI_ZHOU_PLATFORM.getTypeCode(),
|
||||
ThirdPlatformTypeEnum.SI_CHUAN_PLATFORM.getTypeCode(),
|
||||
ThirdPlatformTypeEnum.JI_LIN_PLATFORM.getTypeCode()
|
||||
);
|
||||
|
||||
GuiZhouPlatformServiceImpl guiZhouPlatformService = new GuiZhouPlatformServiceImpl();
|
||||
guiZhouPlatformService.notificationPowerInfo(stationIdList);
|
||||
for (String thirdPartyType : thirdPartyTypeList) {
|
||||
List<StationInfoVO> stationInfoVOS = thirdPartyStationRelationService.selectStationList(thirdPartyType);
|
||||
if (CollectionUtils.isEmpty(stationInfoVOS)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//四川省平台推送充电站实时功率
|
||||
String thirdPartyType2 = ThirdPlatformTypeEnum.SI_CHUAN_PLATFORM.getTypeCode();
|
||||
List<StationInfoVO> stationInfoVOS2 = thirdPartyStationRelationService.selectStationList(thirdPartyType2);
|
||||
|
||||
List<String> stationIdList2 = stationInfoVOS2.stream()
|
||||
.map(StationInfoVO::getStationId)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
SiChuanPlatformServiceImpl sichuanPlatformService = new SiChuanPlatformServiceImpl();
|
||||
sichuanPlatformService.notificationPowerInfo(stationIdList2);
|
||||
List<String> stationIdList = stationInfoVOS.stream()
|
||||
.map(StationInfoVO::getStationId)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
for (String stationId : stationIdList) {
|
||||
try {
|
||||
NotificationDTO dto = new NotificationDTO();
|
||||
dto.setStationId(stationId);
|
||||
dto.setPlatformType(thirdPartyType);
|
||||
notificationService.notificationStationPowerInfo(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("平台类型:{},站点ID:{},推送充电站实时功率失败", thirdPartyType, stationId, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -269,32 +281,36 @@ public class JsowellTask {
|
||||
return;
|
||||
}
|
||||
|
||||
// 贵州推送充电站统计信息
|
||||
String thirdPartyType = ThirdPlatformTypeEnum.GUI_ZHOU_PLATFORM.getTypeCode();
|
||||
List<StationInfoVO> stationInfoVOS = thirdPartyStationRelationService.selectStationList(thirdPartyType);
|
||||
List<String> thirdPartyTypeList = Lists.newArrayList(
|
||||
ThirdPlatformTypeEnum.GUI_ZHOU_PLATFORM.getTypeCode(),
|
||||
ThirdPlatformTypeEnum.SI_CHUAN_PLATFORM.getTypeCode(),
|
||||
ThirdPlatformTypeEnum.JI_LIN_PLATFORM.getTypeCode()
|
||||
);
|
||||
|
||||
List<String> stationIdList = stationInfoVOS.stream()
|
||||
.map(StationInfoVO::getStationId)
|
||||
.collect(Collectors.toList());
|
||||
GuiZhouPlatformServiceImpl guiZhouPlatformService = new GuiZhouPlatformServiceImpl();
|
||||
for (String stationId : stationIdList) {
|
||||
guiZhouPlatformService.notificationOperationStatsInfo(stationId);
|
||||
for (String thirdPartyType : thirdPartyTypeList) {
|
||||
List<StationInfoVO> stationInfoVOS = thirdPartyStationRelationService.selectStationList(thirdPartyType);
|
||||
if (CollectionUtils.isEmpty(stationInfoVOS)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
List<String> stationIdList = stationInfoVOS.stream()
|
||||
.map(StationInfoVO::getStationId)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
for (String stationId : stationIdList) {
|
||||
try {
|
||||
NotificationDTO dto = new NotificationDTO();
|
||||
dto.setStationId(stationId);
|
||||
dto.setPlatformType(thirdPartyType);
|
||||
notificationService.notificationOperationStatsInfo(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("平台类型:{},站点ID:{},推送统计信息失败", thirdPartyType, stationId, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//四川省平台推送充电站实时功率
|
||||
String thirdPartyType2 = ThirdPlatformTypeEnum.SI_CHUAN_PLATFORM.getTypeCode();
|
||||
List<StationInfoVO> stationInfoVOS2 = thirdPartyStationRelationService.selectStationList(thirdPartyType2);
|
||||
|
||||
List<String> stationIdList2 = stationInfoVOS2.stream()
|
||||
.map(StationInfoVO::getStationId)
|
||||
.collect(Collectors.toList());
|
||||
SiChuanPlatformServiceImpl sichuanPlatformService = new SiChuanPlatformServiceImpl();
|
||||
for (String stationId : stationIdList2) {
|
||||
sichuanPlatformService.notificationOperationStatsInfo(stationId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 定时任务, 订单分账
|
||||
* jsowellTask.processOrderSplitting()
|
||||
|
||||
@@ -390,4 +390,37 @@ public class NotificationService {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 推送站点用能统计信息
|
||||
* @param dto
|
||||
*/
|
||||
public void notificationOperationStatsInfo(NotificationDTO dto) {
|
||||
String stationId = dto.getStationId();
|
||||
String platformType = dto.getPlatformType();
|
||||
if (StringUtils.isBlank(stationId)) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
|
||||
}
|
||||
// 通过stationId 查询该站点需要对接的平台配置
|
||||
List<ThirdPartySecretInfoVO> secretInfoVOS = thirdpartySecretInfoService.queryStationToPlatformList(stationId);
|
||||
if (CollectionUtils.isEmpty(secretInfoVOS)) {
|
||||
return;
|
||||
}
|
||||
// 调用相应平台的处理方法
|
||||
for (ThirdPartySecretInfoVO secretInfoVO : secretInfoVOS) {
|
||||
if (StringUtils.isNotBlank(platformType) && !StringUtils.equals(platformType, secretInfoVO.getPlatformType())) {
|
||||
// 如果dto中的platformType不为空,并且不等于secretInfoVO.getPlatformType(),continue
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
// 根据平台类型获取Service
|
||||
ThirdPartyPlatformService platformService = ThirdPartyPlatformFactory.getInvokeStrategy(secretInfoVO.getPlatformType());
|
||||
platformService.notificationOperationStatsInfo(stationId);
|
||||
} catch (Exception e) {
|
||||
logger.error("推送充换电站用能统计信息error", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -345,7 +345,7 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
*/
|
||||
@Override
|
||||
public String notificationStationInfo(String stationId) {
|
||||
List<SupStationInfoDTO1> stationInfos = new ArrayList<>();
|
||||
// List<SupStationInfoDTO1> stationInfos = new ArrayList<>();
|
||||
// 通过id查询站点相关信息
|
||||
PileStationInfo pileStationInfo = pileStationInfoService.selectPileStationInfoById(Long.parseLong(stationId));
|
||||
// 查询相关配置信息
|
||||
@@ -457,7 +457,7 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
if (CollectionUtils.isNotEmpty(pileList)) {
|
||||
info.setEquipmentInfosDTO(pileList); // 充电设备信息列表
|
||||
}
|
||||
stationInfos.add(info);
|
||||
// stationInfos.add(info);
|
||||
|
||||
// 调用中电联平台接口
|
||||
String url = urlAddress + "notification_station_info";
|
||||
@@ -465,7 +465,7 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
/* JSONObject data = new JSONObject();
|
||||
data.put("StationInfo", stationInfos);*/
|
||||
|
||||
String jsonString = JSON.toJSONString(stationInfos);
|
||||
String jsonString = JSON.toJSONString(info);
|
||||
|
||||
|
||||
// 获取令牌
|
||||
@@ -585,10 +585,7 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
String urlAddress = secretInfoVO.getTheirUrlPrefix();
|
||||
String url = urlAddress + "notification_station_status";
|
||||
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("StationID", connectorInfo.getStationId());
|
||||
map.put("ConnectorStatusInfos", info);
|
||||
String jsonString = JSON.toJSONString(map);
|
||||
String jsonString = JSON.toJSONString(info);
|
||||
|
||||
// 获取令牌
|
||||
String token = getToken(urlAddress, operatorId, operatorSecret, dataSecretIv, signSecret, dataSecret);
|
||||
@@ -775,6 +772,13 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
*/
|
||||
@Override
|
||||
public String notificationStartChargeResult(String orderCode) {
|
||||
// 校验是否是吉林平台订单
|
||||
boolean needPushToThirdPartyPlatform = ThirdPartyPlatformUtils.isNeedPushToThirdPartyPlatform(orderCode , ThirdPlatformTypeEnum.JI_LIN_PLATFORM.getOperatorId());
|
||||
|
||||
if (!needPushToThirdPartyPlatform) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// 根据订单号查询订单信息
|
||||
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
|
||||
if (orderInfo == null) {
|
||||
@@ -819,6 +823,11 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
String operatorID = dto.getOperatorID();
|
||||
String orderNo = dto.getOrderNo();
|
||||
dto.setStartChargeSeq(orderNo);
|
||||
boolean needPushToThirdPartyPlatform = ThirdPartyPlatformUtils.isNeedPushToThirdPartyPlatform(orderNo , ThirdPlatformTypeEnum.JI_LIN_PLATFORM.getOperatorId());
|
||||
|
||||
if (!needPushToThirdPartyPlatform) {
|
||||
return null;
|
||||
}
|
||||
// 通过订单号查询订单信息
|
||||
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(dto.getStartChargeSeq());
|
||||
// logger.info(operatorName + "查询订单信息 orderInfo:{}", orderInfo);
|
||||
@@ -898,6 +907,11 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
*/
|
||||
@Override
|
||||
public String notificationEquipChargeStatus(String orderCode) {
|
||||
boolean needPushToThirdPartyPlatform = ThirdPartyPlatformUtils.isNeedPushToThirdPartyPlatform(orderCode , ThirdPlatformTypeEnum.JI_LIN_PLATFORM.getOperatorId());
|
||||
|
||||
if (!needPushToThirdPartyPlatform) {
|
||||
return null;
|
||||
}
|
||||
// 根据订单号查询订单信息
|
||||
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
|
||||
OrderDetail orderDetail = orderBasicInfoService.getOrderDetailByOrderCode(orderInfo.getOrderCode());
|
||||
@@ -995,6 +1009,12 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
//使用orderNo接收的数据
|
||||
String orderCode = dto.getOrderNo();
|
||||
|
||||
boolean needPushToThirdPartyPlatform = ThirdPartyPlatformUtils.isNeedPushToThirdPartyPlatform(orderCode , ThirdPlatformTypeEnum.JI_LIN_PLATFORM.getOperatorId());
|
||||
|
||||
if (!needPushToThirdPartyPlatform) {
|
||||
return null;
|
||||
}
|
||||
|
||||
int orderStatus = 2;
|
||||
int succStat = 1;
|
||||
ThirdPartySecretInfoVO jiLinSecretInfo = getJiLinSecretInfo();
|
||||
@@ -1029,6 +1049,12 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
*/
|
||||
@Override
|
||||
public String notificationStopChargeResult(String orderCode) {
|
||||
|
||||
boolean needPushToThirdPartyPlatform = ThirdPartyPlatformUtils.isNeedPushToThirdPartyPlatform(orderCode , ThirdPlatformTypeEnum.JI_LIN_PLATFORM.getOperatorId());
|
||||
|
||||
if (!needPushToThirdPartyPlatform) {
|
||||
return null;
|
||||
}
|
||||
// 根据订单号查询订单信息
|
||||
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
|
||||
if (orderInfo == null) {
|
||||
@@ -1070,6 +1096,11 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
*/
|
||||
@Override
|
||||
public String notificationChargeOrderInfo(String orderCode) {
|
||||
boolean needPushToThirdPartyPlatform = ThirdPartyPlatformUtils.isNeedPushToThirdPartyPlatform(orderCode , ThirdPlatformTypeEnum.JI_LIN_PLATFORM.getOperatorId());
|
||||
|
||||
if (!needPushToThirdPartyPlatform) {
|
||||
return null;
|
||||
}
|
||||
// 根据订单号查询出信息
|
||||
OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
|
||||
OrderDetail orderDetail = orderBasicInfoService.getOrderDetailByOrderCode(orderCode);
|
||||
@@ -1285,7 +1316,11 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 推送站点统计信息 notification_station_stats_info
|
||||
* @param stationId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String notificationOperationStatsInfo(String stationId) {
|
||||
// 1. 获取统计时间范围(前一日的00:00:00至23:59:59)
|
||||
@@ -1499,7 +1534,7 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
supStationPowerInfo.setDataTime(dateTimeNow);
|
||||
supStationPowerInfo.setStationRealTimePower(stationPower);
|
||||
|
||||
|
||||
log.info("站点{}查询实时功率信息", stationId);
|
||||
// 根据站点id查询桩信息
|
||||
List<PileBasicInfo> pileList = pileBasicInfoService.getPileListByStationId(stationId);
|
||||
if (CollectionUtils.isEmpty(pileList)) {
|
||||
@@ -1561,17 +1596,17 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
list.add(supStationPowerInfo);
|
||||
}
|
||||
|
||||
log.info("推送充电站实时功率信息:{}", JSON.toJSONString(list));
|
||||
|
||||
// 获取推送配置密钥信息
|
||||
ThirdPartySecretInfoVO guiZhouPlatformSecretInfo = getJiLinSecretInfo();
|
||||
ThirdPartySecretInfoVO jiLinSecretInfo = getJiLinSecretInfo();
|
||||
|
||||
String operatorId = Constants.OPERATORID_JIANG_SU;
|
||||
String operatorSecret = guiZhouPlatformSecretInfo.getTheirOperatorSecret();
|
||||
String signSecret = guiZhouPlatformSecretInfo.getTheirSigSecret();
|
||||
String dataSecret = guiZhouPlatformSecretInfo.getTheirDataSecret();
|
||||
String dataSecretIv = guiZhouPlatformSecretInfo.getTheirDataSecretIv();
|
||||
String urlAddress = guiZhouPlatformSecretInfo.getTheirUrlPrefix();
|
||||
String operatorSecret = jiLinSecretInfo.getTheirOperatorSecret();
|
||||
String signSecret = jiLinSecretInfo.getTheirSigSecret();
|
||||
String dataSecret = jiLinSecretInfo.getTheirDataSecret();
|
||||
String dataSecretIv = jiLinSecretInfo.getTheirDataSecretIv();
|
||||
String urlAddress = jiLinSecretInfo.getTheirUrlPrefix();
|
||||
|
||||
log.info("吉林平台信息:{}" , jiLinSecretInfo.toString());
|
||||
|
||||
String url = urlAddress + "notification_realtime_power_info";
|
||||
// 获取令牌
|
||||
@@ -1579,6 +1614,8 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
if (StringUtils.isBlank(token)) {
|
||||
return null;
|
||||
}
|
||||
log.info("获取令牌成功:{}", token);
|
||||
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("StationPowerInfos", list);
|
||||
String jsonString = JSON.toJSONString(json);
|
||||
|
||||
Reference in New Issue
Block a user