Files
klp-oa/klp-aps/src/main/java/com/klp/aps/mapper/ApsAutoScheduleMapper.java
2026-03-08 16:02:44 +08:00

65 lines
2.8 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.klp.aps.mapper;
import com.klp.aps.domain.entity.ApsScheduleChangeLogEntity;
import com.klp.aps.domain.entity.ApsScheduleOperationEntity;
import com.klp.aps.domain.row.ApsLineCapabilityRow;
import com.klp.aps.domain.row.ApsLineMetaRow;
import com.klp.aps.domain.row.ApsOrderDetailRow;
import com.klp.aps.domain.row.ApsPlanDetailRow;
import com.klp.aps.domain.row.ApsProductMetaRow;
import com.klp.aps.domain.row.ApsSchedulePlanRow;
import com.klp.aps.domain.row.ApsShiftSlotRow;
import org.apache.ibatis.annotations.Param;
import java.time.LocalDateTime;
import java.time.LocalDate;
import java.util.List;
public interface ApsAutoScheduleMapper {
ApsSchedulePlanRow selectPlanByIdForUpdate(@Param("planId") Long planId);
List<ApsOrderDetailRow> selectOrderDetailsByOrderId(@Param("orderId") Long orderId);
List<ApsPlanDetailRow> selectPlanDetailsByPlanId(@Param("planId") Long planId);
List<ApsLineCapabilityRow> selectLineCandidatesByProductAndLine(@Param("productId") Long productId,
@Param("lineId") Long lineId);
ApsLineMetaRow selectLineMetaById(@Param("lineId") Long lineId);
ApsProductMetaRow selectProductMetaById(@Param("productId") Long productId);
List<ApsShiftSlotRow> selectAvailableShifts(@Param("lineId") Long lineId,
@Param("startDate") LocalDate startDate,
@Param("endDate") LocalDate endDate);
Long selectPlanDetailId(@Param("planId") Long planId, @Param("taskId") Long taskId);
int deleteUnlockedOperationsByPlanId(@Param("planId") Long planId);
/**
* 返回冲突记录的 end_time若无冲突返回 null
*/
LocalDateTime selectFirstConflictEndTime(@Param("lineId") Long lineId,
@Param("startTime") LocalDateTime startTime,
@Param("endTime") LocalDateTime endTime,
@Param("excludeOperationId") Long excludeOperationId);
/**
* 返回命中锁定的 lock_end_time若未命中返回 null
*/
LocalDateTime selectFirstHitLockEndTime(@Param("lineId") Long lineId,
@Param("startTime") LocalDateTime startTime,
@Param("endTime") LocalDateTime endTime,
@Param("planId") Long planId,
@Param("excludeOperationId") Long excludeOperationId);
int insertOperation(ApsScheduleOperationEntity op);
int insertChangeLog(ApsScheduleChangeLogEntity log);
int updatePlanStatus(@Param("planId") Long planId, @Param("status") Integer status, @Param("updateBy") String updateBy);
}