Commit 07c59013 authored by fangxinjiang's avatar fangxinjiang

社保公积金待购买起缴日期查询及导出-fxj

parent 6c590873
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
/**
* 社保待购买表
......@@ -21,6 +24,7 @@ public class TDispatchInfoPreExportVo implements Serializable {
*/
@ExcelAttribute(name = "项目名称")
@Schema(description = "项目名称")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("项目名称")
private String deptName;
/**
......@@ -28,6 +32,7 @@ public class TDispatchInfoPreExportVo implements Serializable {
*/
@ExcelAttribute(name = "项目编码")
@Schema(description = "项目编码")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("项目编码")
private String deptNo;
/**
......@@ -35,6 +40,7 @@ public class TDispatchInfoPreExportVo implements Serializable {
*/
@ExcelAttribute(name = "员工姓名")
@Schema(description = "员工姓名")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("员工姓名")
private String empName;
/**
......@@ -42,6 +48,7 @@ public class TDispatchInfoPreExportVo implements Serializable {
*/
@ExcelAttribute(name = "身份证号")
@Schema(description = "身份证号")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("身份证号")
private String empIdcard;
/**
......@@ -49,6 +56,7 @@ public class TDispatchInfoPreExportVo implements Serializable {
*/
@ExcelAttribute(name = "社保户")
@Schema(description = "社保户")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保户")
private String socialHouseholdName;
/**
......@@ -56,6 +64,7 @@ public class TDispatchInfoPreExportVo implements Serializable {
*/
@ExcelAttribute(name = "备案基数")
@Schema(description = "备案基数")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("备案基数")
private String recordBase;
/**
......@@ -63,6 +72,7 @@ public class TDispatchInfoPreExportVo implements Serializable {
*/
@ExcelAttribute(name = "入职日期")
@Schema(description = "入职日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("入职日期")
private String joinLeaveDate;
/**
......@@ -70,6 +80,8 @@ public class TDispatchInfoPreExportVo implements Serializable {
*/
@ExcelAttribute(name = "合同签署状态")
@Schema(description = "合同签署状态 0已签署 1未签署")
@HeadFontStyle(fontHeightInPoints = 11)
@ColumnWidth(15)
@ExcelProperty("合同签署状态")
private String contractStatus;
......@@ -78,6 +90,8 @@ public class TDispatchInfoPreExportVo implements Serializable {
*/
@ExcelAttribute(name = "社保购买状态")
@Schema(description = "社保购买状态,0待确认,1待派单,2派单失败,3待审核,4审核不通过,5待办理,6办理中,7办理成功,8办理失败,9部分办理失败")
@HeadFontStyle(fontHeightInPoints = 11)
@ColumnWidth(15)
@ExcelProperty("社保购买状态")
private String processStatus;
/**
......@@ -85,6 +99,8 @@ public class TDispatchInfoPreExportVo implements Serializable {
*/
@ExcelAttribute(name = "预计派单时间")
@Schema(description = "预计派单时间")
@HeadFontStyle(fontHeightInPoints = 11)
@ColumnWidth(18)
@ExcelProperty("预计派单时间")
private LocalDateTime expectedCollectionTime;
/**
......@@ -92,7 +108,63 @@ public class TDispatchInfoPreExportVo implements Serializable {
*/
@ExcelAttribute(name = "前端客服")
@Schema(description = "前端客服")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("前端客服")
private String customerUsername;
/**
* 养老起缴日期
*/
@ExcelAttribute(name = "养老起缴日期", isDate = true)
@ExcelProperty("养老起缴日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ColumnWidth(15)
@Schema(description = "养老起缴日期")
private String pensionStart;
/**
* 医疗起缴日期
*/
@ExcelAttribute(name = "医疗起缴日期", isDate = true)
@ExcelProperty("医疗起缴日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ColumnWidth(15)
@Schema(description = "医疗起缴日期")
private String medicalStart;
/**
* 失业起缴日期
*/
@ExcelAttribute(name = "失业起缴日期", isDate = true)
@ExcelProperty("失业起缴日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ColumnWidth(15)
@Schema(description = "失业起缴日期")
private String unemployStart;
/**
* 工伤起缴日期
*/
@ExcelAttribute(name = "工伤起缴日期", isDate = true)
@ExcelProperty("工伤起缴日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ColumnWidth(15)
@Schema(description = "工伤起缴日期")
private String workInjuryStart;
/**
* 生育起缴日期
*/
@ExcelAttribute(name = "生育起缴日期", isDate = true)
@ExcelProperty("生育起缴日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ColumnWidth(15)
@Schema(description = "生育起缴日期")
private String birthStart;
/**
* 大病起缴日期
*/
@ExcelAttribute(name = "大病起缴日期", isDate = true)
@ExcelProperty("大病起缴日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ColumnWidth(15)
@Schema(description = "大病起缴日期")
private String bigailmentStart;
}
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.headers.Header;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
/**
* 公积金待购买表
......@@ -64,6 +69,7 @@ public class TDispatchInfoPreFundExportVo implements Serializable {
@ExcelAttribute(name = "公积金基数")
@Schema(description = "公积金基数")
@HeadFontStyle(fontHeightInPoints = 11)
@ColumnWidth(15)
@ExcelProperty("公积金基数")
private String providentCardinal;
......@@ -73,6 +79,7 @@ public class TDispatchInfoPreFundExportVo implements Serializable {
@ExcelAttribute(name = "单位公积金缴纳比例")
@Schema(description = "单位公积金缴纳比例")
@HeadFontStyle(fontHeightInPoints = 11)
@ColumnWidth(20)
@ExcelProperty("单位公积金缴纳比例")
private BigDecimal unitProvidentPer;
/**
......@@ -81,6 +88,7 @@ public class TDispatchInfoPreFundExportVo implements Serializable {
@ExcelAttribute(name = "个人公积金缴纳比例")
@Schema(description = "个人公积金缴纳比例")
@HeadFontStyle(fontHeightInPoints = 11)
@ColumnWidth(20)
@ExcelProperty("个人公积金缴纳比例")
private BigDecimal personalProvidentPer;
/**
......@@ -96,6 +104,7 @@ public class TDispatchInfoPreFundExportVo implements Serializable {
@ExcelAttribute(name = "合同签署状态")
@Schema(description = "合同签署状态 0已签署 1未签署")
@HeadFontStyle(fontHeightInPoints = 11)
@ColumnWidth(15)
@ExcelProperty("合同签署状态")
private String contractStatus;
......@@ -105,6 +114,7 @@ public class TDispatchInfoPreFundExportVo implements Serializable {
@ExcelAttribute(name = "公积金购买状态")
@Schema(description = "公积金购买状态,0待确认,1待派单,2派单失败,3待审核,4审核不通过,5待办理,6办理中,7办理成功,8办理失败,9部分办理失败")
@HeadFontStyle(fontHeightInPoints = 11)
@ColumnWidth(18)
@ExcelProperty("公积金购买状态")
private String processStatus;
/**
......@@ -113,6 +123,7 @@ public class TDispatchInfoPreFundExportVo implements Serializable {
@ExcelAttribute(name = "预计派单时间")
@Schema(description = "预计派单时间")
@HeadFontStyle(fontHeightInPoints = 11)
@ColumnWidth(18)
@ExcelProperty("预计派单时间")
private LocalDateTime expectedCollectionTime;
/**
......@@ -124,4 +135,13 @@ public class TDispatchInfoPreFundExportVo implements Serializable {
@ExcelProperty("前端客服")
private String customerUsername;
/**
* 起缴日期 (公积金起缴日期)
*/
@ExcelAttribute(name = "公积金起缴日期", isDate = true)
@Schema(description = "起缴日期(公积金起缴日期)")
@ColumnWidth(15)
@ExcelProperty("公积金起缴日期")
private String fundStartDate;
}
......@@ -63,4 +63,21 @@ public class TDispatchInfoPreSearchVo extends TDispatchInfoPre {
@Schema(description = "自动标识 1查询派单时间为空或者当天之前的数据")
private String timeSendFlag;
@Schema(description = "公积金起缴日期开始时间")
@TableField(exist = false)
private String fundTimeStart;
@Schema(description = "公积金起缴日期截止时间")
@TableField(exist = false)
private String fundTimeEnd;
@Schema(description = "社保起缴日期开始时间")
@TableField(exist = false)
private String socialTimeStart;
@Schema(description = "社保起缴日期截止时间")
@TableField(exist = false)
private String socialTimeEnd;
}
......@@ -104,6 +104,15 @@
<result property="socialHouseholdName" column="SOCIAL_HOUSEHOLD_NAME"/>
<result property="recordBase" column="RECORD_BASE"/>
<result property="contractStatus" column="CONTRACT_STATUS"/>
<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"/>
</resultMap>
<resultMap id="tDispatchInfoPreFundExportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPreFundExportVo">
......@@ -120,6 +129,8 @@
<result property="unitProvidentPer" column="UNIT_PROVIDENT_PER"/>
<result property="personalProvidentPer" column="PERSONAL_PROVIDENT_PER"/>
<result property="contractStatus" column="CONTRACT_STATUS"/>
<result property="fundStartDate" column="FUND_START_DATE"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
......@@ -282,6 +293,34 @@
#{idStr}
</foreach>
</if>
<!-- 公积金起缴日期查询 -->
<if test="tDispatchInfoPre.fundTimeStart != null">
AND DATE_FORMAT(a.FUND_START_DATE,'%Y-%m-%d') <![CDATA[ >= ]]> #{tDispatchInfoPre.fundTimeStart}
</if>
<if test="tDispatchInfoPre.fundTimeEnd != null">
AND DATE_FORMAT(a.FUND_START_DATE,'%Y-%m-%d') <![CDATA[ <= ]]> #{tDispatchInfoPre.fundTimeEnd}
</if>
<!-- 社保五险起缴日期查询,有一个符合就出现 -->
<if test="tDispatchInfoPre.socialTimeStart != null">
AND (
(a.PENSION_START is not null and DATE_FORMAT(a.PENSION_START,'%Y-%m-%d') <![CDATA[ >= ]]> #{tDispatchInfoPre.socialTimeStart} ) or
(a.MEDICAL_START is not null and DATE_FORMAT(a.MEDICAL_START,'%Y-%m-%d') <![CDATA[ >= ]]> #{tDispatchInfoPre.socialTimeStart} ) or
(a.WORK_INJURY_START is not null and DATE_FORMAT(a.WORK_INJURY_START,'%Y-%m-%d') <![CDATA[ >= ]]> #{tDispatchInfoPre.socialTimeStart} ) or
(a.UNEMPLOY_START is not null and DATE_FORMAT(a.UNEMPLOY_START,'%Y-%m-%d') <![CDATA[ >= ]]> #{tDispatchInfoPre.socialTimeStart} ) or
(a.BIRTH_START is not null and DATE_FORMAT(a.BIRTH_START,'%Y-%m-%d') <![CDATA[ >= ]]> #{tDispatchInfoPre.socialTimeStart} ) or
(a.BIGAILMENT_START is not null and DATE_FORMAT(a.BIGAILMENT_START,'%Y-%m-%d') <![CDATA[ >= ]]> #{tDispatchInfoPre.socialTimeStart}) )
)
</if>
<if test="tDispatchInfoPre.socialTimeEnd != null">
AND (
(a.PENSION_START is not null and DATE_FORMAT(a.PENSION_START,'%Y-%m-%d') <![CDATA[ <= ]]> #{tDispatchInfoPre.socialTimeEnd} ) or
(a.MEDICAL_START is not null and DATE_FORMAT(a.MEDICAL_START,'%Y-%m-%d') <![CDATA[ <= ]]> #{tDispatchInfoPre.socialTimeEnd} ) or
(a.WORK_INJURY_START is not null and DATE_FORMAT(a.WORK_INJURY_START,'%Y-%m-%d') <![CDATA[ <= ]]> #{tDispatchInfoPre.socialTimeEnd} ) or
(a.UNEMPLOY_START is not null and DATE_FORMAT(a.UNEMPLOY_START,'%Y-%m-%d') <![CDATA[ <= ]]> #{tDispatchInfoPre.socialTimeEnd} ) or
(a.BIRTH_START is not null and DATE_FORMAT(a.BIRTH_START,'%Y-%m-%d') <![CDATA[ <= ]]> #{tDispatchInfoPre.socialTimeEnd} ) or
(a.BIGAILMENT_START is not null and DATE_FORMAT(a.BIGAILMENT_START,'%Y-%m-%d') <![CDATA[ <= ]]> #{tDispatchInfoPre.socialTimeEnd} )
)
</if>
</if>
</sql>
......@@ -368,6 +407,34 @@
#{idStr}
</foreach>
</if>
<!-- 公积金起缴日期查询 -->
<if test="tDispatchInfoPre.fundTimeStart != null">
AND DATE_FORMAT(a.FUND_START_DATE,'%Y-%m-%d') <![CDATA[ >= ]]> #{tDispatchInfoPre.fundTimeStart}
</if>
<if test="tDispatchInfoPre.fundTimeEnd != null">
AND DATE_FORMAT(a.FUND_START_DATE,'%Y-%m-%d') <![CDATA[ <= ]]> #{tDispatchInfoPre.fundTimeEnd}
</if>
<!-- 社保五险起缴日期查询,有一个符合就出现 -->
<if test="tDispatchInfoPre.socialTimeStart != null">
AND (
(a.PENSION_START is not null and DATE_FORMAT(a.PENSION_START,'%Y-%m-%d') <![CDATA[ >= ]]> #{tDispatchInfoPre.socialTimeStart} ) or
(a.MEDICAL_START is not null and DATE_FORMAT(a.MEDICAL_START,'%Y-%m-%d') <![CDATA[ >= ]]> #{tDispatchInfoPre.socialTimeStart} ) or
(a.WORK_INJURY_START is not null and DATE_FORMAT(a.WORK_INJURY_START,'%Y-%m-%d') <![CDATA[ >= ]]> #{tDispatchInfoPre.socialTimeStart} ) or
(a.UNEMPLOY_START is not null and DATE_FORMAT(a.UNEMPLOY_START,'%Y-%m-%d') <![CDATA[ >= ]]> #{tDispatchInfoPre.socialTimeStart} ) or
(a.BIRTH_START is not null and DATE_FORMAT(a.BIRTH_START,'%Y-%m-%d') <![CDATA[ >= ]]> #{tDispatchInfoPre.socialTimeStart} ) or
(a.BIGAILMENT_START is not null and DATE_FORMAT(a.BIGAILMENT_START,'%Y-%m-%d') <![CDATA[ >= ]]> #{tDispatchInfoPre.socialTimeStart}) )
)
</if>
<if test="tDispatchInfoPre.socialTimeEnd != null">
AND (
(a.PENSION_START is not null and DATE_FORMAT(a.PENSION_START,'%Y-%m-%d') <![CDATA[ <= ]]> #{tDispatchInfoPre.socialTimeEnd} ) or
(a.MEDICAL_START is not null and DATE_FORMAT(a.MEDICAL_START,'%Y-%m-%d') <![CDATA[ <= ]]> #{tDispatchInfoPre.socialTimeEnd} ) or
(a.WORK_INJURY_START is not null and DATE_FORMAT(a.WORK_INJURY_START,'%Y-%m-%d') <![CDATA[ <= ]]> #{tDispatchInfoPre.socialTimeEnd} ) or
(a.UNEMPLOY_START is not null and DATE_FORMAT(a.UNEMPLOY_START,'%Y-%m-%d') <![CDATA[ <= ]]> #{tDispatchInfoPre.socialTimeEnd} ) or
(a.BIRTH_START is not null and DATE_FORMAT(a.BIRTH_START,'%Y-%m-%d') <![CDATA[ <= ]]> #{tDispatchInfoPre.socialTimeEnd} ) or
(a.BIGAILMENT_START is not null and DATE_FORMAT(a.BIGAILMENT_START,'%Y-%m-%d') <![CDATA[ <= ]]> #{tDispatchInfoPre.socialTimeEnd} )
)
</if>
</if>
</sql>
<!--tDispatchInfoPre简单分页查询-->
......@@ -441,7 +508,13 @@
WHEN a.process_status ='9' THEN "部分办理失败"
ELSE a.process_status END as process_status,
a.expected_collection_time,
a.customer_username
a.customer_username,
a.PENSION_START,
a.MEDICAL_START,
a.WORK_INJURY_START,
a.UNEMPLOY_START,
a.BIRTH_START,
a.BIGAILMENT_START
FROM t_dispatch_info_pre a
left join view_contract b on a.EMP_IDCARD = b.EMP_IDCARD and a.DEPT_NO = b.DEPT_NO
<where>
......@@ -478,7 +551,8 @@
WHEN a.process_status ='9' THEN "部分办理失败"
ELSE a.process_status END as process_status,
a.expected_collection_time,
a.customer_username
a.customer_username,
a.FUND_START_DATE
FROM t_dispatch_info_pre a
left join view_contract b on a.EMP_IDCARD = b.EMP_IDCARD and a.DEPT_NO = b.DEPT_NO
<where>
......
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