From dd4bac3ede0f9b65c5907e67760889f4de91fddb Mon Sep 17 00:00:00 2001 From: wangxy <1481820854@qq.com> Date: Wed, 9 Oct 2024 14:59:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=BF=916=E4=B8=AA=E6=9C=88=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E6=B6=89=E5=AF=86=E7=BD=91=E7=BB=9C=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/count/SysFilenumController.java | 60 +++++++++++++++---- 1 file changed, 48 insertions(+), 12 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 cf47f69..78081c0 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 @@ -10,10 +10,13 @@ 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.domain.carrier.TdCarrierIssued; import com.ruoyi.system.service.ISysDictDataService; import com.ruoyi.system.service.ITdFileProvideService; import com.ruoyi.system.service.ITdFileReceiveService; +import com.ruoyi.system.service.carrier.TdCarrierIssuedService; import com.ruoyi.system.service.carrier.TdCarrierService; +import com.ruoyi.web.controller.manager.CarrierIssuedManager; import com.ruoyi.web.controller.manager.CarrierManager; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; @@ -76,7 +79,7 @@ public class SysFilenumController extends BaseController { private ISysDictDataService dictDataService; /** - * 载体类型统计 + * 自行制作-载体数量 * * @return com.ruoyi.common.core.domain.AjaxResult */ @@ -84,15 +87,13 @@ public class SysFilenumController extends BaseController { @PostMapping("/countLevel") @ResponseBody public AjaxResult countLevel() { - SysDictData sysDictData = new SysDictData(); - sysDictData.setDictType("sys_provide_level"); - List smType = dictDataService.selectDictDataList(sysDictData); + List smType = dictDataService.selectDictDataByType("sys_carrier_status"); List list = smType.stream().map(SysDictData::getDictLabel).collect(Collectors.toList()); List yAxisData = new ArrayList<>(); smType.forEach(xAxis -> { AtomicReference yAxis = new AtomicReference<>(0L); Integer count = carrierService.lambdaQuery() - .eq(TdCarrier::getCarrierLevel, xAxis.getDictValue()) + .eq(TdCarrier::getStatus, xAxis.getDictValue()) .count(); yAxis.set(Long.valueOf(count)); @@ -103,24 +104,25 @@ public class SysFilenumController extends BaseController { obj.put("yAxisData", yAxisData); return AjaxResult.success(obj); } - + @Resource + private TdCarrierIssuedService carrierIssuedService; + @Resource + private CarrierIssuedManager carrierIssuedManager; /** - * 载体密级统计 + * 上级下发-载体数量 * * @return com.ruoyi.common.core.domain.AjaxResult */ @PostMapping("/countSecret") @ResponseBody public AjaxResult countSecret() { - SysDictData sysDictData = new SysDictData(); - sysDictData.setDictType("sys_file_miji"); - List smType = dictDataService.selectDictDataList(sysDictData); + List smType = dictDataService.selectDictDataByType("carrier_issued_status"); List jsonObjects = new ArrayList<>(); smType.forEach(xAxis -> { AtomicReference value = new AtomicReference<>(0L); - Integer count = carrierService.lambdaQuery() - .eq(TdCarrier::getCarrierSecret, xAxis.getDictValue()) + Integer count = carrierIssuedService.lambdaQuery() + .eq(TdCarrierIssued::getStatus, xAxis.getDictValue()) .count(); value.set(Long.valueOf(count)); JSONObject jsonObject = new JSONObject(); @@ -131,5 +133,39 @@ public class SysFilenumController extends BaseController { return AjaxResult.success(jsonObjects); } + /** + * 上级下发 + * @return + */ + @GetMapping() + public String fileIssued() { + return prefix + "/fileIssued"; + } + + /** + * 上级下发载体列表 + */ + @PostMapping("/listIssued") + @ResponseBody + public TableDataInfo listIssued(TdCarrierIssued tdCarrierIssued) { + startPage(); + List carriers = carrierIssuedManager.selectTdCarrierList(tdCarrierIssued); + return getDataTable(carriers); + } + + /** + * 打印界面,上级下发 + */ + @GetMapping("/printIssued/{id}") + @Log(title = "文件统计", businessType = BusinessType.PRINT) + public String printIssued(@PathVariable("id") String id, ModelMap mmap) { + TdCarrierIssued tdCarrierIssued = carrierIssuedManager.selectTdCarrier(id); + mmap.put("tdCarrierIssued", tdCarrierIssued); + mmap.put("sysuser", getSysUser()); + return prefix + "/printIssued"; + } + + + }