社保报表
This commit is contained in:
parent
bfa4057016
commit
044b02e002
|
|
@ -1815,9 +1815,6 @@
|
|||
from
|
||||
(select * from hrsa_bill_detail where delete_type = 0 and payment_status=0) a
|
||||
left join (select * from hrsa_bill_detail where delete_type = 0 and payment_status=1) b on a.employee_id = b.employee_id
|
||||
left join hrmresource e on e.ID = a.employee_id
|
||||
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
||||
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
||||
where a.payment_organization = #{paymentOrganization} and a.bill_month = #{billMonth}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ import java.util.Map;
|
|||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
*
|
||||
* @Date 2022/4/11
|
||||
* @Version V1.0
|
||||
**/
|
||||
|
|
@ -24,6 +23,7 @@ public interface SIAccountService {
|
|||
|
||||
/**
|
||||
* 查询台账列表
|
||||
*
|
||||
* @param insuranceAccountBatchParam
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -31,6 +31,7 @@ public interface SIAccountService {
|
|||
|
||||
/**
|
||||
* 获取正常缴纳列表
|
||||
*
|
||||
* @param insuranceAccountDetailParam
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -38,6 +39,7 @@ public interface SIAccountService {
|
|||
|
||||
/**
|
||||
* 根据姓名名获取正常缴纳列表
|
||||
*
|
||||
* @param insuranceAccountDetailParam
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -45,6 +47,7 @@ public interface SIAccountService {
|
|||
|
||||
/**
|
||||
* 获取补缴缴纳列表
|
||||
*
|
||||
* @param insuranceAccountDetailParam
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -52,6 +55,7 @@ public interface SIAccountService {
|
|||
|
||||
/**
|
||||
* 获取退差列表
|
||||
*
|
||||
* @param insuranceAccountDetailParam
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -59,6 +63,7 @@ public interface SIAccountService {
|
|||
|
||||
/**
|
||||
* 获取补差列表
|
||||
*
|
||||
* @param insuranceAccountDetailParam
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -66,6 +71,7 @@ public interface SIAccountService {
|
|||
|
||||
/**
|
||||
* 根据姓名获取补缴缴纳列表
|
||||
*
|
||||
* @param insuranceAccountDetailParam
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -73,6 +79,7 @@ public interface SIAccountService {
|
|||
|
||||
/**
|
||||
* 获取核算月份备注填写表单
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -80,12 +87,14 @@ public interface SIAccountService {
|
|||
|
||||
/**
|
||||
* 保存并进入核算
|
||||
*
|
||||
* @param param
|
||||
*/
|
||||
String save(AccountParam param);
|
||||
|
||||
/**
|
||||
* 新建核算并归档
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -93,48 +102,56 @@ public interface SIAccountService {
|
|||
|
||||
/**
|
||||
* 正常缴纳页核算
|
||||
*
|
||||
* @param saveCommonAccountParam
|
||||
*/
|
||||
void commonAccount(SaveCommonAccountParam saveCommonAccountParam);
|
||||
|
||||
/**
|
||||
* 删除月份表单
|
||||
*
|
||||
* @param accountParam
|
||||
*/
|
||||
void delete(AccountParam accountParam);
|
||||
|
||||
/**
|
||||
* 添加正常缴纳人员
|
||||
*
|
||||
* @param accountParam
|
||||
*/
|
||||
void saveCommonAccount(SaveCommonAccountParam accountParam);
|
||||
|
||||
/**
|
||||
* 添加补缴人员
|
||||
*
|
||||
* @param saveSupplementaryAccountParam
|
||||
*/
|
||||
void saveSupplementaryAccount(SaveSupplementaryAccountParam saveSupplementaryAccountParam);
|
||||
|
||||
/**
|
||||
* 删除正常缴纳人员
|
||||
*
|
||||
* @param accountParam
|
||||
*/
|
||||
void deleteCommonAccount(SaveCommonAccountParam accountParam);
|
||||
|
||||
/**
|
||||
* 删除补缴人员
|
||||
*
|
||||
* @param param
|
||||
*/
|
||||
void deleteSupplementaryAccount(SaveCommonAccountParam param);
|
||||
|
||||
/**
|
||||
* 台账归档
|
||||
*
|
||||
* @param accountParam
|
||||
*/
|
||||
void file(AccountParam accountParam);
|
||||
|
||||
/**
|
||||
* 重置核算异常
|
||||
*
|
||||
* @param ids
|
||||
*/
|
||||
void unconfirmed(Collection<Long> ids);
|
||||
|
|
@ -142,6 +159,7 @@ public interface SIAccountService {
|
|||
|
||||
/**
|
||||
* 获取核算异常列表页是否导出档案开关
|
||||
*
|
||||
* @param billMonth
|
||||
*/
|
||||
Map<String, Boolean> buttonCheck(String billMonth);
|
||||
|
|
@ -149,6 +167,7 @@ public interface SIAccountService {
|
|||
|
||||
/**
|
||||
* 忽略核算异常
|
||||
*
|
||||
* @param longs
|
||||
*/
|
||||
void ignore(Collection<Long> longs);
|
||||
|
|
@ -160,26 +179,29 @@ public interface SIAccountService {
|
|||
|
||||
/**
|
||||
* 人员异动
|
||||
*
|
||||
* @param insuranceAccountDetailParam
|
||||
*/
|
||||
Map<String, Object> changeList(InsuranceAccountDetailParam insuranceAccountDetailParam);
|
||||
|
||||
/**
|
||||
* 核算核算异常,重新核算
|
||||
*
|
||||
* @param inspectAccountParam
|
||||
*/
|
||||
void accountInspect(InspectAccountParam inspectAccountParam);
|
||||
|
||||
/**
|
||||
* 核算失败列表
|
||||
*
|
||||
* @param param
|
||||
*/
|
||||
Map<String, Object> getInspectTable(InsuranceAccountDetailParam param);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 正常缴纳添加缴纳人员表单
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -188,6 +210,7 @@ public interface SIAccountService {
|
|||
|
||||
/**
|
||||
* 补缴添加缴纳人员表单
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -195,6 +218,7 @@ public interface SIAccountService {
|
|||
|
||||
/**
|
||||
* 总览
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -295,18 +319,21 @@ public interface SIAccountService {
|
|||
|
||||
/**
|
||||
* 补缴合计行
|
||||
*
|
||||
* @param insuranceAccountDetailParam
|
||||
*/
|
||||
Map<String, Object> listSupplementarySum(InsuranceAccountDetailParam insuranceAccountDetailParam);
|
||||
|
||||
/**
|
||||
* 退差合计列
|
||||
*
|
||||
* @param insuranceAccountDetailParam
|
||||
*/
|
||||
Map<String, Object> listRecessionSum(InsuranceAccountDetailParam insuranceAccountDetailParam);
|
||||
|
||||
/**
|
||||
* 补差合计列
|
||||
*
|
||||
* @param insuranceAccountDetailParam
|
||||
*/
|
||||
Map<String, Object> listBalanceSum(InsuranceAccountDetailParam insuranceAccountDetailParam);
|
||||
|
|
@ -333,7 +360,9 @@ public interface SIAccountService {
|
|||
|
||||
void batSocialSecurityBenefitsRecalculate(AccountBatParam batParam);
|
||||
|
||||
Object qzReport(QZInsuranceAccountBatchParam qzInsuranceAccountBatchParam);
|
||||
Map<String, Object> qzReport(QZInsuranceAccountBatchParam qzInsuranceAccountBatchParam);
|
||||
|
||||
XSSFWorkbook exportQZReport(QZInsuranceAccountBatchParam param);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -588,9 +588,6 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
|
|||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
record.put(k + "socialPerBase", v);
|
||||
}
|
||||
if (Long.parseLong(k) == 9001L) {
|
||||
record.put("socialBase", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
Map<String, Object> socialComJson = JSON.parseObject(item.getSocialPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
|
|
@ -614,9 +611,6 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
|
|||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
record.put(k + "socialBase", v);
|
||||
}
|
||||
if (Long.parseLong(k) == 9001L) {
|
||||
record.put("socialBase", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -641,9 +635,6 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
|
|||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
record.put(k + "fundPerBase", v);
|
||||
}
|
||||
if (Long.parseLong(k) == 9006L) {
|
||||
record.put("fundBase", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
Map<String, Object> fundComJson = JSON.parseObject(item.getFundPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
|
|
@ -667,9 +658,6 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
|
|||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
record.put(k + "fundBase", v);
|
||||
}
|
||||
if (Long.parseLong(k) == 9006L) {
|
||||
record.put("fundBase", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -727,6 +715,16 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
|
|||
});
|
||||
}
|
||||
|
||||
}
|
||||
//补缴
|
||||
if (StringUtils.isNotEmpty(item.getBSocialPerJson())) {
|
||||
Map<String, Object> socialJson = JSON.parseObject(item.getBSocialPerJson(), new HashMap<String, Object>().getClass());
|
||||
if (socialJson != null) {
|
||||
socialJson.forEach((k, v) -> {
|
||||
record.put(k + "bSocialPer", (String) v);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
//
|
||||
// // 钱智 社保差异
|
||||
|
|
@ -760,6 +758,15 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
|
|||
});
|
||||
}
|
||||
|
||||
}
|
||||
if (StringUtils.isNotEmpty(item.getBFundPerJson())) {
|
||||
Map<String, Object> fundPerJson = JSON.parseObject(item.getBFundPerJson(), new HashMap<String, Object>().getClass());
|
||||
if (fundPerJson != null) {
|
||||
fundPerJson.forEach((k, v) -> {
|
||||
record.put(k + "bFundPer", (String) v);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
// // 钱智 公积金差异
|
||||
// final BigDecimal[] fundSpecialSum = {new BigDecimal(0)};
|
||||
|
|
@ -791,6 +798,14 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
|
|||
record.put(k + "otherPer", (String) v);
|
||||
});
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotEmpty(item.getBOtherPerJson())) {
|
||||
Map<String, Object> fundPerJson = JSON.parseObject(item.getBOtherPerJson(), new HashMap<String, Object>().getClass());
|
||||
if (fundPerJson != null) {
|
||||
fundPerJson.forEach((k, v) -> {
|
||||
record.put(k + "bOtherPer", (String) v);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
record.put("otherPerSum", item.getOtherPerSum());
|
||||
|
|
@ -802,10 +817,15 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
|
|||
record.put(k + "socialCom", (String) v);
|
||||
});
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotEmpty(item.getBSocialComJson())) {
|
||||
Map<String, Object> fundPerJson = JSON.parseObject(item.getBSocialComJson(), new HashMap<String, Object>().getClass());
|
||||
if (fundPerJson != null) {
|
||||
fundPerJson.forEach((k, v) -> {
|
||||
record.put(k + "socialCom", (String) v);
|
||||
record.put(k + "bSocialCom", (String) v);
|
||||
});
|
||||
}
|
||||
}
|
||||
record.put("socialComSum", item.getSocialComSum());
|
||||
if (StringUtils.isNotEmpty(item.getFundComJson())) {
|
||||
Map<String, Object> fundPerJson = JSON.parseObject(item.getFundComJson(), new HashMap<String, Object>().getClass());
|
||||
|
|
@ -815,6 +835,15 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
|
|||
});
|
||||
}
|
||||
|
||||
}
|
||||
if (StringUtils.isNotEmpty(item.getBFundComJson())) {
|
||||
Map<String, Object> fundPerJson = JSON.parseObject(item.getBFundComJson(), new HashMap<String, Object>().getClass());
|
||||
if (fundPerJson != null) {
|
||||
fundPerJson.forEach((k, v) -> {
|
||||
record.put(k + "bFundCom", (String) v);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
record.put("fundComSum", item.getFundComSum());
|
||||
if (StringUtils.isNotEmpty(item.getOtherComJson())) {
|
||||
|
|
@ -825,6 +854,15 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
|
|||
});
|
||||
}
|
||||
|
||||
}
|
||||
if (StringUtils.isNotEmpty(item.getBOtherComJson())) {
|
||||
Map<String, Object> fundPerJson = JSON.parseObject(item.getBOtherComJson(), new HashMap<String, Object>().getClass());
|
||||
if (fundPerJson != null) {
|
||||
fundPerJson.forEach((k, v) -> {
|
||||
record.put(k + "bOtherCom", (String) v);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
record.put("otherComSum", item.getOtherComSum());
|
||||
|
||||
|
|
|
|||
|
|
@ -7204,11 +7204,11 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Object qzReport(QZInsuranceAccountBatchParam qzInsuranceAccountBatchParam) {
|
||||
public Map<String, Object> qzReport(QZInsuranceAccountBatchParam param) {
|
||||
|
||||
List<Long> ids = qzInsuranceAccountBatchParam.getIds();
|
||||
List<Long> ids = param.getIds();
|
||||
|
||||
List<QZReportListDTO> list = new ArrayList<>();
|
||||
List<QZReportListDTO> dtos = new ArrayList<>();
|
||||
for (Long id : ids) {
|
||||
InsuranceAccountBatchPO batchPO = getInsuranceAccountBatchMapper().getById(id);
|
||||
Long paymentOrganization = batchPO.getPaymentOrganization();
|
||||
|
|
@ -7224,10 +7224,10 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
//系统人员福利台账明细
|
||||
List<QZReportListDTO> qzReportListDTOS = getInsuranceAccountDetailMapper().qzReportList(queryParam);
|
||||
encryptUtil.decryptList(qzReportListDTOS, QZReportListDTO.class);
|
||||
list.addAll(qzReportListDTOS);
|
||||
dtos.addAll(qzReportListDTOS);
|
||||
}
|
||||
|
||||
List<Map<String, Object>> list1 = getService(user).buildQzReport(list, (long) user.getUID(), false);
|
||||
List<Map<String, Object>> list = getService(user).buildQzReport(dtos, (long) user.getUID(), false);
|
||||
|
||||
List<WeaTableColumnGroup> columns = Lists.newArrayList();
|
||||
columns.add(new WeaTableColumnGroup("150", "公司名称", "paymentOrganizationName"));
|
||||
|
|
@ -7240,22 +7240,75 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
columns.add(new WeaTableColumnGroup("150", "岗位名称", "jobtitleName"));
|
||||
columns.add(new WeaTableColumnGroup("150", "进入日期", "companystartdate"));
|
||||
columns.add(new WeaTableColumnGroup("150", "离职日期", "dismissdate"));
|
||||
columns.add(new WeaTableColumnGroup("150", "社保基数", "socialBase"));
|
||||
columns.add(new WeaTableColumnGroup("150", "公积金基数", "fundBase"));
|
||||
columns.add(new WeaTableColumnGroup("150", "社保基数", "9001socialBase"));
|
||||
columns.add(new WeaTableColumnGroup("150", "公积金基数", "9006fundBase"));
|
||||
|
||||
columns.add(new WeaTableColumnGroup("150", "养老保险", "", Lists.newArrayList(new WeaTableColumnGroup("150", "单位缴交额", "fundBase"), new WeaTableColumnGroup("150", "单位补缴额", "fundBase"))));
|
||||
columns.add(new WeaTableColumnGroup("150", "医疗保险", "", Lists.newArrayList(new WeaTableColumnGroup("150", "单位缴交额", "fundBase"), new WeaTableColumnGroup("150", "单位补缴额", "fundBase"))));
|
||||
columns.add(new WeaTableColumnGroup("150", "失业保险", "", Lists.newArrayList(new WeaTableColumnGroup("150", "单位缴交额", "fundBase"), new WeaTableColumnGroup("150", "单位补缴额", "fundBase"))));
|
||||
columns.add(new WeaTableColumnGroup("150", "工伤保险", "", Lists.newArrayList(new WeaTableColumnGroup("150", "单位缴交额", "fundBase"), new WeaTableColumnGroup("150", "单位补缴额", "fundBase"))));
|
||||
columns.add(new WeaTableColumnGroup("150", "生育保险", "", Lists.newArrayList(new WeaTableColumnGroup("150", "单位缴交额", "fundBase"), new WeaTableColumnGroup("150", "单位补缴额", "fundBase"))));
|
||||
columns.add(new WeaTableColumnGroup("150", "补充医疗保险", "", Lists.newArrayList(new WeaTableColumnGroup("150", "单位缴交额", "fundBase"), new WeaTableColumnGroup("150", "单位补缴额", "fundBase"))));
|
||||
columns.add(new WeaTableColumnGroup("150", "大病保险", "", Lists.newArrayList(new WeaTableColumnGroup("150", "单位缴交额", "fundBase"), new WeaTableColumnGroup("150", "单位补缴额", "fundBase"))));
|
||||
columns.add(new WeaTableColumnGroup("150", "住房公积金", "", Lists.newArrayList(new WeaTableColumnGroup("150", "单位缴交额", "fundBase"), new WeaTableColumnGroup("150", "单位补缴额", "fundBase"))));
|
||||
columns.add(new WeaTableColumnGroup("150", "养老保险", "", Lists.newArrayList(new WeaTableColumnGroup("150", "单位缴交额", "fundBase"), new WeaTableColumnGroup("150", "单位补缴额", "fundBase"))));
|
||||
columns.add(new WeaTableColumnGroup("150", "养老保险", "", Lists.newArrayList(new WeaTableColumnGroup("150", "单位缴交额", "fundBase"), new WeaTableColumnGroup("150", "单位补缴额", "fundBase"))));
|
||||
columns.add(new WeaTableColumnGroup("150", "养老保险", "", Lists.newArrayList(new WeaTableColumnGroup("150", "单位缴交额", "9001socialCom"), new WeaTableColumnGroup("150", "单位补缴额", "9001bSocialCom"))));
|
||||
columns.add(new WeaTableColumnGroup("150", "医疗保险", "", Lists.newArrayList(new WeaTableColumnGroup("150", "单位缴交额", "9002socialCom"), new WeaTableColumnGroup("150", "单位补缴额", "9002bSocialCom"))));
|
||||
columns.add(new WeaTableColumnGroup("150", "失业保险", "", Lists.newArrayList(new WeaTableColumnGroup("150", "单位缴交额", "9004socialCom"), new WeaTableColumnGroup("150", "单位补缴额", "9004bSocialCom"))));
|
||||
columns.add(new WeaTableColumnGroup("150", "工伤保险", "", Lists.newArrayList(new WeaTableColumnGroup("150", "单位缴交额", "9003socialCom"), new WeaTableColumnGroup("150", "单位补缴额", "9003bSocialCom"))));
|
||||
columns.add(new WeaTableColumnGroup("150", "生育保险", "", Lists.newArrayList(new WeaTableColumnGroup("150", "单位缴交额", "9005socialCom"), new WeaTableColumnGroup("150", "单位补缴额", "9005bSocialCom"))));
|
||||
columns.add(new WeaTableColumnGroup("150", "补充医疗保险", "", Lists.newArrayList(new WeaTableColumnGroup("150", "单位缴交额", ""), new WeaTableColumnGroup("150", "单位补缴额", ""))));
|
||||
columns.add(new WeaTableColumnGroup("150", "大病保险", "", Lists.newArrayList(new WeaTableColumnGroup("150", "单位缴交额", ""), new WeaTableColumnGroup("150", "单位补缴额", ""))));
|
||||
columns.add(new WeaTableColumnGroup("150", "住房公积金", "", Lists.newArrayList(new WeaTableColumnGroup("150", "单位缴交额", "9006fundCom"), new WeaTableColumnGroup("150", "单位补缴额", "9006bFundCom"))));
|
||||
columns.add(new WeaTableColumnGroup("150", "养老保险", "", Lists.newArrayList(new WeaTableColumnGroup("150", "个人缴交额", "9001socialPer"), new WeaTableColumnGroup("150", "个人补缴额", "9001bSocialPer"))));
|
||||
columns.add(new WeaTableColumnGroup("150", "医疗保险", "", Lists.newArrayList(new WeaTableColumnGroup("150", "个人缴交额", "9002socialPer"), new WeaTableColumnGroup("150", "个人补缴额", "9002bSocialPer"))));
|
||||
columns.add(new WeaTableColumnGroup("150", "失业保险", "", Lists.newArrayList(new WeaTableColumnGroup("150", "个人缴交额", "9004socialPer"), new WeaTableColumnGroup("150", "个人补缴额", "9004bSocialPer"))));
|
||||
columns.add(new WeaTableColumnGroup("150", "补充医疗保险", "", Lists.newArrayList(new WeaTableColumnGroup("150", "个人缴交额", ""), new WeaTableColumnGroup("150", "个人补缴额", ""))));
|
||||
columns.add(new WeaTableColumnGroup("150", "大病保险", "", Lists.newArrayList(new WeaTableColumnGroup("150", "个人缴交额", ""), new WeaTableColumnGroup("150", "个人补缴额", ""))));
|
||||
columns.add(new WeaTableColumnGroup("150", "单位超额-社保合计", "", Lists.newArrayList(new WeaTableColumnGroup("150", "个人缴交额", "socialSpecialSum"))));
|
||||
columns.add(new WeaTableColumnGroup("150", "住房公积金", "", Lists.newArrayList(new WeaTableColumnGroup("150", "个人缴交额", "9006fundPer"), new WeaTableColumnGroup("150", "个人补缴额", "9006bFundPer"))));
|
||||
columns.add(new WeaTableColumnGroup("150", "单位超额-公积金合计", "", Lists.newArrayList(new WeaTableColumnGroup("150", "个人缴交额", "fundSpecialSum"))));
|
||||
columns.add(new WeaTableColumnGroup("150", "社保公积金单位合计", "", Lists.newArrayList(new WeaTableColumnGroup("150", "单位缴交额", "comSum"), new WeaTableColumnGroup("150", "单位补缴额", "bComSum"))));
|
||||
columns.add(new WeaTableColumnGroup("150", "社保公积金个人合计", "", Lists.newArrayList(new WeaTableColumnGroup("150", "个人缴交额", "perSum"), new WeaTableColumnGroup("150", "个人补缴额", "bPerSum"))));
|
||||
columns.add(new WeaTableColumnGroup("150", "总计", "",Lists.newArrayList(new WeaTableColumnGroup("150", "总计", "total"))));
|
||||
columns.add(new WeaTableColumnGroup("150", "服务费", "", Lists.newArrayList(new WeaTableColumnGroup("150", "单位缴交额", ""), new WeaTableColumnGroup("150", "单位补缴额", ""))));
|
||||
columns.add(new WeaTableColumnGroup("150", "服务费", "", Lists.newArrayList(new WeaTableColumnGroup("150", "个人缴交额", ""), new WeaTableColumnGroup("150", "个人补缴额", ""))));
|
||||
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
result.put("columns", columns);
|
||||
result.put("list", list);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public XSSFWorkbook exportQZReport(QZInsuranceAccountBatchParam param) {
|
||||
|
||||
Map<String, Object> result = qzReport(param);
|
||||
List<WeaTableColumnGroup> headerColumnGroup = Lists.newArrayList();
|
||||
List<WeaTableColumnGroup> weaTableColumns = (List<WeaTableColumnGroup>)result.get("columns");
|
||||
|
||||
parseHeader(headerColumnGroup, weaTableColumns);
|
||||
|
||||
List<Object> headerList = new ArrayList<>(weaTableColumns);
|
||||
List<Map<String, Object>> resultMapList = (List<Map<String, Object>>)result.get("list");
|
||||
|
||||
|
||||
return null;
|
||||
|
||||
// excel导出的数据
|
||||
List<List<Object>> rows = new ArrayList<>();
|
||||
rows.add(headerList);
|
||||
for (Map<String, Object> map : resultMapList) {
|
||||
List<Object> row = Lists.newArrayListWithExpectedSize(headerColumnGroup.size());
|
||||
for (WeaTableColumnGroup weaTableColumn : headerColumnGroup) {
|
||||
row.add(map.getOrDefault(weaTableColumn.getColumn(), StringUtils.EMPTY));
|
||||
}
|
||||
rows.add(row);
|
||||
}
|
||||
|
||||
String sheetName = "社保公积金预算数据";
|
||||
return ExcelUtilPlus.genWorkbookWithChildTitleColumnWithExcelFormat(rows, sheetName, false);
|
||||
}
|
||||
|
||||
private void parseHeader(List<WeaTableColumnGroup> headerList, List<WeaTableColumnGroup> weaTableColumns) {
|
||||
for (WeaTableColumnGroup weaTableColumnGroup : weaTableColumns) {
|
||||
if (CollectionUtils.isEmpty(weaTableColumnGroup.getChildren())) {
|
||||
headerList.add(weaTableColumnGroup);
|
||||
continue;
|
||||
}
|
||||
parseHeader(headerList, weaTableColumnGroup.getChildren());
|
||||
}
|
||||
}
|
||||
|
||||
public void accountOtherView(InsuranceAccountViewListDTO dto, List<InsuranceAccountDetailPO> pos) {
|
||||
|
|
|
|||
|
|
@ -1234,7 +1234,40 @@ public class SIAccountController {
|
|||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String qzReport(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody QZInsuranceAccountBatchParam insuranceAccountBatchParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<QZInsuranceAccountBatchParam, Object>(user).run(getService(user)::qzReport, insuranceAccountBatchParam);
|
||||
return new ResponseResult<QZInsuranceAccountBatchParam, Map<String, Object>>(user).run(getService(user)::qzReport, insuranceAccountBatchParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出在线对比
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/exportQZReport")
|
||||
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
||||
public Response exportContrast(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody QZInsuranceAccountBatchParam param) {
|
||||
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
XSSFWorkbook workbook = getService(user).exportQZReport(param);
|
||||
String fileName = "社保公积金预算数据-" + LocalDate.now();
|
||||
try {
|
||||
fileName = URLEncoder.encode(fileName + ".xlsx", "UTF-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
StreamingOutput output = outputStream -> {
|
||||
workbook.write(outputStream);
|
||||
outputStream.flush();
|
||||
};
|
||||
response.setContentType("application/octet-stream");
|
||||
return Response.ok(output).header("Content-disposition", "attachment;filename=" + fileName).header("Cache-Control", "no-cache").build();
|
||||
} catch (Exception e) {
|
||||
log.error("社保公积金预算数据导出异常", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue