fix:载体统计提交

pg_adapter
wangxy 8 months ago
parent 063bdf6973
commit 4d060476ff

@ -9,15 +9,19 @@ import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; 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.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.TdCarrierService;
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;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
@ -31,15 +35,15 @@ import java.util.stream.Collectors;
public class SysFilenumController extends BaseController { public class SysFilenumController extends BaseController {
private String prefix = "system/fileprovide/filenum"; private String prefix = "system/fileprovide/filenum";
@Autowired @Resource
private ITdFileProvideService tdFileProvideService; private CarrierManager carrierManager;
@Autowired
private ITdFileReceiveService tdFileReceiveService; @Resource
private TdCarrierService carrierService;
@RequiresPermissions("system:filenum:view") @RequiresPermissions("system:filenum:view")
@GetMapping() @GetMapping()
public String fileprovide() public String fileprovide() {
{
return prefix + "/filenum"; return prefix + "/filenum";
} }
@ -49,25 +53,21 @@ public class SysFilenumController extends BaseController {
@RequiresPermissions("system:filenum:list") @RequiresPermissions("system:filenum:list")
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo list(TdFileProvide tdFileProvide) public TableDataInfo list(TdCarrier tdCarrier) {
{
startPage(); startPage();
List<TdFileProvide> list = tdFileProvideService.selectTdFileProvideList(tdFileProvide); List<TdCarrier> carriers = carrierManager.selectTdCarrierList(tdCarrier);
return getDataTable(list); return getDataTable(carriers);
} }
/** /**
* *
*/ */
@RequiresPermissions("system:filenum:print") @RequiresPermissions("system:filenum:print")
@GetMapping("/print/{fileId}") @GetMapping("/print/{id}")
@Log(title = "文件统计", businessType = BusinessType.PRINT) @Log(title = "文件统计", businessType = BusinessType.PRINT)
public String print(@PathVariable("fileId") String fileId, ModelMap mmap) public String print(@PathVariable("id") String id, ModelMap mmap) {
{ TdCarrier tdCarrier = carrierManager.selectTdCarrier(id);
List<TdFileReceive> tdFileReceives = tdFileReceiveService.selectTdFileReceiveByFileId(fileId); mmap.put("tdCarrier", tdCarrier);
TdFileProvide tdFileProvide = tdFileProvideService.selectTdFileProvideByFileId(fileId);
mmap.put("tdFileReceives", tdFileReceives);
mmap.put("tdFileProvide", tdFileProvide);
mmap.put("sysuser", getSysUser()); mmap.put("sysuser", getSysUser());
return prefix + "/print"; return prefix + "/print";
} }
@ -76,23 +76,23 @@ 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
*/ */
@PostMapping("/countLevel") @PostMapping("/countLevel")
@ResponseBody @ResponseBody
public AjaxResult countLevel() { public AjaxResult countLevel() {
SysDictData sysDictData = new SysDictData(); SysDictData sysDictData = new SysDictData();
sysDictData.setDictType("sys_provide_level"); sysDictData.setDictType("sys_provide_level");
List<SysDictData> smType = dictDataService.selectDictDataList(sysDictData); 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 = tdFileProvideService.lambdaQuery() Integer count = carrierService.lambdaQuery()
.eq(TdFileProvide::getProvideLevel, xAxis.getDictValue()) .eq(TdCarrier::getCarrierLevel, xAxis.getDictValue())
.count(); .count();
yAxis.set(Long.valueOf(count)); yAxis.set(Long.valueOf(count));
@ -106,21 +106,21 @@ public class SysFilenumController extends BaseController {
/** /**
*
* *
*
* @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(); SysDictData sysDictData = new SysDictData();
sysDictData.setDictType("sys_file_miji"); sysDictData.setDictType("sys_file_miji");
List<SysDictData> smType = dictDataService.selectDictDataList(sysDictData); 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 = tdFileProvideService.lambdaQuery() Integer count = carrierService.lambdaQuery()
.eq(TdFileProvide::getFileSecret, xAxis.getDictValue()) .eq(TdCarrier::getCarrierSecret, xAxis.getDictValue())
.count(); .count();
value.set(Long.valueOf(count)); value.set(Long.valueOf(count));
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();

@ -36,19 +36,19 @@
<div class="select-list"> <div class="select-list">
<ul> <ul>
<li> <li>
<label>下发单位</label> <label>编号</label>
<input type="text" name="provideDepart"/> <input type="text" name="carrierNumber"/>
</li> </li>
<li> <li>
<label>紧急程度:</label> <label>紧急程度:</label>
<select name="instancyExtent" th:with="type=${@dict.getType('sys_file_jinjichengdu')}"> <select name="carrierExtent" th:with="type=${@dict.getType('sys_file_jinjichengdu')}">
<option value="">所有</option> <option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select> </select>
</li> </li>
<li> <li>
<label>所属市州:</label> <label>所属市州:</label>
<select id="City" name="frameworkId" @change="getAreaList()" v-model="City"> <select id="City" name="areaCity" @change="getAreaList()" v-model="City">
<option value="">请选择</option> <option value="">请选择</option>
<option v-for="option in CityList" :value="option.id" :key="option.id"> <option v-for="option in CityList" :value="option.id" :key="option.id">
{{ option.name }} {{ option.name }}
@ -57,7 +57,7 @@
</li> </li>
<li> <li>
<label>载体名称:</label> <label>载体名称:</label>
<input type="text" name="fileName"/> <input type="text" name="carrierName"/>
</li> </li>
<li> <li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
@ -96,45 +96,34 @@
pageSize:5, pageSize:5,
columns: [ columns: [
{ {
field: 'fileId', field: 'carrierNumber',
title: '载体编码'
},
{
field: 'fileName',
title: '载体名称'
},
{
field: 'fileNum',
title: '编号' title: '编号'
}, },
{ {
field: 'provideCount', field: 'areaCity',
title: '载体数量' title: '所属市州',
formatter: function(value, row, index) {
return getCity(datas, value)
}
}, },
{ {
field: 'provideDepart', field: 'carrierName',
title: '下发单位' title: '载体名称'
}, },
{ {
field: 'provideDate', field: 'carrierCount',
title: '下发日期' title: '载体数量'
}, },
{ {
field: 'instancyExtent', field: 'carrierExtent',
title: '紧急程度', title: '紧急程度',
formatter: function(value, row, index) { formatter: function(value, row, index) {
return $.table.selectDictLabel(instancyExtentDatas, value); return $.table.selectDictLabel(instancyExtentDatas, value);
} }
}, },
{ {
field: 'frameworkId', field: 'carrierSecret',
title: '所属地区',
formatter: function(value, row, index) {
return getCity(datas, value)
}
},
{
field: 'fileSecret',
title: '载体密级', title: '载体密级',
formatter: function(value, row, index) { formatter: function(value, row, index) {
return $.table.selectDictLabel(fileSecretDatas, value); return $.table.selectDictLabel(fileSecretDatas, value);
@ -145,7 +134,7 @@
align: 'center', align: 'center',
formatter: function(value, row, index) { formatter: function(value, row, index) {
var actions = []; var actions = [];
actions.push('<a class="btn btn-info btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="print(\'' + row.fileId + '\')"><i class="fa fa-download"></i>打印</a> '); actions.push('<a class="btn btn-info btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="print(\'' + row.id + '\')"><i class="fa fa-download"></i>打印</a> ');
return actions.join(''); return actions.join('');
} }
}] }]

Loading…
Cancel
Save