From c82714f206925242c8a2e81cb0d434c7da11d8dd Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Mon, 28 Feb 2022 16:48:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9SQL=E8=AF=B7=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/xkrs/WordAndExcelApplication.java | 2 ++ .../xkrs/controller/QcInspectionDataSourceController.java | 4 ++-- src/main/java/com/xkrs/dao/QcInspectionDataSourceDao.java | 2 +- src/main/java/com/xkrs/dao/QcInspectionFileDao.java | 7 +++---- src/main/java/com/xkrs/dao/QcInspectionItemDictDao.java | 7 +++++-- src/main/java/com/xkrs/dao/QcInspectionPictureDao.java | 4 ++-- src/main/java/com/xkrs/dao/QcInspectionSpecDao.java | 3 +-- 7 files changed, 16 insertions(+), 13 deletions(-) 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); }