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