|
|
|
@ -22,6 +22,7 @@ import org.springframework.util.StringUtils;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.StringJoiner;
|
|
|
|
|
import java.util.logging.Logger;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @Description : 获取生产过程上下文对象接口实现【BUSI】
|
|
|
|
@ -182,7 +183,8 @@ public class MesProductionCustomContextStepService extends BaseStepService imple
|
|
|
|
|
public Boolean addProductionStatisticsContext(StationRequestBean reqBean, int count) {
|
|
|
|
|
|
|
|
|
|
MesProdShiftContext mesProdShiftKvBean = getMesProdShiftKvBean(reqBean.getOrganizeCode(), reqBean.getWorkCenterCode());
|
|
|
|
|
String key = new StringJoiner(MesPcnExtConstWords.AND).add(mesProdShiftKvBean.getShiftGroup()).add(mesProdShiftKvBean.getShiftCode()).toString();
|
|
|
|
|
//String key = new StringJoiner(MesPcnExtConstWords.AND).add(mesProdShiftKvBean.getShiftGroup()).add(mesProdShiftKvBean.getShiftCode()).toString();
|
|
|
|
|
String key = new StringJoiner(MesPcnExtConstWords.AND).add(mesProdShiftKvBean.getShiftGroup()).toString();
|
|
|
|
|
|
|
|
|
|
List<StationKvBean> stationKvBeans = getProductionStatisticsContext(reqBean);
|
|
|
|
|
if (CollectionUtils.isEmpty(stationKvBeans)) {
|
|
|
|
@ -193,7 +195,7 @@ public class MesProductionCustomContextStepService extends BaseStepService imple
|
|
|
|
|
saveProductionStatisticsContext(reqBean, generateStationKvBeans);
|
|
|
|
|
} else {
|
|
|
|
|
stationKvBeans.stream().forEach(stationKvBean -> {
|
|
|
|
|
if (Objects.equal(stationKvBean.getKey(), key)) {
|
|
|
|
|
if (stationKvBean.getKey().contains(key)) {
|
|
|
|
|
stationKvBean.setValue(stationKvBean == null ? count + "" : (Integer.valueOf(stationKvBean.getValue()) + count) + "");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|