|
@@ -408,20 +408,21 @@
|
|
|
<select id="getConflictId" resultType="com.rongwei.bsentity.domain.ApsProcessOperationProcessEquDo">
|
|
|
select apope.*
|
|
|
from aps_process_operation_process_equ apope
|
|
|
- left join aps_process_operation app on apope.PROCESSID=app.DELETED='0'
|
|
|
- <where>
|
|
|
- apope.DELETED='0'
|
|
|
- AND apope.ID != #{id}
|
|
|
- AND apope.PROCESSDEVICEID =#{equId}
|
|
|
- AND (
|
|
|
- (#{startTime}< apope.PLANENDDATE and #{endTime} > apope.PLANSTARTDATE)
|
|
|
- or
|
|
|
- (apope.PLANSTARTDATE < #{endTime} and apope.PLANENDDATE > #{startTime})
|
|
|
- )
|
|
|
- <if test="processway == '合并加工'">
|
|
|
- and ((app.PROCESSWAY != '合并加工') or(app.PROCESSWAY = '合并加工' and apope.PLANSTARTDATE!= #{startTime}) )
|
|
|
- </if>
|
|
|
- </where>
|
|
|
+ left join aps_process_operation app on apope.PROCESSID = app.ID and app.DELETED='0'
|
|
|
+ <where>
|
|
|
+ apope.DELETED='0'
|
|
|
+ AND apope.ID != #{id}
|
|
|
+ AND apope.PROCESSDEVICEID =#{equId}
|
|
|
+ AND (
|
|
|
+ (#{startTime}< apope.PLANENDDATE and #{endTime} > apope.PLANSTARTDATE)
|
|
|
+ or
|
|
|
+ (apope.PLANSTARTDATE < #{endTime} and apope.PLANENDDATE > #{startTime})
|
|
|
+ )
|
|
|
+ <if test="processway == '合并加工'">
|
|
|
+ and ((app.PROCESSWAY != '合并加工') or(app.PROCESSWAY = '合并加工' and apope.PLANSTARTDATE!=
|
|
|
+ #{startTime}) )
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
</select>
|
|
|
<select id="getWorkshopAndDeviceByFactoryId" resultType="com.rongwei.bsentity.vo.GanttVos">
|
|
|
SELECT
|