| | |
| | | } |
| | | } |
| | | |
| | | |
| | | public bool EditStorageLocat(EditLocateVm model,string url ,int userId) |
| | | public List<SysStorageLocat> GetStorageLocat() |
| | | { |
| | | try |
| | | { |
| | | var bl = LocatRst.EditStorageLocat(model.Id, model.Status, model.Flag, model.Temperature,url, userId); |
| | | var data = LocatRst.GetAll().ToList(); |
| | | return data; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | Console.WriteLine(e); |
| | | throw; |
| | | } |
| | | } |
| | | |
| | | public bool EditStorageLocat(EditLocateVm model, string url, int userId) |
| | | { |
| | | try |
| | | { |
| | | var bl = LocatRst.EditStorageLocat(model.Id,model.AreaNo, model.Status, model.Flag, model.Temperature, url, userId); |
| | | |
| | | return bl; |
| | | } |
| | |
| | | /// <summary> |
| | | /// 添加储位信息(立体库)用于开发人员添加基础信息 |
| | | /// </summary> |
| | | /// <param name="index">当前排数</param> |
| | | /// <param name="houseNo">仓库号</param> |
| | | /// <param name="roadwayNo">巷道号</param> |
| | | /// <param name="areaNo">区域号</param> |
| | |
| | | /// <param name="dept">深度</param> |
| | | /// <param name="userId">操作人</param> |
| | | /// <returns></returns> |
| | | public async Task<int> AddStorageLocat(string houseNo, string roadwayNo, string areaNo, int row, int col, int layer, string dept, int userId) |
| | | public async Task<int> AddStorageLocat(int index, string houseNo, string roadwayNo, string areaNo, int row, int col, int layer, string dept, int userId) |
| | | { |
| | | try |
| | | { |
| | | var q = 0; |
| | | //R01 -01 -01 -02 |
| | | //巷道–排-列-层 |
| | | for (int r = 12; r <= row; r++)//排 |
| | | for (int r = index; r <= row; r++)//排 |
| | | { |
| | | var r1 = "1"; |
| | | if (r < 10) |
| | |
| | | try |
| | | { |
| | | var q = 0; |
| | | var depth = 0; |
| | | var depthString = ""; |
| | | // 排(组)循环 |
| | | for (int i = 1; i <= model.Row; i++) |
| | | { |
| | | // 列循环 |
| | | for (int z = 1; z <= model.Col; z++) |
| | | { |
| | | if (z == 1) |
| | | { |
| | | depth += 1; |
| | | if (depth >= 10) |
| | | { |
| | | depthString = depth.ToString(); |
| | | } |
| | | else if (depth < 10) |
| | | { |
| | | depthString = "0" + depth.ToString(); |
| | | } |
| | | else { |
| | | //其余条件 |
| | | } |
| | | } |
| | | |
| | | q += await LocatRst.AddAsync(new SysStorageLocat() |
| | | { |
| | | // 区域+排+列+层 |
| | |
| | | AisleOne = "1", |
| | | AisleTwo = "", |
| | | Flag = "0", |
| | | Depth = z.ToString(), |
| | | Depth = depthString, |
| | | Row = i, |
| | | Column = z, |
| | | Layer = 1, |
| | |
| | | } |
| | | } |
| | | |
| | | public bool EditStorageLocatList(EditLocateListVm model,string url, int userId) |
| | | public bool EditStorageLocatList(EditLocateListVm model, string url, int userId) |
| | | { |
| | | try |
| | | { |
| | | var bl = LocatRst.EditStorageLocatList(model.Id, model.Status, model.Flag, model.Temperature, url, userId); |
| | | var bl = LocatRst.EditStorageLocatList(model.Id, model.AreaNo, model.Status, model.Flag, model.Temperature, url, userId); |
| | | |
| | | return bl; |
| | | } |
| | |
| | | // "B14", |
| | | // "B15", |
| | | //}; |
| | | string row1 = "'B01','B02','B03','B04','B05','B06','B07'"; |
| | | string row3 = "'B11','B12','B13','B14','B15'"; |
| | | string row1 = "'A06'"; |
| | | string row3 = "'A08'"; |
| | | string str = $"select * from SysStorageLocat where IsDel = '0' and WareHouseNo = '{wareHouseNo}' and "; |
| | | if (row == "1") |
| | | { |