清单上传工具栏
This commit is contained in:
parent
d4cb55d98f
commit
546b7b9262
|
|
@ -4,6 +4,7 @@ import lombok.EqualsAndHashCode;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -23,6 +24,8 @@ public class EasyExcelInList {
|
||||||
private Integer frequency;
|
private Integer frequency;
|
||||||
private String remark;
|
private String remark;
|
||||||
private Integer sortId;
|
private Integer sortId;
|
||||||
|
private String createBy;
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
private String industryId;
|
private String industryId;
|
||||||
private String listId;
|
private String listId;
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,8 @@ public class InListListener implements ReadListener<EasyExcelInList> {
|
||||||
|
|
||||||
private BaseInClassMapper baseInClassMapper;
|
private BaseInClassMapper baseInClassMapper;
|
||||||
|
|
||||||
|
private Date date = new Date();
|
||||||
|
|
||||||
public InListListener(InListMapper inListMapper, InListItemMapper inListItemMapper, BaseInClassMapper baseInClassMapper) {
|
public InListListener(InListMapper inListMapper, InListItemMapper inListItemMapper, BaseInClassMapper baseInClassMapper) {
|
||||||
this.inListMapper = inListMapper;
|
this.inListMapper = inListMapper;
|
||||||
this.inListItemMapper = inListItemMapper;
|
this.inListItemMapper = inListItemMapper;
|
||||||
|
|
@ -83,7 +85,7 @@ public class InListListener implements ReadListener<EasyExcelInList> {
|
||||||
inList.setListId(listId);
|
inList.setListId(listId);
|
||||||
inList.setIndustryId(industryId);
|
inList.setIndustryId(industryId);
|
||||||
inList.setCreateBy("系统导入");
|
inList.setCreateBy("系统导入");
|
||||||
inList.setCreateTime(new Date());
|
inList.setCreateTime(date);
|
||||||
|
|
||||||
inList.setSortId(listSort);
|
inList.setSortId(listSort);
|
||||||
queryList.add(inList);
|
queryList.add(inList);
|
||||||
|
|
@ -97,6 +99,8 @@ public class InListListener implements ReadListener<EasyExcelInList> {
|
||||||
data.setListId(listId);
|
data.setListId(listId);
|
||||||
data.setIndustryId(industryId);
|
data.setIndustryId(industryId);
|
||||||
data.setItemId(RandomNumber.getUUid());
|
data.setItemId(RandomNumber.getUUid());
|
||||||
|
data.setCreateBy("系统导入");
|
||||||
|
data.setCreateTime(date);
|
||||||
cachedDataList.add(data);
|
cachedDataList.add(data);
|
||||||
// 达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM
|
// 达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM
|
||||||
if (cachedDataList.size() >= BATCH_COUNT) {
|
if (cachedDataList.size() >= BATCH_COUNT) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user