From 4337640b7ab86136baed2fd6aa959e4828a75cea Mon Sep 17 00:00:00 2001 From: Lius <Lius2225@163.com> Date: 星期四, 07 十二月 2023 17:33:51 +0800 Subject: [PATCH] 计算加工工件个数算法和密码安全策略 --- lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentOvertimeMapper.xml | 77 ++++++++++++++++++++++++++++++++------ 1 files changed, 64 insertions(+), 13 deletions(-) diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentOvertimeMapper.xml b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentOvertimeMapper.xml index 9124a5d..a528b02 100644 --- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentOvertimeMapper.xml +++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentOvertimeMapper.xml @@ -5,29 +5,30 @@ <!--鍒嗛〉鏌ヨ--> <select id="pageList" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentOvertime"> SELECT + t1.id, t2.equipment_id equipmentId, - t5.equipment_name equipmentName, - t2.efficient_date efficientDate, - t4.start_date startDate, - t4.end_date endDate, + t4.equipment_name equipmentName, + t2.effective_date effectiveDate, + t3.start_date startDate, + t3.end_date endDate, t1.start_time startTime, t1.end_time endTime, - t1.remark remark + t1.remark remark, + t1.create_by createBy, + t1.create_time createTime, + t1.update_by updateBy, + t1.update_time updateTime FROM mdc_equipment_overtime t1 LEFT JOIN mdc_device_calendar t2 ON t1.calendar_id = t2.id - LEFT JOIN mdc_shift t3 ON t2.shift_id = t3.id - LEFT JOIN mdc_shift_sub t4 ON t3.id = t4.shift_id - LEFT JOIN mdc_equipment t5 ON t5.equipment_id = t2.equipment_id + LEFT JOIN mdc_shift_sub t3 ON t3.id = t2.shift_sub_id + LEFT JOIN mdc_equipment t4 ON t4.equipment_id = t2.equipment_id <where> <if test="mdcEquipmentOvertime.equipmentName != null and mdcEquipmentOvertime.equipmentName != '' "> - AND t5.equipment_name LIKE CONCAT(CONCAT('%',#{mdcEquipmentOvertime.equipmentName}),'%') + AND t4.equipment_name LIKE CONCAT(CONCAT('%',#{mdcEquipmentOvertime.equipmentName}),'%') </if> <if test="mdcEquipmentOvertime.equipmentId != null and mdcEquipmentOvertime.equipmentId != '' "> AND t2.equipment_id LIKE CONCAT(CONCAT('%',#{mdcEquipmentOvertime.equipmentId}),'%') - </if> - <if test="mdcEquipmentOvertime.startTime != null and mdcEquipmentOvertime.endTime != null"> - AND t2.efficient_date BETWEEN #{ mdcEquipmentOvertime.startTime } AND #{ mdcEquipmentOvertime.endTime } </if> <if test="mdcEquipmentOvertime.mdcSectionIds != null and mdcEquipmentOvertime.mdcSectionIds.size() > 0 "> AND t2.equipment_id IN @@ -36,6 +37,56 @@ </foreach> </if> </where> - order by t2.efficient_date asc + order by t2.effective_date asc + </select> + + <!--list鍒楄〃--> + <select id="list" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentOvertime"> + SELECT + t1.id, + t2.equipment_id equipmentId, + t4.equipment_name equipmentName, + t2.effective_date effectiveDate, + t3.start_date startDate, + t3.end_date endDate, + t1.start_time startTime, + t1.end_time endTime, + t1.remark remark, + t1.create_by createBy, + t1.create_time createTime, + t1.update_by updateBy, + t1.update_time updateTime + FROM + mdc_equipment_overtime t1 + LEFT JOIN mdc_device_calendar t2 ON t1.calendar_id = t2.id + LEFT JOIN mdc_shift_sub t3 ON t3.id = t2.shift_sub_id + LEFT JOIN mdc_equipment t4 ON t4.equipment_id = t2.equipment_id + <where> + <if test="mdcEquipmentOvertime.equipmentName != null and mdcEquipmentOvertime.equipmentName != '' "> + AND t4.equipment_name LIKE CONCAT(CONCAT('%',#{mdcEquipmentOvertime.equipmentName}),'%') + </if> + <if test="mdcEquipmentOvertime.equipmentId != null and mdcEquipmentOvertime.equipmentId != '' "> + AND t2.equipment_id LIKE CONCAT(CONCAT('%',#{mdcEquipmentOvertime.equipmentId}),'%') + </if> + <if test="mdcEquipmentOvertime.mdcSectionIds != null and mdcEquipmentOvertime.mdcSectionIds.size() > 0 "> + AND t2.equipment_id IN + <foreach collection="mdcEquipmentOvertime.mdcSectionIds" item="id" index="index" open="(" close=")" separator=","> + #{ id } + </foreach> + </if> + </where> + order by t2.effective_date asc + </select> + + <!--鏌ヨ鍔犵彮鏃堕暱--> + <select id="computeOvertime" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentOvertime"> + SELECT + meo.* + FROM + mdc_equipment_overtime meo + LEFT JOIN mdc_device_calendar mdc ON meo.calendar_id = mdc.id + WHERE + mdc.effective_date LIKE CONCAT(#{ validDate }, '%') + AND mdc.equipment_id = #{ equipmentId } </select> </mapper> \ No newline at end of file -- Gitblit v1.9.3