Commit 4c06bf58 authored by suhuiguang's avatar suhuiguang

feat(jg):更新null值调整

parent 952e537a
......@@ -7,7 +7,7 @@ import com.yeejoin.amos.boot.biz.common.annotation.ResultFieldMapping;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.CommonServiceImpl;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContraptionServiceImpl;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContraptionServiceImplService;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgProjectContraptionDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgInspectionDetectionInfo;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption;
......@@ -41,7 +41,7 @@ public class IdxBizJgProjectContraptionController extends BaseController {
public static final String USE_UNIT_CREDIT_CODE = "USE_UNIT_CREDIT_CODE";
public static final String USE_UNIT_NAME = "USE_UNIT_NAME";
@Autowired
IdxBizJgProjectContraptionServiceImpl idxBizJgProjectContraptionServiceImpl;
IdxBizJgProjectContraptionServiceImplService idxBizJgProjectContraptionServiceImpl;
/**
* 新增管道工程装置表
......@@ -56,20 +56,6 @@ public class IdxBizJgProjectContraptionController extends BaseController {
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新管道工程装置表", notes = "根据sequenceNbr更新管道工程装置表")
public ResponseModel<IdxBizJgProjectContraptionDto> updateBySequenceNbrIdxBizJgProjectContraption(@RequestBody IdxBizJgProjectContraptionDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(idxBizJgProjectContraptionServiceImpl.updateWithModel(model));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
......@@ -254,7 +240,7 @@ public class IdxBizJgProjectContraptionController extends BaseController {
@ApiOperation(httpMethod = "GET",value = "管道工程装置表分页查询", notes = "管道工程装置表分页查询")
public ResponseModel<Page<IdxBizJgProjectContraptionDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
(value = "size") int size) {
Page<IdxBizJgProjectContraptionDto> page = new Page<IdxBizJgProjectContraptionDto>();
Page<IdxBizJgProjectContraption> page = new Page<IdxBizJgProjectContraption>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(idxBizJgProjectContraptionServiceImpl.queryForIdxBizJgProjectContraptionPage(page));
......
package com.yeejoin.amos.boot.module.jg.biz.core;
import cn.hutool.core.text.CharSequenceUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.TableInfo;
import com.baomidou.mybatisplus.core.metadata.TableInfoHelper;
import com.baomidou.mybatisplus.core.toolkit.Assert;
import com.baomidou.mybatisplus.core.toolkit.ReflectionKit;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import org.springframework.transaction.annotation.Transactional;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.util.List;
import java.util.Objects;
import static com.yeejoin.amos.boot.module.jg.biz.edit.utils.ReflectiveFieldAccessor.getAllFields;
public class BaseEntityService<M extends BaseMapper<T>, T extends BaseEntity> extends ServiceImpl<M, T> {
@Transactional(rollbackFor = Exception.class)
public boolean saveOrUpdateWithNull(T entity) {
if (null != entity) {
Class<?> cls = entity.getClass();
TableInfo tableInfo = TableInfoHelper.getTableInfo(cls);
Assert.notNull(tableInfo, "error: can not execute. because can not find cache of TableInfo for entity!");
String keyProperty = tableInfo.getKeyProperty();
Assert.notEmpty(keyProperty, "error: can not execute. because can not find column for id from entity!");
Object idVal = ReflectionKit.getMethodValue(cls, entity, tableInfo.getKeyProperty());
return StringUtils.checkValNull(idVal) || Objects.isNull(getById((Serializable) idVal)) ? save(entity) : updateById(entity);
}
return false;
}
@Override
public boolean updateById(T entity) {
UpdateWrapper<T> wrapper = new UpdateWrapper<>();
// 递归获取所有字段(包括父类)
List<Field> allFields = getAllFields(entity.getClass());
// 动态设置非空字段到 SET 语句
allFields.stream().filter(field -> field.getAnnotation(TableField.class) != null && field.getAnnotation(TableField.class).exist()).forEach(field -> {
String columnName = getColumnName(field); // 获取字段名(处理 @TableField 注解)
wrapper.set(columnName, getFieldValue(field, entity));
});
// 设置主键条件(确保主键在父类也能获取)
String idColumn = getColumnName(getIdField(entity.getClass())); // 获取主键字段名
wrapper.eq(CharSequenceUtil.toUnderlineCase(idColumn).toUpperCase(), entity.getSequenceNbr());
return super.update(null, wrapper);
}
// 获取主键字段(含父类)
private Field getIdField(Class<?> clazz) {
for (Field field : getAllFields(clazz)) {
if (field.isAnnotationPresent(TableId.class)) { // 检查 @TableId 注解
return field;
}
}
// 默认尝试获取父类的 "id" 字段(适应 TzsBaseEntity)
try {
return clazz.getSuperclass().getDeclaredField("id");
} catch (NoSuchFieldException e) {
throw new RuntimeException("未找到主键字段", e);
}
}
// 获取字段名(支持 @TableField 注解)
private String getColumnName(Field field) {
TableField tableField = field.getAnnotation(TableField.class);
if (tableField != null && !tableField.value().isEmpty()) {
return tableField.value(); // 使用注解指定的列名
}
return StringUtils.camelToUnderline(field.getName()); // 驼峰转下划线
}
// 安全获取字段值
private Object getFieldValue(Field field, Object obj) {
try {
field.setAccessible(true);
return field.get(obj);
} catch (IllegalAccessException e) {
throw new RuntimeException("获取字段值失败", e);
}
}
}
package com.yeejoin.amos.boot.module.jg.biz.core;
import cn.hutool.core.text.CharSequenceUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.TableInfo;
import com.baomidou.mybatisplus.core.metadata.TableInfoHelper;
import com.baomidou.mybatisplus.core.toolkit.Assert;
import com.baomidou.mybatisplus.core.toolkit.ReflectionKit;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity;
import org.springframework.transaction.annotation.Transactional;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.util.List;
import java.util.Objects;
import static com.yeejoin.amos.boot.module.jg.biz.edit.utils.ReflectiveFieldAccessor.getAllFields;
public class BaseService<M extends BaseMapper<T>, T extends TzsBaseEntity> extends ServiceImpl<M, T> {
@Transactional(rollbackFor = Exception.class)
public boolean saveOrUpdateWithNull(T entity) {
if (null != entity) {
Class<?> cls = entity.getClass();
TableInfo tableInfo = TableInfoHelper.getTableInfo(cls);
Assert.notNull(tableInfo, "error: can not execute. because can not find cache of TableInfo for entity!");
String keyProperty = tableInfo.getKeyProperty();
Assert.notEmpty(keyProperty, "error: can not execute. because can not find column for id from entity!");
Object idVal = ReflectionKit.getMethodValue(cls, entity, tableInfo.getKeyProperty());
return StringUtils.checkValNull(idVal) || Objects.isNull(getById((Serializable) idVal)) ? save(entity) : updateById(entity);
}
return false;
}
@Override
public boolean updateById(T entity) {
UpdateWrapper<T> wrapper = new UpdateWrapper<>();
// 递归获取所有字段(包括父类)
List<Field> allFields = getAllFields(entity.getClass());
// 动态设置非空字段到 SET 语句
allFields.stream().filter(field -> field.getAnnotation(TableField.class) != null && field.getAnnotation(TableField.class).exist()).forEach(field -> {
String columnName = getColumnName(field); // 获取字段名(处理 @TableField 注解)
wrapper.set(columnName, getFieldValue(field, entity));
});
// 设置主键条件(确保主键在父类也能获取)
String idColumn = getColumnName(getIdField(entity.getClass())); // 获取主键字段名
wrapper.eq(CharSequenceUtil.toUnderlineCase(idColumn).toUpperCase(), entity.getSequenceNbr());
return super.update(null, wrapper);
}
// 获取主键字段(含父类)
private Field getIdField(Class<?> clazz) {
for (Field field : getAllFields(clazz)) {
if (field.isAnnotationPresent(TableId.class)) { // 检查 @TableId 注解
return field;
}
}
// 默认尝试获取父类的 "id" 字段(适应 TzsBaseEntity)
try {
return clazz.getSuperclass().getDeclaredField("id");
} catch (NoSuchFieldException e) {
throw new RuntimeException("未找到主键字段", e);
}
}
// 获取字段名(支持 @TableField 注解)
private String getColumnName(Field field) {
TableField tableField = field.getAnnotation(TableField.class);
if (tableField != null && !tableField.value().isEmpty()) {
return tableField.value(); // 使用注解指定的列名
}
return StringUtils.camelToUnderline(field.getName()); // 驼峰转下划线
}
// 安全获取字段值
private Object getFieldValue(Field field, Object obj) {
try {
field.setAccessible(true);
return field.get(obj);
} catch (IllegalAccessException e) {
throw new RuntimeException("获取字段值失败", e);
}
}
}
......@@ -10,7 +10,7 @@ import com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNoticeEq;
import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationManage;
import com.yeejoin.amos.boot.module.jg.biz.edit.constant.ChangeFieldWatchConstants;
import com.yeejoin.amos.boot.module.jg.biz.edit.event.BaseBizDataChangeEvent;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContraptionServiceImpl;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContraptionServiceImplService;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgInstallationNoticeEqServiceImpl;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgInstallationNoticeServiceImpl;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationManageServiceImpl;
......@@ -49,7 +49,7 @@ public class ChangeEquipImpactCertListener {
private final JgUseRegistrationManageServiceImpl jgUseRegistrationManageService;
private final JgInstallationNoticeServiceImpl jgInstallationNoticeService;
private final IdxBizJgProjectContraptionServiceImpl jgProjectContraptionService;
private final IdxBizJgProjectContraptionServiceImplService jgProjectContraptionService;
private final JgInstallationNoticeEqServiceImpl jgInstallationNoticeEqService;
private final IdxBizJgUseInfoMapper useInfoMapper;
......
......@@ -72,8 +72,8 @@ import java.util.stream.Stream;
import static com.yeejoin.amos.boot.module.jg.biz.edit.core.SubClassFinder.getAllSubClasses;
import static com.yeejoin.amos.boot.module.jg.biz.edit.utils.ReflectiveFieldAccessor.getAllFields;
import static com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContraptionServiceImpl.PROJECT_CONTRAPTION;
import static com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContraptionServiceImpl.PROJECT_CONTRAPTION_NO;
import static com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContraptionServiceImplService.PROJECT_CONTRAPTION;
import static com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContraptionServiceImplService.PROJECT_CONTRAPTION_NO;
import static com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgRegisterInfoServiceImpl.*;
import static com.yeejoin.amos.boot.module.jg.biz.service.impl.JgCertificateReplenishServiceImpl.SEQUENCE_NBR;
......@@ -117,7 +117,7 @@ public class CommonEquipDataProcessService {
private final RestHighLevelClient restHighLevelClient;
private final IdxBizJgProjectContraptionServiceImpl idxBizJgProjectContraptionServiceImpl;
private final IdxBizJgProjectContraptionServiceImplService idxBizJgProjectContraptionServiceImpl;
private final JgUseRegistrationServiceImpl jgUseRegistrationService;
......@@ -941,7 +941,7 @@ public class CommonEquipDataProcessService {
public Map<String, Object> getProjectDetailBySeq(String projectContraptionId, Set<String> records, Boolean aBoolean, List<PipelineChangeItemDto> oldJsonData) {
IdxBizJgProjectContraption projectContraption = idxBizJgProjectContraptionServiceImpl.getById(projectContraptionId);
Map<String, Object> re = BeanUtil.beanToMap(projectContraption);
this.convertStringToJsonObject(re, IdxBizJgProjectContraptionServiceImpl.getJsonFieldsCamel());
this.convertStringToJsonObject(re, IdxBizJgProjectContraptionServiceImplService.getJsonFieldsCamel());
if (!aBoolean) { // 实时查询逻辑
List<Map<String, Object>> equList = jgUseRegistrationService.getBaseMapper().queryForUnitPipelineEquipmentForEdit(new ArrayList<>(records));
// 检验报告数据格式化 转json
......
......@@ -14,7 +14,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.*;
import com.yeejoin.amos.boot.module.jg.biz.edit.constant.EditConstant;
import com.yeejoin.amos.boot.module.jg.biz.edit.typeHandler.CbDataDictTypeHandler;
import com.yeejoin.amos.boot.module.jg.biz.edit.typeHandler.PieLineLevelTypeHandler;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContraptionServiceImpl;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContraptionServiceImplService;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgSupervisionInfoServiceImpl;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgTechParamsPipelineServiceImpl;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgUseInfoServiceImpl;
......@@ -56,7 +56,7 @@ public class PieLineDataChangeServiceImpl {
private final SnowflakeIdUtil idUtil;
private final IdxBizJgProjectContraptionServiceImpl idxBizJgProjectContraptionServiceImpl;
private final IdxBizJgProjectContraptionServiceImplService idxBizJgProjectContraptionServiceImpl;
private final EquipChangeDataUpdateServiceImpl equipChangeDataUpdateServiceImpl;
......
package com.yeejoin.amos.boot.module.jg.biz.reminder.biz.editProject;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContraptionServiceImpl;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContraptionServiceImplService;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgTechParamsPipelineServiceImpl;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationServiceImpl;
import lombok.Getter;
......@@ -11,7 +11,7 @@ import org.springframework.stereotype.Component;
@RequiredArgsConstructor
@Getter
public class EditProjectParseService {
private final IdxBizJgProjectContraptionServiceImpl idxBizJgProjectContraptionServiceImpl;
private final IdxBizJgProjectContraptionServiceImplService idxBizJgProjectContraptionServiceImpl;
private final IdxBizJgTechParamsPipelineServiceImpl idxBizJgTechParamsPipelineService;
......
package com.yeejoin.amos.boot.module.jg.biz.reminder.biz.newProject;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContraptionServiceImpl;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContraptionServiceImplService;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgTechParamsPipelineServiceImpl;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationServiceImpl;
import lombok.Getter;
......@@ -11,7 +11,7 @@ import org.springframework.stereotype.Component;
@RequiredArgsConstructor
@Getter
public class NewProjectParseService {
private final IdxBizJgProjectContraptionServiceImpl idxBizJgProjectContraptionServiceImpl;
private final IdxBizJgProjectContraptionServiceImplService idxBizJgProjectContraptionServiceImpl;
private final IdxBizJgTechParamsPipelineServiceImpl idxBizJgTechParamsPipelineService;
......
......@@ -4,7 +4,7 @@ import com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationEqMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper;
import com.yeejoin.amos.boot.module.jg.biz.reminder.service.CommonReminderService;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.CommonServiceImpl;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContraptionServiceImpl;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContraptionServiceImplService;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgUseInfoMapper;
import lombok.Getter;
......@@ -18,7 +18,7 @@ import java.util.Map;
@Getter
public class UseRegisterReminderParse {
private final IdxBizJgProjectContraptionServiceImpl idxBizJgProjectContraptionServiceImpl;
private final IdxBizJgProjectContraptionServiceImplService idxBizJgProjectContraptionServiceImpl;
private final JgUseRegistrationMapper jgUseRegistrationMapper;
......
......@@ -9,7 +9,7 @@ import com.yeejoin.amos.boot.module.jg.biz.reminder.core.event.EquipCreateOrEdit
import com.yeejoin.amos.boot.module.jg.biz.reminder.core.event.service.IQualityScoreUpdate;
import com.yeejoin.amos.boot.module.jg.biz.reminder.dto.MatchItemDto;
import com.yeejoin.amos.boot.module.jg.biz.reminder.service.CommonReminderService;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContraptionServiceImpl;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContraptionServiceImplService;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption;
import lombok.RequiredArgsConstructor;
import org.apache.commons.lang3.StringUtils;
......@@ -28,7 +28,7 @@ public class ProjectQualityScoreUpdateService implements IQualityScoreUpdate {
private final GradeStrategyFactory gradeStrategyFactory;
private final IdxBizJgProjectContraptionServiceImpl idxBizJgProjectContraptionService;
private final IdxBizJgProjectContraptionServiceImplService idxBizJgProjectContraptionService;
@Value("${grade.calculation.strategy:MAX_GRADE}")
private String activeStrategy;
......
......@@ -9,8 +9,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity;
import com.yeejoin.amos.boot.module.jg.api.dto.ReminderItemDto;
import com.yeejoin.amos.boot.module.jg.biz.reminder.dto.MatchItemDto;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContraptionServiceImpl;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgRegisterInfoServiceImpl;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContraptionServiceImplService;
import com.yeejoin.amos.boot.module.ymt.api.entity.*;
import com.yeejoin.amos.boot.module.ymt.api.mapper.*;
import lombok.RequiredArgsConstructor;
......@@ -83,12 +82,12 @@ public class CommonReminderService {
matchItemDto.setEquDefine(registerInfo.getEquDefine());
}
public static IPage<ReminderItemDto> setProjectReminderItemPage(String bizId, Page<ReminderItemDto> page, IdxBizJgProjectContraptionServiceImpl idxBizJgProjectContraptionServiceImpl) {
public static IPage<ReminderItemDto> setProjectReminderItemPage(String bizId, Page<ReminderItemDto> page, IdxBizJgProjectContraptionServiceImplService idxBizJgProjectContraptionServiceImpl) {
IdxBizJgProjectContraption projectContraption = idxBizJgProjectContraptionServiceImpl.getById(bizId);
return setProjectReminderItemPageJson(bizId, page, projectContraption);
}
public static List<ReminderItemDto> setProjectReminderItemRealTime(String bizId, IdxBizJgProjectContraptionServiceImpl idxBizJgProjectContraptionServiceImpl) {
public static List<ReminderItemDto> setProjectReminderItemRealTime(String bizId, IdxBizJgProjectContraptionServiceImplService idxBizJgProjectContraptionServiceImpl) {
IdxBizJgProjectContraption projectContraption = idxBizJgProjectContraptionServiceImpl.getById(bizId);
ReminderItemDto reminderItemDto = new ReminderItemDto();
reminderItemDto.setEquipId(bizId);
......
......@@ -107,7 +107,7 @@ public class DataDockServiceImpl {
private final IIdxBizJgTechParamsRidesService iIdxBizJgTechParamsRidesService;
private final IIdxBizJgTechParamsRopewayService iIdxBizJgTechParamsRopewayService;
private final IIdxBizJgTechParamsElevatorService iIdxBizJgTechParamsElevatorService;
private final IdxBizJgProjectContraptionServiceImpl idxBizJgProjectContraptionServiceImpl;
private final IdxBizJgProjectContraptionServiceImplService idxBizJgProjectContraptionServiceImpl;
private final IdxBizJgConstructionInfoServiceImpl idxBizJgConstructionInfoService;
private final JgInstallationNoticeServiceImpl installationNoticeService;
private final TzBaseEnterpriseInfoMapper tzBaseEnterpriseInfoMapper;
......
......@@ -75,7 +75,7 @@ public class DataHandlerServiceImpl {
private final JgInstallationNoticeEqServiceImpl installationNoticeEqService;
private final IdxBizJgUseInfoServiceImpl useInfoService;
private final SnowflakeIdUtil sequence;
private final IdxBizJgProjectContraptionServiceImpl projectContraptionService;
private final IdxBizJgProjectContraptionServiceImplService projectContraptionService;
private final IdxBizJgProjectConstructionMapper projectConstructionMapper;
private final IdxBizJgTechParamsPipelineServiceImpl techParamsPipelineService;
private final EquipmentCategoryMapper equipmentCategoryMapper;
......
......@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity;
import com.yeejoin.amos.boot.module.jg.biz.core.BaseService;
import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgConstructionInfoService;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgConstructionInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgConstructionInfo;
......@@ -9,7 +10,6 @@ import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgConstructionInfoMappe
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.List;
......@@ -20,10 +20,10 @@ import java.util.List;
* @date 2023-08-17
*/
@Service
public class IdxBizJgConstructionInfoServiceImpl extends BaseService<IdxBizJgConstructionInfoDto,IdxBizJgConstructionInfo,IdxBizJgConstructionInfoMapper> implements IIdxBizJgConstructionInfoService {
public class IdxBizJgConstructionInfoServiceImpl extends BaseService<IdxBizJgConstructionInfoMapper, IdxBizJgConstructionInfo> implements IIdxBizJgConstructionInfoService {
public boolean saveOrUpdateData(IdxBizJgConstructionInfo constructionInfo){
return this.saveOrUpdate(constructionInfo);
return super.saveOrUpdateWithNull(constructionInfo);
}
@Override
......
package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.module.jg.biz.core.BaseService;
import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgDesignInfoService;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgDesignInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgDesignInfo;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgDesignInfoMapper;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
......@@ -21,10 +20,10 @@ import java.util.stream.Collectors;
* @date 2023-08-17
*/
@Service
public class IdxBizJgDesignInfoServiceImpl extends BaseService<IdxBizJgDesignInfoDto, IdxBizJgDesignInfo, IdxBizJgDesignInfoMapper> implements IIdxBizJgDesignInfoService {
public class IdxBizJgDesignInfoServiceImpl extends BaseService<IdxBizJgDesignInfoMapper, IdxBizJgDesignInfo> implements IIdxBizJgDesignInfoService {
public boolean saveOrUpdateData(IdxBizJgDesignInfo designInfo) {
return this.saveOrUpdate(designInfo);
return super.saveOrUpdateWithNull(designInfo);
}
@Override
......
package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.module.jg.biz.core.BaseService;
import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgFactoryInfoService;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgFactoryInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgFactoryInfo;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgFactoryInfoMapper;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.List;
......@@ -17,10 +16,10 @@ import java.util.List;
* @date 2023-08-17
*/
@Service
public class IdxBizJgFactoryInfoServiceImpl extends BaseService<IdxBizJgFactoryInfoDto,IdxBizJgFactoryInfo,IdxBizJgFactoryInfoMapper> implements IIdxBizJgFactoryInfoService {
public class IdxBizJgFactoryInfoServiceImpl extends BaseService<IdxBizJgFactoryInfoMapper, IdxBizJgFactoryInfo> implements IIdxBizJgFactoryInfoService {
public boolean saveOrUpdateData(IdxBizJgFactoryInfo factoryInfo){
return this.saveOrUpdate(factoryInfo);
public boolean saveOrUpdateData(IdxBizJgFactoryInfo factoryInfo) {
return super.saveOrUpdateWithNull(factoryInfo);
}
@Override
......
package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.module.jg.biz.core.BaseService;
import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgInspectionDetectionInfoService;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgInspectionDetectionInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgInspectionDetectionInfo;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgInspectionDetectionInfoMapper;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.ArrayList;
import java.util.List;
......@@ -21,10 +20,10 @@ import java.util.stream.Collectors;
* @date 2023-08-17
*/
@Service
public class IdxBizJgInspectionDetectionInfoServiceImpl extends BaseService<IdxBizJgInspectionDetectionInfoDto, IdxBizJgInspectionDetectionInfo, IdxBizJgInspectionDetectionInfoMapper> implements IIdxBizJgInspectionDetectionInfoService {
public class IdxBizJgInspectionDetectionInfoServiceImpl extends BaseService<IdxBizJgInspectionDetectionInfoMapper, IdxBizJgInspectionDetectionInfo> implements IIdxBizJgInspectionDetectionInfoService {
public boolean saveOrUpdateData(IdxBizJgInspectionDetectionInfo inspectionDetectionInfo) {
return this.saveOrUpdate(inspectionDetectionInfo);
return super.saveOrUpdateWithNull(inspectionDetectionInfo);
}
//查询最新的记录
......
package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.module.jg.biz.core.BaseService;
import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgMaintenanceRecordInfoService;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgMaintenanceRecordInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgMaintenanceRecordInfo;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgMaintenanceRecordInfoMapper;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.List;
/**
* 安全追溯-维保备案信息表服务实现类
......@@ -19,10 +14,10 @@ import java.util.List;
* @date 2023-08-17
*/
@Service
public class IdxBizJgMaintenanceRecordInfoServiceImpl extends BaseService<IdxBizJgMaintenanceRecordInfoDto,IdxBizJgMaintenanceRecordInfo,IdxBizJgMaintenanceRecordInfoMapper> implements IIdxBizJgMaintenanceRecordInfoService {
public class IdxBizJgMaintenanceRecordInfoServiceImpl extends BaseService<IdxBizJgMaintenanceRecordInfoMapper, IdxBizJgMaintenanceRecordInfo> implements IIdxBizJgMaintenanceRecordInfoService {
public boolean saveOrUpdateData(IdxBizJgMaintenanceRecordInfo maintenanceRecordInfo){
return this.saveOrUpdate(maintenanceRecordInfo);
public boolean saveOrUpdateData(IdxBizJgMaintenanceRecordInfo maintenanceRecordInfo) {
return super.saveOrUpdateWithNull(maintenanceRecordInfo);
}
/**
......@@ -31,10 +26,10 @@ public class IdxBizJgMaintenanceRecordInfoServiceImpl extends BaseService<IdxBiz
@Override
public IdxBizJgMaintenanceRecordInfo queryNewestDetailByRecord(String record) {
QueryWrapper<IdxBizJgMaintenanceRecordInfo> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(IdxBizJgMaintenanceRecordInfo::getRecord,record).orderByDesc(IdxBizJgMaintenanceRecordInfo::getRecDate).last("limit 1");
queryWrapper.lambda().eq(IdxBizJgMaintenanceRecordInfo::getRecord, record).orderByDesc(IdxBizJgMaintenanceRecordInfo::getRecDate).last("limit 1");
IdxBizJgMaintenanceRecordInfo init = new IdxBizJgMaintenanceRecordInfo();
IdxBizJgMaintenanceRecordInfo last = getOne(queryWrapper);
if(last != null){
if (last != null) {
init = last;
}
return init;
......
package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.module.jg.biz.core.BaseService;
import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgOtherInfoService;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgOtherInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgOtherInfo;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgOtherInfoMapper;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.List;
......@@ -17,10 +16,10 @@ import java.util.List;
* @date 2023-08-17
*/
@Service
public class IdxBizJgOtherInfoServiceImpl extends BaseService<IdxBizJgOtherInfoDto,IdxBizJgOtherInfo,IdxBizJgOtherInfoMapper> implements IIdxBizJgOtherInfoService {
public class IdxBizJgOtherInfoServiceImpl extends BaseService<IdxBizJgOtherInfoMapper, IdxBizJgOtherInfo> implements IIdxBizJgOtherInfoService {
public boolean saveOrUpdateData(IdxBizJgOtherInfo otherInfo){
return this.saveOrUpdate(otherInfo);
public boolean saveOrUpdateData(IdxBizJgOtherInfo otherInfo) {
return super.saveOrUpdateWithNull(otherInfo);
}
@Override
......
package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.text.CharSequenceUtil;
......@@ -25,6 +26,7 @@ import com.yeejoin.amos.boot.module.jg.api.enums.EquipSourceEnum;
import com.yeejoin.amos.boot.module.jg.api.enums.PipelineEnum;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgVehicleInformationMapper;
import com.yeejoin.amos.boot.module.jg.api.vo.SortVo;
import com.yeejoin.amos.boot.module.jg.biz.core.BaseEntityService;
import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgProjectContraptionService;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgProjectContraptionDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.*;
......@@ -44,7 +46,6 @@ import org.springframework.util.StringUtils;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import javax.annotation.Resource;
......@@ -73,7 +74,7 @@ import static com.alibaba.fastjson.JSON.toJSONString;
*/
@Slf4j
@Service
public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgProjectContraptionDto, IdxBizJgProjectContraption, IdxBizJgProjectContraptionMapper> implements IIdxBizJgProjectContraptionService {
public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityService<IdxBizJgProjectContraptionMapper, IdxBizJgProjectContraption> implements IIdxBizJgProjectContraptionService {
public static final String[] jsonFields = {"PRODUCT_PHOTO", "OTHER_ACCESSORIES", "PRODUCT_QUALIFICATION_CERTIFICATE", "START_LATITUDE_LONGITUDE",
"END_LATITUDE_LONGITUDE"};
......@@ -135,7 +136,7 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
@Override
public boolean saveOrUpdateData(IdxBizJgProjectContraption projectContraption) {
return this.saveOrUpdate(projectContraption);
return super.saveOrUpdateWithNull(projectContraption);
}
public static String[] getJsonFieldsCamel(){
......@@ -474,15 +475,27 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
/**
* 分页查询
*/
public Page<IdxBizJgProjectContraptionDto> queryForIdxBizJgProjectContraptionPage(Page<IdxBizJgProjectContraptionDto> page) {
return this.queryForPage(page, null, false);
public Page<IdxBizJgProjectContraptionDto> queryForIdxBizJgProjectContraptionPage(Page<IdxBizJgProjectContraption> page) {
IPage<IdxBizJgProjectContraption> tempPage = this.page(page, null);
Page<IdxBizJgProjectContraptionDto> res = new Page<>(page.getCurrent(),page.getSize());
res.setRecords(tempPage.getRecords().stream().map(p->{
IdxBizJgProjectContraptionDto dto = new IdxBizJgProjectContraptionDto();
BeanUtil.copyProperties(p, dto);
return dto;
}).collect(Collectors.toList()));
res.setTotal(tempPage.getTotal());
return res;
}
/**
* 列表查询 示例
*/
public List<IdxBizJgProjectContraptionDto> queryForIdxBizJgProjectContraptionList() {
return this.queryForList("", false);
return this.list().stream().map(p->{
IdxBizJgProjectContraptionDto dto = new IdxBizJgProjectContraptionDto();
BeanUtil.copyProperties(p, dto);
return dto;
}).collect(Collectors.toList());
}
public Map<String, Map<String, Object>> details(String sequenceNbr) {
......
......@@ -30,13 +30,13 @@ import com.yeejoin.amos.boot.module.jg.api.enums.*;
import com.yeejoin.amos.boot.module.jg.api.mapper.*;
import com.yeejoin.amos.boot.module.jg.biz.config.PressureVesselListener;
import com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext;
import com.yeejoin.amos.boot.module.jg.biz.core.BaseService;
import com.yeejoin.amos.boot.module.jg.biz.event.publisher.EventPublisher;
import com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient;
import com.yeejoin.amos.boot.module.jg.biz.reminder.core.event.EquipCreateOrEditEvent;
import com.yeejoin.amos.boot.module.jg.biz.service.*;
import com.yeejoin.amos.boot.module.jg.biz.utils.CodeUtil;
import com.yeejoin.amos.boot.module.jg.biz.utils.JsonUtils;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgRegisterInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.dto.TzsUserInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.*;
......@@ -78,7 +78,6 @@ import org.springframework.web.multipart.MultipartFile;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
......@@ -115,7 +114,7 @@ import static com.yeejoin.amos.boot.module.jg.api.enums.VehicleApanageEnum.XI_XI
*/
@Service
@Slf4j
public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegisterInfoDto, IdxBizJgRegisterInfo, IdxBizJgRegisterInfoMapper> implements IIdxBizJgRegisterInfoService {
public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegisterInfoMapper, IdxBizJgRegisterInfo> implements IIdxBizJgRegisterInfoService {
public final static String USE_TYPE_NAME = "使用单位";
public final static String INDIVIDUAL_TYPE_NAME = "个人主体";
public final static String MAINTENANCE_TYPE_NAME = "安装改造维修单位";
......@@ -302,7 +301,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
@Autowired
private TzsUserInfoMapper tzsUserInfoMapper;
@Autowired
private IdxBizJgProjectContraptionServiceImpl idxBizJgProjectContraptionService;
private IdxBizJgProjectContraptionServiceImplService idxBizJgProjectContraptionService;
@Value("classpath:/json/urlInfo.json")
private Resource urlInfo;
@Autowired
......
package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.module.jg.biz.core.BaseService;
import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgSupervisionInfoService;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgSupervisionInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgSupervisionInfo;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgSupervisionInfoMapper;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.List;
/**
......@@ -16,10 +15,10 @@ import java.util.List;
* @date 2023-08-17
*/
@Service
public class IdxBizJgSupervisionInfoServiceImpl extends BaseService<IdxBizJgSupervisionInfoDto,IdxBizJgSupervisionInfo,IdxBizJgSupervisionInfoMapper> implements IIdxBizJgSupervisionInfoService {
public class IdxBizJgSupervisionInfoServiceImpl extends BaseService<IdxBizJgSupervisionInfoMapper,IdxBizJgSupervisionInfo> implements IIdxBizJgSupervisionInfoService {
public boolean saveOrUpdateData(IdxBizJgSupervisionInfo supervisionInfo){
return this.saveOrUpdate(supervisionInfo);
return super.saveOrUpdateWithNull(supervisionInfo);
}
@Override
......
......@@ -2,12 +2,12 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jg.biz.core.BaseService;
import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgTechParamsBoilerService;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgTechParamsBoilerDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsBoiler;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgTechParamsBoilerMapper;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.List;
......@@ -18,29 +18,14 @@ import java.util.List;
* @date 2023-08-17
*/
@Service
public class IdxBizJgTechParamsBoilerServiceImpl extends BaseService<IdxBizJgTechParamsBoilerDto,IdxBizJgTechParamsBoiler,IdxBizJgTechParamsBoilerMapper> implements IIdxBizJgTechParamsBoilerService {
public class IdxBizJgTechParamsBoilerServiceImpl extends BaseService<IdxBizJgTechParamsBoilerMapper,IdxBizJgTechParamsBoiler> implements IIdxBizJgTechParamsBoilerService {
public void saveOrUpdateData(IdxBizJgTechParamsBoiler boiler) {
this.saveOrUpdate(boiler);
super.saveOrUpdateWithNull(boiler);
}
public IdxBizJgTechParamsBoiler getOneData(String record) {
return this.getOne(new QueryWrapper<IdxBizJgTechParamsBoiler>().eq("RECORD", record));
}
/**
* 分页查询
*/
public Page<IdxBizJgTechParamsBoilerDto> queryForIdxBizJgTechParamsBoilerPage(Page<IdxBizJgTechParamsBoilerDto> page) {
return this.queryForPage(page, null, false);
}
/**
* 列表查询 示例
*/
public List<IdxBizJgTechParamsBoilerDto> queryForIdxBizJgTechParamsBoilerList() {
return this.queryForList("" , false);
}
}
\ No newline at end of file
package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.module.jg.biz.core.BaseService;
import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgTechParamsElevatorService;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgTechParamsElevatorDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsElevator;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgTechParamsElevatorMapper;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
/**
* 安全追溯-电梯服务实现类
......@@ -15,10 +14,10 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
* @date 2023-08-17
*/
@Service
public class IdxBizJgTechParamsElevatorServiceImpl extends BaseService<IdxBizJgTechParamsElevatorDto,IdxBizJgTechParamsElevator,IdxBizJgTechParamsElevatorMapper> implements IIdxBizJgTechParamsElevatorService {
public class IdxBizJgTechParamsElevatorServiceImpl extends BaseService<IdxBizJgTechParamsElevatorMapper,IdxBizJgTechParamsElevator> implements IIdxBizJgTechParamsElevatorService {
public boolean saveOrUpdateData(IdxBizJgTechParamsElevator techParamsElevator){
return this.saveOrUpdate(techParamsElevator);
return super.saveOrUpdateWithNull(techParamsElevator);
}
@Override
......
package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jg.biz.core.BaseService;
import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgTechParamsLiftingService;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgTechParamsLiftingDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsLifting;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgTechParamsLiftingMapper;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.List;
/**
* 安全追溯-起重机械服务实现类
......@@ -18,28 +14,14 @@ import java.util.List;
* @date 2023-08-17
*/
@Service
public class IdxBizJgTechParamsLiftingServiceImpl extends BaseService<IdxBizJgTechParamsLiftingDto,IdxBizJgTechParamsLifting,IdxBizJgTechParamsLiftingMapper> implements IIdxBizJgTechParamsLiftingService {
public class IdxBizJgTechParamsLiftingServiceImpl extends BaseService<IdxBizJgTechParamsLiftingMapper, IdxBizJgTechParamsLifting> implements IIdxBizJgTechParamsLiftingService {
public void saveOrUpdateData(IdxBizJgTechParamsLifting lifting) {
this.saveOrUpdate(lifting);
super.saveOrUpdateWithNull(lifting);
}
public IdxBizJgTechParamsLifting getOneData(String record) {
return this.getOne(new QueryWrapper<IdxBizJgTechParamsLifting>().eq("RECORD", record));
}
/**
* 分页查询
*/
public Page<IdxBizJgTechParamsLiftingDto> queryForIdxBizJgTechParamsLiftingPage(Page<IdxBizJgTechParamsLiftingDto> page) {
return this.queryForPage(page, null, false);
}
/**
* 列表查询 示例
*/
public List<IdxBizJgTechParamsLiftingDto> queryForIdxBizJgTechParamsLiftingList() {
return this.queryForList("" , false);
}
}
\ No newline at end of file
package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jg.biz.core.BaseService;
import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgTechParamsPipelineService;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgTechParamsPipelineDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsPipeline;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsVessel;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgTechParamsPipelineMapper;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.List;
/**
* 安全追溯-压力管道服务实现类
......@@ -19,29 +14,13 @@ import java.util.List;
* @date 2023-08-17
*/
@Service
public class IdxBizJgTechParamsPipelineServiceImpl extends BaseService<IdxBizJgTechParamsPipelineDto,IdxBizJgTechParamsPipeline,IdxBizJgTechParamsPipelineMapper> implements IIdxBizJgTechParamsPipelineService {
public class IdxBizJgTechParamsPipelineServiceImpl extends BaseService<IdxBizJgTechParamsPipelineMapper, IdxBizJgTechParamsPipeline> implements IIdxBizJgTechParamsPipelineService {
public void saveOrUpdateData(IdxBizJgTechParamsPipeline pipeline) {
this.saveOrUpdate(pipeline);
super.saveOrUpdateWithNull(pipeline);
}
public IdxBizJgTechParamsPipeline getOneData(String record) {
return this.getOne(new QueryWrapper<IdxBizJgTechParamsPipeline>().eq("RECORD", record));
}
/**
* 分页查询
*/
public Page<IdxBizJgTechParamsPipelineDto> queryForIdxBizJgTechParamsPipelinePage(Page<IdxBizJgTechParamsPipelineDto> page) {
return this.queryForPage(page, null, false);
}
/**
* 列表查询 示例
*/
public List<IdxBizJgTechParamsPipelineDto> queryForIdxBizJgTechParamsPipelineList() {
return this.queryForList("" , false);
}
}
\ No newline at end of file
package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jg.biz.core.BaseService;
import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgTechParamsRidesService;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgTechParamsRidesDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsRides;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsRopeway;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgTechParamsRidesMapper;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.List;
/**
* 安全追溯-游乐设施服务实现类
......@@ -19,29 +14,13 @@ import java.util.List;
* @date 2023-08-17
*/
@Service
public class IdxBizJgTechParamsRidesServiceImpl extends BaseService<IdxBizJgTechParamsRidesDto,IdxBizJgTechParamsRides,IdxBizJgTechParamsRidesMapper> implements IIdxBizJgTechParamsRidesService {
public class IdxBizJgTechParamsRidesServiceImpl extends BaseService<IdxBizJgTechParamsRidesMapper, IdxBizJgTechParamsRides> implements IIdxBizJgTechParamsRidesService {
public void saveOrUpdateData(IdxBizJgTechParamsRides rides) {
this.saveOrUpdate(rides);
super.saveOrUpdateWithNull(rides);
}
public IdxBizJgTechParamsRides getOneData(String record) {
return this.getOne(new QueryWrapper<IdxBizJgTechParamsRides>().eq("RECORD", record));
}
/**
* 分页查询
*/
public Page<IdxBizJgTechParamsRidesDto> queryForIdxBizJgTechParamsRidesPage(Page<IdxBizJgTechParamsRidesDto> page) {
return this.queryForPage(page, null, false);
}
/**
* 列表查询 示例
*/
public List<IdxBizJgTechParamsRidesDto> queryForIdxBizJgTechParamsRidesList() {
return this.queryForList("" , false);
}
}
\ No newline at end of file
package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jg.biz.core.BaseService;
import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgTechParamsRopewayService;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgTechParamsRopewayDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsRopeway;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgTechParamsRopewayMapper;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.List;
/**
* 安全追溯-索道服务实现类
......@@ -18,29 +14,14 @@ import java.util.List;
* @date 2023-08-17
*/
@Service
public class IdxBizJgTechParamsRopewayServiceImpl extends BaseService<IdxBizJgTechParamsRopewayDto,IdxBizJgTechParamsRopeway,IdxBizJgTechParamsRopewayMapper> implements IIdxBizJgTechParamsRopewayService {
public class IdxBizJgTechParamsRopewayServiceImpl extends BaseService<IdxBizJgTechParamsRopewayMapper, IdxBizJgTechParamsRopeway> implements IIdxBizJgTechParamsRopewayService {
public void saveOrUpdateData(IdxBizJgTechParamsRopeway ropeway) {
this.saveOrUpdate(ropeway);
super.saveOrUpdateWithNull(ropeway);
}
public IdxBizJgTechParamsRopeway getOneData(String record) {
return this.getOne(new QueryWrapper<IdxBizJgTechParamsRopeway>().eq("RECORD", record));
}
/**
* 分页查询
*/
public Page<IdxBizJgTechParamsRopewayDto> queryForIdxBizJgTechParamsRopewayPage(Page<IdxBizJgTechParamsRopewayDto> page) {
return this.queryForPage(page, null, false);
}
/**
* 列表查询 示例
*/
public List<IdxBizJgTechParamsRopewayDto> queryForIdxBizJgTechParamsRopewayList() {
return this.queryForList("" , false);
}
}
\ No newline at end of file
......@@ -2,12 +2,12 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jg.biz.core.BaseService;
import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgTechParamsVehicleService;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgTechParamsVehicleDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsVehicle;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgTechParamsVehicleMapper;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.List;
......@@ -18,29 +18,13 @@ import java.util.List;
* @date 2023-08-17
*/
@Service
public class IdxBizJgTechParamsVehicleServiceImpl extends BaseService<IdxBizJgTechParamsVehicleDto,IdxBizJgTechParamsVehicle,IdxBizJgTechParamsVehicleMapper> implements IIdxBizJgTechParamsVehicleService {
public class IdxBizJgTechParamsVehicleServiceImpl extends BaseService<IdxBizJgTechParamsVehicleMapper,IdxBizJgTechParamsVehicle> implements IIdxBizJgTechParamsVehicleService {
public void saveOrUpdateData(IdxBizJgTechParamsVehicle vehicle) {
this.saveOrUpdate(vehicle);
super.saveOrUpdateWithNull(vehicle);
}
public IdxBizJgTechParamsVehicle getOneData(String record) {
return this.getOne(new QueryWrapper<IdxBizJgTechParamsVehicle>().eq("RECORD", record));
}
/**
* 分页查询
*/
public Page<IdxBizJgTechParamsVehicleDto> queryForIdxBizJgTechParamsVehiclePage(Page<IdxBizJgTechParamsVehicleDto> page) {
return this.queryForPage(page, null, false);
}
/**
* 列表查询 示例
*/
public List<IdxBizJgTechParamsVehicleDto> queryForIdxBizJgTechParamsVehicleList() {
return this.queryForList("" , false);
}
}
\ No newline at end of file
......@@ -2,12 +2,12 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jg.biz.core.BaseService;
import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgTechParamsVesselService;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgTechParamsVesselDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsVessel;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgTechParamsVesselMapper;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.List;
......@@ -18,10 +18,10 @@ import java.util.List;
* @date 2023-08-17
*/
@Service
public class IdxBizJgTechParamsVesselServiceImpl extends BaseService<IdxBizJgTechParamsVesselDto,IdxBizJgTechParamsVessel,IdxBizJgTechParamsVesselMapper> implements IIdxBizJgTechParamsVesselService {
public class IdxBizJgTechParamsVesselServiceImpl extends BaseService<IdxBizJgTechParamsVesselMapper,IdxBizJgTechParamsVessel> implements IIdxBizJgTechParamsVesselService {
public void saveOrUpdateData(IdxBizJgTechParamsVessel vessel) {
this.saveOrUpdate(vessel);
super.saveOrUpdateWithNull(vessel);
}
@Override
......@@ -29,19 +29,4 @@ public class IdxBizJgTechParamsVesselServiceImpl extends BaseService<IdxBizJgTec
return this.getOne(new QueryWrapper<IdxBizJgTechParamsVessel>().eq("RECORD", record));
}
/**
* 分页查询
*/
public Page<IdxBizJgTechParamsVesselDto> queryForIdxBizJgTechParamsVesselPage(Page<IdxBizJgTechParamsVesselDto> page) {
return this.queryForPage(page, null, false);
}
/**
* 列表查询 示例
*/
public List<IdxBizJgTechParamsVesselDto> queryForIdxBizJgTechParamsVesselList() {
return this.queryForList("" , false);
}
}
\ No newline at end of file
package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.module.jg.biz.core.BaseService;
import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgUseInfoService;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgUseInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgUseInfoMapper;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.List;
......@@ -17,10 +17,10 @@ import java.util.List;
* @date 2023-08-16
*/
@Service
public class IdxBizJgUseInfoServiceImpl extends BaseService<IdxBizJgUseInfoDto,IdxBizJgUseInfo,IdxBizJgUseInfoMapper> implements IIdxBizJgUseInfoService {
public class IdxBizJgUseInfoServiceImpl extends BaseService<IdxBizJgUseInfoMapper, IdxBizJgUseInfo> implements IIdxBizJgUseInfoService {
public boolean saveOrUpdateData(IdxBizJgUseInfo useInfo){
return this.saveOrUpdate(useInfo);
return super.saveOrUpdateWithNull(useInfo);
}
@Override
......
......@@ -175,7 +175,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
private SnowflakeIdUtil sequence;
@Resource
IdxBizJgProjectContraptionServiceImpl jgProjectContraptionService;
IdxBizJgProjectContraptionServiceImplService jgProjectContraptionService;
@Autowired
private JgChangeRegistrationReformEqServiceImpl jgChangeRegistrationReformEqServiceImpl;
......
......@@ -184,7 +184,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
@Autowired
private TzBaseEnterpriseInfoMapper tzBaseEnterpriseInfoMapper;
@Autowired
private IdxBizJgProjectContraptionServiceImpl projectContraptionService;
private IdxBizJgProjectContraptionServiceImplService projectContraptionService;
/**
* 根据sequenceNbr查询:1、查询单位变更信息,2、查询使用登记证列表
......
......@@ -97,7 +97,7 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
private final CmWorkflowServiceImpl cmWorkflowService;
private final IJgInstallationNoticeService jrmInstallationNoticeService;
private final IIdxBizJgRegisterInfoService idxBizJgRegisterInfoService;
private final IdxBizJgProjectContraptionServiceImpl jgProjectContraptionService;
private final IdxBizJgProjectContraptionServiceImplService jgProjectContraptionService;
@Lazy
private final CommonServiceImpl commonService;
......
......@@ -185,7 +185,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
@Autowired
private IdxBizJgFactoryInfoServiceImpl idxBizJgFactoryInfoService;
@Autowired
private IdxBizJgProjectContraptionServiceImpl projectContraptionService;
private IdxBizJgProjectContraptionServiceImplService projectContraptionService;
@Autowired
private ObjectMapper objectMapper;
......
......@@ -632,7 +632,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
private JSONObject getNowPipJsonData(String projectContraptionId) {
return new JSONObject(Optional.ofNullable(idxBizJgProjectContraptionMapper.getDetail(projectContraptionId))
.map(map -> {
commonService.convertStringToJsonobject(map, IdxBizJgProjectContraptionServiceImpl.jsonFields);
commonService.convertStringToJsonobject(map, IdxBizJgProjectContraptionServiceImplService.jsonFields);
map.put(DEVICE_LIST, idxBizJgProjectContraptionMapper.selectEquipList((String) map.get(SEQUENCE_NBR)));
return map;
})
......
......@@ -9,7 +9,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.biz.common.excel.ExcelUtil;
import com.yeejoin.amos.boot.biz.common.utils.RequestContextWrapper;
......@@ -22,12 +21,10 @@ import com.yeejoin.amos.boot.module.jg.biz.feign.JczsServiceFeignClient;
import com.yeejoin.amos.boot.module.jg.biz.feign.TcmServiceFeignClient;
import com.yeejoin.amos.boot.module.jg.biz.service.IJgTableDataExportService;
import com.yeejoin.amos.boot.module.jg.biz.utils.DictUtil;
import com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption;
import com.yeejoin.amos.boot.module.ymt.api.mapper.TzBaseEnterpriseInfoMapper;
import com.yeejoin.amos.boot.module.ymt.api.mapper.TzsUserInfoMapper;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.systemctl.Systemctl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -99,7 +96,7 @@ public class JgTableDataExportServiceImpl implements IJgTableDataExportService {
@Autowired
JgUseRegistrationManageServiceImpl jgUseRegistrationManageServiceImpl;
@Autowired
IdxBizJgProjectContraptionServiceImpl idxBizJgProjectContraptionService;
IdxBizJgProjectContraptionServiceImplService idxBizJgProjectContraptionService;
@Autowired
JczsServiceFeignClient jczsServiceFeignClient;
@Autowired
......
......@@ -47,7 +47,6 @@ import com.yeejoin.amos.boot.module.jg.biz.edit.permission.FillingEditPermForCur
import com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.useRegister.UseRegisterBackupManager;
import com.yeejoin.amos.boot.module.jg.biz.edit.typeHandler.PieLineLevelTypeHandler;
import com.yeejoin.amos.boot.module.jg.biz.event.CancellationAndGradeEvent;
import com.yeejoin.amos.boot.module.jg.biz.event.CancellationEvent;
import com.yeejoin.amos.boot.module.jg.biz.event.publisher.EventPublisher;
import com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient;
import com.yeejoin.amos.boot.module.jg.biz.feign.WorkFlowFeignService;
......@@ -242,7 +241,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
SupervisoryCodeInfoMapper supervisoryCodeInfoMapper;
@Autowired
IdxBizJgProjectContraptionServiceImpl jgProjectContraptionService;
IdxBizJgProjectContraptionServiceImplService jgProjectContraptionService;
@Autowired
IdxBizJgProjectConstructionMapper idxBizJgProjectConstructionMapper;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment