Commit d56d42d9 authored by huyuchen's avatar huyuchen

Merge branch 'feature/MVP1.0' into develop

parents 8084b2d7 ee3e2b80
...@@ -127,7 +127,7 @@ public class EmployeeProjectExportVO { ...@@ -127,7 +127,7 @@ public class EmployeeProjectExportVO {
/** /**
* 身份证-省 * 身份证-省
*/ */
@ExcelAttribute(name = "户籍所在省", isArea = true) @ExcelAttribute(name = "户籍所在省")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "户籍所在省") @ExcelProperty(value = "户籍所在省")
private String idProvince; private String idProvince;
...@@ -137,7 +137,7 @@ public class EmployeeProjectExportVO { ...@@ -137,7 +137,7 @@ public class EmployeeProjectExportVO {
*/ */
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "户籍所在市") @ExcelProperty(value = "户籍所在市")
@ExcelAttribute(name = "户籍所在市", isArea = true, parentField = "idProvince") @ExcelAttribute(name = "户籍所在市")
private String idCity; private String idCity;
/** /**
...@@ -145,7 +145,7 @@ public class EmployeeProjectExportVO { ...@@ -145,7 +145,7 @@ public class EmployeeProjectExportVO {
*/ */
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "户籍所在县") @ExcelProperty(value = "户籍所在县")
@ExcelAttribute(name = "户籍所在县", isArea = true, parentField = "idCity") @ExcelAttribute(name = "户籍所在县")
private String idTown; private String idTown;
/** /**
...@@ -161,7 +161,7 @@ public class EmployeeProjectExportVO { ...@@ -161,7 +161,7 @@ public class EmployeeProjectExportVO {
*/ */
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "档案所在省") @ExcelProperty(value = "档案所在省")
@ExcelAttribute(name = "档案所在省", isArea = true) @ExcelAttribute(name = "档案所在省")
private String fileProvince; private String fileProvince;
/** /**
...@@ -169,7 +169,7 @@ public class EmployeeProjectExportVO { ...@@ -169,7 +169,7 @@ public class EmployeeProjectExportVO {
*/ */
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "档案所在市") @ExcelProperty(value = "档案所在市")
@ExcelAttribute(name = "档案所在市", isArea = true, parentField = "fileProvince") @ExcelAttribute(name = "档案所在市")
private String fileCity; private String fileCity;
/** /**
...@@ -177,7 +177,7 @@ public class EmployeeProjectExportVO { ...@@ -177,7 +177,7 @@ public class EmployeeProjectExportVO {
*/ */
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "档案所在县") @ExcelProperty(value = "档案所在县")
@ExcelAttribute(name = "档案所在县", isArea = true, parentField = "fileCity") @ExcelAttribute(name = "档案所在县")
private String fileTown; private String fileTown;
/** /**
...@@ -243,10 +243,11 @@ public class EmployeeProjectExportVO { ...@@ -243,10 +243,11 @@ public class EmployeeProjectExportVO {
/** /**
* 人员档案状态(0草稿、1已审核) * 人员档案状态(0草稿、1已审核)
* , readConverterExp = "0=草稿,1=已审核"
*/ */
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "人员档案状态") @ExcelProperty(value = "人员档案状态")
@ExcelAttribute(name = "人员档案状态", readConverterExp = "0=草稿,1=已审核") @ExcelAttribute(name = "人员档案状态")
private String proStatus; private String proStatus;
/** /**
...@@ -429,7 +430,7 @@ public class EmployeeProjectExportVO { ...@@ -429,7 +430,7 @@ public class EmployeeProjectExportVO {
*/ */
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="近3个月发薪") @ExcelProperty(value ="近3个月发薪")
@ExcelAttribute(name = "近3个月发薪", readConverterExp = "0=无,1=是,2=否") @ExcelAttribute(name = "近3个月发薪", isDataId = true,dataType = ExcelAttributeConstants.FILE_SALARY_STATUS)
private String salaryStatus; private String salaryStatus;
/** /**
......
...@@ -28,6 +28,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TDepartSettlementInfoService ...@@ -28,6 +28,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TDepartSettlementInfoService
import com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService; import com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*; import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
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.util.Common;
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.log.annotation.SysLog; import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner; import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
...@@ -42,6 +43,7 @@ import java.io.UnsupportedEncodingException; ...@@ -42,6 +43,7 @@ import java.io.UnsupportedEncodingException;
import java.net.URLDecoder; import java.net.URLDecoder;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
/** /**
...@@ -181,6 +183,9 @@ public class TSettleDomainController { ...@@ -181,6 +183,9 @@ public class TSettleDomainController {
List<TSettleDomainSelectVo> list = tSettleDomainService.selectAllSettleDomainSelectVos(); List<TSettleDomainSelectVo> list = tSettleDomainService.selectAllSettleDomainSelectVos();
TSettleDomainListVo listVo = new TSettleDomainListVo(); TSettleDomainListVo listVo = new TSettleDomainListVo();
listVo.setListSelectVO(list); listVo.setListSelectVO(list);
if (Common.isNotNull(list)){
listVo.setMapSlectVo(list.stream().collect(Collectors.toMap(TSettleDomain::getDepartNo, k->k)));
}
return listVo; return listVo;
} }
...@@ -318,5 +323,4 @@ public class TSettleDomainController { ...@@ -318,5 +323,4 @@ public class TSettleDomainController {
public R<IPage<IdNameNoVo>> getUnitPage(Page<IdNameNoVo> page, IdNameNoVo idNameNo) { public R<IPage<IdNameNoVo>> getUnitPage(Page<IdNameNoVo> page, IdNameNoVo idNameNo) {
return R.ok(tSettleDomainService.getUnitPage(page, idNameNo)); return R.ok(tSettleDomainService.getUnitPage(page, idNameNo));
} }
} }
...@@ -56,12 +56,6 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> { ...@@ -56,12 +56,6 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> {
IPage<TEmployeeProject> getTEmployeeProjectInfoPage(Page page, @Param("tEmployeeProject") TEmployeeProject tEmployeeProject); IPage<TEmployeeProject> getTEmployeeProjectInfoPage(Page page, @Param("tEmployeeProject") TEmployeeProject tEmployeeProject);
/**
* 获得导出的项目档案列表
* @param tEmployeeProject
* @return
*/
List<EmployeeProjectExportVO> getTEmployeeProjectExportPage(@Param("tEmployeeProject") EmployeeProjectExportParamVO tEmployeeProject);
// getTEmployeeProjectExportPage 改造 // getTEmployeeProjectExportPage 改造
List<EmployeeProjectExportVO> noPageDiy(@Param("tEmployeeProject")EmployeeProjectExportParamVO searchVo); List<EmployeeProjectExportVO> noPageDiy(@Param("tEmployeeProject")EmployeeProjectExportParamVO searchVo);
......
...@@ -1083,24 +1083,23 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -1083,24 +1083,23 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
response.setContentType(CommonConstants.MULTIPART_FORM_DATA); response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8"); response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , "UTF-8")); response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , "UTF-8"));
ExcelUtil<EmployeeProjectExportVO> util = new ExcelUtil<>(EmployeeProjectExportVO.class);
// 获取所有字典type
Map<String,String> nameAndDicTypeMap = util.getConverterDicType();
// 获取所有字典对应的值
Map<String,String> redisLabelMap = (Map<String, String>) RedisUtil.redis.opsForValue().get(CacheConstants.REDIS_DICT_LABLE);
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭 // 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, EmployeeProjectExportVO.class).includeColumnFieldNames(includeColumnFiledNames).build(); ExcelWriter excelWriter = EasyExcel.write(out, EmployeeProjectExportVO.class)
.registerConverter(new DictConverter(nameAndDicTypeMap,redisLabelMap))
.includeColumnFieldNames(includeColumnFiledNames).build();
int index = 0; int index = 0;
if (count > CommonConstants.ZERO_INT){ if (count > CommonConstants.ZERO_INT){
Field[] allFields = EmployeeProjectExportVO.class.getDeclaredFields();
WriteSheet writeSheet; WriteSheet writeSheet;
ExcelUtil<EmployeeProjectExportVO> util;
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) { for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
// 获取实际记录 // 获取实际记录
searchVo.setLimitStart(i); searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT); searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo); list = noPageDiy(searchVo);
if (Common.isNotNull(list)){
util = new ExcelUtil<>(EmployeeProjectExportVO.class);
for (EmployeeProjectExportVO vo:list){
util.convertEntityAsso(vo,null,null,null,allFields);
}
}
if (Common.isNotNull(list)){ if (Common.isNotNull(list)){
writeSheet = EasyExcel.writerSheet("项目档案批量导出"+index).build(); writeSheet = EasyExcel.writerSheet("项目档案批量导出"+index).build();
excelWriter.write(list,writeSheet); excelWriter.write(list,writeSheet);
......
...@@ -194,28 +194,28 @@ ...@@ -194,28 +194,28 @@
a.TRY_PERIOD, a.TRY_PERIOD,
a.PROJECT_SOURCE, a.PROJECT_SOURCE,
a.CONTRACT_STATUS, a.CONTRACT_STATUS,
b.STATUS AS PROSTATUS, if(b.STATUS=0,'草稿','已审核') AS PROSTATUS,
b.CREATE_NAME AS PROCREATE_NAME, b.CREATE_NAME AS PROCREATE_NAME,
b.CREATE_TIME AS PROCREATE_TIME, b.CREATE_TIME AS PROCREATE_TIME,
b.EMP_PHONE, b.EMP_PHONE,
a.INSURANCE_STATUS, a.INSURANCE_STATUS,
a.SOCIAL_STATUS, a.SOCIAL_STATUS,
a.FUND_STATUS, a.FUND_STATUS,
b.FILE_PROVINCE, a4.AREA_NAME FILE_PROVINCE,
b.FILE_CITY, a5.AREA_NAME FILE_CITY,
b.FILE_TOWN, a6.AREA_NAME FILE_TOWN,
a.SOCIAL_PROVINCE, a7.AREA_NAME SOCIAL_PROVINCE,
a.SOCIAL_CITY, a8.AREA_NAME SOCIAL_CITY,
a.SOCIAL_TOWN, a9.AREA_NAME SOCIAL_TOWN,
a.SALARY_STATUS, a.SALARY_STATUS,
b.VALIDITY_START, b.VALIDITY_START,
b.VALIDITY_END, b.VALIDITY_END,
b.EMP_MARRI_STATUS, b.EMP_MARRI_STATUS,
b.EMP_NATIONAL, b.EMP_NATIONAL,
b.POLITICAL_STATUS, b.POLITICAL_STATUS,
b.ID_PROVINCE, a1.AREA_NAME ID_PROVINCE,
b.ID_CITY, a2.AREA_NAME ID_CITY,
b.ID_TOWN, a3.AREA_NAME ID_TOWN,
b.EMP_REGIS_TYPE, b.EMP_REGIS_TYPE,
b.IS_COLLEGE, b.IS_COLLEGE,
b.HIGN_EDUCATION, b.HIGN_EDUCATION,
...@@ -224,7 +224,7 @@ ...@@ -224,7 +224,7 @@
b.ADMISSION_DATE, b.ADMISSION_DATE,
b.GRADUTION_DATE, b.GRADUTION_DATE,
b.REMARK, b.REMARK,
a.STATUS, if(a.STATUS=0,'草稿','已审核') STATUS,
a.CREATE_NAME, a.CREATE_NAME,
a.CREATE_TIME, a.CREATE_TIME,
b.EMP_EMAIL, b.EMP_EMAIL,
...@@ -799,21 +799,6 @@ ...@@ -799,21 +799,6 @@
</where> </where>
order by a.CREATE_TIME desc order by a.CREATE_TIME desc
</select> </select>
<!--tEmployeeInfo导出查询-->
<select id="getTEmployeeProjectExportPage" resultMap="tEmployeeProjectExportMap">
SELECT
<include refid="Base_Export_List"/>
FROM t_employee_project a
left join t_employee_info b on a.EMP_ID = b.id
<where>
a.DELETE_FLAG = '0'
<include refid="exportTEmployeeProject_where"/>
<if test="tEmployeeProject.authSql != null and tEmployeeProject.authSql.trim() != ''">
${tEmployeeProject.authSql}
</if>
</where>
order by a.CREATE_TIME desc
</select>
<!--tEmployeeInfo导出查询改造 fxj 2022-11-03--> <!--tEmployeeInfo导出查询改造 fxj 2022-11-03-->
<select id="noPageDiy" resultMap="tEmployeeProjectExportMap"> <select id="noPageDiy" resultMap="tEmployeeProjectExportMap">
...@@ -821,6 +806,15 @@ ...@@ -821,6 +806,15 @@
<include refid="Base_Export_List"/> <include refid="Base_Export_List"/>
FROM t_employee_project a FROM t_employee_project a
left join t_employee_info b on a.EMP_ID = b.id left join t_employee_info b on a.EMP_ID = b.id
LEFT JOIN sys_area a1 on a1.id=b.ID_PROVINCE
LEFT JOIN sys_area a2 on a2.id=b.ID_CITY
LEFT JOIN sys_area a3 on a3.id=b.ID_TOWN
LEFT JOIN sys_area a4 on a4.id=b.FILE_PROVINCE
LEFT JOIN sys_area a5 on a5.id=b.FILE_CITY
LEFT JOIN sys_area a6 on a6.id=b.FILE_TOWN
LEFT JOIN sys_area a7 on a7.id=a.SOCIAL_PROVINCE
LEFT JOIN sys_area a8 on a8.id=a.SOCIAL_CITY
LEFT JOIN sys_area a9 on a9.id=a.SOCIAL_TOWN
<where> <where>
a.DELETE_FLAG = '0' a.DELETE_FLAG = '0'
<include refid="exportTEmployeeProject_where"/> <include refid="exportTEmployeeProject_where"/>
......
...@@ -505,4 +505,6 @@ public interface CommonConstants { ...@@ -505,4 +505,6 @@ public interface CommonConstants {
// 权限使用的 // 权限使用的
public static final String A_DEPT_ID = "a.dept_id"; public static final String A_DEPT_ID = "a.dept_id";
public static final String A_CREATE_BY = "a.CREATE_BY"; public static final String A_CREATE_BY = "a.CREATE_BY";
String SETTLE_DOMAIN_GET_ERROR = "获取结算主体信息失败!";
} }
...@@ -28,6 +28,8 @@ public class ExcelAttributeConstants { ...@@ -28,6 +28,8 @@ public class ExcelAttributeConstants {
public static final String SOCIAL_ECURITY_STATE = "social_ecurity_state"; public static final String SOCIAL_ECURITY_STATE = "social_ecurity_state";
// 公积金状态 // 公积金状态
public static final String FUND_STATUS = "fund_status"; public static final String FUND_STATUS = "fund_status";
// 档案近3个月发薪状态
public static final String FILE_SALARY_STATUS = "file_salary_status";
// 减档原因 // 减档原因
public static final String DOWNSHIFT_REASON = "downshift_reason"; public static final String DOWNSHIFT_REASON = "downshift_reason";
......
...@@ -22,7 +22,7 @@ public class TInsuranceEnclosure extends BaseEntity { ...@@ -22,7 +22,7 @@ public class TInsuranceEnclosure extends BaseEntity {
*/ */
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键") @Schema(description = "主键")
private Integer id; private String id;
/** /**
* 附件名 * 附件名
......
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