| | |
| | | } |
| | | |
| | | #region åå§ååºä½ |
| | | public async Task<WebResponseContent> initializeLocation(int locationID) |
| | | public async Task<WebResponseContent> initializeLocation(string locationCode) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | DtLocationInfo? location = BaseDal.QueryData(x => x.Id == locationID).FirstOrDefault(); |
| | | DtLocationInfo? location = BaseDal.QueryData(x => x.LocationCode == locationCode).FirstOrDefault(); |
| | | int LastStatus = location.LocationStatus; |
| | | if (location == null) |
| | | { |
| | | return content.Error("æªæ¾å°è´§ä½ä¿¡æ¯!"); |
| | | } |
| | | DtStockInfo stock = _stockInfoRepository.QueryFirst(x => x.LocationId == location.Id); |
| | | DtStockInfo stock = _stockInfoRepository.QueryFirst(x => x.LocationCode == location.LocationCode); |
| | | if(stock == null) |
| | | { |
| | | location.LocationStatus= (int)LocationEnum.Free; |
| | | _locationStatusChangeRecordRepository.AddLocationStatusChangeRecord(location, LastStatus, (int)StatusChangeTypeEnum.ManualOperation, 0); |
| | | BaseDal.UpdateData(location); |
| | | } |
| | | else |