From c22fe42cf0f65312f728075e9720626b33c712e2 Mon Sep 17 00:00:00 2001 From: Yen Date: Fri, 17 Nov 2023 15:23:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E4=BB=98join=E7=BB=B4=E5=BA=A6?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DateCheckApplyController.java | 8 +- .../vtb/entity/dto/PayPaymentItemExtend.java | 122 ++++++++++++++++++ .../vtb/entity/so/PayPaymentItemExtendSo.java | 6 + .../impl/VtbVerificationServiceImpl.java | 2 +- .../mapper/vtb/VtbVerForPayReportMapper.xml | 56 ++++---- 5 files changed, 167 insertions(+), 27 deletions(-) diff --git a/src/main/java/com/qs/serve/modules/excel/controller/DateCheckApplyController.java b/src/main/java/com/qs/serve/modules/excel/controller/DateCheckApplyController.java index 560ad362..fa8d15b7 100644 --- a/src/main/java/com/qs/serve/modules/excel/controller/DateCheckApplyController.java +++ b/src/main/java/com/qs/serve/modules/excel/controller/DateCheckApplyController.java @@ -14,6 +14,7 @@ import com.qs.serve.modules.excel.entity.DataPayMainInfo; import com.qs.serve.modules.excel.service.DateCheckApplyService; import com.qs.serve.modules.sys.entity.SysConfig; import com.qs.serve.modules.sys.service.SysConfigService; +import com.qs.serve.modules.vtb.entity.so.PayPaymentItemExtendSo; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.GetMapping; @@ -96,10 +97,9 @@ public class DateCheckApplyController { */ @RepeatSubmit @GetMapping("/getPayJoinList") - @SysLog(module = SystemModule.Verification, title = "客户支付帐", biz = BizType.EXPORT) - public R getPayJoinList(DataSupplierSo param){ - - return R.ok(); + public R getPayJoinList(PayPaymentItemExtendSo param){ + DataPayMainInfo result = dateCheckApplyService.pagePayPaymentItems(param); + return R.ok(result); } } diff --git a/src/main/java/com/qs/serve/modules/vtb/entity/dto/PayPaymentItemExtend.java b/src/main/java/com/qs/serve/modules/vtb/entity/dto/PayPaymentItemExtend.java index 67f1dae6..969fa4d5 100644 --- a/src/main/java/com/qs/serve/modules/vtb/entity/dto/PayPaymentItemExtend.java +++ b/src/main/java/com/qs/serve/modules/vtb/entity/dto/PayPaymentItemExtend.java @@ -1,8 +1,130 @@ package com.qs.serve.modules.vtb.entity.dto; +import com.baomidou.mybatisplus.annotation.*; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +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.math.BigDecimal; +import java.time.LocalDateTime; + /** * @author YenHex * @since 2023/11/15 */ +@Data public class PayPaymentItemExtend { + + /** id */ + @TableId(type = IdType.AUTO) + private Long id; + + /** + * 支付类型 + * pay - 支付 + * unPay - 不再支付 + **/ + private String payType; + + /** 支付id */ + @NotNull(message = "支付id不能为空") + private Long paymentId; + + /** 供应商id */ + @NotNull(message = "供应商id不能为空") + private Long supplierId; + + /** 支付金额 */ + @NotNull(message = "支付金额不能为空") + private BigDecimal itemPayAmount; + + /** 核销id */ + @NotNull(message = "核销id不能为空") + private Long verificationId; + + private String verificationMainCode; + + private String verificationCode; + + /** 核销科目项id */ + @NotNull(message = "核销科目项id不能为空") + private Long verificationSubjectId; + + /** 费用申请id */ + @NotNull(message = "费用申请id不能为空") + private Long costApplyId; + + /** 活动id */ + @NotNull(message = "活动id不能为空") + private Long activityId; + + + private String costApplyCode; + + private String costApplyTitle; + + /** 活动编码 */ + @NotBlank(message = "活动编码不能为空") + @Length(max = 30,message = "活动编码长度不能超过30字") + private String activityCode; + + private String activityTitle; + + /** 政策项id */ + private Long policyItemId; + + /** 政策项编码 */ + private String policyItemCode; + + /** 科目id */ + @NotNull(message = "科目id不能为空") + private Long subjectId; + + /** 科目编码 */ + @NotBlank(message = "科目编码不能为空") + @Length(max = 50,message = "科目编码长度不能超过50字") + private String subjectCode; + + /** 科目名称 */ + @NotBlank(message = "科目名称不能为空") + @Length(max = 50,message = "科目名称长度不能超过50字") + private String subjectName; + + /** 备注 */ + @Length(max = 255,message = "备注长度不能超过255字") + private String remark; + + /** 创建时间 */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @TableField(fill = FieldFill.INSERT) + private LocalDateTime createTime; + + + @TableField(condition = SqlCondition.LIKE) + private String erpId; + + @TableField(condition = SqlCondition.LIKE) + private String billNumber; + + + /** 支付时间 */ + @NotNull(message = "支付时间不能为空") + @Length(max = 0,message = "支付时间长度不能超过0字") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private LocalDateTime payTime; + + /** 支付时间 */ + @NotNull(message = "支付日期不能为空") + @Length(max = 0,message = "支付时间长度不能超过0字") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private LocalDateTime payDate; + } diff --git a/src/main/java/com/qs/serve/modules/vtb/entity/so/PayPaymentItemExtendSo.java b/src/main/java/com/qs/serve/modules/vtb/entity/so/PayPaymentItemExtendSo.java index 77fb85ba..be3a80cf 100644 --- a/src/main/java/com/qs/serve/modules/vtb/entity/so/PayPaymentItemExtendSo.java +++ b/src/main/java/com/qs/serve/modules/vtb/entity/so/PayPaymentItemExtendSo.java @@ -60,6 +60,12 @@ public class PayPaymentItemExtendSo { @Length(max = 30,message = "活动编码长度不能超过30字") private String activityCode; + private String activityTitle; + + private String costApplyCode; + + private String costApplyTitle; + /** 政策项编码 */ private String policyItemCode; diff --git a/src/main/java/com/qs/serve/modules/vtb/service/impl/VtbVerificationServiceImpl.java b/src/main/java/com/qs/serve/modules/vtb/service/impl/VtbVerificationServiceImpl.java index 51649675..55674d76 100644 --- a/src/main/java/com/qs/serve/modules/vtb/service/impl/VtbVerificationServiceImpl.java +++ b/src/main/java/com/qs/serve/modules/vtb/service/impl/VtbVerificationServiceImpl.java @@ -1283,7 +1283,7 @@ public class VtbVerificationServiceImpl extends ServiceImpl sysSyncLogs = sysSyncLogService.list(lqw); for (SysSyncLog syncLog : sysSyncLogs) { SysSyncLog syncLogBack = ThirtyVerificationUtil.requestToPayment("to支付请求",syncLog.getRemark(), COST_TO_PAY_API, syncLog.getRequestJson()); - if(syncLogBack.getSuccessStatus().equals(1)){ + if(syncLogBack.getSuccessStatus()!=null&&syncLogBack.getSuccessStatus().equals(1)){ syncLog.setSuccessStatus(1); sysSyncLogService.updateById(syncLog); }else { diff --git a/src/main/resources/mapper/vtb/VtbVerForPayReportMapper.xml b/src/main/resources/mapper/vtb/VtbVerForPayReportMapper.xml index 7dfdae18..78ed19af 100644 --- a/src/main/resources/mapper/vtb/VtbVerForPayReportMapper.xml +++ b/src/main/resources/mapper/vtb/VtbVerForPayReportMapper.xml @@ -208,6 +208,12 @@ pay_payment_item.`id`, + pay_payment_item.`verification_main_code`, + pay_payment_item.`verification_code`, + pay_payment_item.`pay_time`, + pay_payment_item.`pay_date`, + pay_payment_item.`bill_number`, + pay_payment_item.`erp_id`, pay_payment_item.`pay_type`, pay_payment_item.`payment_id`, pay_payment_item.`supplier_id`, @@ -215,6 +221,9 @@ pay_payment_item.`verification_id`, pay_payment_item.`verification_subject_id`, pay_payment_item.`cost_apply_id`, + cost.`code` as `cost_apply_code`, + cost.`charge_theme` as `cost_apply_title`, + act.`act_title` as `activity_title`, pay_payment_item.`activity_id`, pay_payment_item.`activity_code`, pay_payment_item.`subject_id`, @@ -222,37 +231,27 @@ pay_payment_item.`subject_name`, pay_payment_item.`remark`, pay_payment_item.`create_time`, - pay_payment_item.`update_time`, - pay_payment_item.`tenant_id`, - pay_payment_item.`create_by`, - pay_payment_item.`update_by`, - pay_payment_item.`del_flag`, pay_payment_item.`policy_item_id`, pay_payment_item.`policy_item_code` - and `pay_payment`.`cancel_flag` = #{query.cancelFlag} - and `pay_payment_item`.`id` = #{query.id} + and pay_payment_item.del_flag = 0 + and vtb.del_flag = 0 + and act.del_flag = 0 + and act.cancel_flag = 0 + and pay_payment.del_flag = 0 and `pay_payment_item`.`pay_type` = #{query.payType} and `pay_payment_item`.`payment_id` = #{query.paymentId} + and `cost`.`code` like concat('%',#{query.costApplyCode},'%') + and `cost`.`charge_theme` like concat('%',#{query.costApplyTitle},'%') + and `act`.`act_title` like concat('%',#{query.activityTitle},'%') and `pay_payment_item`.`supplier_id` = #{query.supplierId} - and `pay_payment_item`.`item_pay_amount` = #{query.itemPayAmount} - and `pay_payment_item`.`verification_id` = #{query.verificationId} - and `pay_payment_item`.`verification_subject_id` = #{query.verificationSubjectId} and `pay_payment_item`.`cost_apply_id` = #{query.costApplyId} and `pay_payment_item`.`activity_id` = #{query.activityId} - and `pay_payment_item`.`activity_code` = #{query.activityCode} - and `pay_payment_item`.`subject_id` = #{query.subjectId} + and `pay_payment_item`.`activity_code` like concat('%',#{query.activityCode},'%') and `pay_payment_item`.`subject_code` = #{query.subjectCode} and `pay_payment_item`.`subject_name` = #{query.subjectName} - and `pay_payment_item`.`create_time` = #{query.createTime} - and `pay_payment_item`.`update_time` = #{query.updateTime} - and `pay_payment_item`.`tenant_id` = #{query.tenantId} - and `pay_payment_item`.`create_by` = #{query.createBy} - and `pay_payment_item`.`update_by` = #{query.updateBy} - and `pay_payment_item`.`del_flag` = #{query.delFlag} - and `pay_payment_item`.`policy_item_id` = #{query.policyItemId} and `pay_payment_item`.`policy_item_code` = #{query.policyItemCode} and `pay_payment_item`.`cost_apply_id` in @@ -269,15 +268,28 @@ left join pay_payment on pay_payment_item.payment_id = pay_payment.id left join vtb_verification vtb on pay_payment_item.verification_id = vtb.id left join tbs_activity act on act.id = vtb.activity_id + left join tbs_cost_apply cost on cost.id = act.cost_apply_id - limit {pageInfo.startIndex},{pageInfo.size} + limit #{pageInfo.startIndex},#{pageInfo.size}