Compare commits
10 Commits
5c2c0f603f
...
4c874c7569
| Author | SHA1 | Date |
|---|---|---|
|
|
4c874c7569 | |
|
|
4b717e9b2c | |
|
|
6a061592e5 | |
|
|
20bd294397 | |
|
|
44b5113ae9 | |
|
|
e6a474261c | |
|
|
e537107538 | |
|
|
3dd8db37dc | |
|
|
0a1acc89d3 | |
|
|
b4994dab3f |
|
|
@ -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;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -641,7 +641,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
|
||||
Attend4Salary attend4Salary = new Attend4Salary();
|
||||
try {
|
||||
int partSize = 500;
|
||||
int partSize = 100;
|
||||
List<List<Long>> partition = Lists.partition(employeeIds, partSize);
|
||||
for (List<Long> part : partition) {
|
||||
attend4Salary.setBeginDate(attendCycleRange.getFromDate());
|
||||
|
|
|
|||
|
|
@ -1762,7 +1762,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("补缴月份", "");
|
||||
|
|
@ -1866,11 +1866,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
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in New Issue