From 73e242a4a107ce3a1266cb14e7eac51b2d7cda7a Mon Sep 17 00:00:00 2001 From: star <2755454208@qq.com> Date: Tue, 5 Nov 2024 17:25:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ktg-admin/pom.xml | 16 ++++++++++++++++ ktg-admin/src/test/test.java | 32 ++++++++++++++++++++++++++++++++ ktg-mes/pom.xml | 15 +++++++++++++++ pom.xml | 15 +++++++++++++++ 4 files changed, 78 insertions(+) create mode 100644 ktg-admin/src/test/test.java diff --git a/ktg-admin/pom.xml b/ktg-admin/pom.xml index ceeef73..0429d95 100644 --- a/ktg-admin/pom.xml +++ b/ktg-admin/pom.xml @@ -30,6 +30,22 @@ springfox-boot-starter + + + org.springframework.boot + spring-boot-starter-test + 3.3.0 + test + 1 + + + junit + junit + 4.12 + test + + + io.swagger diff --git a/ktg-admin/src/test/test.java b/ktg-admin/src/test/test.java new file mode 100644 index 0000000..e87dbab --- /dev/null +++ b/ktg-admin/src/test/test.java @@ -0,0 +1,32 @@ +import com.ktg.RuoYiApplication; +import com.ktg.mes.qc.domain.InventoryTask; +import com.ktg.mes.qc.service.InventoryTaskService; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = RuoYiApplication.class) +public class test { + @Autowired + private InventoryTaskService inventoryTaskService; + @Test + public void saveTest(){ + //新建任务对象 + InventoryTask inventoryTaskTest = new InventoryTask(); + inventoryTaskTest.setWmsInventoryCode("TEST001"); + inventoryTaskTest.setUomId("TEST001"); + inventoryTaskTest.setName("测试计划"); + inventoryTaskTest.setPlanPeriod("月"); + inventoryTaskTest.setStartTime("2022-01-01"); + inventoryTaskTest.setFinishTime("2022-12-31"); + inventoryTaskTest.setSuperiorTime("2022-01-01"); + inventoryTaskTest.setBelowTime("2022-12-31"); + inventoryTaskTest.setProductId("TEST001"); + //新增 + int i = inventoryTaskService.insertInventoryTask(inventoryTaskTest); + + } +} diff --git a/ktg-mes/pom.xml b/ktg-mes/pom.xml index 4bfeaee..e861a1b 100644 --- a/ktg-mes/pom.xml +++ b/ktg-mes/pom.xml @@ -21,6 +21,21 @@ jasperreports 6.18.1 + + + org.springframework.boot + spring-boot-starter-test + 3.3.0 + test + + + + junit + junit + 4.12 + test + + net.sf.jasperreports jasperreports-fonts diff --git a/pom.xml b/pom.xml index 85da62e..64b086e 100644 --- a/pom.xml +++ b/pom.xml @@ -122,6 +122,21 @@ ${commons.fileupload.version} + + + + org.springframework.boot + spring-boot-starter-test + 3.3.0 + test + + + + junit + junit + 4.12 + test + org.apache.poi