Commit 17e10b01 authored by hongguangwu's avatar hongguangwu

MVP1.7.2 工行5次提交_定时任务

parent 72c5e8f5
......@@ -221,4 +221,10 @@ public class EkpBankGrantDetail {
@Schema(description = "MD码")
private String fdMdCode;
@ExcelAttribute(name = "工资明细ID", maxLength = 36)
@Length(max = 36, message = "工资明细ID不能超过36个字符")
@ExcelProperty("工资明细ID")
@Schema(description = "工资明细ID,用来同步中信银行状态")
private String fdSalaryId;
}
......@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.ekp.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
......@@ -27,7 +28,10 @@ import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
/**
* 发放日志(银企付款任务)
......@@ -64,14 +68,6 @@ public class EkpBankGrantLog {
@ExcelProperty("代发批次号")
@Schema(description = "代发批次号")
private String fdBatchNumber;
/**
* 代发批次号ID:跳转使用
*/
@ExcelAttribute(name = "代发批次号ID:跳转使用", maxLength = 36)
@Length(max = 36, message = "代发批次号ID:跳转使用不能超过36个字符")
@ExcelProperty("代发批次号ID:跳转使用")
@Schema(description = "代发批次号ID:跳转使用")
private String fdBatchNumberId;
/**
* 批量包名称
*/
......@@ -125,28 +121,28 @@ public class EkpBankGrantLog {
@ExcelAttribute(name = "交易时间", isDate = true)
@ExcelProperty("交易时间")
@Schema(description = "交易时间")
private LocalDateTime fdTransactionTime;
private Date fdTransactionTime;
/**
* 成功总金额
*/
@ExcelAttribute(name = "成功总金额")
@ExcelProperty("成功总金额")
@Schema(description = "成功总金额")
private Double fdSuccessFee;
private BigDecimal fdSuccessFee;
/**
* 失败总金额
*/
@ExcelAttribute(name = "失败总金额")
@ExcelProperty("失败总金额")
@Schema(description = "失败总金额")
private Double fdFailFee;
private BigDecimal fdFailFee;
/**
* 总金额
*/
@ExcelAttribute(name = "总金额")
@ExcelProperty("总金额")
@Schema(description = "总金额")
private Double fdSumFee;
private BigDecimal fdSumFee;
/**
* 总笔数
*/
......
......@@ -27,6 +27,7 @@ import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
/**
* 发放日志明细(银企付款任务)
......@@ -77,7 +78,7 @@ public class EkpBankGrantLogDetail {
@ExcelAttribute(name = "金额")
@ExcelProperty("金额")
@Schema(description = "金额")
private Double fdMoney;
private BigDecimal fdMoney;
/**
* 收款银行
*/
......
package com.yifu.cloud.plus.v1.ekp.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
......@@ -16,5 +17,17 @@ public class EkpBankResultVo implements Serializable {
private String fdId;
private String fdParentId;
private String fdWxNo;
private String fdSalaryId;
@Schema(description = "付款银行名称")
private String fdBankName;
@Schema(description = "付款银行开户行")
private String fdBankNo;
@Schema(description = "付款银行账户")
private String fdBankAccount;
@Schema(description = "收款人名称")
private String fdPayeeName;
private Integer fdFailNum;
private Integer num;
}
......@@ -51,6 +51,11 @@ public interface EkpBankGrantDetailMapper extends BaseMapper<EkpBankGrantDetail>
// 主表拒绝授权时,批量更新明细表为发放失败,原因为拒绝授权
void updateStatusByGrantFail(@Param("fdParentId") String fdParentId);
// 发放失败,批量更新中信银行交易流水表fd_3b148bc0c28e48为失败,根据 工资明细fdId:fd_3b1fe00b0f5dde
void updateZhongXinStatus(@Param("salaryIdList") List<String> salaryIdList);
// 发放失败,批量更新中信银行交易流水Model表fd_3b148bc0c28e48为失败,根据 工资明细fdId:fd_3b1fe00b0f5dde
void updateZhongXinMainStatus(@Param("salaryIdList") List<String> salaryIdList);
// 获取明细表ID来更新状态
List<EkpBankGrantDetail> getListByParentId(@Param("fdParentId") String fdParentId);
......
......@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.ekp.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.ekp.entity.EkpBankGrantDetail;
import com.yifu.cloud.plus.v1.ekp.vo.EkpBankExcelVo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......@@ -46,6 +47,11 @@ public interface EkpBankGrantDetailService extends IService<EkpBankGrantDetail>
// 主表发放时,更新明细表的发放时间与状态
void updateStatusByGrant(String fdParentId);
// 发放失败,批量更新中信银行交易流水表fd_3b148bc0c28e48为失败,根据 工资明细fdId:fd_3b1fe00b0f5dde
void updateZhongXinStatus(List<String> salaryIdList);
void updateZhongXinMainStatus(List<String> salaryIdList);
// 主表拒绝授权时,批量更新明细表为发放失败,原因为拒绝授权
void updateStatusByGrantFail(String fdParentId);
......
......@@ -62,6 +62,18 @@ public class EkpBankGrantDetailServiceImpl extends ServiceImpl<EkpBankGrantDetai
baseMapper.updateStatusByGrant(fdParentId);
}
// 发放失败,批量更新中信银行交易流水表fd_3b148bc0c28e48为失败,根据 工资明细fdId:fd_3b1fe00b0f5dde
@Override
public void updateZhongXinStatus(List<String> salaryIdList) {
baseMapper.updateZhongXinStatus(salaryIdList);
}
// 发放失败,批量更新中信银行交易流水表fd_3b148bc0c28e48为失败,根据 工资明细fdId:fd_3b1fe00b0f5dde
@Override
public void updateZhongXinMainStatus(List<String> salaryIdList) {
baseMapper.updateZhongXinMainStatus(salaryIdList);
}
@Override
public void updateStatusByGrantFail(String fdParentId) {
baseMapper.updateStatusByGrantFail(fdParentId);
......
......@@ -49,6 +49,7 @@
<result property="fdEmpPhone" column="fd_emp_phone"/>
<result property="fdWxNo" column="fd_wx_no"/>
<result property="fdMdCode" column="fd_md_dcode"/>
<result property="fdSalaryId" column="fd_salary_id"/>
</resultMap>
<sql id="Base_Excel_Sql">
......@@ -118,8 +119,35 @@
<select id="getListByParentId" resultMap="ekpBankGrantDetailMap">
select
a.fd_id,fd_serial_number
a.fd_id,a.fd_salary_id,fd_serial_number
from ekp_bank_grant_detail a where a.fd_parent_id = #{fdParentId}
</select>
<!-- 发放失败,批量更新中信银行交易流水表fd_3b148bc0c28e48为失败,根据 工资明细fdId:fd_3b1fe00b0f5dde -->
<update id="updateZhongXinStatus">
update ekp_db4ed54e25543f4b7a9a a
set a.fd_3b148bc0c28e48='失败',a.fd_3c754f2a7125a0 = '1183b0b84ee4f581bba001c47a78b2d9',fd_3c754a976ddde2=now()
where
<if test="salaryIdList != null and salaryIdList.size() > 0">
a.fd_3b1fe00b0f5dde in
<foreach collection="salaryIdList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</update>
<!-- 发放失败,批量更新中信银行交易流水Model表fd_3b148bc0c28e48为失败,根据 工资明细fdId:fd_3b1fe00b0f5dde -->
<update id="updateZhongXinMainStatus">
UPDATE modeling_simple_main a
JOIN ekp_db4ed54e25543f4b7a9a b on a.fd_id=b.fd_id
SET a.extend_data_xml=JSON_SET(a.extend_data_xml,'$[1].fd_3b148bc0c28e48', '失败', '$[1].fd_3c754f2a7125a0', '1183b0b84ee4f581bba001c47a78b2d9','$[1].fd_3c754a976ddde2', now())
where
<if test="salaryIdList != null and salaryIdList.size() > 0">
b.fd_3b56782982b8b2 in
<foreach collection="salaryIdList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</update>
</mapper>
......@@ -26,7 +26,6 @@
<resultMap id="ekpBankGrantLogMap" type="com.yifu.cloud.plus.v1.ekp.entity.EkpBankGrantLog">
<id property="fdId" column="fd_id"/>
<result property="fdBatchNumber" column="fd_batch_number"/>
<result property="fdBatchNumberId" column="fd_batch_number_id"/>
<result property="fdBatchPackage" column="fd_batch_package"/>
<result property="fdPaymentAccount" column="fd_payment_account"/>
<result property="fdDrawee" column="fd_drawee"/>
......@@ -44,7 +43,6 @@
<sql id="Base_Column_List">
a.fd_id,
a.fd_batch_number,
a.fd_batch_number_id,
a.fd_batch_package,
a.fd_payment_account,
a.fd_drawee,
......
......@@ -87,7 +87,8 @@
<!-- 获取发放中的主表,查询结果 -->
<select id="getEkpBankMainByNeedResultMain" resultType="com.yifu.cloud.plus.v1.ekp.vo.EkpBankResultVo">
select a.fd_id fdId,a.fd_wx_no fdWxNo,count(d.fd_id) num
select a.fd_id fdId,a.fd_wx_no fdWxNo
,count(d.fd_id) num,a.fd_bank_name fdBankName,a.fd_bank_no fdBankNo,a.fd_bank_account fdBankAccount,d.fd_payee_name fdPayeeName
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 = '发放中'
GROUP BY a.fd_id
......@@ -95,7 +96,8 @@
<!-- 获取发放中的明细表,查询结果 -->
<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,'1' num
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
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