feat: 老部门新部门对应关系导入
This commit is contained in:
+13
-21
@@ -28,33 +28,19 @@ public class OldSystemDepartRelation implements Serializable {
|
||||
@ApiModelProperty(value = "主键ID")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 组织部门
|
||||
*/
|
||||
@Excel(name = "组织部门", width = 15)
|
||||
@ApiModelProperty(value = "组织部门")
|
||||
private String oldOrgName;
|
||||
|
||||
/**
|
||||
* 上级组织
|
||||
*/
|
||||
@Excel(name = "上级组织", width = 15)
|
||||
@ApiModelProperty(value = "上级组织")
|
||||
@Excel(name = "旧上级组织", width = 15)
|
||||
@ApiModelProperty(value = "旧上级组织")
|
||||
private String oldOrgSuperior;
|
||||
|
||||
/**
|
||||
* 组织级别
|
||||
* 组织部门
|
||||
*/
|
||||
@Excel(name = "组织级别", width = 15)
|
||||
@ApiModelProperty(value = "组织级别")
|
||||
private String orgLevel;
|
||||
|
||||
/**
|
||||
* 现组织部门
|
||||
*/
|
||||
@Excel(name = "现组织部门", width = 15)
|
||||
@ApiModelProperty(value = "现组织部门")
|
||||
private String curOrgName;
|
||||
@Excel(name = "旧组织部门", width = 15)
|
||||
@ApiModelProperty(value = "旧组织部门")
|
||||
private String oldOrgName;
|
||||
|
||||
/**
|
||||
* 现上级组织
|
||||
@@ -63,6 +49,13 @@ public class OldSystemDepartRelation implements Serializable {
|
||||
@ApiModelProperty(value = "现上级组织")
|
||||
private String curOrgSuperior;
|
||||
|
||||
/**
|
||||
* 现组织部门
|
||||
*/
|
||||
@Excel(name = "现组织部门", width = 15)
|
||||
@ApiModelProperty(value = "现组织部门")
|
||||
private String curOrgName;
|
||||
|
||||
/**
|
||||
* 现组织部门Id
|
||||
*/
|
||||
@@ -89,7 +82,6 @@ public class OldSystemDepartRelation implements Serializable {
|
||||
public boolean isEmptyRow() {
|
||||
return oldOrgName == null &&
|
||||
oldOrgSuperior == null &&
|
||||
orgLevel == null &&
|
||||
curOrgName == null &&
|
||||
curOrgSuperior == null &&
|
||||
curOrgId == null &&
|
||||
|
||||
+4
@@ -75,6 +75,10 @@ public class OldSystemDepartRelationServiceImpl extends ServiceImpl<OldSystemDep
|
||||
}
|
||||
}
|
||||
|
||||
log.info("导入数据条数:{}", list.size());
|
||||
// 过滤掉新部门为空的数据
|
||||
list = list.stream().filter(dr -> dr.getCurOrgName() != null && !dr.getCurOrgName().isEmpty()).collect(Collectors.toList());
|
||||
log.info("过滤掉新部门为空的数据后数据条数:{}", list.size());
|
||||
// 获取所有有关联的新部门
|
||||
LambdaQueryWrapper<SysDepart> sysDeptWrapper = new LambdaQueryWrapper<>();
|
||||
sysDeptWrapper.eq(SysDepart::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
|
||||
|
||||
Reference in New Issue
Block a user