Compare commits
16 Commits
c417b8da3e
...
40463a79da
| Author | SHA1 | Date |
|---|---|---|
|
|
40463a79da | |
|
|
6de4a4f241 | |
|
|
dee4e13c6c | |
|
|
629ff298a6 | |
|
|
8640398252 | |
|
|
eb35dddfbd | |
|
|
b83a916610 | |
|
|
10a11dcca4 | |
|
|
cb423962a2 | |
|
|
00fc87ffd8 | |
|
|
85e0b85871 | |
|
|
6a061592e5 | |
|
|
e6a474261c | |
|
|
3dd8db37dc | |
|
|
b4994dab3f | |
|
|
f1bd47f8b7 |
|
|
@ -1,5 +1,5 @@
|
|||
log=false
|
||||
defaultCloseNonStandard149=true
|
||||
AESEncryptScrect=990EB004A1C862721C1513AE90038C9E
|
||||
version=2.19.1.2501.01.s
|
||||
version=2.19.2.2501.01.s
|
||||
openFormulaForcedEditing=false
|
||||
|
|
@ -1,41 +1,42 @@
|
|||
CREATE TABLE hrsa_hrm_snapshot (
|
||||
ID bigint(0) NOT NULL,
|
||||
CREATE TABLE hrsa_hrm_snapshot
|
||||
(
|
||||
ID bigint NOT NULL,
|
||||
snapshot_time timestamp,
|
||||
employee_id bigint(0),
|
||||
employee_id bigint,
|
||||
loginid varchar(100),
|
||||
LASTNAME varchar(60),
|
||||
SEX char(1),
|
||||
BIRTHDAY char(10) ,
|
||||
NATIONALITY int(0) ,
|
||||
NATIONALITY int ,
|
||||
MARITALSTATUS char(1) ,
|
||||
TELEPHONE varchar(60),
|
||||
MOBILE varchar(60) ,
|
||||
MOBILECALL varchar(60) ,
|
||||
EMAIL varchar(60),
|
||||
LOCATIONID int(0),
|
||||
LOCATIONID int,
|
||||
WORKROOM varchar(60),
|
||||
HOMEADDRESS varchar(100),
|
||||
RESOURCETYPE char(1) ,
|
||||
STARTDATE char(10) ,
|
||||
ENDDATE char(10),
|
||||
JOBTITLE int(0) ,
|
||||
JOBTITLE int ,
|
||||
JOBTITLENAME varchar(200) ,
|
||||
JOBACTIVITYDESC varchar(200),
|
||||
JOBLEVEL int(0) ,
|
||||
SECLEVEL int(0) ,
|
||||
DEPARTMENTID int(0) ,
|
||||
JOBLEVEL int ,
|
||||
SECLEVEL int ,
|
||||
DEPARTMENTID int ,
|
||||
DEPARTMENTNAME varchar(200) ,
|
||||
SUBCOMPANYID1 int(0) ,
|
||||
SUBCOMPANYID1 int ,
|
||||
SUBCOMPANYNAME varchar(200) ,
|
||||
COSTCENTERID int(0) ,
|
||||
MANAGERID int(0) ,
|
||||
ASSISTANTID int(0),
|
||||
BANKID1 int(0) ,
|
||||
COSTCENTERID int ,
|
||||
MANAGERID int ,
|
||||
ASSISTANTID int,
|
||||
BANKID1 int ,
|
||||
ACCOUNTID1 varchar(100) ,
|
||||
LASTLOGINDATE char(10) ,
|
||||
CERTIFICATENUM varchar(60) ,
|
||||
NATIVEPLACE varchar(100) ,
|
||||
EDUCATIONLEVEL int(0) ,
|
||||
EDUCATIONLEVEL int ,
|
||||
BEMEMBERDATE char(10) ,
|
||||
BEPARTYDATE char(10) ,
|
||||
WORKCODE varchar(60) ,
|
||||
|
|
@ -44,8 +45,8 @@ CREATE TABLE hrsa_hrm_snapshot (
|
|||
RESIDENTPLACE varchar(200) ,
|
||||
POLICY varchar(30) ,
|
||||
DEGREE varchar(30) ,
|
||||
USEKIND int(0) ,
|
||||
JOBCALL int(0) ,
|
||||
USEKIND int ,
|
||||
JOBCALL int ,
|
||||
jobcallname varchar(200) ,
|
||||
ACCUMFUNDACCOUNT varchar(30),
|
||||
BIRTHPLACE varchar(60) ,
|
||||
|
|
@ -54,14 +55,14 @@ CREATE TABLE hrsa_hrm_snapshot (
|
|||
RESIDENTPOSTCODE varchar(60) ,
|
||||
EXTPHONE varchar(50) ,
|
||||
MANAGERSTR varchar(500),
|
||||
STATUS int(0) ,
|
||||
STATUS int ,
|
||||
FAX varchar(60) ,
|
||||
ISLABOUUNION char(1),
|
||||
TEMPRESIDENTNUMBER varchar(60),
|
||||
PROBATIONENDDATE char(10),
|
||||
COUNTRYID int(0) ,
|
||||
ACCOUNTTYPE int(0) ,
|
||||
BELONGTO int(0) ,
|
||||
COUNTRYID int ,
|
||||
ACCOUNTTYPE int ,
|
||||
BELONGTO int ,
|
||||
ACCOUNTNAME varchar(200) ,
|
||||
companystartdate varchar(10),
|
||||
workstartdate varchar(10) ,
|
||||
|
|
|
|||
|
|
@ -46,11 +46,13 @@ update hrsa_other_archives set delete_type=3;
|
|||
update hrsa_tax_agent_emp set delete_type=3;
|
||||
|
||||
|
||||
-- 删除核算记录和工资单信息
|
||||
update hrsa_salary_acct_record set delete_type=3 where delete_type=0;
|
||||
update hrsa_salary_acct_emp set delete_type=3 where delete_type=0;
|
||||
update hrsa_salary_acct_result set delete_type=3 where delete_type=0;
|
||||
update hrsa_salary_send set delete_type=3 where delete_type=0;
|
||||
update hrsa_salary_send_info set delete_type=3 where delete_type=0;
|
||||
-- 删除核算记录
|
||||
update hrsa_salary_acct_record set delete_type=3 where delete_type=0 and id= 核算记录id;
|
||||
update hrsa_salary_acct_emp set delete_type=3 where delete_type=0 and salary_acct_record_id=核算记录id;
|
||||
update hrsa_salary_acct_result set delete_type=3 where delete_type=0 and salary_acct_record_id = 核算记录id;
|
||||
|
||||
--删除工资单信息
|
||||
update hrsa_salary_send set delete_type=3 where delete_type=0 and salary_accounting_id = 核算记录id;
|
||||
update hrsa_salary_send_info set delete_type=3 where delete_type=0 and salary_acct_record_id = 核算记录id;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -720,6 +720,7 @@ public class TaxDeclarationBO {
|
|||
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()
|
||||
.map(SalaryAcctResultPO::getResultValue)
|
||||
.filter(Objects::nonNull)
|
||||
.findFirst().orElse("");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -377,7 +377,7 @@
|
|||
WHERE
|
||||
1=1
|
||||
AND base.delete_type = 0
|
||||
AND base.employee_type is null
|
||||
AND (base.employee_type is null or base.employee_type = 0)
|
||||
<include refid="condition"></include>
|
||||
<if test="param.orderRule != null">
|
||||
ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc}
|
||||
|
|
|
|||
|
|
@ -530,7 +530,7 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
|
|||
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);
|
||||
|
||||
// 获取此分页的核算人员
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public class AttendQuoteFieldSettingServiceImpl extends Service implements Atten
|
|||
@Override
|
||||
public List<AttendQuoteFieldSettingListDTO> list(AttendQuoteFieldSettingQueryParam queryParam) {
|
||||
//同步字段
|
||||
getAttendQuoteFieldService(user).syncAttendFields();
|
||||
// getAttendQuoteFieldService(user).syncAttendFields();
|
||||
// 获取字段设置
|
||||
List<AttendQuoteFieldSettingPO> list = biz.getAttendQuoteFieldSetting(queryParam.getSourceType());
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
|
|||
Map<Long, DataCollectionEmployee> collect = employeeByIds.stream().collect(Collectors.toMap(DataCollectionEmployee::getEmployeeId, Function.identity()));
|
||||
list.forEach(item -> {
|
||||
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("employeeId", item.getEmployeeId());
|
||||
record.put("billMonth", item.getBillMonth());
|
||||
|
|
|
|||
|
|
@ -1736,7 +1736,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
// Long taxAgentId = 0L;
|
||||
|
||||
List<InsuranceAccountDetailPO> list = new ArrayList<>();
|
||||
|
||||
String username = (String) map.getOrDefault("姓名", "");
|
||||
String billMonth = (String) map.getOrDefault("账单月份", "");
|
||||
String taxAgentName = (String) map.getOrDefault("个税扣缴义务人", "");
|
||||
String supplementaryMonth = (String) map.getOrDefault("补缴月份", "");
|
||||
|
|
@ -1840,11 +1840,11 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
//校验补缴人员是否存在福利档案基础信息,并且runStatus处于正在缴纳或者待减员
|
||||
InsuranceArchivesBaseInfoPO insuranceBaseInfo = getInsuranceBaseInfoMapper().getOneByEmployeeIdAndPayOrg(paymentOrganization, employeeId);
|
||||
if (insuranceBaseInfo == null || !(insuranceBaseInfo.getRunStatus().equals(EmployeeStatusEnum.STAY_DEL.getValue()) || insuranceBaseInfo.getRunStatus().equals(EmployeeStatusEnum.PAYING.getValue())) ) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "补缴人员中存在未设置福利档案人员或相关人员不在福利在缴人员中,不可新建补缴信息!"));
|
||||
throw new SalaryRunTimeException(username + SalaryI18nUtil.getI18nLabel(0, "补缴未设置福利档案人员或不在福利在缴人员中,不可新建补缴信息!"));
|
||||
}
|
||||
List<Long> empIdsInPayMonthRange = listCanPayEmpIds(paymentOrganization, billMonth.substring(0, 7));
|
||||
if (!empIdsInPayMonthRange.contains(employeeId)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(99920, "无核算人员"));
|
||||
throw new SalaryRunTimeException(username + SalaryI18nUtil.getI18nLabel(99920, "无核算人员"));
|
||||
}
|
||||
DataCollectionEmployee employee = getSalaryEmployeeService(user).getEmployeeById(employeeId);
|
||||
// 封装InsuranceAccountDetailPO
|
||||
|
|
|
|||
|
|
@ -387,11 +387,15 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
|
|||
&& (projects.contains(ProjectTypeEnum.MEDICAL_INSURANCE.getValue()))) {
|
||||
if (socialSchemePO != null && (StringUtils.isNotBlank(socialSchemePO.getSocialPaymentBaseString()) || StringUtils.isNotBlank(socialSchemePO.getSocialPaymentComBaseString()))) {
|
||||
Map<String, String> socialMap = JSON.parseObject(socialSchemePO.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
socialMap = socialMap.entrySet().stream().filter(e -> "9001".equals(e.getKey()) || "9002".equals(e.getKey()))
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||
if(socialMap!=null){
|
||||
socialMap = socialMap.entrySet().stream().filter(e -> "9001".equals(e.getKey()) || "9002".equals(e.getKey()))
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||
}
|
||||
Map<String, String> socialComMap = JSON.parseObject(socialSchemePO.getSocialPaymentComBaseString(), new HashMap<String, String>().getClass());
|
||||
socialComMap = socialComMap.entrySet().stream().filter(e -> "9001".equals(e.getKey()) || "9002".equals(e.getKey()))
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||
if(socialComMap!=null){
|
||||
socialComMap = socialComMap.entrySet().stream().filter(e -> "9001".equals(e.getKey()) || "9002".equals(e.getKey()))
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||
}
|
||||
List<String> socialIds = new ArrayList<>();
|
||||
socialIds.addAll(socialMap == null ? Collections.emptyList() : socialMap.keySet());
|
||||
socialIds.addAll(socialComMap == null ? Collections.emptyList() : socialMap.keySet());
|
||||
|
|
@ -434,12 +438,16 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
|
|||
&& (!projects.contains(ProjectTypeEnum.MEDICAL_INSURANCE.getValue()))) {
|
||||
if (socialSchemePO != null && (StringUtils.isNotBlank(socialSchemePO.getSocialPaymentBaseString()) || StringUtils.isNotBlank(socialSchemePO.getSocialPaymentComBaseString()))) {
|
||||
Map<String, String> socialMap = JSON.parseObject(socialSchemePO.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
socialMap = socialMap.entrySet().stream().filter(e -> "9001".equals(e.getKey()))
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||
if (socialMap != null) {
|
||||
socialMap = socialMap.entrySet().stream().filter(e -> "9001".equals(e.getKey()))
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||
}
|
||||
|
||||
Map<String, String> socialComMap = JSON.parseObject(socialSchemePO.getSocialPaymentComBaseString(), new HashMap<String, String>().getClass());
|
||||
socialComMap = socialComMap.entrySet().stream().filter(e -> "9001".equals(e.getKey()))
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||
if (socialComMap != null) {
|
||||
socialComMap = socialComMap.entrySet().stream().filter(e -> "9001".equals(e.getKey()))
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||
}
|
||||
List<String> socialIds = new ArrayList<>();
|
||||
socialIds.addAll(socialMap == null ? Collections.emptyList() : socialMap.keySet());
|
||||
socialIds.addAll(socialComMap == null ? Collections.emptyList() :socialComMap.keySet());
|
||||
|
|
@ -482,8 +490,10 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
|
|||
&& (projects.contains(ProjectTypeEnum.MEDICAL_INSURANCE.getValue()))) {
|
||||
if (socialSchemePO != null && (StringUtils.isNotBlank(socialSchemePO.getSocialPaymentBaseString()) || StringUtils.isNotBlank(socialSchemePO.getSocialPaymentComBaseString()))) {
|
||||
Map<String, String> socialMap = JSON.parseObject(socialSchemePO.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
socialMap = socialMap.entrySet().stream().filter(e -> "9002".equals(e.getKey()))
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||
if(socialMap!=null){
|
||||
socialMap = socialMap.entrySet().stream().filter(e -> "9002".equals(e.getKey()))
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||
}
|
||||
Map<String, String> socialComMap = JSON.parseObject(socialSchemePO.getSocialPaymentComBaseString(), new HashMap<String, String>().getClass());
|
||||
if(socialComMap !=null){
|
||||
socialComMap = socialComMap.entrySet().stream().filter(e -> "9002".equals(e.getKey()))
|
||||
|
|
|
|||
|
|
@ -347,14 +347,25 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
|||
if (CollectionUtils.isNotEmpty(otherConditions)) {
|
||||
List<Long> items = SalaryEntityUtil.properties(otherConditions, SalaryAcctResultQueryParam.OtherCondition::getItemId, Collectors.toList());
|
||||
List<SalaryAcctResultPO> list = listBySalaryAcctRecordIdsAndSalaryItemIds(Collections.singletonList(queryParam.getSalaryAcctRecordId()), items);
|
||||
for (int i = 0; i < otherConditions.size(); i++) {
|
||||
SalaryAcctResultQueryParam.OtherCondition otherCondition = otherConditions.get(i);
|
||||
Long itemId = otherCondition.getItemId();
|
||||
FilterEnum filter = otherCondition.getFilter();
|
||||
List<String> params = otherCondition.getParams();
|
||||
list = list.stream().filter(a -> Objects.equals(a.getSalaryItemId(), itemId)).filter(a -> filter.filter(params).test(a.getResultValue())).collect(Collectors.toList());
|
||||
Map<Long, List<SalaryAcctResultPO>> acctEmpResultsMap = SalaryEntityUtil.group2Map(list, SalaryAcctResultPO::getSalaryAcctEmpId);
|
||||
Set<Long> removeAcctEmpIds = new HashSet<>();
|
||||
for (Long acctEmpId : acctEmpResultsMap.keySet()) {
|
||||
List<SalaryAcctResultPO> acctEmpResults = acctEmpResultsMap.get(acctEmpId);
|
||||
//如果有一个条件不成立就删除
|
||||
for (int i = 0; i < otherConditions.size(); i++) {
|
||||
SalaryAcctResultQueryParam.OtherCondition otherCondition = otherConditions.get(i);
|
||||
Long itemId = otherCondition.getItemId();
|
||||
FilterEnum filter = otherCondition.getFilter();
|
||||
List<String> params = otherCondition.getParams();
|
||||
for (SalaryAcctResultPO po : acctEmpResults) {
|
||||
if(Objects.equals(po.getSalaryItemId(), itemId) && !filter.filter(params).test(po.getResultValue())){
|
||||
removeAcctEmpIds.add(po.getSalaryAcctEmpId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
List<Long> salaryAcctEmpId = SalaryEntityUtil.properties(list, SalaryAcctResultPO::getSalaryAcctEmpId, Collectors.toList());
|
||||
acctEmpResultsMap.keySet().removeAll(removeAcctEmpIds);
|
||||
List<Long> salaryAcctEmpId = Lists.newArrayList(acctEmpResultsMap.keySet());
|
||||
|
||||
if (CollectionUtils.isEmpty(salaryAcctEmpId)) {
|
||||
//条件不满足直接返回空列表
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.api.formmode.mybatis.util.SqlProxyHandle;
|
||||
|
|
@ -173,7 +174,7 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
}
|
||||
|
||||
//外部人员
|
||||
if(hasExtEmp){
|
||||
if (hasExtEmp) {
|
||||
List<SalarySobExtRangePO> salarySobExtRangePOS = getSalarySobExtRangeService(user).listBySalarySobId(salarySobId);
|
||||
if (CollectionUtils.isNotEmpty(salarySobExtRangePOS)) {
|
||||
List<Long> ids = SalaryEntityUtil.properties(salarySobExtRangePOS, SalarySobExtRangePO::getTargetId, Collectors.toList());
|
||||
|
|
@ -417,20 +418,24 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
|
||||
result.addAll(employBiz.listByVirtualParams(virtualParams));
|
||||
|
||||
List<Long> empIds = new ArrayList<>();
|
||||
includeQueryParams.stream()
|
||||
.filter(param -> param.getTargetType().equals(TargetTypeEnum.SQL.name()))
|
||||
.forEach(param -> {
|
||||
String sql = param.getTarget();
|
||||
RecordSet rs = new RecordSet();
|
||||
if (rs.execute(sql)) {
|
||||
while (rs.next()) {
|
||||
empIds.add((long) rs.getInt("id"));
|
||||
}
|
||||
for (SalarySobRangeEmpQueryParam param:includeQueryParams) {
|
||||
if(param.getTargetType().equals(TargetTypeEnum.SQL.name())){
|
||||
List<Long> empIds = new ArrayList<>();
|
||||
String sql = param.getTarget();
|
||||
RecordSet rs = new RecordSet();
|
||||
if (rs.execute(sql)) {
|
||||
while (rs.next()) {
|
||||
empIds.add((long) rs.getInt("id"));
|
||||
}
|
||||
});
|
||||
List<DataCollectionEmployee> employees = getSalaryEmployeeService(user).getEmployeeByIdsAll(empIds);
|
||||
result.addAll(employees);
|
||||
}
|
||||
if(CollUtil.isNotEmpty(empIds)){
|
||||
Collection<String> employeeStatus = param.getEmployeeStatus();
|
||||
List<DataCollectionEmployee> employeeByIdsAll = getSalaryEmployeeService(user).getEmployeeByIdsAll(empIds);
|
||||
List<DataCollectionEmployee> collect = employeeByIdsAll.stream().filter(e -> employeeStatus.contains(e.getStatus())).collect(Collectors.toList());
|
||||
result.addAll(collect);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 从hrmresource和hrmresourcevirtual可能获取到重复人员数据,需要根据人员id去重
|
||||
result = result.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparingLong(DataCollectionEmployee::getEmployeeId))), ArrayList::new));
|
||||
|
|
|
|||
|
|
@ -134,12 +134,15 @@ public class SalaryTokenUtil {
|
|||
// 对秘钥进行加密传输,防止篡改数据
|
||||
secret = rsa.encrypt(null, (String) (datas.get("secrit")), null, "utf-8", spk, false);
|
||||
// secret存库
|
||||
String date = SalaryDateUtil.getFormatLocalDateTime(LocalDateTime.now());
|
||||
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')",
|
||||
String date = "'"+SalaryDateUtil.getFormatLocalDateTime(LocalDateTime.now())+"'";
|
||||
if(rs.getDBType().equalsIgnoreCase("oracle")){
|
||||
date = String.format("to_date(%s,'yyyy-mm-dd hh24:mi:ss')", date);
|
||||
}
|
||||
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);
|
||||
rs.execute(sql);
|
||||
// 保存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);
|
||||
rs.execute(sql);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -485,7 +485,7 @@ public class SalaryBillController {
|
|||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String batGrant(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalarySendBatParam queryParam) {
|
||||
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)
|
||||
public String batWithdraw(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalarySendBatParam queryParam) {
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -130,9 +130,9 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
|||
|
||||
list.stream().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);
|
||||
}else{
|
||||
} else {
|
||||
dto.setCanSeeDetail(true);
|
||||
}
|
||||
});
|
||||
|
|
@ -155,7 +155,7 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
|||
e.setTemplate(NumberUtils.INTEGER_ONE.equals(e.getSalaryAcctType()) ? salaryTemplatePO.getReplenishName() : salaryTemplatePO.getName());
|
||||
e.setTemplateId(salaryTemplatePO.getId());
|
||||
if ((salaryTemplatePO.getAckFeedbackStatus() != null && salaryTemplatePO.getAckFeedbackStatus() == 1) ||
|
||||
(salaryTemplatePO.getFeedbackStatus() != null && salaryTemplatePO.getFeedbackStatus() == 1) ) {
|
||||
(salaryTemplatePO.getFeedbackStatus() != null && salaryTemplatePO.getFeedbackStatus() == 1)) {
|
||||
e.setAckFeedbackStatus(1);
|
||||
} else {
|
||||
e.setAckFeedbackStatus(0);
|
||||
|
|
@ -701,6 +701,7 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
|||
|
||||
/**
|
||||
* 发送短信验证码
|
||||
*
|
||||
* @param param 短信验证码发送参数
|
||||
*/
|
||||
public void sendMobileCode(SMSCodeSendParam param) {
|
||||
|
|
@ -709,6 +710,7 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
|||
|
||||
/**
|
||||
* 校验短信验证码
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -719,7 +721,7 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
|||
public PayrollCheckTypeEnum payrollCheckType() {
|
||||
SalarySysConfPO conf = getSalarySysConfService(user).getOneByCode(SalarySysConstant.SALARY_PAYROLL_CHECK_TYPE);
|
||||
|
||||
if(conf == null){
|
||||
if (conf == null) {
|
||||
return PayrollCheckTypeEnum.PWD;
|
||||
}
|
||||
|
||||
|
|
@ -727,14 +729,14 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
|||
}
|
||||
|
||||
public void confirmSalaryBill(Long salaryInfoId) {
|
||||
if(ObjectUtil.isNull(salaryInfoId)){
|
||||
if (ObjectUtil.isNull(salaryInfoId)) {
|
||||
throw new SalaryRunTimeException("工资单id不能为空!");
|
||||
}
|
||||
getSalaryBillService(user).confirmSalaryBill(salaryInfoId);
|
||||
}
|
||||
|
||||
public void feedBackSalaryBill(Long salaryInfoId) {
|
||||
if(ObjectUtil.isNull(salaryInfoId)){
|
||||
if (ObjectUtil.isNull(salaryInfoId)) {
|
||||
throw new SalaryRunTimeException("工资单id不能为空!");
|
||||
}
|
||||
getSalaryBillService(user).feedBackSalaryBill(salaryInfoId);
|
||||
|
|
@ -753,26 +755,48 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
|||
}
|
||||
|
||||
|
||||
public void batGrant(SalarySendBatParam param) {
|
||||
public String batGrant(SalarySendBatParam param) {
|
||||
List<Long> salarySendIds = param.getSalarySendIds();
|
||||
|
||||
int successCount = 0;
|
||||
int failCount = 0;
|
||||
String failMsg = "";
|
||||
for (int i = 0; i < salarySendIds.size(); i++) {
|
||||
Long sendId = salarySendIds.get(i);
|
||||
SalarySendGrantParam grantParam = SalarySendGrantParam.builder()
|
||||
.salarySendId(sendId)
|
||||
.build();
|
||||
grant(grantParam);
|
||||
try {
|
||||
Long sendId = salarySendIds.get(i);
|
||||
SalarySendGrantParam grantParam = SalarySendGrantParam.builder()
|
||||
.salarySendId(sendId)
|
||||
.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();
|
||||
|
||||
int successCount = 0;
|
||||
int failCount = 0;
|
||||
String failMsg = "";
|
||||
for (int i = 0; i < salarySendIds.size(); i++) {
|
||||
Long sendId = salarySendIds.get(i);
|
||||
SalarySendWithdrawParam grantParam = SalarySendWithdrawParam.builder()
|
||||
.salarySendId(sendId)
|
||||
.build();
|
||||
withdraw(grantParam);
|
||||
try {
|
||||
Long sendId = salarySendIds.get(i);
|
||||
SalarySendWithdrawParam grantParam = SalarySendWithdrawParam.builder()
|
||||
.salarySendId(sendId)
|
||||
.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