Merge remote-tracking branch 'ztcloud/test' into dev

This commit is contained in:
yangchaojin
2026-01-22 10:37:46 +08:00
3 changed files with 18 additions and 2 deletions

View File

@@ -63,6 +63,10 @@ public class IWorkFullSyncReqVO {
@Schema(description = "分部 ID")
private String subcompanyId1;
@JsonProperty("jobtitleid")
@Schema(description = "岗位 ID")
private String jobTitleId;
@JsonProperty("jobtitlename")
@Schema(description = "岗位名称")
private String jobTitleName;

View File

@@ -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 lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -262,9 +263,17 @@ public class IWorkSyncServiceImpl implements IWorkSyncService {
if (StrUtil.isBlank(reqVO.getId())) {
return;
}
copyQueryParameters(reqVO, query); // 设置查询条件
applyQueryId(query, reqVO.getId());
}
private void copyQueryParameters(IWorkFullSyncReqVO reqVO, IWorkOrgBaseQueryReqVO query) {
BeanUtils.copyProperties(reqVO, query);
if (query instanceof IWorkUserQueryReqVO userQuery) {
userQuery.setDepartmentId(reqVO.getDepartmentCode()); // 设置部门编号
}
}
/**
* 全量同步
*/

View File

@@ -27,8 +27,11 @@ public class SyncIWorkUserChangeServiceImpl implements SyncIWorkUserChangeServic
.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
reqVO.setModified(startOfToday);
IWorkFullSyncRespVO respVO = iWorkSyncService.fullSyncUsers(reqVO);
if(respVO!=null && respVO.getProcessedPages()!=null && respVO.getPageSize()!=null)
return respVO.getProcessedPages() * respVO.getPageSize();
if(respVO!=null && respVO.getBatches()!=null) {
return respVO.getBatches().stream()
.mapToInt(b -> b.getPulled() == null ? 0 : b.getPulled())
.sum();
}
return 0;
}
}