Commit 979b40fe authored by fangxinjiang's avatar fangxinjiang

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

parents cfc363e7 f9de1200
......@@ -34,8 +34,8 @@ public class DispatchConstants {
public static final String DISPATCH_SOCIAL_REDUCE = "社保派减";
public static final String SOCIAL_RECORD_ROSTER_EXPORT = "社保花名册导出";
public static final String SOCIAL_RECORD_EXPORT = "公积金变更清册导出";
public static final String SOCIAL_MEDICAL_EXPORT = "合肥医保花名册";
public static final String SOCIAL_PERSION_EXPORT = "合肥社保花名册";
public static final String SOCIAL_MEDICAL_EXPORT = "社保-医疗";
public static final String SOCIAL_PERSION_EXPORT = "社保-养老三险";
public static final String DISPATCH_PENSION = "养老、";
public static final String DISPATCH_MEDICAL = "医疗、";
public static final String DISPATCH_BIRTH = "生育、";
......
......@@ -36,7 +36,7 @@ public class CustomCellWriteWidthOneConfig extends AbstractColumnWidthStyleStrat
sheet.setColumnWidth(11, 1000);
sheet.setColumnWidth(12, 1000);
sheet.setColumnWidth(13, 1000);
sheet.setColumnWidth(14, 1500);
sheet.setColumnWidth(14, 1800);
sheet.setColumnWidth(15, 5000);
sheet.setColumnWidth(16, 3200);
sheet.setColumnWidth(17, 3000);
......
......@@ -172,6 +172,15 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> {
**/
List<TDispatchSocialExportVo> getSocialDisRecord(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo);
/**
* @Author huyc
* @Description 社保派单医保模版
* @Date 15:47 2023/7/18
* @Param
* @return
**/
List<TDispatchSocialExportVo> getSocialReduceDisRecord(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo);
/**
* @Author huyc
* @Description 社保派单养老模版count
......
......@@ -5090,7 +5090,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
**/
@Override
public void doexportSocialRecordNew(HttpServletResponse response,SocialHandleSearchVo searchVo) {
String fileName = DispatchConstants.SOCIAL_MEDICAL_EXPORT + DateUtil.getThisTime() + CommonConstants.XLSX;
String fileName = DispatchConstants.SOCIAL_MEDICAL_EXPORT + searchVo.getSocialHouseholdName() + "_" + searchVo.getDisMonth() + CommonConstants.XLSX;
//获取要导出的列表
List<TDispatchSocialExportVo> list = new ArrayList<>();
try (ServletOutputStream out = response.getOutputStream()){
......@@ -5169,7 +5169,14 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
// 第二次写如也会创建头,然后在第一次的后面写入数据
excelWriter.write(new ArrayList<>(), writeSheet, writeTable2);
int num = 1;
for (int i =1;i<= 10;i++) {
vo = new TDispatchSocialExportVo();
vo.setNum(num);
num ++;
list.add(vo);
}
excelWriter.write(list, writeSheet, writeTable2);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable3);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable4);
}
......@@ -5177,7 +5184,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
searchVo.setType(CommonConstants.ONE_STRING);
long count1 = getSocialDisRecordCount(searchVo);
if (count1 > CommonConstants.ZERO_INT){
list = getSocialDisRecord(searchVo);
list = baseMapper.getSocialReduceDisRecord(searchVo);
if (Common.isNotNull(list)) {
//判断list的大小是否大于10
if (list.size() < 10) {
......@@ -5204,7 +5211,14 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
// 第二次写如也会创建头,然后在第一次的后面写入数据
excelWriter.write(new ArrayList<>(), writeSheet, writeTable2);
int num = 1;
for (int i =1;i<= 10;i++) {
vo = new TDispatchSocialExportVo();
vo.setNum(num);
num ++;
list.add(vo);
}
excelWriter.write(list, writeSheet, writeTable2);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable3);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable4);
}
......@@ -5225,7 +5239,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
**/
@Override
public void doexportSocialPensionRecord(HttpServletResponse response,SocialHandleSearchVo searchVo) {
String fileName = DispatchConstants.SOCIAL_PERSION_EXPORT + DateUtil.getThisTime() + CommonConstants.XLSX;
String fileName = DispatchConstants.SOCIAL_PERSION_EXPORT + searchVo.getSocialHouseholdName() + "_" + searchVo.getDisMonth() + CommonConstants.XLSX;
//获取要导出的列表
List<TDispatchSocialPersionExportVo> list = new ArrayList<>();
try (ServletOutputStream out = response.getOutputStream()){
......@@ -5304,7 +5318,14 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
writeSheet = EasyExcel.writerSheet("增员").build();
excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable2);
int num = 1;
for (int i =1;i<= 10;i++) {
vo = new TDispatchSocialPersionExportVo();
vo.setNum(num);
num ++;
list.add(vo);
}
excelWriter.write(list, writeSheet, writeTable2);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable3);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable4);
}
......@@ -5367,7 +5388,14 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
writeSheet = EasyExcel.writerSheet("减员").build();
excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable2);
int num = 1;
for (int i =1;i<= 10;i++) {
reduceVo = new TDispatchSocialPersionReduceExportVo();
reduceVo.setNum(num);
num ++;
listReduce.add(reduceVo);
}
excelWriter.write(listReduce, writeSheet, writeTable2);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable3);
}
if (excelWriter!= null) {
......@@ -5989,7 +6017,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
public List<List<String>> headTwo(String houseName,String cusNo) {
List<List<String>> list = new ArrayList<>();
//表头数据
String b = "单位名称(盖章): " + houseName + " 单位统一信用代码:" + cusNo;
String b = "单位名称(盖章): " + houseName + " 单位统一信用代码:" + (null == cusNo ? " " : cusNo);
String c = "人员类型: □√单位职工 □灵活就业人员";
for (int i =1;i<= 13;i++) {
list.add(Lists.newArrayList(b,c));
......@@ -6097,7 +6125,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
public List<List<String>> persionHeadTwo(String houseName,String cusNo) {
List<List<String>> list = new ArrayList<>();
//表头数据
String a="单位名称(签章): " + houseName + " 单位编码:" + cusNo;
String a="单位名称(签章): " + houseName + " 单位编码:" + (null == cusNo ? " " : cusNo);
//第一列-第十八列
for (int i =1;i<= 18;i++) {
list.add(Lists.newArrayList(a));
......@@ -6122,7 +6150,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
//第三列
list.add( Lists.newArrayList("职工编码","职工编码"));
//第四列
list.add( Lists.newArrayList("社会保障号码(身份证号码)","社会保障号码(身份证号码)"));
list.add( Lists.newArrayList("社会保障号码 (身份证号码)","社会保障号码 (身份证号码)"));
//第五列
list.add( Lists.newArrayList("性别","性别"));
//第六列
......@@ -6200,7 +6228,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
public List<List<String>> persionReduceHeadOne() {
List<List<String>> list = new ArrayList<>();
//表头数据
String a=" 社 会 保 险 缴 费 单 位 人 员 减 少 花 名 册";
String a="社 会 保 险 缴 费 单 位 人 员 减 少 花 名 册";
//第一列-第二十五列
for (int i =1;i<= 24;i++) {
list.add(Lists.newArrayList(a));
......@@ -6217,8 +6245,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
public List<List<String>> persionReduceHeadTwo(String houseName,String cusNo) {
List<List<String>> list = new ArrayList<>();
//表头数据
String a="单位名称(签章): " + houseName + " 单位编码:" + cusNo;
//第一列-第二十五列
String a="单位名称(签章): " + houseName + " 单位编码:" + (null == cusNo ? " " : cusNo);
//第一列-第二十五列cusNo
for (int i =1;i<= 24;i++) {
list.add(Lists.newArrayList(a));
}
......@@ -6242,7 +6270,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
//第三列
list.add( Lists.newArrayList("姓名","姓名"));
//第四列
list.add( Lists.newArrayList("社会保障号码(身份证号码)","社会保障号码(身份证号码)"));
list.add( Lists.newArrayList("社会保障号码 (身份证号码)","社会保障号码 (身份证号码)"));
//第五列
list.add( Lists.newArrayList("停止缴费时间","停止缴费时间"));
//减少原因
......
......@@ -1247,6 +1247,30 @@
</where>
</select>
<!--tDispatchInfo 社保医疗花名册派单数据-->
<select id="getSocialReduceDisRecord" resultMap="socialDisExportMap">
SELECT
(@i :=@i+1) as NUM,
a.EMP_NAME,
'身份证' as IDCARD_TYPE,
a.EMP_IDCARD,
replace(DATE_FORMAT(a.CREATE_TIME,"%Y-%m"),'-','') as DIS_MONTH,
s.UNIT_MEDICAL_CARDINAL as MEDICAL_CARDINAL,
'' as CHANGE_TYPE_ONE,
'' as CHANGE_TYPE_TWO,
'√' as CHANGE_TYPE_THREE,
'' as CHANGE_TYPE_FOUR,
a.EMP_MOBILE,
a.EDUCATION_NAME,
a.EMP_MOBILE as REMARK
FROM t_dispatch_info a
left join t_social_info s on s.id=a.SOCIAL_ID
,(select @i:=0) as itable
<where>
<include refid="where_getSocialDisRecord"/>
</where>
</select>
<!--tDispatchInfo 社保养老花名册派单数据-->
<select id="getSocialPersionDisCount" resultType="java.lang.Integer">
SELECT count(1)
......@@ -1261,11 +1285,12 @@
SELECT
(@i :=@i+1) as num,
a.EMP_NAME,
a.EMP_NO,
'' as EMP_NO,
a.EMP_IDCARD,
CASE (SUBSTR(a.EMP_IDCARD,17,1)%2)
WHEN 1 THEN '男'
WHEN 0 THEN '女'
else '男'
END sex,
case when a.EMP_NATIONAL = 1 then "汉族"
when a.EMP_NATIONAL = 2 then "傣族"
......@@ -1291,7 +1316,7 @@
'' as INSURANCE_TYPE_FIVE,
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,
concat(ifnull(DATE_FORMAT(a.CONTRACT_START,"%Y%m"),''),'-',ifnull(DATE_FORMAT(a.CONTRACT_END,"%Y%m"),'')) as DATE_ONE,
'安徽省合肥市' as CONTRACT_ADRESS,
a.EMP_MOBILE as REMARK
FROM t_dispatch_info a
......@@ -1315,7 +1340,7 @@
<select id="getSocialPersionReduceDisRecord" resultMap="socialPersionReduceDisExportMap">
SELECT
(@i :=@i+1) as num,
a.EMP_NO,
'' as EMP_NO,
a.EMP_NAME,
a.EMP_IDCARD,
DATE_FORMAT(a.CREATE_TIME,"%Y%m") as WORK_DATE,
......
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