From 20afccf343cd9c2f8efb1a20a0e92d4844a4adfa Mon Sep 17 00:00:00 2001 From: zhubaomin <zhubaomin> Date: 星期五, 06 六月 2025 17:30:44 +0800 Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV --- pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrIntakeOperateMapper.xml | 36 ++++++++++++++++++++++++++++++++++++ 1 files changed, 36 insertions(+), 0 deletions(-) diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrIntakeOperateMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrIntakeOperateMapper.xml index 207ef22..6dc8edc 100644 --- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrIntakeOperateMapper.xml +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrIntakeOperateMapper.xml @@ -156,6 +156,13 @@ where command_id = #{commandId} </update> + <!--鏍规嵁涓婚敭淇敼鍛戒护ID--> + <update id="updateCommandId"> + update ir_intake_operate + set command_id = #{commandId} + where id = #{id} + </update> + <!--鏍规嵁璁″垝ID鑾峰彇寰呯粓姝㈢殑鍙栨按鍙D锛堝凡鍙戝竷寮�鍙戝懡浠わ紝鏃犺鏄惁鎴愬姛锛�--> <select id="getToTerminateIntakeIds" resultType="java.lang.Long"> SELECT @@ -168,4 +175,33 @@ <select id="getTerminateCommandIds" resultType="java.lang.Long"> SELECT command_id AS commandId FROM ir_intake_operate WHERE operate_type = 1 AND plan_id = #{planId} </select> + + <!--鏍规嵁璁″垝ID鑾峰彇寰呯粓姝㈢殑鍙栨按鍙e垪琛紙寮�闃�鎴愬姛鐨勶級--> + <select id="getToTerminateIntakes" resultType="com.dy.pipIrrGlobal.voIr.VoToTerminateIntakes"> + SELECT + command_id AS commandId, + intake_id AS intakeId, + start_time AS startTime + FROM ir_intake_operate + WHERE operate_type = 1 AND command_result = 1 AND plan_id = #{planId} + </select> + + <!--鏍规嵁璁″垝ID鍙婄杞粍ID鑾峰彇鍙栨按鍙e彂甯冨彂甯冪粨鏋�--> + <select id="getIntakeResult" resultType="com.dy.pipIrrGlobal.voIr.VoIntakeResult"> + SELECT + IF(io.command_result = 1, 0, 1) AS code, + (SELECT name FROM pr_intake WHERE id = io.intake_id) AS intakeName, + io.failure_factors AS result + FROM ir_intake_operate io + inner JOIN ir_group_intake gi ON gi.intake_id = io.intake_id + WHERE io.plan_id = #{planId} AND gi.group_id = #{groupId} AND operate_type = 1; + </select> + + <!--鏍规嵁璁″垝ID鑾峰彇鍙栨按鍙e懡浠ゅ彂甯冨け璐ユ暟閲忥紝鐏屾簤璁″垝璇︽儏椤典娇鐢�--> + <select id="getFailureCount" resultType="java.lang.Integer"> + SELECT + COUNT(1) AS failureCount + FROM ir_intake_operate + WHERE operate_type = 1 AND command_result != 1 AND plan_id = #{planId} + </select> </mapper> \ No newline at end of file -- Gitblit v1.8.0