Commit cfc96bb8 authored by huyuchen's avatar huyuchen

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

parents b412129b 0786a586
...@@ -2010,7 +2010,10 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2010,7 +2010,10 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
// 档案地和通信地址 校验 // 档案地和通信地址 校验
if (Common.isNotNull(headMap.get("档案所在省")) if (Common.isNotNull(headMap.get("档案所在省"))
|| Common.isNotNull(headMap.get("档案所在市"))){ || Common.isNotNull(headMap.get("档案所在市"))){
if (Common.isEmpty(excel.getFileTown())) { if (Common.isEmpty(excel.getFileProvince())) {
errorMsg.add(EmployeeConstants.FILE_PROVINCE);
}
if (Common.isEmpty(excel.getFileCity())) {
errorMsg.add(EmployeeConstants.FILE_PROVINCE); errorMsg.add(EmployeeConstants.FILE_PROVINCE);
} }
} }
......
...@@ -40,7 +40,7 @@ public interface EkpSocialInfoMapper extends BaseMapper<EkpSocialInfo> { ...@@ -40,7 +40,7 @@ public interface EkpSocialInfoMapper extends BaseMapper<EkpSocialInfo> {
* @param * @param
* @return * @return
*/ */
List<String> getAllserioNo(); List<Map<String,String>> getAllserioNo();
/** /**
* 获取需要拉流水的银行账户 * 获取需要拉流水的银行账户
......
...@@ -60,6 +60,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -60,6 +60,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
@Autowired @Autowired
private EkpEntryProperties ekpEntryProperties; private EkpEntryProperties ekpEntryProperties;
@Override
public R getIcbcTransactionFlow() { public R getIcbcTransactionFlow() {
// //应用id 应用方私钥 网关公钥 应用方加密串 // //应用id 应用方私钥 网关公钥 应用方加密串
// String APP_ID = "11000000000000028685"; // String APP_ID = "11000000000000028685";
...@@ -122,8 +123,9 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -122,8 +123,9 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
log.info("开始推当日新增网银到账明细条数"); log.info("开始推当日新增网银到账明细条数");
String tranDate = DateUtil.getThisDay(); String tranDate = DateUtil.getThisDay();
// todo 测试时改为查10天内的,上线改为查当天内的 // 测试时改为查10天内的,上线改为查当天内的
String beginDate = DateUtil.addDay(-10).replace("-",""); // String beginDate = DateUtil.addDay(-10).replace("-","");
String beginDate = tranDate;
String endDate = tranDate; String endDate = tranDate;
return getIcbcTransactionFlowCommon(tranDate,beginDate,endDate); return getIcbcTransactionFlowCommon(tranDate,beginDate,endDate);
...@@ -166,8 +168,23 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -166,8 +168,23 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
return R.ok(); return R.ok();
} }
// 查询当天的所有入账记录数据 // 查询当天的所有入账记录数据, 查账号和流水号
List<String> serioList = baseMapper.getAllserioNo(); List<Map<String,String>> serioList = baseMapper.getAllserioNo();
// 整理各个账户下的流水:账号为key,账户下流水号列表作为value
Map<String,List<String>> serioMapByAccount = new HashMap<>();
if (!serioList.isEmpty()) {
for(Map<String,String> serio: serioList) {
List<String> serioListByAccountOne = serioMapByAccount.get(serio.get("receiveBkNo"));
if(serioListByAccountOne == null || serioListByAccountOne.isEmpty()){
serioListByAccountOne = new ArrayList<>();
}
serioListByAccountOne.add(serio.get("onlySequence"));
serioMapByAccount.put(serio.get("receiveBkNo"),serioListByAccountOne);
}
}
// 账号为key,账户名称作为value // 账号为key,账户名称作为value
Map<String,String> accountInfoMap = new HashMap<>(); Map<String,String> accountInfoMap = new HashMap<>();
// 账号为key,账号下的流水作为value // 账号为key,账号下的流水作为value
...@@ -207,19 +224,29 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -207,19 +224,29 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
// 重新过滤已存入【入账记录】的流水信息 // 重新过滤已存入【入账记录】的流水信息
for (String account : accountRecordListMap.keySet()) { for (String account : accountRecordListMap.keySet()) {
// 获取当前账号下的流水
List<MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1> flowRecordList = accountRecordListMap.get(account); List<MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1> flowRecordList = accountRecordListMap.get(account);
// 获取成功后根据流水号去重和根据借贷标志02筛选出所有数据 // 获取成功后根据流水号去重和根据借贷标志02筛选出所有数据
if (!flowRecordList.isEmpty()) { if (!flowRecordList.isEmpty()) {
List<MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1> insertList =
flowRecordList.stream().filter(e-> e.getDrcrf().equals("2") && !serioList.contains(e.getOnlySequence())).collect(Collectors.toList()); // 获取当前账户下的入账记录:账号为key,账户下入账记录列表作为value
if(!insertList.isEmpty()){ List<String> serioListByAccount = serioMapByAccount.get(account);
// 还有需要存的流水,重新存入账号流水Map里 if(serioListByAccount == null || serioListByAccount.isEmpty()){
accountRecordListMap.put(account, insertList); serioListByAccount = new ArrayList<>();
} else { }
// 没有需要存的流水,账号流水Map重置值为空列表
accountRecordListMap.put(account, new ArrayList<>()); // 过滤出需要新增流水的数据
List<MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1> insertList = new ArrayList<>();
for (MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1 flowRecord : flowRecordList) {
if("2".equals(flowRecord.getDrcrf()) && !serioListByAccount.contains(flowRecord.getOnlySequence())){
insertList.add(flowRecord);
}
} }
// 重新存入账号流水Map里
accountRecordListMap.put(account, insertList);
} }
} }
...@@ -227,10 +254,10 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -227,10 +254,10 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
for (String account : accountRecordListMap.keySet()) { for (String account : accountRecordListMap.keySet()) {
List<MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1> saveList = accountRecordListMap.get(account); List<MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1> saveList = accountRecordListMap.get(account);
// 封装数据 // 封装数据
if (!saveList.isEmpty()) { if (saveList != null && !saveList.isEmpty()) {
String bankName = accountInfoMap.get(account); String bankName = accountInfoMap.get(account);
log.info("需要存的流水到账--银行名称:" + bankName);
log.info("到账明细条数:" + saveList.size()); log.info("需要存的流水到账--明细条数:" + saveList.size());
try { try {
for (MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1 entry : saveList) { for (MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1 entry : saveList) {
EKPEntryPushParam pushParam = new EKPEntryPushParam(); EKPEntryPushParam pushParam = new EKPEntryPushParam();
...@@ -251,7 +278,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -251,7 +278,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
} }
//推送数据 //推送数据
public String sendToEkp(EKPEntryPushParam pushParam){ private String sendToEkp(EKPEntryPushParam pushParam){
RestTemplate yourRestTemplate = new RestTemplate(); RestTemplate yourRestTemplate = new RestTemplate();
try{ try{
String formValues = new ObjectMapper().writeValueAsString(pushParam); String formValues = new ObjectMapper().writeValueAsString(pushParam);
...@@ -287,6 +314,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -287,6 +314,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
} }
} }
@Override
public R querybankinfo() { public R querybankinfo() {
String privateKey = "4d931f6ad4331158fcc4dea23f0d71393328146e40b5f63f197b9f6ad3732f44"; String privateKey = "4d931f6ad4331158fcc4dea23f0d71393328146e40b5f63f197b9f6ad3732f44";
...@@ -325,6 +353,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -325,6 +353,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
return R.ok(); return R.ok();
} }
@Override
public R saveIcbcManagerCard() { public R saveIcbcManagerCard() {
//应用id 应用方私钥 网关公钥 应用方加密串 //应用id 应用方私钥 网关公钥 应用方加密串
String APP_ID = "11000000000000015602"; String APP_ID = "11000000000000015602";
...@@ -437,7 +466,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -437,7 +466,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
} }
} }
public void initValue(MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1 entry, private void initValue(MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1 entry,
EKPEntryPushParam pushParam,String bankName,String bankNo) throws ParseException { EKPEntryPushParam pushParam,String bankName,String bankNo) throws ParseException {
pushParam.setFd_recipName(entry.getRecipName()); pushParam.setFd_recipName(entry.getRecipName());
pushParam.setFd_recipAccountNo(entry.getRecipAccountNo()); pushParam.setFd_recipAccountNo(entry.getRecipAccountNo());
......
...@@ -117,9 +117,9 @@ ...@@ -117,9 +117,9 @@
#{sql} #{sql}
</update> </update>
<!--查询社保明细信息--> <!--查询当天的所有入账记录数据, 查账号和流水号-->
<select id="getAllserioNo" resultType="java.lang.String"> <select id="getAllserioNo" resultType="Map">
SELECT fd_3b573843db30ce from ekp_79c234bf64d412294f23 SELECT fd_3b573843db30ce as onlySequence,fd_3b62f3470beb30 as receiveBkNo from ekp_79c234bf64d412294f23
where DATE_FORMAT(fd_3aa4531d3b86e0, '%Y-%m-%d') between DATE_SUB(curdate(), INTERVAL 1 day) and DATE_ADD(now(), INTERVAL 1 day) where DATE_FORMAT(fd_3aa4531d3b86e0, '%Y-%m-%d') between DATE_SUB(curdate(), INTERVAL 1 day) and DATE_ADD(now(), INTERVAL 1 day)
and fd_3b57f8de9df354 = '是' and fd_3b57f8de9df354 = '是'
</select> </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