| | |
| | | } |
| | | } |
| | | |
| | | public WebResponseContent setlocations(int k) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | if (k == 1) |
| | | { |
| | | List<Dt_LocationInfo> ben = BaseDal.QueryData(v => v.Id<=2537&&v.Id>=2526); |
| | | //鍒ゆ柇鏄惁鏈夎揣 |
| | | if (ben[0].LocationStatus == (int)LocationStatusEnum.InStock || ben[1].LocationStatus == (int)LocationStatusEnum.InStock || ben[2].LocationStatus == (int)LocationStatusEnum.InStock || ben[3].LocationStatus == (int)LocationStatusEnum.InStock || ben[4].LocationStatus == (int)LocationStatusEnum.InStock || ben[5].LocationStatus == (int)LocationStatusEnum.InStock || ben[6].LocationStatus == (int)LocationStatusEnum.InStock || ben[7].LocationStatus == (int)LocationStatusEnum.InStock || ben[8].LocationStatus == (int)LocationStatusEnum.InStock || ben[9].LocationStatus == (int)LocationStatusEnum.InStock || ben[10].LocationStatus == (int)LocationStatusEnum.InStock || ben[11].LocationStatus == (int)LocationStatusEnum.InStock) |
| | | { |
| | | return content.OK("2"); |
| | | } |
| | | //鍓旈櫎鏀规垚姝e父 |
| | | if (ben[0].LocationType == (int)LocationTypeEnum.Cube) |
| | | { |
| | | ben[0].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[1].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[1].EnableStatus = (int)EnableStatusEnum.Normal; |
| | | |
| | | ben[2].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[3].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[3].EnableStatus = (int)EnableStatusEnum.Normal; |
| | | |
| | | ben[4].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[5].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[5].EnableStatus = (int)EnableStatusEnum.Normal; |
| | | |
| | | ben[6].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[7].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[7].EnableStatus = (int)EnableStatusEnum.Normal; |
| | | |
| | | ben[8].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[9].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[9].EnableStatus = (int)EnableStatusEnum.Normal; |
| | | |
| | | ben[10].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[11].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[11].EnableStatus = (int)EnableStatusEnum.Normal; |
| | | BaseDal.UpdateData(ben); |
| | | return content.OK("1"); |
| | | } |
| | | //姝e父鏀规垚鍓旈櫎 |
| | | else |
| | | { |
| | | ben[0].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[1].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[1].EnableStatus = (int)EnableStatusEnum.Disable; |
| | | |
| | | ben[2].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[3].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[3].EnableStatus = (int)EnableStatusEnum.Disable; |
| | | |
| | | ben[4].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[5].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[5].EnableStatus = (int)EnableStatusEnum.Disable; |
| | | |
| | | ben[6].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[7].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[7].EnableStatus = (int)EnableStatusEnum.Disable; |
| | | |
| | | ben[8].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[9].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[9].EnableStatus = (int)EnableStatusEnum.Disable; |
| | | |
| | | ben[10].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[11].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[11].EnableStatus = (int)EnableStatusEnum.Disable; |
| | | BaseDal.UpdateData(ben); |
| | | return content.OK("1"); |
| | | } |
| | | } |
| | | else if (k == 2) |
| | | { |
| | | List<Dt_LocationInfo> ben = BaseDal.QueryData(v => v.Id <= 2515 && v.Id >= 2504); |
| | | //鍒ゆ柇鏄惁鏈夎揣 |
| | | if (ben[0].LocationStatus == (int)LocationStatusEnum.InStock || ben[1].LocationStatus == (int)LocationStatusEnum.InStock || ben[2].LocationStatus == (int)LocationStatusEnum.InStock || ben[3].LocationStatus == (int)LocationStatusEnum.InStock || ben[4].LocationStatus == (int)LocationStatusEnum.InStock || ben[5].LocationStatus == (int)LocationStatusEnum.InStock || ben[6].LocationStatus == (int)LocationStatusEnum.InStock || ben[7].LocationStatus == (int)LocationStatusEnum.InStock || ben[8].LocationStatus == (int)LocationStatusEnum.InStock || ben[9].LocationStatus == (int)LocationStatusEnum.InStock || ben[10].LocationStatus == (int)LocationStatusEnum.InStock || ben[11].LocationStatus == (int)LocationStatusEnum.InStock) |
| | | { |
| | | return content.OK("2"); |
| | | } |
| | | //鍓旈櫎鏀规垚姝e父 |
| | | if (ben[0].LocationType == (int)LocationTypeEnum.Cube) |
| | | { |
| | | ben[0].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[1].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[1].EnableStatus = (int)EnableStatusEnum.Normal; |
| | | |
| | | ben[2].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[3].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[3].EnableStatus = (int)EnableStatusEnum.Normal; |
| | | |
| | | ben[4].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[5].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[5].EnableStatus = (int)EnableStatusEnum.Normal; |
| | | |
| | | ben[6].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[7].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[7].EnableStatus = (int)EnableStatusEnum.Normal; |
| | | |
| | | ben[8].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[9].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[9].EnableStatus = (int)EnableStatusEnum.Normal; |
| | | |
| | | ben[10].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[11].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[11].EnableStatus = (int)EnableStatusEnum.Normal; |
| | | BaseDal.UpdateData(ben); |
| | | return content.OK("1"); |
| | | } |
| | | //姝e父鏀规垚鍓旈櫎 |
| | | else |
| | | { |
| | | ben[0].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[1].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[1].EnableStatus = (int)EnableStatusEnum.Disable; |
| | | |
| | | ben[2].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[3].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[3].EnableStatus = (int)EnableStatusEnum.Disable; |
| | | |
| | | ben[4].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[5].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[5].EnableStatus = (int)EnableStatusEnum.Disable; |
| | | |
| | | ben[6].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[7].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[7].EnableStatus = (int)EnableStatusEnum.Disable; |
| | | |
| | | ben[8].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[9].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[9].EnableStatus = (int)EnableStatusEnum.Disable; |
| | | |
| | | ben[10].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[11].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[11].EnableStatus = (int)EnableStatusEnum.Disable; |
| | | BaseDal.UpdateData(ben); |
| | | return content.OK("1"); |
| | | } |
| | | } |
| | | else if (k == 3) |
| | | { |
| | | List<Dt_LocationInfo> ben = BaseDal.QueryData(v => v.Id <= 2493 && v.Id >= 2482); |
| | | //鍒ゆ柇鏄惁鏈夎揣 |
| | | if (ben[0].LocationStatus == (int)LocationStatusEnum.InStock || ben[1].LocationStatus == (int)LocationStatusEnum.InStock || ben[2].LocationStatus == (int)LocationStatusEnum.InStock || ben[3].LocationStatus == (int)LocationStatusEnum.InStock || ben[4].LocationStatus == (int)LocationStatusEnum.InStock || ben[5].LocationStatus == (int)LocationStatusEnum.InStock || ben[6].LocationStatus == (int)LocationStatusEnum.InStock || ben[7].LocationStatus == (int)LocationStatusEnum.InStock || ben[8].LocationStatus == (int)LocationStatusEnum.InStock || ben[9].LocationStatus == (int)LocationStatusEnum.InStock || ben[10].LocationStatus == (int)LocationStatusEnum.InStock || ben[11].LocationStatus == (int)LocationStatusEnum.InStock) |
| | | { |
| | | return content.OK("2"); |
| | | } |
| | | //鍓旈櫎鏀规垚姝e父 |
| | | if (ben[0].LocationType == (int)LocationTypeEnum.Cube) |
| | | { |
| | | ben[0].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[1].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[1].EnableStatus = (int)EnableStatusEnum.Normal; |
| | | |
| | | ben[2].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[3].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[3].EnableStatus = (int)EnableStatusEnum.Normal; |
| | | |
| | | ben[4].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[5].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[5].EnableStatus = (int)EnableStatusEnum.Normal; |
| | | |
| | | ben[6].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[7].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[7].EnableStatus = (int)EnableStatusEnum.Normal; |
| | | |
| | | ben[8].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[9].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[9].EnableStatus = (int)EnableStatusEnum.Normal; |
| | | |
| | | ben[10].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[11].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[11].EnableStatus = (int)EnableStatusEnum.Normal; |
| | | BaseDal.UpdateData(ben); |
| | | return content.OK("1"); |
| | | } |
| | | //姝e父鏀规垚鍓旈櫎 |
| | | else |
| | | { |
| | | ben[0].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[1].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[1].EnableStatus = (int)EnableStatusEnum.Disable; |
| | | |
| | | ben[2].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[3].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[3].EnableStatus = (int)EnableStatusEnum.Disable; |
| | | |
| | | ben[4].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[5].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[5].EnableStatus = (int)EnableStatusEnum.Disable; |
| | | |
| | | ben[6].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[7].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[7].EnableStatus = (int)EnableStatusEnum.Disable; |
| | | |
| | | ben[8].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[9].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[9].EnableStatus = (int)EnableStatusEnum.Disable; |
| | | |
| | | ben[10].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[11].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[11].EnableStatus = (int)EnableStatusEnum.Disable; |
| | | BaseDal.UpdateData(ben); |
| | | return content.OK("1"); |
| | | } |
| | | } |
| | | else if (k == 4) |
| | | { |
| | | List<Dt_LocationInfo> ben = BaseDal.QueryData(v => v.Id <= 2471 && v.Id >= 2460); |
| | | //鍒ゆ柇鏄惁鏈夎揣 |
| | | if (ben[0].LocationStatus == (int)LocationStatusEnum.InStock || ben[1].LocationStatus == (int)LocationStatusEnum.InStock || ben[2].LocationStatus == (int)LocationStatusEnum.InStock || ben[3].LocationStatus == (int)LocationStatusEnum.InStock || ben[4].LocationStatus == (int)LocationStatusEnum.InStock || ben[5].LocationStatus == (int)LocationStatusEnum.InStock || ben[6].LocationStatus == (int)LocationStatusEnum.InStock || ben[7].LocationStatus == (int)LocationStatusEnum.InStock || ben[8].LocationStatus == (int)LocationStatusEnum.InStock || ben[9].LocationStatus == (int)LocationStatusEnum.InStock || ben[10].LocationStatus == (int)LocationStatusEnum.InStock || ben[11].LocationStatus == (int)LocationStatusEnum.InStock) |
| | | { |
| | | return content.OK("2"); |
| | | } |
| | | //鍓旈櫎鏀规垚姝e父 |
| | | if (ben[0].LocationType == (int)LocationTypeEnum.Cube) |
| | | { |
| | | ben[0].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[1].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[1].EnableStatus = (int)EnableStatusEnum.Normal; |
| | | |
| | | ben[2].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[3].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[3].EnableStatus = (int)EnableStatusEnum.Normal; |
| | | |
| | | ben[4].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[5].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[5].EnableStatus = (int)EnableStatusEnum.Normal; |
| | | |
| | | ben[6].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[7].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[7].EnableStatus = (int)EnableStatusEnum.Normal; |
| | | |
| | | ben[8].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[9].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[9].EnableStatus = (int)EnableStatusEnum.Normal; |
| | | |
| | | ben[10].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[11].LocationType = (int)LocationTypeEnum.Flat; |
| | | ben[11].EnableStatus = (int)EnableStatusEnum.Normal; |
| | | BaseDal.UpdateData(ben); |
| | | return content.OK("1"); |
| | | } |
| | | //姝e父鏀规垚鍓旈櫎 |
| | | else |
| | | { |
| | | ben[0].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[1].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[1].EnableStatus = (int)EnableStatusEnum.Disable; |
| | | |
| | | ben[2].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[3].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[3].EnableStatus = (int)EnableStatusEnum.Disable; |
| | | |
| | | ben[4].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[5].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[5].EnableStatus = (int)EnableStatusEnum.Disable; |
| | | |
| | | ben[6].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[7].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[7].EnableStatus = (int)EnableStatusEnum.Disable; |
| | | |
| | | ben[8].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[9].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[9].EnableStatus = (int)EnableStatusEnum.Disable; |
| | | |
| | | ben[10].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[11].LocationType = (int)LocationTypeEnum.Cube; |
| | | ben[11].EnableStatus = (int)EnableStatusEnum.Disable; |
| | | BaseDal.UpdateData(ben); |
| | | return content.OK("1"); |
| | | } |
| | | } |
| | | return content.OK("4"); |
| | | } |
| | | } |
| | | |
| | | public class LocationConfig |