From 632a346f1fd07ab659bfc68e70bd6e254b0e8c51 Mon Sep 17 00:00:00 2001 From: lius <Lius2225@163.com> Date: 星期三, 19 七月 2023 16:10:55 +0800 Subject: [PATCH] 统计分析接口 --- lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcVacationManagementMapper.xml | 36 +++++++++++++++++++++++------------- 1 files changed, 23 insertions(+), 13 deletions(-) diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcVacationManagementMapper.xml b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcVacationManagementMapper.xml index 82fab0e..632c1d0 100644 --- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcVacationManagementMapper.xml +++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcVacationManagementMapper.xml @@ -3,18 +3,28 @@ <mapper namespace="org.jeecg.modules.mdc.mapper.MdcVacationManagementMappper"> <!--鏍规嵁杞﹂棿灞傜骇鏌ヨ鍋囨湡鍒楄〃--> <select id="pageList" resultType="org.jeecg.modules.mdc.entity.MdcVacationManagement"> - select mvm.* from mdc_vacation_management mvm,mdc_equipment me where mvm.equipment_id=me.equipment_id - <if test="vacation.equipmentName != null and vacation.equipmentName != '' "> - and mvm.equipment_name like concat(concat('%',#{vacation.equipmentName}),'%') - </if> - <if test="vacation.equipmentId != null and vacation.equipmentId !='' "> - and mvm.equipment_id like concat(concat('%',#{vacation.equipmentId}),'%') - </if> - <if test="vacation.mdcSectionIds != null || vacation.mdcSectionIds.size() > 0 "> - and mvm.equipment_id in - <foreach collection="vacation.mdcSectionIds" item="id" index="index" open="(" close=")" separator=","> - #{id} - </foreach> - </if> + select * from mdc_vacation_management + <where> + <if test="vacation.equipmentName != null and vacation.equipmentName != '' "> + and equipment_name like concat(concat('%',#{vacation.equipmentName}),'%') + </if> + <if test="vacation.equipmentId != null and vacation.equipmentId !='' "> + and equipment_id like concat(concat('%',#{vacation.equipmentId}),'%') + </if> + <if test="vacation.startTime != null and vacation.endTime != null"> + and vacation_date between #{ vacation.startTime } and #{ vacation.endTime } + </if> + <if test="vacation.mdcSectionIds != null || vacation.mdcSectionIds.size() > 0 "> + and equipment_id in + <foreach collection="vacation.mdcSectionIds" item="id" index="index" open="(" close=")" separator=","> + #{id} + </foreach> + </if> + order by vacation_date asc + </where> + </select> + + <select id="selectLastWeekDays" resultType="org.jeecg.modules.mdc.entity.MdcVacationManagement"> + select top 1 * from mdc_vacation_management where vacation_type = '鍙屼紤鏃�' order by vacation_date desc </select> </mapper> \ No newline at end of file -- Gitblit v1.9.3