| | |
| | | } |
| | | else if (taskData.taskType == 5)//移库流程,直接使用起点货位和终点货位生成任务,并绑定托盘 |
| | | { |
| | | note = "出库"; |
| | | //创建托盘物料绑定信息,并计算终点货位 |
| | | if (CreateCntrIteminfo(partData, taskData)) |
| | | { |
| | |
| | | var whcode = Settings.wareLoc.Where(a => a.AreaCode == startloc.S_WH_CODE).FirstOrDefault(); |
| | | if (whcode != null) |
| | | { |
| | | if (startloc.S_NOTE == "PM" || string.IsNullOrEmpty(startloc.S_NOTE)) |
| | | if ( string.IsNullOrEmpty(startloc.S_NOTE)) |
| | | { |
| | | areacode = whcode.PMK; |
| | | } |
| | |
| | | Z_TYPE = 5 |
| | | |
| | | }; |
| | | LogHelper.Info("创建出平库任务:" + JsonConvert.SerializeObject(wcsTask)); |
| | | LogHelper.Info("创建呼叫空托任务:" + JsonConvert.SerializeObject(wcsTask)); |
| | | if (WCSHelper.CreateTask(wcsTask)) |
| | | { |
| | | LocationHelper.LockLoc(Start, 2); |
| | |
| | | |
| | | LocationHelper.UnBindingLoc(loc, new List<string>() { cntrcode }); |
| | | // db.Deleteable<LocCntrRel>().Where(it => it.S_LOC_CODE.Trim() == loc).ExecuteCommand(); |
| | | db.Deleteable<CntrItemDetail>().Where(it => it.S_CNTR_CODE.Trim() == cntrcode).ExecuteCommand(); |
| | | if (db.Deleteable<CntrItemDetail>().Where(it => it.S_CNTR_CODE == cntrcode).ExecuteCommand() > 0) |
| | | { |
| | | LogHelper.Info($"ClearLoc 库位清除成功"); |
| | | } |
| | | else |
| | | { |
| | | LogHelper.Info($"ClearLoc 库位清除失败"); |
| | | result.code = "1"; |
| | | result.msg = "库位清除失败"; |
| | | AddErrorInfo("库位清除失败", result.msg, Source); |
| | | return result; |
| | | } |
| | | |
| | | } |
| | | else |