|
|
|
@ -22,6 +22,7 @@
|
|
|
|
|
<result property="orderStatus" column="order_status"/>
|
|
|
|
|
<result property="orderCost" column="order_cost"/>
|
|
|
|
|
<result property="planPerson" column="plan_person"/>
|
|
|
|
|
<result property="planPersonName" column="plan_person_name"/>
|
|
|
|
|
<result property="orderCostTime" column="order_cost_time"/>
|
|
|
|
|
<result property="orderSignPerson" column="order_sign_person"/>
|
|
|
|
|
<result property="factoryCode" column="factory_code"/>
|
|
|
|
@ -54,7 +55,7 @@
|
|
|
|
|
<sql id="selectEquOrderVo">
|
|
|
|
|
select order_id, plan_id, plan_code, plan_type, order_code, plan_workshop, plan_prod_line, plan_loop, plan_loop_type,
|
|
|
|
|
plan_loop_start, plan_loop_end, order_start, order_end, equipment_code, order_status,
|
|
|
|
|
order_cost, plan_person, order_cost_time, order_sign_person,
|
|
|
|
|
order_cost, plan_person, plan_person_name, order_cost_time, order_sign_person,
|
|
|
|
|
factory_code, attr1, attr2, attr3, del_flag, create_by, create_time,
|
|
|
|
|
update_by, update_time,upkeep,calculation_rule,shut_down,order_inspect,repair_code,work_code,outsource_code
|
|
|
|
|
from equ_order
|
|
|
|
@ -79,6 +80,7 @@
|
|
|
|
|
eo.order_status,
|
|
|
|
|
eo.order_cost,
|
|
|
|
|
eo.plan_person,
|
|
|
|
|
eo.plan_person_name,
|
|
|
|
|
eo.order_cost_time,
|
|
|
|
|
eo.order_sign_person,
|
|
|
|
|
eo.factory_code,
|
|
|
|
@ -120,6 +122,7 @@
|
|
|
|
|
<if test="orderStatus != null and orderStatus != ''">and eo.order_status = #{orderStatus}</if>
|
|
|
|
|
<if test="orderCost != null ">and eo.order_cost = #{orderCost}</if>
|
|
|
|
|
<if test="planPerson != null and planPerson != ''">and eo.plan_person like concat('%', #{planPerson}, '%')</if>
|
|
|
|
|
<if test="planPersonName != null and planPersonName != ''">and eo.plan_person_name like concat('%', #{planPersonName}, '%')</if>
|
|
|
|
|
<if test="orderCostTime != null and orderCostTime != ''">and eo.order_cost_time = #{orderCostTime}</if>
|
|
|
|
|
<if test="orderSignPerson != null and orderSignPerson != ''">and eo.order_sign_person = #{orderSignPerson}</if>
|
|
|
|
|
<if test="factoryCode != null and factoryCode != ''">and eo.factory_code = #{factoryCode}</if>
|
|
|
|
@ -198,6 +201,7 @@
|
|
|
|
|
eo.order_status,
|
|
|
|
|
eo.order_cost,
|
|
|
|
|
eo.plan_person,
|
|
|
|
|
eo.plan_person_name,
|
|
|
|
|
eo.order_cost_time,
|
|
|
|
|
eo.order_sign_person,
|
|
|
|
|
eo.factory_code,
|
|
|
|
@ -219,14 +223,18 @@
|
|
|
|
|
be.equipment_name
|
|
|
|
|
from equ_order eo
|
|
|
|
|
left join base_equipment be on eo.equipment_code = be.equipment_code
|
|
|
|
|
where eo.plan_type = #{planType}
|
|
|
|
|
and eo.del_flag = '0'
|
|
|
|
|
and eo.order_status != '1'
|
|
|
|
|
and eo.order_code in (select order_code
|
|
|
|
|
<where>
|
|
|
|
|
<if test="createTime == null ">CONVERT(date,eo.create_time) = CONVERT(date,GETDATE())</if>
|
|
|
|
|
<if test="createTime != null"> CONVERT(date,eo.create_time) = #{createTime}</if>
|
|
|
|
|
and eo.plan_type = #{planType}
|
|
|
|
|
and eo.del_flag = '0'
|
|
|
|
|
and eo.order_status != '1'
|
|
|
|
|
and eo.order_code in (select order_code
|
|
|
|
|
from equ_order_person
|
|
|
|
|
where del_flag = '0'
|
|
|
|
|
and user_name = #{userId}
|
|
|
|
|
GROUP BY order_code)
|
|
|
|
|
</where>
|
|
|
|
|
order by eo.plan_loop_type, eo.plan_loop, eo.create_time desc, eo.equipment_code
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
@ -248,6 +256,7 @@
|
|
|
|
|
eo.order_status,
|
|
|
|
|
eo.order_cost,
|
|
|
|
|
eo.plan_person,
|
|
|
|
|
eo.plan_person_name,
|
|
|
|
|
eo.order_cost_time,
|
|
|
|
|
eo.order_sign_person,
|
|
|
|
|
eo.factory_code,
|
|
|
|
@ -269,14 +278,18 @@
|
|
|
|
|
be.equipment_name
|
|
|
|
|
from equ_order eo
|
|
|
|
|
left join base_equipment be on eo.equipment_code = be.equipment_code
|
|
|
|
|
where eo.del_flag = '0'
|
|
|
|
|
and eo.order_status = '1'
|
|
|
|
|
and eo.plan_type = #{planType}
|
|
|
|
|
and eo.plan_person = #{userId}
|
|
|
|
|
and eo.order_code in (select order_code
|
|
|
|
|
<where>
|
|
|
|
|
<if test="createTime == null ">CONVERT(date,eo.create_time) = CONVERT(date,GETDATE())</if>
|
|
|
|
|
<if test="createTime != null">and CONVERT(date,eo.create_time) = #{createTime}</if>
|
|
|
|
|
and eo.del_flag = '0'
|
|
|
|
|
and eo.order_status = '1'
|
|
|
|
|
and eo.plan_type = #{planType}
|
|
|
|
|
and eo.plan_person = #{userId}
|
|
|
|
|
and eo.order_code in (select order_code
|
|
|
|
|
from equ_order_person
|
|
|
|
|
where del_flag = '0' and user_name = #{userId}
|
|
|
|
|
GROUP BY order_code)
|
|
|
|
|
</where>
|
|
|
|
|
order by eo.update_time desc
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
@ -304,6 +317,7 @@
|
|
|
|
|
<if test="orderStatus != null">order_status,</if>
|
|
|
|
|
<if test="orderCost != null">order_cost,</if>
|
|
|
|
|
<if test="planPerson != null">plan_person,</if>
|
|
|
|
|
<if test="planPersonName != null">plan_person_name,</if>
|
|
|
|
|
<if test="orderCostTime != null">order_cost_time,</if>
|
|
|
|
|
<if test="orderSignPerson != null">order_sign_person,</if>
|
|
|
|
|
<if test="factoryCode != null">factory_code,</if>
|
|
|
|
@ -343,6 +357,7 @@
|
|
|
|
|
<if test="orderStatus != null">#{orderStatus},</if>
|
|
|
|
|
<if test="orderCost != null">#{orderCost},</if>
|
|
|
|
|
<if test="planPerson != null">#{planPerson},</if>
|
|
|
|
|
<if test="planPersonName != null">#{planPersonName},</if>
|
|
|
|
|
<if test="orderCostTime != null">#{orderCostTime},</if>
|
|
|
|
|
<if test="orderSignPerson != null">#{orderSignPerson},</if>
|
|
|
|
|
<if test="factoryCode != null">#{factoryCode},</if>
|
|
|
|
@ -384,6 +399,7 @@
|
|
|
|
|
<if test="orderStatus != null">order_status = #{orderStatus},</if>
|
|
|
|
|
<if test="orderCost != null">order_cost = #{orderCost},</if>
|
|
|
|
|
<if test="planPerson != null">plan_person = #{planPerson},</if>
|
|
|
|
|
<if test="planPersonName != null">plan_person_name = #{planPersonName},</if>
|
|
|
|
|
<if test="orderCostTime != null">order_cost_time = #{orderCostTime},</if>
|
|
|
|
|
<if test="orderSignPerson != null">order_sign_person = #{orderSignPerson},</if>
|
|
|
|
|
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
|
|
|
|
|