generated from dxfeng/secondev-wugang-dxfeng
Compare commits
6 Commits
67dfa72bf0
...
eb3edfeca8
| Author | SHA1 | Date |
|---|---|---|
|
|
eb3edfeca8 | |
|
|
92597d7cf2 | |
|
|
972a751328 | |
|
|
3339821988 | |
|
|
985711fb66 | |
|
|
b5a7c535da |
|
|
@ -0,0 +1,43 @@
|
|||
package com.weaver.seconddev.portal.controller;
|
||||
|
||||
import com.weaver.common.authority.annotation.WeaPermission;
|
||||
import com.weaver.common.base.entity.result.WeaResult;
|
||||
import com.weaver.seconddev.portal.entity.po.EmployeeBasicInfoPo;
|
||||
import com.weaver.seconddev.portal.service.EmployeePortalService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/07/11
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/secondev/portal/employee")
|
||||
@WeaPermission(publicPermission = true)
|
||||
public class EmployeePortalController {
|
||||
|
||||
@Autowired
|
||||
EmployeePortalService employeePortalService;
|
||||
|
||||
@PostMapping("/getDurationOfEmployment")
|
||||
private WeaResult<Map<String, Object>> getDurationOfEmployment(@RequestBody Map<String, String> params) {
|
||||
return employeePortalService.getDurationOfEmployment(params);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/getEmployeeInfo")
|
||||
private WeaResult<EmployeeBasicInfoPo> getEmployeeInfo(@RequestHeader Map<String, String> header, @RequestBody Map<String, Object> params) {
|
||||
String origin = header.get("origin");
|
||||
// 考勤标准接口
|
||||
String otherApiUrl = origin + "/api/attend/web/attendInfoV2/getAttendInfoStatis";
|
||||
params.put("otherApiUrl", otherApiUrl);
|
||||
params.put("header",header);
|
||||
return employeePortalService.getEmployeeInfo(params);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
package com.weaver.seconddev.portal.controller;
|
||||
|
||||
import com.weaver.common.authority.annotation.WeaPermission;
|
||||
import com.weaver.common.base.entity.result.WeaResult;
|
||||
import com.weaver.seconddev.portal.service.HrbpPortalService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/07/10
|
||||
* @version: 1.0
|
||||
*/
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/secondev/portal/hrbp")
|
||||
@WeaPermission(publicPermission = true)
|
||||
public class HrbpPortalController {
|
||||
|
||||
@Autowired
|
||||
HrbpPortalService hrPortalService;
|
||||
|
||||
|
||||
@PostMapping("/getToDo")
|
||||
private WeaResult<Map<String, Object>> getToDo(@RequestBody Map<String, String> params) {
|
||||
return hrPortalService.getToDo(params);
|
||||
}
|
||||
|
||||
@PostMapping("/getEmployeeData")
|
||||
private WeaResult<Map<String, Object>> getEmployeeData(@RequestBody Map<String, String> params) {
|
||||
return hrPortalService.getEmployeeData(params);
|
||||
}
|
||||
|
||||
@PostMapping("/getTodayOverview")
|
||||
private WeaResult<Map<String, Object>> getTodayOverview(@RequestBody Map<String, String> params) {
|
||||
return hrPortalService.getTodayOverview(params);
|
||||
}
|
||||
}
|
||||
|
|
@ -2,7 +2,6 @@ package com.weaver.seconddev.portal.controller;
|
|||
|
||||
import com.weaver.common.authority.annotation.WeaPermission;
|
||||
import com.weaver.common.base.entity.result.WeaResult;
|
||||
import com.weaver.seconddev.portal.entity.po.PortalPO;
|
||||
import com.weaver.seconddev.portal.service.ManagerPortalService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -11,7 +10,6 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
|
@ -49,7 +47,7 @@ public class ManagerPortalController {
|
|||
}
|
||||
|
||||
@PostMapping("/getEducationInfo")
|
||||
private WeaResult<List<PortalPO>> getEducationInfo(@RequestBody Map<String, String> params) {
|
||||
private WeaResult<Map<String, Object>> getEducationInfo(@RequestBody Map<String, String> params) {
|
||||
return managerPortalService.getEducationInfo(params);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
package com.weaver.seconddev.portal.controller;
|
||||
|
||||
import com.weaver.common.authority.annotation.WeaPermission;
|
||||
import com.weaver.common.base.entity.result.WeaResult;
|
||||
import com.weaver.seconddev.portal.entity.po.ExpirationReminderPo;
|
||||
import com.weaver.seconddev.portal.service.SscPortalService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/07/15
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/secondev/portal/ssc")
|
||||
@WeaPermission(publicPermission = true)
|
||||
public class SscPortalController {
|
||||
|
||||
@Autowired
|
||||
SscPortalService sscPortalService;
|
||||
|
||||
@PostMapping("/getExpirationReminder")
|
||||
private WeaResult<ExpirationReminderPo> getExpirationReminder(@RequestBody Map<String, String> params) {
|
||||
return sscPortalService.getExpirationReminder(params);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.weaver.seconddev.portal.entity.param;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/07/11
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class BaseParam {
|
||||
private String e10_common = "e10_common";
|
||||
private String e10_core_business = "e10_core_business";
|
||||
private String e10_other_business = "e10_other_business";
|
||||
private String ec_secondev = "ec_secondev";
|
||||
private String eteams = "eteams";
|
||||
|
||||
private String table_dept_cus = "ft_1154218872715993098";
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
package com.weaver.seconddev.portal.entity.param;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
|
|
@ -10,7 +11,8 @@ import java.util.Set;
|
|||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class BasicPersonnelParam {
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BasicPersonnelParam extends BaseParam{
|
||||
private Set<Long> departmentIdList;
|
||||
private String searchType;
|
||||
private String startDate;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
package com.weaver.seconddev.portal.entity.param;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/07/14
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class EmployeePortalParam extends BaseParam {
|
||||
private Long employeeId;
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.weaver.seconddev.portal.entity.param;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/07/10
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class HrbpParam extends BaseParam{
|
||||
private String tenantKey;
|
||||
private Set<Long> departmentIdList;
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
package com.weaver.seconddev.portal.entity.param;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
|
|
@ -10,7 +11,8 @@ import java.util.Set;
|
|||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class SearchConditionParam {
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class SearchConditionParam extends BaseParam{
|
||||
private String tenantKey;
|
||||
private String departmentId;
|
||||
private Set<Long> departmentIdList;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
package com.weaver.seconddev.portal.entity.param;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/07/15
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class SscParam extends BaseParam {
|
||||
private String tenantKey;
|
||||
private Set<Long> departmentIdList;
|
||||
private String currentDate;
|
||||
}
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
package com.weaver.seconddev.portal.entity.po;
|
||||
|
||||
import com.weaver.teams.domain.user.Avatar;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/07/14
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class EmployeeBasicInfoPo {
|
||||
private Long employeeId;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String userName;
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
private Avatar avatar;
|
||||
/**
|
||||
* 工号
|
||||
*/
|
||||
private String workCode;
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
private String companyName;
|
||||
/**
|
||||
* 入职日期
|
||||
*/
|
||||
private Date hireDate;
|
||||
/**
|
||||
* 人员状态
|
||||
*/
|
||||
private String employeeStatus;
|
||||
/**
|
||||
* 直接上级
|
||||
*/
|
||||
private String directSuperior;
|
||||
/**
|
||||
* 年假余额
|
||||
*/
|
||||
private String annualLeaveBalance;
|
||||
private String annualLeaveBalanceUrl;
|
||||
/**
|
||||
* 调休余额
|
||||
*/
|
||||
private String leaveBalance;
|
||||
private String leaveBalanceUrl;
|
||||
/**
|
||||
* 带薪病假余额
|
||||
*/
|
||||
private String paidSickLeaveBalance;
|
||||
private String paidSickLeaveBalanceUrl;
|
||||
/**
|
||||
* 应出勤天数
|
||||
*/
|
||||
private String expectedAttendance;
|
||||
private String expectedAttendanceUrl;
|
||||
/**
|
||||
* 实际出勤
|
||||
*/
|
||||
private String actualAttendance;
|
||||
private String actualAttendanceUrl;
|
||||
/**
|
||||
* 请假
|
||||
*/
|
||||
private String leave;
|
||||
private String leaveUrl;
|
||||
/**
|
||||
* 出差
|
||||
*/
|
||||
private String travel;
|
||||
private String travelUrl;
|
||||
/**
|
||||
* 加班
|
||||
*/
|
||||
private String overtime;
|
||||
private String overtimeUrl;
|
||||
/**
|
||||
* 公出
|
||||
*/
|
||||
private String publicLeave;
|
||||
private String publicLeaveUrl;
|
||||
/**
|
||||
* 异常出勤
|
||||
*/
|
||||
private String exceptionalAttendance;
|
||||
private String exceptionalAttendanceUrl;
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.weaver.seconddev.portal.entity.po;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/07/15
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class ExpirationReminderPo {
|
||||
/**
|
||||
* 合同到期
|
||||
*/
|
||||
private int contractExpiration;
|
||||
private String contractExpirationUrl;
|
||||
/**
|
||||
* 身份证到期
|
||||
*/
|
||||
private int idCardExpiration;
|
||||
private String idCardExpirationUrl;
|
||||
/**
|
||||
* 健康证到期
|
||||
*/
|
||||
private int healthCertificateExpiration;
|
||||
private String healthCertificateExpirationUrl;
|
||||
/**
|
||||
* 入职周年提醒
|
||||
*/
|
||||
private int employmentAnniversary;
|
||||
private String employmentAnniversaryUrl;
|
||||
/**
|
||||
* 管理层生日提醒
|
||||
*/
|
||||
private int birthdayNum;
|
||||
private String birthdayNumUrl;
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.weaver.seconddev.portal.entity.po;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/07/11
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class PortalUrlDetail {
|
||||
private String id;
|
||||
private String detailKey;
|
||||
private String urlAddress;
|
||||
private String detailName;
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
package com.weaver.seconddev.portal.enums;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/07/14
|
||||
* @version: 1.0
|
||||
*/
|
||||
public enum PersonnelStatusEnum {
|
||||
/**
|
||||
* 1 试用、2 试用延期、3 正式、4 临时、5 实习、6 离职、7 退休、9 解聘、10 无效
|
||||
*/
|
||||
TRY_OUT("1", "试用"),
|
||||
TRY_OUT_DELAY("2", "试用延期"),
|
||||
FORMAL("3", "正式"),
|
||||
TEMPORARY("4", "临时"),
|
||||
INTERNSHIP("5", "实习"),
|
||||
LEAVE("6", "离职"),
|
||||
RETIRED("7", "退休"),
|
||||
INVALID("9", "解聘"),
|
||||
QUIT("10", "无效");
|
||||
|
||||
PersonnelStatusEnum(String value, String showName) {
|
||||
this.value = value;
|
||||
this.showName = showName;
|
||||
}
|
||||
|
||||
private String value;
|
||||
private String showName;
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getShowName() {
|
||||
return showName;
|
||||
}
|
||||
|
||||
public void setShowName(String showName) {
|
||||
this.showName = showName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据value获取showName
|
||||
*
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
public static String getShowNameByValue(String value) {
|
||||
for (PersonnelStatusEnum item : PersonnelStatusEnum.values()) {
|
||||
if (item.getValue().equalsIgnoreCase(value)) {
|
||||
return item.getShowName();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.weaver.seconddev.portal.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/07/11
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface EmployeePortalMapper {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
package com.weaver.seconddev.portal.mapper;
|
||||
|
||||
import com.weaver.seconddev.portal.entity.param.HrbpParam;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/07/10
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface HrbpPortalMapper {
|
||||
|
||||
/**
|
||||
* 待入职
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
int getToEntryCount(HrbpParam param);
|
||||
|
||||
/**
|
||||
* 待转正
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
int getToRegularCount(HrbpParam param);
|
||||
|
||||
/**
|
||||
* 待离职
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
int getToLeaveCount(HrbpParam param);
|
||||
|
||||
/**
|
||||
* 待签订
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
int getToSignCount(HrbpParam param);
|
||||
|
||||
/**
|
||||
* 代理期转正
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
int getToProxyCount(HrbpParam param);
|
||||
|
||||
/**
|
||||
* 员工人数
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
int getAllEmployeeCount(HrbpParam param);
|
||||
|
||||
/**
|
||||
* 正式员工
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
int getFormalEmployeeCount(HrbpParam param);
|
||||
|
||||
/**
|
||||
* 实习生
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
int getInternEmployeeCount(HrbpParam param);
|
||||
|
||||
/**
|
||||
* 外包
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
int getOutsourcingCount(HrbpParam param);
|
||||
|
||||
/**
|
||||
* 劳务
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
int getLaborCount(HrbpParam param);
|
||||
|
||||
/**
|
||||
* 试用
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
int getProbationCount(HrbpParam param);
|
||||
|
||||
/**
|
||||
* 正式
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
int getFormalCount(HrbpParam param);
|
||||
|
||||
/**
|
||||
* 实习
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
int getInternCount(HrbpParam param);
|
||||
|
||||
/**
|
||||
* 离职
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
int getLeaveCount(HrbpParam param);
|
||||
|
||||
}
|
||||
|
|
@ -37,79 +37,79 @@ public interface LeaderCockpitMapper {
|
|||
/**
|
||||
* 查询入职人数
|
||||
*
|
||||
* @param tenantKey
|
||||
* @param param
|
||||
* @param departmentIdList
|
||||
* @param startDate
|
||||
* @param endDate
|
||||
* @return
|
||||
*/
|
||||
int getEmploymentCount(@Param("tenantKey") String tenantKey, @Param("departmentIdList") Collection<Long> departmentIdList, @Param("startDate") String startDate, @Param("endDate") String endDate);
|
||||
int getEmploymentCount(@Param("param") SearchConditionParam param, @Param("departmentIdList") Collection<Long> departmentIdList, @Param("startDate") String startDate, @Param("endDate") String endDate);
|
||||
|
||||
/**
|
||||
* 查询入职人数列表
|
||||
*
|
||||
* @param tenantKey
|
||||
* @param param
|
||||
* @param departmentIdList
|
||||
* @param startDate
|
||||
* @param endDate
|
||||
* @return
|
||||
*/
|
||||
List<PortalPO> getEmploymentListByPosition(@Param("tenantKey") String tenantKey, @Param("departmentIdList") Collection<Long> departmentIdList, @Param("startDate") String startDate, @Param("endDate") String endDate);
|
||||
List<PortalPO> getEmploymentListByPosition(@Param("param") SearchConditionParam param, @Param("departmentIdList") Collection<Long> departmentIdList, @Param("startDate") String startDate, @Param("endDate") String endDate);
|
||||
|
||||
/**
|
||||
* 查询关键入职人数
|
||||
*
|
||||
* @param tenantKey
|
||||
* @param param
|
||||
* @param departmentIdList
|
||||
* @param startDate
|
||||
* @param endDate
|
||||
* @return
|
||||
*/
|
||||
int getKeyEmploymentCount(@Param("tenantKey") String tenantKey, @Param("departmentIdList") Collection<Long> departmentIdList, @Param("startDate") String startDate, @Param("endDate") String endDate);
|
||||
int getKeyEmploymentCount(@Param("param") SearchConditionParam param, @Param("departmentIdList") Collection<Long> departmentIdList, @Param("startDate") String startDate, @Param("endDate") String endDate);
|
||||
|
||||
|
||||
/**
|
||||
* 查询离职人数
|
||||
*
|
||||
* @param tenantKey
|
||||
* @param param
|
||||
* @param departmentIdList
|
||||
* @param startDate
|
||||
* @param endDate
|
||||
* @return
|
||||
*/
|
||||
int getResignCount(@Param("tenantKey") String tenantKey, @Param("departmentIdList") Collection<Long> departmentIdList, @Param("startDate") String startDate, @Param("endDate") String endDate);
|
||||
int getResignCount(@Param("param") SearchConditionParam param, @Param("departmentIdList") Collection<Long> departmentIdList, @Param("startDate") String startDate, @Param("endDate") String endDate);
|
||||
|
||||
/**
|
||||
* 查询关键离职人数
|
||||
*
|
||||
* @param tenantKey
|
||||
* @param param
|
||||
* @param departmentIdList
|
||||
* @param startDate
|
||||
* @param endDate
|
||||
* @return
|
||||
*/
|
||||
int getKeyResignCount(@Param("tenantKey") String tenantKey, @Param("departmentIdList") Collection<Long> departmentIdList, @Param("startDate") String startDate, @Param("endDate") String endDate);
|
||||
int getKeyResignCount(@Param("param") SearchConditionParam param, @Param("departmentIdList") Collection<Long> departmentIdList, @Param("startDate") String startDate, @Param("endDate") String endDate);
|
||||
|
||||
/**
|
||||
* 查询离职人数列表
|
||||
*
|
||||
* @param tenantKey
|
||||
* @param param
|
||||
* @param departmentIdList
|
||||
* @param startDate
|
||||
* @param endDate
|
||||
* @return
|
||||
*/
|
||||
List<PortalPO> getResignListByPosition(@Param("tenantKey") String tenantKey, @Param("departmentIdList") Collection<Long> departmentIdList, @Param("startDate") String startDate, @Param("endDate") String endDate);
|
||||
List<PortalPO> getResignListByPosition(@Param("param") SearchConditionParam param, @Param("departmentIdList") Collection<Long> departmentIdList, @Param("startDate") String startDate, @Param("endDate") String endDate);
|
||||
|
||||
|
||||
Position getPositionById(@Param("tenantKey") String tenantKey, @Param("positionId") String positionId);
|
||||
Position getPositionById(@Param("param") SearchConditionParam param, @Param("positionId") String positionId);
|
||||
|
||||
/**
|
||||
* 获取顶级部门id列表
|
||||
*
|
||||
* @param tenantKey
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
Set<Long> getTopDepartmentIds(@Param("tenantKey") String tenantKey);
|
||||
Set<Long> getTopDepartmentIds(@Param("param") SearchConditionParam param);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,11 +59,11 @@ public interface ManagerPortalMapper {
|
|||
/**
|
||||
* 获取所负责的顶级部门
|
||||
*
|
||||
* @param tenantKey
|
||||
* @param param
|
||||
* @param emdId
|
||||
* @return
|
||||
*/
|
||||
List<Long> getManageDeptIds(@Param("tenantKey") String tenantKey, @Param("empId") Long emdId);
|
||||
List<Long> getManageDeptIds(@Param("param") BasicPersonnelParam param, @Param("empId") Long emdId);
|
||||
|
||||
/**
|
||||
* 获取生日人数
|
||||
|
|
@ -101,24 +101,24 @@ public interface ManagerPortalMapper {
|
|||
/**
|
||||
* 获取年龄统计数据
|
||||
*
|
||||
* @param tenantKey
|
||||
* @param param
|
||||
* @param departmentIdList
|
||||
* @param startIndex
|
||||
* @param endIndex
|
||||
* @return
|
||||
*/
|
||||
Integer getAgeCount(@Param("tenantKey") String tenantKey, @Param("departmentIdList") Collection<Long> departmentIdList, @Param("startIndex") Integer startIndex, @Param("endIndex") Integer endIndex);
|
||||
Integer getAgeCount(@Param("param") BasicPersonnelParam param, @Param("departmentIdList") Collection<Long> departmentIdList, @Param("startIndex") Integer startIndex, @Param("endIndex") Integer endIndex);
|
||||
|
||||
/**
|
||||
* 获取司龄统计数据
|
||||
*
|
||||
* @param tenantKey
|
||||
* @param param
|
||||
* @param departmentIdList
|
||||
* @param startIndex
|
||||
* @param endIndex
|
||||
* @return
|
||||
*/
|
||||
Integer getComapnyCount(@Param("tenantKey") String tenantKey, @Param("departmentIdList") Collection<Long> departmentIdList, @Param("startIndex") Integer startIndex, @Param("endIndex") Integer endIndex);
|
||||
Integer getComapnyCount(@Param("param") BasicPersonnelParam param, @Param("departmentIdList") Collection<Long> departmentIdList, @Param("startIndex") Integer startIndex, @Param("endIndex") Integer endIndex);
|
||||
|
||||
/**
|
||||
* 饼状图配置信息
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
package com.weaver.seconddev.portal.mapper;
|
||||
|
||||
import com.weaver.seconddev.portal.entity.po.PortalUrlDetail;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/07/11
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface PortalMapper {
|
||||
List<PortalUrlDetail> getPortalUrlDetail(@Param("tenantKey") String tenantKey,@Param("portalKey") String portalKey,@Param("componentKey") String componentKey);
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
package com.weaver.seconddev.portal.mapper;
|
||||
|
||||
import com.weaver.seconddev.portal.entity.param.SscParam;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/07/15
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface SscPortalMapper {
|
||||
|
||||
/**
|
||||
* 合同到期
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
int getExpirationReminderCount(SscParam param);
|
||||
|
||||
/**
|
||||
* 身份证到期
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
int getIdCardExpirationCount(SscParam param);
|
||||
|
||||
/**
|
||||
* 健康证到期
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
int getHealthCertificateExpirationCount(SscParam param);
|
||||
|
||||
/**
|
||||
* 入职周年提醒
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
int getEmploymentAnniversaryCount(SscParam param);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.weaver.seconddev.portal.service;
|
||||
|
||||
import com.weaver.common.base.entity.result.WeaResult;
|
||||
import com.weaver.seconddev.portal.entity.po.EmployeeBasicInfoPo;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/07/11
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface EmployeePortalService {
|
||||
/**
|
||||
* 获取员工工作时长
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
WeaResult<Map<String, Object>> getDurationOfEmployment(Map<String, String> params);
|
||||
|
||||
/**
|
||||
* 获取员工信息
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
WeaResult<EmployeeBasicInfoPo> getEmployeeInfo(Map<String, Object> params);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.weaver.seconddev.portal.service;
|
||||
|
||||
import com.weaver.common.base.entity.result.WeaResult;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/07/10
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface HrbpPortalService {
|
||||
|
||||
/**
|
||||
* 获取待办事项
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
WeaResult<Map<String, Object>> getToDo(Map<String, String> params);
|
||||
|
||||
/**
|
||||
* 获取员工数据
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
WeaResult<Map<String, Object>> getEmployeeData(Map<String, String> params);
|
||||
|
||||
/**
|
||||
* 今日概况
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
WeaResult<Map<String, Object>> getTodayOverview(Map<String, String> params);
|
||||
}
|
||||
|
|
@ -1,9 +1,7 @@
|
|||
package com.weaver.seconddev.portal.service;
|
||||
|
||||
import com.weaver.common.base.entity.result.WeaResult;
|
||||
import com.weaver.seconddev.portal.entity.po.PortalPO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
|
@ -55,7 +53,7 @@ public interface ManagerPortalService {
|
|||
* @param params
|
||||
* @return
|
||||
*/
|
||||
WeaResult<List<PortalPO>> getEducationInfo(Map<String, String> params);
|
||||
WeaResult<Map<String, Object>> getEducationInfo(Map<String, String> params);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
package com.weaver.seconddev.portal.service;
|
||||
|
||||
import com.weaver.common.base.entity.result.WeaResult;
|
||||
import com.weaver.seconddev.portal.entity.po.ExpirationReminderPo;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/07/15
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface SscPortalService {
|
||||
/**
|
||||
* 到期提醒
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
WeaResult<ExpirationReminderPo> getExpirationReminder(Map<String, String> params);
|
||||
}
|
||||
|
|
@ -0,0 +1,208 @@
|
|||
package com.weaver.seconddev.portal.service.impl;
|
||||
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.weaver.common.base.entity.result.WeaResult;
|
||||
import com.weaver.common.hr.util.Util;
|
||||
import com.weaver.common.hrm.dao.HrmCommonEmployeeDao;
|
||||
import com.weaver.seconddev.portal.entity.po.EmployeeBasicInfoPo;
|
||||
import com.weaver.seconddev.portal.entity.po.PortalUrlDetail;
|
||||
import com.weaver.seconddev.portal.enums.PersonnelStatusEnum;
|
||||
import com.weaver.seconddev.portal.mapper.PortalMapper;
|
||||
import com.weaver.seconddev.portal.service.EmployeePortalService;
|
||||
import com.weaver.seconddev.portal.util.DateUtil;
|
||||
import com.weaver.teams.domain.user.Avatar;
|
||||
import com.weaver.teams.domain.user.SimpleEmployee;
|
||||
import com.weaver.teams.security.context.UserContext;
|
||||
import com.weaver.teams.security.user.User;
|
||||
import com.weaver.workflow.common.cfg.org.service.DepartMentService;
|
||||
import com.weaver.workflow.common.entity.org.WeaDepartMent;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/07/11
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class EmployeePortalServiceImpl implements EmployeePortalService {
|
||||
|
||||
private static final String PORTAL_KEY = "employeePortal";
|
||||
|
||||
@Autowired
|
||||
HrmCommonEmployeeDao hrmCommonEmployeeDao;
|
||||
|
||||
@Autowired
|
||||
DepartMentService departMentService;
|
||||
|
||||
@Autowired
|
||||
PortalMapper portalMapper;
|
||||
|
||||
@Override
|
||||
public WeaResult<Map<String, Object>> getDurationOfEmployment(Map<String, String> params) {
|
||||
User currentUser = UserContext.getCurrentUser();
|
||||
SimpleEmployee byId = hrmCommonEmployeeDao.getById(currentUser.getEmployeeId());
|
||||
|
||||
LocalDate localDate = DateUtil.toLocalDate(byId.getHiredate());
|
||||
// 计算入职日期到现在的天数
|
||||
long days = DateUtil.daysBetween(DateUtil.formatDate(localDate), DateUtil.getCurrentDateStr());
|
||||
|
||||
Map<String, Object> returnMap = new HashMap<>(1);
|
||||
returnMap.put("days", days);
|
||||
return WeaResult.success(returnMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WeaResult<EmployeeBasicInfoPo> getEmployeeInfo(Map<String, Object> params) {
|
||||
User currentUser = UserContext.getCurrentUser();
|
||||
EmployeeBasicInfoPo employeeBasicInfoPo = new EmployeeBasicInfoPo();
|
||||
employeeBasicInfoPo.setEmployeeId(currentUser.getEmployeeId());
|
||||
|
||||
SimpleEmployee byId = hrmCommonEmployeeDao.getById(currentUser.getEmployeeId());
|
||||
log.error("byId===" + JSON.toJSONString(byId));
|
||||
Avatar avatar = byId.getAvatar();
|
||||
employeeBasicInfoPo.setAvatar(avatar);
|
||||
employeeBasicInfoPo.setUserName(byId.getUsername());
|
||||
employeeBasicInfoPo.setWorkCode(byId.getJobNum());
|
||||
WeaDepartMent departmentById = departMentService.getDepartMentById(byId.getDepartmentId());
|
||||
log.error("departmentById===" + departmentById);
|
||||
employeeBasicInfoPo.setCompanyName(null != departmentById ? departmentById.getDepartMentName() : "");
|
||||
|
||||
employeeBasicInfoPo.setHireDate(byId.getHiredate());
|
||||
employeeBasicInfoPo.setEmployeeStatus(PersonnelStatusEnum.getShowNameByValue(byId.getPersonnelStatus()));
|
||||
|
||||
SimpleEmployee superior = byId.getSuperior();
|
||||
log.error("superior===" + JSON.toJSONString(superior));
|
||||
|
||||
employeeBasicInfoPo.setDirectSuperior(null != superior ? superior.getUsername() : "");
|
||||
|
||||
|
||||
// 考勤信息
|
||||
buildAttendance(params, employeeBasicInfoPo);
|
||||
|
||||
// 穿透地址处理
|
||||
List<PortalUrlDetail> portalUrlDetails = portalMapper.getPortalUrlDetail(currentUser.getTenantKey(), PORTAL_KEY, "getEmployeeInfo");
|
||||
Map<String, String> urlMap = portalUrlDetails.stream().collect(Collectors.toMap(PortalUrlDetail::getDetailKey, PortalUrlDetail::getUrlAddress));
|
||||
employeeBasicInfoPo.setAnnualLeaveBalanceUrl(urlMap.get("annualLeaveBalance"));
|
||||
employeeBasicInfoPo.setLeaveBalanceUrl(urlMap.get("leaveBalance"));
|
||||
employeeBasicInfoPo.setPaidSickLeaveBalanceUrl(urlMap.get("paidSickLeaveBalance"));
|
||||
employeeBasicInfoPo.setExpectedAttendanceUrl(urlMap.get("expectedAttendance"));
|
||||
employeeBasicInfoPo.setActualAttendanceUrl(urlMap.get("actualAttendance"));
|
||||
employeeBasicInfoPo.setLeaveUrl(urlMap.get("leave"));
|
||||
employeeBasicInfoPo.setTravelUrl(urlMap.get("travel"));
|
||||
employeeBasicInfoPo.setOvertimeUrl(urlMap.get("overtime"));
|
||||
employeeBasicInfoPo.setPublicLeaveUrl(urlMap.get("publicLeave"));
|
||||
employeeBasicInfoPo.setExceptionalAttendanceUrl(urlMap.get("exceptionalAttendance"));
|
||||
|
||||
|
||||
return WeaResult.success(employeeBasicInfoPo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建考勤信息
|
||||
*
|
||||
* @param params
|
||||
* @param employeeBasicInfoPo
|
||||
*/
|
||||
private void buildAttendance(Map<String, Object> params, EmployeeBasicInfoPo employeeBasicInfoPo) {
|
||||
String url = Util.null2String(params.get("otherApiUrl"));
|
||||
Map<String, String> header = (Map<String, String>) params.get("header");
|
||||
|
||||
String beginDate = DateUtil.getFirstDayOfMonth();
|
||||
String endDate = DateUtil.getLastDayOfMonth();
|
||||
Long userId = employeeBasicInfoPo.getEmployeeId();
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("beginDate", beginDate);
|
||||
jsonObject.put("endDate", endDate);
|
||||
jsonObject.put("userId", String.valueOf(userId));
|
||||
|
||||
String resultStr = HttpRequest.post(url).headerMap(header, true)
|
||||
.body(jsonObject.toJSONString()).execute().body();
|
||||
|
||||
if (resultStr != null) {
|
||||
JSONObject response = JSON.parseObject(resultStr);
|
||||
if (response.getBoolean("status") && 200 == response.getIntValue("code")) {
|
||||
JSONObject data = response.getJSONObject("data");
|
||||
|
||||
// 考勤信息
|
||||
JSONObject attendStatis = data.getJSONObject("attendStatis");
|
||||
if (attendStatis != null) {
|
||||
JSONObject periodLength = attendStatis.getJSONObject("periodLength");
|
||||
employeeBasicInfoPo.setExpectedAttendance(null == periodLength ? "0" : periodLength.getString("value"));
|
||||
JSONObject actual = attendStatis.getJSONObject("actual");
|
||||
employeeBasicInfoPo.setActualAttendance(null == actual ? "0" : actual.getString("value"));
|
||||
JSONObject lostLength = attendStatis.getJSONObject("lostLength");
|
||||
employeeBasicInfoPo.setExceptionalAttendance(null == lostLength ? "0" : lostLength.getString("value"));
|
||||
}
|
||||
|
||||
JSONArray attendSummaryData = data.getJSONObject("attendSummary").getJSONArray("data");
|
||||
if (attendSummaryData != null) {
|
||||
for (int i = 0; i < attendSummaryData.size(); i++) {
|
||||
JSONObject item = attendSummaryData.getJSONObject(i);
|
||||
String key = item.getString("key");
|
||||
String value = item.getString("value");
|
||||
|
||||
switch (key) {
|
||||
case "LEAVE":
|
||||
employeeBasicInfoPo.setLeave(value);
|
||||
break;
|
||||
case "BUSINESS":
|
||||
employeeBasicInfoPo.setTravel(value);
|
||||
break;
|
||||
case "OUT_SIDE":
|
||||
employeeBasicInfoPo.setPublicLeave(value);
|
||||
break;
|
||||
case "OVERTIME":
|
||||
employeeBasicInfoPo.setOvertime(value);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 假期余额信息
|
||||
JSONArray vacationBalanceList = data.getJSONArray("vacationBalanceList");
|
||||
if (vacationBalanceList != null) {
|
||||
for (int i = 0; i < vacationBalanceList.size(); i++) {
|
||||
JSONObject vacationItem = vacationBalanceList.getJSONObject(i);
|
||||
String title = vacationItem.getString("title");
|
||||
JSONArray dataArray = vacationItem.getJSONArray("data");
|
||||
|
||||
if (dataArray != null && dataArray.size() > 0) {
|
||||
JSONObject totalItem = dataArray.getJSONObject(dataArray.size() - 1);
|
||||
String totalValue = totalItem.getString("value");
|
||||
|
||||
switch (title) {
|
||||
case "年假":
|
||||
employeeBasicInfoPo.setAnnualLeaveBalance(totalValue);
|
||||
break;
|
||||
case "调休假":
|
||||
employeeBasicInfoPo.setLeaveBalance(totalValue);
|
||||
break;
|
||||
case "带薪病假":
|
||||
employeeBasicInfoPo.setPaidSickLeaveBalance(totalValue);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,120 @@
|
|||
package com.weaver.seconddev.portal.service.impl;
|
||||
|
||||
import com.weaver.common.base.entity.result.WeaResult;
|
||||
import com.weaver.seconddev.portal.entity.param.HrbpParam;
|
||||
import com.weaver.seconddev.portal.entity.po.PortalUrlDetail;
|
||||
import com.weaver.seconddev.portal.mapper.HrbpPortalMapper;
|
||||
import com.weaver.seconddev.portal.mapper.PortalMapper;
|
||||
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.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/07/10
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class HrbpPortalServiceImpl implements HrbpPortalService {
|
||||
|
||||
private static final String PORTAL_KEY = "hrbpPortal";
|
||||
|
||||
@Autowired
|
||||
HrbpPortalMapper hrbpPortalMapper;
|
||||
|
||||
@Autowired
|
||||
PortalMapper portalMapper;
|
||||
|
||||
@Override
|
||||
public WeaResult<Map<String, Object>> getToDo(Map<String, String> params) {
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
HrbpParam hrbpParam = new HrbpParam();
|
||||
hrbpParam.setTenantKey(UserContext.getCurrentUser().getTenantKey());
|
||||
// 权限条件
|
||||
|
||||
|
||||
int toEntryCount = hrbpPortalMapper.getToEntryCount(hrbpParam);
|
||||
int toRegularCount = hrbpPortalMapper.getToRegularCount(hrbpParam);
|
||||
int toLeaveCount = hrbpPortalMapper.getToLeaveCount(hrbpParam);
|
||||
int toSignCount = hrbpPortalMapper.getToSignCount(hrbpParam);
|
||||
int toProxyCount = hrbpPortalMapper.getToProxyCount(hrbpParam);
|
||||
|
||||
List<PortalUrlDetail> portalUrlDetails = portalMapper.getPortalUrlDetail(hrbpParam.getTenantKey(), PORTAL_KEY, "getToDo");
|
||||
Map<String, String> urlMap = portalUrlDetails.stream().collect(Collectors.toMap(PortalUrlDetail::getDetailKey, PortalUrlDetail::getUrlAddress));
|
||||
|
||||
// 待入职
|
||||
map.put("entry", toEntryCount);
|
||||
map.put("entryUrl", urlMap.get("entry"));
|
||||
// 待转正
|
||||
map.put("regular", toRegularCount);
|
||||
map.put("regularUrl", urlMap.get("regular"));
|
||||
// 待离职
|
||||
map.put("leave", toLeaveCount);
|
||||
map.put("leaveUrl", urlMap.get("leave"));
|
||||
//TODO 待签订
|
||||
map.put("sign", toSignCount);
|
||||
map.put("signUrl", urlMap.get("sign"));
|
||||
//TODO 代理期转正
|
||||
map.put("proxy", toProxyCount);
|
||||
map.put("proxyUrl", urlMap.get("proxy"));
|
||||
return WeaResult.success(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WeaResult<Map<String, Object>> getEmployeeData(Map<String, String> params) {
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
HrbpParam hrbpParam = new HrbpParam();
|
||||
hrbpParam.setTenantKey(UserContext.getCurrentUser().getTenantKey());
|
||||
|
||||
List<PortalUrlDetail> portalUrlDetails = portalMapper.getPortalUrlDetail(hrbpParam.getTenantKey(), PORTAL_KEY, "getEmployeeData");
|
||||
Map<String, String> urlMap = portalUrlDetails.stream().collect(Collectors.toMap(PortalUrlDetail::getDetailKey, PortalUrlDetail::getUrlAddress));
|
||||
|
||||
|
||||
// 员工人数
|
||||
int allEmployeeCount = hrbpPortalMapper.getAllEmployeeCount(hrbpParam);
|
||||
map.put("allEmployee", allEmployeeCount);
|
||||
map.put("allEmployeeUrl", urlMap.get("allEmployee"));
|
||||
// 正式员工
|
||||
int formalEmployeeCount = hrbpPortalMapper.getFormalEmployeeCount(hrbpParam);
|
||||
map.put("formalEmployee", formalEmployeeCount);
|
||||
map.put("formalEmployeeUrl", urlMap.get("formalEmployee"));
|
||||
// 实习生
|
||||
map.put("internEmployee", hrbpPortalMapper.getInternEmployeeCount(hrbpParam));
|
||||
map.put("internEmployeeUrl", urlMap.get("internEmployee"));
|
||||
// 外包
|
||||
map.put("outsourcing", hrbpPortalMapper.getOutsourcingCount(hrbpParam));
|
||||
map.put("outsourcingUrl", urlMap.get("outsourcing"));
|
||||
// 劳务
|
||||
map.put("labor", hrbpPortalMapper.getLaborCount(hrbpParam));
|
||||
map.put("laborUrl", urlMap.get("labor"));
|
||||
// 试用
|
||||
map.put("probation", hrbpPortalMapper.getProbationCount(hrbpParam));
|
||||
map.put("probationUrl", urlMap.get("probation"));
|
||||
// 正式
|
||||
map.put("formal", hrbpPortalMapper.getFormalCount(hrbpParam));
|
||||
map.put("formalUrl", urlMap.get("formal"));
|
||||
// 实习
|
||||
map.put("intern", hrbpPortalMapper.getInternCount(hrbpParam));
|
||||
map.put("internUrl", urlMap.get("intern"));
|
||||
// 离职
|
||||
map.put("leave", hrbpPortalMapper.getLeaveCount(hrbpParam));
|
||||
map.put("leaveUrl", urlMap.get("leave"));
|
||||
return WeaResult.success(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WeaResult<Map<String, Object>> getTodayOverview(Map<String, String> params) {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -62,9 +62,9 @@ public class LeaderCockpitServiceImpl implements LeaderCockpitService {
|
|||
// 查询范围内在职人员
|
||||
int onJobCount = leaderCockpitMapper.getOnJobCount(searchConditionParam);
|
||||
// 查询范围内离职人员
|
||||
int resignCount = leaderCockpitMapper.getResignCount(searchConditionParam.getTenantKey(), searchConditionParam.getDepartmentIdList(), searchConditionParam.getStartDate(), searchConditionParam.getEndDate());
|
||||
int resignCount = leaderCockpitMapper.getResignCount(searchConditionParam, searchConditionParam.getDepartmentIdList(), searchConditionParam.getStartDate(), searchConditionParam.getEndDate());
|
||||
// 查询关键离职率
|
||||
int keyResignCount = leaderCockpitMapper.getKeyResignCount(searchConditionParam.getTenantKey(), searchConditionParam.getDepartmentIdList(), searchConditionParam.getStartDate(), searchConditionParam.getEndDate());
|
||||
int keyResignCount = leaderCockpitMapper.getKeyResignCount(searchConditionParam, searchConditionParam.getDepartmentIdList(), searchConditionParam.getStartDate(), searchConditionParam.getEndDate());
|
||||
// 计算离职率
|
||||
double turnoverRate = calculateRate(keyResignCount, onJobCount);
|
||||
//TODO 计算关键离职率
|
||||
|
|
@ -101,15 +101,15 @@ public class LeaderCockpitServiceImpl implements LeaderCockpitService {
|
|||
String month = DateUtil.formatToYearMonth_ZH(localDate);
|
||||
Map<String, Integer> allDataMap = new LinkedHashMap<>(3);
|
||||
Map<String, Integer> keyDataMap = new LinkedHashMap<>(3);
|
||||
allDataMap.put(month, leaderCockpitMapper.getEmploymentCount(searchConditionParam.getTenantKey(), searchConditionParam.getDepartmentIdList(), searchConditionParam.getStartDate(), searchConditionParam.getEndDate()));
|
||||
keyDataMap.put(month, leaderCockpitMapper.getKeyEmploymentCount(searchConditionParam.getTenantKey(), searchConditionParam.getDepartmentIdList(), searchConditionParam.getStartDate(), searchConditionParam.getEndDate()));
|
||||
allDataMap.put(month, leaderCockpitMapper.getEmploymentCount(searchConditionParam, searchConditionParam.getDepartmentIdList(), searchConditionParam.getStartDate(), searchConditionParam.getEndDate()));
|
||||
keyDataMap.put(month, leaderCockpitMapper.getKeyEmploymentCount(searchConditionParam, searchConditionParam.getDepartmentIdList(), searchConditionParam.getStartDate(), searchConditionParam.getEndDate()));
|
||||
|
||||
String firstDayOfMonthStr = DateUtil.getFirstDayOfPreviousMonthStr(searchConditionParam.getStartDate());
|
||||
String lastDayOfMonthStr = DateUtil.getLastDayOfPreviousMonthStr(searchConditionParam.getEndDate());
|
||||
// 前面5个月
|
||||
for (int i = 1; i < 7; i++) {
|
||||
allDataMap.put(DateUtil.formatToYearMonth_ZH(firstDayOfMonthStr), leaderCockpitMapper.getEmploymentCount(searchConditionParam.getTenantKey(), searchConditionParam.getDepartmentIdList(), firstDayOfMonthStr, lastDayOfMonthStr));
|
||||
keyDataMap.put(DateUtil.formatToYearMonth_ZH(firstDayOfMonthStr), leaderCockpitMapper.getKeyEmploymentCount(searchConditionParam.getTenantKey(), searchConditionParam.getDepartmentIdList(), firstDayOfMonthStr, lastDayOfMonthStr));
|
||||
allDataMap.put(DateUtil.formatToYearMonth_ZH(firstDayOfMonthStr), leaderCockpitMapper.getEmploymentCount(searchConditionParam, searchConditionParam.getDepartmentIdList(), firstDayOfMonthStr, lastDayOfMonthStr));
|
||||
keyDataMap.put(DateUtil.formatToYearMonth_ZH(firstDayOfMonthStr), leaderCockpitMapper.getKeyEmploymentCount(searchConditionParam, searchConditionParam.getDepartmentIdList(), firstDayOfMonthStr, lastDayOfMonthStr));
|
||||
firstDayOfMonthStr = DateUtil.getFirstDayOfPreviousMonthStr(searchConditionParam.getStartDate(), i);
|
||||
lastDayOfMonthStr = DateUtil.getLastDayOfPreviousMonthStr(searchConditionParam.getEndDate(), i);
|
||||
}
|
||||
|
|
@ -121,7 +121,7 @@ public class LeaderCockpitServiceImpl implements LeaderCockpitService {
|
|||
log.error("selectDepartmentId===" + JSON.toJSONString(selectDepartmentId));
|
||||
if (CollectionUtils.isEmpty(selectDepartmentId)) {
|
||||
// 未选择部门,查询所有一级部门数据
|
||||
selectDepartmentId = leaderCockpitMapper.getTopDepartmentIds(searchConditionParam.getTenantKey());
|
||||
selectDepartmentId = leaderCockpitMapper.getTopDepartmentIds(searchConditionParam);
|
||||
log.error("topDepartmentId===" + JSON.toJSONString(selectDepartmentId));
|
||||
}
|
||||
|
||||
|
|
@ -135,9 +135,9 @@ public class LeaderCockpitServiceImpl implements LeaderCockpitService {
|
|||
portalData.setDate(currentMonth);
|
||||
portalData.setDepart(departMentById.getDepartMentName());
|
||||
// 关键
|
||||
int keyEmploymentCount = leaderCockpitMapper.getKeyEmploymentCount(searchConditionParam.getTenantKey(), beLongDeps, searchConditionParam.getStartDate(), searchConditionParam.getEndDate());
|
||||
int keyEmploymentCount = leaderCockpitMapper.getKeyEmploymentCount(searchConditionParam, beLongDeps, searchConditionParam.getStartDate(), searchConditionParam.getEndDate());
|
||||
// 非关键
|
||||
int employmentCount = leaderCockpitMapper.getEmploymentCount(searchConditionParam.getTenantKey(), beLongDeps, searchConditionParam.getStartDate(), searchConditionParam.getEndDate());
|
||||
int employmentCount = leaderCockpitMapper.getEmploymentCount(searchConditionParam, beLongDeps, searchConditionParam.getStartDate(), searchConditionParam.getEndDate());
|
||||
portalData.setKey(keyEmploymentCount);
|
||||
portalData.setAll(employmentCount);
|
||||
portalList.add(portalData);
|
||||
|
|
@ -168,15 +168,15 @@ public class LeaderCockpitServiceImpl implements LeaderCockpitService {
|
|||
String month = DateUtil.formatToYearMonth_ZH(localDate);
|
||||
Map<String, Integer> allDataMap = new LinkedHashMap<>(3);
|
||||
Map<String, Integer> keyDataMap = new LinkedHashMap<>(3);
|
||||
allDataMap.put(month, leaderCockpitMapper.getResignCount(searchConditionParam.getTenantKey(), searchConditionParam.getDepartmentIdList(), searchConditionParam.getStartDate(), searchConditionParam.getEndDate()));
|
||||
keyDataMap.put(month, leaderCockpitMapper.getKeyResignCount(searchConditionParam.getTenantKey(), searchConditionParam.getDepartmentIdList(), searchConditionParam.getStartDate(), searchConditionParam.getEndDate()));
|
||||
allDataMap.put(month, leaderCockpitMapper.getResignCount(searchConditionParam, searchConditionParam.getDepartmentIdList(), searchConditionParam.getStartDate(), searchConditionParam.getEndDate()));
|
||||
keyDataMap.put(month, leaderCockpitMapper.getKeyResignCount(searchConditionParam, searchConditionParam.getDepartmentIdList(), searchConditionParam.getStartDate(), searchConditionParam.getEndDate()));
|
||||
|
||||
String firstDayOfMonthStr = DateUtil.getFirstDayOfPreviousMonthStr(searchConditionParam.getStartDate());
|
||||
String lastDayOfMonthStr = DateUtil.getLastDayOfPreviousMonthStr(searchConditionParam.getEndDate());
|
||||
// 前两个月
|
||||
for (int i = 1; i < 7; i++) {
|
||||
allDataMap.put(DateUtil.formatToYearMonth_ZH(firstDayOfMonthStr), leaderCockpitMapper.getResignCount(searchConditionParam.getTenantKey(), searchConditionParam.getDepartmentIdList(), firstDayOfMonthStr, lastDayOfMonthStr));
|
||||
keyDataMap.put(DateUtil.formatToYearMonth_ZH(firstDayOfMonthStr), leaderCockpitMapper.getKeyResignCount(searchConditionParam.getTenantKey(), searchConditionParam.getDepartmentIdList(), firstDayOfMonthStr, lastDayOfMonthStr));
|
||||
allDataMap.put(DateUtil.formatToYearMonth_ZH(firstDayOfMonthStr), leaderCockpitMapper.getResignCount(searchConditionParam, searchConditionParam.getDepartmentIdList(), firstDayOfMonthStr, lastDayOfMonthStr));
|
||||
keyDataMap.put(DateUtil.formatToYearMonth_ZH(firstDayOfMonthStr), leaderCockpitMapper.getKeyResignCount(searchConditionParam, searchConditionParam.getDepartmentIdList(), firstDayOfMonthStr, lastDayOfMonthStr));
|
||||
|
||||
firstDayOfMonthStr = DateUtil.getFirstDayOfPreviousMonthStr(searchConditionParam.getStartDate(), i);
|
||||
lastDayOfMonthStr = DateUtil.getLastDayOfPreviousMonthStr(searchConditionParam.getEndDate(), i);
|
||||
|
|
@ -188,7 +188,7 @@ public class LeaderCockpitServiceImpl implements LeaderCockpitService {
|
|||
log.error("selectDepartmentId===" + JSON.toJSONString(selectDepartmentId));
|
||||
if (CollectionUtils.isEmpty(selectDepartmentId)) {
|
||||
// 未选择部门,查询所有一级部门数据
|
||||
selectDepartmentId = leaderCockpitMapper.getTopDepartmentIds(searchConditionParam.getTenantKey());
|
||||
selectDepartmentId = leaderCockpitMapper.getTopDepartmentIds(searchConditionParam);
|
||||
log.error("topDepartmentId===" + JSON.toJSONString(selectDepartmentId));
|
||||
}
|
||||
// 查询每个部门 时间范围内的离职人数
|
||||
|
|
@ -201,9 +201,9 @@ public class LeaderCockpitServiceImpl implements LeaderCockpitService {
|
|||
portalData.setDate(currentMonth);
|
||||
portalData.setDepart(departMentById.getDepartMentName());
|
||||
// 关键
|
||||
int keyEmploymentCount = leaderCockpitMapper.getKeyResignCount(searchConditionParam.getTenantKey(), beLongDeps, searchConditionParam.getStartDate(), searchConditionParam.getEndDate());
|
||||
int keyEmploymentCount = leaderCockpitMapper.getKeyResignCount(searchConditionParam, beLongDeps, searchConditionParam.getStartDate(), searchConditionParam.getEndDate());
|
||||
// 非关键
|
||||
int employmentCount = leaderCockpitMapper.getResignCount(searchConditionParam.getTenantKey(), beLongDeps, searchConditionParam.getStartDate(), searchConditionParam.getEndDate());
|
||||
int employmentCount = leaderCockpitMapper.getResignCount(searchConditionParam, beLongDeps, searchConditionParam.getStartDate(), searchConditionParam.getEndDate());
|
||||
portalData.setKey(keyEmploymentCount);
|
||||
portalData.setAll(employmentCount);
|
||||
portalList.add(portalData);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,10 @@ import com.weaver.common.hrm.manage.HrmComInfoCacheHandler;
|
|||
import com.weaver.seconddev.portal.entity.param.BasicPersonnelParam;
|
||||
import com.weaver.seconddev.portal.entity.po.PieChartConfig;
|
||||
import com.weaver.seconddev.portal.entity.po.PortalPO;
|
||||
import com.weaver.seconddev.portal.entity.po.PortalUrlDetail;
|
||||
import com.weaver.seconddev.portal.mapper.LeaderCockpitMapper;
|
||||
import com.weaver.seconddev.portal.mapper.ManagerPortalMapper;
|
||||
import com.weaver.seconddev.portal.mapper.PortalMapper;
|
||||
import com.weaver.seconddev.portal.service.ManagerPortalService;
|
||||
import com.weaver.seconddev.portal.util.DateUtil;
|
||||
import com.weaver.teams.security.context.UserContext;
|
||||
|
|
@ -33,6 +36,13 @@ import java.util.stream.Collectors;
|
|||
@Slf4j
|
||||
@Service
|
||||
public class ManagerPortalServiceImpl implements ManagerPortalService {
|
||||
private static final String PORTAL_KEY = "managerPortal";
|
||||
|
||||
@Autowired
|
||||
LeaderCockpitMapper leaderCockpitMapper;
|
||||
|
||||
@Autowired
|
||||
PortalMapper portalMapper;
|
||||
|
||||
@Autowired
|
||||
ManagerPortalMapper managerPortalMapper;
|
||||
|
|
@ -46,7 +56,9 @@ public class ManagerPortalServiceImpl implements ManagerPortalService {
|
|||
@Override
|
||||
public WeaResult<Map<String, Object>> getMangerInfo(Map<String, String> params) {
|
||||
User currentUser = UserContext.getCurrentUser();
|
||||
Set<Long> allDepartmentIds = getAllDepartmentIdList(currentUser);
|
||||
BasicPersonnelParam basicPersonnelParam = new BasicPersonnelParam();
|
||||
basicPersonnelParam.setTenantKey(currentUser.getTenantKey());
|
||||
Set<Long> allDepartmentIds = getAllDepartmentIdList(basicPersonnelParam, currentUser.getEmployeeId());
|
||||
List<HrmDepartmentComInfo> departmentList = hrmComInfoCacheHandler.getCacheList(HrmDepartmentComInfo.class, allDepartmentIds);
|
||||
// 获取顶级部门
|
||||
List<HrmDepartmentComInfo> topDepartmentList = departmentList.stream()
|
||||
|
|
@ -74,9 +86,10 @@ public class ManagerPortalServiceImpl implements ManagerPortalService {
|
|||
String searchDate = params.get("searchDate");
|
||||
|
||||
User currentUser = UserContext.getCurrentUser();
|
||||
Set<Long> allDepartmentIdList = getAllDepartmentIdList(currentUser);
|
||||
BasicPersonnelParam basicPersonnelParam = new BasicPersonnelParam();
|
||||
basicPersonnelParam.setTenantKey(currentUser.getTenantKey());
|
||||
Set<Long> allDepartmentIdList = getAllDepartmentIdList(basicPersonnelParam, currentUser.getEmployeeId());
|
||||
|
||||
// 设置部门范围ID集合
|
||||
basicPersonnelParam.setDepartmentIdList(allDepartmentIdList);
|
||||
|
||||
|
|
@ -99,18 +112,27 @@ public class ManagerPortalServiceImpl implements ManagerPortalService {
|
|||
int entryNumber = managerPortalMapper.getEntryNumber(basicPersonnelParam);
|
||||
int entryingNumber = managerPortalMapper.getEntryingNumber(basicPersonnelParam);
|
||||
|
||||
// 获取穿透地址
|
||||
List<PortalUrlDetail> portalUrlDetails = portalMapper.getPortalUrlDetail(currentUser.getTenantKey(), PORTAL_KEY, "getBasicPersonnel");
|
||||
Map<String, String> urlMap = portalUrlDetails.stream().collect(Collectors.toMap(PortalUrlDetail::getDetailKey, PortalUrlDetail::getUrlAddress));
|
||||
|
||||
// 在职人数
|
||||
returnMap.put("onJobNumber", onJobNum);
|
||||
returnMap.put("onJobNumberUrl", urlMap.get("onJobNumber"));
|
||||
// 年度离职人数
|
||||
returnMap.put("resignNumber", resignNumber);
|
||||
returnMap.put("resignNumberUrl", urlMap.get("resignNumber"));
|
||||
|
||||
// 年度入职人数
|
||||
returnMap.put("entryNumber", entryNumber);
|
||||
returnMap.put("entryNumberUrl", urlMap.get("entryNumber"));
|
||||
// 离职流程中人数
|
||||
returnMap.put("resigningNumber", resigningNumber);
|
||||
returnMap.put("resigningNumberUrl", urlMap.get("resigningNumber"));
|
||||
// 入职流程中人数
|
||||
returnMap.put("entryingNumber", entryingNumber);
|
||||
// TODO 测试用
|
||||
returnMap.put("basicPersonnelParam", basicPersonnelParam);
|
||||
returnMap.put("entryingNumberUrl", urlMap.get("entryingNumber"));
|
||||
|
||||
|
||||
return WeaResult.success(returnMap);
|
||||
}
|
||||
|
|
@ -126,9 +148,10 @@ public class ManagerPortalServiceImpl implements ManagerPortalService {
|
|||
@Override
|
||||
public WeaResult<Map<String, Object>> getTeamMemorialDay(Map<String, String> params) {
|
||||
User currentUser = UserContext.getCurrentUser();
|
||||
Set<Long> allDepartmentIdList = getAllDepartmentIdList(currentUser);
|
||||
BasicPersonnelParam basicPersonnelParam = new BasicPersonnelParam();
|
||||
basicPersonnelParam.setTenantKey(currentUser.getTenantKey());
|
||||
Set<Long> allDepartmentIdList = getAllDepartmentIdList(basicPersonnelParam, currentUser.getEmployeeId());
|
||||
|
||||
// 设置部门范围ID集合
|
||||
basicPersonnelParam.setDepartmentIdList(allDepartmentIdList);
|
||||
int birthdayNum = managerPortalMapper.getBirthdayNum(basicPersonnelParam);
|
||||
|
|
@ -137,21 +160,26 @@ public class ManagerPortalServiceImpl implements ManagerPortalService {
|
|||
|
||||
int employmentAnniversary = managerPortalMapper.getEmploymentAnniversary(basicPersonnelParam);
|
||||
|
||||
// 获取穿透地址
|
||||
List<PortalUrlDetail> portalUrlDetails = portalMapper.getPortalUrlDetail(currentUser.getTenantKey(), PORTAL_KEY, "getTeamMemorialDay");
|
||||
Map<String, String> urlMap = portalUrlDetails.stream().collect(Collectors.toMap(PortalUrlDetail::getDetailKey, PortalUrlDetail::getUrlAddress));
|
||||
|
||||
Map<String, Object> returnMap = new HashMap<>();
|
||||
// 生日提醒
|
||||
returnMap.put("birthdayNum", birthdayNum);
|
||||
returnMap.put("birthdayNumUrl", urlMap.get("birthdayNum"));
|
||||
// 转正日期
|
||||
returnMap.put("regularEmployeeNum", regularEmployeeNum);
|
||||
returnMap.put("regularEmployeeNumUrl", urlMap.get("regularEmployeeNum"));
|
||||
// 入职周年提醒
|
||||
returnMap.put("employmentAnniversary", employmentAnniversary);
|
||||
returnMap.put("employmentAnniversaryUrl", urlMap.get("employmentAnniversary"));
|
||||
|
||||
// TODO 测试用
|
||||
returnMap.put("basicPersonnelParam", basicPersonnelParam);
|
||||
return WeaResult.success(returnMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WeaResult<List<PortalPO>> getEducationInfo(Map<String, String> params) {
|
||||
public WeaResult<Map<String, Object>> getEducationInfo(Map<String, String> params) {
|
||||
|
||||
String type = params.get("type");
|
||||
if (StringUtils.isBlank(type)) {
|
||||
|
|
@ -159,37 +187,46 @@ public class ManagerPortalServiceImpl implements ManagerPortalService {
|
|||
type = "education";
|
||||
}
|
||||
User currentUser = UserContext.getCurrentUser();
|
||||
Set<Long> allDepartmentIdList = getAllDepartmentIdList(currentUser);
|
||||
BasicPersonnelParam basicPersonnelParam = new BasicPersonnelParam();
|
||||
basicPersonnelParam.setTenantKey(currentUser.getTenantKey());
|
||||
Set<Long> allDepartmentIdList = getAllDepartmentIdList(basicPersonnelParam, currentUser.getEmployeeId());
|
||||
// 设置部门范围ID集合
|
||||
basicPersonnelParam.setDepartmentIdList(allDepartmentIdList);
|
||||
basicPersonnelParam.setPieType(type);
|
||||
List<PortalUrlDetail> portalUrlDetails = portalMapper.getPortalUrlDetail(currentUser.getTenantKey(), PORTAL_KEY, "getEducationInfo");
|
||||
Map<String, String> urlMap = portalUrlDetails.stream().collect(Collectors.toMap(PortalUrlDetail::getDetailKey, PortalUrlDetail::getUrlAddress));
|
||||
List<PortalPO> returnList = new ArrayList<>();
|
||||
Map<String, Object> returnMap = new HashMap<>();
|
||||
switch (type) {
|
||||
case "education":
|
||||
// 学历
|
||||
dealEducationInfo(basicPersonnelParam, returnList);
|
||||
returnMap.put("url", urlMap.get("education"));
|
||||
|
||||
break;
|
||||
case "age":
|
||||
// 年龄
|
||||
dealAgeInfo(basicPersonnelParam, returnList);
|
||||
returnMap.put("url", urlMap.get("age"));
|
||||
break;
|
||||
case "grade":
|
||||
// 职级
|
||||
returnMap.put("url", urlMap.get("grade"));
|
||||
break;
|
||||
case "company":
|
||||
// 司龄
|
||||
dealCompanyInfo(basicPersonnelParam, returnList);
|
||||
returnMap.put("url", urlMap.get("company"));
|
||||
break;
|
||||
case "performance":
|
||||
// 绩效
|
||||
returnMap.put("url", urlMap.get("performance"));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return WeaResult.success(returnList);
|
||||
returnMap.put("list", returnList);
|
||||
return WeaResult.success(returnMap);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -233,7 +270,7 @@ public class ManagerPortalServiceImpl implements ManagerPortalService {
|
|||
PortalPO portalPO = new PortalPO();
|
||||
portalPO.setName(pieChartConfig.getName());
|
||||
// 查询时间段内的数据
|
||||
Integer ageCount = managerPortalMapper.getAgeCount(basicPersonnelParam.getTenantKey(), basicPersonnelParam.getDepartmentIdList(), pieChartConfig.getStartIndex(), pieChartConfig.getEndIndex());
|
||||
Integer ageCount = managerPortalMapper.getAgeCount(basicPersonnelParam, basicPersonnelParam.getDepartmentIdList(), pieChartConfig.getStartIndex(), pieChartConfig.getEndIndex());
|
||||
portalPO.setValue(String.valueOf(ageCount));
|
||||
returnList.add(portalPO);
|
||||
}
|
||||
|
|
@ -252,7 +289,7 @@ public class ManagerPortalServiceImpl implements ManagerPortalService {
|
|||
PortalPO portalPO = new PortalPO();
|
||||
portalPO.setName(pieChartConfig.getName());
|
||||
// 查询时间段内的数据
|
||||
Integer ageCount = managerPortalMapper.getComapnyCount(basicPersonnelParam.getTenantKey(), basicPersonnelParam.getDepartmentIdList(), pieChartConfig.getStartIndex(), pieChartConfig.getEndIndex());
|
||||
Integer ageCount = managerPortalMapper.getComapnyCount(basicPersonnelParam, basicPersonnelParam.getDepartmentIdList(), pieChartConfig.getStartIndex(), pieChartConfig.getEndIndex());
|
||||
portalPO.setValue(String.valueOf(ageCount));
|
||||
returnList.add(portalPO);
|
||||
}
|
||||
|
|
@ -264,9 +301,9 @@ public class ManagerPortalServiceImpl implements ManagerPortalService {
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
private Set<Long> getAllDepartmentIdList(User currentUser) {
|
||||
private Set<Long> getAllDepartmentIdList(BasicPersonnelParam basicPersonnelParam, Long employeeId) {
|
||||
// 查询所负责的部门
|
||||
List<Long> manageDeptIds = managerPortalMapper.getManageDeptIds(currentUser.getTenantKey(), currentUser.getEmployeeId());
|
||||
List<Long> manageDeptIds = managerPortalMapper.getManageDeptIds(basicPersonnelParam, employeeId);
|
||||
// 查询所有的部门、子部门信息
|
||||
Set<WeaDepartMent> allDepartmentList = new HashSet<>();
|
||||
for (Long manageDeptId : manageDeptIds) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,65 @@
|
|||
package com.weaver.seconddev.portal.service.impl;
|
||||
|
||||
import com.weaver.common.base.entity.result.WeaResult;
|
||||
import com.weaver.seconddev.portal.entity.param.SscParam;
|
||||
import com.weaver.seconddev.portal.entity.po.ExpirationReminderPo;
|
||||
import com.weaver.seconddev.portal.entity.po.PortalUrlDetail;
|
||||
import com.weaver.seconddev.portal.mapper.PortalMapper;
|
||||
import com.weaver.seconddev.portal.mapper.SscPortalMapper;
|
||||
import com.weaver.seconddev.portal.service.SscPortalService;
|
||||
import com.weaver.teams.security.context.UserContext;
|
||||
import com.weaver.teams.security.user.User;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/07/15
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class SscPortalServiceImpl implements SscPortalService {
|
||||
private static final String PORTAL_KEY = "sscPortal";
|
||||
|
||||
@Autowired
|
||||
SscPortalMapper sscPortalMapper;
|
||||
|
||||
@Autowired
|
||||
PortalMapper portalMapper;
|
||||
|
||||
@Override
|
||||
public WeaResult<ExpirationReminderPo> getExpirationReminder(Map<String, String> params) {
|
||||
User currentUser = UserContext.getCurrentUser();
|
||||
SscParam sscParam = new SscParam();
|
||||
sscParam.setTenantKey(currentUser.getTenantKey());
|
||||
|
||||
ExpirationReminderPo expirationReminderPo = new ExpirationReminderPo();
|
||||
|
||||
// 合同到期
|
||||
expirationReminderPo.setContractExpiration(sscPortalMapper.getExpirationReminderCount(sscParam));
|
||||
expirationReminderPo.setIdCardExpiration(sscPortalMapper.getIdCardExpirationCount(sscParam));
|
||||
expirationReminderPo.setHealthCertificateExpiration(sscPortalMapper.getHealthCertificateExpirationCount(sscParam));
|
||||
expirationReminderPo.setEmploymentAnniversary(sscPortalMapper.getEmploymentAnniversaryCount(sscParam));
|
||||
// TODO
|
||||
expirationReminderPo.setBirthdayNum(-1);
|
||||
|
||||
|
||||
// 设置穿透地址
|
||||
List<PortalUrlDetail> portalUrlDetails = portalMapper.getPortalUrlDetail(sscParam.getTenantKey(), PORTAL_KEY, "getExpirationReminder");
|
||||
Map<String, String> urlMap = portalUrlDetails.stream().collect(Collectors.toMap(PortalUrlDetail::getDetailKey, PortalUrlDetail::getUrlAddress));
|
||||
expirationReminderPo.setContractExpirationUrl(urlMap.get("contractExpiration"));
|
||||
expirationReminderPo.setIdCardExpirationUrl(urlMap.get("idCardExpiration"));
|
||||
expirationReminderPo.setHealthCertificateExpirationUrl(urlMap.get("healthCertificateExpiration"));
|
||||
expirationReminderPo.setEmploymentAnniversaryUrl(urlMap.get("employmentAnniversary"));
|
||||
expirationReminderPo.setBirthdayNumUrl(urlMap.get("birthdayNum"));
|
||||
|
||||
|
||||
return WeaResult.success(expirationReminderPo);
|
||||
}
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@ import java.time.LocalDate;
|
|||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.time.temporal.TemporalAdjusters;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
|
|
@ -25,9 +26,11 @@ public class DateUtil {
|
|||
public static String getCurrentDateStr() {
|
||||
return LocalDate.now().format(DEFAULT_DATE_FORMATTER);
|
||||
}
|
||||
|
||||
public static String getCurrentYearStr() {
|
||||
return LocalDate.now().format(DEFAULT_YEAR_FORMATTER);
|
||||
}
|
||||
|
||||
public static String getCurrentMonthStr() {
|
||||
return LocalDate.now().format(DEFAULT_MONTH_FORMATTER);
|
||||
}
|
||||
|
|
@ -104,6 +107,7 @@ public class DateUtil {
|
|||
|
||||
/**
|
||||
* 获取指定日期所在月份的第一天
|
||||
*
|
||||
* @param date 输入日期
|
||||
* @return 当月第一天的 LocalDate
|
||||
*/
|
||||
|
|
@ -121,8 +125,18 @@ public class DateUtil {
|
|||
return LocalDate.now().withDayOfMonth(1).format(DEFAULT_DATE_FORMATTER);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前月份的最后一天
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getLastDayOfMonth() {
|
||||
return LocalDate.now().with(TemporalAdjusters.lastDayOfMonth()).format(DEFAULT_DATE_FORMATTER);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指定日期字符串所在月份的第一天(字符串形式)
|
||||
*
|
||||
* @param dateStr 输入日期字符串 (yyyy-MM-dd)
|
||||
* @return 当月第一天的字符串
|
||||
*/
|
||||
|
|
@ -202,14 +216,15 @@ public class DateUtil {
|
|||
|
||||
/**
|
||||
* 获取指定日期字符串上个月的第一天(字符串形式)
|
||||
*
|
||||
* @param dateStr 输入日期字符串 (yyyy-MM-dd)
|
||||
* @return 上个月第一天的字符串
|
||||
*/
|
||||
public static String getFirstDayOfPreviousMonthStr(String dateStr) {
|
||||
return getFirstDayOfPreviousMonthStr(dateStr,1);
|
||||
return getFirstDayOfPreviousMonthStr(dateStr, 1);
|
||||
}
|
||||
|
||||
public static String getFirstDayOfPreviousMonthStr(String dateStr,int month) {
|
||||
public static String getFirstDayOfPreviousMonthStr(String dateStr, int month) {
|
||||
LocalDate date = parseDate(dateStr);
|
||||
if (date == null) {
|
||||
return null;
|
||||
|
|
@ -221,26 +236,28 @@ public class DateUtil {
|
|||
|
||||
/**
|
||||
* 获取指定日期字符串上个月的最后一天(字符串形式)
|
||||
*
|
||||
* @param dateStr 输入日期字符串 (yyyy-MM-dd)
|
||||
* @return 上个月最后一天的字符串
|
||||
*/
|
||||
public static String getLastDayOfPreviousMonthStr(String dateStr) {
|
||||
return getLastDayOfPreviousMonthStr(dateStr,1);
|
||||
return getLastDayOfPreviousMonthStr(dateStr, 1);
|
||||
}
|
||||
|
||||
public static String getLastDayOfPreviousMonthStr(String dateStr,int month) {
|
||||
public static String getLastDayOfPreviousMonthStr(String dateStr, int month) {
|
||||
LocalDate date = parseDate(dateStr);
|
||||
if (date == null) {
|
||||
return null;
|
||||
}
|
||||
// 获取当月第一天,再减一天得到上个月最后一天
|
||||
LocalDate firstDayOfCurrentMonth = date.minusMonths(month-1).withDayOfMonth(1);
|
||||
LocalDate firstDayOfCurrentMonth = date.minusMonths(month - 1).withDayOfMonth(1);
|
||||
LocalDate lastDayOfPrevMonth = firstDayOfCurrentMonth.minusDays(1);
|
||||
return formatDate(lastDayOfPrevMonth);
|
||||
}
|
||||
|
||||
/**
|
||||
* 将 LocalDate 格式化为 yyyy-MM 字符串
|
||||
*
|
||||
* @param date 输入日期
|
||||
* @return 年月字符串 (yyyy-MM)
|
||||
*/
|
||||
|
|
@ -260,6 +277,7 @@ public class DateUtil {
|
|||
|
||||
/**
|
||||
* 将日期字符串 (yyyy-MM-dd) 转换为年月字符串 (yyyy-MM)
|
||||
*
|
||||
* @param dateStr 输入日期字符串
|
||||
* @return 年月字符串 (yyyy-MM)
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.weaver.seconddev.portal.mapper.EmployeePortalMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.weaver.seconddev.portal.mapper.HrbpPortalMapper">
|
||||
|
||||
<select id="getToEntryCount" resultType="java.lang.Integer">
|
||||
select count(t.id) from ${e10_common}.uf_jcl_rzgl t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
and t.rzzt = 0
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
AND t.department IN
|
||||
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
|
||||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="getToRegularCount" resultType="java.lang.Integer">
|
||||
select count(t.id) from ${e10_common}.uf_jcl_employee_information t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
and t.personnel_status in(1,3)
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
AND t.department IN
|
||||
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
|
||||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getToLeaveCount" resultType="java.lang.Integer">
|
||||
select count(t.id) from ${e10_common}.uf_jcl_lzsq t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
and t.flow_status in (1, 2, 3)
|
||||
and (t.zhgzr is null or t.zhgzr = '' or zhgzr >current_date())
|
||||
</select>
|
||||
|
||||
<select id="getToSignCount" resultType="java.lang.Integer">
|
||||
<!--TODO-->
|
||||
select -1
|
||||
</select>
|
||||
|
||||
<select id="getToProxyCount" resultType="java.lang.Integer">
|
||||
<!--TODO-->
|
||||
select -1
|
||||
</select>
|
||||
|
||||
<select id="getAllEmployeeCount" resultType="java.lang.Integer">
|
||||
select count(t.id) from ${e10_common}.uf_jcl_employee_information t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
and t.personnel_status not in (5,6)
|
||||
</select>
|
||||
|
||||
<select id="getFormalEmployeeCount" resultType="java.lang.Integer">
|
||||
select count(t.id) from ${e10_common}.uf_jcl_employee_information t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
and t.personnel_status not in (5,6)
|
||||
and t.yglx=1109770887364624394
|
||||
</select>
|
||||
|
||||
<select id="getInternEmployeeCount" resultType="java.lang.Integer">
|
||||
select count(t.id) from ${e10_common}.uf_jcl_employee_information t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
and t.personnel_status not in (5,6)
|
||||
and t.yglx=1109772927499255817
|
||||
</select>
|
||||
|
||||
<select id="getOutsourcingCount" resultType="java.lang.Integer">
|
||||
select count(t.id) from ${e10_common}.uf_jcl_employee_information t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
and t.personnel_status not in (5,6)
|
||||
and t.yglx=1109775968260603906
|
||||
</select>
|
||||
|
||||
<select id="getLaborCount" resultType="java.lang.Integer">
|
||||
select count(t.id) from ${e10_common}.uf_jcl_employee_information t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
and t.personnel_status not in (5,6)
|
||||
and t.yglx=1109776092848209920
|
||||
</select>
|
||||
|
||||
<select id="getProbationCount" resultType="java.lang.Integer">
|
||||
select count(t.id) from ${e10_common}.uf_jcl_employee_information t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
and t.personnel_status = 1
|
||||
</select>
|
||||
|
||||
<select id="getFormalCount" resultType="java.lang.Integer">
|
||||
select count(t.id) from ${e10_common}.uf_jcl_employee_information t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
and t.personnel_status = 2
|
||||
</select>
|
||||
<select id="getInternCount" resultType="java.lang.Integer">
|
||||
select count(t.id) from ${e10_common}.uf_jcl_employee_information t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
and t.personnel_status = 4
|
||||
</select>
|
||||
|
||||
<select id="getLeaveCount" resultType="java.lang.Integer">
|
||||
select count(t.id) from ${e10_common}.uf_jcl_employee_information t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
and t.personnel_status = 5
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
|
||||
<select id="getOnJobNumber" resultType="com.weaver.seconddev.portal.entity.po.PortalPO">
|
||||
select count(t.id) as value ,b.yglxmc as name from e10_common.uf_jcl_employee_information t
|
||||
inner join e10_common.uf_jcl_yglx b on t.yglx = b.id
|
||||
select count(t.id) as value ,b.yglxmc as name from ${e10_common}.uf_jcl_employee_information t
|
||||
inner join ${e10_common}.uf_jcl_yglx b on t.yglx = b.id
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
AND t.department IN
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
</select>
|
||||
|
||||
<select id="getOnJobCount" resultType="java.lang.Integer">
|
||||
select count(t.id) as value from e10_common.uf_jcl_employee_information t
|
||||
select count(t.id) as value from ${e10_common}.uf_jcl_employee_information t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
AND t.department IN
|
||||
|
|
@ -36,8 +36,8 @@
|
|||
</select>
|
||||
|
||||
<select id="getResignCount" resultType="java.lang.Integer">
|
||||
select count(id) as value from e10_common.uf_jcl_lzxxjl t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
select count(id) as value from ${param.e10_common}.uf_jcl_lzxxjl t
|
||||
where t.delete_type = 0 and t.tenant_key = #{param.tenantKey}
|
||||
and t.lzzt = 1
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
AND t.lzqbm IN
|
||||
|
|
@ -50,8 +50,8 @@
|
|||
</select>
|
||||
|
||||
<select id="getKeyResignCount" resultType="java.lang.Integer">
|
||||
select count(id) as value from e10_common.uf_jcl_lzxxjl t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
select count(id) as value from ${param.e10_common}.uf_jcl_lzxxjl t
|
||||
where t.delete_type = 0 and t.tenant_key = #{param.tenantKey}
|
||||
and t.lzzt = 1
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
AND t.lzqbm IN
|
||||
|
|
@ -64,8 +64,9 @@
|
|||
and t.zhgzr <= #{endDate}
|
||||
</select>
|
||||
<select id="getEmploymentCount" resultType="java.lang.Integer">
|
||||
select count(id) as value from e10_common.uf_jcl_rzgl t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
select count(id) as value from ${param.e10_common}.uf_jcl_rzgl t
|
||||
where t.delete_type = 0 and t.tenant_key = #{param.tenantKey}
|
||||
and t.rzzt = 1
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
AND t.department IN
|
||||
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
|
||||
|
|
@ -76,8 +77,9 @@
|
|||
and t.hiredate <= #{endDate}
|
||||
</select>
|
||||
<select id="getKeyEmploymentCount" resultType="java.lang.Integer">
|
||||
select count(id) as value from e10_common.uf_jcl_rzgl t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
select count(id) as value from ${param.e10_common}.uf_jcl_rzgl t
|
||||
where t.delete_type = 0 and t.tenant_key = #{param.tenantKey}
|
||||
and t.rzzt = 1
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
AND t.department IN
|
||||
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
|
||||
|
|
@ -90,8 +92,9 @@
|
|||
</select>
|
||||
|
||||
<select id="getEmploymentListByPosition" resultType="com.weaver.seconddev.portal.entity.po.PortalPO">
|
||||
select count(id) as name,position as value from e10_common.uf_jcl_rzgl t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
select count(id) as name,position as value from ${param.e10_common}.uf_jcl_rzgl t
|
||||
where t.delete_type = 0 and t.tenant_key = #{param.tenantKey}
|
||||
and t.rzzt = 1
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
AND t.department IN
|
||||
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
|
||||
|
|
@ -108,15 +111,16 @@
|
|||
select p.id as position_id, p.name as position_name,
|
||||
d.id as department_id, d.name as department_name,
|
||||
g.id as grade_id, g.name as grade_name
|
||||
from eteams.position p
|
||||
left join eteams.department d on p.department = d.id
|
||||
left join eteams.grade g on p.grade_id = g.id
|
||||
where p.id = #{positionId} and p.delete_type = 0 and p.tenant_key = #{tenantKey} limit 1
|
||||
from ${param.eteams}.position p
|
||||
left join ${param.eteams}.department d on p.department = d.id
|
||||
left join ${param.eteams}.grade g on p.grade_id = g.id
|
||||
where p.id = #{positionId} and p.delete_type = 0
|
||||
and p.tenant_key = #{param.tenantKey} limit 1
|
||||
</select>
|
||||
|
||||
<select id="getResignListByPosition" resultType="com.weaver.seconddev.portal.entity.po.PortalPO">
|
||||
select count(id) as name,lzqgw as value from e10_common.uf_jcl_lzxxjl t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
select count(id) as name,lzqgw as value from ${param.e10_common}.uf_jcl_lzxxjl t
|
||||
where t.delete_type = 0 and t.tenant_key = #{param.tenantKey}
|
||||
and t.lzzt = 1
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
AND t.lzqbm IN
|
||||
|
|
@ -131,15 +135,15 @@
|
|||
</select>
|
||||
<select id="getTopDepartmentIds" resultType="java.lang.Long">
|
||||
select t.id
|
||||
from eteams.department t
|
||||
inner join eteams.department t1 on t.parent = t1.id
|
||||
from ${param.eteams}.department t
|
||||
inner join ${param.eteams}.department t1 on t.parent = t1.id
|
||||
where t.type = 'department'
|
||||
and t1.type = 'subcompany'
|
||||
and t.delete_type = 0
|
||||
and t.status = 1
|
||||
and t.tenant_key = #{tenantKey}
|
||||
and t.tenant_key = #{param.tenantKey}
|
||||
and t1.delete_type = 0
|
||||
and t1.status = 1
|
||||
and t1.tenant_key = #{tenantKey}
|
||||
and t1.tenant_key = #{param.tenantKey}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<select id="getOnJobNum" resultType="java.lang.Integer">
|
||||
SELECT COUNT(t.id) AS value
|
||||
FROM e10_common.uf_jcl_employee_information t
|
||||
FROM ${e10_common}.uf_jcl_employee_information t
|
||||
WHERE t.delete_type = 0
|
||||
AND t.tenant_key = #{tenantKey}
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
</select>
|
||||
|
||||
<select id="getResignNumber" resultType="java.lang.Integer">
|
||||
select count(id) as value from e10_common.uf_jcl_lzxxjl t
|
||||
select count(id) as value from ${e10_common}.uf_jcl_lzxxjl t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
and t.lzzt = 1
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
</select>
|
||||
|
||||
<select id="getResigningNumber" resultType="java.lang.Integer">
|
||||
select count(t.id) from e10_common.uf_jcl_lzsq t
|
||||
select count(t.id) from ${e10_common}.uf_jcl_lzsq t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
<!--审批中-->
|
||||
and t.flow_status in (0,1,2)
|
||||
|
|
@ -47,7 +47,7 @@
|
|||
</select>
|
||||
|
||||
<select id="getEntryingNumber" resultType="java.lang.Integer">
|
||||
select count(t.id) from e10_common.uf_jcl_rzsq t
|
||||
select count(t.id) from ${e10_common}.uf_jcl_rzsq t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
<!--审批中-->
|
||||
and t.flow_status in (0,1,2)
|
||||
|
|
@ -58,8 +58,9 @@
|
|||
|
||||
|
||||
<select id="getEntryNumber" resultType="java.lang.Integer">
|
||||
select count(id) as value from e10_common.uf_jcl_rzgl t
|
||||
select count(id) as value from ${e10_common}.uf_jcl_rzgl t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
and t.rzzt = 1
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
AND t.department IN
|
||||
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
|
||||
|
|
@ -72,20 +73,20 @@
|
|||
|
||||
<select id="getManageDeptIds" resultType="java.lang.Long">
|
||||
select t.id
|
||||
from eteams.department t
|
||||
inner join eteams.ft_1154218872715993098 t2 on t.formdata = t2.id
|
||||
from ${param.eteams}.department t
|
||||
inner join ${param.eteams}.${param.table_dept_cus} t2 on t.formdata = t2.id
|
||||
where t.type = 'department'
|
||||
and t.delete_type = 0
|
||||
and t.status = 1
|
||||
and t.tenant_key = #{tenantKey}
|
||||
and t2.tenant_key = #{tenantKey}
|
||||
and t.tenant_key = #{param.tenantKey}
|
||||
and t2.tenant_key = #{param.tenantKey}
|
||||
and t2.delete_type = 0
|
||||
and t2.bmfzr = #{empId}
|
||||
</select>
|
||||
|
||||
<select id="getBirthdayNum" resultType="java.lang.Integer">
|
||||
SELECT COUNT(t.id) AS value
|
||||
FROM e10_common.uf_jcl_employee_information t
|
||||
FROM ${e10_common}.uf_jcl_employee_information t
|
||||
WHERE t.delete_type = 0
|
||||
AND t.tenant_key = #{tenantKey}
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
|
|
@ -110,7 +111,7 @@
|
|||
</select>
|
||||
<select id="getRegularEmployeeNum" resultType="java.lang.Integer">
|
||||
SELECT COUNT(t.id) AS value
|
||||
FROM e10_common.uf_jcl_employee_information t
|
||||
FROM ${e10_common}.uf_jcl_employee_information t
|
||||
WHERE t.delete_type = 0
|
||||
AND t.tenant_key = #{tenantKey}
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
|
|
@ -129,7 +130,7 @@
|
|||
</select>
|
||||
<select id="getEmploymentAnniversary" resultType="java.lang.Integer">
|
||||
SELECT COUNT(t.id) AS value
|
||||
FROM e10_common.uf_jcl_employee_information t
|
||||
FROM ${e10_common}.uf_jcl_employee_information t
|
||||
WHERE t.delete_type = 0
|
||||
AND t.tenant_key = #{tenantKey}
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
|
|
@ -156,7 +157,7 @@
|
|||
|
||||
<select id="getEducationInfo" resultType="com.weaver.seconddev.portal.entity.po.PortalPO">
|
||||
select count(t.id) as value , t.education as id
|
||||
from e10_common.uf_jcl_employee_information t
|
||||
from ${e10_common}.uf_jcl_employee_information t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
AND t.department IN
|
||||
|
|
@ -170,14 +171,14 @@
|
|||
<select id="getPieTypeConfig" resultType="com.weaver.seconddev.portal.entity.po.PieChartConfig">
|
||||
select t.lx as type,t.flmc as name,t.xlfl as educationIds,
|
||||
t.qsw as startIndex,t.jzw as endIndex,t.zj as gradeIds,t.zssx as orderNum
|
||||
from e10_common.uf_xlfb t
|
||||
from ${e10_common}.uf_xlfb t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
and t.lx = #{pieType} order by t.zssx
|
||||
</select>
|
||||
|
||||
<select id="getAgeCount" resultType="java.lang.Integer">
|
||||
select count(t.id) as value from e10_common.uf_jcl_employee_information t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
select count(t.id) as value from ${param.e10_common}.uf_jcl_employee_information t
|
||||
where t.delete_type = 0 and t.tenant_key = #{param.tenantKey}
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
AND t.department IN
|
||||
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
|
||||
|
|
@ -189,8 +190,8 @@
|
|||
</select>
|
||||
|
||||
<select id="getComapnyCount" resultType="java.lang.Integer">
|
||||
select count(t.id) as value from e10_common.uf_jcl_employee_information t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
select count(t.id) as value from ${param.e10_common}.uf_jcl_employee_information t
|
||||
where t.delete_type = 0 and t.tenant_key = #{param.tenantKey}
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
AND t.department IN
|
||||
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.weaver.seconddev.portal.mapper.PortalMapper">
|
||||
|
||||
<select id="getPortalUrlDetail" resultType="com.weaver.seconddev.portal.entity.po.PortalUrlDetail">
|
||||
select t.id as id,t.jkbs as detailKey,t.ctdz as urlAddress,t.zjmc as detailName from e10_common.uf_mhctdz_mxb1 t
|
||||
inner join e10_common.uf_mhctdz t1
|
||||
on t.FORM_DATA_ID =t1.FORM_DATA_ID
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
and t1.tenant_key = #{tenantKey} and t1.delete_type = 0
|
||||
and t1.mhmc = #{portalKey} and t1.zjjk = #{componentKey}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.weaver.seconddev.portal.mapper.SscPortalMapper">
|
||||
|
||||
<select id="getExpirationReminderCount" resultType="java.lang.Integer">
|
||||
select count(t.id) as value from ${e10_common}.uf_jcl_employee_information t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
AND t.department IN
|
||||
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
|
||||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
and t.htzzrq <![CDATA[ <= ]]> CURDATE()
|
||||
</select>
|
||||
|
||||
<select id="getIdCardExpirationCount" resultType="java.lang.Integer">
|
||||
select count(t.id) as value from ${e10_common}.uf_jcl_employee_information t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
AND t.department IN
|
||||
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
|
||||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
and t.sfzyxjsrq <![CDATA[ <= ]]> CURDATE()
|
||||
</select>
|
||||
|
||||
<select id="getHealthCertificateExpirationCount" resultType="java.lang.Integer">
|
||||
select count(t.id) as value from ${e10_common}.uf_jcl_employee_information t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
AND t.department IN
|
||||
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
|
||||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
and t.jkzdqrq <![CDATA[ <= ]]> CURDATE()
|
||||
</select>
|
||||
|
||||
<select id="getEmploymentAnniversaryCount" resultType="java.lang.Integer">
|
||||
select count(t.id) as value from ${e10_common}.uf_jcl_employee_information t
|
||||
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
AND t.department IN
|
||||
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
|
||||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
AND (
|
||||
(
|
||||
DATE_FORMAT(hiredate, '%m-%d') BETWEEN
|
||||
DATE_FORMAT(CURDATE(), '%m-%d') AND DATE_FORMAT(DATE_ADD(CURDATE(), INTERVAL 7 DAY), '%m-%d')
|
||||
)
|
||||
OR (
|
||||
DATE_FORMAT(CURDATE(), '%m-%d') > DATE_FORMAT(DATE_ADD(CURDATE(), INTERVAL 7 DAY), '%m-%d')
|
||||
AND (
|
||||
DATE_FORMAT(hiredate, '%m-%d') >= DATE_FORMAT(CURDATE(), '%m-%d')
|
||||
OR DATE_FORMAT(hiredate, '%m-%d') <= DATE_FORMAT(DATE_ADD(CURDATE(), INTERVAL 7 DAY), '%m-%d')
|
||||
)
|
||||
)
|
||||
)
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue