| | |
| | | //通用字典列表字符串生成 |
| | | for (TestCheckOrderList checkOrderList : dataObj.getCheckOrderList()) { |
| | | String value = checkOrderList.getCheckResult(); |
| | | String checkResultStr = getShowDictList.getShowDictList(value, "tristate1", false); |
| | | String checkResultStr=""; |
| | | if ("plan".equals(pageCode) || "report".equals(pageCode) || "record".equals(pageCode) || "explain".equals(pageCode)) { |
| | | checkResultStr = getShowDictList.getShowDictList(value, "tristate1", false); |
| | | }else{ |
| | | checkResultStr = getShowDictList.getShowDictList(value, "tristate2", false); |
| | | } |
| | | checkOrderList.setCheckResult(checkResultStr); |
| | | } |
| | | |
| | |
| | | map.put("report", "报告"); |
| | | map.put("record", "记录"); |
| | | map.put("explain", "说明"); |
| | | map.put("contract", "合同评审"); |
| | | map.put("require", "测试需求分析与策划"); |
| | | map.put("execute", "测试设计、实现与执行"); |
| | | map.put("summary", "测试总结"); |
| | | String type = map.get(pageCode); |
| | | dataObj.setPageCode(type); |
| | | WordFile wordFile = new WordFile(); |
| | | |
| | | if ("plan".equals(pageCode) || "report".equals(pageCode) || "record".equals(pageCode) || "explain".equals(pageCode)) { |
| | | wordFile.setModulePath("软件测试检查单.docx"); |
| | | wordFile.setWordName(dataObj.getProject().getSoftwareName() + "_软件测试"+type+"检查单.docx"); |
| | | } else { |
| | | wordFile.setModulePath("质量保证检查单.docx"); |
| | | wordFile.setWordName(dataObj.getProject().getSoftwareName() + "_质量保证检查单(" + type + ").docx"); |
| | | } |
| | | wordFileService.exportWordFile(request, dataObj, wordFile, response); |
| | | } catch (UnsupportedEncodingException e) { |
| | | e.printStackTrace(); |