From e935889261ef38c8eaef31e54cbfc466d63d2ef4 Mon Sep 17 00:00:00 2001 From: hyingbo <1363390067@qq.com> Date: 星期四, 17 七月 2025 09:42:28 +0800 Subject: [PATCH] fanuc获取程序名、获取报警描述 --- lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/AndonOrderMapper.xml | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 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..9c4dad1 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,37 @@ <!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> </mapper> \ No newline at end of file -- Gitblit v1.9.3