Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
3bfdef7966
|
|
@ -2,6 +2,7 @@ package com.engine.salary.biz;
|
|||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.TypeReference;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
||||
import com.engine.salary.constant.SalaryDefaultTenantConstant;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.salaryacct.dto.SalaryAcctProgressDTO;
|
||||
|
|
@ -10,10 +11,7 @@ import com.engine.salary.entity.siaccount.po.InsuranceAccountBatchPO;
|
|||
import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO;
|
||||
import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailTempPO;
|
||||
import com.engine.salary.entity.siaccount.po.InsuranceAccountInspectPO;
|
||||
import com.engine.salary.entity.siarchives.po.InsuranceArchivesAccountPO;
|
||||
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.siarchives.po.*;
|
||||
import com.engine.salary.entity.sicategory.po.ICategoryPO;
|
||||
import com.engine.salary.entity.sischeme.po.InsuranceSchemeDetailPO;
|
||||
import com.engine.salary.enums.siaccount.*;
|
||||
|
|
@ -24,8 +22,12 @@ import com.engine.salary.mapper.siaccount.InsuranceAccountBatchMapper;
|
|||
import com.engine.salary.mapper.siaccount.InsuranceAccountDetailMapper;
|
||||
import com.engine.salary.mapper.siaccount.InsuranceAccountInspectMapper;
|
||||
import com.engine.salary.mapper.siaccount.SIAccountDetailTempMapper;
|
||||
import com.engine.salary.mapper.siarchives.FundSchemeMapper;
|
||||
import com.engine.salary.mapper.siarchives.OtherSchemeMapper;
|
||||
import com.engine.salary.mapper.siarchives.SocialSchemeMapper;
|
||||
import com.engine.salary.mapper.sicategory.ICategoryMapper;
|
||||
import com.engine.salary.mapper.sischeme.InsuranceSchemeDetailMapper;
|
||||
import com.engine.salary.mapper.sischeme.InsuranceSchemeMapper;
|
||||
import com.engine.salary.util.SalaryAssert;
|
||||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
|
|
@ -33,6 +35,7 @@ import com.engine.salary.util.SalaryI18nUtil;
|
|||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.page.PageUtil;
|
||||
import com.kingbase8.util.LOGGER;
|
||||
import dm.jdbc.util.IdGenerator;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
|
@ -1254,6 +1257,53 @@ public class SIAccountBiz {
|
|||
// insuranceSchemeContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100506, "台账归档"));
|
||||
// insuranceSchemeContext.setNewValues(insuranceAccountBatchPO);
|
||||
// siAccountLoggerTemplate.write(insuranceSchemeContext);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void accountInspect(Collection<Long> ids, String billMonth, Long employeeId) {
|
||||
List<InsuranceAccountInspectPO> insuranceAccountInspectPOS = allInspects(ids, billMonth);
|
||||
SalaryAssert.notEmpty(insuranceAccountInspectPOS, SalaryI18nUtil.getI18nLabel( 100515, "无核算数据"));
|
||||
List<InsuranceAccountInspectPO> commonInspects = insuranceAccountInspectPOS.stream()
|
||||
.filter(e -> Objects.equals(e.getPaymentStatus(), PaymentStatusEnum.COMMON.getValue()))
|
||||
.collect(Collectors.toList());
|
||||
List<InsuranceAccountInspectPO> supplementInspects = insuranceAccountInspectPOS.stream()
|
||||
.filter(e -> Objects.equals(e.getPaymentStatus(), PaymentStatusEnum.REPAIR.getValue()))
|
||||
.collect(Collectors.toList());
|
||||
//核算正常缴纳
|
||||
if (CollectionUtils.isNotEmpty(commonInspects)) {
|
||||
SaveCommonAccountParam param = new SaveCommonAccountParam();
|
||||
param.setBillMonth(billMonth);
|
||||
param.setIncludes(commonInspects.stream().map(InsuranceAccountInspectPO::getEmployeeId).collect(Collectors.toList()));
|
||||
saveCommonAccount(param, employeeId);
|
||||
}
|
||||
//核算补缴
|
||||
if (CollectionUtils.isNotEmpty(supplementInspects)) {
|
||||
List<SupplementAccountBaseParam> baseList = new ArrayList<>();
|
||||
supplementInspects.forEach(e -> {
|
||||
SupplementAccountBaseParam base = new SupplementAccountBaseParam();
|
||||
base.setBillMonth(billMonth);
|
||||
base.setProjects(
|
||||
e.getSupplementaryProjects() == null ? null : Arrays.stream(e.getSupplementaryProjects().split(",")).map(Integer::valueOf).collect(Collectors.toList()));
|
||||
base.setEmployeeId(e.getEmployeeId());
|
||||
base.setSupplementaryMonth(e.getSupplementaryMonth());
|
||||
baseList.add(base);
|
||||
});
|
||||
accountSupplement(baseList, baseList.stream().map(SupplementAccountBaseParam::getEmployeeId).collect(Collectors.toList()), billMonth,employeeId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public List<InsuranceAccountInspectPO> allInspects(Collection<Long> ids, String billMonth) {
|
||||
List<InsuranceAccountInspectPO> list = MapperProxyFactory.getProxy(InsuranceAccountInspectMapper.class).getList(billMonth,InspectStatusEnum.IGNORE.getValue(),ids);
|
||||
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
return list;
|
||||
}
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -612,7 +612,7 @@ public class SIArchivesBiz {
|
|||
PageUtil.start(param.getCurrent(), param.getPageSize());
|
||||
List<InsuranceArchivesEmployeePO> page = socialSchemeMapper.listPageEmployeePOS(param);
|
||||
PageInfo<InsuranceArchivesEmployeePO> pageInfo = new PageInfo<>(page, InsuranceArchivesEmployeePO.class);
|
||||
List<Map<String, Object>> records = buildTableData(param, page);
|
||||
List<Map<String, Object>> records = buildTableData(page);
|
||||
List<WeaTableColumn> columns = buildWeaTableColumns(page, operateId);
|
||||
|
||||
WeaTable table = new WeaTable();
|
||||
|
|
@ -647,7 +647,7 @@ public class SIArchivesBiz {
|
|||
* @param operateId
|
||||
* @return
|
||||
*/
|
||||
private List<WeaTableColumn> buildWeaTableColumns(List<InsuranceArchivesEmployeePO> insuranceArchivesEmployeePOS, long operateId) {
|
||||
public List<WeaTableColumn> buildWeaTableColumns(List<InsuranceArchivesEmployeePO> insuranceArchivesEmployeePOS, long operateId) {
|
||||
Map<Integer, Map<String, String>> titleMap = buildColumnTitle(insuranceArchivesEmployeePOS, operateId);
|
||||
List<WeaTableColumn> list = new ArrayList<>();
|
||||
WeaTableColumn nameColumn = new WeaTableColumn( "100px","姓名", "employeeName" );
|
||||
|
|
@ -773,12 +773,10 @@ public class SIArchivesBiz {
|
|||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param param
|
||||
* @param insuranceArchivesEmployeePOS
|
||||
* @return
|
||||
*/
|
||||
private List<Map<String, Object>> buildTableData(InsuranceArchivesListParam param, List<InsuranceArchivesEmployeePO> insuranceArchivesEmployeePOS) {
|
||||
public List<Map<String, Object>> buildTableData(List<InsuranceArchivesEmployeePO> insuranceArchivesEmployeePOS) {
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
List<Map<String, Object>> records = new ArrayList<>();
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.engine.salary.entity.siaccount.param;
|
||||
|
||||
|
||||
import com.engine.salary.util.valid.DataCheck;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -21,7 +22,7 @@ import java.util.List;
|
|||
public class InspectAccountParam {
|
||||
|
||||
//核算异常主键id")
|
||||
//@NotNull
|
||||
@DataCheck(require = true,message = "主键不能为空")
|
||||
private List<Long> ids;
|
||||
|
||||
//账单月份")
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.engine.salary.mapper.siaccount;
|
|||
import com.engine.salary.entity.siaccount.param.InsuranceAccountDetailParam;
|
||||
import com.engine.salary.entity.siaccount.param.SupplementAccountBaseParam;
|
||||
import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO;
|
||||
import com.engine.salary.entity.siarchives.po.InsuranceArchivesEmployeePO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Collection;
|
||||
|
|
@ -81,4 +82,9 @@ public interface InsuranceAccountDetailMapper {
|
|||
|
||||
|
||||
void batchIgnoreInspectDetails(@Param("ids") Collection<Long> ids);
|
||||
|
||||
|
||||
List<InsuranceArchivesEmployeePO> changeList(@Param("userName") String userName, @Param("startNum") Integer startNum,
|
||||
@Param("pageSize") Integer pageSize);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -384,5 +384,513 @@
|
|||
</insert>
|
||||
|
||||
|
||||
<select id="changeList" resultType="com.engine.salary.entity.siarchives.po.InsuranceArchivesEmployeePO">
|
||||
SELECT DISTINCT
|
||||
a.employeeId,
|
||||
a.userName,
|
||||
a.departmentId,
|
||||
a.jobNum,
|
||||
a.telephone,
|
||||
a.departmentName,
|
||||
a.position,
|
||||
a.userStatus,
|
||||
a.hiredate,
|
||||
a.dimissionDate,
|
||||
a.siSchemeId,
|
||||
a.fundSchemeId,
|
||||
a.otherSchemeId
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
t.*, social.social_start_time,
|
||||
social.social_end_time,
|
||||
fund.fund_start_time,
|
||||
fund.fund_end_time,
|
||||
other.other_start_time,
|
||||
other.other_end_time,
|
||||
social.social_scheme_id AS siSchemeId,
|
||||
fund.fund_scheme_id AS fundSchemeId,
|
||||
other.other_scheme_id AS otherSchemeId
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
e.username AS userName,
|
||||
e.JOB_NUM AS jobNum,
|
||||
e.DEPARTMENT AS departmentId,
|
||||
d.`NAME` AS departmentName,
|
||||
e.`STATUS` AS userStatus,
|
||||
e.POSITION AS position,
|
||||
h.payment_status AS paymentStatus,
|
||||
e.HIREDATE AS hiredate,
|
||||
l.DIMISSION_TIME AS dimissionDate,
|
||||
e.ID AS employeeId,
|
||||
e.MOBILE AS telephone
|
||||
FROM
|
||||
hrsa_bill_detail h
|
||||
LEFT JOIN {$publicdb}.employee e ON e.ID = h.employee_id AND h.delete_type = 0
|
||||
LEFT JOIN {$publicdb}.dimission_log l ON e.ID = l.DIMISSION_ID
|
||||
LEFT JOIN {$publicdb}.department d ON d.ID = e.DEPARTMENT
|
||||
WHERE
|
||||
e.`STATUS` = 'unavailable' AND h.payment_status = 0
|
||||
<if test="userName != null and userName != ''">
|
||||
AND e.username like CONCAT('%',#{userName},'%')
|
||||
</if>
|
||||
AND(l.DIMISSION_TIME IS NOT NULL)
|
||||
)AS t
|
||||
LEFT JOIN hrsa_social_archives social ON t.employeeId = social.employee_id AND social.delete_type = 0
|
||||
LEFT JOIN hrsa_fund_archives fund ON t.employeeId = fund.employee_id AND fund.delete_type = 0
|
||||
LEFT JOIN hrsa_other_archives other ON t.employeeId = other.employee_id AND other.delete_type = 0
|
||||
WHERE
|
||||
(
|
||||
fund.fund_start_time IS NOT NULL
|
||||
AND(
|
||||
fund.fund_end_time IS NULL
|
||||
OR fund.fund_end_time = ''
|
||||
)
|
||||
)
|
||||
OR(
|
||||
social.social_start_time IS NOT NULL
|
||||
AND(
|
||||
social.social_end_time IS NULL
|
||||
OR social.social_end_time = ''
|
||||
)
|
||||
)
|
||||
OR(
|
||||
other.other_start_time IS NOT NULL
|
||||
AND(
|
||||
other.other_end_time IS NULL
|
||||
OR other.other_end_time = ''
|
||||
)
|
||||
)
|
||||
)a
|
||||
UNION
|
||||
SELECT
|
||||
a.employeeId,
|
||||
a.userName,
|
||||
a.departmentId,
|
||||
a.jobNum,
|
||||
a.telephone,
|
||||
a.departmentName,
|
||||
a.position,
|
||||
a.userStatus,
|
||||
a.hiredate,
|
||||
a.dimissionDate,
|
||||
a.siSchemeId,
|
||||
a.fundSchemeId,
|
||||
a.otherSchemeId
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
t.*, social.social_start_time,
|
||||
social.social_end_time,
|
||||
fund.fund_start_time,
|
||||
fund.fund_end_time,
|
||||
other.other_start_time,
|
||||
other.other_end_time,
|
||||
social.social_scheme_id AS siSchemeId,
|
||||
fund.fund_scheme_id AS fundSchemeId,
|
||||
other.other_scheme_id AS otherSchemeId
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
e.username AS userName,
|
||||
e.JOB_NUM AS jobNum,
|
||||
e.DEPARTMENT AS departmentId,
|
||||
d.`NAME` AS departmentName,
|
||||
e.`STATUS` AS userStatus,
|
||||
e.POSITION AS position,
|
||||
e.HIREDATE AS hiredate,
|
||||
l.DIMISSION_TIME AS dimissionDate,
|
||||
e.ID AS employeeId,
|
||||
e.MOBILE AS telephone
|
||||
FROM
|
||||
{$publicdb}.employee e
|
||||
LEFT JOIN {$publicdb}.dimission_log l ON e.ID = l.DIMISSION_ID
|
||||
LEFT JOIN {$publicdb}.department d ON d.ID = e.DEPARTMENT
|
||||
WHERE
|
||||
e.`STATUS` = 'normal'
|
||||
<if test="userName != null and userName != ''">
|
||||
AND e.username like CONCAT('%',#{userName},'%')
|
||||
</if>
|
||||
AND(
|
||||
l.DIMISSION_TIME IS NULL OR l.DIMISSION_TIME = ''
|
||||
)
|
||||
)AS t
|
||||
LEFT JOIN hrsa_social_archives social ON t.employeeId = social.employee_id AND social.delete_type = 0
|
||||
LEFT JOIN hrsa_fund_archives fund ON t.employeeId = fund.employee_id AND fund.delete_type = 0
|
||||
LEFT JOIN hrsa_other_archives other ON t.employeeId = other.employee_id AND other.delete_type = 0
|
||||
WHERE
|
||||
(
|
||||
(
|
||||
fund.fund_start_time IS NULL
|
||||
OR fund.fund_start_time = ''
|
||||
)
|
||||
AND(
|
||||
fund.fund_end_time IS NULL
|
||||
OR fund.fund_end_time = ''
|
||||
)
|
||||
)
|
||||
AND(
|
||||
(
|
||||
social.social_start_time IS NULL
|
||||
OR social.social_start_time = ''
|
||||
)
|
||||
AND(
|
||||
social.social_end_time IS NULL
|
||||
OR social.social_end_time = ''
|
||||
)
|
||||
)
|
||||
AND(
|
||||
(
|
||||
other.other_start_time IS NULL
|
||||
OR other.other_start_time = ''
|
||||
)
|
||||
AND(
|
||||
other.other_end_time IS NULL
|
||||
OR other.other_end_time = ''
|
||||
)
|
||||
)
|
||||
)a
|
||||
LIMIT #{startNum},#{pageSize}
|
||||
</select>
|
||||
<select id="changeList" resultType="com.engine.salary.entity.siarchives.po.InsuranceArchivesEmployeePO" databaseId="oracle">
|
||||
SELECT DISTINCT
|
||||
a.employeeId,
|
||||
a.userName,
|
||||
a.departmentId,
|
||||
a.jobNum,
|
||||
a.telephone,
|
||||
a.departmentName,
|
||||
a.position,
|
||||
a.userStatus,
|
||||
a.hiredate,
|
||||
a.dimissionDate,
|
||||
a.siSchemeId,
|
||||
a.fundSchemeId,
|
||||
a.otherSchemeId
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
t.*, social.social_start_time,
|
||||
social.social_end_time,
|
||||
fund.fund_start_time,
|
||||
fund.fund_end_time,
|
||||
other.other_start_time,
|
||||
other.other_end_time,
|
||||
social.social_scheme_id AS siSchemeId,
|
||||
fund.fund_scheme_id AS fundSchemeId,
|
||||
other.other_scheme_id AS otherSchemeId
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
e.username AS userName,
|
||||
e.JOB_NUM AS jobNum,
|
||||
e.DEPARTMENT AS departmentId,
|
||||
d.NAME AS departmentName,
|
||||
e.STATUS AS userStatus,
|
||||
e.POSITION AS position,
|
||||
h.payment_status AS paymentStatus,
|
||||
e.HIREDATE AS hiredate,
|
||||
l.DIMISSION_TIME AS dimissionDate,
|
||||
e.ID AS employeeId,
|
||||
e.MOBILE AS telephone
|
||||
FROM
|
||||
hrsa_bill_detail h
|
||||
LEFT JOIN {$publicdb}.employee e ON e.ID = h.employee_id AND h.delete_type = 0
|
||||
LEFT JOIN {$publicdb}.dimission_log l ON e.ID = l.DIMISSION_ID
|
||||
LEFT JOIN {$publicdb}.department d ON d.ID = e.DEPARTMENT
|
||||
WHERE
|
||||
e.STATUS = 'unavailable' AND h.payment_status = 0
|
||||
<if test="userName != null and userName != ''">
|
||||
AND e.username like '%'||#{userName}||'%'
|
||||
</if>
|
||||
AND(l.DIMISSION_TIME IS NOT NULL)
|
||||
)AS t
|
||||
LEFT JOIN hrsa_social_archives social ON t.employeeId = social.employee_id AND social.delete_type = 0
|
||||
LEFT JOIN hrsa_fund_archives fund ON t.employeeId = fund.employee_id AND fund.delete_type = 0
|
||||
LEFT JOIN hrsa_other_archives other ON t.employeeId = other.employee_id AND other.delete_type = 0
|
||||
WHERE
|
||||
(
|
||||
fund.fund_start_time IS NOT NULL
|
||||
AND(
|
||||
fund.fund_end_time IS NULL
|
||||
OR fund.fund_end_time = ''
|
||||
)
|
||||
)
|
||||
OR(
|
||||
social.social_start_time IS NOT NULL
|
||||
AND(
|
||||
social.social_end_time IS NULL
|
||||
OR social.social_end_time = ''
|
||||
)
|
||||
)
|
||||
OR(
|
||||
other.other_start_time IS NOT NULL
|
||||
AND(
|
||||
other.other_end_time IS NULL
|
||||
OR other.other_end_time = ''
|
||||
)
|
||||
)
|
||||
)a
|
||||
UNION
|
||||
SELECT * FROM (SELECT TMP.*,ROWNUM ROW_ID FROM (SELECT
|
||||
a.employeeId,
|
||||
a.userName,
|
||||
a.departmentId,
|
||||
a.jobNum,
|
||||
a.telephone,
|
||||
a.departmentName,
|
||||
a.position,
|
||||
a.userStatus,
|
||||
a.hiredate,
|
||||
a.dimissionDate,
|
||||
a.siSchemeId,
|
||||
a.fundSchemeId,
|
||||
a.otherSchemeId
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
t.*, social.social_start_time,
|
||||
social.social_end_time,
|
||||
fund.fund_start_time,
|
||||
fund.fund_end_time,
|
||||
other.other_start_time,
|
||||
other.other_end_time,
|
||||
social.social_scheme_id AS siSchemeId,
|
||||
fund.fund_scheme_id AS fundSchemeId,
|
||||
other.other_scheme_id AS otherSchemeId
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
e.username AS userName,
|
||||
e.JOB_NUM AS jobNum,
|
||||
e.DEPARTMENT AS departmentId,
|
||||
d.NAME AS departmentName,
|
||||
e.STATUS AS userStatus,
|
||||
e.POSITION AS position,
|
||||
e.HIREDATE AS hiredate,
|
||||
l.DIMISSION_TIME AS dimissionDate,
|
||||
e.ID AS employeeId,
|
||||
e.MOBILE AS telephone
|
||||
FROM
|
||||
{$publicdb}.employee e
|
||||
LEFT JOIN {$publicdb}.dimission_log l ON e.ID = l.DIMISSION_ID
|
||||
LEFT JOIN {$publicdb}.department d ON d.ID = e.DEPARTMENT
|
||||
WHERE
|
||||
e.STATUS = 'normal'
|
||||
<if test="userName != null and userName != ''">
|
||||
AND e.username like '%'||#{userName}||'%'
|
||||
</if>
|
||||
AND(
|
||||
l.DIMISSION_TIME IS NULL OR l.DIMISSION_TIME = ''
|
||||
)
|
||||
)AS t
|
||||
LEFT JOIN hrsa_social_archives social ON t.employeeId = social.employee_id AND social.delete_type = 0
|
||||
LEFT JOIN hrsa_fund_archives fund ON t.employeeId = fund.employee_id AND fund.delete_type = 0
|
||||
LEFT JOIN hrsa_other_archives other ON t.employeeId = other.employee_id AND other.delete_type = 0
|
||||
WHERE
|
||||
(
|
||||
(
|
||||
fund.fund_start_time IS NULL
|
||||
OR fund.fund_start_time = ''
|
||||
)
|
||||
AND(
|
||||
fund.fund_end_time IS NULL
|
||||
OR fund.fund_end_time = ''
|
||||
)
|
||||
)
|
||||
AND(
|
||||
(
|
||||
social.social_start_time IS NULL
|
||||
OR social.social_start_time = ''
|
||||
)
|
||||
AND(
|
||||
social.social_end_time IS NULL
|
||||
OR social.social_end_time = ''
|
||||
)
|
||||
)
|
||||
AND(
|
||||
(
|
||||
other.other_start_time IS NULL
|
||||
OR other.other_start_time = ''
|
||||
)
|
||||
AND(
|
||||
other.other_end_time IS NULL
|
||||
OR other.other_end_time = ''
|
||||
)
|
||||
)
|
||||
)a
|
||||
) TMP WHERE ROWNUM <=(#{pageSize}+#{startNum})) WHERE ROW_ID >#{startNum}
|
||||
|
||||
</select>
|
||||
<select id="changeList" resultType="com.engine.salary.entity.siarchives.po.InsuranceArchivesEmployeePO" databaseId="sqlserver">
|
||||
SELECT DISTINCT
|
||||
a.employeeId,
|
||||
a.userName,
|
||||
a.departmentId,
|
||||
a.jobNum,
|
||||
a.telephone,
|
||||
a.departmentName,
|
||||
a.position,
|
||||
a.userStatus,
|
||||
a.hiredate,
|
||||
a.dimissionDate,
|
||||
a.siSchemeId,
|
||||
a.fundSchemeId,
|
||||
a.otherSchemeId
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
t.*, social.social_start_time,
|
||||
social.social_end_time,
|
||||
fund.fund_start_time,
|
||||
fund.fund_end_time,
|
||||
other.other_start_time,
|
||||
other.other_end_time,
|
||||
social.social_scheme_id AS siSchemeId,
|
||||
fund.fund_scheme_id AS fundSchemeId,
|
||||
other.other_scheme_id AS otherSchemeId
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
e.username AS userName,
|
||||
e.JOB_NUM AS jobNum,
|
||||
e.DEPARTMENT AS departmentId,
|
||||
d.NAME AS departmentName,
|
||||
e.STATUS AS userStatus,
|
||||
e.POSITION AS position,
|
||||
h.payment_status AS paymentStatus,
|
||||
e.HIREDATE AS hiredate,
|
||||
l.DIMISSION_TIME AS dimissionDate,
|
||||
e.ID AS employeeId,
|
||||
e.MOBILE AS telephone
|
||||
FROM
|
||||
hrsa_bill_detail h
|
||||
LEFT JOIN {$publicdb}.employee e ON e.ID = h.employee_id AND h.delete_type = 0
|
||||
LEFT JOIN {$publicdb}.dimission_log l ON e.ID = l.DIMISSION_ID
|
||||
LEFT JOIN {$publicdb}.department d ON d.ID = e.DEPARTMENT
|
||||
WHERE
|
||||
e.STATUS = 'unavailable' AND h.payment_status = 0
|
||||
<if test="userName != null and userName != ''">
|
||||
AND e.username like '%'+#{userName}+'%'
|
||||
</if>
|
||||
AND(l.DIMISSION_TIME IS NOT NULL)
|
||||
)AS t
|
||||
LEFT JOIN hrsa_social_archives social ON t.employeeId = social.employee_id AND social.delete_type = 0
|
||||
LEFT JOIN hrsa_fund_archives fund ON t.employeeId = fund.employee_id AND fund.delete_type = 0
|
||||
LEFT JOIN hrsa_other_archives other ON t.employeeId = other.employee_id AND other.delete_type = 0
|
||||
WHERE
|
||||
(
|
||||
fund.fund_start_time IS NOT NULL
|
||||
AND(
|
||||
fund.fund_end_time IS NULL
|
||||
OR fund.fund_end_time = ''
|
||||
)
|
||||
)
|
||||
OR(
|
||||
social.social_start_time IS NOT NULL
|
||||
AND(
|
||||
social.social_end_time IS NULL
|
||||
OR social.social_end_time = ''
|
||||
)
|
||||
)
|
||||
OR(
|
||||
other.other_start_time IS NOT NULL
|
||||
AND(
|
||||
other.other_end_time IS NULL
|
||||
OR other.other_end_time = ''
|
||||
)
|
||||
)
|
||||
)a
|
||||
UNION
|
||||
select * from (select top (#{pageSize}) atmp.* from ( select row_number() over(order by CURRENT_TIMESTAMP) as rownumber,atmp.* from (SELECT
|
||||
a.employeeId,
|
||||
a.userName,
|
||||
a.departmentId,
|
||||
a.jobNum,
|
||||
a.telephone,
|
||||
a.departmentName,
|
||||
a.position,
|
||||
a.userStatus,
|
||||
a.hiredate,
|
||||
a.dimissionDate,
|
||||
a.siSchemeId,
|
||||
a.fundSchemeId,
|
||||
a.otherSchemeId
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
t.*, social.social_start_time,
|
||||
social.social_end_time,
|
||||
fund.fund_start_time,
|
||||
fund.fund_end_time,
|
||||
other.other_start_time,
|
||||
other.other_end_time,
|
||||
social.social_scheme_id AS siSchemeId,
|
||||
fund.fund_scheme_id AS fundSchemeId,
|
||||
other.other_scheme_id AS otherSchemeId
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
e.username AS userName,
|
||||
e.JOB_NUM AS jobNum,
|
||||
e.DEPARTMENT AS departmentId,
|
||||
d.NAME AS departmentName,
|
||||
e.STATUS AS userStatus,
|
||||
e.POSITION AS position,
|
||||
e.HIREDATE AS hiredate,
|
||||
l.DIMISSION_TIME AS dimissionDate,
|
||||
e.ID AS employeeId,
|
||||
e.MOBILE AS telephone
|
||||
FROM
|
||||
{$publicdb}.employee e
|
||||
LEFT JOIN {$publicdb}.dimission_log l ON e.ID = l.DIMISSION_ID
|
||||
LEFT JOIN {$publicdb}.department d ON d.ID = e.DEPARTMENT
|
||||
WHERE
|
||||
e.STATUS = 'normal'
|
||||
<if test="userName != null and userName != ''">
|
||||
AND e.username like '%'+#{userName}+'%'
|
||||
</if>
|
||||
AND(
|
||||
l.DIMISSION_TIME IS NULL OR l.DIMISSION_TIME = ''
|
||||
)
|
||||
)AS t
|
||||
LEFT JOIN hrsa_social_archives social ON t.employeeId = social.employee_id AND social.delete_type = 0
|
||||
LEFT JOIN hrsa_fund_archives fund ON t.employeeId = fund.employee_id AND fund.delete_type = 0
|
||||
LEFT JOIN hrsa_other_archives other ON t.employeeId = other.employee_id AND other.delete_type = 0
|
||||
WHERE
|
||||
(
|
||||
(
|
||||
fund.fund_start_time IS NULL
|
||||
OR fund.fund_start_time = ''
|
||||
)
|
||||
AND(
|
||||
fund.fund_end_time IS NULL
|
||||
OR fund.fund_end_time = ''
|
||||
)
|
||||
)
|
||||
AND(
|
||||
(
|
||||
social.social_start_time IS NULL
|
||||
OR social.social_start_time = ''
|
||||
)
|
||||
AND(
|
||||
social.social_end_time IS NULL
|
||||
OR social.social_end_time = ''
|
||||
)
|
||||
)
|
||||
AND(
|
||||
(
|
||||
other.other_start_time IS NULL
|
||||
OR other.other_start_time = ''
|
||||
)
|
||||
AND(
|
||||
other.other_end_time IS NULL
|
||||
OR other.other_end_time = ''
|
||||
)
|
||||
)
|
||||
)a
|
||||
) atmp )atmp where rownumber >#{startNum})atmp
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -38,6 +38,7 @@ public interface InsuranceAccountInspectMapper {
|
|||
|
||||
List<InsuranceAccountInspectPO> getByInspectStatusAndIds(@Param("inspectStatus")Integer inspectStatus,@Param("ids")Collection<Long> ids);
|
||||
|
||||
List<InsuranceAccountInspectPO> getList(@Param("billMonth")String billMonth,@Param("inspectStatus")Integer inspectStatus,@Param("ids")Collection<Long> ids);
|
||||
|
||||
|
||||
List<InsuranceAccountInspectPO> getByBillMonth(@Param("billMonth")String billMonth);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@
|
|||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
</sql>
|
||||
|
||||
<select id="getByInspectStatusAndIds" resultMap="BaseResultMap">
|
||||
|
|
@ -61,6 +62,27 @@
|
|||
<include refid="paramSql"/>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getList" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM
|
||||
hrsa_bill_inspect t
|
||||
WHERE t.delete_type = 0
|
||||
AND t.inspect_status = #{inspectStatus}
|
||||
AND t.bill_month = #{billMonth}
|
||||
<include refid="paramSql"/>
|
||||
</select>
|
||||
|
||||
<select id="getByBillMonth" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM
|
||||
hrsa_bill_inspect t
|
||||
WHERE t.delete_type = 0
|
||||
AND t.bill_month = #{billMonth}
|
||||
</select>
|
||||
|
||||
<!-- 批量删除 -->
|
||||
<delete id="batchDelInspectDetails">
|
||||
UPDATE hrsa_bill_inspect
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ public interface ColumnBuildService {
|
|||
*/
|
||||
List<WeaTableColumn> buildCommonColumnsWithStyle(List<InsuranceAccountDetailPO> pos, Long employeeId, String tenantKey, boolean flag);
|
||||
|
||||
List<WeaTableColumn> buildCommonColumns(List<InsuranceAccountDetailPO> pos, Long employeeId, String tenantKey);
|
||||
List<WeaTableColumn> buildCommonColumns(List<InsuranceAccountDetailPO> pos);
|
||||
|
||||
List<WeaTableColumn> buildInspectColumns(List<InsuranceAccountInspectPO> pos, Long employeeId, String tenantKey);
|
||||
List<WeaTableColumn> buildInspectColumns(List<InsuranceAccountInspectPO> pos);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -130,5 +130,23 @@ public interface SIAccountService {
|
|||
* @param billMonth
|
||||
*/
|
||||
InsuranceAccountTabDTO tabList(String billMonth);
|
||||
|
||||
/**
|
||||
* 人员异动
|
||||
* @param insuranceAccountDetailParam
|
||||
*/
|
||||
Map<String,Object> changeList(InsuranceAccountDetailParam insuranceAccountDetailParam);
|
||||
|
||||
/**
|
||||
* 核算核算异常,重新核算
|
||||
* @param inspectAccountParam
|
||||
*/
|
||||
void accountInspect(InspectAccountParam inspectAccountParam);
|
||||
|
||||
/**
|
||||
* 核算失败列表
|
||||
* @param param
|
||||
*/
|
||||
Map<String,Object> getInspectTable(InsuranceAccountDetailParam param);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,14 @@ package com.engine.salary.service.impl;
|
|||
import com.alibaba.fastjson.JSON;
|
||||
import com.cloudstore.eccom.constant.WeaBoolAttr;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
||||
import com.engine.salary.biz.SIArchivesBiz;
|
||||
import com.engine.salary.constant.SalaryDefaultTenantConstant;
|
||||
import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO;
|
||||
import com.engine.salary.entity.siaccount.po.InsuranceAccountInspectPO;
|
||||
import com.engine.salary.entity.siarchives.po.InsuranceArchivesAccountPO;
|
||||
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.sicategory.WelfareTypeEnum;
|
||||
import com.engine.salary.mapper.sicategory.ICategoryMapper;
|
||||
|
|
@ -252,12 +258,96 @@ public class ColumnBuildServiceImpl extends Service implements ColumnBuildServic
|
|||
|
||||
|
||||
@Override
|
||||
public List<WeaTableColumn> buildCommonColumns(List<InsuranceAccountDetailPO> pos, Long employeeId, String tenantKey) {
|
||||
public List<WeaTableColumn> buildCommonColumns(List<InsuranceAccountDetailPO> pos) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WeaTableColumn> buildInspectColumns(List<InsuranceAccountInspectPO> pos, Long employeeId, String tenantKey) {
|
||||
return null;
|
||||
public List<WeaTableColumn> buildInspectColumns(List<InsuranceAccountInspectPO> pos) {
|
||||
List<WeaTableColumn> list = new ArrayList<>();
|
||||
SIArchivesBiz siArchivesBiz = new SIArchivesBiz();
|
||||
List<Long> employeeIds = pos.stream().map(InsuranceAccountInspectPO::getEmployeeId).collect(Collectors.toList());
|
||||
Map<Long, InsuranceArchivesAccountPO> insuranceArchivesAccountPOMap = siArchivesBiz.buildBatchAccount(employeeIds, SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY);
|
||||
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 = buildInspectTableTitle(new ArrayList<>(insuranceArchivesAccountPOMap.values()), categoryIdNameMap);
|
||||
WeaTableColumn weaTableNameColumn = new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 85429, "姓名"), "userName");
|
||||
weaTableNameColumn.setFixed("left");
|
||||
WeaTableColumn idColumn = new WeaTableColumn("150px", "id", "id");
|
||||
idColumn.setIsPrimarykey(WeaBoolAttr.TRUE);
|
||||
idColumn.setDisplay(WeaBoolAttr.FALSE);
|
||||
list.add(idColumn);
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 86185, "部门"), "department"));
|
||||
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( 100544, "缴纳情况"), "supplementaryMonth"));
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 91323, "社保方案名称"), "socialSchemeName"));
|
||||
//组装社保基数
|
||||
columns.get(WelfareTypeEnum.SOCIAL_SECURITY.getValue()).forEach((k, v) -> {
|
||||
list.add(new WeaTableColumn("150px",k, v));
|
||||
});
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 91485, "公积金方案名称"), "fundSchemeName"));
|
||||
//组装公积金基数
|
||||
columns.get(WelfareTypeEnum.ACCUMULATION_FUND.getValue()).forEach((k, v) -> {
|
||||
list.add(new WeaTableColumn("150px",k, v));
|
||||
});
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 91496, "其他福利方案名称"), "otherSchemeName"));
|
||||
columns.get(WelfareTypeEnum.OTHER.getValue()).forEach((k, v) -> {
|
||||
list.add(new WeaTableColumn("150px",k, v));
|
||||
});
|
||||
return list;
|
||||
}
|
||||
|
||||
private Map<Integer, Map<String, String>> buildInspectTableTitle(List<InsuranceArchivesAccountPO> pos, Map<String, String> categoryIdNameMap
|
||||
) {
|
||||
Set<String> socailIds = new HashSet<>();
|
||||
Set<String> fundIds = new HashSet<>();
|
||||
Set<String> otherIds = new HashSet<>();
|
||||
Map<Integer, Map<String, String>> result = new HashMap<>();
|
||||
|
||||
pos.stream().forEach(item -> {
|
||||
InsuranceArchivesSocialSchemePO social = item.getSocial();
|
||||
if (social != null && StringUtils.isNotBlank(social.getSocialPaymentBaseString())) {
|
||||
Map<String, String> socialJson = JSON.parseObject(social.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
socialJson.forEach((k, v) -> {
|
||||
socailIds.add(k);
|
||||
});
|
||||
}
|
||||
InsuranceArchivesFundSchemePO fund = item.getFund();
|
||||
if (fund != null && StringUtils.isNotBlank(fund.getFundPaymentBaseString())) {
|
||||
Map<String, String> fundJson = JSON.parseObject(fund.getFundPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
fundJson.forEach((k, v) -> {
|
||||
fundIds.add(k);
|
||||
});
|
||||
}
|
||||
InsuranceArchivesOtherSchemePO other = item.getOther();
|
||||
if (other != null && StringUtils.isNotBlank(other.getOtherPaymentBaseString())) {
|
||||
Map<String, String> otherJson = JSON.parseObject(other.getOtherPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
otherJson.forEach((k, v) -> {
|
||||
otherIds.add(k);
|
||||
});
|
||||
}
|
||||
});
|
||||
Map<String, String> socialColumns = new HashMap<>();
|
||||
Map<String, String> fundColumns = new HashMap<>();
|
||||
Map<String, String> otherColumns = new HashMap<>();
|
||||
socailIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
socialColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 100293, "申报基数"), social + "socialBase");
|
||||
}
|
||||
});
|
||||
fundIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
fundColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 100293, "申报基数"), social + "fundBase");
|
||||
}
|
||||
});
|
||||
otherIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
otherColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 100293, "申报基数"), social + "otherBase");
|
||||
}
|
||||
});
|
||||
result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialColumns);
|
||||
result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundColumns);
|
||||
result.put(WelfareTypeEnum.OTHER.getValue(), otherColumns);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,15 @@
|
|||
package com.engine.salary.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.engine.salary.biz.SIArchivesBiz;
|
||||
import com.engine.salary.constant.SalaryDefaultTenantConstant;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO;
|
||||
import com.engine.salary.entity.siaccount.po.InsuranceAccountInspectPO;
|
||||
import com.engine.salary.entity.siarchives.po.InsuranceArchivesAccountPO;
|
||||
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.taxrate.TaxAgent;
|
||||
import com.engine.salary.enums.siaccount.BillStatusEnum;
|
||||
import com.engine.salary.enums.siaccount.ResourceFromEnum;
|
||||
|
|
@ -12,18 +18,14 @@ import com.engine.salary.mapper.datacollection.EmployMapper;
|
|||
import com.engine.salary.mapper.sischeme.InsuranceSchemeMapper;
|
||||
import com.engine.salary.service.RecordsBuildService;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.util.SalaryAssert;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryEnumUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.*;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
|
@ -48,7 +50,7 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
|
|||
}
|
||||
List<TaxAgent> paymentList = MapperProxyFactory.getProxy(TaxAgentMapper.class).listAll();
|
||||
|
||||
SalaryAssert.notEmpty(paymentList, SalaryI18nUtil.getI18nLabel( 100341, "暂无扣缴义务人"));
|
||||
SalaryAssert.notEmpty(paymentList, SalaryI18nUtil.getI18nLabel(100341, "暂无扣缴义务人"));
|
||||
Map<Long, TaxAgent> paymentMap = paymentList.stream().collect(Collectors.toMap(TaxAgent::getId, Function.identity()));
|
||||
Map<Long, DataCollectionEmployee> collect = employeeByIds.stream().collect(Collectors.toMap(DataCollectionEmployee::getEmployeeId, Function.identity()));
|
||||
list.forEach(item -> {
|
||||
|
|
@ -153,6 +155,77 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
|
|||
|
||||
@Override
|
||||
public List<Map<String, Object>> buildInspectRecords(List<InsuranceAccountInspectPO> list) {
|
||||
return null;
|
||||
List<Map<String, Object>> result = new ArrayList<>();
|
||||
SIArchivesBiz siArchivesBiz = new SIArchivesBiz();
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return result;
|
||||
}
|
||||
List<Long> employeeIds = list.stream().map(InsuranceAccountInspectPO::getEmployeeId).collect(Collectors.toList());
|
||||
List<DataCollectionEmployee> employeeByIds = MapperProxyFactory.getProxy(EmployMapper.class).getEmployeeByIdsAll(employeeIds);
|
||||
if (CollectionUtils.isEmpty(employeeByIds)) {
|
||||
return result;
|
||||
}
|
||||
Map<Long, DataCollectionEmployee> collect = employeeByIds.stream().collect(Collectors.toMap(DataCollectionEmployee::getEmployeeId, Function.identity()));
|
||||
Map<Long, InsuranceArchivesAccountPO> insuranceArchivesAccountPOMap = siArchivesBiz.buildBatchAccount(employeeIds, SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY);
|
||||
list.forEach(item -> {
|
||||
Map<String, Object> record = new HashMap<>();
|
||||
DataCollectionEmployee simpleEmployee = collect.get(item.getEmployeeId()) == null ? new DataCollectionEmployee() : collect.get(item.getEmployeeId());
|
||||
InsuranceArchivesAccountPO insuranceAccountInspectPO = insuranceArchivesAccountPOMap.get(item.getEmployeeId());
|
||||
record.put("id", item.getId());
|
||||
record.put("employeeId", item.getEmployeeId());
|
||||
record.put("billMonth", item.getBillMonth());
|
||||
record.put("userName", simpleEmployee.getUsername());
|
||||
record.put("inspectStatus", item.getInspectStatus());
|
||||
record.put("department", simpleEmployee.getDepartmentName());
|
||||
record.put("supplementaryMonth", timeFormat(item.getSupplementaryMonth()));
|
||||
record.put("mobile", simpleEmployee.getMobile());
|
||||
record.put("employeeStatus", simpleEmployee.getStatus());
|
||||
InsuranceArchivesSocialSchemePO social = insuranceAccountInspectPO.getSocial();
|
||||
if (social != null) {
|
||||
record.put("socialSchemeName", MapperProxyFactory.getProxy(InsuranceSchemeMapper.class).querySchemeName(social.getSocialSchemeId()));
|
||||
if (StringUtils.isNotEmpty(social.getSocialPaymentBaseString())) {
|
||||
Map<String, Object> socialJson = JSON.parseObject(social.getSocialPaymentBaseString(), new HashMap<String, Object>().getClass());
|
||||
socialJson.forEach((k, v) -> {
|
||||
record.put(k + "socialBase", SalaryEntityUtil.thousandthConvert((String) v));
|
||||
});
|
||||
}
|
||||
}
|
||||
InsuranceArchivesFundSchemePO fund = insuranceAccountInspectPO.getFund();
|
||||
if (fund != null) {
|
||||
record.put("fundSchemeName", MapperProxyFactory.getProxy(InsuranceSchemeMapper.class).querySchemeName(fund.getFundSchemeId()));
|
||||
if (StringUtils.isNotEmpty(fund.getFundPaymentBaseString())) {
|
||||
Map<String, Object> socialJson = JSON.parseObject(fund.getFundPaymentBaseString(), new HashMap<String, Object>().getClass());
|
||||
socialJson.forEach((k, v) -> {
|
||||
record.put(k + "fundBase", SalaryEntityUtil.thousandthConvert((String) v));
|
||||
});
|
||||
}
|
||||
}
|
||||
InsuranceArchivesOtherSchemePO other = insuranceAccountInspectPO.getOther();
|
||||
if (other != null) {
|
||||
record.put("otherSchemeName", MapperProxyFactory.getProxy(InsuranceSchemeMapper.class).querySchemeName(other.getOtherSchemeId()));
|
||||
if (StringUtils.isNotEmpty(other.getOtherPaymentBaseString())) {
|
||||
Map<String, Object> socialJson = JSON.parseObject(other.getOtherPaymentBaseString(), new HashMap<String, Object>().getClass());
|
||||
socialJson.forEach((k, v) -> {
|
||||
record.put(k + "otherBase", SalaryEntityUtil.thousandthConvert((String) v));
|
||||
});
|
||||
}
|
||||
}
|
||||
result.add(record);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public String timeFormat(String originTime) {
|
||||
if (StringUtils.isBlank(originTime) || !SalaryDateUtil.checkYearMonth(originTime)) {
|
||||
return null;
|
||||
}
|
||||
Date date = null;
|
||||
try {
|
||||
date = new SimpleDateFormat("yyyy-MM").parse(originTime);
|
||||
} catch (ParseException e) {
|
||||
//log.error("time format error", e);
|
||||
}
|
||||
return new SimpleDateFormat(SalaryI18nUtil.getI18nLabel(100519, "补缴yyyy年MM月")).format(date);
|
||||
}
|
||||
}
|
||||
|
|
@ -2,11 +2,12 @@ package com.engine.salary.service.impl;
|
|||
|
||||
import com.api.browser.bean.SearchConditionGroup;
|
||||
import com.api.browser.bean.SearchConditionItem;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
||||
import com.cloudstore.eccom.pc.table.*;
|
||||
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.biz.SIAccountBiz;
|
||||
import com.engine.salary.biz.SIArchivesBiz;
|
||||
import com.engine.salary.component.SalaryWeaTable;
|
||||
import com.engine.salary.constant.SalaryDefaultTenantConstant;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
|
|
@ -18,6 +19,8 @@ import com.engine.salary.entity.siaccount.param.*;
|
|||
import com.engine.salary.entity.siaccount.po.InsuranceAccountBatchPO;
|
||||
import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO;
|
||||
import com.engine.salary.entity.siaccount.po.InsuranceAccountInspectPO;
|
||||
import com.engine.salary.entity.siarchives.po.InsuranceArchivesEmployeePO;
|
||||
import com.engine.salary.enums.UserStatusEnum;
|
||||
import com.engine.salary.enums.siaccount.BillStatusEnum;
|
||||
import com.engine.salary.enums.siaccount.InspectStatusEnum;
|
||||
import com.engine.salary.enums.siaccount.PaymentStatusEnum;
|
||||
|
|
@ -53,6 +56,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
|
||||
private SIAccountBiz siAccountBiz = new SIAccountBiz();
|
||||
|
||||
private SIArchivesBiz siArchivesBiz = new SIArchivesBiz();
|
||||
|
||||
public RecordsBuildService getService(User user) {
|
||||
return ServiceUtil.getService(RecordsBuildServiceImpl.class,user);
|
||||
}
|
||||
|
|
@ -160,6 +165,9 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
return datas;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Map<String, Object> listCommonPageByName(InsuranceAccountDetailParam queryParam) {
|
||||
//增加查询参数userName
|
||||
|
|
@ -178,6 +186,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
|
||||
//补缴缴纳列表
|
||||
queryParam.setPaymentStatus(PaymentStatusEnum.REPAIR.getValue());
|
||||
//PageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
|
||||
List<InsuranceAccountDetailPO> list = MapperProxyFactory.getProxy(InsuranceAccountDetailMapper.class).list(queryParam);
|
||||
PageInfo<InsuranceAccountDetailPO> pageInfo = new PageInfo<>(list,InsuranceAccountDetailPO.class);
|
||||
List<InsuranceAccountDetailPO> insuranceAccountDetailPOS = pageInfo.getList();
|
||||
|
|
@ -206,6 +215,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
return datas;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Map<String, Object> supplementaryByNameList(InsuranceAccountDetailParam queryParam) {
|
||||
//增加查询参数userName
|
||||
|
|
@ -373,5 +384,120 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
return insuranceAccountTabDTO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> changeList(InsuranceAccountDetailParam param) {
|
||||
Map<String,Object> datas = new HashMap<>();
|
||||
Long employeeId = (long)user.getUID();
|
||||
List<InsuranceArchivesEmployeePO> insuranceArchivesEmployeePOS = MapperProxyFactory.getProxy(InsuranceAccountDetailMapper.class).changeList(param.getUserName(), param.getCurrent(), param.getPageSize());
|
||||
List<Map<String, Object>> records = siArchivesBiz.buildTableData(insuranceArchivesEmployeePOS);
|
||||
PageInfo<Map<String, Object>> pageInfos = new PageInfo<>(records);
|
||||
pageInfos.setTotal(records.size());
|
||||
pageInfos.setPageNum(param.getCurrent());
|
||||
pageInfos.setPageSize(param.getPageSize());
|
||||
|
||||
List<WeaTableColumn> weaTableColumns = siArchivesBiz.buildWeaTableColumns(insuranceArchivesEmployeePOS, employeeId);
|
||||
|
||||
WeaTable table = new WeaTable();
|
||||
table.setPageUID(UUID.randomUUID().toString());
|
||||
table.setColumns(weaTableColumns);
|
||||
table.setTableType(WeaTableType.CHECKBOX);
|
||||
WeaTableOperates weaTableOperates = new WeaTableOperates();
|
||||
WeaTableOperate weaTableOperate = new WeaTableOperate();
|
||||
weaTableOperate.setIndex("0");
|
||||
weaTableOperate.setText("移除");
|
||||
WeaTableOperate weaTableOperate1 = new WeaTableOperate();
|
||||
weaTableOperate1.setIndex("1");
|
||||
weaTableOperate1.setText("添加");
|
||||
table.setOperates(weaTableOperates);
|
||||
|
||||
List<List<Permission>> permissions = new ArrayList<>();
|
||||
for (int i = 0; i < records.size(); i++) {
|
||||
List<Permission> permission = new ArrayList<>();
|
||||
if (UserStatusEnum.DEPARTURE.getDescription().equals(records.get(i).get("status"))) {
|
||||
permission.add(new Permission(true, false));
|
||||
permission.add(new Permission(false, false));
|
||||
permissions.add(permission);
|
||||
}
|
||||
if (UserStatusEnum.DEPARTURE.getDescription().equals(records.get(i).get("status"))) {
|
||||
permission.add(new Permission(false, false));
|
||||
permission.add(new Permission(true, false));
|
||||
permissions.add(permission);
|
||||
}
|
||||
}
|
||||
|
||||
WeaResultMsg result = new WeaResultMsg(false);
|
||||
result.putAll(table.makeDataResult());
|
||||
result.success();
|
||||
|
||||
datas.put("permissions",permissions);
|
||||
datas.put("pageInfo", pageInfos);
|
||||
datas.put("dataKey",result.getResultMap());
|
||||
return datas;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accountInspect(InspectAccountParam param) {
|
||||
Long employeeId = (long)user.getUID();
|
||||
ValidUtil.doValidator(param);
|
||||
siAccountBiz.accountInspect(param.getIds(),param.getBillMonth(),employeeId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getInspectTable(InsuranceAccountDetailParam param) {
|
||||
Map<String,Object> datas = new HashMap<>();
|
||||
|
||||
List<InsuranceAccountInspectPO> insuranceAccountInspectPOS = MapperProxyFactory.getProxy(InsuranceAccountInspectMapper.class).getByBillMonth(param.getBillMonth());
|
||||
List<Map<String, Object>> records = getService(user).buildInspectRecords(insuranceAccountInspectPOS);
|
||||
|
||||
PageInfo<Map<String, Object>> pageInfos = new PageInfo<>(records);
|
||||
pageInfos.setTotal(records.size());
|
||||
pageInfos.setPageNum(param.getCurrent());
|
||||
pageInfos.setPageSize(param.getPageSize());
|
||||
|
||||
List<WeaTableColumn> weaTableColumns = getColumnBuildService(user).buildInspectColumns(insuranceAccountInspectPOS);
|
||||
WeaTable table = new WeaTable();
|
||||
table.setPageUID(UUID.randomUUID().toString());
|
||||
table.setColumns(weaTableColumns);
|
||||
table.setTableType(WeaTableType.CHECKBOX);
|
||||
WeaTableOperates weaTableOperates = new WeaTableOperates();
|
||||
WeaTableOperate weaTableOperate = new WeaTableOperate();
|
||||
weaTableOperate.setIndex("0");
|
||||
weaTableOperate.setText("忽略");
|
||||
WeaTableOperate weaTableOperate1 = new WeaTableOperate();
|
||||
weaTableOperate1.setIndex("1");
|
||||
weaTableOperate1.setText("重置");
|
||||
table.setOperates(weaTableOperates);
|
||||
|
||||
List<List<Permission>> permissions = new ArrayList<>();
|
||||
for (int i = 0; i < records.size(); i++) {
|
||||
List<Permission> permission = new ArrayList<>();
|
||||
Permission permissionCheckBox = new Permission();
|
||||
if (InspectStatusEnum.IGNORE.getValue() == records.get(i).get("inspectStatus")) {
|
||||
permissionCheckBox.setVisible(true);
|
||||
permissionCheckBox.setDisabled(false);
|
||||
permission.add(new Permission(true, false));
|
||||
permission.add(new Permission(false, true));
|
||||
permissions.add(permission);
|
||||
}
|
||||
if (InspectStatusEnum.COMFORED.getValue() == records.get(i).get("inspectStatus")) {
|
||||
permissionCheckBox.setVisible(true);
|
||||
permissionCheckBox.setDisabled(true);
|
||||
permission.add(new Permission(false, true));
|
||||
permission.add(new Permission(true, false));
|
||||
permissions.add(permission);
|
||||
}
|
||||
}
|
||||
|
||||
WeaResultMsg result = new WeaResultMsg(false);
|
||||
result.putAll(table.makeDataResult());
|
||||
result.success();
|
||||
|
||||
datas.put("permissions",permissions);
|
||||
datas.put("pageInfo", pageInfos);
|
||||
datas.put("dataKey",result.getResultMap());
|
||||
|
||||
return datas;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,10 +6,8 @@ import com.engine.salary.entity.siaccount.dto.InsuranceAccountTabDTO;
|
|||
import com.engine.salary.entity.siaccount.param.*;
|
||||
import com.engine.salary.service.impl.SIAccountServiceImpl;
|
||||
import com.engine.salary.util.ResponseResult;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import weaver.hrm.HrmUserVarify;
|
||||
import weaver.hrm.User;
|
||||
import com.engine.salary.service.SIAccountService;
|
||||
|
|
@ -259,14 +257,14 @@ public class SIAccountController {
|
|||
return new ResponseResult<AccountParam, String>().run(getService(user)::file, accountParam);
|
||||
}
|
||||
|
||||
// @GET
|
||||
// @Path("/changeList")
|
||||
// @Produces(MediaType.APPLICATION_JSON)
|
||||
// public String changeList(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||||
// @RequestBody InsuranceAccountDetailParam insuranceAccountDetailParam) {
|
||||
// User user = HrmUserVarify.getUser(request, response);
|
||||
// return new ResponseResult<InsuranceAccountDetailParam, Map<String, Object>>().run(getService(user)::changeList, insuranceAccountDetailParam);
|
||||
// }
|
||||
@GET
|
||||
@Path("/changeList")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String changeList(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||||
@RequestBody InsuranceAccountDetailParam insuranceAccountDetailParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<InsuranceAccountDetailParam, Map<String, Object>>().run(getService(user)::changeList, insuranceAccountDetailParam);
|
||||
}
|
||||
|
||||
|
||||
// @GetMapping("overView")
|
||||
|
|
@ -286,22 +284,25 @@ public class SIAccountController {
|
|||
return new ResponseResult<String, InsuranceAccountTabDTO>().run(getService(user)::tabList, billMonth);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/inspectList")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getInspectTable(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||||
@RequestBody InsuranceAccountDetailParam insuranceAccountDetailParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<InsuranceAccountDetailParam, Map<String, Object>>().run(getService(user)::getInspectTable, insuranceAccountDetailParam);
|
||||
}
|
||||
|
||||
|
||||
// @GetMapping("inspectList")
|
||||
// @ApiOperation("核算失败列表")
|
||||
// @WeaPermission
|
||||
// public WeaResult<WeaTable> getInspectTable(@RequestParam(value = "billMonth") String billMonth) {
|
||||
// return siAccountWrapper.getInspectTable(billMonth, UserContext.getCurrentUser().getEmployeeId(), TenantContext.getCurrentTenantKey());
|
||||
// }
|
||||
//
|
||||
// @PostMapping("inspectAccount")
|
||||
// @ApiOperation("核算核算异常")
|
||||
// @WeaPermission
|
||||
// public WeaResult<String> accountInspect(@RequestBody InspectAccountParam param) {
|
||||
// return siAccountWrapper.accountInspect(param.getIds(), param.getBillMonth(), UserContext.getCurrentUser().getEmployeeId(), TenantContext.getCurrentTenantKey());
|
||||
// }
|
||||
//
|
||||
|
||||
@POST
|
||||
@Path("/inspectAccount")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String accountInspect(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||||
@RequestBody InspectAccountParam param) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<InspectAccountParam, String>().run(getService(user)::accountInspect, param);
|
||||
}
|
||||
|
||||
|
||||
@POST
|
||||
|
|
|
|||
Loading…
Reference in New Issue