|
|
@ -94,7 +94,6 @@
|
|
|
|
pow.update_by, pow.update_time, pow.prod_type, pow.factory_code , pow.end_flag , pow.car_num,pow.sort_no,
|
|
|
|
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
|
|
|
|
pow.workorder_code_sap,pwd.material_code,pwd.material_name
|
|
|
|
from pro_order_workorder pow
|
|
|
|
from pro_order_workorder pow
|
|
|
|
left join pro_wet_material_plan_detail pwd on pow.workorder_id = pwd.workorder_id
|
|
|
|
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="workorderCode != null and workorderCode != ''"> and pow.workorder_code like concat('%', #{workorderCode}, '%')</if>
|
|
|
|
<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="workorderName != null and workorderName != ''"> and pow.workorder_name like concat('%', #{workorderName}, '%')</if>
|
|
|
@ -124,7 +123,7 @@
|
|
|
|
<if test="endFlag != null and endFlag != ''"> and pow.end_flag = #{endFlag}</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="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>
|
|
|
|
<if test="productDateEnd != null "> and '${productDateEnd}%' >= CONVERT(varchar(10),pow.product_date, 120)</if>
|
|
|
|
and pow.del_flag = '0' and pwd.del_flag = '0'
|
|
|
|
and pow.del_flag = '0'
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
<select id="selectProOrderWorkorderByWorkorderId" parameterType="String" resultMap="ProOrderWorkorderResult">
|
|
|
|
<select id="selectProOrderWorkorderByWorkorderId" parameterType="String" resultMap="ProOrderWorkorderResult">
|
|
|
@ -414,6 +413,12 @@
|
|
|
|
where workorder_code = #{workorderCode}
|
|
|
|
where workorder_code = #{workorderCode}
|
|
|
|
and del_flag = '0'
|
|
|
|
and del_flag = '0'
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="getWetMaterial" resultType="com.op.plan.domain.ProWetMaterialPlanDetail">
|
|
|
|
|
|
|
|
select top 1 material_code materialCode,
|
|
|
|
|
|
|
|
material_name materialName
|
|
|
|
|
|
|
|
from pro_wet_material_plan_detail
|
|
|
|
|
|
|
|
where workorder_id = #{workorderId} and del_flag = '0'
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="createPrepareDetails">
|
|
|
|
<insert id="createPrepareDetails">
|
|
|
|
insert into mes_prepare_detail
|
|
|
|
insert into mes_prepare_detail
|
|
|
|