Commit 9fd50f62 authored by hongguangwu's avatar hongguangwu

MVP1.6.5-社保士兵审核结果查询推送以及拉取以及处理

parent cd3ff24d
...@@ -194,5 +194,28 @@ public class SocialTask { ...@@ -194,5 +194,28 @@ public class SocialTask {
log.info("------------2定时任务推送社保士兵-定时任务结束------------"); log.info("------------2定时任务推送社保士兵-定时任务结束------------");
} }
/**
* @Description: 3每日定时任务推送社保士兵审核结果查询
* @Author: hgw
* @Date: 2022/7/27 19:39
* @return: void
**/
public void doInnerPushSoldierByAudit() {
log.info("------------3每日定时任务推送社保士兵审核结果查询-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tsocialsoldier/inner/doInnerPushSoldierByAudit","", Object.class, SecurityConstants.FROM_IN);
log.info("------------3每日定时任务推送社保士兵审核结果查询-定时任务结束------------");
}
/**
* @Description: 4每日定时任务获取社保士兵审核结果查询
* @Author: hgw
* @Date: 2022/7/27 19:39
* @return: void
**/
public void doInnerGetSixJobByAudit() {
log.info("------------4每日定时任务获取社保士兵审核结果查询-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tsocialsoldier/inner/doInnerGetSixJobByAudit","", Object.class, SecurityConstants.FROM_IN);
log.info("------------4每日定时任务获取社保士兵审核结果查询-定时任务结束------------");
}
} }
/*
* 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 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 org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
/**
* 社保自动化审核提交后的审核结果查询记录表
*
* @author hgw
* @date 2024-05-23 17:40:37
*/
@Data
@TableName("t_social_auto_audit_task")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "社保自动化审核提交后的审核结果查询记录表")
public class TSocialAutoAuditTask extends BaseEntity {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("id")
@Schema(description = "id")
private String id;
/**
* 审核查询的任务ID
*/
@ExcelAttribute(name = "审核查询的任务ID", isNotEmpty = true, errorInfo = "审核查询的任务ID不能为空", maxLength = 32)
@NotBlank(message = "审核查询的任务ID不能为空")
@Length(max = 32, message = "审核查询的任务ID不能超过32个字符")
@ExcelProperty("审核查询的任务ID")
@Schema(description = "审核查询的任务ID")
private String auditId;
/**
* 1养工失;2医生大
*/
@ExcelAttribute(name = "1养工失;2医生大", isNotEmpty = true, errorInfo = "1养工失;2医生大不能为空", maxLength = 1)
@NotBlank(message = "1养工失;2医生大不能为空")
@Length(max = 1, message = "1养工失;2医生大不能超过1个字符")
@ExcelProperty("1养工失;2医生大")
@Schema(description = "1养工失;2医生大")
private String type;
}
...@@ -975,7 +975,7 @@ public class TSocialInfo extends BaseEntity { ...@@ -975,7 +975,7 @@ public class TSocialInfo extends BaseEntity {
@NotBlank(message = "养工失状态不能为空" ) @NotBlank(message = "养工失状态不能为空" )
@Length(max = 32, message = "养工失状态 不能超过32个字符" ) @Length(max = 32, message = "养工失状态 不能超过32个字符" )
@ExcelAttribute(name = "养工失状态", isNotEmpty = true, errorInfo = "办理状态不能为空", maxLength = 32) @ExcelAttribute(name = "养工失状态", isNotEmpty = true, errorInfo = "办理状态不能为空", maxLength = 32)
@Schema(description = "养工失状态:(0空、1待办理、2自动办理中、3继续办理、4终止办理、5人工处理、6成功)" ) @Schema(description = "养工失状态:(0空、1待办理、2自动办理中、3继续办理、4终止办理、5人工处理、6成功。7提交成功)" )
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("养工失状态" ) @ExcelProperty("养工失状态" )
private String ygsHandleStatus; private String ygsHandleStatus;
...@@ -985,7 +985,7 @@ public class TSocialInfo extends BaseEntity { ...@@ -985,7 +985,7 @@ public class TSocialInfo extends BaseEntity {
@NotBlank(message = "医生大状态不能为空" ) @NotBlank(message = "医生大状态不能为空" )
@Length(max = 32, message = "医生大状态 不能超过32个字符" ) @Length(max = 32, message = "医生大状态 不能超过32个字符" )
@ExcelAttribute(name = "医生大状态", isNotEmpty = true, errorInfo = "办理状态不能为空", maxLength = 32) @ExcelAttribute(name = "医生大状态", isNotEmpty = true, errorInfo = "办理状态不能为空", maxLength = 32)
@Schema(description = "医生大状态:(0空、1待办理、2自动办理中、3继续办理、4终止办理、5人工处理、6成功)" ) @Schema(description = "医生大状态:(0空、1待办理、2自动办理中、3继续办理、4终止办理、5人工处理、6成功。7提交成功)" )
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医生大状态" ) @ExcelProperty("医生大状态" )
private String ysdHandleStatus; private String ysdHandleStatus;
...@@ -1017,7 +1017,7 @@ public class TSocialInfo extends BaseEntity { ...@@ -1017,7 +1017,7 @@ public class TSocialInfo extends BaseEntity {
@ExcelProperty("养工失反馈-原反馈" ) @ExcelProperty("养工失反馈-原反馈" )
private String ygsRemarkOld; private String ygsRemarkOld;
/** /**
* 医生大反馈-原反馈 * 医生大反馈-原反馈——额外作用:新增(初次在缴纳地参保)、续保
*/ */
@Length(max = 500, message = "医生大反馈-原反馈 不能超过500个字符" ) @Length(max = 500, message = "医生大反馈-原反馈 不能超过500个字符" )
@ExcelAttribute(name = "医生大反馈-原反馈", maxLength = 500) @ExcelAttribute(name = "医生大反馈-原反馈", maxLength = 500)
......
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-24 10:47:25
**/
@Data
public class SocialSoldierYgsAuditVo implements Serializable {
// 社保id,用于回写
@ExcelIgnore
private String socialId;
// #企业名称 业务类型 开始日期 结束日期 回传信息 回传信息1 回传信息2
@ExcelProperty("企业名称")
private String socialHouseholdName;
@ExcelProperty("业务类型")
private String type;
@ExcelProperty("开始日期")
private String startDate;
@ExcelProperty("结束日期")
private String endDate;
@ExcelProperty("回传信息")
private String backInfo;
@ExcelProperty("回传信息1")
private String backInfoOne;
@ExcelProperty("回传信息2")
private String backInfoTwo;
}
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-24 10:47:25
**/
@Data
public class SocialSoldierYsdAuditVo implements Serializable {
// 社保id,用于回写
@ExcelIgnore
private String socialId;
// #企业名称 业务类型 申办日期起 申办日期止 回传信息 回传信息1 回传信息2
@ExcelProperty("企业名称")
private String socialHouseholdName;
@ExcelProperty("业务类型")
private String type;
@ExcelProperty("申办日期起")
private String startDate;
@ExcelProperty("申办日期止")
private String endDate;
@ExcelProperty("回传信息")
private String backInfo;
@ExcelProperty("回传信息1")
private String backInfoOne;
@ExcelProperty("回传信息2")
private String backInfoTwo;
}
/*
* 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.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import lombok.Data;
import java.io.Serializable;
/**
* 社保士兵审核结果反馈文件解析
*
* @author hgw
* @date 2024-5-27 11:14:07
*/
@Data
public class TSocialSoldierReturnAuditErrorVo extends RowIndex implements Serializable {
@ExcelProperty("错误信息")
private String errorInfo;
@ExcelProperty("企业名称")
private String companyName;
@ExcelProperty("证件号码")
private String idCard;
@ExcelProperty("姓名")
private String empName;
@ExcelProperty("审核状态")
private String auditStatus;
// 医保有值,社保没值
@ExcelProperty("审核意见")
private String ysdRemark;
// 社保独有的列
@ExcelProperty("操作")
private String ygsOperation;
}
...@@ -115,6 +115,8 @@ public class SocialConfig { ...@@ -115,6 +115,8 @@ public class SocialConfig {
sheMap.put("社保增员", sheBaoArrObj.getString("value")); sheMap.put("社保增员", sheBaoArrObj.getString("value"));
} else if ("社保减员".equals(sheBaoArrObj.get("label"))) { } else if ("社保减员".equals(sheBaoArrObj.get("label"))) {
sheMap.put("社保减员", sheBaoArrObj.getString("value")); sheMap.put("社保减员", sheBaoArrObj.getString("value"));
} else if ("审核数据查询".equals(sheBaoArrObj.get("label"))) {
sheMap.put("审核数据查询", sheBaoArrObj.getString("value"));
} }
} }
} else if ("医保".equals(childrenArrObj.get("label"))) { } else if ("医保".equals(childrenArrObj.get("label"))) {
...@@ -125,6 +127,8 @@ public class SocialConfig { ...@@ -125,6 +127,8 @@ public class SocialConfig {
sheMap.put("医保增员", sheBaoArrObj.getString("value")); sheMap.put("医保增员", sheBaoArrObj.getString("value"));
} else if ("医保减员".equals(sheBaoArrObj.get("label"))) { } else if ("医保减员".equals(sheBaoArrObj.get("label"))) {
sheMap.put("医保减员", sheBaoArrObj.getString("value")); sheMap.put("医保减员", sheBaoArrObj.getString("value"));
} else if ("审核数据信息查询".equals(sheBaoArrObj.get("label"))) {
sheMap.put("审核数据信息查询", sheBaoArrObj.getString("value"));
} }
} }
} }
...@@ -268,12 +272,13 @@ public class SocialConfig { ...@@ -268,12 +272,13 @@ public class SocialConfig {
} }
/** /**
* @param: fileKey : resultFile 查看文件; resultAnnex 查看附件
* @Description: 5:任务查询接口 * @Description: 5:任务查询接口
* @Author: hgw * @Author: hgw
* @Date: 2024-5-8 15:07:45 * @Date: 2024-5-8 15:07:45
* @return: java.lang.String * @return: java.lang.String
**/ **/
public R<String> getFiveJob(RestTemplate restTemplate, String addId) { public R<String> getFiveJob(RestTemplate restTemplate, String addId, String fileKey) {
if (Common.isEmpty(addId)) { if (Common.isEmpty(addId)) {
return null; return null;
} }
...@@ -300,7 +305,7 @@ public class SocialConfig { ...@@ -300,7 +305,7 @@ public class SocialConfig {
if (!"完成".equals(statusStr)) { if (!"完成".equals(statusStr)) {
return R.failed(statusStr); return R.failed(statusStr);
} }
resultFile = dataObject.getString("resultFile"); resultFile = dataObject.getString(fileKey);
if (Common.isEmpty(resultFile)) { if (Common.isEmpty(resultFile)) {
return R.failed(resultFile); return R.failed(resultFile);
} }
......
...@@ -79,7 +79,7 @@ public class TSocialSoldierController { ...@@ -79,7 +79,7 @@ public class TSocialSoldierController {
**/ **/
@Operation(description = "1定时任务获取社保士兵状态") @Operation(description = "1定时任务获取社保士兵状态")
@PostMapping("/inner/doInnerGetFiveJob") @PostMapping("/inner/doInnerGetFiveJob")
@SysLog("每日1定时任务获取社保士兵状态") @SysLog("1每日定时任务获取社保士兵状态")
@Inner @Inner
public R<String> doInnerGetFiveJob() { public R<String> doInnerGetFiveJob() {
return tSocialSoldierService.getFiveJob(null); return tSocialSoldierService.getFiveJob(null);
...@@ -93,9 +93,38 @@ public class TSocialSoldierController { ...@@ -93,9 +93,38 @@ public class TSocialSoldierController {
**/ **/
@Operation(description = "2定时任务推送社保士兵") @Operation(description = "2定时任务推送社保士兵")
@PostMapping("/inner/doInnerPushSoldier") @PostMapping("/inner/doInnerPushSoldier")
@SysLog("每日2定时任务推送社保士兵") @SysLog("2每日定时任务推送社保士兵")
@Inner @Inner
public R<String> doInnerPushSoldier() { public R<String> doInnerPushSoldier() {
return tSocialSoldierPushService.pushSoldier(null); return tSocialSoldierPushService.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 tSocialSoldierPushService.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("3每日定时任务获取社保士兵审核结果查询")
@Inner
public R<String> doInnerGetSixJobByAudit() {
return tSocialSoldierService.getSixJobByAudit();
}
} }
/*
* 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.TSocialAutoAuditTask;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 社保自动化审核提交后的审核结果查询记录表
*
* @author hgw
* @date 2024-05-23 17:40:37
*/
@Mapper
public interface TSocialAutoAuditTaskMapper extends BaseMapper<TSocialAutoAuditTask> {
/**
* 社保自动化审核提交后的审核结果查询记录表简单分页查询
*
* @param tSocialAutoAuditTask 社保自动化审核提交后的审核结果查询记录表
* @return
*/
List<TSocialAutoAuditTask> getTSocialAutoAuditTaskList(@Param("tSocialAutoAuditTask") TSocialAutoAuditTask tSocialAutoAuditTask);
}
...@@ -50,6 +50,15 @@ public interface TSocialInfoMapper extends BaseMapper<TSocialInfo> { ...@@ -50,6 +50,15 @@ public interface TSocialInfoMapper extends BaseMapper<TSocialInfo> {
**/ **/
List<TSocialInfo> getSocialSoldierYgsAll(); List<TSocialInfo> getSocialSoldierYgsAll();
List<TSocialInfo> getSocialSoldierYsdAll(); List<TSocialInfo> getSocialSoldierYsdAll();
/**
* @param
* @Description: 获取所有需要社保局审核的社保
* @Author: hgw
* @Date: 2024-5-24 17:07:00
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo>
**/
List<TSocialInfo> getSocialSoldierYgsByAudit();
List<TSocialInfo> getSocialSoldierYsdByAudit();
/** /**
* @param addId 任务id * @param addId 任务id
......
...@@ -59,4 +59,25 @@ public interface TSocialSoldierMapper extends BaseMapper<TSocialInfo> { ...@@ -59,4 +59,25 @@ public interface TSocialSoldierMapper extends BaseMapper<TSocialInfo> {
* @Date 2024-5-10 21:16:41 * @Date 2024-5-10 21:16:41
**/ **/
List<SocialSoldierYgsAddVo> getSocialSoldierYsdReduceVoList(@Param("idsStr") List<String> idsStr); List<SocialSoldierYgsAddVo> 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-5-24 16:39:43
**/
List<SocialSoldierYsdAuditVo> getSocialSoldierYsdAddAuditVoList();
} }
/*
* 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.TSocialAutoAuditTask;
import java.util.List;
/**
* 社保自动化审核提交后的审核结果查询记录表
*
* @author hgw
* @date 2024-05-23 17:40:37
*/
public interface TSocialAutoAuditTaskService extends IService<TSocialAutoAuditTask> {
/**
* 社保自动化审核提交后的审核结果查询记录表简单分页查询
*
* @param tSocialAutoAuditTask 社保自动化审核提交后的审核结果查询记录表
* @return
*/
List<TSocialAutoAuditTask> getTSocialAutoAuditTaskList(TSocialAutoAuditTask tSocialAutoAuditTask);
}
...@@ -66,6 +66,14 @@ public interface TSocialInfoService extends IService<TSocialInfo> { ...@@ -66,6 +66,14 @@ public interface TSocialInfoService extends IService<TSocialInfo> {
**/ **/
List<TSocialInfo> getSocialSoldierYgsAll(); List<TSocialInfo> getSocialSoldierYgsAll();
List<TSocialInfo> getSocialSoldierYsdAll(); List<TSocialInfo> getSocialSoldierYsdAll();
/**
* @Description: 获取所有需要审核结果的社保
* @Author: hgw
* @Date: 2024-5-24 17:05:46
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo>
**/
List<TSocialInfo> getSocialSoldierYgsByAudit();
List<TSocialInfo> getSocialSoldierYsdByAudit();
/** /**
* @param addId 任务id * @param addId 任务id
......
...@@ -49,4 +49,13 @@ public interface TSocialSoldierPushService extends IService<TSocialInfo> { ...@@ -49,4 +49,13 @@ public interface TSocialSoldierPushService extends IService<TSocialInfo> {
**/ **/
R<String> pushSoldier(List<String> dispatchIdList); R<String> pushSoldier(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();
} }
...@@ -39,4 +39,12 @@ public interface TSocialSoldierService extends IService<TSocialInfo> { ...@@ -39,4 +39,12 @@ public interface TSocialSoldierService extends IService<TSocialInfo> {
**/ **/
R<String> getFiveJob(String addId); 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();
} }
/*
* 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.TSocialAutoAuditTask;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialAutoAuditTaskMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialAutoAuditTaskService;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 社保自动化审核提交后的审核结果查询记录表
*
* @author hgw
* @date 2024-05-23 17:40:37
*/
@Log4j2
@Service
public class TSocialAutoAuditTaskServiceImpl extends ServiceImpl<TSocialAutoAuditTaskMapper, TSocialAutoAuditTask> implements TSocialAutoAuditTaskService {
/**
* 社保自动化审核提交后的审核结果查询记录表简单分页查询
*
* @param tSocialAutoAuditTask 社保自动化审核提交后的审核结果查询记录表
* @return
*/
@Override
public List<TSocialAutoAuditTask> getTSocialAutoAuditTaskList(TSocialAutoAuditTask tSocialAutoAuditTask) {
return baseMapper.getTSocialAutoAuditTaskList(tSocialAutoAuditTask);
}
}
...@@ -452,6 +452,28 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci ...@@ -452,6 +452,28 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci
public List<TSocialInfo> getSocialSoldierYsdAll() { public List<TSocialInfo> getSocialSoldierYsdAll() {
return baseMapper.getSocialSoldierYsdAll(); return baseMapper.getSocialSoldierYsdAll();
} }
/**
* @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> getSocialSoldierYgsByAudit() {
return baseMapper.getSocialSoldierYgsByAudit();
}
/**
* @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> getSocialSoldierYsdByAudit() {
return baseMapper.getSocialSoldierYsdByAudit();
}
/** /**
* @param * @param
......
...@@ -25,12 +25,16 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; ...@@ -25,12 +25,16 @@ 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;
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.social.config.SocialConfig; import com.yifu.cloud.plus.v1.yifu.social.config.SocialConfig;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialAutoAuditTask;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo; import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialSoldierMapper; import com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialSoldierMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialAutoAuditTaskService;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialInfoService; import com.yifu.cloud.plus.v1.yifu.social.service.TSocialInfoService;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialSoldierPushService; import com.yifu.cloud.plus.v1.yifu.social.service.TSocialSoldierPushService;
import com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierSetVo; import com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierSetVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYgsAddVo; 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.SocialSoldierYsdAuditVo;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.apache.commons.compress.utils.IOUtils; import org.apache.commons.compress.utils.IOUtils;
...@@ -62,6 +66,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap ...@@ -62,6 +66,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
private RestTemplate restTemplate = new RestTemplate(); private RestTemplate restTemplate = new RestTemplate();
private final SocialConfig socialConfig; private final SocialConfig socialConfig;
private final TSocialInfoService tSocialInfoService; private final TSocialInfoService tSocialInfoService;
private final TSocialAutoAuditTaskService tSocialAutoAuditTaskService;
/** /**
* @param socialList * @param socialList
...@@ -99,6 +104,12 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap ...@@ -99,6 +104,12 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
return R.ok("推送成功!"); return R.ok("推送成功!");
} }
/**
* @Description: 组装社保与医保的文件流
* @Author: hgw
* @Date: 2024/5/23 17:59
* @return: org.springframework.web.multipart.MultipartFile
**/
public MultipartFile getFile(List<SocialSoldierYgsAddVo> list, int type) { public MultipartFile getFile(List<SocialSoldierYgsAddVo> list, int type) {
if (list != null) { if (list != null) {
String fileName = "soldierFile" + DateUtil.getThisTime() + new Date().getTime() + CommonConstants.XLSX; String fileName = "soldierFile" + DateUtil.getThisTime() + new Date().getTime() + CommonConstants.XLSX;
...@@ -223,4 +234,115 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap ...@@ -223,4 +234,115 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
return R.ok("推送成功!!"); return R.ok("推送成功!!");
} }
/**
* @Description: 推送社保士兵审核结果查询文件
* @Author: hgw
* @Date: 2024-5-23 18:02:27
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Override
public R<String> pushSoldierByAudit() {
// 养工失待审核列表
List<SocialSoldierYgsAuditVo> ygsAddlist = baseMapper.getSocialSoldierYgsAuditVoList();
log.info("养工失待审核列表="+ygsAddlist);
String sheetName = "审核数据查询";
if (ygsAddlist != null && !ygsAddlist.isEmpty()) {
MultipartFile file = this.getFileByAudit(ygsAddlist, null, sheetName);
if (Common.isNotNull(file)) {
List<TSocialInfo> socialIdList = new ArrayList<>();
TSocialInfo socialInfo;
for (SocialSoldierYgsAuditVo vo : ygsAddlist) {
socialInfo = new TSocialInfo();
socialInfo.setId(vo.getSocialId());
socialIdList.add(socialInfo);
}
this.getOneAppGetModuleDetailByAudit(socialIdList, file, sheetName);
}
}
// 医生大【续保】待审核列表
List<SocialSoldierYsdAuditVo> ysdXuBaolist = baseMapper.getSocialSoldierYsdAuditVoList();
log.info("医生大【续保】待审核列表="+ysdXuBaolist);
sheetName = "审核数据信息查询";
if (ysdXuBaolist != null && !ysdXuBaolist.isEmpty()) {
MultipartFile file = this.getFileByAudit(null, ysdXuBaolist, sheetName);
if (Common.isNotNull(file)) {
List<TSocialInfo> socialIdList = new ArrayList<>();
TSocialInfo socialInfo;
for (SocialSoldierYsdAuditVo vo : ysdXuBaolist) {
socialInfo = new TSocialInfo();
socialInfo.setId(vo.getSocialId());
socialIdList.add(socialInfo);
}
this.getOneAppGetModuleDetailByAudit(socialIdList, file, sheetName);
}
}
// 医生大【新增】待审核列表
List<SocialSoldierYsdAuditVo> ysdAddlist = baseMapper.getSocialSoldierYsdAddAuditVoList();
log.info("医生大【新增】待审核列表="+ysdAddlist);
if (ysdAddlist != null && !ysdAddlist.isEmpty()) {
MultipartFile file = this.getFileByAudit(null, ysdAddlist, sheetName);
if (Common.isNotNull(file)) {
List<TSocialInfo> socialIdList = new ArrayList<>();
TSocialInfo socialInfo;
for (SocialSoldierYsdAuditVo vo : ysdAddlist) {
socialInfo = new TSocialInfo();
socialInfo.setId(vo.getSocialId());
socialIdList.add(socialInfo);
}
this.getOneAppGetModuleDetailByAudit(socialIdList, file, sheetName);
}
}
if (ygsAddlist == null || ysdXuBaolist == null|| ysdAddlist == null) {
return R.failed("无数据,推送结束!");
}
return R.ok("推送成功!!");
}
/**
* @Description: 推送审核结果的查询
* @Author: hgw
* @Date: 2024/5/23 18:09
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
public R<String> getOneAppGetModuleDetailByAudit(List<TSocialInfo> socialList, MultipartFile file, String type) {
// 1获取模板id——社保增员、社保减员、医保增员、医保减员
Map<String, String> moduleDetailMap = socialConfig.getOneModuleDetailMap(restTemplate);
if (moduleDetailMap != null && !moduleDetailMap.isEmpty() && moduleDetailMap.get(type) != null) {
// 2获取机器id
String terminalId = socialConfig.getTwoTerminalId(restTemplate, moduleDetailMap.get(type));
if (Common.isNotNull(terminalId)) {
// 3上传文件,获取文件地址
String fileAddUrl = socialConfig.getThreeTerminalId(restTemplate, file);
// 4 推送办理任务,返回任务id:
String addId = socialConfig.getFourAppAdd(restTemplate, fileAddUrl, moduleDetailMap.get(type), terminalId);
for (TSocialInfo socialInfo : socialList) {
if ("审核数据查询".equals(type)) {
socialInfo.setYgsAddId(addId);
} else {
socialInfo.setYsdAddId(addId);
}
}
tSocialInfoService.updateBatchById(socialList);
}
}
return R.ok("推送成功!");
}
/**
* @Description: 组装社保与医保的文件流
* @Author: hgw
* @Date: 2024/5/23 17:59
* @return: org.springframework.web.multipart.MultipartFile
**/
public MultipartFile getFileByAudit(List<SocialSoldierYgsAuditVo> listYgs, List<SocialSoldierYsdAuditVo> listYsd, String sheetName) {
String fileName = "soldierAuditFile" + DateUtil.getThisTime() + new Date().getTime() + CommonConstants.XLSX;
if (listYgs != null) {
EasyExcelFactory.write(fileName, SocialSoldierYgsAuditVo.class).sheet(sheetName).doWrite(listYgs);
} else {
EasyExcelFactory.write(fileName, SocialSoldierYsdAuditVo.class).sheet(sheetName).doWrite(listYsd);
}
File file = new File(fileName);
return getMultipartFile(file);
}
} }
<?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.TSocialAutoAuditTaskMapper">
<resultMap id="tSocialAutoAuditTaskMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.TSocialAutoAuditTask">
<id property="id" column="ID"/>
<result property="auditId" column="AUDIT_ID"/>
<result property="type" column="TYPE"/>
<result property="createBy" column="CREATE_BY"/>
<result property="updateBy" column="UPDATE_BY"/>
<result property="createName" column="CREATE_NAME"/>
<result property="updateTime" column="UPDATE_TIME"/>
<result property="createTime" column="CREATE_TIME"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.AUDIT_ID,
a.TYPE,
a.CREATE_BY,
a.UPDATE_BY,
a.CREATE_NAME,
a.UPDATE_TIME,
a.CREATE_TIME
</sql>
<sql id="tSocialAutoAuditTask_where">
<if test="tSocialAutoAuditTask != null">
<if test="tSocialAutoAuditTask.id != null and tSocialAutoAuditTask.id.trim() != ''">
AND a.ID = #{tSocialAutoAuditTask.id}
</if>
<if test="tSocialAutoAuditTask.auditId != null and tSocialAutoAuditTask.auditId.trim() != ''">
AND a.AUDIT_ID = #{tSocialAutoAuditTask.auditId}
</if>
<if test="tSocialAutoAuditTask.type != null and tSocialAutoAuditTask.type.trim() != ''">
AND a.TYPE = #{tSocialAutoAuditTask.type}
</if>
<if test="tSocialAutoAuditTask.createBy != null and tSocialAutoAuditTask.createBy.trim() != ''">
AND a.CREATE_BY = #{tSocialAutoAuditTask.createBy}
</if>
<if test="tSocialAutoAuditTask.updateBy != null and tSocialAutoAuditTask.updateBy.trim() != ''">
AND a.UPDATE_BY = #{tSocialAutoAuditTask.updateBy}
</if>
<if test="tSocialAutoAuditTask.createName != null and tSocialAutoAuditTask.createName.trim() != ''">
AND a.CREATE_NAME = #{tSocialAutoAuditTask.createName}
</if>
<if test="tSocialAutoAuditTask.updateTime != null">
AND a.UPDATE_TIME = #{tSocialAutoAuditTask.updateTime}
</if>
<if test="tSocialAutoAuditTask.createTime != null">
AND a.CREATE_TIME = #{tSocialAutoAuditTask.createTime}
</if>
</if>
</sql>
<!--list-->
<select id="getTSocialAutoAuditTaskList" resultMap="tSocialAutoAuditTaskMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_social_auto_audit_task a
<where>
1=1
<include refid="tSocialAutoAuditTask_where"/>
</where>
</select>
</mapper>
...@@ -627,6 +627,42 @@ if((sd.id is not null and NOW() <![CDATA[ <= ]]> sd.SOCIAL_END_DATE) or ( sd.id ...@@ -627,6 +627,42 @@ if((sd.id is not null and NOW() <![CDATA[ <= ]]> sd.SOCIAL_END_DATE) or ( sd.id
group by a.id group by a.id
</select> </select>
<!-- 获取所有需要社保局审核的养工失 -->
<select id="getSocialSoldierYgsByAudit" resultMap="tSocialInfoMap">
SELECT
a.ID,
a.EMP_IDCARD,
a.YGS_ADD_ID,
a.HANDLE_STATUS,
a.YGS_HANDLE_STATUS,
d.id as DISPATCH_ID,
d.type as DISPATCH_TYPE
FROM t_social_info a
left join t_dispatch_info d on d.SOCIAL_ID = a.id
where a.YGS_ADD_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 = '7'
group by a.id
</select>
<!-- 获取所有需要社保局审核的医生大 -->
<select id="getSocialSoldierYsdByAudit" resultMap="tSocialInfoMap">
SELECT
a.ID,
a.EMP_IDCARD,
a.YSD_ADD_ID,
a.HANDLE_STATUS,
a.YSD_HANDLE_STATUS,
d.id as DISPATCH_ID,
d.type as DISPATCH_TYPE
FROM t_social_info a
left join t_dispatch_info d on d.SOCIAL_ID = a.id
where a.YSD_ADD_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 = '7'
group by a.id
</select>
<!-- 根据任务ID,获取需要自动办理的社保 --> <!-- 根据任务ID,获取需要自动办理的社保 -->
<select id="getSocialSoldierByAddId" resultMap="tSocialInfoMap"> <select id="getSocialSoldierByAddId" resultMap="tSocialInfoMap">
SELECT SELECT
......
...@@ -170,4 +170,55 @@ ...@@ -170,4 +170,55 @@
group by s.id group by s.id
</select> </select>
<!-- 社保士兵养工失神恶化结果查询的模板-->
<select id="getSocialSoldierYgsAuditVoList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYgsAuditVo">
SELECT
s.id as socialId,
a.SOCIAL_HOUSEHOLD_NAME socialHouseholdName,
if(a.TYPE='0','增员','减员') type,
DATE_FORMAT(a.AUDIT_TIME,'%Y%m%d') startDate,
DATE_FORMAT(now(),'%Y%m%d') endDate,
'' backInfo,'' backInfoOne,'' backInfoTwo
FROM t_dispatch_info a
left join t_social_info s on a.SOCIAL_ID = s.id
where a.DELETE_FLAG = '0' AND a.social_id is not null AND a.STATUS = "2" AND s.YGS_HANDLE_STATUS = '7'
and a.AUTO_FLAG = '0' and DATE_FORMAT(a.AUDIT_TIME,'%Y%m') = DATE_FORMAT(now(),'%Y%m')
group by s.id
</select>
<!-- 社保士兵医生大审核结果【续保】查询的模板-->
<select id="getSocialSoldierYsdAuditVoList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYsdAuditVo">
SELECT
s.id as socialId,
a.SOCIAL_HOUSEHOLD_NAME socialHouseholdName,
if(a.TYPE='0','参保人员增员申报','参保人员减员申报') type,
DATE_FORMAT(a.AUDIT_TIME,'%Y%m%d') startDate,
DATE_FORMAT(now(),'%Y%m%d') endDate,
'' backInfo,'' backInfoOne,'' backInfoTwo
FROM t_dispatch_info a
left join t_social_info s on a.SOCIAL_ID = s.id
where a.DELETE_FLAG = '0' AND a.social_id is not null AND a.STATUS = "2" AND s.YSD_HANDLE_STATUS = '7'
and a.AUTO_FLAG = '0' and DATE_FORMAT(a.AUDIT_TIME,'%Y%m') = DATE_FORMAT(now(),'%Y%m')
and s.YSD_REMARK_OLD != "新增"
group by s.id
</select>
<!-- 社保士兵医生大审核结果【新增】查询的模板-->
<select id="getSocialSoldierYsdAddAuditVoList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYsdAuditVo">
SELECT
s.id as socialId,
a.SOCIAL_HOUSEHOLD_NAME socialHouseholdName,
if(a.TYPE='0','职工新参保登记','参保人员减员申报') type,
DATE_FORMAT(a.AUDIT_TIME,'%Y%m%d') startDate,
DATE_FORMAT(now(),'%Y%m%d') endDate,
'' backInfo,'' backInfoOne,'' backInfoTwo
FROM t_dispatch_info a
left join t_social_info s on a.SOCIAL_ID = s.id
where a.DELETE_FLAG = '0' AND a.social_id is not null AND a.STATUS = "2" AND s.YSD_HANDLE_STATUS = '7'
and a.AUTO_FLAG = '0' and DATE_FORMAT(a.AUDIT_TIME,'%Y%m') = DATE_FORMAT(now(),'%Y%m')
and s.YSD_REMARK_OLD = "新增"
group by s.id
</select>
</mapper> </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