fix(测试计划): 用例等级处理&websocket心跳检查&自定义字段输入框/文本类型处理

This commit is contained in:
WangXu10 2024-08-20 16:28:13 +08:00 committed by Craftsman
parent c220479216
commit e9616a84e1
3 changed files with 11 additions and 4 deletions

View File

@ -786,9 +786,6 @@ public class FunctionalCaseFileService {
* @param request * @param request
*/ */
private void buildExportCustomField(List<TemplateCustomFieldDTO> templateCustomFields, List<FunctionalCaseCustomField> functionalCaseCustomFields, FunctionalCaseExcelData data, FunctionalCaseExportRequest request) { private void buildExportCustomField(List<TemplateCustomFieldDTO> templateCustomFields, List<FunctionalCaseCustomField> functionalCaseCustomFields, FunctionalCaseExcelData data, FunctionalCaseExportRequest request) {
if (CollectionUtils.isEmpty(request.getCustomFields())) {
return;
}
HashMap<String, AbstractCustomFieldValidator> customFieldValidatorMap = CustomFieldValidatorFactory.getValidatorMap(request.getProjectId()); HashMap<String, AbstractCustomFieldValidator> customFieldValidatorMap = CustomFieldValidatorFactory.getValidatorMap(request.getProjectId());
Map<String, TemplateCustomFieldDTO> customFieldsMap = templateCustomFields.stream().collect(Collectors.toMap(TemplateCustomFieldDTO::getFieldId, i -> i)); Map<String, TemplateCustomFieldDTO> customFieldsMap = templateCustomFields.stream().collect(Collectors.toMap(TemplateCustomFieldDTO::getFieldId, i -> i));
Map<String, String> caseFieldvalueMap = functionalCaseCustomFields.stream().collect(Collectors.toMap(FunctionalCaseCustomField::getFieldId, FunctionalCaseCustomField::getValue)); Map<String, String> caseFieldvalueMap = functionalCaseCustomFields.stream().collect(Collectors.toMap(FunctionalCaseCustomField::getFieldId, FunctionalCaseCustomField::getValue));
@ -803,6 +800,8 @@ public class FunctionalCaseFileService {
} else { } else {
map.put(Translator.get("custom_field.functional_priority"), caseFieldvalueMap.get(k)); map.put(Translator.get("custom_field.functional_priority"), caseFieldvalueMap.get(k));
} }
} else {
map.put(v.getFieldName(), caseFieldvalueMap.get(k));
} }
} }
}); });

View File

@ -91,8 +91,14 @@ public class ExportWebSocketHandler {
*/ */
@Scheduled(fixedRate = 60000) @Scheduled(fixedRate = 60000)
public void heartbeatCheck() { public void heartbeatCheck() {
ExportWebSocketHandler.sendMessageSingle( ExportWebSocketHandler.sendMessageAll(
new ExportMsgDTO(MsgType.HEARTBEAT.name(), MsgType.HEARTBEAT.name(), 0, true, MsgType.HEARTBEAT.name()) new ExportMsgDTO(MsgType.HEARTBEAT.name(), MsgType.HEARTBEAT.name(), 0, true, MsgType.HEARTBEAT.name())
); );
} }
private static void sendMessageAll(ExportMsgDTO message) {
ONLINE_EXPORT_EXCEL_SESSIONS.forEach((sessionId, session) -> {
sendMessage(session, message);
});
}
} }

View File

@ -482,6 +482,8 @@ public class XmindExportUtil {
} else { } else {
value = customFieldMap.get(k); value = customFieldMap.get(k);
} }
} else {
value = customFieldMap.get(k);
} }
ITopic preTopic = workbook.createTopic(); ITopic preTopic = workbook.createTopic();