javaExcel的导出(简单方法,不用代码写表头)

news2024/11/29 2:32:53

目录

一.java代码

1.controller层(/exportTradeCreditData)

2.service代码

3.将设计好的excel模板放到指定位置

4.ExcelWriter.write()方法

二.前端Vue代码

1.接口

2.代码

三.Excel模板

1.将对应的字段也就是list中的key放到你想放在的位置(${contract.CITY_NAME})

2.加入批注

表头批注(jx:area(lastCell = "BB5"))

字段批注(jx:each(items="contracts" var="contract" lastCell="BB5"))

模板需要遍历的最后一行最后一列


一.java代码

1.controller层(/exportTradeCreditData)

package com.rhxt.irrmanage.build.control;

import java.io.IOException;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.tomcat.util.http.fileupload.servlet.ServletFileUpload;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.util.WebUtils;

import com.rhxt.common.swagger.ApiJsonObject;
import com.rhxt.common.swagger.ApiJsonProperty;
import com.rhxt.irrmanage.build.pojo.PmTbFiles;
import com.rhxt.irrmanage.build.service.ExportFileService;
import com.rhxt.util.G4Utils;
import com.rhxt.util.ResponseEnum;
import com.rhxt.util.Result;
import com.rhxt.util.file.FileUploadUtils;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@RestController
@Api(value = "附件上传及导出",tags = {"附件上传及导出"})
@RequestMapping("/exportFile")
public class ExportFileController {
	
	private static final Logger log = LoggerFactory.getLogger(ExportFileController.class);
	
	@Autowired
	ExportFileService exportFileService;
	
	@Value("${file.upload.filePath}")
    private String path;
	
	//文件服务器地址
	@Value("${file.url}")
    private String localIp;
	
	@ApiOperation(value = "导出", notes = "导出")
	@PostMapping("/exportTradeCreditData")
	public Result apiExport(@ApiJsonObject(name = "exportTradeCreditData", value = {
			@ApiJsonProperty(key = "regionId", example = "", description = "灌区编码", type = "string", required = true),
			@ApiJsonProperty(key = "year", example = "", description = "年份", type = "string", required = true),
			@ApiJsonProperty(key = "state", example = "", description = "灌区类型", type = "string", required = true),
			@ApiJsonProperty(key = "irrName", example = "", description = "灌区名称", type = "string", required = true),
			@ApiJsonProperty(key = "planName", example = "", description = "规划名称", type = "string", required = true),
			@ApiJsonProperty(key = "tableName", example = "", description = "对应文件名", type = "string", required = true),
			@ApiJsonProperty(key = "superRegionId", example = "", description = "上级所属行政区划", type = "string", required = true),
			@ApiJsonProperty(key = "regionType", example = "", description = "用户级别", type = "string", required = true),
			@ApiJsonProperty(key = "selRegionId", example = "", description = "灌区编码", type = "string", required = true),
			})
	HttpServletResponse response, @RequestBody Map<String, Object> map ) throws IOException{
    	if (G4Utils.checkParams(map, "tableName")) {
    		String regionId = G4Utils.getMapValue2String(map, "regionId");
			String year = G4Utils.getMapValue2String(map, "year");
			String state = G4Utils.getMapValue2String(map, "state");
			String irrName = G4Utils.getMapValue2String(map, "irrName");
			String planName = G4Utils.getMapValue2String(map, "planName");
    		String tableName = G4Utils.getMapValue2String(map, "tableName");
    		String superRegionId = G4Utils.getMapValue2String(map, "superRegionId");
    		String regionType = G4Utils.getMapValue2String(map, "regionType");
    		String selRegionId = G4Utils.getMapValue2String(map, "selRegionId");
    		exportFileService.exportTradeCreditData(tableName, response, regionId, year, state, irrName, planName,superRegionId,regionType,selRegionId);
		}
		return null;		
	}
	
	@ApiOperation(value = "附件上传", notes = "附件上传")
	@PostMapping("/uploadFile")
	public Result uploadFile(@ApiJsonObject(name = "queryData", value = {
			@ApiJsonProperty(key = "file", example = "", description = "文件", type = "", required = true),
			@ApiJsonProperty(key = "regionId", example = "", description = "行政区划编码", type = "string", required = true),
			@ApiJsonProperty(key = "objId", example = "", description = "附件关联对象id", type = "string", required = true),
			@ApiJsonProperty(key = "userId", example = "", description = "用户id", type = "string", required = true),
			@ApiJsonProperty(key = "remark", example = "", description = "备注", type = "string", required = true),
			})@RequestParam Map<String, Object> map, HttpServletRequest request) throws IOException{	
		Result result = new Result();
		boolean isMultipart = ServletFileUpload.isMultipartContent(request);
		List<MultipartFile> file = null;
		List<PmTbFiles> insertPmFiles = null;
		if (G4Utils.checkParams(map, "regionId", "objId", "userId")) {
			if (isMultipart) {
				String regionId = G4Utils.getMapValue2String(map, "regionId");
				String objId = G4Utils.getMapValue2String(map, "objId");
				String userId = G4Utils.getMapValue2String(map, "userId");
				String remark = G4Utils.getMapValue2String(map, "remark");
				MultipartHttpServletRequest multipartRequest = WebUtils.getNativeRequest(request, MultipartHttpServletRequest.class);
				file = multipartRequest.getFiles("file");
				if (G4Utils.isNotEmpty(file)) {
					try {
						insertPmFiles = FileUploadUtils.insertPmFiles(file, regionId, objId, userId, path, remark);
					} catch (Throwable e) {
						e.printStackTrace();
						log.info("附件上传异常,异常位置:ExportFileController.uploadFile:异常原因:", e);
					}
					if (G4Utils.isNotEmpty(insertPmFiles)) {
						result.setObj(insertPmFiles);
						result.setCode(ResponseEnum.FILE_UPLOAD_SUCCESS.getCode());
						result.setMsg(ResponseEnum.FILE_UPLOAD_SUCCESS.getMsg());
					}else {
						result.setCode(ResponseEnum.FILE_UPLOAD_ERROR.getCode());
						result.setMsg(ResponseEnum.FILE_UPLOAD_ERROR.getMsg());
					}
					
				}
			}
		}else {
			result.setCode(ResponseEnum.PARAM_LOSE_EXCEPTION.getCode());
			result.setMsg(ResponseEnum.PARAM_LOSE_EXCEPTION.getMsg());
		}
		
		return result;		
	}
	
	@ApiOperation(value = "附件删除", notes = "附件删除")
	@PostMapping("/deleteFileById")
	public Result deleteFileById(@ApiJsonObject(name = "deleteFileById", value = {
			@ApiJsonProperty(key = "id", example = "", description = "文件id", type = "", required = true)
	})@RequestBody Map<String, Object> map) throws IOException{	
		Result result = new Result();
		if (G4Utils.checkParams(map, "id")) {
			String id = G4Utils.getMapValue2String(map, "id");
			result.setObj(exportFileService.deleteFile(id));
			result.setCode(ResponseEnum.DELETE_SUCCESS.getCode());
			result.setMsg(ResponseEnum.DELETE_SUCCESS.getMsg());
		}else {
			result.setCode(ResponseEnum.PARAM_LOSE_EXCEPTION.getCode());
			result.setMsg(ResponseEnum.PARAM_LOSE_EXCEPTION.getMsg());
		}
		
		return result;		
	}
	
	@ApiOperation(value = "附件查看", notes = "附件查看")
	@PostMapping("/selectFileById")
	public Result selectFileById(@ApiJsonObject(name = "selectFileById", value = {
			@ApiJsonProperty(key = "id", example = "", description = "附件关联对象id", type = "", required = true)
	})@RequestBody Map<String, Object> map) throws IOException{	
		Result result = new Result();
		if (G4Utils.checkParams(map, "id")) {
			String id = G4Utils.getMapValue2String(map, "id");
			result.setObj(exportFileService.selectFileById(id, localIp));
		}else {
			result.setCode(ResponseEnum.PARAM_LOSE_EXCEPTION.getCode());
			result.setMsg(ResponseEnum.PARAM_LOSE_EXCEPTION.getMsg());
		}
		
		return result;		
	}
}

2.service代码

package com.rhxt.irrmanage.build.service.impl;

import java.io.OutputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletResponse;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.rhxt.irrmanage.build.dao.PmTbFilesMapper;
import com.rhxt.irrmanage.build.service.ExportFileService;
import com.rhxt.irrmanage.build.service.IPmTbBiddingInfoService;
import com.rhxt.irrmanage.build.service.IPmTbFeasibilityPlanService;
import com.rhxt.irrmanage.build.service.IPmTbInvestPlanReleaseService;
import com.rhxt.irrmanage.build.service.IPmTbProjectAcceptanceService;
import com.rhxt.irrmanage.build.service.IPmTbProjectPlanService;
import com.rhxt.irrmanage.build.service.IPmTbProjectProgressService;
import com.rhxt.irrmanage.build.service.IPmTbProjectProposalService;
import com.rhxt.irrmanage.build.service.IPmTbReplyBuildService;
import com.rhxt.irrmanage.build.service.IPmTbReplyDesignService;
import com.rhxt.irrmanage.build.service.PmTbProjectStartService;
import com.rhxt.util.ExcelWriter;
import com.rhxt.util.G4Utils;

@Service
public class ExportFileServiceImpl implements ExportFileService {

	private static final Logger log = LoggerFactory.getLogger(ExportFileServiceImpl.class);
	
	@Autowired
	IPmTbProjectProposalService IPmTbProjectProposalService;
	
	@Autowired
	IPmTbProjectPlanService iPmTbProjectPlanService;
	
	@Autowired
	IPmTbBiddingInfoService iPmTbBiddingInfoService;
	
	@Autowired
	IPmTbFeasibilityPlanService iPmTbFeasibilityPlanService;
	
	@Autowired
	IPmTbInvestPlanReleaseService iPmTbInvestPlanReleaseService;
	
	@Autowired
	IPmTbProjectAcceptanceService iPmTbProjectAcceptanceService;
	
	@Autowired
	IPmTbProjectProgressService iPmTbProjectProgressService;
	
	@Autowired
	PmTbProjectStartService pmTbProjectStartService;
	
	@Autowired
	IPmTbReplyBuildService iPmTbReplyBuildService;
	
	@Autowired
	IPmTbReplyDesignService iPmTbReplyDesignService;
	
	@Autowired
	PmTbFilesMapper pmTbFilesMapper;
	
	@Override
	public void exportTradeCreditData(String tableName, HttpServletResponse response, String regionId, String year,
		String state, String irrName, String planName, String superRegionId, String regionType,String selRegionId) {
		Map<String, Object> data = new HashMap<>();
		String fn = "";
		switch (tableName) {
		case "pmTbProjectProposal": //项目建议书 √
			fn = "pmTbProjectProposal";
			List<Map<String, Object>> proposalList = IPmTbProjectProposalService.queryData(regionId, year, state, irrName,superRegionId,regionType, selRegionId);
			data.put("contracts", proposalList);
			break;
		case "pmTbProjectPlan": //规划报告 √
			fn = "pmTbProjectPlan";
			List<Map<String, Object>> proPlanList = iPmTbProjectPlanService.queryData(regionId, year, state, irrName, planName,superRegionId,regionType,"", selRegionId);
			data.put("contracts", proPlanList);
			break;
		case "pmTbFeasibilityPlan":  //可行性研究 √
			fn = "pmTbFeasibilityPlan";
			List<Map<String, Object>> feaPlanList = iPmTbFeasibilityPlanService.queryData(regionId, year, state, irrName,superRegionId,regionType,"", selRegionId);
			data.put("contracts", feaPlanList);
			break;
		case "pmTbReplyDesign": //初步设计 √
			fn = "pmTbReplyDesign";
			List<Map<String, Object>> replyDesList = iPmTbReplyDesignService.queryData(regionId, year, state, irrName,superRegionId,regionType,"", selRegionId);
			data.put("contracts", replyDesList);
			break;
		case "pmTbReplyBuild": //年度实施方案 √
			fn = "pmTbReplyBuild";
			List<Map<String, Object>> replyBuildList = iPmTbReplyBuildService.queryData(regionId, year, state, irrName,superRegionId,regionType,"", selRegionId);
			data.put("contracts", replyBuildList);
			break;
		case "pmTbInvestPlanRelease": //年度投资计划下达 √
			fn = "pmTbInvestPlanRelease";
			List<Map<String, Object>> invPlanList = iPmTbInvestPlanReleaseService.queryData(regionId, year, state, irrName,superRegionId,regionType, selRegionId);
			data.put("contracts", invPlanList);
			break;
		case "pmTbBiddingInfo": //招投标  √
			fn = "pmTbBiddingInfo";
			List<Map<String, Object>> biddingList = iPmTbBiddingInfoService.queryData(regionId, year, state, irrName,superRegionId,regionType, selRegionId);
			data.put("contracts", biddingList);
			break;
		case "pmTbProjectStart": //开工报验 √
			fn = "pmTbProjectStart";
			List<Map<String, Object>> proStartList = pmTbProjectStartService.queryData(regionId, year, state, irrName,superRegionId,regionType, selRegionId);
			data.put("contracts", proStartList);
			break;
		case "pmTbProjectProgress": //建设进度 √
			fn = "pmTbProjectProgress";
			List<Map<String, Object>> progressList = iPmTbProjectProgressService.queryData(regionId, year, state, irrName,superRegionId,regionType, selRegionId);
			data.put("contracts", progressList);
			break;
		case "pmTbProjectAcceptance": //验收管理 √
			fn = "pmTbProjectAcceptance";
			List<Map<String, Object>> proAccList = iPmTbProjectAcceptanceService.queryData(regionId, year, state, irrName,superRegionId,regionType, selRegionId);
			data.put("contracts", proAccList);
			break;
		
		default:
			break;
		}
		
		 try {		
			 response.setContentType("application/vnd.ms-excel");
			 response.setHeader("Content-disposition", "attachment;filename="+new String(("测试导出信息_"+ new SimpleDateFormat("yyyy-MM-dd").format(new Date()).toString() +".xlsx").getBytes(), "iso-8859-1"));
			 OutputStream out = response.getOutputStream();
			 
			//重点 工具类
			ExcelWriter.write(this.getClass().getClassLoader().getResourceAsStream("export/build/"+fn+".xlsx"), out, data);
		} catch (Exception e) {
//			log.warning(e.getMessage());
			e.printStackTrace();
		}
	}

	@Override
	public int deleteFile(String id) {
		int count = 0;
		try {
			count = pmTbFilesMapper.deleteByPrimaryKey(id);
		} catch (Exception e) {
			log.info("删除附件异常,异常位置:ExportFileServiceImpl.deleteFile:异常原因:", e);
		}
		
		return count;
	}

	@Override
	public List<Map<String, Object>> selectFileById(String id, String localIp) {
		List<Map<String, Object>> fileList= pmTbFilesMapper.selectFileById(id);
		for (Map<String, Object> map : fileList) {
			map.put("url", localIp + G4Utils.getMapValue2String(map, "filePath"));
		}
		return fileList;
	}
		

	
}

3.将设计好的excel模板放到指定位置

4.ExcelWriter.write()方法

package com.rhxt.util;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Map;

import org.jxls.common.Context;
import org.jxls.util.JxlsHelper;

/**
 * 通过模板导出Excel的工具
 * @author Dylan
 *
 */
public class ExcelWriter {
	
	/**
	 * 根据模板输出Excel文件
	 * @param templateInputStream 模板输入流
	 * @param out 要写入的流,一般为文件流或网络流
	 * @param vars 上下文变量
	 * @throws IOException
	 */
	public static void write(InputStream templateInputStream, OutputStream out, Map<String, ? super Object> vars) throws IOException {
		Context context = new Context(vars);		
		JxlsHelper.getInstance().processTemplate(templateInputStream, out, context);
	}
	
	/**
	 * 根据模板输出Excel文件
	 * @param templateFile 模板文件
	 * @param out 要写入的流,一般为文件流或网络流
	 * @param vars 上下文变量
	 * @throws FileNotFoundException
	 * @throws IOException
	 */
	public static void write(File templateFile, OutputStream out, Map<String, ? super Object> vars) throws FileNotFoundException, IOException {
		try (InputStream templateInputStream = new FileInputStream(templateFile)) {
			write(templateInputStream, out, vars);
		}
		
	}
	
	/**
	 * 根据模板输出Excel文件
	 * @param templateFileName 模板文件全名,包含路径
	 * @param out 要写入的流,一般为文件流或网络流
	 * @param vars 上下文变量
	 * @throws FileNotFoundException
	 * @throws IOException
	 */
	public static void write(String templateFileName, OutputStream out, Map<String, ? super Object> vars) throws FileNotFoundException, IOException {
		try (InputStream templateInputStream = new FileInputStream(templateFileName)) {
			write(templateInputStream, out, vars);
		}
		
	}

}

二.前端Vue代码

1.接口

//项目管理表格导出 
    post_XMJYS_exportData:(data) => axios.post(`${proHost}/GDXXH/exportFile/exportTradeCreditData`,data,{
        responseType:'blob',
        headers: {'Content-Type': 'application/json'},
    }),

2.代码

//项目管理 表格导出
async handleExportData({commit}, option){
        let data = {
            ...option,
        }
        let res = await api.post_XMJYS_exportData(data);
        exportDown(res, option.fileName);
    },
// 文件下载
const exportDown = (data, name) =>{
    const blob = new Blob([data], { type: "application/xls" });
    const elink = document.createElement("a");
    elink.download = name + ".xls";
    elink.style.display = "none";
    elink.href = URL.createObjectURL(blob);
    document.body.appendChild(elink);
    elink.click();
    URL.revokeObjectURL(elink.href); // 释放URL对象
    document.body.removeChild(elink);
}

三.Excel模板

1.将对应的字段也就是list中的key放到你想放在的位置(${contract.CITY_NAME})

 2.加入批注

表头批注(jx:area(lastCell = "BB5"))

字段批注(jx:each(items="contracts" var="contract" lastCell="BB5"))

模板需要遍历的最后一行最后一列

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/572608.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

路面积水监测传感器有哪些?路面积水传感器的作用是什么?

路面积水是指在降雨或其他因素下&#xff0c;道路表面无法及时排水而形成的水体堆积现象。路面积水不仅对交通安全造成威胁&#xff0c;还可能对道路结构和交通设施造成损害&#xff0c;严重影响了城市生命线的安全运行。近年来&#xff0c;随着物联网传感技术的兴起&#xff0…

Spring高手之路——深入理解注解驱动配置与XML配置的融合与区别

文章目录 1. 配置类的编写与Bean的注册2. 注解驱动IOC的依赖注入与XML依赖注入对比3. 组件注册4. 组件扫描4.1 使用ComponentScan的组件扫描4.2 xml中启用component-scan组件扫描4.3 不使用ComponentScan的组件扫描 5. 组件注册的其他注解6. 将注解驱动的配置与XML驱动的配置结…

Windows下搭建paddlenlp 语义检索系统

windos下搭建paddlenlp 语义检索系统 之前搭建paddleocr的时候&#xff0c;创建了paddle的虚拟环境&#xff0c;顺便也装了paddlenlp的库&#xff0c;就想着直接用这个&#xff0c;然后语义检索模型本身没有问题了&#xff0c;可以正常推理了。但在搭建pipline的时候出现问题&…

工程测量--学习笔记

1、测量学的概念 测量学是研究地球的形状、大小以及地表&#xff08;包括地面上各种物体&#xff09;的几何形状及其空间位置的科学。 2、工程测量的概念 工程测量是运用测量学的基本原理和方法为各类工程服务。 3、测量工作分类 测量工作包括测定和测设两部分。 测定是指使用…

算法|2.异或运算

算法|2.异或运算 1.不用额外变量交换两个数的值 题意&#xff1a;不用额外变量交换&#xff08;数组中&#xff09;两个数的值 解题思路&#xff1a; 使用异或运算的性质 代码及运行结果&#xff1a; 2.找到唯一出现奇数次的数字 题意&#xff1a;一个数组中有一种数出现了…

这才是网络安全最系统的学习路线(建议收藏)

01 什么是网络安全 网络安全可以基于攻击和防御视角来分类&#xff0c;我们经常听到的 “红队”、“渗透测试” 等就是研究攻击技术&#xff0c;而“蓝队”、“安全运营”、“安全运维”则研究防御技术。 无论网络、Web、移动、桌面、云等哪个领域&#xff0c;都有攻与防两面…

一些小的问题

是否是质数&#xff1f; #include <stdio.h> #include <stdbool.h>bool is_prime(int num);int main() {int num;printf("请输入一个整数&#xff1a;");scanf("%d", &num);if (is_prime(num)) {printf("%d是质数。\n", num);} …

【萌新指南】如何获得铁粉?快收下我为你精心定制的涨粉秘籍吧

文章目录 前言"铁粉"介绍"铁粉"规则"铁粉"获取高质量博客坚持写博客参与活动 尾声 前言 目前博主的"铁粉"数量 "铁粉"介绍 "铁粉"是为了帮助博主解决上面提到的问题和困惑&#xff0c; CSDN 设计的一个功能&…

STM8、STM8S003F3P6 通过ZM470SX-MP模组实现lora通信

背景 现在物联网就是很火&#xff0c;lora是避免不开的&#xff0c;也有个项目采用STM8S003F3P6 使用周立功的lora模组ZM470SX-MP实现lora通信。 原理图 废话少说&#xff0c;上原理图 这个原理图我找了很久都没有找到&#xff0c;指示找到了管脚图&#xff0c;这个原理图非…

Linux——线程的同步与互斥

目录 模拟抢火车票的过程 代码示例 thread.cc Thread.hpp 运行结果 分析原因 tickets减到-2的本质 解决抢票出错的方案 临界资源的概念 原子性的概念 加锁 定义 初始化 销毁 代码形式如下 代码示例1&#xff1a; 代码示例2&#xff1a; 总结 如何看待锁 申…

2.自然语言处理NLP:词映射为向量——词嵌入(word embedding)

1. 什么是词嵌入&#xff08;word2vec&#xff09; &#xff1a; 把词映射为向量&#xff08;实数域&#xff09;的技术 2. 为什么不采用one-hot向量&#xff1a; one-hot词向量无法准确表达不同词之间的相似度&#xff0c;eg&#xff1a;余弦相似度&#xff0c;表示夹角之间的…

创新案例|Amazon如何打造增长飞轮保持每年20%以上的营收增速

作为世界五百强中的头部企业&#xff0c;亚马逊的价值定位经历了三次转变&#xff0c;从成为“地球上最大的书店”&#xff0c;到成为最大的综合网络零售商&#xff0c;再到成为“最以客户为中心的企业”&#xff0c;亚马逊最终以“客户中心”破除了对企业价值定位的束缚&#…

DNS风险分析及安全防护研究(三):DNS缓存投毒及防御策略

在前面章节中&#xff0c;我们简单介绍了DNS系统在协议、软件以及结构中脆弱性&#xff0c;并对DNSSEC协议、去中心化结构等安全增强进行了讨论&#xff0c;接下来针对DNS安全所面临的外部攻击威胁和相应的防御策略做下讨论。 1.DNS缓存投毒攻击 在目前各种DNS攻击手段中&…

安科瑞浅谈集成式电力电容器无功补偿装置的技术特点

安科瑞 徐浩竣 江苏安科瑞电器制造有限公司 zx acrelxhj 摘要&#xff1a;阐述了集成式电力电容器无功补偿装置的组成与应用状况&#xff0e;在与常规电力电容器对比的基础上&#xff0c;分析了集成式电力电容器无功补偿装置的技术特点。通过对集成式无功补偿装置原理结构的…

Linux文件系统、磁盘I/O是怎么工作的?

同CPU、内存一样&#xff0c;文件系统和磁盘I/O&#xff0c;也是Linux操作系统最核心的功能。磁盘为系统提供了最基本的持久化存储。文件系统则在磁盘基础上&#xff0c;提供了一个用来管理文件的树状结构。 目录&#xff1a; 一. 文件系统 1. 索引节点和目录项 2. 虚拟文件系…

提升国际品牌影响力:小企业海外网红营销实战指南

在当今数字化时代&#xff0c;小企业们越来越意识到海外市场的巨大潜力。与此同时&#xff0c;海外网红的崛起也为小企业提供了一个独特的机会&#xff0c;通过与他们合作&#xff0c;迅速拓展国际市场并吸引更多目标受众的关注。然而&#xff0c;对于许多小企业来说&#xff0…

超全性能测试-全链路压测总结,完整一套从环境到脚本详细...

目录&#xff1a;导读 前言一、Python编程入门到精通二、接口自动化项目实战三、Web自动化项目实战四、App自动化项目实战五、一线大厂简历六、测试开发DevOps体系七、常用自动化测试工具八、JMeter性能测试九、总结&#xff08;尾部小惊喜&#xff09; 前言 性能测试&#xf…

类和对象 --- 封装+对象特性

&#x1f442; 快乐E调 - 林澜叶 - 单曲 - 网易云音乐 &#x1f442; Plain Jane (Freestyle) - Ombre2Choc Nation - 单曲 - 网易云音乐 1.5倍速&#xff0c;跟着敲&#xff0c;初识C 目录 &#x1f3c6;封装 &#x1f333;属性和行为作为整体 &#x1f333;案例 -- 设置…

js数组去重与循环对象

目录 一、数组对象去重 1.1、需要获取重复数据 1.2、直接过滤filterfindIndex 二、循环对象 三、多层数组对象过滤 一、数组对象去重 1.1、需要获取重复数据 let persons [{"name": "yzq","age": 20,"gender": true,"hei…

k8s配置资源管理|secret|configmap

k8s配置资源管理|secret|configmap 一 配置资源管理1 创建 Secret2 使用方式3 将 Secret 导出到环境变量中 二 ConfigMap1 Pod 中使用 ConfigMap2 Pod的创建3 用 ConfigMap 设置命令行参数4 通过数据卷插件使用ConfigMap 一 配置资源管理 //Secret Secret 是用来保存密码、tok…