glj-代码提交

This commit is contained in:
管李杰 2024-03-01 09:15:10 +08:00
parent 60e0c3ed00
commit 2fdfc281e6
8 changed files with 97 additions and 3 deletions

View File

@ -235,7 +235,7 @@ public class RemoteSensingSourceData implements Serializable {
//标志灾前灾后字段 0-灾前1-灾后
@TableField(exist = false)
private Integer beforeOrAfter =1;
private Integer beforeOrAfter;
//多个Id
@TableField(exist = false)

View File

@ -53,6 +53,8 @@ public class OtherDataController {
return R.data(service.queryPage(Condition.getPage(query),params));
}
/**
* 批量审批
* @return

View File

@ -16,6 +16,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@ -45,6 +46,13 @@ public class RemoteSensingSourceDataController {
return R.data(remoteSensingSourceDataService.page(Condition.getPage(query), new QueryWrapper<RemoteSensingSourceData>().in("disaster_id", disasterIds)));
}
@GetMapping("/getRemoteSensingSourceDataPage")
public R<IPage<RemoteSensingSourceData>> getRemoteSensingSourceDataPage(RemoteSensingSourceData remoteSensingSourceData, Query query) {
return R.data(remoteSensingSourceDataService.page(Condition.getPage(query), new QueryWrapper<RemoteSensingSourceData>().eq("disaster_id", remoteSensingSourceData.getDisasterId()).in("status",Arrays.asList(remoteSensingSourceData.getStatusListNew().split(",")))));
}
/**
* 实体数据列表信息
*
@ -62,6 +70,11 @@ public class RemoteSensingSourceDataController {
return R.data(remoteSensingSourceDataService.getRemoteSensingSourceDataByCondition(Condition.getPage(query), remoteSensingSourceData));
}
@GetMapping("/ConditionNew")
public R<IPage<RemoteSensingSourceData>> getRemoteSensingSourceDataByConditionNew(RemoteSensingSourceData remoteSensingSourceData, Query query) {
return R.data(remoteSensingSourceDataService.getRemoteSensingSourceDataByConditionNew(Condition.getPage(query), remoteSensingSourceData));
}
/**
* 实体数据列表信息
*

View File

@ -24,4 +24,6 @@ public interface RemoteSensingSourceDataMapper extends BaseMapper<RemoteSensingS
IPage<RemoteSensingSourceData> getRemoteSensingSourceDataByCondition(@Param("remoteSensingSourceData") RemoteSensingSourceData remoteSensingSourceData, IPage<Object> page);
List<Map<String, Long>> getStatisticsByUserId(@Param("id") Long id,@Param("year") String year);
IPage<RemoteSensingSourceData> getRemoteSensingSourceDataByConditionNew(@Param("remoteSensingSourceData") RemoteSensingSourceData remoteSensingSourceData, IPage<Object> page);
}

View File

@ -77,25 +77,31 @@
<if test="remoteSensingSourceData.status != null">
and r.status = #{remoteSensingSourceData.status}
</if>
<if test="remoteSensingSourceData.productResolutionMax != null and remoteSensingSourceData.productResolutionMin != null">
and r.product_resolution &gt;= #{remoteSensingSourceData.productResolutionMin} and r.product_resolution
&lt; #{remoteSensingSourceData.productResolutionMax}
</if>
<if test="remoteSensingSourceData.productResolutionMax == null and remoteSensingSourceData.productResolutionMin != null">
and r.product_resolution &gt; #{remoteSensingSourceData.productResolutionMin}
</if>
/*卫星类型集合*/
<if test="remoteSensingSourceData.satelliteCodeListNew != null and remoteSensingSourceData.satelliteCodeListNew != '' and remoteSensingSourceData.satelliteCodeListNew.size() != 0">
and r.satellite_type_select in
<foreach item="AList" index="index" collection="remoteSensingSourceData.satelliteCodeListNew"
open="(" separator="," close=")">#{AList}
</foreach>
</if>
/*状态集合*/
<if test="remoteSensingSourceData.statusList != null and remoteSensingSourceData.statusList != '' and remoteSensingSourceData.statusList.size() != 0">
and r.status in
<foreach item="AList" index="index" collection="remoteSensingSourceData.statusList"
open="(" separator="," close=")">#{AList}
</foreach>
</if>
/*灾前还是灾后*/
<if test="remoteSensingSourceData.beforeOrAfter != null and remoteSensingSourceData.beforeOrAfter != ''">
<if test="remoteSensingSourceData.beforeOrAfter == 1">
and r.product_time &gt;= (select
disaster_time
@ -106,6 +112,7 @@
disaster_time
from disaster_info where id = #{remoteSensingSourceData.disasterId})
</if>
</if>
</where>
</select>
@ -188,4 +195,65 @@
ORDER BY d.`key`
</select>
<select id="getRemoteSensingSourceDataByConditionNew" resultType="com.kening.vordm.entity.RemoteSensingSourceData">
select
<include refid="Base_Column_List"/>
from remote_sensing_source_data r
<where>
<if test="remoteSensingSourceData.disasterId != null and remoteSensingSourceData.disasterId != ''">
r.disaster_id = #{remoteSensingSourceData.disasterId}
</if>
<if test="remoteSensingSourceData.status != null">
and r.status = #{remoteSensingSourceData.status}
</if>
<if test="remoteSensingSourceData.productResolutionMax != null and remoteSensingSourceData.productResolutionMin != null">
and r.product_resolution &gt;= #{remoteSensingSourceData.productResolutionMin} and r.product_resolution
&lt;= #{remoteSensingSourceData.productResolutionMax}
</if>
<if test="remoteSensingSourceData.productResolutionMax == null and remoteSensingSourceData.productResolutionMin != null">
and r.product_resolution &gt; #{remoteSensingSourceData.productResolutionMin}
</if>
<if test="remoteSensingSourceData.productResolutionMax != null and remoteSensingSourceData.productResolutionMin == null">
and r.product_resolution &lt; #{remoteSensingSourceData.productResolutionMax}
</if>
<if test="remoteSensingSourceData.satelliteTypeSelect != null and remoteSensingSourceData.satelliteTypeSelect != ''">
and r.satellite_type_select = #{remoteSensingSourceData.satelliteTypeSelect}
</if>
/*卫星类型集合*/
<if test="remoteSensingSourceData.satelliteCodeListNew != null and remoteSensingSourceData.satelliteCodeListNew != '' and remoteSensingSourceData.satelliteCodeListNew.size() != 0">
and r.satellite_type_select in
<foreach item="AList" index="index" collection="remoteSensingSourceData.satelliteCodeListNew"
open="(" separator="," close=")">#{AList}
</foreach>
</if>
/*状态集合*/
<if test="remoteSensingSourceData.statusList != null and remoteSensingSourceData.statusList != '' and remoteSensingSourceData.statusList.size() != 0">
and r.status in
<foreach item="AList" index="index" collection="remoteSensingSourceData.statusList"
open="(" separator="," close=")">#{AList}
</foreach>
</if>
/*灾前还是灾后*/
<if test="remoteSensingSourceData.beforeOrAfter != null and remoteSensingSourceData.beforeOrAfter != ''">
<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>
</if>
</where>
</select>
</mapper>

View File

@ -29,4 +29,6 @@ public interface RemoteSensingSourceDataService extends IService<RemoteSensingSo
R importTemplateImgList(List<MultipartFile> fileList, Long disasterId);
void exportRemoteSensing(Long id, HttpServletRequest request, HttpServletResponse response);
IPage<RemoteSensingSourceData> getRemoteSensingSourceDataByConditionNew(IPage<Object> page, RemoteSensingSourceData remoteSensingSourceData);
}

View File

@ -344,6 +344,13 @@ public class RemoteSensingSourceDataServiceImpl extends ServiceImpl<RemoteSensin
}
}
@Override
public IPage<RemoteSensingSourceData> getRemoteSensingSourceDataByConditionNew(IPage<Object> page, RemoteSensingSourceData remoteSensingSourceData) {
List<String> result = Arrays.asList(remoteSensingSourceData.getStatusListNew().split(","));
remoteSensingSourceData.setStatusList(result);
return this.baseMapper.getRemoteSensingSourceDataByConditionNew(remoteSensingSourceData, page);
}
public static void downLoadExcel(HttpServletResponse response, Workbook workbook, String fileName) {
try {
if (workbook instanceof HSSFWorkbook) {

View File

@ -218,7 +218,7 @@
<repository>
<id>kening-release</id>
<name>Release Repository</name>
<url>http://47.92.168.204:8081/repository/maven-public/</url>
<url>http://192.168.31.17:8081/repository/maven-public/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
@ -231,7 +231,7 @@
<pluginRepositories>
<pluginRepository>
<id>kening-plugin</id>
<url>http://47.92.168.204:8081/repository/maven-public/</url>
<url>http://192.168.31.17:8081/repository/maven-public/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>