modules/mainPart/src/main/java/com/zt/life/modules/configAuditReport/controller/ConfigAuditReportController.java
@@ -63,21 +63,13 @@ return PageResult.ok(configAuditReportService.page(queryFilter)); } /* @GetMapping("getDto") @GetMapping("getDto") @ApiOperation("信息") public Result<ConfigAuditDto> getDto(Long projectId, Long reportId) { //ConfigAuditDto data =configAuditReportService.getDto(projectId, reportId); if (reportId!=null) { for (WarehouseConfigItem configItem : data.getConfigItemList()) { Long configItemId = configItem.getId(); OssDto ossDto = sysOssConfigService.getOssByBusiType(configItemId, "config_item_warehouse"); if (ossDto != null) { configItem.setFiles(ossDto); } } } ConfigAuditDto data =configAuditReportService.getDto(projectId, reportId); return Result.ok(data); }*/ } @PostMapping @ApiOperation("新增") @@ -89,7 +81,7 @@ map.put("funCode", "config_audit_report"); map.put("projectId",configAuditDto.getProjectId().toString()); configAuditDto.getAuditReport().setCode(sysCodeRuleService.getNewCode(map)); // Boolean result = configAuditReportService.save(configAuditDto); Boolean result = configAuditReportService.save(configAuditDto); return Result.ok(); } @@ -99,8 +91,7 @@ public Result update(@RequestBody ConfigAuditDto configAuditDto){ //效验数据 ValidatorUtils.validateEntity(configAuditDto, UpdateGroup.class, DefaultGroup.class); // Boolean result = configAuditReportService.save(configAuditDto); Boolean result = configAuditReportService.save(configAuditDto); return Result.ok(); } modules/mainPart/src/main/java/com/zt/life/modules/configAuditReport/dao/ConfigAuditReportContentDao.java
@@ -20,4 +20,5 @@ List<ConfigAuditReportContent> getList(Map<String, Object> params); List<?> dictList(String dictType); } modules/mainPart/src/main/java/com/zt/life/modules/configAuditReport/dao/ConfigAuditReportDao.java
@@ -19,5 +19,4 @@ public interface ConfigAuditReportDao extends BaseDao<ConfigAuditReport> { List<ConfigAuditReport> getList(Map<String, Object> params); } modules/mainPart/src/main/java/com/zt/life/modules/configAuditReport/service/ConfigAuditReportContentService.java
@@ -3,10 +3,13 @@ import com.zt.common.service.BaseService; import com.zt.life.modules.configAuditReport.dao.ConfigAuditReportContentDao; import com.zt.life.modules.configAuditReport.model.ConfigAuditReportContent; import com.zt.life.modules.configAuditReport.model.ConfigAuditReportProblem; import org.springframework.stereotype.Service; import com.zt.common.db.query.QueryFilter; import javax.annotation.Resource; import java.util.HashMap; import java.util.List; import java.util.Map; /** @@ -37,4 +40,13 @@ super.deleteLogic(ids); } public List<ConfigAuditReportContent> getList(Long reportId) { Map<String, Object> params = new HashMap<>(); params.put("reportId",reportId); return baseDao.getList(params); } public List<?> dictList(String dictType) { return baseDao.dictList(dictType); } } modules/mainPart/src/main/java/com/zt/life/modules/configAuditReport/service/ConfigAuditReportProblemService.java
@@ -3,10 +3,13 @@ import com.zt.common.service.BaseService; import com.zt.life.modules.configAuditReport.dao.ConfigAuditReportProblemDao; import com.zt.life.modules.configAuditReport.model.ConfigAuditReportProblem; import com.zt.life.modules.itemCirculatOrder.model.ItemCirculatOrderTechnical; import org.springframework.stereotype.Service; import com.zt.common.db.query.QueryFilter; import javax.annotation.Resource; import java.util.HashMap; import java.util.List; import java.util.Map; /** @@ -37,4 +40,10 @@ super.deleteLogic(ids); } public List<ConfigAuditReportProblem> getList(Long reportId) { Map<String, Object> params = new HashMap<>(); params.put("reportId",reportId); return baseDao.getList(params); } } modules/mainPart/src/main/java/com/zt/life/modules/configAuditReport/service/ConfigAuditReportService.java
@@ -3,9 +3,14 @@ import com.zt.common.service.BaseService; import com.zt.common.utils.CommonUtils; import com.zt.life.export.service.WordFileService; import com.zt.life.modules.baselineRelease.dto.BaselineDto; import com.zt.life.modules.baselineRelease.model.BaselineRelease; import com.zt.life.modules.baselineRelease.model.BaselineReleaseRemark; import com.zt.life.modules.configAuditReport.dao.ConfigAuditReportDao; import com.zt.life.modules.configAuditReport.dto.ConfigAuditDto; import com.zt.life.modules.configAuditReport.model.ConfigAuditReport; import com.zt.life.modules.configAuditReport.model.ConfigAuditReportContent; import com.zt.life.modules.configAuditReport.model.ConfigAuditReportProblem; import com.zt.life.modules.configItemWarehouse.model.WarehouseCmAudit; import com.zt.life.modules.configItemWarehouse.model.WarehouseConfigItem; import com.zt.life.modules.configItemWarehouse.model.WarehouseQaAudit; @@ -14,19 +19,25 @@ import com.zt.life.modules.configItemWarehouse.service.WarehouseQaAuditService; import com.zt.life.modules.mainPart.utils.GetFilesPath; import com.zt.life.modules.mainPart.utils.GetShowDictList; import com.zt.life.modules.project.model.Project; import com.zt.life.modules.project.model.SoftwareTestOrderDeliverable; import com.zt.life.modules.project.model.SoftwareTestOrderMeasured; import com.zt.life.modules.project.service.ProjectService; import com.zt.life.modules.testCheckOrder.model.TestCheckOrder; import com.zt.life.modules.testCheckOrder.service.TestCheckOrderService; import com.zt.life.sys.dto.OssDto; import com.zt.life.sys.service.SysOssConfigService; import com.zt.modules.coderule.service.SysCodeRuleService; import com.zt.modules.oss.service.SysOssService; import com.zt.modules.workflow.dto.FlowInfoDto; import com.zt.modules.workflow.service.WorkflowService; import io.swagger.annotations.ApiModelProperty; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.zt.common.db.query.QueryFilter; import javax.annotation.Resource; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -51,6 +62,12 @@ @Autowired private ProjectService projectService; @Autowired private ConfigAuditReportContentService contentService; @Autowired private ConfigAuditReportProblemService problemService; @Autowired private GetShowDictList getShowDictList; @@ -78,90 +95,68 @@ public void delete(Long[] ids) { super.deleteLogic(ids); } /* public ConfigAuditDto getDto(Long projectId, Long reportId) { ConfigAuditDto data = new ConfigAuditDto(); if (reportId != null) { data.setId(reportId); ConfigAuditReport auditReport = this.get(reportId); data.setAuditReport(auditReport); if (auditReport != null && projectId == null) { projectId = auditReport.getProjectId(); } List<ConfigAuditReportProblem> problemList = problemService.getList(reportId); List<ConfigAuditReportContent> contentList = contentService.getList(reportId); data.setContentList(contentList); data.setProblemList(problemList); } else { ConfigAuditReport auditReport = new ConfigAuditReport(); data.setAuditReport(auditReport); List<?> contentResult = contentService.dictList("config_check_item"); List<?> contentList = contentResult; data.setContentList((List<ConfigAuditReportContent>) contentList); } if (projectId != null) { data.setProjectId(projectId); data.setProject(projectService.get(projectId)); } return data; } public Boolean save(ConfigAuditDto configAuditDto) { Long warehouseId = configItemDto.getConfigItemWarehouse().getId(); if (warehouseId != null) baseDao.updateById(configItemDto.getConfigItemWarehouse()); Long reportId = configAuditDto.getAuditReport().getId(); if (reportId != null) baseDao.updateById(configAuditDto.getAuditReport()); else { Map<String, String> map = new HashMap<>(); map.put("funCode", "config_item_warehouse"); map.put("projectId", configItemDto.getProjectId().toString()); configItemDto.getConfigItemWarehouse().setProjectId(configItemDto.getProjectId()); configItemDto.getConfigItemWarehouse().setCode(sysCodeRuleService.getNewCode(map)); baseDao.insert(configItemDto.getConfigItemWarehouse()); warehouseId = configItemDto.getConfigItemWarehouse().getId(); map.put("funCode", "config_audit_report"); map.put("projectId", configAuditDto.getProjectId().toString()); configAuditDto.getAuditReport().setProjectId(configAuditDto.getProjectId()); configAuditDto.getAuditReport().setCode(sysCodeRuleService.getNewCode(map)); baseDao.insert(configAuditDto.getAuditReport()); reportId = configAuditDto.getAuditReport().getId(); } for (WarehouseConfigItem configItem : configItemDto.getConfigItemList()) { configItem.setWarehouseId(warehouseId); if (configItem.getId() != null) { WarehouseConfigItem configItem2 = configItemService.get(configItem.getId()); if (CommonUtils.isActureChangeData(configItem,configItem2)) { configItemService.update(configItem); } if(CommonUtils.isActureChangeData(configItemDto.getConfigItemWarehouse().getLibraryType(),configItem.getLibraryType())){ configItem.setLibraryType(configItemDto.getConfigItemWarehouse().getLibraryType()); configItemService.update(configItem); for (ConfigAuditReportContent content : configAuditDto.getContentList()) { content.setReportId(reportId); if (content.getId() != null) { ConfigAuditReportContent content2 = contentService.get(content.getId()); if (CommonUtils.isActureChangeData(content,content2)) { contentService.update(content); } } else { Map<String, String> map = new HashMap<>(); String pageCode = configItem.getPageCode(); if (StringUtils.isNotBlank(pageCode) && "plan,explain,record,report".contains(pageCode)) { map.put("funCode", "test_" + pageCode); configItem.setItemIdentify(sysCodeRuleService.getNewCode(map)); content.setProjectId(configAuditDto.getAuditReport().getProjectId()); contentService.insert(content); } configItem.setLibraryType(configItemDto.getConfigItemWarehouse().getLibraryType()); configItem.setWarehouseId(warehouseId); configItem.setProjectId(configItemDto.getConfigItemWarehouse().getProjectId()); configItemService.insert(configItem); } Long checkId = configItem.getCheckId(); if (checkId != null) { TestCheckOrder testCheckOrder = testCheckOrderService.get(checkId); if (testCheckOrder.getConfigItemId() == null) { Long configItemId = configItem.getId(); testCheckOrder.setConfigItemId(configItemId); testCheckOrder.setConfigOrderId(warehouseId); testCheckOrderService.update(testCheckOrder); } } sysOssConfigService.updateOss(configItem.getId(), configItem.getFiles());// 保存附件 } for (WarehouseCmAudit cmAudit : configItemDto.getCmAuditList()) { cmAudit.setWarehouseId(warehouseId); if (cmAudit.getId() != null) { cmAuditService.update(cmAudit); for (ConfigAuditReportProblem problem : configAuditDto.getProblemList()) { problem.setReportId(reportId); if (problem.getId() != null) { problemService.update(problem); } else { cmAudit.setWarehouseId(warehouseId); cmAuditService.insert(cmAudit); problemService.insert(problem); } } for (WarehouseQaAudit qaAudit : configItemDto.getQaAuditList()) { qaAudit.setWarehouseId(warehouseId); if (qaAudit.getId() != null) { qaAuditService.update(qaAudit); } else { qaAudit.setWarehouseId(warehouseId); qaAuditService.insert(qaAudit); } } Long bizId = configItemDto.getConfigItemWarehouse().getId(); FlowInfoDto flowInfoDto = configItemDto.getFlowInfoDto(); if (flowInfoDto != null && flowInfoDto.getSubmitType() != null && "tj,bl".contains(flowInfoDto.getSubmitType())) { if ("tj".equals(flowInfoDto.getSubmitType())) { workflowService.startFlow(flowInfoDto.getFlowCode(), bizId); } workflowService.approvePass(flowInfoDto.getFlowCode(), bizId, flowInfoDto.getStepIdMark()); } return true; }*/ } } modules/mainPart/src/main/java/com/zt/life/modules/testReviewComment/dto/ReviewCommentDto.java
@@ -3,6 +3,7 @@ import com.zt.life.modules.baselineRelease.model.BaselineRelease; import com.zt.life.modules.baselineRelease.model.BaselineReleaseRemark; import com.zt.life.modules.project.model.Project; import com.zt.life.modules.sysBaseInfo.model.TestAgencyInfo; import com.zt.life.modules.testReviewComment.model.TestReviewComment; import com.zt.modules.workflow.dto.FlowInfoDto; import io.swagger.annotations.ApiModelProperty; @@ -22,5 +23,4 @@ private TestReviewComment reviewComment; @ApiModelProperty(value = "测试项目基本信息") private Project project; } modules/mainPart/src/main/java/com/zt/life/modules/testReviewComment/model/TestReviewComment.java
@@ -28,9 +28,6 @@ @ApiModelProperty(value = "页面标识") private String pageCode; @ApiModelProperty(value = "测试评审编号") private String code; @ApiModelProperty(value = "评审日期") @JsonFormat(pattern = "yyyy-MM-dd") private Date reviewDate; modules/mainPart/src/main/java/com/zt/life/modules/testReviewComment/service/TestReviewCommentService.java
@@ -9,6 +9,7 @@ import com.zt.life.modules.baselineRelease.model.BaselineReleaseRemark; import com.zt.life.modules.baselineRelease.service.BaselineReleaseRemarkService; import com.zt.life.modules.project.service.ProjectService; import com.zt.life.modules.sysBaseInfo.service.TestAgencyInfoService; import com.zt.life.modules.testReviewComment.dao.TestReviewCommentDao; import com.zt.life.modules.testReviewComment.dto.ReviewCommentDto; import com.zt.life.modules.testReviewComment.model.TestReviewComment; @@ -50,6 +51,9 @@ @Autowired private WordFileService wordFileService; @Autowired private TestAgencyInfoService testAgencyInfoService; /** * 分页查询 * @@ -76,7 +80,6 @@ public ReviewCommentDto getDto(Long commentId, Long projectId, String pageCode) { ReviewCommentDto data = new ReviewCommentDto(); data.setPageCode(pageCode); if (commentId != null) { data.setId(commentId); TestReviewComment reviewComment = this.get(commentId); @@ -86,7 +89,6 @@ } } else { TestReviewComment reviewComment = new TestReviewComment(); reviewComment.setPageCode(pageCode); data.setReviewComment(reviewComment); } if (projectId != null) { @@ -95,17 +97,13 @@ } return data; } public Long save(ReviewCommentDto reviewCommentDto) { Long commentId = reviewCommentDto.getReviewComment().getId(); if (commentId != null) baseDao.updateById(reviewCommentDto.getReviewComment()); else { Map<String, String> map = new HashMap<>(); String pagecode = reviewCommentDto.getPageCode(); map.put("funCode", "test_review_comment_" + pagecode); map.put("projectId", reviewCommentDto.getProjectId().toString()); reviewCommentDto.getReviewComment().setProjectId(reviewCommentDto.getProjectId()); reviewCommentDto.getReviewComment().setCode(sysCodeRuleService.getNewCode(map)); baseDao.insert(reviewCommentDto.getReviewComment()); commentId = reviewCommentDto.getReviewComment().getId(); } modules/mainPart/src/main/resources/mapper/configAuditReport/ConfigAuditReportContentDao.xml
@@ -8,13 +8,26 @@ from config_audit_report_content a <where> a.is_delete = 0 <if test="whereSql!=null"> and ${whereSql} <if test="reportId!=null"> and a.report_id = ${reportId} </if> </where> <if test="orderBySql!=null"> ORDER BY ${orderBySql} </if> </select> <select id="dictList" resultType="java.util.List"> SET @row_number = 0; SELECT dd.dict_label AS audit_content, (@row_number := @row_number + 1) AS no, FROM sys_dict_type dt JOIN sys_dict_data dd ON dt.ID = dd.DICT_TYPE_ID <where> dd.IS_DELETE = 0 <if test="dictType != null and dictType != ''"> and dt.DICT_TYPE = #{dictType} </if> </where> ORDER BY dd.sort </select> </mapper> modules/mainPart/src/main/resources/mapper/configAuditReport/ConfigAuditReportProblemDao.xml
@@ -8,8 +8,8 @@ from config_audit_report_problem a <where> a.is_delete = 0 <if test="whereSql!=null"> and ${whereSql} <if test="reportId!=null"> and a.report_id = ${reportId} </if> </where> <if test="orderBySql!=null"> web/dist.zipBinary files differ
web/src/views/modules/configAuditReport/ConfigAuditReport-AddOrUpdate.vue
@@ -1,29 +1,26 @@ <template> <zt-dialog ref="dialog" @confirm="formSubmit"> <el-form :model="dataForm" ref="dataForm" :disabled="dataForm.disabled" label-width="120px"> <zt-form-item label="项目ID" prop="projectId" rules="required"> <el-input v-model="dataForm.projectId"></el-input> </zt-form-item> <zt-form-item label="编号" prop="code" rules="required"> <el-input v-model="dataForm.code"></el-input> </zt-form-item> <zt-form-item label="审核人" prop="auditor" rules="required"> <el-input v-model="dataForm.auditor"></el-input> </zt-form-item> <zt-form-item label="审核人ID" prop="auditorId" rules="required"> <el-input v-model="dataForm.auditorId"></el-input> </zt-form-item> <zt-form-item label="审核时间" prop="auditorDate" rules="required"> <el-input v-model="dataForm.auditorDate"></el-input> </zt-form-item> <zt-form-item label="年份" prop="year" rules="required"> <el-input v-model="dataForm.year"></el-input> </zt-form-item> </el-form> <template v-slot:footer> <el-button v-if="dataForm.disabled" type="primary" @click="print()">打印</el-button> </template> </zt-dialog> </template> <script> import qs from "qs"; import Cookies from "js-cookie"; export default { data() { return { @@ -32,24 +29,56 @@ configAuditReport:{ code: '', auditor: '', auditorId: '', auditorDate: '', }, project: { softwareIdentity: '', softwareName: '' } }, problemList:[], contentList:[] } } }, methods: { indexFormat(index) { return index += 1 }, init(id, row) { if (id) { this.dataForm.id = id } else { this.dataForm.id = row.id } if (row.projectId) { this.dataForm.projectId = row.projectId } this.getInfo() console.log(this.dataForm.id, this.dataForm.projectId, 'params params') }, // 获取信息 async getInfo() { let res = await this.$http.get(`/configAuditReport/ConfigAuditReport/${this.dataForm.id}`) let params = { reportId: this.dataForm.id, projectId: this.dataForm.projectId } let res = await this.$http.get(`/configAuditReport/ConfigAuditReport/getDto`, {params: params}) this.dataForm = { ...this.dataForm, ...res.data } if(this.dataForm.configAuditReport === null){ this.dataForm.contractReview={} } console.log(this.dataForm, "getInfo this.dataForm") }, async print(){ var params = qs.stringify({ token: Cookies.get('token'), id:this.dataForm.id }) let apiURL = `/configAuditReport/ConfigAuditReport/exportReport` window.location.href = `${window.SITE_CONFIG['apiURL']}${apiURL}?${params}` }, // 表单提交 async formSubmit() { web/src/views/modules/configAuditReport/ConfigAuditReport.vue
@@ -31,6 +31,7 @@ @refreshDataList="table.query" @setProjectInfo="openAddWin"> </ProjectSelect> <Preview ref="view" :pageMarkerfun="ConfigAuditReport"></Preview> </zt-table-wraper> </div> </el-card> @@ -42,6 +43,7 @@ export default { data() { return { ConfigAuditReport:'ConfigAuditReport', dataForm: { code: '', softwareIdentity: '', @@ -51,7 +53,8 @@ }, components: { AddOrUpdate, ProjectSelect ProjectSelect, Preview }, methods:{ add() { @@ -62,6 +65,9 @@ // this.$refs.addOrUpdate.$refs.dialog.init(null, {id: null, projectId: row.id}) this.$refs.addOrUpdate.$refs.dialog.init(null, {id: null, projectId: row.id}) }, preview(row){ this.$refs.view.openAccessoryFormatSingle(row) } } } </script> web/src/views/modules/testReviewComment/TestReviewComment-AddOrUpdate.vue
@@ -1,20 +1,18 @@ <template> <zt-dialog ref="dialog" @confirm="formSubmit"> <el-form :model="dataForm" ref="dataForm" :disabled="dataForm.disabled" label-width="120px"> <zt-form-item label="项目ID" prop="projectId" rules="required"> <el-input v-model="dataForm.projectId"></el-input> </zt-form-item> <zt-form-item label="页面标识" prop="pageCode" rules="required"> <el-input v-model="dataForm.pageCode"></el-input> </zt-form-item> <zt-form-item label="测试评审编号" prop="code" rules="required"> <el-input v-model="dataForm.code"></el-input> <zt-form-item label="软件名称" prop="reviewDate" rules="required"> <el-input v-model="dataForm.project.softwareName"></el-input> </zt-form-item> <zt-form-item label="评审日期" prop="reviewDate" rules="required"> <el-input v-model="dataForm.reviewDate"></el-input> <el-date-picker v-model="dataForm.reviewComment.reviewDate" type="date" placeholder="请选择评审日期"> </el-date-picker> </zt-form-item> <zt-form-item label="评审人数" prop="reviewerNum" rules="required"> <el-input v-model="dataForm.reviewerNum"></el-input> <el-input v-model="dataForm.reviewComment.reviewerNum"></el-input> </zt-form-item> </el-form> <template v-slot:footer> @@ -31,17 +29,12 @@ data() { return { pageCode: '', subtitle: '', pageName: { plan: '测试计划', explain: '测试就绪', record: '测试总结' }, dataForm: { id: '', project: { softwareName: '', }, reviewComment: { code: '', reviewDate: '', reviewerNum: '' },