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