|  | @@ -237,6 +237,38 @@ public class PatientCriticalValuesService {
 | 
	
		
			
				|  |  |          return ResultVoUtil.success(list);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    public ResultVo<List<CriticalValue>> getExportCriticalValues(String label) {
 | 
	
		
			
				|  |  | +        String[] dateArr = getDateArrByLabel(label);
 | 
	
		
			
				|  |  | +        List<CriticalValue> list = dao.selectExportInpatientCriticalValues(dateArr[0], dateArr[1]);
 | 
	
		
			
				|  |  | +        if (list.isEmpty()) {
 | 
	
		
			
				|  |  | +            return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        return ResultVoUtil.success(list);
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    private String[] getDateArrByLabel(String label) {
 | 
	
		
			
				|  |  | +        String end = DateUtil.formatDate(new Date()) + " 23:59:59";
 | 
	
		
			
				|  |  | +        String start;
 | 
	
		
			
				|  |  | +        switch (label) {
 | 
	
		
			
				|  |  | +            case "1week":
 | 
	
		
			
				|  |  | +                start = DateUtil.getOffsetDate(-7) + " 00:00:00";
 | 
	
		
			
				|  |  | +                return new String[]{start, end};
 | 
	
		
			
				|  |  | +            case "1month":
 | 
	
		
			
				|  |  | +                start = DateUtil.getOffsetDate(-30) + " 00:00:00";
 | 
	
		
			
				|  |  | +                return new String[]{start, end};
 | 
	
		
			
				|  |  | +            case "3months":
 | 
	
		
			
				|  |  | +                start = DateUtil.getOffsetDate(-90) + " 00:00:00";
 | 
	
		
			
				|  |  | +                return new String[]{start, end};
 | 
	
		
			
				|  |  | +            case "6months":
 | 
	
		
			
				|  |  | +                start = DateUtil.getOffsetDate(-180) + " 00:00:00";
 | 
	
		
			
				|  |  | +                return new String[]{start, end};
 | 
	
		
			
				|  |  | +            case "1year":
 | 
	
		
			
				|  |  | +            default:
 | 
	
		
			
				|  |  | +                start = DateUtil.getOffsetDate(-365) + " 00:00:00";
 | 
	
		
			
				|  |  | +                return new String[]{start, end};
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      public ResultVo<String> handleZyCriticalValue(Integer id) {
 | 
	
		
			
				|  |  |          String handleStaff = TokenUtil.getInstance().getTokenUserId();
 | 
	
		
			
				|  |  |          String url = "http://192.168.200.6:8320/hospitalAppsApi/criticalValue/updateState?user=" + handleStaff + "&id=" + id;
 |