jinlin
2023-12-08 9b31782deaeaa36efb013f538c99d8f5df94eed4
修改
10个文件已修改
105 ■■■■■ 已修改文件
modules/mainPart/src/main/java/com/zt/life/modules/configItemChange/controller/ConfigItemChangeController.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/configItemChange/service/ConfigItemChangeService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/configItemWarehouse/model/WarehouseConfigItem.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/configItemWarehouse/service/ConfigItemWarehouseService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/project/controller/ProjectController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/resources/mapper/configItemWarehouse/WarehouseConfigItemDao.xml 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/packages/components/zt-table-wraper/src/zt-table-wraper.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/configItemChange/ConfigItemChange-AddOrUpdate.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/configItemChange/configItemList.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/configItemWarehouse/ConfigItemWarehouse-AddOrUpdate.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/configItemChange/controller/ConfigItemChangeController.java
@@ -124,16 +124,9 @@
    @GetMapping("getItemList")
    @ApiOperation("获取入库配置项列表")
    public Result<List<WarehouseConfigItem>> getItemList(Long projectId) {
    public PageResult<WarehouseConfigItem> getItemList(Long projectId) {
        List<WarehouseConfigItem> resultList = configItemService.warehouseConfigList(projectId);
        return Result.ok(resultList);
    }
    @PostMapping("importItemList")
    @ApiOperation("导入入库配置项列表")
    public Result importItemList(@RequestBody List<WarehouseConfigItem> WarehouseConfigItem,Long changeId) {
        configItemChangeService.importItemList(WarehouseConfigItem,changeId);
        return Result.ok();
        return PageResult.ok(resultList);
    }
}
modules/mainPart/src/main/java/com/zt/life/modules/configItemChange/service/ConfigItemChangeService.java
@@ -178,12 +178,4 @@
        return data;
    }
    public void importItemList(List<WarehouseConfigItem> warehouseConfigItem,Long changeId) {
        for (WarehouseConfigItem configItem : warehouseConfigItem) {
            configItem.setWarehouseId(changeId);
            configItem.setItemIdentify("");
            configItem.setRetrospectVersion(configItem.getItemIdentify());
            configItemService.insert(configItem);
            }
    }
}
modules/mainPart/src/main/java/com/zt/life/modules/configItemWarehouse/model/WarehouseConfigItem.java
@@ -26,6 +26,9 @@
    @ApiModelProperty(value = "入库ID")
    private Long warehouseId;
    @ApiModelProperty(value = "项目工程ID")
    private Long projectId;
    @ApiModelProperty(value = "检查单ID")
    private Long checkId;
@@ -50,6 +53,9 @@
    @ApiModelProperty(value = "密级")
    private String secretClass;
    @ApiModelProperty(value = "是否选择")
    private Long SelectId;
    @TableField(exist = false)
    @ApiModelProperty(value = "附件")
    private OssDto files;
modules/mainPart/src/main/java/com/zt/life/modules/configItemWarehouse/service/ConfigItemWarehouseService.java
@@ -120,6 +120,7 @@
                configItemService.update(configItem);
            } else {
                configItem.setWarehouseId(warehouseId);
                configItem.setProjectId(configItemDto.getConfigItemWarehouse().getProjectId());
                configItemService.insert(configItem);
            }
            Long checkId = configItem.getCheckId();
modules/mainPart/src/main/java/com/zt/life/modules/project/controller/ProjectController.java
@@ -66,8 +66,8 @@
            @ApiImplicitParam(name = "tableName", value = "功能表", dataType = Constant.QT.STRING)
    })
    public PageResult<Project> page(@ApiIgnore @QueryParam QueryFilter queryFilter) {
        return PageResult.ok(projectService.page(queryFilter));
        List<Project> Project =projectService.page(queryFilter);
        return PageResult.ok(Project);
    }
    @GetMapping("{id}")
modules/mainPart/src/main/resources/mapper/configItemWarehouse/WarehouseConfigItemDao.xml
@@ -18,37 +18,42 @@
    </select>
    <select id="itemList" resultType="com.zt.life.modules.configItemWarehouse.model.WarehouseConfigItem">
        SELECT p.secret_class,
               SUBSTRING(m.name, LOCATE('软件', m.name) , LENGTH(m.name)) AS itemName,
               m.identify AS version,
               m.name AS Item_identify
               SUBSTRING(m.name, LOCATE('软件', m.name), LENGTH(m.name)) AS itemName,
               m.identify                                              AS version,
               m.name                                                  AS Item_identify
        FROM software_test_order s
                 JOIN software_test_order_measured m ON s.project_id = ${projectId}
                 JOIN project p ON p.id = ${projectId}
        WHERE s.is_delete = 0
          AND  s.id = m.order_id
          AND s.id = m.order_id
        UNION
        SELECT NULL AS secretClass,
        SELECT NULL      AS secretClass,
               '软件测试委托单' AS itemName,
               NULL AS version,
               s.code AS itemIdentify
               NULL      AS version,
               s.code    AS itemIdentify
        FROM software_test_order s
        WHERE s.is_delete = 0
          AND  s.project_id = ${projectId}
          AND s.project_id = ${projectId}
        UNION
        SELECT NULL AS secretClass,
        SELECT NULL    AS secretClass,
               '物品流转单' AS itemName,
               NULL AS version,
               i.code AS itemIdentify
               NULL    AS version,
               i.code  AS itemIdentify
        FROM item_circulat_order i
        WHERE i.is_delete = 0
          AND  i.project_id = ${projectId}
          AND i.project_id = ${projectId}
    </select>
    <select id="warehouseList" resultType="com.zt.life.modules.configItemWarehouse.model.WarehouseConfigItem">
        select a.*
        select a.item_name,a.item_identify,a.version as retrospect_version,a.secret_class,a.project_id,a.id as select_id
        from config_item_warehouse_detail a
                 JOIN config_item_warehouse w ON w.project_id = ${projectId}
        WHERE a.is_delete = 0
          AND  w.id = a.warehouse_id
          and a.project_id = ${projectId}
        <if test="warehouse_id!=null">
            AND id not in  (select id from config_item_warehouse_detail where is_delete = 0 and warehouse_id = ${warehouseId})
        </if>
        <if test="selectIds!=null">
            AND id not in  (${selectIds})
        </if>
    </select>
</mapper>
web/packages/components/zt-table-wraper/src/zt-table-wraper.vue
@@ -212,12 +212,14 @@
          this.total = 0
          return this.$tip.error(res.msg)
        }
        console.log(res.data,'res.data')
        this.dataList = this.paging ? res.data.list : res.data
        this.total = this.paging ? res.data.total : 0
        if (this.editLimit && this.editPage) {
          this.editLimit = ''
          this.editPage = ''
        }
        console.log(this.dataList,'this.dataList')
        this.$emit('dataLoaded', this.dataList)
        this.$emit('fatherMethod')
      }
web/src/views/modules/configItemChange/ConfigItemChange-AddOrUpdate.vue
@@ -38,7 +38,7 @@
          <div class="el-border-left" style="width: calc(100% - 120px)">
            <div class="table-container">
              <el-table ref="tableConfigItemList" class="el-software el-margin-top-bot"
                        style="width: 99%;margin-left: 5px" border :data="dataForm.configItemList"
                        style="width: 99%;margin-left: 5px" border :data="dataForm.configChangeList"
                        stripe>
                <el-table-column prop="no" align="center" width="60" label="序号">
                  <template slot-scope="scope">
@@ -51,7 +51,7 @@
                    <span v-else>{{row.itemName}}</span>
                  </template>
                </el-table-column>
                <el-table-column prop="itemDentify" align="center" min-width="290" label="配置项标识">
                <el-table-column prop="itemIdentify" align="center" min-width="290" label="配置项标识">
                  <template v-slot="{ row }">
                    <el-input  v-if="showAddAndEdit" v-model="row.itemIdentify" placeholder="配置项标识"></el-input>
                    <span v-else>{{row.itemIdentify}}</span>
@@ -284,7 +284,7 @@
        </div>
      </div>
      <add-or-update-check ref="addOrUpdate" @recall="setCheckId"/>
      <ConfigItemList ref="configItemList"></ConfigItemList>
      <ConfigItemList ref="configItemList" @getChangeItemList="getChangeItemList"></ConfigItemList>
    </el-form>
  </zt-dialog>
</template>
@@ -408,6 +408,13 @@
        //   tableBody.scrollTop = tableBody.scrollHeight;
        // })
      },
      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,'this.dataForm.configChangeList')
      },
      openCheckOrderWin(row) {
        console.log(row, "openCheckOrderWin(row)")
        row.projectId = this.dataForm.projectId
web/src/views/modules/configItemChange/configItemList.vue
@@ -2,7 +2,9 @@
  <zt-dialog ref="dialog" column="2" title="选择配置项" :hasConfirm="true" @confirm="formSubmit" :append-to-body="true">
    <el-card shadow="never" class="aui-card--fill">
      <div class="mod-project-project}">
        <zt-table-wraper :dataForm="dataForm" ref="tableObj" v-slot="{ table }" query-url="/configItemChange/ConfigItemChange/getItemList">
        <zt-table-wraper :dataForm="dataForm" ref="tableObj" v-slot="{ table }" query-url="/configItemChange/ConfigItemChange/getItemList"
        @dataLoaded="dataLoaded"
        >
          <el-table
                    :data="table.dataList"
                    height="100px"
@@ -17,7 +19,7 @@
            </el-table-column>
            <el-table-column prop="itemName" width="200" label="配置项名称">
            </el-table-column>
            <el-table-column prop="itemDentify" align="center" min-width="290" label="配置项标识">
            <el-table-column prop="itemIdentify" align="center" min-width="290" label="配置项标识">
            </el-table-column>
            <el-table-column prop="version" align="center" width="120" label="版本">
            </el-table-column>
@@ -45,7 +47,7 @@
      dataForm: {
        id:'',
        projectId:'',
        checkBoxList:[],
        configChangeList:[],
      }
    }
  },
@@ -54,20 +56,23 @@
      this.dataForm.projectId = projectId
      this.dataForm.id = id
      console.log(this.dataForm,'this.dataForm.id')
      // this.$nextTick(()=>{
      //   this.$refs.tableObj.query()
      // })
      this.$nextTick(()=>{
        this.$refs.tableObj.query()
      })
    },
    indexFormat(index) {
      return index += 1
    },
    dataLoaded(data){
      console.log(data,'data dataLoaded')
    },
    changeRow(selection){
      this.dataForm.checkBoxList = selection
      console.log(this.dataForm.checkBoxList,'this.dataForm.checkList 选中的列表数据')
      this.dataForm.configChangeList = selection
      console.log(this.dataForm.configChangeList,'this.dataForm.checkList 选中的列表数据')
    },
    async formSubmit(){
      console.log(this.dataForm,'this.dataForm')
      let res = await this.$http.post('/configItemChange/ConfigItemChange/importItemList', this.dataForm)
      this.$emit('getChangeItemList',this.dataForm)
      await this.$tip.success()
      this.$refs.dialog.close()
    }
web/src/views/modules/configItemWarehouse/ConfigItemWarehouse-AddOrUpdate.vue
@@ -51,7 +51,7 @@
                    <span v-else>{{row.itemName}}</span>
                  </template>
                </el-table-column>
                <el-table-column prop="itemDentify" align="center" min-width="290" label="配置项标识">
                <el-table-column prop="itemIdentify" align="center" min-width="290" label="配置项标识">
                  <template v-slot="{ row }">
                    <el-input  v-if="showAddAndEdit" v-model="row.itemIdentify" placeholder="配置项标识"></el-input>
                    <span v-else>{{row.itemIdentify}}</span>