|
@@ -54,4 +54,20 @@
|
|
|
) s ${ew.customSqlSegment}
|
|
|
</select>
|
|
|
|
|
|
+
|
|
|
+ <select id="getList" parameterType="com.github.zuihou.business.operationManagementCenter.entity.OrderProduct" resultType="com.github.zuihou.business.operationManagementCenter.entity.OrderProduct">
|
|
|
+ select a.*,b.name,b.no as bomNo,b.specifications as specifications,b.model,b.brand,ifnull(c.planNum,0) as planNum,
|
|
|
+ b.parts_no partsNo,b.parts_alias partsAlias,b.bom_alias bomAlias,
|
|
|
+ (ifnull(a.bom_num,0)-ifnull(c.planNum,0)) as stayPlanNum,d.delivery_time as orderDeliveryTime from imcs_o_order_product a
|
|
|
+ left join imcs_b_bom b on a.bom_id = b.id
|
|
|
+ left join (
|
|
|
+ select order_product_id,count(1) as planNum from imcs_p_plan_product where 1=1 group by order_product_id
|
|
|
+ )c on a.id= c.order_product_id
|
|
|
+ left join imcs_o_order d on a.order_id = d.id
|
|
|
+ where 1=1
|
|
|
+ <if test="orderId != '' and orderId != null " >
|
|
|
+ and a.order_id = #{orderId}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|