|
|
@@ -19,6 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import java.time.LocalDateTime; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
@@ -75,7 +76,8 @@ public class EmployeeBatchGetTask { |
|
|
|
} |
|
|
|
Long totalSize = data.getTotalSize(); |
|
|
|
if (totalSize > PAGE_SIZE) { |
|
|
|
int maxPageNo = (int) Math.ceil(totalSize / PAGE_SIZE); |
|
|
|
int restPageNo = totalSize % PAGE_SIZE > 0 ? 1 : 0; |
|
|
|
int maxPageNo = (int) Math.ceil(totalSize / PAGE_SIZE) + restPageNo; |
|
|
|
for (pageNo = 2; pageNo <= maxPageNo; pageNo++) { |
|
|
|
query.setPageNo(maxPageNo); |
|
|
|
GenericResult<Page<OrganizationEmployeePosition>> pageGenericResult = zwddClient.pageOrganizationEmployeePositions(query); |
|
|
@@ -99,7 +101,6 @@ public class EmployeeBatchGetTask { |
|
|
|
saveBatch(dingEmployeeInfoSaveRecordList); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@@ -137,6 +138,10 @@ public class EmployeeBatchGetTask { |
|
|
|
dingEmployeeInfo.setOrganizationCode(govEmployeePosition.getOrganizationCode()); |
|
|
|
dingEmployeeInfo.setEmpPosVirtualOrganizationCode(govEmployeePosition.getEmpPosVirtualOrganizationCode()); |
|
|
|
dingEmployeeInfo.setEmpStatus(govEmployeePosition.getStatus()); |
|
|
|
dingEmployeeInfo.setCreateOn(LocalDateTime.now()); |
|
|
|
dingEmployeeInfo.setUpdateOn(LocalDateTime.now()); |
|
|
|
dingEmployeeInfo.setCreateBy(-1L); |
|
|
|
dingEmployeeInfo.setUpdateBy(-1L); |
|
|
|
segmentSaveRecordList.add(dingEmployeeInfo); |
|
|
|
} |
|
|
|
saveRecordList.addAll(segmentSaveRecordList); |
|
|
|