From 7fefe369ccf34b4a2b8567b10618be0fb8691ca4 Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Wed, 6 Sep 2023 17:54:14 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E5=88=92bug=E5=92=8C=E8=B4=A8?= =?UTF-8?q?=E9=87=8Fbug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/op/plan/service/impl/ProOrderServiceImpl.java | 2 +- .../quality/service/serviceImpl/QcProCheckServiceImpl.java | 4 +++- .../src/main/resources/mapper/QcProCheckMapper.xml | 7 ++----- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderServiceImpl.java b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderServiceImpl.java index 6864aaec..bc9b61fa 100644 --- a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderServiceImpl.java +++ b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderServiceImpl.java @@ -160,7 +160,7 @@ public class ProOrderServiceImpl implements IProOrderService { setBatch(workBatch, splitOrderDTO.getFormFields(), workOrder.getWorkorderId(), conver); // 如果存在子节点 - if (proOrder.getChildren() != null) { + if (proOrder.getChildren() != null && proOrder.getChildren().size()>0) { ProOrderDTO newProOrder = (ProOrderDTO) proOrder.getChildren().get(0); // 更新换算值 conver = (newProOrder.getQuantity() / quantity); diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/serviceImpl/QcProCheckServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/serviceImpl/QcProCheckServiceImpl.java index 4e00df54..c0e4f36f 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/serviceImpl/QcProCheckServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/serviceImpl/QcProCheckServiceImpl.java @@ -3,6 +3,7 @@ package com.op.quality.service.serviceImpl; import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder; import com.op.common.core.domain.BaseFileData; import com.op.common.core.domain.R; +import com.op.common.core.utils.DateUtils; import com.op.common.core.utils.StringUtils; import com.op.common.core.utils.uuid.IdUtils; import com.op.common.security.utils.SecurityUtils; @@ -50,7 +51,8 @@ public class QcProCheckServiceImpl implements QcProCheckService { } qcProCheckMapper.insertBaseFileBatch(files); } - + qcProCheck.setCreateBy(SecurityUtils.getUsername()); + qcProCheck.setCreateTime(DateUtils.getNowDate()); qcProCheckMapper.insertQcProCheck(qcProCheck); return R.ok(); diff --git a/op-modules/op-quality/src/main/resources/mapper/QcProCheckMapper.xml b/op-modules/op-quality/src/main/resources/mapper/QcProCheckMapper.xml index c8ac56db..c284628c 100644 --- a/op-modules/op-quality/src/main/resources/mapper/QcProCheckMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/QcProCheckMapper.xml @@ -37,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select id,rfid,factory_id,factory_code,order_id,machine_id,bad_meg,product_id,isqua,isqua,file_id,attr1,attr2, + select id,rfid,factory_id,factory_code,order_id,machine_id,bad_meg,product_id,isqua,file_id,attr1,attr2, attr3,attr4,create_by,create_time,update_by,update_time,order_code,machine_code, workorder_id,workorder_code,workorder_name,product_code from qc_pro_check @@ -45,13 +45,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - - insert into qc_pro_check