1个文件已删除
11个文件已修改
8 文件已重命名
1个文件已添加
| | |
| | | |
| | | return Result.ok(data); |
| | | } |
| | | @GetMapping("getTaskList") |
| | | public Result<List<Task>> getTaskList(Long productId){ |
| | | |
| | | return Result.ok(taskService.getTaskList(productId)); |
| | | } |
| | | |
| | | @PostMapping |
| | | @ApiOperation("新增") |
| | |
| | | |
| | | List<Task> getList(Map<String, Object> params); |
| | | |
| | | List<Task> getTaskList(Long productId); |
| | | } |
| | |
| | | package com.zt.life.modules.mainPart.taskReliability.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.zt.common.entity.BusiEntity; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | private Integer status; |
| | | @TableField(exist = false) |
| | | private String name; |
| | | |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.zt.common.entity.BusiEntity; |
| | | import com.zt.common.entity.TreeNode; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * task_phase_model |
| | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper=false) |
| | | @TableName("task_phase_model") |
| | | public class TaskPhaseModel extends BusiEntity { |
| | | public class TaskPhaseModel extends BusiEntity implements TreeNode<TaskPhaseModel> { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "阶段ID") |
| | |
| | | |
| | | @TableField(exist = false) |
| | | private String modelName; |
| | | |
| | | @ApiModelProperty(value = "子节点") |
| | | @TableField(exist = false) |
| | | private List<TaskPhaseModel> children = new ArrayList<>(); |
| | | |
| | | @TableField(exist = false) |
| | | private Long pid; |
| | | } |
| | |
| | | package com.zt.life.modules.mainPart.taskReliability.service; |
| | | |
| | | import com.zt.common.service.BaseService; |
| | | import com.zt.common.utils.TreeUtils; |
| | | import com.zt.life.modules.mainPart.taskReliability.dao.TaskPhaseModelDao; |
| | | import com.zt.life.modules.mainPart.taskReliability.model.TaskPhaseModel; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | * @return |
| | | */ |
| | | public List<TaskPhaseModel> page(QueryFilter queryFilter) { |
| | | return baseDao.getList(queryFilter.getQueryParams()); |
| | | List<TaskPhaseModel> list = baseDao.getList(queryFilter.getQueryParams()); |
| | | return TreeUtils.build(list); |
| | | } |
| | | |
| | | /** |
| | |
| | | super.deleteLogic(ids); |
| | | } |
| | | |
| | | public List<Task> getTaskList(Long productId) { |
| | | return baseDao.getTaskList(productId); |
| | | } |
| | | } |
File was renamed from modules/mainPart/src/main/resources/mapper/basicInfo/taskReliability/TaskDao.xml |
| | |
| | | ORDER BY ${orderBySql} |
| | | </if> |
| | | </select> |
| | | <select id="getTaskList" resultType="com.zt.life.modules.mainPart.taskReliability.model.Task"> |
| | | select a.id,a.task_name as name |
| | | from task a |
| | | where |
| | | a.is_delete = 0 |
| | | and a.product_id=${productId} |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.zt.life.modules.mainPart.taskReliability.dao.TaskPhaseModelDao"> |
| | | |
| | | <select id="getList" resultType="com.zt.life.modules.mainPart.taskReliability.model.TaskPhaseModel"> |
| | | SELECT a.id AS id, |
| | | a.pid , |
| | | a.`NAME` as `system`, |
| | | c.model_name, |
| | | b.model_id, |
| | | b.id as productId |
| | | FROM product_model a |
| | | LEFT JOIN task_phase_model b |
| | | ON b.product_id = a.id |
| | | AND b.phase_id = ${phaseId} |
| | | LEFT JOIN model_rbd c ON c.id = b.model_id |
| | | WHERE a.id in ( |
| | | SELECT DATA.id |
| | | FROM ( |
| | | SELECT @ids as ids, |
| | | (SELECT @ids := GROUP_CONCAT(id) |
| | | FROM product_model |
| | | WHERE FIND_IN_SET(pid, @ids) |
| | | ) as cids |
| | | FROM product_model |
| | | WHERE @ids IS NOT NULL AND @ids := ${productId} |
| | | ) id, |
| | | product_model DATA |
| | | WHERE FIND_IN_SET(DATA.id, ID.ids) |
| | | ) |
| | | and a.product_type in (4, 3, 2, 10) |
| | | AND a.is_delete = 0 |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | datasource: |
| | | druid: |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | #url: jdbc:mysql://127.0.0.1:3306/csiczb?allowMultiQueries=true&hive.exec.orc.split.strategy=ETL&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8 |
| | | #url: jdbc:mysql://127.0.0.1:3306/test_project?allowMultiQueries=true&hive.exec.orc.split.strategy=ETL&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8 |
| | | url: jdbc:mysql://192.168.31.26:3366/reliability_simulat?allowMultiQueries=true&hive.exec.orc.split.strategy=ETL&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8 |
| | | # url: jdbc:mysql://127.0.0.1:3366/reliability_simulat?allowMultiQueries=true&hive.exec.orc.split.strategy=ETL&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8 |
| | | #url: jdbc:mysql://127.0.0.1:3306/zhpt_djxl?serverTimezone=GMT&allowMultiQueries=true&hive.exec.orc.split.strategy=ETL&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8 |
| | | username: root |
| | | password: root |
| | | #password: 123456 |
| | |
| | | this.dataForm.productType = params.type |
| | | } |
| | | }, |
| | | // 获取系统列表 |
| | | async getProductList() { |
| | | let res = await this.$http.get('/basicInfo/XhProductModel/getProductList') |
| | | this.productList = res.data |
| | | console.log(this.productList, 'getProductList') |
| | | }, |
| | | selectPicture() { |
| | | this.$refs.pictureSelect.$refs.dialog.init() |
| | | }, |
| | |
| | | components: {}, |
| | | methods: { |
| | | init(param) { |
| | | this.dataForm.productId = param.row.productId |
| | | console.log(param) |
| | | this.dataForm.productId = param.row.id |
| | | this.dataForm.phaseId = param.phaseId |
| | | this.dataForm.id = param.row.id |
| | | this.dataForm.id = param.row.productId |
| | | }, |
| | | async selectModel(row) { |
| | | console.log(this.dataForm) |
| | |
| | | <task @onTaskSelected="onTaskSelected"/> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-col :span="11"> |
| | | <div class="mod-taskReliability-taskPhase}"> |
| | | <zt-table-wraper ref="tableObj" defaultNotQuery="true" query-url="/taskReliability/TaskPhase/page" |
| | | delete-url="/taskReliability/TaskPhase/" |
| | |
| | | </zt-table-wraper> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-col :span="7"> |
| | | <div class="fa-card-a"> |
| | | <task-phase-model ref="model"/> |
| | | </div> |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" |
| | | v-adaptive="{bottomOffset:70}" border @selection-change="table.selectionChangeHandle"> |
| | | <el-table-column prop="system" label="系统"/> |
| | | v-adaptive="{bottomOffset:70}" border @selection-change="table.selectionChangeHandle" |
| | | row-key="id" |
| | | :cell-style="cellStyle" |
| | | :tree-props="{children: 'children', hasChildren: 'hasChildren'}" |
| | | :default-expand-all="true"> |
| | | <el-table-column prop="system" label="系统" width="160"/> |
| | | <el-table-column prop="modelName" label="系统模型"/> |
| | | <zt-table-column-handle :table="table" edit-perm="taskReliability:update" |
| | | delete-perm="taskReliability::delete" :has-view="false"> |
| | |
| | | this.dataForm.productId = param.productId |
| | | this.$refs.tableObj.query() |
| | | }, |
| | | cellStyle({column}) { |
| | | if (column.label === '系统') { |
| | | return 'text-align: left !important;' |
| | | } |
| | | }, |
| | | selectModel(row) { |
| | | console.log(row, 'selectModel'); |
| | | let param = { |