Commit ec323865 authored by hongguangwu's avatar hongguangwu

MVP1.7.3-shuiyou 增减接口

parent dea4ef0d
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* 社保士兵与税友切换表
*
* @author hgw
* @date 2024-12-12 09:40:56
*/
@Data
@TableName("t_social_freind_set")
@Schema(description = "社保士兵与税友切换表")
public class TSocialFreindSet {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("id")
@Schema(description = "id")
private String id;
/**
* 类型:0社保士兵 1税友
*/
@ExcelAttribute(name = "类型:0社保士兵 1税友", isNotEmpty = true, errorInfo = "类型:0社保士兵 1税友不能为空")
@NotBlank(message = "类型:0社保士兵 1税友不能为空")
@ExcelProperty("类型:0社保士兵 1税友")
@Schema(description = "类型:0社保士兵 1税友")
private Integer type;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import java.time.LocalDateTime;
/**
* 社保士兵返回的数据记录表
*
* @author hgw
* @date 2024-12-12 09:40:55
*/
@Data
@TableName("t_social_friend_back_log")
@Schema(description = "社保士兵返回的数据记录表")
public class TSocialFriendBackLog {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("主键")
@Schema(description = "主键")
private String id;
/**
* 社保ID
*/
@ExcelAttribute(name = "社保ID", maxLength = 32)
@Length(max = 32, message = "社保ID不能超过32个字符")
@ExcelProperty("社保ID")
@Schema(description = "社保ID")
private String socialId;
/**
* 请求ID
*/
@ExcelAttribute(name = "请求ID", maxLength = 50)
@Length(max = 50, message = "请求ID不能超过50个字符")
@ExcelProperty("请求ID")
@Schema(description = "请求ID")
private String requestId;
/**
* 日志
*/
@ExcelAttribute(name = "日志")
@ExcelProperty("日志")
@Schema(description = "日志")
private String logInfo;
/**
* 创建时间
*/
@ExcelAttribute(name = "创建时间", isDate = true)
@ExcelProperty("创建时间")
@Schema(description = "创建时间")
private LocalDateTime createTime;
}
......@@ -1045,6 +1045,25 @@ public class TSocialInfo extends BaseEntity {
@ExcelProperty("医生大社保士兵的任务ID" )
private String ysdAddId;
/**
* 养工失税友的任务ID
*/
@Length(max = 50, message = "养工失税友的任务ID 不能超过50个字符" )
@ExcelAttribute(name = "养工失税友的任务ID", maxLength = 50)
@Schema(description = "养工失税友的任务ID" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("养工失税友的任务ID" )
private String ygsRequestId;
/**
* 医生大税友的任务ID
*/
@Length(max = 50, message = "医生大税友的任务ID 不能超过50个字符" )
@ExcelAttribute(name = "医生大税友的任务ID", maxLength = 50)
@Schema(description = "医生大税友的任务ID" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医生大税友的任务ID" )
private String ysdRequestId;
// 派单id,社保士兵使用
@TableField(exist = false)
private String dispatchId;
......
......@@ -65,6 +65,8 @@ public class SociaFriendYgsAddVo implements Serializable {
@ExcelProperty("合同到期时间")
private String contractEnd;
// 中断原因 除死亡以外,其他停保原因默认:“在职人员解除/终止劳动合同” 死亡对应“死亡或失踪”
@ExcelProperty("中断原因")
private String tbyy;
// 单位提出协商一致21 职工与用人单位协商一致解除劳动合同(18条1款)
// 退休5 第四十四条第二项,劳动者开始依法享受基本养老保险待遇
//死亡16 劳动者死亡,或者被人民法院宣告死亡或者宣告失踪
......@@ -73,14 +75,18 @@ public class SociaFriendYgsAddVo implements Serializable {
//合同期满12 劳动合同期满
//单位辞退2 劳动者严重违反用人单位的规章制度
// 其他的默认 个人辞职1 劳动者提前30天书面通知解除或试用期提前3天通知解除合同 2024-12-12 09:19:59 昨晚盛宇沟通的结果
@ExcelProperty("减少原因")
private String reduceReason;
@ExcelProperty("劳动用工备案解除/终止原因")
private String zzyy;
// 企业职工社会保险增员花名册 qyzgshbxzyhmc
private String qyzgshbxzyhmc;
// 企业职工基本医疗保险参保登记表 qyzgshbxzyhmc
private String qyzgjbylbxcbdjb;
private String socialProvince;
private String socialCity;
private String socialTown;
@ExcelProperty("派单类型")
private String type;
......
......@@ -7,6 +7,7 @@ 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.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFriendBackLog;
import com.yifu.cloud.plus.v1.yifu.social.vo.FriendResult;
import com.yifu.cloud.plus.v1.yifu.social.vo.SociaFriendYgsAddVo;
import lombok.Data;
......@@ -17,7 +18,9 @@ import org.springframework.http.*;
import org.springframework.web.client.RestTemplate;
import java.security.SignatureException;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import java.util.TreeMap;
/**
......@@ -59,7 +62,8 @@ public class SocialFriendConfig {
* @Date: 2024-12-9 16:54:31
* @return: java.lang.String
**/
public String pushFriendByInfo(RestTemplate restTemplate, SociaFriendYgsAddVo vo, int type, String thisTime) {
public String pushFriendByInfo(RestTemplate restTemplate, SociaFriendYgsAddVo vo, int type, String thisTime
, TSocialFriendBackLog backLog) {
String addId = "";
String appAddUrl = urlPre + urlPush;
String version = "1.0.0";
......@@ -123,6 +127,8 @@ public class SocialFriendConfig {
// {"head":{"code":"00000000","description":"成功","msg":"成功","time":"2024-12-06 17:10:26","status":"Y"
// ,"body":{"requestId":"85440b327d71466abcd9c5c81d5bb172"
if (Common.isNotNull(dataResultList)) {
backLog.setLogInfo(dataResultList);
backLog.setCreateTime(LocalDateTime.now());
JSONObject dataObject = JSON.parseObject(dataResultList);
String head = dataObject.getString("head");
if (Common.isNotNull(head)) {
......@@ -206,17 +212,20 @@ public class SocialFriendConfig {
JSONArray blxmlbArr = new JSONArray();
JSONObject blxmlbOne = new JSONObject();
String blxm = "社保";
// 险种类型 例如养老、工伤、医疗等
String xzlb = "企业职工养老, 工伤保险, 失业保险";
if (type > 2) {
blxm = "医保";
xzlb = "职工基本医疗保险, 生育保险, 大额医疗";
}
String[] strArr = xzlb.split(",");
// 办理项目
blxmlbOne.put("blxm", blxm);
// 本次参保日期 格式:yyyy-MM-dd
blxmlbOne.put("bccbrq", startDate);
// 申报工资 社保派单里的“备案基数”
blxmlbOne.put("sbgz", vo.getRecordBase());
// 险种类型 例如养老、工伤、医疗等
String[] strArr = {"企业职工养老", "工伤保险", "失业保险"};
// 险种类型 例如养老、工伤、医疗等
blxmlbOne.put("xzlb", strArr);
blxmlbArr.add(blxmlbOne);
......@@ -310,7 +319,7 @@ public class SocialFriendConfig {
// 办理项目
blxmlbOne.put("blxm", blxm);
// 中断原因 除死亡以外,其他停保原因默认:“在职人员解除/终止劳动合同” 死亡对应“死亡或失踪”
blxmlbOne.put("tbyy", vo.getReduceReason());
blxmlbOne.put("tbyy", vo.getTbyy());
// 中断时间 yyyy-MM-dd 默认当前时间
blxmlbOne.put("tbsj", DateUtil.getThisDayByPatten("yyyy-MM-dd"));
blxmlbArr.add(blxmlbOne);
......@@ -319,7 +328,7 @@ public class SocialFriendConfig {
// 特色字段信息
JSONObject tszdxx = new JSONObject();
// 劳动用工备案解除/终止原因 数据字典文档 法律依据 [社保]必填;
tszdxx.put("zzyy", vo.getReduceReason());
tszdxx.put("zzyy", vo.getZzyy());
// 社保个人身份材料 无
// tszdxx.put("shjycl", )
// 医保个人身份材料 无
......@@ -344,7 +353,7 @@ public class SocialFriendConfig {
* @Date: 2024-12-9 16:54:22
* @return: java.lang.String
**/
public FriendResult getFriendByRequestId(RestTemplate restTemplate, String requestId) {
public FriendResult getFriendByRequestId(RestTemplate restTemplate, String requestId, TSocialFriendBackLog backLog) {
if (Common.isEmpty(requestId)) {
return null;
}
......@@ -374,8 +383,13 @@ public class SocialFriendConfig {
if (statusCode != 200) {
throw new CheckedException("获取税友结果失败,statusCode=" + statusCode);
}
String dataResultList = response.getBody();
FriendResult result = new FriendResult();
String dataResultList = response.getBody();
backLog.setCreateTime(LocalDateTime.now());
backLog.setLogInfo(dataResultList);
// 组装返回结果
getResultToVo(dataResultList, result);
return result;
......
......@@ -47,108 +47,20 @@ public class TSocialFriendController {
private final TSocialFriendService tSocialFriendService;
private final TSocialFriendPushService tSocialFriendPushService;
@Operation(description = "推送税友Test")
@PostMapping("/pushFriendTest")
public R<String> pushFriendTest(@RequestBody(required = false) List<String> dispatchIdList) {
return tSocialFriendPushService.pushFriendTest(dispatchIdList);
}
@Operation(description = "1定时任务推送税友")
@PostMapping("/inner/doPushFriend")
@SysLog("1定时任务推送税友")
@Inner
public R<String> doPushFriendTest() {
return tSocialFriendPushService.pushFriendTest(null);
return tSocialFriendPushService.pushFriend(null);
}
@Operation(description = "2定时任务获取税友")
@PostMapping("/inner/doGetFriendByRequestId")
@SysLog("2定时任务获取税友")
@Inner
public R<FriendResult> doGetFriendByRequestId() {
return tSocialFriendPushService.getFriendByRequestIdTest(null);
}
/**
* @param addId 任务id,可为空
* @Description: 1获取税友状态
* @Author: hgw
* @Date: 2024/5/11 19:25
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Operation(description = "获取税友状态")
@GetMapping("/getFiveJob")
public R<String> getFiveJob(@RequestParam(required = false) String addId) {
return tSocialFriendService.getFiveJob(addId);
}
/**
* @param dispatchIdList 派单id
* @Description: 推送税友
* @Author: hgw
* @Date: 2024/5/11 19:25
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Operation(description = "推送税友")
@PostMapping("/pushSoldier")
public R<String> pushSoldier(@RequestBody(required = false) List<String> dispatchIdList) {
return tSocialFriendPushService.pushSoldier(dispatchIdList);
}
/**
* @Description: 1定时任务获取税友状态
* @Author: hgw
* @Date: 2024/5/11 19:26
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Operation(description = "1定时任务获取税友状态")
@PostMapping("/inner/doInnerGetFiveJob")
@SysLog("1每日定时任务获取税友状态")
@Inner
public R<String> doInnerGetFiveJob() {
return tSocialFriendService.getFiveJob(null);
}
/**
* @Description: 2定时任务推送税友
* @Author: hgw
* @Date: 2024/5/11 19:26
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Operation(description = "2定时任务推送税友")
@PostMapping("/inner/doInnerPushSoldier")
@SysLog("2每日定时任务推送税友")
@Inner
public R<String> doInnerPushSoldier() {
return tSocialFriendPushService.pushSoldier(null);
}
/**
* @Description: 3每日定时任务推送税友审核结果查询
* @Author: hgw
* @Date: 2024-5-24 17:01:56
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Operation(description = "3每日定时任务推送税友审核结果查询")
@PostMapping("/inner/doInnerPushSoldierByAudit")
@SysLog("4每日定时任务推送税友审核结果查询")
@Inner
public R<String> doInnerPushSoldierByAudit() {
return tSocialFriendPushService.pushSoldierByAudit();
}
/**
* @Description: 4每日定时任务获取税友审核结果查询
* @Author: hgw
* @Date: 2024-5-24 17:02:00
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Operation(description = "4每日定时任务获取税友审核结果查询")
@PostMapping("/inner/doInnerGetSixJobByAudit")
@SysLog("4每日定时任务获取税友审核结果查询")
@Inner
public R<String> doInnerGetSixJobByAudit() {
return tSocialFriendService.getSixJobByAudit();
public R<String> doGetFriendByRequestId() {
return tSocialFriendService.getInfoByRequestId();
}
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFreindSet;
import org.apache.ibatis.annotations.Mapper;
/**
* 社保士兵与税友切换表
*
* @author hgw
* @date 2024-12-12 09:40:56
*/
@Mapper
public interface TSocialFreindSetMapper extends BaseMapper<TSocialFreindSet> {
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFriendBackLog;
import org.apache.ibatis.annotations.Mapper;
/**
* 社保士兵返回的数据记录表
*
* @author hgw
* @date 2024-12-12 09:40:55
*/
@Mapper
public interface TSocialFriendBackLogMapper extends BaseMapper<TSocialFriendBackLog> {
}
......@@ -19,10 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.social.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYgsAddVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYgsAuditVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYsdAddVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYsdAuditVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -42,7 +39,7 @@ public interface TSocialFriendMapper extends BaseMapper<TSocialInfo> {
* @Author hgw
* @Date 2024-5-10 21:16:41
**/
List<SocialSoldierYgsAddVo> getSocialSoldierYgsAddVoList(@Param("idsStr") List<String> idsStr);
List<SociaFriendYgsAddVo> getSocialSoldierYgsAddVoList(@Param("idsStr") List<String> idsStr);
/**
* 社保士兵养工失减少模板
......@@ -50,7 +47,7 @@ public interface TSocialFriendMapper extends BaseMapper<TSocialInfo> {
* @Author hgw
* @Date 2024-5-10 21:16:41
**/
List<SocialSoldierYgsAddVo> getSocialSoldierYgsReduceVoList(@Param("idsStr") List<String> idsStr);
List<SociaFriendYgsAddVo> getSocialSoldierYgsReduceVoList(@Param("idsStr") List<String> idsStr);
/**
* 社保士兵医生大增加模板
......@@ -58,7 +55,7 @@ public interface TSocialFriendMapper extends BaseMapper<TSocialInfo> {
* @Author hgw
* @Date 2024-5-10 21:16:41
**/
List<SocialSoldierYsdAddVo> getSocialSoldierYsdAddVoList(@Param("idsStr") List<String> idsStr);
List<SociaFriendYgsAddVo> getSocialSoldierYsdAddVoList(@Param("idsStr") List<String> idsStr);
/**
* 社保士兵医生大减少模板
......@@ -66,54 +63,8 @@ public interface TSocialFriendMapper extends BaseMapper<TSocialInfo> {
* @Author hgw
* @Date 2024-5-10 21:16:41
**/
List<SocialSoldierYsdAddVo> getSocialSoldierYsdReduceVoList(@Param("idsStr") List<String> idsStr);
List<SociaFriendYgsAddVo> getSocialSoldierYsdReduceVoList(@Param("idsStr") List<String> idsStr);
/**
* 社保士兵养工失审核模板
*
* @Author hgw
* @Date 2024-5-24 16:39:43
**/
List<SocialSoldierYgsAuditVo> getSocialSoldierYgsAuditVoList();
/**
* 社保士兵医生大审核续保模板
*
* @Author hgw
* @Date 2024-5-24 16:39:43
**/
List<SocialSoldierYsdAuditVo> getSocialSoldierYsdAuditVoList();
/**
* 社保士兵养工失审核模板——推送给社保士兵的归总模板
*
* @Author hgw
* @Date 2024-9-2 18:03:04
**/
List<SocialSoldierYgsAuditVo> getSocialSoldierYgsAuditVoListByGroupBy();
/**
* 社保士兵医生大审核续保模板——推送给社保士兵的归总模板
*
* @Author hgw
* @Date 2024-9-2 18:03:07
**/
List<SocialSoldierYsdAuditVo> getSocialSoldierYsdAuditVoListByGroupBy();
/**
* 社保士兵医生大审核新增模板
*
* @Author hgw
* @Date 2024-5-24 16:39:43
**/
List<SocialSoldierYsdAuditVo> getSocialSoldierYsdAddAuditVoList();
/**
* 社保士兵医生大审核新增模板
*
* @Author hgw
* @Date 2024-5-24 16:39:43
**/
List<SocialSoldierYsdAuditVo> getSocialSoldierYsdAddAuditVoListByGroupBy();
}
......@@ -50,6 +50,9 @@ public interface TSocialInfoMapper extends BaseMapper<TSocialInfo> {
**/
List<TSocialInfo> getSocialSoldierYgsAll();
List<TSocialInfo> getSocialSoldierYsdAll();
List<TSocialInfo> getSocialFriendYgsAll();
List<TSocialInfo> getSocialFriendYsdAll();
/**
* @param
* @Description: 获取所有需要社保局审核的社保
......
......@@ -65,4 +65,6 @@ public interface TSocialDeadlineInfoService extends IService<TSocialDeadlineInfo
**/
Map<String, TSocialDeadlineInfo> getSocialSet();
Map<String, TSocialDeadlineInfo> getSocialSetByAreaId();
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFreindSet;
/**
* 社保士兵与税友切换表
*
* @author hgw
* @date 2024-12-12 09:40:56
*/
public interface TSocialFreindSetService extends IService<TSocialFreindSet> {
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFriendBackLog;
/**
* 社保士兵返回的数据记录表
*
* @author hgw
* @date 2024-12-12 09:40:55
*/
public interface TSocialFriendBackLogService extends IService<TSocialFriendBackLog> {
}
......@@ -34,14 +34,6 @@ import java.util.List;
*/
public interface TSocialFriendPushService extends IService<TSocialInfo> {
/**
* @Description: 根据文件,推送到社保士兵。注意社保id别搞错了,否则塞值到社保里就塞错了
* @Author: hgw
* @Date: 2024/5/11 14:46
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R<String> getOneAppGetModuleDetail(List<TSocialInfo> socialIdList, MultipartFile file, String type);
/**
* @param dispatchIdList
* @Description: 根据派单id,获取要派增派减的社保、医保数据,生成文件,推送到社保士兵
......@@ -49,18 +41,6 @@ public interface TSocialFriendPushService extends IService<TSocialInfo> {
* @Date: 2024/5/10 17:52
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R<String> pushSoldier(List<String> dispatchIdList);
R<String> pushFriendTest(List<String> dispatchIdList);
R<FriendResult> getFriendByRequestIdTest(List<String> dispatchIdList);
/**
* @param
* @Description: 推送当月所有提交社保局后,待社保局审核的查询任务
* @Author: hgw
* @Date: 2024/5/23 18:14
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R<String> pushSoldierByAudit();
R<String> pushFriend(List<String> dispatchIdList);
}
......@@ -20,6 +20,9 @@ package com.yifu.cloud.plus.v1.yifu.social.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.FriendResult;
import java.util.List;
/**
* 社保士兵
......@@ -29,22 +32,12 @@ import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo;
*/
public interface TSocialFriendService extends IService<TSocialInfo> {
/**
* @param addId
* @Description: 查看社保士兵反馈情况
* @Author: hgw
* @Date: 2024/5/11 14:45
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R<String> getFiveJob(String addId);
/**
* @Description: 查看社保士兵审核结果查询的反馈情况
* @Author: hgw
* @Date: 2024-5-24 17:02:34
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R<String> getSixJobByAudit();
R<String> getInfoByRequestId();
}
......@@ -66,6 +66,9 @@ public interface TSocialInfoService extends IService<TSocialInfo> {
**/
List<TSocialInfo> getSocialSoldierYgsAll();
List<TSocialInfo> getSocialSoldierYsdAll();
List<TSocialInfo> getSocialFriendYgsAll();
List<TSocialInfo> getSocialFriendYsdAll();
/**
* @Description: 获取所有需要审核结果的社保
* @Author: hgw
......
......@@ -59,6 +59,11 @@ public interface TSocialSoldierLogService extends IService<TSocialSoldierLog> {
// 医保提交日志
TSocialSoldierLog getYsdSoldierLog(SocialSoldierYsdAddVo vo, String type, String remark);
// 社保提交日志-税友
TSocialSoldierLog getYgsFriendLog(SociaFriendYgsAddVo vo, String type, String remark);
// 医保提交日志-税友
TSocialSoldierLog getYsdFriendLog(SociaFriendYgsAddVo vo, String type, String remark);
// 审核社保提交日志
TSocialSoldierLog getYgsSoldierAuditLog(SocialSoldierYgsAuditVo vo, String type, String remark);
// 审核医保提交日志
......
......@@ -139,6 +139,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
private DoSocialTask socialTask;
private final TDispatchSocialFundInfoService infoService;
private final TSocialFreindSetService tSocialFreindSetService;
@Autowired
private ExcelMergeImage excelMergeImage;
@Autowired
......@@ -3739,7 +3740,16 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
baseMapper.updateById(dis);
socialFundMapper.updateById(sf);
if (isAuto) {
socialTask.pushSoldier(dis.getId());
TSocialFreindSet set = tSocialFreindSetService.getById("1");
// 是否推送税友,默认不是,推送到士兵
boolean isFriend = false;
// 当前默认 安徽省 才可以税友推送办理
String provinceId = "12";
if (Common.isNotNull(dis.getSocialProvince()) && provinceId.equals(dis.getSocialProvince())
&& set != null && Common.isNotNull(set.getType()) && set.getType() == 1) {
isFriend = true;
}
socialTask.pushSoldier(dis.getId(), isFriend);
}
//派减的申请审核完更新社保公积金查询快照表
......
......@@ -494,4 +494,33 @@ public class TSocialDeadlineInfoServiceImpl extends ServiceImpl<TSocialDeadlineI
}
return setMap;
}
@Override
public Map<String, TSocialDeadlineInfo> getSocialSetByAreaId() {
Map<String, TSocialDeadlineInfo> setMap = new HashMap<>();
List<TSocialDeadlineInfo> setlist = baseMapper.selectList(Wrappers.<TSocialDeadlineInfo>query().lambda()
.eq(TSocialDeadlineInfo::getMonth, DateUtil.getThisMonth())
.eq(TSocialDeadlineInfo::getStatus, CommonConstants.ZERO_STRING));
if (setlist != null && !setlist.isEmpty()) {
StringBuilder addressKey;
for (TSocialDeadlineInfo socialSet : setlist) {
if (Common.isNotNull(socialSet.getProvince())) {
addressKey = new StringBuilder(socialSet.getProvince()).append(CommonConstants.DOWN_LINE_STRING);
if (Common.isEmpty(socialSet.getCity())) {
addressKey.append(CommonConstants.CENTER_SPLIT_LINE_STRING);
} else {
addressKey.append(socialSet.getCity());
}
addressKey.append(CommonConstants.DOWN_LINE_STRING);
if (Common.isEmpty(socialSet.getTown())) {
addressKey.append(CommonConstants.CENTER_SPLIT_LINE_STRING);
} else {
addressKey.append(socialSet.getTown());
}
setMap.put(addressKey.toString(), socialSet);
}
}
}
return setMap;
}
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFreindSet;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialFreindSetMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialFreindSetService;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
/**
* 社保士兵与税友切换表
*
* @author hgw
* @date 2024-12-12 09:40:56
*/
@Log4j2
@Service
public class TSocialFreindSetServiceImpl extends ServiceImpl<TSocialFreindSetMapper, TSocialFreindSet> implements TSocialFreindSetService {
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFriendBackLog;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialFriendBackLogMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialFriendBackLogService;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
/**
* 社保士兵返回的数据记录表
*
* @author hgw
* @date 2024-12-12 09:40:55
*/
@Log4j2
@Service
public class TSocialFriendBackLogServiceImpl extends ServiceImpl<TSocialFriendBackLogMapper, TSocialFriendBackLog> implements TSocialFriendBackLogService {
}
......@@ -452,6 +452,22 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci
public List<TSocialInfo> getSocialSoldierYsdAll() {
return baseMapper.getSocialSoldierYsdAll();
}
@Override
public List<TSocialInfo> getSocialFriendYgsAll() {
return baseMapper.getSocialFriendYgsAll();
}
/**
* @param
* @Description: 获取所有需要自动办理的社保
* @Author: hgw
* @Date: 2024/5/11 14:55
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo>
**/
@Override
public List<TSocialInfo> getSocialFriendYsdAll() {
return baseMapper.getSocialFriendYsdAll();
}
/**
* @param
* @Description: 获取所有需要社保局审核的社保
......
......@@ -164,6 +164,34 @@ public class TSocialSoldierLogServiceImpl extends ServiceImpl<TSocialSoldierLogM
return log;
}
@Override
public TSocialSoldierLog getYgsFriendLog(SociaFriendYgsAddVo vo, String type, String remark) {
TSocialSoldierLog log = new TSocialSoldierLog();
log.setSocialId(vo.getSocialId());
log.setEmpName(vo.getEmpName());
log.setEmpIdcard(vo.getEmpIdcard());
log.setDispatchItem("社保");
log.setSocialHuName(vo.getSocialHouseholdName());
// type 类型:提交;审核
log.setType(type);
log.setRemark(remark);
return log;
}
@Override
public TSocialSoldierLog getYsdFriendLog(SociaFriendYgsAddVo vo, String type, String remark) {
TSocialSoldierLog log = new TSocialSoldierLog();
log.setSocialId(vo.getSocialId());
log.setEmpName(vo.getEmpName());
log.setEmpIdcard(vo.getEmpIdcard());
log.setDispatchItem("医保");
log.setSocialHuName(vo.getSocialHouseholdName());
// type 类型:提交;审核
log.setType(type);
log.setRemark(remark);
return log;
}
@Override
public TSocialSoldierLog getYgsSoldierAuditLog(SocialSoldierYgsAuditVo vo, String type, String remark) {
TSocialSoldierLog log = new TSocialSoldierLog();
......
......@@ -14,10 +14,7 @@ import com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TSendEkpErrorMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TForecastLibraryService;
import com.yifu.cloud.plus.v1.yifu.social.service.TIncomeDetailService;
import com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialSoldierPushService;
import com.yifu.cloud.plus.v1.yifu.social.service.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -56,6 +53,9 @@ public class DoSocialTask {
@Autowired
private TSocialSoldierPushService tSocialSoldierPushService;
@Autowired
private TSocialFriendPushService tSocialFriendPushService;
/**
* @Author fxj
* @Description 异步处理相关信息
......@@ -269,7 +269,7 @@ public class DoSocialTask {
* @return
**/
@Async
public void pushSoldier(String dispatchId) {
public void pushSoldier(String dispatchId, boolean isFriend) {
List<String> dispatchIdList = new ArrayList<>();
dispatchIdList.add(dispatchId);
try {
......@@ -277,6 +277,11 @@ public class DoSocialTask {
} catch (InterruptedException e) {
e.printStackTrace();
}
tSocialSoldierPushService.pushSoldier(dispatchIdList);
// 当前默认 安徽省 ,且开关是税友的,才可以税友推送办理
if (isFriend) {
tSocialFriendPushService.pushFriend(dispatchIdList);
} else {
tSocialSoldierPushService.pushSoldier(dispatchIdList);
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!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.social.mapper.TSocialFreindSetMapper">
<resultMap id="tSocialFreindSetMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFreindSet">
<id property="id" column="ID"/>
<result property="type" column="TYPE"/>
</resultMap>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!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.social.mapper.TSocialFriendBackLogMapper">
<resultMap id="tSocialFriendBackLogMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFriendBackLog">
<id property="id" column="ID"/>
<result property="socialId" column="SOCIAL_ID"/>
<result property="requestId" column="REQUEST_ID"/>
<result property="logInfo" column="LOG_INFO"/>
<result property="createTime" column="CREATE_TIME"/>
</resultMap>
</mapper>
......@@ -150,6 +150,10 @@
<result property="dispatchType" column="DISPATCH_TYPE"/>
<result property="ygsOverDueFlag" column="YGS_OVER_DUE_FLAG"/>
<result property="ysdOverDueFlag" column="YSD_OVER_DUE_FLAG"/>
<!-- 税友新增字段-->
<result property="ygsRequestId" column="YGS_REQUEST_ID"/>
<result property="ysdRequestId" column="YSD_REQUEST_ID"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
......@@ -262,7 +266,9 @@
a.YGS_REMARK_OLD,
a.YSD_REMARK_OLD,
a.YGS_ADD_ID,
a.YSD_ADD_ID
a.YSD_ADD_ID,
a.YGS_REQUEST_ID,
a.YSD_REQUEST_ID
</sql>
<sql id="tSocialInfo_where">
......@@ -631,6 +637,52 @@ if((sd.id is not null and NOW() <![CDATA[ <= ]]> sd.SOCIAL_END_DATE) or ( sd.id
group by a.id
</select>
<!-- 获取所有需要自动办理的养工失 -->
<select id="getSocialFriendYgsAll" resultMap="tSocialInfoMap">
SELECT
a.ID,
a.EMP_NAME,
a.SOCIAL_HOUSEHOLD_NAME,
a.EMP_IDCARD,
a.YGS_REQUEST_ID,
a.HANDLE_STATUS,
a.YGS_HANDLE_STATUS,
SUBSTRING_INDEX(GROUP_CONCAT(d.id ORDER BY d.CREATE_TIME desc),',',1) as DISPATCH_ID,
SUBSTRING_INDEX(GROUP_CONCAT(d.type ORDER BY d.CREATE_TIME desc),',',1) as DISPATCH_TYPE,
if((sd.id is not null and NOW() <![CDATA[ <= ]]> sd.SOCIAL_END_DATE) or ( sd.id is null and DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(now(),'%Y%m')),0 ,1) YGS_OVER_DUE_FLAG
FROM t_social_info a
left join t_dispatch_info d on d.SOCIAL_ID = a.id
left join t_social_deadline_info sd on sd.MONTH = DATE_FORMAT(d.AUDIT_TIME,'%Y%m') and sd.STATUS = '0'
and sd.PROVINCE=a.SOCIAL_PROVINCE and sd.CITY=a.SOCIAL_CITY and ( (a.SOCIAL_TOWN is null and sd.TOWN is null) or (sd.TOWN=a.SOCIAL_TOWN))
where a.YGS_REQUEST_ID is not null and d.AUTO_FLAG='0'
and (DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(now(),'%Y%m') or DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m'))
and a.YGS_HANDLE_STATUS in ('1','2','3')
group by a.id
</select>
<!-- 获取所有需要自动办理的医生大 -->
<select id="getSocialFriendYsdAll" resultMap="tSocialInfoMap">
SELECT
a.ID,
a.EMP_NAME,
a.SOCIAL_HOUSEHOLD_NAME,
a.EMP_IDCARD,
a.YSD_REQUEST_ID,
a.HANDLE_STATUS,
a.YSD_HANDLE_STATUS,
SUBSTRING_INDEX(GROUP_CONCAT(d.id ORDER BY d.CREATE_TIME desc),',',1) as DISPATCH_ID,
SUBSTRING_INDEX(GROUP_CONCAT(d.type ORDER BY d.CREATE_TIME desc),',',1) as DISPATCH_TYPE,
if((sd.id is not null and NOW() <![CDATA[ <= ]]> sd.MEDICAL_END_DATE) or ( sd.id is null and DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(now(),'%Y%m')),0 ,1) YSD_OVER_DUE_FLAG
FROM t_social_info a
left join t_dispatch_info d on d.SOCIAL_ID = a.id
left join t_social_deadline_info sd on sd.MONTH = DATE_FORMAT(d.AUDIT_TIME,'%Y%m') and sd.STATUS = '0'
and sd.PROVINCE=a.SOCIAL_PROVINCE and sd.CITY=a.SOCIAL_CITY and ( (a.SOCIAL_TOWN is null and sd.TOWN is null) or (sd.TOWN=a.SOCIAL_TOWN))
where a.YSD_REQUEST_ID is not null and d.AUTO_FLAG='0'
and (DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(now(),'%Y%m') or DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m'))
and a.YSD_HANDLE_STATUS in ('1','2','3')
group by a.id
</select>
<!-- 获取所有需要社保局审核的养工失 -->
<select id="getSocialSoldierYgsByAudit" resultMap="tSocialInfoMap">
SELECT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment