申报表加解密
This commit is contained in:
parent
9caf8126f2
commit
c29c032ef5
|
|
@ -19,6 +19,7 @@ import com.engine.salary.entity.siarchives.po.InsuranceArchivesOtherSchemePO;
|
||||||
import com.engine.salary.entity.siarchives.po.InsuranceArchivesSocialSchemePO;
|
import com.engine.salary.entity.siarchives.po.InsuranceArchivesSocialSchemePO;
|
||||||
import com.engine.salary.entity.sischeme.po.InsuranceSchemeDetailPO;
|
import com.engine.salary.entity.sischeme.po.InsuranceSchemeDetailPO;
|
||||||
import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationDetailPO;
|
import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationDetailPO;
|
||||||
|
import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationValuePO;
|
||||||
import com.engine.salary.exception.SalaryRunTimeException;
|
import com.engine.salary.exception.SalaryRunTimeException;
|
||||||
import com.engine.salary.mapper.archive.SalaryArchiveItemMapper;
|
import com.engine.salary.mapper.archive.SalaryArchiveItemMapper;
|
||||||
import com.engine.salary.mapper.datacollection.AddUpDeductionMapper;
|
import com.engine.salary.mapper.datacollection.AddUpDeductionMapper;
|
||||||
|
|
@ -35,6 +36,7 @@ import com.engine.salary.mapper.siarchives.SocialSchemeMapper;
|
||||||
import com.engine.salary.mapper.sischeme.InsuranceSchemeDetailMapper;
|
import com.engine.salary.mapper.sischeme.InsuranceSchemeDetailMapper;
|
||||||
import com.engine.salary.mapper.sys.SalarySysConfMapper;
|
import com.engine.salary.mapper.sys.SalarySysConfMapper;
|
||||||
import com.engine.salary.mapper.taxdeclaration.TaxDeclarationDetailMapper;
|
import com.engine.salary.mapper.taxdeclaration.TaxDeclarationDetailMapper;
|
||||||
|
import com.engine.salary.mapper.taxdeclaration.TaxDeclarationValueMapper;
|
||||||
import com.engine.salary.sys.constant.SalarySysConstant;
|
import com.engine.salary.sys.constant.SalarySysConstant;
|
||||||
import com.engine.salary.sys.entity.param.AppSettingSaveParam;
|
import com.engine.salary.sys.entity.param.AppSettingSaveParam;
|
||||||
import com.engine.salary.sys.entity.param.OrderRuleParam;
|
import com.engine.salary.sys.entity.param.OrderRuleParam;
|
||||||
|
|
@ -138,6 +140,10 @@ public class SalarySysConfServiceImpl extends Service implements SalarySysConfSe
|
||||||
return MapperProxyFactory.getProxy(SpecialAddDeductionMapper.class);
|
return MapperProxyFactory.getProxy(SpecialAddDeductionMapper.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private TaxDeclarationValueMapper getTaxDeclarationValueMapper() {
|
||||||
|
return MapperProxyFactory.getProxy(TaxDeclarationValueMapper.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作是否需要申报功能
|
* 操作是否需要申报功能
|
||||||
|
|
@ -447,7 +453,7 @@ public class SalarySysConfServiceImpl extends Service implements SalarySysConfSe
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SalarySysConfPO> getListByCodes(List<String> codes) {
|
public List<SalarySysConfPO> getListByCodes(List<String> codes) {
|
||||||
if(CollectionUtils.isEmpty(codes)){
|
if (CollectionUtils.isEmpty(codes)) {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
return getSalarySysConfMapper().getListByCodes(codes);
|
return getSalarySysConfMapper().getListByCodes(codes);
|
||||||
|
|
@ -519,11 +525,11 @@ public class SalarySysConfServiceImpl extends Service implements SalarySysConfSe
|
||||||
}
|
}
|
||||||
|
|
||||||
SalarySysConfPO salaryAcctEmployeeRule = salarySysConfMap.get(SALARY_ACCT_EMPLOYEE_RULE);
|
SalarySysConfPO salaryAcctEmployeeRule = salarySysConfMap.get(SALARY_ACCT_EMPLOYEE_RULE);
|
||||||
if (salaryAcctEmployeeRule == null ) {
|
if (salaryAcctEmployeeRule == null) {
|
||||||
// 薪资核算人员匹配规则
|
// 薪资核算人员匹配规则
|
||||||
appSettingVO.setSalaryAcctEmployeeRule(SalaryAcctEmployeeRuleEnum.BYPAYENDTIME.getValue());
|
appSettingVO.setSalaryAcctEmployeeRule(SalaryAcctEmployeeRuleEnum.BYPAYENDTIME.getValue());
|
||||||
} else {
|
} else {
|
||||||
appSettingVO.setSalaryAcctEmployeeRule( SalaryAcctEmployeeRuleEnum.parseByValue(salaryAcctEmployeeRule.getConfValue()).getValue() );
|
appSettingVO.setSalaryAcctEmployeeRule(SalaryAcctEmployeeRuleEnum.parseByValue(salaryAcctEmployeeRule.getConfValue()).getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
SalarySysConfPO withDrawRule = salarySysConfMap.get(WITHDRAW_TAX_DECLARATION);
|
SalarySysConfPO withDrawRule = salarySysConfMap.get(WITHDRAW_TAX_DECLARATION);
|
||||||
|
|
@ -544,7 +550,7 @@ public class SalarySysConfServiceImpl extends Service implements SalarySysConfSe
|
||||||
|
|
||||||
|
|
||||||
SalarySysConfPO salarySendFeedbackPO = salarySysConfMap.get(SALARY_SEND_FEEDBACK);
|
SalarySysConfPO salarySendFeedbackPO = salarySysConfMap.get(SALARY_SEND_FEEDBACK);
|
||||||
if (salarySendFeedbackPO == null ) {
|
if (salarySendFeedbackPO == null) {
|
||||||
// 是否开启工资单反馈,默认不开启
|
// 是否开启工资单反馈,默认不开启
|
||||||
appSettingVO.setSalarySendFeedback("0");
|
appSettingVO.setSalarySendFeedback("0");
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1045,14 +1051,40 @@ public class SalarySysConfServiceImpl extends Service implements SalarySysConfSe
|
||||||
}
|
}
|
||||||
return 1;
|
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() + submit13.get();
|
Future<Integer> submit14 = fixedThreadPool.submit(() -> {
|
||||||
if (flag == 14) {
|
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||||
|
try {
|
||||||
|
List<TaxDeclarationValuePO> taxDeclarationValuePO = getTaxDeclarationValueMapper().listAll();
|
||||||
|
if (CollectionUtils.isNotEmpty(taxDeclarationValuePO)) {
|
||||||
|
taxDeclarationValuePO.forEach(po -> {
|
||||||
|
if (OpenEnum.OFF.getValue().equals(isOpenEncrypt)) {
|
||||||
|
encryptUtil.decrypt(po, TaxDeclarationValuePO.class);
|
||||||
|
} else {
|
||||||
|
encryptUtil.encrypt(po, TaxDeclarationValuePO.class);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
TaxDeclarationValueMapper mapper = sqlSession.getMapper(TaxDeclarationValueMapper.class);
|
||||||
|
taxDeclarationValuePO.forEach(mapper::updateIgnoreNull);
|
||||||
|
sqlSession.commit();
|
||||||
|
log.info("finish hrsa_tax_declaration_detail");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
sqlSession.rollback();
|
||||||
|
log.error("fail hrsa_tax_declaration_detail", e);
|
||||||
|
return 0;
|
||||||
|
} finally {
|
||||||
|
sqlSession.close();
|
||||||
|
}
|
||||||
|
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() + submit13.get() + submit14.get();
|
||||||
|
if (flag == 15) {
|
||||||
Util_DataCache.setObjVal(ENCRYPT_IN_PROGRESS + progressId, "success", 30);
|
Util_DataCache.setObjVal(ENCRYPT_IN_PROGRESS + progressId, "success", 30);
|
||||||
} else {
|
} else {
|
||||||
Util_DataCache.setObjVal(ENCRYPT_IN_PROGRESS + progressId, "fail", 30);
|
Util_DataCache.setObjVal(ENCRYPT_IN_PROGRESS + progressId, "fail", 30);
|
||||||
}
|
}
|
||||||
Util_DataCache.clearVal(AES_ENCRYPT_IN_PROGRESS);
|
Util_DataCache.clearVal(AES_ENCRYPT_IN_PROGRESS);
|
||||||
return flag == 14;
|
return flag == 15;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Util_DataCache.setObjVal(ENCRYPT_IN_PROGRESS + progressId, "fail", 30);
|
Util_DataCache.setObjVal(ENCRYPT_IN_PROGRESS + progressId, "fail", 30);
|
||||||
Util_DataCache.clearVal(AES_ENCRYPT_IN_PROGRESS);
|
Util_DataCache.clearVal(AES_ENCRYPT_IN_PROGRESS);
|
||||||
|
|
|
||||||
|
|
@ -274,7 +274,7 @@ public class SalarySystemConfigController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 应用设置
|
* 保存加密设置
|
||||||
*
|
*
|
||||||
* @param request
|
* @param request
|
||||||
* @param response
|
* @param response
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue