|
|
|
@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
@ -29,6 +30,8 @@ public class AluminumLinerkController {
|
|
|
|
|
@Autowired
|
|
|
|
|
private IAluminumDeviceInfoService aluminumDeviceInfoService;
|
|
|
|
|
|
|
|
|
|
private SimpleDateFormat hourFormat = new SimpleDateFormat("HH");
|
|
|
|
|
|
|
|
|
|
@GetMapping()
|
|
|
|
|
public String index()
|
|
|
|
|
{
|
|
|
|
@ -65,6 +68,11 @@ public class AluminumLinerkController {
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public String oeeStatistics() {
|
|
|
|
|
List<AluminumOeeStatistics> oeeStatisticsList = aluminumDeviceInfoService.getOeeStatisticsList();
|
|
|
|
|
if(oeeStatisticsList.size()>0){
|
|
|
|
|
oeeStatisticsList.forEach(x->{
|
|
|
|
|
x.setYValue(hourFormat.format(x.getCreateTime()));
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
return JSONArray.toJSONString(oeeStatisticsList);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|