From f2f2dd8c2f088e91917c53f93fea5217a3b5533e Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期二, 05 八月 2025 16:00:09 +0800 Subject: [PATCH] 修改数控程序加工确认表流程启动 --- lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/AndonOrderMapper.xml | 71 +++++++++++++++++++++++++++++++++++ 1 files changed, 71 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 cd37885..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 @@ -2,4 +2,75 @@ <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="org.jeecg.modules.mdc.mapper.AndonOrderMapper"> + <select id="equAndonList" resultType="org.jeecg.modules.mdc.entity.AndonOrder"> + SELECT + * + FROM + andon_order + WHERE + CONVERT ( DATE, create_time ) = CONVERT ( DATE, GETDATE( ) ) + AND equipment_id IN + <foreach collection="equipmentIdList" index="index" item="id" open="(" separator="," close=")"> + #{id} + </foreach> + 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