Commit 843f9a3d by lal Committed by chenzg

提交

parent e7a6072b
......@@ -95,6 +95,7 @@ import cn.timer.api.dto.kqmk.AttendanceAssistantDto;
import cn.timer.api.dto.kqmk.AttendanceSummaryQueryDto;
import cn.timer.api.dto.kqmk.AttqueryCriteriaDto;
import cn.timer.api.dto.kqmk.CompensateDto;
import cn.timer.api.dto.kqmk.DailyDetailsDto;
import cn.timer.api.dto.kqmk.EmployeeLeaveBalanceDto;
import cn.timer.api.dto.kqmk.IndividualOvertimeRuleDto;
import cn.timer.api.dto.kqmk.KqglAssoLeaveRulesDto;
......@@ -2033,6 +2034,38 @@ public class TimeCardController {
return ResultUtil.data(pageAs, listAs, "操作成功!");
}
@PostMapping(value = "/Daily_details")
@ApiOperation(value = "获取考勤每日详情数据", httpMethod = "POST", notes = "接口发布说明")
public Result<Object> DailydetailsList(@CurrentUser UserBean userBean, @Validated @RequestBody AttendanceSummaryQueryDto attesummqueto) throws ParseException {
IPage<DailyDetailsDto> page = new Page<DailyDetailsDto>(
attesummqueto.getCurrentPage() == null ? 1 : attesummqueto.getCurrentPage(),
attesummqueto.getTotalPage() == null ? 10 : attesummqueto.getTotalPage());
attesummqueto.setOrgCode(userBean.getOrgCode());
String year = null,month = null,time = null;
if(attesummqueto.getTimes() != null && !("").equals(attesummqueto.getTimes())) {
year = attesummqueto.getTimes().substring(0, 4);
month = attesummqueto.getTimes().substring(5, 7);
time = attesummqueto.getTimes();
}else {
year = new SimpleDateFormat("yyyy").format(new Date()).toString();
month = new SimpleDateFormat("MM").format(new Date()).toString();
time = new SimpleDateFormat("yyyy-MM-dd").format(new Date()).toString();
}
attesummqueto.setYear(year);
attesummqueto.setMonth(month);
attesummqueto.setTimes(time);
// 缺-部门id 搜索
IPage<DailyDetailsDto> pageAs = kqglassomonthpunchsummarymapper.Dailydetails(page, attesummqueto);
List<DailyDetailsDto> listAs = pageAs.getRecords();
return ResultUtil.data(pageAs, listAs, "操作成功!");
}
// @GetMapping(value = "/summary_report")
// @ApiOperation(value = "考勤汇总报表(暂时不用)", httpMethod = "GET", notes = "接口发布说明")
......
......@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import cn.timer.api.bean.kqmk.KqglAssoMonthPunchSummary;
import cn.timer.api.dto.kqmk.AttendanceSummaryQueryDto;
import cn.timer.api.dto.kqmk.DailyDetailsDto;
import cn.timer.api.dto.kqmk.KqglAssoMonthPunchSummaryDto;
/**
......@@ -19,4 +20,6 @@ import cn.timer.api.dto.kqmk.KqglAssoMonthPunchSummaryDto;
public interface KqglAssoMonthPunchSummaryMapper extends BaseMapper<KqglAssoMonthPunchSummary> {
IPage<KqglAssoMonthPunchSummaryDto> AttendanceSummaryData(IPage<KqglAssoMonthPunchSummaryDto> page,@Param("param") AttendanceSummaryQueryDto attendancesummaryquerydto);
IPage<DailyDetailsDto> Dailydetails(IPage<DailyDetailsDto> page,@Param("param") AttendanceSummaryQueryDto attendancesummaryquerydto);
}
package cn.timer.api.dto.kqmk;
import java.util.List;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class DailyDetailsDto {
private String name;// 姓名
private Integer num;// 工号
private String dept;// 部门
private String post;// 岗位
private String attname;// 考勤组名称
private String attdate;// 考勤日期
private Integer userid;// 用户ID
private String data;// 日期
private String sbdk1;// 上班1打卡时间
private Integer sbdk1jg;// 上班1打卡结果
private String xbdk1;// 下班1打卡时间
private Integer xbdk1jg;// 下班1打卡结果
private String sbdk2;// 上班2打卡时间
private Integer sbdk2jg;// 上班2打卡结果
private String xbdk2;// 下班2打卡时间
private Integer xbdk2jg;// 下班2打卡结果
private String sbdk3;// 上班3打卡时间
private Integer sbdk3jg;// 上班3打卡结果
private String xbdk3;// 下班3打卡时间
private Integer xbdk3jg;// 下班3打卡结果
private Integer ydkcs;// 应打卡次数
private Integer gzsc;// 工作时长
private Integer qyid;// 企业id
private String dksj;// 打卡时间
private Integer yzcdcs;// 严重迟到次数
private Integer yzcdsc;// 严重迟到时长(分钟)
private Integer kgcdfzs;// 旷工迟到次数
private String daysonduty;// 应出勤天数
private String daysoff;// 休息天数
private String lengthbusinesstrip;// 出差时长
private String timeout;// 外出时长
private String totalovertimehours;// 加班总时长
private String workingturncompenleave;// 工作日(转调休)
private String restturncompenleave;// 休息日(转调休)
private String holidayturncompenleave;// 节假日(转调休)
private String workingtransferovertime;// 工作日(转加班费)
private String resttransferovertime;// 休息日(转加班费)
private String holidaytransferovertime;// 节假日(转加班费)
private Integer leaverulesid;//
private String duration;//
@ApiModelProperty(value = "表数据", example = "字段说明")
List<BalanceSheetDataDto> balanceTo;
}
......@@ -43,6 +43,8 @@ public class KqglAssoMonthPunchSummaryDto {
@ApiModelProperty(value = "考勤组id 考勤组id", example = "101")
private Integer attGroup;
private String attname;
@ApiModelProperty(value = "班次id 班次id", example = "101")
private Integer shift;
......
......@@ -78,6 +78,7 @@
<result column="dept" property="dept" />
<result column="post" property="post" />
<result column="att_group" property="attGroup" />
<result column="attname" property="attname" />
<result column="shift" property="shift" />
<result column="days_on_duty" property="daysOnDuty" />
<result column="actual_att_days" property="actualAttDays" />
......@@ -138,84 +139,64 @@
<result column="org_code" property="orgCode" />
<result column="last_modified" property="lastModified" />
<collection property="balanceTo" ofType="cn.timer.api.dto.kqmk.BalanceSheetDataDto">
<result column="leaverulesid" property="leaverulesid"/>
<result column="balancedays" property="balancedays"/>
</collection>
</resultMap>
<resultMap id="DailyDetailsMap" type="cn.timer.api.dto.kqmk.DailyDetailsDto" >
<result column="name" property="name" />
<result column="num" property="num" />
<result column="dept" property="dept" />
<result column="post" property="post" />
<result column="attname" property="attname" />
<result column="attdate" property="attdate" />
<result column="userid" property="userid" />
<result column="data" property="data" />
<result column="sbdk1" property="sbdk1" />
<result column="sbdk1jg" property="sbdk1jg" />
<result column="xbdk1" property="xbdk1" />
<result column="xbdk1jg" property="xbdk1jg" />
<result column="sbdk2" property="sbdk2" />
<result column="sbdk2jg" property="sbdk2jg" />
<result column="xbdk2" property="xbdk2" />
<result column="xbdk2jg" property="xbdk2jg" />
<result column="sbdk3" property="sbdk3" />
<result column="sbdk3jg" property="sbdk3jg" />
<result column="xbdk3" property="xbdk3" />
<result column="xbdk3jg" property="xbdk3jg" />
<result column="ydkcs" property="ydkcs" />
<result column="gzsc" property="gzsc" />
<result column="qyid" property="qyid" />
<result column="dksj" property="dksj" />
<result column="yzcdcs" property="yzcdcs" />
<result column="yzcdsc" property="yzcdsc" />
<result column="kgcdfzs" property="kgcdfzs" />
<result column="daysonduty" property="daysonduty" />
<result column="daysoff" property="daysoff" />
<result column="lengthbusinesstrip" property="lengthbusinesstrip" />
<result column="timeout" property="timeout" />
<result column="totalovertimehours" property="totalovertimehours" />
<result column="workingturncompenleave" property="workingturncompenleave" />
<result column="restturncompenleave" property="restturncompenleave" />
<result column="holidayturncompenleave" property="holidayturncompenleave" />
<result column="workingtransferovertime" property="workingtransferovertime" />
<result column="resttransferovertime" property="resttransferovertime" />
<result column="holidaytransferovertime" property="holidaytransferovertime" />
<result column="leaverulesid" property="leaverulesid" />
<result column="duration" property="duration" />
<collection property="balanceTo" ofType="cn.timer.api.dto.kqmk.BalanceSheetDataDto">
<result column="leaverulesid" property="leaverulesid"/>
<result column="balancedays" property="balancedays"/>
</collection>
</resultMap>
<sql id="Base_Column_List">
id,
name,
num,
dept,
post,
att_group,
shift,
days_on_duty,
actual_att_days,
days_off,
working_hours,
late_times,
late_hours,
serious_late_times,
serious_late_hours,
absen_late_times,
early_leave_times,
length_early_leave,
number_work_card_shortage,
number_duty_card_shortage,
absenteeism_days,
length_business_trip,
time_out,
total_overtime_hours,
working_turn_compen_leave,
rest_turn_compen_leave,
holiday_turn_compen_leave,
working_transfer_overtime,
rest_transfer_overtime,
holiday_transfer_overtime,
day1,
day2,
day3,
day4,
day5,
day6,
day7,
day8,
day9,
day10,
day11,
day12,
day13,
day14,
day15,
day16,
day17,
day18,
day19,
day20,
day21,
day22,
day23,
day24,
day25,
day26,
day27,
day28,
day29,
day30,
day31,
belong_year,
belong_month,
org_code,
last_modified
</sql>
<select id="AttendanceSummaryData" resultMap="SummarydataMap">
select sum.*,
(select kqz.name from kqgl_main_kqz kqz where kqz.id = sum.att_group) as attname,
yz.leaverulesid as leaverulesid,
yz.duration as balancedays
from kqgl_asso_month_punch_summary sum
......@@ -223,13 +204,17 @@
hz.user_id,
hz.duration
FROM kqgl_asso_leave_rules les
LEFT JOIN (select rel.user_id,rel.leave_type_id,SUM(rel.duration) as duration
from kqgl_asso_relation_summary rel
where rel.approval_type = 2
and rel.app_time &gt;= #{param.staapptime}
and rel.app_time &lt;= #{param.endapptime}
GROUP BY rel.user_id,rel.leave_type_id
) as hz on hz.leave_type_id = les.id
LEFT JOIN (select ry.user_id,ry.leave_type_id,SUM(ry.duration) as duration
from (
select rel.user_id,rel.leave_type_id,rel.duration
from kqgl_asso_relation_summary rel
where rel.approval_type = 2
and rel.app_time &gt;= #{param.staapptime}
and rel.app_time &lt;= #{param.endapptime}
GROUP BY rel.user_id,rel.leave_type_id,rel.duration
) as ry
GROUP BY ry.user_id,ry.leave_type_id
) as hz on hz.leave_type_id = les.id
WHERE les.org_code = #{param.orgCode}
AND (les.leave_type = 2 OR les.is_open = 1)
) as yz on yz.user_id = sum.num
......@@ -246,494 +231,84 @@
</select>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoMonthPunchSummary">
INSERT INTO kqgl_asso_month_punch_summary
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != name'>
name,
</if>
<if test ='null != num'>
num,
</if>
<if test ='null != dept'>
dept,
</if>
<if test ='null != post'>
post,
</if>
<if test ='null != attGroup'>
att_group,
</if>
<if test ='null != shift'>
shift,
</if>
<if test ='null != daysOnDuty'>
days_on_duty,
</if>
<if test ='null != actualAttDays'>
actual_att_days,
</if>
<if test ='null != daysOff'>
days_off,
</if>
<if test ='null != workingHours'>
working_hours,
</if>
<if test ='null != lateTimes'>
late_times,
</if>
<if test ='null != lateHours'>
late_hours,
</if>
<if test ='null != seriousLateTimes'>
serious_late_times,
</if>
<if test ='null != seriousLateHours'>
serious_late_hours,
</if>
<if test ='null != absenLateTimes'>
absen_late_times,
</if>
<if test ='null != earlyLeaveTimes'>
early_leave_times,
</if>
<if test ='null != lengthEarlyLeave'>
length_early_leave,
</if>
<if test ='null != numberWorkCardShortage'>
number_work_card_shortage,
</if>
<if test ='null != numberDutyCardShortage'>
number_duty_card_shortage,
</if>
<if test ='null != absenteeismDays'>
absenteeism_days,
</if>
<if test ='null != lengthBusinessTrip'>
length_business_trip,
</if>
<if test ='null != timeOut'>
time_out,
</if>
<if test ='null != totalOvertimeHours'>
total_overtime_hours,
</if>
<if test ='null != workingTurnCompenLeave'>
working_turn_compen_leave,
</if>
<if test ='null != restTurnCompenLeave'>
rest_turn_compen_leave,
</if>
<if test ='null != holidayTurnCompenLeave'>
holiday_turn_compen_leave,
</if>
<if test ='null != workingTransferOvertime'>
working_transfer_overtime,
</if>
<if test ='null != restTransferOvertime'>
rest_transfer_overtime,
</if>
<if test ='null != holidayTransferOvertime'>
holiday_transfer_overtime,
</if>
<if test ='null != day1'>
day1,
</if>
<if test ='null != day2'>
day2,
</if>
<if test ='null != day3'>
day3,
</if>
<if test ='null != day4'>
day4,
</if>
<if test ='null != day5'>
day5,
</if>
<if test ='null != day6'>
day6,
</if>
<if test ='null != day7'>
day7,
</if>
<if test ='null != day8'>
day8,
</if>
<if test ='null != day9'>
day9,
</if>
<if test ='null != day10'>
day10,
</if>
<if test ='null != day11'>
day11,
</if>
<if test ='null != day12'>
day12,
</if>
<if test ='null != day13'>
day13,
</if>
<if test ='null != day14'>
day14,
</if>
<if test ='null != day15'>
day15,
</if>
<if test ='null != day16'>
day16,
</if>
<if test ='null != day17'>
day17,
</if>
<if test ='null != day18'>
day18,
</if>
<if test ='null != day19'>
day19,
</if>
<if test ='null != day20'>
day20,
</if>
<if test ='null != day21'>
day21,
</if>
<if test ='null != day22'>
day22,
</if>
<if test ='null != day23'>
day23,
</if>
<if test ='null != day24'>
day24,
</if>
<if test ='null != day25'>
day25,
</if>
<if test ='null != day26'>
day26,
</if>
<if test ='null != day27'>
day27,
</if>
<if test ='null != day28'>
day28,
</if>
<if test ='null != day29'>
day29,
</if>
<if test ='null != day30'>
day30,
</if>
<if test ='null != day31'>
day31,
</if>
<if test ='null != belongYear'>
belong_year,
</if>
<if test ='null != belongMonth'>
belong_month,
</if>
<if test ='null != orgCode'>
org_code,
</if>
<if test ='null != lastModified'>
last_modified
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != name'>
#{name},
</if>
<if test ='null != num'>
#{num},
</if>
<if test ='null != dept'>
#{dept},
</if>
<if test ='null != post'>
#{post},
</if>
<if test ='null != attGroup'>
#{attGroup},
</if>
<if test ='null != shift'>
#{shift},
</if>
<if test ='null != daysOnDuty'>
#{daysOnDuty},
</if>
<if test ='null != actualAttDays'>
#{actualAttDays},
</if>
<if test ='null != daysOff'>
#{daysOff},
</if>
<if test ='null != workingHours'>
#{workingHours},
</if>
<if test ='null != lateTimes'>
#{lateTimes},
</if>
<if test ='null != lateHours'>
#{lateHours},
</if>
<if test ='null != seriousLateTimes'>
#{seriousLateTimes},
</if>
<if test ='null != seriousLateHours'>
#{seriousLateHours},
</if>
<if test ='null != absenLateTimes'>
#{absenLateTimes},
</if>
<if test ='null != earlyLeaveTimes'>
#{earlyLeaveTimes},
</if>
<if test ='null != lengthEarlyLeave'>
#{lengthEarlyLeave},
</if>
<if test ='null != numberWorkCardShortage'>
#{numberWorkCardShortage},
</if>
<if test ='null != numberDutyCardShortage'>
#{numberDutyCardShortage},
</if>
<if test ='null != absenteeismDays'>
#{absenteeismDays},
</if>
<if test ='null != lengthBusinessTrip'>
#{lengthBusinessTrip},
</if>
<if test ='null != timeOut'>
#{timeOut},
</if>
<if test ='null != totalOvertimeHours'>
#{totalOvertimeHours},
</if>
<if test ='null != workingTurnCompenLeave'>
#{workingTurnCompenLeave},
</if>
<if test ='null != restTurnCompenLeave'>
#{restTurnCompenLeave},
</if>
<if test ='null != holidayTurnCompenLeave'>
#{holidayTurnCompenLeave},
</if>
<if test ='null != workingTransferOvertime'>
#{workingTransferOvertime},
</if>
<if test ='null != restTransferOvertime'>
#{restTransferOvertime},
</if>
<if test ='null != holidayTransferOvertime'>
#{holidayTransferOvertime},
</if>
<if test ='null != day1'>
#{day1},
</if>
<if test ='null != day2'>
#{day2},
</if>
<if test ='null != day3'>
#{day3},
</if>
<if test ='null != day4'>
#{day4},
</if>
<if test ='null != day5'>
#{day5},
</if>
<if test ='null != day6'>
#{day6},
</if>
<if test ='null != day7'>
#{day7},
</if>
<if test ='null != day8'>
#{day8},
</if>
<if test ='null != day9'>
#{day9},
</if>
<if test ='null != day10'>
#{day10},
</if>
<if test ='null != day11'>
#{day11},
</if>
<if test ='null != day12'>
#{day12},
</if>
<if test ='null != day13'>
#{day13},
</if>
<if test ='null != day14'>
#{day14},
</if>
<if test ='null != day15'>
#{day15},
</if>
<if test ='null != day16'>
#{day16},
</if>
<if test ='null != day17'>
#{day17},
</if>
<if test ='null != day18'>
#{day18},
</if>
<if test ='null != day19'>
#{day19},
</if>
<if test ='null != day20'>
#{day20},
</if>
<if test ='null != day21'>
#{day21},
</if>
<if test ='null != day22'>
#{day22},
</if>
<if test ='null != day23'>
#{day23},
</if>
<if test ='null != day24'>
#{day24},
</if>
<if test ='null != day25'>
#{day25},
</if>
<if test ='null != day26'>
#{day26},
</if>
<if test ='null != day27'>
#{day27},
</if>
<if test ='null != day28'>
#{day28},
</if>
<if test ='null != day29'>
#{day29},
</if>
<if test ='null != day30'>
#{day30},
</if>
<if test ='null != day31'>
#{day31},
</if>
<if test ='null != belongYear'>
#{belongYear},
</if>
<if test ='null != belongMonth'>
#{belongMonth},
</if>
<if test ='null != orgCode'>
#{orgCode},
</if>
<if test ='null != lastModified'>
#{lastModified}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM kqgl_asso_month_punch_summary
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.kqmk.KqglAssoMonthPunchSummary">
UPDATE kqgl_asso_month_punch_summary
<set>
<if test ='null != name'>name = #{name},</if>
<if test ='null != num'>num = #{num},</if>
<if test ='null != dept'>dept = #{dept},</if>
<if test ='null != post'>post = #{post},</if>
<if test ='null != attGroup'>att_group = #{attGroup},</if>
<if test ='null != shift'>shift = #{shift},</if>
<if test ='null != daysOnDuty'>days_on_duty = #{daysOnDuty},</if>
<if test ='null != actualAttDays'>actual_att_days = #{actualAttDays},</if>
<if test ='null != daysOff'>days_off = #{daysOff},</if>
<if test ='null != workingHours'>working_hours = #{workingHours},</if>
<if test ='null != lateTimes'>late_times = #{lateTimes},</if>
<if test ='null != lateHours'>late_hours = #{lateHours},</if>
<if test ='null != seriousLateTimes'>serious_late_times = #{seriousLateTimes},</if>
<if test ='null != seriousLateHours'>serious_late_hours = #{seriousLateHours},</if>
<if test ='null != absenLateTimes'>absen_late_times = #{absenLateTimes},</if>
<if test ='null != earlyLeaveTimes'>early_leave_times = #{earlyLeaveTimes},</if>
<if test ='null != lengthEarlyLeave'>length_early_leave = #{lengthEarlyLeave},</if>
<if test ='null != numberWorkCardShortage'>number_work_card_shortage = #{numberWorkCardShortage},</if>
<if test ='null != numberDutyCardShortage'>number_duty_card_shortage = #{numberDutyCardShortage},</if>
<if test ='null != absenteeismDays'>absenteeism_days = #{absenteeismDays},</if>
<if test ='null != lengthBusinessTrip'>length_business_trip = #{lengthBusinessTrip},</if>
<if test ='null != timeOut'>time_out = #{timeOut},</if>
<if test ='null != totalOvertimeHours'>total_overtime_hours = #{totalOvertimeHours},</if>
<if test ='null != workingTurnCompenLeave'>working_turn_compen_leave = #{workingTurnCompenLeave},</if>
<if test ='null != restTurnCompenLeave'>rest_turn_compen_leave = #{restTurnCompenLeave},</if>
<if test ='null != holidayTurnCompenLeave'>holiday_turn_compen_leave = #{holidayTurnCompenLeave},</if>
<if test ='null != workingTransferOvertime'>working_transfer_overtime = #{workingTransferOvertime},</if>
<if test ='null != restTransferOvertime'>rest_transfer_overtime = #{restTransferOvertime},</if>
<if test ='null != holidayTransferOvertime'>holiday_transfer_overtime = #{holidayTransferOvertime},</if>
<if test ='null != day1'>day1 = #{day1},</if>
<if test ='null != day2'>day2 = #{day2},</if>
<if test ='null != day3'>day3 = #{day3},</if>
<if test ='null != day4'>day4 = #{day4},</if>
<if test ='null != day5'>day5 = #{day5},</if>
<if test ='null != day6'>day6 = #{day6},</if>
<if test ='null != day7'>day7 = #{day7},</if>
<if test ='null != day8'>day8 = #{day8},</if>
<if test ='null != day9'>day9 = #{day9},</if>
<if test ='null != day10'>day10 = #{day10},</if>
<if test ='null != day11'>day11 = #{day11},</if>
<if test ='null != day12'>day12 = #{day12},</if>
<if test ='null != day13'>day13 = #{day13},</if>
<if test ='null != day14'>day14 = #{day14},</if>
<if test ='null != day15'>day15 = #{day15},</if>
<if test ='null != day16'>day16 = #{day16},</if>
<if test ='null != day17'>day17 = #{day17},</if>
<if test ='null != day18'>day18 = #{day18},</if>
<if test ='null != day19'>day19 = #{day19},</if>
<if test ='null != day20'>day20 = #{day20},</if>
<if test ='null != day21'>day21 = #{day21},</if>
<if test ='null != day22'>day22 = #{day22},</if>
<if test ='null != day23'>day23 = #{day23},</if>
<if test ='null != day24'>day24 = #{day24},</if>
<if test ='null != day25'>day25 = #{day25},</if>
<if test ='null != day26'>day26 = #{day26},</if>
<if test ='null != day27'>day27 = #{day27},</if>
<if test ='null != day28'>day28 = #{day28},</if>
<if test ='null != day29'>day29 = #{day29},</if>
<if test ='null != day30'>day30 = #{day30},</if>
<if test ='null != day31'>day31 = #{day31},</if>
<if test ='null != belongYear'>belong_year = #{belongYear},</if>
<if test ='null != belongMonth'>belong_month = #{belongMonth},</if>
<if test ='null != orgCode'>org_code = #{orgCode},</if>
<if test ='null != lastModified'>last_modified = #{lastModified}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_month_punch_summary
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_month_punch_summary
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM kqgl_asso_month_punch_summary
</select>
<select id="Dailydetails" resultMap="DailyDetailsMap">
select sum.`name`,sum.num,sum.dept,sum.post,
(select kqz.name from kqgl_main_kqz kqz where kqz.id = sum.att_group) as attname,
IFNULL(rtj.attdate, '') attdate,
IFNULL(rtj.userid,'') userid,
IFNULL(rtj.data,'') data,
IFNULL(rtj.sbdk1,'') sbdk1,
IFNULL(rtj.sbdk1jg,'') sbdk1jg,
IFNULL(rtj.xbdk1 ,'') xbdk1,
IFNULL(rtj.xbdk1jg,'') xbdk1jg,
IFNULL(rtj.sbdk2 ,'') sbdk2,
IFNULL(rtj.sbdk2jg ,'') sbdk2jg,
IFNULL(rtj.xbdk2 ,'') xbdk2,
IFNULL(rtj.xbdk2jg,'') xbdk2jg,
IFNULL(rtj.sbdk3 ,'') sbdk3,
IFNULL(rtj.sbdk3jg ,'') sbdk3jg,
IFNULL(rtj.xbdk3,'') xbdk3,
IFNULL(rtj.xbdk3jg ,'') xbdk3jg,
IFNULL(rtj.ydkcs ,'') ydkcs,
IFNULL(rtj.gzsc ,'') gzsc,
IFNULL(rtj.qyid,'') qyid,
IFNULL(rtj.dksj ,'') dksj,
IFNULL(rtj.yzcdcs ,'') yzcdcs,
IFNULL(rtj.yzcdsc ,'') yzcdsc,
IFNULL(rtj.kgcdfzs,'') kgcdfzs,
sum.days_on_duty as daysonduty,
sum.days_off as daysoff,
sum.length_business_trip as lengthbusinesstrip,
sum.time_out as timeout,
sum.total_overtime_hours as totalovertimehours,
sum.working_turn_compen_leave as workingturncompenleave,
sum.rest_turn_compen_leave as restturncompenleave,
sum.holiday_turn_compen_leave as holidayturncompenleave,
sum.working_transfer_overtime as workingtransferovertime,
sum.rest_transfer_overtime as resttransferovertime,
sum.holiday_transfer_overtime as holidaytransferovertime,
mrtj.leaverulesid,
mrtj.duration as balancedays
from kqgl_asso_month_punch_summary sum
LEFT JOIN (
select DISTINCT info.`name` as username ,
dkjl.attdate,
bcsz.`name` as bcname,bcsz.sbdk1 as bcsbdk1,bcsz.xbdk1 as bcxbdk1,bcsz.sbdk2 as bcsbdk2,bcsz.xbdk2 as bcxbdk2,bcsz.sbdk3 as bcsbdk3,bcsz.xbdk3 as bcxbdk3,
dkmx.`userid`,dkmx.`data` ,dkmx.`sbdk1`,dkmx.`sbdk1jg`,dkmx.`xbdk1` ,dkmx.`xbdk1jg`,dkmx.`sbdk2` ,dkmx.`sbdk2jg` ,dkmx.`xbdk2` ,
dkmx.`xbdk2jg`,dkmx.`sbdk3` ,dkmx.`sbdk3jg` ,dkmx.`xbdk3`,dkmx.`xbdk3jg` ,dkmx.`ydkcs` ,dkmx.`gzsc` ,dkmx.`qyid`,dkmx.`dksj` ,
dkmx.`yzcdcs` ,dkmx.`yzcdsc` ,dkmx.`kgcdfzs`
from kqgl_asso_dkmx dkmx
LEFT JOIN yggl_main_emp as info on info.emp_num = dkmx.userid and info.org_code = 117
LEFT JOIN kqgl_asso_dkjl as dkjl on dkjl.dkmxid = dkmx.id
LEFT JOIN kqgl_asso_bcsz as bcsz on bcsz.id = dkjl.bcid
where dkmx.qyid = #{param.orgCode}
and dkmx.`data` = #{param.times}
) as rtj on rtj.userid = sum.num
LEFT JOIN (SELECT les.id as leaverulesid,hz.user_id,hz.duration
FROM kqgl_asso_leave_rules les
LEFT JOIN (select ry.user_id,ry.leave_type_id,SUM(ry.duration) as duration
from (
select rel.user_id,rel.leave_type_id,rel.duration
from kqgl_asso_relation_summary rel
where rel.approval_type = 2
and rel.app_time = #{param.times}
GROUP BY rel.user_id,rel.leave_type_id,rel.duration
) as ry
GROUP BY ry.user_id,ry.leave_type_id) as hz on hz.leave_type_id = les.id
WHERE les.org_code = #{param.orgCode}
AND (les.leave_type = 2 OR les.is_open = 1)
) as mrtj on mrtj.user_id = sum.num
where sum.org_code = #{param.orgCode}
and sum.belong_year = #{param.year}
and sum.belong_month = #{param.month}
<if test="param.query != null and param.query != ''">
and ( sum.`name` like CONCAT('%',#{param.query},'%') or
sum.num like CONCAT('%',#{param.query},'%'))
</if>
<if test="param.attid != null and param.attid != ''">
and sum.att_group = #{param.attid}
</if>
</select>
-->
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment