|
|
@ -113,19 +113,13 @@ public class MesProductionCustomContextStepService extends BaseStepService imple
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public MesProdShiftContext getMesProdShiftKvBean(String organizeCode, String workCenterCode) {
|
|
|
|
public MesProdShiftContext getMesProdShiftKvBean(String organizeCode, String workCenterCode) {
|
|
|
|
|
|
|
|
|
|
|
|
log.info("获取生产线的当前班组班次信息 --- getMesProdShiftKvBean --- start");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<StationKvBean> stationKvBeans = getProdShiftDataContext(organizeCode, workCenterCode);
|
|
|
|
List<StationKvBean> stationKvBeans = getProdShiftDataContext(organizeCode, workCenterCode);
|
|
|
|
|
|
|
|
if (CollectionUtils.isEmpty(stationKvBeans)) return null;
|
|
|
|
|
|
|
|
|
|
|
|
log.info("获取生产线的当前班组班次信息 --- getMesProdShiftKvBean --- end");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MesProdShiftContext mesProdShiftContext = new MesProdShiftContext();
|
|
|
|
|
|
|
|
if (CollectionUtils.isEmpty(stationKvBeans)) {
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
StationKvBean shiftGroupKvBean = stationKvBeans.stream().filter(stationKvBean -> Objects.equal(stationKvBean.getKey(), MesPcnExtConstWords.SHIFT_GROUP)).findFirst().orElse(null);
|
|
|
|
StationKvBean shiftGroupKvBean = stationKvBeans.stream().filter(stationKvBean -> Objects.equal(stationKvBean.getKey(), MesPcnExtConstWords.SHIFT_GROUP)).findFirst().orElse(null);
|
|
|
|
StationKvBean shiftCodeKvBean = stationKvBeans.stream().filter(stationKvBean -> Objects.equal(stationKvBean.getKey(), MesPcnExtConstWords.SHIFT_CODE)).findFirst().orElse(null);
|
|
|
|
StationKvBean shiftCodeKvBean = stationKvBeans.stream().filter(stationKvBean -> Objects.equal(stationKvBean.getKey(), MesPcnExtConstWords.SHIFT_CODE)).findFirst().orElse(null);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MesProdShiftContext mesProdShiftContext = new MesProdShiftContext();
|
|
|
|
mesProdShiftContext.setShiftCode(shiftGroupKvBean == null ? null : shiftCodeKvBean.getValue());
|
|
|
|
mesProdShiftContext.setShiftCode(shiftGroupKvBean == null ? null : shiftCodeKvBean.getValue());
|
|
|
|
mesProdShiftContext.setShiftGroup(shiftCodeKvBean == null ? null : shiftGroupKvBean.getValue());
|
|
|
|
mesProdShiftContext.setShiftGroup(shiftCodeKvBean == null ? null : shiftGroupKvBean.getValue());
|
|
|
|
return mesProdShiftContext;
|
|
|
|
return mesProdShiftContext;
|
|
|
|