|
|
|
|
@ -46,6 +46,7 @@ public class SupExternalDepartService extends ServiceImpl<SupExternalDepartMappe
|
|
|
|
|
supExternalDepart.setInternalId(supDepart.getId()); |
|
|
|
|
supExternalDepart.setInternalName(supDepart.getName()); |
|
|
|
|
supExternalDepart.setInternalShortName(supDepart.getShortName()); |
|
|
|
|
supExternalDepart.setStatus(0); |
|
|
|
|
supExternalDepart.setCreateTime(LocalDateTime.now()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
@ -56,9 +57,9 @@ public class SupExternalDepartService extends ServiceImpl<SupExternalDepartMappe
|
|
|
|
|
List<GBaseJJD> gBaseJJDS = gBaseJJDMapper.selectList(new QueryWrapper<GBaseJJD>().select("DISTINCT gxdwdm, gxdwmc")); |
|
|
|
|
if (!gBaseJJDS.isEmpty()) { |
|
|
|
|
gBaseJJDS.forEach(item -> { |
|
|
|
|
if (item != null && !dms.contains(item.getGxdwdm())) { |
|
|
|
|
if (item != null && !dms.contains(item.getGxdwdm()) && item.getGxdwdm() != null && !item.getGxdwdm().isEmpty()) { |
|
|
|
|
SupExternalDepart supExternalDepart = new SupExternalDepart(); |
|
|
|
|
supExternalDepart.setExternalId(item.getGxdwdm() == null ? "" : item.getGxdwdm()); |
|
|
|
|
supExternalDepart.setExternalId(item.getGxdwdm()); |
|
|
|
|
supExternalDepart.setExternalName(item.getGxdwmc() == null ? "" : item.getGxdwmc()); |
|
|
|
|
dms.add(item.getGxdwdm()); |
|
|
|
|
supExternalDepart.setSource("情指行"); |
|
|
|
|
@ -69,9 +70,9 @@ public class SupExternalDepartService extends ServiceImpl<SupExternalDepartMappe
|
|
|
|
|
List<GBaseCJD> gBaseCJDS = gBaseCJDMapper.selectList(new QueryWrapper<GBaseCJD>().select("DISTINCT cjdxssdwdm, cjdxssdwmc")); |
|
|
|
|
if (!gBaseCJDS.isEmpty()) { |
|
|
|
|
gBaseCJDS.forEach(item -> { |
|
|
|
|
if (item != null && !dms.contains(item.getCjdxssdwdm())) { |
|
|
|
|
if (item != null && !dms.contains(item.getCjdxssdwdm()) && item.getCjdxssdwdm() != null && !item.getCjdxssdwdm().isEmpty()) { |
|
|
|
|
SupExternalDepart supExternalDepart = new SupExternalDepart(); |
|
|
|
|
supExternalDepart.setExternalId(item.getCjdxssdwdm() == null ? "" : item.getCjdxssdwdm()); |
|
|
|
|
supExternalDepart.setExternalId(item.getCjdxssdwdm()); |
|
|
|
|
supExternalDepart.setExternalName(item.getCjdxssdwmc() == null ? "" : item.getCjdxssdwmc()); |
|
|
|
|
dms.add(item.getCjdxssdwdm()); |
|
|
|
|
supExternalDepart.setSource("情指行"); |
|
|
|
|
@ -90,14 +91,16 @@ public class SupExternalDepartService extends ServiceImpl<SupExternalDepartMappe
|
|
|
|
|
queryWrapper.select("DISTINCT PADWBMdm, PADWBMmc"); |
|
|
|
|
} else if (type == 3) { |
|
|
|
|
queryWrapper.select("DISTINCT BADWIDdm, BADWIDmc"); |
|
|
|
|
} else { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
List<GBaseAJJBXX> supExternalDeparts = gBaseAJJBXXMapper.selectList(queryWrapper); |
|
|
|
|
if (!supExternalDeparts.isEmpty()) { |
|
|
|
|
supExternalDeparts.forEach(item -> { |
|
|
|
|
if (item != null) { |
|
|
|
|
if (item != null && item.getLADWBMdm() != null && !item.getLADWBMdm().isEmpty()) { |
|
|
|
|
SupExternalDepart supExternalDepart = new SupExternalDepart(); |
|
|
|
|
if (type == 1) { |
|
|
|
|
supExternalDepart.setExternalId(item.getLADWBMdm() == null ? "" : item.getLADWBMdm()); |
|
|
|
|
supExternalDepart.setExternalId(item.getLADWBMdm()); |
|
|
|
|
supExternalDepart.setExternalName(item.getLADWBMmc() == null ? "" : item.getLADWBMmc()); |
|
|
|
|
} else if (type == 2 && !dms.contains(item.getPADWBMdm())) { |
|
|
|
|
supExternalDepart.setExternalId(item.getPADWBMdm() == null ? "" : item.getPADWBMdm()); |
|
|
|
|
|