Merge remote-tracking branch 'ztcloud/test' into dev
This commit is contained in:
@@ -63,6 +63,10 @@ public class IWorkFullSyncReqVO {
|
|||||||
@Schema(description = "分部 ID")
|
@Schema(description = "分部 ID")
|
||||||
private String subcompanyId1;
|
private String subcompanyId1;
|
||||||
|
|
||||||
|
@JsonProperty("jobtitleid")
|
||||||
|
@Schema(description = "岗位 ID")
|
||||||
|
private String jobTitleId;
|
||||||
|
|
||||||
@JsonProperty("jobtitlename")
|
@JsonProperty("jobtitlename")
|
||||||
@Schema(description = "岗位名称")
|
@Schema(description = "岗位名称")
|
||||||
private String jobTitleName;
|
private String jobTitleName;
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import com.zt.plat.module.system.service.integration.iwork.IWorkSyncProcessor;
|
|||||||
import com.zt.plat.module.system.service.integration.iwork.IWorkSyncService;
|
import com.zt.plat.module.system.service.integration.iwork.IWorkSyncService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@@ -262,9 +263,17 @@ public class IWorkSyncServiceImpl implements IWorkSyncService {
|
|||||||
if (StrUtil.isBlank(reqVO.getId())) {
|
if (StrUtil.isBlank(reqVO.getId())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
copyQueryParameters(reqVO, query); // 设置查询条件
|
||||||
applyQueryId(query, reqVO.getId());
|
applyQueryId(query, reqVO.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void copyQueryParameters(IWorkFullSyncReqVO reqVO, IWorkOrgBaseQueryReqVO query) {
|
||||||
|
BeanUtils.copyProperties(reqVO, query);
|
||||||
|
if (query instanceof IWorkUserQueryReqVO userQuery) {
|
||||||
|
userQuery.setDepartmentId(reqVO.getDepartmentCode()); // 设置部门编号
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 全量同步
|
* 全量同步
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -27,8 +27,11 @@ public class SyncIWorkUserChangeServiceImpl implements SyncIWorkUserChangeServic
|
|||||||
.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||||
reqVO.setModified(startOfToday);
|
reqVO.setModified(startOfToday);
|
||||||
IWorkFullSyncRespVO respVO = iWorkSyncService.fullSyncUsers(reqVO);
|
IWorkFullSyncRespVO respVO = iWorkSyncService.fullSyncUsers(reqVO);
|
||||||
if(respVO!=null && respVO.getProcessedPages()!=null && respVO.getPageSize()!=null)
|
if(respVO!=null && respVO.getBatches()!=null) {
|
||||||
return respVO.getProcessedPages() * respVO.getPageSize();
|
return respVO.getBatches().stream()
|
||||||
|
.mapToInt(b -> b.getPulled() == null ? 0 : b.getPulled())
|
||||||
|
.sum();
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user