change - 样式修改

master
wenjy 2 years ago
parent c79e442a94
commit 83f0315813

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

@ -115,7 +115,15 @@ public class FoamBoxController {
@GetMapping("/getMouldTemperature") @GetMapping("/getMouldTemperature")
@ResponseBody @ResponseBody
public String getMouldTemperature(String ids){ 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; return s;
} }

@ -59,12 +59,6 @@ public class TankShellDeviceController {
jsonObjectList.add(jsonObject); 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); String s = JSONArray.toJSONString(jsonObjectList);
return s; return s;
} }

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

@ -31,12 +31,12 @@ public class TankShellDevicePrameterValue implements Serializable {
@TableField("prameterValue") @TableField("prameterValue")
private String prameterValue; private String prameterValue;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "HH:mm:ss")
@TableField("createtime") @TableField("createtime")
private Date createTime; private Date createTime;
public String getCreateTime() { 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) { public void setCreateTime(Date createTime) {

@ -14,7 +14,7 @@ import java.util.List;
@Mapper @Mapper
public interface TankShellDevicePrameterValueMapper extends BaseMapper<TankShellDevicePrameterValue> { 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" + "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" + " 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)") + "where CREATETIME = (select max(CREATETIME) from SCADA_PRAMERTER_VALUE where DEVICEID = T2.DEVICEID)")

@ -33,5 +33,5 @@ public interface IFoamBoxDeviceInfoService {
* @param ids * @param ids
* @return java.lang.String * @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 * @return java.lang.String
*/ */
@Override @Override
public String getMouldTemperature(String ids) { public String getMouldTemperature(String ids,int number) {
List<String> xValueList = new ArrayList<>(); List<String> xValueList = new ArrayList<>();
List<String> interiorList = new ArrayList<>(); List<String> interiorList = new ArrayList<>();
@ -180,18 +180,24 @@ public class FoamBoxDeviceInfoServiceImpl implements IFoamBoxDeviceInfoService {
case "0": case "0":
List<String> deviceId = new ArrayList<String>(){ List<String> deviceId = new ArrayList<String>(){
{ {
if(number == 0){
this.add("FPX003"); this.add("FPX003");
}else{
this.add("FPX004"); this.add("FPX004");
} }
}
}; };
wrapper.in("DEVICEID", deviceId); wrapper.in("DEVICEID", deviceId);
break; break;
case "1": case "1":
List<String> deviceId2 = new ArrayList<String>(){ List<String> deviceId2 = new ArrayList<String>(){
{ {
if(number == 0){
this.add("FPX001"); this.add("FPX001");
}else{
this.add("FPX002"); this.add("FPX002");
} }
}
}; };
wrapper.in("DEVICEID", deviceId2); wrapper.in("DEVICEID", deviceId2);
break; break;
@ -226,49 +232,6 @@ public class FoamBoxDeviceInfoServiceImpl implements IFoamBoxDeviceInfoService {
interiorList.add(interior.get(i).getPameterValue()); interiorList.add(interior.get(i).getPameterValue());
lateralList.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(); JSONObject jsonObject = new JSONObject();

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

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

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

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

Loading…
Cancel
Save