10 changed files with 900 additions and 0 deletions
@ -0,0 +1,53 @@ |
|||||
|
package com.qs.serve.modules.bir.controller; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.qs.serve.common.model.annotation.RepeatSubmit; |
||||
|
import com.qs.serve.common.model.dto.PageVo; |
||||
|
import com.qs.serve.common.model.dto.R; |
||||
|
import com.qs.serve.common.util.Assert; |
||||
|
import com.qs.serve.common.util.PageUtil; |
||||
|
import com.qs.serve.common.util.StringUtils; |
||||
|
import com.qs.serve.modules.bir.entity.dto.BirTbsVtbPayJoinDTO; |
||||
|
import com.qs.serve.modules.bir.entity.so.BirCostRoiSo; |
||||
|
import com.qs.serve.modules.bir.entity.so.BirTbsVtbPayJoinSo; |
||||
|
import com.qs.serve.modules.bir.entity.vo.BirAccountReportVo; |
||||
|
import com.qs.serve.modules.bir.entity.vo.BirRoiCostItemVo; |
||||
|
import com.qs.serve.modules.bir.entity.vo.BirRoiVo; |
||||
|
import com.qs.serve.modules.bir.service.*; |
||||
|
import com.qs.serve.modules.sys.entity.SysDictData; |
||||
|
import com.qs.serve.modules.sys.service.SysDictDataService; |
||||
|
import com.qs.serve.modules.tbs.common.TbsCenterType; |
||||
|
import com.qs.serve.modules.tbs.entity.dto.TbsCostSubItem; |
||||
|
import com.qs.serve.modules.tbs.service.TbsBudgetService; |
||||
|
import com.qs.serve.modules.vtb.entity.VtbVerification; |
||||
|
import com.qs.serve.modules.vtb.entity.dto.VtbActivityCheckDTO; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* BI报表 ROI费率 |
||||
|
* @author YenHex |
||||
|
* @since 2023-06-05 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@AllArgsConstructor |
||||
|
@RestController |
||||
|
@RequestMapping("bir/tbsVtbPayJoin") |
||||
|
public class BirTbsVtbPayJoinController { |
||||
|
|
||||
|
private BirTbsVtbPayJoinService birTbsVtbPayJoinService; |
||||
|
|
||||
|
@GetMapping("/page") |
||||
|
public R<PageVo<BirTbsVtbPayJoinDTO>> page(BirTbsVtbPayJoinSo so){ |
||||
|
List<BirTbsVtbPayJoinDTO> list = birTbsVtbPayJoinService.selectBirTbsVtbPayJoinDTO(so); |
||||
|
return R.byPageHelperList(list); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,33 @@ |
|||||
|
package com.qs.serve.modules.bir.entity.dto; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
/** |
||||
|
* 活动的核销情况 |
||||
|
* @author YenHex |
||||
|
* @since 2023/9/4 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class BirPayJoinDTO { |
||||
|
|
||||
|
|
||||
|
private Long vtbId; |
||||
|
|
||||
|
private Long payId; |
||||
|
|
||||
|
private String payCode; |
||||
|
|
||||
|
private BigDecimal payAmount; |
||||
|
|
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime payDate; |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,115 @@ |
|||||
|
package com.qs.serve.modules.bir.entity.dto; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.time.LocalDateTime; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 活动的核销情况 |
||||
|
* @author YenHex |
||||
|
* @since 2023/9/4 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class BirTbsVtbPayJoinDTO { |
||||
|
|
||||
|
private Long costApplyId; |
||||
|
|
||||
|
/** 费用编码 */ |
||||
|
private String costApplyCode; |
||||
|
|
||||
|
private String costTitle; |
||||
|
|
||||
|
/** 客户id */ |
||||
|
private String supplierId; |
||||
|
|
||||
|
private String supplierCode; |
||||
|
|
||||
|
private String supplierName; |
||||
|
|
||||
|
private String userCode; |
||||
|
|
||||
|
private String userName; |
||||
|
|
||||
|
private Integer chargeState; |
||||
|
|
||||
|
/** 提交实际 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime submitTime; |
||||
|
|
||||
|
/** 提交实际 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime passTime; |
||||
|
|
||||
|
private Long activityId; |
||||
|
/** 活动编码 */ |
||||
|
private String activityCode; |
||||
|
|
||||
|
private String activityTitle; |
||||
|
|
||||
|
/** 提交实际 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime actStartDate; |
||||
|
|
||||
|
/** 提交实际 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime actEndDate; |
||||
|
|
||||
|
|
||||
|
private BigDecimal activityAmount; |
||||
|
|
||||
|
/** 核销金额 */ |
||||
|
private BigDecimal checkedAmount; |
||||
|
|
||||
|
/** 核销金额 */ |
||||
|
private BigDecimal checkingAmount; |
||||
|
|
||||
|
/** 释放金额 */ |
||||
|
private BigDecimal releaseAmount; |
||||
|
|
||||
|
private BigDecimal unCheckAmount; |
||||
|
|
||||
|
private BigDecimal payedAmount; |
||||
|
|
||||
|
private BigDecimal unpayAmount; |
||||
|
|
||||
|
private BigDecimal notPayAmount; |
||||
|
|
||||
|
private Long vtbId; |
||||
|
|
||||
|
private String vtbCode; |
||||
|
|
||||
|
private String checkUserCode; |
||||
|
|
||||
|
private String checkUserName; |
||||
|
|
||||
|
private BigDecimal vtbAmount; |
||||
|
|
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime vtbSubmitDate; |
||||
|
|
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime vtbFinishDate; |
||||
|
|
||||
|
private Long payId; |
||||
|
|
||||
|
private String payCode; |
||||
|
|
||||
|
private BigDecimal payAmount; |
||||
|
|
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime payDate; |
||||
|
|
||||
|
private List<BirVtbPayJoinDTO> birVtbPayJoinDTOList; |
||||
|
|
||||
|
} |
@ -0,0 +1,41 @@ |
|||||
|
package com.qs.serve.modules.bir.entity.dto; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.time.LocalDateTime; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 活动的核销情况 |
||||
|
* @author YenHex |
||||
|
* @since 2023/9/4 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class BirVtbPayJoinDTO { |
||||
|
|
||||
|
private Long vtbId; |
||||
|
|
||||
|
private Long activityId; |
||||
|
|
||||
|
private String vtbCode; |
||||
|
|
||||
|
private String checkUserCode; |
||||
|
|
||||
|
private String checkUserName; |
||||
|
|
||||
|
private BigDecimal vtbAmount; |
||||
|
|
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime vtbSubmitDate; |
||||
|
|
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime vtbFinishDate; |
||||
|
|
||||
|
private List<BirPayJoinDTO> payJoinDTOList; |
||||
|
|
||||
|
} |
@ -0,0 +1,136 @@ |
|||||
|
package com.qs.serve.modules.bir.entity.so; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import java.time.LocalDateTime; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 活动的核销情况 |
||||
|
* @author YenHex |
||||
|
* @since 2023/9/4 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class BirTbsVtbPayJoinSo { |
||||
|
|
||||
|
/** 费用编码 */ |
||||
|
private String costApplyCode; |
||||
|
|
||||
|
private String costTitle; |
||||
|
|
||||
|
/** 客户 */ |
||||
|
private String supplierCode; |
||||
|
|
||||
|
private String supplierName; |
||||
|
|
||||
|
/** 活动编码 */ |
||||
|
private String activityCode; |
||||
|
|
||||
|
private String activityTitle; |
||||
|
|
||||
|
private String userCode; |
||||
|
|
||||
|
private String userName; |
||||
|
|
||||
|
private Integer costApplyState; |
||||
|
/** 核销状态 */ |
||||
|
private Integer verificationState; |
||||
|
|
||||
|
private String vtbCode; |
||||
|
|
||||
|
private String checkUserCode; |
||||
|
|
||||
|
private String checkUserName; |
||||
|
|
||||
|
private String payCode; |
||||
|
|
||||
|
/** 提交开始时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime queryStartSubmitTime; |
||||
|
|
||||
|
/** 提交结束时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime queryEndSubmitTime; |
||||
|
|
||||
|
/** 过审开始时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime queryStartFinishTime; |
||||
|
|
||||
|
/** 过审结束时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime queryEndFinishTime; |
||||
|
|
||||
|
|
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime queryStartActivityStartTime; |
||||
|
|
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime queryEndActivityStartTime; |
||||
|
|
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime queryStartActivityEndTime; |
||||
|
|
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime queryEndActivityEndTime; |
||||
|
|
||||
|
|
||||
|
/** 核销开始时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime queryStartCheckTime; |
||||
|
|
||||
|
/** 核销开始时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime queryEndCheckTime; |
||||
|
|
||||
|
/** 核销完成时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime queryStartFinishCheckTime; |
||||
|
|
||||
|
/** 核销完成时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime queryEndFinishCheckTime; |
||||
|
|
||||
|
|
||||
|
|
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime queryStartPayTime; |
||||
|
|
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime queryEndPayTime; |
||||
|
|
||||
|
private Integer onlyAct; |
||||
|
|
||||
|
private List<Long> actIds; |
||||
|
|
||||
|
// a.submit_time as submit_time,
|
||||
|
// a.pass_time as pass_time,
|
||||
|
//
|
||||
|
// act.act_start_date as act_start_date,
|
||||
|
// act.act_end_date as act_end_date,
|
||||
|
//
|
||||
|
// v.create_time as vtb_submit_date,
|
||||
|
// v.finished_time as vtb_finish_date,
|
||||
|
//
|
||||
|
// p.item_pay_amount as pay_amount,
|
||||
|
// p.pay_time as pay_date
|
||||
|
private String orderProp; |
||||
|
|
||||
|
private String orderType; |
||||
|
|
||||
|
} |
@ -0,0 +1,27 @@ |
|||||
|
package com.qs.serve.modules.bir.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.qs.serve.modules.bir.entity.BirBaseActivity; |
||||
|
import com.qs.serve.modules.bir.entity.dto.BirTbsVtbPayJoinDTO; |
||||
|
import com.qs.serve.modules.bir.entity.so.BirTbsVtbPayJoinSo; |
||||
|
import com.qs.serve.modules.tbs.entity.TbsActivity; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.time.LocalDate; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* ROI费率(活动档案) Mapper |
||||
|
* @author YenHex |
||||
|
* @date 2023-06-05 |
||||
|
*/ |
||||
|
public interface BirTbsVtbPayJoinMapper extends BaseMapper<BirTbsVtbPayJoinDTO> { |
||||
|
|
||||
|
List<BirTbsVtbPayJoinDTO> selectBirTbsVtbPayJoinDTO(@Param("query") BirTbsVtbPayJoinSo so); |
||||
|
|
||||
|
List<BirTbsVtbPayJoinDTO> selectSumVtbAmount(@Param("actIds") List<Long> actIds); |
||||
|
|
||||
|
List<BirTbsVtbPayJoinDTO> selectSumPayAmount(@Param("actIds") List<Long> actIds); |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,21 @@ |
|||||
|
package com.qs.serve.modules.bir.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.qs.serve.modules.bir.entity.BirBaseActivity; |
||||
|
import com.qs.serve.modules.bir.entity.dto.BirTbsVtbPayJoinDTO; |
||||
|
import com.qs.serve.modules.bir.entity.so.BirTbsVtbPayJoinSo; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* ROI费率(活动档案) 服务接口 |
||||
|
* @author YenHex |
||||
|
* @date 2023-06-05 |
||||
|
*/ |
||||
|
public interface BirTbsVtbPayJoinService extends IService<BirTbsVtbPayJoinDTO> { |
||||
|
|
||||
|
List<BirTbsVtbPayJoinDTO> findPage(BirTbsVtbPayJoinSo so); |
||||
|
|
||||
|
List<BirTbsVtbPayJoinDTO> selectBirTbsVtbPayJoinDTO(BirTbsVtbPayJoinSo so); |
||||
|
} |
||||
|
|
@ -0,0 +1,279 @@ |
|||||
|
package com.qs.serve.modules.bir.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.qs.serve.common.model.dto.DateSplitDTO; |
||||
|
import com.qs.serve.common.model.dto.PageVo; |
||||
|
import com.qs.serve.common.model.dto.R; |
||||
|
import com.qs.serve.common.util.*; |
||||
|
import com.qs.serve.modules.bir.entity.BirBaseActivity; |
||||
|
import com.qs.serve.modules.bir.entity.dto.BirPayJoinDTO; |
||||
|
import com.qs.serve.modules.bir.entity.dto.BirTbsVtbPayJoinDTO; |
||||
|
import com.qs.serve.modules.bir.entity.dto.BirVtbPayJoinDTO; |
||||
|
import com.qs.serve.modules.bir.entity.so.BirTbsVtbPayJoinSo; |
||||
|
import com.qs.serve.modules.bir.mapper.BirBaseActivityMapper; |
||||
|
import com.qs.serve.modules.bir.mapper.BirTbsVtbPayJoinMapper; |
||||
|
import com.qs.serve.modules.bir.service.BirBaseActivityService; |
||||
|
import com.qs.serve.modules.bir.service.BirTbsVtbPayJoinService; |
||||
|
import com.qs.serve.modules.pay.entity.PayPayment; |
||||
|
import com.qs.serve.modules.pay.entity.PayPaymentItem; |
||||
|
import com.qs.serve.modules.pay.service.PayPaymentItemService; |
||||
|
import com.qs.serve.modules.pay.service.PayPaymentService; |
||||
|
import com.qs.serve.modules.tbs.entity.TbsActivity; |
||||
|
import com.qs.serve.modules.tbs.entity.TbsCostApply; |
||||
|
import com.qs.serve.modules.tbs.mapper.TbsActivityMapper; |
||||
|
import com.qs.serve.modules.tbs.mapper.TbsCostApplyMapper; |
||||
|
import com.qs.serve.modules.tbs.service.TbsActivityService; |
||||
|
import com.qs.serve.modules.tbs.service.TbsCostApplyService; |
||||
|
import com.qs.serve.modules.vtb.entity.VtbVerification; |
||||
|
import com.qs.serve.modules.vtb.service.VtbVerificationService; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.math.RoundingMode; |
||||
|
import java.time.LocalDate; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
import java.util.Optional; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
/** |
||||
|
* ROI费率(活动档案) 服务实现类 |
||||
|
* @author YenHex |
||||
|
* @since 2023-06-05 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Service |
||||
|
@AllArgsConstructor |
||||
|
public class BirTbsVtbPayJoinServiceImpl extends ServiceImpl<BirTbsVtbPayJoinMapper, BirTbsVtbPayJoinDTO> implements BirTbsVtbPayJoinService { |
||||
|
@Autowired |
||||
|
private PayPaymentService payPaymentService; |
||||
|
@Autowired |
||||
|
private PayPaymentItemService payPaymentItemService; |
||||
|
@Autowired |
||||
|
private VtbVerificationService verificationService; |
||||
|
@Autowired |
||||
|
private TbsActivityService activityService; |
||||
|
@Autowired |
||||
|
private TbsCostApplyService costApplyService; |
||||
|
|
||||
|
@Override |
||||
|
public List<BirTbsVtbPayJoinDTO> selectBirTbsVtbPayJoinDTO(BirTbsVtbPayJoinSo so){ |
||||
|
PageUtil.startPage(); |
||||
|
so.setOnlyAct(1); |
||||
|
List<BirTbsVtbPayJoinDTO> costApplyList = this.baseMapper.selectBirTbsVtbPayJoinDTO(so); |
||||
|
List<Long> actIds = costApplyList.stream().map(a->a.getActivityId()).collect(Collectors.toList()); |
||||
|
if(actIds.size()==0){ |
||||
|
return new ArrayList<>(); |
||||
|
} |
||||
|
so.setOnlyAct(null); |
||||
|
so.setActIds(actIds); |
||||
|
List<BirTbsVtbPayJoinDTO> dtoList = this.baseMapper.selectBirTbsVtbPayJoinDTO(so); |
||||
|
|
||||
|
List<BirTbsVtbPayJoinDTO> actDtoList = dtoList.stream().collect(Collectors.groupingBy(BirTbsVtbPayJoinDTO::getActivityId)) |
||||
|
.values() |
||||
|
.stream() |
||||
|
.flatMap(List::stream) |
||||
|
.collect(Collectors.toList()); |
||||
|
|
||||
|
List<BirVtbPayJoinDTO> vtbDtoList = dtoList.stream().filter(a->a.getVtbId()!=null).collect(Collectors.groupingBy(BirTbsVtbPayJoinDTO::getVtbId)) |
||||
|
.values() |
||||
|
.stream() |
||||
|
.flatMap(List::stream).map(a->{ |
||||
|
BirVtbPayJoinDTO dto = new BirVtbPayJoinDTO(); |
||||
|
CopierUtil.copy(a,dto); |
||||
|
return dto; |
||||
|
}) |
||||
|
.collect(Collectors.toList()); |
||||
|
|
||||
|
|
||||
|
List<BirPayJoinDTO> payDtoList = dtoList.stream().filter(a->a.getPayId()!=null).collect(Collectors.groupingBy(BirTbsVtbPayJoinDTO::getPayId)) |
||||
|
.values() |
||||
|
.stream() |
||||
|
.flatMap(List::stream).map(a->{ |
||||
|
BirPayJoinDTO dto = new BirPayJoinDTO(); |
||||
|
CopierUtil.copy(a,dto); |
||||
|
return dto; |
||||
|
}) |
||||
|
.collect(Collectors.toList()); |
||||
|
|
||||
|
List<BirVtbPayJoinDTO> vtbDtoChirlList = vtbDtoList.stream().map(vtb->{ |
||||
|
List<BirPayJoinDTO> payList = payDtoList.stream().filter(pay->pay.getVtbId().equals(vtb.getVtbId())).collect(Collectors.toList()); |
||||
|
vtb.setPayJoinDTOList(payList); |
||||
|
return vtb; |
||||
|
}).collect(Collectors.toList()); |
||||
|
|
||||
|
List<BirTbsVtbPayJoinDTO> sumVtbAmountList = actIds.size()>0?this.baseMapper.selectSumVtbAmount(actIds):new ArrayList<>(); |
||||
|
|
||||
|
List<BirTbsVtbPayJoinDTO> sumPayAmountList = actIds.size()>0?this.baseMapper.selectSumPayAmount(actIds):new ArrayList<>(); |
||||
|
|
||||
|
List<BirTbsVtbPayJoinDTO> returnActDtoList = actDtoList.stream().map(act->{ |
||||
|
List<BirVtbPayJoinDTO> vtbList = vtbDtoChirlList.stream().filter(vtb->vtb.getActivityId().equals(act.getActivityId())).collect(Collectors.toList()); |
||||
|
act.setBirVtbPayJoinDTOList(vtbList); |
||||
|
|
||||
|
|
||||
|
Optional<BirTbsVtbPayJoinDTO> sumVtbAmountMatch = sumVtbAmountList.stream() |
||||
|
.filter(a->a.getActivityId().equals(act.getActivityId())) |
||||
|
.findFirst(); |
||||
|
|
||||
|
if (sumVtbAmountMatch.isPresent()) { |
||||
|
act.setCheckedAmount(sumVtbAmountMatch.get().getCheckedAmount()); |
||||
|
act.setCheckingAmount(sumVtbAmountMatch.get().getCheckingAmount()); |
||||
|
}else{ |
||||
|
act.setCheckedAmount(BigDecimal.ZERO); |
||||
|
act.setCheckingAmount(BigDecimal.ZERO); |
||||
|
} |
||||
|
|
||||
|
Optional<BirTbsVtbPayJoinDTO> sumPayAmountMatch = sumPayAmountList.stream() |
||||
|
.filter(a->a.getActivityId().equals(act.getActivityId())) |
||||
|
.findFirst(); |
||||
|
|
||||
|
if (sumPayAmountMatch.isPresent()) { |
||||
|
act.setPayedAmount(sumPayAmountMatch.get().getPayedAmount()); |
||||
|
act.setNotPayAmount(sumPayAmountMatch.get().getNotPayAmount()); |
||||
|
}else{ |
||||
|
act.setPayedAmount(BigDecimal.ZERO); |
||||
|
act.setNotPayAmount(BigDecimal.ZERO); |
||||
|
} |
||||
|
|
||||
|
if(act.getReleaseAmount()==null){ |
||||
|
act.setReleaseAmount(BigDecimal.ZERO); |
||||
|
} |
||||
|
|
||||
|
act.setUnCheckAmount(act.getActivityAmount().subtract(act.getCheckedAmount()).subtract(act.getCheckingAmount()).subtract(act.getReleaseAmount())); |
||||
|
act.setUnpayAmount(act.getCheckedAmount().subtract(act.getPayedAmount())); |
||||
|
|
||||
|
return act; |
||||
|
}).collect(Collectors.toList()); |
||||
|
|
||||
|
return returnActDtoList; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<BirTbsVtbPayJoinDTO> findPage(BirTbsVtbPayJoinSo so) { |
||||
|
List<Long> pay4VtbIds = null; |
||||
|
List<Long> vtb4ActIds = null; |
||||
|
List<Long> act4ApplyIds = null; |
||||
|
List<Long> applyIds = new ArrayList<>(); |
||||
|
|
||||
|
if(so.getQueryStartPayTime()!=null || so.getQueryEndPayTime()!=null || so.getPayCode()!=null){ |
||||
|
LambdaQueryWrapper<PayPayment> lqwPay = new LambdaQueryWrapper<>(); |
||||
|
lqwPay.select(PayPayment::getId); |
||||
|
lqwPay.like(PayPayment::getPayCode,so.getPayCode()); |
||||
|
lqwPay.ge(PayPayment::getPayTime,so.getQueryStartPayTime()); |
||||
|
lqwPay.le(PayPayment::getPayTime,so.getQueryEndPayTime()); |
||||
|
List<PayPayment> payPaymentList = payPaymentService.list(lqwPay); |
||||
|
List<Long> payIds = payPaymentList.stream().map(a->a.getId()).collect(Collectors.toList()); |
||||
|
|
||||
|
LambdaQueryWrapper<PayPaymentItem> lqwPayItem = new LambdaQueryWrapper<>(); |
||||
|
lqwPayItem.in(PayPaymentItem::getPaymentId,payIds); |
||||
|
List<PayPaymentItem> payPaymentItemList = payPaymentItemService.list(lqwPayItem); |
||||
|
pay4VtbIds = payPaymentItemList.stream().map(a->a.getVerificationId()).distinct().collect(Collectors.toList()); |
||||
|
} |
||||
|
|
||||
|
if(so.getVerificationState()!=null || so.getVtbCode()!=null |
||||
|
|| so.getQueryStartCheckTime()!=null || so.getQueryEndCheckTime()!= null |
||||
|
|| so.getQueryStartFinishCheckTime()!=null || so.getQueryEndFinishCheckTime()!=null |
||||
|
|| so.getCheckUserName()!=null || so.getCheckUserCode()!= null){ |
||||
|
LambdaQueryWrapper<VtbVerification> lqwVtb = new LambdaQueryWrapper<>(); |
||||
|
lqwVtb.eq(VtbVerification::getVerificationState,so.getVerificationState()); |
||||
|
lqwVtb.like(VtbVerification::getVerificationCode,so.getVtbCode()); |
||||
|
lqwVtb.like(VtbVerification::getUserCode,so.getCheckUserCode()); |
||||
|
lqwVtb.like(VtbVerification::getUserName,so.getCheckUserName()); |
||||
|
lqwVtb.ge(VtbVerification::getFinishedTime,so.getQueryStartFinishCheckTime()); |
||||
|
lqwVtb.le(VtbVerification::getFinishedTime,so.getQueryEndFinishCheckTime()); |
||||
|
lqwVtb.ge(VtbVerification::getCreateTime,so.getQueryStartCheckTime()); |
||||
|
lqwVtb.le(VtbVerification::getCreateTime,so.getQueryEndCheckTime()); |
||||
|
List<VtbVerification> verificationList = verificationService.list(lqwVtb); |
||||
|
List<Long> vtbIds = verificationList.stream().map(a->a.getId()).collect(Collectors.toList()); |
||||
|
if(pay4VtbIds!=null){ |
||||
|
pay4VtbIds = CollectionUtil.intersection(pay4VtbIds,vtbIds).stream().collect(Collectors.toList()); |
||||
|
List<Long> finalPay4VtbIds = pay4VtbIds; |
||||
|
verificationList = verificationList.stream().filter(a-> finalPay4VtbIds.contains(a.getId())).collect(Collectors.toList()); |
||||
|
} |
||||
|
vtb4ActIds = verificationList.stream().map(a->a.getActivityId()).distinct().collect(Collectors.toList()); |
||||
|
}else { |
||||
|
if(pay4VtbIds!=null){ |
||||
|
if(pay4VtbIds.size()>0) { |
||||
|
LambdaQueryWrapper<VtbVerification> lqwVtb = new LambdaQueryWrapper<>(); |
||||
|
lqwVtb.in(VtbVerification::getId, pay4VtbIds); |
||||
|
List<VtbVerification> verificationList = verificationService.list(lqwVtb); |
||||
|
vtb4ActIds = verificationList.stream().map(a -> a.getActivityId()).distinct().collect(Collectors.toList()); |
||||
|
}else{ |
||||
|
vtb4ActIds = new ArrayList<>(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
if(so.getActivityTitle()!=null || so.getActivityCode()!=null |
||||
|
|| so.getQueryStartActivityStartTime()!=null || so.getQueryEndActivityStartTime()!=null |
||||
|
|| so.getQueryStartActivityEndTime()!=null || so.getQueryEndActivityEndTime()!=null){ |
||||
|
LambdaQueryWrapper<TbsActivity> lqwAct = new LambdaQueryWrapper<>(); |
||||
|
lqwAct.like(TbsActivity::getActTitle,so.getActivityTitle()); |
||||
|
lqwAct.like(TbsActivity::getActivityCode,so.getActivityCode()); |
||||
|
lqwAct.ge(TbsActivity::getActStartDate,so.getQueryStartActivityStartTime()); |
||||
|
lqwAct.le(TbsActivity::getActStartDate,so.getQueryEndActivityStartTime()); |
||||
|
lqwAct.ge(TbsActivity::getActEndDate,so.getQueryStartActivityEndTime()); |
||||
|
lqwAct.le(TbsActivity::getActEndDate,so.getQueryEndActivityEndTime()); |
||||
|
List<TbsActivity> activityList = activityService.list(lqwAct); |
||||
|
List<Long> actIds = activityList.stream().map(a->a.getId()).collect(Collectors.toList()); |
||||
|
|
||||
|
if(vtb4ActIds!=null){ |
||||
|
vtb4ActIds = CollectionUtil.intersection(vtb4ActIds,actIds).stream().collect(Collectors.toList()); |
||||
|
List<Long> finalVtb4ActIds = vtb4ActIds; |
||||
|
activityList = activityList.stream().filter(a-> finalVtb4ActIds.contains(a.getId())).collect(Collectors.toList()); |
||||
|
} |
||||
|
act4ApplyIds = activityList.stream().map(a->a.getCostApplyId()).distinct().collect(Collectors.toList()); |
||||
|
}else { |
||||
|
if (vtb4ActIds != null) { |
||||
|
if (vtb4ActIds.size()>0) { |
||||
|
LambdaQueryWrapper<TbsActivity> lqwAct = new LambdaQueryWrapper<>(); |
||||
|
lqwAct.in(TbsActivity::getId, vtb4ActIds); |
||||
|
List<TbsActivity> activityList = activityService.list(lqwAct); |
||||
|
act4ApplyIds = activityList.stream().map(a -> a.getCostApplyId()).distinct().collect(Collectors.toList()); |
||||
|
}else{ |
||||
|
act4ApplyIds= new ArrayList<>(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
if(so.getCostApplyCode()!=null || so.getCostTitle()!= null |
||||
|
|| so.getSupplierCode()!=null || so.getSupplierName()!=null |
||||
|
|| so.getUserCode()!=null || so.getUserName()!=null || so.getCostApplyState()!=null |
||||
|
|| so.getQueryStartSubmitTime()!=null || so.getQueryEndSubmitTime()!=null |
||||
|
|| so.getQueryStartFinishTime()!=null || so.getQueryEndFinishTime()!=null){ |
||||
|
LambdaQueryWrapper<TbsCostApply> lqwApply = new LambdaQueryWrapper<>(); |
||||
|
lqwApply.like(TbsCostApply::getCode,so.getCostApplyCode()); |
||||
|
lqwApply.like(TbsCostApply::getChargeTheme,so.getCostTitle()); |
||||
|
lqwApply.like(TbsCostApply::getSupplierCode,so.getSupplierCode()); |
||||
|
lqwApply.like(TbsCostApply::getSupplierName,so.getSupplierName()); |
||||
|
lqwApply.like(TbsCostApply::getUserCode,so.getUserCode()); |
||||
|
lqwApply.like(TbsCostApply::getUserName,so.getUserName()); |
||||
|
lqwApply.eq(TbsCostApply::getChargeState,so.getCostApplyState()); |
||||
|
lqwApply.ge(TbsCostApply::getSubmitTime,so.getQueryStartSubmitTime()); |
||||
|
lqwApply.le(TbsCostApply::getSubmitTime,so.getQueryEndSubmitTime()); |
||||
|
lqwApply.ge(TbsCostApply::getPassTime,so.getQueryStartFinishTime()); |
||||
|
lqwApply.le(TbsCostApply::getPassTime,so.getQueryEndFinishTime()); |
||||
|
|
||||
|
List<TbsCostApply> costApplyList = costApplyService.list(lqwApply); |
||||
|
applyIds = costApplyList.stream().map(a->a.getId()).collect(Collectors.toList()); |
||||
|
|
||||
|
if(act4ApplyIds!=null){ |
||||
|
act4ApplyIds = CollectionUtil.intersection(act4ApplyIds,applyIds).stream().collect(Collectors.toList()); |
||||
|
List<Long> finalAct4ApplyIds = act4ApplyIds; |
||||
|
costApplyList = costApplyList.stream().filter(a-> finalAct4ApplyIds.contains(a.getId())).collect(Collectors.toList()); |
||||
|
applyIds = costApplyList.stream().map(a->a.getId()).collect(Collectors.toList()); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
PageUtil.startPage(); |
||||
|
|
||||
|
return new ArrayList<BirTbsVtbPayJoinDTO>(); |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
@ -0,0 +1,190 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper |
||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.qs.serve.modules.bir.mapper.BirTbsVtbPayJoinMapper"> |
||||
|
|
||||
|
<select id="selectSumVtbAmount" resultType="com.qs.serve.modules.bir.entity.dto.BirTbsVtbPayJoinDTO"> |
||||
|
select |
||||
|
activity_id, |
||||
|
SUM(CASE WHEN verification_state = 1 THEN amount ELSE 0 END) AS checked_amount, |
||||
|
SUM(CASE WHEN verification_state = 0 THEN amount ELSE 0 END) AS checking_amount from vtb_verification |
||||
|
where del_flag = 0 |
||||
|
<if test="actIds!=null and actIds.size > 0"> |
||||
|
and activity_id in |
||||
|
<foreach collection="actIds" item ="actId" index="i" open="(" close=")" separator=","> |
||||
|
#{actId} |
||||
|
</foreach> |
||||
|
</if> |
||||
|
GROUP BY activity_id |
||||
|
|
||||
|
</select> |
||||
|
|
||||
|
<select id="selectSumPayAmount" resultType="com.qs.serve.modules.bir.entity.dto.BirTbsVtbPayJoinDTO"> |
||||
|
SELECT |
||||
|
v.activity_id, |
||||
|
SUM(CASE WHEN p.pay_type = 'pay' THEN p.item_pay_amount ELSE 0 END) AS payed_amount, |
||||
|
SUM(CASE WHEN p.pay_type = 'unPay' THEN p.item_pay_amount ELSE 0 END) AS not_pay_amount |
||||
|
FROM |
||||
|
pay_payment_item p left join vtb_verification v on v.id = p.verification_id |
||||
|
WHERE |
||||
|
p.del_flag = 0 and v.del_flag =0 |
||||
|
<if test="actIds!=null and actIds.size > 0"> |
||||
|
and v.activity_id in |
||||
|
<foreach collection="actIds" item ="actId" index="i" open="(" close=")" separator=","> |
||||
|
#{actId} |
||||
|
</foreach> |
||||
|
</if> |
||||
|
GROUP BY v.activity_id |
||||
|
|
||||
|
</select> |
||||
|
|
||||
|
<select id="selectBirTbsVtbPayJoinDTO" resultType="com.qs.serve.modules.bir.entity.dto.BirTbsVtbPayJoinDTO"> |
||||
|
SELECT |
||||
|
|
||||
|
<if test="query.onlyAct != null"> |
||||
|
act.id as activity_id |
||||
|
</if> |
||||
|
<if test="query.onlyAct == null"> |
||||
|
a.id as costApply_id, |
||||
|
act.id as activity_id, |
||||
|
v.id as vtb_id, |
||||
|
p.id as pay_id, |
||||
|
|
||||
|
a.`code` as cost_apply_code, |
||||
|
a.charge_theme as cost_title, |
||||
|
a.supplier_code, |
||||
|
a.supplier_name, |
||||
|
a.user_code, |
||||
|
a.user_name, |
||||
|
a.charge_state, |
||||
|
a.submit_time, |
||||
|
a.pass_time, |
||||
|
|
||||
|
act.activity_code as activity_code, |
||||
|
act.act_title as activity_title, |
||||
|
act.act_start_date as act_start_date, |
||||
|
act.act_end_date as act_end_date, |
||||
|
act.total_amount as activity_amount, |
||||
|
act.release_amount as release_amount, |
||||
|
|
||||
|
v.verification_code as vtb_code, |
||||
|
v.user_code as check_user_code, |
||||
|
v.user_name as check_user_name, |
||||
|
v.amount as vtb_amount, |
||||
|
v.create_time as vtb_submit_date, |
||||
|
v.finished_time as vtb_finish_date, |
||||
|
|
||||
|
p.item_pay_amount as pay_amount, |
||||
|
p.pay_time as pay_date |
||||
|
</if> |
||||
|
FROM |
||||
|
tbs_cost_apply a |
||||
|
LEFT JOIN tbs_activity act ON a.id = act.cost_apply_id |
||||
|
LEFT JOIN vtb_verification v ON v.activity_id = act.id |
||||
|
LEFT JOIN pay_payment_item p ON p.verification_id = v.id |
||||
|
WHERE |
||||
|
1=1 |
||||
|
and a.del_flag = 0 |
||||
|
and (act.del_flag = 0 or act.id is null ) |
||||
|
and (v.del_flag = 0 or v.id is null ) |
||||
|
and (p.del_flag = 0 or p.id is null ) |
||||
|
<if test="query.costApplyCode != null and query.costApplyCode != ''"> |
||||
|
AND a.code LIKE CONCAT('%', #{query.costApplyCode}, '%') |
||||
|
</if> |
||||
|
<if test="query.costTitle != null and query.costTitle != ''"> |
||||
|
AND a.charge_theme LIKE CONCAT('%', #{query.costTitle}, '%') |
||||
|
</if> |
||||
|
<if test="query.supplierCode != null and query.supplierCode != ''"> |
||||
|
AND a.supplier_code LIKE CONCAT('%', #{query.supplierCode}, '%') |
||||
|
</if> |
||||
|
<if test="query.supplierName != null and query.supplierName != ''"> |
||||
|
AND a.supplier_name LIKE CONCAT('%', #{query.supplierName}, '%') |
||||
|
</if> |
||||
|
<if test="query.userCode != null and query.userCode != ''"> |
||||
|
AND a.user_code LIKE CONCAT('%', #{query.userCode}, '%') |
||||
|
</if> |
||||
|
<if test="query.userName != null and query.userName != ''"> |
||||
|
AND a.user_name LIKE CONCAT('%', #{query.userName}, '%') |
||||
|
</if> |
||||
|
<if test="query.costApplyState != null"> |
||||
|
AND a.charge_state = #{query.costApplyState} |
||||
|
</if> |
||||
|
<if test="query.queryStartSubmitTime != null"> |
||||
|
AND a.submit_time >= #{query.queryStartSubmitTime} |
||||
|
</if> |
||||
|
<if test="query.queryEndSubmitTime != null"> |
||||
|
AND a.submit_time <= #{query.queryEndSubmitTime} |
||||
|
</if> |
||||
|
<if test="query.queryStartFinishTime != null"> |
||||
|
AND a.pass_time >= #{query.queryStartFinishTime} |
||||
|
</if> |
||||
|
<if test="query.queryEndFinishTime != null"> |
||||
|
AND a.pass_time <= #{query.queryEndFinishTime} |
||||
|
</if> |
||||
|
<if test="query.activityTitle != null and query.activityTitle != ''"> |
||||
|
AND act.act_title LIKE CONCAT('%', #{query.activityTitle}, '%') |
||||
|
</if> |
||||
|
<if test="query.activityCode != null and query.activityCode != ''"> |
||||
|
AND act.activity_code LIKE CONCAT('%', #{query.activityCode}, '%') |
||||
|
</if> |
||||
|
<if test="query.queryStartActivityStartTime != null"> |
||||
|
AND act.act_start_date >= #{query.queryStartActivityStartTime} |
||||
|
</if> |
||||
|
<if test="query.queryEndActivityStartTime != null"> |
||||
|
AND act.act_start_date <= #{query.queryEndActivityStartTime} |
||||
|
</if> |
||||
|
<if test="query.queryStartActivityEndTime != null"> |
||||
|
AND act.act_end_date >= #{query.queryStartActivityEndTime} |
||||
|
</if> |
||||
|
<if test="query.queryEndActivityEndTime != null"> |
||||
|
AND act.act_end_date <= #{query.queryEndActivityEndTime} |
||||
|
</if> |
||||
|
<if test="query.verificationState != null"> |
||||
|
AND v.verification_state = #{query.verificationState} |
||||
|
</if> |
||||
|
<if test="query.vtbCode != null and query.vtbCode != ''"> |
||||
|
AND v.verification_code LIKE CONCAT('%', #{query.vtbCode}, '%') |
||||
|
</if> |
||||
|
<if test="query.checkUserCode != null and query.checkUserCode != ''"> |
||||
|
AND v.user_code LIKE CONCAT('%', #{query.checkUserCode}, '%') |
||||
|
</if> |
||||
|
<if test="query.checkUserName != null and query.checkUserName != ''"> |
||||
|
AND v.user_name LIKE CONCAT('%', #{query.checkUserName}, '%') |
||||
|
</if> |
||||
|
<if test="query.queryStartFinishCheckTime != null"> |
||||
|
AND v.finished_time >= #{query.queryStartFinishCheckTime} |
||||
|
</if> |
||||
|
<if test="query.queryEndFinishCheckTime != null"> |
||||
|
AND v.finished_time <= #{query.queryEndFinishCheckTime} |
||||
|
</if> |
||||
|
<if test="query.queryStartCheckTime != null"> |
||||
|
AND v.create_time >= #{query.queryStartCheckTime} |
||||
|
</if> |
||||
|
<if test="query.queryEndCheckTime != null"> |
||||
|
AND v.create_time <= #{query.queryEndCheckTime} |
||||
|
</if> |
||||
|
<if test="query.queryStartPayTime != null"> |
||||
|
AND p.pay_time >= #{query.queryStartPayTime} |
||||
|
</if> |
||||
|
<if test="query.queryEndPayTime != null"> |
||||
|
AND p.pay_time <= #{query.queryEndPayTime} |
||||
|
</if> |
||||
|
<if test="query.actIds!=null and query.actIds.size > 0"> |
||||
|
and act.id in |
||||
|
<foreach collection="query.actIds" item ="actId" index="i" open="(" close=")" separator=","> |
||||
|
#{actId} |
||||
|
</foreach> |
||||
|
</if> |
||||
|
|
||||
|
<if test="query.onlyAct != null"> |
||||
|
group by act.id |
||||
|
</if> |
||||
|
|
||||
|
<if test="query.orderProp != null and query.orderType != null"> |
||||
|
order by #{query.orderProp} #{query.orderType} |
||||
|
</if> |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
</mapper> |
Loading…
Reference in new issue