联特报表
This commit is contained in:
parent
b2354d00c6
commit
8d68683f93
|
|
@ -0,0 +1,27 @@
|
|||
package com.engine.salary.entity.salaryacct.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author Harryxzy
|
||||
* @ClassName LtNdhzReportDTO
|
||||
* @date 2025/09/02 21:09
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class LtNdhzReportDTO {
|
||||
|
||||
private Long departmentId;
|
||||
|
||||
private Integer year;
|
||||
|
||||
private BigDecimal value;
|
||||
}
|
||||
|
|
@ -190,4 +190,6 @@ public interface EmployMapper {
|
|||
List<DataCollectionEmployee> listByKeyword(@Param("keyword") String keyword);
|
||||
|
||||
List<DataCollectionEmployee> listByWorkCodes(@Param("workCodes") List<String> workCodes);
|
||||
|
||||
List<Integer> listDepartmentIdBySubcompanyIds(@Param("subcompanyIds")List<Long> subcompanyIds);
|
||||
}
|
||||
|
|
@ -317,7 +317,8 @@
|
|||
e.subcompanyid1 as subcompanyid,
|
||||
e.departmentid as departmentId,
|
||||
d.DEPARTMENTNAME as departmentName,
|
||||
e.jobtitle as jobtitleId
|
||||
e.jobtitle as jobtitleId,
|
||||
e.enddate as dismissdate
|
||||
from hrmresource e
|
||||
left join hrmdepartment d on e.departmentid = d.id
|
||||
where e.status not in (7)
|
||||
|
|
@ -360,6 +361,7 @@
|
|||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
order by d.showorder
|
||||
</select>
|
||||
|
||||
<select id="getVirtualDeptInfoList" resultType="com.engine.salary.entity.hrm.DeptInfo">
|
||||
|
|
@ -739,4 +741,15 @@
|
|||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
<select id="listDepartmentIdBySubcompanyIds" resultType="java.lang.Integer">
|
||||
select id
|
||||
from hrmdepartment
|
||||
where 1=1
|
||||
<if test="subcompanyIds != null and subcompanyIds.size()>0">
|
||||
AND subcompanyid1 IN
|
||||
<foreach collection="subcompanyIds" open="(" item="subcompanyId" separator="," close=")">
|
||||
#{subcompanyId}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -18,6 +18,9 @@ public interface HrmSnapshotMapper {
|
|||
|
||||
List<HrmSnapshotPO> snapshot(@Param("employeeId")Long employeeId, @Param("snapshotTime")Date snapshotTime);
|
||||
|
||||
List<Date> getSnapshotTime(@Param("startTime")Date startTime, @Param("emdTime")Date emdTime);
|
||||
Integer countByStatusAndSnapshotTime(@Param("statusList")List<Integer> statusList, @Param("snapshotTime")Date snapshotTime);
|
||||
|
||||
/**
|
||||
* 条件查询
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1205,5 +1205,27 @@
|
|||
left join hrmjobtitles j on e.jobtitle = j.id
|
||||
left join hrmjobcall job on e.jobcall=job.id
|
||||
</select>
|
||||
<select id="getSnapshotTime" resultType="java.util.Date">
|
||||
SELECT
|
||||
snapshot_time
|
||||
FROM hrsa_hrm_snapshot t
|
||||
WHERE snapshot_time >= #{startTime}
|
||||
AND snapshot_time <![CDATA[ <= ]]> #{endTime}
|
||||
order by snapshot_time desc
|
||||
</select>
|
||||
|
||||
<select id="countByStatusAndSnapshotTime" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
count(1)
|
||||
FROM hrsa_hrm_snapshot t
|
||||
WHERE snapshot_time = #{snapshotTime}
|
||||
<if test="ids != null and ids.size()>0">
|
||||
AND status IN
|
||||
<foreach collection="statusList" open="(" item="status" separator="," close=")">
|
||||
#{status}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -292,4 +292,35 @@ public interface SalaryAcctResultService {
|
|||
* @return
|
||||
*/
|
||||
String ltGenRymxgzsf(String salaryMonth);
|
||||
|
||||
/**
|
||||
* 联特人事口径 - 生成旗下人力成本分析
|
||||
* @param salaryMonth
|
||||
*/
|
||||
String ltGenQxrlcbfx(String salaryMonth);
|
||||
|
||||
/**
|
||||
* 联特人事口径 - 生成部门为单位人力成本分析
|
||||
* @param salaryMonth
|
||||
*/
|
||||
String ltGenBmwdwrlcbfx(String salaryMonth);
|
||||
|
||||
/**
|
||||
* 联特人事口径 - 生成费用类型人力成本分析
|
||||
* @param salaryMonth
|
||||
*/
|
||||
String ltGenFylxlcbfx(String salaryMonth);
|
||||
|
||||
/**
|
||||
* 联特人事口径 - 年度汇总
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> ltNdhzReport();
|
||||
|
||||
/**
|
||||
* 联特人事口径 - 看板
|
||||
* @param salaryMonth
|
||||
* @return
|
||||
*/
|
||||
String ltGenKb(String salaryMonth);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -212,4 +212,6 @@ public interface SalaryEmployeeService {
|
|||
List<DataCollectionEmployee> snapshot(List<Long> employeeIds, Date snapshotTime);
|
||||
|
||||
List<DataCollectionEmployee> listByWorkCodes(List<String> workcodes);
|
||||
|
||||
List<Integer> listDepartmentIdBySubcompanyIds(List<Long> subcompanyIds);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -377,11 +377,11 @@ public class EmployeeDeclareExcelServiceImpl extends Service implements Employee
|
|||
}
|
||||
} else if (StringUtils.equals(dataKey, SalaryI18nUtil.getI18nLabel(0, "离职日期"))) {
|
||||
if (StringUtils.isEmpty(dataValue)) {
|
||||
if (Objects.equals(employeeDeclareExcel.getEmploymentStatus(), EmploymentStatusEnum.ABNORMAL.getValue().toString())) {
|
||||
isError = true;
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", rowIndex + SalaryI18nUtil.getI18nLabel(0, "人员状态为非正常时,离职日期必填"));
|
||||
errorData.add(errorMessageMap);
|
||||
if (Objects.equals(employeeDeclareExcel.getEmploymentStatus(), EmploymentStatusEnum.ABNORMAL.getValue())) {
|
||||
// isError = true;
|
||||
// Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
// errorMessageMap.put("message", rowIndex + SalaryI18nUtil.getI18nLabel(0, "人员状态为非正常时,离职日期必填"));
|
||||
// errorData.add(errorMessageMap);
|
||||
}
|
||||
} else {
|
||||
if (StringUtils.isNotBlank(dataValue) && dataValue.length() >= 10) {
|
||||
|
|
@ -497,9 +497,11 @@ public class EmployeeDeclareExcelServiceImpl extends Service implements Employee
|
|||
if (!isError) {
|
||||
if (StringUtils.equals(checkType, "jobNum")) {
|
||||
EmployeeDeclarePO employeeDeclare = employeeDeclareMap.get(employeeDeclareExcel.getJobNum());
|
||||
DataCollectionEmployee extEmployee = extEmployeeMap.get(employeeDeclareExcel.getJobNum());
|
||||
DataCollectionEmployee simpleEmployee = simpleEmployeeMap.get(employeeDeclareExcel.getJobNum());
|
||||
if (employeeDeclare == null) {
|
||||
DataCollectionEmployee extEmployee = extEmployeeMap.get(employeeDeclareExcel.getJobNum());
|
||||
DataCollectionEmployee simpleEmployee = simpleEmployeeMap.get(employeeDeclareExcel.getJobNum());
|
||||
// DataCollectionEmployee extEmployee = extEmployeeMap.get(employeeDeclareExcel.getJobNum());
|
||||
// DataCollectionEmployee simpleEmployee = simpleEmployeeMap.get(employeeDeclareExcel.getJobNum());
|
||||
if (extEmployee == null && simpleEmployee == null) {
|
||||
isError = true;
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
|
|
@ -516,6 +518,11 @@ public class EmployeeDeclareExcelServiceImpl extends Service implements Employee
|
|||
BeanUtils.copyProperties(employeeDeclarePO, newEmployeeDeclare, getNullPropertyNames(employeeDeclarePO));
|
||||
newEmployeeDeclare.setNewEmployeeInfo(StringUtils.equals(employeeDeclare.toCompareString(), newEmployeeDeclare.toCompareString()) ? 0 : 1);
|
||||
newEmployeeDeclare.setUpdateTime(now);
|
||||
if (Objects.equals(newEmployeeDeclare.getEmploymentStatus(), EmploymentStatusEnum.ABNORMAL.getValue()) && newEmployeeDeclare.getDismissDate() == null) {
|
||||
if (simpleEmployee != null) {
|
||||
newEmployeeDeclare.setDismissDate(SalaryDateUtil.dateStrToLocalDate(simpleEmployee.getDismissdate()));
|
||||
}
|
||||
}
|
||||
needUpdateEmployeeDeclares.add(newEmployeeDeclare);
|
||||
if (Objects.equals(newEmployeeDeclare.getNewEmployeeInfo(), 1)) {
|
||||
newEmployeeDeclare.setDeclareStatus(DeclareStatusEnum.NOT_DECLARE.getValue());
|
||||
|
|
@ -524,9 +531,11 @@ public class EmployeeDeclareExcelServiceImpl extends Service implements Employee
|
|||
}
|
||||
} else {
|
||||
EmployeeDeclarePO employeeDeclare = employeeDeclareMap.get(employeeDeclareExcel.getCardNum());
|
||||
DataCollectionEmployee extEmployee = extEmployeeMap.get(employeeDeclareExcel.getCardNum());
|
||||
DataCollectionEmployee simpleEmployee = simpleEmployeeMap.get(employeeDeclareExcel.getCardNum());
|
||||
if (employeeDeclare == null) {
|
||||
DataCollectionEmployee extEmployee = extEmployeeMap.get(employeeDeclareExcel.getCardNum());
|
||||
DataCollectionEmployee simpleEmployee = simpleEmployeeMap.get(employeeDeclareExcel.getCardNum());
|
||||
// DataCollectionEmployee extEmployee = extEmployeeMap.get(employeeDeclareExcel.getCardNum());
|
||||
// DataCollectionEmployee simpleEmployee = simpleEmployeeMap.get(employeeDeclareExcel.getCardNum());
|
||||
if (extEmployee == null && simpleEmployee == null) {
|
||||
isError = true;
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
|
|
@ -547,6 +556,11 @@ public class EmployeeDeclareExcelServiceImpl extends Service implements Employee
|
|||
newEmployeeDeclare.setDeclareStatus(DeclareStatusEnum.NOT_DECLARE.getValue());
|
||||
newEmployeeDeclare.setDeclareErrorMsg("");
|
||||
}
|
||||
if (Objects.equals(newEmployeeDeclare.getEmploymentStatus(), EmploymentStatusEnum.ABNORMAL.getValue()) && newEmployeeDeclare.getDismissDate() == null) {
|
||||
if (simpleEmployee != null) {
|
||||
newEmployeeDeclare.setDismissDate(SalaryDateUtil.dateStrToLocalDate(simpleEmployee.getDismissdate()));
|
||||
}
|
||||
}
|
||||
needUpdateEmployeeDeclares.add(newEmployeeDeclare);
|
||||
}
|
||||
}
|
||||
|
|
@ -636,10 +650,16 @@ public class EmployeeDeclareExcelServiceImpl extends Service implements Employee
|
|||
if (extEmployee != null) {
|
||||
employeeDeclare.setEmployeeId(extEmployee.getEmployeeId());
|
||||
employeeDeclare.setEmployeeType(EmployeeTypeEnum.EXT_EMPLOYEE.getValue());
|
||||
if (employeeDeclare.getDismissDate() == null) {
|
||||
employeeDeclare.setDismissDate(SalaryDateUtil.dateStrToLocalDate(extEmployee.getDismissdate()));
|
||||
}
|
||||
}
|
||||
if (simpleEmployee != null) {
|
||||
employeeDeclare.setEmployeeId(simpleEmployee.getEmployeeId());
|
||||
employeeDeclare.setEmployeeType(EmployeeTypeEnum.ORGANIZATION.getValue());
|
||||
if (Objects.equals(employeeDeclare.getEmploymentStatus(), EmploymentStatusEnum.ABNORMAL.getValue()) && employeeDeclare.getDismissDate() == null) {
|
||||
employeeDeclare.setDismissDate(SalaryDateUtil.dateStrToLocalDate(simpleEmployee.getDismissdate()));
|
||||
}
|
||||
}
|
||||
return employeeDeclare;
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -714,4 +714,9 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
});
|
||||
return SalaryI18nUtil.i18nList(empList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Integer> listDepartmentIdBySubcompanyIds(List<Long> subcompanyIds) {
|
||||
return getEmployMapper().listDepartmentIdBySubcompanyIds(subcompanyIds);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1076,5 +1076,78 @@ public class SalaryAcctController {
|
|||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<String, String>(user).run(getSalaryAcctResultWrapper(user)::ltGenRymxgzsf, salaryMonth);
|
||||
}
|
||||
|
||||
/**
|
||||
* 联特人事口径 - 生成旗下人力成本分析
|
||||
* @param request
|
||||
* @param response
|
||||
* @param salaryMonth
|
||||
* @return
|
||||
*/
|
||||
@GET
|
||||
@Path("/ltSalaryReport/genQxrlcbfx")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String ltGenQxrlcbfx(@Context HttpServletRequest request, @Context HttpServletResponse response, @QueryParam(value = "salaryMonth") String salaryMonth) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<String, String>(user).run(getSalaryAcctResultWrapper(user)::ltGenQxrlcbfx, salaryMonth);
|
||||
}
|
||||
|
||||
/**
|
||||
* 联特人事口径 - 生成部门为单位的人力成本分析
|
||||
* @param request
|
||||
* @param response
|
||||
* @param salaryMonth
|
||||
* @return
|
||||
*/
|
||||
@GET
|
||||
@Path("/ltSalaryReport/genBmwddrlcbfx")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String ltGenBmwdwrlcbfx(@Context HttpServletRequest request, @Context HttpServletResponse response, @QueryParam(value = "salaryMonth") String salaryMonth) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<String, String>(user).run(getSalaryAcctResultWrapper(user)::ltGenBmwdwrlcbfx, salaryMonth);
|
||||
}
|
||||
|
||||
/**
|
||||
* 联特人事口径 - 生成费用类型人力成本分析
|
||||
* @param request
|
||||
* @param response
|
||||
* @param salaryMonth
|
||||
* @return
|
||||
*/
|
||||
@GET
|
||||
@Path("/ltSalaryReport/genFylxlcbfx")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String ltGenFylxlcbfx(@Context HttpServletRequest request, @Context HttpServletResponse response, @QueryParam(value = "salaryMonth") String salaryMonth) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<String, String>(user).run(getSalaryAcctResultWrapper(user)::ltGenFylxlcbfx, salaryMonth);
|
||||
}
|
||||
|
||||
/**
|
||||
* 联特人事口径 - 年度汇总报表
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@GET
|
||||
@Path("/ltSalaryReport/ndhzReport")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String ltNdhzReport(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<Void, Map<String, Object>>(user).run(getSalaryAcctResultWrapper(user)::ltNdhzReport);
|
||||
}
|
||||
|
||||
/**
|
||||
* 联特人事口径 - 看板
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@GET
|
||||
@Path("/ltSalaryReport/genKb")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String ltGenKb(@Context HttpServletRequest request, @Context HttpServletResponse response,@QueryParam(value = "salaryMonth") String salaryMonth) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<String, Map<String, Object>>(user).run(getSalaryAcctResultWrapper(user)::ltGenKb, salaryMonth);
|
||||
}
|
||||
/**********************************联特 报表end*********************************/
|
||||
}
|
||||
|
|
|
|||
|
|
@ -418,4 +418,36 @@ public class SalaryAcctResultWrapper extends Service implements SalaryAcctResult
|
|||
public String ltGenRymxgzsf(String salaryMonth) {
|
||||
return getSalaryAcctResultService(user).ltGenRymxgzsf(salaryMonth);
|
||||
}
|
||||
|
||||
/**
|
||||
* 联特人事口径 - 生成旗下人力成本分析
|
||||
* @param salaryMonth
|
||||
*/
|
||||
public String ltGenQxrlcbfx(String salaryMonth) {
|
||||
return getSalaryAcctResultService(user).ltGenQxrlcbfx(salaryMonth);
|
||||
}
|
||||
|
||||
/**
|
||||
* 联特人事口径 - 生成部门为单位人力成本分析
|
||||
* @param salaryMonth
|
||||
*/
|
||||
public String ltGenBmwdwrlcbfx(String salaryMonth) {
|
||||
return getSalaryAcctResultService(user).ltGenBmwdwrlcbfx(salaryMonth);
|
||||
}
|
||||
|
||||
public String ltGenFylxlcbfx(String salaryMonth) {
|
||||
return getSalaryAcctResultService(user).ltGenFylxlcbfx(salaryMonth);
|
||||
}
|
||||
|
||||
public Map<String, Object> ltNdhzReport() {
|
||||
return getSalaryAcctResultService(user).ltNdhzReport();
|
||||
}
|
||||
|
||||
/**
|
||||
* 联特人事口径 - 看板
|
||||
* @param salaryMonth
|
||||
*/
|
||||
public String ltGenKb(String salaryMonth) {
|
||||
return getSalaryAcctResultService(user).ltGenKb(salaryMonth);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue