Commit 2bd14352 authored by hongguangwu's avatar hongguangwu

1.7.22-回单数量

parent 7ac443b6
...@@ -13,6 +13,10 @@ import java.io.Serializable; ...@@ -13,6 +13,10 @@ import java.io.Serializable;
@Data @Data
public class BaseIdNameNoVo implements Serializable { public class BaseIdNameNoVo implements Serializable {
private String id; private String id;
// 对应log表的ID,用来更新回单数量
private String fdLogId;
// 回单数量
private Integer fdBackNum;
private String name; private String name;
private String no; private String no;
private String type; private String type;
......
...@@ -19,7 +19,6 @@ package com.yifu.cloud.plus.v1.ekp.entity; ...@@ -19,7 +19,6 @@ package com.yifu.cloud.plus.v1.ekp.entity;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
...@@ -31,7 +30,6 @@ import javax.validation.constraints.NotBlank; ...@@ -31,7 +30,6 @@ import javax.validation.constraints.NotBlank;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* 发放日志(银企付款任务) * 发放日志(银企付款任务)
...@@ -164,5 +162,12 @@ public class EkpBankGrantLog { ...@@ -164,5 +162,12 @@ public class EkpBankGrantLog {
@ExcelProperty("失败总笔数") @ExcelProperty("失败总笔数")
@Schema(description = "失败总笔数") @Schema(description = "失败总笔数")
private Integer fdTransactionFailTotal; private Integer fdTransactionFailTotal;
/**
* 回单返回(银行回单数量)
*/
@ExcelAttribute(name = "回单返回")
@ExcelProperty("回单返回")
@Schema(description = "回单返回")
private Integer fdBackFileNum;
} }
...@@ -2105,7 +2105,9 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -2105,7 +2105,9 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
boolean flag; boolean flag;
String linkId; String linkId;
EkpBankAtta atta; EkpBankAtta atta;
String fdEmpName; Map<String, Integer> updateNumMap = new HashMap<>();
Integer oldNum;
String fdLogId;
for (File pdfFile : pdfFiles) { for (File pdfFile : pdfFiles) {
pdfName = pdfFile.getName(); pdfName = pdfFile.getName();
pdfNameKey = this.getPdfNumberByNoTax(pdfName); pdfNameKey = this.getPdfNumberByNoTax(pdfName);
...@@ -2131,6 +2133,16 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -2131,6 +2133,16 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
atta.setFdEmpName(vo.getEmpName()); atta.setFdEmpName(vo.getEmpName());
ekpBankAttaService.save(atta); ekpBankAttaService.save(atta);
// 处理回单数量逻辑1
fdLogId = vo.getFdLogId();
if (Common.isNotNull(fdLogId)) {
oldNum = updateNumMap.get(fdLogId);
if (Common.isEmpty(oldNum)) {
oldNum = CommonConstants.ZERO_INT;
}
oldNum++;
updateNumMap.put(fdLogId, oldNum);
}
} }
} }
} catch (Exception e) { } catch (Exception e) {
...@@ -2138,6 +2150,18 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -2138,6 +2150,18 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
} }
} }
} }
// 处理回单数量逻辑2
if (!updateNumMap.isEmpty()) {
List<EkpBankGrantLog> logList = new ArrayList<>();
EkpBankGrantLog logs;
for (Map.Entry<String, Integer> entry : updateNumMap.entrySet()) {
logs = new EkpBankGrantLog();
logs.setFdId(entry.getKey());
logs.setFdBackFileNum(entry.getValue());
logList.add( logs);
}
ekpBankGrantLogService.updateBatchById(logList);
}
} }
/** /**
......
...@@ -431,6 +431,8 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -431,6 +431,8 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
if (infoOldVo != null) { if (infoOldVo != null) {
infoNewVo = new BaseIdNameNoVo(); infoNewVo = new BaseIdNameNoVo();
infoNewVo.setId(infoOldVo.getId()); infoNewVo.setId(infoOldVo.getId());
infoNewVo.setFdLogId(infoOldVo.getFdLogId());
infoNewVo.setFdBackNum(infoOldVo.getFdBackNum());
infoNewVo.setNo(infoOldVo.getNo()); infoNewVo.setNo(infoOldVo.getNo());
infoNewVo.setName(vo.getOnlySequence()); infoNewVo.setName(vo.getOnlySequence());
infoNewVo.setType(CommonConstants.THREE_STRING); infoNewVo.setType(CommonConstants.THREE_STRING);
...@@ -446,6 +448,8 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -446,6 +448,8 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
if (infoOldVo != null) { if (infoOldVo != null) {
infoNewVo = new BaseIdNameNoVo(); infoNewVo = new BaseIdNameNoVo();
infoNewVo.setId(infoOldVo.getId()); infoNewVo.setId(infoOldVo.getId());
infoNewVo.setFdLogId(infoOldVo.getFdLogId());
infoNewVo.setFdBackNum(infoOldVo.getFdBackNum());
infoNewVo.setNo(infoOldVo.getNo()); infoNewVo.setNo(infoOldVo.getNo());
infoNewVo.setName(vo.getOnlySequence()); infoNewVo.setName(vo.getOnlySequence());
infoNewVo.setType(CommonConstants.FOUR_STRING); infoNewVo.setType(CommonConstants.FOUR_STRING);
......
...@@ -133,7 +133,8 @@ ...@@ -133,7 +133,8 @@
<!--查询所有需要查询的单号-主表--> <!--查询所有需要查询的单号-主表-->
<select id="getNoToQueryByMain" resultType="com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseIdNameNoVo"> <select id="getNoToQueryByMain" resultType="com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseIdNameNoVo">
SELECT a.fd_wx_no id,a.fd_atta_src no FROM ekp_bank_pay_task a SELECT a.fd_wx_no id,a.fd_atta_src no,l.fd_id fdLogId,l.fd_back_file_num fdBackNum FROM ekp_bank_pay_task a
LEFT JOIN ekp_bank_grant_log l on l.fd_batch_number=a.fd_wx_no
where a.fd_pay_type in ('非扣税','报销') and a.fd_atta_src is not null where a.fd_pay_type in ('非扣税','报销') and a.fd_atta_src is not null
and a.fd_create_time >= DATE_SUB(curdate(), INTERVAL 3 MONTH) and a.fd_create_time >= DATE_SUB(curdate(), INTERVAL 3 MONTH)
and not EXISTS ( and not EXISTS (
...@@ -143,8 +144,9 @@ ...@@ -143,8 +144,9 @@
<!--查询所有需要查询的单号-明细表--> <!--查询所有需要查询的单号-明细表-->
<select id="getNoToQueryByDetail" resultType="com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseIdNameNoVo"> <select id="getNoToQueryByDetail" resultType="com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseIdNameNoVo">
SELECT a.fd_wx_no id,a.fd_atta_src no FROM ekp_bank_grant_detail a SELECT a.fd_wx_no id,a.fd_atta_src no,l.fd_id fdLogId,l.fd_back_file_num fdBackNum FROM ekp_bank_grant_detail a
left join ekp_bank_pay_task m on m.fd_id=a.fd_parent_id left join ekp_bank_pay_task m on m.fd_id=a.fd_parent_id
LEFT JOIN ekp_bank_grant_log l on l.fd_batch_number=a.fd_wx_no
where m.fd_pay_type in ('非扣税','报销') and a.fd_atta_src is not null where m.fd_pay_type in ('非扣税','报销') and a.fd_atta_src is not null
and a.fd_create_time >= DATE_SUB(curdate(), INTERVAL 6 MONTH) and a.fd_create_time >= DATE_SUB(curdate(), INTERVAL 6 MONTH)
and not EXISTS ( and not EXISTS (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment