generated from dxfeng/secondev-wugang-dxfeng
parent
fd1c5258e1
commit
5e5cf207c9
|
|
@ -84,6 +84,8 @@ public class EmailAccountGenerateAction implements EsbServerlessRpcRemoteInterfa
|
|||
*/
|
||||
private boolean isEmailExists(String email, Long requestId) {
|
||||
Integer checkCount = emailAccountGenerateMapper.checkSameEmailAccount(baseParam, email, requestId);
|
||||
log.error("检查入职表邮箱账号是否已存在: {}", email);
|
||||
log.error("检查结果: {}", checkCount);
|
||||
boolean isSame = checkCount != null && checkCount > 0;
|
||||
if (isSame) {
|
||||
return true;
|
||||
|
|
@ -100,6 +102,8 @@ public class EmailAccountGenerateAction implements EsbServerlessRpcRemoteInterfa
|
|||
*/
|
||||
private boolean isEmailExists(String email) {
|
||||
Integer checkCount = emailAccountGenerateMapper.checkEmployeeSameEmail(baseParam, email);
|
||||
log.error("检查花名册邮箱账号是否已存在: {}", email);
|
||||
log.error("检查结果: {}", checkCount);
|
||||
return checkCount != null && checkCount > 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ public class IDCardRecognitionAction implements EsbServerlessRpcRemoteInterface
|
|||
}
|
||||
String startDate = Convert.toStr(validityArr[0], "").replace(".", "-");
|
||||
String endDate = Convert.toStr(validityArr[1], "").replace(".", "-");
|
||||
returnMap.put("validity_type", "0");
|
||||
returnMap.put("validityType", "0");
|
||||
if ("长期".equals(endDate)) {
|
||||
endDate = "9999-12-31";
|
||||
returnMap.put("validityType", "1");
|
||||
|
|
|
|||
|
|
@ -62,6 +62,11 @@ public class ManagerPortalController {
|
|||
return managerPortalService.getEducationInfo(params);
|
||||
}
|
||||
|
||||
@PostMapping("/getAttendanceInfo")
|
||||
private WeaResult<Map<String, Object>> getAttendanceInfo(@RequestBody Map<String, String> params) {
|
||||
return managerPortalService.getAttendanceInfo(params);
|
||||
}
|
||||
|
||||
@PostMapping("/getTeamEmployee")
|
||||
private WeaResult<Map<String, Object>> getTeamEmployee(@RequestBody Map<String, String> params) {
|
||||
return managerPortalService.getTeamEmployee(params);
|
||||
|
|
|
|||
|
|
@ -24,6 +24,11 @@ public class BaseParam {
|
|||
* 岗位自定义表
|
||||
*/
|
||||
private String table_job_cus = "ft_1155455711525494797";
|
||||
|
||||
/**
|
||||
* 请假表单
|
||||
*/
|
||||
private String leaveFormCus = "ft_1151420254779654145";
|
||||
///**
|
||||
// * 员工自定义表
|
||||
// */
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
package com.weaver.seconddev.portal.entity.po;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/07/29
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class LateAndEarlyRankPo {
|
||||
private Long empId;
|
||||
private String empName;
|
||||
private String departmentName;
|
||||
private Integer times;
|
||||
private Integer minutes;
|
||||
}
|
||||
|
|
@ -20,4 +20,12 @@ public interface DataConvertMapper {
|
|||
* @return
|
||||
*/
|
||||
Long getIdByName(@Param("param") BaseParam param, @Param("type") String type, @Param("name") String name);
|
||||
|
||||
/**
|
||||
* 获取假期类型
|
||||
* @param param
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
Long getHolidayType(@Param("param") BaseParam param, @Param("name") String name);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.weaver.seconddev.portal.mapper.portal;
|
||||
|
||||
import com.weaver.seconddev.portal.entity.param.BasicPersonnelParam;
|
||||
import com.weaver.seconddev.portal.entity.po.LateAndEarlyRankPo;
|
||||
import com.weaver.seconddev.portal.entity.po.PieChartConfig;
|
||||
import com.weaver.seconddev.portal.entity.po.PortalPO;
|
||||
import com.weaver.seconddev.portal.entity.po.TeamEmployeePo;
|
||||
|
|
@ -147,4 +148,34 @@ public interface ManagerPortalMapper {
|
|||
*/
|
||||
int getTeamEmployeeTotal(BasicPersonnelParam param);
|
||||
|
||||
|
||||
Integer sumLateTimes(BasicPersonnelParam param);
|
||||
|
||||
Integer sumLeaveEarlyTimes(BasicPersonnelParam param);
|
||||
|
||||
Integer sumAbsenteeismTimes(BasicPersonnelParam param);
|
||||
|
||||
Integer sumReissueCardTimes(BasicPersonnelParam param);
|
||||
|
||||
Integer sumTotalAttendanceTimes(BasicPersonnelParam param);
|
||||
|
||||
List<LateAndEarlyRankPo> getLateAndEarlyRankList(BasicPersonnelParam param);
|
||||
|
||||
Integer sumWorkdayOvertimeDuration(BasicPersonnelParam param);
|
||||
|
||||
Integer sumWeekendOvertimeDuration(BasicPersonnelParam param);
|
||||
|
||||
Integer sumLegalHolidayOvertimeDuration(BasicPersonnelParam param);
|
||||
|
||||
Integer sumHolidayTimes(@Param("param") BasicPersonnelParam param, @Param("holidayIds") Collection<Long> holidayIds);
|
||||
|
||||
Integer sumPersonalLeaveDuration(BasicPersonnelParam param);
|
||||
|
||||
//Integer sumSickLeaveCount(@Param("param") BasicPersonnelParam param,@Param("holidayIds") Collection<Long> holidayIds);
|
||||
|
||||
Integer sumSickLeaveDuration(BasicPersonnelParam param);
|
||||
|
||||
//Integer sumAnnualLeaveCount(@Param("param") BasicPersonnelParam param,@Param("holidayIds") Collection<Long> holidayIds);
|
||||
|
||||
Integer sumAnnualLeaveDuration(BasicPersonnelParam param);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,6 +67,14 @@ public interface ManagerPortalService {
|
|||
*/
|
||||
WeaResult<Map<String, Object>> getEducationInfo(Map<String, String> params);
|
||||
|
||||
/**
|
||||
* 考勤看板
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
WeaResult<Map<String, Object>> getAttendanceInfo(Map<String, String> params);
|
||||
|
||||
/**
|
||||
* 团队员工
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.weaver.seconddev.portal.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.weaver.common.base.entity.result.WeaResult;
|
||||
|
|
@ -7,13 +8,12 @@ import com.weaver.common.form.datasource.FormdataTemplateDetails;
|
|||
import com.weaver.common.form.metadata.field.FormField;
|
||||
import com.weaver.common.hrm.cache.HrmDepartmentComInfo;
|
||||
import com.weaver.common.hrm.dao.HrmCommonDepartmentDao;
|
||||
import com.weaver.common.hrm.dao.HrmCommonEmployeeDao;
|
||||
import com.weaver.common.hrm.manage.HrmComInfoCacheHandler;
|
||||
import com.weaver.seconddev.portal.entity.component.Option;
|
||||
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.entity.po.TeamEmployeePo;
|
||||
import com.weaver.seconddev.portal.entity.po.*;
|
||||
import com.weaver.seconddev.portal.mapper.dictionary.DataConvertMapper;
|
||||
import com.weaver.seconddev.portal.mapper.portal.EbuilderBaseMapper;
|
||||
import com.weaver.seconddev.portal.mapper.portal.LeaderCockpitMapper;
|
||||
import com.weaver.seconddev.portal.mapper.portal.ManagerPortalMapper;
|
||||
|
|
@ -21,6 +21,8 @@ import com.weaver.seconddev.portal.mapper.portal.PortalMapper;
|
|||
import com.weaver.seconddev.portal.service.ManagerPortalService;
|
||||
import com.weaver.seconddev.portal.util.DateUtil;
|
||||
import com.weaver.seconddev.portal.util.StringUtil;
|
||||
import com.weaver.teams.domain.department.SimpleDepartment;
|
||||
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;
|
||||
|
|
@ -62,6 +64,10 @@ public class ManagerPortalServiceImpl implements ManagerPortalService {
|
|||
HrmComInfoCacheHandler hrmComInfoCacheHandler;
|
||||
@Autowired
|
||||
EbuilderBaseMapper ebuilderBaseMapper;
|
||||
@Autowired
|
||||
HrmCommonEmployeeDao hrmCommonEmployeeDao;
|
||||
@Autowired
|
||||
DataConvertMapper dataConvertMapper;
|
||||
|
||||
@Override
|
||||
public WeaResult<Map<String, Object>> getMangerInfo(Map<String, String> params) {
|
||||
|
|
@ -344,6 +350,41 @@ public class ManagerPortalServiceImpl implements ManagerPortalService {
|
|||
return WeaResult.success(returnMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WeaResult<Map<String, Object>> getAttendanceInfo(Map<String, String> params) {
|
||||
String type = params.get("type");
|
||||
if (StringUtils.isBlank(type)) {
|
||||
// 默认学历信息
|
||||
type = "abnormalAttendance";
|
||||
}
|
||||
User currentUser = UserContext.getCurrentUser();
|
||||
BasicPersonnelParam basicPersonnelParam = new BasicPersonnelParam();
|
||||
basicPersonnelParam.setTenantKey(currentUser.getTenantKey());
|
||||
basicPersonnelParam.setStartDate(DateUtil.getFirstDayOfMonth());
|
||||
basicPersonnelParam.setEndDate(DateUtil.getLastDayOfMonth());
|
||||
|
||||
Set<Long> allDepartmentIdList = getAllDepartmentIdList(basicPersonnelParam, currentUser.getEmployeeId());
|
||||
// 设置部门范围ID集合
|
||||
basicPersonnelParam.setDepartmentIdList(allDepartmentIdList);
|
||||
switch (type) {
|
||||
case "abnormalAttendance":
|
||||
// 异常考勤
|
||||
return WeaResult.success(dealAbnormalAttendanceInfo(basicPersonnelParam));
|
||||
case "lateOrLeaveEarly":
|
||||
// 迟到/早退
|
||||
return WeaResult.success(dealLateOrLeaveEarlyInfo(basicPersonnelParam));
|
||||
case "overtimeDuration":
|
||||
// 加班时长
|
||||
return WeaResult.success(dealOvertimeDurationInfo(basicPersonnelParam));
|
||||
case "leaveType":
|
||||
// 请假类型
|
||||
return WeaResult.success(dealLeaveTypeInfo(basicPersonnelParam));
|
||||
default:
|
||||
return WeaResult.fail("不支持的统计类型",true);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public WeaResult<Map<String, Object>> getTeamEmployee(Map<String, String> params) {
|
||||
String searchKey = params.get("searchKey");
|
||||
|
|
@ -490,6 +531,101 @@ public class ManagerPortalServiceImpl implements ManagerPortalService {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* 异常考勤
|
||||
*
|
||||
* @param basicPersonnelParam
|
||||
* @return
|
||||
*/
|
||||
private Map<String, Object> dealAbnormalAttendanceInfo(BasicPersonnelParam basicPersonnelParam) {
|
||||
Map<String, Object> dataMap = new LinkedHashMap<>();
|
||||
dataMap.put("late", Convert.toInt(managerPortalMapper.sumLateTimes(basicPersonnelParam), 0));
|
||||
dataMap.put("leaveEarly", Convert.toInt(managerPortalMapper.sumLeaveEarlyTimes(basicPersonnelParam), 0));
|
||||
dataMap.put("absenteeism", Convert.toInt(managerPortalMapper.sumAbsenteeismTimes(basicPersonnelParam), 0));
|
||||
dataMap.put("reissueCard", Convert.toInt(managerPortalMapper.sumReissueCardTimes(basicPersonnelParam), 0));
|
||||
dataMap.put("totalAttendance", Convert.toInt(managerPortalMapper.sumTotalAttendanceTimes(basicPersonnelParam), 0) * 2);
|
||||
return dataMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 迟到/早退
|
||||
*
|
||||
* @param basicPersonnelParam
|
||||
* @return
|
||||
*/
|
||||
private Map<String, Object> dealLateOrLeaveEarlyInfo(BasicPersonnelParam basicPersonnelParam) {
|
||||
Map<String, Object> dataMap = new LinkedHashMap<>();
|
||||
List<LateAndEarlyRankPo> lateAndEarlyRankList = managerPortalMapper.getLateAndEarlyRankList(basicPersonnelParam);
|
||||
Iterator<LateAndEarlyRankPo> iterator = lateAndEarlyRankList.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
LateAndEarlyRankPo lateAndEarlyRankPo = iterator.next();
|
||||
if (lateAndEarlyRankPo.getTimes() == null || lateAndEarlyRankPo.getTimes() == 0) {
|
||||
iterator.remove();
|
||||
continue;
|
||||
}
|
||||
SimpleEmployee byId = hrmCommonEmployeeDao.getById(lateAndEarlyRankPo.getEmpId());
|
||||
if (byId != null) {
|
||||
lateAndEarlyRankPo.setEmpName(byId.getName());
|
||||
SimpleDepartment department = byId.getDepartment();
|
||||
if (department != null) {
|
||||
lateAndEarlyRankPo.setDepartmentName(department.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
dataMap.put("list", lateAndEarlyRankList);
|
||||
return dataMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 加班时长
|
||||
*
|
||||
* @param basicPersonnelParam
|
||||
* @return
|
||||
*/
|
||||
private Map<String, Object> dealOvertimeDurationInfo(BasicPersonnelParam basicPersonnelParam) {
|
||||
Map<String, Object> dataMap = new LinkedHashMap<>();
|
||||
// 工作日加班
|
||||
dataMap.put("workday", Convert.toInt(managerPortalMapper.sumWorkdayOvertimeDuration(basicPersonnelParam), 0));
|
||||
// 公休日加班
|
||||
dataMap.put("weekend", Convert.toInt(managerPortalMapper.sumWeekendOvertimeDuration(basicPersonnelParam), 0));
|
||||
// 法定假节日加班
|
||||
dataMap.put("legalHoliday", Convert.toInt(managerPortalMapper.sumLegalHolidayOvertimeDuration(basicPersonnelParam), 0));
|
||||
return dataMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 请假类型
|
||||
*
|
||||
* @param basicPersonnelParam
|
||||
* @return
|
||||
*/
|
||||
private Map<String, Object> dealLeaveTypeInfo(BasicPersonnelParam basicPersonnelParam) {
|
||||
Map<String, Object> dataMap = new LinkedHashMap<>();
|
||||
Set<Long> holidayIds = new HashSet<>();
|
||||
// 事假次数
|
||||
holidayIds.add(dataConvertMapper.getHolidayType(basicPersonnelParam, "事假"));
|
||||
dataMap.put("personalLeaveCount", Convert.toInt(managerPortalMapper.sumHolidayTimes(basicPersonnelParam, CollectionUtil.isEmpty(holidayIds) ? Collections.singletonList(-1L) : holidayIds), 0));
|
||||
// 事假时长
|
||||
dataMap.put("personalLeaveDuration", Convert.toInt(managerPortalMapper.sumPersonalLeaveDuration(basicPersonnelParam), 0));
|
||||
// 病假次数
|
||||
holidayIds = new HashSet<>();
|
||||
holidayIds.add(dataConvertMapper.getHolidayType(basicPersonnelParam, "病假"));
|
||||
holidayIds.add(dataConvertMapper.getHolidayType(basicPersonnelParam, "带薪病假"));
|
||||
dataMap.put("sickLeaveCount", Convert.toInt(managerPortalMapper.sumHolidayTimes(basicPersonnelParam, CollectionUtil.isEmpty(holidayIds) ? Collections.singletonList(-1L) : holidayIds), 0));
|
||||
// 病假时长
|
||||
dataMap.put("sickLeaveDuration", Convert.toInt(managerPortalMapper.sumSickLeaveDuration(basicPersonnelParam), 0));
|
||||
// 年假次数
|
||||
holidayIds = new HashSet<>();
|
||||
holidayIds.add(dataConvertMapper.getHolidayType(basicPersonnelParam, "年假"));
|
||||
dataMap.put("annualLeaveCount", Convert.toInt(managerPortalMapper.sumHolidayTimes(basicPersonnelParam, CollectionUtil.isEmpty(holidayIds) ? Collections.singletonList(-1L) : holidayIds), 0));
|
||||
// 年假时长
|
||||
dataMap.put("annualLeaveDuration", Convert.toInt(managerPortalMapper.sumAnnualLeaveDuration(basicPersonnelParam), 0));
|
||||
|
||||
return dataMap;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取用户当前所负责的所有的部门以及下级部门
|
||||
*
|
||||
|
|
@ -506,6 +642,7 @@ public class ManagerPortalServiceImpl implements ManagerPortalService {
|
|||
allDepartmentList.add(departMentById);
|
||||
allDepartmentList.addAll(beLongDeps);
|
||||
}
|
||||
// TODO 判断集合如果为空,不展示数据
|
||||
return allDepartmentList.stream().map(WeaDepartMent::getDepartMentId).collect(Collectors.toSet());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ public class PapiUtil {
|
|||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
// TODO 测试用
|
||||
String papiCode = getPapiCode(ApplicationConfigConstant.APP_URL, ApplicationConfigConstant.CORP_ID, "A1a");
|
||||
System.out.println("papiCode==" + papiCode);
|
||||
String papiToken = getPapiToken(ApplicationConfigConstant.APP_URL, ApplicationConfigConstant.ORGANIZATION_APP_KEY, ApplicationConfigConstant.ORGANIZATION_APP_SECRET, papiCode);
|
||||
|
|
|
|||
|
|
@ -9,4 +9,10 @@
|
|||
and t1.type = #{type}
|
||||
and t1.name = #{name}
|
||||
</select>
|
||||
|
||||
<select id="getHolidayType" resultType="java.lang.Long">
|
||||
select t1.id from ${param.e10_other_business}.attend_vacation_setting t1
|
||||
where t1.delete_type = 0 and t1.tenant_key = #{param.tenantKey}
|
||||
and t1.name = #{name}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -229,9 +229,9 @@
|
|||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- <if test="departmentId != null and departmentId != ''">-->
|
||||
<!-- and t.department = #{departmentId}-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="departmentId != null and departmentId != ''">-->
|
||||
<!-- and t.department = #{departmentId}-->
|
||||
<!-- </if>-->
|
||||
|
||||
<if test="searchKey != null and searchKey != ''">
|
||||
and (t.username like concat('%',#{searchKey},'%') or t.job_num like concat('%',#{searchKey},'%'))
|
||||
|
|
@ -251,9 +251,9 @@
|
|||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- <if test="departmentId != null and departmentId != ''">-->
|
||||
<!-- and t.department = #{departmentId}-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="departmentId != null and departmentId != ''">-->
|
||||
<!-- and t.department = #{departmentId}-->
|
||||
<!-- </if>-->
|
||||
<if test="searchKey != null and searchKey != ''">
|
||||
and (t.username like concat('%',#{searchKey},'%') or t.job_num like concat('%',#{searchKey},'%'))
|
||||
</if>
|
||||
|
|
@ -273,5 +273,175 @@
|
|||
group by t.ppdj
|
||||
</select>
|
||||
|
||||
<select id="sumLateTimes" resultType="java.lang.Integer">
|
||||
select sum(t1.cdcs) as value from ${e10_common}.uf_attend_day_report t1
|
||||
where t1.delete_type = 0 and t1.tenant_key = #{tenantKey}
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
AND t1.bm in
|
||||
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
|
||||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
and t1.rq between #{startDate} and #{endDate}
|
||||
</select>
|
||||
|
||||
<select id="sumLeaveEarlyTimes" resultType="java.lang.Integer">
|
||||
select sum(t1.ztcs) as value from ${e10_common}.uf_attend_day_report t1
|
||||
where t1.delete_type = 0 and t1.tenant_key = #{tenantKey}
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
AND t1.bm in
|
||||
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
|
||||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
and t1.rq between #{startDate} and #{endDate}
|
||||
</select>
|
||||
|
||||
<select id="sumAbsenteeismTimes" resultType="java.lang.Integer">
|
||||
select sum(t1.kgcs) as value from ${e10_common}.uf_attend_day_report t1
|
||||
where t1.delete_type = 0 and t1.tenant_key = #{tenantKey}
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
AND t1.bm in
|
||||
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
|
||||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
and t1.rq between #{startDate} and #{endDate}
|
||||
</select>
|
||||
|
||||
<select id="sumReissueCardTimes" resultType="java.lang.Integer">
|
||||
select sum(t1.bkcs) as value from ${e10_common}.uf_attend_day_report t1
|
||||
where t1.delete_type = 0 and t1.tenant_key = #{tenantKey}
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
AND t1.bm in
|
||||
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
|
||||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
and t1.rq between #{startDate} and #{endDate}
|
||||
</select>
|
||||
|
||||
<select id="sumTotalAttendanceTimes" resultType="java.lang.Integer">
|
||||
select count(t1.id) as value from ${e10_common}.uf_attend_day_report t1
|
||||
where t1.delete_type = 0 and t1.tenant_key = #{tenantKey}
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
AND t1.bm in
|
||||
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
|
||||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
and t1.rq between #{startDate} and #{endDate}
|
||||
<!-- TODO -->
|
||||
and t1.rqlx = '工作日'
|
||||
</select>
|
||||
|
||||
<select id="getLateAndEarlyRankList" resultType="com.weaver.seconddev.portal.entity.po.LateAndEarlyRankPo">
|
||||
select t1.xm as empId,sum(ifnull(t1.cdcs,0) + ifnull(t1.ztcs,0)) as times,sum(ifnull(t1.cdfzs,0) + ifnull(t1.ztfzs,0)) as minutes
|
||||
from ${e10_common}.uf_attend_day_report t1
|
||||
where t1.delete_type = 0 and t1.tenant_key = #{tenantKey}
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
AND t1.bm in
|
||||
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
|
||||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
and t1.rq between #{startDate} and #{endDate}
|
||||
group by t1.xm
|
||||
order by times desc
|
||||
</select>
|
||||
|
||||
<select id="sumWorkdayOvertimeDuration" resultType="java.lang.Integer">
|
||||
select sum(t1.ot1hj) as value from ${e10_common}.uf_attend_day_report t1
|
||||
where t1.delete_type = 0 and t1.tenant_key = #{tenantKey}
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
AND t1.bm in
|
||||
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
|
||||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
and t1.rq between #{startDate} and #{endDate}
|
||||
</select>
|
||||
|
||||
<select id="sumWeekendOvertimeDuration" resultType="java.lang.Integer">
|
||||
select sum(t1.ot2hj) as value from ${e10_common}.uf_attend_day_report t1
|
||||
where t1.delete_type = 0 and t1.tenant_key = #{tenantKey}
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
AND t1.bm in
|
||||
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
|
||||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
and t1.rq between #{startDate} and #{endDate}
|
||||
</select>
|
||||
|
||||
<select id="sumLegalHolidayOvertimeDuration" resultType="java.lang.Integer">
|
||||
select sum(t1.ot3hj) as value from ${e10_common}.uf_attend_day_report t1
|
||||
where t1.delete_type = 0 and t1.tenant_key = #{tenantKey}
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
AND t1.bm in
|
||||
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
|
||||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
and t1.rq between #{startDate} and #{endDate}
|
||||
</select>
|
||||
|
||||
<select id="sumPersonalLeaveDuration" resultType="java.lang.Integer">
|
||||
select sum(t1.sj) as value from ${e10_common}.uf_attend_day_report t1
|
||||
where t1.delete_type = 0 and t1.tenant_key = #{tenantKey}
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
AND t1.bm in
|
||||
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
|
||||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
and t1.rq between #{startDate} and #{endDate}
|
||||
</select>
|
||||
|
||||
<select id="sumSickLeaveDuration" resultType="java.lang.Integer">
|
||||
select sum(ifnull(t1.bj,0)+ifnull(t1.dxbj,0)) as value from ${e10_common}.uf_attend_day_report t1
|
||||
where t1.delete_type = 0 and t1.tenant_key = #{tenantKey}
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
AND t1.bm in
|
||||
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
|
||||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
and t1.rq between #{startDate} and #{endDate}
|
||||
</select>
|
||||
|
||||
<select id="sumAnnualLeaveDuration" resultType="java.lang.Integer">
|
||||
select sum(t1.nj) as value from ${e10_common}.uf_attend_day_report t1
|
||||
where t1.delete_type = 0 and t1.tenant_key = #{tenantKey}
|
||||
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
||||
AND t1.bm in
|
||||
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
|
||||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
and t1.rq between #{startDate} and #{endDate}
|
||||
</select>
|
||||
|
||||
<select id="sumHolidayTimes" resultType="java.lang.Integer">
|
||||
select count(t1.id) as value from ${param.e10_common}.${param.leaveFormCus} t1
|
||||
where t1.delete_type = 0 and t1.tenant_key = #{param.tenantKey}
|
||||
<if test="param.departmentIdList != null and param.departmentIdList.size() > 0">
|
||||
AND t1.sqbm in
|
||||
<foreach collection="param.departmentIdList" item="departmentId" open="(" close=")" separator=",">
|
||||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
and (t1.kssj between #{param.startDate} and #{param.endDate} or t1.jssj between #{param.startDate} and
|
||||
#{param.endDate})
|
||||
<if test="holidayIds != null and holidayIds.size() > 0">
|
||||
AND t1.xjxm in
|
||||
<foreach collection="holidayIds" item="holidayId" open="(" close=")" separator=",">
|
||||
#{holidayId}
|
||||
</foreach>
|
||||
</if>
|
||||
<!--状态为:已审批-->
|
||||
and t1.zt = 1
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue