change - 样式修改

master
wenjy 2 years ago
parent c79e442a94
commit 83f0315813

@ -84,7 +84,7 @@ public class AluminumLinerkController {
List<AluminumOeeStatistics> oeeStatisticsList = aluminumDeviceInfoService.getOeeStatisticsList();
if(oeeStatisticsList.size()>0){
oeeStatisticsList.forEach(x->{
x.setYValue(hourFormat.format(x.getCreateTime()));
x.setXValue(hourFormat.format(x.getCreateTime()));
});
}
return JSONArray.toJSONString(oeeStatisticsList);

@ -115,7 +115,15 @@ public class FoamBoxController {
@GetMapping("/getMouldTemperature")
@ResponseBody
public String getMouldTemperature(String ids){
String s = ifamBoxDeviceInfoService.getMouldTemperature(ids);
String s = ifamBoxDeviceInfoService.getMouldTemperature(ids,0);
return s;
}
@GetMapping("/getMouldTemperature2")
@ResponseBody
public String getMouldTemperature2(String ids){
String s = ifamBoxDeviceInfoService.getMouldTemperature(ids,1);
return s;
}

@ -59,12 +59,6 @@ public class TankShellDeviceController {
jsonObjectList.add(jsonObject);
});
}
for (int i = 0;i<5;i++){
JSONObject jsonObject = new JSONObject();
jsonObject.put("name",i);
jsonObject.put("value",i);
jsonObjectList.add(jsonObject);
}
String s = JSONArray.toJSONString(jsonObjectList);
return s;
}

@ -20,10 +20,10 @@ import java.util.Date;
@TableName("SCADA_LCB_DEVICEINFO_4")
public class AluminumOeeStatistics implements Serializable {
@TableField("OEE")
@TableField(exist = false)
public String xValue;
@TableField(exist = false)
@TableField("OEE")
public String yValue;
@TableField("CREATETIME")

@ -31,12 +31,12 @@ public class TankShellDevicePrameterValue implements Serializable {
@TableField("prameterValue")
private String prameterValue;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "HH:mm:ss")
@TableField("createtime")
private Date createTime;
public String getCreateTime() {
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(createTime);
return new SimpleDateFormat("HH:mm:ss").format(createTime);
}
public void setCreateTime(Date createTime) {

@ -14,7 +14,7 @@ import java.util.List;
@Mapper
public interface TankShellDevicePrameterValueMapper extends BaseMapper<TankShellDevicePrameterValue> {
@Select("select t2.DEVICEID,t2.PRAMETERNAME, t2.VALUE as PRAMETERVALUE, t2.CREATETIME\n"
@Select("select t2.DEVICEID,t2.PRAMETERNAME, to_char(t2.VALUE,'fm9999990.00') as PRAMETERVALUE, t2.CREATETIME\n"
+ "from (select * from BASIC_SCADA_DEVICEPARAMETER@SCADA_DBLINK where Device_id = 'XKCX001' and PARAMETER_ID = '2') t1\n"
+ " left join SCADA_PRAMERTER_VALUE t2 on t1.PARAMETER_NAME = t2.PRAMETERNAME\n"
+ "where CREATETIME = (select max(CREATETIME) from SCADA_PRAMERTER_VALUE where DEVICEID = T2.DEVICEID)")

@ -33,5 +33,5 @@ public interface IFoamBoxDeviceInfoService {
* @param ids
* @return java.lang.String
*/
String getMouldTemperature(String ids);
String getMouldTemperature(String ids,int number);
}

@ -168,7 +168,7 @@ public class FoamBoxDeviceInfoServiceImpl implements IFoamBoxDeviceInfoService {
* @return java.lang.String
*/
@Override
public String getMouldTemperature(String ids) {
public String getMouldTemperature(String ids,int number) {
List<String> xValueList = new ArrayList<>();
List<String> interiorList = new ArrayList<>();
@ -180,8 +180,11 @@ public class FoamBoxDeviceInfoServiceImpl implements IFoamBoxDeviceInfoService {
case "0":
List<String> deviceId = new ArrayList<String>(){
{
this.add("FPX003");
this.add("FPX004");
if(number == 0){
this.add("FPX003");
}else{
this.add("FPX004");
}
}
};
wrapper.in("DEVICEID", deviceId);
@ -189,8 +192,11 @@ public class FoamBoxDeviceInfoServiceImpl implements IFoamBoxDeviceInfoService {
case "1":
List<String> deviceId2 = new ArrayList<String>(){
{
this.add("FPX001");
this.add("FPX002");
if(number == 0){
this.add("FPX001");
}else{
this.add("FPX002");
}
}
};
wrapper.in("DEVICEID", deviceId2);
@ -226,49 +232,6 @@ public class FoamBoxDeviceInfoServiceImpl implements IFoamBoxDeviceInfoService {
interiorList.add(interior.get(i).getPameterValue());
lateralList.add(interior.get(i).getPameterValue());
}
}else{
xValueList.add("A区1#模具");
xValueList.add("A区2#模具");
xValueList.add("A区3#模具");
xValueList.add("A区4#模具");
xValueList.add("A区5#模具");
xValueList.add("A区6#模具");
xValueList.add("B区1#模具");
xValueList.add("B区2#模具");
xValueList.add("B区3#模具");
xValueList.add("B区4#模具");
xValueList.add("B区5#模具");
xValueList.add("B区6#模具");
interiorList.add("12");
interiorList.add("12");
interiorList.add("12");
interiorList.add("12");
interiorList.add("12");
interiorList.add("12");
interiorList.add("11");
interiorList.add("11");
interiorList.add("11");
interiorList.add("11");
interiorList.add("11");
interiorList.add("11");
lateralList.add("17");
lateralList.add("17");
lateralList.add("17");
lateralList.add("17");
lateralList.add("17");
lateralList.add("17");
lateralList.add("9");
lateralList.add("9");
lateralList.add("9");
lateralList.add("9");
lateralList.add("9");
lateralList.add("9");
}
JSONObject jsonObject = new JSONObject();

@ -153,7 +153,7 @@ public class TankShellDeviceInfoServiceImpl implements ITankShellDeviceInfoServi
String[] xValueArray = new String[tankShellEnergyConsumptions.size()];
for (int i = 0;i< tankShellEnergyConsumptions.size();i++){
productionArray[i] = tankShellEnergyConsumptions.get(i).getEnergy();
productionArray[i] = tankShellEnergyConsumptions.get(i).getProduction();
energyArray[i] = tankShellEnergyConsumptions.get(i).getEnergy();
xValueArray[i] = dateFormat.format(tankShellEnergyConsumptions.get(i).getCreateTime());
}

@ -4,7 +4,7 @@ $(() => {
$.getJSON('/aluminumLiner/getDataInformation', function (result) {
const statusArray = [1, 0, 0, 0, 0];
if (result.length > 0) {
statusArray[0] = result[0].deviceStatus == "正常" ? 1 : 0;
statusArray[0] = result[0].deviceStatus;
statusArray[1] = result[0].devicePower;
statusArray[2] = result[0].deviceEnergy;
}

@ -43,7 +43,7 @@ $(() => {
top: '10%',
left: '6%',
right: '6%',
bottom: '0',
bottom: '10%',
containLabel: true
},
tooltip: {
@ -110,7 +110,7 @@ $(() => {
$.getJSON(`/foamBox/getMouldTemperature?ids=${ids}`, function (result) {
temperature(result, document.getElementById("temperatureOne"));
});
$.getJSON(`/foamBox/getMouldTemperature?ids=${ids}`, function (result) {
$.getJSON(`/foamBox/getMouldTemperature2?ids=${ids}`, function (result) {
temperature(result, document.getElementById("temperatureTwo"));
});
@ -120,12 +120,12 @@ $(() => {
const deviceStatus = (statusArray) => {
let info = `<table style="width: 100%;height:100%;">
<tr style="width: 100%;">
<td style="border:0px solid red;text-align:center;"><img src="../../img/foamBox/${statusArray[0] == 0 ? "deviceopen.png" : "deviceclose.png"}" style="width: 30px;height: 30px;"/></td>
<td style="border:0px solid red;text-align:center;"><img src="../../img/foamBox/${statusArray[1] == 0 ? "deviceopen.png" : "deviceclose.png"}" style="width: 30px;height: 30px;"/></td>
<td style="border:0px solid red;text-align:center;"><img src="../../img/foamBox/${statusArray[2] == 0 ? "deviceopen.png" : "deviceclose.png"}" style="width: 30px;height: 30px;"/></td>
<td style="border:0px solid red;text-align:center;"><img src="../../img/foamBox/${statusArray[3] == 0 ? "deviceopen.png" : "deviceclose.png"}" style="width: 30px;height: 30px;"/></td>
<td style="border:0px solid red;text-align:right;padding-right: 12px;"><img src="../../img/foamBox/${statusArray[4] == 0 ? "deviceopen.png" : "deviceclose.png"}" style="width: 30px;height: 30px;"/></td>
<td style="border:0px solid red;text-align:right;"><img src="../../img/foamBox/${statusArray[5] == 0 ? "deviceopen.png" : "deviceclose.png"}" style="width: 30px;height: 30px;"/></td>
<td style="border:0px solid red;text-align:center;"><img src="../../img/foamBox/${statusArray[0] == 1 ? "deviceopen.png" : "deviceclose.png"}" style="width: 30px;height: 30px;"/></td>
<td style="border:0px solid red;text-align:center;"><img src="../../img/foamBox/${statusArray[1] == 1 ? "deviceopen.png" : "deviceclose.png"}" style="width: 30px;height: 30px;"/></td>
<td style="border:0px solid red;text-align:center;"><img src="../../img/foamBox/${statusArray[2] == 1 ? "deviceopen.png" : "deviceclose.png"}" style="width: 30px;height: 30px;"/></td>
<td style="border:0px solid red;text-align:center;"><img src="../../img/foamBox/${statusArray[3] == 1 ? "deviceopen.png" : "deviceclose.png"}" style="width: 30px;height: 30px;"/></td>
<td style="border:0px solid red;text-align:right;padding-right: 12px;"><img src="../../img/foamBox/${statusArray[4] == 1 ? "deviceopen.png" : "deviceclose.png"}" style="width: 30px;height: 30px;"/></td>
<td style="border:0px solid red;text-align:right;"><img src="../../img/foamBox/${statusArray[5] == 1 ? "deviceopen.png" : "deviceclose.png"}" style="width: 30px;height: 30px;"/></td>
</tr>
</table>`;

@ -24,7 +24,7 @@ $(() => {
});
const tableRes = {}
//生产计划
//设备信息
const getTable = () => {
$.ajax({
url: '/tankShellDevice/getDeviceParameterValue',
@ -35,8 +35,8 @@ $(() => {
console.log(res.length +'+'+ tableRes.data?.length);
$('#productionPlan').remove()
$('.scrollTable').html('<div class="productionPlan" id="productionPlan"></div>')
tableRes.data = res.map(val => [val.deviceId, val.prameterName, val.prameterValue, val.createTime,])
tableRes.header = ['设备名称', '参数名称', '当前值', '时间',]
tableRes.data = res.map(val => [val.prameterName, val.prameterValue, val.createTime,])
tableRes.header = ['参数名称', '当前值', '时间',]
dynamicTable({
el: '#productionPlan',
rowNum: 5,
@ -49,7 +49,7 @@ $(() => {
headerBGC: 'rgba(8,36,75,0.2)',
oddRowBGC: 'rgba(8,36,75,0.2)',
evenRowBGC: 'rgba(6,25,57,0.2)',
colWidth: ['100%', '100%', '40%', '160%',]
colWidth: ['250%', '50%', '50%',]
});
},
error: function (e) {

Loading…
Cancel
Save