From fef29f6bfec7eda80de5443d370014f2b6bc70ee Mon Sep 17 00:00:00 2001
From: buhuazhen <hua100783@gmail.com>
Date: 星期四, 04 九月 2025 10:56:28 +0800
Subject: [PATCH] 人力资源-人员排班
---
src/main/resources/mapper/staff/StaffSchedulingMapper.xml | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 52 insertions(+), 0 deletions(-)
diff --git a/src/main/resources/mapper/staff/StaffSchedulingMapper.xml b/src/main/resources/mapper/staff/StaffSchedulingMapper.xml
new file mode 100644
index 0000000..1a32ef1
--- /dev/null
+++ b/src/main/resources/mapper/staff/StaffSchedulingMapper.xml
@@ -0,0 +1,52 @@
+<?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.ruoyi.staff.mapper.StaffSchedulingMapper">
+
+ <resultMap id="BaseResultMap" type="com.ruoyi.staff.pojo.StaffScheduling">
+ <id property="id" column="id" jdbcType="INTEGER"/>
+ <result property="staffId" column="staff_id" jdbcType="INTEGER"/>
+ <result property="department" column="department" jdbcType="INTEGER"/>
+ <result property="shiftType" column="shift_type" jdbcType="INTEGER"/>
+ <result property="workDate" column="work_date" jdbcType="DATE"/>
+ <result property="workStartTime" column="work_start_time" jdbcType="TIMESTAMP"/>
+ <result property="workEndTime" column="work_end_time" jdbcType="TIMESTAMP"/>
+ <result property="workHours" column="work_hours" jdbcType="DECIMAL"/>
+ <result property="status" column="status" jdbcType="INTEGER"/>
+ <result property="remark" column="remark" jdbcType="VARCHAR"/>
+ <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+ <result property="createUser" column="create_user" jdbcType="BIGINT"/>
+ <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
+ <result property="updateUser" column="update_user" jdbcType="BIGINT"/>
+ <result property="tenantId" column="tenant_id" jdbcType="BIGINT"/>
+ </resultMap>
+
+ <sql id="Base_Column_List">
+ id,staff_id,department,
+ shift_type,work_date,work_start_time,
+ work_end_time,work_hours,status,
+ remark,create_time,create_user,
+ update_time,update_user,tenant_id
+ </sql>
+ <select id="listPage" resultType="com.ruoyi.staff.dto.StaffSchedulingDto">
+ SELECT
+ t1.*,t2.staff_name as 'staff_name' ,t2.staff_no as 'staff_no'
+ FROM staff_scheduling t1
+ left join staff_join_leave_record t2 on t1.staff_id = t2.id
+ where 1=1
+ <if test="vo.staffName != null and vo.staffName != '' ">
+ AND t2.staff_name LIKE CONCAT('%', #{vo.staffName}, '%')
+ </if>
+ <if test="vo.shiftType != null and vo.shiftType != '' ">
+ AND t1.shift_type = #{vo.shiftType}
+ </if>
+ <if test="vo.startDate != null ">
+ AND t1.work_date >= DATE_FORMAT(#{vo.startDate},'%Y-%m-%d')
+ </if>
+ <if test="vo.endDate != null ">
+ AND t1.work_date <![CDATA[ <= ]]> DATE_FORMAT(#{vo.endDate},'%Y-%m-%d')
+ </if>
+ ORDER BY t1.create_time DESC
+ </select>
+</mapper>
--
Gitblit v1.9.3