Commit 8b284a35 by 刘鑫

fix(逻辑删除): 逻辑删除字段不存在

1 parent de965ea2
......@@ -74,7 +74,7 @@ public interface OrderInfoDao extends JpaRepository<OrderInfoEntity, Long>, JpaS
* @return 满足条件的工单信息
*/
@Query(value = "SELECT oi.* FROM skill_info si LEFT JOIN order_info oi ON oi.brand = si.brand AND oi.type = si.type AND oi.skill = si.skill " +
" WHERE si.skill_group_code = :skillGroupCode AND oi.expect_time_begin >= :dateTime AND oi.is_multiple = 0 AND si.status = 1 " +
" WHERE si.skill_group_code = :skillGroupCode AND oi.expect_time_begin >= :dateTime AND oi.is_multiple = 0 " +
" AND (appointment_status = 'INIT' AND order_status != 'CANCELED') AND oi.reason_for_failure IS NULL ", nativeQuery = true)
List<OrderInfoEntity> getSkillGroupOrder(String skillGroupCode, LocalDateTime dateTime);
}
package com.dituhui.pea.order.scheduler;
import com.dituhui.pea.order.OrderServiceApplication;
import com.dituhui.pea.order.service.EngineerCalendarService;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import java.time.LocalDate;
@SpringBootTest(classes = OrderServiceApplication.class)
class CalcEngineerCapacitySchedulerTest {
@Autowired
private CalcEngineerCapacityScheduler calcEngineerCapacityScheduler;
@Autowired
private CalcOrgCapacityScheduler calcOrgCapacityScheduler;
@Autowired
private EngineerCalendarService engineerCalendarService;
@Test
void calcOneEngineer() {
// calcEngineerCapacityScheduler.calcOneEngineer("2023-11-09", "6200044665");
calcEngineerCapacityScheduler.calcOneEngineer("2023-11-15", "G20210H1301-jiangbei");
// calcOrgCapacityScheduler.calcAllGroupByDays("2023-11-14", "2023-11-17");
}
@Test
void engineerTimeWindow() {
int[][] ints = engineerCalendarService.timeWindows("6200043046", "1716782616477233152", LocalDate.now().plusDays(1));
Assertions.assertEquals(480, ints[0][0]);
}
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!