6069 ALL数据展示平台

master
yinq 2 years ago
parent 1c5acc17ce
commit 98ee91df1c

@ -146,7 +146,7 @@ public class AluminumLinerkController {
@ResponseBody
public String getInventoryStatistics() {
List<MesMaterialStoreStatistics> mesMaterialStoreStatisticsList =
iMesProductionDataService.getMesMaterialStoreStatisticsList("1001");
iMesProductionDataService.getMesMaterialStoreStatisticsList("1005");
return JSONArray.toJSONString(mesMaterialStoreStatisticsList);
}

@ -44,7 +44,7 @@ public class AluminumTtankController {
@GetMapping("/getTeamStatisticsJson")
@ResponseBody
public String getTeamStatisticsJson(){
List<MesTeamStatistics> mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList("1006");
List<MesTeamStatistics> mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList("1001");
if(mesTeamStatisticsList.size()>0){
return JSONArray.toJSONString(mesTeamStatisticsList.get(0));
}
@ -61,7 +61,7 @@ public class AluminumTtankController {
@ResponseBody
public String getHourProdutionStatisticsJson(){
List<MesHourProdutionStatistics> mesHourProdutionStatisticsList =
iMesProductionDataService.getMesHourProdutionStatisticsList("1006");
iMesProductionDataService.getMesHourProdutionStatisticsList("1001");
if(mesHourProdutionStatisticsList.size()>0){
return JSONArray.toJSONString(mesHourProdutionStatisticsList);
}
@ -79,7 +79,7 @@ public class AluminumTtankController {
public String getMaterialProdutionStatisticsJson(){
List<MesMaterialProductionStatistics> mesMaterialProductionStatisticsList =
iMesProductionDataService.getMesMaterialProductionStatisticsList("1006");
iMesProductionDataService.getMesMaterialProductionStatisticsList("1001");
return JSONArray.toJSONString(mesMaterialProductionStatisticsList);
}
@ -100,8 +100,8 @@ public class AluminumTtankController {
list.add("U001");
List<MesMaterialStoreStatistics> mesMaterialStoreStatisticsList
=new ArrayList<>();
mesMaterialStoreStatisticsList.addAll( iMesProductionDataService.getMesMaterialStoreStatisticsList("L001"));
mesMaterialStoreStatisticsList.addAll( iMesProductionDataService.getMesMaterialStoreStatisticsList("U001"));
mesMaterialStoreStatisticsList.addAll( iMesProductionDataService.getMesMaterialStoreStatisticsList("1006"));
// mesMaterialStoreStatisticsList.addAll( iMesProductionDataService.getMesMaterialStoreStatisticsList("U001"));
// = iMesProductionDataService.getMesMaterialStoreStatisticsListByList(list);
return JSONArray.toJSONString(mesMaterialStoreStatisticsList);
}

@ -69,7 +69,8 @@ public class FoamBoxController {
@ResponseBody
public String getTeamStatisticsJson(String ids){
String type=(ids.equals("0"))?"1029":"1012";
List<MesTeamStatistics> mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList(type);
// List<MesTeamStatistics> mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList(type);
List<MesTeamStatistics> mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList("1010");
if(mesTeamStatisticsList.size()>0){
return JSONArray.toJSONString(mesTeamStatisticsList.get(0));
}
@ -144,7 +145,7 @@ public class FoamBoxController {
System.out.println("通过工位号获取MES小时产量:"+ids);
String type=(ids.equals("0"))?"1029":"1012";
List<MesHourProdutionStatistics> mesHourProdutionStatisticsList =
iMesProductionDataService.getMesHourProdutionStatisticsList(type);
iMesProductionDataService.getMesHourProdutionStatisticsListType("1010",type);
if(mesHourProdutionStatisticsList.size()>0){
return JSONArray.toJSONString(mesHourProdutionStatisticsList);
}
@ -162,7 +163,7 @@ public class FoamBoxController {
public String getMaterialProdutionStatisticsJson(String ids){
String type=(ids.equals("0"))?"1029":"1012";
List<MesMaterialProductionStatistics> mesMaterialProductionStatisticsList =
iMesProductionDataService.getMesMaterialProductionStatisticsList(type);
iMesProductionDataService.getMesMaterialProductionStatisticsListType("1010",type);
return JSONArray.toJSONString(mesMaterialProductionStatisticsList);
}
@ -178,7 +179,7 @@ public class FoamBoxController {
public String getMesMaterialStoreStatisticsJson(){
List<MesMaterialStoreStatistics> mesMaterialStoreStatisticsList =
iMesProductionDataService.getMesMaterialStoreStatisticsList("B001");
iMesProductionDataService.getMesMaterialStoreStatisticsList("1010");
return JSONArray.toJSONString(mesMaterialStoreStatisticsList);
}

@ -93,7 +93,8 @@ public class TankShellController {
List<String> list=new ArrayList<String>(2);
list.add("L001");
list.add("U001");
List<MesMaterialStoreStatistics> mesMaterialStoreStatisticsList= iMesProductionDataService.getMesMaterialStoreStatisticsListByList(list);
// List<MesMaterialStoreStatistics> mesMaterialStoreStatisticsList= iMesProductionDataService.getMesMaterialStoreStatisticsListByList(list);
List<MesMaterialStoreStatistics> mesMaterialStoreStatisticsList= iMesProductionDataService.getMesMaterialStoreStatisticsList("1009");
return JSONArray.toJSONString(mesMaterialStoreStatisticsList);
}

@ -3,6 +3,10 @@ package com.productionboard.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.productionboard.entity.AluminumDevice.AluminumDeviceDataInformation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* @author WenJY
@ -10,4 +14,11 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface AluminumDeviceDataInformationMapper extends BaseMapper<AluminumDeviceDataInformation> {
/**
*
* @param in_id
* @return
*/
@Select("select * from table ( scada_aluminum_device_t_new(#{in_id}) )")
List<AluminumDeviceDataInformation> getAluminumDeviceDataInformations(@Param("in_id") Integer in_id);
}

@ -3,6 +3,10 @@ package com.productionboard.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.productionboard.entity.AluminumDevice.AluminumLossStatistics;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* @author WenJY
@ -10,4 +14,12 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface AluminumLossStatisticsMapper extends BaseMapper<AluminumLossStatistics> {
/**
* Loss
* @param in_id
* @return
*/
@Select("select * from table ( scada_aluminum_loss_status_new(#{in_id}) )")
List<AluminumLossStatistics> getAluminumLossStatistics(@Param("in_id") Integer in_id);
}

@ -3,6 +3,10 @@ package com.productionboard.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.productionboard.entity.AluminumDevice.AluminumOeeStatistics;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* @author WenJY
@ -10,4 +14,11 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface AluminumOeeStatisticsMapper extends BaseMapper<AluminumOeeStatistics> {
/**
* OEE
* @param in_id
* @return
*/
@Select("select * from table ( scada_aluminum_oee_stat_new(#{in_id}) )")
List<AluminumOeeStatistics> getAluminumOeeStatistics(@Param("in_id") Integer in_id);
}

@ -3,6 +3,10 @@ package com.productionboard.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.productionboard.entity.AluminumDevice.AluminumThisMonthEnergy;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* @author WenJY
@ -10,4 +14,11 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface AluminumThisMonthEnergyMapper extends BaseMapper<AluminumThisMonthEnergy> {
/**
*
* @param in_id
* @return
*/
@Select("select * from table ( scada_aluminum_month_energy_n(#{in_id}) )")
List<AluminumThisMonthEnergy> getAluminumThisMonthEnergies(@Param("in_id") Integer in_id);
}

@ -3,6 +3,10 @@ package com.productionboard.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.productionboard.entity.AluminumDevice.AluminumYesterdayEnergy;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* @author WenJY
@ -10,4 +14,11 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface AluminumYesterdayEnergyMapper extends BaseMapper<AluminumYesterdayEnergy> {
/**
*
* @param in_id
* @return
*/
@Select("select * from table ( scada_aluminum_yesterday_n(#{in_id}) )")
List<AluminumYesterdayEnergy> getAluminumYesterdayEnergies(@Param("in_id") Integer in_id);
}

@ -3,6 +3,10 @@ package com.productionboard.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.productionboard.entity.FoamBoxDevice.FoamBoxLineRunStatus;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* @author WenJY
@ -10,4 +14,13 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface FoamBoxLineRunStatusMapper extends BaseMapper<FoamBoxLineRunStatus> {
/**
* 线 1
* @param in_id
* @return
*/
@Select("select * from table ( scada_box_line_run_status_new(#{in_id}) )")
List<FoamBoxLineRunStatus> getFoamBoxLineRunStatuses(@Param("in_id") Integer in_id);
}

@ -1,9 +1,12 @@
package com.productionboard.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.productionboard.entity.FoamBoxDevice.FoamBoxLineRunStatus;
import com.productionboard.entity.FoamBoxDevice.FoamBoxMachineRunStatus;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* @author WenJY
@ -11,4 +14,13 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface FoamBoxMachineRunStatusMapper extends BaseMapper<FoamBoxMachineRunStatus> {
/**
* 线
* @param in_id
* @param DEVICEID
* @return
*/
@Select("select * from table ( scada_foambox_status_object_n(#{in_id},#{DEVICEID}) )")
List<FoamBoxMachineRunStatus> getRunStatus(@Param("in_id") Integer in_id, String DEVICEID);
}

@ -4,6 +4,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.productionboard.entity.FoamBoxDevice.FoamBoxMouldTemperature;
import com.productionboard.entity.FoamBoxDevice.FoamBoxParamTemperature;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* @author WenJY
@ -12,4 +16,12 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface FoamBoxMouldTemperatureMapper extends BaseMapper<FoamBoxMouldTemperature> {
/**
* 线 1
* @param in_id
* @param deviceId
* @return
*/
@Select("select * from table ( scada_foam_box_mould_table_new(#{in_id},#{deviceId}) )")
List<FoamBoxMouldTemperature> getFoamBoxMouldTemperatures(@Param("in_id") Integer in_id,@Param("deviceId") String deviceId);
}

@ -3,6 +3,8 @@ package com.productionboard.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.productionboard.entity.FoamBoxDevice.FoamBoxParamTemperature;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@ -13,4 +15,13 @@ import java.util.List;
@Mapper
public interface FoamBoxParamTemperatureMapper extends BaseMapper<FoamBoxParamTemperature> {
/**
* 线
* @param in_id
* @param DEVICEID
* @return
*/
@Select("select * from table ( scada_scada_foam_temperature_n(#{in_id},#{DEVICEID}) )")
List<FoamBoxParamTemperature> getFoamBoxParamTemperatures(@Param("in_id") Integer in_id,@Param("DEVICEID") String DEVICEID);
}

@ -17,6 +17,22 @@ import java.util.List;
@Repository
public interface MesHourProdutionStatisticsMapper extends BaseMapper<MesHourProdutionStatistics> {
/**
*
* @param in_id
* @return
*/
@Select("select * from table ( scada_type_hourly_output_new4(#{in_id}) )")
List<MesHourProdutionStatistics> getMesHourProdutionStatisticsList4(int in_id);
/**
*
* @param in_id
* @return
*/
@Select("select * from table ( scada_type_hourly_output_new2(#{in_id}) )")
List<MesHourProdutionStatistics> getMesHourProdutionStatisticsList1(int in_id);
/**
*
* @param in_id
@ -32,4 +48,7 @@ public interface MesHourProdutionStatisticsMapper extends BaseMapper<MesHourProd
*/
@Select("select * from table ( scada_type_hourly_output_new9(#{in_id}) )")
List<MesHourProdutionStatistics> getMesHourProdutionStatisticsList9(@Param("in_id") Integer in_id);
@Select("select * from table ( scada_type_hourly_output_new10(#{in_id},#{type}) )")
List<MesHourProdutionStatistics> getMesHourProdutionStatisticsList10(@Param("in_id") int in_id, @Param("type") String type);
}

@ -21,6 +21,14 @@ public interface MesMaterialProductionStatisticsMapper extends BaseMapper<MesMat
@Select("select * from table ( absorb_xfnd_xhcl(#{in_id}) )")
List<MesMaterialProductionStatistics> getMesMaterialProductionStatisticsList(@Param("in_id") Integer in_id);
/**
*
* @param in_id
* @return
*/
@Select("select * from table ( absorb_xfnd_xhcl4(#{in_id}) )")
List<MesMaterialProductionStatistics> getMesMaterialProductionStatisticsList4(@Param("in_id") Integer in_id);
/**
*
* @param in_id
@ -35,5 +43,13 @@ public interface MesMaterialProductionStatisticsMapper extends BaseMapper<MesMat
* @return
*/
@Select("select * from table ( absorb_xfnd_xhcl9(#{in_id}) )")
List<MesMaterialProductionStatistics> getMesMaterialProductionStatisticsList9(int in_id);
List<MesMaterialProductionStatistics> getMesMaterialProductionStatisticsList9(@Param("in_id") Integer in_id);
/**
* 线
* @param in_id
* @return
*/
@Select("select * from table ( absorb_xfnd_xhcl10(#{in_id},#{type}) )")
List<MesMaterialProductionStatistics> getMesMaterialProductionStatisticsList10(int in_id, String type);
}

@ -28,4 +28,44 @@ public interface MesMaterialStoreStatisticsMapper extends BaseMapper<MesMaterial
*/
@Select("select materialName,LINERSTOREAMOUNT as lineStoreAmount,hullStoreAmount from table ( scada_absorb_kctj(#{in_id}) )")
List<MesMaterialStoreStatistics> getAdsorptionTankStoreStatistics(@Param("in_id") Integer in_id);
/**
*
* @param in_id
* @return
*/
@Select("select materialName,LINERSTOREAMOUNT as lineStoreAmount,hullStoreAmount from table ( scada_absorb_kctj4(#{in_id}) )")
List<MesMaterialStoreStatistics> getAdsorptionTankStoreStatistics5(@Param("in_id") Integer in_id);
/**
*
* @param in_id
* @return
*/
@Select("select materialName,LINERSTOREAMOUNT as lineStoreAmount,hullStoreAmount from table ( scada_absorb_kctj6(#{in_id}) )")
List<MesMaterialStoreStatistics> getAdsorptionTankStoreStatistics6(@Param("in_id") Integer in_id);
/**
*
* @param in_id
* @return
*/
@Select("select materialName,LINERSTOREAMOUNT as lineStoreAmount,hullStoreAmount from table ( scada_absorb_kctj9(#{in_id}) )")
List<MesMaterialStoreStatistics> getAdsorptionTankStoreStatistics9(@Param("in_id") Integer in_id);
/**
* 线
* @param in_id
* @return
*/
@Select("select materialName,LINERSTOREAMOUNT as lineStoreAmount,hullStoreAmount from table ( scada_absorb_kctj10(#{in_id}) )")
List<MesMaterialStoreStatistics> getAdsorptionTankStoreStatistics10(@Param("in_id") Integer in_id);
/**
*
* @param in_id
* @return
*/
@Select("select materialName,LINERSTOREAMOUNT as lineStoreAmount,hullStoreAmount from table ( scada_absorb_kctj2(#{in_id}) )")
List<MesMaterialStoreStatistics> getAdsorptionTankStoreStatistics4(@Param("in_id") Integer in_id);
}

@ -29,6 +29,14 @@ public interface MesTeamStatisticsMapper extends BaseMapper<MesTeamStatistics> {
@Select("select * from table ( scada_xfnd_bztj(#{in_id}) )")
List<MesTeamStatistics> getAdsorptionTankTeamStatistics(@Param("in_id") Integer in_id);
/**
*
* @param in_id
* @return
*/
@Select("select * from table ( scada_xfnd_bztj4(#{in_id}) )")
List<MesTeamStatistics> getAdsorptionTankTeamStatistics4(@Param("in_id") Integer in_id);
/**
*
* @author WenJY
@ -46,4 +54,12 @@ public interface MesTeamStatisticsMapper extends BaseMapper<MesTeamStatistics> {
*/
@Select("select * from table ( scada_xfnd_bztj9(#{in_id}) )")
List<MesTeamStatistics> getAdsorptionTankTeamStatistics9(@Param("in_id") Integer in_id);
/**
* 线
* @param in_id
* @return
*/
@Select("select * from table ( scada_xfnd_bztj10(#{in_id}) )")
List<MesTeamStatistics> getAdsorptionTankTeamStatistics10(int in_id);
}

@ -3,6 +3,10 @@ package com.productionboard.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.productionboard.entity.TankShellDevice.TankShellDeviceDataInformation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* @author WenJY
@ -10,4 +14,20 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface TankShellDeviceDataInformationMapper extends BaseMapper<TankShellDeviceDataInformation> {
/**
*
* @param in_id
* @return
*/
@Select("select * from table ( scada_tank_shell_device_new(#{in_id}) )")
List<TankShellDeviceDataInformation> getTankShellDeviceDataInformations(@Param("in_id") Integer in_id);
/**
*
* @param in_id
* @return
*/
@Select("select * from table ( scada_device_data_info_new(#{in_id}) )")
List<TankShellDeviceDataInformation> getDeviceDataInformations(@Param("in_id") Integer in_id);
}

@ -3,6 +3,7 @@ package com.productionboard.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.productionboard.entity.TankShellDevice.TankShellDevicePrameterValue;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@ -14,9 +15,12 @@ import java.util.List;
@Mapper
public interface TankShellDevicePrameterValueMapper extends BaseMapper<TankShellDevicePrameterValue> {
@Select("select t2.DEVICEID,t2.PRAMETERNAME, to_char(t2.VALUE,'fm9999990.00') 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)")
List<TankShellDevicePrameterValue> SelectDevicePrameterValues();
List<TankShellDevicePrameterValue> SelectDevicePrameterValues();*/
@Select("select * from table ( sscada_device_pra_val_new(#{in_id}) )")
List<TankShellDevicePrameterValue> SelectDevicePrameterValues(@Param("in_id") Integer in_id);
}

@ -3,6 +3,10 @@ package com.productionboard.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.productionboard.entity.TankShellDevice.TankShellEnergyConsumption;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* @author WenJY
@ -10,4 +14,20 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface TankShellEnergyConsumptionMapper extends BaseMapper<TankShellEnergyConsumption> {
/**
*
* @param in_id
* @return
*/
@Select("select * from table ( scada_tank_shell_energy_new(#{in_id}) )")
List<TankShellEnergyConsumption> getTankShellEnergyConsumptions(@Param("in_id") Integer in_id);
/**
*
* @param in_id
* @return
*/
@Select("select * from table ( scada_tank_yesterday_energies(#{in_id}) )")
List<TankShellEnergyConsumption> getTankShellYesterdayEnergies(@Param("in_id") Integer in_id);
}

@ -3,6 +3,10 @@ package com.productionboard.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.productionboard.entity.TankShellDevice.TankShellLossStatistics;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* @author WenJY
@ -10,4 +14,11 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface TankShellLossStatisticsMapper extends BaseMapper<TankShellLossStatistics> {
/**
* Loss
* @param in_id
* @return
*/
@Select("select * from table ( scada_tank_shell_loss_new(#{in_id}) )")
List<TankShellLossStatistics> getTankShellLossStatistics(@Param("in_id") Integer in_id);
}

@ -3,6 +3,10 @@ package com.productionboard.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.productionboard.entity.TankShellDevice.TankShellOeeStatistics;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* @author WenJY
@ -10,4 +14,11 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface TankShellOeeStatisticsMapper extends BaseMapper<TankShellOeeStatistics> {
/**
* OEE
* @param in_id
* @return
*/
@Select("select * from table ( scada_tank_shell_oee_new(#{in_id}) )")
List<TankShellOeeStatistics> getTankShellOeeStatistics(@Param("in_id") Integer in_id);
}

@ -3,6 +3,10 @@ package com.productionboard.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.productionboard.entity.TankShellDevice.TankShellThisMonthEnergy;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* @author WenJY
@ -10,4 +14,11 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface TankShellThisMonthEnergyMapper extends BaseMapper<TankShellThisMonthEnergy> {
/**
* OEE
* @param in_id
* @return
*/
@Select("select * from table ( scada_tank_shell_month_e_new(#{in_id}) )")
List<TankShellThisMonthEnergy> getTankShellThisMonthEnergies(@Param("in_id") Integer in_id);
}

@ -30,6 +30,8 @@ public interface IMesProductionDataService {
*/
List<MesHourProdutionStatistics> getMesHourProdutionStatisticsList(String locationNumber);
List<MesHourProdutionStatistics> getMesHourProdutionStatisticsListType(String locationNumber, String type);
/**
* MES
* @author WenJY
@ -39,6 +41,8 @@ public interface IMesProductionDataService {
*/
List<MesMaterialProductionStatistics> getMesMaterialProductionStatisticsList(String locationNumber);
List<MesMaterialProductionStatistics> getMesMaterialProductionStatisticsListType(String locationNumber, String type);
/**
* MES
* @author WenJY

@ -6,6 +6,7 @@ import com.productionboard.entity.AluminumDevice.*;
import com.productionboard.mapper.*;
import com.productionboard.service.IAluminumDeviceInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.List;
@ -32,6 +33,8 @@ public class AluminumDeviceInfoServiceImpl implements IAluminumDeviceInfoService
@Autowired
private AluminumOeeStatisticsMapper aluminumOeeStatisticsMapper;
@Value("${in_id}")
private int in_id;
/**
*
* @author WenJY
@ -40,8 +43,8 @@ public class AluminumDeviceInfoServiceImpl implements IAluminumDeviceInfoService
*/
@Override
public List<AluminumDeviceDataInformation> getDataInformationList() {
return dataInformationMapper.selectList(null);
List<AluminumDeviceDataInformation> aluminumDeviceDataInformations = dataInformationMapper.getAluminumDeviceDataInformations(in_id);
return aluminumDeviceDataInformations;
}
/**
@ -54,15 +57,17 @@ public class AluminumDeviceInfoServiceImpl implements IAluminumDeviceInfoService
public String getRunParameters() {
String[] result = new String[10];
try{
List<AluminumThisMonthEnergy> aluminumThisMonthEnergies = aluminumThisMonthEnergyMapper.selectList(null);
List<AluminumYesterdayEnergy> aluminumYesterdayEnergies = aluminumYesterdayEnergyMapper.selectList(null);
// List<AluminumThisMonthEnergy> aluminumThisMonthEnergies = aluminumThisMonthEnergyMapper.selectList(null);
// List<AluminumYesterdayEnergy> aluminumYesterdayEnergies = aluminumYesterdayEnergyMapper.selectList(null);
List<AluminumThisMonthEnergy> aluminumThisMonthEnergies = aluminumThisMonthEnergyMapper.getAluminumThisMonthEnergies(in_id);
List<AluminumYesterdayEnergy> aluminumYesterdayEnergies = aluminumYesterdayEnergyMapper.getAluminumYesterdayEnergies(in_id);
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";
List<AluminumDeviceDataInformation> aluminumDeviceDataInformations = dataInformationMapper.selectList(null);
List<AluminumDeviceDataInformation> aluminumDeviceDataInformations = dataInformationMapper.getAluminumDeviceDataInformations(in_id);
// List<AluminumDeviceDataInformation> aluminumDeviceDataInformations = dataInformationMapper.selectList(null);
if(aluminumDeviceDataInformations.size() > 0){
AluminumDeviceDataInformation aluminumDeviceDataInformation = aluminumDeviceDataInformations.get(0);
if(aluminumDeviceDataInformation != null){
@ -98,11 +103,15 @@ public class AluminumDeviceInfoServiceImpl implements IAluminumDeviceInfoService
*/
@Override
public List<AluminumLossStatistics> getLossStatisticsList() {
return aluminumLossStatisticsMapper.selectList(null);
// List<AluminumLossStatistics> aluminumLossStatistics = aluminumLossStatisticsMapper.selectList(null);
List<AluminumLossStatistics> aluminumLossStatistics = aluminumLossStatisticsMapper.getAluminumLossStatistics(in_id);
return aluminumLossStatistics;
}
@Override
public List<AluminumOeeStatistics> getOeeStatisticsList() {
return aluminumOeeStatisticsMapper.selectList(null);
// List<AluminumOeeStatistics> aluminumOeeStatistics = aluminumOeeStatisticsMapper.selectList(null);
List<AluminumOeeStatistics> aluminumOeeStatistics = aluminumOeeStatisticsMapper.getAluminumOeeStatistics(in_id);
return aluminumOeeStatistics;
}
}

@ -14,6 +14,7 @@ import com.productionboard.mapper.FoamBoxMouldTemperatureMapper;
import com.productionboard.mapper.FoamBoxParamTemperatureMapper;
import com.productionboard.service.IFoamBoxDeviceInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.lang.reflect.Array;
@ -41,6 +42,9 @@ public class FoamBoxDeviceInfoServiceImpl implements IFoamBoxDeviceInfoService {
private SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH:mm:ss");
@Value("${in_id}")
private int in_id;
/**
* 线
* @author WenJY
@ -53,7 +57,7 @@ public class FoamBoxDeviceInfoServiceImpl implements IFoamBoxDeviceInfoService {
String[] result = new String[6];
List<FoamBoxLineRunStatus> foamBoxLineRunStatuses = foamBoxLineRunStatusMapper.selectList(null);
List<FoamBoxLineRunStatus> foamBoxLineRunStatuses = foamBoxLineRunStatusMapper.getFoamBoxLineRunStatuses(in_id);
QueryWrapper<FoamBoxMachineRunStatus> wrapper = new QueryWrapper<>();
switch (ids) {
@ -65,7 +69,12 @@ public class FoamBoxDeviceInfoServiceImpl implements IFoamBoxDeviceInfoService {
break;
}
List<FoamBoxMachineRunStatus> foamBoxMachineRunStatuses = foamBoxMachineRunStatusMapper.selectList(wrapper);
String DEVICEID = "HF202009858";
if ("1".equals(ids)){
DEVICEID = "HF202009857";
}
// List<FoamBoxMachineRunStatus> foamBoxMachineRunStatuses = foamBoxMachineRunStatusMapper.selectList(wrapper);
List<FoamBoxMachineRunStatus> foamBoxMachineRunStatuses = foamBoxMachineRunStatusMapper.getRunStatus(in_id,DEVICEID);
try{
if(foamBoxLineRunStatuses.size() > 0){
@ -115,7 +124,12 @@ public class FoamBoxDeviceInfoServiceImpl implements IFoamBoxDeviceInfoService {
break;
}
List<FoamBoxParamTemperature> foamBoxParamTemperatures = foamBoxParamTemperatureMapper.selectList(wrapper);
// List<FoamBoxParamTemperature> foamBoxParamTemperatures = foamBoxParamTemperatureMapper.selectList(wrapper);
String DEVICEID = "HF202009858";
if ("1".equals(ids)){
DEVICEID = "HF202009857";
}
List<FoamBoxParamTemperature> foamBoxParamTemperatures = foamBoxParamTemperatureMapper.getFoamBoxParamTemperatures(in_id,DEVICEID);
String[] legendArray = new String[]{"1#pol","2#pol","1#piol","2#pol"};
result.put("legendArray",legendArray);
@ -176,6 +190,7 @@ public class FoamBoxDeviceInfoServiceImpl implements IFoamBoxDeviceInfoService {
QueryWrapper<FoamBoxMouldTemperature> wrapper = new QueryWrapper<>();
String deviceIdNew = "FPX003";
switch (ids) {
case "0":
List<String> deviceId = new ArrayList<String>(){
@ -188,6 +203,7 @@ public class FoamBoxDeviceInfoServiceImpl implements IFoamBoxDeviceInfoService {
}
};
wrapper.in("DEVICEID", deviceId);
deviceIdNew = deviceId.get(0);
break;
case "1":
List<String> deviceId2 = new ArrayList<String>(){
@ -200,9 +216,11 @@ public class FoamBoxDeviceInfoServiceImpl implements IFoamBoxDeviceInfoService {
}
};
wrapper.in("DEVICEID", deviceId2);
deviceIdNew = deviceId2.get(0);
break;
}
List<FoamBoxMouldTemperature> foamBoxMouldTemperatures = foamBoxMouldTemperatureMapper.selectList(wrapper);
// List<FoamBoxMouldTemperature> foamBoxMouldTemperatures = foamBoxMouldTemperatureMapper.selectList(wrapper);
List<FoamBoxMouldTemperature> foamBoxMouldTemperatures = foamBoxMouldTemperatureMapper.getFoamBoxMouldTemperatures(in_id,deviceIdNew);
if(foamBoxMouldTemperatures.size() > 0){
List<FoamBoxMouldTemperature> interior = foamBoxMouldTemperatures.stream().filter(x -> x.getPameterName().contains("内膜")).collect(Collectors.toList());

@ -53,7 +53,7 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService {
adsorptionTankTeamStatistics = teamStatisticsMapper.getAdsorptionTankTeamStatistics(this.in_id);
break;
case "1004":
adsorptionTankTeamStatistics = teamStatisticsMapper.getAdsorptionTankTeamStatistics(this.in_id);
adsorptionTankTeamStatistics = teamStatisticsMapper.getAdsorptionTankTeamStatistics4(this.in_id);
break;
case "1006":
adsorptionTankTeamStatistics = teamStatisticsMapper.getAdsorptionTankTeamStatistics6(this.in_id);
@ -61,6 +61,9 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService {
case "1009":
adsorptionTankTeamStatistics = teamStatisticsMapper.getAdsorptionTankTeamStatistics9(this.in_id);
break;
case "1010":
adsorptionTankTeamStatistics = teamStatisticsMapper.getAdsorptionTankTeamStatistics10(this.in_id);
break;
default:
break;
}
@ -80,8 +83,10 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService {
List<MesHourProdutionStatistics> mesHourProdutionStatistics = new ArrayList<>();
switch (locationNumber) {
case "1001":
mesHourProdutionStatistics = hourProdutionStatisticsMapper.getMesHourProdutionStatisticsList1(this.in_id);
break;
case "1004":
mesHourProdutionStatistics = hourProdutionStatisticsMapper.getMesHourProdutionStatisticsList4(this.in_id);
break;
case "1006":
mesHourProdutionStatistics = hourProdutionStatisticsMapper.getMesHourProdutionStatisticsList6(this.in_id);
@ -95,6 +100,19 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService {
return mesHourProdutionStatistics;
}
@Override
public List<MesHourProdutionStatistics> getMesHourProdutionStatisticsListType(String locationNumber, String type) {
List<MesHourProdutionStatistics> mesHourProdutionStatistics = new ArrayList<>();
switch (locationNumber) {
case "1010":
mesHourProdutionStatistics = hourProdutionStatisticsMapper.getMesHourProdutionStatisticsList10(this.in_id , type);
break;
default:
break;
}
return mesHourProdutionStatistics;
}
/**
* MES
* @author WenJY
@ -110,7 +128,7 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService {
mesMaterialProductionStatistics = materialProductionStatisticsMapper.getMesMaterialProductionStatisticsList(this.in_id);
break;
case "1004":
mesMaterialProductionStatistics = materialProductionStatisticsMapper.getMesMaterialProductionStatisticsList(this.in_id);
mesMaterialProductionStatistics = materialProductionStatisticsMapper.getMesMaterialProductionStatisticsList4(this.in_id);
break;
case "1006":
mesMaterialProductionStatistics = materialProductionStatisticsMapper.getMesMaterialProductionStatisticsList6(this.in_id);
@ -118,12 +136,24 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService {
case "1009":
mesMaterialProductionStatistics = materialProductionStatisticsMapper.getMesMaterialProductionStatisticsList9(this.in_id);
break;
default:
break;
}
return mesMaterialProductionStatistics;
}
@Override
public List<MesMaterialProductionStatistics> getMesMaterialProductionStatisticsListType(String locationNumber ,String type) {
List<MesMaterialProductionStatistics> mesMaterialProductionStatistics = new ArrayList<>();
switch (locationNumber) {
case "1010":
mesMaterialProductionStatistics = materialProductionStatisticsMapper.getMesMaterialProductionStatisticsList10(this.in_id,type);
break;
}
return mesMaterialProductionStatistics;
}
/**
* MES
* @author WenJY
@ -141,7 +171,19 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService {
mesMaterialStoreStatistics = materialStoreStatisticsMapper.getAdsorptionTankStoreStatistics(this.in_id);
break;
case "1004":
mesMaterialStoreStatistics = materialStoreStatisticsMapper.getAdsorptionTankStoreStatistics(this.in_id);
mesMaterialStoreStatistics = materialStoreStatisticsMapper.getAdsorptionTankStoreStatistics4(this.in_id);
break;
case "1005":
mesMaterialStoreStatistics = materialStoreStatisticsMapper.getAdsorptionTankStoreStatistics5(this.in_id);
break;
case "1006":
mesMaterialStoreStatistics = materialStoreStatisticsMapper.getAdsorptionTankStoreStatistics6(this.in_id);
break;
case "1009":
mesMaterialStoreStatistics = materialStoreStatisticsMapper.getAdsorptionTankStoreStatistics9(this.in_id);
break;
case "1010":
mesMaterialStoreStatistics = materialStoreStatisticsMapper.getAdsorptionTankStoreStatistics10(this.in_id);
break;
default:
break;

@ -8,6 +8,7 @@ import com.productionboard.entity.TankShellDevice.*;
import com.productionboard.mapper.*;
import com.productionboard.service.ITankShellDeviceInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.thymeleaf.util.StringUtils;
@ -48,9 +49,13 @@ public class TankShellDeviceInfoServiceImpl implements ITankShellDeviceInfoServi
private SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@Value("${in_id}")
private int in_id;
@Override
public String getDataInformationJson() {
List<TankShellDeviceDataInformation> tankShellDeviceDataInformations = tankShellDeviceDataInformationMapper.selectList(null);
// List<TankShellDeviceDataInformation> tankShellDeviceDataInformations = tankShellDeviceDataInformationMapper.selectList(null);
List<TankShellDeviceDataInformation> tankShellDeviceDataInformations = tankShellDeviceDataInformationMapper.getTankShellDeviceDataInformations(in_id);
if(tankShellDeviceDataInformations.size() > 0 && tankShellDeviceDataInformations.get(0) == null){
tankShellDeviceDataInformations.remove(0);
@ -68,7 +73,8 @@ public class TankShellDeviceInfoServiceImpl implements ITankShellDeviceInfoServi
public String getRunParameters() {
String[] result = new String[10];
try{
List<TankShellThisMonthEnergy> tankShellThisMonthEnergies = tankShellThisMonthEnergyMapper.selectList(null);
// List<TankShellThisMonthEnergy> tankShellThisMonthEnergies = tankShellThisMonthEnergyMapper.selectList(null);
List<TankShellThisMonthEnergy> tankShellThisMonthEnergies = tankShellThisMonthEnergyMapper.getTankShellThisMonthEnergies(in_id);
Calendar calendar = Calendar.getInstance();
calendar.setTime(new Date());
@ -77,14 +83,16 @@ public class TankShellDeviceInfoServiceImpl implements ITankShellDeviceInfoServi
//昨日产量、能耗
QueryWrapper<TankShellEnergyConsumption> wrapper = new QueryWrapper<TankShellEnergyConsumption>();
wrapper.eq("createTime",simpleDateFormat.parse(lastDate));
List<TankShellEnergyConsumption> tankShellYesterdayEnergies = tankShellEnergyConsumptionMapper.selectList(wrapper);
// List<TankShellEnergyConsumption> tankShellYesterdayEnergies = tankShellEnergyConsumptionMapper.selectList(wrapper);
List<TankShellEnergyConsumption> tankShellYesterdayEnergies = tankShellEnergyConsumptionMapper.getTankShellYesterdayEnergies(in_id);
result[0] = tankShellYesterdayEnergies.size() > 0 ? tankShellYesterdayEnergies.get(0).getProduction():"0";
result[1] = tankShellYesterdayEnergies.size() > 0 ? tankShellYesterdayEnergies.get(0).getEnergy():"0";
result[2] = tankShellThisMonthEnergies.size() > 0 ? tankShellThisMonthEnergies.get(0).getProduction():"0";
result[3] = tankShellThisMonthEnergies.size() > 0 ? tankShellThisMonthEnergies.get(0).getEnergy():"0";
List<TankShellDeviceDataInformation> deviceDataInformations = tankShellDeviceDataInformationMapper.selectList(null);
// List<TankShellDeviceDataInformation> deviceDataInformations = tankShellDeviceDataInformationMapper.selectList(null);
List<TankShellDeviceDataInformation> deviceDataInformations = tankShellDeviceDataInformationMapper.getDeviceDataInformations(in_id);
if(deviceDataInformations.size() > 0){
TankShellDeviceDataInformation tankShellDeviceDataInformation = deviceDataInformations.get(0);
if(tankShellDeviceDataInformation != null){
@ -121,7 +129,8 @@ public class TankShellDeviceInfoServiceImpl implements ITankShellDeviceInfoServi
*/
@Override
public List<TankShellLossStatistics> getLossStatisticsList() {
List<TankShellLossStatistics> tankShellLossStatistics = tankShellLossStatisticsMapper.selectList(null);
// List<TankShellLossStatistics> tankShellLossStatistics = tankShellLossStatisticsMapper.selectList(null);
List<TankShellLossStatistics> tankShellLossStatistics = tankShellLossStatisticsMapper.getTankShellLossStatistics(in_id);
return tankShellLossStatistics;
}
@ -137,13 +146,14 @@ public class TankShellDeviceInfoServiceImpl implements ITankShellDeviceInfoServi
x.like("prameterName","伺服").or().like("prameterName","伺服")
);
List<TankShellDevicePrameterValue> tankShellDevicePrameterValues = tankShellDevicePrameterValueMapper.selectList(wrapper);*/
List<TankShellDevicePrameterValue> tankShellDevicePrameterValues = tankShellDevicePrameterValueMapper.SelectDevicePrameterValues();
List<TankShellDevicePrameterValue> tankShellDevicePrameterValues = tankShellDevicePrameterValueMapper.SelectDevicePrameterValues(in_id);
return JSONArray.toJSONString(tankShellDevicePrameterValues);
}
@Override
public String getEnergyConsumptionJson() {
List<TankShellEnergyConsumption> tankShellEnergyConsumptions = tankShellEnergyConsumptionMapper.selectList(null);
// List<TankShellEnergyConsumption> tankShellEnergyConsumptions = tankShellEnergyConsumptionMapper.selectList(null);
List<TankShellEnergyConsumption> tankShellEnergyConsumptions = tankShellEnergyConsumptionMapper.getTankShellEnergyConsumptions(in_id);
JSONObject jsonObject = new JSONObject();
if(tankShellEnergyConsumptions.size() > 0){
String[] productionArray = new String[tankShellEnergyConsumptions.size()];
@ -164,7 +174,9 @@ public class TankShellDeviceInfoServiceImpl implements ITankShellDeviceInfoServi
@Override
public String getOeeStatisticsJson() {
List<TankShellOeeStatistics> tankShellOeeStatistics = tankShellOeeStatisticsMapper.selectList(null);
// List<TankShellOeeStatistics> tankShellOeeStatistics = tankShellOeeStatisticsMapper.selectList(null);
List<TankShellOeeStatistics> tankShellOeeStatistics = tankShellOeeStatisticsMapper.getTankShellOeeStatistics(in_id);
if(tankShellOeeStatistics.size()>0){
tankShellOeeStatistics.forEach(x->{
x.setXValue(hourFormat.format(x.getCreateTime()));

Loading…
Cancel
Save