From 34d9d84456122d1c5eb7b3fea2370703796305bb Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Fri, 11 Mar 2022 14:58:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96null=E4=BC=A0=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../newpro/service/impl/QcItemServiceImpl.java | 8 ++++---- .../newpro/service/impl/QcSourceServiceImpl.java | 14 +++++++------- .../newpro/service/impl/QcSpecServiceImpl.java | 14 +++----------- 3 files changed, 14 insertions(+), 22 deletions(-) diff --git a/src/main/java/com/xkrs/newpro/service/impl/QcItemServiceImpl.java b/src/main/java/com/xkrs/newpro/service/impl/QcItemServiceImpl.java index 8c81a04..12cff2d 100644 --- a/src/main/java/com/xkrs/newpro/service/impl/QcItemServiceImpl.java +++ b/src/main/java/com/xkrs/newpro/service/impl/QcItemServiceImpl.java @@ -45,9 +45,9 @@ public class QcItemServiceImpl implements QcItemService { QcItemEntity entity = new QcItemEntity(); entity.setCreateTime(LocalDateUtils.getCurrentSecond()); entity.setUpdateTime(""); - entity.setNo(no); - entity.setName(name); - entity.setType(type); + entity.setNo(LocalStringUtils.formatEmptyValue(no)); + entity.setName(LocalStringUtils.formatEmptyValue(name)); + entity.setType(LocalStringUtils.formatEmptyValue(type)); qcItemDao.save(entity); return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "添加成功!", locale); @@ -68,7 +68,7 @@ public class QcItemServiceImpl implements QcItemService { return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "不存在该检验项目,请先添加检验项目!", locale); } - qcItemDao.updateNameById(id, LocalDateUtils.getCurrentSecond(), name); + qcItemDao.updateNameById(id, LocalDateUtils.getCurrentSecond(), LocalStringUtils.formatEmptyValue(name)); return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "修改成功!", locale); } diff --git a/src/main/java/com/xkrs/newpro/service/impl/QcSourceServiceImpl.java b/src/main/java/com/xkrs/newpro/service/impl/QcSourceServiceImpl.java index 548b4a2..dfbd643 100644 --- a/src/main/java/com/xkrs/newpro/service/impl/QcSourceServiceImpl.java +++ b/src/main/java/com/xkrs/newpro/service/impl/QcSourceServiceImpl.java @@ -40,13 +40,13 @@ public class QcSourceServiceImpl implements QcSourceService { QcSourceEntity entity = new QcSourceEntity(); entity.setCreateTime(LocalDateUtils.getCurrentSecond()); - entity.setBatchNo(batchNo); - entity.setMachineNo(machineNo); - entity.setMaterialNo(materialNo); - entity.setMouldNo(mouldNo); - entity.setVarietyNo(varietyNo); - entity.setQcItemNo(qcItemNo); - entity.setQcValue(qcValue); + entity.setBatchNo(LocalStringUtils.formatEmptyValue(batchNo)); + entity.setMachineNo(LocalStringUtils.formatEmptyValue(machineNo)); + entity.setMaterialNo(LocalStringUtils.formatEmptyValue(materialNo)); + entity.setMouldNo(LocalStringUtils.formatEmptyValue(mouldNo)); + entity.setVarietyNo(LocalStringUtils.formatEmptyValue(varietyNo)); + entity.setQcItemNo(LocalStringUtils.formatEmptyValue(qcItemNo)); + entity.setQcValue(LocalStringUtils.formatEmptyValue(qcValue)); qcSourceDao.save(entity); return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "添加成功!", locale); diff --git a/src/main/java/com/xkrs/newpro/service/impl/QcSpecServiceImpl.java b/src/main/java/com/xkrs/newpro/service/impl/QcSpecServiceImpl.java index e1a2013..bd6a93e 100644 --- a/src/main/java/com/xkrs/newpro/service/impl/QcSpecServiceImpl.java +++ b/src/main/java/com/xkrs/newpro/service/impl/QcSpecServiceImpl.java @@ -59,8 +59,8 @@ public class QcSpecServiceImpl implements QcSpecService { QcSpecEntity entity = new QcSpecEntity(); entity.setCreateTime(LocalDateUtils.getCurrentSecond()); entity.setUpdateTime(""); - entity.setVarietyNo(varietyNo); - entity.setQcItemNo(qcItemNo); + entity.setVarietyNo(LocalStringUtils.formatEmptyValue(varietyNo)); + entity.setQcItemNo(LocalStringUtils.formatEmptyValue(qcItemNo)); entity.setMax(LocalStringUtils.formatEmptyValue(max)); entity.setMean(LocalStringUtils.formatEmptyValue(mean)); entity.setMin(LocalStringUtils.formatEmptyValue(min)); @@ -93,15 +93,7 @@ public class QcSpecServiceImpl implements QcSpecService { return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "不存在该检验规格,请先添加检验规格!", locale); } - qcSpecDao.updateQcSpecById(id, - LocalDateUtils.getCurrentSecond(), - LocalStringUtils.formatEmptyValue(max), - LocalStringUtils.formatEmptyValue(mean), - LocalStringUtils.formatEmptyValue(min), - LocalStringUtils.formatEmptyValue(unit), - LocalStringUtils.formatEmptyValue(method), - LocalStringUtils.formatEmptyValue(standard), - LocalStringUtils.formatEmptyValue(remark)); + qcSpecDao.updateQcSpecById(id, LocalDateUtils.getCurrentSecond(), LocalStringUtils.formatEmptyValue(max), LocalStringUtils.formatEmptyValue(mean), LocalStringUtils.formatEmptyValue(min), LocalStringUtils.formatEmptyValue(unit), LocalStringUtils.formatEmptyValue(method), LocalStringUtils.formatEmptyValue(standard), LocalStringUtils.formatEmptyValue(remark)); return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "修改成功!", locale); }