fix: 1.oracle切换至pgsql之后 自动处理模块修改代码
This commit is contained in:
parent
ee968ae840
commit
33b6031031
|
@ -70,6 +70,16 @@ public class MybatisInterceptor implements Interceptor {
|
||||||
field.setAccessible(false);
|
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())) {
|
if ("sysOrgCode".equals(field.getName())) {
|
||||||
field.setAccessible(true);
|
field.setAccessible(true);
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
package org.jeecg.modules.base.entity.original;
|
package org.jeecg.modules.base.entity.original;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
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 com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
@ -13,6 +10,7 @@ import java.util.Date;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@TableName("ORIGINAL.GARDS_ALERT_DATA")
|
@TableName("ORIGINAL.GARDS_ALERT_DATA")
|
||||||
|
@KeySequence(value = "original.gards_alert_data_seq", dbType = DbType.POSTGRE_SQL)
|
||||||
public class GardsAlertData implements Serializable {
|
public class GardsAlertData implements Serializable {
|
||||||
|
|
||||||
@TableField(value = "STATION_ID")
|
@TableField(value = "STATION_ID")
|
||||||
|
@ -22,7 +20,7 @@ public class GardsAlertData implements Serializable {
|
||||||
@TableField(value = "STATION_CODE")
|
@TableField(value = "STATION_CODE")
|
||||||
private String stationCode;
|
private String stationCode;
|
||||||
|
|
||||||
@TableId(value = "ALERT_ID",type = IdType.AUTO)
|
@TableId(value = "ALERT_ID",type = IdType.INPUT)
|
||||||
private Integer alertId;
|
private Integer alertId;
|
||||||
|
|
||||||
@TableField(value = "TIME")
|
@TableField(value = "TIME")
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
package org.jeecg.modules.base.entity.original;
|
package org.jeecg.modules.base.entity.original;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
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 com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
@ -14,6 +11,7 @@ import java.util.Date;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@TableName(value = "ORIGINAL.GARDS_DOS_DATA")
|
@TableName(value = "ORIGINAL.GARDS_DOS_DATA")
|
||||||
|
@KeySequence(value = "original.gards_dos_data_seq", dbType = DbType.POSTGRE_SQL)
|
||||||
public class GardsDOSData implements Serializable {
|
public class GardsDOSData implements Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -32,7 +30,7 @@ public class GardsDOSData implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 报警ID号
|
* 报警ID号
|
||||||
*/
|
*/
|
||||||
@TableId(value = "DOS_ID",type = IdType.AUTO)
|
@TableId(value = "DOS_ID",type = IdType.INPUT)
|
||||||
@Excel(name = "SID",orderNum = "5")
|
@Excel(name = "SID",orderNum = "5")
|
||||||
private Integer dosId;
|
private Integer dosId;
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
package org.jeecg.modules.base.entity.original;
|
package org.jeecg.modules.base.entity.original;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
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 com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
@ -14,6 +11,7 @@ import java.util.Date;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@TableName(value = "ORIGINAL.GARDS_MET_DATA")
|
@TableName(value = "ORIGINAL.GARDS_MET_DATA")
|
||||||
|
@KeySequence(value = "original.gards_met_data_seq", dbType = DbType.POSTGRE_SQL)
|
||||||
public class GardsMetData implements Serializable {
|
public class GardsMetData implements Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -31,7 +29,7 @@ public class GardsMetData implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 气象数据id
|
* 气象数据id
|
||||||
*/
|
*/
|
||||||
@TableId(value = "MET_ID",type = IdType.AUTO)
|
@TableId(value = "MET_ID",type = IdType.INPUT)
|
||||||
private Integer metId;
|
private Integer metId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
package org.jeecg.modules.base.entity.original;
|
package org.jeecg.modules.base.entity.original;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
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 com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
@ -14,6 +11,7 @@ import java.util.Date;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@TableName("ORIGINAL.GARDS_SAMPLE_DATA")
|
@TableName("ORIGINAL.GARDS_SAMPLE_DATA")
|
||||||
|
@KeySequence(value = "original.gards_sample_data_seq", dbType = DbType.POSTGRE_SQL)
|
||||||
public class GardsSampleData implements Serializable {
|
public class GardsSampleData implements Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -27,7 +25,7 @@ public class GardsSampleData implements Serializable {
|
||||||
* 样品id
|
* 样品id
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@TableId(value = "SAMPLE_ID",type = IdType.AUTO)
|
@TableId(value = "SAMPLE_ID",type = IdType.INPUT)
|
||||||
private Integer sampleId;
|
private Integer sampleId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
package org.jeecg.modules.base.entity.original;
|
package org.jeecg.modules.base.entity.original;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
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 com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
@ -13,6 +10,7 @@ import java.util.Date;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@TableName(value = "ORIGINAL.GARDS_SOH_DATA")
|
@TableName(value = "ORIGINAL.GARDS_SOH_DATA")
|
||||||
|
@KeySequence(value = "original.gards_soh_data_seq", dbType = DbType.POSTGRE_SQL)
|
||||||
public class GardsSohData implements Serializable {
|
public class GardsSohData implements Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -31,7 +29,7 @@ public class GardsSohData implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 报警ID号
|
* 报警ID号
|
||||||
*/
|
*/
|
||||||
@TableId(value = "SOH_ID",type = IdType.AUTO)
|
@TableId(value = "SOH_ID",type = IdType.INPUT)
|
||||||
@Excel(name = "SID",orderNum = "5")
|
@Excel(name = "SID",orderNum = "5")
|
||||||
private Integer sohId;
|
private Integer sohId;
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
package org.jeecg.modules.base.entity.rnauto;
|
package org.jeecg.modules.base.entity.rnauto;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
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 com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
@ -16,12 +13,13 @@ import java.util.Date;
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@TableName("RNAUTO.GARDS_ANALYSES")
|
@TableName("RNAUTO.GARDS_ANALYSES")
|
||||||
|
@KeySequence(value = "rnauto.gards_analyses_seq", dbType = DbType.POSTGRE_SQL)
|
||||||
public class GardsAnalyses implements Serializable {
|
public class GardsAnalyses implements Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分析ID号
|
* 分析ID号
|
||||||
*/
|
*/
|
||||||
@TableId(value = "IDANALYSIS",type = IdType.AUTO)
|
@TableId(value = "IDANALYSIS",type = IdType.INPUT)
|
||||||
private Integer idAnalysis;
|
private Integer idAnalysis;
|
||||||
/**
|
/**
|
||||||
* 样品id
|
* 样品id
|
||||||
|
|
|
@ -32,8 +32,6 @@
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<insert id="createBatch" parameterType="org.jeecg.modules.base.entity.rnauto.GardsCalibration">
|
<insert id="createBatch" parameterType="org.jeecg.modules.base.entity.rnauto.GardsCalibration">
|
||||||
begin
|
|
||||||
<foreach collection="calibrations" separator=";" close=";" item="calibration">
|
|
||||||
insert into RNAUTO.GARDS_CALIBRATION(
|
insert into RNAUTO.GARDS_CALIBRATION(
|
||||||
SAMPLE_ID,
|
SAMPLE_ID,
|
||||||
IDANALYSIS,
|
IDANALYSIS,
|
||||||
|
@ -46,6 +44,7 @@
|
||||||
COEFF_STRING,
|
COEFF_STRING,
|
||||||
moddate)
|
moddate)
|
||||||
values
|
values
|
||||||
|
<foreach collection="calibrations" separator="," close=";" item="calibration">
|
||||||
(#{calibration.sampleId},
|
(#{calibration.sampleId},
|
||||||
#{calibration.idAnalysis},
|
#{calibration.idAnalysis},
|
||||||
#{calibration.sampleType},
|
#{calibration.sampleType},
|
||||||
|
@ -57,7 +56,6 @@
|
||||||
#{calibration.coeffString},
|
#{calibration.coeffString},
|
||||||
#{calibration.moddate})
|
#{calibration.moddate})
|
||||||
</foreach>
|
</foreach>
|
||||||
end;
|
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,9 @@
|
||||||
substr(t.site_det_code,1,5) as station_name,
|
substr(t.site_det_code,1,5) as station_name,
|
||||||
t.data_type,
|
t.data_type,
|
||||||
1 as original_data_number,
|
1 as original_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
|
-- 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
|
||||||
from original.GARDS_SAMPLE_DATA t
|
from original.GARDS_SAMPLE_DATA t
|
||||||
where t.moddate between #{beginDate} and #{endDate}
|
where t.moddate between #{beginDate} and #{endDate}
|
||||||
) r
|
) r
|
||||||
|
|
Loading…
Reference in New Issue
Block a user