Commit a58b8929 authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP1.6.4' into MVP1.6.4

parents 99e10a8a c1499191
...@@ -16,9 +16,7 @@ ...@@ -16,9 +16,7 @@
*/ */
package com.yifu.cloud.plus.v1.yifu.archives.entity; package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat; import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat; 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.ExcelAttribute;
...@@ -27,11 +25,11 @@ import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity; ...@@ -27,11 +25,11 @@ import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.Max; import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
...@@ -462,4 +460,13 @@ public class TEmployeeInfo extends BaseEntity { ...@@ -462,4 +460,13 @@ public class TEmployeeInfo extends BaseEntity {
@TableField(exist = false) @TableField(exist = false)
private String nameOrIdcard; private String nameOrIdcard;
//开始时间(查询专用)
@Schema(description = "创建开始时间")
@TableField(exist = false)
private LocalDateTime createTimeStart;
//截止时间(查询专用)
@Schema(description = "创建截止时间")
@TableField(exist = false)
private LocalDateTime createTimeEnd;
} }
...@@ -408,4 +408,13 @@ public class TEmployeeProject extends BaseEntity { ...@@ -408,4 +408,13 @@ public class TEmployeeProject extends BaseEntity {
@TableField(exist = false) @TableField(exist = false)
private String oldDeptNo; private String oldDeptNo;
//开始时间(查询专用)
@Schema(description = "创建开始时间")
@TableField(exist = false)
private LocalDateTime createTimeStart;
//截止时间(查询专用)
@Schema(description = "创建截止时间")
@TableField(exist = false)
private LocalDateTime createTimeEnd;
} }
...@@ -20,6 +20,7 @@ import com.alibaba.excel.annotation.ExcelProperty; ...@@ -20,6 +20,7 @@ import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat; import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth; import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.HeadFontStyle; import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity; import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
...@@ -501,6 +502,16 @@ public class EmployeeProjectExportParamVO extends BaseEntity { ...@@ -501,6 +502,16 @@ public class EmployeeProjectExportParamVO extends BaseEntity {
private List<String> idList; private List<String> idList;
//开始时间(查询专用)
@Schema(description = "创建开始时间")
@TableField(exist = false)
private LocalDateTime createTimeStart;
//截止时间(查询专用)
@Schema(description = "创建截止时间")
@TableField(exist = false)
private LocalDateTime createTimeEnd;
/** /**
* @Author fxj * @Author fxj
* 查询数据起 * 查询数据起
......
...@@ -822,10 +822,6 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -822,10 +822,6 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
errorMsg.add(EmployeeConstants.ID_PROVINCE); errorMsg.add(EmployeeConstants.ID_PROVINCE);
errorMsgMap.put(lineNum, new ErrorMessage(EmployeeConstants.ID_PROVINCE)); errorMsgMap.put(lineNum, new ErrorMessage(EmployeeConstants.ID_PROVINCE));
} }
if (Common.isEmpty(employeeInfo.getEmpRegisType())) {
errorMsg.add(EmployeeConstants.EMP_REGIS_TYPE);
errorMsgMap.put(lineNum, new ErrorMessage(EmployeeConstants.EMP_REGIS_TYPE));
}
if (Common.isEmpty(employeeInfo.getFileProvince())) { if (Common.isEmpty(employeeInfo.getFileProvince())) {
errorMsg.add(EmployeeConstants.FILE_PROVINCE); errorMsg.add(EmployeeConstants.FILE_PROVINCE);
errorMsgMap.put(lineNum, new ErrorMessage(EmployeeConstants.FILE_PROVINCE)); errorMsgMap.put(lineNum, new ErrorMessage(EmployeeConstants.FILE_PROVINCE));
...@@ -1928,9 +1924,6 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -1928,9 +1924,6 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if (Common.isEmpty(employeeInfo.getIdProvince())) { if (Common.isEmpty(employeeInfo.getIdProvince())) {
errorMsg.add(EmployeeConstants.ID_PROVINCE); errorMsg.add(EmployeeConstants.ID_PROVINCE);
} }
if (Common.isEmpty(employeeInfo.getEmpRegisType())) {
errorMsg.add(EmployeeConstants.EMP_REGIS_TYPE);
}
if (Common.isEmpty(employeeInfo.getFileProvince())) { if (Common.isEmpty(employeeInfo.getFileProvince())) {
errorMsg.add(EmployeeConstants.FILE_PROVINCE); errorMsg.add(EmployeeConstants.FILE_PROVINCE);
} }
......
...@@ -503,6 +503,12 @@ ...@@ -503,6 +503,12 @@
#{idStr} #{idStr}
</foreach> </foreach>
</if> </if>
<if test="tEmployeeInfo.createTimeStart != null">
AND a.CREATE_TIME <![CDATA[ >= ]]> #{tEmployeeInfo.createTimeStart}
</if>
<if test="tEmployeeInfo.createTimeEnd != null">
AND a.CREATE_TIME <![CDATA[ <= ]]> #{tEmployeeInfo.createTimeEnd}
</if>
</if> </if>
</if> </if>
</sql> </sql>
......
...@@ -432,6 +432,13 @@ ...@@ -432,6 +432,13 @@
<if test="tEmployeeProject.empLabel != null"> <if test="tEmployeeProject.empLabel != null">
AND a.EMP_LABEL = #{tEmployeeProject.empLabel} AND a.EMP_LABEL = #{tEmployeeProject.empLabel}
</if> </if>
<if test="tEmployeeProject.createTimeStart != null">
AND a.CREATE_TIME <![CDATA[ >= ]]> #{tEmployeeProject.createTimeStart}
</if>
<if test="tEmployeeProject.createTimeEnd != null">
AND a.CREATE_TIME <![CDATA[ <= ]]> #{tEmployeeProject.createTimeEnd}
</if>
</if> </if>
</sql> </sql>
...@@ -595,6 +602,13 @@ ...@@ -595,6 +602,13 @@
<if test="tEmployeeProject.empLabel != null"> <if test="tEmployeeProject.empLabel != null">
AND a.EMP_LABEL = #{tEmployeeProject.empLabel} AND a.EMP_LABEL = #{tEmployeeProject.empLabel}
</if> </if>
<if test="tEmployeeProject.createTimeStart != null">
AND a.CREATE_TIME <![CDATA[ >= ]]> #{tEmployeeProject.createTimeStart}
</if>
<if test="tEmployeeProject.createTimeEnd != null">
AND a.CREATE_TIME <![CDATA[ <= ]]> #{tEmployeeProject.createTimeEnd}
</if>
</if> </if>
</sql> </sql>
......
...@@ -144,22 +144,24 @@ ...@@ -144,22 +144,24 @@
<!-- 根据结算单编码获取视图信息 --> <!-- 根据结算单编码获取视图信息 -->
<select id="selectSalarylViewBySettleNo" resultMap="BaseResultSocialStatusMap"> <select id="selectSalarylViewBySettleNo" resultMap="BaseResultSocialStatusMap">
select SELECT
a.detailsId, gongzi.fd_3b10afe8c70742 AS detailsId,
if(a.earningStatus = '已结算','0',if(a.earningStatus = '结算中','1',if(a.earningStatus = '已冻结','3','2'))) earningStatus, if(gongzi.fd_3adfee4ba5ad36 = '已结算','0',if(gongzi.fd_3adfee4ba5ad36 = '结算中','1',if(gongzi.fd_3adfee4ba5ad36 = '已冻结','3','2'))) earningStatus,
if(a.receiptStatus = '已收','0',if(a.receiptStatus = '垫付','2','1')) receiptStatus, if(jiesuandan.fd_3b46bb64c5a172 = '已收','0',if(jiesuandan.fd_3b46bb64c5a172 = '垫付','2','1')) receiptStatus,
if(a.zhichuEarningStatus = '已结算','0',if(a.zhichuEarningStatus = '结算中','1','2')) zhichuEarningStatus, if(gongzi.fd_3adfeef9440ab2 = '已结算','0',if(gongzi.fd_3adfeef9440ab2 = '结算中','1','2')) zhichuEarningStatus,
if(a.payStatus = '已付','0','1') payStatus if(fukuan.fd_3b148bc0c28e48 = '已付','0','1') payStatus
from FROM
view_salary_info a ekp_salary_info gongzi
LEFT JOIN ekp_39864c6f16e8f4f9ebc3 jiesuandan ON gongzi.fd_3adfee5dd14866 = jiesuandan.fd_3adff6ff7f48e4
LEFT JOIN ekp_db4ed54e25543f4b7a9a fukuan ON gongzi.fd_id = fukuan.fd_3b1fe00b0f5dde
where where
1 = 1 1 = 1
<if test="payFlag != null and payFlag != '' and payFlag == 0"> <if test="payFlag != null and payFlag != '' and payFlag == 0">
and a.earningNo = #{settleNo} and gongzi.fd_3adfee5dd14866 = #{settleNo}
</if> </if>
<if test="payFlag != null and payFlag != '' and payFlag == 1"> <if test="payFlag != null and payFlag != '' and payFlag == 1">
and a.zhichuEarningNo = #{settleNo} and gongzi.fd_3aeadf17522642 = #{settleNo}
</if> </if>
</select> </select>
</mapper> </mapper>
......
...@@ -466,6 +466,14 @@ public class TSalaryStandard extends BaseEntity { ...@@ -466,6 +466,14 @@ public class TSalaryStandard extends BaseEntity {
@Schema(description = "业务类型三级分类") @Schema(description = "业务类型三级分类")
private String businessThirdType; private String businessThirdType;
/**
* 表格类型 0 薪资原表 1 系统模板
*/
@ExcelAttribute(name = "表格类型 0 薪资原表 1 系统模板")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("表格类型 0 薪资原表 1 系统模板")
private String excelType;
/** /**
* 工资月份-起 * 工资月份-起
*/ */
......
...@@ -42,4 +42,6 @@ public class SalaryUploadParamVo { ...@@ -42,4 +42,6 @@ public class SalaryUploadParamVo {
// 数据行,从0开始计数的 // 数据行,从0开始计数的
Integer dataNum; Integer dataNum;
// 表格类型 0 薪资原表 1 系统模板
String excelType;
} }
...@@ -349,7 +349,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -349,7 +349,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
} }
} }
if (salary != null) { if (salary != null) {
if (Common.isNotNull(vo.getExcelType())) {
salary.setExcelType(vo.getExcelType());
}
// 薪资导入、删除前加锁: // 薪资导入、删除前加锁:
TSalaryLock lock = salaryLockService.lambdaQuery() TSalaryLock lock = salaryLockService.lambdaQuery()
.eq(TSalaryLock::getDeptId, dept.getId()) .eq(TSalaryLock::getDeptId, dept.getId())
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
*/ */
package com.yifu.cloud.plus.v1.yifu.salary.service.impl; package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
import cn.hutool.core.util.ArrayUtil;
import com.alibaba.excel.EasyExcelFactory; import com.alibaba.excel.EasyExcelFactory;
import com.alibaba.excel.ExcelWriter; import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet; import com.alibaba.excel.write.metadata.WriteSheet;
...@@ -32,7 +31,6 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; ...@@ -32,7 +31,6 @@ 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.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil; import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardIssue;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardOriginal; import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardOriginal;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardOriginalDetail; import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardOriginalDetail;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryStandardOriginalMapper; import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryStandardOriginalMapper;
...@@ -1012,6 +1010,7 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand ...@@ -1012,6 +1010,7 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
// 最后转化为jsonString // 最后转化为jsonString
jsonString = JSON.toJSON(contentList).toString(); jsonString = JSON.toJSON(contentList).toString();
SalaryUploadParamVo returnVo = new SalaryUploadParamVo(); SalaryUploadParamVo returnVo = new SalaryUploadParamVo();
returnVo.setExcelType(CommonConstants.ZERO_STRING);
returnVo.setDataNum(vo.getDataNum()); returnVo.setDataNum(vo.getDataNum());
returnVo.setCheckList(checkList); returnVo.setCheckList(checkList);
returnVo.setJsonString(jsonString); returnVo.setJsonString(jsonString);
...@@ -1051,7 +1050,7 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand ...@@ -1051,7 +1050,7 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
response.setCharacterEncoding("utf-8"); response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8)); response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭 // 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcelFactory.write(out, TSalaryStandardIssueExportVo.class).build(); ExcelWriter excelWriter = EasyExcelFactory.write(out, TSalaryOriginalExportVo.class).build();
int index = 0; int index = 0;
if (count > CommonConstants.ZERO_INT) { if (count > CommonConstants.ZERO_INT) {
for (int i = 0; i <= count; i = i + CommonConstants.EXCEL_EXPORT_LIMIT) { for (int i = 0; i <= count; i = i + CommonConstants.EXCEL_EXPORT_LIMIT) {
......
...@@ -84,6 +84,7 @@ ...@@ -84,6 +84,7 @@
<result property="setId" column="SET_ID"/> <result property="setId" column="SET_ID"/>
<result property="deleteUser" column="DELETE_USER"/> <result property="deleteUser" column="DELETE_USER"/>
<result property="deleteDate" column="DELETE_DATE"/> <result property="deleteDate" column="DELETE_DATE"/>
<result property="excelType" column="EXCEL_TYPE"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
...@@ -145,7 +146,8 @@ ...@@ -145,7 +146,8 @@
a.INCOME_MONTH, a.INCOME_MONTH,
a.SET_ID, a.SET_ID,
a.DELETE_USER, a.DELETE_USER,
a.DELETE_DATE a.DELETE_DATE,
a.EXCEL_TYPE
</sql> </sql>
<sql id="tSalaryStandard_where"> <sql id="tSalaryStandard_where">
<if test="tSalaryStandard != null"> <if test="tSalaryStandard != null">
...@@ -293,6 +295,9 @@ ...@@ -293,6 +295,9 @@
<if test="tSalaryStandard.isDiff != null and tSalaryStandard.isDiff.trim() != ''"> <if test="tSalaryStandard.isDiff != null and tSalaryStandard.isDiff.trim() != ''">
AND a.IS_DIFF = #{tSalaryStandard.isDiff} AND a.IS_DIFF = #{tSalaryStandard.isDiff}
</if> </if>
<if test="tSalaryStandard.excelType != null and tSalaryStandard.excelType.trim() != ''">
AND a.EXCEL_TYPE = #{tSalaryStandard.excelType}
</if>
</if> </if>
</sql> </sql>
<!--tSalaryStandard简单分页查询--> <!--tSalaryStandard简单分页查询-->
......
...@@ -1048,5 +1048,11 @@ public class TSocialInfo extends BaseEntity { ...@@ -1048,5 +1048,11 @@ public class TSocialInfo extends BaseEntity {
// 派单id,社保士兵使用 // 派单id,社保士兵使用
@TableField(exist = false) @TableField(exist = false)
private String dispatchId; private String dispatchId;
// 过期Flag,0未过期,1过期,社保士兵使用(过期的自动变为中止办理)
@TableField(exist = false)
private String ygsOverDueFlag;
// 过期Flag,0未过期,1过期,社保士兵使用(过期的自动变为中止办理)
@TableField(exist = false)
private String ysdOverDueFlag;
} }
...@@ -5,6 +5,8 @@ import com.alibaba.excel.annotation.ExcelProperty; ...@@ -5,6 +5,8 @@ import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/** /**
* @Author hgw * @Author hgw
...@@ -18,77 +20,109 @@ public class SocialSoldierYgsAddVo implements Serializable { ...@@ -18,77 +20,109 @@ public class SocialSoldierYgsAddVo implements Serializable {
@ExcelIgnore @ExcelIgnore
private String socialId; private String socialId;
//企业名称 证件类型 身份证号码 姓名 国籍 个人身份 民族 参加工作日期 工资 @ExcelProperty("派单类型")
// 文化程度 户口性质 增员年月 户口所在地 用工形式 手机号码 通讯地址 就业登记时间 单位就业起始时间 合同期限类型 private String type;
//合同起始时间 合同终止日期 录用工种代码 合同签订类别 工作时间制度 养老参保日期 工伤参保日期 失业参保日期 @ExcelProperty("社保办理状态")
// 户口所在地行政区划代码 居住所在地行政区划代码 当前经办行政区划代码 补缴原因 回传信息 回传信息1 回传信息2 private String socialHandleStatus;
@ExcelProperty("企业名称") @ExcelProperty("养老状态")
private String socialHouseholdName; private String pensionHandle;
@ExcelProperty("证件类型") @ExcelProperty("医疗状态")
private String idCardType; private String medicalHandle;
@ExcelProperty("身份证号码") @ExcelProperty("失业状态")
private String empIdCard; private String unemployHandle;
@ExcelProperty("姓名") @ExcelProperty("工伤状态")
private String workInjuryHandle;
@ExcelProperty("生育状态")
private String birthHandle;
@ExcelProperty("大病状态")
private String bigailmentHandle;
@ExcelProperty("员工姓名")
private String empName; private String empName;
@ExcelProperty("国籍") @ExcelProperty("员工身份证")
private String country; private String empIdcard;
@ExcelProperty("个人身份") @ExcelProperty("学历")
private String personType;
@ExcelProperty("民族")
private String nation;
@ExcelProperty("参加工作日期")
private String workDate;
@ExcelProperty("工资")
private String recordBase;
@ExcelProperty("文化程度")
private String educationName; private String educationName;
@ExcelProperty("户口性质") @ExcelProperty("客户名称")
private String regisType; private String belongUnit;
@ExcelProperty("增员年月") @ExcelProperty("项目名称")
private String addDate; private String settleDomain;
@ExcelProperty("户口所在地") @ExcelProperty("员工类型")
private String fileAddr; private String empType;
@ExcelProperty("用工形式") @ExcelProperty("岗位")
private String contractName; private String post;
@ExcelProperty("手机号码") @ExcelProperty("手机号码")
private String empMobile; private String empMobile;
@ExcelProperty("通讯地址") @ExcelProperty("身份证所在地")
private String mobileAddr; private String idCardAddress;
@ExcelProperty("就业登记时间") @ExcelProperty("通信地址")
private String dispatchDate; private String contactAddress;
@ExcelProperty("单位就业起始时间") @ExcelProperty("户口性质")
private String workStartDate; private String empRegisType;
@ExcelProperty("合同期限类型") @ExcelProperty("民族")
private String contractDateType; private String empNational;
@ExcelProperty("工时制")
private String workingHours;
@ExcelProperty("合同年限")
private String contractTerm;
@ExcelProperty("合同起始时间") @ExcelProperty("合同起始时间")
private String contractStart; private String contractStart;
@ExcelProperty("合同终止日期") @ExcelProperty("合同到期时间")
private String contractEnd; private String contractEnd;
@ExcelProperty("录用工种代码") @ExcelProperty("申请人")
private String workCode; private String createUserName;
@ExcelProperty("合同签订类别") @ExcelProperty("备案基数")
private String contractType; private String recordBase;
@ExcelProperty("工作时间制度") @ExcelProperty("缴纳类型")
private String workingHours; private String paymentType;
// 养老参保日期 工伤参保日期 失业参保日期 @ExcelProperty("社保户")
@ExcelProperty("养老参保日期") private String socialHouseholdName;
@ExcelProperty("社保缴纳地-省")
private String socialProvince;
@ExcelProperty("社保缴纳地-市")
private String socialCity;
@ExcelProperty("社保缴纳地-县")
private String socialTown;
@ExcelProperty("养老起缴日期")
private String pensionStart; private String pensionStart;
@ExcelProperty("工伤参保日期") ;
private String workInjuryStart; @ExcelProperty("养老基数")
@ExcelProperty("失业参保日期") private BigDecimal unitPensionCardinal;
@ExcelProperty("医疗起缴日期")
private String medicalStart;
@ExcelProperty("医疗基数")
private BigDecimal unitMedicalCardinal;
@ExcelProperty("失业起缴日期")
private String unemployStart; private String unemployStart;
@ExcelProperty("户口所在地行政区划代码") @ExcelProperty("失业基数")
private String huAddr; private BigDecimal unitUnemploymentCardinal;
@ExcelProperty("居住所在地行政区划代码") @ExcelProperty("工伤起缴日期")
private String zhuAddr; private String workInjuryStart;
@ExcelProperty("当前经办行政区划代码") @ExcelProperty("工伤基数")
private String banAddr; private BigDecimal unitWorkInjuryCardinal;
@ExcelProperty("补缴原因") @ExcelProperty("生育起缴日期")
private String buRemark; private String birthStart;
@ExcelProperty("回传信息") @ExcelProperty("生育基数")
private String huiRemark; private BigDecimal unitBirthCardinal;
@ExcelProperty("回传信息1") @ExcelProperty("大病起缴日期")
private String huiRemark1; private String bigailmentStart;
@ExcelProperty("回传信息2") @ExcelProperty("大病缴纳基数")
private String huiRemark2; private BigDecimal unitBigailmentCardinal;
@ExcelProperty("单位大病金额")
private BigDecimal unitBigailmentMoney;
@ExcelProperty("个人大病金额")
private BigDecimal personalBigailmentMoney;
@ExcelProperty("委托备注")
private String socailTrustRemark;
@ExcelProperty("减少原因")
private String reduceReason;
@ExcelProperty("是否已导出")
private String exportSocialFlag;
@ExcelProperty(value = "学校")
private String schoolName;
@ExcelProperty(value = "专业")
private String major;
@ExcelProperty("毕业时间")
private Date graduationTime;
@ExcelProperty(value = "首次至缴纳地时间")
private Date firstPayTime;
} }
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @Author hgw
* @Description 社保士兵养工失减少模板
* @Date 2024-5-10 21:05:29
**/
@Data
public class SocialSoldierYgsReduceVo implements Serializable {
// 社保id,用于回写
@ExcelIgnore
private String socialId;
//企业名称 姓名 身份证号码 减员原因 备案解除二级原因 备案解除三级原因 回传信息 回传信息1 回传信息2
@ExcelProperty("企业名称")
private String socialHouseholdName;
@ExcelProperty("姓名")
private String empName;
@ExcelProperty("身份证号码")
private String empIdCard;
@ExcelProperty("减员原因")
private String reduceReason;
@ExcelProperty("备案解除二级原因")
private String twoRemark;
@ExcelProperty("备案解除三级原因")
private String threeRemark;
@ExcelProperty("回传信息")
private String huiRemark;
@ExcelProperty("回传信息1")
private String huiRemark1;
@ExcelProperty("回传信息2")
private String huiRemark2;
}
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @Author hgw
* @Description 社保士兵医生大增加模板
* @Date 2024-5-11 10:28:45
**/
@Data
public class SocialSoldierYsdAddVo implements Serializable {
// 社保id,用于回写
@ExcelIgnore
private String socialId;
//企业名称 证件类型 证件号码 姓名 民族 学历 手机号码 人员类型 申报工资
//用工形式 编制类型 参保日期 合同起止日期 原参保日期
// 基本医疗保险 大额医疗费用补助 生育保险
// 回传信息 回传信息1 回传信息2
@ExcelProperty("企业名称")
private String socialHouseholdName;
@ExcelProperty("证件类型")
private String idCardType;
@ExcelProperty("证件号码")
private String empIdCard;
@ExcelProperty("姓名")
private String empName;
@ExcelProperty("民族")
private String nation;
@ExcelProperty("学历")
private String educationName;
@ExcelProperty("手机号码")
private String empMobile;
// 人员类型:职工在职
@ExcelProperty("人员类型")
private String empType;
@ExcelProperty("申报工资")
private String recordBase;
@ExcelProperty("用工形式")
private String contractName;
// 编制类型:非在编
@ExcelProperty("编制类型")
private String bianType;
@ExcelProperty("参保日期")
private String socialDate;
// 合同起止日期:空
@ExcelProperty("合同起止日期")
private String contractDate;
// 原参保日期
@ExcelProperty("原参保日期")
private String socialDateOld;
// 基本医疗保险 大额医疗费用补助 生育保险
@ExcelProperty("基本医疗保险")
private BigDecimal unitMedicalMoney;
@ExcelProperty("大额医疗费用补助")
private BigDecimal unitBigailmentMoney;
@ExcelProperty("生育保险")
private BigDecimal unitBirthMoney;
@ExcelProperty("回传信息")
private String huiRemark;
@ExcelProperty("回传信息1")
private String huiRemark1;
@ExcelProperty("回传信息2")
private String huiRemark2;
}
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @Author hgw
* @Description 社保士兵医生大减少模板
* @Date 2024-5-11 10:28:36
**/
@Data
public class SocialSoldierYsdReduceVo implements Serializable {
// 社保id,用于回写
@ExcelIgnore
private String socialId;
//企业名称 证件类型 证件号码 姓名 中断原因 中断时间 回传信息 回传信息1 回传信息2
@ExcelProperty("企业名称")
private String socialHouseholdName;
@ExcelProperty("证件类型")
private String idCardType;
@ExcelProperty("证件号码")
private String empIdCard;
@ExcelProperty("姓名")
private String empName;
@ExcelProperty("中断原因")
private String reduceReason;
@ExcelProperty("中断时间")
private String reduceDate;
@ExcelProperty("回传信息")
private String huiRemark;
@ExcelProperty("回传信息1")
private String huiRemark1;
@ExcelProperty("回传信息2")
private String huiRemark2;
}
...@@ -18,10 +18,14 @@ package com.yifu.cloud.plus.v1.yifu.social.vo; ...@@ -18,10 +18,14 @@ package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle; import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo; import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
/** /**
* 派单信息记录表 * 派单信息记录表
...@@ -50,4 +54,14 @@ public class TDispatchInfoPageVo extends TDispatchInfo { ...@@ -50,4 +54,14 @@ public class TDispatchInfoPageVo extends TDispatchInfo {
@ExcelProperty("公积金户名称" ) @ExcelProperty("公积金户名称" )
private String providentHouseholdName; private String providentHouseholdName;
// 社保办理页面查询使用,判断能否办理
@Schema(description = "养工失状态:(0空、1待办理、2自动办理中、3继续办理、4终止办理、5人工处理、6成功)" )
@ExcelProperty("养工失状态" )
@TableField(exist = false)
private String ygsHandleStatus;
@Schema(description = "医生大状态:(0空、1待办理、2自动办理中、3继续办理、4终止办理、5人工处理、6成功)" )
@TableField(exist = false)
private String ysdHandleStatus;
} }
...@@ -78,7 +78,7 @@ public class TSocialSoldierController { ...@@ -78,7 +78,7 @@ public class TSocialSoldierController {
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String> * @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/ **/
@Operation(description = "1定时任务获取社保士兵状态") @Operation(description = "1定时任务获取社保士兵状态")
@GetMapping("/inner/doInnerGetFiveJob") @PostMapping("/inner/doInnerGetFiveJob")
@SysLog("每日1定时任务获取社保士兵状态") @SysLog("每日1定时任务获取社保士兵状态")
@Inner @Inner
public R<String> doInnerGetFiveJob() { public R<String> doInnerGetFiveJob() {
...@@ -92,7 +92,7 @@ public class TSocialSoldierController { ...@@ -92,7 +92,7 @@ public class TSocialSoldierController {
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String> * @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/ **/
@Operation(description = "2定时任务推送社保士兵") @Operation(description = "2定时任务推送社保士兵")
@GetMapping("/inner/doInnerPushSoldier") @PostMapping("/inner/doInnerPushSoldier")
@SysLog("每日2定时任务推送社保士兵") @SysLog("每日2定时任务推送社保士兵")
@Inner @Inner
public R<String> doInnerPushSoldier() { public R<String> doInnerPushSoldier() {
......
...@@ -46,17 +46,17 @@ public interface TSocialSoldierMapper extends BaseMapper<TSocialInfo> { ...@@ -46,17 +46,17 @@ public interface TSocialSoldierMapper extends BaseMapper<TSocialInfo> {
* @Author hgw * @Author hgw
* @Date 2024-5-10 21:16:41 * @Date 2024-5-10 21:16:41
**/ **/
List<SocialSoldierYgsReduceVo> getSocialSoldierYgsReduceVoList(@Param("idsStr") List<String> idsStr); List<SocialSoldierYgsAddVo> getSocialSoldierYgsReduceVoList(@Param("idsStr") List<String> idsStr);
/** /**
* 社保士兵养工失增加模板 * 社保士兵养工失增加模板
* @Author hgw * @Author hgw
* @Date 2024-5-10 21:16:41 * @Date 2024-5-10 21:16:41
**/ **/
List<SocialSoldierYsdAddVo> getSocialSoldierYsdAddVoList(@Param("idsStr") List<String> idsStr); List<SocialSoldierYgsAddVo> getSocialSoldierYsdAddVoList(@Param("idsStr") List<String> idsStr);
/** /**
* 社保士兵养工失增加模板 * 社保士兵养工失增加模板
* @Author hgw * @Author hgw
* @Date 2024-5-10 21:16:41 * @Date 2024-5-10 21:16:41
**/ **/
List<SocialSoldierYsdReduceVo> getSocialSoldierYsdReduceVoList(@Param("idsStr") List<String> idsStr); List<SocialSoldierYgsAddVo> getSocialSoldierYsdReduceVoList(@Param("idsStr") List<String> idsStr);
} }
...@@ -3343,6 +3343,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3343,6 +3343,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
boolean isSSC; boolean isSSC;
String autoFlag; String autoFlag;
TDispatchSocialFundInfo socialFundInfo; TDispatchSocialFundInfo socialFundInfo;
// 是否自动化办理,true:推送到社保士兵
boolean isAuto;
for (TDispatchInfo dis : dispatchs) { for (TDispatchInfo dis : dispatchs) {
autoFlag = autoFlagMap.get(dis.getId()); autoFlag = autoFlagMap.get(dis.getId());
if (Common.isEmpty(autoFlag)){ if (Common.isEmpty(autoFlag)){
...@@ -3603,12 +3605,15 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3603,12 +3605,15 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (CommonConstants.ONE_STRING.equals(auditStatus)){ if (CommonConstants.ONE_STRING.equals(auditStatus)){
dis.setAutoFlag(CommonConstants.ONE_STRING); dis.setAutoFlag(CommonConstants.ONE_STRING);
} }
// 初始化为非自动办理
isAuto = false;
//自动化处理,如果未配置还是人工处理 //自动化处理,如果未配置还是人工处理
if (CommonConstants.THREE_STRING.equals(auditStatus)){ if (CommonConstants.THREE_STRING.equals(auditStatus)){
// 自动化处理 // 自动化处理
if (CommonConstants.ZERO_STRING.equals(autoFlag)){ if (CommonConstants.ZERO_STRING.equals(autoFlag)){
dis.setSocialHandleStatus(CommonConstants.FOUR_STRING);
dis.setAutoFlag(CommonConstants.ZERO_STRING); dis.setAutoFlag(CommonConstants.ZERO_STRING);
socialTask.pushSoldier(dis.getId()); isAuto = true;
}else { }else {
dis.setAutoFlag(CommonConstants.ONE_STRING); dis.setAutoFlag(CommonConstants.ONE_STRING);
} }
...@@ -3616,6 +3621,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3616,6 +3621,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
} }
baseMapper.updateById(dis); baseMapper.updateById(dis);
socialFundMapper.updateById(sf); socialFundMapper.updateById(sf);
if (isAuto) {
socialTask.pushSoldier(dis.getId());
}
//派减的申请审核完更新社保公积金查询快照表 //派减的申请审核完更新社保公积金查询快照表
if (CommonConstants.ONE_STRING.equals(dis.getType())) { if (CommonConstants.ONE_STRING.equals(dis.getType())) {
......
...@@ -28,9 +28,6 @@ import com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialSoldierMapper; ...@@ -28,9 +28,6 @@ import com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialSoldierMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialInfoService; import com.yifu.cloud.plus.v1.yifu.social.service.TSocialInfoService;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialSoldierPushService; import com.yifu.cloud.plus.v1.yifu.social.service.TSocialSoldierPushService;
import com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYgsAddVo; import com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYgsAddVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYgsReduceVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYsdAddVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYsdReduceVo;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.apache.commons.compress.utils.IOUtils; import org.apache.commons.compress.utils.IOUtils;
...@@ -44,7 +41,6 @@ import org.springframework.web.multipart.commons.CommonsMultipartFile; ...@@ -44,7 +41,6 @@ import org.springframework.web.multipart.commons.CommonsMultipartFile;
import java.io.*; import java.io.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -82,17 +78,17 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap ...@@ -82,17 +78,17 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
if (Common.isNotNull(terminalId)) { if (Common.isNotNull(terminalId)) {
// 3上传文件,获取文件地址 // 3上传文件,获取文件地址
String fileAddUrl = socialConfig.getThreeTerminalId(restTemplate, file); String fileAddUrl = socialConfig.getThreeTerminalId(restTemplate, file);
log.info(fileAddUrl);
// 4 推送办理任务,返回任务id: // 4 推送办理任务,返回任务id:
String addId = socialConfig.getFourAppAdd(restTemplate, fileAddUrl, moduleDetailMap.get(type), terminalId); String addId = socialConfig.getFourAppAdd(restTemplate, fileAddUrl, moduleDetailMap.get(type), terminalId);
log.info(addId);
for (TSocialInfo socialInfo : socialList) { for (TSocialInfo socialInfo : socialList) {
if ("社保增员".equals(type) || "社保减员".equals(type)) { if ("社保增员".equals(type) || "社保减员".equals(type)) {
socialInfo.setYgsAddId(addId); socialInfo.setYgsAddId(addId);
socialInfo.setYgsHandleStatus(CommonConstants.TWO_STRING); socialInfo.setYgsHandleStatus(CommonConstants.TWO_STRING);
log.error("社保增员TWO_STRING="+socialInfo.getId());
} else { } else {
socialInfo.setYsdAddId(addId); socialInfo.setYsdAddId(addId);
socialInfo.setYsdHandleStatus(CommonConstants.TWO_STRING); socialInfo.setYsdHandleStatus(CommonConstants.TWO_STRING);
log.error("医疗增员TWO_STRING="+socialInfo.getId());
} }
} }
tSocialInfoService.updateBatchById(socialList); tSocialInfoService.updateBatchById(socialList);
...@@ -101,11 +97,11 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap ...@@ -101,11 +97,11 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
return R.ok("推送成功!"); return R.ok("推送成功!");
} }
public MultipartFile getFile(Collection<?> list, Class head) { public MultipartFile getFile(List<SocialSoldierYgsAddVo> list) {
File file = null; File file = null;
if (list != null) { if (list != null) {
String filePath = "socialFile" + DateUtil.getThisTime() + CommonConstants.XLSX; String filePath = "socialFile" + DateUtil.getThisTime() + CommonConstants.XLSX;
EasyExcelFactory.write(filePath, head).sheet("社保明细").doWrite(list); EasyExcelFactory.write(filePath, SocialSoldierYgsAddVo.class).sheet("社保明细").doWrite(list);
file = new File(filePath); file = new File(filePath);
} }
if (file != null) { if (file != null) {
...@@ -140,9 +136,11 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap ...@@ -140,9 +136,11 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
**/ **/
@Override @Override
public R<String> pushSoldier(List<String> dispatchIdList) { public R<String> pushSoldier(List<String> dispatchIdList) {
log.error("dispatchIdList="+dispatchIdList);
// 社保增员、社保减员、医保增员、医保减员 // 社保增员、社保减员、医保增员、医保减员
// 养工失新增列表 // 养工失新增列表
List<SocialSoldierYgsAddVo> ygsAddlist = baseMapper.getSocialSoldierYgsAddVoList(dispatchIdList); List<SocialSoldierYgsAddVo> ygsAddlist = baseMapper.getSocialSoldierYgsAddVoList(dispatchIdList);
log.error("ygsAddlist="+ygsAddlist);
if (ygsAddlist != null && !ygsAddlist.isEmpty()) { if (ygsAddlist != null && !ygsAddlist.isEmpty()) {
List<TSocialInfo> socialIdList = new ArrayList<>(); List<TSocialInfo> socialIdList = new ArrayList<>();
TSocialInfo socialInfo; TSocialInfo socialInfo;
...@@ -151,53 +149,57 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap ...@@ -151,53 +149,57 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
socialInfo.setId(vo.getSocialId()); socialInfo.setId(vo.getSocialId());
socialIdList.add(socialInfo); socialIdList.add(socialInfo);
} }
MultipartFile file = this.getFile(ygsAddlist, SocialSoldierYgsAddVo.class); MultipartFile file = this.getFile(ygsAddlist);
if (Common.isNotNull(file)) { if (Common.isNotNull(file)) {
log.error("社保增员");
this.getOneAppGetModuleDetail(socialIdList, file, "社保增员"); this.getOneAppGetModuleDetail(socialIdList, file, "社保增员");
} }
} }
// 养工失减少列表 // 养工失减少列表
List<SocialSoldierYgsReduceVo> ygsReducelist = baseMapper.getSocialSoldierYgsReduceVoList(dispatchIdList); List<SocialSoldierYgsAddVo> ygsReducelist = baseMapper.getSocialSoldierYgsReduceVoList(dispatchIdList);
if (ygsReducelist != null && !ygsReducelist.isEmpty()) { if (ygsReducelist != null && !ygsReducelist.isEmpty()) {
List<TSocialInfo> socialIdList = new ArrayList<>(); List<TSocialInfo> socialIdList = new ArrayList<>();
TSocialInfo socialInfo; TSocialInfo socialInfo;
for (SocialSoldierYgsReduceVo vo : ygsReducelist) { for (SocialSoldierYgsAddVo vo : ygsReducelist) {
socialInfo = new TSocialInfo(); socialInfo = new TSocialInfo();
socialInfo.setId(vo.getSocialId()); socialInfo.setId(vo.getSocialId());
socialIdList.add(socialInfo); socialIdList.add(socialInfo);
} }
MultipartFile file = this.getFile(ygsReducelist, SocialSoldierYgsReduceVo.class); MultipartFile file = this.getFile(ygsReducelist);
if (Common.isNotNull(file)) { if (Common.isNotNull(file)) {
log.error("社保减员");
this.getOneAppGetModuleDetail(socialIdList, file, "社保减员"); this.getOneAppGetModuleDetail(socialIdList, file, "社保减员");
} }
} }
// 医生大新增列表 // 医生大新增列表
List<SocialSoldierYsdAddVo> ysdAddlist = baseMapper.getSocialSoldierYsdAddVoList(dispatchIdList); List<SocialSoldierYgsAddVo> ysdAddlist = baseMapper.getSocialSoldierYsdAddVoList(dispatchIdList);
if (ysdAddlist != null && !ysdAddlist.isEmpty()) { if (ysdAddlist != null && !ysdAddlist.isEmpty()) {
List<TSocialInfo> socialIdList = new ArrayList<>(); List<TSocialInfo> socialIdList = new ArrayList<>();
TSocialInfo socialInfo; TSocialInfo socialInfo;
for (SocialSoldierYsdAddVo vo : ysdAddlist) { for (SocialSoldierYgsAddVo vo : ysdAddlist) {
socialInfo = new TSocialInfo(); socialInfo = new TSocialInfo();
socialInfo.setId(vo.getSocialId()); socialInfo.setId(vo.getSocialId());
socialIdList.add(socialInfo); socialIdList.add(socialInfo);
} }
MultipartFile file = this.getFile(ysdAddlist, SocialSoldierYsdAddVo.class); MultipartFile file = this.getFile(ysdAddlist);
if (Common.isNotNull(file)) { if (Common.isNotNull(file)) {
log.error("医保增员");
this.getOneAppGetModuleDetail(socialIdList, file, "医保增员"); this.getOneAppGetModuleDetail(socialIdList, file, "医保增员");
} }
} }
// 医生大减少列表 // 医生大减少列表
List<SocialSoldierYsdReduceVo> ysdReducelist = baseMapper.getSocialSoldierYsdReduceVoList(dispatchIdList); List<SocialSoldierYgsAddVo> ysdReducelist = baseMapper.getSocialSoldierYsdReduceVoList(dispatchIdList);
if (ysdReducelist != null && !ysdReducelist.isEmpty()) { if (ysdReducelist != null && !ysdReducelist.isEmpty()) {
List<TSocialInfo> socialIdList = new ArrayList<>(); List<TSocialInfo> socialIdList = new ArrayList<>();
TSocialInfo socialInfo; TSocialInfo socialInfo;
for (SocialSoldierYsdReduceVo vo : ysdReducelist) { for (SocialSoldierYgsAddVo vo : ysdReducelist) {
socialInfo = new TSocialInfo(); socialInfo = new TSocialInfo();
socialInfo.setId(vo.getSocialId()); socialInfo.setId(vo.getSocialId());
socialIdList.add(socialInfo); socialIdList.add(socialInfo);
} }
MultipartFile file = this.getFile(ysdReducelist, SocialSoldierYsdReduceVo.class); MultipartFile file = this.getFile(ysdReducelist);
if (Common.isNotNull(file)) { if (Common.isNotNull(file)) {
log.error("医保减员");
this.getOneAppGetModuleDetail(socialIdList, file, "医保减员"); this.getOneAppGetModuleDetail(socialIdList, file, "医保减员");
} }
} }
......
...@@ -16,23 +16,13 @@ ...@@ -16,23 +16,13 @@
*/ */
package com.yifu.cloud.plus.v1.yifu.social.service.impl; package com.yifu.cloud.plus.v1.yifu.social.service.impl;
import cn.hutool.core.util.ArrayUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.alibaba.excel.util.ListUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; 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.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.salary.vo.ExcelColumnVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.ExcelSheetVo;
import com.yifu.cloud.plus.v1.yifu.social.config.SocialConfig; import com.yifu.cloud.plus.v1.yifu.social.config.SocialConfig;
import com.yifu.cloud.plus.v1.yifu.social.entity.FailReasonConfig; import com.yifu.cloud.plus.v1.yifu.social.entity.FailReasonConfig;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo; import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo;
...@@ -44,7 +34,10 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TSocialSoldierService; ...@@ -44,7 +34,10 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TSocialSoldierService;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialSoldierReturnErrorVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialSoldierReturnErrorVo;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.apache.poi.hssf.usermodel.*; import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.CellType; import org.apache.poi.ss.usermodel.CellType;
import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.AuthorityUtils; import org.springframework.security.core.authority.AuthorityUtils;
...@@ -108,11 +101,12 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -108,11 +101,12 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
for (TSocialInfo socialInfo : socialList) { for (TSocialInfo socialInfo : socialList) {
if (Common.isNotNull(socialInfo.getYgsAddId())) { if (Common.isNotNull(socialInfo.getYgsAddId())) {
addIdSet.add(socialInfo.getYgsAddId()); addIdSet.add(socialInfo.getYgsAddId());
idCardMap.put(socialInfo.getYgsAddId() + CommonConstants.DOWN_LINE_STRING + socialInfo.getEmpIdcard(), socialInfo);
} }
if (Common.isNotNull(socialInfo.getYsdAddId())) { if (Common.isNotNull(socialInfo.getYsdAddId())) {
addIdSet.add(socialInfo.getYsdAddId()); addIdSet.add(socialInfo.getYsdAddId());
idCardMap.put(socialInfo.getYsdAddId() + CommonConstants.DOWN_LINE_STRING + socialInfo.getEmpIdcard(), socialInfo);
} }
idCardMap.put(socialInfo.getEmpIdcard(), socialInfo);
} }
HttpURLConnection conn; HttpURLConnection conn;
InputStream in = null; InputStream in = null;
...@@ -140,7 +134,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -140,7 +134,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
conn.setConnectTimeout(30 * 1000); conn.setConnectTimeout(30 * 1000);
in = conn.getInputStream(); in = conn.getInputStream();
// 实际读取文件内容 // 实际读取文件内容
this.readXls(in, idCardMap, errorMap); this.readXls(in, idCardMap, errorMap, doAddId);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
...@@ -160,7 +154,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -160,7 +154,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} }
public R<List<TSocialSoldierReturnErrorVo>> readXls(InputStream inputStream, Map<String, TSocialInfo> idCardMap public R<List<TSocialSoldierReturnErrorVo>> readXls(InputStream inputStream, Map<String, TSocialInfo> idCardMap
, Map<String, FailReasonConfig> errorMap) { , Map<String, FailReasonConfig> errorMap, String doAddId) {
TSocialSoldierReturnErrorVo vo; TSocialSoldierReturnErrorVo vo;
List<TSocialSoldierReturnErrorVo> voList = new ArrayList<>(); List<TSocialSoldierReturnErrorVo> voList = new ArrayList<>();
HSSFWorkbook sheets = null; HSSFWorkbook sheets = null;
...@@ -297,7 +291,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -297,7 +291,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} }
} }
if (!voList.isEmpty()) { if (!voList.isEmpty()) {
importTSocialInfo(voList, idCardMap, errorMap); importTSocialInfo(voList, idCardMap, errorMap, doAddId);
} }
return R.ok(voList); return R.ok(voList);
} }
...@@ -387,7 +381,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -387,7 +381,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
}*/ }*/
private void importTSocialInfo(List<TSocialSoldierReturnErrorVo> excelVOList, Map<String, TSocialInfo> idCardMap private void importTSocialInfo(List<TSocialSoldierReturnErrorVo> excelVOList, Map<String, TSocialInfo> idCardMap
, Map<String, FailReasonConfig> errorMap) { , Map<String, FailReasonConfig> errorMap, String doAddId) {
// 个性化校验逻辑 // 个性化校验逻辑
// 执行数据插入操作 组装 // 执行数据插入操作 组装
TSocialSoldierReturnErrorVo excel; TSocialSoldierReturnErrorVo excel;
...@@ -423,7 +417,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -423,7 +417,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
// 初始化继续办理 // 初始化继续办理
ygsHandleStatus = CommonConstants.THREE_STRING; ygsHandleStatus = CommonConstants.THREE_STRING;
ysdHandleStatus = CommonConstants.THREE_STRING; ysdHandleStatus = CommonConstants.THREE_STRING;
socialInfo = idCardMap.get(empIdCard); socialInfo = idCardMap.get(doAddId + CommonConstants.DOWN_LINE_STRING + empIdCard);
if (socialInfo != null) { if (socialInfo != null) {
if (typeFlag && if (typeFlag &&
...@@ -441,9 +435,14 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -441,9 +435,14 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} else { } else {
updateSocial.setYgsRemark(excel.getMsg()); updateSocial.setYgsRemark(excel.getMsg());
updateSocial.setYgsRemarkOld(excel.getMsg()); updateSocial.setYgsRemarkOld(excel.getMsg());
// 如果找到了失败原因配置: // 过期自动变为终止
if (Common.isNotNull(excel.getMsg())) { if (CommonConstants.ONE_STRING.equals(socialInfo.getYgsOverDueFlag())) {
failConfig = errorMap.get(excel.getMsg()); updateSocial.setYgsRemarkOld("已过期,自动中止办理!");
ygsHandleStatus = CommonConstants.FOUR_STRING;
ygsFailList.add(socialInfo.getDispatchId());
} else if (Common.isNotNull(excel.getMsg())) {
// 如果找到了失败原因配置:
failConfig = getConfig(excel.getMsg(),errorMap);
if (failConfig != null) { if (failConfig != null) {
updateSocial.setYgsRemark(failConfig.getSimpleReason()); updateSocial.setYgsRemark(failConfig.getSimpleReason());
// failConfig.getReplay() 1 继续办理 2 中止办理 3 人工办理 // failConfig.getReplay() 1 继续办理 2 中止办理 3 人工办理
...@@ -456,6 +455,8 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -456,6 +455,8 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} else if (CommonConstants.THREE_STRING.equals(failConfig.getReplay())) { } else if (CommonConstants.THREE_STRING.equals(failConfig.getReplay())) {
ygsHandleStatus = CommonConstants.FIVE_STRING; ygsHandleStatus = CommonConstants.FIVE_STRING;
} }
} else {
ygsHandleStatus = CommonConstants.FIVE_STRING;
} }
} }
} }
...@@ -477,9 +478,14 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -477,9 +478,14 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} else { } else {
updateSocial.setYsdRemark(excel.getMsg()); updateSocial.setYsdRemark(excel.getMsg());
updateSocial.setYsdRemarkOld(excel.getMsg()); updateSocial.setYsdRemarkOld(excel.getMsg());
// 如果找到了失败原因配置: // 过期自动变为终止
if (Common.isNotNull(excel.getMsg())) { if (CommonConstants.ONE_STRING.equals(socialInfo.getYsdOverDueFlag())) {
failConfig = errorMap.get(excel.getMsg()); updateSocial.setYsdRemarkOld("已过期,自动中止办理!");
ysdHandleStatus = CommonConstants.FOUR_STRING;
ysdFailList.add(socialInfo.getDispatchId());
} else if (Common.isNotNull(excel.getMsg())) {
// 如果找到了失败原因配置:
failConfig = getConfig(excel.getMsg(),errorMap);
if (failConfig != null) { if (failConfig != null) {
updateSocial.setYsdRemark(failConfig.getSimpleReason()); updateSocial.setYsdRemark(failConfig.getSimpleReason());
// failConfig.getReplay() 1 继续办理 2 中止办理 3 人工办理 // failConfig.getReplay() 1 继续办理 2 中止办理 3 人工办理
...@@ -492,6 +498,8 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -492,6 +498,8 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} else if (CommonConstants.THREE_STRING.equals(failConfig.getReplay())) { } else if (CommonConstants.THREE_STRING.equals(failConfig.getReplay())) {
ysdHandleStatus = CommonConstants.FIVE_STRING; ysdHandleStatus = CommonConstants.FIVE_STRING;
} }
} else {
ysdHandleStatus = CommonConstants.FIVE_STRING;
} }
} }
} }
...@@ -547,6 +555,21 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -547,6 +555,21 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} }
} }
/**
* @Description: 查找失败原因的关键字
* @Author: hgw
* @Date: 2024/5/14 17:55
* @return: com.yifu.cloud.plus.v1.yifu.social.entity.FailReasonConfig
**/
private FailReasonConfig getConfig(String msg, Map<String, FailReasonConfig> errorMap) {
for (Map.Entry<String, FailReasonConfig> config : errorMap.entrySet()) {
if (msg.contains(config.getKey())) {
return config.getValue();
}
}
return null;
}
/** /**
* 调用成功的社保办理 * 调用成功的社保办理
* *
......
...@@ -269,9 +269,14 @@ public class DoSocialTask { ...@@ -269,9 +269,14 @@ public class DoSocialTask {
* @return * @return
**/ **/
@Async @Async
public void pushSoldier(String dispatchId){ public void pushSoldier(String dispatchId) {
List<String> dispatchIdList = new ArrayList<>(); List<String> dispatchIdList = new ArrayList<>();
dispatchIdList.add(dispatchId); dispatchIdList.add(dispatchId);
try {
Thread.sleep(60000);
} catch (InterruptedException e) {
e.printStackTrace();
}
tSocialSoldierPushService.pushSoldier(dispatchIdList); tSocialSoldierPushService.pushSoldier(dispatchIdList);
} }
} }
...@@ -112,6 +112,9 @@ ...@@ -112,6 +112,9 @@
<result property="socialHouseholdName" column="SOCIAL_HOUSEHOLD_NAME"/> <result property="socialHouseholdName" column="SOCIAL_HOUSEHOLD_NAME"/>
<result property="exportFundFlag" column="EXPORT_FUND_FLAG"/> <result property="exportFundFlag" column="EXPORT_FUND_FLAG"/>
<result property="exportSocialFlag" column="EXPORT_SOCIAL_FLAG"/> <result property="exportSocialFlag" column="EXPORT_SOCIAL_FLAG"/>
<result property="ygsHandleStatus" column="YGS_HANDLE_STATUS"/>
<result property="ysdHandleStatus" column="YSD_HANDLE_STATUS"/>
</resultMap> </resultMap>
<!-- 派单导出vo --> <!-- 派单导出vo -->
<resultMap id="exportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoExportVo"> <resultMap id="exportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoExportVo">
...@@ -1316,7 +1319,7 @@ ...@@ -1316,7 +1319,7 @@
<select id="getTDispatchSocialHandlePage" resultMap="dispatchPageMap"> <select id="getTDispatchSocialHandlePage" resultMap="dispatchPageMap">
SELECT SELECT
<include refid="Base_Column_List"/>, <include refid="Base_Column_List"/>,
a.SOCIAL_HOUSEHOLD_NAME,a.EXPORT_SOCIAL_FLAG a.SOCIAL_HOUSEHOLD_NAME,a.EXPORT_SOCIAL_FLAG,s.YGS_HANDLE_STATUS,s.YSD_HANDLE_STATUS
FROM t_dispatch_info a FROM t_dispatch_info a
left join t_social_info s on a.SOCIAL_ID = s.id 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 t_dispatch_social_fund_info h on a.id = h.REDUCE_SOCIAL_FUND_ID
...@@ -1733,34 +1736,9 @@ ...@@ -1733,34 +1736,9 @@
<!-- 社保士兵列表查询 --> <!-- 社保士兵列表查询 -->
<sql id="where_getSocialSoldier"> <sql id="where_getSocialSoldier">
<where> <where>
s.DELETE_FLAG = 0 a.DELETE_FLAG = '0'
/** 社保办理状态:0待办理/1已办理2办理失败3已派减4 办理中 5 部分办理失败 派单社保办理状态 0 未办理 1 全部办理成功(原-已办理) 2 全部办理失败(原-办理失败) 3 部分办理成功 4 办理中 **/
/*社保代办理 1.派单审核通过 2.派增(type=0):待办理(social_handle_status='0') or 派减(type=1):已办理完成或部分办理失败 且已派减*/
AND a.social_id is not null AND a.social_id is not null
AND a.STATUS = "2"
and (( a.type = '0' AND (s.HANDLE_STATUS = "0" or s.HANDLE_STATUS = "4") ) or ( a.type ='1' AND (if(ifnull(h.id,0) != '0',h.HANDLE_STATUS,s.HANDLE_STATUS) in ('1','5','6','3','7') or (s.HANDLE_STATUS in ('1','5','6','3','7') and s.REDUCE_CAN = '1')) ))
and a.SOCIAL_HANDLE_STATUS in ('0','4')
and a.AUTO_FLAG = '0' and a.AUTO_FLAG = '0'
<!--<if test="tDispatchInfo.status != null and tDispatchInfo.status.trim() != ''">
/*待办理组合判断*/
<if test="'2'.toString() == tDispatchInfo.status.trim() and tDispatchInfo.typeSub != null ">
/*社保代办理*/
<if test=" '0'.toString()==tDispatchInfo.typeSub.trim() ">
<if test="tDispatchInfo.socialHandleStatus != null and tDispatchInfo.socialHandleStatus != ''">
</if>
<if test="tDispatchInfo.socialHandleStatus == null or tDispatchInfo.socialHandleStatus == ''">
and (( a.type = '0' AND b.HANDLE_STATUS in ('0','4')) or ( a.type ='1' AND b.HANDLE_STATUS in ('1','5') and b.REDUCE_CAN = '1'))
and a.SOCIAL_HANDLE_STATUS in ('0','4')
</if>
</if>
/* 公积金办理*/
<if test=" '1'.toString()==tDispatchInfo.typeSub.trim() ">
and (( a.type = '0' AND c.HANDLE_STATUS = '0') or ( a.type ='1' AND c.HANDLE_STATUS = '1' and c.REDUCE_CAN = '1'))
and a.FUND_HANDLE_STATUS='0'
</if>
</if>
</if>-->
<include refid="where_getSocialRecordRoster_base"/> <include refid="where_getSocialRecordRoster_base"/>
<if test="tDispatchInfo != null"> <if test="tDispatchInfo != null">
......
...@@ -147,6 +147,8 @@ ...@@ -147,6 +147,8 @@
<result property="ygsAddId" column="YGS_ADD_ID"/> <result property="ygsAddId" column="YGS_ADD_ID"/>
<result property="ysdAddId" column="YSD_ADD_ID"/> <result property="ysdAddId" column="YSD_ADD_ID"/>
<result property="dispatchId" column="DISPATCH_ID"/> <result property="dispatchId" column="DISPATCH_ID"/>
<result property="ygsOverDueFlag" column="YGS_OVER_DUE_FLAG"/>
<result property="ysdOverDueFlag" column="YSD_OVER_DUE_FLAG"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
...@@ -590,14 +592,15 @@ ...@@ -590,14 +592,15 @@
a.YGS_ADD_ID, a.YGS_ADD_ID,
a.HANDLE_STATUS, a.HANDLE_STATUS,
a.YGS_HANDLE_STATUS, a.YGS_HANDLE_STATUS,
d.id as DISPATCH_ID d.id as DISPATCH_ID,
if((sd.id is not null and NOW() <![CDATA[ <= ]]> sd.SOCIAL_END_DATE) or ( sd.id is null and DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(now(),'%Y%m')),0 ,1) YGS_OVER_DUE_FLAG
FROM t_social_info a FROM t_social_info a
left join t_dispatch_info d on d.SOCIAL_ID = a.id left join t_dispatch_info d on d.SOCIAL_ID = a.id
left join t_social_deadline_info sd on sd.MONTH = DATE_FORMAT(d.AUDIT_TIME,'%Y%m') and sd.STATUS = '0' left join t_social_deadline_info sd on sd.MONTH = DATE_FORMAT(d.AUDIT_TIME,'%Y%m') and sd.STATUS = '0'
and sd.PROVINCE=a.SOCIAL_PROVINCE and sd.CITY=a.SOCIAL_CITY and ( (a.SOCIAL_TOWN is null and sd.TOWN is null) or (sd.TOWN=a.SOCIAL_TOWN)) and sd.PROVINCE=a.SOCIAL_PROVINCE and sd.CITY=a.SOCIAL_CITY and ( (a.SOCIAL_TOWN is null and sd.TOWN is null) or (sd.TOWN=a.SOCIAL_TOWN))
where a.YGS_ADD_ID is not null and DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(now(),'%Y%m') where a.YGS_ADD_ID is not null and d.AUTO_FLAG='0'
and (DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(now(),'%Y%m') or DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m'))
and a.YGS_HANDLE_STATUS in ('1','2','3') and a.YGS_HANDLE_STATUS in ('1','2','3')
and (sd.id is null or NOW() <![CDATA[ <= ]]> sd.SOCIAL_END_DATE)
group by a.id group by a.id
</select> </select>
...@@ -609,14 +612,15 @@ ...@@ -609,14 +612,15 @@
a.YSD_ADD_ID, a.YSD_ADD_ID,
a.HANDLE_STATUS, a.HANDLE_STATUS,
a.YSD_HANDLE_STATUS, a.YSD_HANDLE_STATUS,
d.id as DISPATCH_ID d.id as DISPATCH_ID,
if((sd.id is not null and NOW() <![CDATA[ <= ]]> sd.MEDICAL_END_DATE) or ( sd.id is null and DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(now(),'%Y%m')),0 ,1) YSD_OVER_DUE_FLAG
FROM t_social_info a FROM t_social_info a
left join t_dispatch_info d on d.SOCIAL_ID = a.id left join t_dispatch_info d on d.SOCIAL_ID = a.id
left join t_social_deadline_info sd on sd.MONTH = DATE_FORMAT(d.AUDIT_TIME,'%Y%m') and sd.STATUS = '0' left join t_social_deadline_info sd on sd.MONTH = DATE_FORMAT(d.AUDIT_TIME,'%Y%m') and sd.STATUS = '0'
and sd.PROVINCE=a.SOCIAL_PROVINCE and sd.CITY=a.SOCIAL_CITY and ( (a.SOCIAL_TOWN is null and sd.TOWN is null) or (sd.TOWN=a.SOCIAL_TOWN)) and sd.PROVINCE=a.SOCIAL_PROVINCE and sd.CITY=a.SOCIAL_CITY and ( (a.SOCIAL_TOWN is null and sd.TOWN is null) or (sd.TOWN=a.SOCIAL_TOWN))
where a.YSD_ADD_ID is not null and DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(now(),'%Y%m') where a.YSD_ADD_ID is not null and d.AUTO_FLAG='0'
and (DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(now(),'%Y%m') or DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m'))
and a.YSD_HANDLE_STATUS in ('1','2','3') and a.YSD_HANDLE_STATUS in ('1','2','3')
and (sd.id is null or NOW() <![CDATA[ <= ]]> sd.MEDICAL_END_DATE)
group by a.id group by a.id
</select> </select>
......
...@@ -501,7 +501,8 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl ...@@ -501,7 +501,8 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
List<PersonVo> list = ldapUtil.getAllPersons(); List<PersonVo> list = ldapUtil.getAllPersons();
if (null != list) { if (null != list) {
List<SysUser> listUser = this.list(Wrappers.<SysUser>query().lambda() List<SysUser> listUser = this.list(Wrappers.<SysUser>query().lambda()
.eq(SysUser::getType, CommonConstants.STATUS_NORMAL) .eq(SysUser::getType, CommonConstants.ZERO_STRING)
.eq(SysUser::getSystemFlag, CommonConstants.ONE_STRING)
.eq(SysUser::getDelFlag, CommonConstants.STATUS_NORMAL)); .eq(SysUser::getDelFlag, CommonConstants.STATUS_NORMAL));
List<String> list1 = listUser.stream().map(SysUser::getUsername).collect(Collectors.toList()); List<String> list1 = listUser.stream().map(SysUser::getUsername).collect(Collectors.toList());
//筛选出不存在的用户重置为不可用 //筛选出不存在的用户重置为不可用
...@@ -509,10 +510,12 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl ...@@ -509,10 +510,12 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
List<String> collect = list1.stream().filter(s -> !list2.contains(s) List<String> collect = list1.stream().filter(s -> !list2.contains(s)
).collect(Collectors.toList()); ).collect(Collectors.toList());
log.info("要重置为不可用的用户列表:" + collect); log.info("要重置为不可用的用户列表:" + collect);
LambdaUpdateWrapper<SysUser> settleUpdate = new LambdaUpdateWrapper<>(); if (!collect.isEmpty()) {
settleUpdate.set(SysUser::getDelFlag,CommonConstants.ONE_STRING); LambdaUpdateWrapper<SysUser> settleUpdate = new LambdaUpdateWrapper<>();
settleUpdate.in(SysUser::getUsername,collect); settleUpdate.in(SysUser::getUsername, collect)
this.update(settleUpdate); .set(SysUser::getDelFlag, CommonConstants.ONE_STRING);
this.update(settleUpdate);
}
List<PersonVo> updateList = new ArrayList<>(); List<PersonVo> updateList = new ArrayList<>();
List<PersonVo> insertList = new ArrayList<>(); List<PersonVo> insertList = new ArrayList<>();
...@@ -775,7 +778,9 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl ...@@ -775,7 +778,9 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
* @return * @return
*/ */
private void updateOrSaveUser(JSONArray updateParamsArr) { private void updateOrSaveUser(JSONArray updateParamsArr) {
List<SysUser> listUser = this.list(Wrappers.<SysUser>query().lambda().eq(SysUser::getDelFlag, CommonConstants.STATUS_NORMAL)); List<SysUser> listUser = this.list(Wrappers.<SysUser>query().lambda()
.eq(SysUser::getType, CommonConstants.STATUS_NORMAL)
.eq(SysUser::getDelFlag, CommonConstants.STATUS_NORMAL));
List<String> list1 = listUser.stream().map(SysUser::getUsername).collect(Collectors.toList()); List<String> list1 = listUser.stream().map(SysUser::getUsername).collect(Collectors.toList());
List<PersonVo> updateList = new ArrayList<>(); List<PersonVo> updateList = new ArrayList<>();
List<PersonVo> insertList = new ArrayList<>(); List<PersonVo> insertList = new ArrayList<>();
......
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