Commit 7d4448dc authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP-1.7.3-shuiyou' into MVP-1.7.3-shuiyou

parents 7e41dabd 785dadc6
...@@ -1619,6 +1619,15 @@ public class DateUtil { ...@@ -1619,6 +1619,15 @@ public class DateUtil {
return sf.format(new Date()); return sf.format(new Date());
} }
public static String getLastDay(){
SimpleDateFormat sf = new SimpleDateFormat(DateUtil.ISO_EXPANDED_DATE_FORMAT);
Calendar instance = Calendar.getInstance();
instance.setTime(new Date());
int lastDay = instance.getActualMaximum(Calendar.DAY_OF_MONTH);
instance.set(Calendar.DAY_OF_MONTH, lastDay);
return sf.format(instance.getTime());
}
/** /**
* @Description: 返回当前年月日字符串 * @Description: 返回当前年月日字符串
* @Author: hgw * @Author: hgw
......
...@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.social.config; ...@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.social.config;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.CheckedException; import com.yifu.cloud.plus.v1.yifu.common.core.exception.CheckedException;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil; import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
...@@ -43,12 +44,18 @@ public class SocialFriendConfig { ...@@ -43,12 +44,18 @@ public class SocialFriendConfig {
// url前缀 // url前缀
@Value("${socialFriend.urlPre}") @Value("${socialFriend.urlPre}")
private String urlPre; private String urlPre;
// url推 // url推 增加
@Value("${socialFriend.urlPush}") @Value("${socialFriend.urlPushAdd}")
private String urlPush; private String urlPushAdd;
// url拉结果数据 // url拉结果数据 增加
@Value("${socialFriend.urlGetInfo}") @Value("${socialFriend.urlGetInfoAdd}")
private String urlGetInfo; private String urlGetInfoAdd;
// url推 增加
@Value("${socialFriend.urlPushReduce}")
private String urlPushReduce;
// url拉结果数据 增加
@Value("${socialFriend.urlGetInfoReduce}")
private String urlGetInfoReduce;
// url拉结果数据 // url拉结果数据
@Value("${socialFriend.urlUpload}") @Value("${socialFriend.urlUpload}")
private String urlUpload; private String urlUpload;
...@@ -69,7 +76,12 @@ public class SocialFriendConfig { ...@@ -69,7 +76,12 @@ public class SocialFriendConfig {
public String pushFriendByInfo(RestTemplate restTemplate, SociaFriendYgsAddVo vo, int type, String thisTime public String pushFriendByInfo(RestTemplate restTemplate, SociaFriendYgsAddVo vo, int type, String thisTime
, TSocialFriendBackLog backLog) { , TSocialFriendBackLog backLog) {
String addId = ""; String addId = "";
String appAddUrl = urlPre + urlPush; String appAddUrl = urlPre;
if (type == 1 || type == 3) {
appAddUrl += urlPushAdd;
} else {
appAddUrl += urlPushReduce;
}
String version = "1.0.0"; String version = "1.0.0";
String timestamp = String.valueOf(new Date().getTime()); String timestamp = String.valueOf(new Date().getTime());
String xReqNonce = "1"; String xReqNonce = "1";
...@@ -127,6 +139,7 @@ public class SocialFriendConfig { ...@@ -127,6 +139,7 @@ public class SocialFriendConfig {
setEmpInfo(json, vo, type); setEmpInfo(json, vo, type);
HttpEntity<String> formEntity = new HttpEntity<>(json.toString(), headers); HttpEntity<String> formEntity = new HttpEntity<>(json.toString(), headers);
System.out.println("推的接送=" + json);
String dataResultList = restTemplate.postForObject(appAddUrl, formEntity, String.class); String dataResultList = restTemplate.postForObject(appAddUrl, formEntity, String.class);
// {"head":{"code":"00000000","description":"成功","msg":"成功","time":"2024-12-06 17:10:26","status":"Y" // {"head":{"code":"00000000","description":"成功","msg":"成功","time":"2024-12-06 17:10:26","status":"Y"
// ,"body":{"requestId":"85440b327d71466abcd9c5c81d5bb172" // ,"body":{"requestId":"85440b327d71466abcd9c5c81d5bb172"
...@@ -384,7 +397,7 @@ public class SocialFriendConfig { ...@@ -384,7 +397,7 @@ public class SocialFriendConfig {
// 中断原因 除死亡以外,其他停保原因默认:“在职人员解除/终止劳动合同” 死亡对应“死亡或失踪” // 中断原因 除死亡以外,其他停保原因默认:“在职人员解除/终止劳动合同” 死亡对应“死亡或失踪”
blxmlbOne.put("tbyy", vo.getTbyy()); blxmlbOne.put("tbyy", vo.getTbyy());
// 中断时间 yyyy-MM-dd 默认当前时间 // 中断时间 yyyy-MM-dd 默认当前时间
blxmlbOne.put("tbsj", DateUtil.getThisDayByPatten("yyyy-MM-dd")); blxmlbOne.put("tbsj", DateUtil.getLastDay());
blxmlbArr.add(blxmlbOne); blxmlbArr.add(blxmlbOne);
cbrymdOne.put("blxmlb", blxmlbArr); cbrymdOne.put("blxmlb", blxmlbArr);
...@@ -411,17 +424,24 @@ public class SocialFriendConfig { ...@@ -411,17 +424,24 @@ public class SocialFriendConfig {
} }
/** /**
* @param: type 0增加1减少
* @param: requestId : 请求ID * @param: requestId : 请求ID
* @Description: 任务查询接口 * @Description: 任务查询接口
* @Author: hgw * @Author: hgw
* @Date: 2024-12-9 16:54:22 * @Date: 2024-12-9 16:54:22
* @return: java.lang.String * @return: java.lang.String
**/ **/
public FriendResult getFriendByRequestId(RestTemplate restTemplate, String requestId, TSocialFriendBackLog backLog) { public FriendResult getFriendByRequestId(RestTemplate restTemplate, String requestId, TSocialFriendBackLog backLog, String type) {
if (Common.isEmpty(requestId)) { if (Common.isEmpty(requestId)) {
return null; return null;
} }
String appAddUrl = urlPre + urlGetInfo + "?requestId=" + requestId; String appAddUrl = urlPre;
if (CommonConstants.ZERO_STRING.equals(type)) {
appAddUrl += urlGetInfoAdd;
} else {
appAddUrl += urlGetInfoReduce;
}
appAddUrl += "?requestId=" + requestId;
String version = "1.0.0"; String version = "1.0.0";
String timestamp = String.valueOf(new Date().getTime()); String timestamp = String.valueOf(new Date().getTime());
String xReqNonce = "1"; String xReqNonce = "1";
......
...@@ -94,7 +94,7 @@ public class TSocialFriendServiceImpl extends ServiceImpl<TSocialFriendMapper, T ...@@ -94,7 +94,7 @@ public class TSocialFriendServiceImpl extends ServiceImpl<TSocialFriendMapper, T
backLog = new TSocialFriendBackLog(); backLog = new TSocialFriendBackLog();
backLog.setSocialId(socialInfo.getId()); backLog.setSocialId(socialInfo.getId());
backLog.setRequestId(socialInfo.getYgsRequestId()); backLog.setRequestId(socialInfo.getYgsRequestId());
info = socialFriendConfig.getFriendByRequestId(restTemplate, socialInfo.getYgsRequestId(), backLog); info = socialFriendConfig.getFriendByRequestId(restTemplate, socialInfo.getYgsRequestId(), backLog, socialInfo.getDispatchType());
logList.add(backLog); logList.add(backLog);
if (info != null && Common.isNotNull(info.getZt())) { if (info != null && Common.isNotNull(info.getZt())) {
doCore(info, socialInfo, typeFlag, user, errorMap); doCore(info, socialInfo, typeFlag, user, errorMap);
...@@ -114,7 +114,7 @@ public class TSocialFriendServiceImpl extends ServiceImpl<TSocialFriendMapper, T ...@@ -114,7 +114,7 @@ public class TSocialFriendServiceImpl extends ServiceImpl<TSocialFriendMapper, T
backLog = new TSocialFriendBackLog(); backLog = new TSocialFriendBackLog();
backLog.setSocialId(socialInfo.getId()); backLog.setSocialId(socialInfo.getId());
backLog.setRequestId(socialInfo.getYsdRequestId()); backLog.setRequestId(socialInfo.getYsdRequestId());
info = socialFriendConfig.getFriendByRequestId(restTemplate, socialInfo.getYsdRequestId(), backLog); info = socialFriendConfig.getFriendByRequestId(restTemplate, socialInfo.getYsdRequestId(), backLog, socialInfo.getDispatchType());
logList.add(backLog); logList.add(backLog);
if (info != null && Common.isNotNull(info.getZt())) { if (info != null && Common.isNotNull(info.getZt())) {
doCore(info, socialInfo, typeFlag, user, errorMap); doCore(info, socialInfo, typeFlag, user, errorMap);
......
...@@ -63,8 +63,10 @@ soldier: ...@@ -63,8 +63,10 @@ soldier:
#税友相关属性配置 #税友相关属性配置
socialFriend: socialFriend:
urlPre : https://test-openapi.17win.com urlPre : https://test-openapi.17win.com
urlPush : /gateway/socins/hrss/employee/v2/register urlPushAdd : /gateway/socins/hrss/employee/v2/register
urlGetInfo : /gateway/socins/hrss/employee/v2/getRegisterFeedback urlGetInfoAdd : /gateway/socins/hrss/employee/v2/getRegisterFeedback
urlPushReduce : /gateway/socins/hrss/employee/v2/stop
urlGetInfoReduce : /gateway/socins/hrss/employee/v2/getStopFeedback
urlUpload : /gateway/file/upload urlUpload : /gateway/file/upload
appKey : 89357285571962202409230949030 appKey : 89357285571962202409230949030
appSecret : V52dkvxtFUgIvzlfNE9G8g== appSecret : V52dkvxtFUgIvzlfNE9G8g==
\ No newline at end of file
...@@ -59,8 +59,10 @@ soldier: ...@@ -59,8 +59,10 @@ soldier:
#税友相关属性配置 #税友相关属性配置
socialFriend: socialFriend:
urlPre : https://test-openapi.17win.com urlPre : https://test-openapi.17win.com
urlPush : /gateway/socins/hrss/employee/v2/register urlPushAdd: /gateway/socins/hrss/employee/v2/register
urlGetInfo : /gateway/socins/hrss/employee/v2/getRegisterFeedback urlGetInfoAdd: /gateway/socins/hrss/employee/v2/getRegisterFeedback
urlPushReduce: /gateway/socins/hrss/employee/v2/stop
urlGetInfoReduce: /gateway/socins/hrss/employee/v2/getStopFeedback
urlUpload : /gateway/file/upload urlUpload : /gateway/file/upload
appKey : 89357285571962202409230949030 appKey : 89357285571962202409230949030
appSecret : V52dkvxtFUgIvzlfNE9G8g== appSecret : V52dkvxtFUgIvzlfNE9G8g==
\ No newline at end of file
...@@ -58,8 +58,10 @@ soldier: ...@@ -58,8 +58,10 @@ soldier:
#税友相关属性配置 #税友相关属性配置
socialFriend: socialFriend:
urlPre : https://test-openapi.17win.com urlPre : https://test-openapi.17win.com
urlPush : /gateway/socins/hrss/employee/v2/register urlPushAdd: /gateway/socins/hrss/employee/v2/register
urlGetInfo : /gateway/socins/hrss/employee/v2/getRegisterFeedback urlGetInfoAdd: /gateway/socins/hrss/employee/v2/getRegisterFeedback
urlPushReduce: /gateway/socins/hrss/employee/v2/stop
urlGetInfoReduce: /gateway/socins/hrss/employee/v2/getStopFeedback
urlUpload : /gateway/file/upload urlUpload : /gateway/file/upload
appKey : 89357285571962202409230949030 appKey : 89357285571962202409230949030
appSecret : V52dkvxtFUgIvzlfNE9G8g== appSecret : V52dkvxtFUgIvzlfNE9G8g==
\ No newline at end of file
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
when '2' then '无固定期限劳动合同' when '2' then '无固定期限劳动合同'
else '固定期限劳动合同' end contractTypeTwo, else '固定期限劳动合同' end contractTypeTwo,
a.CONTRACT_END contractEnd, a.CONTRACT_END contractEnd,
if(a.REDUCE_REASON = '16','死亡或失踪','在职人员解除/终止劳动合同') tbyy, if(a.REDUCE_REASON = '16','死亡或失踪','在职人员主动解除劳动合同') tbyy,
case a.REDUCE_REASON case a.REDUCE_REASON
when '21' then '职工与用人单位协商一致解除劳动合同(18条1款)' when '21' then '职工与用人单位协商一致解除劳动合同(18条1款)'
when '5' then '第四十四条第二项,劳动者开始依法享受基本养老保险待遇' when '5' then '第四十四条第二项,劳动者开始依法享受基本养老保险待遇'
...@@ -161,7 +161,66 @@ ...@@ -161,7 +161,66 @@
<!-- 税友医生大减少模板--> <!-- 税友医生大减少模板-->
<select id="getSocialSoldierYsdReduceVoList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.SociaFriendYgsAddVo"> <select id="getSocialSoldierYsdReduceVoList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.SociaFriendYgsAddVo">
<include refid="getSocialSoldierBaseOne"/> SELECT
s.id as socialId,
if(a.TYPE='0','派增','派减') type,
a.SOCIAL_HOUSEHOLD_NAME socialHouseholdName,
shh.UNIT_CREDIT_CODE unitCreditCode,
shh.AREA_CODE areaCode,
shh.SOCIAL_ACCOUNT socialAccount,
shh.SOCIAL_PASSWORD socialPassword,
shh.MEDICL_ACCOUNT mediclAccount,
shh.MEDICL_PASSWORD mediclPassword,
shh.CUSTOMER_NO customerNo,
a.EMP_NAME empName,
a.EMP_IDCARD empIdcard,
if (a.EMP_NATIONAL in ('2','3','5','6','7','8','9','11') and nation.label is not null, nation.label,'汉族') empNational,
a.EMP_MOBILE empMobile,
DATE_FORMAT(s.SOCIAL_START_DATE,"%Y-%m-%d") socialStartDate,
if(a.EDUCATION_NAME is null, '大学专科',
case a.EDUCATION_NAME
when '博士' then '博士研究生'
when '技工' then '技工学校'
when '高中' then '普通中学(高中)'
when '小学' then '小学'
when '文盲' then '其他'
when '中专' then '中等专科'
when '初中' then '初级中学'
when '本科' then '大学本科'
when '大专' then '大学专科'
when '硕士' then '研究生'
when '职高' then '职业高中'
else '其他'
end) educationName,
s.RECORD_BASE recordBase,
DATE_FORMAT(s.SOCIAL_START_DATE,"%Y%m") socialStartMonth,
case a.CONTRACT_TYPE
when '0' then '订立以完成一定工作任务为期限的劳动合同'
when '1' then '订立固定期限劳动合同'
when '2' then '订立无固定期限劳动合同'
else '其他' end contractType,
case a.WORKING_HOURS
when '1' then '标准工作时间制度'
when '2' then '综合计算工时制度'
when '3' then '不定时工作时间制度'
else '标准工作时间制度' end workingHours,
case a.CONTRACT_TYPE
when '0' then '以完成一定工作为期限的劳动合同'
when '1' then '固定期限劳动合同'
when '2' then '无固定期限劳动合同'
else '固定期限劳动合同' end contractTypeTwo,
a.CONTRACT_END contractEnd,
if(a.REDUCE_REASON = '16','人员失踪','在职人员解除/终止劳动合同') tbyy,
case a.REDUCE_REASON
when '21' then '职工与用人单位协商一致解除劳动合同(18条1款)'
when '5' then '第四十四条第二项,劳动者开始依法享受基本养老保险待遇'
when '16' then '劳动者死亡,或者被人民法院宣告死亡或者宣告失踪'
when '1' then '劳动者提前30天书面通知解除或试用期提前3天通知解除合同'
when '2' then '劳动者严重违反用人单位的规章制度'
else '法律、行政法规规定的其他情形' end zzyy,
s.SOCIAL_PROVINCE socialProvince,
s.SOCIAL_CITY socialCity,
s.SOCIAL_TOWN socialTown
<include refid="getSocialSoldierBaseTwo"/> <include refid="getSocialSoldierBaseTwo"/>
and a.type = '1' and s.YSD_HANDLE_STATUS in ('0','1','2','3') and a.type = '1' and s.YSD_HANDLE_STATUS in ('0','1','2','3')
and ( and (
......
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