fix:事业部添加仿真类型

This commit is contained in:
2026-04-15 14:19:57 +08:00
parent 8c53c9efd2
commit 0ed362030a
5 changed files with 13 additions and 0 deletions

View File

@@ -0,0 +1 @@
ALTER TABLE spdm_baseline.sys_dept_user ADD simulationType varchar(255) NULL COMMENT '仿真类型';

View File

@@ -25,6 +25,9 @@ public class SysDeptUserResp {
@Schema(description = "阶段")
private String stage;
@Schema(description = "仿真类型")
private String simulationType;
@Schema(description = "部门负责人用户ID")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long userId;

View File

@@ -44,6 +44,10 @@ public class SysDeptUser implements Serializable {
@TableField("stage")
private String stage;
@Schema(description = "仿真类型")
@TableField("simulationType")
private String simulationType;
@Schema(description = "部门负责人用户ID")
@TableField("userId")
private Long userId;

View File

@@ -21,6 +21,9 @@ public class DeptOperateReq {
@Schema(description = "阶段")
private String stage;
@Schema(description = "仿真类型")
private String simulationType;
@Schema(description = "主键")
private Integer id;

View File

@@ -51,6 +51,7 @@ public class ISysDeptUserServiceImpl extends ServiceImpl<SysDeptUserMapper, SysD
deptUser.setTenantId(ThreadLocalContext.getTenantId());
deptUser.setCreator(ThreadLocalContext.getUserId());
deptUser.setDeptId(IdWorker.getId(deptUser));
deptUser.setSimulationType(deptAddReq.getSimulationType());
this.save(deptUser);
return SdmResponse.success();
}
@@ -73,6 +74,7 @@ public class ISysDeptUserServiceImpl extends ServiceImpl<SysDeptUserMapper, SysD
deptUser.setDeptName(normalizedDeptName);
deptUser.setDiscipline(normalizedSubject);
deptUser.setStage(StringUtils.isNotBlank(normalizedStage) ? normalizedStage : null);
deptUser.setSimulationType(deptEditReq.getSimulationType());
if (deptEditReq.getUserId() != null) {
deptUser.setUserId(deptEditReq.getUserId());
}