Pu Zhibing
2024-11-01 0c4519d52a0bb7f831b8a5545cb49702213b4a4c
Merge remote-tracking branch 'origin/master'
8个文件已修改
58 ■■■■ 已修改文件
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/model/TChargingOrder.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/vo/AccountListVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TApplyChargingPileController.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TAccountingStrategyDetailServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-chargingPile/src/main/resources/template/账户结算账单.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingBillServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TSettlementConfirmMapper.xml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/model/TChargingOrder.java
@@ -232,6 +232,9 @@
    @ApiModelProperty(value = "支付方式")
    @TableField(exist = false)
    private String rechargePaymentType1;
    @ApiModelProperty(value = "支付平台")
    @TableField(exist = false)
    private String payPlatform;
    @ApiModelProperty(value = "充电启动方式")
    @TableField(exist = false)
    private String chargingType;
@@ -244,6 +247,9 @@
    @ApiModelProperty(value = "充电费用")
    @TableField(exist = false)
    private String totalAmount;
    @ApiModelProperty(value = "合计")
    @TableField(exist = false)
    private BigDecimal total;
    @ApiModelProperty(value = "优惠抵扣")
    @TableField(exist = false)
    private String discount;
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/vo/AccountListVO.java
@@ -2,6 +2,7 @@
import com.ruoyi.common.core.web.page.PageInfo;
import com.ruoyi.order.api.model.TChargingBill;
import com.ruoyi.order.api.model.TChargingOrder;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -27,5 +28,7 @@
    private BigDecimal sharingAmount;
    @ApiModelProperty(value = "列表数据")
    private PageInfo<ChargingBillListVO> list;
    @ApiModelProperty(value = "导出数据")
    private List<TChargingOrder> orderList;
}
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TApplyChargingPileController.java
@@ -101,6 +101,7 @@
    @Resource
    private AppUserCarClient appUserCarClient;
    @Autowired
    public TApplyChargingPileController(TApplyChargingPileService applyChargingPileService, TokenService tokenService, RedisService redisService) {
        this.applyChargingPileService = applyChargingPileService;
@@ -314,6 +315,28 @@
    {   dto.setPageCurr(1);
        dto.setPageSize(99999999);
        AccountListVO data = orderClient.accountBillList(dto).getData();
        List<TChargingOrder> collect = data.getOrderList().stream().distinct().collect(Collectors.toList());
        int i = 1;
        BigDecimal bigDecimal = new BigDecimal("0");
        for (TChargingOrder chargingOrder : collect) {
            bigDecimal = bigDecimal.add(chargingOrder.getPaymentAmount());
            if (chargingOrder.getRechargePaymentType()!=null){
                switch (chargingOrder.getRechargePaymentType()){
                    case 1:
                        chargingOrder.setPayPlatform("微信");
                        chargingOrder.setRechargePaymentType1("微信小程序支付");
                        break;
                    case 2:
                        chargingOrder.setPayPlatform("支付宝");
                        chargingOrder.setRechargePaymentType1("支付宝小程序支付");
                        break;
                }
            }
            chargingOrder.setXuhao(i);
            i++;
        }
        collect.get(0).setTotal(bigDecimal);
        try {
            response.setCharacterEncoding(Constants.UTF8);
            response.setContentType("application/vnd.ms-excel");
@@ -331,7 +354,7 @@
            try (ExcelWriter excelWriter = excelWriterBuilder.withTemplate(stream).build()) {
                WriteSheet writeSheet = EasyExcel.writerSheet().build();
                FillConfig fillConfig = FillConfig.builder().direction(WriteDirectionEnum.VERTICAL).build();
                excelWriter.fill(new FillWrapper("data1", data.getList().getRecords()), fillConfig, writeSheet);
                excelWriter.fill(new FillWrapper("data1", collect), fillConfig, writeSheet);
                excelWriter.finish();
            } catch (Exception e) {
                return R.fail("excel导出失败!");
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TAccountingStrategyDetailServiceImpl.java
@@ -62,7 +62,7 @@
    @Override
    public List<TAccountingStrategyDetailVO> queryAccountingStrategyDetailByStrategyId(Integer strategyId) {
        List<TAccountingStrategyDetailVO> tAccountingStrategyDetailVOS = this.baseMapper.queryAccountingStrategyDetailByStrategyId(strategyId);
        Long userId = tokenService.getLoginUserApplet().getUserId();
        Long userId = tokenService.getLoginUser().getUserid();
        TAppUser appUser = appUserClient.getUserById(userId).getData();
        for (TAccountingStrategyDetailVO tAccountingStrategyDetailVO : tAccountingStrategyDetailVOS) {
            GetAppUserVipDetail getAppUserVipDetail = new GetAppUserVipDetail();
ruoyi-service/ruoyi-chargingPile/src/main/resources/template/账户结算账单.xlsx
Binary files differ
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingBillServiceImpl.java
@@ -37,6 +37,7 @@
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.temporal.TemporalAdjusters;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -77,6 +78,8 @@
            }
        }
        ChargingBillVO chargingBillVO = new ChargingBillVO();
        List<TChargingOrder> exports = new ArrayList<>();
        String startTime1 = null;
        String startTime2 = null;
        if (StringUtils.hasLength(dto.getStartTime())){
@@ -299,6 +302,7 @@
                }
            }
            exports.addAll(tChargingOrders);
            // 将chargingSecond 这是以秒为单位存放的总秒数 将其转化为xx小时xx分钟xx秒
            int hours = chargingSecond / 3600;
            int minutes = (chargingSecond % 3600) / 60;
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java
@@ -1441,7 +1441,6 @@
            if (chargingOrderListVO.getCode()!=null){
                List<UploadRealTimeMonitoringData> data6 = uploadRealTimeMonitoringDataClient.getDataByOrderCode(chargingOrderListVO.getCode()).getData();
            if (data6!=null && !data6.isEmpty()){
                    // 第一条数据soc为开始 最后一条数据soc为结束soc
                    chargingOrderListVO.setEndSoc(data6.get(0).getSoc().toString());
                    chargingOrderListVO.setStartSoc(data6.get(data6.size()-1).getSoc().toString());
                }
@@ -2624,8 +2623,9 @@
            tSettlementConfirm.setDistribution(dto.getDistribution());
            tSettlementConfirm.setIncome(dto.getElectrovalence().add(dto.getServiceCharge()));
            tSettlementConfirm.setCost(dto.getVenue().add(dto.getClean()).add(dto.getMaintain()).add(dto.getSupplyElectronic()));
            tSettlementConfirm.setProfitMoney(tSettlementConfirm.getElectrovalence().add(tSettlementConfirm.getServiceCharge())
                    .subtract(tSettlementConfirm.getCost()));
            BigDecimal divide1 = tSettlementConfirm.getProportionMoney().divide(tSettlementConfirm.getProportionPartner(), 2, RoundingMode.HALF_DOWN);
            tSettlementConfirm.setProfitMoney(tSettlementConfirm.getServiceCharge().multiply(tSettlementConfirm.getServicePartner())
                    .subtract(divide1));
            tSettlementConfirm.setNewSettlement(subtract2.subtract(tSettlementConfirm.getCost()));
            tSettlementConfirmMapper.insert(tSettlementConfirm);
ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TSettlementConfirmMapper.xml
@@ -10,9 +10,9 @@
        </if>
    </select>
    <select id="settlementList" resultType="com.ruoyi.order.api.model.TSettlementConfirm">
select t1.* from
                t_settlement_confirm t1
where 1=1
        select t1.* from
            t_settlement_confirm t1
        where 1=1
        <if test="req.partnerId != null ">
            and t1.partner_id = #{req.partnerId}
        </if>
@@ -21,14 +21,14 @@
        </if>
        <if test="req.type == 1 ">
            <if test="req.startTime != null and req.startTime!=''">
                and (t1.start_time between #{req.startTime} and #{req.endTime}
                and (t1.start_time between #{req.startTime} and #{req.endTime})
            </if>
        </if>
        <if test="req.type == 2 ">
            <if test="req.startTime != null and req.startTime!=''">
                and (t1.end_time between #{req.startTime} and #{req.endTime}
                and (t1.end_time between #{req.startTime} and #{req.endTime})
            </if>
        </if>
    and t1.del_flag = 0
        and t1.del_flag = 0
    </select>
</mapper>