薪酬系统-福利台账,退差数据列表功能v2
This commit is contained in:
parent
a4924c19ee
commit
7be9424f73
|
|
@ -34,4 +34,10 @@ public class InsuranceAccountDetailParam extends BaseQueryParam {
|
|||
* 退差月份
|
||||
*/
|
||||
private List<String> recessionMonthList;
|
||||
|
||||
private List<Long> taxAgents;
|
||||
/**
|
||||
* 核算创建人
|
||||
*/
|
||||
private Long creator;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -160,6 +160,10 @@
|
|||
AND
|
||||
t.payment_organization = #{param.paymentOrganization}
|
||||
</if>
|
||||
<if test="param.creator != null">
|
||||
AND
|
||||
t.creator = #{param.creator}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<sql id="paramSql">
|
||||
|
|
@ -181,6 +185,12 @@
|
|||
#{recessionMonth}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.taxAgents != null and param.taxAgents.size()>0">
|
||||
AND t.payment_organization IN
|
||||
<foreach collection="param.taxAgents" open="(" item="taxAgent" separator="," close=")">
|
||||
#{taxAgent}
|
||||
</foreach>
|
||||
</if>
|
||||
</sql>
|
||||
<sql id="paramSql" databaseId="oracle">
|
||||
<if test="param.userName != null and param.userName != ''">
|
||||
|
|
@ -201,6 +211,12 @@
|
|||
#{recessionMonth}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.taxAgents != null and param.taxAgents.size()>0">
|
||||
AND t.payment_organization IN
|
||||
<foreach collection="param.taxAgents" open="(" item="taxAgent" separator="," close=")">
|
||||
#{taxAgent}
|
||||
</foreach>
|
||||
</if>
|
||||
</sql>
|
||||
<sql id="paramSql" databaseId="sqlserver">
|
||||
<if test="param.userName != null and param.userName != ''">
|
||||
|
|
@ -221,6 +237,12 @@
|
|||
#{recessionMonth}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.taxAgents != null and param.taxAgents.size()>0">
|
||||
AND t.payment_organization IN
|
||||
<foreach collection="param.taxAgents" open="(" item="taxAgent" separator="," close=")">
|
||||
#{taxAgent}
|
||||
</foreach>
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ public interface ColumnBuildService {
|
|||
*
|
||||
* @param pos pos
|
||||
* @param tenantKey 租户key
|
||||
* @param flag
|
||||
* @param paymentStatus 缴纳状态
|
||||
* @return
|
||||
*/
|
||||
List<WeaTableColumn> buildCommonColumnsWithStyle(List<InsuranceAccountDetailPO> pos, Long employeeId, String tenantKey, boolean flag);
|
||||
List<WeaTableColumn> buildCommonColumnsWithStyle(List<InsuranceAccountDetailPO> pos, Long employeeId, String tenantKey, Integer paymentStatus);
|
||||
|
||||
List<WeaTableColumn> buildCommonColumns(List<InsuranceAccountDetailPO> pos);
|
||||
|
||||
|
|
|
|||
|
|
@ -49,6 +49,13 @@ public interface SIAccountService {
|
|||
*/
|
||||
Map<String,Object> listSupplementaryPage(InsuranceAccountDetailParam insuranceAccountDetailParam);
|
||||
|
||||
/**
|
||||
* 获取退差列表
|
||||
* @param insuranceAccountDetailParam
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> listRecessionPage(InsuranceAccountDetailParam insuranceAccountDetailParam);
|
||||
|
||||
/**
|
||||
* 根据姓名获取补缴缴纳列表
|
||||
* @param insuranceAccountDetailParam
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import com.engine.salary.entity.siarchives.po.InsuranceArchivesFundSchemePO;
|
|||
import com.engine.salary.entity.siarchives.po.InsuranceArchivesOtherSchemePO;
|
||||
import com.engine.salary.entity.siarchives.po.InsuranceArchivesSocialSchemePO;
|
||||
import com.engine.salary.entity.sicategory.po.ICategoryPO;
|
||||
import com.engine.salary.enums.siaccount.PaymentStatusEnum;
|
||||
import com.engine.salary.enums.sicategory.WelfareTypeEnum;
|
||||
import com.engine.salary.mapper.sicategory.ICategoryMapper;
|
||||
import com.engine.salary.service.ColumnBuildService;
|
||||
|
|
@ -30,7 +31,7 @@ import java.util.stream.Collectors;
|
|||
**/
|
||||
public class ColumnBuildServiceImpl extends Service implements ColumnBuildService {
|
||||
@Override
|
||||
public List<WeaTableColumn> buildCommonColumnsWithStyle(List<InsuranceAccountDetailPO> pos, Long employeeId, String tenantKey, boolean flag) {
|
||||
public List<WeaTableColumn> buildCommonColumnsWithStyle(List<InsuranceAccountDetailPO> pos, Long employeeId, String tenantKey, Integer paymentStatus) {
|
||||
List<WeaTableColumn> list = new ArrayList<>();
|
||||
Map<String, String> categoryIdNameMap = MapperProxyFactory.getProxy(ICategoryMapper.class).listAll().stream().collect(Collectors.toMap(ICategoryPO -> String.valueOf(ICategoryPO.getId()), ICategoryPO::getInsuranceName));
|
||||
Map<Integer, Map<String, String>> columns = buildPaymentTitle(pos, categoryIdNameMap, employeeId, tenantKey);
|
||||
|
|
@ -49,8 +50,10 @@ public class ColumnBuildServiceImpl extends Service implements ColumnBuildServic
|
|||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 86186, "手机号"), "mobile"));
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 86187, "员工状态"), "employeeStatus"));
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100377, "数据来源"), "sourceFrom"));
|
||||
if (flag) {
|
||||
if (paymentStatus.equals(PaymentStatusEnum.REPAIR.getValue())) {
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100379, "补缴月份"), "supplementaryMonth"));
|
||||
} else if (paymentStatus.equals(PaymentStatusEnum.RECESSION.getValue())) {
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100379, "退差月份"), "supplementaryMonth"));
|
||||
}
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 91325, "个税扣缴义务人"), "socialPayOrg"));
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 91324, "社保账号"), "socialAccount"));
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
|
||||
|
||||
//动态列组装
|
||||
List<WeaTableColumn> weaTableColumn = getColumnBuildService(user).buildCommonColumnsWithStyle(insuranceAccountDetailPOS, employeeId, SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY, false);
|
||||
List<WeaTableColumn> weaTableColumn = getColumnBuildService(user).buildCommonColumnsWithStyle(insuranceAccountDetailPOS, employeeId, SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY, queryParam.getPaymentStatus());
|
||||
|
||||
WeaTable table = new WeaTable();
|
||||
table.setPageUID(UUID.randomUUID().toString());
|
||||
|
|
@ -322,7 +322,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
|
||||
|
||||
//动态列组装
|
||||
List<WeaTableColumn> weaTableColumn = getColumnBuildService(user).buildCommonColumnsWithStyle(insuranceAccountDetailPOS, employeeId, SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY, true);
|
||||
List<WeaTableColumn> weaTableColumn = getColumnBuildService(user).buildCommonColumnsWithStyle(insuranceAccountDetailPOS, employeeId, SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY, queryParam.getPaymentStatus());
|
||||
|
||||
SalaryWeaTable<InsuranceAccountDetailPO> table = new SalaryWeaTable<>(user, InsuranceAccountDetailPO.class);
|
||||
table.setColumns(weaTableColumn);
|
||||
|
|
@ -349,6 +349,62 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
return listSupplementaryPage(queryParam);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> listRecessionPage(InsuranceAccountDetailParam queryParam) {
|
||||
Long employeeId = (long) user.getUID();
|
||||
Map<String, Object> datas = new HashMap<>();
|
||||
|
||||
// 分权逻辑
|
||||
Boolean needAuth = getTaxAgentService(user).isNeedAuth((long) user.getUID());
|
||||
if (needAuth) {
|
||||
Collection<TaxAgentPO> taxAgentPOS = getTaxAgentService(user).listAllTaxAgents((long) user.getUID());
|
||||
List<Long> taxAgents = taxAgentPOS.stream().map(TaxAgentPO::getId).collect(Collectors.toList());
|
||||
if (CollectionUtils.isEmpty(taxAgents)) {
|
||||
//防止普通用户查询
|
||||
queryParam.setTaxAgents(Collections.singletonList(-1L));
|
||||
} else {
|
||||
queryParam.setTaxAgents(taxAgents);
|
||||
}
|
||||
}
|
||||
|
||||
//补缴缴纳列表
|
||||
queryParam.setPaymentStatus(PaymentStatusEnum.RECESSION.getValue());
|
||||
|
||||
//排序配置
|
||||
OrderRuleVO orderRule = getSalarySysConfService(user).orderRule();
|
||||
queryParam.setOrderRule(orderRule);
|
||||
|
||||
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
|
||||
List<InsuranceAccountDetailPO> list = getInsuranceAccountDetailMapper().list(queryParam);
|
||||
PageInfo<InsuranceAccountDetailPO> pageInfo = new PageInfo<>(list, InsuranceAccountDetailPO.class);
|
||||
List<InsuranceAccountDetailPO> insuranceAccountDetailPOS = pageInfo.getList();
|
||||
InsuranceAccountDetailPOEncrypt.decryptInsuranceAccountDetailPOList(insuranceAccountDetailPOS);
|
||||
//数据组装
|
||||
List<Map<String, Object>> records = getService(user).buildCommonRecords(insuranceAccountDetailPOS, employeeId);
|
||||
PageInfo<Map<String, Object>> pageInfos = new PageInfo<>(records);
|
||||
pageInfos.setTotal(pageInfo.getTotal());
|
||||
pageInfos.setPageNum(queryParam.getCurrent());
|
||||
pageInfos.setPageSize(queryParam.getPageSize());
|
||||
|
||||
|
||||
//动态列组装
|
||||
List<WeaTableColumn> weaTableColumn = getColumnBuildService(user).buildCommonColumnsWithStyle(insuranceAccountDetailPOS, employeeId, SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY, queryParam.getPaymentStatus());
|
||||
|
||||
SalaryWeaTable<InsuranceAccountDetailPO> table = new SalaryWeaTable<>(user, InsuranceAccountDetailPO.class);
|
||||
table.setColumns(weaTableColumn);
|
||||
List<Column> columns = weaTableColumn.stream().map(v -> new Column(v.getText(), v.getColumn(), v.getColumn())).collect(Collectors.toList());
|
||||
pageInfos.setColumns(columns);
|
||||
|
||||
|
||||
WeaResultMsg result = new WeaResultMsg(false);
|
||||
result.putAll(table.makeDataResult());
|
||||
result.success();
|
||||
|
||||
datas.put("pageInfo", pageInfos);
|
||||
//datas.put("dataKey",result.getResultMap());
|
||||
return datas;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getForm(Map<String, Object> params) {
|
||||
Map<String, Object> apidatas = new HashMap<>();
|
||||
|
|
|
|||
Loading…
Reference in New Issue