| | |
| | | internal static ReturnResult JBIn(JBInModel model) |
| | | { |
| | | ReturnResult result = new ReturnResult() { ResultCode = -1 }; |
| | | var db = new SqlHelper<object>().GetInstance(); |
| | | string cntrCode = Guid.NewGuid().ToString("N"); |
| | | string batch = ""; |
| | | if (model.S_ITEM_TYPE == "小包装盖") |
| | |
| | | batch = "大包装盖"; |
| | | } |
| | | //创建作业 |
| | | LogHelper.Info($"JBIn:{model.S_LOC_CODE},{cntrCode},{"指定库区-" + model.S_END_AREA}"); |
| | | if(WMSHelper.CreateOpTask(model.S_LOC_CODE, "", "入库", "接驳位入库", cntrCode, "指定库区-" + model.S_END_AREA)) |
| | | var locInfo = db.Queryable<Location>().Where(a => a.S_CODE == model.S_LOC_CODE && a.S_LOCK_STATE == "无").First(); |
| | | if(locInfo != null) |
| | | { |
| | | TaskProcess.BindLocCntr(model.S_LOC_CODE, cntrCode, model.S_ITEM_CODE, batch); |
| | | result.ResultCode = 0; |
| | | LogHelper.Info($"JBIn:{model.S_LOC_CODE},{cntrCode},{"指定库区-" + model.S_END_AREA}"); |
| | | if (WMSHelper.CreateOpTask(model.S_LOC_CODE, "", "入库", "接驳位入库", cntrCode, "指定库区-" + model.S_END_AREA)) |
| | | { |
| | | TaskProcess.BindLocCntr(model.S_LOC_CODE, cntrCode, model.S_ITEM_CODE, batch); |
| | | result.ResultCode = 0; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | result.ResultMsg = $"该点位不存在或者有锁,货位编码:{model.S_LOC_CODE}"; |
| | | } |
| | | |
| | | |
| | | return result; |
| | | } |