generated from dxfeng/secondev-wugang-dxfeng
hrbp门户今日概况-应出勤人数
This commit is contained in:
parent
849307c510
commit
b315569781
|
|
@ -20,7 +20,4 @@ public interface EntryManageMapper {
|
|||
* @return
|
||||
*/
|
||||
Long getEntryRecordIdByJobNum(@Param("param") BaseParam param, @Param("jobNum") String jobNum);
|
||||
|
||||
|
||||
Long updateFilesInfo(@Param("param") BaseParam param, @Param("employeeId") Long employeeId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,8 +105,8 @@ public class EntryManageServiceImpl implements EntryManageService {
|
|||
|
||||
|
||||
JSONArray datas = new JSONArray();
|
||||
Long formId = ebuilderBaseMapper.getFormIdByTableName(baseParam, "uf_jcl_employee_information");
|
||||
List<JSONObject> jsonObjectList = new ArrayList<>();
|
||||
Long formId = ebuilderBaseMapper.getFormIdByTableName(baseParam, "uf_jcl_rzgl");
|
||||
|
||||
for (Map.Entry<String, List<FileUploadLoad>> entry : fileUploadMap.entrySet()) {
|
||||
String jobNum = entry.getKey();
|
||||
// 入职记录ID
|
||||
|
|
@ -132,23 +132,12 @@ public class EntryManageServiceImpl implements EntryManageService {
|
|||
dataObj.put("mainTable", mainDataObj);
|
||||
log.error("dataObj===" + dataObj);
|
||||
datas.add(dataObj);
|
||||
|
||||
jsonObjectList.add(mainDataObj);
|
||||
}
|
||||
|
||||
Long objId = ebuilderBaseMapper.getObjIdByTableName(baseParam, "uf_jcl_employee_information");
|
||||
Long objId = ebuilderBaseMapper.getObjIdByTableName(baseParam, "uf_jcl_rzgl");
|
||||
Long userId = UserContext.getCurrentUser().getEmployeeId();
|
||||
|
||||
String updateMsg = updateEbTable(datas, String.valueOf(objId), String.valueOf(userId));
|
||||
|
||||
// 更新系统人员表数据
|
||||
for (JSONObject jsonObject : jsonObjectList) {
|
||||
Long id = jsonObject.getLong("id");
|
||||
entryManageMapper.updateFilesInfo(baseParam, id);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Map<String, Object> actionMap = new HashMap<>();
|
||||
actionMap.put("updateMsg", updateMsg);
|
||||
return WeaResult.success(actionMap);
|
||||
|
|
|
|||
|
|
@ -33,11 +33,6 @@ public class BaseParam {
|
|||
// * 员工自定义表
|
||||
// */
|
||||
//private String table_emp_cus = "ft_1152026012537184302";
|
||||
|
||||
/**
|
||||
* 人事档案-个人信息表
|
||||
*/
|
||||
private String table_hr_cus = "ft_1152116439014449153";
|
||||
/**
|
||||
* 租户标识
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,4 +123,11 @@ public interface HrbpPortalMapper {
|
|||
*/
|
||||
int getLeaveCount(HrbpParam param);
|
||||
|
||||
/**
|
||||
* hrbp可查看的应出勤人数
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
int getKqRequireByBp(HrbpParam param);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.weaver.seconddev.portal.service.HrbpPortalService;
|
|||
import com.weaver.teams.security.context.UserContext;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
|
@ -33,6 +34,11 @@ public class HrbpPortalServiceImpl implements HrbpPortalService {
|
|||
@Autowired
|
||||
PortalMapper portalMapper;
|
||||
|
||||
@Value("#{'${portal.dept.matrixId}'}")
|
||||
private String matrixId;
|
||||
@Value("#{'${portal.dept.matrixValueConfigId}'}")
|
||||
private String matrixValueConfigId;
|
||||
|
||||
@Override
|
||||
public WeaResult<Map<String, Object>> getToDo(Map<String, String> params) {
|
||||
|
||||
|
|
@ -114,7 +120,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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -175,4 +175,22 @@
|
|||
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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue