From 60311724f9afc274f15cd07320947aca8adf27e4 Mon Sep 17 00:00:00 2001 From: Lius <Lius2225@163.com> Date: 星期五, 01 八月 2025 16:53:08 +0800 Subject: [PATCH] 班次利用率算法调整 --- lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/AndonOrderMapper.xml | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 57 insertions(+), 0 deletions(-) diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/AndonOrderMapper.xml b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/AndonOrderMapper.xml index 36ecafa..2d6a91c 100644 --- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/AndonOrderMapper.xml +++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/AndonOrderMapper.xml @@ -16,4 +16,61 @@ ORDER BY create_time </select> + <select id="untreatedAndonList" resultType="org.jeecg.modules.mdc.entity.AndonOrder"> + SELECT + ao.* + FROM + andon_order ao + INNER JOIN ( + SELECT + equipment_id, + MAX(create_time) AS max_create_time + FROM + andon_order + WHERE order_status = 1 + GROUP BY + equipment_id) AS latest ON ao.equipment_id = latest.equipment_id + AND ao.create_time = latest.max_create_time + WHERE order_status = 1 + ORDER BY + ao.create_time + </select> + <select id="pageList" resultType="org.jeecg.modules.mdc.entity.AndonOrder"> + SELECT + id, + equipment_id, + andon_type, + operator, + operate_time, + responder, + response_time, + processor, + process_time, + order_status, + problem_descreption, + resolution_descreption, + image_files, + del_flag, + create_by, + create_time, + update_by, + update_time, + call_reason, + plant_name + FROM + andon_order + WHERE + del_flag = 0 + AND (operator = #{userId} OR responder = #{userId} OR processor = #{userId}) + <if test="andonOrder.equipmentId != null and andonOrder.equipmentId != '' "> + AND equipment_id LIKE CONCAT(CONCAT('%',#{andonOrder.equipmentId}),'%') + </if> + <if test="andonOrder.andonType != null and andonOrder.andonType != '' "> + AND andon_type = #{andonOrder.andonType} + </if> + <if test="andonOrder.orderStatus != null and andonOrder.orderStatus != '' "> + AND order_status = #{andonOrder.orderStatus} + </if> + + </select> </mapper> \ No newline at end of file -- Gitblit v1.9.3