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; ...@@ -9,6 +9,7 @@ import lombok.Data;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.List; import java.util.List;
import java.util.Set;
/** /**
* @Author fxj * @Author fxj
...@@ -115,4 +116,7 @@ public class SocialHandleSearchVo extends TDispatchInfo { ...@@ -115,4 +116,7 @@ public class SocialHandleSearchVo extends TDispatchInfo {
@Schema(description ="派单增/减月份") @Schema(description ="派单增/减月份")
@ExcelIgnore @ExcelIgnore
private String disMonth; private String disMonth;
@Schema(description = "导出的表头的Set")
private Set<String> exportFields;
} }
...@@ -5095,9 +5095,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -5095,9 +5095,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
List<TDispatchSocialExportVo> list = new ArrayList<>(); List<TDispatchSocialExportVo> list = new ArrayList<>();
try (ServletOutputStream out = response.getOutputStream()){ try (ServletOutputStream out = response.getOutputStream()){
response.setContentType(CommonConstants.MULTIPART_FORM_DATA); 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,然后文件流会自动关闭 // 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, TDispatchSocialExportVo.class).build(); ExcelWriter excelWriter = EasyExcel.write(out, TDispatchSocialExportVo.class).includeColumnFieldNames(searchVo.getExportFields()).build();
WriteSheet writeSheet; WriteSheet writeSheet;
WriteTable writeTable0; WriteTable writeTable0;
WriteTable writeTable1; WriteTable writeTable1;
...@@ -5156,7 +5156,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -5156,7 +5156,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
writeSheet = EasyExcel.writerSheet("减员").build(); writeSheet = EasyExcel.writerSheet("减员").build();
excelWriter.write(list,writeSheet); excelWriter.write(list,writeSheet);
} }
if (excelWriter!= null) {
excelWriter.finish(); excelWriter.finish();
}
}catch (Exception e){ }catch (Exception e){
log.error("执行异常" ,e); log.error("执行异常" ,e);
} }
...@@ -5176,9 +5178,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -5176,9 +5178,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
List<TDispatchSocialPersionExportVo> list = new ArrayList<>(); List<TDispatchSocialPersionExportVo> list = new ArrayList<>();
try (ServletOutputStream out = response.getOutputStream()){ try (ServletOutputStream out = response.getOutputStream()){
response.setContentType(CommonConstants.MULTIPART_FORM_DATA); 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,然后文件流会自动关闭 // 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, TDispatchSocialPersionExportVo.class).build(); ExcelWriter excelWriter = EasyExcel.write(out, TDispatchSocialPersionExportVo.class).includeColumnFieldNames(searchVo.getExportFields()).build();
WriteSheet writeSheet; WriteSheet writeSheet;
WriteTable writeTable0; WriteTable writeTable0;
WriteTable writeTable1; WriteTable writeTable1;
...@@ -5237,7 +5239,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -5237,7 +5239,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
writeSheet = EasyExcel.writerSheet("减员").build(); writeSheet = EasyExcel.writerSheet("减员").build();
excelWriter.write(list,writeSheet); excelWriter.write(list,writeSheet);
} }
if (excelWriter!= null) {
excelWriter.finish(); excelWriter.finish();
}
}catch (Exception e){ }catch (Exception e){
log.error("执行异常" ,e); log.error("执行异常" ,e);
} }
......
...@@ -1252,7 +1252,7 @@ ...@@ -1252,7 +1252,7 @@
s.RECORD_BASE as PERSION_CARDINAL, s.RECORD_BASE as PERSION_CARDINAL,
s.UNIT_MEDICAL_CARDINAL as MEDICAL_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, 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 a.EMP_MOBILE as REMARK
FROM t_dispatch_info a FROM t_dispatch_info a
left join t_social_info s on s.id=a.SOCIAL_ID left join t_social_info s on s.id=a.SOCIAL_ID
...@@ -1679,7 +1679,7 @@ ...@@ -1679,7 +1679,7 @@
a.DELETE_FLAG = 0 a.DELETE_FLAG = 0
AND a.social_id is not null AND a.social_id is not null
AND a.STATUS = "2" AND a.STATUS = "2"
AND a.DISPATCH_ITEM like concat('%','医疗''%') AND a.DISPATCH_ITEM like concat('%','医疗','%')
<if test="tDispatchInfo != null"> <if test="tDispatchInfo != null">
<if test="tDispatchInfo.socialHouseholdName != null and tDispatchInfo.socialHouseholdName.trim() != ''"> <if test="tDispatchInfo.socialHouseholdName != null and tDispatchInfo.socialHouseholdName.trim() != ''">
AND a.SOCIAL_HOUSEHOLD_NAME = #{tDispatchInfo.socialHouseholdName} AND a.SOCIAL_HOUSEHOLD_NAME = #{tDispatchInfo.socialHouseholdName}
...@@ -1706,7 +1706,7 @@ ...@@ -1706,7 +1706,7 @@
a.DELETE_FLAG = 0 a.DELETE_FLAG = 0
AND a.social_id is not null AND a.social_id is not null
AND a.STATUS = "2" 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 != null">
<if test="tDispatchInfo.socialHouseholdName != null and tDispatchInfo.socialHouseholdName.trim() != ''"> <if test="tDispatchInfo.socialHouseholdName != null and tDispatchInfo.socialHouseholdName.trim() != ''">
AND a.SOCIAL_HOUSEHOLD_NAME = #{tDispatchInfo.socialHouseholdName} 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