Commit a1d06733 by 刘鑫

feat(kafka): 消费网点工程师新增(全量, 增量)

1 parent 9ed34963
......@@ -138,7 +138,7 @@ public class BeanUserDetail {
/**
* 资质数据
*/
private String qualifications;
private List<Object> qualifications;
/**
* 工作状态,请假、忙碌、空闲
*/
......
package com.dituhui.pea.order.scheduler;
import com.dituhui.pea.order.OrderServiceApplication;
import com.dituhui.pea.order.dto.param.CapacityQueryDTO;
import com.dituhui.pea.order.service.CapacityQueryService;
import com.dituhui.pea.order.service.EngineerCalendarService;
import com.dituhui.pea.order.service.impl.BeanRemoteServiceImpl;
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;
import java.time.LocalTime;
import java.util.ArrayList;
import java.util.List;
@SpringBootTest(classes = OrderServiceApplication.class)
class CalcEngineerCapacitySchedulerTest {
......@@ -17,11 +23,34 @@ class CalcEngineerCapacitySchedulerTest {
private CalcOrgCapacityScheduler calcOrgCapacityScheduler;
@Autowired
private EngineerCalendarService engineerCalendarService;
@Autowired
private CapacityQueryService capacityQueryService;
@Autowired
private BeanRemoteServiceImpl beanRemoteService;
@Test
void testBeanAPI() {
List<String> groupIds = new ArrayList<>();
//虚拟组-苏州
groupIds.add("9905deafe4498cef5b4b9ae8ee3a6dda");
//虚拟组-无锡
groupIds.add("9a5e020e7b72ac0aa554270680985352");
//虚拟组-济南
groupIds.add("f5e229bbb432839c96d6102e01e49b30");
//园区分站
groupIds.add("da30be3a890f68e9682fba2e8611ee98");
//常州
groupIds.add("638b2c847ff72ed37a80478a664edcd5");
for (String groupId : groupIds)
beanRemoteService.listDepartUserAndSaveUserDetailInfo(groupId);
}
@Test
void calcOneEngineer() {
// calcEngineerCapacityScheduler.calcOneEngineer("2023-11-15", "G20210H1301-jiangbei");
// calcOrgCapacityScheduler.calcAllGroupByDays("2023-11-14", "2023-11-17");
// calcOrgCapacityScheduler.calcAllGroupByDays("2023-11-24", "2023-12-10");
}
@Test
......@@ -29,5 +58,16 @@ class CalcEngineerCapacitySchedulerTest {
// int[][] ints = engineerCalendarService.timeWindows("6200043046", "1716782616477233152", LocalDate.now().plusDays(1));
// Assertions.assertEquals(480, ints[0][0]);
//坐标:118.652893,32.045405,匹配到的工作队列表:["1724400267728883712","1719308075152764928"]
CapacityQueryDTO.Service service = new CapacityQueryDTO.Service();
service.setBrand("博世/西门子以及其他品牌");
service.setProductType("家用小电器");
service.setServiceType("标准维修");
LocalDate targetDate = LocalDate.of(2023, 11, 18);
LocalTime start = LocalTime.of(16, 0);
LocalTime end = LocalTime.of(18, 0);
CapacityQueryDTO.Segment segment = capacityQueryService.queryCapacityByTeam("1719308075152764928", service, targetDate,
start, end);
Assertions.assertTrue(true);
}
}
\ 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!