| | |
| | | return responseResult; |
| | | } |
| | | |
| | | middleLoc = WMSHelper.GetMinTaskTransfeLoc(startLoc.S_AREA_CODE, "1", "2"); |
| | | middleLoc = WMSHelper.GetMinTaskTransfeLoc(startLoc.S_AREA_CODE, 2 , 2); |
| | | if (middleLoc == null) { |
| | | WMSHelper.addAlarmRecord("流程异常", "高", $"MES叫料任务{mesTask.ID},立库接驳位可能处于锁定或禁用状态,请查看"); |
| | | responseResult.code = 1; |
| | |
| | | wmsEndLoc = WMSHelper.getInStockEndLoc(null, container.N_DETAIL_COUNT == 0 ? 0 : 1, container.N_TYPE); |
| | | if (wmsEndLoc != null) |
| | | { |
| | | agvEndLoc = WMSHelper.GetMinTaskTransfeLoc(wmsEndLoc.S_AREA_CODE, "1", "1", "2"); // 1.立库接驳位 1.入库 2.非直连 |
| | | agvEndLoc = WMSHelper.GetMinTaskTransfeLoc(wmsEndLoc.S_AREA_CODE, 1, 2); // 1.立库接驳位 1.入库 2.非直连 |
| | | if (agvEndLoc != null) |
| | | { |
| | | LogHelper.Info($"创建立库站台到立库的预创建任务,agv终点货位:{agvEndLoc.S_CODE},立库终点货位:{wmsEndLoc.S_CODE}", "AGV"); |
| | |
| | | wmsEndLoc = WMSHelper.getInStockEndLoc(null, container.N_DETAIL_COUNT == 0 ? 0 : 1, container.N_TYPE); |
| | | if (wmsEndLoc != null) |
| | | { |
| | | agvEndLoc = WMSHelper.GetMinTaskTransfeLoc(wmsEndLoc.S_AREA_CODE, "1", "1", "2"); // 1.立库接驳位 1.入库 2.非直连 |
| | | agvEndLoc = WMSHelper.GetMinTaskTransfeLoc(wmsEndLoc.S_AREA_CODE, 1, 2); // 1.立库接驳位 1.入库 2.非直连 |
| | | if (agvEndLoc != null) |
| | | { |
| | | LogHelper.Info($"创建立库站台到立库的预创建任务,agv终点货位:{agvEndLoc.S_CODE},立库终点货位:{wmsEndLoc.S_CODE}", "AGV"); |
| | |
| | | } |
| | | } |
| | | |
| | | middleLoc = WMSHelper.GetTransfeRelevanceLoc(startLoc.S_AREA_CODE, "1" , "2"); |
| | | middleLoc = WMSHelper.GetTransfeRelevanceLoc(startLoc.S_AREA_CODE, 1 , 2); |
| | | |
| | | if (middleLoc != null) |
| | | { |
| | |
| | | wmsEndLoc = WMSHelper.getInStockEndLoc(null, container.N_DETAIL_COUNT == 0 ? 0 : 1, container.N_TYPE); |
| | | if (wmsEndLoc != null) |
| | | { |
| | | agvEndLoc = WMSHelper.GetMinTaskTransfeLoc(wmsEndLoc.S_AREA_CODE, "1", "1", "2"); // 1.立库接驳位 1.入库 2.非直连 |
| | | agvEndLoc = WMSHelper.GetMinTaskTransfeLoc(wmsEndLoc.S_AREA_CODE, 1, 2); // 1.立库接驳位 1.入库 2.非直连 |
| | | if (agvEndLoc != null) |
| | | { |
| | | // 预先生成入库站台-立库终点的搬运任务 |
| | |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | public static bool switchStationAttribute(SwitchStationAttributeModel model) |
| | | public static ResponseResult switchStationAttribute(SwitchStationAttributeModel model) |
| | | { |
| | | bool result = false; |
| | | ResponseResult responseResult = new ResponseResult(); |
| | | var task = WCSHelper.GetTaskByStartOrEnd(model.locCode); |
| | | if (task == null) |
| | | if (task == null) |
| | | { |
| | | var transfeRelevance= WMSHelper.GetTransfeRelevance(model.locCode); // 接驳位属性 |
| | | var transfeRelevance = WMSHelper.GetTransfeRelevance(model.locCode); // 接驳位属性 |
| | | LogHelper.Info($"原站台属性:{JsonConvert.SerializeObject(transfeRelevance)}", "WMS"); |
| | | if (transfeRelevance != null && transfeRelevance.S_TYPE == "1") |
| | | if (transfeRelevance != null && transfeRelevance.N_PROPERTY == 2) |
| | | { |
| | | if (model.signalType == "1") |
| | | { |
| | | if (transfeRelevance.S_PROPERTY == "2") |
| | | { |
| | | result = true; |
| | | } |
| | | else |
| | | { |
| | | result = WMSHelper.updateTransfeLocProperty(model.locCode, "2"); |
| | | } |
| | | WMSHelper.updateTransfeLocProperty(model.locCode, 0); |
| | | } |
| | | if (model.signalType == "2") |
| | | { |
| | | if (transfeRelevance.S_PROPERTY == "3") |
| | | { |
| | | result = true; |
| | | } |
| | | else |
| | | { |
| | | result = WMSHelper.updateTransfeLocProperty(model.locCode, "3"); |
| | | } |
| | | WMSHelper.updateTransfeLocProperty(model.locCode, 1); |
| | | } |
| | | } |
| | | } |
| | | return result; |
| | | else |
| | | { |
| | | responseResult.code = 1; |
| | | responseResult.msg = "接驳位存在未完成的任务,无法切换站台属性"; |
| | | } |
| | | return responseResult; |
| | | } |
| | | |
| | | /// <summary> |