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); + } } // 对标准体系做处理