| | |
| | | return Result.ok(list); |
| | | } |
| | | |
| | | @GetMapping("getTaskProductList") |
| | | public Result<List<XhProductModel>> getTaskProductList() { |
| | | List<XhProductModel> list = xhProductModelService.getTaskProductList(); |
| | | return Result.ok(list); |
| | | } |
| | | |
| | | @PostMapping |
| | | @ApiOperation("新增") |
| | | @LogOperation("新增") |
| | |
| | | List<XhProductModel> getProductList(); |
| | | |
| | | List<ProductImg> getProduct(Long productId); |
| | | |
| | | List<XhProductModel> getTaskProductList(); |
| | | } |
| | |
| | | public List<ProductImg> getProduct(Long productId) { |
| | | return baseDao.getProduct(productId); |
| | | } |
| | | |
| | | public List<XhProductModel> getTaskProductList() { |
| | | return baseDao.getTaskProductList(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.taskReliability.controller; |
| | | |
| | | |
| | | import com.zt.common.annotation.LogOperation; |
| | | import com.zt.common.constant.Constant; |
| | | import com.zt.common.annotation.QueryParam; |
| | | import com.zt.common.db.query.QueryFilter; |
| | | import com.zt.common.servlet.Result; |
| | | import com.zt.common.servlet.PageResult; |
| | | import com.zt.common.validator.AssertUtils; |
| | | import com.zt.common.validator.ValidatorUtils; |
| | | import com.zt.common.validator.group.AddGroup; |
| | | import com.zt.common.validator.group.DefaultGroup; |
| | | import com.zt.common.validator.group.UpdateGroup; |
| | | import com.zt.life.modules.taskReliability.model.Task; |
| | | import com.zt.life.modules.taskReliability.service.TaskService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * task |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2024-03-15 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/taskReliability/Task/") |
| | | @Api(tags="task") |
| | | public class TaskController { |
| | | @Autowired |
| | | private TaskService taskService; |
| | | |
| | | @GetMapping("page") |
| | | @ApiOperation("分页") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = Constant.Q.ORDER_FIELD, value = Constant.QV.ORDER_FIELD, dataType = Constant.QT.STRING), |
| | | @ApiImplicitParam(name = Constant.Q.ORDER, value = Constant.QV.ORDER, dataType = Constant.QT.STRING), |
| | | @ApiImplicitParam(name = "productId", value = "产品节点", dataType = Constant.QT.STRING), |
| | | }) |
| | | public Result<List<Task>> page(@ApiIgnore @QueryParam QueryFilter queryFilter){ |
| | | |
| | | return Result.ok(taskService.page(queryFilter)); |
| | | } |
| | | |
| | | @GetMapping("{id}") |
| | | @ApiOperation("信息") |
| | | public Result<Task> get(@PathVariable("id") Long id){ |
| | | Task data = taskService.get(id); |
| | | |
| | | return Result.ok(data); |
| | | } |
| | | |
| | | @PostMapping |
| | | @ApiOperation("新增") |
| | | @LogOperation("新增") |
| | | public Result insert(@RequestBody Task task){ |
| | | //效验数据 |
| | | ValidatorUtils.validateEntity(task, AddGroup.class, DefaultGroup.class); |
| | | taskService.insert(task); |
| | | |
| | | return Result.ok(); |
| | | } |
| | | |
| | | @PutMapping |
| | | @ApiOperation("修改") |
| | | @LogOperation("修改") |
| | | public Result update(@RequestBody Task task){ |
| | | //效验数据 |
| | | ValidatorUtils.validateEntity(task, UpdateGroup.class, DefaultGroup.class); |
| | | taskService.update(task); |
| | | |
| | | return Result.ok(); |
| | | } |
| | | |
| | | @DeleteMapping |
| | | @ApiOperation("删除") |
| | | @LogOperation("删除") |
| | | public Result delete(@RequestBody Long[] ids){ |
| | | //效验数据 |
| | | AssertUtils.isArrayEmpty(ids, "id"); |
| | | taskService.delete(ids); |
| | | |
| | | return Result.ok(); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.taskReliability.controller; |
| | | |
| | | |
| | | import com.zt.common.annotation.LogOperation; |
| | | import com.zt.common.constant.Constant; |
| | | import com.zt.common.annotation.QueryParam; |
| | | import com.zt.common.db.query.QueryFilter; |
| | | import com.zt.common.servlet.Result; |
| | | import com.zt.common.servlet.PageResult; |
| | | import com.zt.common.validator.AssertUtils; |
| | | import com.zt.common.validator.ValidatorUtils; |
| | | import com.zt.common.validator.group.AddGroup; |
| | | import com.zt.common.validator.group.DefaultGroup; |
| | | import com.zt.common.validator.group.UpdateGroup; |
| | | import com.zt.life.modules.taskReliability.model.TaskPhase; |
| | | import com.zt.life.modules.taskReliability.service.TaskPhaseService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * task_phase |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2024-03-15 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/taskReliability/TaskPhase/") |
| | | @Api(tags="task_phase") |
| | | public class TaskPhaseController { |
| | | @Autowired |
| | | private TaskPhaseService taskPhaseService; |
| | | |
| | | @GetMapping("page") |
| | | @ApiOperation("分页") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = Constant.Q.ORDER_FIELD, value = Constant.QV.ORDER_FIELD, dataType = Constant.QT.STRING), |
| | | @ApiImplicitParam(name = Constant.Q.ORDER, value = Constant.QV.ORDER, dataType = Constant.QT.STRING), |
| | | @ApiImplicitParam(name = "taskId", value = "任务ID", dataType = Constant.QT.STRING), |
| | | }) |
| | | public Result<List<TaskPhase>> page(@ApiIgnore @QueryParam QueryFilter queryFilter){ |
| | | |
| | | return Result.ok(taskPhaseService.page(queryFilter)); |
| | | } |
| | | |
| | | @GetMapping("{id}") |
| | | @ApiOperation("信息") |
| | | public Result<TaskPhase> get(@PathVariable("id") Long id){ |
| | | TaskPhase data = taskPhaseService.get(id); |
| | | |
| | | return Result.ok(data); |
| | | } |
| | | |
| | | @PostMapping |
| | | @ApiOperation("新增") |
| | | @LogOperation("新增") |
| | | public Result insert(@RequestBody TaskPhase taskPhase){ |
| | | //效验数据 |
| | | ValidatorUtils.validateEntity(taskPhase, AddGroup.class, DefaultGroup.class); |
| | | taskPhaseService.insert(taskPhase); |
| | | |
| | | return Result.ok(); |
| | | } |
| | | |
| | | @PutMapping |
| | | @ApiOperation("修改") |
| | | @LogOperation("修改") |
| | | public Result update(@RequestBody TaskPhase taskPhase){ |
| | | //效验数据 |
| | | ValidatorUtils.validateEntity(taskPhase, UpdateGroup.class, DefaultGroup.class); |
| | | taskPhaseService.update(taskPhase); |
| | | |
| | | return Result.ok(); |
| | | } |
| | | |
| | | @DeleteMapping |
| | | @ApiOperation("删除") |
| | | @LogOperation("删除") |
| | | public Result delete(@RequestBody Long[] ids){ |
| | | //效验数据 |
| | | AssertUtils.isArrayEmpty(ids, "id"); |
| | | taskPhaseService.delete(ids); |
| | | |
| | | return Result.ok(); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.taskReliability.controller; |
| | | |
| | | |
| | | import com.zt.common.annotation.LogOperation; |
| | | import com.zt.common.constant.Constant; |
| | | import com.zt.common.annotation.QueryParam; |
| | | import com.zt.common.db.query.QueryFilter; |
| | | import com.zt.common.servlet.Result; |
| | | import com.zt.common.servlet.PageResult; |
| | | import com.zt.common.validator.AssertUtils; |
| | | import com.zt.common.validator.ValidatorUtils; |
| | | import com.zt.common.validator.group.AddGroup; |
| | | import com.zt.common.validator.group.DefaultGroup; |
| | | import com.zt.common.validator.group.UpdateGroup; |
| | | import com.zt.life.modules.taskReliability.model.TaskPhaseModel; |
| | | import com.zt.life.modules.taskReliability.service.TaskPhaseModelService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * task_phase_model |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2024-03-15 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/taskReliability/TaskPhaseModel/") |
| | | @Api(tags="task_phase_model") |
| | | public class TaskPhaseModelController { |
| | | @Autowired |
| | | private TaskPhaseModelService taskPhaseModelService; |
| | | |
| | | @GetMapping("page") |
| | | @ApiOperation("分页") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = Constant.Q.ORDER_FIELD, value = Constant.QV.ORDER_FIELD, dataType = Constant.QT.STRING), |
| | | @ApiImplicitParam(name = Constant.Q.ORDER, value = Constant.QV.ORDER, dataType = Constant.QT.STRING), |
| | | @ApiImplicitParam(name = "productId", value = "产品节点Id", dataType = Constant.QT.STRING), |
| | | @ApiImplicitParam(name = "phaseId", value = "阶段Id", dataType = Constant.QT.STRING), |
| | | }) |
| | | public Result<List<TaskPhaseModel>> page(@ApiIgnore @QueryParam QueryFilter queryFilter){ |
| | | |
| | | return Result.ok(taskPhaseModelService.page(queryFilter)); |
| | | } |
| | | |
| | | @GetMapping("{id}") |
| | | @ApiOperation("信息") |
| | | public Result<TaskPhaseModel> get(@PathVariable("id") Long id){ |
| | | TaskPhaseModel data = taskPhaseModelService.get(id); |
| | | |
| | | return Result.ok(data); |
| | | } |
| | | |
| | | @PostMapping |
| | | @ApiOperation("新增") |
| | | @LogOperation("新增") |
| | | public Result insert(@RequestBody TaskPhaseModel taskPhaseModel){ |
| | | //效验数据 |
| | | ValidatorUtils.validateEntity(taskPhaseModel, AddGroup.class, DefaultGroup.class); |
| | | taskPhaseModelService.insert(taskPhaseModel); |
| | | |
| | | return Result.ok(); |
| | | } |
| | | |
| | | @PutMapping |
| | | @ApiOperation("修改") |
| | | @LogOperation("修改") |
| | | public Result update(@RequestBody TaskPhaseModel taskPhaseModel){ |
| | | //效验数据 |
| | | ValidatorUtils.validateEntity(taskPhaseModel, UpdateGroup.class, DefaultGroup.class); |
| | | taskPhaseModelService.update(taskPhaseModel); |
| | | |
| | | return Result.ok(); |
| | | } |
| | | |
| | | @DeleteMapping |
| | | @ApiOperation("删除") |
| | | @LogOperation("删除") |
| | | public Result delete(@RequestBody Long[] ids){ |
| | | //效验数据 |
| | | AssertUtils.isArrayEmpty(ids, "id"); |
| | | taskPhaseModelService.delete(ids); |
| | | |
| | | return Result.ok(); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.taskReliability.dao; |
| | | |
| | | import com.zt.common.dao.BaseDao; |
| | | import com.zt.life.modules.taskReliability.model.Task; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | | * task |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2024-03-15 |
| | | */ |
| | | @Mapper |
| | | public interface TaskDao extends BaseDao<Task> { |
| | | |
| | | List<Task> getList(Map<String, Object> params); |
| | | |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.taskReliability.dao; |
| | | |
| | | import com.zt.common.dao.BaseDao; |
| | | import com.zt.life.modules.taskReliability.model.TaskPhase; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | | * task_phase |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2024-03-15 |
| | | */ |
| | | @Mapper |
| | | public interface TaskPhaseDao extends BaseDao<TaskPhase> { |
| | | |
| | | List<TaskPhase> getList(Map<String, Object> params); |
| | | |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.taskReliability.dao; |
| | | |
| | | import com.zt.common.dao.BaseDao; |
| | | import com.zt.life.modules.taskReliability.model.TaskPhaseModel; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | | * task_phase_model |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2024-03-15 |
| | | */ |
| | | @Mapper |
| | | public interface TaskPhaseModelDao extends BaseDao<TaskPhaseModel> { |
| | | |
| | | List<TaskPhaseModel> getList(Map<String, Object> params); |
| | | |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.taskReliability.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.zt.common.entity.BusiEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * task |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2024-03-15 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper=false) |
| | | @TableName("task") |
| | | public class Task extends BusiEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "产品节点ID") |
| | | private Long productId; |
| | | |
| | | @ApiModelProperty(value = "产品父节点节点ID") |
| | | private Long productPid; |
| | | |
| | | @ApiModelProperty(value = "任务名称") |
| | | private String taskName; |
| | | |
| | | @ApiModelProperty(value = "任务顺序") |
| | | private Integer taskSort; |
| | | |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | private Integer status; |
| | | |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.taskReliability.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.zt.common.entity.BusiEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * task_phase |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2024-03-15 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper=false) |
| | | @TableName("task_phase") |
| | | public class TaskPhase extends BusiEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "任务ID") |
| | | private Long taskId; |
| | | |
| | | @ApiModelProperty(value = "任务阶段名称") |
| | | private String phaseName; |
| | | |
| | | @ApiModelProperty(value = "阶段时长") |
| | | private Double phaseDuration; |
| | | |
| | | @ApiModelProperty(value = "阶段时速") |
| | | private Double phaseSpeed; |
| | | |
| | | @ApiModelProperty(value = "阶段顺序") |
| | | private Integer phaseSort; |
| | | |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | private Integer status; |
| | | |
| | | @TableField(exist = false) |
| | | private Long productId; |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.taskReliability.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.zt.common.entity.BusiEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * task_phase_model |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2024-03-15 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper=false) |
| | | @TableName("task_phase_model") |
| | | public class TaskPhaseModel extends BusiEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "阶段ID") |
| | | private Long phaseId; |
| | | |
| | | @ApiModelProperty(value = "产品节点ID") |
| | | private Long productId; |
| | | |
| | | @ApiModelProperty(value = "模型ID") |
| | | private Long modelId; |
| | | |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | private Integer status; |
| | | |
| | | @TableField(exist = false) |
| | | private String system; |
| | | |
| | | @TableField(exist = false) |
| | | private String modelName; |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.taskReliability.service; |
| | | |
| | | import com.zt.common.service.BaseService; |
| | | import com.zt.life.modules.taskReliability.dao.TaskPhaseModelDao; |
| | | import com.zt.life.modules.taskReliability.model.TaskPhaseModel; |
| | | import org.springframework.stereotype.Service; |
| | | import com.zt.common.db.query.QueryFilter; |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * task_phase_model |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2024-03-15 |
| | | */ |
| | | @Service |
| | | public class TaskPhaseModelService extends BaseService<TaskPhaseModelDao, TaskPhaseModel> { |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param queryFilter |
| | | * @return |
| | | */ |
| | | public List<TaskPhaseModel> page(QueryFilter queryFilter) { |
| | | return baseDao.getList(queryFilter.getQueryParams()); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param ids |
| | | */ |
| | | public void delete(Long[] ids) { |
| | | super.deleteLogic(ids); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.taskReliability.service; |
| | | |
| | | import com.zt.common.service.BaseService; |
| | | import com.zt.life.modules.taskReliability.dao.TaskPhaseDao; |
| | | import com.zt.life.modules.taskReliability.model.TaskPhase; |
| | | import org.springframework.stereotype.Service; |
| | | import com.zt.common.db.query.QueryFilter; |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * task_phase |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2024-03-15 |
| | | */ |
| | | @Service |
| | | public class TaskPhaseService extends BaseService<TaskPhaseDao, TaskPhase> { |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param queryFilter |
| | | * @return |
| | | */ |
| | | public List<TaskPhase> page(QueryFilter queryFilter) { |
| | | return baseDao.getList(queryFilter.getQueryParams()); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param ids |
| | | */ |
| | | public void delete(Long[] ids) { |
| | | super.deleteLogic(ids); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.taskReliability.service; |
| | | |
| | | import com.zt.common.service.BaseService; |
| | | import com.zt.life.modules.taskReliability.dao.TaskDao; |
| | | import com.zt.life.modules.taskReliability.model.Task; |
| | | import org.springframework.stereotype.Service; |
| | | import com.zt.common.db.query.QueryFilter; |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * task |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2024-03-15 |
| | | */ |
| | | @Service |
| | | public class TaskService extends BaseService<TaskDao, Task> { |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param queryFilter |
| | | * @return |
| | | */ |
| | | public List<Task> page(QueryFilter queryFilter) { |
| | | return baseDao.getList(queryFilter.getQueryParams()); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param ids |
| | | */ |
| | | public void delete(Long[] ids) { |
| | | super.deleteLogic(ids); |
| | | } |
| | | |
| | | } |
| | |
| | | AND a.PID = ${productId} |
| | | |
| | | </select> |
| | | <select id="getTaskProductList" resultType="com.zt.life.modules.mainPart.basicInfo.model.XhProductModel"> |
| | | select a.name, a.id |
| | | from product_model a |
| | | where a.is_delete = 0 |
| | | and a.product_type = 4 |
| | | </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.taskReliability.dao.TaskDao"> |
| | | |
| | | <select id="getList" resultType="com.zt.life.modules.taskReliability.model.Task"> |
| | | select a.* |
| | | from task a |
| | | <where> |
| | | a.is_delete = 0 |
| | | and a.product_id=${productId} |
| | | <if test="whereSql!=null"> |
| | | and ${whereSql} |
| | | </if> |
| | | </where> |
| | | <if test="orderBySql!=null"> |
| | | ORDER BY ${orderBySql} |
| | | </if> |
| | | </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.taskReliability.dao.TaskPhaseDao"> |
| | | |
| | | <select id="getList" resultType="com.zt.life.modules.taskReliability.model.TaskPhase"> |
| | | select a.* |
| | | from task_phase a |
| | | <where> |
| | | a.is_delete = 0 |
| | | and a.task_id=${taskId} |
| | | <if test="whereSql!=null"> |
| | | and ${whereSql} |
| | | </if> |
| | | </where> |
| | | <if test="orderBySql!=null"> |
| | | ORDER BY ${orderBySql} |
| | | </if> |
| | | </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.taskReliability.dao.TaskPhaseModelDao"> |
| | | |
| | | <select id="getList" resultType="com.zt.life.modules.taskReliability.model.TaskPhaseModel"> |
| | | SELECT a.id as productId, |
| | | a.`NAME` as `system`, |
| | | c.model_name, |
| | | b.model_id, |
| | | b.id |
| | | 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.pid = ${productId} |
| | | AND a.is_delete = 0 |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | </el-col> |
| | | <el-col :span="19"> |
| | | <div class="mod-basicInfo-paramData}"> |
| | | <zt-table-wraper ref="tableObj" defaultNotQuery="true" :query-url=queryUrl |
| | | :delete-url=deleteUrl |
| | | <zt-table-wraper ref="tableObj" defaultNotQuery="true" query-url="/basicInfo/ParamData/page" |
| | | delete-url="/basicInfo/ParamData" |
| | | @dataLoaded="dataLoaded" |
| | | v-slot="{ table }" |
| | | :paging='false'> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | queryUrl: '/basicInfo/ParamData/page', |
| | | deleteUrl: '/basicInfo/ParamData', |
| | | pageCode: '', |
| | | key: '', |
| | | typeS: '', |
| | |
| | | @selection-change="changeRow"> |
| | | <el-table-column type="selection" width="40" align="center"/> |
| | | <el-table-column prop="name" label="名称"/> |
| | | <zt-table-column-dict prop="nodeType" label="节点类型" dict="product"/> |
| | | </el-table> |
| | | </zt-table-wraper> |
| | | </div> |
New file |
| | |
| | | <template> |
| | | <zt-dialog ref="dialog" column="2" title="选择系统模型" append-to-body :editAble="false" :hasConfirm="false"> |
| | | <el-card shadow="never" class="aui-card--fill"> |
| | | <div class="mod-taskReliability-modelRbd}"> |
| | | <zt-table-wraper ref="tableObj" query-url="/taskReliability/ModelRbd/page" |
| | | :paging='false' |
| | | v-slot="{ table }"> |
| | | <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()"> |
| | | </el-form> |
| | | <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:30}" |
| | | border @row-dblclick="selectModel" |
| | | @selection-change="table.selectionChangeHandle"> |
| | | <el-table-column prop="modelName" label="模型名称"/> |
| | | </el-table> |
| | | <!-- 弹窗, 新增 / 修改 --> |
| | | </zt-table-wraper> |
| | | </div> |
| | | </el-card> |
| | | </zt-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | export default { |
| | | name: 'SelectModelRbd', |
| | | data() { |
| | | return { |
| | | dataForm: { |
| | | id: '', |
| | | modelName: '', |
| | | modelState: '', |
| | | productId: '', |
| | | phaseId: '', |
| | | modelId: '', |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | components: {}, |
| | | methods: { |
| | | init(param) { |
| | | this.dataForm.productId = param.row.productId |
| | | this.dataForm.phaseId = param.phaseId |
| | | this.dataForm.id = param.row.id |
| | | }, |
| | | async selectModel(row) { |
| | | console.log(this.dataForm) |
| | | this.dataForm.modelId = row.id |
| | | this.dataForm.productId = row.productId |
| | | let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/taskReliability/TaskPhaseModel/', this.dataForm) |
| | | if (res.success) { |
| | | await this.$tip.success() |
| | | this.$refs.dialog.close() |
| | | this.$emit('setModel') |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <zt-dialog ref="dialog" @confirm="formSubmit"> |
| | | <el-form :model="dataForm" ref="dataForm" :disabled="dataForm.disabled" label-width="120px"> |
| | | <zt-form-item label="任务名称" prop="taskName" rules="required"> |
| | | <el-input v-model="dataForm.taskName"></el-input> |
| | | </zt-form-item> |
| | | <zt-form-item label="任务顺序" prop="taskSort" rules="required"> |
| | | <el-input v-model="dataForm.taskSort"></el-input> |
| | | </zt-form-item> |
| | | </el-form> |
| | | </zt-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | dataForm: { |
| | | id: '', |
| | | productId: '', |
| | | productPid: '', |
| | | taskName: '', |
| | | taskSort: '', |
| | | remark: '', |
| | | status: '' |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | init(id,param){ |
| | | this.dataForm.productId =param.productId |
| | | }, |
| | | // 获取信息 |
| | | async getInfo() { |
| | | let res = await this.$http.get(`/taskReliability/Task/${this.dataForm.id}`) |
| | | this.dataForm = { |
| | | ...this.dataForm, |
| | | ...res.data |
| | | } |
| | | }, |
| | | // 表单提交 |
| | | async formSubmit() { |
| | | let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/taskReliability/Task/', this.dataForm) |
| | | if (res.success) { |
| | | await this.$tip.success() |
| | | this.$refs.dialog.close() |
| | | this.$emit('refreshDataList') |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <div class="mod-taskReliability-task}"> |
| | | <div> |
| | | 产品节点: |
| | | <zt-select v-model="dataForm.productId" :datas="productList" @change="onProductSelected"/> |
| | | </div> |
| | | <zt-table-wraper ref="tableObj" query-url="/taskReliability/Task/page" defaultNotQuery="true" :paging='false' delete-url="/taskReliability/Task/" |
| | | v-slot="{ table }"> |
| | | <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()"> |
| | | <el-form-item> |
| | | <zt-button type="add" @click="add()" /> |
| | | <zt-button type="delete" @click="table.deleteHandle()"/> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:70}" |
| | | @row-click="selectTask" |
| | | border @selection-change="table.selectionChangeHandle"> |
| | | <el-table-column type="selection" width="40" align="center"/> |
| | | <el-table-column prop="taskName" label="任务名称"/> |
| | | <el-table-column prop="taskSort" label="任务顺序"/> |
| | | <zt-table-column-handle :table="table" |
| | | delete-perm="taskReliability::delete"/> |
| | | </el-table> |
| | | <!-- 弹窗, 新增 / 修改 --> |
| | | <add-or-update @refreshDataList="table.query" ref="AddOrUpdate"/> |
| | | </zt-table-wraper> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import AddOrUpdate from './Task-AddOrUpdate' |
| | | |
| | | export default { |
| | | name: 'Task', |
| | | data() { |
| | | return { |
| | | productList: [], |
| | | dataForm: { |
| | | productId: '' |
| | | } |
| | | } |
| | | }, |
| | | components: { |
| | | AddOrUpdate |
| | | }, |
| | | mounted() { |
| | | this.getTaskProductList() |
| | | }, |
| | | methods: { |
| | | init() { |
| | | |
| | | }, |
| | | add() { |
| | | this.$refs.AddOrUpdate.$refs.dialog.init(null,{productId: this.dataForm.productId}) |
| | | }, |
| | | selectTask(row){ |
| | | this.$emit('onTaskSelected',row) |
| | | }, |
| | | async getTaskProductList() { |
| | | let res = await this.$http.get('/basicInfo/XhProductModel/getTaskProductList') |
| | | this.productList = res.data |
| | | console.log(this.productList, ' async getTaskProductList()') |
| | | }, |
| | | onProductSelected(data){ |
| | | console.log(data, ' onProductSelected(data)') |
| | | this.dataForm.productId = data.id |
| | | this.$refs.tableObj.query() |
| | | } |
| | | } |
| | | } |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <zt-dialog ref="dialog" @confirm="formSubmit"> |
| | | <el-form :model="dataForm" ref="dataForm" :disabled="dataForm.disabled" label-width="120px"> |
| | | <zt-form-item label="任务阶段名称" prop="phaseName" rules="required"> |
| | | <el-input v-model="dataForm.phaseName"></el-input> |
| | | </zt-form-item> |
| | | <zt-form-item label="阶段时长" prop="phaseDuration"> |
| | | <el-input v-model="dataForm.phaseDuration"></el-input> |
| | | </zt-form-item> |
| | | <zt-form-item label="阶段时速" prop="phaseSpeed"> |
| | | <el-input v-model="dataForm.phaseSpeed"></el-input> |
| | | </zt-form-item> |
| | | <zt-form-item label="阶段顺序" prop="phaseSort"> |
| | | <el-input v-model="dataForm.phaseSort"></el-input> |
| | | </zt-form-item> |
| | | <zt-form-item label="备注" prop="remark"> |
| | | <el-input v-model="dataForm.remark"></el-input> |
| | | </zt-form-item> |
| | | </el-form> |
| | | </zt-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | dataForm: { |
| | | id: '', |
| | | taskId: '', |
| | | phaseName: '', |
| | | phaseDuration: '', |
| | | phaseSpeed: '', |
| | | phaseSort: '', |
| | | remark: '', |
| | | productId: '' |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | init(id,param){ |
| | | this.dataForm.taskId = param.taskId |
| | | this.dataForm.productId = param.productId |
| | | }, |
| | | // 获取信息 |
| | | async getInfo() { |
| | | let res = await this.$http.get(`/taskReliability/TaskPhase/${this.dataForm.id}`) |
| | | this.dataForm = { |
| | | ...this.dataForm, |
| | | ...res.data |
| | | } |
| | | }, |
| | | // 表单提交 |
| | | async formSubmit() { |
| | | let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/taskReliability/TaskPhase/', this.dataForm) |
| | | if (res.success) { |
| | | await this.$tip.success() |
| | | this.$refs.dialog.close() |
| | | this.$emit('refreshDataList') |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <div> |
| | | <el-row :gutter="10"> |
| | | <el-col :span="6"> |
| | | <div class="fa-card-a"> |
| | | <task @onTaskSelected="onTaskSelected"/> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="mod-taskReliability-taskPhase}"> |
| | | <zt-table-wraper ref="tableObj" defaultNotQuery="true" query-url="/taskReliability/TaskPhase/page" |
| | | delete-url="/taskReliability/TaskPhase/" |
| | | :paging='false' v-slot="{ table }"> |
| | | <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()"> |
| | | <el-form-item> |
| | | <zt-button type="add" @click="add()"/> |
| | | <zt-button type="delete" @click="table.deleteHandle()"/> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:70}" |
| | | border @row-click="selectPhase" @selection-change="table.selectionChangeHandle"> |
| | | <el-table-column type="selection" width="40" align="center"/> |
| | | <el-table-column prop="phaseName" label="任务阶段名称"/> |
| | | <el-table-column prop="phaseDuration" label="阶段时长"/> |
| | | <el-table-column prop="phaseSpeed" label="阶段时速"/> |
| | | <el-table-column prop="phaseSort" label="阶段顺序"/> |
| | | <zt-table-column-handle :table="table" |
| | | delete-perm="taskReliability::delete"/> |
| | | </el-table> |
| | | <!-- 弹窗, 新增 / 修改 --> |
| | | <add-or-update @refreshDataList="table.query" ref="AddOrUpdate"/> |
| | | </zt-table-wraper> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <div class="fa-card-a"> |
| | | <task-phase-model ref="model"/> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import AddOrUpdate from './TaskPhase-AddOrUpdate' |
| | | import Task from "./Task"; |
| | | import TaskPhaseModel from "./TaskPhaseModel"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | dataForm: { |
| | | taskId: '', |
| | | productId: '' |
| | | } |
| | | } |
| | | }, |
| | | components: { |
| | | TaskPhaseModel, |
| | | Task, |
| | | AddOrUpdate |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.$refs.AddOrUpdate.$refs.dialog.init(null, { |
| | | taskId: this.dataForm.taskId, |
| | | productId: this.dataForm.productId |
| | | }) |
| | | }, |
| | | onTaskSelected(row) { |
| | | this.dataForm.taskId = row.id |
| | | this.dataForm.productId = row.productId |
| | | this.$refs.tableObj.query() |
| | | }, |
| | | selectPhase(row) { |
| | | this.$emit('selectPhase', row) |
| | | let param = { |
| | | row: row, |
| | | productId: this.dataForm.productId |
| | | } |
| | | this.$refs.model.init(param) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <div class="mod-taskReliability-taskPhaseModel}"> |
| | | <zt-table-wraper ref="tableObj" defaultNotQuery="true" query-url="/taskReliability/TaskPhaseModel/page" |
| | | :paging='false' |
| | | delete-url="/taskReliability/TaskPhaseModel/" v-slot="{ table }"> |
| | | <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()"> |
| | | <el-form-item> |
| | | </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="系统"/> |
| | | <el-table-column prop="modelName" label="系统模型"/> |
| | | <zt-table-column-handle :table="table" edit-perm="taskReliability:update" |
| | | delete-perm="taskReliability::delete" :has-view="false"> |
| | | <template v-slot="{ row }"> |
| | | <zt-table-button @click="selectModel(row)">选择模型</zt-table-button> |
| | | </template> |
| | | </zt-table-column-handle> |
| | | </el-table> |
| | | <select-model-rbd ref="SelectModelRbd" @setModel="selectModelRbd"></select-model-rbd> |
| | | </zt-table-wraper> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import SelectModelRbd from "./SelectModelRbd"; |
| | | |
| | | export default { |
| | | name: 'TaskPhaseModel', |
| | | data() { |
| | | return { |
| | | dataForm: { |
| | | phaseId: '', |
| | | modelName: '', |
| | | productId: '', |
| | | modelId: '', |
| | | } |
| | | } |
| | | }, |
| | | components: { |
| | | SelectModelRbd |
| | | }, |
| | | methods: { |
| | | init(param) { |
| | | console.log(param, '') |
| | | this.dataForm.phaseId = param.row.id |
| | | this.dataForm.productId = param.productId |
| | | this.$refs.tableObj.query() |
| | | }, |
| | | selectModel(row) { |
| | | console.log(row, 'selectModel'); |
| | | let param = { |
| | | row: row, |
| | | phaseId: this.dataForm.phaseId |
| | | } |
| | | this.$refs.SelectModelRbd.$refs.dialog.init(param) |
| | | }, |
| | | selectModelRbd(row) { |
| | | console.log(row, 'selectModelRbd') |
| | | this.$refs.tableObj.query() |
| | | } |
| | | } |
| | | } |
| | | </script> |