Merge remote-tracking branch 'remotes/origin/develop' into feature/addSiArchivesBaseInfo_sy
This commit is contained in:
commit
b2284d6669
|
|
@ -1,14 +1,23 @@
|
|||
package com.engine.salary.encrypt;
|
||||
|
||||
import com.engine.salary.sys.constant.SalarySysConstant;
|
||||
import com.engine.salary.sys.entity.po.SalarySysConfPO;
|
||||
import com.engine.salary.sys.enums.OpenEnum;
|
||||
import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.general.AES;
|
||||
import weaver.general.BaseBean;
|
||||
|
||||
/**
|
||||
* 此AES加密工具类仅用于关联应用设置中是否开启加密的应用使用
|
||||
* 如另有需要,请重写工具类
|
||||
*/
|
||||
public class AESEncryptUtil {
|
||||
|
||||
static BaseBean bb = new BaseBean();
|
||||
|
||||
static String aesEncryptScrect = bb.getPropValue("hrmSalary", "AESEncryptScrect");
|
||||
static SalarySysConfServiceImpl salarySysConfService = new SalarySysConfServiceImpl();
|
||||
|
||||
/**
|
||||
* AES加密
|
||||
|
|
@ -17,12 +26,23 @@ public class AESEncryptUtil {
|
|||
* @return 加密数据
|
||||
*/
|
||||
public static String encrypt(String source) {
|
||||
if (StringUtils.isNotBlank(source)) {
|
||||
return AES.encrypt(source, aesEncryptScrect);
|
||||
String isEncrypt = getSalarySysConfigValue();
|
||||
//防止初始化老数据时二次加密
|
||||
if (StringUtils.isNotBlank(source) && OpenEnum.OPEN.getValue().equals(isEncrypt) && !source.startsWith(SalarySysConstant.PRE_SIGN_ENCRYPT)&& source.length() != 32) {
|
||||
return SalarySysConstant.PRE_SIGN_ENCRYPT + AES.encrypt(source, aesEncryptScrect);
|
||||
}
|
||||
return source;
|
||||
}
|
||||
|
||||
/**
|
||||
* 应用设置是否开启加密
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private static String getSalarySysConfigValue() {
|
||||
return salarySysConfService.getOneByCode(SalarySysConstant.OPEN_APPLICATION_ENCRYPT).getConfValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* AES解密
|
||||
*
|
||||
|
|
@ -31,10 +51,28 @@ public class AESEncryptUtil {
|
|||
*/
|
||||
public static String decrypt(String encryptStr) {
|
||||
if (StringUtils.isNotBlank(encryptStr)) {
|
||||
if (encryptStr.startsWith(SalarySysConstant.PRE_SIGN_ENCRYPT)) {
|
||||
encryptStr = encryptStr.substring(4, encryptStr.length());
|
||||
}
|
||||
return AES.decrypt(encryptStr, aesEncryptScrect);
|
||||
}
|
||||
return encryptStr;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 用于关闭加密设置后AES解密
|
||||
*
|
||||
* @param encryptStr 加密字符串
|
||||
* @return 解密字符串
|
||||
*/
|
||||
public static String closeEncryptSetting(String encryptStr) {
|
||||
if (StringUtils.isNotBlank(encryptStr) && encryptStr.startsWith(SalarySysConstant.PRE_SIGN_ENCRYPT)) {
|
||||
encryptStr = encryptStr.substring(4, encryptStr.length());
|
||||
return AES.decrypt(encryptStr, aesEncryptScrect);
|
||||
}
|
||||
if (StringUtils.isNotBlank(encryptStr) && encryptStr.length() == 32) {
|
||||
return AES.decrypt(encryptStr, aesEncryptScrect);
|
||||
}
|
||||
return encryptStr;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,13 @@ public class SalarySobRangeSaveParam {
|
|||
private TargetTypeEnum targetType;
|
||||
|
||||
//对象id
|
||||
@DataCheck(require = true, message = "对象不能为空")
|
||||
//@DataCheck(require = true, message = "对象不能为空")
|
||||
private Long targetId;
|
||||
|
||||
// 安全级别最小值
|
||||
private Long minSecLevel;
|
||||
|
||||
// 安全级别最大值
|
||||
private Long maxSecLevel;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,9 @@ public enum TargetTypeEnum implements BaseEnum<Integer> {
|
|||
DEPT(2, "部门", 86185),
|
||||
SUBCOMPANY(3, "分部", 107369),
|
||||
POSITION(4, "岗位", 90633),
|
||||
ALL(5, "所有人", 107729);
|
||||
ALL(5, "所有人", 107729),
|
||||
|
||||
SECLEVE(6, "安全级别", 90382),;
|
||||
// EXT_EMPLOYEE(100, "外部人员", 0);
|
||||
private int value;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.engine.salary.entity.salaryarchive.dto.SalaryItemAdjustRecordListDTO;
|
|||
import com.engine.salary.entity.salaryarchive.param.SalaryArchiveItemQueryParam;
|
||||
import com.engine.salary.entity.salaryarchive.param.SalaryItemAdjustRecordQueryParam;
|
||||
import com.engine.salary.entity.salaryarchive.po.SalaryArchiveItemPO;
|
||||
import com.engine.salary.entity.siarchives.po.InsuranceArchivesOtherSchemePO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -94,4 +95,6 @@ public interface SalaryArchiveItemMapper {
|
|||
void deleteBySalaryArchiveId(@Param("salaryArchiveIds") List<Long> salaryArchiveIds);
|
||||
|
||||
void batchDeleteHistoryData(SalaryArchiveItemPO build);
|
||||
|
||||
int batchUpdate(@Param("collection") List<SalaryArchiveItemPO> pos);
|
||||
}
|
||||
|
|
@ -220,9 +220,10 @@
|
|||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertIgnoreNull" parameterType="com.engine.salary.entity.salaryarchive.po.SalaryArchiveItemPO" databaseId="oracle"
|
||||
<insert id="insertIgnoreNull" parameterType="com.engine.salary.entity.salaryarchive.po.SalaryArchiveItemPO"
|
||||
databaseId="oracle"
|
||||
>
|
||||
<selectKey keyProperty="id" resultType="long" order="AFTER">
|
||||
<selectKey keyProperty="id" resultType="long" order="AFTER">
|
||||
select hrsa_salary_archive_item_id.currval from dual
|
||||
</selectKey>
|
||||
INSERT INTO hrsa_salary_archive_item
|
||||
|
|
@ -406,8 +407,6 @@
|
|||
</delete>
|
||||
|
||||
|
||||
|
||||
|
||||
<insert id="batchInsert">
|
||||
INSERT INTO hrsa_salary_archive_item (
|
||||
salary_archive_id,
|
||||
|
|
@ -480,22 +479,22 @@
|
|||
</insert>
|
||||
<insert id="batchInsert" databaseId="sqlserver">
|
||||
<foreach collection="collection" item="item" separator=";">
|
||||
INSERT INTO hrsa_salary_archive_item (
|
||||
salary_archive_id,
|
||||
employee_id,
|
||||
effective_time,
|
||||
adjust_reason,
|
||||
salary_item_id,
|
||||
item_value,
|
||||
description,
|
||||
operator,
|
||||
operate_time,
|
||||
create_time,
|
||||
update_time,
|
||||
creator,
|
||||
tenant_key
|
||||
)
|
||||
VALUES
|
||||
INSERT INTO hrsa_salary_archive_item (
|
||||
salary_archive_id,
|
||||
employee_id,
|
||||
effective_time,
|
||||
adjust_reason,
|
||||
salary_item_id,
|
||||
item_value,
|
||||
description,
|
||||
operator,
|
||||
operate_time,
|
||||
create_time,
|
||||
update_time,
|
||||
creator,
|
||||
tenant_key
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
#{item.salaryArchiveId},
|
||||
#{item.employeeId},
|
||||
|
|
@ -532,7 +531,8 @@
|
|||
</sql>
|
||||
|
||||
|
||||
<select id="salaryItemAdjustRecordList" resultType="com.engine.salary.entity.salaryarchive.dto.SalaryItemAdjustRecordListDTO">
|
||||
<select id="salaryItemAdjustRecordList"
|
||||
resultType="com.engine.salary.entity.salaryarchive.dto.SalaryItemAdjustRecordListDTO">
|
||||
SELECT
|
||||
<include refid="salaryItemAdjustRecordColumn"/>
|
||||
FROM hrsa_salary_archive_item t1
|
||||
|
|
@ -554,7 +554,7 @@
|
|||
AND
|
||||
(
|
||||
e.lastname like CONCAT('%',#{param.keyword},'%')
|
||||
OR d.departmentname like CONCAT('%',#{param.keyword},'%')
|
||||
OR d.departmentname like CONCAT('%',#{param.keyword},'%')
|
||||
OR t2.name like CONCAT('%',#{param.keyword},'%')
|
||||
)
|
||||
</if>
|
||||
|
|
@ -564,14 +564,15 @@
|
|||
<include refid="paramSql"/>
|
||||
ORDER BY t1.effective_time DESC,t1.id DESC
|
||||
</select>
|
||||
<select id="salaryItemAdjustRecordList" resultType="com.engine.salary.entity.salaryarchive.dto.SalaryItemAdjustRecordListDTO" databaseId="oracle">
|
||||
<select id="salaryItemAdjustRecordList"
|
||||
resultType="com.engine.salary.entity.salaryarchive.dto.SalaryItemAdjustRecordListDTO" databaseId="oracle">
|
||||
SELECT
|
||||
|
||||
t1.id,
|
||||
t1.employee_id,
|
||||
e.lastname as username,
|
||||
e.status AS employeeStatus,
|
||||
d.departmentname AS departmentName,
|
||||
d.departmentname AS departmentName,
|
||||
t1.effective_time,
|
||||
t1.adjust_reason,
|
||||
t2.name AS adjust_item,
|
||||
|
|
@ -601,7 +602,7 @@
|
|||
AND
|
||||
(
|
||||
e.lastname like '%'||#{param.keyword}||'%'
|
||||
OR d.departmentname like '%'||#{param.keyword}||'%'
|
||||
OR d.departmentname like '%'||#{param.keyword}||'%'
|
||||
OR t2.name like '%'||#{param.keyword}||'%'
|
||||
)
|
||||
</if>
|
||||
|
|
@ -655,7 +656,7 @@
|
|||
</if>
|
||||
|
||||
<if test="param.operateTime != null and param.operateTime.size() == 2">
|
||||
AND (t1.operate_time BETWEEN #{param.operateTime[0]}||' 00:00:00' AND #{param.operateTime[1]}||' 23:59:59' )
|
||||
AND (t1.operate_time BETWEEN #{param.operateTime[0]}||' 00:00:00' AND #{param.operateTime[1]}||' 23:59:59' )
|
||||
</if>
|
||||
|
||||
<if test="param.operatorIds != null and param.operatorIds.size()>0">
|
||||
|
|
@ -671,14 +672,16 @@
|
|||
|
||||
ORDER BY t1.effective_time DESC,t1.id DESC
|
||||
</select>
|
||||
<select id="salaryItemAdjustRecordList" resultType="com.engine.salary.entity.salaryarchive.dto.SalaryItemAdjustRecordListDTO" databaseId="sqlserver">
|
||||
<select id="salaryItemAdjustRecordList"
|
||||
resultType="com.engine.salary.entity.salaryarchive.dto.SalaryItemAdjustRecordListDTO"
|
||||
databaseId="sqlserver">
|
||||
SELECT
|
||||
|
||||
t1.id,
|
||||
t1.employee_id,
|
||||
e.lastname as username,
|
||||
e.status AS employeeStatus,
|
||||
d.departmentname AS departmentName,
|
||||
d.departmentname AS departmentName,
|
||||
t1.effective_time,
|
||||
t1.adjust_reason,
|
||||
t2.name AS adjust_item,
|
||||
|
|
@ -708,7 +711,7 @@
|
|||
AND
|
||||
(
|
||||
e.lastname like '%'+#{param.keyword}+'%'
|
||||
OR d.departmentname like '%'+#{param.keyword}+'%'
|
||||
OR d.departmentname like '%'+#{param.keyword}+'%'
|
||||
OR t2.name like '%'+#{param.keyword}+'%'
|
||||
)
|
||||
</if>
|
||||
|
|
@ -762,7 +765,7 @@
|
|||
</if>
|
||||
|
||||
<if test="param.operateTime != null and param.operateTime.size() == 2">
|
||||
AND (t1.operate_time BETWEEN #{param.operateTime[0]}+' 00:00:00' AND #{param.operateTime[1]}+' 23:59:59' )
|
||||
AND (t1.operate_time BETWEEN #{param.operateTime[0]}+' 00:00:00' AND #{param.operateTime[1]}+' 23:59:59' )
|
||||
</if>
|
||||
|
||||
<if test="param.operatorIds != null and param.operatorIds.size()>0">
|
||||
|
|
@ -843,7 +846,8 @@
|
|||
</if>
|
||||
<!-- 操作日期 -->
|
||||
<if test="param.operateTime != null and param.operateTime.size() == 2">
|
||||
AND (t1.operate_time BETWEEN CONCAT(#{param.operateTime[0]},' 00:00:00') AND CONCAT(#{param.operateTime[1]},' 23:59:59'))
|
||||
AND (t1.operate_time BETWEEN CONCAT(#{param.operateTime[0]},' 00:00:00') AND
|
||||
CONCAT(#{param.operateTime[1]},' 23:59:59'))
|
||||
</if>
|
||||
<!-- 操作人 -->
|
||||
<if test="param.operatorIds != null and param.operatorIds.size()>0">
|
||||
|
|
@ -904,7 +908,7 @@
|
|||
</if>
|
||||
|
||||
<if test="param.operateTime != null and param.operateTime.size() == 2">
|
||||
AND (t1.operate_time BETWEEN #{param.operateTime[0]}||' 00:00:00' AND #{param.operateTime[1]}||' 23:59:59' )
|
||||
AND (t1.operate_time BETWEEN #{param.operateTime[0]}||' 00:00:00' AND #{param.operateTime[1]}||' 23:59:59' )
|
||||
</if>
|
||||
|
||||
<if test="param.operatorIds != null and param.operatorIds.size()>0">
|
||||
|
|
@ -965,7 +969,7 @@
|
|||
</if>
|
||||
|
||||
<if test="param.operateTime != null and param.operateTime.size() == 2">
|
||||
AND (t1.operate_time BETWEEN #{param.operateTime[0]}+' 00:00:00' AND #{param.operateTime[1]}+' 23:59:59' )
|
||||
AND (t1.operate_time BETWEEN #{param.operateTime[0]}+' 00:00:00' AND #{param.operateTime[1]}+' 23:59:59' )
|
||||
</if>
|
||||
|
||||
<if test="param.operatorIds != null and param.operatorIds.size()>0">
|
||||
|
|
@ -1088,4 +1092,28 @@
|
|||
</foreach>
|
||||
</update>
|
||||
|
||||
<update id="batchUpdate" parameterType="java.util.List">
|
||||
update hrsa_salary_archive_item
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="delete_type =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.deleteType!=null">
|
||||
when id=#{item.id} then #{item.deleteType}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="item_value =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.itemValue!=null">
|
||||
when id=#{item.id} then #{item.itemValue}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
</trim>
|
||||
where
|
||||
id in
|
||||
<foreach collection="collection" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
@ -51,4 +51,6 @@ public interface ExcelAcctResultMapper {
|
|||
* @return 返回集合,没有返回空List
|
||||
*/
|
||||
List<ExcelAcctResultPO> listSome(ExcelAcctResultPO excelAcctResult);
|
||||
|
||||
int batchUpdate(@Param("collection") List<ExcelAcctResultPO> excelAcctResultPos);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -191,4 +191,29 @@
|
|||
</if>
|
||||
ORDER BY id DESC
|
||||
</select>
|
||||
|
||||
<update id="batchUpdate" parameterType="java.util.List">
|
||||
update hrsa_excel_acct_result
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="result_value =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.resultValue!=null">
|
||||
when id=#{item.id} then #{item.resultValue}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="delete_type =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.deleteType!=null">
|
||||
when id=#{item.id} then #{item.deleteType}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
</trim>
|
||||
where
|
||||
id in
|
||||
<foreach collection="collection" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.mapper.salaryacct;
|
||||
|
||||
import com.engine.salary.entity.report.po.SalaryAcctResultReportPO;
|
||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctResultPO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
|
@ -110,5 +111,10 @@ public interface SalaryAcctResultMapper {
|
|||
* @param ids
|
||||
*/
|
||||
void deleteByIds(@Param("ids") Collection<Long> ids);
|
||||
|
||||
|
||||
/**
|
||||
* 批量修改
|
||||
* @param pos
|
||||
*/
|
||||
int batchUpdate(@Param("collection") List<SalaryAcctResultPO> pos);
|
||||
}
|
||||
|
|
@ -534,4 +534,28 @@
|
|||
</foreach>
|
||||
</delete>
|
||||
|
||||
<update id="batchUpdate" parameterType="java.util.List">
|
||||
update hrsa_salary_acct_result
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="result_value =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.resultValue!=null">
|
||||
when id=#{item.id} then #{item.resultValue}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="delete_type =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.deleteType!=null">
|
||||
when id=#{item.id} then #{item.deleteType}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
</trim>
|
||||
where
|
||||
id in
|
||||
<foreach collection="collection" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
@ -288,8 +288,8 @@
|
|||
<if test="targetId != null">
|
||||
target_id=#{targetId},
|
||||
</if>
|
||||
<if test="employeeStatus != null">
|
||||
employee_status=#{employeeStatus},
|
||||
<if test="employeeStatuses != null">
|
||||
employee_statuses=#{employeeStatuses},
|
||||
</if>
|
||||
<if test="includeType != null">
|
||||
include_type=#{includeType},
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.engine.salary.mapper.siaccount;
|
|||
|
||||
import com.engine.salary.entity.siaccount.param.InsuranceAccountBatchParam;
|
||||
import com.engine.salary.entity.siaccount.po.InsuranceAccountBatchPO;
|
||||
import com.engine.salary.entity.siarchives.po.InsuranceArchivesOtherSchemePO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -59,4 +60,8 @@ public interface InsuranceAccountBatchMapper {
|
|||
|
||||
|
||||
List<InsuranceAccountBatchPO> listByTimeRange(@Param("minDate") String minDate, @Param("maxDate") String maxDate);
|
||||
|
||||
List<InsuranceAccountBatchPO> listAll();
|
||||
|
||||
int batchUpdate(@Param("collection") List<InsuranceAccountBatchPO> pos);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -240,5 +240,49 @@
|
|||
</if>
|
||||
</update>
|
||||
|
||||
<select id="listAll" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM hrsa_bill_batch t
|
||||
WHERE delete_type = 0
|
||||
</select>
|
||||
|
||||
<update id="batchUpdate" parameterType="java.util.List">
|
||||
update hrsa_bill_batch
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="other_pay =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.otherPay!=null">
|
||||
when id=#{item.id} then #{item.otherPay}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="social_pay =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.socialPay!=null">
|
||||
when id=#{item.id} then #{item.socialPay}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="fund_pay =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.fundPay!=null">
|
||||
when id=#{item.id} then #{item.fundPay}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="delete_type =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.deleteType!=null">
|
||||
when id=#{item.id} then #{item.deleteType}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
</trim>
|
||||
where
|
||||
id in
|
||||
<foreach collection="collection" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
@ -5,6 +5,7 @@ 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 com.engine.salary.entity.siarchives.po.InsuranceArchivesOtherSchemePO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Collection;
|
||||
|
|
@ -148,4 +149,7 @@ public interface InsuranceAccountDetailMapper {
|
|||
*/
|
||||
void updateByEmployeeIdAndBillMonth(InsuranceAccountDetailPO po);
|
||||
|
||||
List<InsuranceAccountDetailPO> listAll();
|
||||
|
||||
int batchUpdate(@Param("collection") List<InsuranceAccountDetailPO> pos);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,6 +98,54 @@
|
|||
, t.tenant_key
|
||||
, t.payment_organization
|
||||
</sql>
|
||||
<sql id="baseColumnsNoJoin">
|
||||
t
|
||||
.
|
||||
id
|
||||
, t.employee_id
|
||||
, t.bill_month
|
||||
, t.bill_status
|
||||
, t.payment_status
|
||||
, t.supplementary_month
|
||||
, t.supplementary_projects
|
||||
, t.resource_from
|
||||
, t.social_pay_org
|
||||
, t.social_account
|
||||
, t.fund_pay_org
|
||||
, t.fund_account
|
||||
, t.supplement_fund_account
|
||||
, t.other_pay_org
|
||||
, t.social_scheme_id
|
||||
, t.social_payment_base_string
|
||||
, t.fund_scheme_id
|
||||
, t.fund_payment_base_string
|
||||
, t.other_scheme_id
|
||||
, t.other_payment_base_string
|
||||
, t.social_per_json
|
||||
, t.social_per_sum
|
||||
, t.fund_per_json
|
||||
, t.fund_per_sum
|
||||
, t.other_per_json
|
||||
, t.other_per_sum
|
||||
, t.per_sum
|
||||
, t.social_com_json
|
||||
, t.social_com_sum
|
||||
, t.fund_com_json
|
||||
, t.fund_com_sum
|
||||
, t.other_com_json
|
||||
, t.other_com_sum
|
||||
, t.com_sum
|
||||
, t.social_sum
|
||||
, t.fund_sum
|
||||
, t.other_sum
|
||||
, t.total
|
||||
, t.creator
|
||||
, t.delete_type
|
||||
, t.create_time
|
||||
, t.update_time
|
||||
, t.tenant_key
|
||||
, t.payment_organization
|
||||
</sql>
|
||||
|
||||
<sql id="paramSqlCommon">
|
||||
<if test="param.billMonth != null and param.billMonth != ''">
|
||||
|
|
@ -155,7 +203,7 @@
|
|||
<include refid="paramSql"/>
|
||||
<!-- 排序 -->
|
||||
<if test="param.orderRule != null">
|
||||
ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc}
|
||||
ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
|
@ -182,7 +230,7 @@
|
|||
FROM
|
||||
hrsa_bill_detail t
|
||||
WHERE t.delete_type = 0
|
||||
-- AND t.payment_status = 0
|
||||
-- AND t.payment_status = 0
|
||||
AND t.bill_month = #{billMonth}
|
||||
AND t.payment_organization = #{paymentOrganization}
|
||||
<if test="employeeIds != null and employeeIds.size()>0">
|
||||
|
|
@ -834,7 +882,8 @@
|
|||
)a
|
||||
</select>
|
||||
|
||||
<update id="updateByEmployeeIdAndBillMonth" parameterType="com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO">
|
||||
<update id="updateByEmployeeIdAndBillMonth"
|
||||
parameterType="com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO">
|
||||
UPDATE hrsa_bill_detail
|
||||
<set>
|
||||
|
||||
|
|
@ -857,13 +906,177 @@
|
|||
<if test="null != otherSum and '' != otherSum">other_sum = #{otherSum},</if>
|
||||
<if test="null != total and '' != total">total = #{total},</if>
|
||||
<if test="null != updateTime">update_time = #{updateTime},</if>
|
||||
<if test="null != supplementaryMonth and '' != supplementaryMonth">supplementary_month = #{supplementaryMonth},</if>
|
||||
<if test="null != supplementaryMonth and '' != supplementaryMonth">supplementary_month =
|
||||
#{supplementaryMonth},
|
||||
</if>
|
||||
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="listAll" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="baseColumnsNoJoin"/>
|
||||
FROM hrsa_bill_detail t
|
||||
WHERE delete_type = 0
|
||||
</select>
|
||||
|
||||
|
||||
<update id="batchUpdate" parameterType="java.util.List">
|
||||
update hrsa_bill_detail
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="social_payment_base_string =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.socialPaymentBaseString!=null">
|
||||
when id=#{item.id} then #{item.socialPaymentBaseString}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="fund_payment_base_string =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.fundPaymentBaseString!=null">
|
||||
when id=#{item.id} then #{item.fundPaymentBaseString}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="social_per_json =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.socialPerJson!=null">
|
||||
when id=#{item.id} then #{item.socialPerJson}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="social_per_sum =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.socialPerSum!=null">
|
||||
when id=#{item.id} then #{item.socialPerSum}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="fund_per_json =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.fundPerJson!=null">
|
||||
when id=#{item.id} then #{item.fundPerJson}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="fund_per_sum =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.fundPerSum!=null">
|
||||
when id=#{item.id} then #{item.fundPerSum}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="other_per_json =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.otherPerJson!=null">
|
||||
when id=#{item.id} then #{item.otherPerJson}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="other_per_sum =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.otherPerSum!=null">
|
||||
when id=#{item.id} then #{item.otherPerSum}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="per_sum =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.perSum!=null">
|
||||
when id=#{item.id} then #{item.perSum}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="social_com_json =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.socialComJson!=null">
|
||||
when id=#{item.id} then #{item.socialComJson}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="social_com_sum =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.socialComSum!=null">
|
||||
when id=#{item.id} then #{item.socialComSum}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="fund_com_json =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.fundComJson!=null">
|
||||
when id=#{item.id} then #{item.fundComJson}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="fund_com_sum =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.fundComSum!=null">
|
||||
when id=#{item.id} then #{item.fundComSum}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="other_com_json =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.otherComJson!=null">
|
||||
when id=#{item.id} then #{item.otherComJson}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="other_com_sum =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.otherComSum!=null">
|
||||
when id=#{item.id} then #{item.otherComSum}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="com_sum =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.comSum!=null">
|
||||
when id=#{item.id} then #{item.comSum}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="social_sum =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.socialSum!=null">
|
||||
when id=#{item.id} then #{item.socialSum}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="fund_sum =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.fundSum!=null">
|
||||
when id=#{item.id} then #{item.fundSum}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="other_sum =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.otherSum!=null">
|
||||
when id=#{item.id} then #{item.otherSum}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="total =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.total!=null">
|
||||
when id=#{item.id} then #{item.total}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="delete_type =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.deleteType!=null">
|
||||
when id=#{item.id} then #{item.deleteType}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
</trim>
|
||||
where
|
||||
id in
|
||||
<foreach collection="collection" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
package com.engine.salary.mapper.siarchives;
|
||||
|
||||
import com.engine.salary.entity.siarchives.po.InsuranceArchivesFundSchemePO;
|
||||
import com.engine.salary.entity.siarchives.po.InsuranceArchivesSocialSchemePO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Collection;
|
||||
|
|
@ -33,4 +34,8 @@ public interface FundSchemeMapper {
|
|||
*/
|
||||
void batchSave(@Param("fundSchemePOS") List<InsuranceArchivesFundSchemePO> singletonList);
|
||||
|
||||
List<InsuranceArchivesFundSchemePO> listAll();
|
||||
|
||||
int batchUpdate(@Param("collection") List<InsuranceArchivesFundSchemePO> pos);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -194,7 +194,35 @@
|
|||
</insert>
|
||||
|
||||
|
||||
<select id="listAll" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM hrsa_fund_archives t
|
||||
WHERE delete_type = 0
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<update id="batchUpdate" parameterType="java.util.List">
|
||||
update hrsa_fund_archives
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="fund_payment_base_string =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.fundPaymentBaseString!=null">
|
||||
when id=#{item.id} then #{item.fundPaymentBaseString}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="delete_type =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.deleteType!=null">
|
||||
when id=#{item.id} then #{item.deleteType}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
</trim>
|
||||
where
|
||||
id in
|
||||
<foreach collection="collection" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.mapper.siarchives;
|
||||
|
||||
import com.engine.salary.entity.siarchives.po.InsuranceArchivesFundSchemePO;
|
||||
import com.engine.salary.entity.siarchives.po.InsuranceArchivesOtherSchemePO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
|
@ -33,5 +34,7 @@ public interface OtherSchemeMapper {
|
|||
*/
|
||||
void batchSave(@Param("otherSchemePOS") List<InsuranceArchivesOtherSchemePO> singletonList);
|
||||
|
||||
List<InsuranceArchivesOtherSchemePO> listAll();
|
||||
|
||||
int batchUpdate(@Param("collection") List<InsuranceArchivesOtherSchemePO> pos);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -178,5 +178,42 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
|
||||
<select id="listAll" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM hrsa_other_archives t
|
||||
WHERE delete_type = 0
|
||||
</select>
|
||||
|
||||
<update id="batchUpdate" parameterType="java.util.List">
|
||||
update hrsa_other_archives
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="employee_id =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.employeeId!=null">
|
||||
when id=#{item.id} then #{item.employeeId}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="other_payment_base_string =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.otherPaymentBaseString!=null">
|
||||
when id=#{item.id} then #{item.otherPaymentBaseString}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="delete_type =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.deleteType!=null">
|
||||
when id=#{item.id} then #{item.deleteType}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
</trim>
|
||||
where
|
||||
id in
|
||||
<foreach collection="collection" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
@ -3,6 +3,7 @@ package com.engine.salary.mapper.siarchives;
|
|||
import com.engine.salary.entity.siarchives.param.InsuranceArchivesListParam;
|
||||
import com.engine.salary.entity.siarchives.po.InsuranceArchivesEmployeePO;
|
||||
import com.engine.salary.entity.siarchives.po.InsuranceArchivesSocialSchemePO;
|
||||
import com.engine.salary.entity.sischeme.po.InsuranceSchemeDetailPO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Collection;
|
||||
|
|
@ -58,5 +59,7 @@ public interface SocialSchemeMapper {
|
|||
*/
|
||||
List<InsuranceArchivesSocialSchemePO> getSocialByPaymentOrganization(@Param("paymentOrganization")Long paymentOrganization);
|
||||
|
||||
List<InsuranceArchivesSocialSchemePO> listAll();
|
||||
|
||||
int batchUpdate(@Param("collection") List<InsuranceArchivesSocialSchemePO> insuranceArchivesSocialSchemePos);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -526,4 +526,35 @@
|
|||
AND payment_organization = #{paymentOrganization}
|
||||
</select>
|
||||
|
||||
<select id="listAll" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM hrsa_social_archives t
|
||||
WHERE delete_type = 0
|
||||
</select>
|
||||
|
||||
<update id="batchUpdate" parameterType="java.util.List">
|
||||
update hrsa_social_archives
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="social_payment_base_string =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.socialPaymentBaseString!=null">
|
||||
when id=#{item.id} then #{item.socialPaymentBaseString}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="delete_type =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.deleteType!=null">
|
||||
when id=#{item.id} then #{item.deleteType}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
</trim>
|
||||
where
|
||||
id in
|
||||
<foreach collection="collection" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
@ -71,4 +71,7 @@ public interface InsuranceSchemeDetailMapper {
|
|||
|
||||
void deleteByIds(@Param("ids")Collection<Long> ids);
|
||||
|
||||
List<InsuranceSchemeDetailPO> listAll();
|
||||
|
||||
int batchUpdate(@Param("collection") List<InsuranceSchemeDetailPO> insuranceSchemeDetailPos);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -234,7 +234,51 @@
|
|||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
||||
</update>
|
||||
|
||||
<select id="listAll" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM hrsa_scheme_detail t
|
||||
WHERE delete_type = 0
|
||||
</select>
|
||||
|
||||
<update id="batchUpdate" parameterType="java.util.List">
|
||||
update hrsa_scheme_detail
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="upper_limit =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.upperLimit!=null">
|
||||
when id=#{item.id} then #{item.upperLimit}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="fixed_cost =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.fixedCost!=null">
|
||||
when id=#{item.id} then #{item.fixedCost}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="lower_limit =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.lowerLimit!=null">
|
||||
when id=#{item.id} then #{item.lowerLimit}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="delete_type =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.deleteType!=null">
|
||||
when id=#{item.id} then #{item.deleteType}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
</trim>
|
||||
where
|
||||
id in
|
||||
<foreach collection="collection" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
@ -66,4 +66,8 @@ public interface TaxDeclarationDetailMapper {
|
|||
* @param taxDeclarationIds
|
||||
*/
|
||||
void deleteByTaxDeclarationIds(@Param("taxDeclarationIds") Collection<Long> taxDeclarationIds);
|
||||
|
||||
List<TaxDeclarationDetailPO> listAll();
|
||||
|
||||
int batchUpdate(@Param("collection") List<TaxDeclarationDetailPO> taxDeclarationDetailPos);
|
||||
}
|
||||
|
|
@ -162,4 +162,37 @@
|
|||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="listAll" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM hrsa_tax_declaration_detail t
|
||||
WHERE delete_type = 0
|
||||
</select>
|
||||
|
||||
|
||||
<update id="batchUpdate" parameterType="java.util.List">
|
||||
update hrsa_tax_declaration_detail
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="field_value =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.fieldValue!=null">
|
||||
when id=#{item.id} then #{item.fieldValue}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="delete_type =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.deleteType!=null">
|
||||
when id=#{item.id} then #{item.deleteType}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
</trim>
|
||||
where
|
||||
id in
|
||||
<foreach collection="collection" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
@ -479,6 +479,8 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
// 新增考勤值数据
|
||||
if (CollectionUtils.isNotEmpty(values)) {
|
||||
log.info("考勤数据:{}", values);
|
||||
//去除空值
|
||||
values = values.stream().filter(po->StringUtils.isNotBlank(po.getDataValue())).collect(Collectors.toList());
|
||||
dataValueBiz.insertData(values);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,4 +31,17 @@ public class SalarySysConstant {
|
|||
* 核算合计功能开启标识
|
||||
*/
|
||||
public static final String OPEN_ACCT_RESULT_SUM = "OPEN_ACCT_RESULT_SUM";
|
||||
|
||||
/**
|
||||
* 应用设置是否开启加密
|
||||
*/
|
||||
public static final String OPEN_APPLICATION_ENCRYPT = "OPEN_APPLICATION_ENCRYPT";
|
||||
/**
|
||||
* 加密后前缀
|
||||
*/
|
||||
public static final String PRE_SIGN_ENCRYPT = "AES_";
|
||||
/**
|
||||
* 锁的key
|
||||
*/
|
||||
public static final String AES_ENCRYPT_IN_PROGRESS = "AES_ENCRYPT_IN_PROGRESS";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,5 +34,9 @@ public class AppSettingSaveParam {
|
|||
*/
|
||||
private String openAcctResultSum;
|
||||
|
||||
/**
|
||||
* 是否开启加密设置
|
||||
*/
|
||||
private String isOpenEncrypt;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,5 +34,10 @@ public class AppSettingVO {
|
|||
*/
|
||||
private String openAcctResultSum;
|
||||
|
||||
/**
|
||||
* 是否开启加密设置
|
||||
*/
|
||||
private String isOpenEncrypt;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import com.engine.salary.sys.entity.vo.OrderRuleVO;
|
|||
import com.engine.salary.sys.enums.TaxDeclarationFunctionEnum;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 薪酬系统配置类
|
||||
|
|
@ -59,4 +60,10 @@ public interface SalarySysConfService {
|
|||
*/
|
||||
AppSettingVO appSetting();
|
||||
|
||||
/**
|
||||
* 保存加密设置
|
||||
* @param appSettingSaveParam
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> saveEncryptSetting(AppSettingSaveParam appSettingSaveParam);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,25 +1,63 @@
|
|||
package com.engine.salary.sys.service.impl;
|
||||
|
||||
import com.api.formmode.mybatis.util.SqlProxyHandle;
|
||||
import com.cloudstore.dev.api.util.Util_DataCache;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.encrypt.AESEncryptUtil;
|
||||
import com.engine.salary.entity.datacollection.AddUpDeduction;
|
||||
import com.engine.salary.entity.datacollection.AddUpSituation;
|
||||
import com.engine.salary.entity.datacollection.po.OtherDeductionPO;
|
||||
import com.engine.salary.entity.report.po.SalaryAcctResultReportPO;
|
||||
import com.engine.salary.entity.salaryacct.po.ExcelAcctResultPO;
|
||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctResultPO;
|
||||
import com.engine.salary.entity.salaryarchive.po.SalaryArchiveItemPO;
|
||||
import com.engine.salary.entity.siaccount.po.InsuranceAccountBatchPO;
|
||||
import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO;
|
||||
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.sischeme.po.InsuranceSchemeDetailPO;
|
||||
import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationDetailPO;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.mapper.archive.SalaryArchiveItemMapper;
|
||||
import com.engine.salary.mapper.datacollection.AddUpDeductionMapper;
|
||||
import com.engine.salary.mapper.datacollection.AddUpSituationMapper;
|
||||
import com.engine.salary.mapper.datacollection.OtherDeductionMapper;
|
||||
import com.engine.salary.mapper.report.SalaryAcctResultReportMapper;
|
||||
import com.engine.salary.mapper.salaryacct.ExcelAcctResultMapper;
|
||||
import com.engine.salary.mapper.salaryacct.SalaryAcctResultMapper;
|
||||
import com.engine.salary.mapper.siaccount.InsuranceAccountBatchMapper;
|
||||
import com.engine.salary.mapper.siaccount.InsuranceAccountDetailMapper;
|
||||
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.sischeme.InsuranceSchemeDetailMapper;
|
||||
import com.engine.salary.mapper.sys.SalarySysConfMapper;
|
||||
import com.engine.salary.mapper.taxdeclaration.TaxDeclarationDetailMapper;
|
||||
import com.engine.salary.sys.entity.param.AppSettingSaveParam;
|
||||
import com.engine.salary.sys.entity.param.OrderRuleParam;
|
||||
import com.engine.salary.sys.entity.po.SalarySysConfPO;
|
||||
import com.engine.salary.sys.entity.vo.AppSettingVO;
|
||||
import com.engine.salary.sys.entity.vo.OrderRuleVO;
|
||||
import com.engine.salary.sys.enums.AscOrDescEnum;
|
||||
import com.engine.salary.sys.enums.MatchEmployeeModeEnum;
|
||||
import com.engine.salary.sys.enums.OrderRuleEnum;
|
||||
import com.engine.salary.sys.enums.TaxDeclarationFunctionEnum;
|
||||
import com.engine.salary.sys.enums.*;
|
||||
import com.engine.salary.sys.service.SalarySysConfService;
|
||||
import com.engine.salary.util.JsonUtil;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import dm.jdbc.util.IdGenerator;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.general.BaseBean;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.*;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
import static com.engine.salary.sys.constant.SalarySysConstant.*;
|
||||
import static java.util.concurrent.Executors.*;
|
||||
|
||||
/**
|
||||
* 薪酬系统配置类
|
||||
|
|
@ -35,6 +73,59 @@ public class SalarySysConfServiceImpl extends Service implements SalarySysConfSe
|
|||
return SqlProxyHandle.getProxy(SalarySysConfMapper.class);
|
||||
}
|
||||
|
||||
private static final ExecutorService fixedThreadPool = newFixedThreadPool(13);
|
||||
|
||||
private SalaryAcctResultMapper getSalaryAcctResultMapper() {
|
||||
return MapperProxyFactory.getProxy(SalaryAcctResultMapper.class);
|
||||
}
|
||||
|
||||
private ExcelAcctResultMapper getExcelAcctResultMapper() {
|
||||
return MapperProxyFactory.getProxy(ExcelAcctResultMapper.class);
|
||||
}
|
||||
|
||||
private TaxDeclarationDetailMapper getTaxDeclarationDetailMapper() {
|
||||
return MapperProxyFactory.getProxy(TaxDeclarationDetailMapper.class);
|
||||
}
|
||||
|
||||
private InsuranceSchemeDetailMapper getInsuranceSchemeDetailMapper() {
|
||||
return MapperProxyFactory.getProxy(InsuranceSchemeDetailMapper.class);
|
||||
}
|
||||
|
||||
private SocialSchemeMapper getSocialSchemeMapper() {
|
||||
return MapperProxyFactory.getProxy(SocialSchemeMapper.class);
|
||||
}
|
||||
|
||||
private FundSchemeMapper getFundSchemeMapper() {
|
||||
return MapperProxyFactory.getProxy(FundSchemeMapper.class);
|
||||
}
|
||||
|
||||
private OtherSchemeMapper getOtherSchemeMapper() {
|
||||
return MapperProxyFactory.getProxy(OtherSchemeMapper.class);
|
||||
}
|
||||
|
||||
private InsuranceAccountBatchMapper getInsuranceAccountBatchMapper() {
|
||||
return MapperProxyFactory.getProxy(InsuranceAccountBatchMapper.class);
|
||||
}
|
||||
|
||||
private InsuranceAccountDetailMapper getInsuranceAccountDetailMapper() {
|
||||
return MapperProxyFactory.getProxy(InsuranceAccountDetailMapper.class);
|
||||
}
|
||||
|
||||
private SalaryArchiveItemMapper getSalaryArchiveItemMapper() {
|
||||
return MapperProxyFactory.getProxy(SalaryArchiveItemMapper.class);
|
||||
}
|
||||
|
||||
private AddUpDeductionMapper getAddUpDeductionMapper() {
|
||||
return MapperProxyFactory.getProxy(AddUpDeductionMapper.class);
|
||||
}
|
||||
|
||||
private OtherDeductionMapper getOtherDeductionMapper() {
|
||||
return MapperProxyFactory.getProxy(OtherDeductionMapper.class);
|
||||
}
|
||||
|
||||
private AddUpSituationMapper getAddUpSituationMapper() {
|
||||
return MapperProxyFactory.getProxy(AddUpSituationMapper.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作是否需要申报功能
|
||||
|
|
@ -42,6 +133,7 @@ public class SalarySysConfServiceImpl extends Service implements SalarySysConfSe
|
|||
* @param flag 开启 0/关闭 1/重新开启 2
|
||||
* @return 执行结果
|
||||
*/
|
||||
@Override
|
||||
public boolean operateTaxDeclarationFunction(TaxDeclarationFunctionEnum flag) {
|
||||
Date date = new Date();
|
||||
SalarySysConfPO taxDeclarationFunction = getSalarySysConfMapper().getOneByCode("taxDeclarationFunction");
|
||||
|
|
@ -197,47 +289,70 @@ public class SalarySysConfServiceImpl extends Service implements SalarySysConfSe
|
|||
throw new SalaryRunTimeException("无效规则!");
|
||||
}
|
||||
|
||||
SalarySysConfPO po = getOneByCode(MATCH_EMPLOYEE_MODE);
|
||||
if (po == null) {
|
||||
SalarySysConfPO build = SalarySysConfPO.builder()
|
||||
.id(IdGenerator.generate())
|
||||
.confKey(MATCH_EMPLOYEE_MODE)
|
||||
.confValue(rule)
|
||||
.title("定位人员规则")
|
||||
.orderWeight(0)
|
||||
.module("basic")
|
||||
.updateTime(new Date())
|
||||
.createTime(new Date())
|
||||
.deleteType(0)
|
||||
.build();
|
||||
getSalarySysConfMapper().insertIgnoreNull(build);
|
||||
} else {
|
||||
po.setConfValue(rule);
|
||||
po.setUpdateTime(new Date());
|
||||
getSalarySysConfMapper().updateIgnoreNull(po);
|
||||
}
|
||||
saveSettingByType(rule, MATCH_EMPLOYEE_MODE, "定位人员规则", "basic");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveAppSetting(AppSettingSaveParam param) {
|
||||
|
||||
String openAcctResultSum = param.getOpenAcctResultSum();
|
||||
SalarySysConfPO po = getOneByCode(OPEN_ACCT_RESULT_SUM);
|
||||
saveSettingByType(openAcctResultSum, OPEN_ACCT_RESULT_SUM, "开启核算结果合并", "app");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> saveEncryptSetting(AppSettingSaveParam param) {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
boolean flag = false;
|
||||
resultMap.put("isSuccess", false);
|
||||
try {
|
||||
if (ObjectUtils.isNotEmpty(Util_DataCache.getObjVal(AES_ENCRYPT_IN_PROGRESS))) {
|
||||
resultMap.put("msg", "数据库处理上次操作中,请稍后操作。");
|
||||
return resultMap;
|
||||
}
|
||||
Util_DataCache.setObjVal(AES_ENCRYPT_IN_PROGRESS, 1);
|
||||
String isOpenEncrypt = param.getIsOpenEncrypt();
|
||||
if (StringUtils.isNotEmpty(isOpenEncrypt)) {
|
||||
saveSettingByType(isOpenEncrypt, OPEN_APPLICATION_ENCRYPT, "开启加密设置", "app");
|
||||
//对数据库数据加解密
|
||||
flag = encryptOrDecryptDbWithAsync(isOpenEncrypt);
|
||||
}
|
||||
Util_DataCache.clearVal(AES_ENCRYPT_IN_PROGRESS);
|
||||
resultMap.put("isSuccess", flag);
|
||||
return resultMap;
|
||||
} catch (Exception e) {
|
||||
Util_DataCache.clearVal(AES_ENCRYPT_IN_PROGRESS);
|
||||
resultMap.put("isSuccess", flag);
|
||||
resultMap.put("msg", "系统异常请联系管理员");
|
||||
return resultMap;
|
||||
} finally {
|
||||
Util_DataCache.clearVal(AES_ENCRYPT_IN_PROGRESS);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存或者修改应用设置
|
||||
*
|
||||
* @param confValue
|
||||
* @param confKey
|
||||
* @param title
|
||||
* @param app
|
||||
*/
|
||||
private void saveSettingByType(String confValue, String confKey, String title, String app) {
|
||||
SalarySysConfPO po = getOneByCode(confKey);
|
||||
if (po == null) {
|
||||
SalarySysConfPO build = SalarySysConfPO.builder()
|
||||
.id(IdGenerator.generate())
|
||||
.confKey(OPEN_ACCT_RESULT_SUM)
|
||||
.confValue(openAcctResultSum)
|
||||
.title("开启核算结果合并")
|
||||
.confKey(confKey)
|
||||
.confValue(confValue)
|
||||
.title(title)
|
||||
.orderWeight(0)
|
||||
.module("app")
|
||||
.module(app)
|
||||
.updateTime(new Date())
|
||||
.createTime(new Date())
|
||||
.deleteType(0)
|
||||
.build();
|
||||
getSalarySysConfMapper().insertIgnoreNull(build);
|
||||
} else {
|
||||
po.setConfValue(openAcctResultSum);
|
||||
po.setConfValue(confValue);
|
||||
po.setUpdateTime(new Date());
|
||||
getSalarySysConfMapper().updateIgnoreNull(po);
|
||||
}
|
||||
|
|
@ -246,11 +361,389 @@ public class SalarySysConfServiceImpl extends Service implements SalarySysConfSe
|
|||
@Override
|
||||
public AppSettingVO appSetting() {
|
||||
AppSettingVO appSettingVO = AppSettingVO.builder().build();
|
||||
SalarySysConfPO po = getOneByCode(OPEN_ACCT_RESULT_SUM);
|
||||
if (po != null) {
|
||||
appSettingVO.setOpenAcctResultSum(po.getConfValue());
|
||||
//返回按钮状态
|
||||
SalarySysConfPO condition = new SalarySysConfPO();
|
||||
condition.setDeleteType(0);
|
||||
List<SalarySysConfPO> salarySysConfPOS = getSalarySysConfMapper().listSome(condition);
|
||||
if (CollectionUtils.isNotEmpty(salarySysConfPOS)) {
|
||||
salarySysConfPOS.forEach(salarySysConfPO -> {
|
||||
switch (salarySysConfPO.getConfKey()) {
|
||||
case OPEN_ACCT_RESULT_SUM:
|
||||
appSettingVO.setOpenAcctResultSum(salarySysConfPO.getConfValue());
|
||||
break;
|
||||
case OPEN_APPLICATION_ENCRYPT:
|
||||
appSettingVO.setIsOpenEncrypt(salarySysConfPO.getConfValue());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
//默认加密开启
|
||||
if (StringUtils.isEmpty(appSettingVO.getIsOpenEncrypt())) {
|
||||
appSettingVO.setIsOpenEncrypt("1");
|
||||
}
|
||||
return appSettingVO;
|
||||
}
|
||||
|
||||
private Boolean encryptOrDecryptDbWithAsync(String isOpenEncrypt) {
|
||||
BaseBean baseBean = new BaseBean();
|
||||
baseBean.writeLog("应用设置加解密数据开始");
|
||||
//多线程批量更新需要加密的表
|
||||
try {
|
||||
Future<Integer> submit = fixedThreadPool.submit(() -> {
|
||||
try {
|
||||
List<SalaryAcctResultPO> salaryAcctResultPos = getSalaryAcctResultMapper().listAll();
|
||||
if (CollectionUtils.isNotEmpty(salaryAcctResultPos)) {
|
||||
salaryAcctResultPos.forEach(po -> {
|
||||
if (OpenEnum.OFF.getValue().equals(isOpenEncrypt)) {
|
||||
po.setResultValue(AESEncryptUtil.closeEncryptSetting(po.getResultValue()));
|
||||
} else {
|
||||
po.setResultValue(AESEncryptUtil.encrypt(po.getResultValue()));
|
||||
}
|
||||
});
|
||||
int flag = getSalaryAcctResultMapper().batchUpdate(salaryAcctResultPos);
|
||||
baseBean.writeLog("hrsa_salary_acct_result:" + flag);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
baseBean.writeLog("hrsa_salary_acct_result:" + e.getMessage());
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
});
|
||||
Future<Integer> submit1 = fixedThreadPool.submit(() -> {
|
||||
try {
|
||||
List<ExcelAcctResultPO> excelAcctResultPos = getExcelAcctResultMapper().listSome(new ExcelAcctResultPO());
|
||||
if (CollectionUtils.isNotEmpty(excelAcctResultPos)) {
|
||||
excelAcctResultPos.forEach(po -> {
|
||||
if (OpenEnum.OFF.getValue().equals(isOpenEncrypt)) {
|
||||
po.setResultValue(AESEncryptUtil.closeEncryptSetting(po.getResultValue()));
|
||||
} else {
|
||||
po.setResultValue(AESEncryptUtil.encrypt(po.getResultValue()));
|
||||
}
|
||||
});
|
||||
int flag = getExcelAcctResultMapper().batchUpdate(excelAcctResultPos);
|
||||
baseBean.writeLog("hrsa_excel_acct_result:", flag);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
baseBean.writeLog("hrsa_excel_acct_result:", e.getMessage());
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
});
|
||||
Future<Integer> submit2 = fixedThreadPool.submit(() -> {
|
||||
try {
|
||||
List<TaxDeclarationDetailPO> taxDeclarationDetailPos = getTaxDeclarationDetailMapper().listAll();
|
||||
if (CollectionUtils.isNotEmpty(taxDeclarationDetailPos)) {
|
||||
taxDeclarationDetailPos.forEach(po -> {
|
||||
if (OpenEnum.OFF.getValue().equals(isOpenEncrypt)) {
|
||||
po.setFieldValue(AESEncryptUtil.closeEncryptSetting(po.getFieldValue()));
|
||||
} else {
|
||||
po.setFieldValue(AESEncryptUtil.encrypt(po.getFieldValue()));
|
||||
}
|
||||
});
|
||||
int flag = getTaxDeclarationDetailMapper().batchUpdate(taxDeclarationDetailPos);
|
||||
baseBean.writeLog("hrsa_tax_declaration_detail:" + flag);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
baseBean.writeLog("hrsa_tax_declaration_detail:", e.getMessage());
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
});
|
||||
Future<Integer> submit3 = fixedThreadPool.submit(() -> {
|
||||
try {
|
||||
List<InsuranceSchemeDetailPO> insuranceSchemeDetailPos = getInsuranceSchemeDetailMapper().listAll();
|
||||
if (CollectionUtils.isNotEmpty(insuranceSchemeDetailPos)) {
|
||||
insuranceSchemeDetailPos.forEach(po -> {
|
||||
if (OpenEnum.OFF.getValue().equals(isOpenEncrypt)) {
|
||||
po.setUpperLimit(AESEncryptUtil.closeEncryptSetting(po.getUpperLimit()));
|
||||
po.setFixedCost(AESEncryptUtil.closeEncryptSetting(po.getFixedCost()));
|
||||
po.setLowerLimit(AESEncryptUtil.closeEncryptSetting(po.getLowerLimit()));
|
||||
} else {
|
||||
po.setUpperLimit(AESEncryptUtil.encrypt(po.getUpperLimit()));
|
||||
po.setFixedCost(AESEncryptUtil.encrypt(po.getFixedCost()));
|
||||
po.setLowerLimit(AESEncryptUtil.encrypt(po.getLowerLimit()));
|
||||
}
|
||||
});
|
||||
int flag = getInsuranceSchemeDetailMapper().batchUpdate(insuranceSchemeDetailPos);
|
||||
baseBean.writeLog("hrsa_scheme_detail:" + flag);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
baseBean.writeLog("hrsa_scheme_detail:", e.getMessage());
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
});
|
||||
Future<Integer> submit4 = fixedThreadPool.submit(() -> {
|
||||
try {
|
||||
List<InsuranceArchivesSocialSchemePO> insuranceArchivesSocialSchemePos = getSocialSchemeMapper().listAll();
|
||||
if (CollectionUtils.isNotEmpty(insuranceArchivesSocialSchemePos)) {
|
||||
insuranceArchivesSocialSchemePos.forEach(po -> {
|
||||
if (OpenEnum.OFF.getValue().equals(isOpenEncrypt)) {
|
||||
po.setSocialPaymentBaseString(AESEncryptUtil.closeEncryptSetting(po.getSocialPaymentBaseString()));
|
||||
} else {
|
||||
po.setSocialPaymentBaseString(AESEncryptUtil.encrypt(po.getSocialPaymentBaseString()));
|
||||
}
|
||||
});
|
||||
int flag = getSocialSchemeMapper().batchUpdate(insuranceArchivesSocialSchemePos);
|
||||
baseBean.writeLog("hrsa_social_archives:" + flag);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
baseBean.writeLog("hrsa_social_archives:", e.getMessage());
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
});
|
||||
Future<Integer> submit5 = fixedThreadPool.submit(() -> {
|
||||
try {
|
||||
List<InsuranceArchivesFundSchemePO> insuranceArchivesFundSchemePos = getFundSchemeMapper().listAll();
|
||||
if (CollectionUtils.isNotEmpty(insuranceArchivesFundSchemePos)) {
|
||||
insuranceArchivesFundSchemePos.forEach(po -> {
|
||||
if (OpenEnum.OFF.getValue().equals(isOpenEncrypt)) {
|
||||
po.setFundPaymentBaseString(AESEncryptUtil.closeEncryptSetting(po.getFundPaymentBaseString()));
|
||||
} else {
|
||||
po.setFundPaymentBaseString(AESEncryptUtil.encrypt(po.getFundPaymentBaseString()));
|
||||
}
|
||||
});
|
||||
int flag = getFundSchemeMapper().batchUpdate(insuranceArchivesFundSchemePos);
|
||||
baseBean.writeLog("hrsa_fund_archives:" + flag);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
baseBean.writeLog("hrsa_fund_archives:", e.getMessage());
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
});
|
||||
Future<Integer> submit6 = fixedThreadPool.submit(() -> {
|
||||
try {
|
||||
List<InsuranceArchivesOtherSchemePO> insuranceArchivesOtherSchemePos = getOtherSchemeMapper().listAll();
|
||||
if (CollectionUtils.isNotEmpty(insuranceArchivesOtherSchemePos)) {
|
||||
insuranceArchivesOtherSchemePos.forEach(po -> {
|
||||
if (OpenEnum.OFF.getValue().equals(isOpenEncrypt)) {
|
||||
po.setOtherPaymentBaseString(AESEncryptUtil.closeEncryptSetting(po.getOtherPaymentBaseString()));
|
||||
} else {
|
||||
po.setOtherPaymentBaseString(AESEncryptUtil.encrypt(po.getOtherPaymentBaseString()));
|
||||
}
|
||||
});
|
||||
int flag = getOtherSchemeMapper().batchUpdate(insuranceArchivesOtherSchemePos);
|
||||
baseBean.writeLog("hrsa_other_archives:" + flag);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
baseBean.writeLog("hrsa_other_archives:", e.getMessage());
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
});
|
||||
Future<Integer> submit7 = fixedThreadPool.submit(() -> {
|
||||
try {
|
||||
List<InsuranceAccountBatchPO> insuranceAccountBatchPos = getInsuranceAccountBatchMapper().listAll();
|
||||
if (CollectionUtils.isNotEmpty(insuranceAccountBatchPos)) {
|
||||
insuranceAccountBatchPos.forEach(po -> {
|
||||
if (OpenEnum.OFF.getValue().equals(isOpenEncrypt)) {
|
||||
po.setOtherPay(AESEncryptUtil.closeEncryptSetting(po.getOtherPay()));
|
||||
po.setSocialPay(AESEncryptUtil.closeEncryptSetting(po.getSocialPay()));
|
||||
po.setFundPay(AESEncryptUtil.closeEncryptSetting(po.getFundPay()));
|
||||
} else {
|
||||
po.setOtherPay(AESEncryptUtil.encrypt(po.getOtherPay()));
|
||||
po.setSocialPay(AESEncryptUtil.encrypt(po.getSocialPay()));
|
||||
po.setFundPay(AESEncryptUtil.encrypt(po.getFundPay()));
|
||||
}
|
||||
});
|
||||
int flag = getInsuranceAccountBatchMapper().batchUpdate(insuranceAccountBatchPos);
|
||||
baseBean.writeLog("hrsa_bill_batch:" + flag);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
baseBean.writeLog("hrsa_bill_batch:", e.getMessage());
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
});
|
||||
Future<Integer> submit8 = fixedThreadPool.submit(() -> {
|
||||
try {
|
||||
List<InsuranceAccountDetailPO> insuranceAccountDetailPos = getInsuranceAccountDetailMapper().listAll();
|
||||
if (CollectionUtils.isNotEmpty(insuranceAccountDetailPos)) {
|
||||
insuranceAccountDetailPos.forEach(po -> {
|
||||
if (OpenEnum.OFF.getValue().equals(isOpenEncrypt)) {
|
||||
po.setSocialPaymentBaseString(AESEncryptUtil.closeEncryptSetting(po.getSocialPaymentBaseString()));
|
||||
po.setFundPaymentBaseString(AESEncryptUtil.closeEncryptSetting(po.getFundPaymentBaseString()));
|
||||
po.setOtherPaymentBaseString(AESEncryptUtil.closeEncryptSetting(po.getOtherPaymentBaseString()));
|
||||
po.setSocialPerJson(AESEncryptUtil.closeEncryptSetting(po.getSocialComJson()));
|
||||
po.setSocialComSum(AESEncryptUtil.closeEncryptSetting(po.getSocialComSum()));
|
||||
po.setFundPerJson(AESEncryptUtil.closeEncryptSetting(po.getFundPerJson()));
|
||||
po.setFundPerSum(AESEncryptUtil.closeEncryptSetting(po.getFundPerSum()));
|
||||
po.setOtherPerJson(AESEncryptUtil.closeEncryptSetting(po.getOtherPerJson()));
|
||||
po.setOtherPerSum(AESEncryptUtil.closeEncryptSetting(po.getOtherPerSum()));
|
||||
po.setPerSum(AESEncryptUtil.closeEncryptSetting(po.getPerSum()));
|
||||
po.setSocialComJson(AESEncryptUtil.closeEncryptSetting(po.getSocialComJson()));
|
||||
po.setSocialComSum(AESEncryptUtil.closeEncryptSetting(po.getSocialComSum()));
|
||||
po.setFundComJson(AESEncryptUtil.closeEncryptSetting(po.getFundComJson()));
|
||||
po.setFundComSum(AESEncryptUtil.closeEncryptSetting(po.getFundComSum()));
|
||||
po.setOtherComJson(AESEncryptUtil.closeEncryptSetting(po.getOtherComJson()));
|
||||
po.setOtherComSum(AESEncryptUtil.closeEncryptSetting(po.getOtherComSum()));
|
||||
po.setComSum(AESEncryptUtil.closeEncryptSetting(po.getComSum()));
|
||||
po.setSocialSum(AESEncryptUtil.closeEncryptSetting(po.getSocialSum()));
|
||||
po.setFundSum(AESEncryptUtil.closeEncryptSetting(po.getFundSum()));
|
||||
po.setOtherSum(AESEncryptUtil.closeEncryptSetting(po.getOtherSum()));
|
||||
po.setTotal(AESEncryptUtil.closeEncryptSetting(po.getTotal()));
|
||||
} else {
|
||||
po.setSocialPaymentBaseString(AESEncryptUtil.encrypt(po.getSocialPaymentBaseString()));
|
||||
po.setFundPaymentBaseString(AESEncryptUtil.encrypt(po.getFundPaymentBaseString()));
|
||||
po.setOtherPaymentBaseString(AESEncryptUtil.encrypt(po.getOtherPaymentBaseString()));
|
||||
po.setSocialPerJson(AESEncryptUtil.encrypt(po.getSocialComJson()));
|
||||
po.setSocialComSum(AESEncryptUtil.encrypt(po.getSocialComSum()));
|
||||
po.setFundPerJson(AESEncryptUtil.encrypt(po.getFundPerJson()));
|
||||
po.setFundPerSum(AESEncryptUtil.encrypt(po.getFundPerSum()));
|
||||
po.setOtherPerJson(AESEncryptUtil.encrypt(po.getOtherPerJson()));
|
||||
po.setOtherPerSum(AESEncryptUtil.encrypt(po.getOtherPerSum()));
|
||||
po.setPerSum(AESEncryptUtil.encrypt(po.getPerSum()));
|
||||
po.setSocialComJson(AESEncryptUtil.encrypt(po.getSocialComJson()));
|
||||
po.setSocialComSum(AESEncryptUtil.encrypt(po.getSocialComSum()));
|
||||
po.setFundComJson(AESEncryptUtil.encrypt(po.getFundComJson()));
|
||||
po.setFundComSum(AESEncryptUtil.encrypt(po.getFundComSum()));
|
||||
po.setOtherComJson(AESEncryptUtil.encrypt(po.getOtherComJson()));
|
||||
po.setOtherComSum(AESEncryptUtil.encrypt(po.getOtherComSum()));
|
||||
po.setComSum(AESEncryptUtil.encrypt(po.getComSum()));
|
||||
po.setSocialSum(AESEncryptUtil.encrypt(po.getSocialSum()));
|
||||
po.setFundSum(AESEncryptUtil.encrypt(po.getFundSum()));
|
||||
po.setOtherSum(AESEncryptUtil.encrypt(po.getOtherSum()));
|
||||
po.setTotal(AESEncryptUtil.encrypt(po.getTotal()));
|
||||
}
|
||||
});
|
||||
int flag = getInsuranceAccountDetailMapper().batchUpdate(insuranceAccountDetailPos);
|
||||
baseBean.writeLog("hrsa_bill_detail:" + flag);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
baseBean.writeLog("hrsa_bill_detail:", e.getMessage());
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
});
|
||||
Future<Integer> submit9 = fixedThreadPool.submit(() -> {
|
||||
try {
|
||||
List<SalaryArchiveItemPO> salaryArchiveItemPos = getSalaryArchiveItemMapper().listAll();
|
||||
if (CollectionUtils.isNotEmpty(salaryArchiveItemPos)) {
|
||||
salaryArchiveItemPos.forEach(po -> {
|
||||
if (OpenEnum.OFF.getValue().equals(isOpenEncrypt)) {
|
||||
po.setItemValue(AESEncryptUtil.closeEncryptSetting(po.getItemValue()));
|
||||
} else {
|
||||
po.setItemValue(AESEncryptUtil.encrypt(po.getItemValue()));
|
||||
}
|
||||
});
|
||||
int flag = getSalaryArchiveItemMapper().batchUpdate(salaryArchiveItemPos);
|
||||
baseBean.writeLog("hrsa_salary_archive_item:" + flag);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
baseBean.writeLog("hrsa_salary_archive_item:", e.getMessage());
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
});
|
||||
Future<Integer> submit10 = fixedThreadPool.submit(() -> {
|
||||
try {
|
||||
List<AddUpDeduction> addUpDeductions = getAddUpDeductionMapper().listAll();
|
||||
if (CollectionUtils.isNotEmpty(addUpDeductions)) {
|
||||
addUpDeductions.forEach(po -> {
|
||||
if (OpenEnum.OFF.getValue().equals(isOpenEncrypt)) {
|
||||
po.setAddUpChildEducation(AESEncryptUtil.closeEncryptSetting(po.getAddUpChildEducation()));
|
||||
po.setAddUpContinuingEducation(AESEncryptUtil.closeEncryptSetting(po.getAddUpContinuingEducation()));
|
||||
po.setAddUpHousingLoanInterest(AESEncryptUtil.closeEncryptSetting(po.getAddUpHousingLoanInterest()));
|
||||
po.setAddUpHousingRent(AESEncryptUtil.closeEncryptSetting(po.getAddUpHousingRent()));
|
||||
po.setAddUpSupportElderly(AESEncryptUtil.closeEncryptSetting(po.getAddUpSupportElderly()));
|
||||
} else {
|
||||
po.setAddUpChildEducation(AESEncryptUtil.encrypt(po.getAddUpChildEducation()));
|
||||
po.setAddUpContinuingEducation(AESEncryptUtil.encrypt(po.getAddUpContinuingEducation()));
|
||||
po.setAddUpHousingLoanInterest(AESEncryptUtil.encrypt(po.getAddUpHousingLoanInterest()));
|
||||
po.setAddUpHousingRent(AESEncryptUtil.encrypt(po.getAddUpHousingRent()));
|
||||
po.setAddUpSupportElderly(AESEncryptUtil.encrypt(po.getAddUpSupportElderly()));
|
||||
}
|
||||
});
|
||||
getAddUpDeductionMapper().updateData(addUpDeductions);
|
||||
baseBean.writeLog("hrsa_add_up_deduction");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
baseBean.writeLog("hrsa_add_up_deduction:", e.getMessage());
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
});
|
||||
Future<Integer> submit11 = fixedThreadPool.submit(() -> {
|
||||
try {
|
||||
List<OtherDeductionPO> otherDeductionPos = getOtherDeductionMapper().listSome(new OtherDeductionPO());
|
||||
if (CollectionUtils.isNotEmpty(otherDeductionPos)) {
|
||||
otherDeductionPos.forEach(po -> {
|
||||
if (OpenEnum.OFF.getValue().equals(isOpenEncrypt)) {
|
||||
po.setBusinessHealthyInsurance(AESEncryptUtil.closeEncryptSetting(po.getBusinessHealthyInsurance()));
|
||||
po.setTaxDelayEndowmentInsurance(AESEncryptUtil.closeEncryptSetting(po.getTaxDelayEndowmentInsurance()));
|
||||
po.setOtherDeduction(AESEncryptUtil.closeEncryptSetting(po.getOtherDeduction()));
|
||||
po.setDeductionAllowedDonation(AESEncryptUtil.closeEncryptSetting(po.getDeductionAllowedDonation()));
|
||||
} else {
|
||||
po.setBusinessHealthyInsurance(AESEncryptUtil.encrypt(po.getBusinessHealthyInsurance()));
|
||||
po.setTaxDelayEndowmentInsurance(AESEncryptUtil.encrypt(po.getTaxDelayEndowmentInsurance()));
|
||||
po.setOtherDeduction(AESEncryptUtil.encrypt(po.getOtherDeduction()));
|
||||
po.setDeductionAllowedDonation(AESEncryptUtil.encrypt(po.getDeductionAllowedDonation()));
|
||||
}
|
||||
});
|
||||
getOtherDeductionMapper().updateData(otherDeductionPos);
|
||||
baseBean.writeLog("hrsa_other_deduction");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
baseBean.writeLog("hrsa_other_deduction:", e.getMessage());
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
});
|
||||
Future<Integer> submit12 = fixedThreadPool.submit(() -> {
|
||||
try {
|
||||
List<AddUpSituation> addUpSituations = getAddUpSituationMapper().listAll();
|
||||
if (CollectionUtils.isNotEmpty(addUpSituations)) {
|
||||
addUpSituations.forEach(po -> {
|
||||
if (OpenEnum.OFF.getValue().equals(isOpenEncrypt)) {
|
||||
po.setAddUpIncome(AESEncryptUtil.closeEncryptSetting(po.getAddUpIncome()));
|
||||
po.setAddUpSubtraction(AESEncryptUtil.closeEncryptSetting(po.getAddUpSubtraction()));
|
||||
po.setAddUpSocialSecurityTotal(AESEncryptUtil.closeEncryptSetting(po.getAddUpSocialSecurityTotal()));
|
||||
po.setAddUpAccumulationFundTotal(AESEncryptUtil.closeEncryptSetting(po.getAddUpAccumulationFundTotal()));
|
||||
po.setAddUpChildEducation(AESEncryptUtil.closeEncryptSetting(po.getAddUpChildEducation()));
|
||||
po.setAddUpContinuingEducation(AESEncryptUtil.closeEncryptSetting(po.getAddUpContinuingEducation()));
|
||||
po.setAddUpHousingLoanInterest(AESEncryptUtil.closeEncryptSetting(po.getAddUpHousingLoanInterest()));
|
||||
po.setAddUpHousingRent(AESEncryptUtil.closeEncryptSetting(po.getAddUpHousingRent()));
|
||||
po.setAddUpSupportElderly(AESEncryptUtil.closeEncryptSetting(po.getAddUpSupportElderly()));
|
||||
po.setAddUpEnterpriseAndOther(AESEncryptUtil.closeEncryptSetting(po.getAddUpEnterpriseAndOther()));
|
||||
po.setAddUpOtherDeduction(AESEncryptUtil.closeEncryptSetting(po.getAddUpOtherDeduction()));
|
||||
po.setAddUpTaxExemptIncome(AESEncryptUtil.closeEncryptSetting(po.getAddUpTaxExemptIncome()));
|
||||
po.setAddUpAllowedDonation(AESEncryptUtil.closeEncryptSetting(po.getAddUpAllowedDonation()));
|
||||
po.setAddUpAdvanceTax(AESEncryptUtil.closeEncryptSetting(po.getAddUpAdvanceTax()));
|
||||
} else {
|
||||
po.setAddUpIncome(AESEncryptUtil.encrypt(po.getAddUpIncome()));
|
||||
po.setAddUpSubtraction(AESEncryptUtil.encrypt(po.getAddUpSubtraction()));
|
||||
po.setAddUpSocialSecurityTotal(AESEncryptUtil.encrypt(po.getAddUpSocialSecurityTotal()));
|
||||
po.setAddUpAccumulationFundTotal(AESEncryptUtil.encrypt(po.getAddUpAccumulationFundTotal()));
|
||||
po.setAddUpChildEducation(AESEncryptUtil.encrypt(po.getAddUpChildEducation()));
|
||||
po.setAddUpContinuingEducation(AESEncryptUtil.encrypt(po.getAddUpContinuingEducation()));
|
||||
po.setAddUpHousingLoanInterest(AESEncryptUtil.encrypt(po.getAddUpHousingLoanInterest()));
|
||||
po.setAddUpHousingRent(AESEncryptUtil.encrypt(po.getAddUpHousingRent()));
|
||||
po.setAddUpSupportElderly(AESEncryptUtil.encrypt(po.getAddUpSupportElderly()));
|
||||
po.setAddUpEnterpriseAndOther(AESEncryptUtil.encrypt(po.getAddUpEnterpriseAndOther()));
|
||||
po.setAddUpOtherDeduction(AESEncryptUtil.encrypt(po.getAddUpOtherDeduction()));
|
||||
po.setAddUpTaxExemptIncome(AESEncryptUtil.encrypt(po.getAddUpTaxExemptIncome()));
|
||||
po.setAddUpAllowedDonation(AESEncryptUtil.encrypt(po.getAddUpAllowedDonation()));
|
||||
po.setAddUpAdvanceTax(AESEncryptUtil.encrypt(po.getAddUpAdvanceTax()));
|
||||
}
|
||||
});
|
||||
getAddUpSituationMapper().updateData(addUpSituations);
|
||||
baseBean.writeLog("hrsa_add_up_situation");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
baseBean.writeLog("hrsa_add_up_situation:", e.getMessage());
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
});
|
||||
int flag = submit.get() + submit1.get() + submit2.get() + submit3.get() + submit4.get() + submit5.get() + submit6.get() + submit7.get() + submit8.get() + submit9.get() + submit10.get() + submit11.get() + submit12.get();
|
||||
return flag == 13;
|
||||
} catch (Exception e) {
|
||||
baseBean.writeLog("应用设置加解密数据异常", e.getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ package com.engine.salary.util;
|
|||
import com.engine.salary.entity.salarysob.po.SalarySobRangePO;
|
||||
import com.engine.salary.enums.UserStatusEnum;
|
||||
import com.engine.salary.service.impl.SalarySobRangeServiceImpl;
|
||||
import com.engine.workflow.util.CollectionUtil;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -20,7 +22,7 @@ public class SalarySobUtil {
|
|||
// 根据薪资账套查询人员
|
||||
SalarySobRangeServiceImpl salarySobRangeService = new SalarySobRangeServiceImpl();
|
||||
List<SalarySobRangePO> salarySobRangePOS = salarySobRangeService.listAllSalarySobRange();
|
||||
if(salarySobRangePOS != null){
|
||||
if(CollectionUtils.isNotEmpty(salarySobRangePOS)){
|
||||
// 判断是否已经转换过
|
||||
SalarySobRangePO salarySobRangePO = salarySobRangePOS.get(0);
|
||||
if(salarySobRangePO.getEmployeeStatuses() == null || salarySobRangePO.getEmployeeStatuses().equals("")){
|
||||
|
|
|
|||
|
|
@ -197,6 +197,21 @@ public class SalarySystemConfigController {
|
|||
return new ResponseResult<AppSettingSaveParam, String>(user).run(getSalarySystemConfigWrapper(user)::saveAppSetting, param);
|
||||
}
|
||||
|
||||
/**
|
||||
* 应用设置
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/app/setting/saveEncryptSetting")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String saveEncryptSetting(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AppSettingSaveParam param) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<AppSettingSaveParam, Map<String,Object>>(user).run(getSalarySystemConfigWrapper(user)::saveEncryptSetting, param);
|
||||
}
|
||||
/**
|
||||
* 应用设置
|
||||
*
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import com.engine.salary.util.page.SalaryPageUtil;
|
|||
import com.engine.salary.util.valid.RuntimeTypeEnum;
|
||||
import com.engine.salary.util.valid.ValidUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import tebie.applib.api.O;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.hrm.User;
|
||||
|
||||
|
|
@ -131,4 +132,9 @@ public class SalarySystemConfigWrapper extends Service {
|
|||
return getSalarySysConfService(user).appSetting();
|
||||
|
||||
}
|
||||
|
||||
public Map<String, Object> saveEncryptSetting(AppSettingSaveParam param) {
|
||||
ValidUtil.doValidator(param);
|
||||
return getSalarySysConfService(user).saveEncryptSetting(param);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue