字段調整
This commit is contained in:
parent
3302d14ce8
commit
5b90f86cd3
|
|
@ -113,8 +113,8 @@ public class SurvHisdataAir extends Model<SurvHisdataAir> {
|
|||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
@TableField("DEVICE_CODE")
|
||||
private String deviceCode;
|
||||
@TableField("DEPLOY_CODE")
|
||||
private String deployCode;
|
||||
|
||||
/**
|
||||
* 机构ID
|
||||
|
|
|
|||
|
|
@ -132,8 +132,8 @@ public class SurvHisdataLivestockwater extends Model<SurvHisdataLivestockwater>
|
|||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
@TableField("DEVICE_CODE")
|
||||
private String deviceCode;
|
||||
@TableField("DEPLOY_CODE")
|
||||
private String deployCode;
|
||||
|
||||
/**
|
||||
* 机构ID
|
||||
|
|
|
|||
|
|
@ -100,8 +100,8 @@ public class SurvHisdataLivestockwaterError extends Model<SurvHisdataLivestockwa
|
|||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
@TableField("DEVICE_CODE")
|
||||
private String deviceCode;
|
||||
@TableField("DEPLOY_CODE")
|
||||
private String deployCode;
|
||||
|
||||
/**
|
||||
* 机构ID
|
||||
|
|
|
|||
|
|
@ -126,8 +126,8 @@ public class SurvHisdataOrientwater extends Model<SurvHisdataOrientwater> {
|
|||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
@TableField("DEVICE_CODE")
|
||||
private String deviceCode;
|
||||
@TableField("DEPLOY_CODE")
|
||||
private String deployCode;
|
||||
|
||||
/**
|
||||
* 机构ID
|
||||
|
|
|
|||
|
|
@ -160,8 +160,8 @@ public class SurvHisdataOrientwaterError extends Model<SurvHisdataOrientwaterErr
|
|||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
@TableField("DEVICE_CODE")
|
||||
private String deviceCode;
|
||||
@TableField("DEPLOY_CODE")
|
||||
private String deployCode;
|
||||
|
||||
/**
|
||||
* 机构ID
|
||||
|
|
|
|||
|
|
@ -124,8 +124,8 @@ public class SurvHisdataPestlight extends Model<SurvHisdataPestlight> {
|
|||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
@TableField("DEVICE_CODE")
|
||||
private String deviceCode;
|
||||
@TableField("DEPLOY_CODE")
|
||||
private String deployCode;
|
||||
|
||||
/**
|
||||
* 机构ID
|
||||
|
|
|
|||
|
|
@ -237,8 +237,8 @@ public class SurvHisdataSoil extends Model<SurvHisdataSoil> {
|
|||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
@TableField("DEVICE_CODE")
|
||||
private String deviceCode;
|
||||
@TableField("DEPLOY_CODE")
|
||||
private String deployCode;
|
||||
|
||||
/**
|
||||
* 机构ID
|
||||
|
|
|
|||
|
|
@ -112,8 +112,8 @@ public class SurvTransdataAir extends Model<SurvTransdataAir> {
|
|||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
@TableField("DEVICE_CODE")
|
||||
private String deviceCode;
|
||||
@TableField("DEPLOY_CODE")
|
||||
private String deployCode;
|
||||
|
||||
/**
|
||||
* 机构ID
|
||||
|
|
|
|||
|
|
@ -134,8 +134,8 @@ public class SurvTransdataLivestockwater extends Model<SurvTransdataLivestockwat
|
|||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
@TableField("DEVICE_CODE")
|
||||
private String deviceCode;
|
||||
@TableField("DEPLOY_CODE")
|
||||
private String deployCode;
|
||||
|
||||
/**
|
||||
* 机构ID
|
||||
|
|
|
|||
|
|
@ -126,8 +126,8 @@ public class SurvTransdataOrientwater extends Model<SurvTransdataOrientwater> {
|
|||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
@TableField("DEVICE_CODE")
|
||||
private String deviceCode;
|
||||
@TableField("DEPLOY_CODE")
|
||||
private String deployCode;
|
||||
|
||||
/**
|
||||
* 机构ID
|
||||
|
|
|
|||
|
|
@ -121,8 +121,8 @@ public class SurvTransdataPestlight extends Model<SurvTransdataPestlight> {
|
|||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
@TableField("DEVICE_CODE")
|
||||
private String deviceCode;
|
||||
@TableField("DEPLOY_CODE")
|
||||
private String deployCode;
|
||||
|
||||
/**
|
||||
* 机构ID
|
||||
|
|
|
|||
|
|
@ -239,8 +239,8 @@ public class SurvTransdataSoil extends Model<SurvTransdataSoil> {
|
|||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
@TableField("DEVICE_CODE")
|
||||
private String deviceCode;
|
||||
@TableField("DEPLOY_CODE")
|
||||
private String deployCode;
|
||||
|
||||
/**
|
||||
* 机构ID
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ public class SurvHisdataLivestockwaterServiceImpl extends ServiceImpl<SurvHisdat
|
|||
hisdataLivestockwater.setDataWaterNh(BigDecimalRandomAdjuster.randomAdjustByFixedRange(new BigDecimal(newestData.getDataWaterNh()), fixedRange, scale));
|
||||
hisdataLivestockwater.setDataWaterCod(BigDecimalRandomAdjuster.randomAdjustByFixedRange(new BigDecimal(newestData.getDataWaterCod()), fixedRange, scale));
|
||||
|
||||
hisdataLivestockwater.setDeviceCode(deployCode);
|
||||
hisdataLivestockwater.setDeployCode(deployCode);
|
||||
hisdataLivestockwater.setFluidLevel(waterFluidLevel[values]);
|
||||
hisdataLivestockwater.setFirstValveStatus("0");
|
||||
hisdataLivestockwater.setSecondValveStatus("1");
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ public class SurvHisdataOrientwaterServiceImpl extends ServiceImpl<SurvHisdataOr
|
|||
hisdataOrientwater.setDataDateTime(nowTime);
|
||||
hisdataOrientwater.setDataGatherType("realTime");
|
||||
hisdataOrientwater.setDataWaterNo(BigDecimalRandomAdjuster.randomAdjustByFixedRange(new BigDecimal(newestData.getDataWaterNo()), fixedRange, scale));
|
||||
hisdataOrientwater.setDeviceCode(deployCode);
|
||||
hisdataOrientwater.setDeployCode(deployCode);
|
||||
hisdataOrientwater.setDataWaterTpSy(waterTpSy[values]);
|
||||
hisdataOrientwater.setDataWaterTpLd(waterTpLd[values]);
|
||||
hisdataOrientwater.setDataWaterTnSy(waterTnSy[values]);
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public class SurvTransdataAirServiceImpl extends ServiceImpl<SurvTransdataAirMap
|
|||
public SurvTransdataAir getOneByDeviceCode(String deviceCode,String filterId) {
|
||||
|
||||
QueryWrapper<SurvTransdataAir> queryWrapper = new QueryWrapper<SurvTransdataAir>();
|
||||
queryWrapper.eq("DEVICE_CODE",deviceCode).last("limit 1");
|
||||
queryWrapper.eq("DEPLOY_CODE",deviceCode).last("limit 1");
|
||||
return getOne(queryWrapper);
|
||||
}
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ public class SurvTransdataAirServiceImpl extends ServiceImpl<SurvTransdataAirMap
|
|||
air.setDataSunTotal(baowenMap.get("e8"));//辐射累计
|
||||
air.setDataDateTime(DateUtil.parse(DataTime));//数据时间
|
||||
air.setDataGatherType("realTime");//数据类型-realTime=实时,dayTime=日数据,month=月数据,year=年数据
|
||||
air.setDeviceCode(mn);//设备编号
|
||||
air.setDeployCode(mn);//设备编号
|
||||
saveOrUpdate(air);
|
||||
//保存历史表
|
||||
if(kDateTime == null || !DataTime.equals(DateUtil.format(kDateTime,"yyyy-MM-dd HH:mm:ss"))){
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class SurvTransdataLivestockwaterServiceImpl extends ServiceImpl<SurvTran
|
|||
@Override
|
||||
public SurvTransdataLivestockwater getOneByDeviceCode(String deviceCode) {
|
||||
QueryWrapper<SurvTransdataLivestockwater> queryWrapper = new QueryWrapper<SurvTransdataLivestockwater>();
|
||||
queryWrapper.eq("DEVICE_CODE",deviceCode).last("limit 1");
|
||||
queryWrapper.eq("DEPLOY_CODE",deviceCode).last("limit 1");
|
||||
return getOne(queryWrapper);
|
||||
}
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ public class SurvTransdataLivestockwaterServiceImpl extends ServiceImpl<SurvTran
|
|||
try {
|
||||
SurvTransdataLivestockwater livestockwater = DataUtil.strToLivewater(str);
|
||||
//保存或者更新实时表
|
||||
SurvTransdataLivestockwater transdataLivestockwater = getOneByDeviceCode(livestockwater.getDeviceCode());
|
||||
SurvTransdataLivestockwater transdataLivestockwater = getOneByDeviceCode(livestockwater.getDeployCode());
|
||||
if(transdataLivestockwater == null){
|
||||
transdataLivestockwater = livestockwater;
|
||||
}else{
|
||||
|
|
@ -107,7 +107,7 @@ public class SurvTransdataLivestockwaterServiceImpl extends ServiceImpl<SurvTran
|
|||
Date dataDateTime = transdataLivestockwater.getDataDateTime();
|
||||
String dataDateTimeStr = DateUtil.format(dataDateTime, "yyyy-MM-dd HH:mm:ss");
|
||||
Map<String, String> baowenMap = new HashMap<String, String>();
|
||||
baowenMap.put("mn", transdataLivestockwater.getDeviceCode());
|
||||
baowenMap.put("mn", transdataLivestockwater.getDeployCode());
|
||||
baowenMap.put("DataTime", dataDateTimeStr);
|
||||
baowenMap.put("e1", transdataLivestockwater.getDataWaterTp());
|
||||
baowenMap.put("e2", transdataLivestockwater.getDataWaterTpSy());
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public class SurvTransdataOrientwaterServiceImpl extends ServiceImpl<SurvTransda
|
|||
@Override
|
||||
public SurvTransdataOrientwater getOneByDeviceCode(String deviceCode) {
|
||||
QueryWrapper<SurvTransdataOrientwater> queryWrapper = new QueryWrapper<SurvTransdataOrientwater>();
|
||||
queryWrapper.eq("DEVICE_CODE",deviceCode).last("limit 1");
|
||||
queryWrapper.eq("DEPLOY_CODE",deviceCode).last("limit 1");
|
||||
return getOne(queryWrapper);
|
||||
}
|
||||
|
||||
|
|
@ -56,7 +56,7 @@ public class SurvTransdataOrientwaterServiceImpl extends ServiceImpl<SurvTransda
|
|||
try {
|
||||
SurvTransdataOrientwater orientwater = DataUtil.strToOrientwater(str);
|
||||
//保存或者更新实时表
|
||||
SurvTransdataOrientwater transdataOrientwater = getOneByDeviceCode(orientwater.getDeviceCode());
|
||||
SurvTransdataOrientwater transdataOrientwater = getOneByDeviceCode(orientwater.getDeployCode());
|
||||
if(transdataOrientwater == null){
|
||||
transdataOrientwater = orientwater;
|
||||
}else{
|
||||
|
|
@ -101,7 +101,7 @@ public class SurvTransdataOrientwaterServiceImpl extends ServiceImpl<SurvTransda
|
|||
Date dataDateTime = transdataOrientwater.getDataDateTime();
|
||||
String dataDateTimeStr = DateUtil.format(dataDateTime, "yyyy-MM-dd HH:mm:ss");
|
||||
Map<String, String> baowenMap = new HashMap<String, String>();
|
||||
baowenMap.put("mn", transdataOrientwater.getDeviceCode());
|
||||
baowenMap.put("mn", transdataOrientwater.getDeployCode());
|
||||
baowenMap.put("DataTime", dataDateTimeStr);
|
||||
baowenMap.put("e1", transdataOrientwater.getDataWaterTp());
|
||||
baowenMap.put("e2", transdataOrientwater.getDataWaterTpSy());
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public class SurvTransdataPestlightServiceImpl extends ServiceImpl<SurvTransdata
|
|||
public SurvTransdataPestlight getOneByDeviceCode(String deviceCode) {
|
||||
|
||||
QueryWrapper<SurvTransdataPestlight> queryWrapper = new QueryWrapper<SurvTransdataPestlight>();
|
||||
queryWrapper.eq("DEVICE_CODE",deviceCode).last("limit 1");
|
||||
queryWrapper.eq("DEPLOY_CODE",deviceCode).last("limit 1");
|
||||
return getOne(queryWrapper);
|
||||
}
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ public class SurvTransdataPestlightServiceImpl extends ServiceImpl<SurvTransdata
|
|||
|
||||
pestlight.setDataActionTime(DateUtil.parse(DataTime,format));//数据时间
|
||||
pestlight.setDataGatherType("realTime");//数据类型-realTime=实时,dayTime=日数据,month=月数据,year=年数据
|
||||
pestlight.setDeviceCode(mn);//设备编号
|
||||
pestlight.setDeployCode(mn);//设备编号
|
||||
saveOrUpdate(pestlight);
|
||||
//保存历史表
|
||||
SurvHisdataPestlight hisdataPestlight = new SurvHisdataPestlight();
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public class SurvTransdataSoilServiceImpl extends ServiceImpl<SurvTransdataSoilM
|
|||
@Override
|
||||
public SurvTransdataSoil getOneByDeviceCode(String deviceCode,String filterId) {
|
||||
QueryWrapper<SurvTransdataSoil> queryWrapper = new QueryWrapper<SurvTransdataSoil>();
|
||||
queryWrapper.eq("DEVICE_CODE",deviceCode).last("limit 1");
|
||||
queryWrapper.eq("DEPLOY_CODE",deviceCode).last("limit 1");
|
||||
return getOne(queryWrapper);
|
||||
}
|
||||
|
||||
|
|
@ -99,7 +99,7 @@ public class SurvTransdataSoilServiceImpl extends ServiceImpl<SurvTransdataSoilM
|
|||
if(soilCount > 0){//只有数据有效时才入库
|
||||
soil.setDataDateTime(DateUtil.parse(DataTime));//数据时间
|
||||
soil.setDataGatherType("realTime");//数据类型-realTime=实时,dayTime=日数据,month=月数据,year=年数据
|
||||
soil.setDeviceCode(mn);//设备编号
|
||||
soil.setDeployCode(mn);//设备编号
|
||||
soil.setTenantId(deploy.getTenantId());
|
||||
|
||||
SurvDeviceDeploy survDeviceDeploy = deviceDeployMap.get(deploy.getDeployCode()+"_"+ DeviceDeployEnum.SURV_SOIL.getType());
|
||||
|
|
@ -162,7 +162,7 @@ public class SurvTransdataSoilServiceImpl extends ServiceImpl<SurvTransdataSoilM
|
|||
if(airCount > 0) {//只有数据有效时才入库
|
||||
air.setDataDateTime(DateUtil.parse(DataTime));//数据时间
|
||||
air.setDataGatherType("realTime");//数据类型-realTime=实时,dayTime=日数据,month=月数据,year=年数据
|
||||
air.setDeviceCode(mn);//设备编号
|
||||
air.setDeployCode(mn);//设备编号
|
||||
air.setTenantId(deploy.getTenantId());
|
||||
|
||||
SurvDeviceDeploy survDeviceDeploy = deviceDeployMap.get(deploy.getDeployCode()+"_"+ DeviceDeployEnum.SURV_AIR.getType());
|
||||
|
|
@ -237,7 +237,7 @@ public class SurvTransdataSoilServiceImpl extends ServiceImpl<SurvTransdataSoilM
|
|||
if(waterCount >0 ){
|
||||
soil.setDataDateTime(DateUtil.parse(DataTime));//数据时间
|
||||
soil.setDataGatherType("realTime");//数据类型-realTime=实时,dayTime=日数据,month=月数据,year=年数据
|
||||
soil.setDeviceCode(mn);//设备编号
|
||||
soil.setDeployCode(mn);//设备编号
|
||||
soil.setTenantId(deploy.getTenantId());
|
||||
|
||||
SurvDeviceDeploy survDeviceDeploy = deviceDeployMap.get(deploy.getDeployCode()+"_"+ DeviceDeployEnum.WATER_QULITY.getType());
|
||||
|
|
@ -301,7 +301,7 @@ public class SurvTransdataSoilServiceImpl extends ServiceImpl<SurvTransdataSoilM
|
|||
if(airCount > 0) {
|
||||
air.setDataDateTime(DateUtil.parse(DataTime));//数据时间
|
||||
air.setDataGatherType("realTime");//数据类型-realTime=实时,dayTime=日数据,month=月数据,year=年数据
|
||||
air.setDeviceCode(mn);//设备编号
|
||||
air.setDeployCode(mn);//设备编号
|
||||
air.setTenantId(deploy.getTenantId());
|
||||
SurvDeviceDeploy survDeviceDeploy = deviceDeployMap.get(deploy.getDeployCode()+"_"+ DeviceDeployEnum.SURV_AIR.getType());
|
||||
air.setDeployId(survDeviceDeploy!=null?survDeviceDeploy.getId():null);
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ public class DataUtil{
|
|||
SurvTransdataOrientwater orientwater = new SurvTransdataOrientwater();
|
||||
orientwater.setDataDateTime(new Date());
|
||||
orientwater.setDataGatherType("realTime");
|
||||
orientwater.setDeviceCode(CommonConstant.XZP_WATER +str.substring(2,4));//
|
||||
orientwater.setDeployCode(CommonConstant.XZP_WATER +str.substring(2,4));//
|
||||
|
||||
if(str.length() >= 80){
|
||||
orientwater.setDataWaterTp(getVal(str.substring(8,16)));//
|
||||
|
|
@ -137,7 +137,7 @@ public class DataUtil{
|
|||
SurvTransdataLivestockwater livestockwater = new SurvTransdataLivestockwater();
|
||||
livestockwater.setDataDateTime(new Date());
|
||||
livestockwater.setDataGatherType("realTime");
|
||||
livestockwater.setDeviceCode(CommonConstant.XZP_WATER +str.substring(2,4));//
|
||||
livestockwater.setDeployCode(CommonConstant.XZP_WATER +str.substring(2,4));//
|
||||
|
||||
if(str.length() >= 120){
|
||||
livestockwater.setDataWaterTp(getVal(str.substring(8,16)));//
|
||||
|
|
|
|||
Loading…
Reference in New Issue