mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
新增-每个排单都保存对应的方案组信息,增加修改排单方案组配置接口,创建组织复制系统配置信息,增加打印标签查询小板信息接口
This commit is contained in:
+63
-29
@@ -16,14 +16,9 @@ import com.cf.imes.module.system.dal.dataobject.systemconfig.SystemConfigDO;
|
||||
import com.cf.imes.module.system.dal.dataobject.systemconfig.SystemConfigDataDO;
|
||||
import com.cf.imes.module.system.dal.dataobject.systemconfig.SystemConfigProcessDO;
|
||||
import com.cf.imes.module.system.dal.dataobject.systemconfig.SystemConfigSchemeDO;
|
||||
import com.cf.imes.module.system.dal.dataobject.systemconfig.SystemConfigSealedgeDO;
|
||||
import com.cf.imes.module.system.dal.mysql.label.LabelMapper;
|
||||
import com.cf.imes.module.system.dal.mysql.machine.MachineMapper;
|
||||
import com.cf.imes.module.system.dal.mysql.systemconfig.SystemConfigDataMapper;
|
||||
import com.cf.imes.module.system.dal.mysql.systemconfig.SystemConfigMapper;
|
||||
import com.cf.imes.module.system.dal.mysql.systemconfig.SystemConfigProcessMapper;
|
||||
import com.cf.imes.module.system.dal.mysql.systemconfig.SystemConfigSchemeMapper;
|
||||
import com.cf.imes.module.system.dal.mysql.systemconfig.SystemConfigSealedgeMapper;
|
||||
import com.cf.imes.module.system.dal.mysql.systemconfig.*;
|
||||
import com.cf.imes.module.system.enums.config.SystemConfigTypeEnum;
|
||||
import com.cf.imes.module.system.service.systemconfig.SystemConfigService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -151,6 +146,8 @@ public class SystemConfigApiImpl implements SystemConfigApi {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public CommonResult<List<ProcessSchemeDTO>> getProcessById(Long processId) {
|
||||
|
||||
@@ -169,19 +166,71 @@ public class SystemConfigApiImpl implements SystemConfigApi {
|
||||
throw exception(SYSTEM_PROCESS_SCHEME_CONFIG_FIELD_ERROR);
|
||||
}
|
||||
|
||||
|
||||
List<ProcessSchemeDTO> schemeDTOS = BeanUtils.toBean(processSchemeConfigs, ProcessSchemeDTO.class);
|
||||
|
||||
return success(getProcessSchemeConfig(schemeDTOS));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public CommonResult<List<ProcessSchemeDTO>> getPlanProcessSchemeConfig(List<ProcessSchemeDTO> schemeDTOList) {
|
||||
|
||||
return success(getProcessSchemeConfig(schemeDTOList));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public CommonResult<List<ProcessSchemeDTO>> getProcessSchemeConfig(Long processId) {
|
||||
|
||||
SystemConfigSchemeDO systemConfigSchemeDO = systemConfigSchemeMapper.selectById(processId);
|
||||
|
||||
AssertUtils.notEmpty(systemConfigSchemeDO,THIS_PROCESS_CONFIG_DATA_ERROR);
|
||||
|
||||
List<ProcessSchemeConfig> processSchemeConfigs;
|
||||
|
||||
try {
|
||||
|
||||
processSchemeConfigs = parseArray(systemConfigSchemeDO.getSetting(), ProcessSchemeConfig.class);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
throw exception(SYSTEM_PROCESS_SCHEME_CONFIG_FIELD_ERROR);
|
||||
}
|
||||
|
||||
return success(BeanUtils.toBean(processSchemeConfigs,ProcessSchemeDTO.class));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void checkValueIsNotEmpty(List<?> value,String error) {
|
||||
|
||||
if(ObjectUtils.isEmpty(value)){
|
||||
throw exception(SYSTEM_PROCESS_SCHEME_CONFIG_DATA_ERROR,error);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private List<ProcessSchemeDTO> getProcessSchemeConfig(List<ProcessSchemeDTO> schemeDTOS){
|
||||
|
||||
// 配置ID查询和数据校验
|
||||
List<String> processLineConfigIds = processSchemeConfigs.stream().map(ProcessSchemeConfig::getProcessLineConfig).distinct().toList();
|
||||
List<Long> processLineConfigIds = schemeDTOS.stream().map(ProcessSchemeDTO::getProcessLineConfig).distinct().toList();
|
||||
|
||||
checkValueIsNotEmpty(processLineConfigIds,"加工分线");
|
||||
|
||||
List<String> optimizationConfigIds = processSchemeConfigs.stream().map(ProcessSchemeConfig::getOptimizationConfig).distinct().toList();
|
||||
List<Long> optimizationConfigIds = schemeDTOS.stream().map(ProcessSchemeDTO::getOptimizationConfig).distinct().toList();
|
||||
|
||||
checkValueIsNotEmpty(optimizationConfigIds,"优化数据配置");
|
||||
|
||||
List<String> analyzerIds = processSchemeConfigs.stream().map(ProcessSchemeConfig::getAnalyzer).distinct().toList();
|
||||
List<Long> analyzerIds = schemeDTOS.stream().map(ProcessSchemeDTO::getAnalyzer).distinct().toList();
|
||||
|
||||
checkValueIsNotEmpty(analyzerIds,"解析器");
|
||||
|
||||
@@ -267,28 +316,13 @@ public class SystemConfigApiImpl implements SystemConfigApi {
|
||||
});
|
||||
|
||||
|
||||
return success(schemeDTOS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> getMultiColorConfigStatus() {
|
||||
|
||||
// List<SystemConfigDO> systemConfigDOS = systemConfigMapper.selectSystemConfigList(SystemConfigTypeEnum.MULTI_COLOR_ORDER_PLAN.getType(), CommonStatusEnum.ENABLE.getStatus());
|
||||
//
|
||||
// return success(CollUtil.isNotEmpty(systemConfigDOS));
|
||||
|
||||
return success(Boolean.TRUE);
|
||||
}
|
||||
|
||||
|
||||
private void checkValueIsNotEmpty(List<?> value,String error) {
|
||||
|
||||
if(ObjectUtils.isEmpty(value)){
|
||||
throw exception(SYSTEM_PROCESS_SCHEME_CONFIG_DATA_ERROR,error);
|
||||
}
|
||||
return schemeDTOS;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public CommonResult<List<SystemConfigRespDTO>> getOrgSealEdgeConfig() {
|
||||
return success(BeanUtils.toBean(systemConfigSealedgeMapper.selectSystemConfigList(SystemConfigTypeEnum.SEALEDGE.getType(), null), SystemConfigRespDTO.class));
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ public class ProcessSchemeConfig {
|
||||
private String optimizationConfig;
|
||||
|
||||
|
||||
@Schema(description = "数据优化配置", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "数据优化配置名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String optimizationConfigName;
|
||||
|
||||
|
||||
|
||||
-14
@@ -1,7 +1,6 @@
|
||||
package com.cf.imes.module.system.service.machine;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import co.elastic.clients.elasticsearch.ElasticsearchClient;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO;
|
||||
@@ -9,7 +8,6 @@ import com.cf.imes.framework.common.enums.MachineTypeEnum;
|
||||
import com.cf.imes.framework.common.pojo.PageResult;
|
||||
import com.cf.imes.framework.common.util.json.JsonUtils;
|
||||
import com.cf.imes.framework.common.util.object.BeanUtils;
|
||||
import com.cf.imes.framework.es.core.service.ESDocumentService;
|
||||
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.cf.imes.framework.organ.core.aop.OrganIgnore;
|
||||
import com.cf.imes.framework.security.core.LoginUser;
|
||||
@@ -27,7 +25,6 @@ import com.cf.imes.module.system.dal.dataobject.systemconfig.SystemConfigSchemeD
|
||||
import com.cf.imes.module.system.dal.mysql.machine.MachineBrandMapper;
|
||||
import com.cf.imes.module.system.dal.mysql.machine.MachineLimitMapper;
|
||||
import com.cf.imes.module.system.dal.mysql.machine.MachineMapper;
|
||||
import com.cf.imes.module.system.dal.mysql.machinetemplate.MachineTemplateLimitMapper;
|
||||
import com.cf.imes.module.system.dal.mysql.machinetemplate.MachineTemplateMapper;
|
||||
import com.cf.imes.module.system.dal.mysql.organ.OrganMapper;
|
||||
import com.cf.imes.module.system.dal.mysql.systemconfig.SystemConfigSchemeMapper;
|
||||
@@ -62,14 +59,6 @@ import static com.cf.imes.module.system.enums.ErrorCodeConstants.*;
|
||||
@Validated
|
||||
public class MachineServiceImpl implements MachineService {
|
||||
|
||||
@Resource
|
||||
private ElasticsearchClient elasticsearchClient;
|
||||
|
||||
@Resource
|
||||
private ESDocumentService esDocumentService;
|
||||
|
||||
//钻孔机台配置索引
|
||||
public final static String DRILL_MACHINE_SETTING = "drill_machine_setting";
|
||||
|
||||
@Resource
|
||||
private MachineMapper machineMapper;
|
||||
@@ -77,9 +66,6 @@ public class MachineServiceImpl implements MachineService {
|
||||
@Resource
|
||||
private MachineLimitMapper machineLimitMapper;
|
||||
|
||||
@Resource
|
||||
private MachineTemplateLimitMapper machineTemplateLimitMapper;
|
||||
|
||||
@Resource
|
||||
private MachineTemplateMapper machineTemplateMapper;
|
||||
|
||||
|
||||
+229
-1
@@ -26,19 +26,29 @@ import com.cf.imes.module.system.controller.admin.organ.vo.organ.OrganRespVO;
|
||||
import com.cf.imes.module.system.controller.admin.organ.vo.organ.OrganSaveReqVO;
|
||||
import com.cf.imes.module.system.controller.admin.organ.vo.organ.OrganSimpleRespVO;
|
||||
import com.cf.imes.module.system.controller.admin.permission.vo.role.RoleSaveReqVO;
|
||||
import com.cf.imes.module.system.controller.admin.systemconfig.vo.ProcessSchemeConfig;
|
||||
import com.cf.imes.module.system.controller.admin.tokenconfig.vo.JwtConfig;
|
||||
import com.cf.imes.module.system.controller.admin.user.vo.user.UserSaveReqVO;
|
||||
import com.cf.imes.module.system.convert.organ.OrganConvert;
|
||||
import com.cf.imes.module.system.dal.dataobject.dict.DictDataDO;
|
||||
import com.cf.imes.module.system.dal.dataobject.lable.LabelDO;
|
||||
import com.cf.imes.module.system.dal.dataobject.machine.MachineDO;
|
||||
import com.cf.imes.module.system.dal.dataobject.machine.MachineLimitDO;
|
||||
import com.cf.imes.module.system.dal.dataobject.oauth2.OAuth2AccessTokenDO;
|
||||
import com.cf.imes.module.system.dal.dataobject.organ.OrganizationDO;
|
||||
import com.cf.imes.module.system.dal.dataobject.organ.TenantPackageDO;
|
||||
import com.cf.imes.module.system.dal.dataobject.permission.MenuDO;
|
||||
import com.cf.imes.module.system.dal.dataobject.permission.RoleDO;
|
||||
import com.cf.imes.module.system.dal.dataobject.systemconfig.*;
|
||||
import com.cf.imes.module.system.dal.dataobject.tokenconfig.TokenConfigDO;
|
||||
import com.cf.imes.module.system.dal.mysql.dict.DictDataMapper;
|
||||
import com.cf.imes.module.system.dal.mysql.label.LabelMapper;
|
||||
import com.cf.imes.module.system.dal.mysql.machine.MachineLimitMapper;
|
||||
import com.cf.imes.module.system.dal.mysql.machine.MachineMapper;
|
||||
import com.cf.imes.module.system.dal.mysql.organ.OrganMapper;
|
||||
import com.cf.imes.module.system.dal.mysql.systemconfig.*;
|
||||
import com.cf.imes.module.system.dal.mysql.tokenconfig.TokenConfigMapper;
|
||||
import com.cf.imes.module.system.enums.config.SystemConfigTypeEnum;
|
||||
import com.cf.imes.module.system.enums.permission.RoleCodeEnum;
|
||||
import com.cf.imes.module.system.enums.permission.RoleTypeEnum;
|
||||
import com.cf.imes.module.system.service.organ.handler.OrganInfoHandler;
|
||||
@@ -63,6 +73,7 @@ import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
import static com.cf.imes.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.cf.imes.framework.common.util.json.JsonUtils.parseArray;
|
||||
import static com.cf.imes.module.system.dal.redis.RedisKeyConstants.OAUTH2_ACCESS_TOKEN;
|
||||
import static com.cf.imes.module.system.enums.ErrorCodeConstants.*;
|
||||
import static com.cf.imes.module.system.service.tokenconfig.TokenConfigServiceImpl.generateBaseToken;
|
||||
@@ -106,13 +117,39 @@ public class OrganServiceImpl implements OrganService {
|
||||
@Resource
|
||||
private TokenConfigMapper tokenConfigMapper;
|
||||
|
||||
|
||||
@Resource
|
||||
private JwtConfig jwtConfig;
|
||||
|
||||
@Resource
|
||||
private StringRedisTemplate stringRedisTemplate;
|
||||
|
||||
@Resource
|
||||
private DictDataMapper dictDataMapper;
|
||||
|
||||
@Resource
|
||||
private SystemConfigMapper systemConfigMapper;
|
||||
|
||||
@Resource
|
||||
private SystemConfigFilterMapper systemConfigFilterMapper;
|
||||
|
||||
@Resource
|
||||
private SystemConfigProcessMapper systemConfigProcessMapper;
|
||||
|
||||
@Resource
|
||||
private SystemConfigDataMapper systemConfigDataMapper;
|
||||
|
||||
@Resource
|
||||
private SystemConfigSchemeMapper systemConfigSchemeMapper;
|
||||
|
||||
@Resource
|
||||
private SystemConfigSealedgeMapper systemConfigSealedgeMapper;
|
||||
|
||||
@Resource
|
||||
private MachineMapper machineMapper;
|
||||
|
||||
@Resource
|
||||
private LabelMapper labelMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public List<Long> getOrganIdList() {
|
||||
@@ -200,6 +237,9 @@ public class OrganServiceImpl implements OrganService {
|
||||
.build();
|
||||
machineLimitMapper.insert(machineLimitDO);
|
||||
|
||||
// 复制系统配置里的相关配置
|
||||
copySystemConfig(tenant.getId());
|
||||
|
||||
return tenant.getId();
|
||||
}
|
||||
|
||||
@@ -527,4 +567,192 @@ public class OrganServiceImpl implements OrganService {
|
||||
return BeanUtils.toBean(organMapper.selectOrgCountExpired(alertDay), OrganRespVO.class);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 系统配置数据复制
|
||||
private void copySystemConfig(Long organId) {
|
||||
|
||||
List<DictDataDO> dictDataDOS = dictDataMapper.selectListByStatusAndDictType(CommonStatusEnum.ENABLE.getStatus(), "copy_data_organ");
|
||||
if(CollUtil.isEmpty(dictDataDOS)){
|
||||
return;
|
||||
}
|
||||
|
||||
String value = dictDataDOS.get(0).getValue();
|
||||
|
||||
Long copyOrganId = Long.valueOf(value);
|
||||
|
||||
|
||||
// 自定义板编号
|
||||
List<SystemConfigDO> systemConfigDOS = systemConfigMapper.selectList(new LambdaQueryWrapperX<SystemConfigDO>()
|
||||
.eq(SystemConfigDO::getType, SystemConfigTypeEnum.CUSTOM_PLATE_NO.getType())
|
||||
.eq(SystemConfigDO::getOrganId, copyOrganId)
|
||||
.eq(SystemConfigDO::getDeleted, false));
|
||||
|
||||
if(CollUtil.isNotEmpty(systemConfigDOS)){
|
||||
Optional<SystemConfigDO> configDO = systemConfigDOS.stream().max(Comparator.comparing(SystemConfigDO::getVersion));
|
||||
if (configDO.isPresent()) {
|
||||
SystemConfigDO systemConfigDO = configDO.get();
|
||||
systemConfigMapper.insert(SystemConfigDO.builder()
|
||||
.name(systemConfigDO.getName())
|
||||
.status(systemConfigDO.getStatus())
|
||||
.sort(systemConfigDO.getSort())
|
||||
.type(systemConfigDO.getType())
|
||||
.setting(systemConfigDO.getSetting())
|
||||
.organId(organId)
|
||||
.build());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 板件分线
|
||||
List<SystemConfigFilterDO> systemConfigFilterDOS = systemConfigFilterMapper.selectList(new LambdaQueryWrapperX<SystemConfigFilterDO>()
|
||||
.eq(SystemConfigFilterDO::getOrganId, copyOrganId)
|
||||
.eq(SystemConfigFilterDO::getDeleted, false)
|
||||
.eq(SystemConfigFilterDO::getType, SystemConfigTypeEnum.INTELLIGENT_BRANCH.getType()));
|
||||
if(CollUtil.isNotEmpty(systemConfigFilterDOS)){
|
||||
systemConfigFilterDOS.forEach(f->{
|
||||
f.setId(null);
|
||||
f.setOrganId(organId);
|
||||
f.setCreateTime(null);
|
||||
f.setCreator(null);
|
||||
f.setUpdateTime(null);
|
||||
f.setUpdater(null);
|
||||
});
|
||||
|
||||
systemConfigFilterMapper.insertBatch(systemConfigFilterDOS);
|
||||
}
|
||||
|
||||
|
||||
// 加工分线
|
||||
List<SystemConfigProcessDO> systemConfigProcessDOS = systemConfigProcessMapper.selectList(new LambdaQueryWrapperX<SystemConfigProcessDO>()
|
||||
.eq(SystemConfigProcessDO::getOrganId, copyOrganId)
|
||||
.eq(SystemConfigProcessDO::getDeleted, false)
|
||||
.eq(SystemConfigProcessDO::getType, SystemConfigTypeEnum.PROCESSING_SCREENING.getType()));
|
||||
if(CollUtil.isNotEmpty(systemConfigProcessDOS)){
|
||||
systemConfigProcessDOS.forEach(f->{
|
||||
f.setId(null);
|
||||
f.setOrganId(organId);
|
||||
f.setCreateTime(null);
|
||||
f.setCreator(null);
|
||||
f.setUpdateTime(null);
|
||||
f.setUpdater(null);
|
||||
});
|
||||
|
||||
systemConfigProcessMapper.insertBatch(systemConfigProcessDOS);
|
||||
}
|
||||
|
||||
|
||||
// 数据处理
|
||||
List<SystemConfigDataDO> systemConfigDataDOS = systemConfigDataMapper.selectList(new LambdaQueryWrapperX<SystemConfigDataDO>()
|
||||
.eq(SystemConfigDataDO::getOrganId, copyOrganId)
|
||||
.eq(SystemConfigDataDO::getDeleted, false)
|
||||
.eq(SystemConfigDataDO::getType, SystemConfigTypeEnum.DATA_PROCESSING.getType()));
|
||||
if(CollUtil.isNotEmpty(systemConfigDataDOS)){
|
||||
systemConfigDataDOS.forEach(f->{
|
||||
f.setId(null);
|
||||
f.setOrganId(organId);
|
||||
f.setCreateTime(null);
|
||||
f.setCreator(null);
|
||||
f.setUpdateTime(null);
|
||||
f.setUpdater(null);
|
||||
});
|
||||
|
||||
systemConfigDataMapper.insertBatch(systemConfigDataDOS);
|
||||
}
|
||||
|
||||
|
||||
// 加工方案,(需要复制的组织ID,需要添加数据的组织ID)
|
||||
copyConfigSchemeMachineAndLabel(copyOrganId,organId);
|
||||
|
||||
|
||||
// 封边条对应
|
||||
List<SystemConfigSealedgeDO> systemConfigSealedgeDOS = systemConfigSealedgeMapper.selectList(new LambdaQueryWrapperX<SystemConfigSealedgeDO>()
|
||||
.eq(SystemConfigSealedgeDO::getOrganId, copyOrganId)
|
||||
.eq(SystemConfigSealedgeDO::getDeleted, false)
|
||||
.eq(SystemConfigSealedgeDO::getType, SystemConfigTypeEnum.SEALEDGE.getType()));
|
||||
if(CollUtil.isNotEmpty(systemConfigSealedgeDOS)){
|
||||
systemConfigSealedgeDOS.forEach(f->{
|
||||
f.setId(null);
|
||||
f.setOrganId(organId);
|
||||
f.setCreateTime(null);
|
||||
f.setCreator(null);
|
||||
f.setUpdateTime(null);
|
||||
f.setUpdater(null);
|
||||
});
|
||||
|
||||
systemConfigSealedgeMapper.insertBatch(systemConfigSealedgeDOS);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 复制加工方案组以及里面的机台信息以及标签的配置信息
|
||||
private void copyConfigSchemeMachineAndLabel(Long copyOrganId,Long organId){
|
||||
|
||||
List<SystemConfigSchemeDO> systemConfigSchemeDOS = systemConfigSchemeMapper.selectList(new LambdaQueryWrapperX<SystemConfigSchemeDO>()
|
||||
.eq(SystemConfigSchemeDO::getOrganId, copyOrganId)
|
||||
.eq(SystemConfigSchemeDO::getDeleted, false)
|
||||
.eq(SystemConfigSchemeDO::getType, SystemConfigTypeEnum.PROCESS_SCHEME.getType()));
|
||||
|
||||
|
||||
if(CollUtil.isNotEmpty(systemConfigSchemeDOS)){
|
||||
|
||||
// 加工方案组的配置信息
|
||||
List<ProcessSchemeConfig> processSchemeConfigs = new ArrayList<>();
|
||||
|
||||
systemConfigSchemeDOS.forEach(f->{
|
||||
f.setId(null);
|
||||
f.setOrganId(organId);
|
||||
f.setCreateTime(null);
|
||||
f.setCreator(null);
|
||||
f.setUpdateTime(null);
|
||||
f.setUpdater(null);
|
||||
|
||||
try {
|
||||
processSchemeConfigs.addAll(parseArray(f.getSetting(), ProcessSchemeConfig.class));
|
||||
} catch (Exception e) {
|
||||
log.error("加工方案组复制数据异常"+e.getMessage());
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
List<String> machineIds = processSchemeConfigs.stream().map(ProcessSchemeConfig::getAnalyzer).distinct().toList();
|
||||
List<MachineDO> machineDOS = machineMapper.selectBatchIds(machineIds);
|
||||
if(CollUtil.isNotEmpty(machineDOS)){
|
||||
machineDOS.forEach(f->{
|
||||
f.setId(null);
|
||||
f.setOrganId(organId);
|
||||
f.setCreateTime(null);
|
||||
f.setCreator(null);
|
||||
f.setUpdateTime(null);
|
||||
f.setUpdater(null);
|
||||
});
|
||||
|
||||
|
||||
List<Long> labelIds = machineDOS.stream().map(MachineDO::getLabelId).distinct().toList();
|
||||
List<LabelDO> labelDOS = labelMapper.selectBatchIds(labelIds);
|
||||
if(CollUtil.isNotEmpty(labelDOS)){
|
||||
labelDOS.forEach(f->{
|
||||
f.setId(null);
|
||||
f.setOrganId(organId);
|
||||
f.setCreateTime(null);
|
||||
f.setCreator(null);
|
||||
f.setUpdateTime(null);
|
||||
f.setUpdater(null);
|
||||
});
|
||||
|
||||
labelMapper.insertBatch(labelDOS);
|
||||
}
|
||||
|
||||
machineMapper.insertBatch(machineDOS);
|
||||
}
|
||||
|
||||
systemConfigSchemeMapper.insertBatch(systemConfigSchemeDOS);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+1
-4
@@ -7,7 +7,6 @@ import com.cf.imes.framework.security.core.LoginUser;
|
||||
import com.cf.imes.module.system.controller.admin.setting.vo.PackageConfigReqVO;
|
||||
import com.cf.imes.module.system.dal.dataobject.setting.PackageConfigDO;
|
||||
import com.cf.imes.module.system.dal.mysql.setting.PackageConfigMapper;
|
||||
import com.cf.imes.module.system.dal.mysql.systemconfig.SystemConfigMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
@@ -27,8 +26,6 @@ public class SettingServiceImpl implements SettingService{
|
||||
@Resource
|
||||
private PackageConfigMapper packageConfigMapper;
|
||||
|
||||
@Resource
|
||||
private SystemConfigMapper systemConfigMapper;
|
||||
|
||||
@Override
|
||||
public Long insertSetting(PackageConfigReqVO reqVO) {
|
||||
@@ -81,7 +78,7 @@ public class SettingServiceImpl implements SettingService{
|
||||
|
||||
if (packageConfigDO == null) {
|
||||
// throw exception(CURRENTLY_NO_CONFIGURATION_AVAILABLE,type == 1 ? UserSettingTypeEnum.PREPACKAGED.getName(): UserSettingTypeEnum.PACKAGED.getName());
|
||||
return new PackageConfigDO();
|
||||
return null;
|
||||
}
|
||||
|
||||
packageConfigDO.setSetting(unzipString(packageConfigDO.getSetting()));
|
||||
|
||||
Reference in New Issue
Block a user