|
@@ -390,6 +390,24 @@
|
|
)
|
|
)
|
|
|
|
|
|
</update>
|
|
</update>
|
|
|
|
+ <update id="moveErrorProcessEqu2">
|
|
|
|
+ update
|
|
|
|
+ aps_process_operation_process_equ apope
|
|
|
|
+ join aps_process_operation apo on apo.ID = apope.PROCESSID
|
|
|
|
+ join aps_process_operation_process_equ preapope on apope.PREVIOUSPROCESSESIDS = preapope.id
|
|
|
|
+ set
|
|
|
|
+ apope.PLANENDDATE=DATE_ADD(preapope.PLANENDDATE,INTERVAL TIMESTAMPdiff(SECOND, apope.PLANSTARTDATE, apope.PLANENDDATE) SECOND),
|
|
|
|
+ apope.PLANSTARTDATE=preapope.PLANENDDATE
|
|
|
|
+ WHERE
|
|
|
|
+ apope.deleted = '0' AND apo.DELETED = '0' AND preapope.DELETED = '0'
|
|
|
|
+ and apope.TENANTID = #{tenantId}
|
|
|
|
+ and apo.PROCESS != '铸轧'
|
|
|
|
+ and apope.WORKSTATUS = '待开工'
|
|
|
|
+ AND apope.PLANSTARTDATE between #{chongpaiStartDate} and #{chongpaiEndDate} -- 在调度时间范围内开工
|
|
|
|
+ and apope.PROCESSDEVICEID = preapope.PROCESSDEVICEID
|
|
|
|
+ and ifnull(apo.MINFLOWWAITMIN,0)=0
|
|
|
|
+ and preapope.PLANSTARTDATE < #{chongpaiStartDate}
|
|
|
|
+ </update>
|
|
<select id="checkConflictByBlankId" resultType="java.lang.Integer">
|
|
<select id="checkConflictByBlankId" resultType="java.lang.Integer">
|
|
select count(*) from aps_process_operation_process_equ
|
|
select count(*) from aps_process_operation_process_equ
|
|
<where>
|
|
<where>
|