[後台]後端 buildController getallfloor order by 程序補上 | 取得水電列表 api 調整
This commit is contained in:
		
							parent
							
								
									a55aa592c7
								
							
						
					
					
						commit
						0adecac5d8
					
				@ -707,7 +707,7 @@ namespace FrontendWebApi.ApiControllers
 | 
			
		||||
                      SELECT 
 | 
			
		||||
	                    floor_guid,full_name,building_tag
 | 
			
		||||
                      FROM floor
 | 
			
		||||
                      where building_tag = @building_tag and deleted = 0";
 | 
			
		||||
                      where building_tag = @building_tag and deleted = 0 order by priority";
 | 
			
		||||
                var floor = await backendRepository.GetAllAsync<Floor>(sWhere, new { building_tag = building_tag });
 | 
			
		||||
 | 
			
		||||
                apiResult.Data = floor;
 | 
			
		||||
 | 
			
		||||
@ -53,6 +53,12 @@ namespace FrontendWebApi.ApiControllers
 | 
			
		||||
                apiResult.Msg = "表單類別錯誤";
 | 
			
		||||
                return BadRequest(apiResult);
 | 
			
		||||
            }
 | 
			
		||||
            else if (input.floor_tag.Count == 0)
 | 
			
		||||
            {
 | 
			
		||||
                apiResult.Code = "0000";
 | 
			
		||||
                apiResult.Data = new List<HydroMeterOutput>() { };
 | 
			
		||||
                return Ok(apiResult);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            try
 | 
			
		||||
            {
 | 
			
		||||
@ -172,6 +178,12 @@ namespace FrontendWebApi.ApiControllers
 | 
			
		||||
                apiResult.Msg = "表單類別錯誤";
 | 
			
		||||
                return BadRequest(apiResult);
 | 
			
		||||
            }
 | 
			
		||||
            else if (input.floor_tag.Count == 0)
 | 
			
		||||
            {
 | 
			
		||||
                apiResult.Code = "0000";
 | 
			
		||||
                apiResult.Data = new List<HydroMeterOutput>() { };
 | 
			
		||||
                return Ok(apiResult);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            try
 | 
			
		||||
            {
 | 
			
		||||
@ -282,7 +294,7 @@ namespace FrontendWebApi.ApiControllers
 | 
			
		||||
            try
 | 
			
		||||
            {
 | 
			
		||||
                apiResult.Code = "0000";
 | 
			
		||||
                apiResult.Data = await backendRepository.GetOneAsync<decimal>($@"select system_value from variable where system_type = {input.type}Price and deleted = 0");
 | 
			
		||||
                apiResult.Data = await backendRepository.GetOneAsync<decimal>($@"select system_value from variable where system_type = '{input.type}Price' and deleted = 0");
 | 
			
		||||
            }
 | 
			
		||||
            catch (Exception exception)
 | 
			
		||||
            {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user