提交灾前灾后

This commit is contained in:
yyhouc 2023-05-25 16:15:10 +08:00
parent e55cd6430b
commit d1a3901af1
3 changed files with 13 additions and 2 deletions

View File

@ -210,6 +210,9 @@ public class RemoteSensingSourceData implements Serializable {
//结束时间
@TableField(exist = false)
private String endTime;
//标志灾前灾后字段 0-灾前1-灾后
@TableField(exist = false)
private Integer beforeOrAfter =1;
}

View File

@ -55,6 +55,7 @@ public class RemoteSensingSourceDataController {
if (optionsJson != null) {
remoteSensingSourceData = (RemoteSensingSourceData) JSON.parseObject(optionsJson, RemoteSensingSourceData.class);
}
return R.data(remoteSensingSourceDataService.getRemoteSensingSourceDataByCondition(Condition.getPage(query), remoteSensingSourceData));
}

View File

@ -89,8 +89,15 @@
open="(" separator="," close=")">#{AList}
</foreach>
</if>
<if test="remoteSensingSourceData.startTime != null and remoteSensingSourceData.startTime != '' and remoteSensingSourceData.endTime != null and remoteSensingSourceData.endTime != '' ">
and r.product_time between #{remoteSensingSourceData.startTime} and #{remoteSensingSourceData.endTime}
<if test="remoteSensingSourceData.beforeOrAfter == 1">
and r.product_time &gt;= (select
disaster_time
from disaster_info where id = #{remoteSensingSourceData.disasterId})
</if>
<if test="remoteSensingSourceData.beforeOrAfter == 0">
and r.product_time &lt; (select
disaster_time
from disaster_info where id = #{remoteSensingSourceData.disasterId})
</if>
</where>
</select>