Commit d272a746 authored by hongguangwu's avatar hongguangwu

Merge branch 'MVP1.6.8' into develop

parents 3aa4ba25 0068671f
......@@ -59,11 +59,11 @@ spec: # 资源规范字段
value: Asia/Shanghai
resources: #资源配置限制
limits: # 最大使用
memory: "4096Mi"
memory: "8096Mi"
#cpu: 300m # CPU,1核心 = 1000m
requests: # 容器运行时,最低资源需求,也就是说最少需要多少资源容器才能正常运行
#cpu: 100m
memory: "500Mi"
memory: "1024Mi"
#livenessProbe: # pod 内部健康检查的设置
# httpGet: # 通过httpget检查健康,返回200-399之间,则认为容器正常
# path: /healthCheck # URI地址
......
......@@ -58,7 +58,7 @@ spec: # 资源规范字段
value: Asia/Shanghai
resources: #资源配置限制
limits: # 最大使用
memory: "4048Mi"
memory: "8048Mi"
#cpu: 300m # CPU,1核心 = 1000m
requests: # 容器运行时,最低资源需求,也就是说最少需要多少资源容器才能正常运行
#cpu: 100m
......
......@@ -76,6 +76,7 @@ public class TEmpEducation extends BaseEntity {
/**
* 入学时间
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "入学时间")
private Date entryDate;
......@@ -90,6 +91,7 @@ public class TEmpEducation extends BaseEntity {
/**
* 结业日期
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "结业日期")
private Date gradutionDate;
......@@ -97,6 +99,7 @@ public class TEmpEducation extends BaseEntity {
/**
* 学校名称
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
@Max(value = 50)
@Schema(description = "学校名称")
private String school;
......@@ -162,6 +165,7 @@ public class TEmpEducation extends BaseEntity {
/**
* 专业
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
@Max(value = 50)
@Schema(description = "专业")
private String major;
......
......@@ -19,10 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
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.baomidou.mybatisplus.annotation.*;
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;
......@@ -108,6 +105,7 @@ public class TPreEmpEducation extends BaseEntity {
/**
* 入学日期
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
@ExcelAttribute(name = "入学日期", isDate = true)
@ExcelProperty("入学日期")
@Schema(description = "入学日期")
......@@ -123,6 +121,7 @@ public class TPreEmpEducation extends BaseEntity {
/**
* 结业日期
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
@ExcelAttribute(name = "结业日期", isDate = true)
@ExcelProperty("结业日期")
@Schema(description = "结业日期")
......@@ -130,6 +129,7 @@ public class TPreEmpEducation extends BaseEntity {
/**
* 学校名称
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
@ExcelAttribute(name = "学校名称", maxLength = 64)
@Length(max = 64, message = "学校名称不能超过64个字符")
@ExcelProperty("学校名称")
......@@ -210,6 +210,7 @@ public class TPreEmpEducation extends BaseEntity {
/**
* 专业
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
@ExcelAttribute(name = "专业", maxLength = 64)
@Length(max = 64, message = "专业不能超过64个字符")
@ExcelProperty("专业")
......
......@@ -246,6 +246,7 @@ public class TPreEmployeeInfo extends BaseEntity {
/**
* 学校
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
@ExcelAttribute(name = "学校", maxLength = 50)
@Length(max = 50, message = "学校不能超过50个字符")
@ExcelProperty("学校")
......@@ -254,6 +255,7 @@ public class TPreEmployeeInfo extends BaseEntity {
/**
* 专业
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
@ExcelAttribute(name = "专业", maxLength = 50)
@Length(max = 50, message = "专业不能超过50个字符")
@ExcelProperty("专业")
......@@ -262,6 +264,7 @@ public class TPreEmployeeInfo extends BaseEntity {
/**
* 入学时间
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
@ExcelAttribute(name = "入学时间", isDate = true)
@ExcelProperty("入学时间")
@Schema(description = "入学时间")
......@@ -269,6 +272,7 @@ public class TPreEmployeeInfo extends BaseEntity {
/**
* 毕业时间
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
@ExcelAttribute(name = "毕业时间", isDate = true)
@ExcelProperty("毕业时间")
@Schema(description = "毕业时间")
......
......@@ -151,25 +151,16 @@ public class EmployeeInsertVO extends RowIndex implements Serializable {
@ExcelProperty(value = "户口性质")
private String empRegisType;
/**
* 档案-省
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "档案所在省")
@ExcelAttribute(name = "档案所在省", isArea = true, isNotEmpty = true, errorInfo = "档案所在省不能为空")
@ExcelProperty("档案所在省")
private String fileProvince;
/**
* 档案-市
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "档案所在市")
@ExcelAttribute(name = "档案所在市", isArea = true, parentField = "fileProvince", isNotEmpty = true, errorInfo = "档案所在市不能为空")
@ExcelProperty("档案所在市")
private String fileCity;
/**
* 档案-县
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "档案所在县")
@ExcelAttribute(name = "档案所在县", isArea = true, parentField = "fileCity", isNotEmpty = true, errorInfo = "档案所在县不能为空")
@ExcelProperty("档案所在县")
private String fileTown;
/**
......
......@@ -48,13 +48,13 @@ public class TPreEmpMainVo extends RowIndex implements Serializable {
@ExcelAttribute(name = "员工类型", isDataId = true, dataType = ExcelAttributeConstants.EMP_NATRUE)
@ExcelProperty("员工类型")
private String empNatrue;
@ExcelAttribute(name = "档案所在地省", isArea = true)
@ExcelAttribute(name = "档案所在地省", isArea = true, isNotEmpty = true, errorInfo = "档案所在地省不能为空")
@ExcelProperty("档案所在地省")
private String fileProvince;
@ExcelAttribute(name = "档案所在地市", isArea = true, parentField = "fileProvince")
@ExcelAttribute(name = "档案所在地市", isArea = true, parentField = "fileProvince", isNotEmpty = true, errorInfo = "档案所在地市不能为空")
@ExcelProperty("档案所在地市")
private String fileCity;
@ExcelAttribute(name = "档案所在地县", isArea = true, parentField = "fileCity")
@ExcelAttribute(name = "档案所在地县", isArea = true, parentField = "fileCity", isNotEmpty = true, errorInfo = "档案所在地县不能为空")
@ExcelProperty("档案所在地县")
private String fileTown;
@ExcelAttribute(name = "计税月份")
......
......@@ -1265,28 +1265,13 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
// 档案所在地
if (Common.isNotNull(excel.getFileProvince())) {
areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + excel.getFileProvince().trim());
if (Common.isEmpty(areaStr)) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.ARCHIVES_IMPORT_EMP_FILE_AREA_ERROR, excel.getEmpIdcard()));
} else {
saveEmp.setFileProvince(Integer.parseInt(areaStr));
}
saveEmp.setFileProvince(Integer.parseInt(excel.getFileProvince()));
}
if (Common.isNotNull(excel.getFileCity())) {
areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + excel.getFileCity().trim() + CommonConstants.DOWN_LINE_STRING + excel.getFileProvince().trim());
if (Common.isEmpty(areaStr)) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.ARCHIVES_IMPORT_EMP_FILE_AREA_ERROR, excel.getEmpIdcard()));
} else {
saveEmp.setFileCity(Integer.parseInt(areaStr));
}
saveEmp.setFileCity(Integer.parseInt(excel.getFileCity()));
}
if (Common.isNotNull(excel.getFileTown())) {
areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + excel.getFileTown().trim() + CommonConstants.DOWN_LINE_STRING + excel.getFileCity().trim());
if (Common.isEmpty(areaStr)) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.ARCHIVES_IMPORT_EMP_FILE_AREA_ERROR, excel.getEmpIdcard()));
} else {
saveEmp.setFileTown(Integer.parseInt(areaStr));
}
saveEmp.setFileTown(Integer.parseInt(excel.getFileTown()));
}
if (Common.isNotNull(excel.getIsCollege())) {
if (CommonConstants.IS_TRUE.equals(excel.getIsCollege())) {
......@@ -1780,31 +1765,6 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
saveEmp.setIdTown(Integer.parseInt(areaStr));
}
}
// 档案所在地
if (Common.isNotNull(excel.getFileProvince())) {
areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + excel.getFileProvince().trim());
if (Common.isEmpty(areaStr)) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.ARCHIVES_IMPORT_EMP_FILE_AREA_ERROR, excel.getEmpIdcard()));
} else {
saveEmp.setFileProvince(Integer.parseInt(areaStr));
}
}
if (Common.isNotNull(excel.getFileCity())) {
areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + excel.getFileCity().trim() + CommonConstants.DOWN_LINE_STRING + excel.getFileProvince().trim());
if (Common.isEmpty(areaStr)) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.ARCHIVES_IMPORT_EMP_FILE_AREA_ERROR, excel.getEmpIdcard()));
} else {
saveEmp.setFileCity(Integer.parseInt(areaStr));
}
}
if (Common.isNotNull(excel.getFileTown())) {
areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + excel.getFileTown().trim() + CommonConstants.DOWN_LINE_STRING + excel.getFileCity().trim());
if (Common.isEmpty(areaStr)) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.ARCHIVES_IMPORT_EMP_FILE_AREA_ERROR, excel.getEmpIdcard()));
} else {
saveEmp.setFileTown(Integer.parseInt(areaStr));
}
}
if (Common.isNotNull(excel.getIsCollege())) {
if (CommonConstants.IS_TRUE.equals(excel.getIsCollege())) {
saveEmp.setIsCollege(CommonConstants.ONE_INT);
......@@ -1831,6 +1791,16 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
}
}
// 档案所在地
if (Common.isNotNull(excel.getFileProvince())) {
saveEmp.setFileProvince(Integer.parseInt(excel.getFileProvince()));
}
if (Common.isNotNull(excel.getFileCity())) {
saveEmp.setFileCity(Integer.parseInt(excel.getFileCity()));
}
if (Common.isNotNull(excel.getFileTown())) {
saveEmp.setFileTown(Integer.parseInt(excel.getFileTown()));
}
// 邮箱
if (Common.isNotNull(excel.getEmpEmail())) {
if (excel.getEmpEmail().contains("@")) {
......
......@@ -896,6 +896,11 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
}
tPreEmployee.setMajor(oldPreEmployee.getMajor());
tPreEmployee.setSchool(oldPreEmployee.getSchool());
tPreEmployee.setAdmissionDate(oldPreEmployee.getAdmissionDate());
tPreEmployee.setGradutionDate(oldPreEmployee.getGradutionDate());
tPreEmployeeInfoService.updateById(tPreEmployee);
project.setEmpNatrue(tPreEmployee.getEmpNatrue());
tPreEmployeeProjectService.updateById(project);
......@@ -999,10 +1004,10 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmpEducation.setCreateTime(LocalDateTime.now());
tPreEmpEducationService.saveOrUpdate(tPreEmpEducation);
// 附件
tAttaInfoService.deleteByDomainIdAndType(tPreEmpEducation.getId(), 0);
if (tPreEmpEducation.getAttaList() != null && !tPreEmpEducation.getAttaList().isEmpty()) {
List<TAttaInfo> attaList = tPreEmpEducation.getAttaList();
if (attaList != null) {
tAttaInfoService.deleteByDomainIdAndType(tPreEmpEducation.getId(), 0);
for (TAttaInfo atta : attaList) {
atta.setId(null);
atta.setDomainId(tPreEmpEducation.getId());
......@@ -1386,13 +1391,11 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tEmpEducation.setCreateTime(LocalDateTime.now());
}
tEmpEducationService.saveOrUpdate(tEmpEducation);
String attaId = tPreEmpEducation.getOldId();
tAttaInfoService.deleteByDomainIdAndType(attaId, 0);
if (tPreEmpEducation.getAttaList() != null && !tPreEmpEducation.getAttaList().isEmpty()) {
List<TAttaInfo> attaList = tPreEmpEducation.getAttaList();
if (attaList != null) {
String attaId = tPreEmpEducation.getOldId();
tAttaInfoService.deleteByDomainIdAndType(attaId, 0);
TAttaInfo newEmpAtta;
for (TAttaInfo atta : attaList) {
newEmpAtta = new TAttaInfo();
......
package com.yifu.cloud.plus.v1.yifu.archives.utils;
import cn.hutool.core.net.multipart.MultipartRequestInputStream;
import com.google.zxing.BarcodeFormat;
import com.google.zxing.EncodeHintType;
import com.google.zxing.WriterException;
import com.google.zxing.common.BitMatrix;
import com.google.zxing.qrcode.QRCodeWriter;
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TAttaInfo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
......
......@@ -207,10 +207,10 @@
e.FILE_PROVINCE fileProvince,
e.IS_COLLEGE isCollege,
e.HIGN_EDUCATION hignEducation,
e.SCHOOL,
e.MAJOR,
e.ADMISSION_DATE admissionDate,
e.GRADUTION_DATE gradutionDate,
if(e.HIGN_EDUCATION != '5' and e.HIGN_EDUCATION != '6' and e.HIGN_EDUCATION != '7' and e.HIGN_EDUCATION != '8','1',e.SCHOOL) SCHOOL,
if(e.HIGN_EDUCATION != '5' and e.HIGN_EDUCATION != '6' and e.HIGN_EDUCATION != '7' and e.HIGN_EDUCATION != '8','1',e.MAJOR) MAJOR,
if(e.HIGN_EDUCATION != '5' and e.HIGN_EDUCATION != '6' and e.HIGN_EDUCATION != '7' and e.HIGN_EDUCATION != '8','2022-05-13',e.ADMISSION_DATE) admissionDate,
if(e.HIGN_EDUCATION != '5' and e.HIGN_EDUCATION != '6' and e.HIGN_EDUCATION != '7' and e.HIGN_EDUCATION != '8','2022-05-13',e.GRADUTION_DATE) gradutionDate,
e.CONTACT_ADDRESS contactAddress,
e.FIRST_WORK_FLAG firstWorkFlag,
e.HAVE_QUALIFICATION haveQualification,
......@@ -232,7 +232,7 @@
if(ifnull(b.REMARK,1) != 1,'1',null) as badRecordFlag,
if(c.count >0,'1',null) as educationFlag,
if(e.HIGN_EDUCATION != '5' and e.HIGN_EDUCATION != '6' and e.HIGN_EDUCATION != '7' and e.HIGN_EDUCATION != '8','1',if(c.count >0,'1',null)) as educationFlag,
if(g.count >0,'1',null) as familyFlag
......
......@@ -150,6 +150,10 @@ public interface CacheConstants {
String PAYMENT_DISPATCH_BATCH_ADD_IMPORT = "payment_dispatch_batch_add_import";
String PAYMENT_SEARCH_REPEAT = "payment_search_repeat";
String PAYMENT_EXPORT_REPEAT = "payment_export_repeat";
String PAYMENT_DISPATCH_BATCH_REDUCE_IMPORT = "payment_dispatch_batch_reduce_import";
String PAYMENT_PRE_DISPATCH_BATCH_ADD_IMPORT = "payment_pre_dispatch_batch_add_import";
......
......@@ -20,5 +20,7 @@ public class ResultConstants {
public static final String DATA_IMPORT_PARSING_RESULT = "数据导入解析!数据行数:";
public static final String NO_SELECT_DATA = "请选择数据";
public static final String NO_GETLOCK_DATA = "当前用户操作处理中,请稍后重试!";
public static final String NO_GETLOCK_DATA_SEARCH = "多用户同时请求中,请稍后重试!";
public static final String NO_ID = "操作失败,id不能为空!";
}
......@@ -482,7 +482,7 @@ public class ExcelUtil <T> implements Serializable {
private String getAreaValue(String c, String tempStr, ExcelAttribute attr,Integer rowNum, ErrorMessage errorTemp) {
tempStr = String.valueOf(RedisUtil.redis.opsForValue().get(CacheConstants.AREA_VALUE + c));
if (Common.isEmpty(tempStr)){
errorMessageHashMap = initErrorMessage(errorMessageHashMap, new ErrorMessage(rowNum, attr.name() + ":" + c.trim() + "校验异常,请联系管理人员"), errorTemp);
errorMessageHashMap = initErrorMessage(errorMessageHashMap, new ErrorMessage(rowNum, attr.name() + ":" + c.trim() + "校验异常"), errorTemp);
return CommonConstants.EMPTY_STRING;
}
return tempStr;
......
......@@ -4,6 +4,7 @@ import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import io.swagger.v3.oas.annotations.media.Schema;
......@@ -476,4 +477,14 @@ public class SocialHandleExportVo implements Serializable {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="首次至缴纳地时间")
private Date firstPayTime;
/**
* 离职时间
*/
@ExcelAttribute(name = "离职日期")
@ContentStyle(dataFormat = 49)
@Schema(description = "离职日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("离职日期" )
private String leaveDate;
}
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.math.BigDecimal;
import java.util.Date;
/**
......@@ -19,65 +24,104 @@ import java.util.Date;
@Data
public class SocialSoldierExportVo implements Serializable {
////@ExcelAttribute(name = "派单类型", errorInfo = "派单类型不能为空", maxLength = 1, isDataId = true, readConverterExp = "0=派增,1=派减", needExport = true)
/**
* 派单类型:0派增1派减
*/
@ExcelAttribute(name = "派单类型", errorInfo = "派单类型不能为空", maxLength = 1, isDataId = true, readConverterExp = "0=派增,1=派减", needExport = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("派单类型")
private String type;
@Schema(description = "派单办理状态")
//@ExcelAttribute(name = "办理状态", readConverterExp = "0=未办理,1=全部办理成功,2=全部办理失败,3=部分办理成功,4=办理中", needExport = true)
/**
* 社保办理状态 0 未办理 1 全部办理成功(原-已办理) 2 全部办理失败(原-办理失败) 3已派减 4办理中 (20210609派单拆分新增fxj) 5部分办理失败 6 派减办理中 7 派减部分办理失败
* 0 未办理 1 全部办理成功(原-已办理) 2 全部办理失败(原-办理失败) 3 部分办理成功 4 办理中
*
* 2024-8-15 15:30:10 参考派单导出:(本期未修改,保持与社保导出一致 )
* @Schema(description = "社保办理状态 0 待办理 1 办理成功 2 办理失败 3 部分办理失败 4 办理中")
*/
@Schema(description = "社保办理状态")
@ExcelAttribute(name = "社保办理状态", readConverterExp = "0=未办理,1=全部办理成功,2=全部办理失败,3=部分办理成功,4=办理中", needExport = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("派单办理状态")
@ExcelProperty("社保办理状态")
private String socialHandleStatus;
//@ExcelAttribute(name = "养老工伤失业-办理状态", readConverterExp = "0=无,1=待办理,2=自动办理中,3=继续办理,4=中止办理,5=人工处理,6=成功", needExport = true)
@Schema(description = "养老工伤失业-办理状态")
/**
* 养老办理状态:0待办理1办理成功2办理失败3已派减4派减失败
*/
@ExcelAttribute(name = "养老状态", maxLength = 1, readConverterExp = "0=派增待办理,1=派增办理成功,2=派增办理失败,3=派减-已派减,4=派减失败,5=派减待办理,null=——", needExport = true)
@Schema(description = "养老办理状态:0待办理1办理成功2办理失败3已派减")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("养老工伤失业-办理状态")
private String ygsHandleStatus;
//@ExcelAttribute(name = "医保生育大病-办理状态", readConverterExp = "0=无,1=待办理,2=自动办理中,3=继续办理,4=中止办理,5=人工处理,6=成功", needExport = true)
@Schema(description = "医保生育大病-办理状态")
@ExcelProperty("养老状态")
private String pensionHandle;
/**
* 医疗办理状态:0待办理1办理成功2办理失败3已派减4派减失败
*/
@ExcelAttribute(name = "医疗状态", maxLength = 1, readConverterExp = "0=派增待办理,1=派增办理成功,2=派增办理失败,3=派减-已派减,4=派减失败,5=派减待办理,null=——", needExport = true)
@Schema(description = "医疗办理状态:0待办理1办理成功2办理失败3已派减")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保生育大病-办理状态")
private String ysdHandleStatus;
//@ExcelAttribute(name = "养老工伤失业-失败原因", maxLength = 500, needExport = true)
@Schema(description = "养老工伤失业-失败原因")
@ExcelProperty("医疗状态")
private String medicalHandle;
/**
* 失业办理状态:0待办理1办理成功2办理失败3已派减4派减失败
*/
@ExcelAttribute(name = "失业状态", maxLength = 1, readConverterExp = "0=派增待办理,1=派增办理成功,2=派增办理失败,3=派减-已派减,4=派减失败,5=派减待办理,null=——", needExport = true)
@Schema(description = "失业办理状态:0待办理1办理成功2办理失败3已派减")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("养老工伤失业-失败原因")
private String ygsRemark;
//@ExcelAttribute(name = "医保生育大病-失败原因", maxLength = 500, needExport = true)
@Schema(description = "医保生育大病-失败原因")
@ExcelProperty("失业状态")
private String unemployHandle;
/**
* 工伤办理状态:0待办理1办理成功2办理失败3已派减4派减失败
*/
@ExcelAttribute(name = "工伤状态", maxLength = 1, readConverterExp = "0=派增待办理,1=派增办理成功,2=派增办理失败,3=派减-已派减,4=派减失败,5=派减待办理,null=——", needExport = true)
@Schema(description = "工伤办理状态:0待办理1办理成功2办理失败3已派减")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保生育大病-失败原因")
private String ysdRemark;
//@ExcelAttribute(name = "申请编码", maxLength = 30, needExport = true)
@Schema(description = "申请编码")
@ExcelProperty("工伤状态")
private String workInjuryHandle;
/**
* 生育办理状态:0待办理1办理成功2办理失败3已派减4派减失败
*/
@ExcelAttribute(name = "生育状态", maxLength = 1, readConverterExp = "0=派增待办理,1=派增办理成功,2=派增办理失败,3=派减-已派减,4=派减失败,5=派减待办理,null=——", needExport = true)
@Schema(description = "生育办理状态:0待办理1办理成功2办理失败3已派减")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("申请编码")
private String dispatchCode;
//@ExcelAttribute(name = "员工姓名", errorInfo = "员工姓名不能为空", maxLength = 50, needExport = true)
@ExcelProperty("生育状态")
private String birthHandle;
/**
* 大病办理状态:0待办理1办理成功2办理失败3已派减4派减失败
*/
@ExcelAttribute(name = "大病状态", maxLength = 1, readConverterExp = "0=派增待办理,1=派增办理成功,2=派增办理失败,3=派减-已派减,4=派减失败,5=派减待办理,null=——", needExport = true)
@Schema(description = "大病办理状态:0待办理1办理成功2办理失败3已派减")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("大病状态")
private String bigailmentHandle;
/**
* 员工姓名
*/
@ExcelAttribute(name = "员工姓名", errorInfo = "员工姓名不能为空", maxLength = 50, needExport = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("员工姓名")
private String empName;
//@ExcelAttribute(name = "身份证号", needExport = true)
/**
* 员工身份证
*/
@ExcelAttribute(name = "员工身份证", errorInfo = "员工身份证不能为空", maxLength = 20, needExport = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("身份证号")
@ExcelProperty("员工身份证")
private String empIdcard;
//@ExcelAttribute(name = "员工类型", errorInfo = "员工类型不能为空", isDataId = true, dataType = ExcelAttributeConstants.EMP_NATRUE, needExport = true)
/**
* 学历
*/
@ExcelAttribute(name = "学历", maxLength = 32, needExport = true)
@Schema(description = "学历")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("员工类型")
private String empType;
@ExcelProperty("学历")
private String educationName;
/**
* 所属单位
*/
//@ExcelAttribute(name = "客户名称", isNotEmpty = true, needExport = true)
@ExcelAttribute(name = "客户名称", isNotEmpty = true, needExport = true)
@Schema(description = "客户名称(所属单位)")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("客户名称")
......@@ -86,76 +130,388 @@ public class SocialSoldierExportVo implements Serializable {
/**
* 项目名称
*/
//@ExcelAttribute(name = "项目名称", isNotEmpty = true, needExport = true)
@ExcelAttribute(name = "项目名称", isNotEmpty = true, needExport = true)
@Schema(description = "项目名称(项目)")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("项目名称")
private String settleDomain;
/**
* 员工类型
*/
@ExcelAttribute(name = "员工类型", errorInfo = "员工类型不能为空", isDataId = true, dataType = ExcelAttributeConstants.EMP_NATRUE, needExport = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("员工类型")
private String empType;
/**
* 就职岗位
*/
@ExcelAttribute(name = "岗位", maxLength = 50, needExport = true)
@Schema(description = "岗位")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("岗位")
private String post;
/**
* 员工电话
*/
@ExcelAttribute(name = "手机号码", maxLength = 20, needExport = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("手机号码")
private String empMobile;
@ExcelAttribute(name = "身份证所在地")
@Schema(description = "身份证所在地")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("身份证所在地")
private String idCardAddress;
/**
* 通信地址
*/
@ExcelAttribute(name = "通信地址")
@Schema(description = "通信地址")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("通信地址")
private String contactAddress;
/**
* 户口性质
*/
@ExcelAttribute(name = "户口性质", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.EMP_REGISTYPE, needExport = true)
@Schema(description = "户口性质")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("户口性质")
private String empRegisType;
//@ExcelAttribute(name = "项目编码", maxLength = 32, needExport = true)
@Schema(description = "项目编码")
/**
* 民族
*/
@ExcelAttribute(name = "民族", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.EMP_NATIONAL, needExport = true)
@Schema(description = "民族")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("民族")
private String empNational;
/**
* 工时制(数据字典) 1标准工时 2 综合工时 3不定时工时制
*/
@ExcelAttribute(name = "工时制", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.WORKING_HOURS, needExport = true)
@Schema(description = "工时制")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("项目编码")
private String settleDomainCode;
@ExcelProperty("工时制")
private String workingHours;
//@ExcelAttribute(name = "社保户", needExport = true)
/**
* 合同年限
*/
@ExcelAttribute(name = "合同年限", errorInfo = "合同年限不能为空", needExport = true)
@Schema(description = "合同年限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("合同年限")
private String contractTerm;
/**
* 合同起始时间
*/
@ContentStyle(dataFormat = 49)
@DateTimeFormat("yyyy-MM-dd")
@Schema(description = "合同起始时间")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("合同起始时间")
private String contractStart;
/**
* 合同到期时间
*/
@ContentStyle(dataFormat = 49)
@DateTimeFormat("yyyy-MM-dd")
@Schema(description = "合同到期时间")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("合同到期时间")
private String contractEnd;
/**
* 创建人姓名
*/
@ExcelAttribute(name = "申请人", needExport = true)
@Schema(description = "申请人")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("申请人")
private String createUserName;
/**
* 备案基数
*/
@ExcelAttribute(name = "备案基数", needExport = true)
@Schema(description = "备案基数")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("备案基数")
private String recordBase;
/**
* 缴纳类型(0最低、1自定义、2最高)
*/
@ExcelAttribute(name = "缴纳类型", isDataId = true, readConverterExp = "0=最低,1=自定义,2=最高", needExport = true)
@Schema(description = "缴纳类型(0最低、1自定义、2最高)")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("缴纳类型")
private String paymentType;
/**
* 社保户
*/
@ExcelAttribute(name = "社保户", needExport = true)
@Schema(description = "社保户")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保户")
private String socialHouseholdName;
/**
* 社保缴纳地
* 缴纳地-省
*/
//@ExcelAttribute(name = "社保缴纳地", maxLength = 32, isArea = true, needExport = true)
@Schema(description = "社保缴纳地")
@ExcelAttribute(name = "社保缴纳地-省", maxLength = 32, isArea = true, needExport = true)
@Schema(description = "社保缴纳地-省")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保缴纳地")
@ExcelProperty("社保缴纳地-省")
private String socialProvince;
/**
* 缴纳地-市
*/
@ExcelAttribute(name = "社保缴纳地-市", maxLength = 32, isArea = true, parentField = "socialProvince", needExport = true)
@Schema(description = "社保缴纳地-市")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保缴纳地-市")
private String socialCity;
/**
* 缴纳地-县
*/
@ExcelAttribute(name = "社保缴纳地-县", maxLength = 32, isArea = true, parentField = "socialCity", needExport = true)
@Schema(description = "社保缴纳地-县")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保缴纳地-县")
private String socialTown;
/**
* 养老起缴日期
*/
@ContentStyle(dataFormat = 49)
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "养老起缴日期", needExport = true)
@Schema(description = "养老起缴日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("养老起缴日期")
private String pensionStart;
;
/**
* 养老基数
*/
@ExcelAttribute(name = "养老基数", isFloat = true, needExport = true)
@Schema(description = "养老基数")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("养老基数")
private BigDecimal unitPensionCardinal;
//@ExcelAttribute(name = "离职日期", isDate = true, needExport = true)
@Schema(description = "离职日期")
/**
* 医疗起缴日期
*/
@ContentStyle(dataFormat = 49)
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "医疗起缴日期", needExport = true)
@Schema(description = "医疗起缴日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("离职日期")
private String leaveDate;
@ExcelProperty("医疗起缴日期")
private String medicalStart;
/**
* 医疗基数
*/
@ExcelAttribute(name = "医疗基数", isFloat = true, needExport = true)
@Schema(description = "医疗基数")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医疗基数")
private BigDecimal unitMedicalCardinal;
/**
* 失业起缴日期
*/
@ContentStyle(dataFormat = 49)
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "失业起缴日期", needExport = true)
@Schema(description = "失业起缴日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("失业起缴日期")
private String unemployStart;
/**
* 失业基数
*/
@ExcelAttribute(name = "失业基数", isFloat = true, needExport = true)
@Schema(description = "失业基数")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("失业基数")
private BigDecimal unitUnemploymentCardinal;
/**
* 工伤起缴日期
*/
@ContentStyle(dataFormat = 49)
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "工伤起缴日期", needExport = true)
@Schema(description = "工伤起缴日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("工伤起缴日期")
private String workInjuryStart;
/**
* 工伤基数
*/
@ExcelAttribute(name = "工伤基数", isFloat = true, needExport = true)
@Schema(description = "工伤基数")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("工伤基数")
private BigDecimal unitWorkInjuryCardinal;
/**
* 生育起缴日期
*/
@ContentStyle(dataFormat = 49)
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "生育起缴日期", needExport = true)
@Schema(description = "生育起缴日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("生育起缴日期")
private String birthStart;
/**
* 生育基数
*/
@ExcelAttribute(name = "生育基数", isFloat = true, needExport = true)
@Schema(description = "生育基数")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("生育基数")
private BigDecimal unitBirthCardinal;
/**
* 大病起缴日期
*/
@ContentStyle(dataFormat = 49)
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "大病起缴日期", needExport = true)
@Schema(description = "大病起缴日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("大病起缴日期")
private String bigailmentStart;
/**
* 大病缴纳基数
*/
@ExcelAttribute(name = "大病缴纳基数")
@Schema(description = "大病缴纳基数")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("大病缴纳基数")
private BigDecimal unitBigailmentCardinal;
/**
* 单位大病缴纳金额
*/
@ExcelAttribute(name = "单位大病金额", needExport = true)
@Schema(description = "单位大病金额")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位大病金额")
private BigDecimal unitBigailmentMoney;
/**
* 个人大病金额
*/
@ExcelAttribute(name = "个人大病金额", needExport = true)
@Schema(description = "个人大病金额")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人大病金额")
private BigDecimal personalBigailmentMoney;
/**
* 委托备注——2022-11-10 16:54:32与房工讨论,由于派增派减两个委托备注,只能取派单表里的委托备注,社保公积金的委托备注字段废弃
**/
@ExcelAttribute(name = "委托备注", needExport = true)
@Schema(description = "委托备注")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("委托备注")
private String socailTrustRemark;
/**
* 减少原因
*/
@ExcelAttribute(name = "减少原因", needExport = true, isDataId = true, dataType = ExcelAttributeConstants.REDUCE_SOCIAL_REASON)
@Schema(description = "减少原因")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("减少原因")
private String reduceReason;
/**
* @Author fxj
* @Description 社保是否已导出
* @Date 15:32 2023/5/9
* @Param
* @return
**/
@ExcelAttribute(name = "是否已导出", maxLength = 1, isDataId = true, readConverterExp = "0=否,1=是")
@Schema(description = "是否已导出:0否、1是")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("是否已导出")
private String exportSocialFlag;
/**
* 学校
*/
@ExcelAttribute(name = "学校", isNotEmpty = false)
@Schema(description = "学校:派增只做记录")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "学校")
private String schoolName;
//@ExcelAttribute(name = "派单项", maxLength = 50, needExport = true)
@Schema(description = "派单项")
/**
* 专业
*/
@ExcelAttribute(name = "专业", isNotEmpty = false)
@Length(max = 50, message = "学校不能超过50个字符")
@Schema(description = "专业:派增只做记录")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("派单项")
private String dispatchItem;
@ExcelProperty(value = "专业")
private String major;
//@ExcelAttribute(name = "申请人", needExport = true)
@Schema(description = "申请人")
/**
* 毕业时间
*/
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "毕业时间", isDate = true)
@Schema(description = "毕业时间")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("申请人")
private String createUserName;
@ExcelProperty("毕业时间")
private Date graduationTime;
/**
* 首次至缴纳地时间
*/
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "首次至缴纳地时间", isNotEmpty = false, isDate = true)
@Schema(description = "首次至缴纳地时间")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "首次至缴纳地时间")
private Date firstPayTime;
//@ExcelAttribute(name = "申请人所在部门", maxLength = 50, needExport = true)
@Schema(description = "申请人所在部门")
/**
* 离职日期
*/
@ExcelAttribute(name = "离职日期")
@ContentStyle(dataFormat = 49)
@Schema(description = "离职日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("申请人所在部门")
private String organName;
@ExcelProperty("离职日期" )
private String leaveDate;
//@ExcelAttribute(name = "申请时间", isDate = true, needExport = true)
@ExcelAttribute(name = "养老工伤失业-办理状态", readConverterExp = "0=无,1=待办理,2=自动办理中,3=继续办理,4=中止办理,5=人工处理,6=成功,7=提交成功", needExport = true)
@Schema(description = "养老工伤失业-办理状态")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("申请时间")
private LocalDateTime createTime;
@ExcelProperty("养老工伤失业-办理状态")
private String ygsHandleStatus;
@ExcelAttribute(name = "医保生育大病-办理状态", readConverterExp = "0=无,1=待办理,2=自动办理中,3=继续办理,4=中止办理,5=人工处理,6=成功,7=提交成功", needExport = true)
@Schema(description = "医保生育大病-办理状态")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保生育大病-办理状态")
private String ysdHandleStatus;
//@ExcelAttribute(name = "审核人", maxLength = 50, needExport = true)
@Schema(description = "审核人")
@ExcelAttribute(name = "养老工伤失业-失败原因", maxLength = 500, needExport = true)
@Schema(description = "养老工伤失业-失败原因")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("审核人")
private String auditUserName;
@ExcelProperty("养老工伤失业-失败原因")
private String ygsRemark;
//@DateTimeFormat("yyyy-MM-dd")
//@ExcelAttribute(name = "审核时间", isDate = true, needExport = true)
@Schema(description = "审核时间")
@ExcelAttribute(name = "医保生育大病-失败原因", maxLength = 500, needExport = true)
@Schema(description = "医保生育大病-失败原因")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("审核时间")
private Date auditTime;
@ExcelProperty("医保生育大病-失败原因")
private String ysdRemark;
}
......@@ -124,7 +124,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
/**
* 档案-省
*/
@ExcelAttribute(name = "档案-省" ,isArea = true)
@ExcelAttribute(name = "档案-省" ,isArea = true, isNotEmpty = true, errorInfo = "档案-省不能为空")
@Schema(description = "档案-省" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("档案-省" )
......@@ -132,7 +132,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
/**
* 档案-市
*/
@ExcelAttribute(name = "档案-市" ,isArea = true,parentField = "fileProvince")
@ExcelAttribute(name = "档案-市" ,isArea = true,parentField = "fileProvince", isNotEmpty = true, errorInfo = "档案-市不能为空")
@Schema(description = "档案-市" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("档案-市" )
......@@ -140,7 +140,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
/**
* 档案-县
*/
@ExcelAttribute(name = "档案-县" ,isArea = true,parentField = "fileCity")
@ExcelAttribute(name = "档案-县" ,isArea = true,parentField = "fileCity", isNotEmpty = true, errorInfo = "档案-县不能为空")
@Schema(description = "档案-县" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("档案-县" )
......
......@@ -15,6 +15,7 @@ package com.yifu.cloud.plus.v1.yifu.social.controller;/*
* Author: lengleng (wangiegie@gmail.com)
*/
import cn.hutool.core.date.LocalDateTimeUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -52,6 +53,8 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.text.ParseException;
import java.time.LocalDateTime;
import java.util.List;
......@@ -80,6 +83,16 @@ public class TPaymentInfoController {
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TPaymentInfo>> getTPaymentInfoPage(Page<TPaymentInfo> page, TPaymentInfoSearchVo tPaymentInfo) {
YifuUser user = SecurityUtils.getUser();
if (Common.isEmpty(user)){
return R.failed(CommonConstants.USER_FAIL);
}
//特殊条件如社保户、缴纳地的查询做限制处理,限制到所用用户,因为此部分数据量较大
R<IPage<TPaymentInfo>> res = tPaymentInfoService.specialHandle(page,tPaymentInfo);
if (null != res){
return res;
}
//查询数据
return new R<>(tPaymentInfoService.getTPaymentInfoPage(page, tPaymentInfo));
}
......@@ -93,19 +106,13 @@ public class TPaymentInfoController {
@Operation(description = "简单分页查询")
@GetMapping("/newPage")
public R<IPage<TPaymentInfoNewVo>> getTPaymentInfoNewPage(Page<TPaymentInfo> page, TPaymentInfoSearchVo tPaymentInfo) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, tPaymentInfo);
if (Common.isNotNull(tPaymentInfo.getAuthSql())) {
if (tPaymentInfo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
tPaymentInfo.setAuthSql(tPaymentInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "a.SETTLE_DOMAIN_ID"));
}
if (tPaymentInfo.getAuthSql().contains("1=2 EXISTS")) {
tPaymentInfo.setAuthSql(tPaymentInfo.getAuthSql().replace("1=2 EXISTS", "EXISTS"));
}
//特殊条件如社保户、缴纳地的查询做限制处理,限制到所用用户,因为此部分数据量较大
R<IPage<TPaymentInfoNewVo>> res = tPaymentInfoService.specialHandleNew(page,tPaymentInfo);
if (null != res){
return res;
}
return new R<>(tPaymentInfoService.getTPaymentInfoNewPage(page, tPaymentInfo));
}
/**
* 实缴查询详情
*
......@@ -307,7 +314,7 @@ public class TPaymentInfoController {
* @author huyc
* @date 2022-07-22
**/
@SysLog("实缴导列表不合并导出")
@SysLog("实缴导列表不合并导出")
@Operation(description = "导出缴费库 hasPermission('social_tpaymentinfo_export')")
@PostMapping("/export")
@PreAuthorize("@pms.hasPermission('social_tpaymentinfo_export')")
......@@ -315,6 +322,43 @@ public class TPaymentInfoController {
tPaymentInfoService.listExport(response, searchVo);
}
/**
* @Author fxj
* @Description 实缴导入列表导出不合并数据校验,生成月份为空时 数据量超出2W 前端提示
* @Date 14:57 2024/8/5
* @Param
* @return
**/
@SysLog("实缴导出列表不合并导出--检测")
@Operation(description = "导出缴费库检测 ")
@PostMapping("/exportCheck")
public R<Integer> exportCheck(HttpServletResponse response, @RequestBody TPaymentInfoSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
if (Common.isEmpty(user)){
return R.failed(CommonConstants.USER_FAIL);
}
// 获取redis分布式事务锁
String key = CacheConstants.PAYMENT_EXPORT_REPEAT + CommonConstants.DOWN_LINE_STRING + user.getId();
String requestId;
try {
requestId = RedisDistributedLock.getLock(key,"10");
} catch (Exception e) {
throw new RuntimeException(ResultConstants.NO_GETLOCK_DATA+CommonConstants.DOWN_LINE_STRING+e.getMessage());
}
try {
if (Common.isNotNull(requestId)) {
//查询数据
return tPaymentInfoService.listExportCheck(response, searchVo);
} else {
return R.failed(ResultConstants.NO_GETLOCK_DATA);
}
}finally {
//主动释放锁
RedisDistributedLock.unlock(key, requestId);
}
}
/**
* 缴费库合并导出
*
......@@ -329,6 +373,43 @@ public class TPaymentInfoController {
tPaymentInfoService.listSumExport(response, searchVo);
}
/**
* @Author fxj
* @Description 缴费库合并导出 检车 生成月份为空 数据条数超出2W条后 前端给提示
* @Date 15:09 2024/8/5
* @Param
* @return
**/
@SysLog("缴费库合并导出检测")
@Operation(description = "合并导出缴费库检测")
@PostMapping("/sumExportCheck")
public R<Integer> sumExportCheck(HttpServletResponse response, @RequestBody TPaymentInfoSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
if (Common.isEmpty(user)){
return R.failed(CommonConstants.USER_FAIL);
}
// 获取redis分布式事务锁
String key = CacheConstants.PAYMENT_EXPORT_REPEAT + CommonConstants.DOWN_LINE_STRING+user.getId();
String requestId;
try {
requestId = RedisDistributedLock.getLock(key,"10");
} catch (Exception e) {
throw new RuntimeException(ResultConstants.NO_GETLOCK_DATA+CommonConstants.DOWN_LINE_STRING+e.getMessage());
}
try {
if (Common.isNotNull(requestId)) {
//查询数据
return tPaymentInfoService.listSumExportCheck(response, searchVo);
} else {
return R.failed(ResultConstants.NO_GETLOCK_DATA);
}
}finally {
//主动释放锁
RedisDistributedLock.unlock(key, requestId);
}
}
/**
* 缴费库查询合并导出
*
......@@ -353,6 +434,52 @@ public class TPaymentInfoController {
tPaymentInfoService.sumSearchExport(response, searchVo);
}
/**
* @Author fxj
* @Description 缴费库查询合并导出 校验, 生成月份为空时 导出条数超出2W 前端给提示
* @Date 15:13 2024/8/5
* @Param
* @return
**/
@Operation(description = "缴费库查询合并导出检测")
@PostMapping("/sumSearchExportCheck")
@SysLog("实缴查询列表合并导出检测")
public R<Integer> sumSearchExportCheck(HttpServletResponse response, @RequestBody TPaymentInfoSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
if (Common.isEmpty(user)){
return R.failed(CommonConstants.USER_FAIL);
}
// 获取redis分布式事务锁
String key = CacheConstants.PAYMENT_EXPORT_REPEAT + CommonConstants.DOWN_LINE_STRING + user.getId();
String requestId;
try {
requestId = RedisDistributedLock.getLock(key,"10");
} catch (Exception e) {
throw new RuntimeException(ResultConstants.NO_GETLOCK_DATA+CommonConstants.DOWN_LINE_STRING+e.getMessage());
}
try {
if (Common.isNotNull(requestId)) {
//查询数据
menuUtil.setAuthSql(user, searchVo);
if (Common.isNotNull(searchVo.getAuthSql())) {
if (searchVo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
searchVo.setAuthSql(searchVo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "a.SETTLE_DOMAIN_ID"));
}
if (searchVo.getAuthSql().contains("1=2 EXISTS")) {
searchVo.setAuthSql(searchVo.getAuthSql().replace("1=2 EXISTS", "EXISTS"));
}
}
return tPaymentInfoService.sumSearchExportCheck(response, searchVo);
} else {
return R.failed(ResultConstants.NO_GETLOCK_DATA);
}
}finally {
//主动释放锁
RedisDistributedLock.unlock(key, requestId);
}
}
/**
* 根据条件批量删除
*
......
......@@ -24,9 +24,12 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialInfoService;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialSoldierService;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialInfoSearchVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
......@@ -54,6 +57,8 @@ public class TSocialInfoController {
private final TSocialInfoService tSocialInfoService;
private final TSocialSoldierService tSocialSoldierService;
/**
* 简单分页查询
......@@ -181,4 +186,55 @@ public class TSocialInfoController {
}
return R.ok(socialInfo);
}
/**
* @param id
* @param isSocial 1 社保 2 医保
* @Description:
* @Author: hgw
* @Date: 2024/8/1 18:12
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Operation(summary = "转人工", description = "转人工")
@GetMapping("/doRenGong" )
public R<String> doRenGong(@RequestParam String id, @RequestParam String isSocial) {
YifuUser user = SecurityUtils.getUser();
if (user == null || Common.isEmpty(user.getId())) {
return R.failed("请登录!");
}
TSocialInfo socialInfo = tSocialInfoService.getById(id);
if (socialInfo == null || Common.isEmpty(socialInfo.getId())) {
return R.failed("未找到社保");
}
String handleRemark;
if (CommonConstants.ZERO_STRING.equals(socialInfo.getDispatchType())) {
handleRemark = "派增";
} else {
handleRemark = "派减";
}
if (CommonConstants.ONE_STRING.equals(isSocial) && Common.isNotNull(socialInfo.getYgsHandleStatus())) {
if (CommonConstants.ZERO_STRING.equals(socialInfo.getYgsHandleStatus())
|| CommonConstants.FOUR_STRING.equals(socialInfo.getYgsHandleStatus())
|| CommonConstants.FIVE_STRING.equals(socialInfo.getYgsHandleStatus())
|| CommonConstants.SIX_STRING.equals(socialInfo.getYgsHandleStatus())) {
return R.failed("当前养老工伤失业-办理状态不可以转人工!");
}
socialInfo.setYgsHandleStatus(CommonConstants.FIVE_STRING);
tSocialInfoService.updateById(socialInfo);
handleRemark += "养老、工伤、失业手动转人工";
} else if (CommonConstants.TWO_STRING.equals(isSocial) && Common.isNotNull(socialInfo.getYsdHandleStatus())) {
if (CommonConstants.ZERO_STRING.equals(socialInfo.getYsdHandleStatus())
|| CommonConstants.FOUR_STRING.equals(socialInfo.getYsdHandleStatus())
|| CommonConstants.FIVE_STRING.equals(socialInfo.getYsdHandleStatus())
|| CommonConstants.SIX_STRING.equals(socialInfo.getYsdHandleStatus())) {
return R.failed("当前医疗生育大病-办理状态不可以转人工!");
}
socialInfo.setYsdHandleStatus(CommonConstants.FIVE_STRING);
tSocialInfoService.updateById(socialInfo);
handleRemark += "医疗、生育、大病手动转人工";
}
// 加记录
tSocialSoldierService.doSocialTAuditInfo(socialInfo, handleRemark, handleRemark, handleRemark, user);
return R.ok("成功!");
}
}
......@@ -53,6 +53,20 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
*/
IPage<TPaymentInfoNewVo> getTPaymentInfoNewPage(Page<TPaymentInfo> page, @Param("tPaymentInfo") TPaymentInfoSearchVo tPaymentInfo);
/**
* 缴费库分页查询
* @param tPaymentInfo 缴费库
* @return
*/
List<TPaymentInfoNewVo> getTPaymentInfoNewPageDiy(@Param("tPaymentInfo") TPaymentInfoSearchVo tPaymentInfo,@Param("page") Long page, @Param("size") Long size);
/**
* 缴费库分页查询
* @param tPaymentInfo 缴费库
* @return
*/
List<TPaymentInfoNewVo> getTPaymentInfoNewPageSocial(@Param("tPaymentInfo") TPaymentInfoSearchVo tPaymentInfo,@Param("page") Long page, @Param("size") Long size);
/**
* 缴费库查询详情
* @param tPaymentInfo
......@@ -74,6 +88,27 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
*/
Integer selectCountPaymentSearchInfo(@Param("tPaymentInfo") TPaymentInfoSearchVo searchVo);
/**
* 缴费库简单分页查询
* @param searchVo 缴费库
* @return
*/
Integer selectCountPaymentSearchInfoSocial(@Param("tPaymentInfo") TPaymentInfoSearchVo searchVo);
/**
* 缴费库简单分页查询
* @param searchVo 缴费库
* @return
*/
Integer selectCountPaymentSearchInfoSocialByLimit(@Param("tPaymentInfo") TPaymentInfoSearchVo searchVo);
/**
* 缴费库简单分页查询
* @param searchVo 缴费库
* @return
*/
Integer selectCountPaymentSearchInfoFund(@Param("tPaymentInfo") TPaymentInfoSearchVo searchVo);
/**
* 缴费库简单分页查询
* @param searchVo 缴费库
......@@ -364,4 +399,16 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
IPage<SocialAndFundReduceBusinessVo> getSocialAndFundReduceInfo(Page page, @Param("month")String month
, @Param("settleDomainId")String settleDomainId, @Param("settleDomainIds")List<String> settleDomainIds);
/**
* 实缴查询社保合计查询
* @return
*/
TPaymentInfoExportVo getSumByKeyGroupSocial(@Param("empIdcard") String empIdcard,@Param("payMonth") String payMonth,@Param("createMonth") String createMonth);
/**
* 实缴查询公积金合计查询
* @return
*/
TPaymentInfoExportVo getSumByKeyGroupFund(@Param("empIdcard") String empIdcard,@Param("payMonth") String payMonth,@Param("createMonth") String createMonth);
}
......@@ -258,6 +258,14 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
* @return
**/
IPage<SocialAndFundReduceBusinessVo> getSocialAndFundReduceInfo(Page<SocialAndFundReduceBusinessVo> page, String month, String settleDomainId, List<String> settleDomainIds);
// hgw2023-1-6 10:42:06:以上:B端相关接口
R<Integer> listExportCheck(HttpServletResponse response, TPaymentInfoSearchVo searchVo);
R<Integer> listSumExportCheck(HttpServletResponse response, TPaymentInfoSearchVo searchVo);
R<Integer> sumSearchExportCheck(HttpServletResponse response, TPaymentInfoSearchVo searchVo);
R<IPage<TPaymentInfo>> specialHandle(Page<TPaymentInfo> page, TPaymentInfoSearchVo tPaymentInfo);
R<IPage<TPaymentInfoNewVo>> specialHandleNew(Page<TPaymentInfo> page, TPaymentInfoSearchVo tPaymentInfo);
}
......@@ -19,6 +19,7 @@ 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.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo;
import org.springframework.web.multipart.MultipartFile;
......@@ -65,5 +66,12 @@ public interface TSocialSoldierService extends IService<TSocialInfo> {
R<String> getZip(MultipartFile zipFile);
/**
* @Description: 加办理记录
* @Author: hgw
* @Date: 2024/8/2 9:40
* @return: void
**/
void doSocialTAuditInfo(TSocialInfo social, String title, String handleRemark, String remark, YifuUser user);
}
......@@ -5106,16 +5106,22 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (count > CommonConstants.ZERO_INT){
WriteSheet writeSheet;
ExcelUtil<SocialSoldierExportVo> util;
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = getSocialSoldierList(searchVo,idStr);
if (Common.isNotNull(list)){
util = new ExcelUtil<>(SocialSoldierExportVo.class);
for (SocialSoldierExportVo vo:list){
util.convertEntity(vo,null,null,null);
}
}
if (Common.isNotNull(list)){
writeSheet = EasyExcelFactory.writerSheet(DispatchConstants.SOCIAL_SOLDIER_EXPORT+index).build();
excelWriter.write(list,writeSheet);
index++;
i += CommonConstants.EXCEL_EXPORT_LIMIT;
}
if (Common.isNotNull(list)){
list.clear();
......
......@@ -180,9 +180,81 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
*/
@Override
public IPage<TPaymentInfoNewVo> getTPaymentInfoNewPage(Page<TPaymentInfo> page, TPaymentInfoSearchVo tPaymentInfo) {
//如果是含身份证查询直接查询走索引,无需走特殊处理逻辑,身份证查询量不会大
if (Common.isNotNull(tPaymentInfo.getEmpIdcard())){
return baseMapper.getTPaymentInfoNewPage(page, tPaymentInfo);
}
Page<TPaymentInfoNewVo> pageNew = new Page<>();
pageNew.setSize(page.getSize());
pageNew.setCurrent(page.getCurrent());
long totalCount = baseMapper.selectCountPaymentSearchInfoSocial(tPaymentInfo);
pageNew.setTotal(totalCount);
if (totalCount > 0L) {
pageNew.setPages(totalCount / pageNew.getSize());
}
if (pageNew.getCurrent() < 1) {
pageNew.setCurrent(1L);
}
if (pageNew.getSize() < 1) {
pageNew.setSize(10L);
}
if (totalCount > ((page.getCurrent() - 1) * page.getSize())) {
pageNew.setRecords(getPageData(tPaymentInfo,pageNew,totalCount));
}
return pageNew;
}
/**
* @Author fxj
* @Description 数据量大的统计查询 走特殊处理 分步查询
* @Date 11:58 2024/8/9
* @Param
* @return
**/
private List<TPaymentInfoNewVo> getPageData(TPaymentInfoSearchVo searchVo,Page<TPaymentInfoNewVo> pageNew ,long totalCount){
List<TPaymentInfoNewVo> pageData;
// 非大批量数据统计查询时走原逻辑
if (totalCount < 20000){
return baseMapper.getTPaymentInfoNewPageDiy(searchVo, (pageNew.getCurrent() - 1) * pageNew.getSize(), pageNew.getSize());
}
// 社保户、生成月、缴纳月、缴纳地、二级指标归属、单位、公积金户 走优化查询 先查询数据在封装合计金额
if ((Common.isNotNull(searchVo.getSocialHousehold())
|| Common.isNotNull(searchVo.getSocialCreateMonth())
|| Common.isNotNull(searchVo.getSocialPayMonth())
|| Common.isNotNull(searchVo.getSocialProvince())
|| Common.isNotNull(searchVo.getSecondIndicatorBelong())
|| Common.isNotNull(searchVo.getUnitName())
|| Common.isNotNull(searchVo.getProvidentHousehold()))
&& Common.isEmpty(searchVo.getEmpIdcard())
&& Common.isEmpty(searchVo.getSettleDomainName())){
//批量查询太慢 只能缓存单个查询 走字段索引
pageData = baseMapper.getTPaymentInfoNewPageSocial(searchVo, (pageNew.getCurrent() - 1) * pageNew.getSize(), pageNew.getSize());
//封装对应的社保及公积金的合计数据处理
if (Common.isNotNull(pageData)){
TPaymentInfoExportVo newVo;
for (TPaymentInfoNewVo vo:pageData){
newVo = baseMapper.getSumByKeyGroupSocial(vo.getEmpIdcard(),vo.getSocialPayMonth(),vo.getSocialCreateMonth());
if (null != newVo){
vo.setSumAll(BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(newVo.getSumAll()),BigDecimalUtils.isNullToZero(newVo.getSocialSum())));
vo.setSocialSum(newVo.getSocialSum());
vo.setSocialPayAddr(newVo.getSocialPayAddr());
vo.setSocialHousehold(newVo.getSocialHousehold());
}
newVo = baseMapper.getSumByKeyGroupFund(vo.getEmpIdcard(),vo.getSocialPayMonth(),vo.getSocialCreateMonth());
if (null != newVo){
vo.setSumAll(BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(newVo.getSumAll()),BigDecimalUtils.isNullToZero(newVo.getProvidentSum())));
vo.setProvidentSum(newVo.getProvidentSum());
vo.setProvidentHousehold(newVo.getProvidentHousehold());
vo.setProvidentPayAddr(newVo.getProvidentPayAddr());
}
return pageData;
}
}
// 身份证查询 项目查询直接走原查询逻辑,因为此处数据量不会很大
}else {
pageData = baseMapper.getTPaymentInfoNewPageDiy(searchVo, (pageNew.getCurrent() - 1) * pageNew.getSize(), pageNew.getSize());
}
return pageData;
}
/**
* 缴费库批量导出
*
......@@ -5067,4 +5139,157 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
/**
* @Author fxj
* @Description 实缴导入列表导出不合并数据校验,生成月份为空时 数据量超出2W 前端提示
* @Date 14:57 2024/8/5
* @Param
* @return
**/
@Override
public R<Integer> listExportCheck(HttpServletResponse response, TPaymentInfoSearchVo searchVo) {
return R.ok(baseMapper.selectCountTPaymentInfo(searchVo));
}
/**
* @Author fxj
* @Description 缴费库合并导出 检车 生成月份为空 数据条数超出2W条后 前端给提示
* @Date 15:09 2024/8/5
* @Param
* @return
**/
@Override
public R<Integer> listSumExportCheck(HttpServletResponse response, TPaymentInfoSearchVo searchVo){
if (Common.isEmpty(searchVo.getEmpIdcard())
&& Common.isEmpty(searchVo.getUnitName())
&& Common.isEmpty(searchVo.getSettleDomainName())
&& Common.isEmpty(searchVo.getSocialCreateMonth())
&& Common.isEmpty(searchVo.getSocialPayMonth())
&& Common.isEmpty(searchVo.getSocialProvince())
&& Common.isEmpty(searchVo.getSecondIndicatorBelong())){
// 只有社保户
if (Common.isNotNull(searchVo.getSocialHousehold())){
return R.ok(baseMapper.selectCountPaymentSearchInfoSocialByLimit(searchVo));
}
//只有公积金户
if (Common.isNotNull(searchVo.getProvidentHousehold())){
return R.ok(baseMapper.selectCountPaymentSearchInfoSocialByLimit(searchVo));
}
}
return R.ok(baseMapper.selectCountSumPaymentInfo(searchVo));
}
/**
* @Author fxj
* @Description 缴费库查询合并导出 校验, 生成月份为空时 导出条数超出2W 前端给提示
* @Date 15:13 2024/8/5
* @Param
* @return
**/
@Override
public R<Integer> sumSearchExportCheck(HttpServletResponse response, TPaymentInfoSearchVo searchVo){
if (Common.isEmpty(searchVo.getEmpIdcard())
&& Common.isEmpty(searchVo.getUnitName())
&& Common.isEmpty(searchVo.getSettleDomainName())
&& Common.isEmpty(searchVo.getSocialCreateMonth())
&& Common.isEmpty(searchVo.getSocialPayMonth())
&& Common.isEmpty(searchVo.getSocialProvince())
&& Common.isEmpty(searchVo.getSecondIndicatorBelong())){
// 只有社保户
if (Common.isNotNull(searchVo.getSocialHousehold())){
return R.ok(baseMapper.selectCountPaymentSearchInfoSocialByLimit(searchVo));
}
//只有公积金户
if (Common.isNotNull(searchVo.getProvidentHousehold())){
return R.ok(baseMapper.selectCountPaymentSearchInfoSocialByLimit(searchVo));
}
}
return R.ok(baseMapper.selectCountPaymentSearchInfo(searchVo));
}
private boolean socialFlag(TPaymentInfoSearchVo tPaymentInfo){
return ("安徽皖信人力资源管理有限公司".equals(tPaymentInfo.getSocialHousehold())
|| "安徽皖信人力资源管理有限公司肥东分公司".equals(tPaymentInfo.getSocialHousehold())) && Common.isEmpty(tPaymentInfo.getEmpIdcard())
&& Common.isEmpty(tPaymentInfo.getUnitName())
&& Common.isEmpty(tPaymentInfo.getSettleDomainName())
&& Common.isEmpty(tPaymentInfo.getSocialCreateMonth())
&& Common.isEmpty(tPaymentInfo.getSocialPayMonth())
&& Common.isEmpty(tPaymentInfo.getSocialProvince())
&& Common.isEmpty(tPaymentInfo.getSecondIndicatorBelong())
&& Common.isEmpty(tPaymentInfo.getProvidentHousehold());
}
private boolean cityFlag(TPaymentInfoSearchVo tPaymentInfo){
return (("135".equals(tPaymentInfo.getSocialCity()) && Common.isEmpty(tPaymentInfo.getSocialTown()))
|| ("12".equals(tPaymentInfo.getSocialProvince()) && Common.isEmpty(tPaymentInfo.getSocialCity())))
&& Common.isEmpty(tPaymentInfo.getEmpIdcard())
&& Common.isEmpty(tPaymentInfo.getUnitName())
&& Common.isEmpty(tPaymentInfo.getSettleDomainName())
&& Common.isEmpty(tPaymentInfo.getSocialCreateMonth())
&& Common.isEmpty(tPaymentInfo.getSocialPayMonth())
&& Common.isEmpty(tPaymentInfo.getSecondIndicatorBelong())
&& Common.isEmpty(tPaymentInfo.getProvidentHousehold())
&& Common.isEmpty(tPaymentInfo.getSocialHousehold());
}
@Override
public R<IPage<TPaymentInfo>> specialHandle(Page<TPaymentInfo> page, TPaymentInfoSearchVo tPaymentInfo) {
//判断社保户
if (socialFlag(tPaymentInfo)){
return getLock(page, tPaymentInfo);
}
//判断缴纳地
if (cityFlag(tPaymentInfo)){
return getLock(page, tPaymentInfo);
}
return null;
}
@Override
public R<IPage<TPaymentInfoNewVo>> specialHandleNew(Page<TPaymentInfo> page, TPaymentInfoSearchVo tPaymentInfo) {
//判断社保户
if (socialFlag(tPaymentInfo)){
return getLockNew(page, tPaymentInfo);
}
//判断缴纳地
if (cityFlag(tPaymentInfo)){
return getLockNew(page, tPaymentInfo);
}
return null;
}
private R<IPage<TPaymentInfoNewVo>> getLockNew(Page<TPaymentInfo> page, TPaymentInfoSearchVo tPaymentInfo) {
String keyTemp = CacheConstants.PAYMENT_SEARCH_REPEAT;
String requestId = null;
try {
requestId = RedisDistributedLock.getLock(keyTemp,"120");
if (Common.isNotNull(requestId)) {
//查询数据
return new R<>(this.getTPaymentInfoNewPage(page, tPaymentInfo));
} else {
return R.failed(ResultConstants.NO_GETLOCK_DATA_SEARCH);
}
} catch (Exception e) {
throw new RuntimeException(ResultConstants.NO_GETLOCK_DATA+CommonConstants.DOWN_LINE_STRING+e.getMessage());
}finally {
//主动释放锁
RedisDistributedLock.unlock(keyTemp, requestId);
}
}
private R<IPage<TPaymentInfo>> getLock(Page<TPaymentInfo> page, TPaymentInfoSearchVo tPaymentInfo) {
String keyTemp = CacheConstants.PAYMENT_SEARCH_REPEAT;
String requestId = null;
try {
requestId = RedisDistributedLock.getLock(keyTemp,"120");
if (Common.isNotNull(requestId)) {
//查询数据
return new R<>(this.getTPaymentInfoPage(page, tPaymentInfo));
} else {
return R.failed(ResultConstants.NO_GETLOCK_DATA_SEARCH);
}
} catch (Exception e) {
throw new RuntimeException(ResultConstants.NO_GETLOCK_DATA+CommonConstants.DOWN_LINE_STRING+e.getMessage());
}finally {
//主动释放锁
RedisDistributedLock.unlock(keyTemp, requestId);
}
}
}
......@@ -1241,25 +1241,35 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
@Override
public R<String> getSixJobByAudit() {
// 获取所有需要反馈的任务id
// 社保 type 1:社保;2:医保
List<TSocialInfo> socialList = tSocialInfoService.getSocialSoldierYgsByAudit();
if (socialList != null && !socialList.isEmpty()) {
this.doAuditCoreByType(socialList, CommonConstants.ONE_INT);
}
// 医保
List<TSocialInfo> socialYsdList = tSocialInfoService.getSocialSoldierYsdByAudit();
if (socialYsdList != null && !socialYsdList.isEmpty()) {
if (socialList != null && !socialList.isEmpty()) {
socialList.addAll(socialYsdList);
} else {
socialList = socialYsdList;
this.doAuditCoreByType(socialYsdList, CommonConstants.TWO_INT);
}
return R.ok();
}
if (socialList != null && !socialList.isEmpty()) {
/**
* @param socialList
* @param type 1:社保;2:医保
* @Description: 整合社保与医保
* @Author: hgw
* @Date: 2024/8/16 17:43
* @return: void
**/
private void doAuditCoreByType(List<TSocialInfo> socialList, int type) {
Map<String, TSocialInfo> idCardMap = new HashMap<>();
Set<String> addIdSet = new HashSet<>();
for (TSocialInfo socialInfo : socialList) {
if (Common.isNotNull(socialInfo.getYgsAddId())) {
if (type ==1 && Common.isNotNull(socialInfo.getYgsAddId())) {
addIdSet.add(socialInfo.getYgsAddId());
idCardMap.put(socialInfo.getYgsAddId() + CommonConstants.DOWN_LINE_STRING + socialInfo.getEmpIdcard(), socialInfo);
}
if (Common.isNotNull(socialInfo.getYsdAddId())) {
} else if(type ==2 && Common.isNotNull(socialInfo.getYsdAddId())) {
addIdSet.add(socialInfo.getYsdAddId());
idCardMap.put(socialInfo.getYsdAddId() + CommonConstants.DOWN_LINE_STRING + socialInfo.getEmpIdcard(), socialInfo);
}
......@@ -1282,7 +1292,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
conn.setConnectTimeout(30 * 1000);
in = conn.getInputStream();
// 实际读取文件内容
this.readZip(in, idCardMap, errorMap, doAddId);
this.readZip(in, idCardMap, errorMap, doAddId, type);
}
} catch (Exception e) {
e.printStackTrace();
......@@ -1298,11 +1308,9 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
}
}
}
return R.ok();
}
public R<List<TSocialSoldierReturnAuditErrorVo>> readZip(InputStream inputStream, Map<String, TSocialInfo> idCardMap
, Map<String, FailReasonConfig> errorMap, String doAddId) {
, Map<String, FailReasonConfig> errorMap, String doAddId, int type) {
TSocialSoldierReturnAuditErrorVo vo;
List<TSocialSoldierReturnAuditErrorVo> voList = new ArrayList<>();
XSSFWorkbook sheets = null;
......@@ -1461,7 +1469,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
}
}
if (!voList.isEmpty()) {
importTSocialSoldierByAudit(voList, idCardMap, errorMap, doAddId);
importTSocialSoldierByAudit(voList, idCardMap, errorMap, doAddId, type);
}
return R.ok(voList);
}
......@@ -1759,7 +1767,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
* @return: void
**/
private void importTSocialSoldierByAudit(List<TSocialSoldierReturnAuditErrorVo> excelVOList, Map<String, TSocialInfo> idCardMap
, Map<String, FailReasonConfig> errorMap, String doAddId) {
, Map<String, FailReasonConfig> errorMap, String doAddId, int type) {
// 个性化校验逻辑
// 执行数据插入操作 组装
TSocialSoldierReturnAuditErrorVo excel;
......@@ -1770,6 +1778,9 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
TSocialInfo updateSocial;
// true养工失 false 医生大
boolean typeFlag = true;
if (type == 2) {
typeFlag = false;
}
FailReasonConfig failConfig;
String ygsHandleStatus;
String ysdHandleStatus;
......@@ -1806,7 +1817,6 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
auditRemark = excel.getYgsOperation();
if (Common.isEmpty(auditRemark)) {
auditRemark = excel.getYsdRemark();
typeFlag = false;
}
if (Common.isNotNull(empIdCard)) {
title = "社保";
......@@ -2295,6 +2305,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
* @Author hgw
* @Date 2024-5-16 11:43:33
**/
@Override
public void doSocialTAuditInfo(TSocialInfo social, String title, String handleRemark, String remark, YifuUser user) {
TAuditInfo auditInfo = new TAuditInfo();
auditInfo.setType(CommonConstants.ONE_STRING);
......
......@@ -55,3 +55,6 @@ spring:
soldier:
authorizations : Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJmODA2ZjRlYzYzZjY0NjVlOGFlZjRmZmVlOTYwMzcxNiIsInN1YiI6IjIiLCJ1c2VyX3Bob25lIjoiIiwidXNlcl90eXBlIjoiMTAiLCJ1c2VyX25hbWUiOiLmtYvor5UiLCJpc19hcHAiOiIxIiwiVXNlcklkIjoiMiIsIm5iZiI6MTcxMjg5Mjk1OCwiZXhwIjoxNzIzMjYwOTU4LCJpYXQiOjE3MTI4OTI5NTh9.oTmhLfv1tLq8aPOfO3LeqM1IDYT76YGXkqpz3dwBX4M
urlPre : http://172.16.24.66:55555
#线上社保士兵,一般不允许用,用之前要清理测试环境当月的社保自动化数据,否则有可能产生费用
#authorizations: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI2MzcwYWIyZDRhZTI0NjQ2YTg0MTE0Mzk1Y2M2MTkzMiIsInN1YiI6IjQiLCJ1c2VyX3Bob25lIjoiIiwidXNlcl90eXBlIjoiMTAiLCJ1c2VyX25hbWUiOiLlkIjogqXnpL7kv53lo6vlhbVBUEkiLCJpc19hcHAiOiIxIiwiVXNlcklkIjoiNCIsIm5iZiI6MTcxNjE3OTIxOSwiZXhwIjoxNzI2NTQ3MjE5LCJpYXQiOjE3MTYxNzkyMTl9.Ei-52hRlfMLXLzpzmbP2xCVFZKE5sHHexzfX5PtmZ_M
#urlPre: http://60.168.131.18:55555
\ No newline at end of file
......@@ -26,7 +26,7 @@ mybatis-plus:
logic-not-delete-value: 0
configuration:
map-underscore-to-camel-case: true
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# spring security 配置
security:
......
......@@ -1077,6 +1077,63 @@
</where>
</select>
<resultMap id="socialSoldierExportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierExportVo">
<result property="empName" column="EMP_NAME"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="empType" column="EMP_TYPE"/>
<result property="empMobile" column="EMP_MOBILE"/>
<result property="idCardAddress" column="ID_CARD_ADDRESS"/>
<result property="empNational" column="EMP_NATIONAL"/>
<result property="type" column="TYPE"/>
<result property="settleDomain" column="SETTLE_DOMAIN_NAME"/>
<result property="reduceReason" column="REDUCE_REASON"/>
<result property="belongUnit" column="BELONG_UNIT_NAME"/>
<result property="contractStart" column="CONTRACT_START"/>
<result property="contractEnd" column="CONTRACT_END"/>
<result property="contractTerm" column="CONTRACT_TERM"/>
<result property="empRegisType" column="EMP_REGIS_TYPE"/>
<result property="post" column="POST"/>
<result property="socialHandleStatus" column="SOCIAL_HANDLE_STATUS"/>
<result property="socialProvince" column="SOCIAL_PROVINCE"/>
<result property="socialCity" column="SOCIAL_CITY"/>
<result property="socialTown" column="SOCIAL_TOWN"/>
<result property="workingHours" column="WORKING_HOURS"/>
<result property="educationName" column="EDUCATION_NAME"/>
<result property="createUserName" column="CREATE_NAME"/>
<result property="socialHouseholdName" column="SOCIAL_HOUSEHOLD_NAME"/>
<result property="socialProvince" column="SOCIAL_PROVINCE"/>
<result property="socialCity" column="SOCIAL_CITY"/>
<result property="socialTown" column="SOCIAL_TOWN"/>
<result property="unitPensionCardinal" column="UNIT_PENSION_CARDINAL"/>
<result property="unitMedicalCardinal" column="UNIT_MEDICAL_CARDINAL"/>
<result property="unitUnemploymentCardinal" column="UNIT_UNEMPLOYMENT_CARDINAL"/>
<result property="unitWorkInjuryCardinal" column="UNIT_WORK_INJURY_CARDINAL"/>
<result property="unitBirthCardinal" column="UNIT_BIRTH_CARDINAL"/>
<result property="personalBigailmentMoney" column="PERSONAL_BIGAILMENT_MONEY"/>
<result property="unitBigailmentMoney" column="UNIT_BIGAILMENT_MONEY"/>
<result property="unitBigailmentCardinal" column="UNIT_BIGAILMENT_CARDINAL"/>
<result property="socailTrustRemark" column="TRUST_REMARK"/>
<result property="pensionStart" column="PENSION_START"/>
<result property="medicalStart" column="MEDICAL_START"/>
<result property="unemployStart" column="UNEMPLOY_START"/>
<result property="workInjuryStart" column="WORK_INJURY_START"/>
<result property="birthStart" column="BIRTH_START"/>
<result property="bigailmentStart" column="BIGAILMENT_START"/>
<result property="exportSocialFlag" column="EXPORT_SOCIAL_FLAG"/>
<result property="schoolName" column="SCHOOL_NAME"/>
<result property="major" column="MAJOR"/>
<result property="firstPayTime" column="FIRST_PAY_TIME"/>
<result property="graduationTime" column="GRADUATION_TIME"/>
<result property="leaveDate" column="LEAVE_DATE"/>
<result property="ygsHandleStatus" column="ygs_Handle_Status"/>
<result property="ysdHandleStatus" column="ysd_Handle_Status"/>
<result property="ygsRemark" column="YGS_REMARK"/>
<result property="ysdRemark" column="YSD_REMARK"/>
</resultMap>
<resultMap id="socialHandleExportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.SocialHandleExportVo">
<result property="empName" column="EMP_NAME"/>
<result property="empIdcard" column="EMP_IDCARD"/>
......@@ -1125,6 +1182,7 @@
<result property="major" column="MAJOR"/>
<result property="firstPayTime" column="FIRST_PAY_TIME"/>
<result property="graduationTime" column="GRADUATION_TIME"/>
<result property="leaveDate" column="LEAVE_DATE"/>
</resultMap>
<resultMap id="fundHandleMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.FundHandleExportVo">
......@@ -1215,49 +1273,77 @@
a.SCHOOL_NAME,
a.MAJOR,
a.FIRST_PAY_TIME,
a.GRADUATION_TIME
a.GRADUATION_TIME,
IF(a.LEAVE_DATE is not null,DATE_FORMAT(a.LEAVE_DATE,"%Y-%m-%d"),"") as "LEAVE_DATE"
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
<include refid="where_getSocialRecordRoster"/>
</select>
<!--tDispatchInfo 社保花名册数据查询-->
<select id="getSocialSoldierList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierExportVo">
<!--tDispatchInfo 社保士兵数据查询-->
<select id="getSocialSoldierList" resultMap="socialSoldierExportMap">
SELECT
if(a.TYPE='0','派增','派减') TYPE,
case SUBSTRING_INDEX(GROUP_CONCAT(a.SOCIAL_HANDLE_STATUS ORDER BY a.CREATE_TIME desc),',',1) when '0' then '未办理' when '1' then '全部办理成功' when '2' then '全部办理失败' when '3' then '部分办理成功' when '4' then '办理中' else '-' end socialHandleStatus,
case s.ygs_Handle_Status when '0' then '无' when '1' then '待办理' when '2' then '自动办理中' when '3' then '继续办理' when '4' then '中止办理' when '5' then '人工处理' when '6' then '成功' when '7' then '提交成功' else '-' end ygsHandleStatus,
case s.ysd_Handle_Status when '0' then '无' when '1' then '待办理' when '2' then '自动办理中' when '3' then '继续办理' when '4' then '中止办理' when '5' then '人工处理' when '6' then '成功' when '7' then '提交成功' else '-' end ysdHandleStatus,
s.YGS_REMARK ygsRemark,s.YSD_REMARK ysdRemark,
SUBSTRING_INDEX(GROUP_CONCAT(a.APPLY_NO ORDER BY a.CREATE_TIME desc),',',1) dispatchCode,
a.EMP_NAME empName,
a.EMP_IDCARD empIdcard,
emp_natrue.label empType,
a.BELONG_UNIT_NAME belongUnit,
a.SETTLE_DOMAIN_NAME settleDomain,
a.SETTLE_DOMAIN_CODE settleDomainCode,
a.SOCIAL_HOUSEHOLD_NAME socialHouseholdName,
concat(if(ifnull(h.id,0) != '0',sp1.AREA_NAME,sp2.AREA_NAME),
ifnull(if(ifnull(h.id,0) != '0',sc1.AREA_NAME,sc2.AREA_NAME),''),
ifnull(if(ifnull(h.id,0) != '0',st1.AREA_NAME,st2.AREA_NAME),'')) socialProvince,
DATE_FORMAT(a.LEAVE_DATE,'%Y-%m-%d') leaveDate,
a.DISPATCH_ITEM dispatchItem,
a.CREATE_NAME createUserName,
a.ORGAN_NAME organName,
a.CREATE_TIME createTime,
a.AUDIT_USER_NAME auditUserName,
a.AUDIT_TIME auditTime
a.TYPE,
a.SOCIAL_HANDLE_STATUS,
if(ifnull(h.id,0) != '0',h.PENSION_HANDLE,s.PENSION_HANDLE) PENSION_HANDLE,
if(ifnull(h.id,0) != '0',h.MEDICAL_HANDLE,s.MEDICAL_HANDLE) MEDICAL_HANDLE,
if(ifnull(h.id,0) != '0',h.UNEMPLOY_HANDLE,s.UNEMPLOY_HANDLE) UNEMPLOY_HANDLE,
if(ifnull(h.id,0) != '0',h.WORK_INJURY_HANDLE,s.WORK_INJURY_HANDLE) WORK_INJURY_HANDLE,
if(ifnull(h.id,0) != '0',h.BIRTH_HANDLE,s.BIRTH_HANDLE) BIRTH_HANDLE,
if(ifnull(h.id,0) != '0',h.BIGAILMENT_HANDLE,s.BIGAILMENT_HANDLE) BIGAILMENT_HANDLE,
a.EMP_NAME,
a.EMP_IDCARD,
a.EDUCATION_NAME,
a.BELONG_UNIT_NAME,
a.SETTLE_DOMAIN_NAME,
a.EMP_TYPE,
a.POST,
a.EMP_MOBILE,
a.ID_CARD_ADDRESS,
a.EMP_REGIS_TYPE,
a.EMP_NATIONAL,
a.WORKING_HOURS,
a.CONTRACT_TERM,
a.CONTRACT_START,
a.CONTRACT_END,
a.CREATE_NAME,
a.CONTACT_ADDRESS,
s.RECORD_BASE,
s.PAYMENT_TYPE,
a.SOCIAL_HOUSEHOLD_NAME,
if(ifnull(h.id,0) != '0',h.SOCIAL_PROVINCE,s.SOCIAL_PROVINCE) SOCIAL_PROVINCE,
if(ifnull(h.id,0) != '0',h.SOCIAL_CITY,s.SOCIAL_CITY) SOCIAL_CITY,
if(ifnull(h.id,0) != '0',h.SOCIAL_TOWN,s.SOCIAL_TOWN) SOCIAL_TOWN,
if(ifnull(h.id,0) != '0',h.PENSION_START,s.PENSION_START) PENSION_START,
if(ifnull(h.id,0) != '0',h.UNIT_PENSION_CARDINAL,s.UNIT_PENSION_CARDINAL) UNIT_PENSION_CARDINAL,
if(ifnull(h.id,0) != '0',h.MEDICAL_START,s.MEDICAL_START) MEDICAL_START,
if(ifnull(h.id,0) != '0',h.UNIT_MEDICAL_CARDINAL,s.UNIT_MEDICAL_CARDINAL) UNIT_MEDICAL_CARDINAL,
if(ifnull(h.id,0) != '0',h.UNEMPLOY_START,s.UNEMPLOY_START) UNEMPLOY_START,
if(ifnull(h.id,0) != '0',h.UNIT_UNEMPLOYMENT_CARDINAL,s.UNIT_UNEMPLOYMENT_CARDINAL) UNIT_UNEMPLOYMENT_CARDINAL,
if(ifnull(h.id,0) != '0',h.WORK_INJURY_START,s.WORK_INJURY_START) WORK_INJURY_START,
if(ifnull(h.id,0) != '0',h.UNIT_WORK_INJURY_CARDINAL,s.UNIT_WORK_INJURY_CARDINAL) UNIT_WORK_INJURY_CARDINAL,
if(ifnull(h.id,0) != '0',h.BIRTH_START,s.BIRTH_START) BIRTH_START,
if(ifnull(h.id,0) != '0',h.UNIT_BIRTH_CARDINAL,s.UNIT_BIRTH_CARDINAL) UNIT_BIRTH_CARDINAL,
if(ifnull(h.id,0) != '0',h.BIGAILMENT_START,s.BIGAILMENT_START) BIGAILMENT_START,
if(ifnull(h.id,0) != '0',h.UNIT_BIGAILMENT_CARDINAL,s.UNIT_BIGAILMENT_CARDINAL) UNIT_BIGAILMENT_CARDINAL,
if(ifnull(h.id,0) != '0',h.UNIT_BIGAILMENT_MONEY,s.UNIT_BIGAILMENT_MONEY) UNIT_BIGAILMENT_MONEY,
if(ifnull(h.id,0) != '0',h.PERSONAL_BIGAILMENT_MONEY,s.PERSONAL_BIGAILMENT_MONEY) PERSONAL_BIGAILMENT_MONEY,
a.TRUST_REMARK,
a.REDUCE_REASON,
'1' as EXPORT_SOCIAL_FLAG,
a.SCHOOL_NAME,
a.MAJOR,
a.FIRST_PAY_TIME,
a.GRADUATION_TIME,
IF(a.LEAVE_DATE is not null,DATE_FORMAT(a.LEAVE_DATE,"%Y-%m-%d"),"") as "LEAVE_DATE"
,s.ygs_Handle_Status
,s.ysd_Handle_Status
,s.YGS_REMARK
,s.YSD_REMARK
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 sys_area sp1 on sp1.id = h.SOCIAL_PROVINCE
left join sys_area sp2 on sp2.id = s.SOCIAL_PROVINCE
left join sys_area sc1 on sc1.id = h.SOCIAL_CITY
left join sys_area sc2 on sc2.id = s.SOCIAL_CITY
left join sys_area st1 on st1.id = h.SOCIAL_TOWN
left join sys_area st2 on st2.id = s.SOCIAL_TOWN
left join view_sys_dict_item emp_natrue on emp_natrue.value=a.EMP_TYPE and emp_natrue.type='emp_natrue'
<include refid="where_getSocialSoldier"/>
group by s.id
order by a.AUDIT_TIME desc
......@@ -1313,7 +1399,7 @@
<!-- hgw 2024-5-10 10:42:33 社保士兵列表查询 -->
<select id="getTSocialSoldierHandlePage" resultMap="socialSoldierPageMap">
SELECT
a.ID,
SUBSTRING_INDEX(GROUP_CONCAT(a.ID ORDER BY a.CREATE_TIME desc),',',1) ID,
a.EMP_ID,
a.EMP_NAME,
a.EMP_NO,
......@@ -1322,8 +1408,8 @@
a.EMP_MOBILE,
a.EMP_NATIONAL,
a.STATUS,
a.TYPE,
a.SOCIAL_ID,
SUBSTRING_INDEX(GROUP_CONCAT(a.TYPE ORDER BY a.CREATE_TIME desc),',',1) TYPE,
SUBSTRING_INDEX(GROUP_CONCAT(a.SOCIAL_ID ORDER BY a.CREATE_TIME desc),',',1) SOCIAL_ID,
a.FUND_ID,
a.TYPE_SUB,
a.PROCESS_INST_ID,
......
......@@ -458,7 +458,7 @@
AND a.ID = #{tPaymentInfo.id}
</if>
<if test="tPaymentInfo.empName != null and tPaymentInfo.empName.trim() != ''">
AND a.EMP_NAME like concat('%',#{tPaymentInfo.empName},'%')
AND a.EMP_NAME like concat('',#{tPaymentInfo.empName},'')
</if>
<if test="tPaymentInfo.empNo != null and tPaymentInfo.empNo.trim() != ''">
AND a.EMP_NO like CONCAT(#{tPaymentInfo.empNo},'%')
......@@ -467,7 +467,7 @@
AND a.EMP_ID = #{tPaymentInfo.empId}
</if>
<if test="tPaymentInfo.empIdcard != null and tPaymentInfo.empIdcard.trim() != ''">
AND a.EMP_IDCARD like concat('%',#{tPaymentInfo.empIdcard},'%')
AND a.EMP_IDCARD = #{tPaymentInfo.empIdcard}
</if>
<if test="tPaymentInfo.unitId != null and tPaymentInfo.unitId.trim() != ''">
AND a.UNIT_ID = #{tPaymentInfo.unitId}
......@@ -706,13 +706,13 @@
AND a.ID = #{tPaymentInfo.id}
</if>
<if test="tPaymentInfo.empName != null and tPaymentInfo.empName.trim() != ''">
AND a.EMP_NAME like concat('%',#{tPaymentInfo.empName},'%')
AND a.EMP_NAME like concat('',#{tPaymentInfo.empName},'')
</if>
<if test="tPaymentInfo.empNo != null and tPaymentInfo.empNo.trim() != ''">
AND a.EMP_NO like CONCAT(#{tPaymentInfo.empNo},'%')
</if>
<if test="tPaymentInfo.empIdcard != null and tPaymentInfo.empIdcard.trim() != ''">
AND a.EMP_IDCARD like concat('%',#{tPaymentInfo.empIdcard},'%')
AND a.EMP_IDCARD = #{tPaymentInfo.empIdcard}
</if>
<if test="tPaymentInfo.settleDomainName != null and tPaymentInfo.settleDomainName.trim() != ''">
AND a.SETTLE_DOMAIN_NAME = #{tPaymentInfo.settleDomainName}
......@@ -808,15 +808,95 @@
</if>
</if>
</sql>
<sql id="tPaymentInfo_export_count_where">
<if test="tPaymentInfo != null">
<if test="tPaymentInfo.idList == null">
<if test="tPaymentInfo.empName != null and tPaymentInfo.empName.trim() != ''">
AND a.EMP_NAME like concat('',#{tPaymentInfo.empName},'')
</if>
<if test="tPaymentInfo.secondIndicatorBelong != null and tPaymentInfo.secondIndicatorBelong.trim() != ''">
AND a.SECOND_INDICATOR_BELONG = #{tPaymentInfo.secondIndicatorBelong}
</if>
<if test="tPaymentInfo.empIdcard != null and tPaymentInfo.empIdcard.trim() != ''">
AND a.EMP_IDCARD = #{tPaymentInfo.empIdcard}
</if>
<if test="tPaymentInfo.settleDomainName != null and tPaymentInfo.settleDomainName.trim() != ''">
AND a.SETTLE_DOMAIN_NAME = #{tPaymentInfo.settleDomainName}
</if>
<if test="tPaymentInfo.unitName != null and tPaymentInfo.unitName.trim() != ''">
AND a.UNIT_NAME = #{tPaymentInfo.unitName}
</if>
<if test="tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''">
AND a.SOCIAL_HOUSEHOLD = #{tPaymentInfo.socialHousehold}
</if>
<if test="tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != ''">
AND a.PROVIDENT_HOUSEHOLD = #{tPaymentInfo.providentHousehold}
</if>
<!--<if test="tPaymentInfo.socialPayMonth != null and tPaymentInfo.socialPayMonth.trim() != ''">
AND a.SOCIAL_PAY_MONTH = #{tPaymentInfo.socialPayMonth}
</if>
<if test="tPaymentInfo.socialCreateMonth != null and tPaymentInfo.socialCreateMonth.trim() != ''">
AND a.SOCIAL_CREATE_MONTH = #{tPaymentInfo.socialCreateMonth}
</if>-->
<if test="tPaymentInfo.socialPayMonth != null and tPaymentInfo.socialPayMonth.trim() != ''">
AND (a.SOCIAL_PAY_MONTH = '${tPaymentInfo.socialPayMonth}' or a.PROVIDENT_PAY_MONTH = '${tPaymentInfo.socialPayMonth}')
</if>
<if test="tPaymentInfo.socialCreateMonth != null and tPaymentInfo.socialCreateMonth.trim() != ''">
AND (a.SOCIAL_CREATE_MONTH = '${tPaymentInfo.socialCreateMonth}' or a.PROVIDENT_CREATE_MONTH = '${tPaymentInfo.socialCreateMonth}')
</if>
<!-- 区域 默认精准查询 0 包含下级查询 1 开始 2023-03-02 fxj -->
<if test='tPaymentInfo.areaFlag == null || tPaymentInfo.areaFlag == "1"'>
<if test="tPaymentInfo.socialTown == null">
<if test="tPaymentInfo.socialCity != null">
AND (a.SOCIAL_CITY = '${tPaymentInfo.socialCity}' or a.FUND_CITY = '${tPaymentInfo.socialCity}')
</if>
<if test="tPaymentInfo.socialCity == null">
<if test="tPaymentInfo.socialProvince != null">
AND (a.SOCIAL_PROVINCE = '${tPaymentInfo.socialProvince}' or a.FUND_PROVINCE = '${tPaymentInfo.socialProvince}')
</if>
</if>
</if>
<if test="tPaymentInfo.socialTown != null and tPaymentInfo.socialTown.trim() != ''">
AND (a.SOCIAL_TOWN = '${tPaymentInfo.socialTown}' or a.FUND_TOWN = '${tPaymentInfo.socialTown}')
</if>
</if>
<if test='tPaymentInfo.areaFlag == "0"'>
<if test="tPaymentInfo.socialProvince != null and tPaymentInfo.socialProvince.trim() != '' and tPaymentInfo.socialCity == null">
AND (
(a.SOCIAL_PROVINCE = '${tPaymentInfo.socialProvince}' and (a.SOCIAL_CITY is null or a.SOCIAL_CITY =''))
or
(a.FUND_PROVINCE = '${tPaymentInfo.socialProvince}' and (a.FUND_CITY is null or a.FUND_CITY =''))
)
</if>
<if test="tPaymentInfo.socialCity != null and tPaymentInfo.socialCity.trim() != '' and tPaymentInfo.socialTown == null">
AND (
(a.SOCIAL_CITY = '${tPaymentInfo.socialCity}' and (a.SOCIAL_TOWN is null or a.SOCIAL_TOWN =''))
or
(a.FUND_CITY = '${tPaymentInfo.socialCity}' and (a.FUND_TOWN is null or a.FUND_TOWN =''))
)
</if>
<if test="tPaymentInfo.socialTown != null and tPaymentInfo.socialTown.trim() != ''">
AND (a.SOCIAL_TOWN = '${tPaymentInfo.socialTown}' or a.FUND_TOWN = '${tPaymentInfo.socialTown}')
</if>
</if>
<if test="tPaymentInfo.authSql != null and tPaymentInfo.authSql.trim() != ''">
${tPaymentInfo.authSql}
</if>
<!-- 区域 默认精准查询 0 包含下级查询 1 结束 2023-03-02 fxj -->
</if>
</if>
</sql>
<sql id="tPaymentInfo_export_social_where">
<if test="tPaymentInfo != null">
<if test="tPaymentInfo.idList == null">
<if test="tPaymentInfo.empName != null and tPaymentInfo.empName.trim() != ''">
AND a.EMP_NAME like concat('%',#{tPaymentInfo.empName},'%')
AND a.EMP_NAME like concat('',#{tPaymentInfo.empName},'%')
</if>
<if test="tPaymentInfo.empIdcard != null and tPaymentInfo.empIdcard.trim() != ''">
AND a.EMP_IDCARD like concat('%',#{tPaymentInfo.empIdcard},'%')
AND a.EMP_IDCARD = #{tPaymentInfo.empIdcard}
</if>
<if test="tPaymentInfo.secondIndicatorBelong != null and tPaymentInfo.secondIndicatorBelong.trim() != ''">
AND a.SECOND_INDICATOR_BELONG = #{tPaymentInfo.secondIndicatorBelong}
</if>
<if test="tPaymentInfo.settleDomainName != null and tPaymentInfo.settleDomainName.trim() != ''">
AND a.SETTLE_DOMAIN_NAME = #{tPaymentInfo.settleDomainName}
......@@ -864,6 +944,96 @@
${tPaymentInfo.authSql}
</if>
<!-- 区域 默认精准查询 0 包含下级查询 1 结束 2023-03-02 fxj -->
<if test="tPaymentInfo.pushStatus != null and tPaymentInfo.pushStatus.trim() != ''">
AND a.PUSH_STATUS = #{tPaymentInfo.pushStatus}
</if>
<if test="tPaymentInfo.createName != null and tPaymentInfo.createName.trim() != ''">
AND a.CREATE_NAME = #{tPaymentInfo.createName}
</if>
<if test="tPaymentInfo.createTimeStart != null and tPaymentInfo.createTimeEnd != null">
AND a.CREATE_TIME BETWEEN #{tPaymentInfo.createTimeStart} AND #{tPaymentInfo.createTimeEnd}
</if>
<if test="tPaymentInfo.lockStatus != null and tPaymentInfo.lockStatus.trim() != ''">
AND a.LOCK_STATUS = #{tPaymentInfo.lockStatus}
</if>
<if test="tPaymentInfo.createBy != null and tPaymentInfo.createBy.trim() != ''">
AND a.CREATE_BY = #{tPaymentInfo.createBy}
</if>
</if>
</if>
</sql>
<sql id="tPaymentInfo_export_social_where_diy">
<if test="tPaymentInfo != null">
<if test="tPaymentInfo.idList == null">
<if test="tPaymentInfo.empName != null and tPaymentInfo.empName.trim() != ''">
AND a.EMP_NAME like concat('',#{tPaymentInfo.empName},'')
</if>
<if test="tPaymentInfo.empIdcard != null and tPaymentInfo.empIdcard.trim() != ''">
AND a.EMP_IDCARD = #{tPaymentInfo.empIdcard}
</if>
<if test="tPaymentInfo.settleDomainName != null and tPaymentInfo.settleDomainName.trim() != ''">
AND a.SETTLE_DOMAIN_NAME = #{tPaymentInfo.settleDomainName}
</if>
<if test="tPaymentInfo.unitName != null and tPaymentInfo.unitName.trim() != ''">
AND a.UNIT_NAME = #{tPaymentInfo.unitName}
</if>
<if test="tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''">
AND a.SOCIAL_HOUSEHOLD = #{tPaymentInfo.socialHousehold}
</if>
<if test="tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != ''">
AND a.PROVIDENT_HOUSEHOLD = #{tPaymentInfo.providentHousehold}
</if>
<if test="tPaymentInfo.secondIndicatorBelong != null and tPaymentInfo.secondIndicatorBelong.trim() != ''">
AND a.SECOND_INDICATOR_BELONG = #{tPaymentInfo.secondIndicatorBelong}
</if>
<!--<if test="tPaymentInfo.socialPayMonth != null and tPaymentInfo.socialPayMonth.trim() != ''">
AND a.SOCIAL_PAY_MONTH = #{tPaymentInfo.socialPayMonth}
</if>
<if test="tPaymentInfo.socialCreateMonth != null and tPaymentInfo.socialCreateMonth.trim() != ''">
AND a.SOCIAL_CREATE_MONTH = #{tPaymentInfo.socialCreateMonth}
</if>-->
<if test="tPaymentInfo.socialPayMonth != null and tPaymentInfo.socialPayMonth.trim() != ''">
AND (a.SOCIAL_PAY_MONTH = '${tPaymentInfo.socialPayMonth}' or a.PROVIDENT_PAY_MONTH = '${tPaymentInfo.socialPayMonth}')
</if>
<if test="tPaymentInfo.socialCreateMonth != null and tPaymentInfo.socialCreateMonth.trim() != ''">
AND (a.SOCIAL_CREATE_MONTH = '${tPaymentInfo.socialCreateMonth}' or a.PROVIDENT_CREATE_MONTH = '${tPaymentInfo.socialCreateMonth}')
</if>
<!-- 区域 默认精准查询 0 包含下级查询 1 开始 2023-03-02 fxj -->
<if test='tPaymentInfo.areaFlag == null || tPaymentInfo.areaFlag == "1"'>
<if test="tPaymentInfo.socialTown == null">
<if test="tPaymentInfo.socialCity != null">
AND (a.SOCIAL_CITY = '${tPaymentInfo.socialCity}' or a.FUND_CITY = '${tPaymentInfo.socialCity}')
</if>
<if test="tPaymentInfo.socialCity == null">
<if test="tPaymentInfo.socialProvince != null">
AND (a.SOCIAL_PROVINCE = '${tPaymentInfo.socialProvince}' or a.FUND_PROVINCE = '${tPaymentInfo.socialProvince}')
</if>
</if>
</if>
<if test="tPaymentInfo.socialTown != null and tPaymentInfo.socialTown.trim() != ''">
AND (a.SOCIAL_TOWN = '${tPaymentInfo.socialTown}' or a.FUND_TOWN = '${tPaymentInfo.socialTown}')
</if>
</if>
<if test='tPaymentInfo.areaFlag == "0"'>
<if test="tPaymentInfo.socialProvince != null and tPaymentInfo.socialProvince.trim() != '' and tPaymentInfo.socialCity == null">
AND (
(a.SOCIAL_PROVINCE = '${tPaymentInfo.socialProvince}' and (a.SOCIAL_CITY is null or a.SOCIAL_CITY =''))
or
(a.FUND_PROVINCE = '${tPaymentInfo.socialProvince}' and (a.FUND_CITY is null or a.FUND_CITY =''))
)
</if>
<if test="tPaymentInfo.socialCity != null and tPaymentInfo.socialCity.trim() != '' and tPaymentInfo.socialTown == null">
AND (
(a.SOCIAL_CITY = '${tPaymentInfo.socialCity}' and (a.SOCIAL_TOWN is null or a.SOCIAL_TOWN =''))
or
(a.FUND_CITY = '${tPaymentInfo.socialCity}' and (a.FUND_TOWN is null or a.FUND_TOWN =''))
)
</if>
<if test="tPaymentInfo.socialTown != null and tPaymentInfo.socialTown.trim() != ''">
AND (a.SOCIAL_TOWN = '${tPaymentInfo.socialTown}' or a.FUND_TOWN = '${tPaymentInfo.socialTown}')
</if>
</if>
<!-- 区域 默认精准查询 0 包含下级查询 1 结束 2023-03-02 fxj -->
</if>
</if>
</sql>
......@@ -910,10 +1080,13 @@
<if test="tPaymentInfo != null">
<if test="tPaymentInfo.idList == null">
<if test="tPaymentInfo.empName != null and tPaymentInfo.empName.trim() != ''">
AND a.EMP_NAME like concat('%',#{tPaymentInfo.empName},'%')
AND a.EMP_NAME like concat('',#{tPaymentInfo.empName},'')
</if>
<if test="tPaymentInfo.empIdcard != null and tPaymentInfo.empIdcard.trim() != ''">
AND a.EMP_IDCARD like concat('%',#{tPaymentInfo.empIdcard},'%')
AND a.EMP_IDCARD = #{tPaymentInfo.empIdcard}
</if>
<if test="tPaymentInfo.secondIndicatorBelong != null and tPaymentInfo.secondIndicatorBelong.trim() != ''">
AND a.SECOND_INDICATOR_BELONG = #{tPaymentInfo.secondIndicatorBelong}
</if>
<if test="tPaymentInfo.settleDomainName != null and tPaymentInfo.settleDomainName.trim() != ''">
AND a.SETTLE_DOMAIN_NAME = #{tPaymentInfo.settleDomainName}
......@@ -961,6 +1134,21 @@
${tPaymentInfo.authSql}
</if>
<!-- 区域 默认精准查询 0 包含下级查询 1 结束 2023-03-02 fxj -->
<if test="tPaymentInfo.pushStatus != null and tPaymentInfo.pushStatus.trim() != ''">
AND a.PUSH_STATUS = #{tPaymentInfo.pushStatus}
</if>
<if test="tPaymentInfo.createName != null and tPaymentInfo.createName.trim() != ''">
AND a.CREATE_NAME = #{tPaymentInfo.createName}
</if>
<if test="tPaymentInfo.createTimeStart != null and tPaymentInfo.createTimeEnd != null">
AND a.CREATE_TIME BETWEEN #{tPaymentInfo.createTimeStart} AND #{tPaymentInfo.createTimeEnd}
</if>
<if test="tPaymentInfo.lockStatus != null and tPaymentInfo.lockStatus.trim() != ''">
AND a.LOCK_STATUS = #{tPaymentInfo.lockStatus}
</if>
<if test="tPaymentInfo.createBy != null and tPaymentInfo.createBy.trim() != ''">
AND a.CREATE_BY = #{tPaymentInfo.createBy}
</if>
</if>
</if>
</sql>
......@@ -978,13 +1166,13 @@
AND a.ID = #{tPaymentInfo.id}
</if>
<if test="tPaymentInfo.empName != null and tPaymentInfo.empName.trim() != ''">
AND a.EMP_NAME like concat('%',#{tPaymentInfo.empName},'%')
AND a.EMP_NAME like concat('',#{tPaymentInfo.empName},'')
</if>
<if test="tPaymentInfo.empNo != null and tPaymentInfo.empNo.trim() != ''">
AND a.EMP_NO like CONCAT(#{tPaymentInfo.empNo},'%')
</if>
<if test="tPaymentInfo.empIdcard != null and tPaymentInfo.empIdcard.trim() != ''">
AND a.EMP_IDCARD like concat('%',#{tPaymentInfo.empIdcard},'%')
AND a.EMP_IDCARD = #{tPaymentInfo.empIdcard}
</if>
<if test="tPaymentInfo.settleDomainName != null and tPaymentInfo.settleDomainName.trim() != ''">
AND a.SETTLE_DOMAIN_NAME = #{tPaymentInfo.settleDomainName}
......@@ -1221,7 +1409,7 @@
SUM( w.PROVIDENT_SUM ) AS PROVIDENT_SUM
FROM (
(SELECT
CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH, '_', a.SETTLE_DOMAIN_CODE ) AS keyGroup,
CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH) AS keyGroup,
a.EMP_NAME,
a.EMP_IDCARD,
a.UNIT_NAME,
......@@ -1241,11 +1429,11 @@
IFNULL(a.SOCIAL_ID,'1') != '1'
<include refid="tPaymentInfo_export_social_where"/>
</where>
GROUP BY a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH,a.SETTLE_DOMAIN_CODE
GROUP BY a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH
)
union all
(SELECT
CONCAT( a.EMP_IDCARD, '_', a.PROVIDENT_PAY_MONTH, '_', a.PROVIDENT_CREATE_MONTH, '_', a.SETTLE_DOMAIN_CODE ) AS keyGroup,
CONCAT( a.EMP_IDCARD, '_', a.PROVIDENT_PAY_MONTH, '_', a.PROVIDENT_CREATE_MONTH) AS keyGroup,
a.EMP_NAME,
a.EMP_IDCARD,
a.UNIT_NAME,
......@@ -1265,7 +1453,7 @@
IFNULL(a.FUND_ID,'1') != '1'
<include refid="tPaymentInfo_export_fund_where"/>
</where>
GROUP BY a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH,a.SETTLE_DOMAIN_CODE
GROUP BY a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH
)
) w
GROUP BY w.keyGroup ) c
......@@ -1273,8 +1461,156 @@
1 = 1
<include refid="tPaymentInfo_export_socialFund_where2"/>
</where>
</select>
<!--tPaymentInfo简单分页查询 fxj 2024-08-08 调整-->
<select id="getTPaymentInfoNewPageDiy" resultMap="tPaymentInfoNewMap">
SELECT
c.keyGroup,
c.EMP_IDCARD,
c.EMP_NAME,
c.UNIT_NAME,
c.SETTLE_DOMAIN_NAME,
c.SECOND_INDICATOR_BELONG,
c.SOCIAL_HOUSEHOLD,
c.SOCIAL_PAY_ADDR,
c.SOCIAL_PAY_MONTH,
c.SOCIAL_CREATE_MONTH,
c.SUM_ALL AS SUM_ALL,
c.PROVIDENT_HOUSEHOLD AS PROVIDENT_HOUSEHOLD,
c.PROVIDENT_PAY_ADDR AS PROVIDENT_PAY_ADDR,
c.SOCIAL_SUM,
c.PROVIDENT_SUM AS PROVIDENT_SUM
from (
select
w.keyGroup,
w.EMP_IDCARD,
w.EMP_NAME,
w.UNIT_NAME,
w.SETTLE_DOMAIN_NAME,
w.SECOND_INDICATOR_BELONG,
w.SOCIAL_HOUSEHOLD,
w.SOCIAL_PAY_ADDR,
w.SOCIAL_PAY_MONTH,
w.SOCIAL_CREATE_MONTH,
SUM( w.SUM_ALL ) AS SUM_ALL,
MAX( w.PROVIDENT_HOUSEHOLD ) AS PROVIDENT_HOUSEHOLD,
MAX( w.PROVIDENT_PAY_ADDR ) AS PROVIDENT_PAY_ADDR,
w.SOCIAL_SUM,
SUM( w.PROVIDENT_SUM ) AS PROVIDENT_SUM
FROM (
(SELECT
CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH) AS keyGroup,
a.EMP_NAME,
a.EMP_IDCARD,
a.UNIT_NAME,
a.SETTLE_DOMAIN_NAME,
a.SECOND_INDICATOR_BELONG,
a.SOCIAL_HOUSEHOLD,
a.SOCIAL_PAY_ADDR,
a.SOCIAL_PAY_MONTH,
a.SOCIAL_CREATE_MONTH,
SUM( a.SUM_ALL ) AS SUM_ALL,
a.PROVIDENT_HOUSEHOLD,
a.PROVIDENT_PAY_ADDR,
SUM( a.SOCIAL_SUM ) AS SOCIAL_SUM,
a.PROVIDENT_SUM
FROM t_payment_info a
<where>
IFNULL(a.SOCIAL_ID,'1') != '1'
<include refid="tPaymentInfo_export_social_where"/>
</where>
GROUP BY a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH
)
union all
(SELECT
CONCAT( a.EMP_IDCARD, '_', a.PROVIDENT_PAY_MONTH, '_', a.PROVIDENT_CREATE_MONTH) AS keyGroup,
a.EMP_NAME,
a.EMP_IDCARD,
a.UNIT_NAME,
a.SETTLE_DOMAIN_NAME,
a.SECOND_INDICATOR_BELONG,
a.SOCIAL_HOUSEHOLD,
a.SOCIAL_PAY_ADDR,
a.PROVIDENT_PAY_MONTH as SOCIAL_PAY_MONTH,
a.PROVIDENT_CREATE_MONTH as SOCIAL_CREATE_MONTH,
SUM( a.SUM_ALL ) AS SUM_ALL,
a.PROVIDENT_HOUSEHOLD,
a.PROVIDENT_PAY_ADDR,
a.SOCIAL_SUM,
SUM( a.PROVIDENT_SUM ) AS PROVIDENT_SUM
FROM t_payment_info a
<where>
IFNULL(a.FUND_ID,'1') != '1'
<include refid="tPaymentInfo_export_fund_where"/>
</where>
GROUP BY a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH
)
) w
GROUP BY w.keyGroup ) c
<where>
1 = 1
<include refid="tPaymentInfo_export_socialFund_where2"/>
</where>
<if test="null != page and null != size">
limit #{page},#{size}
</if>
</select>
<!--tPaymentInfo简单分页查询 fxj 2024-08-08 调整-->
<select id="getTPaymentInfoNewPageSocial" resultMap="tPaymentInfoNewMap">
SELECT
<choose>
<when test="tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != '' and tPaymentInfo.socialHousehold == null">
CONCAT( a.EMP_IDCARD, '_', a.PROVIDENT_PAY_MONTH, '_', a.PROVIDENT_CREATE_MONTH) AS keyGroup,
a.PROVIDENT_PAY_MONTH as SOCIAL_PAY_MONTH,
a.PROVIDENT_CREATE_MONTH as SOCIAL_CREATE_MONTH,
</when>
<when test="tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''">
CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH) AS keyGroup,
a.SOCIAL_PAY_MONTH,
a.SOCIAL_CREATE_MONTH,
</when>
<otherwise>
CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH) AS keyGroup,
a.SOCIAL_PAY_MONTH,
a.SOCIAL_CREATE_MONTH,
</otherwise>
</choose>
a.EMP_NAME,
a.EMP_IDCARD,
a.UNIT_NAME,
a.SETTLE_DOMAIN_NAME,
a.SETTLE_DOMAIN_CODE,
a.SECOND_INDICATOR_BELONG,
a.SOCIAL_HOUSEHOLD,
a.SOCIAL_PAY_ADDR,
SUM( a.SUM_ALL ) AS SUM_ALL,
a.PROVIDENT_HOUSEHOLD,
a.PROVIDENT_PAY_ADDR,
SUM( a.SOCIAL_SUM ) AS SOCIAL_SUM,
a.PROVIDENT_SUM
FROM t_payment_info a
<where>
<include refid="tPaymentInfo_export_social_where_diy"/>
</where>
<choose>
<when test="tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != '' and tPaymentInfo.socialHousehold == null">
GROUP BY a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH
</when>
<when test="tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''">
GROUP BY a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH
</when>
<otherwise>
GROUP BY a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH
</otherwise>
</choose>
<if test="null != page and null != size">
limit #{page},#{size}
</if>
</select>
<!--tPaymentInfo简单分页查询-->
<select id="getTPaymentInfoNewPageInfo" resultMap="tPaymentInfoNewMap">
SELECT
......@@ -1393,7 +1729,7 @@
MAX(w.PERSONAL_UNEMPLOYMENT_PER) as PERSONAL_UNEMPLOYMENT_PER
FROM (
(SELECT
CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH, '_', a.SETTLE_DOMAIN_CODE ) AS keyGroup,
CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH) AS keyGroup,
a.EMP_NAME,
a.EMP_IDCARD,
a.UNIT_NAME,
......@@ -1452,11 +1788,11 @@
IFNULL(a.SOCIAL_ID,'1') != '1'
<include refid="tPaymentInfo_export_social_where"/>
</where>
GROUP BY a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH,a.SETTLE_DOMAIN_CODE
GROUP BY a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH
)
union all
(SELECT
CONCAT( a.EMP_IDCARD, '_', a.PROVIDENT_PAY_MONTH, '_', a.PROVIDENT_CREATE_MONTH, '_', a.SETTLE_DOMAIN_CODE ) AS keyGroup,
CONCAT( a.EMP_IDCARD, '_', a.PROVIDENT_PAY_MONTH, '_', a.PROVIDENT_CREATE_MONTH) AS keyGroup,
a.EMP_NAME,
a.EMP_IDCARD,
a.UNIT_NAME,
......@@ -1515,7 +1851,7 @@
IFNULL(a.FUND_ID,'1') != '1'
<include refid="tPaymentInfo_export_fund_where"/>
</where>
GROUP BY a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH,a.SETTLE_DOMAIN_CODE
GROUP BY a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH
)
) w
GROUP BY w.keyGroup) k
......@@ -1532,7 +1868,7 @@
FROM (
select w.SOCIAL_HOUSEHOLD,w.PROVIDENT_HOUSEHOLD,w.SECOND_INDICATOR_BELONG from (
(SELECT
CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH, '_', a.SETTLE_DOMAIN_CODE ) AS keyGroup,
CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH) AS keyGroup,
a.SOCIAL_HOUSEHOLD,
a.PROVIDENT_HOUSEHOLD,
a.SECOND_INDICATOR_BELONG
......@@ -1541,11 +1877,11 @@
IFNULL(a.SOCIAL_ID,'1') != '1'
<include refid="tPaymentInfo_export_social_where"/>
</where>
GROUP BY a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH,a.SETTLE_DOMAIN_CODE
GROUP BY a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH
)
union all
(SELECT
CONCAT( a.EMP_IDCARD, '_', a.PROVIDENT_PAY_MONTH, '_', a.PROVIDENT_CREATE_MONTH, '_', a.SETTLE_DOMAIN_CODE ) AS keyGroup,
CONCAT( a.EMP_IDCARD, '_', a.PROVIDENT_PAY_MONTH, '_', a.PROVIDENT_CREATE_MONTH) AS keyGroup,
a.SOCIAL_HOUSEHOLD,
a.PROVIDENT_HOUSEHOLD,
a.SECOND_INDICATOR_BELONG
......@@ -1554,7 +1890,13 @@
IFNULL(a.FUND_ID,'1') != '1'
<include refid="tPaymentInfo_export_fund_where"/>
</where>
GROUP BY a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH,a.SETTLE_DOMAIN_CODE
GROUP BY a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH
<!-- 导出查询条数接口 fxj 2024-08-06 -->
<if test="tPaymentInfo != null">
<if test="tPaymentInfo.limitEnd != null and tPaymentInfo.limitEnd > 0">
limit 0,#{tPaymentInfo.limitEnd}
</if>
</if>
)
) w
GROUP BY w.keyGroup) c
......@@ -1691,7 +2033,7 @@
SUM( w.UNIT_PROVIDENT_SUM ) AS UNIT_PROVIDENT_SUM
FROM (
(SELECT
CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH, '_', a.SETTLE_DOMAIN_CODE ) AS keyGroup,
CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH) AS keyGroup,
a.EMP_NAME,
a.EMP_NO,
a.EMP_IDCARD,
......@@ -1756,11 +2098,11 @@
IFNULL(a.SOCIAL_ID,'1') != '1'
<include refid="tPaymentInfo_export_social_where"/>
</where>
GROUP BY a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH,a.SETTLE_DOMAIN_CODE
GROUP BY a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH
)
union all
(SELECT
CONCAT( a.EMP_IDCARD, '_', a.PROVIDENT_PAY_MONTH, '_', a.PROVIDENT_CREATE_MONTH, '_', a.SETTLE_DOMAIN_CODE ) AS keyGroup,
CONCAT( a.EMP_IDCARD, '_', a.PROVIDENT_PAY_MONTH, '_', a.PROVIDENT_CREATE_MONTH) AS keyGroup,
a.EMP_NAME,
a.EMP_NO,
a.EMP_IDCARD,
......@@ -1825,7 +2167,7 @@
IFNULL(a.FUND_ID,'1') != '1'
<include refid="tPaymentInfo_export_fund_where"/>
</where>
GROUP BY a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH,a.SETTLE_DOMAIN_CODE
GROUP BY a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH
)
) w
GROUP BY w.keyGroup) c
......@@ -1975,7 +2317,7 @@
SUM( w.UNIT_PROVIDENT_SUM ) AS UNIT_PROVIDENT_SUM
FROM (
(SELECT
CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH ) AS keyGroup,
CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH) AS keyGroup,
a.EMP_NAME,
a.EMP_NO,
a.EMP_IDCARD,
......@@ -2101,13 +2443,19 @@
FROM (
select * from (
(SELECT
CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH ) AS keyGroup
CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH) AS keyGroup
FROM t_payment_info a
<where>
IFNULL(a.SOCIAL_ID,'1') != '1'
<include refid="tPaymentInfo_export_where"/>
</where>
GROUP BY a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH
<!-- 导出查询条数接口 fxj 2024-08-06 -->
<if test="tPaymentInfo != null">
<if test="tPaymentInfo.limitEnd != null and tPaymentInfo.limitEnd > 0">
limit 0,#{tPaymentInfo.limitEnd}
</if>
</if>
)
union all
(SELECT
......@@ -2118,6 +2466,12 @@
<include refid="tPaymentInfo_export_where"/>
</where>
GROUP BY a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH
<!-- 导出查询条数接口 fxj 2024-08-06 -->
<if test="tPaymentInfo != null">
<if test="tPaymentInfo.limitEnd != null and tPaymentInfo.limitEnd > 0">
limit 0,#{tPaymentInfo.limitEnd}
</if>
</if>
)
) w
GROUP BY w.keyGroup) c
......@@ -2550,7 +2904,7 @@
ID = #{id}
</update>
<select id="getTPaymentSocialPushCount" resultType="java.lang.Long">
<!--<select id="getTPaymentSocialPushCount" resultType="java.lang.Long">
SELECT
count(1)
FROM t_payment_info a
......@@ -2558,7 +2912,7 @@
a.PUSH_STATUS = '1' AND a.SOCIAL_ID IS NOT NULL AND a.CREATE_BY = #{userId}
<include refid="tPaymentInfo_export_where"/>
</where>
</select>
</select>-->
<!--tPaymentInfo公积金推送查询-->
<select id="getTPaymentFundPushCount" resultType="java.lang.Long">
......@@ -2701,7 +3055,7 @@
AND a.EMP_ID = #{tPaymentInfo.empId}
</if>
<if test="tPaymentInfo.empIdcard != null and tPaymentInfo.empIdcard.trim() != ''">
AND a.EMP_IDCARD like CONCAT(#{tPaymentInfo.empIdcard},'%')
AND a.EMP_IDCARD = #{tPaymentInfo.empIdcard}
</if>
<if test="tPaymentInfo.unitId != null and tPaymentInfo.unitId.trim() != ''">
AND a.UNIT_ID = #{tPaymentInfo.unitId}
......@@ -3201,5 +3555,146 @@
</where>
) z GROUP BY z.EMP_ID
</select>
<select id="selectCountPaymentSearchInfoSocial" resultType="java.lang.Integer">
SELECT
<!--<if test="tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != '' and tPaymentInfo.socialHousehold == null">
distinct a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH,a.SETTLE_DOMAIN_CODE
</if>
<if test="tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''">
distinct a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH,a.SETTLE_DOMAIN_CODE
</if>-->
<choose>
<when test="tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != '' and tPaymentInfo.socialHousehold == null">
COUNT(DISTINCT CONCAT(a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH)) as 'count'
</when>
<when test="tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''">
COUNT(DISTINCT CONCAT(a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH)) as 'count'
</when>
<otherwise>
COUNT(DISTINCT CONCAT(a.EMP_IDCARD,IFNULL(a.SOCIAL_PAY_MONTH,a.PROVIDENT_PAY_MONTH),IFNULL(a.SOCIAL_CREATE_MONTH,a.PROVIDENT_CREATE_MONTH))) as 'count'
</otherwise>
</choose>
FROM t_payment_info a
<where>
<include refid="tPaymentInfo_export_count_where"/>
</where>
</select>
<select id="selectCountPaymentSearchInfoSocialByLimit" resultType="java.lang.Integer">
SELECT
<!--<if test="tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != '' and tPaymentInfo.socialHousehold == null">
distinct a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH
</if>
<if test="tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''">
distinct a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH
</if>-->
<choose>
<when test="tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != '' and tPaymentInfo.socialHousehold == null">
COUNT(DISTINCT CONCAT(a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH)) as 'count'
</when>
<when test="tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''">
COUNT(DISTINCT CONCAT(a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH)) as 'count'
</when>
<otherwise>
COUNT(DISTINCT CONCAT(a.EMP_IDCARD,IFNULL(a.SOCIAL_PAY_MONTH,a.PROVIDENT_PAY_MONTH),IFNULL(a.SOCIAL_CREATE_MONTH,a.PROVIDENT_CREATE_MONTH))) as 'count'
</otherwise>
</choose>
FROM t_payment_info a
<where>
<include refid="tPaymentInfo_export_count_where"/>
</where>
limit 20001
</select>
<select id="selectCountPaymentSearchInfoFund" resultType="java.lang.Integer">
SELECT
count(1)
FROM (
select
1
from (
(SELECT
distinct a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH
FROM t_payment_info a
<where>
IFNULL(a.FUND_ID,'1') != '1'
<include refid="tPaymentInfo_export_fund_where"/>
</where>
)
) w ) c
</select>
<!--tPaymentInfo合并查询 通过keygroup获取对应数据-->
<select id="getSumByKeyGroupSocial" resultMap="tPaymentInfoSumMap">
SELECT
CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH) AS keyGroup,
SUM( IFNULL(a.SUM_ALL,0) ) AS SUM_ALL,
SUM( IFNULL(a.SOCIAL_SUM,0) ) AS SOCIAL_SUM,
0 AS PROVIDENT_SUM,
a.SOCIAL_HOUSEHOLD,
a.SOCIAL_PAY_ADDR,
null PROVIDENT_HOUSEHOLD,
null PROVIDENT_PAY_ADDR
FROM t_payment_info a
<where>
<if test="empIdcard != null and empIdcard !=''">
AND a.EMP_IDCARD = #{empIdcard}
</if>
<if test="empIdcard == null or empIdcard ==''">
AND a.EMP_IDCARD is null
</if>
<if test="payMonth != null and payMonth !=''">
AND a.SOCIAL_PAY_MONTH = #{payMonth}
</if>
<if test="payMonth == null or payMonth ==''">
AND a.SOCIAL_PAY_MONTH is null
</if>
<if test="createMonth != null and createMonth !=''">
AND a.SOCIAL_CREATE_MONTH = #{createMonth}
</if>
<if test="createMonth == null or createMonth ==''">
AND a.SOCIAL_CREATE_MONTH is null
</if>
</where>
GROUP BY a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH
limit 1
</select>
<!--tPaymentInfo合并查询 通过keygroup获取对应数据-->
<select id="getSumByKeyGroupFund" resultMap="tPaymentInfoSumMap">
SELECT
CONCAT( a.EMP_IDCARD, '_', a.PROVIDENT_PAY_MONTH, '_', a.PROVIDENT_CREATE_MONTH) AS keyGroup,
SUM( IFNULL(a.SUM_ALL,0) ) AS SUM_ALL,
SUM( IFNULL(a.PROVIDENT_SUM,0) ) AS PROVIDENT_SUM,
0 AS SOCIAL_SUM,
null SOCIAL_HOUSEHOLD,
null SOCIAL_PAY_ADDR,
a.PROVIDENT_HOUSEHOLD,
a.PROVIDENT_PAY_ADDR
FROM t_payment_info a
<where>
<if test="empIdcard != null and empIdcard !=''">
AND a.EMP_IDCARD = #{empIdcard}
</if>
<if test="empIdcard == null or empIdcard ==''">
AND a.EMP_IDCARD is null
</if>
<if test="payMonth != null and payMonth !=''">
AND a.PROVIDENT_PAY_MONTH = #{payMonth}
</if>
<if test="payMonth == null or payMonth ==''">
AND a.PROVIDENT_PAY_MONTH is null
</if>
<if test="createMonth != null and createMonth !=''">
AND a.PROVIDENT_CREATE_MONTH = #{createMonth}
</if>
<if test="createMonth == null or createMonth ==''">
AND a.PROVIDENT_CREATE_MONTH is null
</if>
</where>
GROUP BY a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH
limit 1
</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