多公司
This commit is contained in:
parent
9be455a286
commit
012184dfb4
|
|
@ -203,14 +203,15 @@ public class SysDeptServiceImpl implements ISysDeptService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int insertCompanies(List<SysDept> list) {
|
public int insertCompanies(List<SysDept> list) {
|
||||||
int num = deptMapper.getMaxDeptId() + 1;
|
long num = deptMapper.getMaxDeptId()+1;
|
||||||
long nextMultiple = (int) Math.ceil((double) num / 100) * 100;
|
|
||||||
for (SysDept dept : list) {
|
for (SysDept dept : list) {
|
||||||
dept.setCreateBy(SecurityUtils.getUsername());
|
dept.setCreateBy(SecurityUtils.getUsername());
|
||||||
dept.setParentId(0L);
|
dept.setParentId(0L);
|
||||||
dept.setAncestors("0");
|
dept.setAncestors("0");
|
||||||
dept.setOrderNum(999);
|
dept.setOrderNum(999);
|
||||||
dept.setStatus("0");
|
dept.setStatus("0");
|
||||||
|
long nextMultiple = (int) Math.ceil((double) num / 100) * 100;
|
||||||
|
num = nextMultiple + 1;
|
||||||
dept.setDeptId(nextMultiple);
|
dept.setDeptId(nextMultiple);
|
||||||
dept.setCompanyId(nextMultiple);
|
dept.setCompanyId(nextMultiple);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue