fix:上级下发载体导出添加

pg_adapter
wangxy 6 months ago
parent d1dd4c94cf
commit ee45648ae2

@ -5,8 +5,11 @@ import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.carrier.TdCarrier;
import com.ruoyi.system.domain.carrier.TdCarrierIssued;
import com.ruoyi.web.controller.manager.CarrierIssuedManager;
import com.ruoyi.web.controller.manager.SysAreaManager;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
@ -34,6 +37,10 @@ public class CarrierIssuedController extends BaseController {
private CarrierIssuedManager carrierIssuedManager;
@Resource
private SysAreaManager sysAreaManager;
@RequiresPermissions("system:carrierIssued:view")
@GetMapping()
public String carrierIssued() {
@ -55,6 +62,24 @@ public class CarrierIssuedController extends BaseController {
}
/**
*
*/
@RequiresPermissions("system:carrierIssued:export")
@Log(title = "国家秘密载体", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(TdCarrierIssued tdCarrierIssued) {
List<TdCarrierIssued> carriers = carrierIssuedManager.selectTdCarrierList(tdCarrierIssued);
carriers.forEach(tdCarrier1 -> {
tdCarrier1.setAreaCity(sysAreaManager.getAreaName(tdCarrier1.getAreaCity()));
tdCarrier1.setAreaDistrict(sysAreaManager.getAreaName(tdCarrier1.getAreaDistrict()));
});
ExcelUtil<TdCarrierIssued> util = new ExcelUtil<>(TdCarrierIssued.class);
return util.exportExcel(carriers, "国家秘密载体数据");
}
/**
*
*/

@ -56,6 +56,9 @@
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:carrierIssued:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:carrierIssued:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>

@ -39,7 +39,7 @@ public class TdCarrier extends BaseEntity {
/**
*
*/
@Excel(name = "载体类型")
@Excel(name = "载体类型",readConverterExp = "1=纸介质,2=光介质,3=磁介质,4=半导体")
private String carrierLevel;
/**
@ -78,6 +78,19 @@ public class TdCarrier extends BaseEntity {
@Excel(name = "发放范围")
private String carrierContent;
/**
*
*/
@Excel(name = "市州")
private String areaCity;
/**
*
*/
@Excel(name = "区县")
private String areaDistrict;
/**
*
*/
@ -183,15 +196,7 @@ public class TdCarrier extends BaseEntity {
*/
private String status;
/**
*
*/
private String areaCity;
/**
*
*/
private String areaDistrict;
/**

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.util.Date;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -23,40 +24,65 @@ public class TdCarrierIssued extends BaseEntity {
@TableId
private String id;
/**
*
*/
@Excel(name = "载体名称")
private String carrierName;
/**
*
*/
@Excel(name = "载体数量")
private String carrierCount;
/**
*
*/
@Excel(name = "载体类型",readConverterExp = "1=纸介质,2=光介质,3=磁介质,4=半导体")
private String carrierLevel;
/**
*
*/
@Excel(name = "紧急程度",readConverterExp = "0=普通,1=紧急,2=加急")
private String carrierExtent;
/**
*
*/
@Excel(name = "密级",readConverterExp = "0=秘密,1=机密,2=绝密")
private String carrierSecret;
/**
*
*/
@Excel(name = "编号")
private String carrierNumber;
/**
*
*/
@Excel(name = "保密期限")
private String carrierTerm;
/**
*
*/
@Excel(name = "发放范围")
private String carrierContent;
/**
*
*/
@Excel(name = "市州")
private String areaCity;
/**
*
*/
@Excel(name = "区县")
private String areaDistrict;
/**
* 使
@ -138,22 +164,6 @@ public class TdCarrierIssued extends BaseEntity {
*/
private String status;
/**
*
*/
private String carrierName;
/**
*
*/
private String areaCity;
/**
*
*/
private String areaDistrict;
/**
*
*/

Loading…
Cancel
Save