Merge branch 'main' of http://carsafe.uicp.cn/toolchaintechnologycenter/spdm-backend
This commit is contained in:
@@ -7,9 +7,11 @@ public class HPCExecuteConfig extends BaseExecuteConfig {
|
||||
|
||||
private String beforeNodeId;
|
||||
// 先默认写死一个,后面前端配置传递
|
||||
private String masterFileRegularStr = "^.*\\.xml$";
|
||||
// private String masterFileRegularStr = "^.*\\.xml$";
|
||||
private String inputFormat;
|
||||
// 先默认写死一个,后面前端配置传递
|
||||
private String inputFilesRegularStr="^.+\\.json$";
|
||||
// private String inputFilesRegularStr="^.+\\.json$";
|
||||
private String slaveFormat;
|
||||
// 节点的命令 这个不用传递了,配置在后台表里的
|
||||
private String nodeExeCommand;
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class ReportTemplateResp {
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "报告模版唯一ID")
|
||||
private String uuid;
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.sdm.common.entity.resp.system;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class CIDDeptResp implements Serializable {
|
||||
private static final long serialVersionUID = -5457958807109903023L;
|
||||
|
||||
@Schema(description="部门ID")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description="部门编码")
|
||||
private String deptCode;
|
||||
|
||||
@Schema(description="部门名称")
|
||||
private String deptName;
|
||||
|
||||
@Schema(description="负责人user_id")
|
||||
private Long leaderId;
|
||||
|
||||
@Schema(description="排序")
|
||||
private Integer sortOrder;
|
||||
|
||||
@Schema(description="父级部门ID")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description="创建人")
|
||||
private Long createBy;
|
||||
|
||||
@Schema(description="创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@Schema(description="修改人")
|
||||
private Long updateBy;
|
||||
|
||||
@Schema(description="更新时间")
|
||||
private Long updateTime;
|
||||
|
||||
@Schema(description="所属租户ID")
|
||||
private Long tenantId;
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.sdm.common.entity.resp.system;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class CIDPostResp implements Serializable {
|
||||
private static final long serialVersionUID = -7325581156410130798L;
|
||||
|
||||
/**
|
||||
* 岗位ID
|
||||
*/
|
||||
@Schema(description="岗位ID")
|
||||
@NotNull(message = "岗位Id不能为空!")
|
||||
private Long postId;
|
||||
|
||||
/**
|
||||
* 岗位编码
|
||||
*/
|
||||
@Schema(description="岗位编码")
|
||||
@NotBlank(message = "岗位编码不能为空!")
|
||||
private String postCode;
|
||||
|
||||
/**
|
||||
* 岗位名称
|
||||
*/
|
||||
@Schema(description="岗位名称")
|
||||
@NotBlank(message = "岗位名称不能为空!")
|
||||
private String postName;
|
||||
|
||||
/**
|
||||
* 岗位排序
|
||||
*/
|
||||
@Schema(description="岗位排序")
|
||||
@NotNull(message = "岗位排序不能为空!")
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 岗位描述
|
||||
*/
|
||||
@Schema(description="岗位描述")
|
||||
private String description;
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.sdm.common.entity.resp.system;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class CIDStaffResp implements Serializable {
|
||||
private static final long serialVersionUID = -7327814323528614516L;
|
||||
|
||||
@Schema(description = "员工ID")
|
||||
private Long staffId;
|
||||
|
||||
/**
|
||||
* 员工编号,系统生成
|
||||
*/
|
||||
@Schema(description = "员工编号,系统生成")
|
||||
private String staffCode;
|
||||
|
||||
/**
|
||||
* 公司邮箱地址,每个公司的邮箱不一样
|
||||
*/
|
||||
@Schema(description = "公司邮箱地址,每个公司的邮箱不一样")
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 1-是管理员;0-非管理员
|
||||
*/
|
||||
@Schema(description = "1-是管理员;0-非管理员")
|
||||
private String isAdmin;
|
||||
|
||||
/**
|
||||
* 所属用户ID
|
||||
*/
|
||||
@Schema(description = "所属用户ID")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 所属租户ID
|
||||
*/
|
||||
@Schema(description = "所属租户ID")
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 登录默认员工账号:0-默认;1-非默认
|
||||
*/
|
||||
@Schema(description = "登录默认员工账号:0-默认;1-非默认")
|
||||
private String loginDefault;
|
||||
|
||||
/**
|
||||
* 锁定标记,0未锁定,1已锁定
|
||||
*/
|
||||
@Schema(description = "锁定标记,0未锁定,1已锁定")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "用户信息")
|
||||
private CIDUserResp userInfo;
|
||||
|
||||
@Schema(description="关联岗位集合")
|
||||
private List<CIDDeptResp> deptList = new ArrayList<>();
|
||||
|
||||
@Schema(description="关联部门集合")
|
||||
private List<CIDPostResp> postList = new ArrayList<>();
|
||||
|
||||
@Schema(description="关联role集合")
|
||||
private List<CIDRoleResp> roleList = new ArrayList<>();
|
||||
|
||||
|
||||
}
|
||||
@@ -281,10 +281,10 @@ public class ProcessController implements IFlowableFeignClient {
|
||||
config.setUuid(appuuid);
|
||||
config.setBeforeNodeId(beforeNodeId);
|
||||
if(!Objects.isNull(params.get("masterFileRegularStr"))){
|
||||
config.setMasterFileRegularStr(params.get("masterFileRegularStr").toString());
|
||||
config.setInputFormat(params.get("masterFileRegularStr").toString());
|
||||
}
|
||||
if(!Objects.isNull(params.get("inputFilesRegularStr"))){
|
||||
config.setInputFilesRegularStr(params.get("inputFilesRegularStr").toString());
|
||||
config.setSlaveFormat(params.get("inputFilesRegularStr").toString());
|
||||
}
|
||||
String currentNodeId = params.get("currentNodeId").toString();
|
||||
DelegateExecution execution = new DelegateExecution() {
|
||||
|
||||
@@ -65,12 +65,13 @@ public class HpcHandler implements ExecutionHandler<Map<String, Object>,HPCExecu
|
||||
submitHpcTaskRemoteReq.setSoftwareId(config.getUuid());
|
||||
String beforeNodeId = config.getBeforeNodeId();
|
||||
String currentNodeId =execution.getCurrentActivityId();
|
||||
String masterFileRegularStr = config.getMasterFileRegularStr();
|
||||
String inputFilesRegularStr = config.getInputFilesRegularStr();
|
||||
String masterFileRegularStr = config.getInputFormat();
|
||||
String inputFilesRegularStr = config.getSlaveFormat();
|
||||
if(StringUtils.isBlank(masterFileRegularStr)){
|
||||
throw new RuntimeException("Hpc任务执行失败,主求解文件规则不能是空");
|
||||
}
|
||||
CoreLogger.info("beforeNodeId:{},currentNodeId:{},masterFileRegularStr:{},inputFilesRegularStr:{}",beforeNodeId,currentNodeId,masterFileRegularStr,inputFilesRegularStr);
|
||||
CoreLogger.info("Hpc执行 processDefinitionId:{},processInstanceId:{}",execution.getProcessDefinitionId(),execution.getProcessInstanceId());
|
||||
// 初始化用户/租户信息
|
||||
initUserInfo(execution,params);
|
||||
// params 取只是测试使用
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.sdm.common.common.SdmResponse;
|
||||
import com.sdm.common.entity.constants.HpcConstants;
|
||||
import com.sdm.common.entity.constants.NumberConstants;
|
||||
import com.sdm.common.entity.req.pbs.hpc.*;
|
||||
import com.sdm.common.entity.resp.pbs.hpc.FileNodeInfo;
|
||||
import com.sdm.common.entity.resp.pbs.hpc.JobCancelResp;
|
||||
import com.sdm.common.entity.resp.pbs.hpc.SubmitHpcJobResp;
|
||||
import com.sdm.common.entity.resp.pbs.hpc.listtasks.ListTasks;
|
||||
@@ -11,14 +12,12 @@ import com.sdm.common.entity.resp.pbs.hpc.listtasks.ListTasksResp;
|
||||
import com.sdm.common.entity.resp.pbs.hpc.nodelist.NodeList;
|
||||
import com.sdm.common.entity.resp.pbs.hpc.nodelist.NodeListResp;
|
||||
import com.sdm.common.log.CoreLogger;
|
||||
import com.sdm.common.entity.resp.pbs.hpc.FileNodeInfo;
|
||||
import com.sdm.pbs.model.bo.HpcJobStatusInfo;
|
||||
import com.sdm.pbs.model.bo.HpcNodeInfo;
|
||||
import com.sdm.pbs.model.bo.HpcResouceInfo;
|
||||
import com.sdm.pbs.model.req.SubmitHpcTaskReq;
|
||||
import com.sdm.pbs.service.HpcInstructionService;
|
||||
import com.sdm.pbs.service.IPbsService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -61,14 +60,16 @@ public class IPbsHpcServiceImpl implements IPbsService {
|
||||
MergeSubmitHpcJobReq mergeSubmitHpcJobReq = new MergeSubmitHpcJobReq();
|
||||
NewJobReq newJobReq = new NewJobReq();
|
||||
newJobReq.setJobname(req.getJobName());
|
||||
// todo
|
||||
newJobReq.setProjectname(req.getProjectname());
|
||||
newJobReq.setNumcores(String.valueOf(req.getCoreNum()));
|
||||
AddJobReq addJobReq = new AddJobReq();
|
||||
addJobReq.setName(req.getRunName());
|
||||
addJobReq.setStdout(req.getStdout());
|
||||
addJobReq.setWorkdir(req.getWorkDir());
|
||||
addJobReq.setCommand(req.getCommand());
|
||||
addJobReq.setNumcores(String.valueOf(req.getCoreNum()));
|
||||
SubmitHpcJobReq submitHpcJobReq = new SubmitHpcJobReq();
|
||||
submitHpcJobReq.setNumcores(String.valueOf(req.getCoreNum()));
|
||||
mergeSubmitHpcJobReq.setNewJobReq(newJobReq);
|
||||
mergeSubmitHpcJobReq.setAddJobReq(addJobReq);
|
||||
mergeSubmitHpcJobReq.setSubmitHpcJobReq(submitHpcJobReq);
|
||||
|
||||
@@ -250,5 +250,10 @@ public class SysUserController implements ISysUserFeignClient {
|
||||
return rolePermissionService.getUserPermissions(Long.valueOf(userId));
|
||||
}
|
||||
|
||||
@Operation(summary = "根据用户ids查询用户列表")
|
||||
@PostMapping("/listUserDetailByIds")
|
||||
public SdmResponse<List<CIDStaffResp>> listUserDetailByIds(@Parameter(description = "用户查询请求参数") @RequestBody UserQueryReq req) {
|
||||
return ISysUserService.listUserDetailByIds(req);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -53,4 +53,6 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
|
||||
SdmResponse<List<Long>> getUserByRoleCode(String roleCode, Long tenantId);
|
||||
|
||||
SdmResponse<List<CIDStaffResp>> listUserDetailByIds(UserQueryReq req);
|
||||
|
||||
}
|
||||
|
||||
@@ -44,6 +44,9 @@ public class CIDISysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser>
|
||||
@Value("${cid.user.listUserByIds}")
|
||||
private String listUserByIds;
|
||||
|
||||
@Value("${cid.user.listUserDetailByIds}")
|
||||
private String listUserDetailByIds;
|
||||
|
||||
@Value("${cid.user.queryUserRole}")
|
||||
private String queryUserRole;
|
||||
|
||||
@@ -301,4 +304,24 @@ public class CIDISysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser>
|
||||
return SdmResponse.failed("根据角色编码查询用户失败: ");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public SdmResponse<List<CIDStaffResp>> listUserDetailByIds(UserQueryReq req) {
|
||||
try {
|
||||
log.info("[CIDISysUserServiceImpl] listUserDetailByIds send url:{}, param:{}", cidUrl + listUserDetailByIds, JSONUtil.toJsonStr(req));
|
||||
String userJson = HttpUtil.post(cidUrl + listUserDetailByIds, JSONUtil.toJsonStr(req));
|
||||
log.info("[CIDISysUserServiceImpl] listUserDetailByIds response:{}", userJson);
|
||||
SdmResponse<List<CIDStaffResp>> result = JSON.parseObject(
|
||||
userJson,
|
||||
new TypeReference<SdmResponse<List<CIDStaffResp>>>() {}
|
||||
);
|
||||
if (result != null) {
|
||||
return result;
|
||||
}
|
||||
return SdmResponse.failed("用户不存在");
|
||||
} catch (Exception e) {
|
||||
log.error("查询用户失败", e);
|
||||
return SdmResponse.failed("查询用户失败: ");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,14 +10,11 @@ import com.sdm.common.entity.req.system.QueryGroupDetailReq;
|
||||
import com.sdm.common.entity.req.system.UserListReq;
|
||||
import com.sdm.common.entity.req.system.UserQueryReq;
|
||||
import com.sdm.common.entity.resp.PageDataResp;
|
||||
import com.sdm.common.entity.resp.system.CIDRoleResp;
|
||||
import com.sdm.common.entity.resp.system.UserTokenResp;
|
||||
import com.sdm.common.entity.resp.system.*;
|
||||
import com.sdm.common.utils.PageUtils;
|
||||
import com.sdm.system.dao.SysUserMapper;
|
||||
import com.sdm.system.model.entity.*;
|
||||
import com.sdm.system.model.req.user.*;
|
||||
import com.sdm.common.entity.resp.system.CIDUserResp;
|
||||
import com.sdm.common.entity.resp.system.SysUserGroupResp;
|
||||
import com.sdm.system.service.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
@@ -312,4 +309,9 @@ public class LocalUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> im
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SdmResponse<List<CIDStaffResp>> listUserDetailByIds(UserQueryReq req) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -145,6 +145,7 @@ cid:
|
||||
listUser: /spdm-user/listUser
|
||||
queryUserDetail: /spdm-user/queryUserDetail
|
||||
listUserByIds: /spdm-user/listUserByIds
|
||||
listUserDetailByIds: /spdm-user/listUserDetailByIds
|
||||
queryUserRole: /spdm-user/queryUserRole
|
||||
queryGroup: /spdm-user/queryGroup
|
||||
queryGroupDetail: /spdm-user/queryGroupDetail
|
||||
|
||||
@@ -145,6 +145,7 @@ cid:
|
||||
listUser: /spdm-user/listUser
|
||||
queryUserDetail: /spdm-user/queryUserDetail
|
||||
listUserByIds: /spdm-user/listUserByIds
|
||||
listUserDetailByIds: /spdm-user/listUserDetailByIds
|
||||
queryUserRole: /spdm-user/queryUserRole
|
||||
queryGroup: /spdm-user/queryGroup
|
||||
queryGroupDetail: /spdm-user/queryGroupDetail
|
||||
|
||||
@@ -145,6 +145,7 @@ cid:
|
||||
listUser: /spdm-user/listUser
|
||||
queryUserDetail: /spdm-user/queryUserDetail
|
||||
listUserByIds: /spdm-user/listUserByIds
|
||||
listUserDetailByIds: /spdm-user/listUserDetailByIds
|
||||
queryUserRole: /spdm-user/queryUserRole
|
||||
queryGroup: /spdm-user/queryGroup
|
||||
queryGroupDetail: /spdm-user/queryGroupDetail
|
||||
|
||||
@@ -145,6 +145,7 @@ cid:
|
||||
listUser: /spdm-user/listUser
|
||||
queryUserDetail: /spdm-user/queryUserDetail
|
||||
listUserByIds: /spdm-user/listUserByIds
|
||||
listUserDetailByIds: /spdm-user/listUserDetailByIds
|
||||
queryUserRole: /spdm-user/queryUserRole
|
||||
queryGroup: /spdm-user/queryGroup
|
||||
queryGroupDetail: /spdm-user/queryGroupDetail
|
||||
|
||||
@@ -145,6 +145,7 @@ cid:
|
||||
listUser: /spdm-user/listUser
|
||||
queryUserDetail: /spdm-user/queryUserDetail
|
||||
listUserByIds: /spdm-user/listUserByIds
|
||||
listUserDetailByIds: /spdm-user/listUserDetailByIds
|
||||
queryUserRole: /spdm-user/queryUserRole
|
||||
queryGroup: /spdm-user/queryGroup
|
||||
queryGroupDetail: /spdm-user/queryGroupDetail
|
||||
|
||||
Reference in New Issue
Block a user