Merge branch 'dev-tw'
This commit is contained in:
commit
dabcef7134
@ -6,6 +6,7 @@ import com.yfd.platform.common.DataSourceRequest;
|
|||||||
import com.yfd.platform.qgc_base.domain.MsOperationLog;
|
import com.yfd.platform.qgc_base.domain.MsOperationLog;
|
||||||
import com.yfd.platform.qgc_base.domain.MsOperationLogDetail;
|
import com.yfd.platform.qgc_base.domain.MsOperationLogDetail;
|
||||||
import com.yfd.platform.qgc_base.domain.SdEngInfoBH;
|
import com.yfd.platform.qgc_base.domain.SdEngInfoBH;
|
||||||
|
import com.yfd.platform.utils.CodeToNameMetadataBo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -40,6 +41,21 @@ public interface IMsOperationLogService extends IService<MsOperationLog> {
|
|||||||
*/
|
*/
|
||||||
<T> void recordModifyDetailLog(String recordId,String tableName, T before, T after, String source);
|
<T> void recordModifyDetailLog(String recordId,String tableName, T before, T after, String source);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通用修改操作详情日志(含字段级变更详情,支持代码-名称映射)
|
||||||
|
* <p>
|
||||||
|
* 额外支持将实体中 code 字段对应的 name 字段值填充到 oldValueName 和 newValueName。
|
||||||
|
* </p>
|
||||||
|
* @param recordId 记录ID(stcd)
|
||||||
|
* @param tableName 表名
|
||||||
|
* @param before 修改前的实体
|
||||||
|
* @param after 修改后的实体
|
||||||
|
* @param source 操作来源
|
||||||
|
* @param codeToNameMetaList 代码-名称映射元数据列表(可为null)
|
||||||
|
* @param <T> 实体类型
|
||||||
|
*/
|
||||||
|
<T> void recordModifyDetailLog(String recordId, String tableName, T before, T after, String source, List<CodeToNameMetadataBo> codeToNameMetaList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通用新增操作详情日志(含字段级详情)
|
* 通用新增操作详情日志(含字段级详情)
|
||||||
* <p>
|
* <p>
|
||||||
@ -53,6 +69,21 @@ public interface IMsOperationLogService extends IService<MsOperationLog> {
|
|||||||
*/
|
*/
|
||||||
<T> void recordAddDetailLog(String recordId,String tableName, T entity, String source);
|
<T> void recordAddDetailLog(String recordId,String tableName, T entity, String source);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通用新增操作详情日志(含字段级详情,支持代码-名称映射)
|
||||||
|
* <p>
|
||||||
|
* 与 {@link #recordAddDetailLog(String, String, Object, String)} 功能相同,
|
||||||
|
* 额外支持将实体中 code 字段对应的 name 字段值填充到 newValueName。
|
||||||
|
* </p>
|
||||||
|
* @param recordId 记录ID(stcd)
|
||||||
|
* @param tableName 表名
|
||||||
|
* @param entity 新增的实体
|
||||||
|
* @param source 操作来源
|
||||||
|
* @param codeToNameMetaList 代码-名称映射元数据列表(可为null)
|
||||||
|
* @param <T> 实体类型
|
||||||
|
*/
|
||||||
|
<T> void recordAddDetailLog(String recordId, String tableName, T entity, String source, List<CodeToNameMetadataBo> codeToNameMetaList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通用删除操作详情日志(含字段级详情)
|
* 通用删除操作详情日志(含字段级详情)
|
||||||
* <p>
|
* <p>
|
||||||
@ -66,6 +97,20 @@ public interface IMsOperationLogService extends IService<MsOperationLog> {
|
|||||||
*/
|
*/
|
||||||
<T> void recordDeleteDetailLog(String recordId,String tableName, T entity, String source);
|
<T> void recordDeleteDetailLog(String recordId,String tableName, T entity, String source);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通用删除操作详情日志(含字段级详情,支持代码-名称映射)
|
||||||
|
* <p>
|
||||||
|
* 额外支持将实体中 code 字段对应的 name 字段值填充到 oldValueName。
|
||||||
|
* </p>
|
||||||
|
* @param recordId 记录ID(stcd)
|
||||||
|
* @param tableName 表名
|
||||||
|
* @param entity 被删除的实体
|
||||||
|
* @param source 操作来源
|
||||||
|
* @param codeToNameMetaList 代码-名称映射元数据列表(可为null)
|
||||||
|
* @param <T> 实体类型
|
||||||
|
*/
|
||||||
|
<T> void recordDeleteDetailLog(String recordId, String tableName, T entity, String source, List<CodeToNameMetadataBo> codeToNameMetaList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询操作日志
|
* 分页查询操作日志
|
||||||
*
|
*
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package com.yfd.platform.qgc_base.service.impl;
|
package com.yfd.platform.qgc_base.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
@ -15,6 +16,7 @@ import com.yfd.platform.qgc_base.domain.SdEngInfoBH;
|
|||||||
import com.yfd.platform.qgc_base.mapper.MsOperationLogDetailMapper;
|
import com.yfd.platform.qgc_base.mapper.MsOperationLogDetailMapper;
|
||||||
import com.yfd.platform.qgc_base.mapper.MsOperationLogMapper;
|
import com.yfd.platform.qgc_base.mapper.MsOperationLogMapper;
|
||||||
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
||||||
|
import com.yfd.platform.utils.CodeToNameMetadataBo;
|
||||||
import com.yfd.platform.utils.DataSourceRequestUtil;
|
import com.yfd.platform.utils.DataSourceRequestUtil;
|
||||||
import com.yfd.platform.utils.SecurityUtils;
|
import com.yfd.platform.utils.SecurityUtils;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
@ -23,6 +25,11 @@ import org.springframework.stereotype.Service;
|
|||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.lang.reflect.Modifier;
|
import java.lang.reflect.Modifier;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@ -31,7 +38,11 @@ public class MsOperationLogServiceImpl extends ServiceImpl<MsOperationLogMapper,
|
|||||||
private static final String ENG_TABLE_NAME = "SD_ENGINFO_B_H";
|
private static final String ENG_TABLE_NAME = "SD_ENGINFO_B_H";
|
||||||
|
|
||||||
private static final Map<String, String> ENG_FIELD_MEANING_MAP = new LinkedHashMap<>();
|
private static final Map<String, String> ENG_FIELD_MEANING_MAP = new LinkedHashMap<>();
|
||||||
|
// 标准日期时间格式器
|
||||||
|
private static final DateTimeFormatter DATETIME_FORMATTER =
|
||||||
|
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||||
|
private static final DateTimeFormatter DATE_FORMATTER =
|
||||||
|
DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||||
static {
|
static {
|
||||||
ENG_FIELD_MEANING_MAP.put("STCD", "电站编码");
|
ENG_FIELD_MEANING_MAP.put("STCD", "电站编码");
|
||||||
ENG_FIELD_MEANING_MAP.put("TM", "数据时间");
|
ENG_FIELD_MEANING_MAP.put("TM", "数据时间");
|
||||||
@ -471,6 +482,43 @@ public class MsOperationLogServiceImpl extends ServiceImpl<MsOperationLogMapper,
|
|||||||
batchInsertDetails(details);
|
batchInsertDetails(details);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T> void recordAddDetailLog(String recordId, String tableName, T entity, String source, List<CodeToNameMetadataBo> codeToNameMetaList) {
|
||||||
|
if (entity == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Map<String, String> codeToNameFieldMap = buildCodeToNameFieldMap(codeToNameMetaList);
|
||||||
|
|
||||||
|
MsOperationLog mainLog = buildMainLog(tableName, recordId, "新增", source);
|
||||||
|
msOperationLogMapper.insert(mainLog);
|
||||||
|
|
||||||
|
List<MsOperationLogDetail> details = new ArrayList<>();
|
||||||
|
Set<String> processedColumns = new HashSet<>();
|
||||||
|
Class<?> entityClass = entity.getClass();
|
||||||
|
|
||||||
|
for (Field field : entityClass.getDeclaredFields()) {
|
||||||
|
if (shouldSkipField(field)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
field.setAccessible(true);
|
||||||
|
String columnName = resolveColumnName(field);
|
||||||
|
if (processedColumns.contains(columnName)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
String fieldMeaning = resolveFieldChinese(field);
|
||||||
|
Object newValue = getFieldValue(field, entity);
|
||||||
|
|
||||||
|
MsOperationLogDetail detail = buildGenericDetail(mainLog.getId(), tableName, recordId, columnName,
|
||||||
|
fieldMeaning, null, newValue, "新增字段值");
|
||||||
|
|
||||||
|
fillCodeNameValues(detail, entityClass, field.getName(), codeToNameFieldMap, null, entity);
|
||||||
|
|
||||||
|
details.add(detail);
|
||||||
|
processedColumns.add(columnName);
|
||||||
|
}
|
||||||
|
batchInsertDetails(details);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T> void recordDeleteDetailLog(String recordId,String tableName, T entity, String source) {
|
public <T> void recordDeleteDetailLog(String recordId,String tableName, T entity, String source) {
|
||||||
if (entity == null) {
|
if (entity == null) {
|
||||||
@ -505,6 +553,131 @@ public class MsOperationLogServiceImpl extends ServiceImpl<MsOperationLogMapper,
|
|||||||
batchInsertDetails(details);
|
batchInsertDetails(details);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T> void recordModifyDetailLog(String recordId, String tableName, T before, T after, String source, List<CodeToNameMetadataBo> codeToNameMetaList) {
|
||||||
|
if (before == null || after == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Map<String, String> codeToNameFieldMap = buildCodeToNameFieldMap(codeToNameMetaList);
|
||||||
|
|
||||||
|
MsOperationLog mainLog = buildMainLog(tableName, recordId, "修改", source);
|
||||||
|
msOperationLogMapper.insert(mainLog);
|
||||||
|
|
||||||
|
List<MsOperationLogDetail> details = new ArrayList<>();
|
||||||
|
Set<String> processedColumns = new HashSet<>();
|
||||||
|
Class<?> entityClass = before.getClass();
|
||||||
|
|
||||||
|
for (Field field : entityClass.getDeclaredFields()) {
|
||||||
|
if (shouldSkipField(field)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
field.setAccessible(true);
|
||||||
|
String columnName = resolveColumnName(field);
|
||||||
|
if (processedColumns.contains(columnName)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
String fieldMeaning = resolveFieldChinese(field);
|
||||||
|
Object oldValue = getFieldValue(field, before);
|
||||||
|
Object newValue = getFieldValue(field, after);
|
||||||
|
|
||||||
|
if (newValue == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (equalsValue(oldValue, newValue)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
MsOperationLogDetail detail = buildGenericDetail(mainLog.getId(), tableName, recordId, columnName,
|
||||||
|
fieldMeaning, oldValue, newValue, "修改字段值");
|
||||||
|
|
||||||
|
fillCodeNameValues(detail, entityClass, field.getName(), codeToNameFieldMap, before, after);
|
||||||
|
|
||||||
|
details.add(detail);
|
||||||
|
processedColumns.add(columnName);
|
||||||
|
}
|
||||||
|
batchInsertDetails(details);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T> void recordDeleteDetailLog(String recordId, String tableName, T entity, String source, List<CodeToNameMetadataBo> codeToNameMetaList) {
|
||||||
|
if (entity == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Map<String, String> codeToNameFieldMap = buildCodeToNameFieldMap(codeToNameMetaList);
|
||||||
|
|
||||||
|
MsOperationLog mainLog = buildMainLog(tableName, recordId, "删除", source);
|
||||||
|
msOperationLogMapper.insert(mainLog);
|
||||||
|
|
||||||
|
List<MsOperationLogDetail> details = new ArrayList<>();
|
||||||
|
Set<String> processedColumns = new HashSet<>();
|
||||||
|
Class<?> entityClass = entity.getClass();
|
||||||
|
|
||||||
|
for (Field field : entityClass.getDeclaredFields()) {
|
||||||
|
if (shouldSkipField(field)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
field.setAccessible(true);
|
||||||
|
String columnName = resolveColumnName(field);
|
||||||
|
if (processedColumns.contains(columnName)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
String fieldMeaning = resolveFieldChinese(field);
|
||||||
|
Object oldValue = getFieldValue(field, entity);
|
||||||
|
|
||||||
|
MsOperationLogDetail detail = buildGenericDetail(mainLog.getId(), tableName, recordId, columnName,
|
||||||
|
fieldMeaning, oldValue, null, "删除字段值");
|
||||||
|
|
||||||
|
fillCodeNameValues(detail, entityClass, field.getName(), codeToNameFieldMap, entity, null);
|
||||||
|
|
||||||
|
details.add(detail);
|
||||||
|
processedColumns.add(columnName);
|
||||||
|
}
|
||||||
|
batchInsertDetails(details);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据 codeToNameMetaList 构建 codeFieldName -> nameFieldName 映射
|
||||||
|
*/
|
||||||
|
private Map<String, String> buildCodeToNameFieldMap(List<CodeToNameMetadataBo> codeToNameMetaList) {
|
||||||
|
Map<String, String> map = new HashMap<>();
|
||||||
|
if (codeToNameMetaList != null) {
|
||||||
|
for (CodeToNameMetadataBo meta : codeToNameMetaList) {
|
||||||
|
if (StrUtil.isNotBlank(meta.getCodeProperty()) && StrUtil.isNotBlank(meta.getModifyProperty())) {
|
||||||
|
map.put(meta.getCodeProperty(), meta.getModifyProperty());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 填充日志明细的 oldValueName 和 newValueName
|
||||||
|
*/
|
||||||
|
private void fillCodeNameValues(MsOperationLogDetail detail, Class<?> entityClass, String codeFieldName,
|
||||||
|
Map<String, String> codeToNameFieldMap, Object beforeEntity, Object afterEntity) {
|
||||||
|
String nameFieldName = codeToNameFieldMap.get(codeFieldName);
|
||||||
|
if (nameFieldName == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
Field nameField = entityClass.getDeclaredField(nameFieldName);
|
||||||
|
nameField.setAccessible(true);
|
||||||
|
if (beforeEntity != null) {
|
||||||
|
Object oldNameValue = nameField.get(beforeEntity);
|
||||||
|
if (oldNameValue != null) {
|
||||||
|
detail.setOldValueName(formatValue(oldNameValue));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (afterEntity != null) {
|
||||||
|
Object newNameValue = nameField.get(afterEntity);
|
||||||
|
if (newNameValue != null) {
|
||||||
|
detail.setNewValueName(formatValue(newNameValue));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (NoSuchFieldException | IllegalAccessException e) {
|
||||||
|
// 忽略找不到 name 字段的情况
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private MsOperationLogDetail buildDetail(String mainId,
|
private MsOperationLogDetail buildDetail(String mainId,
|
||||||
String stationCode,
|
String stationCode,
|
||||||
String fieldCode,
|
String fieldCode,
|
||||||
@ -670,16 +843,64 @@ public class MsOperationLogServiceImpl extends ServiceImpl<MsOperationLogMapper,
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean equalsValue(Object oldValue, Object newValue) {
|
private boolean equalsValue(Object oldValue, Object newValue) {
|
||||||
return StrUtil.equals(formatValue(oldValue), formatValue(newValue));
|
// 1. 先做地址和空值快速判断,提升性能
|
||||||
|
if (oldValue == newValue) return true;
|
||||||
|
if (oldValue == null || newValue == null) return false;
|
||||||
|
|
||||||
|
String formattedOld = formatValue(oldValue);
|
||||||
|
String formattedNew = formatValue(newValue);
|
||||||
|
return StrUtil.equals(formattedOld, formattedNew);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String formatValue(Object value) {
|
private String formatValue(Object value) {
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
// 处理 java.util.Date
|
||||||
if (value instanceof Date date) {
|
if (value instanceof Date date) {
|
||||||
return DateUtil.formatDateTime(date);
|
return DateUtil.formatDateTime(date);
|
||||||
}
|
}
|
||||||
|
// 处理 Java 8 LocalDateTime
|
||||||
|
if (value instanceof LocalDateTime ldt) {
|
||||||
|
return DATETIME_FORMATTER.format(ldt);
|
||||||
|
}
|
||||||
|
// 处理 Java 8 LocalDate
|
||||||
|
if (value instanceof LocalDate ld) {
|
||||||
|
return DATE_FORMATTER.format(ld);
|
||||||
|
}
|
||||||
|
// 处理 JDBC Timestamp(已经继承 Date,但为了避免上面 Date 分支的时区转换问题,可以单独处理)
|
||||||
|
if (value instanceof Timestamp ts) {
|
||||||
|
return DATETIME_FORMATTER.format(ts.toLocalDateTime());
|
||||||
|
}
|
||||||
|
// ========== 2. 核心优化:数值类型(解决 12.000000 vs 12) ==========
|
||||||
|
if (value instanceof Number) {
|
||||||
|
// 防御性处理:避免 NaN 或 Infinity 导致 BigDecimal 报错
|
||||||
|
if (value instanceof Double d) {
|
||||||
|
if (d.isNaN() || d.isInfinite()) return String.valueOf(value);
|
||||||
|
}
|
||||||
|
if (value instanceof Float f) {
|
||||||
|
if (f.isNaN() || f.isInfinite()) return String.valueOf(value);
|
||||||
|
}
|
||||||
|
// 关键步骤:转为 BigDecimal -> 去除末尾多余的 0 -> 避免科学计数法
|
||||||
|
BigDecimal bd = new BigDecimal(value.toString());
|
||||||
|
return bd.stripTrailingZeros().toPlainString();
|
||||||
|
}
|
||||||
|
|
||||||
|
// ========== 3. 扩展:对字符串类型的数字做同样处理 ==========
|
||||||
|
// 场景:数据库字段是 varchar 但存了 '12.000000',或者前端传来字符串 '12.0'
|
||||||
|
// if (value instanceof String str) {
|
||||||
|
// if (StrUtil.isNotBlank(str) && NumberUtil.isNumber(str)) {
|
||||||
|
// try {
|
||||||
|
// BigDecimal bd = new BigDecimal(str);
|
||||||
|
// // 注意:这里不去除前导零(如版本号 1.0.0 不会被识别为数字),只处理纯数值
|
||||||
|
// return bd.stripTrailingZeros().toPlainString();
|
||||||
|
// } catch (Exception ignore) {
|
||||||
|
// // 转换失败则按普通字符串处理
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// return str;
|
||||||
|
// }
|
||||||
|
// 其他未知类型(如数组、Map 等)保持原样,但建议视具体业务补充
|
||||||
return String.valueOf(value);
|
return String.valueOf(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -71,7 +71,8 @@ public class SdAiboxBHServiceImpl extends ServiceImpl<SdAiboxBHMapper, SdAiboxBH
|
|||||||
public boolean add(SdAiboxBH entity, String source) {
|
public boolean add(SdAiboxBH entity, String source) {
|
||||||
boolean result = this.save(entity);
|
boolean result = this.save(entity);
|
||||||
if (result) {
|
if (result) {
|
||||||
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -82,7 +83,9 @@ public class SdAiboxBHServiceImpl extends ServiceImpl<SdAiboxBHMapper, SdAiboxBH
|
|||||||
SdAiboxBH before = this.getById(entity.getStcd());
|
SdAiboxBH before = this.getById(entity.getStcd());
|
||||||
boolean result = this.updateById(entity);
|
boolean result = this.updateById(entity);
|
||||||
if (result && before != null) {
|
if (result && before != null) {
|
||||||
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source);
|
dictCodeToNameConverter.convertCodeToName(before, CODE_TO_NAME_META_LIST);
|
||||||
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -100,7 +103,8 @@ public class SdAiboxBHServiceImpl extends ServiceImpl<SdAiboxBHMapper, SdAiboxBH
|
|||||||
wrapper.set(SdAiboxBH::getDeleteUser, SecurityUtils.getCurrentUsername());
|
wrapper.set(SdAiboxBH::getDeleteUser, SecurityUtils.getCurrentUsername());
|
||||||
wrapper.set(SdAiboxBH::getDeleteTime, new Date());
|
wrapper.set(SdAiboxBH::getDeleteTime, new Date());
|
||||||
if (this.update(wrapper)) {
|
if (this.update(wrapper)) {
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source); count++;
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST); count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return count > 0;
|
return count > 0;
|
||||||
|
|||||||
@ -59,7 +59,8 @@ public class SdAimonitorBHServiceImpl extends ServiceImpl<SdAimonitorBHMapper, S
|
|||||||
public boolean add(SdAimonitorBH entity, String source) {
|
public boolean add(SdAimonitorBH entity, String source) {
|
||||||
boolean result = this.save(entity);
|
boolean result = this.save(entity);
|
||||||
if (result) {
|
if (result) {
|
||||||
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -70,7 +71,9 @@ public class SdAimonitorBHServiceImpl extends ServiceImpl<SdAimonitorBHMapper, S
|
|||||||
SdAimonitorBH before = this.getById(entity.getStcd());
|
SdAimonitorBH before = this.getById(entity.getStcd());
|
||||||
boolean result = this.updateById(entity);
|
boolean result = this.updateById(entity);
|
||||||
if (result && before != null) {
|
if (result && before != null) {
|
||||||
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source);
|
dictCodeToNameConverter.convertCodeToName(before, CODE_TO_NAME_META_LIST);
|
||||||
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -88,7 +91,8 @@ public class SdAimonitorBHServiceImpl extends ServiceImpl<SdAimonitorBHMapper, S
|
|||||||
wrapper.set(SdAimonitorBH::getDeleteUser, SecurityUtils.getCurrentUsername());
|
wrapper.set(SdAimonitorBH::getDeleteUser, SecurityUtils.getCurrentUsername());
|
||||||
wrapper.set(SdAimonitorBH::getDeleteTime, new Date());
|
wrapper.set(SdAimonitorBH::getDeleteTime, new Date());
|
||||||
if (this.update(wrapper)) {
|
if (this.update(wrapper)) {
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -66,7 +66,8 @@ public class SdArtsgBHServiceImpl extends ServiceImpl<SdArtsgBHMapper, SdArtsgBH
|
|||||||
public boolean add(SdArtsgBH entity, String source) {
|
public boolean add(SdArtsgBH entity, String source) {
|
||||||
boolean result = this.save(entity);
|
boolean result = this.save(entity);
|
||||||
if (result) {
|
if (result) {
|
||||||
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -77,7 +78,9 @@ public class SdArtsgBHServiceImpl extends ServiceImpl<SdArtsgBHMapper, SdArtsgBH
|
|||||||
SdArtsgBH before = this.getById(entity.getStcd());
|
SdArtsgBH before = this.getById(entity.getStcd());
|
||||||
boolean result = this.updateById(entity);
|
boolean result = this.updateById(entity);
|
||||||
if (result && before != null) {
|
if (result && before != null) {
|
||||||
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source);
|
dictCodeToNameConverter.convertCodeToName(before, CODE_TO_NAME_META_LIST);
|
||||||
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -90,7 +93,8 @@ public class SdArtsgBHServiceImpl extends ServiceImpl<SdArtsgBHMapper, SdArtsgBH
|
|||||||
for (String stcd : stcds) {
|
for (String stcd : stcds) {
|
||||||
SdArtsgBH entity = this.getById(stcd);
|
SdArtsgBH entity = this.getById(stcd);
|
||||||
if (this.removeById(stcd)) {
|
if (this.removeById(stcd)) {
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source); count++;
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST); count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return count > 0;
|
return count > 0;
|
||||||
|
|||||||
@ -68,7 +68,8 @@ public class SdDwBHServiceImpl extends ServiceImpl<SdDwBHMapper, SdDwBH> impleme
|
|||||||
public boolean add(SdDwBH entity, String source) {
|
public boolean add(SdDwBH entity, String source) {
|
||||||
boolean result = this.save(entity);
|
boolean result = this.save(entity);
|
||||||
if (result) {
|
if (result) {
|
||||||
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordAddDetailLog(entity.getStcd(), TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -79,7 +80,9 @@ public class SdDwBHServiceImpl extends ServiceImpl<SdDwBHMapper, SdDwBH> impleme
|
|||||||
SdDwBH before = this.getById(entity.getStcd());
|
SdDwBH before = this.getById(entity.getStcd());
|
||||||
boolean result = this.updateById(entity);
|
boolean result = this.updateById(entity);
|
||||||
if (result && before != null) {
|
if (result && before != null) {
|
||||||
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source);
|
dictCodeToNameConverter.convertCodeToName(before, CODE_TO_NAME_META_LIST);
|
||||||
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordModifyDetailLog(entity.getStcd(), TABLE_NAME, before, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -97,7 +100,9 @@ public class SdDwBHServiceImpl extends ServiceImpl<SdDwBHMapper, SdDwBH> impleme
|
|||||||
wrapper.set(SdDwBH::getDeleteUser, SecurityUtils.getCurrentUsername());
|
wrapper.set(SdDwBH::getDeleteUser, SecurityUtils.getCurrentUsername());
|
||||||
wrapper.set(SdDwBH::getDeleteTime, new Date());
|
wrapper.set(SdDwBH::getDeleteTime, new Date());
|
||||||
if (this.update(wrapper)) {
|
if (this.update(wrapper)) {
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source); count++;
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordDeleteDetailLog(stcd, TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return count > 0;
|
return count > 0;
|
||||||
|
|||||||
@ -68,7 +68,8 @@ public class SdEqBHServiceImpl extends ServiceImpl<SdEqBHMapper, SdEqBH> impleme
|
|||||||
public boolean add(SdEqBH entity, String source) {
|
public boolean add(SdEqBH entity, String source) {
|
||||||
boolean result = this.save(entity);
|
boolean result = this.save(entity);
|
||||||
if (result) {
|
if (result) {
|
||||||
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -79,7 +80,9 @@ public class SdEqBHServiceImpl extends ServiceImpl<SdEqBHMapper, SdEqBH> impleme
|
|||||||
SdEqBH before = this.getById(entity.getStcd());
|
SdEqBH before = this.getById(entity.getStcd());
|
||||||
boolean result = this.updateById(entity);
|
boolean result = this.updateById(entity);
|
||||||
if (result && before != null) {
|
if (result && before != null) {
|
||||||
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source);
|
dictCodeToNameConverter.convertCodeToName(before, CODE_TO_NAME_META_LIST);
|
||||||
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -97,7 +100,8 @@ public class SdEqBHServiceImpl extends ServiceImpl<SdEqBHMapper, SdEqBH> impleme
|
|||||||
wrapper.set(SdEqBH::getDeleteUser, SecurityUtils.getCurrentUsername());
|
wrapper.set(SdEqBH::getDeleteUser, SecurityUtils.getCurrentUsername());
|
||||||
wrapper.set(SdEqBH::getDeleteTime, new Date());
|
wrapper.set(SdEqBH::getDeleteTime, new Date());
|
||||||
if (this.update(wrapper)) {
|
if (this.update(wrapper)) {
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source); count++;
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST); count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return count > 0;
|
return count > 0;
|
||||||
|
|||||||
@ -65,7 +65,8 @@ public class SdFbrdBHServiceImpl extends ServiceImpl<SdFbrdBHMapper, SdFbrdBH> i
|
|||||||
public boolean add(SdFbrdBH entity, String source) {
|
public boolean add(SdFbrdBH entity, String source) {
|
||||||
boolean result = this.save(entity);
|
boolean result = this.save(entity);
|
||||||
if (result) {
|
if (result) {
|
||||||
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -76,7 +77,9 @@ public class SdFbrdBHServiceImpl extends ServiceImpl<SdFbrdBHMapper, SdFbrdBH> i
|
|||||||
SdFbrdBH before = this.getById(entity.getStcd());
|
SdFbrdBH before = this.getById(entity.getStcd());
|
||||||
boolean result = this.updateById(entity);
|
boolean result = this.updateById(entity);
|
||||||
if (result && before != null) {
|
if (result && before != null) {
|
||||||
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source);
|
dictCodeToNameConverter.convertCodeToName(before, CODE_TO_NAME_META_LIST);
|
||||||
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -89,7 +92,8 @@ public class SdFbrdBHServiceImpl extends ServiceImpl<SdFbrdBHMapper, SdFbrdBH> i
|
|||||||
for (String stcd : stcds) {
|
for (String stcd : stcds) {
|
||||||
SdFbrdBH entity = this.getById(stcd);
|
SdFbrdBH entity = this.getById(stcd);
|
||||||
if (this.removeById(stcd)) {
|
if (this.removeById(stcd)) {
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -69,7 +69,8 @@ public class SdFhbtBHServiceImpl extends ServiceImpl<SdFhbtBHMapper, SdFhbtBH> i
|
|||||||
public boolean add(SdFhbtBH entity, String source) {
|
public boolean add(SdFhbtBH entity, String source) {
|
||||||
boolean result = this.save(entity);
|
boolean result = this.save(entity);
|
||||||
if (result) {
|
if (result) {
|
||||||
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -80,7 +81,9 @@ public class SdFhbtBHServiceImpl extends ServiceImpl<SdFhbtBHMapper, SdFhbtBH> i
|
|||||||
SdFhbtBH before = this.getById(entity.getStcd());
|
SdFhbtBH before = this.getById(entity.getStcd());
|
||||||
boolean result = this.updateById(entity);
|
boolean result = this.updateById(entity);
|
||||||
if (result && before != null) {
|
if (result && before != null) {
|
||||||
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source);
|
dictCodeToNameConverter.convertCodeToName(before, CODE_TO_NAME_META_LIST);
|
||||||
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -98,7 +101,8 @@ public class SdFhbtBHServiceImpl extends ServiceImpl<SdFhbtBHMapper, SdFhbtBH> i
|
|||||||
wrapper.set(SdFhbtBH::getDeleteUser, SecurityUtils.getCurrentUsername());
|
wrapper.set(SdFhbtBH::getDeleteUser, SecurityUtils.getCurrentUsername());
|
||||||
wrapper.set(SdFhbtBH::getDeleteTime, new Date());
|
wrapper.set(SdFhbtBH::getDeleteTime, new Date());
|
||||||
if (this.update(wrapper)) {
|
if (this.update(wrapper)) {
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source); count++;
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST); count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return count > 0;
|
return count > 0;
|
||||||
|
|||||||
@ -76,7 +76,8 @@ public class SdFishDictoryBServiceImpl extends ServiceImpl<SdFishDictoryBMapper,
|
|||||||
public boolean add(SdFishDictoryB entity, String source) {
|
public boolean add(SdFishDictoryB entity, String source) {
|
||||||
boolean result = this.save(entity);
|
boolean result = this.save(entity);
|
||||||
if (result) {
|
if (result) {
|
||||||
msOperationLogService.recordAddDetailLog(entity.getId(),TABLE_NAME, entity, source);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordAddDetailLog(entity.getId(),TABLE_NAME, entity, source,CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -87,7 +88,9 @@ public class SdFishDictoryBServiceImpl extends ServiceImpl<SdFishDictoryBMapper,
|
|||||||
SdFishDictoryB before = this.getById(entity.getId());
|
SdFishDictoryB before = this.getById(entity.getId());
|
||||||
boolean result = this.updateById(entity);
|
boolean result = this.updateById(entity);
|
||||||
if (result && before != null) {
|
if (result && before != null) {
|
||||||
msOperationLogService.recordModifyDetailLog(entity.getId(),TABLE_NAME, before, entity, source);
|
dictCodeToNameConverter.convertCodeToName(before, CODE_TO_NAME_META_LIST);
|
||||||
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordModifyDetailLog(entity.getId(),TABLE_NAME, before, entity, source,CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -105,7 +108,8 @@ public class SdFishDictoryBServiceImpl extends ServiceImpl<SdFishDictoryBMapper,
|
|||||||
wrapper.set(SdFishDictoryB::getDeleteUser, SecurityUtils.getCurrentUsername());
|
wrapper.set(SdFishDictoryB::getDeleteUser, SecurityUtils.getCurrentUsername());
|
||||||
wrapper.set(SdFishDictoryB::getDeleteTime, new Date());
|
wrapper.set(SdFishDictoryB::getDeleteTime, new Date());
|
||||||
if (this.update(wrapper)) {
|
if (this.update(wrapper)) {
|
||||||
msOperationLogService.recordDeleteDetailLog(id,TABLE_NAME, entity, source);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordDeleteDetailLog(id,TABLE_NAME, entity, source,CODE_TO_NAME_META_LIST);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -179,8 +183,8 @@ public class SdFishDictoryBServiceImpl extends ServiceImpl<SdFishDictoryBMapper,
|
|||||||
if (scoreCompare != 0) {
|
if (scoreCompare != 0) {
|
||||||
return scoreCompare;
|
return scoreCompare;
|
||||||
}
|
}
|
||||||
Integer order1 = f1.getOrderIndex() == null ? 0 : f1.getOrderIndex();
|
int order1 = f1.getOrderIndex() == null ? 0 : f1.getOrderIndex();
|
||||||
Integer order2 = f2.getOrderIndex() == null ? 0 : f2.getOrderIndex();
|
int order2 = f2.getOrderIndex() == null ? 0 : f2.getOrderIndex();
|
||||||
int orderCompare = Integer.compare(order1, order2);
|
int orderCompare = Integer.compare(order1, order2);
|
||||||
if (orderCompare != 0) {
|
if (orderCompare != 0) {
|
||||||
return orderCompare;
|
return orderCompare;
|
||||||
|
|||||||
@ -215,8 +215,9 @@ public class SdFpssBHServiceImpl extends ServiceImpl<SdFpssBHMapper, SdFpssBH> i
|
|||||||
public boolean add(SdFpssBH entity, String source) {
|
public boolean add(SdFpssBH entity, String source) {
|
||||||
boolean result = save(entity);
|
boolean result = save(entity);
|
||||||
if (result) {
|
if (result) {
|
||||||
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
// msOperationLogService.recordOperationLog(TABLE_NAME, entity.getStcd(), "新增", source);
|
// msOperationLogService.recordOperationLog(TABLE_NAME, entity.getStcd(), "新增", source);
|
||||||
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source);
|
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -226,7 +227,9 @@ public class SdFpssBHServiceImpl extends ServiceImpl<SdFpssBHMapper, SdFpssBH> i
|
|||||||
SdFpssBH before = this.getById(entity.getStcd());
|
SdFpssBH before = this.getById(entity.getStcd());
|
||||||
boolean result = this.updateById(entity);
|
boolean result = this.updateById(entity);
|
||||||
if (result && before != null) {
|
if (result && before != null) {
|
||||||
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source);
|
dictCodeToNameConverter.convertCodeToName(before, CODE_TO_NAME_META_LIST);
|
||||||
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -266,7 +269,8 @@ public class SdFpssBHServiceImpl extends ServiceImpl<SdFpssBHMapper, SdFpssBH> i
|
|||||||
wrapper.set(SdFpssBH::getDeleteUser, SecurityUtils.getCurrentUsername());
|
wrapper.set(SdFpssBH::getDeleteUser, SecurityUtils.getCurrentUsername());
|
||||||
wrapper.set(SdFpssBH::getDeleteTime, new Date());
|
wrapper.set(SdFpssBH::getDeleteTime, new Date());
|
||||||
if (this.update(wrapper)) {
|
if (this.update(wrapper)) {
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source); count++;
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST); count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return count > 0;
|
return count > 0;
|
||||||
|
|||||||
@ -69,7 +69,8 @@ public class SdOpinfoBHServiceImpl extends ServiceImpl<SdOpinfoBHMapper, SdOpinf
|
|||||||
public boolean add(SdOpinfoBH entity, String source) {
|
public boolean add(SdOpinfoBH entity, String source) {
|
||||||
boolean result = this.save(entity);
|
boolean result = this.save(entity);
|
||||||
if (result) {
|
if (result) {
|
||||||
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -80,7 +81,9 @@ public class SdOpinfoBHServiceImpl extends ServiceImpl<SdOpinfoBHMapper, SdOpinf
|
|||||||
SdOpinfoBH before = this.getById(entity.getStcd());
|
SdOpinfoBH before = this.getById(entity.getStcd());
|
||||||
boolean result = this.updateById(entity);
|
boolean result = this.updateById(entity);
|
||||||
if (result && before != null) {
|
if (result && before != null) {
|
||||||
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source);
|
dictCodeToNameConverter.convertCodeToName(before, CODE_TO_NAME_META_LIST);
|
||||||
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -98,7 +101,8 @@ public class SdOpinfoBHServiceImpl extends ServiceImpl<SdOpinfoBHMapper, SdOpinf
|
|||||||
wrapper.set(SdOpinfoBH::getDeleteUser, SecurityUtils.getCurrentUsername());
|
wrapper.set(SdOpinfoBH::getDeleteUser, SecurityUtils.getCurrentUsername());
|
||||||
wrapper.set(SdOpinfoBH::getDeleteTime, new Date());
|
wrapper.set(SdOpinfoBH::getDeleteTime, new Date());
|
||||||
if (this.update(wrapper)) {
|
if (this.update(wrapper)) {
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -68,7 +68,8 @@ public class SdOtteBHServiceImpl extends ServiceImpl<SdOtteBHMapper, SdOtteBH> i
|
|||||||
public boolean add(SdOtteBH entity, String source) {
|
public boolean add(SdOtteBH entity, String source) {
|
||||||
boolean result = this.save(entity);
|
boolean result = this.save(entity);
|
||||||
if (result) {
|
if (result) {
|
||||||
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -79,7 +80,9 @@ public class SdOtteBHServiceImpl extends ServiceImpl<SdOtteBHMapper, SdOtteBH> i
|
|||||||
SdOtteBH before = this.getById(entity.getStcd());
|
SdOtteBH before = this.getById(entity.getStcd());
|
||||||
boolean result = this.updateById(entity);
|
boolean result = this.updateById(entity);
|
||||||
if (result && before != null) {
|
if (result && before != null) {
|
||||||
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source);
|
dictCodeToNameConverter.convertCodeToName(before, CODE_TO_NAME_META_LIST);
|
||||||
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -92,7 +95,8 @@ public class SdOtteBHServiceImpl extends ServiceImpl<SdOtteBHMapper, SdOtteBH> i
|
|||||||
for (String stcd : stcds) {
|
for (String stcd : stcds) {
|
||||||
SdOtteBH entity = this.getById(stcd);
|
SdOtteBH entity = this.getById(stcd);
|
||||||
if (this.removeById(stcd)) {
|
if (this.removeById(stcd)) {
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -66,7 +66,8 @@ public class SdOtweBHServiceImpl extends ServiceImpl<SdOtweBHMapper, SdOtweBH> i
|
|||||||
public boolean add(SdOtweBH entity, String source) {
|
public boolean add(SdOtweBH entity, String source) {
|
||||||
boolean result = this.save(entity);
|
boolean result = this.save(entity);
|
||||||
if (result) {
|
if (result) {
|
||||||
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -77,7 +78,9 @@ public class SdOtweBHServiceImpl extends ServiceImpl<SdOtweBHMapper, SdOtweBH> i
|
|||||||
SdOtweBH before = this.getById(entity.getStcd());
|
SdOtweBH before = this.getById(entity.getStcd());
|
||||||
boolean result = this.updateById(entity);
|
boolean result = this.updateById(entity);
|
||||||
if (result && before != null) {
|
if (result && before != null) {
|
||||||
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source);
|
dictCodeToNameConverter.convertCodeToName(before, CODE_TO_NAME_META_LIST);
|
||||||
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -90,7 +93,8 @@ public class SdOtweBHServiceImpl extends ServiceImpl<SdOtweBHMapper, SdOtweBH> i
|
|||||||
for (String stcd : stcds) {
|
for (String stcd : stcds) {
|
||||||
SdOtweBH entity = this.getById(stcd);
|
SdOtweBH entity = this.getById(stcd);
|
||||||
if (this.removeById(stcd)) {
|
if (this.removeById(stcd)) {
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -71,7 +71,8 @@ public class SdSonarBHServiceImpl extends ServiceImpl<SdSonarBHMapper, SdSonarBH
|
|||||||
public boolean add(SdSonarBH entity, String source) {
|
public boolean add(SdSonarBH entity, String source) {
|
||||||
boolean result = this.save(entity);
|
boolean result = this.save(entity);
|
||||||
if (result) {
|
if (result) {
|
||||||
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -82,7 +83,9 @@ public class SdSonarBHServiceImpl extends ServiceImpl<SdSonarBHMapper, SdSonarBH
|
|||||||
SdSonarBH before = this.getById(entity.getStcd());
|
SdSonarBH before = this.getById(entity.getStcd());
|
||||||
boolean result = this.updateById(entity);
|
boolean result = this.updateById(entity);
|
||||||
if (result && before != null) {
|
if (result && before != null) {
|
||||||
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source);
|
dictCodeToNameConverter.convertCodeToName(before, CODE_TO_NAME_META_LIST);
|
||||||
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -100,7 +103,8 @@ public class SdSonarBHServiceImpl extends ServiceImpl<SdSonarBHMapper, SdSonarBH
|
|||||||
wrapper.set(SdSonarBH::getDeleteTime, new Date());
|
wrapper.set(SdSonarBH::getDeleteTime, new Date());
|
||||||
SdSonarBH entity = this.getById(stcd);
|
SdSonarBH entity = this.getById(stcd);
|
||||||
if (this.update(wrapper)) {
|
if (this.update(wrapper)) {
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -66,7 +66,8 @@ public class SdTeBHServiceImpl extends ServiceImpl<SdTeBHMapper, SdTeBH> impleme
|
|||||||
public boolean add(SdTeBH entity, String source) {
|
public boolean add(SdTeBH entity, String source) {
|
||||||
boolean result = this.save(entity);
|
boolean result = this.save(entity);
|
||||||
if (result) {
|
if (result) {
|
||||||
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -77,7 +78,9 @@ public class SdTeBHServiceImpl extends ServiceImpl<SdTeBHMapper, SdTeBH> impleme
|
|||||||
SdTeBH before = this.getById(entity.getStcd());
|
SdTeBH before = this.getById(entity.getStcd());
|
||||||
boolean result = this.updateById(entity);
|
boolean result = this.updateById(entity);
|
||||||
if (result && before != null) {
|
if (result && before != null) {
|
||||||
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source);
|
dictCodeToNameConverter.convertCodeToName(before, CODE_TO_NAME_META_LIST);
|
||||||
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -90,7 +93,7 @@ public class SdTeBHServiceImpl extends ServiceImpl<SdTeBHMapper, SdTeBH> impleme
|
|||||||
for (String stcd : stcds) {
|
for (String stcd : stcds) {
|
||||||
SdTeBH entity = this.getById(stcd);
|
SdTeBH entity = this.getById(stcd);
|
||||||
if (this.removeById(stcd)) {
|
if (this.removeById(stcd)) {
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source);
|
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -67,7 +67,8 @@ public class SdVaBHServiceImpl extends ServiceImpl<SdVaBHMapper, SdVaBH> impleme
|
|||||||
public boolean add(SdVaBH entity, String source) {
|
public boolean add(SdVaBH entity, String source) {
|
||||||
boolean result = this.save(entity);
|
boolean result = this.save(entity);
|
||||||
if (result) {
|
if (result) {
|
||||||
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -78,7 +79,9 @@ public class SdVaBHServiceImpl extends ServiceImpl<SdVaBHMapper, SdVaBH> impleme
|
|||||||
SdVaBH before = this.getById(entity.getStcd());
|
SdVaBH before = this.getById(entity.getStcd());
|
||||||
boolean result = this.updateById(entity);
|
boolean result = this.updateById(entity);
|
||||||
if (result && before != null) {
|
if (result && before != null) {
|
||||||
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source);
|
dictCodeToNameConverter.convertCodeToName(before, CODE_TO_NAME_META_LIST);
|
||||||
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -96,7 +99,8 @@ public class SdVaBHServiceImpl extends ServiceImpl<SdVaBHMapper, SdVaBH> impleme
|
|||||||
wrapper.set(SdVaBH::getDeleteUser, SecurityUtils.getCurrentUsername());
|
wrapper.set(SdVaBH::getDeleteUser, SecurityUtils.getCurrentUsername());
|
||||||
wrapper.set(SdVaBH::getDeleteTime, new Date());
|
wrapper.set(SdVaBH::getDeleteTime, new Date());
|
||||||
if (this.update(wrapper)) {
|
if (this.update(wrapper)) {
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,6 +12,7 @@ import com.yfd.platform.utils.CodeToNameMetadataBo;
|
|||||||
import com.yfd.platform.utils.DataSourceRequestUtil;
|
import com.yfd.platform.utils.DataSourceRequestUtil;
|
||||||
import com.yfd.platform.utils.DictCodeToNameConverter;
|
import com.yfd.platform.utils.DictCodeToNameConverter;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
import org.checkerframework.checker.units.qual.C;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@ -72,7 +73,8 @@ public class SdVdinfoBServiceImpl extends ServiceImpl<SdVdinfoBMapper, SdVdinfoB
|
|||||||
}
|
}
|
||||||
boolean result = this.save(entity);
|
boolean result = this.save(entity);
|
||||||
if (result) {
|
if (result) {
|
||||||
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source); }
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST); }
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,7 +84,9 @@ public class SdVdinfoBServiceImpl extends ServiceImpl<SdVdinfoBMapper, SdVdinfoB
|
|||||||
SdVdinfoB before = this.getById(entity.getStcd());
|
SdVdinfoB before = this.getById(entity.getStcd());
|
||||||
boolean result = this.updateById(entity);
|
boolean result = this.updateById(entity);
|
||||||
if (result && before != null) {
|
if (result && before != null) {
|
||||||
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, entity.getStcd(), "修改", source);
|
dictCodeToNameConverter.convertCodeToName(before, CODE_TO_NAME_META_LIST);
|
||||||
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, entity.getStcd(), "修改", source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -95,7 +99,8 @@ public class SdVdinfoBServiceImpl extends ServiceImpl<SdVdinfoBMapper, SdVdinfoB
|
|||||||
for (String stcd : stcds) {
|
for (String stcd : stcds) {
|
||||||
SdVdinfoB entity = this.getById(stcd);
|
SdVdinfoB entity = this.getById(stcd);
|
||||||
if (this.removeById(stcd)) {
|
if (this.removeById(stcd)) {
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source); count++;
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST); count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return count > 0;
|
return count > 0;
|
||||||
|
|||||||
@ -67,7 +67,8 @@ public class SdVpBHServiceImpl extends ServiceImpl<SdVpBHMapper, SdVpBH> impleme
|
|||||||
public boolean add(SdVpBH entity, String source) {
|
public boolean add(SdVpBH entity, String source) {
|
||||||
boolean result = this.save(entity);
|
boolean result = this.save(entity);
|
||||||
if (result) {
|
if (result) {
|
||||||
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source); }
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST); }
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,7 +78,9 @@ public class SdVpBHServiceImpl extends ServiceImpl<SdVpBHMapper, SdVpBH> impleme
|
|||||||
SdVpBH before = this.getById(entity.getStcd());
|
SdVpBH before = this.getById(entity.getStcd());
|
||||||
boolean result = this.updateById(entity);
|
boolean result = this.updateById(entity);
|
||||||
if (result && before != null) {
|
if (result && before != null) {
|
||||||
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
dictCodeToNameConverter.convertCodeToName(before, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -95,7 +98,8 @@ public class SdVpBHServiceImpl extends ServiceImpl<SdVpBHMapper, SdVpBH> impleme
|
|||||||
wrapper.set(SdVpBH::getDeleteUser, SecurityUtils.getCurrentUsername());
|
wrapper.set(SdVpBH::getDeleteUser, SecurityUtils.getCurrentUsername());
|
||||||
wrapper.set(SdVpBH::getDeleteTime, new Date());
|
wrapper.set(SdVpBH::getDeleteTime, new Date());
|
||||||
if (this.update(wrapper)) {
|
if (this.update(wrapper)) {
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source); count++;
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source,CODE_TO_NAME_META_LIST); count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return count > 0;
|
return count > 0;
|
||||||
|
|||||||
@ -68,7 +68,9 @@ public class SdWeBHServiceImpl extends ServiceImpl<SdWeBHMapper, SdWeBH> impleme
|
|||||||
public boolean add(SdWeBH entity, String source) {
|
public boolean add(SdWeBH entity, String source) {
|
||||||
boolean result = this.save(entity);
|
boolean result = this.save(entity);
|
||||||
if (result) {
|
if (result) {
|
||||||
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source); }
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordAddDetailLog(entity.getStcd(), TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,7 +80,9 @@ public class SdWeBHServiceImpl extends ServiceImpl<SdWeBHMapper, SdWeBH> impleme
|
|||||||
SdWeBH before = this.getById(entity.getStcd());
|
SdWeBH before = this.getById(entity.getStcd());
|
||||||
boolean result = this.updateById(entity);
|
boolean result = this.updateById(entity);
|
||||||
if (result && before != null) {
|
if (result && before != null) {
|
||||||
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source);
|
dictCodeToNameConverter.convertCodeToName(before, CODE_TO_NAME_META_LIST);
|
||||||
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordModifyDetailLog(entity.getStcd(), TABLE_NAME, before, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -90,8 +94,10 @@ public class SdWeBHServiceImpl extends ServiceImpl<SdWeBHMapper, SdWeBH> impleme
|
|||||||
int count = 0;
|
int count = 0;
|
||||||
for (String stcd : stcds) {
|
for (String stcd : stcds) {
|
||||||
SdWeBH entity = this.getById(stcd);
|
SdWeBH entity = this.getById(stcd);
|
||||||
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
if (this.removeById(stcd)) {
|
if (this.removeById(stcd)) {
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source); count++;
|
msOperationLogService.recordDeleteDetailLog(stcd, TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return count > 0;
|
return count > 0;
|
||||||
|
|||||||
@ -70,7 +70,8 @@ public class SdWqBHServiceImpl extends ServiceImpl<SdWqBHMapper, SdWqBH> impleme
|
|||||||
public boolean add(SdWqBH entity, String source) {
|
public boolean add(SdWqBH entity, String source) {
|
||||||
boolean result = this.save(entity);
|
boolean result = this.save(entity);
|
||||||
if (result) {
|
if (result) {
|
||||||
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source); }
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST); }
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,7 +81,9 @@ public class SdWqBHServiceImpl extends ServiceImpl<SdWqBHMapper, SdWqBH> impleme
|
|||||||
SdWqBH before = this.getById(entity.getStcd());
|
SdWqBH before = this.getById(entity.getStcd());
|
||||||
boolean result = this.updateById(entity);
|
boolean result = this.updateById(entity);
|
||||||
if (result && before != null) {
|
if (result && before != null) {
|
||||||
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source);
|
dictCodeToNameConverter.convertCodeToName(before, CODE_TO_NAME_META_LIST);
|
||||||
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -98,7 +101,8 @@ public class SdWqBHServiceImpl extends ServiceImpl<SdWqBHMapper, SdWqBH> impleme
|
|||||||
wrapper.set(SdWqBH::getDeleteUser, SecurityUtils.getCurrentUsername());
|
wrapper.set(SdWqBH::getDeleteUser, SecurityUtils.getCurrentUsername());
|
||||||
wrapper.set(SdWqBH::getDeleteTime, new Date());
|
wrapper.set(SdWqBH::getDeleteTime, new Date());
|
||||||
if (this.update(wrapper)) {
|
if (this.update(wrapper)) {
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source); count++;
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST); count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return count > 0;
|
return count > 0;
|
||||||
|
|||||||
@ -72,7 +72,8 @@ public class SdWtBHServiceImpl extends ServiceImpl<SdWtBHMapper, SdWtBH> impleme
|
|||||||
public boolean add(SdWtBH entity, String source) {
|
public boolean add(SdWtBH entity, String source) {
|
||||||
boolean result = this.save(entity);
|
boolean result = this.save(entity);
|
||||||
if (result) {
|
if (result) {
|
||||||
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordAddDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -83,7 +84,9 @@ public class SdWtBHServiceImpl extends ServiceImpl<SdWtBHMapper, SdWtBH> impleme
|
|||||||
SdWtBH before = this.getById(entity.getStcd());
|
SdWtBH before = this.getById(entity.getStcd());
|
||||||
boolean result = this.updateById(entity);
|
boolean result = this.updateById(entity);
|
||||||
if (result && before != null) {
|
if (result && before != null) {
|
||||||
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source);
|
dictCodeToNameConverter.convertCodeToName(before, CODE_TO_NAME_META_LIST);
|
||||||
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -101,7 +104,8 @@ public class SdWtBHServiceImpl extends ServiceImpl<SdWtBHMapper, SdWtBH> impleme
|
|||||||
wrapper.set(SdWtBH::getDeleteUser, SecurityUtils.getCurrentUsername());
|
wrapper.set(SdWtBH::getDeleteUser, SecurityUtils.getCurrentUsername());
|
||||||
wrapper.set(SdWtBH::getDeleteTime, new Date());
|
wrapper.set(SdWtBH::getDeleteTime, new Date());
|
||||||
if (this.update(wrapper)) {
|
if (this.update(wrapper)) {
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user