mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-07 19:40:07 +08:00
add 新增首页查询抽成金额接口
This commit is contained in:
@@ -8,6 +8,7 @@ import com.jsowell.pile.service.OrderBasicInfoService;
|
||||
import com.jsowell.pile.service.PileBasicInfoService;
|
||||
import com.jsowell.pile.vo.web.IndexGeneralSituationVO;
|
||||
import com.jsowell.pile.vo.web.IndexOrderInfoVO;
|
||||
import com.jsowell.pile.vo.web.IndexPlatformProfitVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -67,5 +68,22 @@ public class indexController extends BaseController {
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询每天的平台抽成金额
|
||||
*/
|
||||
@PostMapping("/getPlatformProfit")
|
||||
public RestApiResponse<?> getPlatformProfit(@RequestBody IndexQueryDTO dto) {
|
||||
logger.info("查询每天平台抽成金额");
|
||||
RestApiResponse<?> response;
|
||||
try {
|
||||
List<IndexPlatformProfitVO> indexOrderInfo = orderBasicInfoService.getPlatformProfit(dto);
|
||||
response = new RestApiResponse<>(indexOrderInfo);
|
||||
} catch (Exception e) {
|
||||
logger.error("查询每天平台抽成金额 error!{}", e.getMessage());
|
||||
response = new RestApiResponse<>("00200003", "查询每天平台抽成金额错误");
|
||||
}
|
||||
logger.info("查询每天平台抽成金额 result:{}", JSON.toJSONString(response));
|
||||
return response;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,115 +1,14 @@
|
||||
002212025103006385110829739258861731840
|
||||
002212025103006420410829740069440344064
|
||||
002212025103006283610829736680488869888
|
||||
002212025103006425710829740292191461376
|
||||
002212025103006510810829742351670218752
|
||||
002212025103007033710829745495183630336
|
||||
002212025103007063710829746247075504128
|
||||
002212025103006563710829743729515831296
|
||||
002212025103007413510829755049850081280
|
||||
002212025103007563410829758817803067392
|
||||
002212025103008082610829761806802526208
|
||||
002212025103008172210829764053775060992
|
||||
002212025103008203310829764852630556672
|
||||
002212025103008451910829771085018189824
|
||||
002212025103008035210829760653620559872
|
||||
002212025103008341410829768296875573248
|
||||
002212025103008311510829767546581729280
|
||||
002212025103009050210829776049593528320
|
||||
002212025103009164510829778997153243136
|
||||
002212025103009035710829775774065516544
|
||||
002212025103010360110829798945569247232
|
||||
002212025103010515810829802958759043072
|
||||
002212025103011103310829807636007800832
|
||||
002212025103010574410829804408784429056
|
||||
002212025103010582310829804573683511296
|
||||
002212025103011425610829815784164724736
|
||||
002212025103011180610829809534907621376
|
||||
002212025103011365610829814275146399744
|
||||
002212025103011470410829816825962704896
|
||||
002212025103011360610829814064143540224
|
||||
002212025103012073410829821986152013824
|
||||
002212025103012135010829823562962882560
|
||||
002212025103012193410829825004519976960
|
||||
002212025103012155610829824090044268544
|
||||
002212025103011513610829817965404143616
|
||||
002212025103012015110829820544775245824
|
||||
002212025103012131210829823403176669184
|
||||
002212025103012244210829826297279942656
|
||||
002212025103012264910829826830690598912
|
||||
002212025103012040310829821101330010112
|
||||
002212025103012211610829825432771010560
|
||||
002212025103013020710829835714712981504
|
||||
002212025103013365010829844450793910272
|
||||
002212025103013402010829845328393326592
|
||||
002212025103013112910829838070657720320
|
||||
002212025103013285910829842473821278208
|
||||
002212025103013440410829846268496224256
|
||||
002212025103014092510829852649815199744
|
||||
002212025103013563610829849422885466112
|
||||
002212025103013551610829849089442476032
|
||||
002212025103014243010829856444506857472
|
||||
002212025103015193310829870297995173888
|
||||
002212025103014490310829862624188854272
|
||||
002212025103015283110829872556300709888
|
||||
002212025103015104910829868102130208768
|
||||
002212025103015322410829873531522555904
|
||||
002212025103015400910829875484096872448
|
||||
002212025103015373910829874852334063616
|
||||
002212025103015185110829870121872142336
|
||||
002212025103015321510829873494927257600
|
||||
002212025103015493310829877848140840960
|
||||
002212025103015453910829876868414316544
|
||||
002212025103016270310829887285895245824
|
||||
002212025103015542310829879064275103744
|
||||
002212025103016180910829885047130980352
|
||||
002212025103015552810829879337345245184
|
||||
002212025103015584410829880159063937024
|
||||
002212025103016133410829883893890314240
|
||||
002212025103015530310829878727686397952
|
||||
002212025103016065910829882235839979520
|
||||
002212025103016400410829890563055955968
|
||||
002212025103016161910829884583828180992
|
||||
002212025103016435610829891535513759744
|
||||
002212025103016012910829880851891654656
|
||||
002212025103016565310829894791719727104
|
||||
002212025103016214610829885954153402368
|
||||
002212025103016462710829892168778137600
|
||||
002212025103016344910829889242361917440
|
||||
002212025103017020210829896090116845568
|
||||
002212025103016381810829890116043845632
|
||||
002212025103017031210829896383655190528
|
||||
002212025103017061310829897141163270144
|
||||
002212025103016331610829888850093821952
|
||||
002212025103016583010829895201998127104
|
||||
002212025103016534510829894005275127808
|
||||
002212025103017021510829896145112584192
|
||||
002212025103018125410829913922095423488
|
||||
002212025103017521010829908704511303680
|
||||
002212025103018340010829919235288752128
|
||||
002212025103018222710829916327029686272
|
||||
002212025103018254710829917167106834432
|
||||
002212025103018390710829920523313364992
|
||||
002212025103018225010829916421820919808
|
||||
002212025103018482210829922848148996096
|
||||
002212025103018514710829923709067608064
|
||||
002212025103019265910829932569425784832
|
||||
002212025103018580410829925289510748160
|
||||
002212025103018462110829922341158285312
|
||||
002212025103019160110829929809535991808
|
||||
002212025103019390710829935620681240576
|
||||
002212025103019104710829928489152319488
|
||||
002212025103019282510829932928399466496
|
||||
002212025103019303610829933476599201792
|
||||
002212025103018585710829925514170220544
|
||||
002212025103018525910829924010419957760
|
||||
002212025103019402010829935928731922432
|
||||
002212025103019383110829935469262696448
|
||||
002212025103019264710829932515713507328
|
||||
002212025103020043210829942017250721792
|
||||
002212025103020481810829953033279811584
|
||||
002212025103021045210829957200211787776
|
||||
002212025103021125110829959211212742656
|
||||
002212025103021572010829970406447652864
|
||||
002212025103022020110829971581943312384
|
||||
002212025103021454810829967501485281280
|
||||
002212025060310590410775808955660226560
|
||||
002212025060209335010775425114719989760
|
||||
002212025060119145310775208954038964224
|
||||
002212025052308545110771791425828184064
|
||||
002212025060408400910776136380814315520
|
||||
002212025060113395910775124672697036800
|
||||
002212025053010191210774349368864821248
|
||||
002212025060809394310777600925872390144
|
||||
002212025053022491710774538136450727936
|
||||
002212025061217110110779164047563894784
|
||||
002212025060123174410775270071608823808
|
||||
002212025060312255210775830799009579008
|
||||
002212025052016133710770814683822862336
|
||||
002212025051612530210769314653202984960
|
||||
@@ -431,4 +431,10 @@ public interface OrderBasicInfoMapper {
|
||||
@Param("endTime") String endTime
|
||||
);
|
||||
|
||||
/**
|
||||
* 查询平台抽成收入
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<IndexPlatformProfitVO> getPlatformProfit(IndexQueryDTO dto);
|
||||
}
|
||||
|
||||
@@ -631,4 +631,11 @@ public interface OrderBasicInfoService{
|
||||
* @return
|
||||
*/
|
||||
List<BusinessOrderDetailInfoVO> getOrderDetailByStationIdsForMonth(List<String> stationIds , String startTime , String endTime);
|
||||
|
||||
/**
|
||||
* 获取平台抽成金额
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<IndexPlatformProfitVO> getPlatformProfit(IndexQueryDTO dto);
|
||||
}
|
||||
|
||||
@@ -5939,5 +5939,15 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
||||
public List<BusinessOrderDetailInfoVO> getOrderDetailByStationIdsForMonth(List<String> stationIds , String startTime , String endTime) {
|
||||
return orderBasicInfoMapper.getOrderDetailByStationIdsForMonth(stationIds, startTime, endTime);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询平台抽成金额
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<IndexPlatformProfitVO> getPlatformProfit(IndexQueryDTO dto) {
|
||||
return orderBasicInfoMapper.getPlatformProfit(dto);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ public class YKCPushCommandServiceImpl implements YKCPushCommandService {
|
||||
@DubboReference
|
||||
private JcppService jcppService;
|
||||
|
||||
// 引入线程池
|
||||
// 引入线程池s
|
||||
private ThreadPoolTaskExecutor executor = SpringUtils.getBean("threadPoolTaskExecutor");
|
||||
|
||||
// 需要记录报文的数据帧类型
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.jsowell.pile.vo.web;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 平台抽成信息VO
|
||||
*/
|
||||
@Data
|
||||
public class IndexPlatformProfitVO {
|
||||
|
||||
/**
|
||||
* 充电次数
|
||||
*/
|
||||
private String chargeTimes;
|
||||
|
||||
/**
|
||||
* 交易日期
|
||||
*/
|
||||
private String tradeDate;
|
||||
|
||||
/**
|
||||
* adapay会员ID
|
||||
*/
|
||||
private String adapayMemberId;
|
||||
|
||||
/**
|
||||
* 电量金额
|
||||
*/
|
||||
private String electricityAmount;
|
||||
|
||||
/**
|
||||
* 服务费金额
|
||||
*/
|
||||
private String serviceAmount;
|
||||
|
||||
/**
|
||||
* 结算金额
|
||||
*/
|
||||
private String settleAmount;
|
||||
|
||||
/**
|
||||
* 电费抽成金额
|
||||
*/
|
||||
private String electricitySplitAmount;
|
||||
|
||||
/**
|
||||
* 服务费抽成金额
|
||||
*/
|
||||
private String serviceSplitAmount;
|
||||
|
||||
/**
|
||||
* 总抽成金额
|
||||
*/
|
||||
private String totalSplitAmount;
|
||||
}
|
||||
@@ -3451,4 +3451,27 @@
|
||||
AND DATE_ADD(#{endTime,jdbcType=VARCHAR}, INTERVAL 1 DAY)
|
||||
ORDER BY t1.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="getPlatformProfit" resultType="com.jsowell.pile.vo.web.IndexPlatformProfitVO">
|
||||
select
|
||||
count(DISTINCT(`order_code` ) ) as chargeTimes,
|
||||
trade_date as tradeDate,
|
||||
-- station_name as '站点名称',
|
||||
adapay_member_id as adapayMemberId,
|
||||
sum(`electricity_amount` ) as electricityAmount,
|
||||
sum(`service_amount` ) as serviceAmount,
|
||||
sum(`settle_amount` ) as settleAmount,
|
||||
sum(electricity_split_amount) as electricitySplitAmount,
|
||||
sum(service_split_amount) as serviceSplitAmount,
|
||||
sum(electricity_split_amount + service_split_amount) as totalSplitAmount
|
||||
from
|
||||
`order_split_record`
|
||||
WHERE
|
||||
`trade_date` BETWEEN #{startTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
|
||||
and `adapay_member_id` = '0'
|
||||
and `electricity_split_ratio` = '2'
|
||||
and `del_flag` = '0'
|
||||
group by
|
||||
`trade_date`
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user