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.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<TdFileProvide> list = tdFileProvideService.selectTdFileProvideList(tdFileProvide);
return getDataTable(list);
List<TdCarrier> 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<TdFileReceive> 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,8 +76,8 @@ public class SysFilenumController extends BaseController {
private ISysDictDataService dictDataService;
/**
*
*
*
* @return com.ruoyi.common.core.domain.AjaxResult
*/
@ -91,8 +91,8 @@ public class SysFilenumController extends BaseController {
List<Long> yAxisData = new ArrayList<>();
smType.forEach(xAxis -> {
AtomicReference<Long> 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,8 +106,8 @@ public class SysFilenumController extends BaseController {
/**
*
*
*
* @return com.ruoyi.common.core.domain.AjaxResult
*/
@PostMapping("/countSecret")
@ -119,8 +119,8 @@ public class SysFilenumController extends BaseController {
List<JSONObject> jsonObjects = new ArrayList<>();
smType.forEach(xAxis -> {
AtomicReference<Long> 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();

@ -36,19 +36,19 @@
<div class="select-list">
<ul>
<li>
<label>下发单位</label>
<input type="text" name="provideDepart"/>
<label>编号</label>
<input type="text" name="carrierNumber"/>
</li>
<li>
<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 th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<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 v-for="option in CityList" :value="option.id" :key="option.id">
{{ option.name }}
@ -57,7 +57,7 @@
</li>
<li>
<label>载体名称:</label>
<input type="text" name="fileName"/>
<input type="text" name="carrierName"/>
</li>
<li>
<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,
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('<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('');
}
}]

Loading…
Cancel
Save