Commit 5e7ee08b authored by fangxinjiang's avatar fangxinjiang

人员花名册

parent 8421f442
......@@ -17,17 +17,18 @@
package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
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 com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
......@@ -48,6 +49,7 @@ public class TPersonnelRoster{
@ExcelProperty("id")
@Schema(description = "id")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelIgnore
private String id;
/**
* 客户名称
......@@ -160,6 +162,8 @@ public class TPersonnelRoster{
/**
* 出生日期
*/
@DateTimeFormat("yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
@ExcelAttribute(name = "出生日期", isDate = true)
@ExcelProperty("出生日期")
@Schema(description = "出生日期")
......@@ -410,13 +414,14 @@ public class TPersonnelRoster{
@HeadFontStyle(fontHeightInPoints = 11)
private String contractCreateTime;
/**
* 数据生
* 数据生
*/
@ExcelAttribute(name = "数据生月", maxLength = 10)
@Length(max = 10, message = "数据生月不能超过10个字符")
@ExcelProperty("数据生月")
@Schema(description = "数据生月")
@ExcelAttribute(name = "数据生月", maxLength = 10)
@Length(max = 10, message = "数据生月不能超过10个字符")
@ExcelProperty("数据生月")
@Schema(description = "数据生月")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelIgnore
private String dataCreateMonth;
}
......@@ -63,4 +63,10 @@ public class TPersonnelRosterSearchVo extends TPersonnelRoster {
* BU归属
**/
private List<String> buBelongs;
/**
* @Author fxj
* 员工类型
**/
private List<String> empTypes;
}
......@@ -350,20 +350,12 @@ public class TPersonnelRosterVo extends RowIndex implements Serializable {
@ExcelProperty("合同创建时间")
private String contractCreateTime;
/**
* 数据生
* 数据生
*/
@Length(max = 10, message = "数据生月 不能超过10 个字符")
@ExcelAttribute(name = "数据生月", maxLength = 10)
@Schema(description = "数据生月")
@ExcelProperty("数据生月")
@Length(max = 10, message = "数据生月 不能超过10 个字符")
@ExcelAttribute(name = "数据生月", maxLength = 10)
@Schema(description = "数据生月")
@ExcelProperty("数据生月")
private String dataCreateMonth;
/**
* dataCreateMomth
*/
@Length(max = 255, message = "dataCreateMomth 不能超过255 个字符")
@ExcelAttribute(name = "dataCreateMomth", maxLength = 255)
@Schema(description = "dataCreateMomth")
@ExcelProperty("dataCreateMomth")
private String dataCreateMomth;
}
......@@ -20,6 +20,7 @@ import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TPersonnelRoster;
......@@ -83,7 +84,7 @@ public class TPersonnelRosterServiceImpl extends ServiceImpl<TPersonnelRosterMap
*/
@Override
public void listExport(HttpServletResponse response, TPersonnelRosterSearchVo searchVo){
String fileName = "批量导出" + DateUtil.getThisTime() + ".xlsx";
String fileName = "人员花名册" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<TPersonnelRoster> list = new ArrayList<>();
long count = noPageCountDiy(searchVo);
......@@ -148,6 +149,9 @@ public class TPersonnelRosterServiceImpl extends ServiceImpl<TPersonnelRosterMap
@Override
public void everyMonthUpdateRoster() {
// 清空重新生成
baseMapper.delete(Wrappers.<TPersonnelRoster>query().lambda()
.eq(TPersonnelRoster::getDataCreateMonth,DateUtil.getYearAndMonth(LocalDateTime.now(),0)));
TPersonnelRosterSearchVo searchVo = new TPersonnelRosterSearchVo();
long count = baseMapper.getTPersonnelRosterCount(searchVo);
List<TPersonnelRoster> list;
......
......@@ -189,7 +189,7 @@
AND a.EMP_TOWN = #{tPersonnelRoster.empTown}
</if>
<if test="tPersonnelRoster.socialProvince != null and tPersonnelRoster.socialProvince.trim() != ''">
AND a.SOCIAL_PROVINCE = #{tPersonnelRoster.empProvince}
AND a.SOCIAL_PROVINCE = #{tPersonnelRoster.socialProvince}
</if>
<if test="tPersonnelRoster.socialCity != null and tPersonnelRoster.socialCity.trim() != ''">
AND a.SOCIAL_CITY = #{tPersonnelRoster.socialCity}
......@@ -253,6 +253,12 @@
#{item}
</foreach>
</if>
<if test="tPersonnelRoster.empTypes != null and tPersonnelRoster.empTypes.size() > 0">
AND a.EMP_TYPE in
<foreach item="item" index="index" collection="tPersonnelRoster.empTypes" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</if>
</sql>
......
......@@ -266,7 +266,7 @@
</select>
<!-- 人员花名册薪资信息 -->
<select id="getSalaryEmpRoster" resultMap="salaryEmpRosterMap" parameterType="com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmpRosterVo">
select a.EMP_IDCARD,BANK_NO,BANK_NAME,BANK_SUB_NAME,a1.AREA_NAME,a2.AREA_NAME from t_salary_employee a
select a.EMP_IDCARD,BANK_NO,BANK_NAME,BANK_SUB_NAME,a.BANK_PROVINCE,a.BANK_CITY from t_salary_employee a
LEFT JOIN sys_area a1 on a.BANK_PROVINCE=a1.id
LEFT JOIN sys_area a2 on a.BANK_CITY= a2.id
<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