Commit f6804b6b authored by fangxinjiang's avatar fangxinjiang

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

parents 62a20469 503a27d4
......@@ -9,6 +9,7 @@ import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Set;
/**
* @Author fxj
......@@ -115,4 +116,7 @@ public class SocialHandleSearchVo extends TDispatchInfo {
@Schema(description ="派单增/减月份")
@ExcelIgnore
private String disMonth;
@Schema(description = "导出的表头的Set")
private Set<String> exportFields;
}
......@@ -5095,9 +5095,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
List<TDispatchSocialExportVo> list = new ArrayList<>();
try (ServletOutputStream out = response.getOutputStream()){
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
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,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, TDispatchSocialExportVo.class).build();
ExcelWriter excelWriter = EasyExcel.write(out, TDispatchSocialExportVo.class).includeColumnFieldNames(searchVo.getExportFields()).build();
WriteSheet writeSheet;
WriteTable writeTable0;
WriteTable writeTable1;
......@@ -5156,7 +5156,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
writeSheet = EasyExcel.writerSheet("减员").build();
excelWriter.write(list,writeSheet);
}
excelWriter.finish();
if (excelWriter!= null) {
excelWriter.finish();
}
}catch (Exception e){
log.error("执行异常" ,e);
}
......@@ -5176,9 +5178,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
List<TDispatchSocialPersionExportVo> list = new ArrayList<>();
try (ServletOutputStream out = response.getOutputStream()){
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
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,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, TDispatchSocialPersionExportVo.class).build();
ExcelWriter excelWriter = EasyExcel.write(out, TDispatchSocialPersionExportVo.class).includeColumnFieldNames(searchVo.getExportFields()).build();
WriteSheet writeSheet;
WriteTable writeTable0;
WriteTable writeTable1;
......@@ -5237,7 +5239,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
writeSheet = EasyExcel.writerSheet("减员").build();
excelWriter.write(list,writeSheet);
}
excelWriter.finish();
if (excelWriter!= null) {
excelWriter.finish();
}
}catch (Exception e){
log.error("执行异常" ,e);
}
......
......@@ -1252,7 +1252,7 @@
s.RECORD_BASE as PERSION_CARDINAL,
s.UNIT_MEDICAL_CARDINAL as MEDICAL_CARDINAL,
concat(ifnull(DATE_FORMAT(a.CONTRACT_START,"%Y%m%d"),''),'-',ifnull(DATE_FORMAT(a.CONTRACT_END,"%Y%m%d"),'')) as DATE_ONE,
'安徽省合肥市' as CONTRACT_START,
'安徽省合肥市' as CONTRACT_ADRESS,
a.EMP_MOBILE as REMARK
FROM t_dispatch_info a
left join t_social_info s on s.id=a.SOCIAL_ID
......@@ -1679,7 +1679,7 @@
a.DELETE_FLAG = 0
AND a.social_id is not null
AND a.STATUS = "2"
AND a.DISPATCH_ITEM like concat('%','医疗''%')
AND a.DISPATCH_ITEM like concat('%','医疗','%')
<if test="tDispatchInfo != null">
<if test="tDispatchInfo.socialHouseholdName != null and tDispatchInfo.socialHouseholdName.trim() != ''">
AND a.SOCIAL_HOUSEHOLD_NAME = #{tDispatchInfo.socialHouseholdName}
......@@ -1706,7 +1706,7 @@
a.DELETE_FLAG = 0
AND a.social_id is not null
AND a.STATUS = "2"
AND (a.DISPATCH_ITEM like concat('%','工伤','%') or a.DISPATCH_ITEM like concat('%','养老','%'))
AND (a.DISPATCH_ITEM like concat('%','工伤','%') or a.DISPATCH_ITEM like concat('%','养老','%'))
<if test="tDispatchInfo != null">
<if test="tDispatchInfo.socialHouseholdName != null and tDispatchInfo.socialHouseholdName.trim() != ''">
AND a.SOCIAL_HOUSEHOLD_NAME = #{tDispatchInfo.socialHouseholdName}
......
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