Commit ece0debc authored by hongguangwu's avatar hongguangwu

MVP1.6.4-社保士兵相关代码2

parent c42b0453
......@@ -169,4 +169,30 @@ public class SocialTask {
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tholidayinfo/inner/createHolidayInfo","", Object.class, SecurityConstants.FROM_IN);
log.info("------------定时任务1月1号生成年度假期表-定时任务结束------------");
}
/**
* @Description: 1定时任务获取社保士兵状态
* @Author: hgw
* @Date: 2022/7/27 19:39
* @return: void
**/
public void doInnerGetFiveJob() {
log.info("------------1定时任务获取社保士兵状态-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tsocialsoldier/inner/doInnerGetFiveJob","", Object.class, SecurityConstants.FROM_IN);
log.info("------------1定时任务获取社保士兵状态-定时任务结束------------");
}
/**
* @Description: 2定时任务推送社保士兵
* @Author: hgw
* @Date: 2022/7/27 19:39
* @return: void
**/
public void doInnerPushSoldier() {
log.info("------------2定时任务推送社保士兵-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tsocialsoldier/inner/doInnerPushSoldier","", Object.class, SecurityConstants.FROM_IN);
log.info("------------2定时任务推送社保士兵-定时任务结束------------");
}
}
......@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.social.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
......@@ -974,7 +975,7 @@ public class TSocialInfo extends BaseEntity {
@NotBlank(message = "养工失状态不能为空" )
@Length(max = 32, message = "养工失状态 不能超过32个字符" )
@ExcelAttribute(name = "养工失状态", isNotEmpty = true, errorInfo = "办理状态不能为空", maxLength = 32)
@Schema(description = "养工失状态:(0空、1待办理、2自动办理中、3继续办理、4终止办理、5人工处理)" )
@Schema(description = "养工失状态:(0空、1待办理、2自动办理中、3继续办理、4终止办理、5人工处理、6成功)" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("养工失状态" )
private String ygsHandleStatus;
......@@ -984,7 +985,7 @@ public class TSocialInfo extends BaseEntity {
@NotBlank(message = "医生大状态不能为空" )
@Length(max = 32, message = "医生大状态 不能超过32个字符" )
@ExcelAttribute(name = "医生大状态", isNotEmpty = true, errorInfo = "办理状态不能为空", maxLength = 32)
@Schema(description = "医生大状态:(0空、1待办理、2自动办理中、3继续办理、4终止办理、5人工处理)" )
@Schema(description = "医生大状态:(0空、1待办理、2自动办理中、3继续办理、4终止办理、5人工处理、6成功)" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医生大状态" )
private String ysdHandleStatus;
......@@ -992,7 +993,7 @@ public class TSocialInfo extends BaseEntity {
* 养工失反馈
*/
@Length(max = 500, message = "养工失反馈 不能超过500个字符" )
@ExcelAttribute(name = "养工失反馈", maxLength = 1)
@ExcelAttribute(name = "养工失反馈", maxLength = 500)
@Schema(description = "养工失反馈" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("养工失反馈" )
......@@ -1001,7 +1002,7 @@ public class TSocialInfo extends BaseEntity {
* 医生大反馈
*/
@Length(max = 500, message = "医生大反馈 不能超过500个字符" )
@ExcelAttribute(name = "医生大反馈", maxLength = 1)
@ExcelAttribute(name = "医生大反馈", maxLength = 500)
@Schema(description = "医生大反馈" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医生大反馈" )
......@@ -1010,7 +1011,7 @@ public class TSocialInfo extends BaseEntity {
* 养工失反馈-原反馈
*/
@Length(max = 500, message = "养工失反馈-原反馈 不能超过500个字符" )
@ExcelAttribute(name = "养工失反馈-原反馈", maxLength = 1)
@ExcelAttribute(name = "养工失反馈-原反馈", maxLength = 500)
@Schema(description = "养工失反馈-原反馈" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("养工失反馈-原反馈" )
......@@ -1019,10 +1020,33 @@ public class TSocialInfo extends BaseEntity {
* 医生大反馈-原反馈
*/
@Length(max = 500, message = "医生大反馈-原反馈 不能超过500个字符" )
@ExcelAttribute(name = "医生大反馈-原反馈", maxLength = 1)
@ExcelAttribute(name = "医生大反馈-原反馈", maxLength = 500)
@Schema(description = "医生大反馈-原反馈" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医生大反馈-原反馈" )
private String ysdRemarkOld;
/**
* 养工失社保士兵的任务ID
*/
@Length(max = 50, message = "养工失社保士兵的任务ID 不能超过50个字符" )
@ExcelAttribute(name = "养工失社保士兵的任务ID", maxLength = 50)
@Schema(description = "养工失社保士兵的任务ID" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("养工失社保士兵的任务ID" )
private String ygsAddId;
/**
* 医生大社保士兵的任务ID
*/
@Length(max = 50, message = "医生大社保士兵的任务ID 不能超过50个字符" )
@ExcelAttribute(name = "医生大社保士兵的任务ID", maxLength = 50)
@Schema(description = "医生大社保士兵的任务ID" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医生大社保士兵的任务ID" )
private String ysdAddId;
// 派单id,社保士兵使用
@TableField(exist = false)
private String dispatchId;
}
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @Author hgw
* @Description 社保士兵养工失增加模板
* @Date 2024-5-10 21:05:29
**/
@Data
public class SocialSoldierYgsAddVo implements Serializable {
// 社保id,用于回写
@ExcelIgnore
private String socialId;
//企业名称 证件类型 身份证号码 姓名 国籍 个人身份 民族 参加工作日期 工资
// 文化程度 户口性质 增员年月 户口所在地 用工形式 手机号码 通讯地址 就业登记时间 单位就业起始时间 合同期限类型
//合同起始时间 合同终止日期 录用工种代码 合同签订类别 工作时间制度 参保日期 户口所在地行政区划代码 居住所在地行政区划代码 当前经办行政区划代码 补缴原因 回传信息 回传信息1 回传信息2
@ExcelProperty("企业名称")
private String socialHouseholdName;
@ExcelProperty("证件类型")
private String idCardType;
@ExcelProperty("身份证号码")
private String empIdCard;
@ExcelProperty("姓名")
private String empName;
@ExcelProperty("国籍")
private String country;
@ExcelProperty("个人身份")
private String personType;
@ExcelProperty("民族")
private String nation;
@ExcelProperty("参加工作日期")
private String workDate;
@ExcelProperty("工资")
private String recordBase;
@ExcelProperty("文化程度")
private String educationName;
@ExcelProperty("户口性质")
private String regisType;
@ExcelProperty("增员年月")
private String addDate;
@ExcelProperty("户口所在地")
private String fileAddr;
@ExcelProperty("用工形式")
private String contractName;
@ExcelProperty("手机号码")
private String empMobile;
@ExcelProperty("通讯地址")
private String mobileAddr;
@ExcelProperty("就业登记时间")
private String dispatchDate;
@ExcelProperty("单位就业起始时间")
private String workStartDate;
@ExcelProperty("合同期限类型")
private String contractDateType;
@ExcelProperty("合同起始时间")
private String contractStart;
@ExcelProperty("合同终止日期")
private String contractEnd;
@ExcelProperty("录用工种代码")
private String workCode;
@ExcelProperty("合同签订类别")
private String contractType;
@ExcelProperty("工作时间制度")
private String workingHours;
@ExcelProperty("参保日期")
private String socialDate;
@ExcelProperty("户口所在地行政区划代码")
private String huAddr;
@ExcelProperty("居住所在地行政区划代码")
private String zhuAddr;
@ExcelProperty("当前经办行政区划代码")
private String banAddr;
@ExcelProperty("补缴原因")
private String buRemark;
@ExcelProperty("回传信息")
private String huiRemark;
@ExcelProperty("回传信息1")
private String huiRemark1;
@ExcelProperty("回传信息2")
private String huiRemark2;
}
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @Author hgw
* @Description 社保士兵养工失减少模板
* @Date 2024-5-10 21:05:29
**/
@Data
public class SocialSoldierYgsReduceVo implements Serializable {
// 社保id,用于回写
@ExcelIgnore
private String socialId;
//企业名称 证件类型 证件号码 姓名 中断原因 中断时间 回传信息 回传信息1 回传信息2
@ExcelProperty("企业名称")
private String socialHouseholdName;
@ExcelProperty("姓名")
private String empName;
@ExcelProperty("身份证号码")
private String empIdCard;
@ExcelProperty("减员原因")
private String reduceReason;
@ExcelProperty("备案解除二级原因")
private String twoRemark;
@ExcelProperty("备案解除三级原因")
private String threeRemark;
@ExcelProperty("回传信息")
private String huiRemark;
@ExcelProperty("回传信息1")
private String huiRemark1;
@ExcelProperty("回传信息2")
private String huiRemark2;
}
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @Author hgw
* @Description 社保士兵医生大增加模板
* @Date 2024-5-11 10:28:45
**/
@Data
public class SocialSoldierYsdAddVo implements Serializable {
// 社保id,用于回写
@ExcelIgnore
private String socialId;
//企业名称 证件类型 证件号码 姓名 民族 学历 手机号码 人员类型 申报工资
//用工形式 编制类型 参保日期 合同起止日期 原参保日期 回传信息 回传信息1 回传信息2
@ExcelProperty("企业名称")
private String socialHouseholdName;
@ExcelProperty("证件类型")
private String idCardType;
@ExcelProperty("证件号码")
private String empIdCard;
@ExcelProperty("姓名")
private String empName;
@ExcelProperty("民族")
private String nation;
@ExcelProperty("学历")
private String educationName;
@ExcelProperty("手机号码")
private String empMobile;
// 人员类型:职工在职
@ExcelProperty("人员类型")
private String empType;
@ExcelProperty("申报工资")
private String recordBase;
@ExcelProperty("用工形式")
private String contractName;
// 编制类型:非在编
@ExcelProperty("编制类型")
private String bianType;
@ExcelProperty("参保日期")
private String socialDate;
// 合同起止日期:空
@ExcelProperty("合同起止日期")
private String contractDate;
// 原参保日期
@ExcelProperty("原参保日期")
private String socialDateOld;
@ExcelProperty("回传信息")
private String huiRemark;
@ExcelProperty("回传信息1")
private String huiRemark1;
@ExcelProperty("回传信息2")
private String huiRemark2;
}
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @Author hgw
* @Description 社保士兵医生大减少模板
* @Date 2024-5-11 10:28:36
**/
@Data
public class SocialSoldierYsdReduceVo implements Serializable {
// 社保id,用于回写
@ExcelIgnore
private String socialId;
//企业名称 证件类型 证件号码 姓名 中断原因 中断时间 回传信息 回传信息1 回传信息2
@ExcelProperty("企业名称")
private String socialHouseholdName;
@ExcelProperty("证件类型")
private String idCardType;
@ExcelProperty("证件号码")
private String empIdCard;
@ExcelProperty("姓名")
private String empName;
@ExcelProperty("中断原因")
private String reduceReason;
@ExcelProperty("中断时间")
private String reduceDate;
@ExcelProperty("回传信息")
private String huiRemark;
@ExcelProperty("回传信息1")
private String huiRemark1;
@ExcelProperty("回传信息2")
private String huiRemark2;
}
......@@ -558,7 +558,7 @@ public class TDispatchInfoController {
try {
if (Common.isNotNull(requestId)) {
//主动释放锁
return tDispatchInfoService.addApplyHandle(idList,typeSub,handleStatus,handleRemark,socialType,remark);
return tDispatchInfoService.addApplyHandle(idList,typeSub,handleStatus,handleRemark,socialType,remark,user);
} else {
return R.failed(ResultConstants.NO_GETLOCK_DATA);
}
......
......@@ -18,13 +18,15 @@
package com.yifu.cloud.plus.v1.yifu.social.controller;
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.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialSoldierService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
......@@ -41,9 +43,57 @@ public class TSocialSoldierController {
private final TSocialSoldierService tSocialSoldierService;
@Operation(description = "获取社保士兵相关信息")
@GetMapping("/getOneAppGetModuleDetail")
public R<String> getOneAppGetModuleDetail() {
return tSocialSoldierService.getOneAppGetModuleDetail();
/**
* @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 tSocialSoldierService.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 tSocialSoldierService.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定时任务获取社保士兵状态")
@GetMapping("/inner/doInnerGetFiveJob")
@SysLog("每日1定时任务获取社保士兵状态")
@Inner
public R<String> doInnerGetFiveJob() {
return tSocialSoldierService.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定时任务推送社保士兵")
@GetMapping("/inner/doInnerPushSoldier")
@SysLog("每日2定时任务推送社保士兵")
@Inner
public R<String> doInnerPushSoldier() {
return tSocialSoldierService.pushSoldier(null);
}
}
......@@ -7,6 +7,8 @@ import com.yifu.cloud.plus.v1.yifu.social.entity.FailReasonConfig;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 失败原因配置
*
......@@ -21,4 +23,7 @@ public interface FailReasonConfigMapper extends BaseMapper<FailReasonConfig> {
* @return
*/
IPage<FailReasonConfig> getFailReasonConfigPage(Page<FailReasonConfig> page, @Param("failReasonConfig") FailReasonConfig failReasonConfig);
// 获取list组装map来使用 hgw
List<FailReasonConfig> getFailReasonConfigList();
}
......@@ -63,6 +63,31 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> {
long selectExportCount(@Param("tDispatchInfo") TDispatchInfoSearchVo tDispatchInfo);
/**
* 社保士兵养工失增加模板
* @Author hgw
* @Date 2024-5-10 21:16:41
**/
List<SocialSoldierYgsAddVo> getSocialSoldierYgsAddVoList(@Param("idsStr") List<String> idsStr);
/**
* 社保士兵养工失增加模板
* @Author hgw
* @Date 2024-5-10 21:16:41
**/
List<SocialSoldierYgsReduceVo> getSocialSoldierYgsReduceVoList(@Param("idsStr") List<String> idsStr);
/**
* 社保士兵养工失增加模板
* @Author hgw
* @Date 2024-5-10 21:16:41
**/
List<SocialSoldierYsdAddVo> getSocialSoldierYsdAddVoList(@Param("idsStr") List<String> idsStr);
/**
* 社保士兵养工失增加模板
* @Author hgw
* @Date 2024-5-10 21:16:41
**/
List<SocialSoldierYsdReduceVo> getSocialSoldierYsdReduceVoList(@Param("idsStr") List<String> idsStr);
/**
* 导出社保花名册数据查询
* @Author fxj
......
......@@ -23,6 +23,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 社保明细表
*
......@@ -37,4 +40,24 @@ public interface TSocialInfoMapper extends BaseMapper<TSocialInfo> {
* @return
*/
IPage<TSocialInfo> getTSocialInfoPage(Page<TSocialInfo> page, @Param("tSocialInfo") TSocialInfo tSocialInfo);
/**
* @param
* @Description: 获取所有需要自动办理的社保
* @Author: hgw
* @Date: 2024/5/11 14:58
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo>
**/
List<TSocialInfo> getSocialSoldierYgsAll();
List<TSocialInfo> getSocialSoldierYsdAll();
/**
* @param addId 任务id
* @Description: 根据任务ID,获取需要自动办理的社保
* @Author: hgw
* @Date: 2024/5/11 15:04
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo>
**/
List<TSocialInfo> getSocialSoldierByAddId(@Param("addId") String addId);
}
......@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.social.entity.FailReasonConfig;
import java.util.Map;
/**
* 失败原因配置
*
......@@ -18,4 +20,12 @@ public interface FailReasonConfigService extends IService<FailReasonConfig> {
* @return
*/
IPage<FailReasonConfig> getFailReasonConfigPage(Page<FailReasonConfig> page, FailReasonConfig failReasonConfig);
/**
* @Description: 获取list组装map来使用 hgw
* @Author: hgw
* @Date: 2024/5/11 16:24
* @return: java.util.Map<java.lang.String, com.yifu.cloud.plus.v1.yifu.social.entity.FailReasonConfig>
**/
Map<String, FailReasonConfig> getFailReasonMap();
}
\ No newline at end of file
......@@ -81,7 +81,7 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
R<List<ErrorMessage>> addApplyAudit(List<String> ids, String auditStatus, String auditRemark, String remark);
R<List<ErrorMessage>> addApplyHandle(List<String> ids, String typeSub, String handleStatus, String handleRemark, String socialType, String remark);
R<List<ErrorMessage>> addApplyHandle(List<String> ids, String typeSub, String handleStatus, String handleRemark, String socialType, String remark, YifuUser user);
void doexportSocialRecordRoster(HttpServletResponse response, SocialHandleSearchVo searchVo, String idStr, String[] exportFields);
......@@ -153,4 +153,15 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
**/
List<SocialHandleExportVo> getRecordRosterList(SocialHandleSearchVo searchVo, String idStr);
/**
* @Description: 社保士兵养工失增加模板
* @Author: hgw
* @Date: 2024-5-10 21:26:23
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.social.vo.SocialHandleExportVo>
**/
List<SocialSoldierYgsAddVo> getSocialSoldierYgsAddVoList(List<String> idList);
List<SocialSoldierYgsReduceVo> getSocialSoldierYgsReduceVoList(List<String> idList);
List<SocialSoldierYsdAddVo> getSocialSoldierYsdAddVoList(List<String> idList);
List<SocialSoldierYsdReduceVo> getSocialSoldierYsdReduceVoList(List<String> idList);
}
......@@ -57,4 +57,23 @@ public interface TSocialInfoService extends IService<TSocialInfo> {
* @return
**/
SocialAddAndReduceVo getAddOrReduceInfoByEmpId(String empId);
/**
* @Description: 获取所有需要自动办理的社保
* @Author: hgw
* @Date: 2024/5/11 14:55
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo>
**/
List<TSocialInfo> getSocialSoldierYgsAll();
List<TSocialInfo> getSocialSoldierYsdAll();
/**
* @param addId 任务id
* @Description: 根据任务ID,获取需要自动办理的社保
* @Author: hgw
* @Date: 2024/5/11 15:06
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo>
**/
List<TSocialInfo> getSocialSoldierByAddId(String addId);
}
......@@ -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 org.springframework.web.multipart.MultipartFile;
import java.util.List;
/**
* 社保士兵
......@@ -28,6 +31,31 @@ import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo;
* @date 2024-5-8 14:55:24
*/
public interface TSocialSoldierService extends IService<TSocialInfo> {
R<String> getOneAppGetModuleDetail();
/**
* @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,获取要派增派减的社保、医保数据,生成文件,推送到社保士兵
* @Author: hgw
* @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);
/**
* @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);
}
......@@ -9,6 +9,10 @@ import com.yifu.cloud.plus.v1.yifu.social.service.FailReasonConfigService;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 失败原因配置
*
......@@ -28,4 +32,20 @@ public class FailReasonConfigServiceImpl extends ServiceImpl<FailReasonConfigMap
return baseMapper.getFailReasonConfigPage(page,failReasonConfig);
}
/**
* @Description: 获取list组装map来使用 hgw
* @Author: hgw
* @Date: 2024/5/11 16:23
* @return: java.util.Map<java.lang.String, com.yifu.cloud.plus.v1.yifu.social.entity.FailReasonConfig>
**/
@Override
public Map<String, FailReasonConfig> getFailReasonMap() {
Map<String, FailReasonConfig> map = new HashMap<>();
List<FailReasonConfig> list = baseMapper.getFailReasonConfigList();
for (FailReasonConfig config : list) {
map.put(config.getKey(), config);
}
return map;
}
}
\ No newline at end of file
......@@ -3764,8 +3764,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
@ShardingTransactionType(TransactionType.BASE)
@Override
public R<List<ErrorMessage>> addApplyHandle(List<String> ids, String typeSub, String handleStatus,
String handleRemark, String socialType, String remark) {
String handleRemark, String socialType, String remark, YifuUser userAuto) {
YifuUser user = SecurityUtils.getUser();
if (userAuto != null) {
user = userAuto;
}
if (null == user) {
return R.failed(CommonConstants.USER_FAIL);
}
......@@ -5135,6 +5138,47 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
public List<SocialHandleExportVo> getRecordRosterList(SocialHandleSearchVo searchVo, String idStr) {
return baseMapper.getSocialRecordRosterList(searchVo,Common.getList(idStr));
}
/**
* @Description: 社保士兵养工失增加模板
* @Author: hgw
* @Date: 2024/5/10 21:25
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYgsAddVo>
**/
@Override
public List<SocialSoldierYgsAddVo> getSocialSoldierYgsAddVoList(List<String> idList) {
return baseMapper.getSocialSoldierYgsAddVoList(idList);
}
/**
* @Description: 社保士兵养工失增加模板
* @Author: hgw
* @Date: 2024/5/10 21:25
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYgsAddVo>
**/
@Override
public List<SocialSoldierYgsReduceVo> getSocialSoldierYgsReduceVoList(List<String> idList) {
return baseMapper.getSocialSoldierYgsReduceVoList(idList);
}
/**
* @Description: 社保士兵养工失增加模板
* @Author: hgw
* @Date: 2024/5/10 21:25
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYgsAddVo>
**/
@Override
public List<SocialSoldierYsdAddVo> getSocialSoldierYsdAddVoList(List<String> idList) {
return baseMapper.getSocialSoldierYsdAddVoList(idList);
}
/**
* @Description: 社保士兵养工失增加模板
* @Author: hgw
* @Date: 2024/5/10 21:25
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYgsAddVo>
**/
@Override
public List<SocialSoldierYsdReduceVo> getSocialSoldierYsdReduceVoList(List<String> idList) {
return baseMapper.getSocialSoldierYsdReduceVoList(idList);
}
private boolean updateSocialRecords(SocialHandleSearchVo searchVo, String idStr) {
return baseMapper.updateSocialRecords(searchVo,Common.getList(idStr)) >= 0;
}
......
......@@ -429,4 +429,40 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci
socialAddAndReduceVo.setSocialReduceStatus(CommonConstants.THREE_STRING);
}
}
/**
* @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> getSocialSoldierYgsAll() {
return baseMapper.getSocialSoldierYgsAll();
}
/**
* @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> getSocialSoldierYsdAll() {
return baseMapper.getSocialSoldierYsdAll();
}
/**
* @param
* @Description: 根据任务ID,获取需要自动办理的社保
* @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> getSocialSoldierByAddId(String addId) {
return baseMapper.getSocialSoldierByAddId(addId);
}
}
......@@ -56,4 +56,12 @@
</where>
order by a.CREATE_TIME desc
</select>
<!--获取list组装map来使用 hgw-->
<select id="getFailReasonConfigList" resultMap="failReasonConfigMap">
SELECT
<include refid="Base_Column_List"/>
FROM fail_reason_config a
where a.status = '0'
</select>
</mapper>
\ No newline at end of file
......@@ -1149,6 +1149,138 @@
<result property="reduceReason" column="REDUCE_REASON"/>
<result property="exportFundFlag" column="EXPORT_FUND_FLAG"/>
</resultMap>
<!-- 社保士兵养工失增加模板-->
<select id="getSocialSoldierYgsAddVoList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYgsAddVo">
SELECT
s.id as socialId,
a.SOCIAL_HOUSEHOLD_NAME socialHouseholdName,
'居民身份证(户口簿)' idCardType,
a.EMP_IDCARD empIdCard,
a.EMP_NAME empName,
'中国' country,
'职员' personType,
nation.label nation,
DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m%d') workDate,
s.RECORD_BASE recordBase,
EDUCATION_NAME educationName,
registype.label regisType,
DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m%d') addDate,
a.FILE_ADDR fileAddr,
a.CONTRACT_NAME contractName,
a.EMP_MOBILE empMobile,
a.FILE_ADDR mobileAddr,
DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m%d') dispatchDate,
DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m%d') workStartDate,
a.CONTRACT_NAME contractDateType,
DATE_FORMAT(a.CONTRACT_START,'%Y%m%d') contractStart,
DATE_FORMAT(a.CONTRACT_END,'%Y%m%d') contractEnd,
'办事人员' workCode,
'新签' contractType,
case when a.WORKING_HOURS = 1 then '标准工时'
when a.WORKING_HOURS = 2 then '综合工时'
when a.WORKING_HOURS = 3 then '不定时工时制'
else '-' end as workingHours ,
DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m%d') socialDate,
a.FILE_ADDR huAddr,
a.FILE_ADDR zhuAddr,
a.FILE_ADDR banAddr,
'' buRemark,
'' huiRemark,
'' huiRemark1,
'' huiRemark2
FROM t_dispatch_info a
left join t_social_info s on a.SOCIAL_ID = s.id
left join t_dispatch_social_fund_info h on a.id = h.REDUCE_SOCIAL_FUND_ID
left join view_sys_dict_item nation on nation.value=a.EMP_NATIONAL and nation.type='emp_national'
left join view_sys_dict_item registype on registype.value=a.EMP_REGIS_TYPE and registype.type='emp_registype'
<include refid="where_getSocialSoldier_base_handler"/>
and a.type = '0'
</select>
<sql id="where_getSocialSoldier_base_handler">
<where>
s.DELETE_FLAG = 0
/** 社保办理状态:0待办理/1已办理2办理失败3已派减4 办理中 5 部分办理失败 派单社保办理状态 0 未办理 1 全部办理成功(原-已办理) 2 全部办理失败(原-办理失败) 3 部分办理成功 4 办理中 **/
/*社保代办理 1.派单审核通过 2.派增(type=0):待办理(social_handle_status='0') or 派减(type=1):已办理完成或部分办理失败 且已派减*/
AND a.social_id is not null
AND a.STATUS = "2"
and (( a.type = '0' AND (s.HANDLE_STATUS = "0" or s.HANDLE_STATUS = "4") ) or ( a.type ='1' AND (if(ifnull(h.id,0) != '0',h.HANDLE_STATUS,s.HANDLE_STATUS) in ('1','5','6','3','7') or (s.HANDLE_STATUS in ('1','5','6','3','7') and s.REDUCE_CAN = '1')) ))
and a.SOCIAL_HANDLE_STATUS in ('0','4')
and a.AUTO_FLAG = '0'
</where>
</sql>
<!-- 社保士兵养工失减少模板-->
<select id="getSocialSoldierYgsReduceVoList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYgsReduceVo">
SELECT
s.id as socialId,
a.SOCIAL_HOUSEHOLD_NAME socialHouseholdName,
a.EMP_NAME empName,
a.EMP_IDCARD empIdCard,
reduceReason.label reduceReason,
'' twoRemark,
'' threeRemark,
'' huiRemark,
'' huiRemark1,
'' huiRemark2
FROM t_dispatch_info a
left join t_social_info s on a.SOCIAL_ID = s.id
left join t_dispatch_social_fund_info h on a.id = h.REDUCE_SOCIAL_FUND_ID
left join view_sys_dict_item reduceReason on reduceReason.value=a.REDUCE_REASON and reduceReason.type='social_reduce_reason'
<include refid="where_getSocialSoldier_base_handler"/>
and a.type = '1'
</select>
<!-- 社保士兵医生大增加模板-->
<select id="getSocialSoldierYsdAddVoList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYsdAddVo">
SELECT
s.id as socialId,
a.SOCIAL_HOUSEHOLD_NAME socialHouseholdName,
'居民身份证(户口簿)' idCardType,
a.EMP_IDCARD empIdCard,
a.EMP_NAME empName,
nation.label nation,
EDUCATION_NAME educationName,
a.EMP_MOBILE empMobile,
'职工在职' empType,
s.RECORD_BASE recordBase,
a.CONTRACT_NAME contractName,
'非在编' bianType,
DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m%d') socialDate,
'' contractDate,
DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m%d') socialDateOld,
'' huiRemark,
'' huiRemark1,
'' huiRemark2
FROM t_dispatch_info a
left join t_social_info s on a.SOCIAL_ID = s.id
left join t_dispatch_social_fund_info h on a.id = h.REDUCE_SOCIAL_FUND_ID
left join view_sys_dict_item nation on nation.value=a.EMP_NATIONAL and nation.type='emp_national'
<include refid="where_getSocialSoldier_base_handler"/>
and a.type = '0'
</select>
<!-- 社保士兵医生大减少模板-->
<select id="getSocialSoldierYsdReduceVoList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYsdReduceVo">
SELECT
s.id as socialId,
a.SOCIAL_HOUSEHOLD_NAME socialHouseholdName,
'居民身份证(户口簿)' idCardType,
a.EMP_IDCARD empIdCard,
a.EMP_NAME empName,
reduceReason.label reduceReason,
DATE_FORMAT(a.LEAVE_DATE,'%Y%m%d') reduceDate,
'' huiRemark,
'' huiRemark1,
'' huiRemark2
FROM t_dispatch_info a
left join t_social_info s on a.SOCIAL_ID = s.id
left join t_dispatch_social_fund_info h on a.id = h.REDUCE_SOCIAL_FUND_ID
left join view_sys_dict_item reduceReason on reduceReason.value=a.REDUCE_REASON and reduceReason.type='social_reduce_reason'
<include refid="where_getSocialSoldier_base_handler"/>
and a.type = '1'
</select>
<!--tDispatchInfo 社保花名册数据查询-->
<select id="getSocialRecordRosterList" resultMap="socialHandleExportMap">
SELECT
......
......@@ -144,6 +144,9 @@
<result property="ysdRemark" column="YSD_REMARK"/>
<result property="ygsRemarkOld" column="YGS_REMARK_OLD"/>
<result property="ysdRemarkOld" column="YSD_REMARK_OLD"/>
<result property="ygsAddId" column="YGS_ADD_ID"/>
<result property="ysdAddId" column="YSD_ADD_ID"/>
<result property="dispatchId" column="DISPATCH_ID"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
......@@ -254,7 +257,9 @@
a.YGS_REMARK,
a.YSD_REMARK,
a.YGS_REMARK_OLD,
a.YSD_REMARK_OLD
a.YSD_REMARK_OLD,
a.YGS_ADD_ID,
a.YSD_ADD_ID
</sql>
<sql id="tSocialInfo_where">
......@@ -576,4 +581,59 @@
<include refid="tSocialInfo_where"/>
</where>
</select>
<!-- 获取所有需要自动办理的养工失 -->
<select id="getSocialSoldierYgsAll" resultMap="tSocialInfoMap">
SELECT
a.ID,
a.EMP_IDCARD,
a.YGS_ADD_ID,
a.HANDLE_STATUS,
a.YGS_HANDLE_STATUS,
d.id as DISPATCH_ID
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_ADD_ID is not null and DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(now(),'%Y%m')
and a.YGS_HANDLE_STATUS in ('1','2','3')
and (sd.id is null or NOW() <![CDATA[ <= ]]> sd.SOCIAL_END_DATE)
group by a.id
</select>
<!-- 获取所有需要自动办理的医生大 -->
<select id="getSocialSoldierYsdAll" resultMap="tSocialInfoMap">
SELECT
a.ID,
a.EMP_IDCARD,
a.YSD_ADD_ID,
a.HANDLE_STATUS,
a.YSD_HANDLE_STATUS,
d.id as DISPATCH_ID
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_ADD_ID is not null and DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(now(),'%Y%m')
and a.YSD_HANDLE_STATUS in ('1','2','3')
and (sd.id is null or NOW() <![CDATA[ <= ]]> sd.MEDICAL_END_DATE)
group by a.id
</select>
<!-- 根据任务ID,获取需要自动办理的社保 -->
<select id="getSocialSoldierByAddId" resultMap="tSocialInfoMap">
SELECT
a.ID,
a.EMP_IDCARD,
a.YGS_ADD_ID,
a.YSD_ADD_ID,
a.HANDLE_STATUS,
a.YGS_HANDLE_STATUS,
a.YSD_HANDLE_STATUS,
d.id as DISPATCH_ID
FROM t_social_info a
left join t_dispatch_info d on d.SOCIAL_ID = a.id
where a.YGS_ADD_ID = #{addId} or a.YSD_ADD_ID = #{addId}
</select>
</mapper>
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