From 5463f48771fa4f9aabf37434f12cc45f7afa3a12 Mon Sep 17 00:00:00 2001 From: caihaohan Date: Thu, 1 Feb 2024 16:14:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=2081153=20=E6=96=87=E6=A1=A3=E5=8A=A8?= =?UTF-8?q?=E6=80=81-=E6=97=A0=E6=B3=95=E5=8C=BA=E5=88=86=E4=B8=89?= =?UTF-8?q?=E4=B8=AA=E6=A0=87=E5=87=86=E5=BA=93=E7=9A=84=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/LawsCommonServiceImpl.java | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/laws-modules/src/main/java/com/jero/modules/laws/common/service/impl/LawsCommonServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/laws/common/service/impl/LawsCommonServiceImpl.java index c46cbd3f..8390082a 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/common/service/impl/LawsCommonServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/common/service/impl/LawsCommonServiceImpl.java @@ -688,13 +688,16 @@ public class LawsCommonServiceImpl implements ILawsCommonService { // 操作数据库进行新增数据 lawsCommonMapper.commonAdd(tableName, fieldsBuilder.toString(), valuesBuilder.toString()); - // 增加入库记录 - LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); - SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - String now = dateFormat.format(new Date()); - String content = loginUser.calcNameWorkNo() + " " + now + " 入库" + - standardNumber + "《" + standardName + "》"; - lawsUpdateRecordService.addRecord(standardNumber, content); + // 国标外表增加入库记录 + if (module.equals(TableNameEnum.DOMESTIC_REGULATIONS.getValue()) + || module.equals(TableNameEnum.FOREIGN_REGULATIONS.getValue())) { + LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String now = dateFormat.format(new Date()); + String content = loginUser.calcNameWorkNo() + " " + now + " 入库" + + standardNumber + "《" + standardName + "》"; + lawsUpdateRecordService.addRecord(standardNumber, content); + } // 对标准体系做处理 lawsNodeRelationService.addRelation(standardSystem, standardNumber, id); @@ -861,7 +864,10 @@ public class LawsCommonServiceImpl implements ILawsCommonService { // 如果修改了内容 String content = recordBuffer.toString(); if (!oldStr.equals(content)) { - lawsUpdateRecordService.addRecord(standardNumber, content); + if (module.equals(TableNameEnum.DOMESTIC_REGULATIONS.getValue()) + || module.equals(TableNameEnum.FOREIGN_REGULATIONS.getValue())) { + lawsUpdateRecordService.addRecord(standardNumber, content); + } } // 对标准体系做处理