|
|
@ -82,7 +82,7 @@ public class MesAssemblyExtService implements IMesAssemblyExtService {
|
|
|
|
|
|
|
|
|
|
|
|
workOrderAssemblyList.forEach(o -> productionAssemblySortContextList.add(
|
|
|
|
workOrderAssemblyList.forEach(o -> productionAssemblySortContextList.add(
|
|
|
|
new MesProductionAssemblySortContext().copy(o).fileUrl(fileMap).foreignKey(prodRuleContext.getForeignKey())
|
|
|
|
new MesProductionAssemblySortContext().copy(o).fileUrl(fileMap).foreignKey(prodRuleContext.getForeignKey())
|
|
|
|
.prodRuleIgnoreCfg(getProdRuleIgnoreCfg(prodRuleIgnoreCfgMap, o.getPid(), MesExtEnumUtil.PROD_RULE_IGNORE_DATA_SOURCE.DATA_SOURCE10.getValueStr()))
|
|
|
|
.prodRuleIgnoreCfg(getProdRuleIgnoreCfg(prodRuleIgnoreCfgMap, o.getPid(), o.getEquipmentCode(), MesExtEnumUtil.PROD_RULE_IGNORE_DATA_SOURCE.DATA_SOURCE10.getValueStr()))
|
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
@ -116,7 +116,7 @@ public class MesAssemblyExtService implements IMesAssemblyExtService {
|
|
|
|
new MesProductionAssemblySortContext()
|
|
|
|
new MesProductionAssemblySortContext()
|
|
|
|
.copy(o, getProductionAssembly(productionAssemblyMap, o.getId()), getIsCheckBindSeq(getWorkCell(workCellMap, o.getWorkCellCode())))
|
|
|
|
.copy(o, getProductionAssembly(productionAssemblyMap, o.getId()), getIsCheckBindSeq(getWorkCell(workCellMap, o.getWorkCellCode())))
|
|
|
|
.foreignKey(prodRuleContext.getForeignKey())
|
|
|
|
.foreignKey(prodRuleContext.getForeignKey())
|
|
|
|
.prodRuleIgnoreCfg(getProdRuleIgnoreCfg(prodRuleIgnoreCfgMap, o.getPid(), MesExtEnumUtil.PROD_RULE_IGNORE_DATA_SOURCE.DATA_SOURCE10.getValueStr()))
|
|
|
|
.prodRuleIgnoreCfg(getProdRuleIgnoreCfg(prodRuleIgnoreCfgMap, o.getPid(), o.getEquipmentCode(), MesExtEnumUtil.PROD_RULE_IGNORE_DATA_SOURCE.DATA_SOURCE10.getValueStr()))
|
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
@ -204,7 +204,7 @@ public class MesAssemblyExtService implements IMesAssemblyExtService {
|
|
|
|
assemblyNosortCfgList.forEach(o -> {
|
|
|
|
assemblyNosortCfgList.forEach(o -> {
|
|
|
|
MesProductionAssemblyNosortContext productionAssemblyNosortContext = new MesProductionAssemblyNosortContext().copy(prodRuleContext, o).fileUrl(fileMap).foreignKey(prodRuleContext.getForeignKey());
|
|
|
|
MesProductionAssemblyNosortContext productionAssemblyNosortContext = new MesProductionAssemblyNosortContext().copy(prodRuleContext, o).fileUrl(fileMap).foreignKey(prodRuleContext.getForeignKey());
|
|
|
|
productionAssemblyNosortContext.overrideAssemblyStatus(productionCustomContextStepService.getRepeatAssemblySn(prodRuleContext.getOrganizeCode(), prodRuleContext.getWorkCenterCode(), prodRuleContext.getWorkCellCode(), productionAssemblyNosortContext))
|
|
|
|
productionAssemblyNosortContext.overrideAssemblyStatus(productionCustomContextStepService.getRepeatAssemblySn(prodRuleContext.getOrganizeCode(), prodRuleContext.getWorkCenterCode(), prodRuleContext.getWorkCellCode(), productionAssemblyNosortContext))
|
|
|
|
.prodRuleIgnoreCfg(getProdRuleIgnoreCfg(prodRuleIgnoreCfgMap, o.getId(), MesExtEnumUtil.PROD_RULE_IGNORE_DATA_SOURCE.DATA_SOURCE30.getValueStr()));
|
|
|
|
.prodRuleIgnoreCfg(getProdRuleIgnoreCfg(prodRuleIgnoreCfgMap, o.getId(), o.getEquipmentCode(), MesExtEnumUtil.PROD_RULE_IGNORE_DATA_SOURCE.DATA_SOURCE30.getValueStr()));
|
|
|
|
productionAssemblyNosortContextList.add(productionAssemblyNosortContext);
|
|
|
|
productionAssemblyNosortContextList.add(productionAssemblyNosortContext);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
@ -213,9 +213,9 @@ public class MesAssemblyExtService implements IMesAssemblyExtService {
|
|
|
|
|
|
|
|
|
|
|
|
//获取不可用规则
|
|
|
|
//获取不可用规则
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public String getProdRuleIgnoreCfg(Map<String, List<MesProdRuleIgnoreCfg>> prodRuleIgnoreCfgMap, Long id, String dataSorce) {
|
|
|
|
public String getProdRuleIgnoreCfg(Map<String, List<MesProdRuleIgnoreCfg>> prodRuleIgnoreCfgMap, Long id, String equipmentCode, String dataSorce) {
|
|
|
|
if (CollectionUtils.isEmpty(prodRuleIgnoreCfgMap) || StringUtils.isEmpty(id) || StringUtils.isEmpty(dataSorce)) return null;
|
|
|
|
if (CollectionUtils.isEmpty(prodRuleIgnoreCfgMap) || StringUtils.isEmpty(id) || StringUtils.isEmpty(dataSorce)) return null;
|
|
|
|
String key = new StringJoiner(MesPcnExtConstWords.AND).add(dataSorce).add(id.toString()).toString();
|
|
|
|
String key = new StringJoiner(MesPcnExtConstWords.AND).add(dataSorce).add(equipmentCode).add(id.toString()).toString();
|
|
|
|
return prodRuleIgnoreCfgMap.containsKey(key) ? JSONObject.toJSONString(prodRuleIgnoreCfgMap.get(key)) : null;
|
|
|
|
return prodRuleIgnoreCfgMap.containsKey(key) ? JSONObject.toJSONString(prodRuleIgnoreCfgMap.get(key)) : null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -250,7 +250,7 @@ public class MesAssemblyExtService implements IMesAssemblyExtService {
|
|
|
|
|
|
|
|
|
|
|
|
assemblyNosortCfgList.forEach(o -> productionAssemblyNosortContextList.add(
|
|
|
|
assemblyNosortCfgList.forEach(o -> productionAssemblyNosortContextList.add(
|
|
|
|
new MesProductionAssemblyNosortContext().copy(o)
|
|
|
|
new MesProductionAssemblyNosortContext().copy(o)
|
|
|
|
.prodRuleIgnoreCfg(getProdRuleIgnoreCfg(prodRuleIgnoreCfgMap, o.getId(), MesExtEnumUtil.PROD_RULE_IGNORE_DATA_SOURCE.DATA_SOURCE30.getValueStr()))
|
|
|
|
.prodRuleIgnoreCfg(getProdRuleIgnoreCfg(prodRuleIgnoreCfgMap, o.getId(), o.getEquipmentCode(), MesExtEnumUtil.PROD_RULE_IGNORE_DATA_SOURCE.DATA_SOURCE30.getValueStr()))
|
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|