From 060fc21c293f3eabcd544602da305e4e83803b42 Mon Sep 17 00:00:00 2001
From: Fixiaobai <fixiaobai@163.com>
Date: 星期五, 01 九月 2023 17:07:39 +0800
Subject: [PATCH] 修改报告

---
 inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/InspectionServiceImpl.java |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/InspectionServiceImpl.java b/inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/InspectionServiceImpl.java
index 0780007..96d46d3 100644
--- a/inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/InspectionServiceImpl.java
+++ b/inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/InspectionServiceImpl.java
@@ -155,11 +155,17 @@
                 .specifications(inspectionVo.getSpecifications())
                 .formTime(inspectionVo.getFormTime())
                 .inspectionId(inspection.getId())
+                .notes(inspectionVo.getNotes())
                 .build();
         inspectionMaterialMapper.insert(inspectionMaterial);
         /*鏂板妫�楠岄」鐩〃*/
         //鏍规嵁鏍峰搧鍚嶇О缂栧彿浠ュ強鍨嬪彿瑙勬牸鑾峰彇鍨嬪彿id
-        Integer specificationId = getSpecificationId(inspectionVo.getName(), inspectionVo.getMcode(), inspectionVo.getSpecifications());
+        Integer specificationId = null;
+        if(ObjectUtils.isNotEmpty(inspectionVo.getSpecificationId())){
+            specificationId =Integer.parseInt(inspectionVo.getSpecificationId());
+        }else{
+            specificationId=getSpecificationId(inspectionVo.getName(), inspectionVo.getMcode(), inspectionVo.getSpecifications());
+        }
         //濡傛灉璇曢獙椤圭洰瀛楁涓嶄负绌哄垯鎸夎瀛楁鐨勯」鐩繘琛屽尮閰�
         if (ObjectUtils.isNotEmpty(inspectionVo.getExperiment())) {
             //鑾峰彇璇曢獙椤圭洰淇℃伅(缁撴瀯,瀵肩嚎澶栧緞)
@@ -242,7 +248,6 @@
         queryWrapper
                 .eq(InspectionProduct::getInspectionMaterialId, inspectionMaterial.getId());
         List<InspectionProduct> inspectionProducts = inspectionProductMapper.selectList(queryWrapper);
-        System.out.println(inspectionProducts);
         //杩欓噷鏌ュ埌鐨勮澶噄d鍜屾楠屽憳id瑕佹煡璇㈠悕绉�
         List<InsProductVo> insProductVos = inspectionProducts.stream().map(insProduct -> {
             //灏嗕竴涓璞$殑鍊艰祴鍊肩粰鍙︿竴涓璞�
@@ -250,13 +255,11 @@
             BeanUtils.copyProperties(insProduct, insProductVo);
             //鑾峰彇璁惧鍚�(鍓嶆彁鏄鏋滃瓨鍦�)
             if (insProduct.getInstrumentId() != null) {
-                String equipmentName = instrumentService.getById(insProduct.getInstrumentId()).getEquipmentName();
-                insProductVo.setInstrumentName(equipmentName);
+                insProductVo.setInstrumentId(insProduct.getInstrumentId());
             }
             //鑾峰彇鐢ㄦ埛鍚�(鍓嶆彁鏄鏋滃瓨鍦�)
-            if (insProduct.getUserId() != null) {
-                String userName = userMapper.selectById(insProduct.getUserId()).getName();
-                insProductVo.setUserName(userName);
+            if (insProduct.getUserProId() != null) {
+                insProductVo.setUserId(insProduct.getUserProId());
             }
             //椤圭洰鍏宠仈鐗╂枡id
             insProductVo.setInspectionMaterialId(inspectionMaterial.getId());

--
Gitblit v1.9.3