From 2a64b537e8e3bce9ce030585a3da17d48379c0ad Mon Sep 17 00:00:00 2001
From: sfd <sun.sunshine@163.com>
Date: 星期一, 26 五月 2025 15:04:45 +0800
Subject: [PATCH] 修改json类型转换错误
---
aps-modules/aps-core/src/main/resources/mapper/core/ApsBomMapper.xml | 32 ++++++++++++++++++++++++++------
1 files changed, 26 insertions(+), 6 deletions(-)
diff --git a/aps-modules/aps-core/src/main/resources/mapper/core/ApsBomMapper.xml b/aps-modules/aps-core/src/main/resources/mapper/core/ApsBomMapper.xml
index 50f1f10..2cac72f 100644
--- a/aps-modules/aps-core/src/main/resources/mapper/core/ApsBomMapper.xml
+++ b/aps-modules/aps-core/src/main/resources/mapper/core/ApsBomMapper.xml
@@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.aps.core.mapper.ApsBomMapper">
- <resultMap type="ApsBom" id="ApsBomResult">
+ <resultMap type="com.aps.core.domain.ApsBom" id="ApsBomResult">
<result property="id" column="id" />
<result property="bomLineId" column="bom_line_id" />
<result property="bomHeaderId" column="bom_header_id" />
@@ -34,13 +34,13 @@
from aps_bom_line
</sql>
- <select id="selectApsBomList" parameterType="ApsBom" resultMap="ApsBomResult">
+ <select id="selectApsBomList" parameterType="com.aps.core.domain.ApsBom" resultMap="ApsBomResult">
<include refid="selectApsBomVo"/>
<where>
<if test="bomLineId != null and bomLineId != ''"> and bom_line_id = #{bomLineId}</if>
<if test="bomHeaderId != null and bomHeaderId != ''"> and bom_header_id = #{bomHeaderId}</if>
- <if test="itemCode != null and itemCode != ''"> and item_code like '%'||#{itemCode}||'%'</if>
- <if test="itemName != null and itemName != ''"> and item_name like '%'|| #{itemName}||'%'</if>
+ <if test="itemCode != null and itemCode != ''"> and item_code like '%' || #{itemCode} || '%'</if>
+ <if test="itemName != null and itemName != ''"> and item_name like '%' || #{itemName} || '%'</if>
<if test="params.beginStartDate != null and params.beginStartDate != '' and params.endStartDate != null and params.endStartDate != ''"> and start_date between #{params.beginStartDate} and #{params.endStartDate}</if>
<if test="params.beginEndDate != null and params.beginEndDate != '' and params.endEndDate != null and params.endEndDate != ''"> and end_date between #{params.beginEndDate} and #{params.endEndDate}</if>
<if test="orgCode != null and orgCode != ''"> and org_code = #{orgCode}</if>
@@ -55,7 +55,7 @@
where id = #{id}
</select>
- <insert id="insertApsBom" parameterType="ApsBom" useGeneratedKeys="true" keyProperty="id">
+ <insert id="insertApsBom" parameterType="com.aps.core.domain.ApsBom" useGeneratedKeys="true" keyProperty="id">
insert into aps_bom_line
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="bomLineId != null">bom_line_id,</if>
@@ -101,7 +101,7 @@
</trim>
</insert>
- <update id="updateApsBom" parameterType="ApsBom">
+ <update id="updateApsBom" parameterType="com.aps.core.domain.ApsBom">
update aps_bom_line
<trim prefix="SET" suffixOverrides=",">
<if test="bomLineId != null">bom_line_id = #{bomLineId},</if>
@@ -137,4 +137,24 @@
#{id}
</foreach>
</delete>
+
+ <resultMap type="com.aps.core.domain.ApsBom" id="ApsBomLineResult">
+ <result property="id" column="id" />
+ <result property="bomLineId" column="bom_line_id" />
+ <result property="itemCode" column="item_code" />
+ <result property="itemName" column="item_name" />
+ <result property="num" column="num" />
+ </resultMap>
+ <sql id="selectApsBomLineVo">
+ select id, bom_line_id, item_code, item_name, num
+ from aps_bom_line
+ </sql>
+
+ <select id="selectApsBomLineList" parameterType="String" resultMap="ApsBomLineResult">
+ select id, bom_line_id, item_code, num
+ from aps_bom_line where del_flag='0'
+ and org_code = #{orgCode}
+ and bom_header_id = #{bomHeaderId}
+ order by bom_line_id
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3