mirror of https://gitee.com/xiaonuobase/snowy
【更新】优化导出
parent
bd6eb16124
commit
65a4c0d4ca
|
@ -24,6 +24,7 @@ Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意
|
|||
*/
|
||||
package vip.xiaonuo.sys.modular.pos.entity;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import vip.xiaonuo.core.pojo.base.entity.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
@ -49,26 +50,31 @@ public class SysPos extends BaseEntity {
|
|||
/**
|
||||
* 名称
|
||||
*/
|
||||
@Excel(name = "名称", width = 20)
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
@Excel(name = "编码", width = 20)
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@Excel(name = "排序", width = 20)
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Excel(name = "备注", width = 20)
|
||||
@TableField(insertStrategy = FieldStrategy.IGNORED)
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 状态(字典 0正常 1停用 2删除)
|
||||
*/
|
||||
@Excel(name = "状态", replace = {"正常_0", "停用_1", "删除_2"}, width = 20)
|
||||
private Integer status;
|
||||
}
|
||||
|
|
|
@ -69,4 +69,9 @@ public class SysPosParam extends BaseParam {
|
|||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer status;
|
||||
}
|
||||
|
|
|
@ -194,6 +194,8 @@ public class SysPosServiceImpl extends ServiceImpl<SysPosMapper, SysPos> impleme
|
|||
|
||||
@Override
|
||||
public void export(SysPosParam sysPosParam) {
|
||||
// 只导出状态正常的数据
|
||||
sysPosParam.setStatus(CommonStatusEnum.ENABLE.getCode());
|
||||
List<SysPos> list = this.list();
|
||||
PoiUtil.exportExcelWithStream("SnowyPos.xls", SysPos.class, list);
|
||||
}
|
||||
|
|
|
@ -435,6 +435,8 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|||
|
||||
@Override
|
||||
public void export(SysUserParam sysUserParam) {
|
||||
// 只导出正常的
|
||||
sysUserParam.setStatus(CommonStatusEnum.ENABLE.getCode());
|
||||
List<SysUser> list = this.list();
|
||||
PoiUtil.exportExcelWithStream("SonwyUsers.xls", SysUser.class, list);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue