Compare commits
15 Commits
8b1fe9ed3f
...
0ba4c40f45
| Author | SHA1 | Date |
|---|---|---|
|
|
0ba4c40f45 | |
|
|
ffe8c88392 | |
|
|
0cea01300d | |
|
|
7acdc94380 | |
|
|
b83a916610 | |
|
|
e7923a2486 | |
|
|
eebfa5ec3f | |
|
|
10a11dcca4 | |
|
|
cf68e118fa | |
|
|
cb423962a2 | |
|
|
d1abbad832 | |
|
|
00fc87ffd8 | |
|
|
5377a472cc | |
|
|
9f0c00ef25 | |
|
|
85e0b85871 |
|
|
@ -45,4 +45,6 @@ public class InsuranceExportParam extends BaseQueryParam {
|
||||||
private List<Long> taxAgents;
|
private List<Long> taxAgents;
|
||||||
|
|
||||||
private String workcode;
|
private String workcode;
|
||||||
|
private List<Long> departmentIds;
|
||||||
|
private List<Long> subCompanyIds;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -721,6 +721,7 @@ public class TaxDeclarationBO {
|
||||||
private static String findStringValue(String fieldCode, Map<Long, List<SalaryAcctResultPO>> resultMap, Map<String, Long> salaryItemMap) {
|
private static String findStringValue(String fieldCode, Map<Long, List<SalaryAcctResultPO>> resultMap, Map<String, Long> salaryItemMap) {
|
||||||
return resultMap.getOrDefault(salaryItemMap.getOrDefault(fieldCode, 0L), Collections.emptyList()).stream()
|
return resultMap.getOrDefault(salaryItemMap.getOrDefault(fieldCode, 0L), Collections.emptyList()).stream()
|
||||||
.map(SalaryAcctResultPO::getResultValue)
|
.map(SalaryAcctResultPO::getResultValue)
|
||||||
|
.filter(Objects::nonNull)
|
||||||
.findFirst().orElse("");
|
.findFirst().orElse("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
||||||
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
||||||
where e.status not in (7)
|
where e.status not in (7)
|
||||||
|
<include refid="paramSql"/>
|
||||||
|
|
||||||
<!-- 排序 -->
|
<!-- 排序 -->
|
||||||
<if test="param.orderRule != null">
|
<if test="param.orderRule != null">
|
||||||
|
|
@ -51,6 +52,7 @@
|
||||||
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
||||||
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
||||||
where e.status not in (7)
|
where e.status not in (7)
|
||||||
|
<include refid="paramSql"/>
|
||||||
|
|
||||||
<!-- 排序 -->
|
<!-- 排序 -->
|
||||||
<if test="param.orderRule != null">
|
<if test="param.orderRule != null">
|
||||||
|
|
@ -79,6 +81,7 @@
|
||||||
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
||||||
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
||||||
where e.status not in (7)
|
where e.status not in (7)
|
||||||
|
<include refid="paramSql"/>
|
||||||
|
|
||||||
<!-- 排序 -->
|
<!-- 排序 -->
|
||||||
<if test="param.orderRule != null">
|
<if test="param.orderRule != null">
|
||||||
|
|
@ -96,6 +99,7 @@
|
||||||
LEFT JOIN hrmresource e ON e.ID = a.employee_id
|
LEFT JOIN hrmresource e ON e.ID = a.employee_id
|
||||||
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
||||||
where e.status not in (7)
|
where e.status not in (7)
|
||||||
|
<include refid="paramSql"/>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<select id="exportExcelAccount" resultType="com.engine.salary.entity.siexport.po.ExcelAccountExportPO" databaseId="oracle">
|
<select id="exportExcelAccount" resultType="com.engine.salary.entity.siexport.po.ExcelAccountExportPO" databaseId="oracle">
|
||||||
|
|
@ -108,6 +112,7 @@
|
||||||
LEFT JOIN hrmresource e ON e.ID = a.employee_id
|
LEFT JOIN hrmresource e ON e.ID = a.employee_id
|
||||||
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
||||||
where e.status not in (7)
|
where e.status not in (7)
|
||||||
|
<include refid="paramSql"/>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<select id="exportExcelAccount" resultType="com.engine.salary.entity.siexport.po.ExcelAccountExportPO" databaseId="sqlserver">
|
<select id="exportExcelAccount" resultType="com.engine.salary.entity.siexport.po.ExcelAccountExportPO" databaseId="sqlserver">
|
||||||
|
|
@ -120,6 +125,7 @@
|
||||||
LEFT JOIN hrmresource e ON e.ID = a.employee_id
|
LEFT JOIN hrmresource e ON e.ID = a.employee_id
|
||||||
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
||||||
where e.status not in (7)
|
where e.status not in (7)
|
||||||
|
<include refid="paramSql"/>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -147,6 +153,7 @@
|
||||||
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
||||||
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
||||||
where e.status not in (7)
|
where e.status not in (7)
|
||||||
|
<include refid="paramSql"/>
|
||||||
|
|
||||||
<!-- 排序 -->
|
<!-- 排序 -->
|
||||||
<if test="param.orderRule != null">
|
<if test="param.orderRule != null">
|
||||||
|
|
@ -176,6 +183,7 @@
|
||||||
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
||||||
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
||||||
where e.status not in (7)
|
where e.status not in (7)
|
||||||
|
<include refid="paramSql"/>
|
||||||
|
|
||||||
<!-- 排序 -->
|
<!-- 排序 -->
|
||||||
<if test="param.orderRule != null">
|
<if test="param.orderRule != null">
|
||||||
|
|
@ -205,6 +213,7 @@
|
||||||
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
||||||
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
||||||
where e.status not in (7)
|
where e.status not in (7)
|
||||||
|
<include refid="paramSql"/>
|
||||||
|
|
||||||
<!-- 排序 -->
|
<!-- 排序 -->
|
||||||
<if test="param.orderRule != null">
|
<if test="param.orderRule != null">
|
||||||
|
|
@ -233,6 +242,7 @@
|
||||||
LEFT JOIN hrmdepartment d ON d.id = e.department_id
|
LEFT JOIN hrmdepartment d ON d.id = e.department_id
|
||||||
LEFT JOIN hrmsubcompany c ON c.id = e.subcompany_id
|
LEFT JOIN hrmsubcompany c ON c.id = e.subcompany_id
|
||||||
where e.status not in (7)
|
where e.status not in (7)
|
||||||
|
<include refid="extParamSql"/>
|
||||||
<!-- 排序 -->
|
<!-- 排序 -->
|
||||||
</select>
|
</select>
|
||||||
<select id="exportExtAccount" resultType="com.engine.salary.entity.siexport.po.AccountExportPO" databaseId="oracle">
|
<select id="exportExtAccount" resultType="com.engine.salary.entity.siexport.po.AccountExportPO" databaseId="oracle">
|
||||||
|
|
@ -256,6 +266,7 @@
|
||||||
LEFT JOIN hrmdepartment d ON d.id = e.department_id
|
LEFT JOIN hrmdepartment d ON d.id = e.department_id
|
||||||
LEFT JOIN hrmsubcompany c ON c.id = e.subcompany_id
|
LEFT JOIN hrmsubcompany c ON c.id = e.subcompany_id
|
||||||
where e.status not in (7)
|
where e.status not in (7)
|
||||||
|
<include refid="extParamSql"/>
|
||||||
<!-- 排序 -->
|
<!-- 排序 -->
|
||||||
</select>
|
</select>
|
||||||
<select id="exportExtAccount" resultType="com.engine.salary.entity.siexport.po.AccountExportPO" databaseId="sqlserver">
|
<select id="exportExtAccount" resultType="com.engine.salary.entity.siexport.po.AccountExportPO" databaseId="sqlserver">
|
||||||
|
|
@ -279,6 +290,7 @@
|
||||||
LEFT JOIN hrmdepartment d ON d.id = e.department_id
|
LEFT JOIN hrmdepartment d ON d.id = e.department_id
|
||||||
LEFT JOIN hrmsubcompany c ON c.id = e.subcompany_id
|
LEFT JOIN hrmsubcompany c ON c.id = e.subcompany_id
|
||||||
where e.status not in (7)
|
where e.status not in (7)
|
||||||
|
<include refid="extParamSql"/>
|
||||||
<!-- 排序 -->
|
<!-- 排序 -->
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -293,6 +305,7 @@
|
||||||
LEFT JOIN hrsa_external_employee e ON e.ID = a.employee_id
|
LEFT JOIN hrsa_external_employee e ON e.ID = a.employee_id
|
||||||
LEFT JOIN hrmdepartment d ON d.id = e.department_id
|
LEFT JOIN hrmdepartment d ON d.id = e.department_id
|
||||||
where e.status not in (7)
|
where e.status not in (7)
|
||||||
|
<include refid="extParamSql"/>
|
||||||
</select>
|
</select>
|
||||||
<select id="exportExtExcelAccount" resultType="com.engine.salary.entity.siexport.po.ExcelAccountExportPO" databaseId="oracle">
|
<select id="exportExtExcelAccount" resultType="com.engine.salary.entity.siexport.po.ExcelAccountExportPO" databaseId="oracle">
|
||||||
SELECT
|
SELECT
|
||||||
|
|
@ -305,6 +318,7 @@
|
||||||
LEFT JOIN hrsa_external_employee e ON e.ID = a.employee_id
|
LEFT JOIN hrsa_external_employee e ON e.ID = a.employee_id
|
||||||
LEFT JOIN hrmdepartment d ON d.id = e.department_id
|
LEFT JOIN hrmdepartment d ON d.id = e.department_id
|
||||||
where e.status not in (7)
|
where e.status not in (7)
|
||||||
|
<include refid="extParamSql"/>
|
||||||
</select>
|
</select>
|
||||||
<select id="exportExtExcelAccount" resultType="com.engine.salary.entity.siexport.po.ExcelAccountExportPO" databaseId="sqlserver">
|
<select id="exportExtExcelAccount" resultType="com.engine.salary.entity.siexport.po.ExcelAccountExportPO" databaseId="sqlserver">
|
||||||
SELECT
|
SELECT
|
||||||
|
|
@ -317,5 +331,113 @@
|
||||||
LEFT JOIN hrsa_external_employee e ON e.ID = a.employee_id
|
LEFT JOIN hrsa_external_employee e ON e.ID = a.employee_id
|
||||||
LEFT JOIN hrmdepartment d ON d.id = e.department_id
|
LEFT JOIN hrmdepartment d ON d.id = e.department_id
|
||||||
where e.status not in (7)
|
where e.status not in (7)
|
||||||
|
<include refid="extParamSql"/>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<sql id="paramSql">
|
||||||
|
<if test="param.workcode != null and param.workcode != ''">
|
||||||
|
AND e.workcode like CONCAT('%',#{param.workcode},'%')
|
||||||
|
</if>
|
||||||
|
<if test="param.departmentIds != null and param.departmentIds.size()>0">
|
||||||
|
AND e.departmentid IN
|
||||||
|
<foreach collection="param.departmentIds" open="(" item="departmentId" separator="," close=")">
|
||||||
|
#{departmentId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="param.subCompanyIds != null and param.subCompanyIds.size()>0">
|
||||||
|
AND e.subcompanyid1 IN
|
||||||
|
<foreach collection="param.subCompanyIds" open="(" item="subCompanyId" separator="," close=")">
|
||||||
|
#{subCompanyId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
<sql id="paramSql" databaseId="oracle">
|
||||||
|
<if test="param.workcode != null and param.workcode != ''">
|
||||||
|
AND e.workcode like '%'||#{param.workcode}||'%'
|
||||||
|
</if>
|
||||||
|
<if test="param.departmentIds != null and param.departmentIds.size()>0">
|
||||||
|
AND e.departmentid IN
|
||||||
|
<foreach collection="param.departmentIds" open="(" item="departmentId" separator="," close=")">
|
||||||
|
#{departmentId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="param.subCompanyIds != null and param.subCompanyIds.size()>0">
|
||||||
|
AND e.subcompanyid1 IN
|
||||||
|
<foreach collection="param.subCompanyIds" open="(" item="subCompanyId" separator="," close=")">
|
||||||
|
#{subCompanyId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<sql id="paramSql" databaseId="sqlserver">
|
||||||
|
<if test="param.workcode != null and param.workcode != ''">
|
||||||
|
AND e.workcode like '%'+#{param.workcode}+'%'
|
||||||
|
</if>
|
||||||
|
<if test="param.departmentIds != null and param.departmentIds.size()>0">
|
||||||
|
AND e.departmentid IN
|
||||||
|
<foreach collection="param.departmentIds" open="(" item="departmentId" separator="," close=")">
|
||||||
|
#{departmentId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="param.subCompanyIds != null and param.subCompanyIds.size()>0">
|
||||||
|
AND e.subcompanyid1 IN
|
||||||
|
<foreach collection="param.subCompanyIds" open="(" item="subCompanyId" separator="," close=")">
|
||||||
|
#{subCompanyId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<sql id="extParamSql">
|
||||||
|
<if test="param.workcode != null and param.workcode != ''">
|
||||||
|
AND e.workcode like CONCAT('%',#{param.workcode},'%')
|
||||||
|
</if>
|
||||||
|
<if test="param.departmentIds != null and param.departmentIds.size()>0">
|
||||||
|
AND e.department_id IN
|
||||||
|
<foreach collection="param.departmentIds" open="(" item="departmentId" separator="," close=")">
|
||||||
|
#{departmentId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="param.subCompanyIds != null and param.subCompanyIds.size()>0">
|
||||||
|
AND e.subcompany_id IN
|
||||||
|
<foreach collection="param.subCompanyIds" open="(" item="subCompanyId" separator="," close=")">
|
||||||
|
#{subCompanyId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<sql id="extParamSql" databaseId="oracle">
|
||||||
|
<if test="param.workcode != null and param.workcode != ''">
|
||||||
|
AND e.workcode like '%'||#{param.workcode}||'%'
|
||||||
|
</if>
|
||||||
|
<if test="param.departmentIds != null and param.departmentIds.size()>0">
|
||||||
|
AND e.department_id IN
|
||||||
|
<foreach collection="param.departmentIds" open="(" item="departmentId" separator="," close=")">
|
||||||
|
#{departmentId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="param.subCompanyIds != null and param.subCompanyIds.size()>0">
|
||||||
|
AND e.subcompany_id IN
|
||||||
|
<foreach collection="param.subCompanyIds" open="(" item="subCompanyId" separator="," close=")">
|
||||||
|
#{subCompanyId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<sql id="extParamSql" databaseId="sqlserver">
|
||||||
|
<if test="param.workcode != null and param.workcode != ''">
|
||||||
|
AND e.workcode like '%'+#{param.workcode}+'%'
|
||||||
|
</if>
|
||||||
|
<if test="param.departmentIds != null and param.departmentIds.size()>0">
|
||||||
|
AND e.department_id IN
|
||||||
|
<foreach collection="param.departmentIds" open="(" item="departmentId" separator="," close=")">
|
||||||
|
#{departmentId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="param.subCompanyIds != null and param.subCompanyIds.size()>0">
|
||||||
|
AND e.subcompany_id IN
|
||||||
|
<foreach collection="param.subCompanyIds" open="(" item="subCompanyId" separator="," close=")">
|
||||||
|
#{subCompanyId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -525,7 +525,7 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
|
||||||
throw new SalaryRunTimeException("该维度值中无数据!");
|
throw new SalaryRunTimeException("该维度值中无数据!");
|
||||||
}
|
}
|
||||||
// 同一个人放在一起
|
// 同一个人放在一起
|
||||||
listByDimensionValue = listByDimensionValue.stream().sorted(Comparator.comparing(SalaryAcctEmployeePO::getEmployeeId)).collect(Collectors.toList());
|
listByDimensionValue = listByDimensionValue.stream().sorted((a,b)-> b.getSalaryMonth().compareTo(a.getSalaryMonth())).collect(Collectors.toList());
|
||||||
List<SalaryAcctEmployeePO> salaryAcctEmployeePOList = SalaryPageUtil.subList(param.getCurrent(), param.getPageSize(), listByDimensionValue);
|
List<SalaryAcctEmployeePO> salaryAcctEmployeePOList = SalaryPageUtil.subList(param.getCurrent(), param.getPageSize(), listByDimensionValue);
|
||||||
|
|
||||||
// 获取此分页的核算人员
|
// 获取此分页的核算人员
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.engine.salary.service.auth;
|
package com.engine.salary.service.auth;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.engine.common.util.ServiceUtil;
|
import com.engine.common.util.ServiceUtil;
|
||||||
import com.engine.core.impl.Service;
|
import com.engine.core.impl.Service;
|
||||||
import com.engine.hrmelog.entity.dto.LoggerContext;
|
import com.engine.hrmelog.entity.dto.LoggerContext;
|
||||||
|
|
@ -63,6 +64,12 @@ public class AuthRoleServiceImpl extends Service implements AuthRoleService {
|
||||||
public PageInfo<AuthRoleDTO> roleList(AuthRoleListQueryParam param) {
|
public PageInfo<AuthRoleDTO> roleList(AuthRoleListQueryParam param) {
|
||||||
|
|
||||||
List<AuthRolePO> authRolePOS = getAuthRoleMapper().list(param);
|
List<AuthRolePO> authRolePOS = getAuthRoleMapper().list(param);
|
||||||
|
|
||||||
|
String name = param.getName();
|
||||||
|
if(StrUtil.isNotBlank(name)){
|
||||||
|
authRolePOS = authRolePOS.stream().filter(po -> po.getName().contains(name)).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
int total = authRolePOS.size();
|
int total = authRolePOS.size();
|
||||||
|
|
||||||
List<AuthRoleDTO> list = SalaryPageUtil.subList(param.getCurrent(), param.getPageSize(), authRolePOS)
|
List<AuthRoleDTO> list = SalaryPageUtil.subList(param.getCurrent(), param.getPageSize(), authRolePOS)
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
|
||||||
Map<Long, DataCollectionEmployee> collect = employeeByIds.stream().collect(Collectors.toMap(DataCollectionEmployee::getEmployeeId, Function.identity()));
|
Map<Long, DataCollectionEmployee> collect = employeeByIds.stream().collect(Collectors.toMap(DataCollectionEmployee::getEmployeeId, Function.identity()));
|
||||||
list.forEach(item -> {
|
list.forEach(item -> {
|
||||||
Map<String, Object> record = new HashMap<>();
|
Map<String, Object> record = new HashMap<>();
|
||||||
DataCollectionEmployee simpleEmployee = collect.get(item.getEmployeeId());
|
DataCollectionEmployee simpleEmployee = collect.get(item.getEmployeeId()) ==null?new DataCollectionEmployee():collect.get(item.getEmployeeId());
|
||||||
record.put("id", item.getId());
|
record.put("id", item.getId());
|
||||||
record.put("employeeId", item.getEmployeeId());
|
record.put("employeeId", item.getEmployeeId());
|
||||||
record.put("billMonth", item.getBillMonth());
|
record.put("billMonth", item.getBillMonth());
|
||||||
|
|
|
||||||
|
|
@ -485,8 +485,10 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
|
||||||
socialMap = socialMap.entrySet().stream().filter(e -> "9002".equals(e.getKey()))
|
socialMap = socialMap.entrySet().stream().filter(e -> "9002".equals(e.getKey()))
|
||||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||||
Map<String, String> socialComMap = JSON.parseObject(socialSchemePO.getSocialPaymentComBaseString(), new HashMap<String, String>().getClass());
|
Map<String, String> socialComMap = JSON.parseObject(socialSchemePO.getSocialPaymentComBaseString(), new HashMap<String, String>().getClass());
|
||||||
socialComMap = socialComMap.entrySet().stream().filter(e -> "9002".equals(e.getKey()))
|
if(socialComMap !=null){
|
||||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
socialComMap = socialComMap.entrySet().stream().filter(e -> "9002".equals(e.getKey()))
|
||||||
|
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||||
|
}
|
||||||
List<String> socialIds = new ArrayList<>();
|
List<String> socialIds = new ArrayList<>();
|
||||||
socialIds.addAll(socialMap == null ? Collections.emptyList() : socialMap.keySet());
|
socialIds.addAll(socialMap == null ? Collections.emptyList() : socialMap.keySet());
|
||||||
socialIds.addAll(socialComMap == null ? Collections.emptyList() : socialComMap.keySet());
|
socialIds.addAll(socialComMap == null ? Collections.emptyList() : socialComMap.keySet());
|
||||||
|
|
|
||||||
|
|
@ -2473,6 +2473,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
||||||
* @param employeeId
|
* @param employeeId
|
||||||
*/
|
*/
|
||||||
public String update(InsuranceSchemeReqParam updateParam, long employeeId) {
|
public String update(InsuranceSchemeReqParam updateParam, long employeeId) {
|
||||||
|
log.info("福利方案更新参数:{}", updateParam);
|
||||||
//查询是否存在福利方案
|
//查询是否存在福利方案
|
||||||
InsuranceSchemePO insuranceSchemePO = getById(updateParam.getInsuranceScheme().getId());
|
InsuranceSchemePO insuranceSchemePO = getById(updateParam.getInsuranceScheme().getId());
|
||||||
if (Objects.isNull(insuranceSchemePO)) {
|
if (Objects.isNull(insuranceSchemePO)) {
|
||||||
|
|
@ -2506,6 +2507,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
||||||
//更新福利方案主表
|
//更新福利方案主表
|
||||||
InsuranceSchemePO insuranceSchemePO1 = InsuranceSchemeBO.buildInsuranceSchemePO(insuranceSchemePO, updateParam.getInsuranceScheme());
|
InsuranceSchemePO insuranceSchemePO1 = InsuranceSchemeBO.buildInsuranceSchemePO(insuranceSchemePO, updateParam.getInsuranceScheme());
|
||||||
getInsuranceSchemeMapper().update(insuranceSchemePO1);
|
getInsuranceSchemeMapper().update(insuranceSchemePO1);
|
||||||
|
log.info("福利方案更新主表:{}", insuranceSchemePO1);
|
||||||
//记录主表操作日志
|
//记录主表操作日志
|
||||||
loggerContext.setNewValues(insuranceSchemePO1);
|
loggerContext.setNewValues(insuranceSchemePO1);
|
||||||
SalaryElogConfig.siSchemeLoggerTemplate.write(loggerContext);
|
SalaryElogConfig.siSchemeLoggerTemplate.write(loggerContext);
|
||||||
|
|
@ -2529,6 +2531,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
||||||
//更新福利方案明细表 先删后插
|
//更新福利方案明细表 先删后插
|
||||||
getInsuranceSchemeDetailMapper().batchDeleteByPrimaryIds(Collections.singleton(updateParam.getInsuranceScheme().getId()));
|
getInsuranceSchemeDetailMapper().batchDeleteByPrimaryIds(Collections.singleton(updateParam.getInsuranceScheme().getId()));
|
||||||
//更新明细表
|
//更新明细表
|
||||||
|
log.info("福利方案更新明细表:{}", insuranceSchemeDetailPOS);
|
||||||
encryptUtil.encryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class);
|
encryptUtil.encryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class);
|
||||||
insuranceSchemeDetailPOS.forEach(getInsuranceSchemeDetailMapper()::insert);
|
insuranceSchemeDetailPOS.forEach(getInsuranceSchemeDetailMapper()::insert);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import com.engine.salary.encrypt.AESEncryptUtil;
|
||||||
import com.engine.salary.entity.salaryBill.param.SalaryBillGetTokenParam;
|
import com.engine.salary.entity.salaryBill.param.SalaryBillGetTokenParam;
|
||||||
import com.engine.salary.exception.SalaryRunTimeException;
|
import com.engine.salary.exception.SalaryRunTimeException;
|
||||||
import com.engine.salary.util.db.IdGenerator;
|
import com.engine.salary.util.db.IdGenerator;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import weaver.conn.RecordSet;
|
import weaver.conn.RecordSet;
|
||||||
import weaver.general.BaseBean;
|
import weaver.general.BaseBean;
|
||||||
|
|
@ -23,6 +24,7 @@ import java.time.LocalDateTime;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
public class SalaryTokenUtil {
|
public class SalaryTokenUtil {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -126,8 +128,10 @@ public class SalaryTokenUtil {
|
||||||
heads.put("appid", appid);
|
heads.put("appid", appid);
|
||||||
heads.put("cpk", cpk);
|
heads.put("cpk", cpk);
|
||||||
// 调用ECOLOGY系统接口进行注册
|
// 调用ECOLOGY系统接口进行注册
|
||||||
String data = post(httpKey + ip + "/api/ec/dev/auth/regist", null, heads);
|
String url = httpKey + ip + "/api/ec/dev/auth/regist";
|
||||||
|
String data = post(url , null, heads);
|
||||||
Map<String, Object> datas = JSONObject.parseObject(data, new TypeReference<Map<String, Object>>() {});
|
Map<String, Object> datas = JSONObject.parseObject(data, new TypeReference<Map<String, Object>>() {});
|
||||||
|
log.info("GetToken regist url {} ,heads {}, data: {}",url ,heads, data);
|
||||||
// ECOLOGY返回的系统公钥
|
// ECOLOGY返回的系统公钥
|
||||||
String spk = (String) (datas.get("spk"));
|
String spk = (String) (datas.get("spk"));
|
||||||
RSA rsa = new RSA();
|
RSA rsa = new RSA();
|
||||||
|
|
@ -138,16 +142,20 @@ public class SalaryTokenUtil {
|
||||||
sql = String.format("insert into hrsa_salary_sys_conf(id, conf_key, conf_value, title, module, order_weight, delete_type, create_time, update_time) values (%s,'%s','%s','%s','%s',%s,%s,'%s','%s')",
|
sql = String.format("insert into hrsa_salary_sys_conf(id, conf_key, conf_value, title, module, order_weight, delete_type, create_time, update_time) values (%s,'%s','%s','%s','%s',%s,%s,'%s','%s')",
|
||||||
IdGenerator.generate(), "SALARY_TOKEN_SECRET", secret, "token", "basic",0,0,date,date);
|
IdGenerator.generate(), "SALARY_TOKEN_SECRET", secret, "token", "basic",0,0,date,date);
|
||||||
rs.execute(sql);
|
rs.execute(sql);
|
||||||
|
log.info("GetToken regist secret , sql: {}", sql);
|
||||||
// 保存spk
|
// 保存spk
|
||||||
sql = String.format("insert into hrsa_salary_sys_conf(id, conf_key, conf_value, title, module, order_weight, delete_type, create_time, update_time) values (%s,'%s','%s','%s','%s',%s,%s,'%s','%s')",
|
sql = String.format("insert into hrsa_salary_sys_conf(id, conf_key, conf_value, title, module, order_weight, delete_type, create_time, update_time) values (%s,'%s','%s','%s','%s',%s,%s,'%s','%s')",
|
||||||
IdGenerator.generate(), "SALARY_TOKEN_SPK", spk, "spk", "basic",0,0,date,date);
|
IdGenerator.generate(), "SALARY_TOKEN_SPK", spk, "spk", "basic",0,0,date,date);
|
||||||
rs.execute(sql);
|
rs.execute(sql);
|
||||||
|
log.info("GetToken regist spk , sql: {}", sql);
|
||||||
}
|
}
|
||||||
//封装参数到请求头
|
//封装参数到请求头
|
||||||
heads.put("appid", appid);
|
heads.put("appid", appid);
|
||||||
heads.put("secret", secret);
|
heads.put("secret", secret);
|
||||||
//调用ECOLOGY系统接口进行注册
|
//调用ECOLOGY系统接口进行注册
|
||||||
String data2 = post(httpKey + ip + "/api/ec/dev/auth/applytoken", null, heads);
|
String url = httpKey + ip + "/api/ec/dev/auth/applytoken";
|
||||||
|
String data2 = post(url, null, heads);
|
||||||
|
log.info("GetToken=====applytoken url {} ,heads {}, data: {}",url ,heads, data2);
|
||||||
// 通过第一步注册许可时返回spk公钥对userid进行加密生成的密文
|
// 通过第一步注册许可时返回spk公钥对userid进行加密生成的密文
|
||||||
sql= " SELECT conf_value FROM hrsa_salary_sys_conf t WHERE delete_type = 0 AND conf_key = 'SALARY_TOKEN_SPK'";
|
sql= " SELECT conf_value FROM hrsa_salary_sys_conf t WHERE delete_type = 0 AND conf_key = 'SALARY_TOKEN_SPK'";
|
||||||
rs.execute(sql);
|
rs.execute(sql);
|
||||||
|
|
|
||||||
|
|
@ -112,8 +112,14 @@ public class SIExportController {
|
||||||
@Path("/common/export")
|
@Path("/common/export")
|
||||||
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
||||||
public Response exportAccount(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
public Response exportAccount(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||||||
@QueryParam("billMonth") String billMonth,@QueryParam("paymentOrganization") String paymentOrganization) {
|
@QueryParam("billMonth") String billMonth,@QueryParam("paymentOrganization") String paymentOrganization,@QueryParam("departmentIds") String departmentIds,@QueryParam("subCompanyIds") String subCompanyIds,@QueryParam("workcode") String workcode) {
|
||||||
InsuranceExportParam param = InsuranceExportParam.builder().billMonth(billMonth).paymentOrganization(paymentOrganization).build();
|
InsuranceExportParam param = InsuranceExportParam.builder().billMonth(billMonth).paymentOrganization(paymentOrganization).workcode(workcode).build();
|
||||||
|
if(StringUtils.isNotBlank(departmentIds)){
|
||||||
|
param.setDepartmentIds(Arrays.stream(departmentIds.split(",")).map(Long::parseLong).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(subCompanyIds)){
|
||||||
|
param.setSubCompanyIds(Arrays.stream(subCompanyIds.split(",")).map(Long::parseLong).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
User user = HrmUserVarify.getUser(request, response);
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
XSSFWorkbook workbook = getSIExportWrapper(user).exportAccount(PaymentStatusEnum.COMMON.getValue(),param);
|
XSSFWorkbook workbook = getSIExportWrapper(user).exportAccount(PaymentStatusEnum.COMMON.getValue(),param);
|
||||||
String time = LocalDate.now().toString();
|
String time = LocalDate.now().toString();
|
||||||
|
|
|
||||||
|
|
@ -485,7 +485,7 @@ public class SalaryBillController {
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
public String batGrant(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalarySendBatParam queryParam) {
|
public String batGrant(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalarySendBatParam queryParam) {
|
||||||
User user = HrmUserVarify.getUser(request, response);
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
return new ResponseResult<SalarySendBatParam, Map<String, Object>>(user).run(getSalarySendWrapper(user)::batGrant, queryParam);
|
return new ResponseResult<SalarySendBatParam, String>(user).run(getSalarySendWrapper(user)::batGrant, queryParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -499,7 +499,7 @@ public class SalaryBillController {
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
public String batWithdraw(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalarySendBatParam queryParam) {
|
public String batWithdraw(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalarySendBatParam queryParam) {
|
||||||
User user = HrmUserVarify.getUser(request, response);
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
return new ResponseResult<SalarySendBatParam, Map<String, Object>>(user).run(getSalarySendWrapper(user)::batWithdraw, queryParam);
|
return new ResponseResult<SalarySendBatParam, String>(user).run(getSalarySendWrapper(user)::batWithdraw, queryParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -117,9 +117,9 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
||||||
|
|
||||||
list.forEach(dto -> {
|
list.forEach(dto -> {
|
||||||
// 回算过,但是查看的是普通工资单(不能查看详情);回算过,但是查看的是回算工资单(可以发);记录没回算过(可以发)
|
// 回算过,但是查看的是普通工资单(不能查看详情);回算过,但是查看的是回算工资单(可以发);记录没回算过(可以发)
|
||||||
if(Objects.equals(dto.getSalaryAcctRecordType(), NumberUtils.INTEGER_ONE) && Objects.equals(dto.getSalaryAcctType(),NumberUtils.INTEGER_ZERO)){
|
if (Objects.equals(dto.getSalaryAcctRecordType(), NumberUtils.INTEGER_ONE) && Objects.equals(dto.getSalaryAcctType(), NumberUtils.INTEGER_ZERO)) {
|
||||||
dto.setCanSeeDetail(false);
|
dto.setCanSeeDetail(false);
|
||||||
}else{
|
} else {
|
||||||
dto.setCanSeeDetail(true);
|
dto.setCanSeeDetail(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -142,7 +142,7 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
||||||
e.setTemplate(NumberUtils.INTEGER_ONE.equals(e.getSalaryAcctType()) ? salaryTemplatePO.getReplenishName() : salaryTemplatePO.getName());
|
e.setTemplate(NumberUtils.INTEGER_ONE.equals(e.getSalaryAcctType()) ? salaryTemplatePO.getReplenishName() : salaryTemplatePO.getName());
|
||||||
e.setTemplateId(salaryTemplatePO.getId());
|
e.setTemplateId(salaryTemplatePO.getId());
|
||||||
if ((salaryTemplatePO.getAckFeedbackStatus() != null && salaryTemplatePO.getAckFeedbackStatus() == 1) ||
|
if ((salaryTemplatePO.getAckFeedbackStatus() != null && salaryTemplatePO.getAckFeedbackStatus() == 1) ||
|
||||||
(salaryTemplatePO.getFeedbackStatus() != null && salaryTemplatePO.getFeedbackStatus() == 1) ) {
|
(salaryTemplatePO.getFeedbackStatus() != null && salaryTemplatePO.getFeedbackStatus() == 1)) {
|
||||||
e.setAckFeedbackStatus(1);
|
e.setAckFeedbackStatus(1);
|
||||||
} else {
|
} else {
|
||||||
e.setAckFeedbackStatus(0);
|
e.setAckFeedbackStatus(0);
|
||||||
|
|
@ -688,6 +688,7 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发送短信验证码
|
* 发送短信验证码
|
||||||
|
*
|
||||||
* @param param 短信验证码发送参数
|
* @param param 短信验证码发送参数
|
||||||
*/
|
*/
|
||||||
public void sendMobileCode(SMSCodeSendParam param) {
|
public void sendMobileCode(SMSCodeSendParam param) {
|
||||||
|
|
@ -696,6 +697,7 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验短信验证码
|
* 校验短信验证码
|
||||||
|
*
|
||||||
* @param param
|
* @param param
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -706,7 +708,7 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
||||||
public PayrollCheckTypeEnum payrollCheckType() {
|
public PayrollCheckTypeEnum payrollCheckType() {
|
||||||
SalarySysConfPO conf = getSalarySysConfService(user).getOneByCode(SalarySysConstant.SALARY_PAYROLL_CHECK_TYPE);
|
SalarySysConfPO conf = getSalarySysConfService(user).getOneByCode(SalarySysConstant.SALARY_PAYROLL_CHECK_TYPE);
|
||||||
|
|
||||||
if(conf == null){
|
if (conf == null) {
|
||||||
return PayrollCheckTypeEnum.PWD;
|
return PayrollCheckTypeEnum.PWD;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -714,14 +716,14 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
||||||
}
|
}
|
||||||
|
|
||||||
public void confirmSalaryBill(Long salaryInfoId) {
|
public void confirmSalaryBill(Long salaryInfoId) {
|
||||||
if(ObjectUtil.isNull(salaryInfoId)){
|
if (ObjectUtil.isNull(salaryInfoId)) {
|
||||||
throw new SalaryRunTimeException("工资单id不能为空!");
|
throw new SalaryRunTimeException("工资单id不能为空!");
|
||||||
}
|
}
|
||||||
getSalaryBillService(user).confirmSalaryBill(salaryInfoId);
|
getSalaryBillService(user).confirmSalaryBill(salaryInfoId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void feedBackSalaryBill(Long salaryInfoId) {
|
public void feedBackSalaryBill(Long salaryInfoId) {
|
||||||
if(ObjectUtil.isNull(salaryInfoId)){
|
if (ObjectUtil.isNull(salaryInfoId)) {
|
||||||
throw new SalaryRunTimeException("工资单id不能为空!");
|
throw new SalaryRunTimeException("工资单id不能为空!");
|
||||||
}
|
}
|
||||||
getSalaryBillService(user).feedBackSalaryBill(salaryInfoId);
|
getSalaryBillService(user).feedBackSalaryBill(salaryInfoId);
|
||||||
|
|
@ -740,26 +742,48 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void batGrant(SalarySendBatParam param) {
|
public String batGrant(SalarySendBatParam param) {
|
||||||
List<Long> salarySendIds = param.getSalarySendIds();
|
List<Long> salarySendIds = param.getSalarySendIds();
|
||||||
|
|
||||||
|
int successCount = 0;
|
||||||
|
int failCount = 0;
|
||||||
|
String failMsg = "";
|
||||||
for (int i = 0; i < salarySendIds.size(); i++) {
|
for (int i = 0; i < salarySendIds.size(); i++) {
|
||||||
Long sendId = salarySendIds.get(i);
|
try {
|
||||||
SalarySendGrantParam grantParam = SalarySendGrantParam.builder()
|
Long sendId = salarySendIds.get(i);
|
||||||
.salarySendId(sendId)
|
SalarySendGrantParam grantParam = SalarySendGrantParam.builder()
|
||||||
.build();
|
.salarySendId(sendId)
|
||||||
grant(grantParam);
|
.build();
|
||||||
|
grant(grantParam);
|
||||||
|
successCount++;
|
||||||
|
} catch (Exception e) {
|
||||||
|
failCount++;
|
||||||
|
failMsg = failMsg + "第" + (i + 1) + "个发放失败!失败原因:" + e.getMessage() + "\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return String.format("成功:" + successCount + "个,失败:" + failCount + "个%s", failCount == 0 ? "" : ",失败原因:" + failMsg);
|
||||||
}
|
}
|
||||||
public void batWithdraw(SalarySendBatParam param) {
|
|
||||||
|
public String batWithdraw(SalarySendBatParam param) {
|
||||||
List<Long> salarySendIds = param.getSalarySendIds();
|
List<Long> salarySendIds = param.getSalarySendIds();
|
||||||
|
|
||||||
|
int successCount = 0;
|
||||||
|
int failCount = 0;
|
||||||
|
String failMsg = "";
|
||||||
for (int i = 0; i < salarySendIds.size(); i++) {
|
for (int i = 0; i < salarySendIds.size(); i++) {
|
||||||
Long sendId = salarySendIds.get(i);
|
try {
|
||||||
SalarySendWithdrawParam grantParam = SalarySendWithdrawParam.builder()
|
Long sendId = salarySendIds.get(i);
|
||||||
.salarySendId(sendId)
|
SalarySendWithdrawParam grantParam = SalarySendWithdrawParam.builder()
|
||||||
.build();
|
.salarySendId(sendId)
|
||||||
withdraw(grantParam);
|
.build();
|
||||||
|
withdraw(grantParam);
|
||||||
|
} catch (Exception e) {
|
||||||
|
failCount++;
|
||||||
|
failMsg = failMsg + "第" + (i + 1) + "个撤回失败!失败原因:" + e.getMessage() + "\n";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
return String.format("成功:" + successCount + "个,失败:" + failCount + "个%s", failCount == 0 ? "" : ",失败原因:" + failMsg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue