Commit 756da2a1 authored by hongguangwu's avatar hongguangwu

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

parents a4e49e70 f99a7179
...@@ -179,9 +179,9 @@ ...@@ -179,9 +179,9 @@
if(sum(if((PROJECT_STATUS = 0 and IS_COMPLETE = '0') or PROJECT_STATUS = 1,0,1)) > 0,1,0) as IS_COMPLETE, if(sum(if((PROJECT_STATUS = 0 and IS_COMPLETE = '0') or PROJECT_STATUS = 1,0,1)) > 0,1,0) as IS_COMPLETE,
sum(if((PROJECT_STATUS = 0 and IS_COMPLETE = '0') or PROJECT_STATUS = 1,0,1)) as INCOMPLETE_NUM, sum(if((PROJECT_STATUS = 0 and IS_COMPLETE = '0') or PROJECT_STATUS = 1,0,1)) as INCOMPLETE_NUM,
concat(ROUND((sum(if(PROJECT_STATUS = 0,1,0)) - sum(if((PROJECT_STATUS = 0 and IS_COMPLETE = '0') or PROJECT_STATUS = 1,0,1)))*100/sum(if(PROJECT_STATUS = 0,1,0)),2),'%') as COMPLETE_PER, concat(ROUND((sum(if(PROJECT_STATUS = 0,1,0)) - sum(if((PROJECT_STATUS = 0 and IS_COMPLETE = '0') or PROJECT_STATUS = 1,0,1)))*100/sum(if(PROJECT_STATUS = 0,1,0)),2),'%') as COMPLETE_PER,
sum(if(PROJECT_STATUS = 0 and DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') >= '2024-05-01',1,0)) as AFTER_EMPLOYMENT, sum(if(PROJECT_STATUS = 0 and DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') >= '2024-09-01',1,0)) as AFTER_EMPLOYMENT,
if(sum(if((PROJECT_STATUS = 0 and DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') >= '2024-05-01' and IS_COMPLETE = '0') or '2024-05-01' > DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') or PROJECT_STATUS = 1,0,1)) > 0,1,0) AFTER_IS_COMPLETE, if(sum(if((PROJECT_STATUS = 0 and DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') >= '2024-09-01' and IS_COMPLETE = '0') or '2024-09-01' > DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') or PROJECT_STATUS = 1,0,1)) > 0,1,0) AFTER_IS_COMPLETE,
sum(if(PROJECT_STATUS = 0 and DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') >= '2024-05-01' and IS_COMPLETE = '1',1,0)) as AFTER_INCOMPLETE_NUM sum(if(PROJECT_STATUS = 0 and DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') >= '2024-09-01' and IS_COMPLETE = '1',1,0)) as AFTER_INCOMPLETE_NUM
from t_employee_project where DELETE_FLAG = '0' and PROJECT_STATUS = 0 group by DEPT_NO) a on a.DEPT_NO = b.DEPART_NO from t_employee_project where DELETE_FLAG = '0' and PROJECT_STATUS = 0 group by DEPT_NO) a on a.DEPT_NO = b.DEPART_NO
where b.DELETE_FLAG = '0' where b.DELETE_FLAG = '0'
<if test="deptNo != null and deptNo.trim() != ''"> <if test="deptNo != null and deptNo.trim() != ''">
......
package com.yifu.cloud.plus.v1.ekp.vo;
import lombok.Data;
/**
* @author huych
* @description 入账明细推送
* @date 2024-08-23 16:31:15
*/
@Data
public class EKPEntryPushParam {
/**
* 来款单位
*/
private String fd_recipName;
/**
* 来款银行账号
*/
private String fd_recipAccountNo;
/**
* 来款单位开户行名
*/
private String fd_recipBkName;
/**
* 入账日期
*/
private String fd_date;
/**
* 到款单位
*/
private String fd_receiveBkName;
/**
* 到款银行账号
*/
private String fd_receiveBkNo;
/**
* 财务备注
*/
private String fd_remark;
/**
* 入账金额
*/
private String fd_receiveMoney;
/**
* 入账日期(精确)
*/
private String fd_daReal;
/**
* 数据同步时间
*/
private String fd_daTime;
/**
* 系统交易流水号
*/
private String fd_onlySequence;
}
package com.yifu.cloud.plus.v1.ekp.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
/**
* @author huyc
* @description 入账明细推送接口配置
* @date 2024-08-26 08:57:02
*/
@RefreshScope
@ConfigurationProperties(prefix = "entry")
@Data
public class EkpEntryProperties {
String entryUrl;
String entryFdModelId;
String entryDocStatus;
String entryLoginName;
String entryDocSubject;
String entryFdFlowId;
}
//package com.yifu.cloud.plus.v1.ekp.controller; package com.yifu.cloud.plus.v1.ekp.controller;
//
//import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowIssueService; import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowIssueService;
//import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
//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.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
//
///** import javax.servlet.http.HttpServletRequest;
// * 聚富通代发工资相关
// * /**
// * @author huyc * 聚富通代发工资相关
// * @date 2024-05-23 10:24:12 *
// */ * @author huyc
//@RestController * @date 2024-05-23 10:24:12
//@RequiredArgsConstructor */
//@RequestMapping("/icbcIssue" ) @RestController
//@Tag(name = "聚富通代发工资相关") @RequiredArgsConstructor
//public class IcbcTransactionFlowIssueController { @RequestMapping("/icbcIssue" )
// @Tag(name = "聚富通代发工资相关")
// private final IcbcTransactionFlowIssueService icbcTransactionFlowIssueService; public class IcbcTransactionFlowIssueController {
//
// /** private final IcbcTransactionFlowIssueService icbcTransactionFlowIssueService;
// * 聚富通代发工资确认提交
// * /**
// * @param * 聚富通代发工资确认提交
// * @param *
// * @return * @param
// */ * @param
// @Operation(summary = "聚富通代发工资确认提交接口", description = "聚富通代发工资确认提交接口") * @return
// @PostMapping("/submit") */
// public R submitIcbcTransactionFlow() { @Operation(summary = "聚富通代发工资确认提交接口", description = "聚富通代发工资确认提交接口")
// return icbcTransactionFlowIssueService.submitIcbcTransactionFlow(); @PostMapping("/submit")
// } public R submitIcbcTransactionFlow() {
// return icbcTransactionFlowIssueService.submitIcbcTransactionFlow();
// /** }
// * 代发工资明细查询
// * /**
// * @param * 代发工资明细查询
// * @param *
// * @return * @param
// */ * @param
// @Operation(summary = "代发工资明细查询", description = "代发工资明细查询") * @return
// @PostMapping("/page") */
// public R selectIcbcTransactionFlowInfo() { @Operation(summary = "代发工资明细查询", description = "代发工资明细查询")
// return icbcTransactionFlowIssueService.selectIcbcTransactionFlowInfo(); @PostMapping("/page")
// } public R selectIcbcTransactionFlowInfo() {
//} return icbcTransactionFlowIssueService.selectIcbcTransactionFlowInfo();
}
/**
* 企业会员用户绑定管家卡
*
* @param
* @param
* @return
*/
@Operation(summary = "企业会员用户绑定管家卡", description = "企业会员用户绑定管家卡")
@PostMapping("/business")
public R businessOpen() {
return icbcTransactionFlowIssueService.businessOpen();
}
/**
* 代发工资发放成功异步通知功能
*
* @param
* @param
* @return
*/
@Operation(summary = "代发工资发放成功异步通知功能", description = "代发工资发放成功异步通知功能")
@PostMapping("/notifyUrl")
public R asyncNotice(HttpServletRequest request) throws Exception {
return icbcTransactionFlowIssueService.asyncNotice(request);
}
}
package com.yifu.cloud.plus.v1.ekp.controller; package com.yifu.cloud.plus.v1.ekp.controller;
import com.icbc.api.IcbcApiException;
import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowQueryService; import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowQueryService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
...@@ -35,6 +36,18 @@ public class IcbcTransactionFlowQueryController { ...@@ -35,6 +36,18 @@ public class IcbcTransactionFlowQueryController {
return icbcTransactionFlowQueryService.getIcbcTransactionFlow(); return icbcTransactionFlowQueryService.getIcbcTransactionFlow();
} }
/**
* 交易流水查询
*
* @param
* @return
*/
@Operation(summary = "交易流水查询", description = "交易流水查询")
@PostMapping("/newPage")
public R getIcbcTransactionFlowNew() throws IcbcApiException {
return icbcTransactionFlowQueryService.getIcbcTransactionFlowNew();
}
/** /**
* 预订单接口 * 预订单接口
* *
...@@ -46,4 +59,18 @@ public class IcbcTransactionFlowQueryController { ...@@ -46,4 +59,18 @@ public class IcbcTransactionFlowQueryController {
public R saveIcbcManagerCard() { public R saveIcbcManagerCard() {
return icbcTransactionFlowQueryService.saveIcbcManagerCard(); return icbcTransactionFlowQueryService.saveIcbcManagerCard();
} }
/**
* 行名行号查询接口
*
* @param
* @param
* @return
*/
@Operation(summary = "行名行号查询接口", description = "行名行号查询接口")
@PostMapping("/querybankinfo")
public R querybankinfo() {
return icbcTransactionFlowQueryService.querybankinfo();
}
} }
...@@ -33,4 +33,11 @@ public interface EkpSocialInfoMapper extends BaseMapper<EkpSocialInfo> { ...@@ -33,4 +33,11 @@ public interface EkpSocialInfoMapper extends BaseMapper<EkpSocialInfo> {
EkpSocialSumInfoVo getCostSumInfo(@Param("card") String empIdCard, @Param("month") String createMonth); EkpSocialSumInfoVo getCostSumInfo(@Param("card") String empIdCard, @Param("month") String createMonth);
void updateSocialStatus(@Param("sql") String sql); void updateSocialStatus(@Param("sql") String sql);
/**
* 获取所有当天的到账明细的交易流水号
* @param
* @return
*/
List<String> getAllserioNo();
} }
//package com.yifu.cloud.plus.v1.ekp.service; 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.EkpSocialInfo; import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo;
//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;
// * 聚富通代发工资相关
// * /**
// * @author huyc * 聚富通代发工资相关
// * @date 2024-05-24 10:55:24 *
// */ * @author huyc
//public interface IcbcTransactionFlowIssueService extends IService<EkpSocialInfo> { * @date 2024-05-24 10:55:24
// */
// R submitIcbcTransactionFlow(); public interface IcbcTransactionFlowIssueService extends IService<EkpSocialInfo> {
//
// R selectIcbcTransactionFlowInfo(); R submitIcbcTransactionFlow();
//
//} R selectIcbcTransactionFlowInfo();
R businessOpen();
R asyncNotice(HttpServletRequest request) throws Exception;
}
package com.yifu.cloud.plus.v1.ekp.service; package com.yifu.cloud.plus.v1.ekp.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.icbc.api.IcbcApiException;
import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo; import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
...@@ -14,6 +15,10 @@ public interface IcbcTransactionFlowQueryService extends IService<EkpSocialInfo> ...@@ -14,6 +15,10 @@ public interface IcbcTransactionFlowQueryService extends IService<EkpSocialInfo>
R getIcbcTransactionFlow(); R getIcbcTransactionFlow();
R getIcbcTransactionFlowNew() throws IcbcApiException;
R saveIcbcManagerCard(); R saveIcbcManagerCard();
R querybankinfo();
} }
...@@ -36,7 +36,9 @@ import java.util.stream.Collectors; ...@@ -36,7 +36,9 @@ import java.util.stream.Collectors;
@Log4j2 @Log4j2
@Service @Service
@RequiredArgsConstructor @RequiredArgsConstructor
public class EkpSalaryInfoServiceImpl extends ServiceImpl<EkpSalaryInfoMapper, EkpSalaryInfo> implements EkpSalaryInfoService { public class
EkpSalaryInfoServiceImpl extends ServiceImpl<EkpSalaryInfoMapper, EkpSalaryInfo> implements EkpSalaryInfoService {
/** /**
//@Description: 工资明细推送至ekp //@Description: 工资明细推送至ekp
......
//package com.yifu.cloud.plus.v1.ekp.service.impl; package com.yifu.cloud.plus.v1.ekp.service.impl;
//
//import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.alibaba.fastjson.JSON;
//import com.icbc.api.DefaultIcbcClient; import com.alibaba.fastjson.JSONObject;
//import com.icbc.api.IcbcApiException; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
//import com.icbc.api.IcbcConstants; import com.fasterxml.jackson.databind.ObjectMapper;
//import com.icbc.api.UiIcbcClient; import com.icbc.api.DefaultIcbcClient;
//import com.icbc.api.request.JftApiPayrollQueryDetailRequestV1; import com.icbc.api.IcbcApiException;
//import com.icbc.api.request.JftUiPayrollComfirmSubmitRequestV1; import com.icbc.api.IcbcConstants;
//import com.icbc.api.response.JftApiPayrollQueryDetailResponseV1; import com.icbc.api.UiIcbcClient;
//import com.yifu.cloud.plus.v1.ekp.config.IcbcConfigProperties; import com.icbc.api.request.JftApiPayrollQueryDetailRequestV1;
//import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo; import com.icbc.api.request.JftApiVendorSeparateAccountsBusinessOpenRequestV1;
//import com.yifu.cloud.plus.v1.ekp.mapper.EkpSocialInfoMapper; import com.icbc.api.request.JftUiPayrollComfirmSubmitRequestV1;
//import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowIssueService; import com.icbc.api.response.JftApiPayrollQueryDetailResponseV1;
//import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; import com.icbc.api.response.JftApiVendorSeparateAccountsBusinessOpenResponseV1;
//import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.icbc.api.utils.IcbcSignature;
//import lombok.RequiredArgsConstructor; import com.icbc.api.utils.WebUtils;
//import lombok.extern.log4j.Log4j2; import com.yifu.cloud.plus.v1.ekp.config.IcbcConfigProperties;
//import org.springframework.beans.factory.annotation.Autowired; import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo;
//import org.springframework.boot.context.properties.EnableConfigurationProperties; import com.yifu.cloud.plus.v1.ekp.mapper.EkpSocialInfoMapper;
//import org.springframework.stereotype.Service; import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowIssueService;
// import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
//import java.io.FileInputStream; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
//import java.io.IOException; import lombok.RequiredArgsConstructor;
//import java.security.MessageDigest; import lombok.extern.log4j.Log4j2;
//import java.security.NoSuchAlgorithmException; import org.springframework.beans.factory.annotation.Autowired;
// import org.springframework.boot.context.properties.EnableConfigurationProperties;
///** import org.springframework.stereotype.Service;
// * 聚富通到账通知交易流水查询
// * import javax.servlet.http.HttpServletRequest;
// * @author huyc import java.io.FileInputStream;
// * @date 2024-05-23 11:21:56 import java.io.IOException;
// */ import java.math.BigInteger;
//@Log4j2 import java.net.URLDecoder;
//@Service import java.security.MessageDigest;
//@RequiredArgsConstructor import java.security.NoSuchAlgorithmException;
//@EnableConfigurationProperties(IcbcConfigProperties.class) import java.text.SimpleDateFormat;
//public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialInfoMapper, EkpSocialInfo> implements IcbcTransactionFlowIssueService { import java.util.Base64;
// import java.util.Date;
// @Autowired import java.util.HashMap;
// private IcbcConfigProperties icbcConfigProperties; import java.util.Map;
//
// public R submitIcbcTransactionFlow() { /**
// * 聚富通到账通知交易流水查询
// UiIcbcClient client = new UiIcbcClient(icbcConfigProperties.getAppId(), IcbcConstants.SIGN_TYPE_RSA2, icbcConfigProperties.getAppPrivateKey(), *
// IcbcConstants.CHARSET_UTF8); * @author huyc
// JftUiPayrollComfirmSubmitRequestV1 request = new JftUiPayrollComfirmSubmitRequestV1(); * @date 2024-05-23 11:21:56
// request.setServiceUrl("https://apipcs3.dccnet.com.cn/ui/jft/ui/payroll/comfirmsubmit/V1"); */
// JftUiPayrollComfirmSubmitRequestV1.JjftUiPayrolComfirmSubmitRequestV1BizV1 bizContent = @Log4j2
// new JftUiPayrollComfirmSubmitRequestV1.JjftUiPayrolComfirmSubmitRequestV1BizV1(); @Service
// bizContent.setAppId(icbcConfigProperties.getAppId()); @RequiredArgsConstructor
// //HR系统名称 @EnableConfigurationProperties(IcbcConfigProperties.class)
// bizContent.setAppName("HRO"); public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialInfoMapper, EkpSocialInfo> implements IcbcTransactionFlowIssueService {
// //企业编号
// bizContent.setOutVendorId(icbcConfigProperties.getCompanyNo()); @Autowired
// //操作类型:1-受理 2-审核 private IcbcConfigProperties icbcConfigProperties;
// bizContent.setOprType("1");
// bizContent.setTotalAmt("1000"); //1、网关公钥
// bizContent.setTotalCount("1"); private static final String APIGW_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCMpjaWjngB4E3ATh+G1DVAmQnIpiPEFAEDqRfNGAVvvH35yDetqewKi0l7OEceTMN1C6NPym3zStvSoQayjYV+eIcZERkx31KhtFu9clZKgRTyPjdKMIth/wBtPKjL/5+PYalLdomM4ONthrPgnkN4x4R0+D4+EBpXo8gNiAFsNwIDAQAB";
// bizContent.setAppSerialno("21900"); //2、appid
// bizContent.setLocalFilepath("D:/icbcFile/955888_21900_0_20240524.xls"); private static final String APP_ID = "11000000000000028685";
// bizContent.setFileMdcode(getMdCode("D:/icbcFile/955888_21900_0_20240524.xls")); //3、密钥对认证方式,公钥在API平台登记,此处为私钥
// bizContent.setFileType("1"); private static final String MY_PRIVATE_KEY = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCEZYrhm3dBp3PqlMc9fBBEE8Tp8M34Yy6Ucs3FV/VahsdHaLe0kEPugf1twbt/hD4hdIwzUj/ZtG2BhusRiMptdlWtNKcIgFxaaFaKANKrIodeQjv0jjZvK9ugoQxmiM4gF5SGX2a847zohv/6TvAYiB9AI3tdKQTbj6I3pwmuO3cfzgU5IwepeguE4fxqnh7C19MEq4vXv0yBq/f43zQ2HBMS+KRgokNLUBqoEOyf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ppHtac4ihUyQ+ZPRIfZqpmOXuaFJVmjUkm6zimpD+TOlaX3ZL88fdDX0E3xuBtBwBuxIkH0CgYEAlXyBbG2/fVV/PDUVCAA+aeWstojR1ncDhJmFnENSk5I/y3mh+d+u4ZG3hmVQZfR1EYM+n9wPQ2LxqNpGPA8o4JK/MSfVKun4lBwjkergHzxWJ5AMuYL1DPrOtMPEqrTqOHfVzSZGsz9cMK4tDWETKKFBOM/5oSdGGW3oYvzcS0M=";
// bizContent.setNotifyUrl(null);
// bizContent.setAppRemark("备注"); public R submitIcbcTransactionFlow() {
// bizContent.setBusinessType(null); //应用方加密串
// bizContent.setFileCheckSign(null); UiIcbcClient client = new UiIcbcClient(APP_ID, IcbcConstants.SIGN_TYPE_RSA2, MY_PRIVATE_KEY,
// request.setBizContent(bizContent); IcbcConstants.CHARSET_UTF8);
// try { JftUiPayrollComfirmSubmitRequestV1 request = new JftUiPayrollComfirmSubmitRequestV1();
// String result = client.buildPostForm(request); request.setServiceUrl("https://gw.open.icbc.com.cn/ui/jft/ui/payroll/comfirmsubmit/V1");
// if (Common.isNotNull(result)) { JftUiPayrollComfirmSubmitRequestV1.JjftUiPayrolComfirmSubmitRequestV1BizV1 bizContent =
// return R.ok(); new JftUiPayrollComfirmSubmitRequestV1.JjftUiPayrolComfirmSubmitRequestV1BizV1();
// } bizContent.setAppId(APP_ID);
// } catch (IcbcApiException e) { //HR系统名称
// e.printStackTrace(); bizContent.setAppName("HRO");
// return R.failed(); //企业编号
// } bizContent.setOutVendorId("020101190");
// return R.ok(); //操作类型:1-受理 2-审核
// } bizContent.setOprType("1");
// bizContent.setTotalAmt("1");
// public R selectIcbcTransactionFlowInfo() { bizContent.setTotalCount("1");
// bizContent.setAppSerialno("WX003");
// DefaultIcbcClient client = new DefaultIcbcClient(icbcConfigProperties.getAppId(), IcbcConstants.SIGN_TYPE_RSA2, bizContent.setFileCheckSign("1");
// icbcConfigProperties.getAppPrivateKey(), IcbcConstants.CHARSET_UTF8, IcbcConstants.FORMAT_JSON, bizContent.setLocalFilepath("D:/icbcFile/020101190_WX003_0_20240827.xls");
// icbcConfigProperties.getApigwPublicKey(), IcbcConstants.ENCRYPT_TYPE_AES, icbcConfigProperties.getAesKey(), null, null); bizContent.setFileMdcode(getMdCode("D:/icbcFile/020101190_WX003_0_20240827.xls"));
// JftApiPayrollQueryDetailRequestV1 request = new JftApiPayrollQueryDetailRequestV1(); bizContent.setFileType("1");
// request.setServiceUrl("https://apipcs3.dccnet.com.cn/api/jft/api/payroll/querydetail/V1"); bizContent.setNotifyUrl(null);
// JftApiPayrollQueryDetailRequestV1.JftApiPayrollQueryDetailRequestV1Biz bizContent = new bizContent.setAppRemark("备注");
// JftApiPayrollQueryDetailRequestV1.JftApiPayrollQueryDetailRequestV1Biz(); JSONObject jsonObject = new JSONObject();
// bizContent.setAppId(icbcConfigProperties.getAppId()); jsonObject.put("key",request);
// bizContent.setOutVendorId(icbcConfigProperties.getCompanyNo());
// bizContent.setType("2"); request.setBizContent(bizContent);
// //批次号,appSerialno为空时,必输 System.out.println("request: " + JSON.toJSONString(request));
// bizContent.setAppBatserialno("21900");
// //内部批次号,组成规则:批次号-顺序号,appBatserialno为空时必输 try {
//// bizContent.setAppSerialno("230921"); String result = client.buildPostForm(request);
// bizContent.setStartId("0"); if (Common.isNotNull(result)) {
// bizContent.setEndId("10"); return R.ok();
// request.setBizContent(bizContent); }
// try { } catch (IcbcApiException e) {
// JftApiPayrollQueryDetailResponseV1 responseV1 = client.execute(request); e.printStackTrace();
// if (Common.isNotNull(responseV1)) { return R.failed();
// return R.ok(); }
// } return R.ok();
// } catch (IcbcApiException e) { }
// e.printStackTrace();
// return R.failed(); public R selectIcbcTransactionFlowInfo() {
// }
// return R.ok(); //应用方加密串
// } String AES_Key = "8jTKCqZ9035g+HRzpZQqZA==";
// DefaultIcbcClient client = new DefaultIcbcClient(APP_ID, IcbcConstants.SIGN_TYPE_RSA2,
// public String getMdCode(String filePath) { MY_PRIVATE_KEY, IcbcConstants.CHARSET_UTF8, IcbcConstants.FORMAT_JSON,
// try { APIGW_PUBLIC_KEY, IcbcConstants.ENCRYPT_TYPE_AES, AES_Key, null, null);
// MessageDigest md5Digest = MessageDigest.getInstance("MD5"); JftApiPayrollQueryDetailRequestV1 request = new JftApiPayrollQueryDetailRequestV1();
// byte[] buffer = new byte[8192]; request.setServiceUrl("https://gw.open.icbc.com.cn/api/jft/api/payroll/querydetail/V1");
// JftApiPayrollQueryDetailRequestV1.JftApiPayrollQueryDetailRequestV1Biz bizContent = new
// try (FileInputStream fis = new FileInputStream(filePath)) { JftApiPayrollQueryDetailRequestV1.JftApiPayrollQueryDetailRequestV1Biz();
// int bytesRead; bizContent.setAppId(APP_ID);
// while ((bytesRead = fis.read(buffer)) != -1) { bizContent.setOutVendorId("020101190");
// md5Digest.update(buffer, 0, bytesRead); bizContent.setType("2");
// } //批次号,appSerialno为空时,必输
// } bizContent.setAppBatserialno("WX04");
// byte[] md5Bytes = md5Digest.digest(); //内部批次号,组成规则:批次号-顺序号,appBatserialno为空时必输
// // bizContent.setAppSerialno("WX04-1");
// // Convert the byte to hex format bizContent.setStartId("0");
// StringBuilder result = new StringBuilder(); bizContent.setEndId("10");
// for (byte md5Byte : md5Bytes) { request.setBizContent(bizContent);
// result.append(Integer.toString((md5Byte & 0xff) + 0x100, 16).substring(1)); try {
// } JftApiPayrollQueryDetailResponseV1 responseV1 = client.execute(request);
// if (Common.isNotNull(responseV1)) {
// return result.toString(); return R.ok();
// } catch (NoSuchAlgorithmException | IOException e) { }
// //Handle the exception according to your requirements } catch (IcbcApiException e) {
// e.printStackTrace(); e.printStackTrace();
// return null; return R.failed();
// } }
// } return R.ok();
// }
//}
public R businessOpen() {
String apiUrl= "https://gw.open.icbc.com.cn/api/jft/api/vendor/separate/accounts/business/open/V1";
String encryptKey = "u1NKBJOMzvkHFvGiKbsq3g==";
//签名类型为RSA2时,需传入appid,私钥和网关公钥,签名类型使用定值IcbcConstants.SIGN_TYPE_RSA2,其他参数使用缺省值
DefaultIcbcClient client = new DefaultIcbcClient(APP_ID,"RSA2", MY_PRIVATE_KEY,"UTF-8", "json",APIGW_PUBLIC_KEY,"AES",encryptKey, "", "");
JftApiVendorSeparateAccountsBusinessOpenRequestV1 request = new JftApiVendorSeparateAccountsBusinessOpenRequestV1();
//4、根据测试环境和生产环境替换相应ip和端口
request.setServiceUrl(apiUrl);
//5、请对照接口文档用bizContent.setxxx()方法对业务上送数据进行赋值
JftApiVendorSeparateAccountsBusinessOpenRequestV1.JftApiVendorSeparateAccountsBusinessOpenRequestV1Biz bizContent = new JftApiVendorSeparateAccountsBusinessOpenRequestV1.JftApiVendorSeparateAccountsBusinessOpenRequestV1Biz();
bizContent.setAppId(APP_ID);
bizContent.setOutVendorId("0202407190000011934");
bizContent.setOutVendorManagerId("0202407190000011934");
bizContent.setOutUpperVendorId(APP_ID);
bizContent.setVendorName("安徽皖信人力资源管理有限公司");
bizContent.setBizType("01");
bizContent.setOpenCardType("0");
bizContent.setBusinessType("02");//开通业务类型
bizContent.setSubBusinessType("03");//开通业务类型
bizContent.setBusSwitch("1");//业务开通关闭标志,开通时传1 关闭时传0
bizContent.setRegistType("1");//注册标识 1 注册+开通业务 2 仅维护业务
bizContent.setUpperMcardNo("");
bizContent.setEqfEnsurePhone("");
request.setBizContent(bizContent);
JftApiVendorSeparateAccountsBusinessOpenResponseV1 response;
JSONObject jsonObject = new JSONObject();
jsonObject.put("key",request);
String a = jsonObject.toJSONString();
try {
response = (JftApiVendorSeparateAccountsBusinessOpenResponseV1)client.execute(request, System.currentTimeMillis()+"");
if (response.isSuccess()) {
//6、业务成功处理,请根据接口文档用response.getxxx()获取同步返回的业务数据
System.out.println("ReturnCode:"+response.getReturnCode());
System.out.println("response:" + response);
} else {
//失败
System.out.println("ReturnCode:"+response.getReturnCode());
System.out.println("ReturnMsg:"+response.getReturnMsg());
}
} catch (IcbcApiException e) {
e.printStackTrace();
}
return R.ok();
}
public R asyncNotice(HttpServletRequest request) throws Exception {
//验签
String api = "/icbcIssue/notifyUrl";
boolean verifyFlag = verifySignData(request, api);
String returnJson;
if (verifyFlag) {// 验签成功
log.info("解密...");
String bizContent = dencrypt(request);
log.info("解密后参数:" + bizContent);// 进行自己的处理,此处默认处理成功,返回通知方成功,return_code=0
String copReturnCode = "0";// 通知合作方接收成功的返回码,固定
String copReturnMsg = "success";// 合作方的返回信息,固定
returnJson = sign(request, copReturnCode, copReturnMsg);
log.error("通知响应json结果:{}", returnJson);
return R.ok(returnJson);
} else {// 验签失败
String copReturnCode = "-12345";
String copReturnMsg = "icbc jft sign not pass.";
returnJson = sign(request, copReturnCode, copReturnMsg);
log.error("通知响应json结果:{}", returnJson);
return R.failed(returnJson);
}
}
public String getMdCode(String filePath) {
FileInputStream in = null;
byte[] buffer = new byte[1024];
String mdCode;
try {
MessageDigest digest = MessageDigest.getInstance("SHA-256");
in = new FileInputStream(filePath);
int len;
while ((len = in.read(buffer, 0, 1024)) != -1) {
digest.update(buffer, 0, len);
}
BigInteger bigInt = new BigInteger(1, digest.digest());
mdCode = bigInt.toString();
return mdCode;
} catch (NoSuchAlgorithmException noSuchExc) {
mdCode = null;
} catch (IOException exception) {
exception.printStackTrace();
return null;
} finally {
if (in != null) {
try {
in.close();
} catch (IOException exc) {
;
}
}
}
return mdCode;
}
/**
* 验签方法
*
* @param request
* @param path
* @return
* @throws Exception
*/
private boolean verifySignData(HttpServletRequest request, String path) throws Exception {
// 网关公钥
Map<String, String> params = new HashMap<>();
String api = request.getParameter("api");
String from = request.getParameter("from");
String appId = request.getParameter("app_id");
String charset = request.getParameter("charset");
String format = request.getParameter("format");
//String encrypt_type = request.getParameter("encrypt_type");
String timestamp = request.getParameter("timestamp");
String bizContent = request.getParameter("biz_content");
String signType = request.getParameter("sign_type");
String sign = request.getParameter("sign");
params.put("from", from);
params.put("api", api);
params.put("app_id", appId);
params.put("charset", charset);
params.put("format", format);
//params.put("encrypt_type", encrypt_type);
params.put("timestamp", timestamp);
params.put("biz_content", bizContent);
params.put("sign_type", signType);// 目前上行网关签名暂时仅支持RSA
//验证工行上行网关RSA签名
String signStr = WebUtils.buildOrderedSignStr(path, params);
log.error("验签入参,signStr:[[{}]], sign_type:[[{}]], APIGW_PUBLIC_KEY:[[{}]], charset:[[{}]], sign:[[{}]]",
signStr, signType, APIGW_PUBLIC_KEY, sign);
return IcbcSignature.verify(signStr, signType, APIGW_PUBLIC_KEY, charset, sign);
}
/**
* 解密
*
* @param request
* @return
* @throws IOException
*/
private String dencrypt(HttpServletRequest request) throws IOException {
String bizContent = URLDecoder.decode(request.getParameter("biz_content"),"utf-8");
// 解析请求数据map
ObjectMapper mapper = new ObjectMapper();
Map<String, String> transMap = mapper.readValue(bizContent, Map.class);
// 获取报文密文信息
String notifyData = transMap.get("notifyData");
return new String(Base64.getDecoder().decode(notifyData));
}
/**
* 加签方法
*
* @param request
* @param copReturnCode
* @param copReturnMsg
* @return
* @throws Exception
*/
private String sign(HttpServletRequest request, String copReturnCode, String copReturnMsg) throws Exception {
String msgId = new SimpleDateFormat("yyyyMMdd").format(new Date())
+ new SimpleDateFormat("HHmmss").format(new Date());
String responseBizContent = "{\"return_code\":\"" + copReturnCode + "\",\"return_msg\":\"" + copReturnMsg + "\""
+ ",\"msg_id\":\"" + msgId + "\"}";
String charset = request.getParameter("charset");// 调用过程使用的编码格式
//商户对消息返回响应进行签名,签名方式需与在API平台登记APP的sign_type保持一致(目前基本都是RSA2)
String signType = IcbcConstants.SIGN_TYPE_RSA2;
String signStr = "\"response_biz_content\":" + responseBizContent + "," + "\"sign_type\":" + "\"" + signType
+ "\"";
String signParam = IcbcSignature.sign(signStr, signType, MY_PRIVATE_KEY, charset);
String returnJson = "{\"response_biz_content\":" + responseBizContent + ",\"sign_type\":\"" + signType + "\""
+ ",\"sign\":\"" + signParam + "\"}";
return returnJson;
}
}
package com.yifu.cloud.plus.v1.ekp.service.impl; package com.yifu.cloud.plus.v1.ekp.service.impl;
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.icbc.api.DefaultIcbcClient; import com.icbc.api.DefaultIcbcClient;
import com.icbc.api.IcbcApiException; import com.icbc.api.IcbcApiException;
import com.icbc.api.IcbcConstants; import com.icbc.api.IcbcConstants;
import com.icbc.api.request.JftApiB2bpayTransqueryRequestV1; import com.icbc.api.request.JftApiB2bpayTransqueryRequestV1;
import com.icbc.api.request.JftApiPayB2bpayGenpreorderRequestV1; import com.icbc.api.request.JftApiPayB2bpayGenpreorderRequestV1;
import com.icbc.api.request.MybankEnterpriseAccountQuerybankinfoRequestV1;
import com.icbc.api.request.MybankEnterpriseTradeQhisdRequestV1;
import com.icbc.api.response.JftApiB2bpayTransqueryResponseV1; import com.icbc.api.response.JftApiB2bpayTransqueryResponseV1;
import com.icbc.api.response.JftApiPayB2bpayGenpreorderResponseV1; import com.icbc.api.response.JftApiPayB2bpayGenpreorderResponseV1;
import com.icbc.api.response.MybankEnterpriseAccountQuerybankinfoResponseV1;
import com.icbc.api.response.MybankEnterpriseTradeQhisdResponseV1;
import com.icbc.api.utils.IcbcSignature;
import com.yifu.cloud.plus.v1.ekp.config.EkpEntryProperties;
import com.yifu.cloud.plus.v1.ekp.config.IcbcConfigProperties; import com.yifu.cloud.plus.v1.ekp.config.IcbcConfigProperties;
import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo; import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo;
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.IcbcTransactionFlowQueryService; import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowQueryService;
import com.yifu.cloud.plus.v1.ekp.vo.EKPEntryPushParam;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import io.micrometer.core.instrument.util.StringUtils;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.http.*;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
/** /**
* 聚富通到账通知交易流水查询 * 聚富通到账通知交易流水查询
...@@ -31,39 +49,55 @@ import java.util.List; ...@@ -31,39 +49,55 @@ import java.util.List;
@Log4j2 @Log4j2
@Service @Service
@RequiredArgsConstructor @RequiredArgsConstructor
@EnableConfigurationProperties(IcbcConfigProperties.class) @EnableConfigurationProperties({IcbcConfigProperties.class, EkpEntryProperties.class})
public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialInfoMapper, EkpSocialInfo> implements IcbcTransactionFlowQueryService { public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialInfoMapper, EkpSocialInfo> implements IcbcTransactionFlowQueryService {
@Autowired @Autowired
private IcbcConfigProperties icbcConfigProperties; private IcbcConfigProperties icbcConfigProperties;
@Autowired
private EkpEntryProperties ekpEntryProperties;
public R getIcbcTransactionFlow() { public R getIcbcTransactionFlow() {
//应用id 应用方私钥 网关公钥 应用方加密串 // //应用id 应用方私钥 网关公钥 应用方加密串
String APP_ID = "11000000000000028685"; // String APP_ID = "11000000000000028685";
//应用方私钥 // //应用方私钥
String MY_PRIVATE_KEY = "MIIEvQIBADANBgk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cS0M=";
//网关公钥 // //网关公钥
// String APIGW_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCMpjaWjngB4E3ATh+G1DVAmQnIpiPEFAEDqRfNGAVvvH35yDetqewKi0l7OEceTMN1C6NPym3zStvSoQayjYV+eIcZERkx31KhtFu9clZKgRTyPjdKMIth/wBtPKjL/5+PYalLdomM4ONthrPgnkN4x4R0+D4+EBpXo8gNiAFsNwIDAQAB";
// //应用方加密串
// String AES_Key = "8jTKCqZ9035g+HRzpZQqZA==";
//1、网关公钥
String APIGW_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCMpjaWjngB4E3ATh+G1DVAmQnIpiPEFAEDqRfNGAVvvH35yDetqewKi0l7OEceTMN1C6NPym3zStvSoQayjYV+eIcZERkx31KhtFu9clZKgRTyPjdKMIth/wBtPKjL/5+PYalLdomM4ONthrPgnkN4x4R0+D4+EBpXo8gNiAFsNwIDAQAB"; String APIGW_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCMpjaWjngB4E3ATh+G1DVAmQnIpiPEFAEDqRfNGAVvvH35yDetqewKi0l7OEceTMN1C6NPym3zStvSoQayjYV+eIcZERkx31KhtFu9clZKgRTyPjdKMIth/wBtPKjL/5+PYalLdomM4ONthrPgnkN4x4R0+D4+EBpXo8gNiAFsNwIDAQAB";
//应用方加密串 //2、appid
String AES_Key = "8jTKCqZ9035g+HRzpZQqZA=="; String APP_ID = "11000000000000029313";
DefaultIcbcClient client = new DefaultIcbcClient(APP_ID, IcbcConstants.SIGN_TYPE_RSA2, //3、密钥对认证方式,公钥在API平台登记,此处为私钥
String MY_PRIVATE_KEY = "MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC96zrfaBT4YOoLErhTaFnv0De1K3ZsZRQDGm3dIF8wHX/Rqg2sz5hfJexMwNgTepHdxrpveq8bog9jny8CtCT2etUD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LvXdb9VRQ+dEam+gfi0gxf8S1+cljHJSQq5y450dLlI/8nogFtI+eB0k8+jsZUqK0dwKBgQCE6I+TZAJmUK5qCBNh38C9xjZ3zSbyI6ghGHOf/V4Meuqrmgs3RrYxN7tSaWVlylDAi5p9Vp3Ry9q4qaYUe78vgLwF+bXp1ot51H0tcn3/nQoriemAQLgAYnkWc3iKstVb1XZ0Xj4hDh0H4jvFobq5BCqh8li2Ta49gwBhzWZI+wKBgQCTHyWu3M6FtClYFHm2T3rOpTvjE/3xWZ3gMPsk8bMuyPZPEP83HJGVyBtwlbr05JMtZ1rEaPsVVQn0U1Qp0z+8tl4I9F+fJiUmu0/2/hS2iFsDKdZGJnfAM8APG6K7ID5Km8CnmnPX/ynBA1kpucIRUDnUwbGcfEbf2ufhPd10dg==";
String AES_Key = "u1NKBJOMzvkHFvGiKbsq3g==";
DefaultIcbcClient client = new DefaultIcbcClient(APP_ID, IcbcConstants.SIGN_TYPE_CA_SM_ICBC,
MY_PRIVATE_KEY, IcbcConstants.CHARSET_UTF8, IcbcConstants.FORMAT_JSON, APIGW_PUBLIC_KEY, MY_PRIVATE_KEY, IcbcConstants.CHARSET_UTF8, IcbcConstants.FORMAT_JSON, APIGW_PUBLIC_KEY,
IcbcConstants.ENCRYPT_TYPE_AES, AES_Key, "", ""); IcbcConstants.ENCRYPT_TYPE_AES, AES_Key, "", "");
JftApiB2bpayTransqueryRequestV1 request = new JftApiB2bpayTransqueryRequestV1(); JftApiB2bpayTransqueryRequestV1 request = new JftApiB2bpayTransqueryRequestV1();
request.setServiceUrl("https://gw.open.icbc.com.cn/api/jft/api/b2bpay/transquery/V1"); request.setServiceUrl("https://apipcs3.dccnet.com.cn/api/jft/api/b2bpay/transquery/V1");
JftApiB2bpayTransqueryRequestV1.JftApiB2bpayTransqueryRequestV1Biz bizContent = new JftApiB2bpayTransqueryRequestV1.JftApiB2bpayTransqueryRequestV1Biz bizContent = new
JftApiB2bpayTransqueryRequestV1.JftApiB2bpayTransqueryRequestV1Biz(); JftApiB2bpayTransqueryRequestV1.JftApiB2bpayTransqueryRequestV1Biz();
bizContent.setAppId(APP_ID); bizContent.setAppId(APP_ID);
// bizContent.setOutVendorId("130290000436004"); // bizContent.setOutVendorId("0202407150000011719");
// bizContent.setOutUserId("874"); // bizContent.setOutUserId("874");
bizContent.setCardNo("1302010109024596014"); // bizContent.setCardNo("1302010109024596014");
// bizContent.setPayAccount("0200000309200211917"); // bizContent.setCardNo("9558851302001955895");
// bizContent.setStartTrxDate("20240301"); // bizContent.setPayAccount("990204011101001401");
// bizContent.setEndTrxDate("20240730"); bizContent.setStartTrxDate("20240724");
bizContent.setEndTrxDate("20240726");
bizContent.setStartId("1"); bizContent.setStartId("1");
bizContent.setEndId("50"); bizContent.setEndId("50");
bizContent.setType("00");
request.setBizContent(bizContent); request.setBizContent(bizContent);
JSONObject jsonObject = new JSONObject();
jsonObject.put("key",request);
String a = jsonObject.toJSONString();
JftApiB2bpayTransqueryResponseV1 response; JftApiB2bpayTransqueryResponseV1 response;
try { try {
//到账通知交易流水查询 //到账通知交易流水查询
...@@ -81,6 +115,176 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -81,6 +115,176 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
} }
} }
public R getIcbcTransactionFlowNew() throws IcbcApiException {
// String ca_sm_path = "D:/icbcFile/ahwx_y_1302.cer";
// String ca_sm_icbc_path = "D:/icbcFile/API_GATEWAY_ICBC_SM_REAL.cer";
// 获取当前类加载器
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
// 获取资源的URL
// URL resourceUrl = classLoader.getResource("/file/ahwx_y_1302.cer");
// URL resourceUrl1 = classLoader.getResource("/file/API_GATEWAY_ICBC_SM_REAL.cer");
// String ca_sm = IcbcSignature.getCAInfoStr(resourceUrl.getPath());
// String ca_sm_icbc = IcbcSignature.getCAInfoStr(resourceUrl1.getPath());
// String ca_sm = IcbcSignature.getCAInfoStr(ca_sm_path);
// String ca_sm_icbc = IcbcSignature.getCAInfoStr(ca_sm_icbc_path);
// log.error("文件地址:" + resourceUrl.getPath() + "转化后的编码" + ca_sm);
// log.error("文件地址1:" + resourceUrl1.getPath() + "转化后的编码1" + ca_sm_icbc);
// DefaultIcbcClient(appid, 签名类型, SM2企业私钥, 编码格式, 数据格式, null, null, null, SM2 cer公钥串, null)
DefaultIcbcClient client = new DefaultIcbcClient(icbcConfigProperties.getAppId(), IcbcConstants.SIGN_TYPE_CA_SM_ICBC,
icbcConfigProperties.getAppPrivateKey(), IcbcConstants.CHARSET_UTF8, IcbcConstants.FORMAT_JSON, null,
null, null, "MIICSTCCAeygAwIBAgIGAJuAEtYAMAwGCCqBHM9VAYN1BQAwQTELMAkGA1UEBhMCY24xGzAZBgNVBAoMEnNtMmNvci5pY2JjLmNvbS5jbjEVMBMGA1UEAwwMc20ycm9vdGNhY29yMB4XDTIzMTIyMTA5NTAxNloXDTI4MTIyMTE1NTk1OVowVDELMAkGA1UEBhMCY24xGzAZBgNVBAoMEnNtMmNvci5pY2JjLmNvbS5jbjENMAsGA1UECwwEMTMwMjEZMBcGA1UEAwwQYWh3eC55LjEzMDIuMDIwMTBZMBMGByqGSM49AgEGCCqBHM9VAYItA0IABGEC1fF2rHTWfipQhOr+8SfvXDBiazIrImcsPH5aGaYMFK2RIXv0AF2xe2ZgAzcWRbgop0cAjaBHXpzSfIlnfl6jgbowgbcwHwYDVR0jBBgwFoAUDD6RRlIIkxjZ0/0x6S8mKdW3D2YwCQYDVR0TBAIwADBdBgNVHR8EVjBUMFKgUKBOpEwwSjEQMA4GA1UEAwwHY3JsNDE3MDEMMAoGA1UECwwDY3JsMRswGQYDVQQKDBJzbTJjb3IuaWNiYy5jb20uY24xCzAJBgNVBAYTAmNuMAsGA1UdDwQEAwIHgDAdBgNVHQ4EFgQUd0LHEI6l7Faq6/9GObNld3SH7xswDAYIKoEcz1UBg3UFAANJADBGAiEA68uRM5zYzMhaheAG+f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ENjA0MDKg\n" +
"MKAuhixodHRwOi8vY3JsLmNmY2EuY29tLmNuL29jYTMxL1NNMi9jcmwyNzMwLmNy\n" +
"bDAOBgNVHQ8BAf8EBAMCBsAwHQYDVR0OBBYEFOpEqrs73yvBXqvDQoT33v05FnDI\n" +
"MB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDBDAMBggqgRzPVQGDdQUAA0kA\n" +
"MEYCIQCdKpfhUijpAKEQekHxlk4LvnqzzaYmODo3T3qmZUJsUwIhAOaMMH0Ipwef\n" +
"VTSwJlhrVbmEB5DmoxLo1Xb/1tvfW1l2");
MybankEnterpriseTradeQhisdRequestV1.MybankEnterpriseTradeQhisdRequestBizV1 bizContent =
new MybankEnterpriseTradeQhisdRequestV1.MybankEnterpriseTradeQhisdRequestBizV1();
MybankEnterpriseTradeQhisdRequestV1 request = new MybankEnterpriseTradeQhisdRequestV1();
// 获取当前时间
LocalTime currentTime = LocalTime.now();
// 使用DateTimeFormatter格式化
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HHmmssSSS");
String formattedTime = currentTime.format(formatter);
bizContent.setTranDate(DateUtil.getThisDay());
bizContent.setTranTime(formattedTime);
log.error("formattedTime:" + formattedTime);
bizContent.setTransCode("QHISD");
bizContent.setLanguage("zh_CN");
String fSeqNo = "AHWX" + System.currentTimeMillis();
bizContent.setfSeqno(fSeqNo);
bizContent.setAccountNo("1302010109024596014");
bizContent.setBeginDate(DateUtil.getThisDay());
bizContent.setDrcrf("2");
request.setServiceUrl(icbcConfigProperties.getServerUrl());
request.setBizContent(bizContent);
MybankEnterpriseTradeQhisdResponseV1 response = client.execute(request);
if(response.isSuccess()) {
//查询当天的所有入账记录数据
List<String> serioList = baseMapper.getAllserioNo();
List<MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1> list = response.getRd();
String bankName = response.getAccountName();
String bankNo = response.getAccountNo();
//获取成功后根据流水号去重和根据借贷标志02筛选出所有数据
if (!list.isEmpty()) {
List<MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1> insertList =
list.stream().filter(e-> e.getDrcrf().equals("2") && !serioList.contains(e)).collect(Collectors.toList());
//封装数据
if (!insertList.isEmpty()) {
for (MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1 entry : insertList) {
EKPEntryPushParam pushParam = new EKPEntryPushParam();
initValue(entry,pushParam,bankName,bankNo);
String body = sendToEkp(pushParam);
//重试
if (StringUtils.isBlank(body)){
sendToEkp(pushParam);
}
break;
}
}
}
}
return R.ok();
}
//推送数据
public String sendToEkp(EKPEntryPushParam pushParam){
RestTemplate yourRestTemplate = new RestTemplate();
try{
String formValues = new ObjectMapper().writeValueAsString(pushParam);
//指向EKP的接口url
//把ModelingAppModelParameterAddForm转换成MultiValueMap
MultiValueMap<String,Object> wholeForm = new LinkedMultiValueMap<>();
wholeForm.add("docSubject",ekpEntryProperties.getEntryDocSubject());
wholeForm.add("docCreator", "{\"LoginName\":\"admin\"}");
wholeForm.add("docStatus", ekpEntryProperties.getEntryDocStatus());
wholeForm.add("fdModelId", ekpEntryProperties.getEntryFdModelId());
wholeForm.add("fdFlowId", ekpEntryProperties.getEntryFdFlowId());
wholeForm.add("formValues", formValues);
HttpHeaders headers = new HttpHeaders();
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
//addAuth(headers,"yourAccount"+":"+"yourPassword");是VO,则使用APPLICATION_JSON
headers.setContentType(MediaType.MULTIPART_FORM_DATA);
//必须设置上传类型,如果入参是字符串,使用MediaType.TEXT_PLAIN;如果
HttpEntity<MultiValueMap<String,Object>> entity = new HttpEntity<>(wholeForm,headers);
//有返回值的情况 VO可以替换成具体的JavaBean
log.info("入账明细推送EKP开始,formValues:"+formValues);
ResponseEntity<String> obj = yourRestTemplate.exchange(ekpEntryProperties.getEntryUrl(), HttpMethod.POST, entity, String.class);
String body = obj.getBody();
if (StringUtils.isBlank(body)){
log.error("入账明细交易失败:"+obj);
return null;
}else{
log.info("入账明细交易成功:"+obj);
return body;
}
}catch (Exception e){
log.error("入账明细交易失败:", e);
return null;
}
}
public R querybankinfo() {
String ca_sm_path = "D:/icbcFile/ahwx_y_1302.cer";
String ca_sm_icbc_path = "D:/icbcFile/API_GATEWAY_ICBC_SM_REAL.cer";
String ca_sm = IcbcSignature.getCAInfoStr(ca_sm_path);
String ca_sm_icbc = IcbcSignature.getCAInfoStr(ca_sm_icbc_path);
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,
IcbcConstants.CHARSET_UTF8, IcbcConstants.FORMAT_JSON, null,
null, null, ca_sm, null);
client.setIcbc_ca(ca_sm_icbc);
try {
MybankEnterpriseAccountQuerybankinfoRequestV1.MybankEnterpriseAccountQuerybankinfoRequestBizV1 bizContent =
new MybankEnterpriseAccountQuerybankinfoRequestV1.MybankEnterpriseAccountQuerybankinfoRequestBizV1();
MybankEnterpriseAccountQuerybankinfoRequestV1 request = new MybankEnterpriseAccountQuerybankinfoRequestV1();
// 请对照接口文档用bizContent.setxxx()方法对业务上送数据进行赋值
bizContent.setTransCode("QBKNC");
bizContent.setTranDate("20240821");
bizContent.setTranTime("103231001");
bizContent.setLanguage("zh_CN");
bizContent.setfSeqNo("AHWX"+ System.currentTimeMillis());
bizContent.setCardNo("6222620250010165293");
request.setServiceUrl("https://gw.open.icbc.com.cn/api/mybank/enterprise/account/querybankinfo/V1");
request.setBizContent(bizContent);
MybankEnterpriseAccountQuerybankinfoResponseV1 response = client.execute(request);
if (response.isSuccess()) {
// 业务成功处理
System.out.println("success");
} else {
// 失败
System.out.println("error");
}
} catch (Exception e) {
e.printStackTrace();
}
return R.ok();
}
public R saveIcbcManagerCard() { public R saveIcbcManagerCard() {
//应用id 应用方私钥 网关公钥 应用方加密串 //应用id 应用方私钥 网关公钥 应用方加密串
String APP_ID = "11000000000000015602"; String APP_ID = "11000000000000015602";
...@@ -192,4 +396,19 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -192,4 +396,19 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
return R.ok(); return R.ok();
} }
} }
public void initValue(MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1 entry,
EKPEntryPushParam pushParam,String bankName,String bankNo) {
pushParam.setFd_recipName(entry.getRecipName());
pushParam.setFd_recipAccountNo(entry.getRecipAccountNo());
pushParam.setFd_recipBkName(entry.getRecipBkName());
pushParam.setFd_date(entry.getBusiDate() + " " + entry.getBusiTime());
pushParam.setFd_receiveBkName(bankName);
pushParam.setFd_receiveBkNo(bankNo);
pushParam.setFd_remark(entry.getSummary());
pushParam.setFd_receiveMoney(String.valueOf(entry.getCreditAmount()/100.0));
pushParam.setFd_daReal(entry.getBusiDate() + " " + entry.getBusiTime());
pushParam.setFd_daTime(entry.getBusiDate() + " " + entry.getBusiTime());
pushParam.setFd_onlySequence(entry.getOnlySequence());
}
} }
...@@ -61,4 +61,10 @@ security: ...@@ -61,4 +61,10 @@ security:
urls: urls:
- /v3/api-docs - /v3/api-docs
- /actuator/** - /actuator/**
- /swagger-ui/** - /swagger-ui/**
\ No newline at end of file
entry:
entryUrl: http://36.7.147.29:27007/api/hro/modelingWebservice/addModel
entryFdModelId: 18050b5cee8b79c234bf64d412294f23
entryLoginName: admin
entryDocSubject: 入账明细推送ekp接口
\ No newline at end of file
...@@ -103,4 +103,12 @@ security: ...@@ -103,4 +103,12 @@ security:
urls: urls:
- /v3/api-docs - /v3/api-docs
- /actuator/** - /actuator/**
- /swagger-ui/** - /swagger-ui/**
\ No newline at end of file
entry:
entryUrl: http://36.7.147.29:27007/api/sys-modeling/appModelRestService/addModel
entryFdModelId: 18050b5cee8b7f8e56879448e4f23aad
entryFdFlowId: 191919ae533d080b60e6e784c55a3c8b
entryDocStatus: 20
entryLoginName: admin
entryDocSubject: 入账明细推送ekp接口
\ No newline at end of file
...@@ -70,3 +70,9 @@ springdoc: ...@@ -70,3 +70,9 @@ springdoc:
- group: ekp - group: ekp
#按包路径匹配 #按包路径匹配
packagesToScan: com.yifu.cloud.plus.v1.ekp.controller packagesToScan: com.yifu.cloud.plus.v1.ekp.controller
#工行生产环境配置
icbc:
appId: 11000000000000019038
appPrivateKey: 4d931f6ad4331158fcc4dea23f0d71393328146e40b5f63f197b9f6ad3732f44
serverUrl: https://gw.open.icbc.com.cn/api/mybank/enterprise/trade/qhisd/V1
\ No newline at end of file
-----BEGIN CERTIFICATE-----
MIIDdDCCAxegAwIBAgIFRjBiNDYwDAYIKoEcz1UBg3UFADBcMQswCQYDVQQGEwJD
TjEwMC4GA1UECgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9y
aXR5MRswGQYDVQQDDBJDRkNBIEFDUyBTTTIgT0NBMzEwHhcNMjMwMjE1MDkyMTA5
WhcNMjgwMjE1MDkyMTA5WjCBpTELMAkGA1UEBhMCQ04xGzAZBgNVBAoMEkNGQ0Eg
QUNTIFNNMiBPQ0EzMTETMBEGA1UECwwKQ0ZDQSBPQ0EzMTEZMBcGA1UECwwQT3Jn
YW5pemF0aW9uYWwtMTFJMEcGA1UEAwxAQ0ZDQUDkuK3lm73lt6XllYbpk7booYzo
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VBAoMEnNtMmNvci5pY2JjLmNvbS5jbjENMAsGA1UECwwEMTMwMjEZMBcGA1UEAwwQYWh3eC55LjEzMDIuMDIwMTBZMBMGByqGSM49AgEGCCqBHM9VAYItA0IABGEC1fF2rHTWfipQhOr+8SfvXDBiazIrImcsPH5aGaYMFK2RIXv0AF2xe2ZgAzcWRbgop0cAjaBHXpzSfIlnfl6jgbowgbcwHwYDVR0jBBgwFoAUDD6RRlIIkxjZ0/0x6S8mKdW3D2YwCQYDVR0TBAIwADBdBgNVHR8EVjBUMFKgUKBOpEwwSjEQMA4GA1UEAwwHY3JsNDE3MDEMMAoGA1UECwwDY3JsMRswGQYDVQQKDBJzbTJjb3IuaWNiYy5jb20uY24xCzAJBgNVBAYTAmNuMAsGA1UdDwQEAwIHgDAdBgNVHQ4EFgQUd0LHEI6l7Faq6/9GObNld3SH7xswDAYIKoEcz1UBg3UFAANJADBGAiEA68uRM5zYzMhaheAG+fw3AtkRFE5146+Qw6GVP93WojwCIQDzsIL3duLRtTot8ciVuKUQkI+GrXAg7nWnd2M2o9oRBw==
-----END CERTIFICATE-----
\ No newline at end of file
...@@ -116,4 +116,14 @@ ...@@ -116,4 +116,14 @@
<update id="updateSocialStatus"> <update id="updateSocialStatus">
#{sql} #{sql}
</update> </update>
<!--查询社保明细信息-->
<select id="getAllserioNo" resultType="java.lang.String">
SELECT
fd_3b573843db30ce
from ekp_79c234bf64d412294f23
where fd_3b62f3470beb30 = '1302010109024596014'
and DATE_FORMAT(now(), '%Y-%m-%d') = DATE_FORMAT(fd_3aa4531d3b86e0, '%Y-%m-%d')
and fd_3b57f8de9df354 = '是'
</select>
</mapper> </mapper>
package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.time.LocalDate;
/**
* @author licancan
* @description 商险明细表 t_insurance_detail
* @date 2022-07-18 16:20:16
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_insurance_alert")
@Schema(description = "商险到期提醒表")
public class TInsuranceAlert extends BaseEntity {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private String id;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
@Schema(description = "员工身份证号")
private String empIdcardNo;
/**
* 项目编码
*/
@Schema(description = "项目编码")
private String deptNo;
/**
* 投保岗位
*/
@Schema(description = "投保岗位")
private String post;
/**
* 保险公司名称(冗余字段)
*/
@Schema(description = "保险公司名称")
private String insuranceCompanyName;
/**
* 险种名称
*/
@Schema(description = "险种名称")
private String insuranceTypeName;
/**
* 购买标准
*/
@Schema(description = "购买标准")
private String buyStandard;
/**
* 医疗额度
*/
@Schema(description = "医疗额度")
private String medicalQuota;
/**
* 身故或残疾额度
*/
@Schema(description = "身故或残疾额度")
private String dieDisableQuota;
/**
* 保单编号
*/
@Schema(description = "保单编号")
private String policyNo;
/**
* 保单开始时间
*/
@Schema(description = "保单开始时间")
private LocalDate policyStart;
/**
* 保单结束时间
*/
@Schema(description = "保单结束时间")
private LocalDate policyEnd;
/**
* 保单生效日期
*/
@Schema(description = "保单生效日期")
private LocalDate policyEffect;
/**
* 结算月
*/
@Schema(description = "结算月")
private String settleMonth;
/**
* 发票号
*/
@Schema(description = "发票号")
private String invoiceNo;
/**
* 商险购买地省
*/
@Schema(description = "商险购买地省")
private String insuranceProvinceName;
/**
* 商险购买地市
*/
@Schema(description = "商险购买地市")
private String insuranceCityName;
/**
* 商险办理省
*/
@Schema(description = "商险办理省")
private String insuranceHandleProvinceName;
/**
* 商险办理城市
*/
@Schema(description = "商险办理城市")
private String insuranceHandleCityName;
/**
* 结算类型 (0、与薪资合并结算 1、单独结算)
*/
@Schema(description = "结算类型 (0、与薪资合并结算 1、单独结算)")
private Integer settleType;
/**
* 实际保费
*/
@Schema(description = "实际保费")
private BigDecimal actualPremium;
/**
* 预估保费
*/
@Schema(description = "预估保费")
private BigDecimal estimatePremium;
/**
* 是否过期 0未过期 1已过期
*/
@Schema(description = "是否过期 0未过期 1已过期")
private Integer isOverdue;
@Schema(description = "是否有效 0有效 1无效")
private Integer isEffect;
/**
* 备注
*/
@Schema(description = "备注")
private String remark;
/**
* 是否删除 0未删除/1删除
*/
@Schema(description = "是否删除 0否/1是")
private Integer deleteFlag;
/**
* 创建人所在部门名称
*/
@Schema(description = "创建人所在部门名称")
private String createUserDeptName;
@Schema(description = "项目名称")
private String deptName;
@Schema(description ="客户名称")
private String unitName;
@Schema(description ="客户编码")
private String unitNo;
/**
* 忽略提醒 0:忽略 1:不忽略
*/
@Schema(description = "有忽略提醒 0:忽略 1:不忽略")
private String expireIgnoreFlag;
/**
* 消息提醒备注
*/
@Schema(description = "消息提醒备注")
private String expireRemark;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
...@@ -101,11 +101,11 @@ public class InsuranceWarnExportVo implements Serializable { ...@@ -101,11 +101,11 @@ public class InsuranceWarnExportVo implements Serializable {
@Schema(name = "实际保费") @Schema(name = "实际保费")
private BigDecimal actualPremium; private BigDecimal actualPremium;
/** /**
* 创建 * 派单申请
*/ */
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "创建人") @ExcelProperty(value = "派单申请人")
@Schema(name = "创建人") @Schema(name = "派单申请人")
private String createName; private String createName;
/** /**
...@@ -250,8 +250,8 @@ public class InsuranceWarnExportVo implements Serializable { ...@@ -250,8 +250,8 @@ public class InsuranceWarnExportVo implements Serializable {
* 是否过期状态 0 未过期 1已过期。主要用于页面查询展示 * 是否过期状态 0 未过期 1已过期。主要用于页面查询展示
*/ */
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "是否过期") @ExcelProperty(value = "到期状态")
@Schema(name = "是否过期") @Schema(name = "到期状态")
private String isOverdue; private String isOverdue;
/** /**
...@@ -311,4 +311,8 @@ public class InsuranceWarnExportVo implements Serializable { ...@@ -311,4 +311,8 @@ public class InsuranceWarnExportVo implements Serializable {
@ExcelProperty(value = "消息提醒备注") @ExcelProperty(value = "消息提醒备注")
private String expireRemark; private String expireRemark;
@HeadFontStyle(fontHeightInPoints = 11)
@Schema(description = "是否忽略 0:忽略 1:不忽略")
@ExcelProperty(value = "是否忽略")
private String expireIgnoreFlag;
} }
...@@ -358,7 +358,6 @@ public class TBusinessInsuranceVo implements Serializable { ...@@ -358,7 +358,6 @@ public class TBusinessInsuranceVo implements Serializable {
@Schema(name = "创建人ID") @Schema(name = "创建人ID")
private String createBy; private String createBy;
/** /**
* 忽略提醒 0:忽略 1:不忽略 * 忽略提醒 0:忽略 1:不忽略
*/ */
......
...@@ -5,7 +5,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -5,7 +5,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
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.log.annotation.SysLog; import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceDetailService; import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceDetailService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceWarnService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceSearchVo; import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceSearchVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo; import com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
...@@ -34,6 +36,10 @@ import java.util.List; ...@@ -34,6 +36,10 @@ import java.util.List;
public class TInsurancesWarnController { public class TInsurancesWarnController {
@Resource @Resource
private TInsuranceDetailService insuranceDetailService; private TInsuranceDetailService insuranceDetailService;
@Resource
private TInsuranceWarnService insuranceWarnService;
/** /**
* @Author fxj * @Author fxj
* @Description 商险到期提醒分页查询 * @Description 商险到期提醒分页查询
...@@ -120,4 +126,17 @@ public class TInsurancesWarnController { ...@@ -120,4 +126,17 @@ public class TInsurancesWarnController {
public R<Integer> getExpireInsuranceWarn() { public R<Integer> getExpireInsuranceWarn() {
return insuranceDetailService.getExpireInsuranceWarn(); return insuranceDetailService.getExpireInsuranceWarn();
} }
@Operation(description = "商险到期个人总数提醒")
@PostMapping("/getUserInsuranceMessageWarnCount")
public R<Integer> getUserInsuranceMessageWarnCount(@RequestParam String userName) {
return insuranceDetailService.getUserInsuranceMessageWarnCount(userName);
}
@Operation(description = "每天刷新商险到期提醒信息")
@Inner
@PostMapping("/inner/createInsuranceAlert")
public void createInsuranceAlert() {
insuranceWarnService.createInsuranceAlert();
}
} }
...@@ -303,13 +303,15 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> { ...@@ -303,13 +303,15 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
IPage<TBusinessInsuranceVo> getInsuranceExpireWarnVoPage(Page<TBusinessInsuranceVo> page, IPage<TBusinessInsuranceVo> getInsuranceExpireWarnVoPage(Page<TBusinessInsuranceVo> page,
@Param("param")InsuranceSearchVo param, @Param("param")InsuranceSearchVo param,
@Param("domains")List<String> domains); @Param("domains")List<String> domains);
List<TBusinessInsuranceVo> pageDiy(@Param("param")InsuranceSearchVo searchVo, List<TBusinessInsuranceVo> pageDiy(@Param("param")InsuranceSearchVo searchVo);
@Param("domains")List<String> idList);
List<InsuranceWarnExportVo> noPageDiy(@Param("param")InsuranceSearchVo searchVo, List<InsuranceWarnExportVo> noPageDiy(@Param("param")InsuranceSearchVo searchVo);
@Param("domains")List<String> idList);
int noPageCountDiy(@Param("param")InsuranceSearchVo searchVo, @Param("domains")List<String> idList); int noPageCountDiy(@Param("param")InsuranceSearchVo searchVo);
void batchexpireIgnore(@Param("idList")List<String> idList); void batchexpireIgnore(@Param("idList")List<String> idList);
void batchexpireAlertIgnore(@Param("idList")List<String> idList);
void updateExpireAlert(@Param("id") String id,@Param("expireFlag") String expireFlag,@Param("remark") String remark);
} }
package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceAlert;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* @author huych
* @description 针对表【t_insurance_alert(商险到期提醒表)】的数据库操作Mapper
* @date 2024-08-26 14:20:16
*/
@Mapper
public interface TInsuranceWarnMapper extends BaseMapper<TInsuranceAlert> {
/**
* 查询商险到期提醒信息
*
* @author huych
* @return {@link List < TInsuranceAlert >}
*/
List<TInsuranceAlert> selectInsuranceAlert();
}
...@@ -525,6 +525,8 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -525,6 +525,8 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
R<Integer> getExpireInsuranceWarn(); R<Integer> getExpireInsuranceWarn();
R<Integer> getUserInsuranceMessageWarnCount(String userName);
R<Object> batchexpireIgnore(List<String> ids); R<Object> batchexpireIgnore(List<String> ids);
R<Object> expireIgnore(TBusinessInsuranceVo vo); R<Object> expireIgnore(TBusinessInsuranceVo vo);
......
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceAlert;
/**
* @author huych
* @description 针对表【t_insurance_alert(商险到期提醒表)】的数据库操作Service
* @date 2024-08-26 14:20:16
*/
public interface TInsuranceWarnService extends IService<TInsuranceAlert> {
void createInsuranceAlert();
}
...@@ -7684,23 +7684,27 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -7684,23 +7684,27 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override @Override
public IPage<TBusinessInsuranceVo> getInsuranceExpireWarnVoPage(Page<TBusinessInsuranceVo> page, InsuranceSearchVo condition) { public IPage<TBusinessInsuranceVo> getInsuranceExpireWarnVoPage(Page<TBusinessInsuranceVo> page, InsuranceSearchVo condition) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
condition.setCreateBy(SecurityUtils.getUser().getId()); if ("许瑞玲".equals(user.getNickname()) || "1".equals(user.getId())) {
R<TSettleDomainListVo> sdRes = archivesDaprUtil.getPermissionByUserId(user.getId()); condition.setCreateBy(null);
List<TInsuranceAreaRes> areaRes = insuranceAreaResMapper.selectList(Wrappers.<TInsuranceAreaRes>query().lambda() } else {
.eq(TInsuranceAreaRes::getUserId, user.getId()).eq(TInsuranceAreaRes::getStatus, CommonConstants.ZERO_STRING)); condition.setCreateBy(user.getId());
if (Common.isNotNull(areaRes)) { }
List<String> provinces = new ArrayList<>(); // R<TSettleDomainListVo> sdRes = archivesDaprUtil.getPermissionByUserId(user.getId());
List<String> citys = new ArrayList<>(); // List<TInsuranceAreaRes> areaRes = insuranceAreaResMapper.selectList(Wrappers.<TInsuranceAreaRes>query().lambda()
for (TInsuranceAreaRes res : areaRes) { // .eq(TInsuranceAreaRes::getUserId, user.getId()).eq(TInsuranceAreaRes::getStatus, CommonConstants.ZERO_STRING));
if (Common.isEmpty(res.getCity())) { // if (Common.isNotNull(areaRes)) {
provinces.add(res.getProvince()); // List<String> provinces = new ArrayList<>();
} else { // List<String> citys = new ArrayList<>();
citys.add(res.getCity()); // for (TInsuranceAreaRes res : areaRes) {
} // if (Common.isEmpty(res.getCity())) {
} // provinces.add(res.getProvince());
condition.setInsuranceProvinces(provinces); // } else {
condition.setInsuranceCitys(citys); // citys.add(res.getCity());
} // }
// }
// condition.setInsuranceProvinces(provinces);
// condition.setInsuranceCitys(citys);
// }
IPage<TBusinessInsuranceVo> recordsPage = new Page<>(); IPage<TBusinessInsuranceVo> recordsPage = new Page<>();
int limitStart = (int)(page.getCurrent()-1)*(int)page.getSize(); int limitStart = (int)(page.getCurrent()-1)*(int)page.getSize();
int limitEnd = (int)page.getSize(); int limitEnd = (int)page.getSize();
...@@ -7710,13 +7714,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -7710,13 +7714,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
recordsPage.setPages(page.getPages()); recordsPage.setPages(page.getPages());
recordsPage.setSize(page.getSize()); recordsPage.setSize(page.getSize());
recordsPage.setCurrent(page.getCurrent()); recordsPage.setCurrent(page.getCurrent());
if (Common.isNotNull(sdRes) && Common.isNotNull(sdRes.getData()) && Common.isNotNull(sdRes.getData().getDeptIds())) { recordsPage.setTotal(baseMapper.noPageCountDiy(condition));
recordsPage.setTotal(baseMapper.noPageCountDiy(condition,sdRes.getData().getDeptIds())); recordsPage.setRecords(baseMapper.pageDiy(condition));
recordsPage.setRecords(baseMapper.pageDiy(condition, sdRes.getData().getDeptIds()));
}else {
recordsPage.setTotal(baseMapper.noPageCountDiy(condition,null));
recordsPage.setRecords(baseMapper.pageDiy(condition, null));
}
return recordsPage; return recordsPage;
} }
...@@ -7726,6 +7725,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -7726,6 +7725,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR); return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
} }
baseMapper.batchexpireIgnore(ids); baseMapper.batchexpireIgnore(ids);
//更新商险到期提醒表
baseMapper.batchexpireAlertIgnore(ids);
return R.ok(); return R.ok();
} }
...@@ -7814,6 +7815,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -7814,6 +7815,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
entity.setExpireIgnoreFlag(CommonConstants.ZERO_STRING); entity.setExpireIgnoreFlag(CommonConstants.ZERO_STRING);
baseMapper.updateById(entity); baseMapper.updateById(entity);
baseMapper.updateExpireAlert(entity.getId(),CommonConstants.ZERO_STRING,null);
return R.ok(); return R.ok();
} }
private void remarkBatchAdd(List<InsurancesWarnUpdateVo> businessInsuranceVoList,List<ErrorMessage> errorMessages) { private void remarkBatchAdd(List<InsurancesWarnUpdateVo> businessInsuranceVoList,List<ErrorMessage> errorMessages) {
...@@ -7908,6 +7910,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -7908,6 +7910,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail.setExpireIgnoreFlag(expireIgnoreFlag); detail.setExpireIgnoreFlag(expireIgnoreFlag);
detail.setExpireRemark(vo.getExpireRemark()); detail.setExpireRemark(vo.getExpireRemark());
this.updateById(detail); this.updateById(detail);
baseMapper.updateExpireAlert(detail.getId(),expireIgnoreFlag,vo.getExpireRemark());
errorMessages.add(new ErrorMessage(line + 2, CommonConstants.UPDATE_SUCCESS)); errorMessages.add(new ErrorMessage(line + 2, CommonConstants.UPDATE_SUCCESS));
} catch (Exception e) { } catch (Exception e) {
log.error("商险批量备注执行异常", e); log.error("商险批量备注执行异常", e);
...@@ -7989,17 +7992,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -7989,17 +7992,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
entity.setExpireRemark(vo.getExpireRemark()); entity.setExpireRemark(vo.getExpireRemark());
baseMapper.updateById(entity); baseMapper.updateById(entity);
baseMapper.updateExpireAlert(vo.getId(),null,vo.getExpireRemark());
return R.ok(); return R.ok();
} }
private List<InsuranceWarnExportVo> noPageDiy(InsuranceSearchVo searchVo) { private List<InsuranceWarnExportVo> noPageDiy(InsuranceSearchVo searchVo) {
List<String> domainIds = getExportCondition(searchVo); // List<String> domainIds = getExportCondition(searchVo);
return baseMapper.noPageDiy(searchVo,domainIds); return baseMapper.noPageDiy(searchVo);
} }
private int noPageCountDiy(InsuranceSearchVo searchVo) { private int noPageCountDiy(InsuranceSearchVo searchVo) {
List<String> domainIds = getExportCondition(searchVo); // List<String> domainIds = getExportCondition(searchVo);
return baseMapper.noPageCountDiy(searchVo,domainIds); return baseMapper.noPageCountDiy(searchVo);
} }
private List<String> getExportCondition(InsuranceSearchVo searchVo) { private List<String> getExportCondition(InsuranceSearchVo searchVo) {
...@@ -8029,7 +8033,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -8029,7 +8033,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override @Override
public R<Integer> getExpireInsuranceWarn() { public R<Integer> getExpireInsuranceWarn() {
InsuranceSearchVo searchVo = new InsuranceSearchVo(); InsuranceSearchVo searchVo = new InsuranceSearchVo();
List<String> domainIds = getExportCondition(searchVo); // List<String> domainIds = getExportCondition(searchVo);
return R.ok(baseMapper.noPageCountDiy(searchVo,domainIds)); return R.ok(baseMapper.noPageCountDiy(searchVo));
}
@Override
public R<Integer> getUserInsuranceMessageWarnCount(String userName) {
InsuranceSearchVo searchVo = new InsuranceSearchVo();
searchVo.setCreateName(userName);
searchVo.setExpireIgnoreFlag(CommonConstants.ONE_STRING);
return R.ok(baseMapper.noPageCountDiy(searchVo));
} }
} }
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceAlert;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceWarnMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceWarnService;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author huych
* @description 针对表【t_insurance_alert(商险到期提醒表)】的数据库操作Service实现
* @date 2024-08-26 14:20:16
*/
@Service
public class TInsuranceWarnServiceImpl extends ServiceImpl<TInsuranceWarnMapper, TInsuranceAlert> implements TInsuranceWarnService {
@Override
public void createInsuranceAlert() {
//批量生成或者更新商险到期提醒数据
List<TInsuranceAlert> list = baseMapper.selectInsuranceAlert();
this.saveOrUpdateBatch(list);
}
}
...@@ -1695,7 +1695,8 @@ ...@@ -1695,7 +1695,8 @@
rf.CREATE_TIME as "refundCreateTime", rf.CREATE_TIME as "refundCreateTime",
rf.CREATE_NAME as "refundCreateUser", rf.CREATE_NAME as "refundCreateUser",
a.CREATE_USER_DEPT_NAME, a.CREATE_USER_DEPT_NAME,
a.EXPIRE_REMARK a.EXPIRE_REMARK,
a.EXPIRE_IGNORE_FLAG
</sql> </sql>
<sql id="expire_export_sql_param"> <sql id="expire_export_sql_param">
select select
...@@ -1734,19 +1735,21 @@ ...@@ -1734,19 +1735,21 @@
r.fromEmpName, r.fromEmpName,
r.toEmpName, r.toEmpName,
r.REPLACE_TIME as "toReplaceTime", r.REPLACE_TIME as "toReplaceTime",
case when a.IS_OVERDUE = 0 then "未过期" case when a.IS_OVERDUE = 0 then "期"
when a.IS_OVERDUE = 1 then "过期" when a.IS_OVERDUE = 1 then "过期"
else null end as "IS_OVERDUE" , else null end as "IS_OVERDUE" ,
a.ESTIMATE_PREMIUM, a.ESTIMATE_PREMIUM,
rf.REFUND_MONEY, rf.REFUND_MONEY,
rf.CREATE_TIME as "refundCreateTime", rf.CREATE_TIME as "refundCreateTime",
rf.CREATE_NAME as "refundCreateUser", rf.CREATE_NAME as "refundCreateUser",
a.CREATE_USER_DEPT_NAME, a.CREATE_USER_DEPT_NAME,
a.EXPIRE_REMARK a.EXPIRE_REMARK,
case when a.EXPIRE_IGNORE_FLAG = 0 then "是"
when a.EXPIRE_IGNORE_FLAG = 1 then "否"
else null end as "EXPIRE_IGNORE_FLAG"
</sql> </sql>
<sql id="expire_sql_where"> <sql id="expire_sql_where">
<where> <where>
<if test="param != null"> <if test="param != null">
<if test="param.empName != null and param.empName.trim() != ''"> <if test="param.empName != null and param.empName.trim() != ''">
AND a.EMP_NAME like CONCAT('%' , #{param.empName},'%') AND a.EMP_NAME like CONCAT('%' , #{param.empName},'%')
...@@ -1760,6 +1763,18 @@ ...@@ -1760,6 +1763,18 @@
<if test="param.insuranceHandleCityName != null and param.insuranceHandleCityName.trim() != ''"> <if test="param.insuranceHandleCityName != null and param.insuranceHandleCityName.trim() != ''">
AND a.INSURANCE_HANDLE_CITY_NAME like CONCAT(#{param.insuranceHandleCityName},'%') AND a.INSURANCE_HANDLE_CITY_NAME like CONCAT(#{param.insuranceHandleCityName},'%')
</if> </if>
<if test="param.createName != null and param.createName.trim() != ''">
AND a.CREATE_NAME = #{param.createName}
</if>
<if test="param.expireIgnoreFlag != null and param.expireIgnoreFlag.trim() != ''">
AND a.EXPIRE_IGNORE_FLAG = #{param.expireIgnoreFlag}
</if>
<if test="param.isOverdue != null and param.isOverdue.trim() != ''">
AND a.IS_OVERDUE = #{param.isOverdue}
</if>
<if test="param.createBy != null and param.createBy.trim() != ''">
and a.CREATE_BY = #{param.createBy}
</if>
<if test="param.idList != null and param.idList.size() > 0"> <if test="param.idList != null and param.idList.size() > 0">
and a.id in and a.id in
<foreach collection="param.idList" item="param" index="index" open="(" close=")" <foreach collection="param.idList" item="param" index="index" open="(" close=")"
...@@ -1771,7 +1786,7 @@ ...@@ -1771,7 +1786,7 @@
</where> </where>
</sql> </sql>
<select id="getInsuranceExpireWarnVoPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo"> <select id="getInsuranceExpireWarnVoPageHistory" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo">
<include refid="expire_sql_param"/>,a.INSURANCE_HANDLE_CITY_NAME <include refid="expire_sql_param"/>,a.INSURANCE_HANDLE_CITY_NAME
from from
(select * from (select * from
...@@ -1830,7 +1845,20 @@ ...@@ -1830,7 +1845,20 @@
<include refid="expire_sql_where"/> <include refid="expire_sql_where"/>
order by a.CREATE_TIME desc order by a.CREATE_TIME desc
</select> </select>
<select id="pageDiy" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo">
<select id="getInsuranceExpireWarnVoPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo">
<include refid="expire_sql_param"/>
,a.INSURANCE_HANDLE_CITY_NAME
from
t_insurance_alert a
LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID
LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID
LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id
<include refid="expire_sql_where"/>
order by a.CREATE_TIME desc
</select>
<select id="pageDiyHistory" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo">
<include refid="expire_sql_param"/>,a.INSURANCE_HANDLE_CITY_NAME <include refid="expire_sql_param"/>,a.INSURANCE_HANDLE_CITY_NAME
from from
(select * from (select * from t_insurance_detail a (select * from (select * from t_insurance_detail a
...@@ -1890,126 +1918,49 @@ ...@@ -1890,126 +1918,49 @@
LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID
LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id
</select> </select>
<select id="noPageDiy" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceWarnExportVo">
<include refid="expire_export_sql_param"/>,a.INSURANCE_HANDLE_CITY_NAME
from
(select * from (select * from t_insurance_detail a
where
<!-- info.AUDIT_STATUS='0' and t.STATUS = 5 状态 0.待提交 1.待办理 2.已提交保险公司 3.已办理 4.办理失败 5:待结算(已输入保单号)-->
<!--一个月内的,没有再续买商险的数据-->
a.BUY_HANDLE_STATUS ='3'
and a.EXPIRE_IGNORE_FLAG='1'
and (
date_add(curdate() - day(curdate()) + 1, interval 3 month) >
a.POLICY_END
)
<if test="param != null">
<if test="param.insuranceProvinces == null and param.insuranceCitys == null and domains == null">
and a.CREATE_BY = #{param.createBy}
</if>
and (1 = 2
<if test="param.insuranceProvinces != null">
<if test="param.insuranceProvinces.size() > 0">
or a.INSURANCE_HANDLE_PROVINCE in
<foreach collection="param.insuranceProvinces" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if> <select id="pageDiy" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo">
</if> <include refid="expire_sql_param"/>
<if test="param.insuranceCitys != null"> ,a.INSURANCE_HANDLE_CITY_NAME
<if test="param.insuranceCitys.size() > 0"> from
or a.INSURANCE_HANDLE_CITY in t_insurance_alert a
<foreach collection="param.insuranceCitys" item="param" index="index" open="(" close=")" LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID
separator=","> LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID
#{param} LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id
</foreach>
</if>
</if>
<!--数据权限判断-->
or a.CREATE_BY = #{param.createBy}
<if test="domains != null">
<if test="domains.size() > 0">
or a.DEPT_ID in
<foreach collection="domains" item="param" index="index" open="(" close=")" separator=",">
#{param}
</foreach>
</if>
</if>
)
</if>
) a
<include refid="expire_sql_where"/> <include refid="expire_sql_where"/>
order by a.CREATE_TIME desc order by a.CREATE_TIME desc
<if test="param != null and param.limitStart != null"> <if test="param != null and param.limitStart != null">
limit #{param.limitStart},#{param.limitEnd} limit #{param.limitStart},#{param.limitEnd}
</if> </if>
)a </select>
<select id="noPageDiy" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceWarnExportVo">
<include refid="expire_export_sql_param"/>
,a.INSURANCE_HANDLE_CITY_NAME
from
t_insurance_alert a
LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID
LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID
LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id
<include refid="expire_sql_where"/>
group by a.id group by a.id
order by a.CREATE_TIME desc
<if test="param != null and param.limitStart != null">
limit #{param.limitStart},#{param.limitEnd}
</if>
</select> </select>
<select id="noPageCountDiy" resultType="java.lang.Integer"> <select id="noPageCountDiy" resultType="java.lang.Integer">
select select
count(1) count(1)
from (select * from t_insurance_detail a from
where t_insurance_alert a
<!-- info.AUDIT_STATUS='0' and t.STATUS = 5 状态 0.待提交 1.待办理 2.已提交保险公司 3.已办理 4.办理失败 5:待结算(已输入保单号)-->
<!--一个月内的,没有再续买商险的数据-->
a.BUY_HANDLE_STATUS ='3'
and a.EXPIRE_IGNORE_FLAG='1'
and (
date_add(curdate() - day(curdate()) + 1, interval 3 month) >
a.POLICY_END
)
<if test="param != null">
<if test="param.insuranceProvinces == null and param.insuranceCitys == null and domains == null">
and a.CREATE_BY = #{param.createBy}
</if>
and (1 = 2
<if test="param.insuranceProvinces != null">
<if test="param.insuranceProvinces.size() > 0">
or a.INSURANCE_HANDLE_PROVINCE in
<foreach collection="param.insuranceProvinces" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
</if>
<if test="param.insuranceCitys != null">
<if test="param.insuranceCitys.size() > 0">
or a.INSURANCE_HANDLE_CITY in
<foreach collection="param.insuranceCitys" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
</if>
<!--数据权限判断-->
or a.CREATE_BY = #{param.createBy}
<if test="domains != null">
<if test="domains.size() > 0">
or a.DEPT_ID in
<foreach collection="domains" item="param" index="index" open="(" close=")" separator=",">
#{param}
</foreach>
</if>
</if>
)
</if>
) a
<!--LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID
LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID
LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id-->
<include refid="expire_sql_where"/> <include refid="expire_sql_where"/>
</select> </select>
<update id="batchexpireIgnore"> <update id="batchexpireIgnore">
<if test="idList != null and idList.size() > 0"> <if test="idList != null and idList.size() > 0">
update t_insurance_detail a update t_insurance_detail a
set a.EXPIRE_IGNORE_FLAG = '0' set a.EXPIRE_IGNORE_FLAG = '0'
where where
a.id in a.id in
...@@ -2019,6 +1970,27 @@ ...@@ -2019,6 +1970,27 @@
</if> </if>
</update> </update>
<update id="batchexpireAlertIgnore">
<if test="idList != null and idList.size() > 0">
update t_insurance_alert a
set a.EXPIRE_IGNORE_FLAG = '0'
where
a.id in
<foreach collection="idList" item="param" index="index" open="(" close=")" separator=",">
#{param}
</foreach>
</if>
</update>
<update id="updateExpireAlert">
update t_insurance_alert
<trim prefix="set" suffixOverrides=",">
<if test="expireFlag != null">EXPIRE_IGNORE_FLAG=#{expireFlag},</if>
<if test="remark != null">EXPIRE_REMARK=#{remark},</if>
</trim>
where id = #{id}
</update>
<select id="selectPushList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail"> <select id="selectPushList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail">
SELECT SELECT
* *
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceWarnMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceAlert">
<id property="id" column="ID" jdbcType="VARCHAR"/>
<result property="empName" column="EMP_NAME" jdbcType="VARCHAR"/>
<result property="empIdcardNo" column="EMP_IDCARD_NO" jdbcType="VARCHAR"/>
<result property="deptNo" column="DEPT_NO" jdbcType="VARCHAR"/>
<result property="post" column="POST" jdbcType="VARCHAR"/>
<result property="insuranceCompanyName" column="INSURANCE_COMPANY_NAME" jdbcType="VARCHAR"/>
<result property="insuranceTypeName" column="INSURANCE_TYPE_NAME" jdbcType="VARCHAR"/>
<result property="buyStandard" column="BUY_STANDARD" jdbcType="VARCHAR"/>
<result property="medicalQuota" column="MEDICAL_QUOTA" jdbcType="VARCHAR"/>
<result property="dieDisableQuota" column="DIE_DISABLE_QUOTA" jdbcType="VARCHAR"/>
<result property="policyNo" column="POLICY_NO" jdbcType="VARCHAR"/>
<result property="policyStart" column="POLICY_START" jdbcType="DATE"/>
<result property="policyEnd" column="POLICY_END" jdbcType="DATE"/>
<result property="policyEffect" column="POLICY_EFFECT" jdbcType="DATE"/>
<result property="settleMonth" column="SETTLE_MONTH" jdbcType="VARCHAR"/>
<result property="invoiceNo" column="INVOICE_NO" jdbcType="VARCHAR"/>
<result property="insuranceProvinceName" column="INSURANCE_PROVINCE_NAME" jdbcType="VARCHAR"/>
<result property="insuranceCityName" column="INSURANCE_CITY_NAME" jdbcType="VARCHAR"/>
<result property="insuranceHandleProvinceName" column="INSURANCE_HANDLE_PROVINCE_NAME" jdbcType="VARCHAR"/>
<result property="insuranceHandleCityName" column="INSURANCE_HANDLE_CITY_NAME" jdbcType="VARCHAR"/>
<result property="settleType" column="SETTLE_TYPE" jdbcType="TINYINT"/>
<result property="actualPremium" column="ACTUAL_PREMIUM" jdbcType="DECIMAL"/>
<result property="estimatePremium" column="ESTIMATE_PREMIUM" jdbcType="DECIMAL"/>
<result property="isEffect" column="IS_EFFECT" jdbcType="TINYINT"/>
<result property="isOverdue" column="IS_OVERDUE" jdbcType="TINYINT"/>
<result property="remark" column="REMARK" jdbcType="VARCHAR"/>
<result property="createBy" column="CREATE_BY" jdbcType="VARCHAR"/>
<result property="createName" column="CREATE_NAME" jdbcType="VARCHAR"/>
<result property="createTime" column="CREATE_TIME" jdbcType="TIMESTAMP"/>
<result property="updateBy" column="UPDATE_BY" jdbcType="VARCHAR"/>
<result property="updateTime" column="UPDATE_TIME" jdbcType="TIMESTAMP"/>
<result property="deleteFlag" column="DELETE_FLAG" jdbcType="TINYINT"/>
<result property="createUserDeptName" column="CREATE_USER_DEPT_NAME" jdbcType="VARCHAR"/>
<result property="deptName" column="DEPT_NAME" jdbcType="VARCHAR"/>
<result property="unitName" column="UNIT_NAME" jdbcType="VARCHAR"/>
<result property="unitNo" column="UNIT_NO" jdbcType="VARCHAR"/>
<result property="expireIgnoreFlag" column="EXPIRE_IGNORE_FLAG" jdbcType="VARCHAR"/>
<result property="expireRemark" column="EXPIRE_REMARK" jdbcType="VARCHAR"/>
</resultMap>
<select id="selectInsuranceAlert" resultMap="BaseResultMap">
SELECT
a.ID,
a.EMP_NAME,
a.EMP_IDCARD_NO,
a.DEPT_NO,
a.DEPT_NAME,
a.POST,
a.INSURANCE_COMPANY_NAME,
a.INSURANCE_TYPE_NAME,
a.INSURANCE_CITY_NAME,
a.INSURANCE_HANDLE_CITY_NAME,
a.INSURANCE_HANDLE_PROVINCE_NAME,
a.INSURANCE_PROVINCE_NAME,
a.BUY_STANDARD,
a.UNIT_NAME,
a.UNIT_NO,
a.SETTLE_TYPE,
a.POLICY_EFFECT,
a.EXPIRE_REMARK,
a.EXPIRE_IGNORE_FLAG,
a.SETTLE_MONTH,
a.POLICY_START,
a.POLICY_END,
a.ACTUAL_PREMIUM,
a.ESTIMATE_PREMIUM,
a.INVOICE_NO,
a.MEDICAL_QUOTA,
a.DIE_DISABLE_QUOTA,
a.DEPT_ID,
a.POLICY_NO,
if(a.POLICY_END >= curdate(),0,1) IS_OVERDUE,
a.REMARK,
a.CREATE_BY,
a.DELETE_FLAG,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_TIME,
a.IS_EFFECT,
a.CREATE_USER_DEPT_NAME
FROM
t_insurance_detail a
WHERE
a.id IN (
SELECT
h.id
FROM
(
SELECT
b.ID,
max( b.POLICY_END ) endTime
FROM
t_insurance_detail b
WHERE
b.POLICY_START >= date_sub( date_add( curdate(), INTERVAL 1 DAY ), INTERVAL 1 YEAR )
AND b.IS_EFFECT = 0
AND NOT EXISTS (
SELECT
1
FROM
t_insurance_detail ea
WHERE
ea.POLICY_START >= date_sub( date_add( curdate(), INTERVAL 1 DAY ), INTERVAL 1 YEAR )
AND ea.IS_EFFECT = 0
AND ea.POLICY_END >= date_add( curdate(), INTERVAL 1 MONTH )
AND ea.EMP_IDCARD_NO = b.EMP_IDCARD_NO
)
GROUP BY
b.EMP_IDCARD_NO,
b.INSURANCE_COMPANY_NAME,
b.INSURANCE_TYPE_NAME
) h
INNER JOIN t_insurance_detail l ON h.id = l.id
AND h.endTime = l.POLICY_END
WHERE
l.EXPIRE_IGNORE_FLAG = '1'
)
</select>
</mapper>
...@@ -24,6 +24,14 @@ public class ArchiveTask { ...@@ -24,6 +24,14 @@ public class ArchiveTask {
@Autowired @Autowired
private DaprArchivesProperties daprArchivesProperties; private DaprArchivesProperties daprArchivesProperties;
public void updateEmployeeAgeTask() {
log.info("-------------每年1月1号刷新在职和离职人员的年龄信息-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(), daprArchivesProperties.getAppId(),
"/temployeeinfo/inner/updateEmployeeAgeTask", "", Object.class,
SecurityConstants.FROM_IN);
log.info("-------------每年1月1号刷新在职和离职人员的年龄信息-定时任务结束------------");
}
/** /**
* @Author hgw * @Author hgw
* @Description 每月1号清理人员档案、项目档案的薪资状态 * @Description 每月1号清理人员档案、项目档案的薪资状态
......
...@@ -59,4 +59,17 @@ public class UpdateOverdueTask { ...@@ -59,4 +59,17 @@ public class UpdateOverdueTask {
HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl(),daprInsurancesProperties.getAppId(),"/insuranceDetail/inner/pushActualPremium","", Void.class, SecurityConstants.FROM_IN); HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl(),daprInsurancesProperties.getAppId(),"/insuranceDetail/inner/pushActualPremium","", Void.class, SecurityConstants.FROM_IN);
log.info("------------推送商险待结算数据-定时任务结束------------"); log.info("------------推送商险待结算数据-定时任务结束------------");
} }
/**
* 每天刷新商险到期提醒信息
* @author huych
* @param
* @return void
*/
public void everyDayCreateInsuranceAlert() {
log.info("-------------每天刷新商险到期提醒信息------------");
HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl(), daprInsurancesProperties.getAppId(),
"/insuranceWarn/inner/createInsuranceAlert","", Void.class, SecurityConstants.FROM_IN);
log.info("-------------每天刷新商险到期提醒信息-定时任务开始------------");
}
} }
...@@ -2582,7 +2582,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2582,7 +2582,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (empVo.getHignEducation().equals("7")) { if (empVo.getHignEducation().equals("7")) {
excel.setEducationName("硕士"); excel.setEducationName("硕士");
} }
if (excel.getEducationName().equals("8")) { if (empVo.getHignEducation().equals("8")) {
excel.setEducationName("博士"); excel.setEducationName("博士");
} }
if (empVo.getHignEducation().equals("9")) { if (empVo.getHignEducation().equals("9")) {
......
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