|
@@ -9,6 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="qrCode" column="qr_code" />
|
|
|
<result property="lotNum" column="lot_num" />
|
|
|
<result property="productId" column="product_id" />
|
|
|
+ <result property="productColour" column="product_colour"/>
|
|
|
<result property="levels" column="levels" />
|
|
|
<result property="canisterNum" column="canister_num" />
|
|
|
<result property="boxNum" column="box_num" />
|
|
@@ -46,6 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="qrCode" column="qr_code" />
|
|
|
<result property="lotNum" column="lot_num" />
|
|
|
<result property="productId" column="product_id" />
|
|
|
+ <result property="productColour" column="product_colour"/>
|
|
|
<result property="levels" column="levels" />
|
|
|
<result property="canisterNum" column="canister_num" />
|
|
|
<result property="boxNum" column="box_num" />
|
|
@@ -83,7 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<sql id="selectProductCodeListVo">
|
|
|
select id, qr_code, lot_num, product_id, levels, canister_num, box_num, suttle, production_date, machine_tool, gross_weight, packaging, work_shifts, foreign_trade_number, canister_weight, box_weight, tube_color, com_port, print_format, packaging_type, storage_location, warehouseregion_id, remark, del_flag, create_by, create_by_id, create_time, update_by, update_by_id, update_time ,
|
|
|
- total_canister_num, total_box_num, total_suttle, total_gross_weight from {DBNAME}.product_code_list
|
|
|
+ total_canister_num, total_box_num, total_suttle, total_gross_weight,product_colour from {DBNAME}.product_code_list
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectProductCodeListList" parameterType="com.zkqy.business.domain.vo.ProductCodeListVO" resultMap="ProductCodeListResultVO">
|
|
@@ -91,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
pcl.* ,
|
|
|
p.product_name as product_name,
|
|
|
p.product_specifications as product_specifications,
|
|
|
- p.product_color as product_color
|
|
|
+ pcl.product_colour as product_color
|
|
|
FROM
|
|
|
{DBNAME}.product_code_list pcl
|
|
|
LEFT JOIN {DBNAME}.production p ON pcl.product_id = p.id
|
|
@@ -102,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="lotNum != null and lotNum != ''"> and pcl.lot_num = #{lotNum}</if>
|
|
|
<if test="productName != null and productName != ''"> and p.product_name = #{productName}</if>
|
|
|
<if test="productSpecifications != null and productSpecifications != ''"> and p.product_specifications = #{productSpecifications}</if>
|
|
|
- <if test="productColor != null and productColor != ''"> and p.product_color = #{productColor}</if>
|
|
|
+ <if test="productColor != null and productColor != ''"> and pcl.product_colour = #{productColor}</if>
|
|
|
</select>
|
|
|
|
|
|
<select id="selectProductCodeListById" parameterType="Long" resultMap="ProductCodeListResult">
|
|
@@ -142,6 +144,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="totalBoxNum != null">total_box_num,</if>
|
|
|
<if test="totalSuttle != null">total_suttle,</if>
|
|
|
<if test="totalGrossWeight != null">total_gross_weight,</if>
|
|
|
+ <if test="productColour != null">product_colour,</if>
|
|
|
del_flag
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
@@ -174,6 +177,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="totalBoxNum != null">#{totalBoxNum},</if>
|
|
|
<if test="totalSuttle != null">#{totalSuttle},</if>
|
|
|
<if test="totalGrossWeight != null">#{totalGrossWeight},</if>
|
|
|
+ <if test="productColour != null">#{productColour},</if>
|
|
|
'0'
|
|
|
</trim>
|
|
|
</insert>
|
|
@@ -210,6 +214,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="totalBoxNum != null">total_box_num = #{totalBoxNum},</if>
|
|
|
<if test="totalSuttle != null">total_suttle = #{totalSuttle},</if>
|
|
|
<if test="totalGrossWeight != null">total_gross_weight = #{totalGrossWeight},</if>
|
|
|
+ <if test="productColour != null">product_colour = #{productColour},</if>
|
|
|
</trim>
|
|
|
where id = #{id}
|
|
|
</update>
|
|
@@ -230,17 +235,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
sp.lot_number AS lotNum,
|
|
|
p.product_name AS productName,
|
|
|
p.product_specifications AS productSpecifications,
|
|
|
- P.product_color AS productColor,
|
|
|
+ concat(ml.materie_encoding,ml.materie_color_number) AS productColor,
|
|
|
p.id AS productId,
|
|
|
sc.direction_of_twist AS directionOfTwist
|
|
|
FROM
|
|
|
{DBNAME}.sale_products sp
|
|
|
LEFT JOIN {DBNAME}.production p ON sp.product_no = p.product_no
|
|
|
LEFT JOIN {DBNAME}.sale_craft sc ON sp.sale_order_no = sc.sale_order_no
|
|
|
+ left join {DBNAME}.materiel ml on sp.colour_number = ml.materiel_code
|
|
|
WHERE
|
|
|
sp.del_flag = '0'
|
|
|
AND p.del_flag = '0'
|
|
|
AND sc.del_flag = '0'
|
|
|
+ and ml.del_flag = '0'
|
|
|
</select>
|
|
|
|
|
|
<select id="selectMaxCodeList" resultType="string">
|