|
@@ -502,4 +502,31 @@ interface JobTicketDao {
|
|
|
"""
|
|
"""
|
|
|
)
|
|
)
|
|
|
fun getAllLockedPointDataWithExceptionJob(workstationPointIds: List<Long>): List<IsJobTicketPoints>
|
|
fun getAllLockedPointDataWithExceptionJob(workstationPointIds: List<Long>): List<IsJobTicketPoints>
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取锁定中的点位
|
|
|
|
|
+ */
|
|
|
|
|
+ @Query("""
|
|
|
|
|
+ select count(1) from is_job_ticket_points ijtp
|
|
|
|
|
+ left join is_job_ticket ijt on ijtp.ticket_id = ijt.ticket_id
|
|
|
|
|
+ where ijtp.point_status = "1"
|
|
|
|
|
+ and ijt.ticket_status in ('1','2','3','4','7')
|
|
|
|
|
+ and (:selectedWorkflowMode IS NULL OR trim(:selectedWorkflowMode) = '' OR ijt.mode_id=:selectedWorkflowMode)
|
|
|
|
|
+ and (:realTimeDataZoneId IS NULL OR trim(:realTimeDataZoneId) = '' OR ijt.workstation_id = :realTimeDataZoneId)
|
|
|
|
|
+ group by ijtp.point_id
|
|
|
|
|
+ """)
|
|
|
|
|
+ fun getLockedPointsCount(realTimeDataZoneId: Long?, selectedWorkflowMode: Long?): Int
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取使用中的硬件数量
|
|
|
|
|
+ */
|
|
|
|
|
+ @Query("""
|
|
|
|
|
+ select count(1) from is_job_ticket_points ijtp
|
|
|
|
|
+ left join is_job_ticket ijt on ijtp.ticket_id = ijt.ticket_id
|
|
|
|
|
+ where ijt.ticket_status in ('1','2','3','4','7')
|
|
|
|
|
+ and (:workflowModeId IS NULL OR trim(:workflowModeId) = '' OR ijt.mode_id = :workflowModeId)
|
|
|
|
|
+ and (:workstationId IS NULL OR trim(:workstationId) = '' OR ijt.workstation_id = :workstationId)
|
|
|
|
|
+ group by ijtp.lock_id
|
|
|
|
|
+ """)
|
|
|
|
|
+ fun getUsedHardwareCount(workstationId: Long?, workflowModeId: Long?): Int
|
|
|
}
|
|
}
|