bug修复
This commit is contained in:
@@ -823,7 +823,6 @@ public class ProjectServiceImpl implements ProjectService {
|
||||
jsonObject.put("week", year + "-" + week);
|
||||
jsonObject.put(NEW_COUNT, 0);
|
||||
jsonObject.put(FINISH_COUNT, 0);
|
||||
// maps.put(week, jsonObject);
|
||||
jsons.add(jsonObject);
|
||||
} else {
|
||||
JSONObject jsonObject = maps.get(week);
|
||||
@@ -834,7 +833,6 @@ public class ProjectServiceImpl implements ProjectService {
|
||||
if (jsonObject.get(FINISH_COUNT) == null) {
|
||||
jsonObject.put(FINISH_COUNT, 0);
|
||||
}
|
||||
// maps.put(week, jsonObject);
|
||||
jsons.add(jsonObject);
|
||||
}
|
||||
}
|
||||
@@ -1062,7 +1060,6 @@ public class ProjectServiceImpl implements ProjectService {
|
||||
private long dateDiff(String startDate, String endDate) {
|
||||
LocalDate start = LocalDate.parse(startDate, DateTimeFormatter.ofPattern(TIME_SIMPLE));
|
||||
LocalDate end = LocalDate.parse(endDate, DateTimeFormatter.ofPattern(TIME_SIMPLE));
|
||||
// end - start
|
||||
return ChronoUnit.DAYS.between(start, end);
|
||||
}
|
||||
|
||||
@@ -1841,7 +1838,6 @@ public class ProjectServiceImpl implements ProjectService {
|
||||
jsonObject.put("createTime", DateUtils.formatDate(new Date(), TIME_FULL));
|
||||
jsonObject.put(OPERATION, "A");
|
||||
jsonObject.put(TENANT_ID, loadcaseBean.getTenantId());
|
||||
// svsService.pushSimulationInput(jsonObject);
|
||||
return jsonObject;
|
||||
}
|
||||
return null;
|
||||
@@ -2339,7 +2335,6 @@ public class ProjectServiceImpl implements ProjectService {
|
||||
commonNewMsgInfoVo.setMessageType(0);
|
||||
String dPrincipal = productDemandInfos.get(0).getDPrincipal();
|
||||
if (StringUtils.isNotBlank(dPrincipal)) {
|
||||
// User user = userService.getUserByIdCode(dPrincipal);
|
||||
log.info("仿真负责人为:{}", dPrincipal);
|
||||
SysUser user = userService.getUserByWorkNo(dPrincipal);
|
||||
log.info("仿真负责人返回值为:{}", user);
|
||||
@@ -2789,10 +2784,7 @@ public class ProjectServiceImpl implements ProjectService {
|
||||
commonNewMsgInfoVo.setSender(userService.getUserByWorkNo(ThreadLocalContext.getUserContext().getUser().getJobNumber()).getId());
|
||||
commonNewMsgInfoVo.setGroupType(0);
|
||||
commonNewMsgInfoVo.setMessageType(0);
|
||||
// User user = userService.getUserByIdCode(loadcaseBean.getMemberIdentity());
|
||||
log.info("loadcaseBean为:{}", loadcaseBean);
|
||||
// SysUser user = userService.getUserByWorkNo(loadcaseBean.getPrincipal());
|
||||
// log.info("loadcaseBean.getMemberIdentity()返回值为:{}",user);
|
||||
if (StringUtils.isNotBlank(loadcaseBean.getPrincipal())) {
|
||||
commonNewMsgInfoVo.setWorkerName(loadcaseBean.getPrincipal());
|
||||
commonNewMsgInfoVo.setServiceName("SVS");
|
||||
|
||||
@@ -112,24 +112,14 @@ public class SystemServiceImpl implements SystemService {
|
||||
String strValue4 = req.getValues4();
|
||||
String strValue5 = req.getValues5();
|
||||
int result = addKeyValueParam(strKey, strValue1, strValue2, strValue3, strValue4, strValue5);
|
||||
// while (systemServicedelayProcessors.keySet().iterator().hasNext()) {
|
||||
// String key = delayProcessors.keySet().iterator().next();
|
||||
// if (strKey.contains(key)) {
|
||||
// delayProcessors.remove(key);
|
||||
// }
|
||||
// }
|
||||
return SdmResponse.validResult(result, Constant.KEYVALUE_ADD_SUCCESS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SdmResponse<Long> addApprove(AddApproveReq req) {
|
||||
// if (req.getType() == 1 && StringUtils.isBlank(req.getVersionName())) {
|
||||
// return SdmResponse.failed("版本名称不能为空");
|
||||
// }
|
||||
SystemApprovalBean approvalBean = new SystemApprovalBean();
|
||||
int result = addSystemApprove(req.getType(), req.getApproveData(), req.getParentApproveId(), req.getComment(), req.getProjectId(), req.getBusinessCode(), req.getBusinessVersion(),
|
||||
req.getApproveFiles(), req.getApproveUsers(), approvalBean);
|
||||
// return SdmResponse.validResult(result, Constant.ADD_APPROVAL_SUCCESS);
|
||||
if (result == Constant.ADD_APPROVAL_SUCCESS) {
|
||||
return SdmResponse.success(approvalBean.id);
|
||||
}
|
||||
@@ -167,11 +157,6 @@ public class SystemServiceImpl implements SystemService {
|
||||
for (String stringKey : addKeys) {
|
||||
batchKeys.append(stringKey).append(";");
|
||||
}
|
||||
// for (String key : delayProcessors.keySet()) {
|
||||
// if (batchKeys.toString().contains(key)) {
|
||||
// delayProcessors.remove(key);
|
||||
// }
|
||||
// }
|
||||
return SdmResponse.validResult(result, Constant.KEYVALUE_ADD_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -287,12 +272,6 @@ public class SystemServiceImpl implements SystemService {
|
||||
return updateApproveStatus(req.getApproveId(), req.getStatus(), req.getApproveResult());
|
||||
}
|
||||
|
||||
// @Transactional(rollbackFor = Exception.class)
|
||||
// @Override
|
||||
// public SdmResponse testUpdateApproveStatus(UpdateSystemApproveStatusReq req) {
|
||||
// int result = updateApproveStatus(req.getApproveId(), req.getStatus(), req.getApproveResult());
|
||||
// return SdmResponse.validResult(result, Constant.UPDATE_APPROVAL_STATUS_SUCCESS);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public SdmResponse<Void> updateNoticeStatus(UpdateSystemNoticeStatusReq req) {
|
||||
@@ -385,8 +364,6 @@ public class SystemServiceImpl implements SystemService {
|
||||
result = Constant.KEYVALUE_DEL_FAIL;
|
||||
}
|
||||
}
|
||||
// DeleteAllKeyValueParamDelayProcessor delayProcessor = new DeleteAllKeyValueParamDelayProcessor(session, result==Constant.KEYVALUE_DEL_SUCCESS?"成功":"失败");
|
||||
// delayProcessors.put(param.getKeyValue(), delayProcessor);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -406,8 +383,6 @@ public class SystemServiceImpl implements SystemService {
|
||||
result = Constant.KEYVALUE_DEL_FAIL;
|
||||
}
|
||||
}
|
||||
// DeleteAllKeyValueParamDelayProcessor delayProcessor = new DeleteAllKeyValueParamDelayProcessor(session, result==Constant.KEYVALUE_DEL_SUCCESS?"成功":"失败");
|
||||
// delayProcessors.put(key, delayProcessor);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -535,7 +510,6 @@ public class SystemServiceImpl implements SystemService {
|
||||
}
|
||||
String creatorIdentity = ThreadLocalContext.getIdCode();
|
||||
String creatorName = ThreadLocalContext.getUserContext().getUser().getName();
|
||||
// SystemApprovalBean approvalBean = new SystemApprovalBean();
|
||||
approvalBean.type = type;
|
||||
approvalBean.approveInfo = approveInfo;
|
||||
approvalBean.parentId = parentId;
|
||||
@@ -547,10 +521,6 @@ public class SystemServiceImpl implements SystemService {
|
||||
approvalBean.md5Info = Tools.encoderStringByMd5(approveInfo);
|
||||
approvalBean.setTenantId(company);
|
||||
if (systemMapper.addSystemApproval(approvalBean)> 0) {
|
||||
// approvalBean = systemMapper.getApproveByInfoMd5(md5Info);
|
||||
// if (type == 1) {
|
||||
// systemMapper.updateVersionStatus((byte) 3, versionName, ThreadLocalContext.getIdCode());
|
||||
// }
|
||||
List<ApproveRelateFileInfo> relateFiles = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(approveFiles)) {
|
||||
for (String filePath : approveFiles) {
|
||||
@@ -699,20 +669,15 @@ public class SystemServiceImpl implements SystemService {
|
||||
} else {
|
||||
if (approveResult == 1 && count == 0)//所有评审都通过
|
||||
{
|
||||
// systemMapper.updateSystemApproveStatus(approveId, (byte) 2, (byte) 1, submitTime, updater);
|
||||
//approvePostprocess(approveId, 4);
|
||||
log.info("评审通过");
|
||||
finalResult = 1;
|
||||
postProcessor = new ApprovePostProcessor(approveId, 4, rootPath, ThreadLocalContext.getUserContext().getUser(), projectService, grpcClientSystemApproveService,msgInfoGrpcService,plmService,projectLibraryGrpcService,userService,pushFlag);
|
||||
} else if (approveResult == 2 && unSubmitCount == 0)//所有评审都提交,但有不通过
|
||||
{
|
||||
// systemMapper.updateSystemApproveStatus(approveId, (byte) 2, (byte) 2, submitTime, updater);
|
||||
//approvePostprocess(approveId, 5);//5
|
||||
finalResult = 2;
|
||||
postProcessor = new ApprovePostProcessor(approveId, 5, rootPath, ThreadLocalContext.getUserContext().getUser(), projectService, grpcClientSystemApproveService,msgInfoGrpcService,plmService,projectLibraryGrpcService,userService,pushFlag);
|
||||
} else if (approveResult == 2 && unSubmitCount != 0)//还有评审未提交,已经出现不通过
|
||||
{
|
||||
// systemMapper.updateSystemApproveStatus(approveId, (byte) 1, (byte) 2, submitTime, updater);
|
||||
}
|
||||
}
|
||||
Future<String> future = SdmThreadService.builder().submit(postProcessor);
|
||||
@@ -774,7 +739,6 @@ public class SystemServiceImpl implements SystemService {
|
||||
* @return
|
||||
*/
|
||||
public SdmResponse<Void> updateApproveStatus(long approveId, byte status, byte approveResult) {
|
||||
// int result = Constant.UPDATE_APPROVAL_STATUS_SUCCESS;
|
||||
SimpleDateFormat df = new SimpleDateFormat(TIME_FULL);
|
||||
String submitTime = df.format(new Date());
|
||||
String updater = ThreadLocalContext.getIdCode();
|
||||
@@ -796,7 +760,6 @@ public class SystemServiceImpl implements SystemService {
|
||||
* @return
|
||||
*/
|
||||
public SdmResponse<Void> updateApproveSuggestStatus(long approveId, String identity, byte status, byte approveResult, String suggest) {
|
||||
// int result = Constant.UPDATE_APPROVAL_SUGGEST_STATUS_SUCCESS;
|
||||
SimpleDateFormat df = new SimpleDateFormat(TIME_FULL);
|
||||
String submitTime = df.format(new Date());
|
||||
SdmResponse sdmResponse;
|
||||
@@ -983,9 +946,9 @@ public class SystemServiceImpl implements SystemService {
|
||||
public boolean checkNoticeValid(int noticeType, long noticeId, String content, String acceptor) {
|
||||
boolean result = true;
|
||||
if (noticeType == 1) {
|
||||
// result = checkProjectLeaderAssignorNotice(content, acceptor);
|
||||
|
||||
} else if (noticeType == 2) {
|
||||
// result = checkDisciplineLeaderAssignorNotice(content, acceptor);
|
||||
|
||||
} else if (noticeType == 3) {
|
||||
result = checkLoadcaseLeaderAssignorNotice(content, acceptor);
|
||||
}
|
||||
@@ -1034,38 +997,12 @@ public class SystemServiceImpl implements SystemService {
|
||||
* 删除项目相关未处理的通知
|
||||
*/
|
||||
public void delUnhandledProjectNotice() {
|
||||
// //删除项目相关通知
|
||||
// systemMapper.delSystemNoticeByTargetId(1, projectBean.getId());
|
||||
// //清理项目阶段相关通知
|
||||
// for (ProjectPhaseBean phaseBean : projectBean.phaseBeans)//清理项目阶段相关通知
|
||||
// {
|
||||
// systemMapper.delSystemNoticeByTargetId(11, phaseBean.getId());
|
||||
// }
|
||||
// //清理项目阶段学科相关通知
|
||||
// for (ProjectDisciplineBean disciplineBean : projectBean.disciplineBeans)//清理项目阶段相关通知
|
||||
// {
|
||||
// systemMapper.delSystemNoticeByTargetId(2, disciplineBean.getId());
|
||||
// systemMapper.delSystemNoticeByTargetId(8, disciplineBean.getId());
|
||||
// systemMapper.delSystemNoticeByTargetId(10, disciplineBean.getId());
|
||||
// systemMapper.delSystemNoticeByTargetId(12, disciplineBean.getId());
|
||||
// }
|
||||
//
|
||||
// for (ProjectLoadcaseBean loadcaseBean : projectBean.loadcaseBeans) {
|
||||
// systemMapper.delSystemNoticeByTargetId(3, loadcaseBean.id);
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除项目学科相关未处理的通知
|
||||
*/
|
||||
public void delUnhandledProjectDisciplineNotice() {
|
||||
// long disciplineId = disciplineBean.getId();
|
||||
// systemMapper.delSystemNoticeByTargetId(2, disciplineId);
|
||||
// systemMapper.delSystemNoticeByTargetId(8, disciplineId);
|
||||
// systemMapper.delSystemNoticeByTargetId(12, disciplineId);
|
||||
// for (ProjectLoadcaseBean loadcaseBean : disciplineBean.loadcaseBeans) {
|
||||
// systemMapper.delSystemNoticeByTargetId(3, loadcaseBean.id);
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1159,11 +1096,6 @@ public class SystemServiceImpl implements SystemService {
|
||||
child.addAll(systemLoadcaseNodeInfos);
|
||||
}
|
||||
// 查询学科下loadcase
|
||||
// List<SystemLoadcaseBean> loadcaseBeans = systemMapper.getSystemLoadcase(poolName, 0, version, company);
|
||||
// if (!CollectionUtils.isEmpty(loadcaseBeans)) {
|
||||
// List<SystemLoadcasePoolInfo> systemLoadcaseInfos = getLoadcaseInfo(loadcaseBeans, version);
|
||||
// child.addAll(systemLoadcaseInfos);
|
||||
// }
|
||||
systemLoadcasePoolInfo.put(CHILDREN, child);
|
||||
systemLoadcasePoolInfos.add(systemLoadcasePoolInfo);
|
||||
}
|
||||
@@ -1325,9 +1257,6 @@ public class SystemServiceImpl implements SystemService {
|
||||
log.info("fileStr={},兼容老数据直接返回",fileStr);
|
||||
return null;
|
||||
}
|
||||
// String company = ThreadLocalContext.getUserContext().getUser().getTenantId();
|
||||
// log.info("当前tenantId为:{}",company);
|
||||
// TenantContext.setTenant(company);
|
||||
List<JSONObject> libraryFileList = new ArrayList<>();
|
||||
List<String> codes = List.of(fileStr.split(","));
|
||||
KbMenuFileManagement kbMenuFileManagementParam = new KbMenuFileManagement();
|
||||
|
||||
@@ -22,10 +22,7 @@ public class EmbseService {
|
||||
log.info("开始向EMBSE推送模型信息");
|
||||
String url = plmProperties.getUrl() + plmProperties.getPushModelInfo();
|
||||
log.info("向EMBSE推送模型信息url:" + url);
|
||||
// JSONObject param = new JSONObject();
|
||||
// param.put("data", req);
|
||||
log.info("向EMBSE推送模型信息参数:" + req);
|
||||
// log.info("更新产品需求headers:" + headers);
|
||||
JSONObject result = plmUtil.sendPlm(url, req);
|
||||
log.info("向EMBSE推送模型信息结果:" + result);
|
||||
}
|
||||
|
||||
@@ -36,10 +36,7 @@ public class PlmService {
|
||||
log.info("更新产品需求url:" + url);
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("data", req);
|
||||
// Map<String, String> headers = new HashMap<>();
|
||||
// headers.put("Content-Type", "application/json");
|
||||
log.info("更新产品需求参数:" + param);
|
||||
// log.info("更新产品需求headers:" + headers);
|
||||
JSONObject result = plmUtil.sendPlm(url, param);
|
||||
log.info("更新产品需求结果:" + result);
|
||||
}
|
||||
@@ -49,10 +46,7 @@ public class PlmService {
|
||||
String url = plmProperties.getUrl() + plmProperties.getRejectInputForm();
|
||||
log.info("回退输入表单url:" + url);
|
||||
String param = JSONObject.toJSONString(req);
|
||||
// Map<String, String> headers = new HashMap<>();
|
||||
// headers.put("Content-Type", "application/json");
|
||||
log.info("回退输入表单参数:" + param);
|
||||
// log.info("回退输入表单headers:" + headers);
|
||||
JSONObject result = plmUtil.sendPlm(url, req);
|
||||
log.info("回退输入表单结果:" + result);
|
||||
}
|
||||
@@ -63,10 +57,7 @@ public class PlmService {
|
||||
log.info("创建待办数据url:" + url);
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("data", req);
|
||||
// Map<String, String> headers = new HashMap<>();
|
||||
// headers.put("Content-Type", "application/json");
|
||||
log.info("创建待办数据参数:" + param);
|
||||
// log.info("创建待办数据headers:" + headers);
|
||||
JSONObject result = plmUtil.sendPlm(url, param);
|
||||
log.info("创建待办数据结果:" + result);
|
||||
}
|
||||
|
||||
@@ -287,39 +287,6 @@ public class SvsService {
|
||||
}
|
||||
}
|
||||
|
||||
// public boolean downloadSvsFile(String fileId, String filePath) {
|
||||
// int partNum = getSvsFilePartNum(fileId);
|
||||
// if (partNum == 0) {
|
||||
// return false;
|
||||
// }
|
||||
// Map<String, String> headers = new HashMap<>();
|
||||
// String token = getSVSToken();
|
||||
// if (token == null) {
|
||||
// return false;
|
||||
// }
|
||||
// headers.put(AUTHORIZATION, BEARER + token);
|
||||
// log.info("downloadSvsFile headers:" + headers);
|
||||
// for (int i = 1; i <= partNum; i++) {
|
||||
// String url = svsProperties.getUrl() + svsProperties.getDownloadPart() + FILE_ID_PARAM + fileId + "&partNo=" + i;
|
||||
//// log.info("downloadSvsFile url:" + url);
|
||||
// try {
|
||||
// String result = HttpUtil.doGet(url, headers);
|
||||
// // 获取输入流
|
||||
// InputStream input = new ByteArrayInputStream(result.getBytes(StandardCharsets.UTF_8));
|
||||
// byte[] buffer = new byte[input.available()];
|
||||
// input.read(buffer);
|
||||
// input.close();
|
||||
// FileOutputStream fileOutputStream = new FileOutputStream(filePath, true);
|
||||
// fileOutputStream.write(buffer);
|
||||
// fileOutputStream.close();
|
||||
// } catch (Exception e) {
|
||||
// log.error("分片下载文件失败:" + e);
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
|
||||
public boolean downloadSvsFile(String fileId, String filePath) {
|
||||
int partNum = getSvsFilePartNum(fileId);
|
||||
if (partNum == 0) {
|
||||
@@ -589,7 +556,6 @@ public class SvsService {
|
||||
long loadcaseId = loadcaseBean.getId();
|
||||
// 0仿真负责人,1提出负责人,2输入负责人
|
||||
List<LoadcaseMemberBean> simUsers = loadcaseBean.getSimUsers();
|
||||
// List<LoadcaseMemberBean> simUsers = projectMapper.getLoadcaseUserByType(loadcaseId, 0);
|
||||
List<UserMainInfo> simUserList = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(simUsers)) {
|
||||
for (LoadcaseMemberBean simUser : simUsers) {
|
||||
@@ -604,7 +570,6 @@ public class SvsService {
|
||||
req.setPrincipal(simUserList);
|
||||
|
||||
List<LoadcaseMemberBean> submitUsers = loadcaseBean.getSubmitUsers();
|
||||
// List<LoadcaseMemberBean> submitUsers = projectMapper.getLoadcaseUserByType(loadcaseId, 1);
|
||||
List<UserMainInfo> submitUserList = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(submitUsers)) {
|
||||
for (LoadcaseMemberBean submitUser : submitUsers) {
|
||||
@@ -617,7 +582,6 @@ public class SvsService {
|
||||
req.setSubmitter(submitUserList);
|
||||
|
||||
List<LoadcaseMemberBean> importUsers = loadcaseBean.getImportUsers();
|
||||
// List<LoadcaseMemberBean> importUsers = projectMapper.getLoadcaseUserByType(loadcaseId, 2);
|
||||
List<UserMainInfo> importUserList = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(importUsers)) {
|
||||
for (LoadcaseMemberBean importUser : importUsers) {
|
||||
@@ -673,7 +637,6 @@ public class SvsService {
|
||||
log.info("推送状态路径:" + url);
|
||||
String jsonString = JSON.toJSONString(req);
|
||||
String param = Collections.singletonList(jsonString).toString();
|
||||
// String param = JSON.toJSONString(reqList);
|
||||
log.info("推送状态参数:" + param);
|
||||
Map<String, String> headers = new HashMap<>();
|
||||
String token = getSVSToken();
|
||||
|
||||
Reference in New Issue
Block a user