| | |
| | | var rgv = new List<Dt_RGVLocationInfo>(); |
| | | var kls = new List<Dt_KLSLocationInfo>(); |
| | | var hk = new List<Dt_HKLocationInfo>(); |
| | | var pk = new List<Dt_StationInfo>(); |
| | | if (wMSUpdateLocationArea.WarehouseId == 1) |
| | | { |
| | | var rgvList = _rGVLocationInfoService.Repository.QueryData(x => wMSUpdateLocationArea.LocationCodes.Contains(x.LocationCode)).ToList(); |
| | |
| | | item.WarehouseId = wMSUpdateLocationArea.UpdateAreaCode.ObjToInt(); |
| | | } |
| | | hk.AddRange(hkList); |
| | | } |
| | | if (wMSUpdateLocationArea.WarehouseId == 4) |
| | | { |
| | | var pkList = _stationInfo.Repository.QueryData(x => wMSUpdateLocationArea.LocationCodes.Contains(x.StationCode)).ToList(); |
| | | foreach (var item in pk) |
| | | { |
| | | item.StationRegion = wMSUpdateLocationArea.UpdateAreaCode.ObjToInt(); |
| | | } |
| | | pk.AddRange(pkList); |
| | | } |
| | | Db.Ado.BeginTran(); |
| | | _rGVLocationInfoService.UpdateData(rgv); |
| | |
| | | } |
| | | content.OK(data: list); |
| | | } |
| | | else if (getLocationInfo.WarehouseId == 6) |
| | | { |
| | | List<Dt_StationInfo> StationInfo = new List<Dt_StationInfo>(); |
| | | if (!string.IsNullOrEmpty(getLocationInfo.AreaCode)) |
| | | StationInfo = _stationInfo.Repository.QueryData(x => x.StationRegion == getLocationInfo.AreaCode.ObjToInt()); |
| | | else |
| | | StationInfo = _stationInfo.Repository.QueryData(); |
| | | foreach (var item in StationInfo) |
| | | { |
| | | list.Add(new |
| | | { |
| | | LoctionCode = item.StationCode, |
| | | LocationStatus = item.StationStatus, |
| | | EnableStatus = item.IsOccupied, |
| | | PalletCode = item.PalletCode |
| | | }); |
| | | } |
| | | content.OK(data: list); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | string dataJson = wMSReturn.result.ToString(); |
| | | Exists? exists = JsonConvert.DeserializeObject<Exists>(dataJson); |
| | | if (exists == null) throw new Exception($"WMS杩斿洖缁撴灉鐨剅esult杞崲澶辫触"); |
| | | //濡傛灉鎴愬姛灏变笉杩斿洖 |
| | | if (exists.taskExists) return WebResponseContent.Instance.OK(); |
| | | //濡傛灉澶辫触浜嗗氨杩斿洖exists.errorAreaCode |
| | | return WebResponseContent.Instance.OK(exists.errorAreaCode); |
| | | } |
| | | catch (Exception ex) |