Commit 3defdec6 authored by hongguangwu's avatar hongguangwu

1.7.20-非扣税银企

parent 92bb4f0f
......@@ -695,6 +695,9 @@ public interface CommonConstants {
String GU_DING = "gu_ding";
// 税友、关键字里的户:
String HU_CORE = "_户户_";
// 币种:ISO币种,仅支持人民币
String CNY = "CNY";
String ICBC_NAME = "工商";
// 前端客服角色ID(全服管理者)
long CS_ROLE_ID = 1839501715787390978L;
......
......@@ -226,7 +226,7 @@ public class EkpBankPayTask {
@Schema(description = "附件资源路径")
private String fdAttaSrc;
/**
* 附件下载次数
* 附件下载次数(非扣税10对公11对私)
*/
@ExcelAttribute(name = "附件下载次数")
@ExcelProperty("附件下载次数")
......
......@@ -4,8 +4,11 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.icbc.api.IcbcApiException;
import com.yifu.cloud.plus.v1.ekp.entity.EkpBankCodeSet;
import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo;
import com.yifu.cloud.plus.v1.ekp.vo.EkpBankExcelVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import java.util.List;
/**
* 聚富通到账通知交易流水查询
*
......@@ -48,6 +51,11 @@ public interface IcbcTransactionFlowQueryService extends IService<EkpSocialInfo>
R executePayment();
// 工行非税支付
// type 0 对公; 1 对私.
R<String> submitIcbcToNoTax(String totalAmt, String totalCount, String wxNo
, List<EkpBankExcelVo> detailList, int type, String fdId);
R submitSearch();
}
......@@ -542,12 +542,24 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
private EkpBankAtta getNewFileCore(String fdId, String type, EkpBankAttaReturnVo vo, List<EkpBankExcelVo> list
, Map<String, EkpBankCodeConfiglVo> bankMap) {
EkpBankCodeSet codeSet;
R<EkpBankCodeSet> bankInfoQuery;
EkpBankCodeConfiglVo bankVo;
// 组装
initFdRecipientBankCodeAndName(list, bankMap);
String batchNo = "WX" + new Date().getTime();
String cur = ekpBankGrantDetailService.getWxNoByWxNo(batchNo);
if (Common.isNotNull(cur)) {
batchNo = "WX" + new Date().getTime();
}
// 组装、上传文件
return getEkpBankAttaVo(batchNo, vo, fdId, Integer.parseInt(type), list);
}
// 初始化收款银行行号和行名
private void initFdRecipientBankCodeAndName(List<EkpBankExcelVo> list, Map<String, EkpBankCodeConfiglVo> bankMap) {
//工行的卡号bin list
List<String> binList = baseMapper.getAllIcbcCardBinInfo();
EkpBankCodeSet codeSet;
EkpBankCodeConfiglVo bankVo;
R<EkpBankCodeSet> bankInfoQuery;
for (EkpBankExcelVo excelVo : list) {
if (Common.isEmpty(excelVo.getFdRecipientBankCode())) {
//工行的卡号通过bin来判断,如果是工行的卡号,则不需要行名行号
......@@ -582,13 +594,6 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
}
}
}
String batchNo = "WX" + new Date().getTime();
String cur = ekpBankGrantDetailService.getWxNoByWxNo(batchNo);
if (Common.isNotNull(cur)) {
batchNo = "WX" + new Date().getTime();
}
// 组装、上传文件
return getEkpBankAttaVo(batchNo, vo, fdId, Integer.parseInt(type), list);
}
......@@ -838,6 +843,8 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
redisUtil.set(redisKey, 600L);
}
try {
// 获取配置的行号
Map<String, EkpBankCodeConfiglVo> bankMap = ekpBankGrantDetailService.getEkpBankCodeConfiglVo();
// 1主表
if (CommonConstants.ONE_STRING.equals(type)) {
EkpBankPayTask main = ekpBankPayTaskService.getById(fdId);
......@@ -857,10 +864,25 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
String totalAmt = String.valueOf(BigDecimalUtils.safeMultiply(main.getFdMoney(), new BigDecimal("100"), 0));
String totalCount = String.valueOf(count);
String wxNo = main.getFdWxNo();
String url = main.getFdAttaName();
String mdCode = main.getFdMdCode();
// TODO -真正的发放接口需要改造
R<String> returnR = submitIcbcTransactionFlow(totalAmt, totalCount, wxNo, url, mdCode);
if (Common.isEmpty(wxNo)) {
wxNo = "FKS" + new Date().getTime();
String cur = ekpBankGrantDetailService.getWxNoByWxNo(wxNo);
if (Common.isNotNull(cur)) {
wxNo = "FKS" + new Date().getTime();
}
main.setFdWxNo(wxNo);
// 更新wxno
ekpBankPayTaskService.updateById(main);
}
List<EkpBankExcelVo> detailList = ekpBankGrantDetailService.getEkpBankExcelVoByIdAndMain(fdId);
// 初始化收款银行行号和行名
initFdRecipientBankCodeAndName(detailList, bankMap);
// 0对公1对私
int noTaxPayType = CommonConstants.ZERO_INT;
if (Common.isNotNull(main.getFdDownloadNum()) && 11 == main.getFdDownloadNum()) {
noTaxPayType = CommonConstants.ONE_INT;
}
R<String> returnR = icbcTransactionFlowQueryService.submitIcbcToNoTax(totalAmt, totalCount, wxNo, detailList, noTaxPayType, fdId);
if (returnR.getCode() == CommonConstants.SUCCESS) {
// 存储日志
saveIcbcLogBaseInfoBySumbit(returnR.getData(), wxNo + "_main", fdId);
......@@ -895,9 +917,22 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
String totalAmt = String.valueOf(BigDecimalUtils.safeMultiply(detail.getFdMoney(), new BigDecimal("100"), 0));
String totalCount = "1";
String wxNo = detail.getFdWxNo();
String url = detail.getFdAttaName();
String mdCode = detail.getFdMdCode();
R<String> returnR = submitIcbcTransactionFlow(totalAmt, totalCount, wxNo, url, mdCode);
if (Common.isEmpty(wxNo)) {
wxNo = "FKSMX" + new Date().getTime();
String cur = ekpBankGrantDetailService.getWxNoByWxNo(wxNo);
if (Common.isNotNull(cur)) {
wxNo = "FKSMX" + new Date().getTime();
}
detail.setFdWxNo(wxNo);
ekpBankGrantDetailService.updateById(detail);
}
// 0对公1对私
int noTaxPayType = CommonConstants.ZERO_INT;
if (Common.isNotNull(detail.getFdDownloadNum()) && 11 == detail.getFdDownloadNum()) {
noTaxPayType = CommonConstants.ONE_INT;
}
List<EkpBankExcelVo> detailList = ekpBankGrantDetailService.getEkpBankExcelVoByIdAndDetail(fdId);
R<String> returnR = icbcTransactionFlowQueryService.submitIcbcToNoTax(totalAmt, totalCount, wxNo, detailList, noTaxPayType, fdId);
if (returnR.getCode() == CommonConstants.SUCCESS) {
// 存储日志
saveIcbcLogBaseInfoBySumbit(returnR.getData(), wxNo, fdId);
......
......@@ -156,8 +156,9 @@ public class TEmployeeInsurancePre extends BaseEntity {
@JsonIgnore
private LocalDateTime errorTime;
// TEmployeeInsurancePre.processStatus = "状态,0待确认,1待派单,2派单失败,3待投保,4投保中,5投保退回,6已完成,7待缴费"
@TableField(exist = false)
@Schema(description = "修改类型:1新增;2修改;3删除;4状态346为不可编辑")
@Schema(description = "修改类型:1新增;2修改;3删除;4状态3467为不可编辑")
private String modelType;
/**
* 是否拒绝入职: 0 是 1 否
......
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