38 changed files with 697 additions and 151 deletions
@ -0,0 +1,58 @@ |
|||
package com.qs.serve.modules.tbs.entity.so; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.FieldFill; |
|||
import com.baomidou.mybatisplus.annotation.TableField; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.Data; |
|||
import org.hibernate.validator.constraints.Length; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotNull; |
|||
import java.time.LocalDateTime; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author YenHex |
|||
* @since 2024/7/3 |
|||
*/ |
|||
@Data |
|||
public class VtbVerificationBatchQuery { |
|||
|
|||
private Integer loadChild; |
|||
|
|||
/** 批次编码 */ |
|||
private String vtbBatchCode; |
|||
|
|||
/** 状态:0-审批中;1-通过;2-拒绝;3-回退 */ |
|||
private Integer vtbBatchStatus; |
|||
|
|||
private String costCode; |
|||
|
|||
/** 客户编码 */ |
|||
private String supplierCode; |
|||
|
|||
/** 客户名称 */ |
|||
private String supplierName; |
|||
|
|||
private String supplierBizRegionFirstName; |
|||
|
|||
private String supplierBizRegionSecondName; |
|||
|
|||
private String supplierBizRegionThirdName; |
|||
|
|||
/** 申请人 */ |
|||
private String userCode; |
|||
|
|||
/** 申请人 */ |
|||
private String userName; |
|||
|
|||
/** 创建时间 */ |
|||
private LocalDateTime batchStartTime; |
|||
|
|||
/** 创建时间 */ |
|||
private LocalDateTime batchEndTime; |
|||
|
|||
private List<String> userIds; |
|||
|
|||
} |
@ -0,0 +1,51 @@ |
|||
package com.qs.serve.modules.vtb.entity.vo; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.SqlCondition; |
|||
import com.baomidou.mybatisplus.annotation.TableField; |
|||
import com.qs.serve.modules.vtb.entity.VtbVerification; |
|||
import com.qs.serve.modules.vtb.entity.VtbVerificationBatch; |
|||
import lombok.Data; |
|||
import org.hibernate.validator.constraints.Length; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotNull; |
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* @author YenHex |
|||
* @since 2024/7/3 |
|||
*/ |
|||
@Data |
|||
public class VtbVerificationBatchVo extends VtbVerificationBatch { |
|||
|
|||
private String costCode; |
|||
|
|||
/** 主题 */ |
|||
private String chargeTheme; |
|||
|
|||
/** 状态:0=未发布;1=审批中;2=待执行;3=完成;4-被驳回;5-中止;6-作废;7-异动 @{link TbsCostApplyState} */ |
|||
private Integer chargeState; |
|||
|
|||
private String supplierBizRegionFirstName; |
|||
|
|||
private String supplierBizRegionSecondName; |
|||
|
|||
private String supplierBizRegionThirdName; |
|||
|
|||
/** 统计活动数量 */ |
|||
private Integer totalActivity; |
|||
|
|||
/** 统计所有活动申请的金额 */ |
|||
private BigDecimal totalActivityAmount; |
|||
|
|||
/** 统计所有活动预估发货的金额 */ |
|||
private BigDecimal totalActivityPreAmount; |
|||
|
|||
/** 统计所有活动预估不发货的金额 */ |
|||
private BigDecimal totalActivityPreNotAmount; |
|||
|
|||
/** 统计所有活动使用的金额 */ |
|||
private BigDecimal totalActivityUsedAmount; |
|||
|
|||
|
|||
} |
@ -0,0 +1,118 @@ |
|||
<?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.vtb.mapper.VtbVerificationBatchMapper"> |
|||
|
|||
<resultMap id="vtbVerificationBatchMap" type="com.qs.serve.modules.vtb.entity.VtbVerificationBatch" > |
|||
<result property="id" column="id"/> |
|||
<result property="vtbBatchCode" column="vtb_batch_code"/> |
|||
<result property="vtbBatchStatus" column="vtb_batch_status"/> |
|||
<result property="finishedTime" column="finished_time"/> |
|||
<result property="costApplyId" column="cost_apply_id"/> |
|||
<result property="remark" column="remark"/> |
|||
<result property="createTime" column="create_time"/> |
|||
<result property="updateTime" column="update_time"/> |
|||
<result property="tenantId" column="tenant_id"/> |
|||
<result property="createBy" column="create_by"/> |
|||
<result property="updateBy" column="update_by"/> |
|||
<result property="delFlag" column="del_flag"/> |
|||
<result property="syFormId" column="sy_form_id"/> |
|||
<result property="syFlowId" column="sy_flow_id"/> |
|||
<result property="supplierId" column="supplier_id"/> |
|||
<result property="supplierCode" column="supplier_code"/> |
|||
<result property="supplierName" column="supplier_name"/> |
|||
<result property="userId" column="user_id"/> |
|||
<result property="userCode" column="user_code"/> |
|||
<result property="userName" column="user_name"/> |
|||
<result property="extUserId" column="ext_user_id"/> |
|||
<result property="extUserCode" column="ext_user_code"/> |
|||
<result property="extUserName" column="ext_user_name"/> |
|||
<result property="backedTime" column="backed_time"/> |
|||
<result property="refuseTime" column="refuse_time"/> |
|||
<result property="wayId" column="way_id"/> |
|||
<result property="wayTitle" column="way_title"/> |
|||
<result property="applyCheckAmount" column="apply_check_amount"/> |
|||
<result property="resultCheckAmount" column="result_check_amount"/> |
|||
</resultMap> |
|||
|
|||
<sql id="vtbVerificationBatchSql"> |
|||
vtb_verification_batch.`id`, |
|||
vtb_verification_batch.`vtb_batch_code`, |
|||
vtb_verification_batch.`vtb_batch_status`, |
|||
vtb_verification_batch.`finished_time`, |
|||
vtb_verification_batch.`cost_apply_id`, |
|||
vtb_verification_batch.`remark`, |
|||
vtb_verification_batch.`create_time`, |
|||
vtb_verification_batch.`update_time`, |
|||
vtb_verification_batch.`tenant_id`, |
|||
vtb_verification_batch.`create_by`, |
|||
vtb_verification_batch.`update_by`, |
|||
vtb_verification_batch.`del_flag`, |
|||
vtb_verification_batch.`sy_form_id`, |
|||
vtb_verification_batch.`sy_flow_id`, |
|||
vtb_verification_batch.`supplier_id`, |
|||
vtb_verification_batch.`supplier_code`, |
|||
vtb_verification_batch.`supplier_name`, |
|||
vtb_verification_batch.`user_id`, |
|||
vtb_verification_batch.`user_code`, |
|||
vtb_verification_batch.`user_name`, |
|||
vtb_verification_batch.`ext_user_id`, |
|||
vtb_verification_batch.`ext_user_code`, |
|||
vtb_verification_batch.`ext_user_name`, |
|||
vtb_verification_batch.`backed_time`, |
|||
vtb_verification_batch.`refuse_time`, |
|||
vtb_verification_batch.`way_id`, |
|||
vtb_verification_batch.`way_title`, |
|||
vtb_verification_batch.`apply_check_amount`, |
|||
vtb_verification_batch.`result_check_amount` </sql> |
|||
|
|||
<select id="selectList2" resultType="com.qs.serve.modules.vtb.entity.vo.VtbVerificationBatchVo"> |
|||
SELECT |
|||
<include refid="vtbVerificationBatchSql"/>, |
|||
tbs_cost_apply.`code` as cost_code, |
|||
tbs_cost_apply.`charge_theme`, |
|||
tbs_cost_apply.`charge_state`, |
|||
tbs_cost_apply.`supplier_biz_region_first_name`, |
|||
tbs_cost_apply.`supplier_biz_region_second_name`, |
|||
tbs_cost_apply.`supplier_biz_region_third_name`, |
|||
tbs_cost_apply.`total_activity`, |
|||
tbs_cost_apply.`total_activity_amount`, |
|||
tbs_cost_apply.`total_activity_pre_amount`, |
|||
tbs_cost_apply.`total_activity_pre_not_amount`, |
|||
tbs_cost_apply.`total_activity_used_amount` |
|||
|
|||
FROM `vtb_verification_batch` `vtb_verification_batch` |
|||
left join tbs_cost_apply on tbs_cost_apply.id = vtb_verification_batch.cost_apply_id |
|||
<where> |
|||
and vtb_verification_batch.del_flag = 0 |
|||
and tbs_cost_apply.del_flag = 0 |
|||
<if test="query.vtbBatchCode != null and query.vtbBatchCode != ''"> and `vtb_verification_batch`.`vtb_batch_code` like concat('%',#{query.vtbBatchCode},'%') </if> |
|||
<if test="query.vtbBatchStatus != null"> and `vtb_verification_batch`.`vtb_batch_status` = #{query.vtbBatchStatus}</if> |
|||
<if test="query.supplierCode != null and query.supplierCode != ''"> and `vtb_verification_batch`.`supplier_code` like concat('%',#{query.supplierCode},'%') </if> |
|||
<if test="query.supplierName != null and query.supplierName != ''"> and `vtb_verification_batch`.`supplier_name` like concat('%',#{query.supplierName},'%') </if> |
|||
<if test="query.userCode != null and query.userCode != ''"> and `vtb_verification_batch`.`user_code` like concat('%',#{query.userCode},'%') </if> |
|||
<if test="query.userName != null and query.userName != ''"> and `vtb_verification_batch`.`user_name` like concat('%',#{query.userName},'%') </if> |
|||
<if test="query.batchStartTime != null"> and `vtb_verification_batch`.`create_time` >= #{query.batchStartTime}</if> |
|||
<if test="query.batchEndTime != null"> and `vtb_verification_batch`.`create_time` <= #{query.batchEndTime}</if> |
|||
|
|||
<if test="query.userIds!=null and query.userIds.size > 0"> |
|||
and ( `vtb_verification_batch`.`user_id` in |
|||
<foreach collection="query.userIds" item="selectId" index="i" open="(" close=")" separator=","> |
|||
#{selectId} |
|||
</foreach> |
|||
or `vtb_verification_batch`.`ext_user_id` in |
|||
<foreach collection="query.userIds" item="selectId" index="i" open="(" close=")" separator=","> |
|||
#{selectId} |
|||
</foreach> ) |
|||
</if> |
|||
|
|||
<if test="query.costCode != null and query.costCode != ''"> and `tbs_cost_apply`.`code` like concat('%', #{query.costCode},'%')</if> |
|||
<if test="query.supplierBizRegionFirstName != null and query.supplierBizRegionFirstName != ''"> and `tbs_cost_apply`.`supplier_biz_region_first_name` like concat('%', #{query.supplierBizRegionFirstName},'%') </if> |
|||
<if test="query.supplierBizRegionSecondName != null and query.supplierBizRegionSecondName != ''"> and `tbs_cost_apply`.`supplier_biz_region_second_name` like concat('%',#{query.supplierBizRegionSecondName},'%') </if> |
|||
<if test="query.supplierBizRegionThirdName != null and query.supplierBizRegionThirdName != ''"> and `tbs_cost_apply`.`supplier_biz_region_third_name` like concat('%',#{query.supplierBizRegionThirdName},'%') </if> |
|||
</where> |
|||
order by vtb_verification_batch.id desc |
|||
</select> |
|||
|
|||
</mapper> |
Loading…
Reference in new issue