From fc2adc3521931c2f7bc5b2f3a3d94ebf407828d6 Mon Sep 17 00:00:00 2001
From: yxm <zhp1521624>
Date: Mon, 01 Jul 2024 09:40:55 +0800
Subject: [PATCH] 水库堤防白蚁普查资料当前页压缩导出新增条件优化v20240701
---
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/controller/TbResGeneralInvestigationController.java | 53 +++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 41 insertions(+), 12 deletions(-)
diff --git a/skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/controller/TbResGeneralInvestigationController.java b/skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/controller/TbResGeneralInvestigationController.java
index 39f9cbe..579f42e 100644
--- a/skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/controller/TbResGeneralInvestigationController.java
+++ b/skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/controller/TbResGeneralInvestigationController.java
@@ -9,7 +9,9 @@
import cn.gistack.sm.sjztmd.statisticsVO.StatisticsBar;
import cn.gistack.sm.sjztmd.statisticsVO.StatisticsParams;
import cn.gistack.sm.sjztmd.statisticsVO.StatisticsPie;
+import cn.gistack.sm.sjztmd.statisticsVO.StatisticsTable;
import cn.gistack.sm.sjztmd.vo.AttResBaseGeneralInvestigationVO;
+import cn.gistack.sm.sjztmd.vo.ResGentionVO;
import cn.gistack.sm.sjztmd.vo.TbResGeneralInvestigationParam;
import cn.gistack.sm.sjztmd.wrapper.AttResBaseWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -23,9 +25,11 @@
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.StringUtil;
+import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
+import java.io.IOException;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
@@ -75,26 +79,26 @@
return R.data(tbResGeneralInvestigationService.page(Condition.getPage(query), queryWrapper));
}
- @ApiOperation(value = "白蚁普查-校核接口", notes = "白蚁普查-添加或者修改")
+ @ApiOperation(value = "白蚁普查-校核接口", notes = "白蚁普查-校核接口")
@PostMapping("/checkInfoByResGuid")
- public R checkInfoByResGuid(@RequestBody TbResGeneralInvestigation tbResGeneralInvestigation) {
+ public R checkInfoByResGuid(@RequestBody TbResGeneralInvestigationState tbResGeneralInvestigationState) {
- if (tbResGeneralInvestigation.getTbStateId() == null || tbResGeneralInvestigation.getCheckState() == null) {
+ if (tbResGeneralInvestigationState.getGuid() == null || tbResGeneralInvestigationState.getCheckState() == null) {
return R.fail(-1,"参数不对");
}
//查询根据状态id查询普查记录表
QueryWrapper queryWrapper = new QueryWrapper();
- queryWrapper.eq("\"tb_state_id\"", tbResGeneralInvestigation.getTbStateId());
+ queryWrapper.eq("\"tb_state_id\"", tbResGeneralInvestigationState.getGuid());
List<TbResGeneralInvestigation> list = tbResGeneralInvestigationService.list(queryWrapper);
List<TbResGeneralInvestigation> editList = list.stream().map(categoryEntity -> {
- categoryEntity.setCheckState(tbResGeneralInvestigation.getCheckState()); // 给每个categoryEntity对象的EvaluateTaskId属性设置新值
+ categoryEntity.setCheckState(tbResGeneralInvestigationState.getCheckState()); // 给每个categoryEntity对象的EvaluateTaskId属性设置新值
return categoryEntity; // 返回修改后的对象
})
.collect(Collectors.toList());
- TbResGeneralInvestigationState tbResGeneralInvestigationState = new TbResGeneralInvestigationState();
- tbResGeneralInvestigationState.setGuid(tbResGeneralInvestigation.getTbStateId());
- tbResGeneralInvestigationState.setCheckState(tbResGeneralInvestigation.getCheckState());
+// TbResGeneralInvestigationState tbResGeneralInvestigationState = new TbResGeneralInvestigationState();
+// tbResGeneralInvestigationState.setGuid(tbResGeneralInvestigation.getGuid());
+// tbResGeneralInvestigationState.setCheckState(tbResGeneralInvestigation.getCheckState());
//更新普查记录表状态和状态表状态
return R.status(tbResGeneralInvestigationService.updateBatchById(editList) && tbResGeneralInvestigationStateService.updateById(tbResGeneralInvestigationState));
@@ -103,9 +107,9 @@
@ApiOperation(value = "白蚁普查-添加或者修改", notes = "白蚁普查-添加或者修改")
@PostMapping(value = "/submit")
public R submit(@RequestBody TbResGeneralInvestigation tbResGeneralInvestigation) {
- if (tbResGeneralInvestigation.getGuid() == null) {
- tbResGeneralInvestigation.setCreateTime(new Date());
- }
+// if (tbResGeneralInvestigation.getGuid() == null) {
+ tbResGeneralInvestigation.setCreateTime(new Date());
+// }
return tbResGeneralInvestigationService.saveOrUpdateBy(tbResGeneralInvestigation);
}
@@ -133,6 +137,24 @@
return R.data(list);
}
+ @GetMapping("/downloadZip")
+ @ApiOperation(value = "批量导出白蚁普查的图片视频zip文件")
+ public R downloadZip(Query query,String type) throws IOException {
+
+ List<String> msg = tbResGeneralInvestigationService.downZip(Condition.getPage(query),type);
+
+ return R.data(msg);
+ }
+
+
+ @GetMapping("/downloadZipCopy")
+ @ApiOperation(value = "批量导出白蚁普查的图片视频zip文件")
+ public R downloadZipCopy(Query query,String type,AttResBaseGeneralInvestigationVO attResBase){
+
+ List<ResGentionVO> msg = tbResGeneralInvestigationService.downZipCopy(Condition.getPage(query),type,attResBase);
+
+ return R.data(msg);
+ }
@GetMapping("/statisticsPie")
@@ -142,9 +164,16 @@
}
@GetMapping("/statisticsBar")
- public R statisticsBar(StatisticsParams statisticsParams){
+ public R statisticsBarProvince(StatisticsParams statisticsParams){
List<StatisticsBar> list = tbResGeneralInvestigationService.statisticsBar(statisticsParams);
return R.data(list);
}
+
+ @GetMapping("/statisticsTable")
+ public R statisticsTable(StatisticsParams statisticsParams){
+ List<StatisticsTable> list = tbResGeneralInvestigationService.statisticsTable(statisticsParams);
+ return R.data(list);
+ }
+
}
--
Gitblit v1.9.3