fix:事业部添加仿真类型
This commit is contained in:
1
1-sql/2026-04-15/sys_dept_user.sql
Normal file
1
1-sql/2026-04-15/sys_dept_user.sql
Normal file
@@ -0,0 +1 @@
|
||||
ALTER TABLE spdm_baseline.sys_dept_user ADD simulationType varchar(255) NULL COMMENT '仿真类型';
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -21,6 +21,9 @@ public class DeptOperateReq {
|
||||
@Schema(description = "阶段")
|
||||
private String stage;
|
||||
|
||||
@Schema(description = "仿真类型")
|
||||
private String simulationType;
|
||||
|
||||
@Schema(description = "主键")
|
||||
private Integer id;
|
||||
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user