装配件替换,提示信息优化

tags/yfai-pcn-ext-v1.8
jun 9 months ago
parent 603123568f
commit 96924514fb

@ -306,12 +306,11 @@ public class MesReworkTaskServiceImpl implements IMesReworkTaskService {
boolean checkResult = true;
//查询装配记录
requestModel.setAssemblyPartStatus(MesExtEnumUtil.ASSEMBLY_STATUS.ASSEMBLY_STATUS_10.getValue());
requestModel.setIsOrigSn(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue());
List<MesProductionAssembly> mesProductionAssemblies = assemblyQuery(requestModel);
if (CollectionUtils.isEmpty(mesProductionAssemblies)) MesPcnException.throwFlowException("未查询到没有替换的装配件记录");
List<MesProductionAssembly> productionAssemblies = assemblyQuery(requestModel).stream().filter(t -> CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue() == t.getIsOrigSn()).collect(Collectors.toList());
if (CollectionUtils.isEmpty(productionAssemblies)) MesPcnException.throwFlowException("未查询到没有替换的装配件记录");
Map<String,MesWorkCenter> mesWorkCenterMap = new HashMap<>();
//匹配装配件
for (MesProductionAssembly assembly : mesProductionAssemblies) {
for (MesProductionAssembly assembly : productionAssemblies) {
Object context = getContext(requestModel, assembly,mesWorkCenterMap);
//匹配规则
Map<String, Object> result = numberRuleMatchDispatchService.matchNumberRule(requestModel.getOrganizeCode(), requestModel.getSn(), context);

Loading…
Cancel
Save