Lee-茶百道门户需求暂存

This commit is contained in:
李栋 2025-08-18 15:36:28 +08:00
parent e4f8aaf163
commit a9622a1693
3 changed files with 25 additions and 11 deletions

View File

@ -14,4 +14,7 @@ import java.util.Set;
@EqualsAndHashCode(callSuper = false)
public class HrbpParam extends BaseParam{
private Set<Long> departmentIdList;
private Long matrixId;
private Long matrixValueConfigId;
private Long userId;
}

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

@ -177,18 +177,19 @@
<select id="getKqRequireByBp" resultType="java.lang.Integer">
SELECT
b.id
COUNT(DISTINCT b.ID )
FROM
{eteams}.hrm_matrix_value_data a
LEFT JOIN
{e10_common}.uf_kqtotal b ON b.bm = a.matrix_data_id
${eteams}.hrm_matrix_value_data a
LEFT JOIN ${eteams}.employee b ON b.DEPARTMENT = a.matrix_data_id
WHERE
a.tenant_key = #{tenantKey}
<!-- 矩阵id -->
AND a.matrix_id = #{matrixId}
<!-- 部门矩阵id -->
a.matrix_id = #{matrixId}
<!-- 矩阵配置id(hrbp字段id) hrbpId -->
AND a.matrix_value_config_id = #{matrixValueConfigId}
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>