| | |
| | | var rowdwa = db.Queryable<RoadWayEnable>().Where(x => x.areaCode == wcsTask.S_END_AREA && x.status == "0" && x.roadWay == loc1.N_ROADWAY.ToString()).First(); |
| | | if (rowdwa == null) |
| | | { |
| | | LogHelper.Info($"判断巷道可用,当前库区{wcsTask.S_END_AREA}当前巷道{loc1.N_ROADWAY}可用,不需要改道", "改道安全交互"); |
| | | LogHelper.Info($"当前任务{task.S_CODE}判断巷道可用,当前库区{wcsTask.S_END_AREA}当前巷道{loc1.N_ROADWAY}可用,不需要改道", "改道安全交互"); |
| | | } |
| | | else |
| | | { |
| | | LogHelper.Info($"当前巷道不可用,需要改道", "改道安全交互"); |
| | | LogHelper.Info($"当前任务{task.S_CODE}当前巷道不可用,需要改道", "改道安全交互"); |
| | | var endLoc = LocationHelper.GetLocOne(wcsTask.S_END_LOC); |
| | | List<Location> endList; |
| | | if (!string.IsNullOrEmpty(workFlow.ZONECODE)) |
| | | { |
| | | endList = LocationHelper.GetZoneLoc(workFlow.ZONECODE); |
| | | } |
| | | else |
| | | { |
| | | endList = LocationHelper.GetAllLocList1(workFlow.ENDAREA); |
| | | } |
| | | |
| | | var endList = LocationHelper.GetAllLocList1(workFlow.ENDAREA); |
| | | |
| | | var end = LocationHelper.FindBalanceEndcolByLocList(endList, workFlow.ENDAREA, workFlow.ROADWAY); |
| | | LogHelper.Info($"当前巷道不可用,需要改道,新终点信息" + JsonConvert.SerializeObject(end), "改道安全交互"); |
| | | LogHelper.Info($"当前任务{task.S_CODE},当前巷道不可用,需要改道,新终点信息" + JsonConvert.SerializeObject(end), "改道安全交互"); |
| | | if (end == null) |
| | | { |
| | | LogHelper.Info($"当前巷道不可用,终点库区{workFlow.ENDAREA},没找到终点", "改道安全交互"); |
| | |
| | | } |
| | | db.CommitTran(); |
| | | LogHelper.Info("绑定解绑", "结束"); |
| | | result.errMsg = "解绑完成"; |
| | | result.errCode = 0; |
| | | result.success = true; |
| | | return result; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | |
| | | LogHelper.Info("物料绑定解绑异常:" + e.Message, "物料绑定解绑"); |
| | | result.errMsg = "物料绑定解绑异常"; |
| | | result.errCode = 1; |
| | | result.success = false; |
| | | return result; |
| | | } |
| | | return result; |