From 4d060476ffbee20546d3cd2ad64384cf1d7a19aa Mon Sep 17 00:00:00 2001 From: wangxy <1356089412@qq.com> Date: Wed, 21 Aug 2024 14:47:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=BD=BD=E4=BD=93=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/count/SysFilenumController.java | 54 +++++++++---------- .../system/fileprovide/filenum/filenum.html | 49 +++++++---------- 2 files changed, 46 insertions(+), 57 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/count/SysFilenumController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/count/SysFilenumController.java index 53078ff..cf47f69 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/count/SysFilenumController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/count/SysFilenumController.java @@ -9,15 +9,19 @@ import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.system.domain.TdFileProvide; import com.ruoyi.system.domain.TdFileReceive; +import com.ruoyi.system.domain.carrier.TdCarrier; import com.ruoyi.system.service.ISysDictDataService; import com.ruoyi.system.service.ITdFileProvideService; import com.ruoyi.system.service.ITdFileReceiveService; +import com.ruoyi.system.service.carrier.TdCarrierService; +import com.ruoyi.web.controller.manager.CarrierManager; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicReference; @@ -31,15 +35,15 @@ import java.util.stream.Collectors; public class SysFilenumController extends BaseController { private String prefix = "system/fileprovide/filenum"; - @Autowired - private ITdFileProvideService tdFileProvideService; - @Autowired - private ITdFileReceiveService tdFileReceiveService; + @Resource + private CarrierManager carrierManager; + + @Resource + private TdCarrierService carrierService; @RequiresPermissions("system:filenum:view") @GetMapping() - public String fileprovide() - { + public String fileprovide() { return prefix + "/filenum"; } @@ -49,25 +53,21 @@ public class SysFilenumController extends BaseController { @RequiresPermissions("system:filenum:list") @PostMapping("/list") @ResponseBody - public TableDataInfo list(TdFileProvide tdFileProvide) - { + public TableDataInfo list(TdCarrier tdCarrier) { startPage(); - List list = tdFileProvideService.selectTdFileProvideList(tdFileProvide); - return getDataTable(list); + List carriers = carrierManager.selectTdCarrierList(tdCarrier); + return getDataTable(carriers); } /** * 打印界面,根据文件编号区分 */ @RequiresPermissions("system:filenum:print") - @GetMapping("/print/{fileId}") + @GetMapping("/print/{id}") @Log(title = "文件统计", businessType = BusinessType.PRINT) - public String print(@PathVariable("fileId") String fileId, ModelMap mmap) - { - List tdFileReceives = tdFileReceiveService.selectTdFileReceiveByFileId(fileId); - TdFileProvide tdFileProvide = tdFileProvideService.selectTdFileProvideByFileId(fileId); - mmap.put("tdFileReceives", tdFileReceives); - mmap.put("tdFileProvide", tdFileProvide); + public String print(@PathVariable("id") String id, ModelMap mmap) { + TdCarrier tdCarrier = carrierManager.selectTdCarrier(id); + mmap.put("tdCarrier", tdCarrier); mmap.put("sysuser", getSysUser()); return prefix + "/print"; } @@ -76,23 +76,23 @@ public class SysFilenumController extends BaseController { private ISysDictDataService dictDataService; /** - * - * 载体类型统计 + * 载体类型统计 + * * @return com.ruoyi.common.core.domain.AjaxResult */ - + @PostMapping("/countLevel") @ResponseBody public AjaxResult countLevel() { - SysDictData sysDictData = new SysDictData(); + SysDictData sysDictData = new SysDictData(); sysDictData.setDictType("sys_provide_level"); List smType = dictDataService.selectDictDataList(sysDictData); List list = smType.stream().map(SysDictData::getDictLabel).collect(Collectors.toList()); List yAxisData = new ArrayList<>(); smType.forEach(xAxis -> { AtomicReference yAxis = new AtomicReference<>(0L); - Integer count = tdFileProvideService.lambdaQuery() - .eq(TdFileProvide::getProvideLevel, xAxis.getDictValue()) + Integer count = carrierService.lambdaQuery() + .eq(TdCarrier::getCarrierLevel, xAxis.getDictValue()) .count(); yAxis.set(Long.valueOf(count)); @@ -106,21 +106,21 @@ public class SysFilenumController extends BaseController { /** + * 载体密级统计 * - * 载体密级统计 * @return com.ruoyi.common.core.domain.AjaxResult */ @PostMapping("/countSecret") @ResponseBody public AjaxResult countSecret() { - SysDictData sysDictData = new SysDictData(); + SysDictData sysDictData = new SysDictData(); sysDictData.setDictType("sys_file_miji"); List smType = dictDataService.selectDictDataList(sysDictData); List jsonObjects = new ArrayList<>(); smType.forEach(xAxis -> { AtomicReference value = new AtomicReference<>(0L); - Integer count = tdFileProvideService.lambdaQuery() - .eq(TdFileProvide::getFileSecret, xAxis.getDictValue()) + Integer count = carrierService.lambdaQuery() + .eq(TdCarrier::getCarrierSecret, xAxis.getDictValue()) .count(); value.set(Long.valueOf(count)); JSONObject jsonObject = new JSONObject(); diff --git a/ruoyi-admin/src/main/resources/templates/system/fileprovide/filenum/filenum.html b/ruoyi-admin/src/main/resources/templates/system/fileprovide/filenum/filenum.html index 6463f8d..918bb25 100644 --- a/ruoyi-admin/src/main/resources/templates/system/fileprovide/filenum/filenum.html +++ b/ruoyi-admin/src/main/resources/templates/system/fileprovide/filenum/filenum.html @@ -36,19 +36,19 @@
  • - - + +
  • -
  • -
  • - +
  •  搜索 @@ -96,45 +96,34 @@ pageSize:5, columns: [ { - field: 'fileId', - title: '载体编码' - }, - { - field: 'fileName', - title: '载体名称' - }, - { - field: 'fileNum', + field: 'carrierNumber', title: '编号' }, { - field: 'provideCount', - title: '载体数量' + field: 'areaCity', + title: '所属市州', + formatter: function(value, row, index) { + return getCity(datas, value) + } }, { - field: 'provideDepart', - title: '下发单位' + field: 'carrierName', + title: '载体名称' }, { - field: 'provideDate', - title: '下发日期' + field: 'carrierCount', + title: '载体数量' }, { - field: 'instancyExtent', + field: 'carrierExtent', title: '紧急程度', formatter: function(value, row, index) { return $.table.selectDictLabel(instancyExtentDatas, value); } }, + { - field: 'frameworkId', - title: '所属地区', - formatter: function(value, row, index) { - return getCity(datas, value) - } - }, - { - field: 'fileSecret', + field: 'carrierSecret', title: '载体密级', formatter: function(value, row, index) { return $.table.selectDictLabel(fileSecretDatas, value); @@ -145,7 +134,7 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('打印 '); + actions.push('打印 '); return actions.join(''); } }]