From c45790a3da8fa480091be24e0775e9f8dbab927c Mon Sep 17 00:00:00 2001 From: lius <Lius2225@163.com> Date: 星期二, 25 七月 2023 14:30:43 +0800 Subject: [PATCH] 班次利用率定时任务算法 --- lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcDeviceCalendarMapper.xml | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 44 insertions(+), 0 deletions(-) diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcDeviceCalendarMapper.xml b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcDeviceCalendarMapper.xml index 4e7d0b7..6ffa4dd 100644 --- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcDeviceCalendarMapper.xml +++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcDeviceCalendarMapper.xml @@ -42,4 +42,48 @@ ORDER BY t4.equipment_name ASC, t1.EFFECTIVE_DATE ASC </select> + + <select id="listByEquipmentAndDate" resultType="org.jeecg.modules.mdc.vo.MdcDeviceCalendarVo"> + SELECT + t1.*, + t2.shift_name, + t3.shift_sub_name, + t3.start_date, + t3.end_date, + t3.sleep_start_date, + t3.sleep_end_date, + t3.is_day_span, + t4.equipment_name, + t4.equipment_id + FROM + mdc_device_calendar t1 + LEFT JOIN mdc_shift t2 ON t1.shift_id = t2.id + LEFT JOIN mdc_shift_sub t3 ON t1.shift_sub_id = t3.id + LEFT JOIN mdc_equipment t4 ON t1.equment_id = t4.equipment_id + <where> + <if test="equipmentid != null and equipmentid != ''"> + AND t4.equment_id = #{ equipmentid } + </if> + <if test="stringDate != null and stringDate != ''"> + AND t1.effective_date = #{ stringDate } + </if> + </where> + </select> + + <select id="findAcquiesceShift" resultType="org.jeecg.modules.mdc.vo.MdcDeviceCalendarVo"> + SELECT + t1.shift_id shiftId, + t2.shift_sub_id shiftSubId, + t1.shift_name shiftName, + t2.shift_sub_name shiftSubName, + t2.start_date startDate, + t2.end_date endDate, + t2.sleep_start_date sleepStartDate, + t2.sleep_end_date sleepEndDate, + t2.is_day_span isDaySpan + FROM + mdc_shift t1 LEFT JOIN mdc_shift_sub t2 ON t1.shift_sub_id = t2.id + WHERE t1.default_shift = 'true' + </select> + </mapper> \ No newline at end of file -- Gitblit v1.9.3