分屏切换修改

tags/yfai-pcn-ext-v1.0
微笑着面对明天 11 months ago
parent 863917dfb7
commit 3e3d3543d3

@ -36,7 +36,7 @@ public class MesWorkCellExtendCfgServiceImpl implements IMesWorkCellExtendCfgSer
DdlPackBean packBean = DdlPackBean.getDdlPackBean(bean.getOrganizeCode()); DdlPackBean packBean = DdlPackBean.getDdlPackBean(bean.getOrganizeCode());
DdlPreparedPack.getStringEqualPack(bean.getWorkCenterCode(), "workCenterCode", packBean); DdlPreparedPack.getStringEqualPack(bean.getWorkCenterCode(), "workCenterCode", packBean);
DdlPreparedPack.getStringEqualPack(bean.getWorkCellCode(), "workCellCode", packBean); DdlPreparedPack.getStringEqualPack(bean.getWorkCellCode(), "workCellCode", packBean);
DdlPreparedPack.getStringEqualPack(bean.getExtendType(), "extendType", packBean); DdlPreparedPack.getNumEqualPack(bean.getExtendType(), "extendType", packBean);
if(!StringUtil.isEmpty(bean.orderBy())){ if(!StringUtil.isEmpty(bean.orderBy())){
packBean.setOrderByStr(bean.orderBy()); packBean.setOrderByStr(bean.orderBy());
@ -57,7 +57,7 @@ public class MesWorkCellExtendCfgServiceImpl implements IMesWorkCellExtendCfgSer
DdlPreparedPack.getStringEqualPack(bean.getAreaCode(), "areaCode", packBean); DdlPreparedPack.getStringEqualPack(bean.getAreaCode(), "areaCode", packBean);
DdlPreparedPack.getStringEqualPack(bean.getWorkCenterCode(), "workCenterCode", packBean); DdlPreparedPack.getStringEqualPack(bean.getWorkCenterCode(), "workCenterCode", packBean);
DdlPreparedPack.getStringEqualPack(bean.getWorkCellCode(), "workCellCode", packBean); DdlPreparedPack.getStringEqualPack(bean.getWorkCellCode(), "workCellCode", packBean);
DdlPreparedPack.getStringEqualPack(StringUtil.isEmpty(bean.getExtendType())?"20":bean.getExtendType(), "extendType", packBean); DdlPreparedPack.getNumEqualPack(StringUtil.isEmpty(bean.getExtendType())?20:bean.getExtendType(), "extendType", packBean);
if(!StringUtil.isEmpty(bean.orderBy())){ if(!StringUtil.isEmpty(bean.orderBy())){
packBean.setOrderByStr(bean.orderBy()); packBean.setOrderByStr(bean.orderBy());
}else { }else {

@ -475,6 +475,7 @@ public class MesWorkOrderService implements IMesWorkOrderService {
List<MesWorkOrder> oldMesWorkOrders = getMesWorkOrders(productionRecord, organizeCode, null); List<MesWorkOrder> oldMesWorkOrders = getMesWorkOrders(productionRecord, organizeCode, null);
if (CollectionUtils.isEmpty(oldMesWorkOrders)) { if (CollectionUtils.isEmpty(oldMesWorkOrders)) {
updateProductionRecord(organizeCode, userName, productionRecord.getProductSn()); updateProductionRecord(organizeCode, userName, productionRecord.getProductSn());
return;
} }
report(productionRecord, organizeCode, userName, oldMesWorkOrders.get(0)); report(productionRecord, organizeCode, userName, oldMesWorkOrders.get(0));

@ -82,7 +82,9 @@ public class MesEquipmentRwExtService implements IMesEquipVariableRwExtService {
params.put(MesPcnExtConstWords.CLIENT_HANDLE, equipVariableRwModel.getClientHandle().toString()); params.put(MesPcnExtConstWords.CLIENT_HANDLE, equipVariableRwModel.getClientHandle().toString());
params.put(MesPcnExtConstWords.CHANNEL, equipVariableRwModel.getChannel()); params.put(MesPcnExtConstWords.CHANNEL, equipVariableRwModel.getChannel());
params.put(MesPcnExtConstWords.EQUIPMENT_ID, equipVariableRwModel.getEquipId().toString()); params.put(MesPcnExtConstWords.EQUIPMENT_ID, equipVariableRwModel.getEquipId().toString());
LOGGER.info("设备数据变量写值开始-> 地址:{}, params={}", equipVariableRwModel.getWriteRequestUrl(), params);
String data = HttpClientTool.doHttpUrl(CommonEnumUtil.HTTP_METHOD_TYPE.POST, false, equipVariableRwModel.getWriteRequestUrl(), params, null, null); String data = HttpClientTool.doHttpUrl(CommonEnumUtil.HTTP_METHOD_TYPE.POST, false, equipVariableRwModel.getWriteRequestUrl(), params, null, null);
LOGGER.info("设备数据变量写值返回-> data:{} ", data);
if (!StringUtils.isEmpty(data)) return JsonUtilTool.decode(data, MesEquipVariableRwResult.class).obj(JSONObject.toJSONString(equipVariableRwModel)); if (!StringUtils.isEmpty(data)) return JsonUtilTool.decode(data, MesEquipVariableRwResult.class).obj(JSONObject.toJSONString(equipVariableRwModel));
else return result.noSuccessed().message(String.format("设备数据变量写值失败! CLIENT_HANDLE[%s] CHANNEL[%s] EQUIPMENT_ID[%s] VALUE[%s]", else return result.noSuccessed().message(String.format("设备数据变量写值失败! CLIENT_HANDLE[%s] CHANNEL[%s] EQUIPMENT_ID[%s] VALUE[%s]",
equipVariableRwModel.getClientHandle(), equipVariableRwModel.getChannel(), equipVariableRwModel.getEquipId(), equipVariableRwModel.getValue())).obj(JSONObject.toJSONString(equipVariableRwModel)); equipVariableRwModel.getClientHandle(), equipVariableRwModel.getChannel(), equipVariableRwModel.getEquipId(), equipVariableRwModel.getValue())).obj(JSONObject.toJSONString(equipVariableRwModel));
@ -122,7 +124,6 @@ public class MesEquipmentRwExtService implements IMesEquipVariableRwExtService {
else return result.noSuccessed().message(String.format("设备数据变量读值失败! 数据信息:[%s]!", JSONObject.toJSONString(equipVariableRwModel))); else return result.noSuccessed().message(String.format("设备数据变量读值失败! 数据信息:[%s]!", JSONObject.toJSONString(equipVariableRwModel)));
} }
@Override @Override
public MesEquipVariableRwResult writeVariable(MesEquipmentVariableCfg equipmentVariableCfg, MesEquipmentVariable equipmentVariable, String kepwareFlag) { public MesEquipVariableRwResult writeVariable(MesEquipmentVariableCfg equipmentVariableCfg, MesEquipmentVariable equipmentVariable, String kepwareFlag) {
MesEquipVariableRwModel equipVariableRwModel = new MesEquipVariableRwModel(); MesEquipVariableRwModel equipVariableRwModel = new MesEquipVariableRwModel();

@ -51,7 +51,7 @@ public class MesManyCellNoticeNextStepService extends BaseStepService {
if (workCellExtendCfg.getWorkCenterCodeBak().equals(reqBean.getWorkCenterCode()) && workCellExtendCfg.getWorkCellCodeBak().equals(reqBean.getWorkCellCode())) continue; if (workCellExtendCfg.getWorkCenterCodeBak().equals(reqBean.getWorkCenterCode()) && workCellExtendCfg.getWorkCellCodeBak().equals(reqBean.getWorkCellCode())) continue;
//验证下个工位是否在线 //验证下个工位是否在线
String clientInfo = shippingDispatchService.getActorClientInfo(reqBean.getOrganizeCode(), workCellExtendCfg.getWorkCenterCode(), workCellExtendCfg.getWorkCellCode()); String clientInfo = shippingDispatchService.getActorClientInfo(reqBean.getOrganizeCode(), workCellExtendCfg.getWorkCenterCode(), workCellExtendCfg.getWorkCellCodeBak());
if (CollectionUtils.isEmpty(StationWebSocket.getStationWebSocketList(clientInfo))) continue; if (CollectionUtils.isEmpty(StationWebSocket.getStationWebSocketList(clientInfo))) continue;
//调用多工位场景触发定位分屏工步, CLIENT_INFO是必要传参 //调用多工位场景触发定位分屏工步, CLIENT_INFO是必要传参

@ -35,7 +35,7 @@ public class MesManyCellTriggerTabSwitchStepService extends BaseStepService {
StationRequestBean stationRequestBean = new StationRequestBean(); StationRequestBean stationRequestBean = new StationRequestBean();
BeanUtils.copyProperties(reqBean, stationRequestBean); BeanUtils.copyProperties(reqBean, stationRequestBean);
stationRequestBean.setScanInfo(clientInfo); stationRequestBean.setClientInfo(clientInfo);
return clientInfo.equals(reqBean.getClientInfo()) ? return clientInfo.equals(reqBean.getClientInfo()) ?
execDynamicsCompleteAndSendMsgReturn(stationRequestBean, resultBean.writeDbLog(), stepResult, true, MesPcnEnumUtil.STATION_BUSI_TYPE.TAB_SWITCH, MesPcnEnumUtil.STATION_DATA_TYPE.CUSTOM, String.format("客户端[%s]监听自动切换页面成功!", reqBean.getClientInfo())) : execDynamicsCompleteAndSendMsgReturn(stationRequestBean, resultBean.writeDbLog(), stepResult, true, MesPcnEnumUtil.STATION_BUSI_TYPE.TAB_SWITCH, MesPcnEnumUtil.STATION_DATA_TYPE.CUSTOM, String.format("客户端[%s]监听自动切换页面成功!", reqBean.getClientInfo())) :

Loading…
Cancel
Save