|
|
|
@ -694,12 +694,27 @@ |
|
|
|
<if test="query.planOperatorName != null and query.planOperatorName != ''"> |
|
|
|
AND a.PlanOperatorName like '%' + #{query.planOperatorName} +'%' |
|
|
|
</if> |
|
|
|
<if test='(query.status == null || query.status == "") and query.functionType != "C"'> |
|
|
|
AND (a.status != '已取消') |
|
|
|
<if test='(query.status == null || query.status == "") and query.functionType == "A" and query.searchType == "checkOrder" '> |
|
|
|
AND a.status != '已取消' |
|
|
|
</if> |
|
|
|
<if test='query.status != null and query.status != ""'> |
|
|
|
<if test='query.status != null and query.status != "" and query.functionType == "A" and query.searchType == "checkOrder" '> |
|
|
|
AND a.status = #{query.status} |
|
|
|
</if> |
|
|
|
<if test='query.functionType == "A" and query.searchType == "reportCheck" '> |
|
|
|
AND a.status = '未开工' |
|
|
|
</if> |
|
|
|
<if test='(query.status == null || query.status == "") and query.functionType == "B" and query.searchType == "maintenanceOrder" '> |
|
|
|
AND a.status != '已取消' |
|
|
|
</if> |
|
|
|
<if test='query.status != null and query.status != "" and query.functionType == "B" and query.searchType == "maintenanceOrder" '> |
|
|
|
AND a.status = #{query.status} |
|
|
|
</if> |
|
|
|
<if test='query.functionType == "B" and query.searchType == "reportMaintenance" '> |
|
|
|
AND (a.status = '未开工' or a.status = '已到达') |
|
|
|
</if> |
|
|
|
<if test='query.functionType == "C" and query.searchType == "reportDefect" '> |
|
|
|
AND (a.status = '未开工' or a.status = '已到达') |
|
|
|
</if> |
|
|
|
<if test="query.planDate != null"> |
|
|
|
AND a.PlanDate = #{query.planDate} |
|
|
|
</if> |
|
|
|
@ -716,7 +731,6 @@ |
|
|
|
and getDate() >= dbo.compare_date(ewo.task_start_date) |
|
|
|
</if> |
|
|
|
AND a.FunctionType = #{query.functionType} |
|
|
|
|
|
|
|
</where> |
|
|
|
ORDER BY a.CreateDate, |
|
|
|
CASE WHEN b.urgency = '事故' THEN 1 |
|
|
|
@ -930,7 +944,8 @@ |
|
|
|
a.produce_control_flag, |
|
|
|
CASE WHEN b.id is null THEN 'N' |
|
|
|
ELSE 'Y' |
|
|
|
END as uploadFlag |
|
|
|
END as uploadFlag, |
|
|
|
a.item_notes |
|
|
|
from eam_workPlan_item as a |
|
|
|
left join eam_workOrder as c on a.site = c.site and a.PlanID = c.PlanID |
|
|
|
left join (SELECT MAX (id) as id, order_ref1, order_ref2, order_ref3 FROM sys_oss GROUP BY order_ref1, order_ref2, order_ref3) as b |
|
|
|
@ -1011,8 +1026,8 @@ |
|
|
|
</update> |
|
|
|
<insert id="saveWorkOrderItem"> |
|
|
|
INSERT into eam_workOrder_item |
|
|
|
(Site,OrderNo,ItemNo,ItemDesc,DefaultValue,ValueType,ValueType_DB,ValueChooseFlag,MaxValue,MinValue,ItemRemark,ItemType,TextValue,NumberValue,CreatedDate,CreatedBy,FinishFlag,itemResult) |
|
|
|
values (#{site},#{orderNo},#{itemNo},#{itemDesc},#{defaultValue},#{valueType},#{valueTypeDb},#{valueChooseFlag},#{maxValue,jdbcType=DOUBLE},#{minValue,jdbcType=DOUBLE},#{itemRemark,jdbcType=VARCHAR},#{itemType},#{textValue,jdbcType=VARCHAR},#{numberValue,jdbcType=DOUBLE},GetDate(),#{createdBy},#{finishFlag},#{itemResult}) |
|
|
|
(Site, OrderNo, ItemNo, ItemDesc, DefaultValue, ValueType, ValueType_DB, ValueChooseFlag, MaxValue, MinValue, ItemRemark, ItemType, TextValue, NumberValue, CreatedDate, CreatedBy, FinishFlag, itemResult, item_notes) |
|
|
|
values (#{site}, #{orderNo}, #{itemNo}, #{itemDesc}, #{defaultValue}, #{valueType}, #{valueTypeDb}, #{valueChooseFlag}, #{maxValue,jdbcType=DOUBLE}, #{minValue,jdbcType=DOUBLE}, #{itemRemark,jdbcType=VARCHAR}, #{itemType}, #{textValue,jdbcType=VARCHAR}, #{numberValue,jdbcType=DOUBLE}, GetDate(), #{createdBy}, #{finishFlag}, #{itemResult}, #{itemNotes}) |
|
|
|
</insert> |
|
|
|
<!-- 修改 eam_workPlan 状态为已结束 --> |
|
|
|
<update id="closePlanWithCheck"> |
|
|
|
|