Commit 0a42447c authored by hongguangwu's avatar hongguangwu

MVP1.7.2 工行3次提交_下载

parent 70f40dba
...@@ -541,6 +541,7 @@ public interface CommonConstants { ...@@ -541,6 +541,7 @@ public interface CommonConstants {
public static final String PARAM_INFO_ERROR = "传参有误!"; public static final String PARAM_INFO_ERROR = "传参有误!";
public static final String XLS = ".xls";
public static final String XLSX = ".xlsx"; public static final String XLSX = ".xlsx";
public static final String ERROR_IMPORT = "执行异常"; public static final String ERROR_IMPORT = "执行异常";
// 权限使用的 // 权限使用的
......
...@@ -1624,6 +1624,18 @@ public class DateUtil { ...@@ -1624,6 +1624,18 @@ public class DateUtil {
return sf.format(new Date()); return sf.format(new Date());
} }
/**
* @Description: 返回当前年月日时分秒字符串(一般用在导出文件名)
* @Description: 不含-
* @Author: hgw
* @Date: 2024-11-20 16:21:45
* @return: java.lang.String
**/
public static String getThisTimeNoLine(){
SimpleDateFormat sf = new SimpleDateFormat(DateUtil.DATE_PATTERN);
return sf.format(new Date());
}
/** /**
* @param * @param
......
...@@ -108,4 +108,21 @@ public class EkpBankAtta { ...@@ -108,4 +108,21 @@ public class EkpBankAtta {
@ExcelProperty("创建时间") @ExcelProperty("创建时间")
private LocalDateTime fdCreateTime; private LocalDateTime fdCreateTime;
/**
* @Description: 生成mdCode码
* @Author: hgw
* @Date: 2024/11/20 16:07
* @return:
**/
@TableField(exist = false)
private String mdCode;
/**
* @Description: 批次号
* @Author: hgw
* @Date: 2024/11/20 16:07
* @return:
**/
@TableField(exist = false)
private String wxNo;
} }
...@@ -209,4 +209,16 @@ public class EkpBankGrantDetail { ...@@ -209,4 +209,16 @@ public class EkpBankGrantDetail {
@Schema(description = "收款账户短信通知手机号码") @Schema(description = "收款账户短信通知手机号码")
private String fdEmpPhone; private String fdEmpPhone;
@ExcelAttribute(name = "批次号", maxLength = 36)
@Length(max = 36, message = "批次号不能超过36个字符")
@ExcelProperty("批次号")
@Schema(description = "批次号")
private String fdWxNo;
@ExcelAttribute(name = "MD码", maxLength = 100)
@Length(max = 100, message = "MD码不能超过100个字符")
@ExcelProperty("MD码")
@Schema(description = "MD码")
private String fdMdCode;
} }
...@@ -251,4 +251,16 @@ public class EkpBankPayTask { ...@@ -251,4 +251,16 @@ public class EkpBankPayTask {
@Schema(description = "备注信息") @Schema(description = "备注信息")
private String fdCoverRemark; private String fdCoverRemark;
@ExcelAttribute(name = "批次号", maxLength = 36)
@Length(max = 36, message = "批次号不能超过36个字符")
@ExcelProperty("批次号")
@Schema(description = "批次号")
private String fdWxNo;
@ExcelAttribute(name = "MD码", maxLength = 100)
@Length(max = 100, message = "MD码不能超过100个字符")
@ExcelProperty("MD码")
@Schema(description = "MD码")
private String fdMdCode;
} }
...@@ -99,6 +99,7 @@ ...@@ -99,6 +99,7 @@
<artifactId>yifu-common-ekp</artifactId> <artifactId>yifu-common-ekp</artifactId>
<version>1.0.0</version> <version>1.0.0</version>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
...@@ -107,6 +108,17 @@ ...@@ -107,6 +108,17 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>xls</nonFilteredFileExtension>
<nonFilteredFileExtension>xlsx</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</plugin>
<plugin> <plugin>
<groupId>com.spotify</groupId> <groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId> <artifactId>docker-maven-plugin</artifactId>
......
...@@ -3,14 +3,21 @@ package com.yifu.cloud.plus.v1.ekp.controller; ...@@ -3,14 +3,21 @@ package com.yifu.cloud.plus.v1.ekp.controller;
import com.yifu.cloud.plus.v1.ekp.entity.EkpBankAtta; import com.yifu.cloud.plus.v1.ekp.entity.EkpBankAtta;
import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowIssueService; import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowIssueService;
import com.yifu.cloud.plus.v1.ekp.vo.EkpBankAttaReturnVo; import com.yifu.cloud.plus.v1.ekp.vo.EkpBankAttaReturnVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog; import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/** /**
* 聚富通代发工资相关 * 聚富通代发工资相关
...@@ -93,4 +100,11 @@ public class IcbcTransactionFlowIssueController { ...@@ -93,4 +100,11 @@ public class IcbcTransactionFlowIssueController {
return icbcTransactionFlowIssueService.getIssueFileByFdId(fdId, type); return icbcTransactionFlowIssueService.getIssueFileByFdId(fdId, type);
} }
@Operation(description = "下载文件测试")
@PostMapping("/exportAll")
@SysLog("下载文件测试")
public void exportAll(HttpServletResponse response) {
icbcTransactionFlowIssueService.exportAll(response);
}
} }
...@@ -39,4 +39,6 @@ public interface EkpBankGrantDetailMapper extends BaseMapper<EkpBankGrantDetail> ...@@ -39,4 +39,6 @@ public interface EkpBankGrantDetailMapper extends BaseMapper<EkpBankGrantDetail>
// 查询详情里的1条数据 // 查询详情里的1条数据
List<EkpBankExcelVo> getEkpBankExcelVoByIdAndDetail(@Param("fdId") String fdId); List<EkpBankExcelVo> getEkpBankExcelVoByIdAndDetail(@Param("fdId") String fdId);
String getWxNoByWxNo(@Param("wxNo") String wxNo);
} }
...@@ -35,4 +35,6 @@ public interface EkpBankGrantDetailService extends IService<EkpBankGrantDetail> ...@@ -35,4 +35,6 @@ public interface EkpBankGrantDetailService extends IService<EkpBankGrantDetail>
List<EkpBankExcelVo> getEkpBankExcelVoByIdAndDetail(String fdId); List<EkpBankExcelVo> getEkpBankExcelVoByIdAndDetail(String fdId);
String getWxNoByWxNo(String wxNo);
} }
...@@ -7,6 +7,7 @@ import com.yifu.cloud.plus.v1.ekp.vo.EkpBankAttaReturnVo; ...@@ -7,6 +7,7 @@ import com.yifu.cloud.plus.v1.ekp.vo.EkpBankAttaReturnVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/** /**
* 聚富通代发工资相关 * 聚富通代发工资相关
...@@ -52,4 +53,6 @@ public interface IcbcTransactionFlowIssueService extends IService<EkpSocialInfo> ...@@ -52,4 +53,6 @@ public interface IcbcTransactionFlowIssueService extends IService<EkpSocialInfo>
**/ **/
R<EkpBankAttaReturnVo> getIssueFileByFdId(String fdId, String type); R<EkpBankAttaReturnVo> getIssueFileByFdId(String fdId, String type);
void exportAll(HttpServletResponse response);
} }
...@@ -46,4 +46,9 @@ public class EkpBankGrantDetailServiceImpl extends ServiceImpl<EkpBankGrantDetai ...@@ -46,4 +46,9 @@ public class EkpBankGrantDetailServiceImpl extends ServiceImpl<EkpBankGrantDetai
public List<EkpBankExcelVo> getEkpBankExcelVoByIdAndDetail(String fdId) { public List<EkpBankExcelVo> getEkpBankExcelVoByIdAndDetail(String fdId) {
return baseMapper.getEkpBankExcelVoByIdAndDetail(fdId); return baseMapper.getEkpBankExcelVoByIdAndDetail(fdId);
} }
@Override
public String getWxNoByWxNo(String wxNo) {
return baseMapper.getWxNoByWxNo(wxNo);
}
} }
...@@ -340,17 +340,12 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -340,17 +340,12 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
**/ **/
@Override @Override
public R<EkpBankCodeSet> querybankinfo(String cardNo) { public R<EkpBankCodeSet> querybankinfo(String cardNo) {
// 先查询记录表
EkpBankCodeSet codeSet = ekpBankCodeSetService.getCodeSetByCardNo(cardNo);
if (codeSet != null && Common.isNotNull(codeSet.getFdRecipientBankCode())) {
return R.ok(codeSet);
}
String privateKey = "4d931f6ad4331158fcc4dea23f0d71393328146e40b5f63f197b9f6ad3732f44"; String privateKey = "4d931f6ad4331158fcc4dea23f0d71393328146e40b5f63f197b9f6ad3732f44";
String APIGW_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCMpjaWjngB4E3ATh+G1DVAmQnIpiPEFAEDqRfNGAVvvH35yDetqewKi0l7OEceTMN1C6NPym3zStvSoQayjYV+eIcZERkx31KhtFu9clZKgRTyPjdKMIth/wBtPKjL/5+PYalLdomM4ONthrPgnkN4x4R0+D4+EBpXo8gNiAFsNwIDAQAB"; String APIGW_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCMpjaWjngB4E3ATh+G1DVAmQnIpiPEFAEDqRfNGAVvvH35yDetqewKi0l7OEceTMN1C6NPym3zStvSoQayjYV+eIcZERkx31KhtFu9clZKgRTyPjdKMIth/wBtPKjL/5+PYalLdomM4ONthrPgnkN4x4R0+D4+EBpXo8gNiAFsNwIDAQAB";
// DefaultIcbcClient client = new DefaultIcbcClient("11000000000000019038", IcbcConstants.SIGN_TYPE_CA_SM_ICBC,privateKey, APIGW_PUBLIC_KEY); // DefaultIcbcClient client = new DefaultIcbcClient("11000000000000019038", IcbcConstants.SIGN_TYPE_CA_SM_ICBC,privateKey, APIGW_PUBLIC_KEY)
DefaultIcbcClient client = new DefaultIcbcClient("11000000000000019038", IcbcConstants.SIGN_TYPE_CA_SM_ICBC, privateKey, DefaultIcbcClient client = new DefaultIcbcClient("11000000000000019038", IcbcConstants.SIGN_TYPE_CA_SM_ICBC, privateKey,
IcbcConstants.CHARSET_UTF8, IcbcConstants.FORMAT_JSON, null, IcbcConstants.CHARSET_UTF8, IcbcConstants.FORMAT_JSON, null,
null, null, icbcConfigProperties.getCaSm(), null); null, null, icbcConfigProperties.getCaSm(), null);
...@@ -376,7 +371,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -376,7 +371,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
response = client.execute(request); response = client.execute(request);
if (response.isSuccess()) { if (response.isSuccess()) {
// 业务成功处理-存储起来 // 业务成功处理-存储起来
codeSet = new EkpBankCodeSet(); EkpBankCodeSet codeSet = new EkpBankCodeSet();
codeSet.setFdCreateTime(LocalDateTime.now()); codeSet.setFdCreateTime(LocalDateTime.now());
codeSet.setFdRecipientBankCode(response.getBankCode()); codeSet.setFdRecipientBankCode(response.getBankCode());
codeSet.setFdPayeeAccount(cardNo); codeSet.setFdPayeeAccount(cardNo);
......
...@@ -44,6 +44,11 @@ ...@@ -44,6 +44,11 @@
<result property="fdDownloadNum" column="fd_download_num"/> <result property="fdDownloadNum" column="fd_download_num"/>
<result property="fdFailNum" column="fd_fail_num"/> <result property="fdFailNum" column="fd_fail_num"/>
<result property="fdGrantNum" column="fd_grant_num"/> <result property="fdGrantNum" column="fd_grant_num"/>
<result property="fdParentId" column="fd_parent_id"/>
<result property="fdEmpPhone" column="fd_emp_phone"/>
<result property="fdWxNo" column="fd_wx_no"/>
<result property="fdMdCode" column="fd_md_dcode"/>
</resultMap> </resultMap>
<sql id="Base_Excel_Sql"> <sql id="Base_Excel_Sql">
...@@ -56,18 +61,19 @@ ...@@ -56,18 +61,19 @@
m.fd_bank_name fdBankName, m.fd_bank_name fdBankName,
m.fd_bank_no fdBankNo, m.fd_bank_no fdBankNo,
m.fd_bank_account fdBankAccount, m.fd_bank_account fdBankAccount,
a.fd_recipient_bank fdRecipientBank, ifnull(c.fd_recipient_bank,a.fd_recipient_bank) fdRecipientBank,
'' fdRecipientAdress, '' fdRecipientAdress,
'' fdRecipientBankCode, c.fd_recipient_bank_code fdRecipientBankCode,
'1' payType, '1' payType,
a.fd_payee_account fdPayeeAccount, a.fd_payee_account fdPayeeAccount,
a.fd_payee_name fdPayeeName, a.fd_payee_name fdPayeeName,
a.fd_money fdMoney, concat('',round(a.fd_money * 100,0)) fdMoney,
a.fd_remittance_purpose fdRemittancePurpose, a.fd_remittance_purpose fdRemittancePurpose,
m.fd_cover_remark fdCoverRemark, m.fd_cover_remark fdCoverRemark,
a.fd_emp_phone fdEmpPhone a.fd_emp_phone fdEmpPhone
from ekp_bank_grant_detail a from ekp_bank_grant_detail a
left join ekp_bank_pay_task m on a.fd_parent_id=m.fd_id left join ekp_bank_pay_task m on a.fd_parent_id=m.fd_id
left join ekp_bank_code_set c on c.fd_payee_account=a.fd_payee_account
where a.fd_handle_status = '待发放' where a.fd_handle_status = '待发放'
</sql> </sql>
...@@ -83,4 +89,13 @@ ...@@ -83,4 +89,13 @@
and a.fd_id = #{fdId} and a.fd_id = #{fdId}
</select> </select>
<!-- 查询编号是否重复 -->
<select id="getWxNoByWxNo" resultType="java.lang.String">
select a.fd_wx_no from (
select a.fd_wx_no from ekp_bank_grant_detail a where a.fd_wx_no = #{wxNo}
union all
select a.fd_wx_no from ekp_bank_pay_task a where a.fd_wx_no = #{wxNo}
) a limit 1
</select>
</mapper> </mapper>
...@@ -50,6 +50,10 @@ ...@@ -50,6 +50,10 @@
<result property="fdDownloadNum" column="fd_download_num"/> <result property="fdDownloadNum" column="fd_download_num"/>
<result property="fdFailNum" column="fd_fail_num"/> <result property="fdFailNum" column="fd_fail_num"/>
<result property="fdGrantNum" column="fd_grant_num"/> <result property="fdGrantNum" column="fd_grant_num"/>
<result property="fdCoverRemark" column="fd_cover_remark"/>
<result property="fdWxNo" column="fd_wx_no"/>
<result property="fdMdCode" column="fd_md_dcode"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.fd_id, a.fd_id,
...@@ -77,7 +81,10 @@ ...@@ -77,7 +81,10 @@
a.fd_atta_src, a.fd_atta_src,
a.fd_download_num, a.fd_download_num,
a.fd_fail_num, a.fd_fail_num,
a.fd_grant_num a.fd_grant_num,
a.fd_cover_remark,
a.fd_wx_no,
a.fd_md_dcode
</sql> </sql>
</mapper> </mapper>
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