| | |
| | | @GetMapping("getDto") |
| | | @ApiOperation("信息") |
| | | public Result<SoftwareTestOrderDto> getDto(Long projectId,Long orderId) { |
| | | SoftwareTestOrderDto data = softwareTestOrderService.getDto(orderId, projectId); |
| | | SoftwareTestOrderDto data = softwareTestOrderService.getDto(projectId, orderId); |
| | | return Result.ok(data); |
| | | } |
| | | |
| | |
| | | package com.zt.life.modules.project.dao; |
| | | |
| | | import com.zt.common.dao.BaseDao; |
| | | import com.zt.life.modules.project.model.DictList; |
| | | import com.zt.life.modules.project.model.SoftwareTestOrder; |
| | | import com.zt.life.modules.project.model.SoftwareTestOrderDeliverable; |
| | | import com.zt.life.modules.project.model.SoftwareTestOrderMeasured; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | |
| | |
| | | public interface SoftwareTestOrderDao extends BaseDao<SoftwareTestOrder> { |
| | | |
| | | List<SoftwareTestOrder> getList(Map<String, Object> params); |
| | | List<SoftwareTestOrderDeliverable> getdeliverableDictList(); |
| | | List<SoftwareTestOrderMeasured> getMeasuredDictList(); |
| | | List<DictList> dictList(String dictType); |
| | | } |
| | |
| | | private SoftwareTestOrder softwareTestOrder; |
| | | private Project project; |
| | | private TestAgencyInfo TestAgencyInfo; |
| | | |
| | | @ApiModelProperty(value = "被测件") |
| | | private List<SoftwareTestOrderMeasured> measuredList = new ArrayList<>(); |
| | | @ApiModelProperty(value = "交付件") |
New file |
| | |
| | | package com.zt.life.modules.project.model; |
| | | |
| | | import com.zt.common.entity.BusiEntity; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper=false) |
| | | public class DictList extends BusiEntity { |
| | | @ApiModelProperty(value = "委托单ID") |
| | | private Long orderId; |
| | | |
| | | @ApiModelProperty(value = "序号") |
| | | private Integer no; |
| | | |
| | | @ApiModelProperty(value = "被测件名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "标识/版本") |
| | | private String identify; |
| | | |
| | | @ApiModelProperty(value = "是否被测件") |
| | | private String isMeasured; |
| | | |
| | | } |
| | |
| | | package com.zt.life.modules.project.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; |
| | | |
| | | /** |
| | | * software_test_order_deliverable |
| | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper=false) |
| | | @TableName("software_test_order_deliverable") |
| | | public class SoftwareTestOrderDeliverable extends BusiEntity { |
| | | public class SoftwareTestOrderDeliverable extends DictList { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "序号") |
| | |
| | | @ApiModelProperty(value = "交付物名称") |
| | | private String name; |
| | | |
| | | |
| | | } |
| | |
| | | package com.zt.life.modules.project.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; |
| | | |
| | | /** |
| | | * software_test_order_measured |
| | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper=false) |
| | | @TableName("software_test_order_measured") |
| | | public class SoftwareTestOrderMeasured extends BusiEntity { |
| | | public class SoftwareTestOrderMeasured extends DictList { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "委托单ID") |
| | |
| | | super.deleteLogic(ids); |
| | | } |
| | | |
| | | /* |
| | | public List<String> getCode() { |
| | | return baseDao.getCode(); |
| | | } |
| | | |
| | | public Project getProject(String code) { |
| | | return baseDao.getProject(code); |
| | | }*/ |
| | | } |
| | |
| | | import com.zt.life.export.service.WordFileService; |
| | | import com.zt.life.modules.project.dao.SoftwareTestOrderDao; |
| | | import com.zt.life.modules.project.dto.SoftwareTestOrderDto; |
| | | import com.zt.life.modules.project.model.DictList; |
| | | import com.zt.life.modules.project.model.SoftwareTestOrder; |
| | | import com.zt.life.modules.project.model.SoftwareTestOrderDeliverable; |
| | | import com.zt.life.modules.project.model.SoftwareTestOrderMeasured; |
| | |
| | | return true; |
| | | } |
| | | |
| | | public SoftwareTestOrderDto getDto(Long orderId, Long projectId) { |
| | | public SoftwareTestOrderDto getDto(Long projectId,Long orderId) { |
| | | SoftwareTestOrderDto data = new SoftwareTestOrderDto(); |
| | | if (orderId != null) { |
| | | data.setId(orderId); |
| | |
| | | List<SoftwareTestOrderMeasured> measuredList = softwareTestOrderMeasuredService.childrenTables(orderId); |
| | | data.setMeasuredList(measuredList); |
| | | } else { |
| | | List<SoftwareTestOrderDeliverable> deliverableList = baseDao.getdeliverableDictList(); |
| | | List<SoftwareTestOrderMeasured> measuredList = baseDao.getMeasuredDictList(); |
| | | List<?> testItemResult = baseDao.dictList("testItem_type"); |
| | | List<?> measuredList = testItemResult; |
| | | data.setMeasuredList((List<SoftwareTestOrderMeasured>) measuredList); |
| | | |
| | | List<?> productLibraryResult = baseDao.dictList("product_library_file"); |
| | | List<?> deliverableList = productLibraryResult; |
| | | data.setDeliverableList((List<SoftwareTestOrderDeliverable>) deliverableList); |
| | | |
| | | data.setTestAgencyInfo(testAgencyInfoService.get(10000L)); |
| | | } |
| | | if (projectId != null) { |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getMeasuredDictList" resultType="com.zt.life.modules.project.model.SoftwareTestOrderMeasured"> |
| | | SELECT dd.dict_label as name,'1.0.0' as identify |
| | | <select id="dictList" resultType="com.zt.life.modules.project.model.DictList"> |
| | | SELECT dd.dict_label as name, '1.0.0' as identify |
| | | FROM sys_dict_type dt |
| | | JOIN sys_dict_data dd ON dt.ID = dd.DICT_TYPE_ID |
| | | WHERE dt.DICT_TYPE = 'testItem_type' |
| | | and IS_DELETE = 0 |
| | | ORDER BY sort |
| | | </select> |
| | | |
| | | <select id="getdeliverableDictList" resultType="com.zt.life.modules.project.model.SoftwareTestOrderDeliverable"> |
| | | SELECT dd.dict_label as name,'1.0.0' as identify |
| | | FROM sys_dict_type dt |
| | | JOIN sys_dict_data dd ON dt.ID = dd.DICT_TYPE_ID |
| | | WHERE dt.DICT_TYPE = 'product_library_file' |
| | | and IS_DELETE = 0 |
| | | ORDER BY sort |
| | | <where> |
| | | dd.IS_DELETE = 0 |
| | | <if test="dictType != null and dictType != ''"> |
| | | and dt.DICT_TYPE = #{dictType} |
| | | </if> |
| | | </where> |
| | | ORDER BY dd.sort |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | let minutes = ' ' |
| | | let seconds = ' ' |
| | | if (data != null) { |
| | | year = data.getFullYear() |
| | | months = (data.getMonth() + 1).toString().padStart(2, '0') |
| | | days = data.getDate() |
| | | hours = (data.getHours() + 1).toString().padStart(2, '0') |
| | | minutes = (data.getMinutes() + 1).toString().padStart(2, '0') |
| | | seconds = (data.getSeconds() + 1).toString().padStart(2, '0') |
| | | // year = data.getFullYear() |
| | | // months = (data.getMonth() + 1).toString().padStart(2, '0') |
| | | // days = data.getDate() |
| | | // hours = (data.getHours() + 1).toString().padStart(2, '0') |
| | | // minutes = (data.getMinutes() + 1).toString().padStart(2, '0') |
| | | // seconds = (data.getSeconds() + 1).toString().padStart(2, '0') |
| | | } |
| | | return format.replace('YYYY', year).replace('MM', months).replace('DD', days).replace('hh', hours).replace('mm', minutes).replace('ss', seconds); |
| | | }) |
| | |
| | | @cell-click="handleCellClick" |
| | | stripe> |
| | | <el-table-column type="index" align="center" width="80" label="序号"/> |
| | | <el-table-column prop="dictLabel" min-width="300" label="名称"></el-table-column> |
| | | <el-table-column prop="name" min-width="300" label="名称"></el-table-column> |
| | | <el-table-column align="center" width="180" label="标识/版本"> |
| | | <template slot-scope="scope"> |
| | | <span v-if="editingCell && editingCell.row === scope.row && editingCell.column.property === scope.column.property"> |
| | |
| | | <el-table class="el-software" height="230" border :data="dataForm.deliverableList" |
| | | stripe> |
| | | <el-table-column type="index" align="center" width="80" label="序号"/> |
| | | <el-table-column prop="dictLabel" min-width="300" label="名称"></el-table-column> |
| | | <el-table-column prop="name" min-width="300" label="名称"></el-table-column> |
| | | <el-table-column prop="identify" align="center" width="380" label="标识/版本"></el-table-column> |
| | | </el-table> |
| | | </div> |