Files
fad_oa/ruoyi-oa/src/main/resources/mapper/oa/SysOaHolidayMapper.xml
2025-03-19 10:14:30 +08:00

52 lines
1.8 KiB
XML

<?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.oa.mapper.SysOaHolidayMapper">
<resultMap type="com.ruoyi.oa.domain.SysOaHoliday" id="SysOaHolidayResult">
<result property="holidayId" column="holiday_id"/>
<result property="type" column="type"/>
<result property="holidayTime" column="holiday_time"/>
<result property="name" column="name"/>
<result property="createTime" column="create_time"/>
<result property="createBy" column="create_by"/>
<result property="updateTime" column="update_time"/>
<result property="updateBy" column="update_by"/>
<result property="remark" column="remark"/>
<result property="delFlag" column="del_flag"/>
</resultMap>
<resultMap type="com.ruoyi.oa.domain.vo.SysHolidayVo" id="SysOaHolidayVoResult">
<result property="holidayType" column="type"/>
<result property="holidayName" column="name"/>
<collection property="holidayVoList" ofType="com.ruoyi.oa.domain.SysOaHoliday">
<result property="holidayTime" column="holiday_time"/>
</collection>
</resultMap>
<select id="queryVoList" resultMap="SysOaHolidayVoResult">
SELECT
soh.name,
soh.type,
soh.holiday_time
FROM sys_oa_holiday soh
where soh.type !='0'
ORDER BY soh.name, soh.type,soh.holiday_time
</select>
<select id="queryWorkDayNumByMonth" resultType="java.lang.Long">
SELECT
count(*)
FROM sys_oa_holiday soh
where (soh.type ='0' or soh.type ='3')
and YEAR(#{payTime}) = YEAR(soh.holiday_time)
and MONTH(#{payTime}) = MONTH(soh.holiday_time)
</select>
</mapper>