✨ 组织与人员支持OA增量同步,并完善用户启停与性别空值

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-10 13:56:29 +08:00
parent e20afc0d55
commit 4e7193893f
22 changed files with 423 additions and 100 deletions
@@ -216,4 +216,12 @@ public class Dept extends TenantEntity {
@TableField(updateStrategy = FieldStrategy.NOT_NULL)
private String oaSupSubComId;
/**
* OA上次更新时间(OA 的 modified 字段),仅同步比对使用
*/
@JsonIgnore
@Schema(description = "OA上次更新时间", hidden = true)
@TableField(updateStrategy = FieldStrategy.NOT_NULL)
private String oaModified;
}
@@ -35,8 +35,12 @@ public enum UserSex {
if (name == null || name.isEmpty()) {
return null;
}
String sexName = name.trim();
if ("-1".equals(sexName) || "0".equals(sexName) || "未知".equals(sexName)) {
return null;
}
return Stream.of(values())
.filter(e -> e.getName().equals(name))
.filter(e -> e.getName().equals(sexName) || String.valueOf(e.getCode()).equals(sexName))
.map(UserSex::getCode)
.findFirst().orElse(null);
}
@@ -66,4 +66,7 @@ public class OaOrgSyncPageVO implements Serializable {
@Schema(description = "是否已到最后一页")
private Boolean finished;
@Schema(description = "增量同步使用的 OA modified 起始时间,后续分页需原样回传")
private String modifiedSince;
}
@@ -63,4 +63,7 @@ public class OaPersonSyncPageVO implements Serializable {
@Schema(description = "是否已到最后一页")
private Boolean finished;
@Schema(description = "增量同步使用的 OA modified 起始时间,后续分页需原样回传")
private String modifiedSince;
}