diff --git a/src/main/java/com/xkrs/WordAndExcelApplication.java b/src/main/java/com/xkrs/WordAndExcelApplication.java index a11963d..ab63071 100644 --- a/src/main/java/com/xkrs/WordAndExcelApplication.java +++ b/src/main/java/com/xkrs/WordAndExcelApplication.java @@ -2,8 +2,10 @@ package com.xkrs; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.ComponentScan; @SpringBootApplication +@ComponentScan(basePackages = {"com.xkrs.model.entity"}) public class WordAndExcelApplication { public static void main(String[] args) { diff --git a/src/main/java/com/xkrs/controller/QcInspectionDataSourceController.java b/src/main/java/com/xkrs/controller/QcInspectionDataSourceController.java index fe31270..995eaab 100644 --- a/src/main/java/com/xkrs/controller/QcInspectionDataSourceController.java +++ b/src/main/java/com/xkrs/controller/QcInspectionDataSourceController.java @@ -45,7 +45,7 @@ public class QcInspectionDataSourceController { * 查询某一产品的测量信息 * 根据 批次号、机器号、物料号、模具号、零件号 */ - @GetMapping("/selectDataSource") + @PostMapping("/selectDataSource") public String selectDataSource(@RequestBody QcInspectionDataSourceQo inspectionDataSourceQo) { String lotNo = inspectionDataSourceQo.getLotNo(); String machineNo = inspectionDataSourceQo.getMachineNo(); @@ -69,7 +69,7 @@ public class QcInspectionDataSourceController { public String selectAllSource() { Locale locale = LocaleContextHolder.getLocale(); List dataSourceAll = inspectionDataSourceDao.findAll(); - if (dataSourceAll == null || dataSourceAll.isEmpty()) { + if (dataSourceAll.isEmpty()) { return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该产品的测量信息!", locale); } return outputEncapsulationObject(PromptMessageEnum.SUCCESS, dataSourceAll, locale); diff --git a/src/main/java/com/xkrs/dao/QcInspectionDataSourceDao.java b/src/main/java/com/xkrs/dao/QcInspectionDataSourceDao.java index a815d5d..96b4390 100644 --- a/src/main/java/com/xkrs/dao/QcInspectionDataSourceDao.java +++ b/src/main/java/com/xkrs/dao/QcInspectionDataSourceDao.java @@ -21,7 +21,7 @@ public interface QcInspectionDataSourceDao extends JpaRepository selectDataSource(String lotNo, String machineNo, String materialNo, String modelNo, String partNo); } \ No newline at end of file diff --git a/src/main/java/com/xkrs/dao/QcInspectionFileDao.java b/src/main/java/com/xkrs/dao/QcInspectionFileDao.java index 0d49957..c0a371e 100644 --- a/src/main/java/com/xkrs/dao/QcInspectionFileDao.java +++ b/src/main/java/com/xkrs/dao/QcInspectionFileDao.java @@ -26,7 +26,7 @@ public interface QcInspectionFileDao extends JpaRepository selectFile(String lotNo, String machineNo, String materialNo, String modelNo, String partNo); /** @@ -40,7 +40,7 @@ public interface QcInspectionFileDao extends JpaRepository selectPicture(String lotNo, String machineNo, String materialNo, String modelNo, String partNo); /** @@ -36,7 +36,7 @@ public interface QcInspectionPictureDao extends JpaRepository, JpaSpecificationExecutor { - List findByPartNoAndInspectionItemCode(String partNo,String inspectionItemCode); + List findByPartNoAndInspectionItemCode(String partNo, String inspectionItemCode); }