Commit 637517e4 authored by wangpeng's avatar wangpeng

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

parents b40a2da0 0ec07fc8
......@@ -541,6 +541,7 @@ public interface CommonConstants {
public static final String PARAM_INFO_ERROR = "传参有误!";
public static final String XLS = ".xls";
public static final String XLSX = ".xlsx";
public static final String ERROR_IMPORT = "执行异常";
// 权限使用的
......
......@@ -1624,6 +1624,18 @@ public class DateUtil {
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
......
......@@ -108,4 +108,21 @@ public class EkpBankAtta {
@ExcelProperty("创建时间")
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 {
@Schema(description = "收款账户短信通知手机号码")
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 {
@Schema(description = "备注信息")
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 @@
<artifactId>yifu-common-ekp</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
<build>
......@@ -107,6 +108,17 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</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>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
......
package com.yifu.cloud.plus.v1.ekp.controller;
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.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.vo.YifuUser;
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.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* 聚富通代发工资相关
......@@ -71,9 +79,32 @@ public class IcbcTransactionFlowIssueController {
* @param
* @return
*/
@Operation(summary = "行名行号查询接口", description = "行名行号查询接口")
@Operation(summary = "行名行号查询接口---测试接口,实际接口用代发模块的查询接口", description = "行名行号查询接口")
@PostMapping("/querybankinfo")
public R querybankinfo() {
return icbcTransactionFlowIssueService.querybankinfo();
}
/**
* @param fdId 主键ID
* @param type 类型 1:主表附件;2:明细表附件
* @Description:
* @Author: hgw
* @Date: 2024/11/15 14:51
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.ekp.entity.EkpBankAtta>
**/
@Operation(summary = "获取代发任务附件--EKP调用接口", description = "获取代发任务附件--EKP调用接口")
@SysLog("获取代发任务附件--EKP调用接口")
@GetMapping("/getIssueFileByFdId")
public R<EkpBankAttaReturnVo> getIssueFileByFdId(@RequestParam String fdId, @RequestParam String 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>
// 查询详情里的1条数据
List<EkpBankExcelVo> getEkpBankExcelVoByIdAndDetail(@Param("fdId") String fdId);
String getWxNoByWxNo(@Param("wxNo") String wxNo);
}
......@@ -35,4 +35,6 @@ public interface EkpBankGrantDetailService extends IService<EkpBankGrantDetail>
List<EkpBankExcelVo> getEkpBankExcelVoByIdAndDetail(String fdId);
String getWxNoByWxNo(String wxNo);
}
package com.yifu.cloud.plus.v1.ekp.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.ekp.entity.EkpBankAtta;
import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo;
import com.yifu.cloud.plus.v1.ekp.vo.EkpBankAttaReturnVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* 聚富通代发工资相关
......@@ -40,4 +43,16 @@ public interface IcbcTransactionFlowIssueService extends IService<EkpSocialInfo>
**/
R querybankinfo();
/**
* @param fdId
* @param type 类型 1:主表附件;2:明细表附件
* @Description:
* @Author: hgw
* @Date: 2024/11/18 10:18
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.ekp.entity.EkpBankAtta>
**/
R<EkpBankAttaReturnVo> getIssueFileByFdId(String fdId, String type);
void exportAll(HttpServletResponse response);
}
......@@ -2,6 +2,8 @@ package com.yifu.cloud.plus.v1.ekp.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.icbc.api.IcbcApiException;
import com.icbc.api.response.MybankEnterpriseAccountQuerybankinfoResponseV1;
import com.yifu.cloud.plus.v1.ekp.entity.EkpBankCodeSet;
import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
......@@ -27,6 +29,6 @@ public interface IcbcTransactionFlowQueryService extends IService<EkpSocialInfo>
* @Date: 2024-11-12
* @return: R
**/
R querybankinfo();
R<EkpBankCodeSet> querybankinfo(String cardNo);
}
......@@ -46,4 +46,9 @@ public class EkpBankGrantDetailServiceImpl extends ServiceImpl<EkpBankGrantDetai
public List<EkpBankExcelVo> getEkpBankExcelVoByIdAndDetail(String 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
**/
@Override
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 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,
IcbcConstants.CHARSET_UTF8, IcbcConstants.FORMAT_JSON, null,
null, null, icbcConfigProperties.getCaSm(), null);
......@@ -376,7 +371,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
response = client.execute(request);
if (response.isSuccess()) {
// 业务成功处理-存储起来
codeSet = new EkpBankCodeSet();
EkpBankCodeSet codeSet = new EkpBankCodeSet();
codeSet.setFdCreateTime(LocalDateTime.now());
codeSet.setFdRecipientBankCode(response.getBankCode());
codeSet.setFdPayeeAccount(cardNo);
......
......@@ -44,6 +44,11 @@
<result property="fdDownloadNum" column="fd_download_num"/>
<result property="fdFailNum" column="fd_fail_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>
<sql id="Base_Excel_Sql">
......@@ -56,18 +61,19 @@
m.fd_bank_name fdBankName,
m.fd_bank_no fdBankNo,
m.fd_bank_account fdBankAccount,
a.fd_recipient_bank fdRecipientBank,
ifnull(c.fd_recipient_bank,a.fd_recipient_bank) fdRecipientBank,
'' fdRecipientAdress,
'' fdRecipientBankCode,
c.fd_recipient_bank_code fdRecipientBankCode,
'1' payType,
a.fd_payee_account fdPayeeAccount,
a.fd_payee_name fdPayeeName,
a.fd_money fdMoney,
concat('',round(a.fd_money * 100,0)) fdMoney,
a.fd_remittance_purpose fdRemittancePurpose,
m.fd_cover_remark fdCoverRemark,
ifnull(m.fd_cover_remark,'') fdCoverRemark,
a.fd_emp_phone fdEmpPhone
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_code_set c on c.fd_payee_account=a.fd_payee_account
where a.fd_handle_status = '待发放'
</sql>
......@@ -83,4 +89,13 @@
and a.fd_id = #{fdId}
</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>
......@@ -50,6 +50,10 @@
<result property="fdDownloadNum" column="fd_download_num"/>
<result property="fdFailNum" column="fd_fail_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>
<sql id="Base_Column_List">
a.fd_id,
......@@ -77,7 +81,10 @@
a.fd_atta_src,
a.fd_download_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>
</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