|
|
|
@ -42,6 +42,9 @@
|
|
|
|
|
<result property="pproductCode" column="pproductCode" />
|
|
|
|
|
<result property="pproductName" column="pproductName" />
|
|
|
|
|
<result property="pworkorderCodeSap" column="pworkorderCodeSap" />
|
|
|
|
|
<result property="materialCode" column="material_code" />
|
|
|
|
|
<result property="materialName" column="material_name" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
@ -84,37 +87,44 @@
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectProOrderWorkorderList999" resultMap="ProOrderWorkorderResult">
|
|
|
|
|
<include refid="selectProOrderWorkorderVo"/>
|
|
|
|
|
select pow.workorder_id, pow.workorder_code, pow.workorder_name, pow.order_id, pow.order_code, pow.product_id,
|
|
|
|
|
pow.product_code, pow.product_name,pow.product_spc, pow.unit, pow.quantity_produced, pow.quantity_split,
|
|
|
|
|
pow.route_code, pow.prod_line_code, pow.product_date,pow.shift_id, pow.parent_order, pow.ancestors, pow.status,
|
|
|
|
|
pow.remark, pow.attr1, pow.attr2, pow.attr3, pow.attr4, pow.create_by, pow.create_time,
|
|
|
|
|
pow.update_by, pow.update_time, pow.prod_type, pow.factory_code , pow.end_flag , pow.car_num,pow.sort_no,
|
|
|
|
|
pow.workorder_code_sap,pwd.material_code,pwd.material_name
|
|
|
|
|
from pro_order_workorder pow
|
|
|
|
|
left join pro_wet_material_plan_detail pwd on pow.workorder_id = pwd.workorder_id
|
|
|
|
|
<where>
|
|
|
|
|
<if test="workorderCode != null and workorderCode != ''"> and workorder_code like concat('%', #{workorderCode}, '%')</if>
|
|
|
|
|
<if test="workorderName != null and workorderName != ''"> and workorder_name like concat('%', #{workorderName}, '%')</if>
|
|
|
|
|
<if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
|
|
|
|
|
<if test="orderCode != null and orderCode != ''"> and order_code like concat('%', #{orderCode}, '%')</if>
|
|
|
|
|
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
|
|
|
|
<if test="productCode != null and productCode != ''"> and product_code like concat('%', #{productCode}, '%')</if>
|
|
|
|
|
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
|
|
|
|
<if test="productSpc != null and productSpc != ''"> and product_spc = #{productSpc}</if>
|
|
|
|
|
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
|
|
|
|
|
<if test="quantityProduced != null "> and quantity_produced = #{quantityProduced}</if>
|
|
|
|
|
<if test="quantitySplit != null "> and quantity_split = #{quantitySplit}</if>
|
|
|
|
|
<if test="routeCode != null and routeCode != ''"> and route_code = #{routeCode}</if>
|
|
|
|
|
<if test="prodLineCode != null and prodLineCode != ''"> and prod_line_code = #{prodLineCode}</if>
|
|
|
|
|
<if test="productDate != null "> and product_date = #{productDate}</if>
|
|
|
|
|
<if test="shiftId != null and shiftId != ''"> and shift_id = #{shiftId}</if>
|
|
|
|
|
<if test="parentOrder != null and parentOrder != ''"> and parent_order = #{parentOrder}</if>
|
|
|
|
|
<if test="ancestors != null and ancestors != ''"> and ancestors = #{ancestors}</if>
|
|
|
|
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
|
|
|
|
<if test="statusArray != null and statusArray != ''"> and status in (${statusArray})</if>
|
|
|
|
|
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
|
|
|
|
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
|
|
|
|
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
|
|
|
|
|
<if test="attr4 != null and attr4 != ''"> and attr4 = #{attr4}</if>
|
|
|
|
|
<if test="prodType != null and prodType != ''"> and prod_type = #{prodType}</if>
|
|
|
|
|
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
|
|
|
|
|
<if test="endFlag != null and endFlag != ''"> and end_flag = #{endFlag}</if>
|
|
|
|
|
<if test="productDateStart != null "> and CONVERT(varchar(10),product_date, 120) >= '${productDateStart}'</if>
|
|
|
|
|
<if test="productDateEnd != null "> and '${productDateEnd}%' >= CONVERT(varchar(10),product_date, 120)</if>
|
|
|
|
|
and del_flag = '0'
|
|
|
|
|
<if test="workorderCode != null and workorderCode != ''"> and pow.workorder_code like concat('%', #{workorderCode}, '%')</if>
|
|
|
|
|
<if test="workorderName != null and workorderName != ''"> and pow.workorder_name like concat('%', #{workorderName}, '%')</if>
|
|
|
|
|
<if test="orderId != null and orderId != ''"> and pow.order_id = #{orderId}</if>
|
|
|
|
|
<if test="orderCode != null and orderCode != ''"> and pow.order_code like concat('%', #{orderCode}, '%')</if>
|
|
|
|
|
<if test="productId != null and productId != ''"> and pow.product_id = #{productId}</if>
|
|
|
|
|
<if test="productCode != null and productCode != ''"> and pow.product_code like concat('%', #{productCode}, '%')</if>
|
|
|
|
|
<if test="productName != null and productName != ''"> and pow.product_name like concat('%', #{productName}, '%')</if>
|
|
|
|
|
<if test="productSpc != null and productSpc != ''"> and pow.product_spc = #{productSpc}</if>
|
|
|
|
|
<if test="unit != null and unit != ''"> and pow.unit = #{unit}</if>
|
|
|
|
|
<if test="quantityProduced != null "> and pow.quantity_produced = #{quantityProduced}</if>
|
|
|
|
|
<if test="quantitySplit != null "> and pow.quantity_split = #{quantitySplit}</if>
|
|
|
|
|
<if test="routeCode != null and routeCode != ''"> and pow.route_code = #{routeCode}</if>
|
|
|
|
|
<if test="prodLineCode != null and prodLineCode != ''"> and pow.prod_line_code = #{prodLineCode}</if>
|
|
|
|
|
<if test="productDate != null "> and pow.product_date = #{productDate}</if>
|
|
|
|
|
<if test="shiftId != null and shiftId != ''"> and pow.shift_id = #{shiftId}</if>
|
|
|
|
|
<if test="parentOrder != null and parentOrder != ''"> and pow.parent_order = #{parentOrder}</if>
|
|
|
|
|
<if test="ancestors != null and ancestors != ''"> and pow.ancestors = #{ancestors}</if>
|
|
|
|
|
<if test="status != null and status != ''"> and pow.status = #{status}</if>
|
|
|
|
|
<if test="statusArray != null and statusArray != ''"> and pow.status in (${statusArray})</if>
|
|
|
|
|
<if test="attr1 != null and attr1 != ''"> and pow.attr1 = #{attr1}</if>
|
|
|
|
|
<if test="attr2 != null and attr2 != ''"> and pow.attr2 = #{attr2}</if>
|
|
|
|
|
<if test="attr3 != null and attr3 != ''"> and pow.attr3 = #{attr3}</if>
|
|
|
|
|
<if test="attr4 != null and attr4 != ''"> and pow.attr4 = #{attr4}</if>
|
|
|
|
|
<if test="prodType != null and prodType != ''"> and pow.prod_type = #{prodType}</if>
|
|
|
|
|
<if test="factoryCode != null and factoryCode != ''"> and pow.factory_code = #{factoryCode}</if>
|
|
|
|
|
<if test="endFlag != null and endFlag != ''"> and pow.end_flag = #{endFlag}</if>
|
|
|
|
|
<if test="productDateStart != null "> and CONVERT(varchar(10),pow.product_date, 120) >= '${productDateStart}'</if>
|
|
|
|
|
<if test="productDateEnd != null "> and '${productDateEnd}%' >= CONVERT(varchar(10),pow.product_date, 120)</if>
|
|
|
|
|
and pow.del_flag = '0' and pwd.del_flag = '0'
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectProOrderWorkorderByWorkorderId" parameterType="String" resultMap="ProOrderWorkorderResult">
|
|
|
|
|