Commit fd245cd7 authored by hongguangwu's avatar hongguangwu

MVP1.7.2 顺序

parent 5b0cc50c
......@@ -301,6 +301,25 @@ public class DateUtil {
}
}
public static Date stringToDateByFormat(String dateText, String format) {
if (dateText == null) {
return null;
}
try {
// 兼容多格式,格式化为没有分隔符的格式:
if (format == null) {
format = ISO_DATE_FORMAT;
}
DateFormat df = new SimpleDateFormat(format);
df.setLenient(false);
return df.parse( dateText.replace("/","").replace("-","")
.replace(CommonConstants.YEAR,"").replace(CommonConstants.MONTH,"")
.replace(CommonConstants.DAY,""));
} catch (ParseException e) {
return null;
}
}
/**
* @Description: 格式化字符串日期
* @Author: hgw
......
......@@ -27,6 +27,8 @@ public class EkpBankResultVo implements Serializable {
private String fdBankAccount;
@Schema(description = "收款人名称")
private String fdPayeeName;
@Schema(description = "收款银行")
private String fdRecipientBank;
private Integer fdGrantNum;
private Integer fdFailNum;
......
......@@ -850,7 +850,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
// 交易时间
if (Common.isNotNull(data.getCompanyHandleTime())) {
logs.setFdTransactionTime(DateUtil.stringToDate(data.getCompanyHandleTime(), DateUtil.DATETIME_PATTERN_SECOND));
logs.setFdTransactionTime(DateUtil.stringToDateByFormat(data.getCompanyHandleTime(), DateUtil.DATETIME_PATTERN_SECOND));
}
money = BigDecimalUtils.safeDivide(new BigDecimal(data.getPayamt()), new BigDecimal("100"), 2);
moneyAll = BigDecimalUtils.safeAdd(moneyAll, money);
......@@ -861,6 +861,8 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
if (detailData != null) {
// 收款人名称
logDetail.setFdPayee(detailData.getFdPayeeName());
// 收款银行
logDetail.setFdRecipientBank(detailData.getFdRecipientBank());
if ("02".equals(data.getResult())) {
moneySuccess = BigDecimalUtils.safeAdd(moneySuccess, money);
numSuccess++;
......@@ -963,12 +965,16 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
logs.setFdTransactionFailTotal(0);
// 成功总笔数
logs.setFdTransactionSuccessTotal(0);
// 交易时间
if (Common.isNotNull(data.getCompanyHandleTime())) {
logs.setFdTransactionTime(DateUtil.stringToDateByFormat(data.getCompanyHandleTime(), DateUtil.DATETIME_PATTERN_SECOND));
}
// 初始化日志明细
logDetail = setLogDetailBaseInfo(logs, money, vo, data);
// 收款人名称
logDetail.setFdPayee(vo.getFdPayeeName());
logDetail.setFdRecipientBank(vo.getFdRecipientBank());
ekpBankGrantLogDetailService.save(logDetail);
detailData = new EkpBankGrantDetail();
detailData.setFdParentId(vo.getFdId());
......@@ -1057,8 +1063,6 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
// 指令状态
logDetail.setFdCommandStatus(STATUS_MAP.get(data.getResult()));
logDetail.setFdParentId(logs.getFdId());
// 收款银行
logDetail.setFdRecipientBank(vo.getFdBankName());
logDetail.setFdMoney(money);
// 收款账号
logDetail.setFdPayeeAccount(data.getRecDepAcc());
......
......@@ -119,7 +119,7 @@
<select id="getListByParentId" resultMap="ekpBankGrantDetailMap">
select
a.fd_id,a.fd_salary_id,a.fd_serial_number,a.fd_payee_name
a.fd_id,a.fd_salary_id,a.fd_serial_number,a.fd_payee_name,a.fd_recipient_bank
from ekp_bank_grant_detail a where a.fd_parent_id = #{fdParentId}
</select>
......
......@@ -99,7 +99,7 @@
<select id="getEkpBankMainByNeedResultDetail" resultType="com.yifu.cloud.plus.v1.ekp.vo.EkpBankResultVo">
select d.fd_id fdId,d.fd_wx_no fdWxNo,d.fd_parent_id fdParentId,d.fd_fail_num fdFailNum,d.fd_salary_id fdSalaryId
,'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_grant_num fdGrantNum,d.fd_recipient_bank fdRecipientBank
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 = '发放中'
</select>
......
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