Compare commits
No commits in common. "7df755d8c978b5ea80f41ddf5be68aeb6c2f5d39" and "ee968ae840d1ba0bbfb116a07bb3bfd02edbe451" have entirely different histories.
7df755d8c9
...
ee968ae840
|
@ -70,16 +70,6 @@ public class MybatisInterceptor implements Interceptor {
|
|||
field.setAccessible(false);
|
||||
}
|
||||
}
|
||||
if ("moddate".equalsIgnoreCase(field.getName())) {
|
||||
field.setAccessible(true);
|
||||
Object localCreateDate = field.get(parameter);
|
||||
field.setAccessible(false);
|
||||
if (localCreateDate == null || "".equals(localCreateDate)) {
|
||||
field.setAccessible(true);
|
||||
field.set(parameter, new Date());
|
||||
field.setAccessible(false);
|
||||
}
|
||||
}
|
||||
//注入部门编码
|
||||
if ("sysOrgCode".equals(field.getName())) {
|
||||
field.setAccessible(true);
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
package org.jeecg.config.mybatis;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.incrementer.PostgreKeyGenerator;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component("MybatisPlusKeyGenerator")
|
||||
public class MybatisPlusKeyGenerator {
|
||||
@Bean
|
||||
public PostgreKeyGenerator postgreKeyGenerator(){
|
||||
return new PostgreKeyGenerator();
|
||||
}
|
||||
}
|
|
@ -1,6 +1,9 @@
|
|||
package org.jeecg.modules.base.entity.original;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
@ -10,7 +13,6 @@ import java.util.Date;
|
|||
|
||||
@Data
|
||||
@TableName("ORIGINAL.GARDS_ALERT_DATA")
|
||||
@KeySequence(value = "original.gards_alert_data_seq", dbType = DbType.POSTGRE_SQL)
|
||||
public class GardsAlertData implements Serializable {
|
||||
|
||||
@TableField(value = "STATION_ID")
|
||||
|
@ -20,7 +22,7 @@ public class GardsAlertData implements Serializable {
|
|||
@TableField(value = "STATION_CODE")
|
||||
private String stationCode;
|
||||
|
||||
@TableId(value = "ALERT_ID",type = IdType.INPUT)
|
||||
@TableId(value = "ALERT_ID",type = IdType.AUTO)
|
||||
private Integer alertId;
|
||||
|
||||
@TableField(value = "TIME")
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package org.jeecg.modules.base.entity.original;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
@ -11,7 +14,6 @@ import java.util.Date;
|
|||
|
||||
@Data
|
||||
@TableName(value = "ORIGINAL.GARDS_DOS_DATA")
|
||||
@KeySequence(value = "original.gards_dos_data_seq", dbType = DbType.POSTGRE_SQL)
|
||||
public class GardsDOSData implements Serializable {
|
||||
|
||||
/**
|
||||
|
@ -30,7 +32,7 @@ public class GardsDOSData implements Serializable {
|
|||
/**
|
||||
* 报警ID号
|
||||
*/
|
||||
@TableId(value = "DOS_ID",type = IdType.INPUT)
|
||||
@TableId(value = "DOS_ID",type = IdType.AUTO)
|
||||
@Excel(name = "SID",orderNum = "5")
|
||||
private Integer dosId;
|
||||
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package org.jeecg.modules.base.entity.original;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
@ -11,7 +14,6 @@ import java.util.Date;
|
|||
|
||||
@Data
|
||||
@TableName(value = "ORIGINAL.GARDS_MET_DATA")
|
||||
@KeySequence(value = "original.gards_met_data_seq", dbType = DbType.POSTGRE_SQL)
|
||||
public class GardsMetData implements Serializable {
|
||||
|
||||
/**
|
||||
|
@ -29,7 +31,7 @@ public class GardsMetData implements Serializable {
|
|||
/**
|
||||
* 气象数据id
|
||||
*/
|
||||
@TableId(value = "MET_ID",type = IdType.INPUT)
|
||||
@TableId(value = "MET_ID",type = IdType.AUTO)
|
||||
private Integer metId;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package org.jeecg.modules.base.entity.original;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
@ -11,7 +14,6 @@ import java.util.Date;
|
|||
|
||||
@Data
|
||||
@TableName("ORIGINAL.GARDS_SAMPLE_DATA")
|
||||
@KeySequence(value = "original.gards_sample_data_seq", dbType = DbType.POSTGRE_SQL)
|
||||
public class GardsSampleData implements Serializable {
|
||||
|
||||
/**
|
||||
|
@ -25,7 +27,7 @@ public class GardsSampleData implements Serializable {
|
|||
* 样品id
|
||||
*/
|
||||
|
||||
@TableId(value = "SAMPLE_ID",type = IdType.INPUT)
|
||||
@TableId(value = "SAMPLE_ID",type = IdType.AUTO)
|
||||
private Integer sampleId;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package org.jeecg.modules.base.entity.original;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
@ -10,7 +13,6 @@ import java.util.Date;
|
|||
|
||||
@Data
|
||||
@TableName(value = "ORIGINAL.GARDS_SOH_DATA")
|
||||
@KeySequence(value = "original.gards_soh_data_seq", dbType = DbType.POSTGRE_SQL)
|
||||
public class GardsSohData implements Serializable {
|
||||
|
||||
/**
|
||||
|
@ -29,7 +31,7 @@ public class GardsSohData implements Serializable {
|
|||
/**
|
||||
* 报警ID号
|
||||
*/
|
||||
@TableId(value = "SOH_ID",type = IdType.INPUT)
|
||||
@TableId(value = "SOH_ID",type = IdType.AUTO)
|
||||
@Excel(name = "SID",orderNum = "5")
|
||||
private Integer sohId;
|
||||
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package org.jeecg.modules.base.entity.rnauto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
@ -13,13 +16,12 @@ import java.util.Date;
|
|||
*/
|
||||
@Data
|
||||
@TableName("RNAUTO.GARDS_ANALYSES")
|
||||
@KeySequence(value = "rnauto.gards_analyses_seq", dbType = DbType.POSTGRE_SQL)
|
||||
public class GardsAnalyses implements Serializable {
|
||||
|
||||
/**
|
||||
* 分析ID号
|
||||
*/
|
||||
@TableId(value = "IDANALYSIS",type = IdType.INPUT)
|
||||
@TableId(value = "IDANALYSIS",type = IdType.AUTO)
|
||||
private Integer idAnalysis;
|
||||
/**
|
||||
* 样品id
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
</insert>
|
||||
|
||||
<insert id="createBatch" parameterType="org.jeecg.modules.base.entity.rnauto.GardsCalibration">
|
||||
begin
|
||||
<foreach collection="calibrations" separator=";" close=";" item="calibration">
|
||||
insert into RNAUTO.GARDS_CALIBRATION(
|
||||
SAMPLE_ID,
|
||||
IDANALYSIS,
|
||||
|
@ -44,7 +46,6 @@
|
|||
COEFF_STRING,
|
||||
moddate)
|
||||
values
|
||||
<foreach collection="calibrations" separator="," close=";" item="calibration">
|
||||
(#{calibration.sampleId},
|
||||
#{calibration.idAnalysis},
|
||||
#{calibration.sampleType},
|
||||
|
@ -56,6 +57,7 @@
|
|||
#{calibration.coeffString},
|
||||
#{calibration.moddate})
|
||||
</foreach>
|
||||
end;
|
||||
</insert>
|
||||
|
||||
|
||||
|
|
|
@ -19,9 +19,7 @@
|
|||
substr(t.site_det_code,1,5) as station_name,
|
||||
t.data_type,
|
||||
1 as original_data_number,
|
||||
-- oracle 转 postgresql
|
||||
-- nvl2((select t.sample_id from rnauto.GARDS_ANALYSES ga where ga.sample_id = t.sample_id),1,0) as anlyse_data_number
|
||||
(select CASE WHEN t.sample_id is not null THEN 1 ELSE 0 END from rnauto.GARDS_ANALYSES ga where ga.sample_id = t.sample_id ) as anlyse_data_number
|
||||
nvl2((select t.sample_id from rnauto.GARDS_ANALYSES ga where ga.sample_id = t.sample_id),1,0) as anlyse_data_number
|
||||
from original.GARDS_SAMPLE_DATA t
|
||||
where t.moddate between #{beginDate} and #{endDate}
|
||||
) r
|
||||
|
|
Loading…
Reference in New Issue
Block a user