hrbp门户今日概况-应出勤人数

This commit is contained in:
李栋 2025-08-18 15:29:32 +08:00
parent fc457ea439
commit 71bbde850b
4 changed files with 41 additions and 3 deletions

View File

@ -12,6 +12,10 @@ import java.util.Set;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class HrbpParam extends BaseParam{
public class HrbpParam extends com.weaver.seconddev.portal.entity.param.BaseParam {
private Set<Long> departmentIdList;
private Set<Long> departmentIdList;
private Long matrixId;
private Long matrixValueConfigId;
private Long userId;
}

View File

@ -123,4 +123,11 @@ public interface HrbpPortalMapper {
*/
int getLeaveCount(HrbpParam param);
/**
* hrbp可查看的应出勤人数
* @param param
* @return
*/
int getKqRequireByBp(HrbpParam param);
}

View File

@ -114,7 +114,17 @@ public class HrbpPortalServiceImpl implements HrbpPortalService {
@Override
public WeaResult<Map<String, Object>> getTodayOverview(Map<String, String> params) {
// TODO
return null;
Map<String, Object> resultMap = new HashMap<>();
//部门矩阵中hrbp负责的部门
//应出勤人数部门在职人数
HrbpParam hrbpParam = new HrbpParam();
hrbpParam.setTenantKey(UserContext.getCurrentUser().getTenantKey());
hrbpParam.setMatrixId(Long.valueOf(matrixId));
hrbpParam.setMatrixValueConfigId(Long.valueOf(matrixValueConfigId));
hrbpParam.setUserId(UserContext.getCurrentUser().getUserId());
int totalRequire = hrbpPortalMapper.getKqRequireByBp(hrbpParam);
resultMap.put("totalRequire", totalRequire);
return WeaResult.success(resultMap);
}
}

View File

@ -175,4 +175,21 @@
and t.personnel_status = 5
</select>
<select id="getKqRequireByBp" resultType="java.lang.Integer">
SELECT
COUNT(DISTINCT b.ID )
FROM
${eteams}.hrm_matrix_value_data a
LEFT JOIN ${eteams}.employee b ON b.DEPARTMENT = a.matrix_data_id
WHERE
<!-- 部门矩阵id -->
a.matrix_id = #{matrixId}
<!-- 矩阵配置id(hrbp字段id) hrbpId -->
AND a.matrix_value_config_id = #{matrixValueConfigId}
<!-- 当前人员id -->
AND a.relate_id=#{userId}
AND a.delete_type = 0
AND b.accounttype = 0
AND b.STATUS = 'normal'
</select>
</mapper>