|
@ -12,6 +12,7 @@ import org.junit.jupiter.api.Test; |
|
|
import org.nl.common.exception.BadRequestException; |
|
|
import org.nl.common.exception.BadRequestException; |
|
|
import org.nl.wms.ext.acs.service.dto.to.wms.ApplyDeviceDto; |
|
|
import org.nl.wms.ext.acs.service.dto.to.wms.ApplyDeviceDto; |
|
|
import org.nl.wms.ext.acs.service.dto.to.wms.ApplyTaskRequest; |
|
|
import org.nl.wms.ext.acs.service.dto.to.wms.ApplyTaskRequest; |
|
|
|
|
|
import org.nl.wms.sch.group.service.ISchBaseVehiclematerialgroupService; |
|
|
import org.nl.wms.sch.region.service.ISchBaseRegionService; |
|
|
import org.nl.wms.sch.region.service.ISchBaseRegionService; |
|
|
import org.nl.wms.sch.region.service.dao.SchBaseRegion; |
|
|
import org.nl.wms.sch.region.service.dao.SchBaseRegion; |
|
|
import org.nl.wms.sch.task.service.dao.SchBaseTask; |
|
|
import org.nl.wms.sch.task.service.dao.SchBaseTask; |
|
@ -34,6 +35,8 @@ import java.util.List; |
|
|
public class test { |
|
|
public class test { |
|
|
@Autowired |
|
|
@Autowired |
|
|
private ISchBaseRegionService regionService; |
|
|
private ISchBaseRegionService regionService; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private ISchBaseVehiclematerialgroupService vehiclematerialgroupService; |
|
|
|
|
|
|
|
|
@Test |
|
|
@Test |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
@Transactional(rollbackFor = Exception.class) |
|
@ -132,4 +135,21 @@ public class test { |
|
|
// 断言格式化后的日期是否符合预期
|
|
|
// 断言格式化后的日期是否符合预期
|
|
|
Assert.assertEquals("20231030", formattedDate); |
|
|
Assert.assertEquals("20231030", formattedDate); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
public void testGetInventoryQtyByMaterialId() { |
|
|
|
|
|
// 执行被测方法
|
|
|
|
|
|
int actualQty = vehiclematerialgroupService.getInventoryQtyByMaterialId("030504010003"); |
|
|
|
|
|
System.out.println(actualQty); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
public void testSplit() { |
|
|
|
|
|
// 执行被测方法
|
|
|
|
|
|
String str = "木托盘号(4)##物料编码(12)##数量(2-3)##吨量(单重X数量)##生产日期(11)##客户名称##订单号(12)"; |
|
|
|
|
|
String[] split = str.split("##"); |
|
|
|
|
|
for (int i = 0; i < split.length; i++) { |
|
|
|
|
|
System.out.println(split[i]); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|