| 
					
				 | 
			
			
				@@ -5,6 +5,8 @@ import com.jjt.biz.service.ITwinDeviceService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.jjt.biz.vo.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.jjt.calc.domain.TwinCalcDay; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.jjt.calc.service.ITwinCalcDayService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.jjt.calc.service.ITwinCalcHourSpecService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.jjt.calc.vo.SpecVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.jjt.common.constant.CacheConstants; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.jjt.common.core.controller.BaseController; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.jjt.common.core.domain.R; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -48,6 +50,8 @@ public class ApiController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private AsyncService asyncService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Resource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private RedisCache redisCache; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Resource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private ITwinCalcHourSpecService specService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation("在线设备") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @GetMapping("/api/device/online") 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -206,11 +210,15 @@ public class ApiController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation("配方详情") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @GetMapping("/api/formula/detail/{height}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @CrossOrigin(origins = "*") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public R<List<FormulaDetail>> formulaDetail(@PathVariable Float height) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public R formulaDetail(@PathVariable Float height, String month) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Map<String, Object> result = new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<FormulaDetail> list = redisCache.getCacheObject(CacheConstants.INDEX_FORMULA_DETAIL); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (list != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             list = list.stream().filter(detail -> detail.getFormula_data_15().equals(height)).collect(Collectors.toList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            return R.success(list); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            result.put("curr", list); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            List<SpecVO> specs = specService.selectSpec(month, height); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            result.put("his", specs); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return R.success(result); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return R.fail(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 |