|
@@ -242,12 +242,7 @@ interface JobTicketDao {
|
|
|
* 根据作业id获取作业点位详细数据
|
|
* 根据作业id获取作业点位详细数据
|
|
|
*/
|
|
*/
|
|
|
@Query(
|
|
@Query(
|
|
|
- "select istp.*, " +
|
|
|
|
|
- "iip.point_name as pointName," +
|
|
|
|
|
- "iip.remark as pointFunction " +
|
|
|
|
|
- "from is_job_ticket_points istp " +
|
|
|
|
|
- "left join is_isolation_point iip on istp.point_id = iip.point_id " +
|
|
|
|
|
- "where ticket_id = :ticketId"
|
|
|
|
|
|
|
+ "select istp.*, " + "iip.point_name as pointName," + "iip.remark as pointFunction " + "from is_job_ticket_points istp " + "left join is_isolation_point iip on istp.point_id = iip.point_id " + "where ticket_id = :ticketId"
|
|
|
)
|
|
)
|
|
|
fun getJobTicketPointsDataByTicketId(ticketId: Long): List<IsJobTicketPointsDataVo>
|
|
fun getJobTicketPointsDataByTicketId(ticketId: Long): List<IsJobTicketPointsDataVo>
|
|
|
|
|
|
|
@@ -290,8 +285,7 @@ interface JobTicketDao {
|
|
|
*/
|
|
*/
|
|
|
@Query("update is_job_ticket_step set step_status = :status,update_time = :updateTime where step_id = :stepId")
|
|
@Query("update is_job_ticket_step set step_status = :status,update_time = :updateTime where step_id = :stepId")
|
|
|
fun updateTicketStepStatus(
|
|
fun updateTicketStepStatus(
|
|
|
- stepId: Long,
|
|
|
|
|
- status: String, updateTime: String = TimeUtils.nowString(
|
|
|
|
|
|
|
+ stepId: Long, status: String, updateTime: String = TimeUtils.nowString(
|
|
|
TimeUtils.DEFAULT_DATE_HOUR_MIN_SEC_FORMAT
|
|
TimeUtils.DEFAULT_DATE_HOUR_MIN_SEC_FORMAT
|
|
|
)
|
|
)
|
|
|
)
|
|
)
|
|
@@ -310,9 +304,7 @@ interface JobTicketDao {
|
|
|
* 获取工作中的作业数量
|
|
* 获取工作中的作业数量
|
|
|
*/
|
|
*/
|
|
|
@Query(
|
|
@Query(
|
|
|
- "select count(1) from is_job_ticket where ticket_status in ('1','2','3','4') " +
|
|
|
|
|
- "AND (:workstationId IS NULL OR trim(:workstationId) = '' OR workstation_id = :workstationId) " +
|
|
|
|
|
- "AND (:modeId IS NULL OR trim(:modeId) = '' OR mode_id = :modeId) "
|
|
|
|
|
|
|
+ "select count(1) from is_job_ticket where ticket_status in ('1','2','3','4') " + "AND (:workstationId IS NULL OR trim(:workstationId) = '' OR workstation_id = :workstationId) " + "AND (:modeId IS NULL OR trim(:modeId) = '' OR mode_id = :modeId) "
|
|
|
)
|
|
)
|
|
|
fun getInProgressJobSize(workstationId: Long?, modeId: Long?): Int
|
|
fun getInProgressJobSize(workstationId: Long?, modeId: Long?): Int
|
|
|
|
|
|
|
@@ -328,9 +320,7 @@ interface JobTicketDao {
|
|
|
* 获取所有作业数量
|
|
* 获取所有作业数量
|
|
|
*/
|
|
*/
|
|
|
@Query(
|
|
@Query(
|
|
|
- "select count(1) from is_job_ticket where (:workstationId IS NULL OR trim(:workstationId) = '' OR workstation_id = :workstationId) " +
|
|
|
|
|
- "AND (:startTime IS NULL OR trim(:startTime) = '' OR (create_time >= :startTime OR update_time >= :startTime)) " +
|
|
|
|
|
- "AND (:endTime IS NULL OR trim(:endTime) = '' OR (create_time <= :endTime OR update_time <= :endTime)) "
|
|
|
|
|
|
|
+ "select count(1) from is_job_ticket where (:workstationId IS NULL OR trim(:workstationId) = '' OR workstation_id = :workstationId) " + "AND (:startTime IS NULL OR trim(:startTime) = '' OR (create_time >= :startTime OR update_time >= :startTime)) " + "AND (:endTime IS NULL OR trim(:endTime) = '' OR (create_time <= :endTime OR update_time <= :endTime)) "
|
|
|
)
|
|
)
|
|
|
fun getAllJobSize(workstationId: Long?, startTime: String?, endTime: String?): Int
|
|
fun getAllJobSize(workstationId: Long?, startTime: String?, endTime: String?): Int
|
|
|
|
|
|
|
@@ -431,9 +421,7 @@ interface JobTicketDao {
|
|
|
"""
|
|
"""
|
|
|
)
|
|
)
|
|
|
fun getVirtualLockConflictPoint(
|
|
fun getVirtualLockConflictPoint(
|
|
|
- pointId: Long?,
|
|
|
|
|
- lockId: Long?,
|
|
|
|
|
- ticketId: Long
|
|
|
|
|
|
|
+ pointId: Long?, lockId: Long?, ticketId: Long
|
|
|
): List<IsJobTicketPoints>
|
|
): List<IsJobTicketPoints>
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -465,4 +453,34 @@ interface JobTicketDao {
|
|
|
*/
|
|
*/
|
|
|
@Update
|
|
@Update
|
|
|
fun updateTicketData(ticket: IsJobTicket)
|
|
fun updateTicketData(ticket: IsJobTicket)
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取所有上锁点位不包括异常作业
|
|
|
|
|
+ */
|
|
|
|
|
+ @Query(
|
|
|
|
|
+ """
|
|
|
|
|
+ select ijtp.* 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 = 5
|
|
|
|
|
+ and ijt.ex_status is null
|
|
|
|
|
+ and ijtp.point_id in (:workstationPointIds)
|
|
|
|
|
+ """
|
|
|
|
|
+ )
|
|
|
|
|
+ fun getAllLockedPointDataWithoutExceptionJob(workstationPointIds: List<Long>): List<IsJobTicketPoints>
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取所有异常作业上锁点位
|
|
|
|
|
+ */
|
|
|
|
|
+ @Query(
|
|
|
|
|
+ """
|
|
|
|
|
+ select ijtp.* 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.ex_status is not null
|
|
|
|
|
+ and ijtp.point_id in (:workstationPointIds)
|
|
|
|
|
+ """
|
|
|
|
|
+ )
|
|
|
|
|
+ fun getAllLockedPointDataWithExceptionJob(workstationPointIds: List<Long>): List<IsJobTicketPoints>
|
|
|
|
|
+
|
|
|
}
|
|
}
|