Commit 1427f488 authored by hongguangwu's avatar hongguangwu

MVP1.6.6-社保士兵实缴——加个拦截

parent 34a29526
......@@ -17,20 +17,16 @@
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;
/**
* 预入职-主表
* 预入职批量完善信息使用
*
* @author hgw
* @date 2024-06-17 11:31:08
......@@ -38,215 +34,28 @@ import java.util.Date;
@Data
public class TPreEmpMainVo extends RowIndex implements Serializable {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@NotBlank(message = "主键 不能为空")
@Length(max = 32, message = "主键 不能超过32 个字符")
@ExcelAttribute(name = "主键", isNotEmpty = true, errorInfo = "主键 不能为空", maxLength = 32)
@Schema(description = "主键")
@ExcelProperty("主键")
private String id;
/**
* 审核状态(0待完善;1待审核;2审核通过;3审核不通过)
*/
@NotBlank(message = "审核状态(0待完善;1待审核;2审核通过;3审核不通过) 不能为空")
@Length(max = 1, message = "审核状态(0待完善;1待审核;2审核通过;3审核不通过) 不能超过1 个字符")
@ExcelAttribute(name = "审核状态(0待完善;1待审核;2审核通过;3审核不通过)", isNotEmpty = true, errorInfo = "审核状态(0待完善;1待审核;2审核通过;3审核不通过) 不能为空", maxLength = 1)
@Schema(description = "审核状态(0待完善;1待审核;2审核通过;3审核不通过)")
@ExcelProperty("审核状态(0待完善;1待审核;2审核通过;3审核不通过)")
private String status;
/**
* 员工ID
*/
@Length(max = 32, message = "员工ID 不能超过32 个字符")
@ExcelAttribute(name = "员工ID", maxLength = 32)
@Schema(description = "员工ID")
@ExcelProperty("员工ID")
private String empId;
/**
* 员工姓名
*/
@Length(max = 32, message = "员工姓名 不能超过32 个字符")
@ExcelAttribute(name = "员工姓名", maxLength = 32)
@Schema(description = "员工姓名")
@ExcelProperty("员工姓名")
private String empName;
/**
* 身份证号
*/
@Length(max = 20, message = "身份证号 不能超过20 个字符")
@ExcelAttribute(name = "身份证号", maxLength = 20)
@Schema(description = "身份证号")
@ExcelProperty("身份证号")
private String empIdcard;
/**
* 手机号码
*/
@Length(max = 32, message = "手机号码 不能超过32 个字符")
@ExcelAttribute(name = "手机号码", maxLength = 32)
@Schema(description = "手机号码")
@ExcelProperty("手机号码")
private String empPhone;
/**
* 微信名
*/
@Length(max = 32, message = "微信名 不能超过32 个字符")
@ExcelAttribute(name = "微信名", maxLength = 32)
@Schema(description = "微信名")
@ExcelProperty("微信名")
private String empWx;
/**
* 客户id
*/
@Length(max = 32, message = "客户id 不能超过32 个字符")
@ExcelAttribute(name = "客户id", maxLength = 32)
@Schema(description = "客户id")
@ExcelProperty("客户id")
private String unitId;
/**
* 客户名称
*/
@Length(max = 50, message = "客户名称 不能超过50 个字符")
@ExcelAttribute(name = "客户名称", maxLength = 50)
@Schema(description = "客户名称")
@ExcelProperty("客户名称")
private String unitName;
/**
* 客户编码
*/
@Length(max = 32, message = "客户编码 不能超过32 个字符")
@ExcelAttribute(name = "客户编码", maxLength = 32)
@Schema(description = "客户编码")
@ExcelProperty("客户编码")
private String unitNo;
/**
* 项目id
*/
@Length(max = 32, message = "项目id 不能超过32 个字符")
@ExcelAttribute(name = "项目id", maxLength = 32)
@Schema(description = "项目id")
@ExcelProperty("项目id")
private String deptId;
/**
* 项目名称
*/
@Length(max = 50, message = "项目名称 不能超过50 个字符")
@ExcelAttribute(name = "项目名称", maxLength = 50)
@Schema(description = "项目名称")
@ExcelProperty("项目名称")
private String deptName;
/**
* 项目编码
*/
@NotBlank(message = "项目编码 不能为空")
@Length(max = 30, message = "项目编码 不能超过30 个字符")
@ExcelAttribute(name = "项目编码", isNotEmpty = true, errorInfo = "项目编码 不能为空", maxLength = 30)
@Schema(description = "项目编码")
@Length(max = 32, message = "项目编码 不能超过32 个字符")
@ExcelAttribute(name = "项目编码", maxLength = 32)
@ExcelProperty("项目编码")
private String deptNo;
/**
* 业务类型一级分类
*/
@Length(max = 32, message = "业务类型一级分类 不能超过32 个字符")
@ExcelAttribute(name = "业务类型一级分类", maxLength = 32)
@Schema(description = "业务类型一级分类")
@ExcelProperty("业务类型一级分类")
private String businessPrimaryType;
/**
* 业务类型二级分类
*/
@Length(max = 32, message = "业务类型二级分类 不能超过32 个字符")
@ExcelAttribute(name = "业务类型二级分类", maxLength = 32)
@Schema(description = "业务类型二级分类")
@ExcelProperty("业务类型二级分类")
private String businessSecondType;
/**
* 业务类型三级分类
*/
@Length(max = 32, message = "业务类型三级分类 不能超过32 个字符")
@ExcelAttribute(name = "业务类型三级分类", maxLength = 32)
@Schema(description = "业务类型三级分类")
@ExcelProperty("业务类型三级分类")
private String businessThirdType;
/**
* 员工类型(字典值,0外包1派遣2代理)
*/
@NotBlank(message = "员工类型(字典值,0外包1派遣2代理) 不能为空")
@Length(max = 2, message = "员工类型(字典值,0外包1派遣2代理) 不能超过2 个字符")
@ExcelAttribute(name = "员工类型(字典值,0外包1派遣2代理)", isNotEmpty = true, errorInfo = "员工类型(字典值,0外包1派遣2代理) 不能为空", maxLength = 2)
@Schema(description = "员工类型(字典值,0外包1派遣2代理)")
@ExcelProperty("员工类型(字典值,0外包1派遣2代理)")
@ExcelAttribute(name = "身份证号")
@ExcelProperty("身份证号")
private String empIdcard;
@ExcelAttribute(name = "员工类型", isDataId = true, dataType = ExcelAttributeConstants.EMP_NATRUE)
@ExcelProperty("员工类型")
private String empNatrue;
/**
* 审核人ID
*/
@Length(max = 32, message = "审核人ID 不能超过32 个字符")
@ExcelAttribute(name = "审核人ID", maxLength = 32)
@Schema(description = "审核人ID")
@ExcelProperty("审核人ID")
private String auditId;
/**
* 审核人姓名
*/
@Length(max = 20, message = "审核人姓名 不能超过20 个字符")
@ExcelAttribute(name = "审核人姓名", maxLength = 20)
@Schema(description = "审核人姓名")
@ExcelProperty("审核人姓名")
private String auditName;
/**
* 审核时间
*/
@ExcelAttribute(name = "审核时间", isDate = true)
@Schema(description = "审核时间")
@ExcelProperty("审核时间")
private Date auditTime;
/**
* 创建者
*/
@Length(max = 64, message = "创建者 不能超过64 个字符")
@ExcelAttribute(name = "创建者", maxLength = 64)
@Schema(description = "创建者")
@ExcelProperty("创建者")
private String createBy;
/**
* 更新人
*/
@Length(max = 64, message = "更新人 不能超过64 个字符")
@ExcelAttribute(name = "更新人", maxLength = 64)
@Schema(description = "更新人")
@ExcelProperty("更新人")
private String updateBy;
/**
* 创建人姓名
*/
@Length(max = 32, message = "创建人姓名 不能超过32 个字符")
@ExcelAttribute(name = "创建人姓名", maxLength = 32)
@Schema(description = "创建人姓名")
@ExcelProperty("创建人姓名")
private String createName;
/**
* 创建时间
*/
@ExcelAttribute(name = "创建时间", isDate = true)
@Schema(description = "创建时间")
@ExcelProperty("创建时间")
private Date createTime;
/**
* 更新时间
*/
@ExcelAttribute(name = "更新时间", isDate = true)
@Schema(description = "更新时间")
@ExcelProperty("更新时间")
private Date updateTime;
/**
* 结算主体ID
*/
@Length(max = 32, message = "结算主体ID 不能超过32 个字符")
@ExcelAttribute(name = "结算主体ID", maxLength = 32)
@Schema(description = "结算主体ID")
@ExcelProperty("结算主体ID")
private String settleDomain;
@ExcelAttribute(name = "档案所在地省", isArea = true)
@ExcelProperty("档案所在地省")
private String fileProvince;
@ExcelAttribute(name = "档案所在地市", isArea = true)
@ExcelProperty("档案所在地市")
private String fileCity;
@ExcelAttribute(name = "档案所在地县", isArea = true)
@ExcelProperty("档案所在地县")
private String fileTown;
}
......@@ -67,6 +67,24 @@ public class FileUploadController {
return fileUploadService.uploadImg(file,filePath,type,domain);
}
/**
* @Author fxj
* @Description
* @Date 13:49 2022/6/17
* @Param
* @return
**/
@Operation(description = "OSS文件上传接口" +
"@ApiImplicitParam(name = \"file\", value = \"Form文件上传\", required = true, dataType = \"__file\", paramType = \"form\"),\n" +
"\t\t\t@ApiImplicitParam(name = \"filePath\", value = \"文件上传路径\", required = false, dataType = \"String\", paramType = \"form\"),\n" +
"\t\t\t@ApiImplicitParam(name = \"type\", value = \"关系类型(0员工附件-学历 1 员工附件-伤残 2.员工附件-职业 3.员工附件-不良记录 4.员工附件-合同;5收入证明)\", required = true, dataType = \"int\", paramType = \"form\"),\n" +
"\t\t\t@ApiImplicitParam(name = \"domain\", value = \"实体id(传入就插入对应关系,用于编辑)\", required = false, paramType = \"form\")\n" +
"\t")
@PostMapping(value = "/uploadFileReturnAtta")
public R<TAttaInfo> uploadFileReturnAtta(@RequestBody MultipartFile file, String filePath, Integer type, String domain) throws IOException {
return fileUploadService.uploadFileReturnAtta(file,filePath,type,domain);
}
/**
* @Author fxj
......
......@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpMain;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.service.TPreEmpMainService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.PreEmpMainDetailVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TPreEmpMainSearchVo;
......@@ -111,6 +112,32 @@ public class TPreEmpMainController {
return tPreEmpMainService.getInfoById(id);
}
/**
* 预入职单个完善信息
* hgw
* 2024-6-21 11:49:35
*/
@Operation(summary = "预入职单个完善信息", description = "预入职单个完善信息")
@SysLog("预入职单个完善信息")
@PostMapping("/doImproveInformation")
public R<String> doImproveInformation(@RequestBody PreEmpMainDetailVo vo) {
return tPreEmpMainService.doImproveInformation(vo);
}
/**
* 预入职批量完善信息
* @author hgw
* @date 2024-6-21 15:25:20
**/
@SneakyThrows
@Operation(description = "预入职批量完善信息hasPermission('archives_tpreempmain-batch-import')")
@SysLog("预入职批量完善信息")
@PostMapping("/importListAdd")
@PreAuthorize("@pms.hasPermission('archives_tpreempmain-batch-import')")
public R<List<ErrorMessage>> importListAdd(@RequestBody MultipartFile file) {
return tPreEmpMainService.importDiy(file.getInputStream());
}
/**
* 草稿预入职
* hgw
......@@ -165,21 +192,6 @@ public class TPreEmpMainController {
return R.ok(tPreEmpMainService.removeById(id));
}
/**
* 预入职-主表 批量导入
*
* @author hgw
* @date 2024-06-17 11:31:08
**/
@SneakyThrows
@Operation(description = "批量新增预入职-主表 hasPermission('archives_tpreempmain-batch-import')")
@SysLog("批量新增预入职-主表")
@PostMapping("/importListAdd")
@PreAuthorize("@pms.hasPermission('archives_tpreempmain-batch-import')")
public R<List<ErrorMessage>> importListAdd(@RequestBody MultipartFile file) {
return tPreEmpMainService.importDiy(file.getInputStream());
}
/**
* 预入职-主表 批量导出
*
......
......@@ -42,4 +42,6 @@ public interface TPreEmpMainMapper extends BaseMapper<TPreEmpMain> {
TPreEmpMain getTPreEmpMainByCardAndDept(@Param("empIdCard") String empIdCard, @Param("deptId") String deptId);
TPreEmpMain getTPreEmpMainByCardAndDeptNo(@Param("empIdCard") String empIdCard, @Param("deptNo") String deptNo);
}
......@@ -17,5 +17,7 @@ public interface FileUploadService {
R<FileVo> uploadImg(MultipartFile file, String filePath, Integer type, String domain) throws IOException;
R<TAttaInfo> uploadFileReturnAtta(MultipartFile file, String filePath, Integer type, String domain) throws IOException;
R<FileVo> createQrCode(String domainId, String url, String name);
}
......@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpMain;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.PreEmpMainDetailVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TPreEmpMainSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
......@@ -61,11 +62,14 @@ public interface TPreEmpMainService extends IService<TPreEmpMain> {
**/
R<PreEmpMainDetailVo> getByCardAndDeptId(String empIdCard, String deptId);
// 单个完善信息
R<String> doImproveInformation(PreEmpMainDetailVo vo);
// 草稿
R<String> saveDraftPreEmpMain(PreEmpMainDetailVo vo);
// 保存
R<String> savePreEmpMain(PreEmpMainDetailVo vo);
// 批量完善信息
R<List<ErrorMessage>> importDiy(InputStream inputStream);
void listExport(HttpServletResponse response, TPreEmpMainSearchVo searchVo);
......
......@@ -32,6 +32,52 @@ public class FileUploadServiceImpl implements FileUploadService {
private final QrCodeUtil codeUtil;
@Override
public R<TAttaInfo> uploadFileReturnAtta(MultipartFile file, String filePath, Integer type, String domain) throws IOException {
if (null == file) {
return R.failed("文件删除异常,请重新上传!");
}
String fileName = file.getOriginalFilename();
if (fileName == null || Common.isEmpty(fileName)) {
return R.failed("文件名不能为空!!");
}
if (fileName.length() > 100) {
return R.failed("文件名不能超过100个字符!");
}
//filePath不传默认存储空间的根目录
//jpg,jpeg,png,bmp
String key = "";
if (Common.isNotNull(filePath)) {
key = filePath + "/" + System.currentTimeMillis() + fileName;
} else {
key = System.currentTimeMillis() + fileName;
}
if (!Common.checkFile(key)) {
return R.failed("非法上传类型!");
}
boolean flag = ossUtil.uploadFileByStream(file.getInputStream(), key, null);
TAttaInfo attaInfo;
URL url;
if (flag) {
log.info("文件:" + fileName + "上传到存储空间" + ossUtil.getBucketName() + "成功!");
attaInfo = initUnitAttaForInsert(fileName, key, file.getSize());
attaInfo.setRelationType(String.valueOf(type));
try {
attaInfo.setDomainId(domain);
attaInfo = tAttaInfoService.add(attaInfo);
} catch (Exception e) {
log.error("OSS文件上传异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("上传异常:" + e.getMessage());
}
url = ossUtil.getObjectUrl(null, attaInfo.getAttaSrc());
attaInfo.setAttaUrl(String.valueOf(url));
return R.ok(attaInfo);
} else {
return R.failed("fail:上传异常");
}
}
@Override
public R<FileVo> uploadImg(MultipartFile file, String filePath, Integer type, String domain) throws IOException {
if (null == file) {
......
......@@ -49,6 +49,7 @@ import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLEncoder;
import java.time.LocalDateTime;
import java.util.ArrayList;
......@@ -111,6 +112,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
// 项目
private final TSettleDomainService tSettleDomainService;
private final OSSUtil ossUtil;
/**
* 预入职-主表简单分页查询
*
......@@ -257,6 +260,18 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (info != null) {
BeanUtil.copyProperties(info, tPreEmpEducation);
tPreEmpEducation.setOldId(info.getId());
// 附件
List<TAttaInfo> attaInfoList = tAttaInfoService.getTAttaInfoListByDoMainId(info.getId());
if (attaInfoList != null) {
URL url;
for (TAttaInfo atta : attaInfoList) {
url = ossUtil.getObjectUrl(null, atta.getAttaSrc());
atta.setAttaUrl(String.valueOf(url));
}
}
tPreEmpEducation.setAttaList(attaInfoList);
}
}
tPreEmpEducation.setPreMainId(id);
......@@ -324,6 +339,18 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
record.setEmpName(employee.getEmpName());
record.setEmpCode(employee.getEmpCode());
}
// 附件
List<TAttaInfo> attaInfoList = tAttaInfoService.getTAttaInfoListByDoMainId(info.getId());
if (attaInfoList != null) {
URL url;
for (TAttaInfo atta : attaInfoList) {
url = ossUtil.getObjectUrl(null, atta.getAttaSrc());
atta.setAttaUrl(String.valueOf(url));
}
}
record.setAttaList(attaInfoList);
record.setEmpIdcard(empIdCard);
tPreEmpProfessionalQualificationList.add(record);
}
......@@ -361,6 +388,13 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
// 预入职-附件 9身份证 10 户口本;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件)
List<TAttaInfo> attaInfoList = tAttaInfoService.getTAttaInfoListByDoMainId(id);
if (attaInfoList != null) {
URL url;
for (TAttaInfo atta : attaInfoList) {
url = ossUtil.getObjectUrl(null, atta.getAttaSrc());
atta.setAttaUrl(String.valueOf(url));
}
}
vo.setAttaInfoList(attaInfoList);
return R.ok(vo);
......@@ -397,6 +431,17 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
vo.setTPreEmpDisabilityInfo(tPreEmpDisabilityInfo);
// 预入职-员工学历信息表
TPreEmpEducation tPreEmpEducation = tPreEmpEducationService.getTPreEmpEducationList(id);
if (tPreEmpEducation != null) {
List<TAttaInfo> attaInfoList = tAttaInfoService.getTAttaInfoListByDoMainId(tPreEmpEducation.getId());
if (attaInfoList != null) {
URL url;
for (TAttaInfo atta : attaInfoList) {
url = ossUtil.getObjectUrl(null, atta.getAttaSrc());
atta.setAttaUrl(String.valueOf(url));
}
}
tPreEmpEducation.setAttaList(attaInfoList);
}
vo.setTPreEmpEducation(tPreEmpEducation);
// 预入职-员工家庭信息表
List<TPreEmpFamily> tPreEmpFamily = tPreEmpFamilyService.getTPreEmpFamilyList(id);
......@@ -408,14 +453,37 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
TPreEmployeeProject tPreEmployeeProject = tPreEmployeeProjectService.getTPreEmployeeProjectList(id);
vo.setTPreEmployeeProject(tPreEmployeeProject);
// 预入职-员工职业资格信息表
List<TPreEmpProfessionalQualification> tPreEmpProfessionalQualification = tPreEmpProfessionalQualificationService.getTPreEmpProfessionalQualificationList(id);
vo.setTPreEmpProfessionalQualificationList(tPreEmpProfessionalQualification);
List<TPreEmpProfessionalQualification> tPreEmpProfessionalQualificationList = tPreEmpProfessionalQualificationService.getTPreEmpProfessionalQualificationList(id);
if (tPreEmpProfessionalQualificationList != null) {
List<TAttaInfo> attaInfoList;
for (TPreEmpProfessionalQualification info : tPreEmpProfessionalQualificationList) {
attaInfoList = tAttaInfoService.getTAttaInfoListByDoMainId(info.getId());
if (attaInfoList != null) {
URL url;
for (TAttaInfo atta : attaInfoList) {
url = ossUtil.getObjectUrl(null, atta.getAttaSrc());
atta.setAttaUrl(String.valueOf(url));
}
info.setAttaList(attaInfoList);
}
}
}
vo.setTPreEmpProfessionalQualificationList(tPreEmpProfessionalQualificationList);
// 预入职-员工工作履历信息表
List<TPreEmpWorkRecording> tPreEmpWorkRecording = tPreEmpWorkRecordingService.getTPreEmpWorkRecordingList(id);
vo.setTPreEmpWorkRecordingList(tPreEmpWorkRecording);
// 预入职-附件 9身份证 10 户口本;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件)
List<TAttaInfo> attaInfoList = tAttaInfoService.getTAttaInfoListByDoMainId(id);
if (attaInfoList != null) {
URL url;
for (TAttaInfo atta : attaInfoList) {
url = ossUtil.getObjectUrl(null, atta.getAttaSrc());
atta.setAttaUrl(String.valueOf(url));
}
}
vo.setAttaInfoList(attaInfoList);
return R.ok(vo);
} else {
......@@ -423,6 +491,45 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
}
/**
* @Description: 单个完善信息
* @Author: hgw
* @Date: 2024/6/17 17:42
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
@Override
public R<String> doImproveInformation(PreEmpMainDetailVo vo) {
TPreEmpMain preMain = vo.getMain();
TPreEmployeeInfo tPreEmployee = vo.getTPreEmployeeInfo();
TPreEmployeeProject project = vo.getTPreEmployeeProject();
if (preMain == null || tPreEmployee == null || project == null ||
Common.isEmpty(preMain.getId()) || Common.isEmpty(tPreEmployee.getId()) || Common.isEmpty(project.getId())) {
return R.failed("请传主表ID与人员ID与项目ID");
}
TPreEmpMain main = this.getById(preMain.getId());
if (!CommonConstants.ONE_STRING.equals(main.getStatus())) {
return R.failed("状态不为待完善,不可编辑!");
}
String errorInfo = null;
if (Common.isEmpty(tPreEmployee.getEmpNatrue())) {
errorInfo = "【员工类型】";
}
if (Common.isEmpty(tPreEmployee.getFileProvince())) {
errorInfo += "【档案地省】";
}
if (Common.isNotNull(errorInfo)) {
return R.failed(errorInfo + "不可为空!");
}
tPreEmployeeInfoService.updateById(tPreEmployee);
project.setEmpNatrue(tPreEmployee.getEmpNatrue());
tPreEmployeeProjectService.updateById(project);
main.setEmpNatrue(tPreEmployee.getEmpNatrue());
main.setStatus(CommonConstants.TWO_STRING);
this.updateById(main);
return R.ok("已完善!");
}
/**
* @param vo
* @Description: 草稿
......@@ -1073,11 +1180,16 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
return wrapper;
}
/**
* @Description: 批量完善信息
* @Author: hgw
* @Date: 2024/6/21 15:26
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage>>
**/
@Override
public R<List<ErrorMessage>> importDiy(InputStream inputStream) {
List<ErrorMessage> errorMessageList = new ArrayList<>();
ExcelUtil<TPreEmpMainVo> util1 = new ExcelUtil<>(TPreEmpMainVo.class);
;
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
......@@ -1128,29 +1240,71 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
log.error(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR, e);
return R.failed(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR);
}
return R.ok(errorMessageList);
if (errorMessageList.isEmpty()) {
return R.ok();
} else {
return R.failed(errorMessageList);
}
}
private void importTPreEmpMain(List<TPreEmpMainVo> excelVOList, List<ErrorMessage> errorMessageList) {
// 个性化校验逻辑
ErrorMessage errorMsg;
TPreEmpMain main;
TPreEmployeeInfo employee;
TPreEmployeeProject project;
// 执行数据插入操作 组装
for (int i = 0; i < excelVOList.size(); i++) {
TPreEmpMainVo excel = excelVOList.get(i);
// 数据合法情况 TODO
// 插入
insertExcel(excel);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), CommonConstants.SAVE_SUCCESS));
if (Common.isEmpty(excel.getDeptNo()) || Common.isEmpty(excel.getEmpIdcard()) || Common.isEmpty(excel.getEmpNatrue()) || Common.isEmpty(excel.getFileProvince())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "完善信息不可为空!"));
} else {
// 插入
main = baseMapper.getTPreEmpMainByCardAndDeptNo(excel.getEmpIdcard(), excel.getDeptNo());
if (main == null || Common.isEmpty(main.getId()) || Common.isEmpty(main.getStatus())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "未找到预入职主表!"));
} else {
if (!CommonConstants.ONE_STRING.equals(main.getStatus())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "状态不为待完善,不可编辑!"));
} else {
employee = tPreEmployeeInfoService.getTPreEmployeeInfoList(main.getId());
if (employee == null || Common.isEmpty(employee.getId())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "未找到预入职人员表!"));
} else {
project = tPreEmployeeProjectService.getTPreEmployeeProjectList(main.getId());
if (project == null || Common.isEmpty(project.getId())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "未找到预入职项目档案表!"));
} else {
employee.setEmpNatrue(excel.getEmpNatrue());
project.setEmpNatrue(excel.getEmpNatrue());
employee.setFileProvince(Integer.parseInt(excel.getFileProvince()));
if (Common.isEmpty(excel.getFileCity())) {
employee.setFileCity(CommonConstants.ZERO_INT);
} else {
try {
employee.setFileCity(Integer.parseInt(excel.getFileCity()));
} catch (Exception e) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "未找到市!"));
}
}
if (Common.isEmpty(excel.getFileTown())) {
employee.setFileTown(CommonConstants.ZERO_INT);
} else {
try {
employee.setFileTown(Integer.parseInt(excel.getFileTown()));
} catch (Exception e) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "未找到县!"));
}
}
tPreEmployeeInfoService.updateById(employee);
tPreEmployeeProjectService.updateById(project);
main.setEmpNatrue(excel.getEmpNatrue());
main.setStatus(CommonConstants.TWO_STRING);
this.updateById(main);
}
}
}
}
}
}
}
/**
* 插入excel bad record
*/
private void insertExcel(TPreEmpMainVo excel) {
TPreEmpMain insert = new TPreEmpMain();
BeanUtil.copyProperties(excel, insert);
this.save(insert);
}
}
......@@ -186,4 +186,14 @@
where a.EMP_IDCARD = #{empIdCard} AND a.DEPT_ID = #{deptId}
limit 1
</select>
<!--tPreEmpMain简单分页查询-->
<select id="getTPreEmpMainByCardAndDeptNo" resultMap="tPreEmpMainMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_pre_emp_main a
where a.EMP_IDCARD = #{empIdCard} AND a.DEPT_NO = #{deptNo}
limit 1
</select>
</mapper>
......@@ -116,10 +116,10 @@ public interface TSocialSoldierMapper extends BaseMapper<TSocialInfo> {
**/
List<SocialSoldierPaymentSelectThreeVo> getSoldierPaymentSelectThreeList();
void getSoldierPaymentErrorInfoOne(@Param("parentId") String parentId);
void getSoldierPaymentErrorInfoTwo(@Param("parentId") String parentId);
void getSoldierPaymentErrorInfoOne(@Param("paymentTableName") String paymentTableName, @Param("parentId") String parentId);
void getSoldierPaymentErrorInfoTwo(@Param("paymentTableName") String paymentTableName, @Param("parentId") String parentId);
void getSoldierPaymentErrorInfoOneByRe(@Param("parentId") String parentId);
void getSoldierPaymentErrorInfoTwoByRe(@Param("parentId") String parentId);
void getSoldierPaymentErrorInfoOneByRe(@Param("paymentTableName") String paymentTableName, @Param("parentId") String parentId);
void getSoldierPaymentErrorInfoTwoByRe(@Param("paymentTableName") String paymentTableName, @Param("parentId") String parentId);
}
......@@ -289,11 +289,11 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
|| detailListThree != null && !detailListThree.isEmpty()
|| detailListFour != null && !detailListFour.isEmpty()
) {
String paymentTableName = DateUtil.getYear(new Date());
// 复核-核验1:
baseMapper.getSoldierPaymentErrorInfoOneByRe(mainAuto.getId());
baseMapper.getSoldierPaymentErrorInfoOneByRe(paymentTableName, mainAuto.getId());
// 复核-核验2:
baseMapper.getSoldierPaymentErrorInfoTwoByRe(mainAuto.getId());
baseMapper.getSoldierPaymentErrorInfoTwoByRe(paymentTableName, mainAuto.getId());
// 重新复核状态
TimeUnit.SECONDS.sleep(10);
......@@ -534,10 +534,11 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
|| detailListThree != null && !detailListThree.isEmpty()
|| detailListFour != null && !detailListFour.isEmpty()
) {
String paymentTableName = DateUtil.getYear(new Date());
// 核验1:
baseMapper.getSoldierPaymentErrorInfoOne(mainAuto.getId());
baseMapper.getSoldierPaymentErrorInfoOne(paymentTableName, mainAuto.getId());
// 核验2:
baseMapper.getSoldierPaymentErrorInfoTwo(mainAuto.getId());
baseMapper.getSoldierPaymentErrorInfoTwo(paymentTableName, mainAuto.getId());
TimeUnit.SECONDS.sleep(10);
long count = tAutoPaymentErrorService.getCountByParentId(mainAuto.getId());
if (count > 0) {
......@@ -1059,6 +1060,9 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} else if ("工伤保险".equals(insuranceType)) {
insuranceTypeUnit = "工伤保险";
}
if (insuranceType.contains("【")) {
insuranceType = insuranceType.split("【")[0];
}
if (Common.isNotNull(unitLimit)) {
detail.setInsuranceType(insuranceTypeUnit);
}
......
......@@ -314,7 +314,7 @@
insert into t_auto_payment_error
select concat(d.id,'_1_',#{parentId}) id,#{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该员工的姓名、社保户与派单不一致' ERROR_INFO from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m')
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT
and p.EMP_NAME = d.EMP_NAME
and p.EMP_IDCARD = d.CERT_NUM
......@@ -345,7 +345,7 @@
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m')
and d.INSURANCE_TYPE = '职工基本养老保险(单位缴纳)'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.UNIT_PENSION_MONEY > 0
)
......@@ -367,7 +367,7 @@
select concat(d.id,'_3_', #{parentId}) id, #{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该险种无此派单或该险种已减员' ERROR_INFO from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m')
and d.INSURANCE_TYPE = '职工基本养老保险(个人缴纳)'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.PERSONAL_PENSION_MONEY > 0
)
......@@ -389,7 +389,7 @@
select concat(d.id,'_4_', #{parentId}) id, #{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该险种无此派单或该险种已减员' ERROR_INFO from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m')
and d.INSURANCE_TYPE = '失业保险(单位缴纳)'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.UNIT_UNEMPLOYMENT_MONEY > 0
)
......@@ -411,7 +411,7 @@
select concat(d.id,'_5_', #{parentId}) id, #{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该险种无此派单或该险种已减员' ERROR_INFO from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m')
and d.INSURANCE_TYPE = '失业保险(个人缴纳)'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.PERSONAL_UNEMPLOYMENT_MONEY > 0
)
......@@ -433,7 +433,7 @@
select concat(d.id,'_6_', #{parentId}) id, #{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该险种无此派单或该险种已减员' ERROR_INFO from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m')
and d.INSURANCE_TYPE = '职工基本医疗保险(个人缴纳)'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.PERSONAL_MEDICAL_MONEY > 0
)
......@@ -455,7 +455,7 @@
select concat(d.id,'_7_', #{parentId}) id, #{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该险种无此派单或该险种已减员' ERROR_INFO from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m')
and d.INSURANCE_TYPE = '职工基本医疗保险(单位缴纳)'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.UNIT_MEDICAL_MONEY > 0
)
......@@ -477,7 +477,7 @@
select concat(d.id,'_8_', #{parentId}) id, #{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该险种无此派单或该险种已减员' ERROR_INFO from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m')
and d.INSURANCE_TYPE = '工伤保险'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.UNIT_INJURY_MONEY > 0
)
......@@ -499,7 +499,7 @@
select concat(d.id,'_9_', #{parentId}) id, #{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该险种无此派单或该险种已减员' ERROR_INFO from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m')
and d.INSURANCE_TYPE = '单位大病救助金'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.UNIT_BIGMAILMENT_MONEY > 0
)
......@@ -521,7 +521,7 @@
select concat(d.id,'_10_', #{parentId}) id, #{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该险种无此派单或该险种已减员' ERROR_INFO from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m')
and d.INSURANCE_TYPE = '个人大病救助金'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.PERSONAL_BIGMAILMENT_MONEY > 0
)
......@@ -544,7 +544,7 @@
select concat(d.id,'_11_', #{parentId}) id, #{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该险种无此派单或该险种已减员' ERROR_INFO from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m')
and d.INSURANCE_TYPE = '单位生育'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.UNIT_BIRTH_MONEY > 0
)
......@@ -566,6 +566,44 @@
</insert>
<sql id="get_t_payment_info_" >
<if test="paymentTableName == 2024">
t_payment_info_2024
</if>
<if test="paymentTableName == 2025">
t_payment_info_2025
</if>
<if test="paymentTableName == 2026">
t_payment_info_2026
</if>
<if test="paymentTableName == 2027">
t_payment_info_2027
</if>
<if test="paymentTableName == 2028">
t_payment_info_2028
</if>
<if test="paymentTableName == 2029">
t_payment_info_2029
</if>
<if test="paymentTableName == 2030">
t_payment_info_2030
</if>
<if test="paymentTableName == 2031">
t_payment_info_2031
</if>
<if test="paymentTableName == 2032">
t_payment_info_2032
</if>
<if test="paymentTableName == 2033">
t_payment_info_2033
</if>
<if test="paymentTableName == 2034">
t_payment_info_2034
</if>
<if test="paymentTableName == 2035">
t_payment_info_2035
</if>
</sql>
<!-- 复核-核验1户 -->
<insert id="getSoldierPaymentErrorInfoOneByRe">
......@@ -573,7 +611,7 @@
select concat(d.id,'_1_',#{parentId}) id,#{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该员工的姓名、社保户与派单不一致' ERROR_INFO
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT
and p.EMP_NAME = d.EMP_NAME
and p.EMP_IDCARD = d.CERT_NUM
......@@ -604,7 +642,7 @@
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and d.INSURANCE_TYPE = '职工基本养老保险(单位缴纳)'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.UNIT_PENSION_MONEY > 0
)
......@@ -627,7 +665,7 @@
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and d.INSURANCE_TYPE = '职工基本养老保险(个人缴纳)'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.PERSONAL_PENSION_MONEY > 0
)
......@@ -650,7 +688,7 @@
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and d.INSURANCE_TYPE = '失业保险(单位缴纳)'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.UNIT_UNEMPLOYMENT_MONEY > 0
)
......@@ -673,7 +711,7 @@
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and d.INSURANCE_TYPE = '失业保险(个人缴纳)'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.PERSONAL_UNEMPLOYMENT_MONEY > 0
)
......@@ -696,7 +734,7 @@
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and d.INSURANCE_TYPE = '职工基本医疗保险(个人缴纳)'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.PERSONAL_MEDICAL_MONEY > 0
)
......@@ -719,7 +757,7 @@
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and d.INSURANCE_TYPE = '职工基本医疗保险(单位缴纳)'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.UNIT_MEDICAL_MONEY > 0
)
......@@ -742,7 +780,7 @@
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and d.INSURANCE_TYPE = '工伤保险'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.UNIT_INJURY_MONEY > 0
)
......@@ -765,7 +803,7 @@
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and d.INSURANCE_TYPE = '单位大病救助金'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.UNIT_BIGMAILMENT_MONEY > 0
)
......@@ -788,7 +826,7 @@
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and d.INSURANCE_TYPE = '个人大病救助金'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.PERSONAL_BIGMAILMENT_MONEY > 0
)
......@@ -812,7 +850,7 @@
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and d.INSURANCE_TYPE = '单位生育'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.UNIT_BIRTH_MONEY > 0
)
......
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