From 4bccde2f3615adf4c5d7b44945b39b2213e259b7 Mon Sep 17 00:00:00 2001
From: huangjiayang <5265313@qq.com>
Date: 星期五, 16 五月 2025 16:39:53 +0800
Subject: [PATCH] 【UPDATE】优化同步工单定时任务
---
aps-modules/aps-core/src/main/resources/mapper/core/ApsStandardProcessRouteLineMapper.xml | 22 ++++++++++++++++------
1 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/aps-modules/aps-core/src/main/resources/mapper/core/ApsStandardProcessRouteLineMapper.xml b/aps-modules/aps-core/src/main/resources/mapper/core/ApsStandardProcessRouteLineMapper.xml
index 9f94cbf..15adac9 100644
--- a/aps-modules/aps-core/src/main/resources/mapper/core/ApsStandardProcessRouteLineMapper.xml
+++ b/aps-modules/aps-core/src/main/resources/mapper/core/ApsStandardProcessRouteLineMapper.xml
@@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.aps.core.mapper.ApsStandardProcessRouteLineMapper">
- <resultMap type="ApsStandardProcessRouteLine" id="ApsStandardProcessRouteLineResult">
+ <resultMap type="com.aps.core.domain.ApsStandardProcessRouteLine" id="ApsStandardProcessRouteLineResult">
<result property="id" column="id" />
<result property="routeId" column="route_id" />
<result property="routeNum" column="route_num" />
@@ -20,18 +20,20 @@
<result property="createBy" column="create_by" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
+ <result property="routeCode" column="route_code" />
+ <result property="standardTime" column="standard_time" />
</resultMap>
<sql id="selectApsStandardProcessRouteLineVo">
select id, route_id, route_num, route_name, start_date, end_date, create_time, org_code,
shop_code, productivity_model, design_capacity, del_flag, create_by, update_by,
- update_time
+ update_time, route_code, standard_time
from aps_standard_process_route_line
</sql>
- <select id="selectApsStandardProcessRouteLineList" parameterType="ApsStandardProcessRouteLine" resultMap="ApsStandardProcessRouteLineResult">
+ <select id="selectApsStandardProcessRouteLineList" parameterType="com.aps.core.domain.ApsStandardProcessRouteLine" resultMap="ApsStandardProcessRouteLineResult">
<include refid="selectApsStandardProcessRouteLineVo"/>
- <where>
+ <where>
<if test="routeId != null and routeId != ''"> and route_id = #{routeId}</if>
<if test="routeNum != null and routeNum != ''"> and route_num = #{routeNum}</if>
<if test="routeName != null and routeName != ''"> and route_name = #{routeName}</if>
@@ -43,6 +45,7 @@
<if test="designCapacity != null and designCapacity != ''"> and design_capacity = #{designCapacity}</if>
and del_flag = '0'
</where>
+
</select>
<select id="selectApsStandardProcessRouteLineById" parameterType="Long" resultMap="ApsStandardProcessRouteLineResult">
@@ -50,7 +53,7 @@
where id = #{id}
</select>
- <insert id="insertApsStandardProcessRouteLine" parameterType="ApsStandardProcessRouteLine">
+ <insert id="insertApsStandardProcessRouteLine" parameterType="com.aps.core.domain.ApsStandardProcessRouteLine">
insert into aps_standard_process_route_line
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
@@ -88,7 +91,7 @@
</trim>
</insert>
- <update id="updateApsStandardProcessRouteLine" parameterType="ApsStandardProcessRouteLine">
+ <update id="updateApsStandardProcessRouteLine" parameterType="com.aps.core.domain.ApsStandardProcessRouteLine">
update aps_standard_process_route_line
<trim prefix="SET" suffixOverrides=",">
<if test="routeId != null">route_id = #{routeId},</if>
@@ -119,4 +122,11 @@
#{id}
</foreach>
</delete>
+
+ <select id="selectTotalStandTime" parameterType="String" resultMap="ApsStandardProcessRouteLineResult">
+ select sum(standard_time) as standard_time
+ from aps_standard_process_route_line
+ where route_id = #{routeId}
+ ;
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3