add - 铝内胆设备OEE趋势

master
wenjy 2 years ago
parent ed83662cc5
commit a7ba9dc161

@ -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);
}

@ -23,8 +23,10 @@ public class AluminumOeeStatistics implements Serializable {
@TableField("OEE")
public String xValue;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
@TableField(exist = false)
public String yValue;
@TableField("CREATETIME")
public Date yValue;
public Date createTime;
}

Loading…
Cancel
Save