1、新增装配清单中根据装配设置对应加工状态的部件列表接口;2、新增装配清单加工接口;

This commit is contained in:
gaoqr
2026-03-04 11:18:55 +08:00
parent c982d11c6f
commit c468f61791
17 changed files with 912 additions and 28 deletions
@@ -0,0 +1,31 @@
package com.cf.imes.module.system.api.assemblyconfig;
import cn.hutool.core.bean.BeanUtil;
import com.cf.imes.framework.common.pojo.CommonResult;
import com.cf.imes.module.system.api.assemblyconfig.dto.AssemblyConfigRespDTO;
import com.cf.imes.module.system.controller.admin.assemblyconfig.vo.AssemblyConfigRespVO;
import com.cf.imes.module.system.service.assemblyconfig.AssemblyConfigService;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
*
*
* @author Gqr
* @since 2026/2/28 15:30
*/
@RestController
@Validated
public class AssemblyConfigApiImpl implements AssemblyConfigApi {
@Resource
private AssemblyConfigService assemblyConfigService;
@Override
public CommonResult<List<AssemblyConfigRespDTO>> getAssemblyConfigByPartNameList(List<String> componentNameList) {
List<AssemblyConfigRespVO> assemblyConfigByComponentNameList = assemblyConfigService.getAssemblyConfigByComponentNameList(componentNameList);
return CommonResult.success(BeanUtil.copyToList(assemblyConfigByComponentNameList, AssemblyConfigRespDTO.class));
}
}
@@ -24,4 +24,10 @@ public class AssemblyConfigRespVO {
@Schema(description = "描述", example = "描述")
private AssemblyConfigStructureVO structure;
@Schema(description = "结构哈希值")
private String structureHash;
@Schema(description = "结构json")
private String structureJson;
}
@@ -71,4 +71,12 @@ public interface AssemblyConfigService {
* @param reqVO
*/
void saveConfig(AssemblyConfigSaveReqVO reqVO);
/**
* 根据部件名称获取组织的装配设置
*
* @param componentNameList
* @return
*/
List<AssemblyConfigRespVO> getAssemblyConfigByComponentNameList(List<String> componentNameList);
}
@@ -405,4 +405,19 @@ public class AssemblyConfigServiceImpl implements AssemblyConfigService {
.set(AssemblyConfigDO::getStructureJson, JsonUtils.zipString(JsonUtils.toJsonString(config)))
);
}
@Override
public List<AssemblyConfigRespVO> getAssemblyConfigByComponentNameList(List<String> componentNameList) {
Long organId = SecurityFrameworkUtils.getUserOrganId();
List<AssemblyConfigDO> assemblyConfigDOS = assemblyConfigMapper.selectList(new LambdaQueryWrapper<AssemblyConfigDO>()
.eq(AssemblyConfigDO::getOrganId, organId)
.in(AssemblyConfigDO::getComponentName, componentNameList)
.eq(AssemblyConfigDO::getStatus, AssemblyConfigStatusEnum.CONFIGURED.getStatus())
.eq(AssemblyConfigDO::getDeleted, DeletedCodeEnum.NOT_DELETED.getStatus())
.select(AssemblyConfigDO::getComponentName, AssemblyConfigDO::getStructureHash, AssemblyConfigDO::getStructureJson)
);
return BeanUtil.copyToList(assemblyConfigDOS, AssemblyConfigRespVO.class);
}
}