fix:近6个月统计涉密网络统计

pg_adapter
wangxy 6 months ago
parent 0c12619c3d
commit dd4bac3ede

@ -10,10 +10,13 @@ import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.TdFileProvide; import com.ruoyi.system.domain.TdFileProvide;
import com.ruoyi.system.domain.TdFileReceive; import com.ruoyi.system.domain.TdFileReceive;
import com.ruoyi.system.domain.carrier.TdCarrier; 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.ISysDictDataService;
import com.ruoyi.system.service.ITdFileProvideService; import com.ruoyi.system.service.ITdFileProvideService;
import com.ruoyi.system.service.ITdFileReceiveService; import com.ruoyi.system.service.ITdFileReceiveService;
import com.ruoyi.system.service.carrier.TdCarrierIssuedService;
import com.ruoyi.system.service.carrier.TdCarrierService; import com.ruoyi.system.service.carrier.TdCarrierService;
import com.ruoyi.web.controller.manager.CarrierIssuedManager;
import com.ruoyi.web.controller.manager.CarrierManager; import com.ruoyi.web.controller.manager.CarrierManager;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -76,7 +79,7 @@ public class SysFilenumController extends BaseController {
private ISysDictDataService dictDataService; private ISysDictDataService dictDataService;
/** /**
* * -
* *
* @return com.ruoyi.common.core.domain.AjaxResult * @return com.ruoyi.common.core.domain.AjaxResult
*/ */
@ -84,15 +87,13 @@ public class SysFilenumController extends BaseController {
@PostMapping("/countLevel") @PostMapping("/countLevel")
@ResponseBody @ResponseBody
public AjaxResult countLevel() { public AjaxResult countLevel() {
SysDictData sysDictData = new SysDictData(); List<SysDictData> smType = dictDataService.selectDictDataByType("sys_carrier_status");
sysDictData.setDictType("sys_provide_level");
List<SysDictData> smType = dictDataService.selectDictDataList(sysDictData);
List<String> list = smType.stream().map(SysDictData::getDictLabel).collect(Collectors.toList()); List<String> list = smType.stream().map(SysDictData::getDictLabel).collect(Collectors.toList());
List<Long> yAxisData = new ArrayList<>(); List<Long> yAxisData = new ArrayList<>();
smType.forEach(xAxis -> { smType.forEach(xAxis -> {
AtomicReference<Long> yAxis = new AtomicReference<>(0L); AtomicReference<Long> yAxis = new AtomicReference<>(0L);
Integer count = carrierService.lambdaQuery() Integer count = carrierService.lambdaQuery()
.eq(TdCarrier::getCarrierLevel, xAxis.getDictValue()) .eq(TdCarrier::getStatus, xAxis.getDictValue())
.count(); .count();
yAxis.set(Long.valueOf(count)); yAxis.set(Long.valueOf(count));
@ -103,24 +104,25 @@ public class SysFilenumController extends BaseController {
obj.put("yAxisData", yAxisData); obj.put("yAxisData", yAxisData);
return AjaxResult.success(obj); return AjaxResult.success(obj);
} }
@Resource
private TdCarrierIssuedService carrierIssuedService;
@Resource
private CarrierIssuedManager carrierIssuedManager;
/** /**
* * -
* *
* @return com.ruoyi.common.core.domain.AjaxResult * @return com.ruoyi.common.core.domain.AjaxResult
*/ */
@PostMapping("/countSecret") @PostMapping("/countSecret")
@ResponseBody @ResponseBody
public AjaxResult countSecret() { public AjaxResult countSecret() {
SysDictData sysDictData = new SysDictData(); List<SysDictData> smType = dictDataService.selectDictDataByType("carrier_issued_status");
sysDictData.setDictType("sys_file_miji");
List<SysDictData> smType = dictDataService.selectDictDataList(sysDictData);
List<JSONObject> jsonObjects = new ArrayList<>(); List<JSONObject> jsonObjects = new ArrayList<>();
smType.forEach(xAxis -> { smType.forEach(xAxis -> {
AtomicReference<Long> value = new AtomicReference<>(0L); AtomicReference<Long> value = new AtomicReference<>(0L);
Integer count = carrierService.lambdaQuery() Integer count = carrierIssuedService.lambdaQuery()
.eq(TdCarrier::getCarrierSecret, xAxis.getDictValue()) .eq(TdCarrierIssued::getStatus, xAxis.getDictValue())
.count(); .count();
value.set(Long.valueOf(count)); value.set(Long.valueOf(count));
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
@ -131,5 +133,39 @@ public class SysFilenumController extends BaseController {
return AjaxResult.success(jsonObjects); return AjaxResult.success(jsonObjects);
} }
/**
*
* @return
*/
@GetMapping()
public String fileIssued() {
return prefix + "/fileIssued";
}
/**
*
*/
@PostMapping("/listIssued")
@ResponseBody
public TableDataInfo listIssued(TdCarrierIssued tdCarrierIssued) {
startPage();
List<TdCarrierIssued> 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";
}
} }

Loading…
Cancel
Save