|
@@ -118,6 +118,10 @@ public class JobTask {
|
|
|
List<ProjectInfo> existProjList = jdbcClient.getJdbcList(new HashMap<>(), ProjectInfo.class, connection);
|
|
List<ProjectInfo> existProjList = jdbcClient.getJdbcList(new HashMap<>(), ProjectInfo.class, connection);
|
|
|
List<GldMdmProject> list = gldMasterService.getGetMDMProject();
|
|
List<GldMdmProject> list = gldMasterService.getGetMDMProject();
|
|
|
for (GldMdmProject model : list) {
|
|
for (GldMdmProject model : list) {
|
|
|
|
|
+ if (StringUtil.isEmpty(model.getProjectBelongingUnit())) {
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
List<GldMdmProject> filterList = existGLDList.stream().filter(exist -> model.getId().equals(exist.getId()))
|
|
List<GldMdmProject> filterList = existGLDList.stream().filter(exist -> model.getId().equals(exist.getId()))
|
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
|
if (filterList.size() > 0) {
|
|
if (filterList.size() > 0) {
|
|
@@ -130,7 +134,7 @@ public class JobTask {
|
|
|
ProjectInfo info = new ProjectInfo();
|
|
ProjectInfo info = new ProjectInfo();
|
|
|
info.setProjectName(model.getProjectName());
|
|
info.setProjectName(model.getProjectName());
|
|
|
info.setProjectNo(model.getProjectCode());
|
|
info.setProjectNo(model.getProjectCode());
|
|
|
- if (StringUtil.isNotEmpty(model.getStatus())&&"1".equals(model.getStatus())) {
|
|
|
|
|
|
|
+ if (StringUtil.isNotEmpty(model.getStatus()) && "1".equals(model.getStatus())) {
|
|
|
info.setProjectStatus("active");
|
|
info.setProjectStatus("active");
|
|
|
} else {
|
|
} else {
|
|
|
info.setProjectStatus("inactive");
|
|
info.setProjectStatus("inactive");
|
|
@@ -150,7 +154,7 @@ public class JobTask {
|
|
|
info.setId(filterProjList.get(0).getId());
|
|
info.setId(filterProjList.get(0).getId());
|
|
|
jdbcClient.jdbcUpdateById(info, connection);
|
|
jdbcClient.jdbcUpdateById(info, connection);
|
|
|
} else {
|
|
} else {
|
|
|
- info.setId((long)0);
|
|
|
|
|
|
|
+ info.setId((long) 0);
|
|
|
jdbcClient.jdbcInsert(info, connection);
|
|
jdbcClient.jdbcInsert(info, connection);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|