From 08a962d2925baa255207fdf979e6fee794f1773b Mon Sep 17 00:00:00 2001
From: ke <893754509@qq.com>
Date: Fri, 19 Jul 2024 12:25:19 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/jtdev' into jtdev
---
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/controller/TbResGeneralInvestigationController.java | 37 +++++++++++++++++++++++++++++--------
1 files changed, 29 insertions(+), 8 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 dc066aa..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
@@ -11,6 +11,7 @@
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;
@@ -24,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;
@@ -76,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));
@@ -134,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")
--
Gitblit v1.9.3