Commit 4ea96990 authored by hongguangwu's avatar hongguangwu

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

parents 9250eaab b4c28267
...@@ -17,4 +17,7 @@ public class TDispatchFundSumVo { ...@@ -17,4 +17,7 @@ public class TDispatchFundSumVo {
@ExcelAttribute(name = "合计补缴金额(大写)" ) @ExcelAttribute(name = "合计补缴金额(大写)" )
@ExcelProperty("合计补缴金额(大写)") @ExcelProperty("合计补缴金额(大写)")
private BigDecimal supplementaryAmountSum; private BigDecimal supplementaryAmountSum;
private String number;
} }
...@@ -62,6 +62,7 @@ public class CustomCellStyleFourStrategy extends AbstractVerticalCellStyleStrate ...@@ -62,6 +62,7 @@ public class CustomCellStyleFourStrategy extends AbstractVerticalCellStyleStrate
headWriteCellStyle.setFillForegroundColor(IndexedColors.BLACK.getIndex()); headWriteCellStyle.setFillForegroundColor(IndexedColors.BLACK.getIndex());
headWriteCellStyle.setWriteFont(headWriteFont); headWriteCellStyle.setWriteFont(headWriteFont);
headWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.LEFT); headWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.LEFT);
headWriteCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
headWriteCellStyle.setBorderLeft(BorderStyle.THIN); headWriteCellStyle.setBorderLeft(BorderStyle.THIN);
headWriteCellStyle.setBorderTop(BorderStyle.THIN); headWriteCellStyle.setBorderTop(BorderStyle.THIN);
headWriteCellStyle.setBorderRight(BorderStyle.THIN); headWriteCellStyle.setBorderRight(BorderStyle.THIN);
......
...@@ -164,6 +164,7 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> { ...@@ -164,6 +164,7 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> {
int getSocialDisRecordCount(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo); int getSocialDisRecordCount(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo);
int getFCount(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo);
/** /**
* @Author huyc * @Author huyc
...@@ -239,11 +240,11 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> { ...@@ -239,11 +240,11 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> {
List<TDispatchFundPersionExportVo> getFundPersionExportVo(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo); List<TDispatchFundPersionExportVo> getFundPersionExportVo(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo);
List<TDispatchFundSupplementaryExportVo> getFundSupplementarynExportVo(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo); List<TDispatchFundSupplementaryExportVo> getFundSupplementarynExportVo(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo,@Param("companyPro") Double companyPro);
TDispatchFundSumExportVo getFundSumExportVo(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo); TDispatchFundSumExportVo getFundSumExportVo(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo);
TDispatchFundSumVo getFundSumExportVoOne(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo); TDispatchFundSumVo getFundSumExportVoOne(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo,@Param("companyPro") Double companyPro);
CompanyProVo getFundPersionExportVoOne(@Param("houseName") String houseName); CompanyProVo getFundPersionExportVoOne(@Param("houseName") String houseName);
......
...@@ -5428,22 +5428,25 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -5428,22 +5428,25 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
private long getSocialDisRecordCount(SocialHandleSearchVo searchVo) { private long getSocialDisRecordCount(SocialHandleSearchVo searchVo) {
return baseMapper.getSocialDisRecordCount(searchVo); return baseMapper.getSocialDisRecordCount(searchVo);
} }
private long getFCount(SocialHandleSearchVo searchVo) {
return baseMapper.getFCount(searchVo);
}
private List<TDispatchSocialExportVo> getSocialDisRecord(SocialHandleSearchVo searchVo) { private List<TDispatchSocialExportVo> getSocialDisRecord(SocialHandleSearchVo searchVo) {
return baseMapper.getSocialDisRecord(searchVo); return baseMapper.getSocialDisRecord(searchVo);
} }
private List<TDispatchFundPersionExportVo> getDispatchFundPersion(SocialHandleSearchVo searchVo) { private List<TDispatchFundPersionExportVo> getDispatchFundPersion(SocialHandleSearchVo searchVo) {
return baseMapper.getFundPersionExportVo(searchVo); return baseMapper.getFundPersionExportVo(searchVo);
} }
private List<TDispatchFundSupplementaryExportVo> getDispatchFundSupplementary(SocialHandleSearchVo searchVo) {
return baseMapper.getFundSupplementarynExportVo(searchVo); private List<TDispatchFundSupplementaryExportVo> getDispatchFundSupplementary(SocialHandleSearchVo searchVo,Double companyPro) {
return baseMapper.getFundSupplementarynExportVo(searchVo,companyPro);
} }
private TDispatchFundSumExportVo getFundSumExportVo(SocialHandleSearchVo searchVo) { private TDispatchFundSumExportVo getFundSumExportVo(SocialHandleSearchVo searchVo) {
return baseMapper.getFundSumExportVo(searchVo); return baseMapper.getFundSumExportVo(searchVo);
} }
private TDispatchFundSumVo getFundSumVo(SocialHandleSearchVo searchVo) { private TDispatchFundSumVo getFundSumVo(SocialHandleSearchVo searchVo,Double companyPro ) {
return baseMapper.getFundSumExportVoOne(searchVo); return baseMapper.getFundSumExportVoOne(searchVo,companyPro);
} }
private CompanyProVo companyProVo(String houseName) { private CompanyProVo companyProVo(String houseName) {
return baseMapper.getFundPersionExportVoOne(houseName); return baseMapper.getFundPersionExportVoOne(houseName);
...@@ -6035,7 +6038,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -6035,7 +6038,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
WriteTable writeTable3; WriteTable writeTable3;
WriteTable writeTable4; WriteTable writeTable4;
WriteTable writeTable5; WriteTable writeTable5;
WriteTable writeTable6;
TDispatchFundPersionExportVo vo; TDispatchFundPersionExportVo vo;
List<Integer> columnIndexes = Arrays.asList(0,7); List<Integer> columnIndexes = Arrays.asList(0,7);
...@@ -6100,7 +6102,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -6100,7 +6102,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)25,(short)20)) registerWriteHandler(new SimpleRowHeightStyleStrategy((short)25,(short)20))
.build(); .build();
//派增的数据 //派增的数据
long count = getSocialDisRecordCount(searchVo); long count = getFCount(searchVo);
if (count > CommonConstants.ZERO_INT){ if (count > CommonConstants.ZERO_INT){
list = getDispatchFundPersion(searchVo); list = getDispatchFundPersion(searchVo);
if (Common.isNotNull(list)) { if (Common.isNotNull(list)) {
...@@ -6126,8 +6128,26 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -6126,8 +6128,26 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
excelWriter.write(new ArrayList<>(), writeSheet, writeTable5); excelWriter.write(new ArrayList<>(), writeSheet, writeTable5);
} }
} else { } else {
writeSheet = EasyExcel.writerSheet("增员").build(); list = getDispatchFundPersion(searchVo);
excelWriter.write(list,writeSheet); if (list.size() < 10) {
int size = 10 - list.size();
int num = list.size() + 1;
for (int i =1;i<= size;i++) {
vo = new TDispatchFundPersionExportVo();
vo.setNum(num);
num ++;
list.add(vo);
}
}
writeSheet = EasyExcel.writerSheet(searchVo.getDisMonth()).build();
// 第一次写入会创建头
excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
// 第二次写如也会创建头,然后在第一次的后面写入数据
excelWriter.write(list, writeSheet, writeTable2);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable3);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable4);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable5);
} }
if (excelWriter!= null) { if (excelWriter!= null) {
excelWriter.finish(); excelWriter.finish();
...@@ -6140,7 +6160,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -6140,7 +6160,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
@Override @Override
public void doexportFundInfoOne(HttpServletResponse response, SocialHandleSearchVo searchVo) { public void doexportFundInfoOne(HttpServletResponse response, SocialHandleSearchVo searchVo) {
String fileName = DispatchConstants.FUND_SUPPLEMENTARY_EXPORT + DateUtil.getThisTime() + CommonConstants.XLSX; String fileName = DispatchConstants.FUND_SUPPLEMENTARY_EXPORT + "_"+searchVo.getProvidentHouseholdName() + "_" + searchVo.getDisMonth() + CommonConstants.XLSX;
//获取要导出的列表 //获取要导出的列表
List<TDispatchFundSupplementaryExportVo> list = new ArrayList<>(); List<TDispatchFundSupplementaryExportVo> list = new ArrayList<>();
try (ServletOutputStream out = response.getOutputStream()){ try (ServletOutputStream out = response.getOutputStream()){
...@@ -6169,7 +6189,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -6169,7 +6189,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
writeTable0 = EasyExcel.writerTable(0). writeTable0 = EasyExcel.writerTable(0).
head(headFisrtOne()). head(headFisrtOne()).
registerWriteHandler(customCellStyleStrategy). registerWriteHandler(customCellStyleStrategy).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)20,(short)25 registerWriteHandler(new SimpleRowHeightStyleStrategy((short)40,(short)100
)). )).
build(); build();
writeTable1 = EasyExcel.writerTable(1). writeTable1 = EasyExcel.writerTable(1).
...@@ -6186,8 +6206,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -6186,8 +6206,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (columnIndex == 2) { if (columnIndex == 2) {
//要求将当前列的列宽设置为33英寸,理论值应该是33×256=8448, //要求将当前列的列宽设置为33英寸,理论值应该是33×256=8448,
//但是这里的设值是8648,具体原因请看下面的计算逻辑 //但是这里的设值是8648,具体原因请看下面的计算逻辑
sheet.setColumnWidth(0, 2000); sheet.setColumnWidth(0, 1000);
sheet.setColumnWidth(2, 3000); sheet.setColumnWidth(2, 1000);
sheet.setColumnWidth(6, 2000); sheet.setColumnWidth(6, 2000);
sheet.setColumnWidth(4,1500); sheet.setColumnWidth(4,1500);
} }
...@@ -6259,7 +6279,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -6259,7 +6279,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)20,(short)25)). registerWriteHandler(new SimpleRowHeightStyleStrategy((short)20,(short)25)).
build(); build();
writeTable5 = EasyExcel.writerTable(5). writeTable5 = EasyExcel.writerTable(5).
head(headQFour()). head(headQFour(searchVo)).
registerWriteHandler(customCellStyleStrategyThree). registerWriteHandler(customCellStyleStrategyThree).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)20,(short)25)). registerWriteHandler(new SimpleRowHeightStyleStrategy((short)20,(short)25)).
build(); build();
...@@ -6274,9 +6294,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -6274,9 +6294,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)25,(short)40)). registerWriteHandler(new SimpleRowHeightStyleStrategy((short)25,(short)40)).
build(); build();
//派增的数据 //派增的数据
long count = getSocialDisRecordCount(searchVo); long count = getFCount(searchVo);
if (count > CommonConstants.ZERO_INT){ if (count > CommonConstants.ZERO_INT){
list = getDispatchFundSupplementary(searchVo); HouseNameConfigVo houseNameConfigVo=getFundSumExportVoTwo(searchVo.getProvidentHouseholdName());
Double companyPro=houseNameConfigVo.getCompanyPro();
list = getDispatchFundSupplementary(searchVo,companyPro);
if (Common.isNotNull(list)) { if (Common.isNotNull(list)) {
//判断list的大小是否大于10 //判断list的大小是否大于10
if (list.size() < 10) { if (list.size() < 10) {
...@@ -6289,7 +6311,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -6289,7 +6311,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
list.add(vo); list.add(vo);
} }
} }
writeSheet = EasyExcel.writerSheet("增员").build(); writeSheet = EasyExcel.writerSheet(searchVo.getDisMonth()).build();
// 第一次写入会创建头 // 第一次写入会创建头
excelWriter.write(new ArrayList<>(), writeSheet, writeTable0); excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1); excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
...@@ -6302,7 +6324,28 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -6302,7 +6324,28 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
excelWriter.write(new ArrayList<>(),writeSheet, writeTable7); excelWriter.write(new ArrayList<>(),writeSheet, writeTable7);
} }
} else { } else {
writeSheet = EasyExcel.writerSheet("增员").build();
if (list.size() < 10) {
int size = 10 - list.size();
int num = list.size() + 1;
for (int i =1;i<= size;i++) {
vo = new TDispatchFundSupplementaryExportVo();
vo.setNum(num);
num ++;
list.add(vo);
}
}
writeSheet = EasyExcel.writerSheet(searchVo.getDisMonth()).build();
// 第一次写入会创建头
excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
// 第二次写如也会创建头,然后在第一次的后面写入数据
excelWriter.write(new ArrayList<>(),writeSheet, writeTable2);
excelWriter.write(list, writeSheet, writeTable3);
excelWriter.write(new ArrayList<>(),writeSheet, writeTable4);
excelWriter.write(new ArrayList<>(),writeSheet, writeTable5);
excelWriter.write(new ArrayList<>(),writeSheet, writeTable6);
excelWriter.write(new ArrayList<>(),writeSheet, writeTable7);
excelWriter.write(list,writeSheet); excelWriter.write(list,writeSheet);
} }
if (excelWriter!= null) { if (excelWriter!= null) {
...@@ -6704,35 +6747,34 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -6704,35 +6747,34 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
public List<List<String>> headQ(SocialHandleSearchVo searchVo) { public List<List<String>> headQ(SocialHandleSearchVo searchVo) {
List<List<String>> list = new ArrayList<>(); List<List<String>> list = new ArrayList<>();
//表头数据 //表头数据
String a =""; String a = "";
String b =" "; String b = " ";
String c =" "; String c = " ";
String d =" "; String d = " ";
//第一列 //第一列
TDispatchFundSumExportVo dispatchFundSumExportVo =getFundSumExportVo(searchVo); TDispatchFundSumExportVo dispatchFundSumExportVo = getFundSumExportVo(searchVo);
if(Common.isNotNull(dispatchFundSumExportVo)) { if (Common.isNotNull(dispatchFundSumExportVo)) {
if (dispatchFundSumExportVo.getNumOne() != null) {
if(dispatchFundSumExportVo.getNumOne()!=null) {
a = dispatchFundSumExportVo.getNumOne().toString(); a = dispatchFundSumExportVo.getNumOne().toString();
} }
if (dispatchFundSumExportVo.getNumTwo() != null) {
if(dispatchFundSumExportVo.getNumTwo()!=null){
b = dispatchFundSumExportVo.getNumTwo().toString(); b = dispatchFundSumExportVo.getNumTwo().toString();
} }
if(dispatchFundSumExportVo.getMonenyOne()!=null) { if (dispatchFundSumExportVo.getMonenyOne() != null) {
c = dispatchFundSumExportVo.getMonenyOne().toString(); c = dispatchFundSumExportVo.getMonenyOne().toString();
} }
if(dispatchFundSumExportVo.getMonenyTwo()!=null) { if (dispatchFundSumExportVo.getMonenyTwo() != null) {
d = dispatchFundSumExportVo.getMonenyTwo().toString(); d = dispatchFundSumExportVo.getMonenyTwo().toString();
} }
if(dispatchFundSumExportVo.getNumOne()==0){ if (dispatchFundSumExportVo.getNumOne() == 0) {
a=""; a = "";
}
if (dispatchFundSumExportVo.getNumTwo() == 0) {
b = " ";
} }
if(dispatchFundSumExportVo.getNumTwo()==0){
b=" ";
} }
list.add(Lists.newArrayList("项目合计", "项目合计", "本月小计")); list.add(Lists.newArrayList("项目合计", "项目合计", "本月小计"));
...@@ -6740,7 +6782,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -6740,7 +6782,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
list.add(Lists.newArrayList("项目合计", "项目合计", "本月小计")); list.add(Lists.newArrayList("项目合计", "项目合计", "本月小计"));
//第三列 //第三列
list.add(Lists.newArrayList("本月增加汇款", "人数", b)); list.add(Lists.newArrayList("本月增加汇款", "人数", b));
list.add(Lists.newArrayList("本月增加汇款", "金额", c)); list.add(Lists.newArrayList("本月增加汇款", "金额", c));
...@@ -6752,24 +6793,23 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -6752,24 +6793,23 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
list.add(Lists.newArrayList("本月汇款", "人数", "")); list.add(Lists.newArrayList("本月汇款", "人数", ""));
//第七列 //第七列
list.add(Lists.newArrayList("本月汇款", "金额", "")); list.add(Lists.newArrayList("本月汇款", "金额", ""));
}
return list; return list;
} }
/** /**
* @return * @return
* @Author wzb * @Author huyc
* @Description 导出公积金派单花名册 * @Description 导出社保派单花名册
* @Date 09:05 2023/7/21 * @Date 11:12 2023/7/21
*/ */
public List<List<String>> headE() { public List<List<String>> FundHeadT() {
List<List<String>> list = new ArrayList<>(); List<List<String>> list = new ArrayList<>();
//表头数据 //表头数据
String b = "制表人: 电话: " + "制表时间: " + DateUtil.getYear(DateUtil.getCurrentDateTime()) + " 年" + " " + DateUtil.getMonth(DateUtil.getCurrentDateTime()) + " 月" + " " + DateUtil.getDay(DateUtil.getCurrentDateTime()) + " 日";
//第一列-第十八列
//第一列 for (int i = 1; i <= 8; i++) {
list.add(Lists.newArrayList("本月小计", "本月小计")); list.add(Lists.newArrayList(b));
}
return list; return list;
} }
...@@ -6782,8 +6822,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -6782,8 +6822,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
public List<List<String>> FundHeadR() { public List<List<String>> FundHeadR() {
List<List<String>> list = new ArrayList<>(); List<List<String>> list = new ArrayList<>();
//表头数据 //表头数据
list.add(Lists.newArrayList("备注", "备注")); list.add(Lists.newArrayList(" 备注", " 备注"));
list.add(Lists.newArrayList("备注", "备注")); list.add(Lists.newArrayList(" 备注", " 备注"));
String a="1.新增人员必须填写身份证号码。\n"+ String a="1.新增人员必须填写身份证号码。\n"+
"2.本表只提供单位缴存人数变动使用。\n"+ "2.本表只提供单位缴存人数变动使用。\n"+
"3.对于工资基数调整及个人补缴业务不得使用此表。\n"+ "3.对于工资基数调整及个人补缴业务不得使用此表。\n"+
...@@ -6794,23 +6834,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -6794,23 +6834,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return list; return list;
} }
/**
* @return
* @Author huyc
* @Description 导出社保派单花名册
* @Date 11:12 2023/7/21
*/
public List<List<String>> FundHeadT() {
List<List<String>> list = new ArrayList<>();
//表头数据
String b = "制表人: 电话: " + "制表时间: " + DateUtil.getYear(DateUtil.getCurrentDateTime()) + " 年" + " " + DateUtil.getMonth(DateUtil.getCurrentDateTime()) + " 月" + " " + DateUtil.getDay(DateUtil.getCurrentDateTime()) + " 日";
//第一列-第十八列
for (int i = 1; i <= 8; i++) {
list.add(Lists.newArrayList(b));
}
return list;
}
/** /**
...@@ -6889,6 +6912,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -6889,6 +6912,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
list.add(Lists.newArrayList("单位公积金账号", "单边缴存比例")); list.add(Lists.newArrayList("单位公积金账号", "单边缴存比例"));
if(houseNameConfigVo.getCustomerNo()==null){
houseNameConfigVo.setCustomerNo("");
}
list.add(Lists.newArrayList(houseNameConfigVo.getCustomerNo(), houseNameConfigVo.getCompanyPro().toString()+"%")); list.add(Lists.newArrayList(houseNameConfigVo.getCustomerNo(), houseNameConfigVo.getCompanyPro().toString()+"%"));
list.add(Lists.newArrayList(houseNameConfigVo.getCustomerNo(), houseNameConfigVo.getCompanyPro().toString()+"%")); list.add(Lists.newArrayList(houseNameConfigVo.getCustomerNo(), houseNameConfigVo.getCompanyPro().toString()+"%"));
...@@ -6921,7 +6948,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -6921,7 +6948,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
//第七列 //第七列
list.add(Lists.newArrayList("补缴时间", "起始(年月日)")); list.add(Lists.newArrayList("补缴时间", "起始(年月日)"));
list.add(Lists.newArrayList(searchVo.getDisMonth(), "截至(年月日)")); list.add(Lists.newArrayList("补缴时间", "截至(年月日)"));
//第八列 //第八列
...@@ -6947,15 +6974,24 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -6947,15 +6974,24 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
List<List<String>> list = new ArrayList<>(); List<List<String>> list = new ArrayList<>();
//表头数据 //表头数据
//第一列 //第一列
TDispatchFundSumVo tDispatchFundSumVo= getFundSumVo(searchVo); String a="";
String a=tDispatchFundSumVo.getSupplementaryAmountSum().toString(); HouseNameConfigVo houseNameConfigVo=getFundSumExportVoTwo(searchVo.getProvidentHouseholdName());
if(houseNameConfigVo!=null) {
TDispatchFundSumVo tDispatchFundSumVo = getFundSumVo(searchVo, houseNameConfigVo.getCompanyPro());
if (tDispatchFundSumVo.getSupplementaryAmountSum()!= null&&tDispatchFundSumVo.getNumber()!="0") {
a = tDispatchFundSumVo.getSupplementaryAmountSum().toString();
} else {
a = "0";
}
}
list.add(Lists.newArrayList("", "")); list.add(Lists.newArrayList("", ""));
//第二列 //第二列
list.add(Lists.newArrayList("合计补缴金额(大写):", "合计补缴金额(大写):")); list.add(Lists.newArrayList("合计补缴金额(大写):", "合计补缴金额(大写):"));
//第三列 //第三列
//第四列 //第四列
int b =Integer.parseInt(a); int b=Double.valueOf(a).intValue();
String c=int2big(b).toString(); String c=int2big(b);
list.add(Lists.newArrayList(a, a)); list.add(Lists.newArrayList(a, a));
//第五列 //第五列
list.add(Lists.newArrayList(c, c)); list.add(Lists.newArrayList(c, c));
...@@ -6970,10 +7006,13 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -6970,10 +7006,13 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
} }
public List<List<String>> headQFour() { public List<List<String>> headQFour(SocialHandleSearchVo searchVo) {
List<List<String>> list = new ArrayList<>(); List<List<String>> list = new ArrayList<>();
//表头数据 //表头数据
//第一列 //第一列
HouseNameConfigVo houseNameConfigVo=getFundSumExportVoTwo(searchVo.getProvidentHouseholdName());
TDispatchFundSumVo dispatchFundSumVo=getFundSumVo(searchVo,houseNameConfigVo.getCompanyPro());
String F=dispatchFundSumVo.getNumber();
list.add(Lists.newArrayList("单位申请\n" +"补缴意见")); list.add(Lists.newArrayList("单位申请\n" +"补缴意见"));
list.add(Lists.newArrayList("单位申请\n" +"补缴意见")); list.add(Lists.newArrayList("单位申请\n" +"补缴意见"));
...@@ -6984,10 +7023,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -6984,10 +7023,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
list.add(Lists.newArrayList("", "","","","","负责人:"," 年 月 日")); list.add(Lists.newArrayList("", "","","","","负责人:"," 年 月 日"));
//第三列 //第三列
list.add(Lists.newArrayList("补缴合计", "此次申请补缴共有20人","49676","补缴原因","补缴原因","补缴原因")); list.add(Lists.newArrayList("补缴合计", "补缴合计","补缴合计","补缴原因","补缴原因","补缴原因"));
list.add(Lists.newArrayList("", "","")); list.add(Lists.newArrayList("此次申请补缴共有"+dispatchFundSumVo.getNumber()+"人", "补缴总额"+dispatchFundSumVo.getSupplementaryAmountSum().toString(),""));
list.add(Lists.newArrayList("", "","")); list.add(Lists.newArrayList("此次申请补缴共有"+dispatchFundSumVo.getNumber()+"人", "补缴总额"+dispatchFundSumVo.getSupplementaryAmountSum().toString(),""));
//第四列 //第四列
......
...@@ -209,7 +209,7 @@ ...@@ -209,7 +209,7 @@
<resultMap id="FundSupplementary" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchFundSumVo"> <resultMap id="FundSupplementary" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchFundSumVo">
<result property="supplementaryAmountSum" column="SUPPLEMENTART_AMOUNT_SUM"/> <result property="supplementaryAmountSum" column="SUPPLEMENTART_AMOUNT_SUM"/>
<result property="number" column="NUMBER"/>
</resultMap> </resultMap>
<resultMap id="FundSumExport" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchFundSumExportVo"> <resultMap id="FundSumExport" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchFundSumExportVo">
...@@ -1265,6 +1265,25 @@ ...@@ -1265,6 +1265,25 @@
group by a.EMP_IDCARD) h group by a.EMP_IDCARD) h
</select> </select>
<select id="getFCount" resultType="java.lang.Integer">
SELECT count(1) from (
SELECT 1
FROM t_dispatch_info a
<where>
<include refid="where_getFundDisRecord"/>
</where>
group by a.EMP_IDCARD ,a.TYPE) h
</select>
<select id="getSocialDisRecordCount" resultType="java.lang.Integer">
SELECT count(1) from (
SELECT 1
FROM t_dispatch_info a
<where>
<include refid="where_getSocialDisRecord"/>
</where>
group by a.EMP_IDCARD) h
</select>
<!--tDispatchInfo 社保医疗花名册派单数据--> <!--tDispatchInfo 社保医疗花名册派单数据-->
<select id="getSocialDisRecord" resultMap="socialDisExportMap"> <select id="getSocialDisRecord" resultMap="socialDisExportMap">
...@@ -1954,6 +1973,30 @@ ...@@ -1954,6 +1973,30 @@
</if> </if>
</if> </if>
</sql>
<sql id="where_getFund">
a.DELETE_FLAG = 0
AND a.fund_id is not null
AND a.STATUS in ('2','4')
AND a.DISPATCH_ITEM like concat('%','公积金','%')
<if test="tDispatchInfo != null">
<if test="tDispatchInfo.providentHouseholdName != null and tDispatchInfo.providentHouseholdName.trim() != ''">
AND a.PROVIDENT_HOUSEHOLD_NAME = #{tDispatchInfo.providentHouseholdName}
</if>
<if test="tDispatchInfo.type != null and tDispatchInfo.type.trim() != ''">
AND a.TYPE = #{tDispatchInfo.type}
</if>
<if test="tDispatchInfo.disMonth != null and tDispatchInfo.disMonth.trim() != ''">
AND replace(DATE_FORMAT(a.CREATE_TIME,"%Y-%m"),'-','') = #{tDispatchInfo.disMonth}
</if>
<if test="tDispatchInfo.fundHandleStatus != null and tDispatchInfo.fundHandleStatus.trim() != ''">
AND a.FUND_HANDLE_STATUS = #{tDispatchInfo.fundHandleStatus}
</if>
<if test="tDispatchInfo.authSql != null and tDispatchInfo.authSql.trim() != ''">
${tDispatchInfo.authSql}
</if>
</if>
</sql> </sql>
<sql id="where_getSocialPersionDisRecord"> <sql id="where_getSocialPersionDisRecord">
...@@ -1999,41 +2042,62 @@ ...@@ -1999,41 +2042,62 @@
<!--tDispatchInfo 社保医疗花名册派单数据--> <!--tDispatchInfo 社保医疗花名册派单数据-->
<select id="getFundPersionExportVo" resultMap="FundExport"> <select id="getFundPersionExportVo" resultMap="FundExport">
SELECT SELECT
(@i :=@i+1) as NUM, ( @i := @i + 1 ) AS NUM,
h.EMP_NAME,
h.EMP_IDCARD,
h.DEPOSIT_BASE,
h.MOTHLY_INCREASE,
h.MOTHLY_DECREASE,
h.CAUSE_CHANGE
FROM
(
SELECT
a.EMP_NAME, a.EMP_NAME,
a.EMP_IDCARD, a.EMP_IDCARD,
s.UNIT_PROVIDENG_CARDINAL AS DEPOSIT_BASE , s.UNIT_PROVIDENG_CARDINAL AS DEPOSIT_BASE,
IF(a.TYPE=0 ,s.UNIT_PROVIDENT_FEE*2,NULL) as MOTHLY_INCREASE, IF
IF(a.TYPE=1 ,s.UNIT_PROVIDENT_FEE*2,NULL) as MOTHLY_DECREASE, ( a.TYPE = 0, s.UNIT_PROVIDENT_FEE * 2, NULL ) AS MOTHLY_INCREASE,
case when a.TYPE=0 then "新增" IF
else "减少" end as CAUSE_CHANGE ( a.TYPE = 1, s.UNIT_PROVIDENT_FEE * 2, NULL ) AS MOTHLY_DECREASE,
FROM t_dispatch_info a CASE
left join t_provident_fund s on s.id=a.FUND_ID
,(select @i:=0) as itable WHEN a.TYPE = 0 THEN
"新增" ELSE "减少"
END AS CAUSE_CHANGE
FROM
t_dispatch_info a
LEFT JOIN t_provident_fund s ON s.id = a.FUND_ID
<where> <where>
<include refid="where_getFundDisRecord"/> <include refid="where_getFundDisRecord"/>
</where> </where>
GROUP BY
a.EMP_IDCARD,
a.TYPE
ORDER BY
a.TYPE
) h,(select @i:=0) as itable
</select> </select>
<!--tDispatchInfo 社保医疗花名册派单数据--> <!--tDispatchInfo 社保医疗花名册派单数据-->
<select id="getFundSupplementarynExportVo" resultMap="FundSupplementaryExport"> <select id="getFundSupplementarynExportVo" resultMap="FundSupplementaryExport">
SELECT SELECT
(@i :=@i+1) as NUM, ( @i := @i + 1 ) AS NUM,
a.EMP_NAME, a.EMP_NAME,
a.EMP_IDCARD, a.EMP_IDCARD,
s.UNIT_PROVIDENG_CARDINAL AS DEPOSIT_BASE , s.UNIT_PROVIDENG_CARDINAL AS DEPOSIT_BASE,
replace( DATE_FORMAT(s.PROVIDENT_START,"%Y-%m"),'-','') as ORIGINATE, REPLACE ( DATE_FORMAT( s.PROVIDENT_START, "%Y-%m" ), '-', '' ) AS ORIGINATE,
replace( DATE_FORMAT(DATE(CURDATE()),"%Y-%m"),'-','') as END, #{tDispatchInfo.disMonth} AS END,
ROUND(SUM((abs(PERIOD_DIFF(replace(DATE_FORMAT(s.PROVIDENT_START,"%Y-%m"), '-', ''), ROUND((PERIOD_DIFF(#{tDispatchInfo.disMonth},REPLACE ( DATE_FORMAT( s.PROVIDENT_START, "%Y-%m" ), '-', '' )))*#{companyPro}*s.UNIT_PROVIDENG_CARDINAL*0.01 ) AS SUPPLEMENTART_AMOUNT
#{tDispatchInfo.disMonth})))*s.UNIT_PROVIDENT_PER*s.UNIT_PROVIDENG_CARDINAL ) FROM
) t_dispatch_info a
AS SUPPLEMENTART_AMOUNT LEFT JOIN t_provident_fund s ON s.id = a.FUND_ID,(
FROM t_dispatch_info a SELECT
left join t_provident_fund s on s.id=a.FUND_ID @i := 0
,(select @i:=0) as itable ) AS itable
<where> <where>
<include refid="where_getFundDisRecord"/> <include refid="where_getFund"/>
</where> </where>
</select> </select>
<select id="getFundSumExportVo" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchFundSumExportVo"> <select id="getFundSumExportVo" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchFundSumExportVo">
...@@ -2050,13 +2114,12 @@ ...@@ -2050,13 +2114,12 @@
</select> </select>
<select id="getFundSumExportVoOne" resultMap="FundSupplementary"> <select id="getFundSumExportVoOne" resultMap="FundSupplementary">
SELECT SELECT
ROUND(SUM((abs(PERIOD_DIFF(replace(DATE_FORMAT(s.PROVIDENT_START,"%Y-%m"), '-', ''), count(a.EMP_IDCARD) as NUMBER,
#{tDispatchInfo.disMonth})))*0.1*s.UNIT_PROVIDENG_CARDINAL ) SUM(ROUND((PERIOD_DIFF(#{tDispatchInfo.disMonth},REPLACE (DATE_FORMAT( DATE_ADD(s.PROVIDENT_START,INTERVAL 1 MONTH), "%Y-%m" ), '-', '' )))*#{companyPro}*s.UNIT_PROVIDENG_CARDINAL*0.01 )) AS SUPPLEMENTART_AMOUNT_SUM
) AS SUPPLEMENTART_AMOUNT_SUM
FROM t_dispatch_info a FROM t_dispatch_info a
left join t_provident_fund s on s.id = a.FUND_ID left join t_provident_fund s on s.id = a.FUND_ID
<where> <where>
<include refid="where_getFundDisRecord"/> <include refid="where_getFund"/>
</where> </where>
</select> </select>
......
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