| | |
| | | * @return |
| | | */ |
| | | public List<ConfigItemChange> page(QueryFilter queryFilter) { |
| | | return baseDao.getList(queryFilter.getQueryParams()); |
| | | List<ConfigItemChange> list= baseDao.getList(queryFilter.getQueryParams()); |
| | | workflowService.getRunFlow(list,"pzxbg"); |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | |
| | | @ApiModelProperty(value = "项目ID") |
| | | private Long projectId; |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "配置项入库编号") |
| | | private String code; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | public List<ConfigItemWarehouse> page(QueryFilter queryFilter) { |
| | | return baseDao.getList(queryFilter.getQueryParams()); |
| | | List<ConfigItemWarehouse> list= baseDao.getList(queryFilter.getQueryParams()); |
| | | workflowService.getRunFlow(list,"pzxrk"); |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | |
| | | import com.zt.common.service.BaseService; |
| | | import com.zt.life.export.dto.WordFile; |
| | | import com.zt.life.export.service.WordFileService; |
| | | import com.zt.life.modules.configItemWarehouse.model.ConfigItemWarehouse; |
| | | import com.zt.life.modules.itemCirculatOrder.dao.ItemCirculatOrderDao; |
| | | import com.zt.life.modules.itemCirculatOrder.dto.ItemCirculatOrderDto; |
| | | import com.zt.life.modules.itemCirculatOrder.model.ItemCirculatOrder; |
| | |
| | | * @return |
| | | */ |
| | | public List<ItemCirculatOrder> page(QueryFilter queryFilter) { |
| | | return baseDao.getList(queryFilter.getQueryParams()); |
| | | List<ItemCirculatOrder> list= baseDao.getList(queryFilter.getQueryParams()); |
| | | workflowService.getRunFlow(list,"pzxrk"); |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | |
| | | return Result.ok(); |
| | | } |
| | | |
| | | /*@GetMapping("exportCheckOrder") |
| | | @GetMapping("exportCheckOrder") |
| | | @ApiOperation("打印测试环境建立确认表") |
| | | @LogOperation("打印测试环境建立确认表") |
| | | public void exportEnviron(Long id, HttpServletRequest request, HttpServletResponse response) { |
| | | environService.exportEnviron(id, request, response); |
| | | }*/ |
| | | public void exportCheckOrder(Long id, String pageCode, HttpServletRequest request, HttpServletResponse response) { |
| | | testCheckOrderService.exportCheckOrder(id,pageCode, request, response); |
| | | } |
| | | } |
| | |
| | | package com.zt.life.modules.testCheckOrder.service; |
| | | |
| | | import cn.hutool.core.convert.Convert; |
| | | import com.zt.common.service.BaseService; |
| | | import com.zt.life.export.dto.WordFile; |
| | | import com.zt.life.export.service.WordFileService; |
| | | import com.zt.life.modules.configItemWarehouse.dto.ConfigItemWarehouseDto; |
| | | import com.zt.life.modules.configItemWarehouse.model.WarehouseCmAudit; |
| | | import com.zt.life.modules.configItemWarehouse.model.WarehouseConfigItem; |
| | |
| | | import com.zt.life.modules.itemCirculatOrder.dto.ItemCirculatOrderDto; |
| | | import com.zt.life.modules.itemCirculatOrder.model.ItemCirculatOrder; |
| | | import com.zt.life.modules.itemCirculatOrder.model.ItemCirculatOrderTechnical; |
| | | 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.service.ProjectService; |
| | | import com.zt.life.modules.testCheckOrder.dao.TestCheckOrderDao; |
| | |
| | | import com.zt.common.db.query.QueryFilter; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.FileNotFoundException; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | |
| | | private ProjectService projectService; |
| | | |
| | | @Autowired |
| | | private GetShowDictList getShowDictList; |
| | | |
| | | @Autowired |
| | | private SysCodeRuleService sysCodeRuleService; |
| | | |
| | | @Autowired |
| | | private WorkflowService workflowService; |
| | | |
| | | @Autowired |
| | | private GetFilesPath getFilesPath; |
| | | |
| | | @Autowired |
| | | private WordFileService wordFileService; |
| | | |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | public List<TestCheckOrder> page(QueryFilter queryFilter) { |
| | | return baseDao.getList(queryFilter.getQueryParams()); |
| | | List<TestCheckOrder> list = baseDao.getList(queryFilter.getQueryParams()); |
| | | workflowService.getRunFlow(list, "csjcd"); |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | return checkId; |
| | | } |
| | | |
| | | public void exportCheckOrder(Long id, String pageCode, HttpServletRequest request, HttpServletResponse response) { |
| | | try { |
| | | CheckOrderDto dataObj = this.getDto(id, null, pageCode); |
| | | |
| | | String processorPath = "文件图片:" + getFilesPath.getSignPath(Convert.toLong(dataObj.getCheckOrder().getProcessorId())); |
| | | dataObj.getCheckOrder().setProcessor(processorPath); |
| | | String verifierPath = "文件图片:" + getFilesPath.getSignPath(Convert.toLong(dataObj.getCheckOrder().getVerifierId())); |
| | | dataObj.getCheckOrder().setVerifier(verifierPath); |
| | | //通用字典列表字符串生成 |
| | | for (TestCheckOrderList checkOrderList : dataObj.getCheckOrderList()) { |
| | | String value = checkOrderList.getCheckResult(); |
| | | String checkResultStr = getShowDictList.getShowDictList(value, "tristate1", false); |
| | | checkOrderList.setCheckResult(checkResultStr); |
| | | } |
| | | |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("plan", "计划"); |
| | | map.put("report", "报告"); |
| | | map.put("record", "记录"); |
| | | map.put("explain", "说明"); |
| | | String type = map.get(pageCode); |
| | | dataObj.setPageCode(type); |
| | | WordFile wordFile = new WordFile(); |
| | | wordFile.setModulePath("软件测试检查单.docx"); |
| | | wordFile.setWordName(dataObj.getProject().getSoftwareName() + "_软件测试"+type+"检查单.docx"); |
| | | wordFileService.exportWordFile(request, dataObj, wordFile, response); |
| | | } catch (UnsupportedEncodingException e) { |
| | | e.printStackTrace(); |
| | | } catch (FileNotFoundException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | |
| | | <mapper namespace="com.zt.life.modules.configItemChange.dao.ConfigItemChangeDao"> |
| | | |
| | | <select id="getList" resultType="com.zt.life.modules.configItemChange.model.ConfigItemChange"> |
| | | select a.* ,p.*,p.CODE AS projectCode |
| | | select a.* ,p.software_name,p.CODE AS projectCode |
| | | from config_item_change a |
| | | INNER JOIN project p ON p.id = a.project_id |
| | | <where> |
| | |
| | | <mapper namespace="com.zt.life.modules.configItemWarehouse.dao.ConfigItemWarehouseDao"> |
| | | |
| | | <select id="getList" resultType="com.zt.life.modules.configItemWarehouse.model.ConfigItemWarehouse"> |
| | | select a.* ,p.*,p.CODE AS projectCode |
| | | select a.* ,p.software_name,p.CODE AS projectCode |
| | | from config_item_warehouse a |
| | | INNER JOIN project p ON p.id = a.project_id |
| | | <where> |
| | |
| | | <mapper namespace="com.zt.life.modules.itemCirculatOrder.dao.ItemCirculatOrderDao"> |
| | | |
| | | <select id="getList" resultType="com.zt.life.modules.itemCirculatOrder.model.ItemCirculatOrder"> |
| | | select a.*, p.* |
| | | select a.*, p.software_name,p.software_identity |
| | | from item_circulat_order a |
| | | INNER JOIN project p ON p.id = a.project_id |
| | | <where> |
| | |
| | | |
| | | <mapper namespace="com.zt.life.modules.project.dao.EnvironDao"> |
| | | <select id="getList" resultType="com.zt.life.modules.project.model.Environ"> |
| | | SELECT a.*, p.* |
| | | SELECT a.*, p.software_name,p.software_identity |
| | | FROM environ a |
| | | INNER JOIN project p ON p.id = a.project_id |
| | | <where> |
| | |
| | | <mapper namespace="com.zt.life.modules.project.dao.SoftwareTestOrderDao"> |
| | | |
| | | <select id="getList" resultType="com.zt.life.modules.project.model.SoftwareTestOrder"> |
| | | SELECT a.*, p.* |
| | | SELECT a.*, p.software_name,p.software_identity |
| | | FROM software_test_order a |
| | | INNER JOIN project p ON p.id = a.project_id |
| | | <where> |
| | |
| | | <el-button type="warning" @click="formSubmit('zc')">暂存</el-button> |
| | | <el-button type="warning" @click="formSubmit('bl')">办理</el-button> |
| | | </template> |
| | | <el-button type="primary" @click="formSubmit('qd')" v-preventReClick v-else-if="editAble && hasConfirm">{{ |
| | | <el-button v-else-if="editAble && hasConfirm" type="primary" @click="formSubmit('qd')" v-preventReClick>{{ |
| | | $t('confirm') }} |
| | | </el-button> |
| | | <el-button type="warning" @click="formSubmit('bc')" v-else-if="editAble">保存 |
| | | <el-button v-else-if="editAble" type="warning" @click="formSubmit('bc')">保存 |
| | | </el-button> |
| | | |
| | | <el-button @click="visible = false" v-if="editAble||stepMarker">{{ $t('cancel') }}</el-button> |
| | | <el-button type="info" @click="visible = false" v-if="editAble||stepMarker">{{ $t('cancel') }}</el-button> |
| | | <el-button type="info" @click="close()" v-else>{{ $t('close') }}</el-button> |
| | | </template> |
| | | <slot name="footer"></slot> |
| | |
| | | }, |
| | | editAble: { |
| | | type: Boolean, |
| | | default: true |
| | | default: false |
| | | }, |
| | | hasSubmit: { |
| | | type: Boolean, |
| | |
| | | return { |
| | | dataFormBack: null, |
| | | visible: false, |
| | | isView:true, |
| | | isView: false, |
| | | //editAble: true // 是否可编辑 |
| | | } |
| | | }, |
| | |
| | | }, |
| | | methods: { |
| | | init(id, row, isView) { |
| | | this.isView = isView |
| | | this.$nextTick(() => { |
| | | // 清空表单校验 |
| | | console.log(this.$parent.$refs.dataForm, id, row, isView, 'this.$parent.$refs.dataForm') |
| | |
| | | this.$parent.$refs.dataForm.resetFields() |
| | | } |
| | | |
| | | // this.editAble = isView !== true // 是否可编辑 |
| | | this.editAble = isView !== true // 是否可编辑 |
| | | |
| | | // 设置dialog父页面初始化表单 |
| | | this.$parent.dataForm = cloneDeep(this.dataFormBack) |
| | | if (this.$parent.dataForm) { |
| | | this.$parent.dataForm.id = id |
| | |
| | | return typeof this.hasView === 'boolean' ? this.hasView : this.hasView(row) |
| | | }, |
| | | isCanEidt(row) { |
| | | if(row.flowInfo && row.flowInfo.bizId){ |
| | | return false |
| | | }else { |
| | | return typeof this.hasEdit === 'boolean' ? this.hasEdit : this.hasEdit(row) |
| | | } |
| | | }, |
| | | isCanDelete(row) { |
| | | if(row.flowInfo && row.flowInfo.bizId){ |
| | | return false |
| | | }else { |
| | | return typeof this.hasDelete === 'boolean' ? this.hasDelete : this.hasDelete(row) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | |
| | |
| | | }, |
| | | check(row) { |
| | | console.log(row, "task row"); |
| | | let row2 = cloneDeep(row) |
| | | row2.stepMarker = null |
| | | if (row.flowCode === 'wplz') { |
| | | this.$nextTick(()=>{ |
| | | this.$refs.itemCirculatOrder.$refs.dialog.init(row2.bizId,row2) |
| | | this.$refs.itemCirculatOrder.$refs.dialog.init(row.bizId,row, true) |
| | | }) |
| | | } else if (row.flowCode === 'pzxrk') { |
| | | this.$nextTick(()=>{ |
| | | this.$refs.configItemWarehouse.$refs.dialog.init(row2.bizId,row2) |
| | | this.$refs.configItemWarehouse.$refs.dialog.init(row.bizId,row, true) |
| | | }) |
| | | } else if (row.flowCode === 'csjcd') { |
| | | this.$nextTick(()=>{ |
| | | this.$refs.testCheckOrder.$refs.dialog.init(row2.bizId,row2) |
| | | this.$refs.testCheckOrder.$refs.dialog.init(row.bizId,row, true) |
| | | }) |
| | | } |
| | | else { |
| | |
| | | <template v-slot:footer> |
| | | <el-button v-if="dataForm.disabled" type="primary" @click="print()">打印</el-button> |
| | | </template> |
| | | <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 { |
| | |
| | | } |
| | | console.log(this.dataForm,'this.dataForm this.dataForm') |
| | | }, |
| | | async print(){ |
| | | var params = qs.stringify({ |
| | | token: Cookies.get('token'), |
| | | id:this.dataForm.id, |
| | | pageCode: this.pageCode |
| | | }) |
| | | let apiURL = `/testCheckOrder/TestCheckOrder/exportCheckOrder` |
| | | window.location.href = `${window.SITE_CONFIG['apiURL']}${apiURL}?${params}` |
| | | }, |
| | | // 表单提交 |
| | | async formSubmit(submitType) { |
| | | let isFlow = false |
| | |
| | | @ApiModelProperty("附件") |
| | | @TableField(exist = false) |
| | | private Map<String,String> accessoryMap; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "项目名称") |
| | | private FlowInfo flowInfo; |
| | | } |
New file |
| | |
| | | /** |
| | | * Copyright (c) 2021 All rights reserved. |
| | | * |
| | | * 版权所有,侵权必究! |
| | | */ |
| | | |
| | | package com.zt.common.entity; |
| | | |
| | | import com.alibaba.fastjson.annotation.JSONField; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.zt.common.entity.BusiEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel(value = "工作流任务WF_RUN_TASK") |
| | | @EqualsAndHashCode(callSuper=false) |
| | | public class FlowInfo { |
| | | @ApiModelProperty(value = "") |
| | | private Long bizId; |
| | | @ApiModelProperty(value = "") |
| | | private String stepMarker; |
| | | } |
| | |
| | | package com.zt.modules.workflow.dao; |
| | | |
| | | import com.zt.common.dao.BaseDao; |
| | | import com.zt.common.entity.FlowInfo; |
| | | import com.zt.core.sys.model.SysUser; |
| | | import com.zt.modules.workflow.model.WfRunInstance; |
| | | import com.zt.modules.workflow.model.WfRunTask; |
| | | import com.zt.modules.workflow.dto.BizInfoDto; |
| | | import com.zt.modules.workflowconfig.model.WfDefStep; |
| | |
| | | void setTaskPartFinish3(Long bizId, Long receiveDeptId, Integer status); |
| | | |
| | | void deleteFlowStep(@Param("wfIdCode") String wfIdCode, @Param("stepIdMark") String stepIdMark, @Param("bizId") Long bizId); |
| | | |
| | | List<FlowInfo> getRunFlow(Map<String, Object> params); |
| | | } |
| | |
| | | package com.zt.modules.workflow.service; |
| | | |
| | | import cn.hutool.core.convert.Convert; |
| | | import com.zt.common.entity.BaseEntity; |
| | | import com.zt.common.entity.BusiEntity; |
| | | import com.zt.common.entity.FlowInfo; |
| | | import com.zt.common.service.BaseService; |
| | | import com.zt.common.utils.UUIDUtil; |
| | | import com.zt.core.context.UserContext; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 工作流服务 |
| | |
| | | public void deleteFlowStep(String wfIdCode, String stepIdMark, Long bizId){ |
| | | baseDao.deleteFlowStep(wfIdCode,stepIdMark,bizId); |
| | | } |
| | | |
| | | public void getRunFlow(List<? extends BusiEntity> dataList, String flowCode) { |
| | | List<Long> ids = dataList.stream().map(f -> f.getId()).collect(Collectors.toList()); |
| | | Map<String, Object> params = new HashMap<String, Object>(); |
| | | params.put("bizIds", ids); |
| | | params.put("flowCode", flowCode); |
| | | List<FlowInfo> list = baseDao.getRunFlow(params); |
| | | for (BaseEntity item : dataList) { |
| | | List<FlowInfo> list2 = list.stream().filter(item2->item2.getBizId().equals(item.getId())).collect(Collectors.toList()); |
| | | if (list2.size()>0) { |
| | | item.setFlowInfo(list2.get(0)); |
| | | }else{ |
| | | item.setFlowInfo(new FlowInfo()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | AND `STATUS` = 0 |
| | | LIMIT 0,1 |
| | | </select> |
| | | <select id="getRunFlow" resultType="com.zt.common.entity.FlowInfo"> |
| | | select * from ( |
| | | select distinct(a.biz_id) biz_id, a.STEP_MARKER,b.STEP_NO |
| | | from wf_run_task a |
| | | ,wf_def_step b |
| | | where a.STEP_ID = b.id and a.FLOW_CODE ='${flowCode}' |
| | | <if test="bizIds != null"> |
| | | and a.BIZ_ID in |
| | | <foreach item="item" collection="bizIds" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | order by STEP_NO desc |
| | | ) c |
| | | group by biz_id |
| | | </select> |
| | | |
| | | <update id="updateConnect"> |
| | | update `wf_run_task` |