Commit 40dea2ac authored by hongguangwu's avatar hongguangwu

Merge branch 'develop'

parents a19cafa8 c02698d4
...@@ -150,8 +150,9 @@ public class TPersonnelRosterServiceImpl extends ServiceImpl<TPersonnelRosterMap ...@@ -150,8 +150,9 @@ public class TPersonnelRosterServiceImpl extends ServiceImpl<TPersonnelRosterMap
@Override @Override
public void everyMonthUpdateRoster() { public void everyMonthUpdateRoster() {
// 清空重新生成 // 清空重新生成
String dataMonth = DateUtil.addMonth(-1);
baseMapper.delete(Wrappers.<TPersonnelRoster>query().lambda() baseMapper.delete(Wrappers.<TPersonnelRoster>query().lambda()
.eq(TPersonnelRoster::getDataCreateMonth,DateUtil.getYearAndMonth(LocalDateTime.now(),0))); .eq(TPersonnelRoster::getDataCreateMonth, dataMonth));
TPersonnelRosterSearchVo searchVo = new TPersonnelRosterSearchVo(); TPersonnelRosterSearchVo searchVo = new TPersonnelRosterSearchVo();
long count = baseMapper.getTPersonnelRosterCount(searchVo); long count = baseMapper.getTPersonnelRosterCount(searchVo);
List<TPersonnelRoster> list; List<TPersonnelRoster> list;
...@@ -186,7 +187,7 @@ public class TPersonnelRosterServiceImpl extends ServiceImpl<TPersonnelRosterMap ...@@ -186,7 +187,7 @@ public class TPersonnelRosterServiceImpl extends ServiceImpl<TPersonnelRosterMap
r.setBankProvince(rosterVo.getBankProvince()); r.setBankProvince(rosterVo.getBankProvince());
} }
} }
r.setDataCreateMonth(DateUtil.getYearAndMonth(LocalDateTime.now(),0)); r.setDataCreateMonth(dataMonth);
} }
this.saveBatch(list); this.saveBatch(list);
} }
......
package com.yifu.cloud.plus.v1.ekp.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @Author hgw
* @Date 2024-11-18 10:23:18
* @Description EKP银企付款配置表
* @Version 1.0
*/
@Data
public class EkpBankCodeConfiglVo implements Serializable {
@ExcelProperty("开户行MVP")
private String bankNameMvp;
// 收款银行
@ExcelProperty("收款账号开户行")
private String fdRecipientBank;
@ExcelProperty("收款银行人行行号")
private String fdRecipientBankCode;
}
...@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.ekp.mapper; ...@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.ekp.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.ekp.entity.EkpBankGrantDetail; import com.yifu.cloud.plus.v1.ekp.entity.EkpBankGrantDetail;
import com.yifu.cloud.plus.v1.ekp.vo.EkpBankCodeConfiglVo;
import com.yifu.cloud.plus.v1.ekp.vo.EkpBankExcelVo; import com.yifu.cloud.plus.v1.ekp.vo.EkpBankExcelVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -64,4 +65,12 @@ public interface EkpBankGrantDetailMapper extends BaseMapper<EkpBankGrantDetail> ...@@ -64,4 +65,12 @@ public interface EkpBankGrantDetailMapper extends BaseMapper<EkpBankGrantDetail>
// 获取明细表ID来更新状态 // 获取明细表ID来更新状态
List<EkpBankGrantDetail> getListByParentId(@Param("fdParentId") String fdParentId); List<EkpBankGrantDetail> getListByParentId(@Param("fdParentId") String fdParentId);
/**
* @Description: 获取工行开户行配置表
* @Author: hgw
* @Date: 2024/12/25 16:05
* @return: java.util.List<com.yifu.cloud.plus.v1.ekp.vo.EkpBankCodeConfiglVo>
**/
List<EkpBankCodeConfiglVo> getEkpBankCodeConfiglVo();
} }
...@@ -19,10 +19,12 @@ package com.yifu.cloud.plus.v1.ekp.service; ...@@ -19,10 +19,12 @@ package com.yifu.cloud.plus.v1.ekp.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.ekp.entity.EkpBankGrantDetail; import com.yifu.cloud.plus.v1.ekp.entity.EkpBankGrantDetail;
import com.yifu.cloud.plus.v1.ekp.vo.EkpBankCodeConfiglVo;
import com.yifu.cloud.plus.v1.ekp.vo.EkpBankExcelVo; import com.yifu.cloud.plus.v1.ekp.vo.EkpBankExcelVo;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 发放结果明细(银企付款任务) * 发放结果明细(银企付款任务)
...@@ -61,4 +63,7 @@ public interface EkpBankGrantDetailService extends IService<EkpBankGrantDetail> ...@@ -61,4 +63,7 @@ public interface EkpBankGrantDetailService extends IService<EkpBankGrantDetail>
// 获取明细表ID来更新状态 // 获取明细表ID来更新状态
List<EkpBankGrantDetail> getListByParentId(String fdParentId); List<EkpBankGrantDetail> getListByParentId(String fdParentId);
// 获取工行开户行配置表
Map<String, EkpBankCodeConfiglVo> getEkpBankCodeConfiglVo();
} }
...@@ -20,11 +20,14 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; ...@@ -20,11 +20,14 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.ekp.entity.EkpBankGrantDetail; import com.yifu.cloud.plus.v1.ekp.entity.EkpBankGrantDetail;
import com.yifu.cloud.plus.v1.ekp.mapper.EkpBankGrantDetailMapper; import com.yifu.cloud.plus.v1.ekp.mapper.EkpBankGrantDetailMapper;
import com.yifu.cloud.plus.v1.ekp.service.EkpBankGrantDetailService; import com.yifu.cloud.plus.v1.ekp.service.EkpBankGrantDetailService;
import com.yifu.cloud.plus.v1.ekp.vo.EkpBankCodeConfiglVo;
import com.yifu.cloud.plus.v1.ekp.vo.EkpBankExcelVo; import com.yifu.cloud.plus.v1.ekp.vo.EkpBankExcelVo;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 发放结果明细(银企付款任务) * 发放结果明细(银企付款任务)
...@@ -96,4 +99,23 @@ public class EkpBankGrantDetailServiceImpl extends ServiceImpl<EkpBankGrantDetai ...@@ -96,4 +99,23 @@ public class EkpBankGrantDetailServiceImpl extends ServiceImpl<EkpBankGrantDetai
return baseMapper.getListByParentId(fdParentId); return baseMapper.getListByParentId(fdParentId);
} }
/**
* @Description: 获取工行开户行配置表
* @Author: hgw
* @Date: 2024/12/25 16:10
* @return: java.util.Map<java.lang.String, com.yifu.cloud.plus.v1.ekp.vo.EkpBankCodeConfiglVo>
**/
@Override
public Map<String, EkpBankCodeConfiglVo> getEkpBankCodeConfiglVo() {
Map<String, EkpBankCodeConfiglVo> returnMap = new HashMap<>();
// getBankNameMvp 是非空切唯一的,可以做key
List<EkpBankCodeConfiglVo> list = baseMapper.getEkpBankCodeConfiglVo();
if (list != null && !list.isEmpty()) {
for (EkpBankCodeConfiglVo vo : list) {
returnMap.put(vo.getBankNameMvp(), vo);
}
}
return returnMap;
}
} }
...@@ -3,7 +3,6 @@ package com.yifu.cloud.plus.v1.ekp.service.impl; ...@@ -3,7 +3,6 @@ package com.yifu.cloud.plus.v1.ekp.service.impl;
import com.alibaba.excel.EasyExcelFactory; import com.alibaba.excel.EasyExcelFactory;
import com.alibaba.excel.support.ExcelTypeEnum; import com.alibaba.excel.support.ExcelTypeEnum;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.icbc.api.DefaultIcbcClient; import com.icbc.api.DefaultIcbcClient;
...@@ -22,6 +21,7 @@ import com.yifu.cloud.plus.v1.ekp.entity.*; ...@@ -22,6 +21,7 @@ import com.yifu.cloud.plus.v1.ekp.entity.*;
import com.yifu.cloud.plus.v1.ekp.mapper.EkpSocialInfoMapper; import com.yifu.cloud.plus.v1.ekp.mapper.EkpSocialInfoMapper;
import com.yifu.cloud.plus.v1.ekp.service.*; import com.yifu.cloud.plus.v1.ekp.service.*;
import com.yifu.cloud.plus.v1.ekp.vo.EkpBankAttaReturnVo; import com.yifu.cloud.plus.v1.ekp.vo.EkpBankAttaReturnVo;
import com.yifu.cloud.plus.v1.ekp.vo.EkpBankCodeConfiglVo;
import com.yifu.cloud.plus.v1.ekp.vo.EkpBankExcelVo; import com.yifu.cloud.plus.v1.ekp.vo.EkpBankExcelVo;
import com.yifu.cloud.plus.v1.ekp.vo.EkpBankResultVo; import com.yifu.cloud.plus.v1.ekp.vo.EkpBankResultVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
...@@ -407,7 +407,8 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -407,7 +407,8 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
EkpBankAttaReturnVo vo = new EkpBankAttaReturnVo(); EkpBankAttaReturnVo vo = new EkpBankAttaReturnVo();
List<EkpBankExcelVo> list; List<EkpBankExcelVo> list;
// 获取配置的行号
Map<String, EkpBankCodeConfiglVo> bankMap = ekpBankGrantDetailService.getEkpBankCodeConfiglVo();
// 1主表整体下载 // 1主表整体下载
if (CommonConstants.ONE_STRING.equals(type)) { if (CommonConstants.ONE_STRING.equals(type)) {
EkpBankPayTask main = ekpBankPayTaskService.getById(fdId); EkpBankPayTask main = ekpBankPayTaskService.getById(fdId);
...@@ -422,7 +423,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -422,7 +423,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
} }
// 新下载 // 新下载
list = ekpBankGrantDetailService.getEkpBankExcelVoByIdAndMain(fdId); list = ekpBankGrantDetailService.getEkpBankExcelVoByIdAndMain(fdId);
R<EkpBankAttaReturnVo> returnVoR = getNewFileByMain(fdId, type, vo, list, main); R<EkpBankAttaReturnVo> returnVoR = getNewFileByMain(fdId, type, vo, list, main, bankMap);
redisUtil.remove(redisKey); redisUtil.remove(redisKey);
return returnVoR; return returnVoR;
} else if (Common.isNotNull(main.getFdAttaSrc())) { } else if (Common.isNotNull(main.getFdAttaSrc())) {
...@@ -443,7 +444,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -443,7 +444,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
} }
// 新下载 // 新下载
list = ekpBankGrantDetailService.getEkpBankExcelVoByIdAndDetail(fdId); list = ekpBankGrantDetailService.getEkpBankExcelVoByIdAndDetail(fdId);
R<EkpBankAttaReturnVo> returnVoR = getNewFileByDetail(fdId, type, vo, list, detail); R<EkpBankAttaReturnVo> returnVoR = getNewFileByDetail(fdId, type, vo, list, detail, bankMap);
redisUtil.remove(redisKey); redisUtil.remove(redisKey);
return returnVoR; return returnVoR;
} else if (Common.isNotNull(detail.getFdAttaSrc())) { } else if (Common.isNotNull(detail.getFdAttaSrc())) {
...@@ -482,9 +483,10 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -482,9 +483,10 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
* @Date: 2024/11/20 17:08 * @Date: 2024/11/20 17:08
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.ekp.vo.EkpBankAttaReturnVo> * @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.ekp.vo.EkpBankAttaReturnVo>
**/ **/
private R<EkpBankAttaReturnVo> getNewFileByMain(String fdId, String type, EkpBankAttaReturnVo vo, List<EkpBankExcelVo> list, EkpBankPayTask main) { private R<EkpBankAttaReturnVo> getNewFileByMain(String fdId, String type, EkpBankAttaReturnVo vo
, List<EkpBankExcelVo> list, EkpBankPayTask main, Map<String, EkpBankCodeConfiglVo> bankMap) {
if (list != null && !list.isEmpty()) { if (list != null && !list.isEmpty()) {
EkpBankAtta atta = getNewFileCore(fdId, type, vo, list); EkpBankAtta atta = getNewFileCore(fdId, type, vo, list, bankMap);
if (atta != null) { if (atta != null) {
main.setFdAttaName(atta.getFdAttaName()); main.setFdAttaName(atta.getFdAttaName());
main.setFdAttaSrc(atta.getFdAttaSrc()); main.setFdAttaSrc(atta.getFdAttaSrc());
...@@ -510,9 +512,10 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -510,9 +512,10 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
* @Date: 2024/11/20 17:08 * @Date: 2024/11/20 17:08
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.ekp.vo.EkpBankAttaReturnVo> * @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.ekp.vo.EkpBankAttaReturnVo>
**/ **/
private R<EkpBankAttaReturnVo> getNewFileByDetail(String fdId, String type, EkpBankAttaReturnVo vo, List<EkpBankExcelVo> list, EkpBankGrantDetail main) { private R<EkpBankAttaReturnVo> getNewFileByDetail(String fdId, String type, EkpBankAttaReturnVo vo
, List<EkpBankExcelVo> list, EkpBankGrantDetail main, Map<String, EkpBankCodeConfiglVo> bankMap) {
if (list != null && !list.isEmpty()) { if (list != null && !list.isEmpty()) {
EkpBankAtta atta = getNewFileCore(fdId, type, vo, list); EkpBankAtta atta = getNewFileCore(fdId, type, vo, list, bankMap);
if (atta != null) { if (atta != null) {
main.setFdAttaName(atta.getFdAttaName()); main.setFdAttaName(atta.getFdAttaName());
main.setFdAttaSrc(atta.getFdAttaSrc()); main.setFdAttaSrc(atta.getFdAttaSrc());
...@@ -527,18 +530,26 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -527,18 +530,26 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
return R.failed("未找到待发放的明细数据,下载失败!!"); return R.failed("未找到待发放的明细数据,下载失败!!");
} }
private EkpBankAtta getNewFileCore(String fdId, String type, EkpBankAttaReturnVo vo, List<EkpBankExcelVo> list) { private EkpBankAtta getNewFileCore(String fdId, String type, EkpBankAttaReturnVo vo, List<EkpBankExcelVo> list
, Map<String, EkpBankCodeConfiglVo> bankMap) {
EkpBankCodeSet codeSet; EkpBankCodeSet codeSet;
R<EkpBankCodeSet> bankInfoQuery; R<EkpBankCodeSet> bankInfoQuery;
EkpBankCodeConfiglVo bankVo;
// 组装 // 组装
for (EkpBankExcelVo excelVo : list) { for (EkpBankExcelVo excelVo : list) {
if (Common.isEmpty(excelVo.getFdRecipientBankCode())) { if (Common.isEmpty(excelVo.getFdRecipientBankCode())) {
// 查询行号 // 查询行号
bankInfoQuery = icbcTransactionFlowQueryService.querybankinfo(excelVo.getFdPayeeAccount()); bankInfoQuery = icbcTransactionFlowQueryService.querybankinfo(excelVo.getFdPayeeAccount());
if (bankInfoQuery != null && bankInfoQuery.getCode() == CommonConstants.SUCCESS) { if (bankInfoQuery != null && bankInfoQuery.getCode() == CommonConstants.SUCCESS && bankInfoQuery.getData() != null) {
codeSet = bankInfoQuery.getData(); codeSet = bankInfoQuery.getData();
excelVo.setFdRecipientBankCode(codeSet.getFdRecipientBankCode()); excelVo.setFdRecipientBankCode(codeSet.getFdRecipientBankCode());
excelVo.setFdRecipientBank(codeSet.getFdRecipientBank()); excelVo.setFdRecipientBank(codeSet.getFdRecipientBank());
} else if (Common.isNotNull(excelVo.getFdRecipientBank())) {
bankVo = bankMap.get(excelVo.getFdRecipientBank());
if (bankVo != null) {
excelVo.setFdRecipientBankCode(bankVo.getFdRecipientBankCode());
excelVo.setFdRecipientBank(bankVo.getFdRecipientBank());
}
} }
} }
} }
......
...@@ -73,8 +73,8 @@ spring: ...@@ -73,8 +73,8 @@ spring:
activate: activate:
on-profile: test on-profile: test
redis: redis:
host: 127.0.0.1 host: 192.168.1.65
port: 6379 port: 22379
password: '@yf_2017' password: '@yf_2017'
datasource: datasource:
type: com.zaxxer.hikari.HikariDataSource type: com.zaxxer.hikari.HikariDataSource
......
...@@ -90,12 +90,14 @@ ...@@ -90,12 +90,14 @@
<select id="getEkpBankExcelVoByIdAndMain" resultType="com.yifu.cloud.plus.v1.ekp.vo.EkpBankExcelVo"> <select id="getEkpBankExcelVoByIdAndMain" resultType="com.yifu.cloud.plus.v1.ekp.vo.EkpBankExcelVo">
<include refid="Base_Excel_Sql"/> <include refid="Base_Excel_Sql"/>
(a.fd_handle_status is null or a.fd_handle_status = '待发放') and a.fd_parent_id = #{fdParentId} (a.fd_handle_status is null or a.fd_handle_status = '待发放') and a.fd_parent_id = #{fdParentId}
ORDER BY (a.fd_serial_number-0) asc
</select> </select>
<!-- 查询主表下的所有待发放数据 --> <!-- 查询主表下的所有待发放数据 -->
<select id="getEkpBankExcelVoByIdAndDetail" resultType="com.yifu.cloud.plus.v1.ekp.vo.EkpBankExcelVo"> <select id="getEkpBankExcelVoByIdAndDetail" resultType="com.yifu.cloud.plus.v1.ekp.vo.EkpBankExcelVo">
<include refid="Base_Excel_Sql"/> <include refid="Base_Excel_Sql"/>
a.fd_handle_status = '待发放' and a.fd_id = #{fdId} a.fd_handle_status = '待发放' and a.fd_id = #{fdId}
ORDER BY (a.fd_serial_number-0) asc
</select> </select>
<!-- 查询编号是否重复 --> <!-- 查询编号是否重复 -->
...@@ -177,4 +179,12 @@ ...@@ -177,4 +179,12 @@
</if> </if>
</update> </update>
<!-- 查询工行开户行配置表 -->
<select id="getEkpBankCodeConfiglVo" resultType="com.yifu.cloud.plus.v1.ekp.vo.EkpBankCodeConfiglVo">
SELECT
bank_name_mvp bankNameMvp,bank_name fdRecipientBank,bank_code fdRecipientBankCode
FROM ekp_bank_code_config a
where a.bank_name_mvp is not null and a.bank_name_mvp != ''
</select>
</mapper> </mapper>
...@@ -66,6 +66,9 @@ public class TSalaryAccountPhoneController { ...@@ -66,6 +66,9 @@ public class TSalaryAccountPhoneController {
@Operation(description = "获取工资报账信息") @Operation(description = "获取工资报账信息")
@GetMapping("/getSalaryAccount") @GetMapping("/getSalaryAccount")
public R<AccountForWxVo> getSalaryAccount(@RequestParam String idNumber, String year,String openId) { public R<AccountForWxVo> getSalaryAccount(@RequestParam String idNumber, String year,String openId) {
if (Common.isEmpty(idNumber) || Common.isEmpty(openId)){
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
//校验openId,openId 不对直接返回 //校验openId,openId 不对直接返回
if (!checkOpenId(openId)){ if (!checkOpenId(openId)){
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR); return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
......
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