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"; + } + + + }