From b5f739cbf1bf4bbd9f30cf055af7efa513018dfa Mon Sep 17 00:00:00 2001 From: hanrenchun Date: Sun, 28 Jan 2024 17:35:14 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E8=AD=A6=E4=BF=A1=E6=81=AF=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DisposalInfoController.java | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/gather-app/src/main/java/com/ruoyi/database/controller/DisposalInfoController.java b/gather-app/src/main/java/com/ruoyi/database/controller/DisposalInfoController.java index 65aaebe..293f41a 100644 --- a/gather-app/src/main/java/com/ruoyi/database/controller/DisposalInfoController.java +++ b/gather-app/src/main/java/com/ruoyi/database/controller/DisposalInfoController.java @@ -7,6 +7,7 @@ import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.PageUtils; import com.ruoyi.database.domain.DevopsVideoStatus; import com.ruoyi.database.domain.DisposalInfo; import com.ruoyi.database.domain.TransitHuntersUserModelRecord; @@ -33,7 +34,8 @@ public class DisposalInfoController extends BaseController { @GetMapping @ApiOperation("查询预警信息处置表") public TableDataInfo list() { - startPage(); + int count = transitHuntersUserModelRecordService.count(); + PageUtils.startPage(); List list1 = transitHuntersUserModelRecordService.list(); ArrayList transitHuntersUserModelRecords = new ArrayList<>(); for (TransitHuntersUserModelRecord transitHuntersUserModelRecord :list1){ @@ -53,22 +55,19 @@ public class DisposalInfoController extends BaseController { } transitHuntersUserModelRecords.add(transitHuntersUserModelRecord); } - return getDataTable(transitHuntersUserModelRecords); + TableDataInfo dataTable = getDataTable(transitHuntersUserModelRecords); + dataTable.setTotal(count); + return dataTable; } @PostMapping @ApiOperation("新增预警信息处置表") @Log(title = "预警信息处置表", businessType = BusinessType.INSERT) public AjaxResult insert(@RequestBody DisposalInfo disposalInfo) { - if (disposalInfo.getDisposalResultCn()!=null){ - boolean equals = "未处置".equals(disposalInfo.getDisposalResultCn()); - if (equals){ - disposalInfo.setDisposalResult(1); - }else { - disposalInfo.setDisposalResult(2); - } + if (disposalInfo != null){ + disposalInfo.setDisposalResult(2); + disposalInfo.setSignStatus(1); } -// if (disposalInfo.getDisposalResultCn()) return toAjax(disposalInfoService.save(disposalInfo)); } @@ -76,6 +75,9 @@ public class DisposalInfoController extends BaseController { @ApiOperation("修改预警信息处置表") @Log(title = "预警信息处置表", businessType = BusinessType.UPDATE) public AjaxResult update(@RequestBody DisposalInfo disposalInfo) { + if (disposalInfo!=null){ + disposalInfo.setSignStatus(2); + } return toAjax(disposalInfoService.updateById(disposalInfo)); } }