Commit ba1e76dd authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP1.7.22' into MVP1.7.22

parents 0a2eccc4 edf7b97c
...@@ -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;
} }
...@@ -942,7 +942,12 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -942,7 +942,12 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
redisUtil.remove(redisKey); redisUtil.remove(redisKey);
return R.failed("数据错误,无金额!"); return R.failed("数据错误,无金额!");
} }
if (Common.isNotNull(main.getFdPayType()) && "报销".equals(main.getFdPayType())) { if (Common.isNotNull(main.getFdPayType())) {
if ("非扣税".equals(main.getFdPayType())) {
tableName = "ekp_75edcee9b5e4b198035a";
wxNoPre = "FKS";
title = "非扣税";
} else if ("报销".equals(main.getFdPayType())) {
if ("行政报销".equals(main.getFdAttaName())) { if ("行政报销".equals(main.getFdAttaName())) {
wxNoPre = "XZBX"; wxNoPre = "XZBX";
tableName = "ekp_6f55b508bcf492cae93d"; tableName = "ekp_6f55b508bcf492cae93d";
...@@ -957,6 +962,40 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -957,6 +962,40 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
tableName = "ekp_af0fda0b28888440fa17"; tableName = "ekp_af0fda0b28888440fa17";
} }
title = main.getFdAttaName(); title = main.getFdAttaName();
} else if ("借款".equals(main.getFdPayType())) {
tableName = "ekp_9d8eee36fd349447c958";
wxNoPre = "JK";
title = main.getFdAttaName();
} else if ("招投标".equals(main.getFdPayType())) {
if ("投标报名".equals(main.getFdAttaName())) {
wxNoPre = "TBBM";
tableName = "ekp_tb_baoming";
} else if ("投标报名费".equals(main.getFdAttaName())) {
wxNoPre = "TBBMF";
tableName = "ekp_99493c3e8584927b62ce";
} else if ("投标申请".equals(main.getFdAttaName())) {
// 一对多
wxNoPre = "TBSQ";
tableName = "ekp_472f808ce1a48769e034";
} else if ("投标保证金".equals(main.getFdAttaName())) {
// 一对多
wxNoPre = "TBBZJ";
tableName = "ekp_4f931cc3005124ab69f3";
} else if ("代理服务费".equals(main.getFdAttaName())) {
wxNoPre = "DLFWF";
tableName = "ekp_4fef920b62bda415681a";
} else if ("专家评审费".equals(main.getFdAttaName())) {
wxNoPre = "ZJPSF";
tableName = "ekp_436a2f7398af04d6a875";
} else if ("履约保证金".equals(main.getFdAttaName())) {
wxNoPre = "LYBZJ";
tableName = "ekp_2b0a7b8fd804f22a0c64";
} else if ("业务支撑费".equals(main.getFdAttaName())) {
wxNoPre = "YWZCF";
tableName = "ekp_436a2f7398af04d6a875";
}
title = main.getFdAttaName();
}
} }
int count = ekpBankGrantDetailService.getCountByIdAndMain(fdId); int count = ekpBankGrantDetailService.getCountByIdAndMain(fdId);
String totalAmt = String.valueOf(BigDecimalUtils.safeMultiply(main.getFdMoney(), new BigDecimal("100"), 0)); String totalAmt = String.valueOf(BigDecimalUtils.safeMultiply(main.getFdMoney(), new BigDecimal("100"), 0));
...@@ -1032,19 +1071,48 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -1032,19 +1071,48 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
redisUtil.remove(redisKey); redisUtil.remove(redisKey);
return R.failed("未找到主表数据!"); return R.failed("未找到主表数据!");
} }
if (Common.isNotNull(main.getFdPayType()) && "报销".equals(main.getFdPayType())) { if (Common.isNotNull(main.getFdPayType())) {
if ("非扣税".equals(main.getFdPayType())) {
wxNoPre = "FKS";
title = "非扣税";
} else if ("报销".equals(main.getFdPayType())) {
if ("行政报销".equals(main.getFdAttaName())) { if ("行政报销".equals(main.getFdAttaName())) {
wxNoPre = "XZBXMX"; wxNoPre = "XZBX";
} else if ("业务报销".equals(main.getFdAttaName())) { } else if ("业务报销".equals(main.getFdAttaName())) {
wxNoPre = "YWBXMX"; wxNoPre = "YWBX";
} else if ("项目报销".equals(main.getFdAttaName())) { } else if ("项目报销".equals(main.getFdAttaName())) {
wxNoPre = "XMBXMX"; wxNoPre = "XMBX";
} else if ("差旅费报销".equals(main.getFdAttaName())) { } else if ("差旅费报销".equals(main.getFdAttaName())) {
wxNoPre = "CLFBXMX"; wxNoPre = "CLFBX";
}
title = main.getFdAttaName();
} else if ("借款".equals(main.getFdPayType())) {
wxNoPre = "JK";
title = main.getFdAttaName();
} else if ("招投标".equals(main.getFdPayType())) {
if ("投标报名".equals(main.getFdAttaName())) {
wxNoPre = "TBBM";
} else if ("投标报名费".equals(main.getFdAttaName())) {
wxNoPre = "TBBMF";
} else if ("投标申请".equals(main.getFdAttaName())) {
// 一对多
wxNoPre = "TBSQ";
} else if ("投标保证金".equals(main.getFdAttaName())) {
// 一对多
wxNoPre = "TBBZJ";
} else if ("代理服务费".equals(main.getFdAttaName())) {
wxNoPre = "DLFWF";
} else if ("专家评审费".equals(main.getFdAttaName())) {
wxNoPre = "ZJPSF";
} else if ("履约保证金".equals(main.getFdAttaName())) {
wxNoPre = "LYBZJ";
} else if ("业务支撑费".equals(main.getFdAttaName())) {
wxNoPre = "YWZCF";
} }
title = main.getFdAttaName(); title = main.getFdAttaName();
} }
} }
}
String totalAmt = String.valueOf(BigDecimalUtils.safeMultiply(detail.getFdMoney(), new BigDecimal("100"), 0)); String totalAmt = String.valueOf(BigDecimalUtils.safeMultiply(detail.getFdMoney(), new BigDecimal("100"), 0));
String totalCount = "1"; String totalCount = "1";
String refNo = detail.getFdAttaId(); String refNo = detail.getFdAttaId();
...@@ -1399,6 +1467,8 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -1399,6 +1467,8 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
String statusRemark; String statusRemark;
// 终结态:失败6/8/41或成功7 // 终结态:失败6/8/41或成功7
String failStatus = "41"; String failStatus = "41";
String fdPayTypeFks = "非扣税";
String fdPayTypeFksDefailt = "转账";
int i = 0; int i = 0;
if (mainList != null && !mainList.isEmpty()) { if (mainList != null && !mainList.isEmpty()) {
EkpBankPayTask main; EkpBankPayTask main;
...@@ -1410,9 +1480,15 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -1410,9 +1480,15 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
boolean isShouQuanCheck = true; boolean isShouQuanCheck = true;
for (EkpBankResultVo vo : mainList) { for (EkpBankResultVo vo : mainList) {
if (Common.isNotNull(vo.getFdPayType()) && "报销".equals(vo.getFdPayType())) { if (Common.isNotNull(vo.getFdPayType())) {
if (fdPayTypeFks.equals(vo.getFdPayType())) {
title = fdPayTypeFksDefailt;
} else {
title = vo.getFdPayType(); title = vo.getFdPayType();
} }
} else {
title = fdPayTypeFksDefailt;
}
seqNo = seqNoPre + System.currentTimeMillis() + (i++); seqNo = seqNoPre + System.currentTimeMillis() + (i++);
responseV1 = icbcTransactionFlowQueryService.getResultNoTax(vo, tranDate, tranTime, seqNo, client); responseV1 = icbcTransactionFlowQueryService.getResultNoTax(vo, tranDate, tranTime, seqNo, client);
if (Common.isNotNull(responseV1)) { if (Common.isNotNull(responseV1)) {
...@@ -1559,9 +1635,15 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -1559,9 +1635,15 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
// 初始化 // 初始化
i = 0; i = 0;
for (EkpBankResultVo vo : detailList) { for (EkpBankResultVo vo : detailList) {
if (Common.isNotNull(vo.getFdPayType()) && "报销".equals(vo.getFdPayType())) { if (Common.isNotNull(vo.getFdPayType())) {
if (fdPayTypeFks.equals(vo.getFdPayType())) {
title = fdPayTypeFksDefailt;
} else {
title = vo.getFdPayType(); title = vo.getFdPayType();
} }
} else {
title = fdPayTypeFksDefailt;
}
seqNo = seqNoPre + System.currentTimeMillis() + (i++); seqNo = seqNoPre + System.currentTimeMillis() + (i++);
responseV1 = icbcTransactionFlowQueryService.getResultNoTax(vo, tranDate, tranTime, seqNo, client); responseV1 = icbcTransactionFlowQueryService.getResultNoTax(vo, tranDate, tranTime, seqNo, client);
...@@ -2105,7 +2187,9 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -2105,7 +2187,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 +2215,16 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -2131,6 +2215,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 +2232,18 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -2138,6 +2232,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);
......
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
,count(d.fd_id) num,a.fd_bank_name fdBankName,a.fd_bank_no fdBankNo,a.fd_bank_account fdBankAccount ,count(d.fd_id) num,a.fd_bank_name fdBankName,a.fd_bank_no fdBankNo,a.fd_bank_account fdBankAccount
,a.fd_grant_num fdGrantNum,a.fd_atta_src fdAttaSrc,a.fd_pay_type fdPayType ,a.fd_grant_num fdGrantNum,a.fd_atta_src fdAttaSrc,a.fd_pay_type fdPayType
from ekp_bank_pay_task a left join ekp_bank_grant_detail d on a.fd_id = d.fd_parent_id from ekp_bank_pay_task a left join ekp_bank_grant_detail d on a.fd_id = d.fd_parent_id
where a.fd_grant_status = '发放中' and a.fd_pay_type in ("非扣税","报销") where a.fd_grant_status = '发放中' and a.fd_pay_type != '工资'
GROUP BY a.fd_id GROUP BY a.fd_id
</select> </select>
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
,'1' num,a.fd_bank_name fdBankName,a.fd_bank_no fdBankNo,a.fd_bank_account fdBankAccount,d.fd_payee_name fdPayeeName ,'1' num,a.fd_bank_name fdBankName,a.fd_bank_no fdBankNo,a.fd_bank_account fdBankAccount,d.fd_payee_name fdPayeeName
,d.fd_grant_num fdGrantNum,d.fd_recipient_bank fdRecipientBank,d.fd_atta_src fdAttaSrc,d.fd_money fdMoney,a.fd_pay_type fdPayType ,d.fd_grant_num fdGrantNum,d.fd_recipient_bank fdRecipientBank,d.fd_atta_src fdAttaSrc,d.fd_money fdMoney,a.fd_pay_type fdPayType
from ekp_bank_grant_detail d left join ekp_bank_pay_task a on a.fd_id = d.fd_parent_id from ekp_bank_grant_detail d left join ekp_bank_pay_task a on a.fd_id = d.fd_parent_id
where a.fd_grant_status = '已发放' and d.fd_grant_status = '发放失败' and d.fd_handle_status = '发放中' and a.fd_pay_type in ("非扣税","报销") where a.fd_grant_status = '已发放' and d.fd_grant_status = '发放失败' and d.fd_handle_status = '发放中' and a.fd_pay_type != '工资'
</select> </select>
......
...@@ -133,8 +133,9 @@ ...@@ -133,8 +133,9 @@
<!--查询所有需要查询的单号-主表--> <!--查询所有需要查询的单号-主表-->
<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
where a.fd_pay_type in ('非扣税','报销') and a.fd_atta_src is not null LEFT JOIN ekp_bank_grant_log l on l.fd_batch_number=a.fd_wx_no
where a.fd_pay_type != '工资' 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 (
select 1 from ekp_bank_atta b where b.fd_link_type='4' and a.fd_wx_no=b.fd_link_id select 1 from ekp_bank_atta b where b.fd_link_type='4' and a.fd_wx_no=b.fd_link_id
...@@ -143,9 +144,10 @@ ...@@ -143,9 +144,10 @@
<!--查询所有需要查询的单号-明细表--> <!--查询所有需要查询的单号-明细表-->
<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
where m.fd_pay_type in ('非扣税','报销') and a.fd_atta_src is not null LEFT JOIN ekp_bank_grant_log l on l.fd_batch_number=a.fd_wx_no
where m.fd_pay_type != '工资' 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 (
select 1 from ekp_bank_atta b where b.fd_link_type='4' and a.fd_wx_no=b.fd_link_id select 1 from ekp_bank_atta b where b.fd_link_type='4' and a.fd_wx_no=b.fd_link_id
......
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