add - 铝内胆能耗产量统计

master
wenjy 2 years ago
parent 2dc6e93650
commit 409c25584a

@ -14,7 +14,7 @@
<bytecodeTargetLevel>
<module name="deviceboard" target="8" />
<module name="productionboard" target="8" />
<module name="visualboard" target="1.8" />
<module name="visualboard" target="1.5" />
</bytecodeTargetLevel>
</component>
<component name="JavacSettings">

@ -15,12 +15,14 @@
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<output url="file://$MODULE_DIR$/${project.build.directory}/classes" />
<output-test url="file://$MODULE_DIR$/${project.build.directory}/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/${project.build.directory}/classes" />
<excludeFolder url="file://$MODULE_DIR$/${project.build.directory}/test-classes" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />

@ -1,10 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>箱壳可视化看板</title>
</head>
<body>
HelloWorld !!!
</body>
</html>

@ -1,3 +0,0 @@
artifactId=deviceboard
groupId=com.scada
version=0.0.1-SNAPSHOT

@ -1,2 +0,0 @@
com\deviceboard\DeviceBoardApplication.class
com\deviceboard\controller\TestController.class

@ -1,2 +0,0 @@
C:\Users\ADMIN\Desktop\visualboard\deviceboard\src\main\java\com\deviceboard\DeviceBoardApplication.java
C:\Users\ADMIN\Desktop\visualboard\deviceboard\src\main\java\com\deviceboard\controller\TestController.java

@ -15,12 +15,14 @@
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<output url="file://$MODULE_DIR$/${project.build.directory}/classes" />
<output-test url="file://$MODULE_DIR$/${project.build.directory}/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/${project.build.directory}/classes" />
<excludeFolder url="file://$MODULE_DIR$/${project.build.directory}/test-classes" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />

@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.productionboard.entity.AluminumDevice.AluminumDeviceDataInformation;
import com.productionboard.entity.AluminumDevice.AluminumLossStatistics;
import com.productionboard.entity.AluminumDevice.AluminumOeeStatistics;
import com.productionboard.service.IAluminumDeviceInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -49,7 +50,26 @@ public class AluminumLinerkController {
}
/**
*
*
* @author WenJY
* @date 2022-06-08 15:53
* @return java.lang.String
*/
@GetMapping("/getEnergyProductStatistics")
@ResponseBody
public String getEnergyProductStatistics(){
return aluminumDeviceInfoService.getEnergyProductJson();
}
@GetMapping("/getOeeStatistics")
@ResponseBody
public String oeeStatistics() {
List<AluminumOeeStatistics> oeeStatisticsList = aluminumDeviceInfoService.getOeeStatisticsList();
return JSONArray.toJSONString(oeeStatisticsList);
}
/**
* Loss
* @author WenJY
* @date 2022-06-07 10:39
* @return java.lang.String

@ -0,0 +1,30 @@
package com.productionboard.entity.AluminumDevice;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* @author WenJY
* @date 20220608 16:23
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("SCADA_LCB_DEVICEINFO_4")
public class AluminumOeeStatistics implements Serializable {
@TableField("OEE")
public String xValue;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
@TableField("CREATETIME")
public Date yValue;
}

@ -0,0 +1,26 @@
package com.productionboard.entity.AluminumDevice;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* @author WenJY
* @date 20220608 15:50
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("SCADA_LCB_DEVICEINFO_6")
public class AluminumThisMonthEnergy implements Serializable {
@TableField("PRODUCTION")
public String production;
@TableField("HOURENERGY")
public String energy;
}

@ -1,5 +1,6 @@
package com.productionboard.entity.AluminumDevice;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -14,6 +15,12 @@ import java.io.Serializable;
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("SCADA_LCB_DEVICEINFO_1")
public class AluminumEnergyProduction implements Serializable {
@TableName("SCADA_LCB_DEVICEINFO_5")
public class AluminumYesterdayEnergy implements Serializable {
@TableField("PRODUCTION")
public String production;
@TableField("HOURENERGY")
public String energy;
}

@ -0,0 +1,13 @@
package com.productionboard.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.productionboard.entity.AluminumDevice.AluminumOeeStatistics;
import org.apache.ibatis.annotations.Mapper;
/**
* @author WenJY
* @date 20220608 16:25
*/
@Mapper
public interface AluminumOeeStatisticsMapper extends BaseMapper<AluminumOeeStatistics> {
}

@ -0,0 +1,13 @@
package com.productionboard.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.productionboard.entity.AluminumDevice.AluminumThisMonthEnergy;
import org.apache.ibatis.annotations.Mapper;
/**
* @author WenJY
* @date 20220608 15:51
*/
@Mapper
public interface AluminumThisMonthEnergyMapper extends BaseMapper<AluminumThisMonthEnergy> {
}

@ -0,0 +1,13 @@
package com.productionboard.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.productionboard.entity.AluminumDevice.AluminumYesterdayEnergy;
import org.apache.ibatis.annotations.Mapper;
/**
* @author WenJY
* @date 20220608 15:52
*/
@Mapper
public interface AluminumYesterdayEnergyMapper extends BaseMapper<AluminumYesterdayEnergy> {
}

@ -2,6 +2,7 @@ package com.productionboard.service;
import com.productionboard.entity.AluminumDevice.AluminumDeviceDataInformation;
import com.productionboard.entity.AluminumDevice.AluminumLossStatistics;
import com.productionboard.entity.AluminumDevice.AluminumOeeStatistics;
import java.util.List;
@ -18,6 +19,14 @@ public interface IAluminumDeviceInfoService {
*/
public List<AluminumDeviceDataInformation> getDataInformationList();
/**
*
* @author WenJY
* @date 2022-06-08 15:53
* @return java.lang.String
*/
public String getEnergyProductJson();
/**
* Loss
* @author WenJY
@ -25,4 +34,12 @@ public interface IAluminumDeviceInfoService {
* @return java.util.List<com.productionboard.entity.AluminumDevice.AluminumLossStatistics>
*/
public List<AluminumLossStatistics> getLossStatisticsList();
/**
* OEE
* @author WenJY
* @date 2022-06-08 16:26
* @return java.util.List<com.productionboard.entity.AluminumDevice.AluminumOeeStatistics>
*/
public List<AluminumOeeStatistics> getOeeStatisticsList();
}

@ -1,9 +1,9 @@
package com.productionboard.service.impl;
import com.productionboard.entity.AluminumDevice.AluminumDeviceDataInformation;
import com.productionboard.entity.AluminumDevice.AluminumLossStatistics;
import com.productionboard.mapper.AluminumDeviceDataInformationMapper;
import com.productionboard.mapper.AluminumLossStatisticsMapper;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.productionboard.entity.AluminumDevice.*;
import com.productionboard.mapper.*;
import com.productionboard.service.IAluminumDeviceInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -23,6 +23,15 @@ public class AluminumDeviceInfoServiceImpl implements IAluminumDeviceInfoService
@Autowired
private AluminumLossStatisticsMapper aluminumLossStatisticsMapper;
@Autowired
private AluminumYesterdayEnergyMapper aluminumYesterdayEnergyMapper;
@Autowired
private AluminumThisMonthEnergyMapper aluminumThisMonthEnergyMapper;
@Autowired
private AluminumOeeStatisticsMapper aluminumOeeStatisticsMapper;
/**
*
* @author WenJY
@ -35,6 +44,35 @@ public class AluminumDeviceInfoServiceImpl implements IAluminumDeviceInfoService
return dataInformationMapper.selectList(null);
}
/**
*
* @author WenJY
* @date 2022-06-08 15:53
* @return java.lang.String
*/
@Override
public String getEnergyProductJson() {
String[] result = new String[4];
try{
List<AluminumThisMonthEnergy> aluminumThisMonthEnergies = aluminumThisMonthEnergyMapper.selectList(null);
List<AluminumYesterdayEnergy> aluminumYesterdayEnergies = aluminumYesterdayEnergyMapper.selectList(null);
result[0] = aluminumYesterdayEnergies.size() > 0 ? aluminumYesterdayEnergies.get(0).getProduction():"0";
result[1] = aluminumYesterdayEnergies.size() > 0 ? aluminumYesterdayEnergies.get(0).getEnergy():"0";
result[2] = aluminumThisMonthEnergies.size() > 0 ? aluminumThisMonthEnergies.get(0).getProduction():"0";
result[3] = aluminumThisMonthEnergies.size() > 0 ? aluminumThisMonthEnergies.get(0).getEnergy():"0";
}catch (Exception e){
System.out.println("getEnergyProduct方法异常");
result[0] = "-";
result[1] = "-";
result[2] = "-";
result[3] = "-";
}
return JSONArray.toJSONString(result);
}
/**
* Loss
* @author WenJY
@ -45,4 +83,9 @@ public class AluminumDeviceInfoServiceImpl implements IAluminumDeviceInfoService
public List<AluminumLossStatistics> getLossStatisticsList() {
return aluminumLossStatisticsMapper.selectList(null);
}
@Override
public List<AluminumOeeStatistics> getOeeStatisticsList() {
return aluminumOeeStatisticsMapper.selectList(null);
}
}

@ -1,22 +1,22 @@
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\entity\AluminumDevice\AluminumEnergyProduction.java
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\controller\AdsorptionTankController.java
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\controller\TankShellController.java
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\controller\AluminumTtankController.java
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\service\impl\AluminumDeviceInfoServiceImpl.java
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\controller\StorageController.java
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\controller\TankShellDeviceController.java
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\entity\AluminumDevice\AluminumLossStatistics.java
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\mapper\AluminumLossStatisticsMapper.java
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\controller\FoamBoxController.java
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\mapper\BasicScadaDeviceinfoMapper.java
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\service\BasicScadaDeviceinfoService.java
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\controller\AluminumLinerkController.java
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\common\CodeGenerator.java
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\ProductionBoardApplication.java
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\controller\PreassembleController.java
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\service\impl\BasicScadaDeviceinfoServiceImpl.java
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\mapper\AluminumDeviceDataInformationMapper.java
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\service\IAluminumDeviceInfoService.java
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\config\MybatisPlusConfig.java
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\entity\BasicScadaDeviceinfo.java
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\entity\AluminumDevice\AluminumDeviceDataInformation.java
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\controller\TankShellDeviceController.java
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\controller\AluminumLinerkController.java
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\service\IAluminumDeviceInfoService.java
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\entity\BasicScadaDeviceinfo.java
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\controller\FoamBoxController.java
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\service\impl\BasicScadaDeviceinfoServiceImpl.java
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\common\CodeGenerator.java
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\ProductionBoardApplication.java
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\controller\AluminumTtankController.java
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\entity\AluminumDevice\AluminumLossStatistics.java
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\controller\AdsorptionTankController.java
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\config\MybatisPlusConfig.java
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\entity\AluminumDevice\AluminumEnergyProduction.java
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\service\impl\AluminumDeviceInfoServiceImpl.java
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\controller\TankShellController.java
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\controller\StorageController.java
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\mapper\BasicScadaDeviceinfoMapper.java
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\controller\PreassembleController.java
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\mapper\AluminumLossStatisticsMapper.java
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\entity\AluminumDevice\AluminumDeviceDataInformation.java
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\mapper\AluminumDeviceDataInformationMapper.java
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\service\BasicScadaDeviceinfoService.java

@ -14,13 +14,15 @@
<configuration />
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5">
<output url="file://$MODULE_DIR$/${project.build.directory}/classes" />
<output-test url="file://$MODULE_DIR$/${project.build.directory}/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/${project.build.directory}/classes" />
<excludeFolder url="file://$MODULE_DIR$/${project.build.directory}/test-classes" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />

Loading…
Cancel
Save