同步人员
This commit is contained in:
parent
e66c86d32c
commit
37a73b94df
|
|
@ -39,6 +39,9 @@ public class DataCollectionEmployee {
|
|||
@SalaryFormulaVar(defaultLabel = "部门ID", labelId = 86185, dataType = "string")
|
||||
private Long departmentId;
|
||||
|
||||
private String subcompanyName;
|
||||
private Long subcompanyid;
|
||||
|
||||
//岗位
|
||||
@SalaryFormulaVar(defaultLabel = "岗位", labelId = 90633, dataType = "string")
|
||||
private String jobtitleName;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public interface EmployMapper {
|
|||
|
||||
DataCollectionEmployee getEmployeeById(Long employeeId);
|
||||
|
||||
List<DataCollectionEmployee> listAll();
|
||||
List<DataCollectionEmployee> listAllFields();
|
||||
|
||||
List<PositionInfo> listPositionInfo(@Param("collection") List<Long> ids);
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
<select id="listEmployee" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
|
||||
select e.ID as employeeId,
|
||||
e.LASTNAME as username,
|
||||
d.DEPARTMENTNAME as departmentName
|
||||
d.DEPARTMENTNAME as departmentName,
|
||||
e.status
|
||||
from hrmresource e
|
||||
left join hrmdepartment d on e.departmentid = d.id
|
||||
where e.status not in (7)
|
||||
|
|
@ -199,25 +200,23 @@
|
|||
<include refid="paramSql"/>
|
||||
</select>
|
||||
|
||||
<select id="listAll" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
|
||||
<select id="listAllFields" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
|
||||
select e.id as employeeId,
|
||||
e.lastname as username,
|
||||
e.status as status,
|
||||
e.workcode as workcode,
|
||||
e.certificatenum as idNo,
|
||||
e.companystartdate as companystartdate,
|
||||
e.mobile as mobile,
|
||||
e.subcompanyid1 as subcompanyid,
|
||||
d.departmentname as departmentName,
|
||||
d.id as departmentId,
|
||||
c.jobtitlename as jobtitleName,
|
||||
c.id as jobtitleId,
|
||||
e.companystartdate as companystartdate,
|
||||
e.mobile as mobile,
|
||||
b.dismissdate as dismissdate
|
||||
c.id as jobtitleId
|
||||
from hrmresource e
|
||||
left join hrmdepartment d on e.departmentid = d.id
|
||||
left join hrmjobtitles c on e.jobtitle = c.id
|
||||
left join bill_hrmdismiss b on e.id = b.resource_n
|
||||
where e.status not in (7)
|
||||
AND e.id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -95,15 +95,20 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
long currentEmployeeId = user.getUID();
|
||||
|
||||
Boolean needAuth = getTaxAgentService(user).isNeedAuth(currentEmployeeId);
|
||||
if(needAuth){
|
||||
if (needAuth) {
|
||||
//获取管理的人员范围
|
||||
List<TaxAgentEmployeeDTO> taxAgentEmployeeDTOS = getTaxAgentService(user).listTaxAgentAndEmployee(currentEmployeeId);
|
||||
Set<Long> employeeId = SalaryEntityUtil.properties(taxAgentEmployeeDTOS, TaxAgentEmployeeDTO::getEmployeeId);
|
||||
|
||||
//获取所有薪资档案
|
||||
List<SalaryArchiveListDTO> list = getSalaryArchiveMapper().list(queryParam);
|
||||
List<SalaryArchiveListDTO> finalAllArchive = list.stream().filter(dto -> employeeId.contains(dto.getEmployeeId())).collect(Collectors.toList());
|
||||
|
||||
}else {
|
||||
PageInfo<SalaryArchiveListDTO> pageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), SalaryArchiveListDTO.class);
|
||||
pageInfo.setTotal(finalAllArchive.size());
|
||||
pageInfo.setList(SalaryPageUtil.subList(queryParam.getCurrent(), queryParam.getPageSize(), finalAllArchive));
|
||||
|
||||
} else {
|
||||
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
|
||||
List<SalaryArchiveListDTO> list = getSalaryArchiveMapper().list(queryParam);
|
||||
PageInfo<SalaryArchiveListDTO> pageInfo = new PageInfo<SalaryArchiveListDTO>(list, SalaryArchiveListDTO.class);
|
||||
|
|
@ -111,7 +116,6 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
}
|
||||
|
||||
|
||||
|
||||
return salaryArchiveMapper.listPage(queryParam);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
|
|||
if (CollectionUtils.isEmpty(taxAgentManageRanges)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
List<DataCollectionEmployee> salaryEmployees = getEmployMapper().listAll();
|
||||
List<DataCollectionEmployee> salaryEmployees = getEmployMapper().listAllFields();
|
||||
List<DataCollectionEmployee> salaryEmployeeList = Lists.newArrayList();
|
||||
for (TaxAgentManageRangePO manageRange : taxAgentManageRanges) {
|
||||
salaryEmployeeList.addAll(salaryEmployees.stream()
|
||||
|
|
@ -231,7 +231,7 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
|
|||
return true;
|
||||
}
|
||||
if (Objects.equals(manageRange.getTargetType(), TargetTypeEnum.SUBCOMPANY.getValue())
|
||||
&& Objects.equals(manageRange.getTargetId(), salaryEmployee.getDepartmentId())) {
|
||||
&& Objects.equals(manageRange.getTargetId(), salaryEmployee.getSubcompanyid())) {
|
||||
return true;
|
||||
}
|
||||
if (Objects.equals(manageRange.getTargetType(), TargetTypeEnum.POSITION.getValue())
|
||||
|
|
|
|||
Loading…
Reference in New Issue