parent
26dffb27f9
commit
d4df9cff0f
|
|
@ -20,7 +20,7 @@ public class AttDataDetailsBean {
|
|||
/**
|
||||
* 组织编号
|
||||
*/
|
||||
private List<String> orgIds;
|
||||
private List<Long> orgIds;
|
||||
|
||||
/**
|
||||
* 组织名称
|
||||
|
|
|
|||
|
|
@ -39,6 +39,11 @@ public class AttDetailBean {
|
|||
*/
|
||||
private Long orgId;
|
||||
|
||||
/**
|
||||
* 部门编号
|
||||
*/
|
||||
private List<Long> orgIds;
|
||||
|
||||
|
||||
/**
|
||||
* 考勤日期
|
||||
|
|
|
|||
|
|
@ -0,0 +1,50 @@
|
|||
package com.bonus.system.att.entity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 考勤天数组成
|
||||
* @author fl
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class AttMonthDaysMakeUpBean {
|
||||
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 考勤月
|
||||
*/
|
||||
private String attCurrentMonth;
|
||||
/**
|
||||
* 出勤天数
|
||||
*/
|
||||
private Integer attDays;
|
||||
/**
|
||||
* 考勤组
|
||||
*/
|
||||
private String groupName;
|
||||
/**
|
||||
* 考勤规则
|
||||
*/
|
||||
private String attRules;
|
||||
/**
|
||||
* 是否有节假日
|
||||
*/
|
||||
private String isHaveHoliday;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private String attStartDate;
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private String attEndDate;
|
||||
|
||||
}
|
||||
|
|
@ -17,12 +17,19 @@ public class AttMonthReportBean {
|
|||
*/
|
||||
private Long orgId;
|
||||
|
||||
/**
|
||||
* 组织编号
|
||||
*/
|
||||
private List<Long> orgIds;
|
||||
|
||||
/**
|
||||
* 组织名称
|
||||
*/
|
||||
@Excel(name = "所属部门", sort = 2)
|
||||
private String orgName;
|
||||
|
||||
private String orgNames;
|
||||
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -38,6 +38,12 @@ public class AttSourceDataBean {
|
|||
*/
|
||||
private String attCurrentDay;
|
||||
|
||||
/**
|
||||
* 考勤月
|
||||
*/
|
||||
private String attCurrentMonth;
|
||||
|
||||
|
||||
/**
|
||||
* 考勤时间
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -808,6 +808,7 @@ public class AttCalServiceImpl implements AttCalService {
|
|||
longBreakRecord.setName(record.getName());
|
||||
longBreakRecord.setOrgId(attGroupBean.getOrgId());
|
||||
longBreakRecord.setAttCurrentDay(record.getAttCurrentDay());
|
||||
longBreakRecord.setAttCurrentMonth(record.getAttCurrentDay().substring(0, 7));
|
||||
longBreakRecord.setAttCurrentTime(v.get(i - 1).getAttCurrentTime() + " " + record.getAttCurrentTime());
|
||||
longBreakRecord.setAttAddress(v.get(i - 1).getAttAddress() + " " + record.getAttAddress());
|
||||
longBreakRecords.add(longBreakRecord);
|
||||
|
|
|
|||
|
|
@ -683,7 +683,7 @@ public class ExportFileController {
|
|||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("序号", i + 1);
|
||||
map.put("姓名", attDayReportList.get(i).getUserName());
|
||||
map.put("所属部门", attDayReportList.get(i).getOrgName());
|
||||
map.put("所属部门", attDayReportList.get(i).getOrgNames());
|
||||
map.put("考勤月", attDayReportList.get(i).getAttCurrentMonth());
|
||||
map.put("打卡记录", attDayReportList.get(i).getClockingRecordNum());
|
||||
map.put("应考勤天数", attDayReportList.get(i).getRequiredDays());
|
||||
|
|
@ -723,8 +723,8 @@ public class ExportFileController {
|
|||
dayTable.setStartDate(monthFirstAndLast.get(0));
|
||||
dayTable.setEndDate(monthFirstAndLast.get(1));
|
||||
dayTable.setName(bean.getUserName());
|
||||
if (bean.getOrgId() != null) {
|
||||
dayTable.setOrgId(bean.getOrgId());
|
||||
if (bean.getOrgIds() != null) {
|
||||
dayTable.setOrgIds(bean.getOrgIds());
|
||||
}else{
|
||||
//受限于当前登录人
|
||||
if(bean.getOrgList() != null && !bean.getOrgList().isEmpty()){
|
||||
|
|
@ -738,8 +738,8 @@ public class ExportFileController {
|
|||
// att.setAttCurrentMonth(bean.getMonth());
|
||||
att.setStartDate(monthFirstAndLast.get(0));
|
||||
att.setEndDate(monthFirstAndLast.get(1));
|
||||
if (bean.getOrgId() != null) {
|
||||
att.setOrgId(bean.getOrgId());
|
||||
if (bean.getOrgIds() != null) {
|
||||
att.setOrgIds(bean.getOrgIds());
|
||||
}else{
|
||||
//受限于当前登录人
|
||||
if(bean.getOrgList() != null && !bean.getOrgList().isEmpty()){
|
||||
|
|
@ -1359,7 +1359,7 @@ public class ExportFileController {
|
|||
dayTable.setName(bean.getUserName());
|
||||
if (bean.getOrgId() != null || bean.getOrgIds() != null) {
|
||||
dayTable.setOrgId(bean.getOrgId());
|
||||
dayTable.setOrgList(bean.getOrgIds());
|
||||
dayTable.setOrgIds(bean.getOrgIds());
|
||||
}else{
|
||||
//受限于当前登录人
|
||||
if(bean.getOrgList() != null && !bean.getOrgList().isEmpty()){
|
||||
|
|
@ -1374,7 +1374,7 @@ public class ExportFileController {
|
|||
att.setEndDate(bean.getEndDate());
|
||||
if (bean.getOrgId() != null || bean.getOrgIds() != null) {
|
||||
att.setOrgId(bean.getOrgId());
|
||||
att.setOrgList(bean.getOrgIds());
|
||||
att.setOrgIds(bean.getOrgIds());
|
||||
}else{
|
||||
//受限于当前登录人
|
||||
if(bean.getOrgList() != null && !bean.getOrgList().isEmpty()){
|
||||
|
|
|
|||
|
|
@ -194,6 +194,13 @@
|
|||
<if test="orgId != null and orgId != '' ">
|
||||
and vat.org_id = #{orgId}
|
||||
</if>
|
||||
<if test='orgIds != null and orgIds.size() > 0'>
|
||||
and vat.org_id in (
|
||||
<foreach collection="orgIds" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test='orgList != null and orgList.size() > 0'>
|
||||
and vat.org_id in (
|
||||
<foreach collection="orgList" item="item" separator=",">
|
||||
|
|
|
|||
|
|
@ -360,8 +360,11 @@
|
|||
WHERE la.is_active = 1
|
||||
AND la.examine_status = 1
|
||||
AND sdd.dict_value IS NOT NULL
|
||||
AND leave_start_date BETWEEN #{pushDate} - INTERVAL 15 DAY
|
||||
AND
|
||||
(leave_start_date BETWEEN #{pushDate} - INTERVAL 15 DAY
|
||||
and #{pushDate}
|
||||
or #{pushDate} between leave_start_date and leave_end_date
|
||||
)
|
||||
ORDER BY
|
||||
leave_start_date
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -314,15 +314,27 @@
|
|||
WHERE adr.att_current_day BETWEEN #{startDate} AND #{endDate}
|
||||
</select>
|
||||
|
||||
<!--orgList与orgIds不同,一个是权限获取的,一个是前端选择的,不放在一起是防止下拉全权限错误导致查询范围变大 -->
|
||||
<select id="getAttMonthReportList" resultType="com.bonus.system.att.entity.AttMonthReportBean">
|
||||
select v.*, v.name as userName,IF(awa.outCount is null,0,awa.outCount) as outCount
|
||||
from att_month_report v
|
||||
left join att_group_person_relation p on p.user_id = v.user_id and p.is_active = 1
|
||||
LEFT JOIN (SELECT user_id,count(user_id) as outCount FROM att_work_abnormal WHERE LOCATE(#{bean.month},att_current_day) GROUP BY user_id) awa ON awa.user_id = v.user_id
|
||||
where v.att_current_month BETWEEN #{bean.startMonth} AND #{bean.endMonth} and p.group_id is not null
|
||||
SELECT v.*, v.name as userName,
|
||||
IFNULL(CONCAT(so2.`org_name`,'/',v.org_name),v.org_name) as orgNames,
|
||||
IF(awa.outCount is null,0,awa.outCount) as outCount
|
||||
FROM att_month_report v
|
||||
LEFT JOIN sys_organization so ON v.org_id = so.id
|
||||
LEFT JOIN sys_organization so2 ON so.parent_id = so2.id
|
||||
LEFT JOIN (SELECT user_id,att_current_month, count( user_id ) AS outCount FROM att_work_abnormal WHERE att_current_month BETWEEN #{bean.startMonth}
|
||||
AND #{bean.endMonth} GROUP BY user_id,att_current_month) awa ON awa.user_id = v.user_id and awa.att_current_month = v.att_current_month
|
||||
where v.att_current_month BETWEEN #{bean.startMonth} AND #{bean.endMonth}
|
||||
<if test="bean.orgId != null and bean.orgId != ''">
|
||||
AND v.org_id = #{bean.orgId}
|
||||
</if>
|
||||
<if test='bean.orgIds != null and bean.orgIds.size() > 0'>
|
||||
and v.org_id in (
|
||||
<foreach collection="bean.orgIds" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="bean.userName != null and bean.userName != ''">
|
||||
AND v.name like concat('%', #{bean.userName}, '%')
|
||||
</if>
|
||||
|
|
@ -527,6 +539,13 @@
|
|||
<if test="bean.orgId != null and bean.orgId != ''">
|
||||
and so.id = #{bean.orgId}
|
||||
</if>
|
||||
<if test='bean.orgIds != null and bean.orgIds.size() > 0'>
|
||||
and so.id in (
|
||||
<foreach collection="bean.orgIds" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test='bean.orgList != null and bean.orgList.size() > 0'>
|
||||
and so.id in (
|
||||
<foreach collection="bean.orgList" item="item" separator=",">
|
||||
|
|
|
|||
Loading…
Reference in New Issue