New file |
| | |
| | | package com.zt.life.modules.baselineRelease.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.baselineRelease.dto.BaselineDto; |
| | | import com.zt.life.modules.baselineRelease.model.BaselineRelease; |
| | | import com.zt.life.modules.baselineRelease.service.BaselineReleaseService; |
| | | import com.zt.life.modules.configItemWarehouse.model.WarehouseConfigItem; |
| | | import com.zt.life.modules.configItemWarehouse.service.WarehouseConfigItemService; |
| | | import com.zt.life.modules.testCheckOrder.dto.CheckOrderDto; |
| | | 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.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * baseline_release |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2023-12-18 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/baselineRelease/BaselineRelease/") |
| | | @Api(tags="baseline_release") |
| | | public class BaselineReleaseController { |
| | | @Autowired |
| | | private BaselineReleaseService baselineReleaseService; |
| | | |
| | | @Autowired |
| | | private WarehouseConfigItemService configItemService; |
| | | |
| | | @GetMapping("page") |
| | | @ApiOperation("分页") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = Constant.Q.PAGE, value = Constant.QV.PAGE, required = true, dataType = Constant.QT.INT), |
| | | @ApiImplicitParam(name = Constant.Q.LIMIT, value = Constant.QV.LIMIT, required = true, dataType = Constant.QT.INT), |
| | | @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 = "code", value = "基线发布编号", dataType = Constant.QT.STRING, format = "code^LK"), |
| | | @ApiImplicitParam(name = "baselineType", value = "基线类型", dataType = Constant.QT.STRING, format = "baseline_type^EQ"), |
| | | @ApiImplicitParam(name = "baselineName", value = "基线名称", dataType = Constant.QT.STRING, format = "baseline_name^LK") }) |
| | | public PageResult<BaselineRelease> page(@ApiIgnore @QueryParam QueryFilter queryFilter){ |
| | | return PageResult.ok(baselineReleaseService.page(queryFilter)); |
| | | } |
| | | |
| | | @GetMapping("getDto") |
| | | @ApiOperation("信息") |
| | | public Result<BaselineDto> getDto(Long baselineId, Long projectId, String pageCode) { |
| | | BaselineDto data = baselineReleaseService.getDto(baselineId, projectId, pageCode); |
| | | return Result.ok(data); |
| | | } |
| | | |
| | | @PostMapping |
| | | @ApiOperation("新增") |
| | | @LogOperation("新增") |
| | | public Result<Long> insert(@RequestBody BaselineDto baselineDto) { |
| | | //效验数据 |
| | | ValidatorUtils.validateEntity(baselineDto, AddGroup.class, DefaultGroup.class); |
| | | Long result = baselineReleaseService.save(baselineDto); |
| | | return Result.ok(result); |
| | | } |
| | | |
| | | @PutMapping |
| | | @ApiOperation("修改") |
| | | @LogOperation("修改") |
| | | public Result<Long> update(@RequestBody BaselineDto baselineDto) { |
| | | //效验数据 |
| | | ValidatorUtils.validateEntity(baselineDto, UpdateGroup.class, DefaultGroup.class); |
| | | Long result = baselineReleaseService.save(baselineDto); |
| | | |
| | | return Result.ok(result); |
| | | } |
| | | |
| | | @DeleteMapping("deleteBaseline") |
| | | @ApiOperation("删除") |
| | | @LogOperation("删除") |
| | | public Result delete(@RequestBody Long[] ids){ |
| | | //效验数据 |
| | | AssertUtils.isArrayEmpty(ids, "id"); |
| | | baselineReleaseService.delete(ids); |
| | | |
| | | return Result.ok(); |
| | | } |
| | | /* @GetMapping("exportBaseline") |
| | | @ApiOperation("打印基线发布书") |
| | | @LogOperation("打印基线发布书") |
| | | public void exportBaseline(Long id, String pageCode, HttpServletRequest request, HttpServletResponse response) { |
| | | baselineReleaseService.exportBaseline(id,pageCode, request, response); |
| | | }*/ |
| | | |
| | | @GetMapping("getItemList") |
| | | @ApiOperation("获取入库配置项列表") |
| | | public PageResult<WarehouseConfigItem> getItemList(Long projectId, String ids) { |
| | | List<WarehouseConfigItem> resultList = configItemService.warehouseConfigList(projectId,ids); |
| | | return PageResult.ok(resultList); |
| | | } |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.baselineRelease.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.baselineRelease.model.BaselineReleaseRemark; |
| | | import com.zt.life.modules.baselineRelease.service.BaselineReleaseRemarkService; |
| | | 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; |
| | | |
| | | |
| | | /** |
| | | * baseline_release_remark |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2023-12-18 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/baselineRelease/BaselineReleaseRemark/") |
| | | @Api(tags="baseline_release_remark") |
| | | public class BaselineReleaseRemarkController { |
| | | @Autowired |
| | | private BaselineReleaseRemarkService baselineReleaseRemarkService; |
| | | |
| | | @GetMapping("page") |
| | | @ApiOperation("分页") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = Constant.Q.PAGE, value = Constant.QV.PAGE, required = true, dataType = Constant.QT.INT), |
| | | @ApiImplicitParam(name = Constant.Q.LIMIT, value = Constant.QV.LIMIT, required = true, dataType = Constant.QT.INT), |
| | | @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), |
| | | }) |
| | | public PageResult<BaselineReleaseRemark> page(@ApiIgnore @QueryParam QueryFilter queryFilter){ |
| | | |
| | | return PageResult.ok(baselineReleaseRemarkService.page(queryFilter)); |
| | | } |
| | | |
| | | @GetMapping("{id}") |
| | | @ApiOperation("信息") |
| | | public Result<BaselineReleaseRemark> get(@PathVariable("id") Long id){ |
| | | BaselineReleaseRemark data = baselineReleaseRemarkService.get(id); |
| | | |
| | | return Result.ok(data); |
| | | } |
| | | |
| | | @PostMapping |
| | | @ApiOperation("新增") |
| | | @LogOperation("新增") |
| | | public Result insert(@RequestBody BaselineReleaseRemark baselineReleaseRemark){ |
| | | //效验数据 |
| | | ValidatorUtils.validateEntity(baselineReleaseRemark, AddGroup.class, DefaultGroup.class); |
| | | baselineReleaseRemarkService.insert(baselineReleaseRemark); |
| | | |
| | | return Result.ok(); |
| | | } |
| | | |
| | | @PutMapping |
| | | @ApiOperation("修改") |
| | | @LogOperation("修改") |
| | | public Result update(@RequestBody BaselineReleaseRemark baselineReleaseRemark){ |
| | | //效验数据 |
| | | ValidatorUtils.validateEntity(baselineReleaseRemark, UpdateGroup.class, DefaultGroup.class); |
| | | baselineReleaseRemarkService.update(baselineReleaseRemark); |
| | | |
| | | return Result.ok(); |
| | | } |
| | | |
| | | @DeleteMapping |
| | | @ApiOperation("删除") |
| | | @LogOperation("删除") |
| | | public Result delete(@RequestBody Long[] ids){ |
| | | //效验数据 |
| | | AssertUtils.isArrayEmpty(ids, "id"); |
| | | baselineReleaseRemarkService.delete(ids); |
| | | |
| | | return Result.ok(); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.baselineRelease.dao; |
| | | |
| | | import com.zt.common.dao.BaseDao; |
| | | import com.zt.life.modules.baselineRelease.model.BaselineRelease; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | | * baseline_release |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2023-12-18 |
| | | */ |
| | | @Mapper |
| | | public interface BaselineReleaseDao extends BaseDao<BaselineRelease> { |
| | | |
| | | List<BaselineRelease> getList(Map<String, Object> params); |
| | | |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.baselineRelease.dao; |
| | | |
| | | import com.zt.common.dao.BaseDao; |
| | | import com.zt.life.modules.baselineRelease.model.BaselineReleaseRemark; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | | * baseline_release_remark |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2023-12-18 |
| | | */ |
| | | @Mapper |
| | | public interface BaselineReleaseRemarkDao extends BaseDao<BaselineReleaseRemark> { |
| | | |
| | | List<BaselineReleaseRemark> getList(Map<String, Object> params); |
| | | |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.baselineRelease.dto; |
| | | |
| | | 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.modules.workflow.dto.FlowInfoDto; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class BaselineDto { |
| | | private Long id;//ID |
| | | private Long projectId;//项目ID |
| | | private String pageCode;//配置项类型 |
| | | |
| | | private FlowInfoDto flowInfoDto; |
| | | |
| | | @ApiModelProperty(value = "基线发布书") |
| | | private BaselineRelease baseline; |
| | | @ApiModelProperty(value = "测试项目基本信息") |
| | | private Project project; |
| | | |
| | | |
| | | @ApiModelProperty(value = "检查单列表") |
| | | private List<BaselineReleaseRemark> remarkList = new ArrayList<>(); |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.baselineRelease.model; |
| | | |
| | | 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 java.util.Date; |
| | | |
| | | /** |
| | | * baseline_release |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2023-12-18 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper=false) |
| | | @TableName("baseline_release") |
| | | public class BaselineRelease extends BusiEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "项目ID") |
| | | private Long projectId; |
| | | |
| | | @ApiModelProperty(value = "基线发布编号") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "页面标识") |
| | | private String pageCode; |
| | | |
| | | @ApiModelProperty(value = "基线类型") |
| | | private String baselineType; |
| | | |
| | | @ApiModelProperty(value = "基线名称") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date baselineName; |
| | | |
| | | @ApiModelProperty(value = "基线版本") |
| | | private String baselineVersion; |
| | | |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "发布人") |
| | | private String publisher; |
| | | |
| | | @ApiModelProperty(value = "发布人ID") |
| | | private Long publisherId; |
| | | |
| | | @ApiModelProperty(value = "发布时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date publishDate; |
| | | |
| | | @ApiModelProperty(value = "部门意见") |
| | | private String departOpinion; |
| | | |
| | | @ApiModelProperty(value = "部门签字") |
| | | private String departSign; |
| | | |
| | | @ApiModelProperty(value = "签字ID") |
| | | private Long signId; |
| | | |
| | | @ApiModelProperty(value = "签字日期") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date signDate; |
| | | |
| | | @ApiModelProperty(value = "年份") |
| | | private String year; |
| | | |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.baselineRelease.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; |
| | | |
| | | /** |
| | | * baseline_release_remark |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2023-12-18 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper=false) |
| | | @TableName("baseline_release_remark") |
| | | public class BaselineReleaseRemark extends BusiEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "项目ID") |
| | | private Long projectId; |
| | | |
| | | @ApiModelProperty(value = "入库ID") |
| | | private Long warehouseId; |
| | | |
| | | @ApiModelProperty(value = "基线ID") |
| | | private Long baselineId; |
| | | |
| | | @ApiModelProperty(value = "明细分类") |
| | | private String pageCode; |
| | | |
| | | @ApiModelProperty(value = "序号") |
| | | private Integer no; |
| | | |
| | | @ApiModelProperty(value = "配置项名称") |
| | | private String itemName; |
| | | |
| | | @ApiModelProperty(value = "选择的数据ID") |
| | | private Long selectId; |
| | | |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.baselineRelease.service; |
| | | |
| | | import com.zt.common.service.BaseService; |
| | | import com.zt.life.modules.baselineRelease.dao.BaselineReleaseRemarkDao; |
| | | import com.zt.life.modules.baselineRelease.model.BaselineReleaseRemark; |
| | | import com.zt.life.modules.testCheckOrder.model.TestCheckOrderList; |
| | | 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; |
| | | |
| | | |
| | | /** |
| | | * baseline_release_remark |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2023-12-18 |
| | | */ |
| | | @Service |
| | | public class BaselineReleaseRemarkService extends BaseService<BaselineReleaseRemarkDao, BaselineReleaseRemark> { |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param queryFilter |
| | | * @return |
| | | */ |
| | | public List<BaselineReleaseRemark> page(QueryFilter queryFilter) { |
| | | return baseDao.getList(queryFilter.getQueryParams()); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param ids |
| | | */ |
| | | public void delete(Long[] ids) { |
| | | super.deleteLogic(ids); |
| | | } |
| | | public List<BaselineReleaseRemark> getList(Long baselineId) { |
| | | Map<String, Object> params = new HashMap<>(); |
| | | params.put("baselineId",baselineId); |
| | | return baseDao.getList(params); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.baselineRelease.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.baselineRelease.dao.BaselineReleaseDao; |
| | | 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.mainPart.utils.GetFilesPath; |
| | | import com.zt.life.modules.mainPart.utils.GetShowDictList; |
| | | import com.zt.life.modules.project.service.ProjectService; |
| | | import com.zt.life.modules.testCheckOrder.dto.CheckOrderDto; |
| | | import com.zt.life.modules.testCheckOrder.model.TestCheckOrder; |
| | | import com.zt.life.modules.testCheckOrder.model.TestCheckOrderList; |
| | | import com.zt.modules.coderule.service.SysCodeRuleService; |
| | | import com.zt.modules.workflow.dto.FlowInfoDto; |
| | | import com.zt.modules.workflow.service.WorkflowService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | 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.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | | * baseline_release |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2023-12-18 |
| | | */ |
| | | @Service |
| | | public class BaselineReleaseService extends BaseService<BaselineReleaseDao, BaselineRelease> { |
| | | @Autowired |
| | | private ProjectService projectService; |
| | | |
| | | @Autowired |
| | | private GetShowDictList getShowDictList; |
| | | |
| | | @Autowired |
| | | private SysCodeRuleService sysCodeRuleService; |
| | | |
| | | @Autowired |
| | | private WorkflowService workflowService; |
| | | |
| | | @Autowired |
| | | private GetFilesPath getFilesPath; |
| | | |
| | | @Autowired |
| | | private WordFileService wordFileService; |
| | | |
| | | @Autowired |
| | | private BaselineReleaseRemarkService remarkService; |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param queryFilter |
| | | * @return |
| | | */ |
| | | public List<BaselineRelease> page(QueryFilter queryFilter) { |
| | | List<BaselineRelease> list = baseDao.getList(queryFilter.getQueryParams()); |
| | | if (list.size() > 0) { |
| | | workflowService.getRunFlow(list, "jxfb"); |
| | | } |
| | | return baseDao.getList(queryFilter.getQueryParams()); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param ids |
| | | */ |
| | | public void delete(Long[] ids) { |
| | | super.deleteLogic(ids); |
| | | } |
| | | |
| | | public BaselineDto getDto(Long baselineId, Long projectId, String pageCode) { |
| | | BaselineDto data = new BaselineDto(); |
| | | data.setPageCode(pageCode); |
| | | if (baselineId != null) { |
| | | data.setId(baselineId); |
| | | BaselineRelease baseline = this.get(baselineId); |
| | | data.setBaseline(baseline); |
| | | if (projectId == null) { |
| | | projectId = baseline.getProjectId(); |
| | | } |
| | | List<BaselineReleaseRemark> remarkList = remarkService.getList(baselineId); |
| | | data.setRemarkList(remarkList); |
| | | |
| | | } else { |
| | | BaselineRelease baseline = new BaselineRelease(); |
| | | baseline.setPageCode(pageCode); |
| | | data.setBaseline(baseline); |
| | | } |
| | | if (projectId != null) { |
| | | data.setProjectId(projectId); |
| | | data.setProject(projectService.get(projectId)); |
| | | } |
| | | return data; |
| | | } |
| | | |
| | | |
| | | public Long save(BaselineDto baselineDto) { |
| | | Long baselineId = baselineDto.getBaseline().getId(); |
| | | if (baselineId != null) |
| | | baseDao.updateById(baselineDto.getBaseline()); |
| | | else { |
| | | Map<String, String> map = new HashMap<>(); |
| | | String pagecode = baselineDto.getPageCode(); |
| | | map.put("funCode", "baseline_release_" + pagecode); |
| | | map.put("projectId", baselineDto.getProjectId().toString()); |
| | | baselineDto.getBaseline().setProjectId(baselineDto.getProjectId()); |
| | | baselineDto.getBaseline().setCode(sysCodeRuleService.getNewCode(map)); |
| | | baseDao.insert(baselineDto.getBaseline()); |
| | | baselineId = baselineDto.getBaseline().getId(); |
| | | } |
| | | |
| | | for (BaselineReleaseRemark remark : baselineDto.getRemarkList()) { |
| | | remark.setBaselineId(baselineId); |
| | | if (remark.getId() != null) { |
| | | remarkService.update(remark); |
| | | } else { |
| | | remark.setBaselineId(baselineId); |
| | | remarkService.insert(remark); |
| | | } |
| | | } |
| | | |
| | | Long bizId = baselineDto.getBaseline().getId(); |
| | | FlowInfoDto flowInfoDto = baselineDto.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 baselineId; |
| | | } |
| | | |
| | | /* 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=""; |
| | | 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<String, String> map = new HashMap<>(); |
| | | map.put("plan", "计划"); |
| | | 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(); |
| | | } catch (FileNotFoundException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | }*/ |
| | | } |
| | |
| | | } else { |
| | | testAgencyInfoService.update(reviewDto.getTestAgencyInfo()); |
| | | } |
| | | sysOssConfigService.updateOss(reviewDto.getId(), reviewDto.getFiles());// 保存附件 |
| | | return true; |
| | | } |
| | | |
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.baselineRelease.dao.BaselineReleaseDao"> |
| | | |
| | | <select id="getList" resultType="com.zt.life.modules.baselineRelease.model.BaselineRelease"> |
| | | select a.* |
| | | from baseline_release a |
| | | <where> |
| | | a.is_delete = 0 |
| | | <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.baselineRelease.dao.BaselineReleaseRemarkDao"> |
| | | |
| | | <select id="getList" resultType="com.zt.life.modules.baselineRelease.model.BaselineReleaseRemark"> |
| | | select * |
| | | from baseline_release_remark |
| | | where baseline_id = ${baselineId} |
| | | and is_delete = 0 |
| | | ORDER BY no |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <template> |
| | | <zt-dialog ref="dialog" column="2" @confirm="formSubmit" :stepMarker="stepMarker" :append-to-body="true"> |
| | | <el-form :model="dataForm" :inline="true" ref="dataForm" style="padding-top: 0" :disabled="dataForm.disabled" |
| | | label-width="120px" class="testCheckFormAuto"> |
| | | <div> |
| | | <el-form-item label-width="60px" label="编号:" style="width:100%;margin-bottom: -5px"> |
| | | <span>{{ dataForm.baseline.code || '编号自动生成' }}</span> |
| | | </el-form-item> |
| | | </div> |
| | | <div style="border: 1px solid rgba(0,0,0,.2);width: 99%"> |
| | | <div style="border-bottom: 1px solid rgba(0,0,0,.2);" class="testCheckContentWidth"> |
| | | <el-form-item class="marginTopAndMarginBottom" label="项目标识" style="width: 49%"> |
| | | <el-input v-model="dataForm.project.softwareIdentity" placeholder="项目标识"></el-input> |
| | | </el-form-item> |
| | | <el-form-item class="marginTopAndMarginBottom" label="项目名称" style="width: 49%"> |
| | | <el-input v-model="dataForm.project.softwareName" placeholder="项目名称"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div style="border-bottom: 1px solid rgba(0,0,0,.2);"> |
| | | <div style="padding-left:5px;padding-right:5px;"> |
| | | <div style="width: 112px;text-align: center;font-weight: 600">基线发布描述</div> |
| | | <div class="table-container"> |
| | | <el-form-item class="marginTopAndMarginBottom" label="基线类型" style="width: 49%"> |
| | | <zt-dict v-model="dataForm.baseline.baselineType" placeholder="基线类型" dict="baseline_type" |
| | | :radio="true"></zt-dict> |
| | | </el-form-item> |
| | | <el-form-item class="marginTopAndMarginBottom" label="基线名称" style="width: 49%"> |
| | | <el-input v-model="dataForm.baseline.baselineName" placeholder="基线名称"></el-input> |
| | | </el-form-item> |
| | | <el-form-item class="marginTopAndMarginBottom" label="基线版本" style="width: 49%"> |
| | | <el-input v-model="dataForm.baseline.baselineVersion" placeholder="基线版本"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="el-flexCirculationDialog el-border-bottom"> |
| | | <div style="width: 112px;text-align: center;font-weight: 600"> |
| | | 备注 |
| | | </div> |
| | | <div class="el-border-left acceptDate" style="height: 80px;width: 80%;"> |
| | | <div class="table-container"> |
| | | <el-table ref="tableCirculatOrderList" class="el-software el-margin-top-bot" border |
| | | :data="dataForm.remarkList" |
| | | stripe> |
| | | <el-table-column prop="no" align="center" width="60" label="序号"> |
| | | <template slot-scope="scope"> |
| | | <span v-html="indexFormat(scope.$index)"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="itemName" min-width="180" label="配置项名称"> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div v-if="!dataForm.disabled" class="icon-container" @click="handleCommand"> |
| | | <!-- 放置固定的图标 --> |
| | | <i class="el-icon-plus"></i> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="el-flexCirculationDialog"> |
| | | <div style="width: 112px;text-align: center;font-weight: 600"> |
| | | 发布人 |
| | | </div> |
| | | <div class="el-border-left-right acceptDate1" style="width: 40%;height: 40px;"> |
| | | <el-form-item style="width: 100%;padding-left:20px;margin:0;"> |
| | | <span>{{ dataForm.baseline.publisher}}</span> |
| | | </el-form-item> |
| | | </div> |
| | | <div style="width: 112px;text-align: center;font-weight: 600"> |
| | | 发布时间 |
| | | </div> |
| | | <div class="el-border-left-right acceptDate1" style="width: 40%;height: 40px;"> |
| | | <el-form-item style="width: 100%;padding-left:20px;margin:0;"> |
| | | <span>{{ dataForm.baseline.publishDate}}</span> |
| | | </el-form-item> |
| | | </div> |
| | | <div style="width: 84px;text-align: center;font-weight: 600"> |
| | | 基线批准 |
| | | </div> |
| | | <div class="el-configChangeDialog el-border-bottom"> |
| | | <div class="DFormWidth DAlign DHold"> |
| | | 部门意见 |
| | | </div> |
| | | <div style="width: calc(100% - 120px)" class="el-border-left"> |
| | | <el-form-item class="el-wt-form-item-margin" label-width="20px" style="width: 85%"> |
| | | <el-input :disabled="stepMarker!=='pzxbg_bmsh'" v-model="dataForm.baseline.departOpinion"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label-width="80%" label="签字:" style="width: 65%"> |
| | | <span>{{dataForm.baseline.departSign}}</span> |
| | | </el-form-item> |
| | | <el-form-item label="日期:" style="width: 20%"> |
| | | <span>{{dataForm.baseline.signDate}}</span> |
| | | </el-form-item> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-form> |
| | | <ConfigItemList ref="configItemList" @getChangeItemList="getChangeItemList"></ConfigItemList> |
| | | <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"; |
| | | import ConfigItemList from '../configItemChange/configItemList.vue' |
| | | import AddOrUpdateCheck from "../testCheckOrder/TestCheckOrder-AddOrUpdate"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | dataForm: { |
| | | id: '', |
| | | pageCode: '', |
| | | stepMarker: '', |
| | | pageName: { |
| | | demand: '需求基线', product:'产品基线' |
| | | }, |
| | | baseline: { |
| | | code: '', |
| | | baselineType: '', |
| | | baselineName: '', |
| | | baselineVersion: '', |
| | | remark: '', |
| | | publisher: '', |
| | | publishDate: '', |
| | | departOpinion: '', |
| | | departSign: '', |
| | | signDate: '', |
| | | }, |
| | | project: { |
| | | softwareIdentity: '', |
| | | softwareName: '' |
| | | }, |
| | | remarkList: [] |
| | | } |
| | | } |
| | | }, |
| | | components: { |
| | | ConfigItemList |
| | | }, |
| | | methods: { |
| | | init(id, row) { |
| | | if (id) { |
| | | this.dataForm.id = id |
| | | } else { |
| | | this.dataForm.id = row.id |
| | | } |
| | | this.pageCode = row.pageCode |
| | | if (row.projectId) { |
| | | this.dataForm.projectId = row.projectId |
| | | } |
| | | /* if (this.configDetailRow) { |
| | | if (!row.stepMarker) { |
| | | this.stepMarker = 'csjcd_first' |
| | | this.title = '发起测试检查单' |
| | | } else { |
| | | this.title = row.stepName |
| | | this.stepMarker = row.stepMarker |
| | | } |
| | | }*/ |
| | | //this.dataForm.disabled |
| | | this.getInfo() |
| | | |
| | | //console.log(this.dataForm.id, this.dataForm.projectId, this.stepMarker, 'this.dataForm.id, this.dataForm.projectId,this.stepMarker') |
| | | }, |
| | | indexFormat(index) { |
| | | return index += 1 |
| | | }, |
| | | handleCommand() { |
| | | this.$nextTick(()=>{ |
| | | console.log(this.dataForm.projectId,'this.dataForm.projectId') |
| | | this.ids = this.dataForm.configChangeList.map(item=>item.selectId).join(',') |
| | | this.$refs.configItemList.$refs.dialog.init(this.dataForm.projectId,this.ids) |
| | | }) |
| | | }, |
| | | // 获取信息 |
| | | async getInfo() { |
| | | let params = { |
| | | baselineId: this.dataForm.id, |
| | | projectId: this.dataForm.projectId, |
| | | pageCode: this.pageCode |
| | | } |
| | | console.log(this.pageCode, "getInfo pageCode") |
| | | let res = await this.$http.get(`/baselineRelease/BaselineRelease/getDto`, {params: params}) |
| | | this.dataForm = { |
| | | ...this.dataForm, |
| | | ...res.data |
| | | } |
| | | console.log(this.dataForm, 'this.dataForm this.dataForm') |
| | | }, |
| | | getChangeItemList(data){ |
| | | console.log(data.configChangeList,'getChangeItemList(data)') |
| | | if(data.configChangeList){ |
| | | this.dataForm.configChangeList=this.dataForm.configChangeList.concat(data.configChangeList) |
| | | } |
| | | console.log(this.dataForm.configChangeList,ids,'this.dataForm.configChangeList') |
| | | }, |
| | | async print() { |
| | | var params = qs.stringify({ |
| | | token: Cookies.get('token'), |
| | | id: this.dataForm.id, |
| | | pageCode: this.pageCode |
| | | }) |
| | | let apiURL = `/baselineRelease/BaselineRelease/exportbaseline` |
| | | window.location.href = `${window.SITE_CONFIG['apiURL']}${apiURL}?${params}` |
| | | }, |
| | | // 表单提交 |
| | | async formSubmit(submitType) { |
| | | if (submitType == 'tj' || submitType == 'bl' ) { |
| | | let flowInfo = { |
| | | flowCode: 'jxfb', |
| | | stepIdMark: this.stepMarker, |
| | | submitType: submitType |
| | | } |
| | | this.dataForm.flowInfoDto = flowInfo; |
| | | } |
| | | console.log(this.dataForm, "this.dataForm formSubmit(submitType)") |
| | | let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/baselineRelease/BaselineRelease/', this.dataForm) |
| | | if (res.success) { |
| | | await this.$tip.success() |
| | | this.$refs.dialog.close() |
| | | this.$emit('refreshDataList') |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <el-card shadow="never" class="aui-card--fill"> |
| | | <div class="mod-baselineRelease-baselineRelease}"> |
| | | <zt-table-wraper query-url="/baselineRelease/BaselineRelease/page" delete-url="/baselineRelease/BaselineRelease" v-slot="{ table }"> |
| | | <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()"> |
| | | <el-form-item> |
| | | <el-input v-model="dataForm.code" placeholder="请输入基线发布编号" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <zt-dict v-model="dataForm.baselineType" dict="baseline_type" clearable></zt-dict> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-input v-model="dataForm.baselineName" placeholder="请输入基线名称" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <zt-button type="query" @click="table.query()"/> |
| | | <zt-button type="add" @click="add()"/> |
| | | <zt-button type="delete" perm="baselineRelease: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 @selection-change="table.selectionChangeHandle"> |
| | | <el-table-column type="selection" width="40"/> |
| | | <el-table-column prop="code" label="基线发布编号"/> |
| | | <zt-table-column-dict prop="baselineType" label="基线类型" dict="baseline_type"/> |
| | | <el-table-column prop="baselineName" label="基线名称"/> |
| | | <el-table-column prop="baselineVersion" label="基线版本"/> |
| | | <template v-slot="{row}"> |
| | | <zt-table-button type="primary" @click="openEditWin(row)">修改</zt-table-button> |
| | | </template> |
| | | </el-table> |
| | | <!-- 弹窗, 新增 / 修改 --> |
| | | <add-or-update ref="addOrUpdate" @recall="table.query"/> |
| | | <ProjectSelect :pageCode="pageCode" ref="projectSelect" |
| | | @refreshDataList="table.query" |
| | | @setProjectInfo="openAddWin"> |
| | | </ProjectSelect> |
| | | <Preview ref="view"></Preview> |
| | | </zt-table-wraper> |
| | | </div> |
| | | </el-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import AddOrUpdate from './BaselineRelease-AddOrUpdate' |
| | | import ProjectSelect from "../project/Project-select" |
| | | import Preview from '@/views/pages/view' |
| | | export default { |
| | | data() { |
| | | return { |
| | | pageCode: '', |
| | | dataForm: { |
| | | code: '', |
| | | baselineType: '', |
| | | baselineName: '', |
| | | pageCode:this.$route.query.pageCode |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.pageCode = this.$route.query.pageCode |
| | | this.dataForm.pageCode = this.$route.query.pageCode |
| | | console.log(this.pageCode,'this.pageCode this.pageCode') |
| | | }, |
| | | components: { |
| | | AddOrUpdate, |
| | | ProjectSelect, |
| | | Preview |
| | | }, |
| | | methods: { |
| | | add() { |
| | | console.log(this.pageCode, 'this.pageCode') |
| | | this.$refs.projectSelect.$refs.dialog.init("test_check_order", {pageCode: this.pageCode}) |
| | | }, |
| | | openAddWin(projectRow) { |
| | | console.log(projectRow, 'openAddWin(projectRow) projectRow') |
| | | this.$refs.addOrUpdate.$refs.dialog.init(null, {id: null, projectId: projectRow.id, pageCode: this.pageCode}) |
| | | }, |
| | | openEditWin(checkOrderRow){ |
| | | console.log(checkOrderRow,'openEditWin(checkOrderRow)') |
| | | this.$refs.addOrUpdate.$refs.dialog.init(checkOrderRow.id, {id: checkOrderRow.id, projectId: checkOrderRow.projectId, pageCode: this.pageCode}) |
| | | }, |
| | | preview(row) { |
| | | this.$refs.view.openAccessoryFormatSingle(row) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | </div> |
| | | <div style="width: calc(100% - 120px)" class="el-border-left"> |
| | | <el-form-item class="el-CMTextarea" style="width: 100%;padding: 5px"> |
| | | <el-input type="textarea" :rows="2" placeholder="请输入内容" |
| | | <el-input type="textarea" :rows="2" placeholder="请输入评审结论" |
| | | v-model="dataForm.contractReview.reviewConclusion"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="技术负责人:" style="width: 48%"> |
| | | <span>{{ dataForm.contractReview.technicalDirector }}</span> |
| | | <el-input type="textarea" :rows="1" placeholder="请输入技术负责人" |
| | | v-model="dataForm.contractReview.technicalDirector"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="日期:" style="width: 48%"> |
| | | {{ dataForm.contractReview.reviewDate | filterTime('YYYY年MM月DD日') }} |
| | | <el-date-picker |
| | | v-model="dataForm.contractReview.reviewDate" |
| | | type="date" |
| | | placeholder="请选择日期"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </div> |
| | | </div> |
| | |
| | | return { |
| | | dataForm: { |
| | | reviewType: '', |
| | | orderCode:'' |
| | | } |
| | | } |
| | | }, |
| | |
| | | <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> |
| | | |