houjie
2023-08-31 56ae1f2dd863cb1c3b564695435c69414c935dab
库存信息 实体类  调整
已修改2个文件
58 ■■■■ 文件已修改
lxzn-module-eam/src/main/java/org/jeecg/modules/spare/controller/SparesPartInventoryController.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/spare/entity/SparesPartInventory.java 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/spare/controller/SparesPartInventoryController.java
@@ -188,7 +188,7 @@
            try {
                List<SparesPartInventory> list = ExcelImportUtil.importExcel(file.getInputStream(), SparesPartInventory.class, params);
                for (SparesPartInventory temp : list) {
                    temp.setId(mainId);
                    temp.setSparePartId(mainId);
                }
                long start = System.currentTimeMillis();
                sparesPartInventoryService.saveBatch(list);
@@ -207,36 +207,7 @@
        }
        return Result.error("文件导入失败!");
    }
   /* @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
        Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
        for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
            // 获取上传文件对象
            MultipartFile file = entity.getValue();
            ImportParams params = new ImportParams();
            params.setTitleRows(2);
            params.setHeadRows(1);
            params.setNeedSave(true);
            try {
                List<SparesPartInventory> list = ExcelImportUtil.importExcel(file.getInputStream(), SparesPartInventory.class, params);
                long start = System.currentTimeMillis();
                sparesPartInventoryService.saveBatch(list);
                log.info("消耗时间" + (System.currentTimeMillis() - start) + "毫秒");
                return Result.OK("文件导入成功!数据行数:" + list.size());
            } catch (Exception e) {
                log.error(e.getMessage(), e);
                return Result.error("文件导入失败:" + e.getMessage());
            } finally {
                try {
                    file.getInputStream().close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
        return Result.error("文件导入失败!");
    }*/
    /**
lxzn-module-eam/src/main/java/org/jeecg/modules/spare/entity/SparesPartInventory.java
@@ -27,6 +27,7 @@
    /**
     * 备件id
     */
    @Excel(name = "备件id", width = 15)
    @ApiModelProperty(value = "备件id")
    private java.lang.String sparePartId;
    /**
@@ -53,36 +54,36 @@
    /**
     * 制造商
     */
    @Excel(name = "制造商", width = 15,dictTable = "mom_base_constructor", dicCode = "id", dicText = "name")
    @Excel(name = "制造商", width = 15)
    @ApiModelProperty(value = "制造商")
    @Dict(dictTable = "mom_base_constructor", dicCode = "id", dicText = "name")
    private java.lang.String constructorId;
    /**
     * 主单位id
     */
    @Excel(name = "主单位id", width = 15,dictTable = "mom_base_unit", dicCode = "id", dicText = "name")
    @Excel(name = "主单位id", width = 15)
    @ApiModelProperty(value = "主单位id")
    @Dict(dictTable = "mom_base_unit", dicCode = "id", dicText = "name")
    private java.lang.String mainUnitId;
    /**
     * 辅单位id
     */
    @Excel(name = "辅单位id", width = 15)
    @ApiModelProperty(value = "辅单位id")
    @Dict(dictTable = "mom_base_unit", dicCode = "id", dicText = "name")
    private java.lang.String auxiliaryUnitId;
    @Excel(name = "仓库id", width = 15,dictTable = "mom_base_warehouse", dicCode = "id", dicText = "name")
    @Excel(name = "仓库id", width = 15)
    @ApiModelProperty(value = "仓库id")
    @Dict(dictTable = "mom_base_warehouse", dicCode = "id", dicText = "name")
    private java.lang.String warehouseId;
    @Excel(name = "库区id", width = 15,dictTable = "mom_base_warehouse_area", dicCode = "id", dicText = "name")
    @Excel(name = "库区id", width = 15)
    @ApiModelProperty(value = "库区id")
    @Dict(dictTable = "mom_base_warehouse_area", dicCode = "id", dicText = "name")
    private java.lang.String warehouseAreaId;
    @Excel(name = "库位id", width = 15,dictTable = "mom_base_warehouse_location", dicCode = "id", dicText = "name")
    @Excel(name = "库位id", width = 15)
    @ApiModelProperty(value = "库位id")
    @Dict(dictTable = "mom_base_warehouse_location", dicCode = "id", dicText = "name")
    private java.lang.String warehouseLocationId;
@@ -95,6 +96,7 @@
    /**
     * 辅数量
     */
    @Excel(name = "辅数量", width = 15)
    @ApiModelProperty(value = "辅数量")
    private java.lang.Double auxiliaryQuantity;
@@ -111,7 +113,6 @@
     * 供应商id
     */
    @Excel(name = "供应商id", width = 15)
    @Dict(dictTable = "mom_base_supplier", dicCode = "id", dicText = "name")
    @ApiModelProperty(value = "供应商id")
    private String supplierId;
@@ -153,31 +154,31 @@
    /**
     * 备用字段1
     */
    @Excel(name = "备用字段1", width = 15)
    @ApiModelProperty(value = "备用字段1")
    private java.lang.String sparesUda1;
    /**
     * 备用字段2
     */
    @Excel(name = "备用字段2", width = 15)
    @ApiModelProperty(value = "备用字段2")
    private java.lang.String sparesUda2;
    /**
     * 备用字段3
     */
    @Excel(name = "备用字段3", width = 15)
    @ApiModelProperty(value = "备用字段3")
    private java.lang.String sparesUda3;
    /**
     * 备用字段4
     */
    @Excel(name = "备用字段4", width = 15)
    @ApiModelProperty(value = "备用字段4")
    private java.lang.String sparesUda4;
    /**
     * 备用字段5
     */
    @Excel(name = "备用字段5", width = 15)
    @ApiModelProperty(value = "备用字段5")
    private java.lang.String sparesUda5;