From fa3832198eb53b072dfc266aaa7db32c94bb909c Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Tue, 11 Nov 2025 15:23:27 +0800 Subject: [PATCH] =?UTF-8?q?2025-11-11=20QC=E6=96=87=E4=BB=B6=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/gaotao/config/ShiroConfig.java | 1 + .../impl/ProductionInboundServiceImpl.java | 8 +++---- .../sys/controller/SysFileController.java | 11 ++++++++++ .../modules/sys/service/SysFileService.java | 2 ++ .../sys/service/impl/SysFileServiceImpl.java | 21 +++++++++++++++++++ src/main/resources/application-dev.yml | 5 +++-- 6 files changed, 42 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/gaotao/config/ShiroConfig.java b/src/main/java/com/gaotao/config/ShiroConfig.java index 269a813..c6fd2f1 100644 --- a/src/main/java/com/gaotao/config/ShiroConfig.java +++ b/src/main/java/com/gaotao/config/ShiroConfig.java @@ -63,6 +63,7 @@ public class ShiroConfig { filterMap.put("/favicon.ico", "anon"); filterMap.put("/bootstrap/**", "anon"); filterMap.put("/**", "oauth2"); + filterMap.put("/by-file/**", "anon"); shiroFilter.setFilterChainDefinitionMap(filterMap); shiroFilter.setLoginUrl("/login"); diff --git a/src/main/java/com/gaotao/modules/productionInbound/service/impl/ProductionInboundServiceImpl.java b/src/main/java/com/gaotao/modules/productionInbound/service/impl/ProductionInboundServiceImpl.java index eafdd21..db8c4fe 100644 --- a/src/main/java/com/gaotao/modules/productionInbound/service/impl/ProductionInboundServiceImpl.java +++ b/src/main/java/com/gaotao/modules/productionInbound/service/impl/ProductionInboundServiceImpl.java @@ -74,8 +74,8 @@ public class ProductionInboundServiceImpl implements ProductionInboundService { List params = new ArrayList<>(); params.add(site); // 参数1: site params.add(buNo); // 参数2: buNo - params.add(relatedOrderNo); // 参数3: 关联单号 - params.add(inboundNo); // 参数4: 入库单号 + params.add(inboundNo); // 参数3: 关联单号 + params.add(relatedOrderNo); // 参数4: 入库单号 params.add(""); // 参数5: 空字符串 params.add(""); // 参数6: 空字符串 params.add(""); // 参数7: 空字符串 @@ -120,8 +120,8 @@ public class ProductionInboundServiceImpl implements ProductionInboundService { List params = new ArrayList<>(); params.add(site); // 参数1: site params.add(buNo); // 参数2: buNo - params.add(relatedOrderNo); // 参数3: 关联单号 - params.add(inboundNo); // 参数4: 入库单号 + params.add(inboundNo); // 参数3: 入库单号 + params.add(relatedOrderNo); // 参数4: 关联单号 params.add(""); // 参数5: 空字符串 params.add(""); // 参数6: 空字符串 params.add(""); // 参数7: 空字符串 diff --git a/src/main/java/com/gaotao/modules/sys/controller/SysFileController.java b/src/main/java/com/gaotao/modules/sys/controller/SysFileController.java index 3be6c14..624edb2 100644 --- a/src/main/java/com/gaotao/modules/sys/controller/SysFileController.java +++ b/src/main/java/com/gaotao/modules/sys/controller/SysFileController.java @@ -62,4 +62,15 @@ public class SysFileController extends AbstractController { public void downLoadObjectFile(@RequestParam("id") Integer id, HttpServletResponse response) throws UnsupportedEncodingException { sysFileService.downLoadObjectFile(id,response); } + + /** + * 获取检验单文件 + * @param inData + * @return + */ + @PostMapping("/getInspectionFile") + public R getInspectionFile(@RequestBody SysOssEntity inData){ + List resultList = sysFileService.getInspectionFile(inData); + return R.ok().put("rows", resultList); + } } diff --git a/src/main/java/com/gaotao/modules/sys/service/SysFileService.java b/src/main/java/com/gaotao/modules/sys/service/SysFileService.java index f4b1bbb..fc889a4 100644 --- a/src/main/java/com/gaotao/modules/sys/service/SysFileService.java +++ b/src/main/java/com/gaotao/modules/sys/service/SysFileService.java @@ -36,4 +36,6 @@ public interface SysFileService { List getFileContentList2(QcFAIRecordData inData); void downLoadObjectFile(Integer id, HttpServletResponse response) throws UnsupportedEncodingException; + + List getInspectionFile(SysOssEntity inData); } diff --git a/src/main/java/com/gaotao/modules/sys/service/impl/SysFileServiceImpl.java b/src/main/java/com/gaotao/modules/sys/service/impl/SysFileServiceImpl.java index fad8e6f..96e05df 100644 --- a/src/main/java/com/gaotao/modules/sys/service/impl/SysFileServiceImpl.java +++ b/src/main/java/com/gaotao/modules/sys/service/impl/SysFileServiceImpl.java @@ -149,6 +149,27 @@ public class SysFileServiceImpl implements SysFileService { } } + @Override + public List getInspectionFile(SysOssEntity inData) { + List files1 = sysOssDao.getSysFileByOrderRef2(inData); + // mes文件 +// List list = sysOssDao.searchPartSopListFather(inData); +// for (SysOssEntity p : list) { +// if (p.getSopType().equals("SOP-ST")) { +// p.setSopType("物料SOP"); +// } +// // 正斜杠改为反斜杠 +// p.setUrl(p.getUrl().replaceAll("/", "\\\\")); +// // 获取文件类型 +// int lastDotIndex = p.getUrl().lastIndexOf('.'); +// String fileType = p.getUrl().substring(lastDotIndex + 1); +// p.setFileName(p.getFileName() + "." + fileType); +// p.setFileType(fileType); +// } +// files1.addAll(list); + return files1; + } + protected SysUserEntity getUser() { return (SysUserEntity) SecurityUtils.getSubject().getPrincipal(); diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 2f0ce99..b963794 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -216,8 +216,9 @@ bartender: columnMapBartender: ReportID sys-file: - file-path: 'D:\sop-file'#不可以放入中文字符 - oss-url: 'http://192.168.1.160:9000/' + file-path: 'D:\by-file'#不可以放入中文字符 + oss-url: 'http://192.168.10.2:6666/' + toacc: name: 888 #ERP账套号