代码小积累(2021-07-21)
1、前端添加请求延时操作,防止点击一个按钮,发起多次请求
延时操作方法1:
async methods(val) {
//第一步:设置等待(element自带方法)
let loading = this.$loading({
lock: true,
text: '请勿切换页面或刷新,避免数据丢失',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
await this.$http
.post('api/cSrmPurchase/createPurchaseDemand', val)
.then(res => {
console.log(res)
//添加成功
if (res.data.code == '200') {
this.$message({
type: 'success',
message: res.data.msg
})
//
this.$emit('update:dialogVisible', false)
//第二步:请求成功关闭请求延时操作(最好放到请求code==200中或者是异常中)
loading.close()
} else {
this.$message({
type: 'error',
message: res.data.msg
})
loading.close()
}
})
.catch(err => {
//添加失败提示
console.log(err)
loading.close()
this.$message({
type: 'error',
message: err
})
})
}
延时操作方法2:
<vue-element-loading :active="waitFlag" spinner="line-scale" :is-full-screen="true" />
//使用waitFlag的true与false来控制占满屏幕不操作
前端效果图展示
2、页面跳转
this.$router.push({ path: '/supplierPerformanceAssess', query: { row: row } })
3、时间控件
<el-date-picker
v-model="table.time"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd HH:mm:ss"
style="width:197px"
placeholder="选择日期">
</el-date-picker>
4、下拉框的使用
循环
<el-form-item v-if="item.label=='供应商'" :label="item.label">
<el-select v-model="form[item.prop]" multiple placeholder="请选择">
<el-option v-for="item in supplierOptions" :key="item.supplierCode" :label="item.name" :value="item.supplierCode">
</el-option>
</el-select>
</el-form-item>
常规
<el-form-item label="是否启用">
<el-select placeholder="请输入合同性质" clearable style="width: 205px" v-model="purchaseModleSearchData.status">
<el-option value="1" label="启用"></el-option>
<el-option value="2" label="未启用"></el-option>
</el-select>
</el-form-item>
5、请求语句
请求语句
const { data: res } = await this.$http.post(
'/MES_System/cSrmSupplier/findSupplierManagement',
JSON.parse(JSON.stringify(this.enterpriseCondition))
)
if (res.code == 200) {
this.suppliertableData = res.result.list
} else {
this.$message.error(res.msg)
}
路由跳转语句
this.$route.query.supplierCode
6、操作语句
<el-table-column label="操作" min-width="100" fixed="right">
<template slot-scope="scope">
<el-button type="primary" size="small" style="float:left;" @click="showTableR(scope.row)">
详情
</el-button>
</template>
</el-table-column>
7、使用循环table
<el-table :data="supplierH" border align:center style="width: 100%;" ref="configsucsRef">
<el-table-column v-for="(col,colIndex) in supplierHData" :key="`colIndex${colIndex}`" :prop="col.p" :label="col.l">
<template slot-scope="scope">
<!-- <el-input v-model.trim="scope.row[col.p]" v-if="col.t==1" placeholder="请输入内容"> </el-input> -->
<div v-if="col.t==1">
<span>{{scope.row[col.p]}}</span>
</div>
<div v-if="col.t==10">
<span v-if="scope.row[col.p]==1">注册</span>
<span v-if="scope.row[col.p]==2">潜在</span>
<span v-if="scope.row[col.p]==3">合格</span>
<span v-if="scope.row[col.p]==4">淘汰</span>
</div>
<div v-if="col.t==11">
<span v-if="scope.row[col.p]==1">注册</span>
<span v-if="scope.row[col.p]==2">潜在</span>
<span v-if="scope.row[col.p]==3">合格</span>
<span v-if="scope.row[col.p]==4">淘汰</span>
</div>
<div v-if="col.t==12">
<span v-if="scope.row[col.p]==0">冻结</span>
<span v-if="scope.row[col.p]==1">未认证</span>
<span v-if="scope.row[col.p]==2">认证中</span>
<span v-if="scope.row[col.p]==3">已认证</span>
<span v-if="scope.row[col.p]==4">认证失败</span>
</div>
</template>
</el-table-column>
<el-table-column label="操作" min-width="100" fixed="right">
<template slot-scope="scope">
<el-button type="primary" size="small" style="float:left;" @click="showTableR(scope.row)">
详情
</el-button>
</template>
</el-table-column>
</el-table>
export default {
data() {
return {
supplierH: [],
supplierHData: [
{ l: '申请单编号', p: 'requestCode', t: '1' },
{ l: '供应商编码', p: 'supplierCode', t: '1' },
{ l: '供应商名称', p: 'name', t: '1' },
{ l: '当前阶段', p: 'currentGeneration', t: '10' },
{ l: '目标阶段', p: 'targetPhase', t: '11' },
{ l: '创建时间', p: 'createTime', t: '1' },
{ l: '公司编码', p: 'companyCode', t: '1' },
{ l: '公司名称', p: 'companyName', t: '1' },
{ l: '得分', p: 'sumScore', t: '1' },
{ l: '等级', p: 'grade', t: '1' },
{ l: '状态', p: 'status', t: '12' }
],
supplierR: [],
supplierRData: [
{ l: '评价项目编号', p: 'evaluationItemNo', t: '1' },
{ l: '评价项目', p: 'evaluationItem', t: '1' },
{ l: '评价标准', p: 'evaluationCriterion', t: '1' },
{ l: '评分方式', p: 'scoreIs', t: '1' },
{ l: '分值从', p: 'scoreStart', t: '1' },
{ l: '分值至', p: 'scoreStop', t: '1' },
{ l: '得分', p: 'score', t: '1' },
{ l: '权重(%)', p: 'weight', t: '1' },
{ l: '评分人信息', p: 'gradingStaff', t: '1' }
]
}
},
8、批量操作
//html
<el-table :data="showCompany" border align:center style="width: 100%;" ref="configsucsRef">
<el-table-column type="selection" :selectable='checkboxSelect' width="55"></el-table-column>
</el-table>
//vue.js
//批量选择公司
configsucsx() {
let arr = []
var data = this.$refs.configsucsRef.selection
data.forEach(function (item) {
arr.push(item.companyCode)
})
if (this.flagx == 1) {
this.addModel[parseInt(this.editIndex)].adapterCompany = arr
} else if (this.flagx == 2) {
this.purchaseModleData[parseInt(this.editIndex)].adapterCompany = arr
}
this.showAddCompanyDialog = false
},
//批量点击事件
checkboxSelect(row, rowIndex){
if (row.TASK_STATUS==0||row.TASK_STATUS==2) {
return false // 禁用
}else{
return true // 不禁用
}
},
//点击事件查询(控制重复数据点击)
// 批量点击事件
checkboxSelect(row, rowIndex) {
// console.log(123);
var data = this.$refs.configsucsRef.selection
if (data.length > 0) {
console.log(data[0].companyName)
if (row.companyName == data[0].companyName) {
return true
} else {
return false
}
} else {
return true
}
},
9、尾端button
<div slot="footer" class="dialog-footer" align="center">
<el-button @click="showAddCompanyDialog = false">取 消</el-button>
<el-button type="primary" @click="configsucsx()">选 择</el-button>
</div>
10、下拉框选择
//html
<div v-if="col.type==undefined" class="cell">{{col.format == undefined? scope.row[col.p]:col.format(scope.row[col.p])}}</div>
//参数设置
tableColumn: [
{
p: 'status',
l: '订单状态',
format: value => {
if (value === '1') {
return '新建'
} else if (value === '2') {
return '已审批'
} else if (value === '3') {
return '待确认'
} else if (value === '4') {
return '已确认'
} else if (value === '5') {
return '已拒绝'
}
}
}]
11、触发table的行函数
//html
<el-table :data="gridData" style="width: 100%" border @row-click="slData">
</el-table>
//vue.js
slData(row, column, event) {
this.$emit('rtQuestData', row)
this.innerVisible = false
// console.log('🚀 ~ file: requestDialog.vue ~ line 99 ~ slData ~ row', row)
}
12、弹框组件展示选择供应商
<!-- 文本框点击事件 -->
<el-col :span="8">
<el-form-item label="考评对象:" :label-width="formLabelWidth" prop="supplierCode">
<el-input v-model="enterpriseCondition.supplierCode" style="width: 205px" :disabled="isShowInput" readonly @focus="showCompanyInfo($event)"></el-input>
</el-form-item>
</el-col>
<!-- 展示公司Dialog -->
<el-dialog title="考评对象信息展示" :visible.sync="showAddCompanyDialog" :close-on-click-modal="false" center width="1060px">
<el-table :data="showSupplier" border align:center style="width: 100%;" @row-click="slData">
<el-table-column v-for="(col,colIndex) in addCompanyHeadInfo" :key="`colIndex${colIndex}`" :prop="col.p" :label="col.l">
</el-table-column>
</el-table>
</el-dialog>
// 选择供应商
slData(row, column, event){
this.enterpriseCondition.supplierCode = row.name;
this.showAddCompanyDialog=false;
},
13、获取Cookies数据
JSON.parse(this.$base64.decode(this.$cookieStore.getCookie('user'))).supplierCode
14、JSON相关操作
1、在数组(table)中加入一个json对象作为行数据
let data={"www":123}
this.addModel1.push(JSON.parse(JSON.stringify(data)));
2、在表单(form)中赋值JSON对象
let data={"www":123}
this.form=JSON.parse(JSON.stringify(data));
3、JSON对象拼接
//两个数组对象不能添加[{},{}],[{},{}]
var json1 = { name: 'jack' };
var json2 = { age: 18};
var json3 = JSON.parse((JSON.stringify(json1) + JSON.stringify(json2)).replace(/}{/, ','));
console.log(json3); //{name: "jack", age: 18}
//方法2
var json3 = JSON.parse(JSON.stringify({...json1,...json2}))
4、JSON对象删除
delete testJson['key']
5、JSON对象添加
testJson['key']="value"
15、密码校验
//vue
data() {
var validatePass2 = (rule, value, callback) => {
if (value === '') {
callback(new Error('请再次输入密码'));
}
// else if (value.length<6 || value.length >16){
// callback(new Error('密码长度不符!'));
// }
else if (value !== this.changePwd.passNew) {
callback(new Error('两次输入密码不一致!'));
} else {
callback();
}
};
return {
//表单校验
rules2: {
checkPass: [
{ required: true, validator: validatePass2, trigger: 'blur' },
],
}
}
}
16、浏览器刷新+回退+前进
history.back():后退
history.forword():前进
history是浏览记录对象,go()方法可以跳到以当前页为基准的某个历史页面
history.go(0): 刷新当前页
history.go(1): 前进+刷新
history.go(-1):后退+刷新
history.go(-n): 回到前第n次的页面
go(-1):返回上一页,原页面表单中的内容会丢失;back():返回上一页,原页表表单中的内容会保留。
17、length、length()、size()
1 java中的length属性是针对数组说的,比如说你声明了一个数组,想知道这个数组的长度则用到了length这个属性. arr.length
2 java中的length()方法是针对字符串String说的,如果想看这个字符串的长度则用到length()这个方法. string.length()
3.java中的size()方法是针对泛型集合说的,如果想看这个泛型有多少个元素,就调用此方法来查看! arrayList.size()
18、多条件查询(合并按钮)
<el-popover v-model="searchVisible"
placement="bottom"
style="text-algin: center; float: right; margin-right: 20px"
width="350">
<div style="margin: 12px; text-align: center">
<el-form :model="searchForm"
ref="searchForm"
label-width="80px"
label-position="left">
<el-form-item :label="$t('客户名称')+':'"
prop="customerName">
<el-input style="width: 205px"
v-model="searchForm.customerName"
:placeholder="$t('请输入客户名称')"
clearable />
</el-form-item>
<el-form-item :label="$t('客户类型')"
prop="customerType">
<el-select v-model="searchForm.customerType"
:placeholder="$t('请选择客户类型')"
clearable
style="width: 205px">
<el-option :label="$t('我的客户')"
:value="$t('我的客户')"></el-option>
<el-option :label="$t('潜在客户')"
:value="$t('潜在客户')"></el-option>
<el-option :label="$t('睡眠客户')"
:value="$t('睡眠客户')"></el-option>
</el-select>
</el-form-item>
</el-form>
<el-button type="info"
size="mini"
@click="resetForm('searchForm')">{{$t('重置')}}</el-button>
<el-button type="primary"
size="mini"
@click="searchCustomerInfo()">{{$t('查询')}}</el-button>
</div>
<el-button v-if="$_but('crm:searchBaseCustomer')"
slot="reference"
icon="el-icon-search"
type="primary">{{$t('多条件查询')}}</el-button>
</el-popover>
19、谷歌浏览器(切换用户后Cookie不共用)
实现效果:重新使用网址互相不干扰
20、vue出现绑定后数据更新无反应–解决方案
vue强制更新$forceUpdate()
添加this.$forceUpdate();进行强制渲染,效果实现。搜索资料得出结果:因为数据层次太多,render函数没有自动更新,需手动强制刷新。
调用强制更新方法this.$forceUpdate()会更新视图和数据,触发updated生命周期。
我是在使用多层for循环嵌套时出现的页面没有及时刷新改变后的值的问题( 使用this.$forceUpdate() )
21、分页处理
<el-pagination class="pages"
align="center"
background
layout="total,prev, pager, next"
:page-size="pageSize"
:total="total"
@current-change="handleCurrentChange" />
data() {
return {
searchForm: {
pageNum: 1,
pageSize: 20,
status: 4
},
total: 0,
pageSize: 0
}
}
methods: {
handleCurrentChange(newPage) {
this.searchForm.pageNum = newPage
this.initData()
},
async initData() {
await this.$http
.post('/MES_System/cSrmPurchase/findPurchaseDemandH', this.searchForm)
.then(res => {
if (res.data.code == '200') {
this.gridData = res.data.result.list
this.total = res.data.result.total
this.pageSize = res.data.result.pageSize
} else {
this.$message({
type: 'error',
message: res.data.msg
})
}
})
.catch(err => {
this.$message({
type: 'error',
message: err
})
})
}
}
23、取值显示问题
await 表达式会暂停当前 async function 的执行,等待 Promise 处理完成。若 Promise 正常处理(fulfilled),其回调的resolve函数参数作为 await 表达式的值,继续执行 async function。
若 Promise 处理异常(rejected),await 表达式会把 Promise 的异常原因抛出。
另外,如果 await 操作符后的表达式的值不是一个 Promise,则返回该值本身。
链接:https://blog.csdn.net/weixin_41585557/article/details/79170030
24、项目导入无法识别为maven项目
Idea导入maven项目没有识别
选中module的pom.xml,右键,选择" add as maven project",idea会识别该pom的项目
链接:https://www.cnblogs.com/qinxu/p/12058754.html
25、删除语句
async del() {
this.$confirm(this.$t('此操作将永久删除该条数据, 是否继续?'), this.$t('提示'), {
cancelButtonText: this.$t('取消'),
confirmButtonText: this.$t('确定'),
type: 'warning'
})
.then(async () => {
const { data: res } = await this.$http.post(
'/MES_System/cSrmPurchase/delPurchaseOrder',
JSON.parse(JSON.stringify({ orderNumber: this.headForm.orderNumber }))
)
if (res.code == 200) {
this.$message.success(this.$t('删除成功'))
} else {
this.$message.error(res.msg)
}
})
.catch(() => {
this.$message({
type: 'error',
message: this.$t('已取消删除')
})
})
},
26、导出功能
formatJson(filterVal, jsonData) {
return jsonData.map(v => filterVal.map(j => v[j]))
},
async exportExcel() {
let _this = this
let datas = { customerName: this.searchForm.customerName, customerType: this.searchForm.customerType }
const { data: res } = await this.$http.post(`/MES_System/crm/showCustomerBaseInfoList`, qs.stringify(datas))
console.log(res)
require.ensure([], () => {
const { export_json_to_excel } = require('@/vendor/Export2Excel')
const tHeader = [_this.$t('客户描述'), _this.$t('客户名称'), _this.$t('客户类型')] // 上面设置Excel的表格第一行的标题
const filterVal = ['CUSTOMER_PROFILE', 'CUSTOMER_NAME', 'CUSTOMER_TYPE'] // 上面的index、nickName、name是tableData里对象的属性
const list = res.result // 把data里的tableData存到list
const data = this.formatJson(filterVal, list)
// const myRowFont = 5
export_json_to_excel(tHeader, data, _this.$t('客户信息excel')) // 标题,数据,文件名
})
},
链接:https://www.cnblogs.com/bester-ace/articles/10781378.html
27、后端导出
@RequestMapping("/moduleExport")
public void moudleExcel(HttpServletRequest request,HttpServletResponse response) throws Exception {
String sn = request.getParameter("sn");
HSSFWorkbook book = new HSSFWorkbook();//excel的文档对象
SimpleDateFormat s = new SimpleDateFormat("yyyyMMddHHmmss");
ExcelUtil.moudleExcel(sn,book);
ExcelUtil.export(response, book, s.format(new Date()) + ".xls");
}
/**
* 模组报表
* @throws Exception
*/
public static void moudleExcel(String sn,HSSFWorkbook wr) throws Exception{
ApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring-config.xml"); //加载spring配置文件
CMesModuleTableServiceImpl service = (CMesModuleTableServiceImpl)applicationContext.getBean("CMesModuleTableServiceImpl");//获取模组报表servic对象
int num = 0; //行数
//头标题
HSSFFont font1 = wr.createFont();
font1.setColor(IndexedColors.BLACK.index); // 字体颜色
font1.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD); // 加粗
font1.setFontName("宋体"); // 字体样式
font1.setFontHeightInPoints((short) 18); // 字体大小
//普通字体
HSSFFont font = wr.createFont();
font.setColor(IndexedColors.BLACK.index); // 字体颜色
font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD); // 加粗
font.setFontName("宋体"); // 字体样式
font.setFontHeightInPoints((short) 13); // 字体大小
//头标题
HSSFCellStyle cellStyle = wr.createCellStyle();
cellStyle.setFont(font1);
cellStyle.setAlignment(HSSFCellStyle.ALIGN_LEFT); // 居左
cellStyle.setFillForegroundColor(HSSFColor.YELLOW.index);
cellStyle.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);
cellStyle.setFillBackgroundColor(HSSFColor.YELLOW.index); // 设置背景颜色
cellStyle.setBorderBottom(HSSFCellStyle.BORDER_THIN);//下边框
cellStyle.setBorderLeft(HSSFCellStyle.BORDER_THIN);//左边框
cellStyle.setBorderTop(HSSFCellStyle.BORDER_THIN);//上边框
cellStyle.setBorderRight(HSSFCellStyle.BORDER_THIN);//右边框
//表明
HSSFCellStyle cellStyletag = wr.createCellStyle();
cellStyletag.setFont(font1);
cellStyletag.setAlignment(HSSFCellStyle.ALIGN_CENTER); // 居左
cellStyletag.setFillForegroundColor(HSSFColor.GREEN.index);
cellStyletag.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);
cellStyletag.setFillBackgroundColor(HSSFColor.GREEN.index); // 设置背景颜色
cellStyletag.setBorderBottom(HSSFCellStyle.BORDER_THIN);//下边框
cellStyletag.setBorderLeft(HSSFCellStyle.BORDER_THIN);//左边框
cellStyletag.setBorderTop(HSSFCellStyle.BORDER_THIN);//上边框
cellStyletag.setBorderRight(HSSFCellStyle.BORDER_THIN);//右边框
//字段名
HSSFCellStyle cellStyle1 = wr.createCellStyle();
cellStyle1.setFont(font);
cellStyle1.setAlignment(HSSFCellStyle.ALIGN_CENTER); // 居中
cellStyle1.setFillForegroundColor(HSSFColor.AQUA.index);
cellStyle1.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);
cellStyle1.setFillForegroundColor(HSSFColor.AQUA.index); // 设置红色背景颜色
cellStyle1.setBorderBottom(HSSFCellStyle.BORDER_THIN);//下边框
cellStyle1.setBorderLeft(HSSFCellStyle.BORDER_THIN);//左边框
cellStyle1.setBorderTop(HSSFCellStyle.BORDER_THIN);//上边框
cellStyle1.setBorderRight(HSSFCellStyle.BORDER_THIN);//右边框
//内容
HSSFCellStyle cellStyle2 = wr.createCellStyle();
cellStyle2.setAlignment(HSSFCellStyle.ALIGN_CENTER); // 居中
cellStyle2.setBorderBottom(HSSFCellStyle.BORDER_THIN);//下边框
cellStyle2.setBorderLeft(HSSFCellStyle.BORDER_THIN);//左边框
cellStyle2.setBorderTop(HSSFCellStyle.BORDER_THIN);//上边框
cellStyle2.setBorderRight(HSSFCellStyle.BORDER_THIN);//右边框
HSSFSheet sheet = wr.createSheet("Sheet"); // 创建一个sheet页、
sheet.setColumnWidth(0, 100 * 60); // 设置列宽度
sheet.setColumnWidth(1, 100 * 60);
sheet.setColumnWidth(2, 100 * 60);
sheet.setColumnWidth(3, 100 * 60);
sheet.setColumnWidth(4, 100 * 60);
sheet.setColumnWidth(5, 100 * 60);
sheet.setColumnWidth(6, 100 * 60);
sheet.setColumnWidth(7, 100 * 60);
sheet.setColumnWidth(8, 100 * 60);
sheet.setColumnWidth(9, 100 * 60);
sheet.setColumnWidth(10, 100 * 60); // 设置列宽度
sheet.setColumnWidth(11, 100 * 60);
sheet.setColumnWidth(12, 100 * 60);
sheet.setColumnWidth(13, 100 * 60);
sheet.setColumnWidth(14, 100 * 60);
sheet.setColumnWidth(15, 100 * 60);
sheet.setColumnWidth(16, 100 * 60);
sheet.setColumnWidth(17, 100 * 60);
sheet.setColumnWidth(18, 100 * 60);
sheet.setColumnWidth(19, 100 * 60);
sheet.setColumnWidth(20, 100 * 60);
sheet.setColumnWidth(21, 100 * 60);
sheet.setColumnWidth(22, 100 * 60);
sheet.setColumnWidth(23, 100 * 60);
sheet.setColumnWidth(24, 100 * 60);
sheet.setColumnWidth(25, 100 * 60);
sheet.setColumnWidth(26, 100 * 60);
sheet.setColumnWidth(27, 100 * 60);
sheet.setColumnWidth(28, 100 * 60);
sheet.setColumnWidth(29, 100 * 60);
sheet.setColumnWidth(30, 100 * 60);
sheet.setColumnWidth(31, 100 * 60);
sheet.setColumnWidth(32, 100 * 60);
sheet.setColumnWidth(33, 100 * 60);
sheet.setColumnWidth(34, 100 * 60);
sheet.setColumnWidth(35, 100 * 60);
sheet.setColumnWidth(36, 100 * 60);
sheet.setColumnWidth(37, 100 * 60);
sheet.setColumnWidth(38, 100 * 60);
sheet.setColumnWidth(39, 100 * 60);
sheet.setColumnWidth(40, 100 * 60);
sheet.setColumnWidth(41, 100 * 60);
sheet.setColumnWidth(42, 100 * 60);
sheet.setColumnWidth(43, 100 * 60);
// 合并单元格:参数:起始行, 终止行, 起始列, 终止列
CellRangeAddress cra = new CellRangeAddress(0, 0, 0, 10);
sheet.addMergedRegion(cra);
RegionUtil.setBorderTop(HSSFBorderFormatting.BORDER_THICK, cra, sheet, wr);
HSSFRow createRow = sheet.createRow(num); // 创建第一行总成数据
createRow.setHeight((short) 480);
HSSFCell createCell = createRow.createCell(0);
createCell.setCellValue("总成: "+sn);
createCell.setCellStyle(cellStyle);
//C_MES_OCV_TESTING_T表
CellRangeAddress cra1 = new CellRangeAddress(num+2, num+2, 0, 6); //表名横跨多少列(6代表列)从0列0行开始数代表的1行1列
sheet.addMergedRegion(cra1);
RegionUtil.setBorderTop(HSSFBorderFormatting.BORDER_THICK, cra1, sheet, wr);
HSSFRow createRowtag1 = sheet.createRow(num+2); // 表名
createRowtag1.setHeight((short) 380);
HSSFCell createCelltag1 = createRowtag1.createCell(0);
createCelltag1.setCellValue("OCV");
createCelltag1.setCellStyle(cellStyletag);
HSSFRow createRow1 = sheet.createRow(num+3); // 字段名
createRow1.setHeight((short) 380);//设置行高
HSSFCell createCell1 = createRow1.createCell(0);
createCell1.setCellValue("电芯条码");
createCell1.setCellStyle(cellStyle1);
HSSFCell createCell2 = createRow1.createCell(1);
createCell2.setCellValue("时间");
createCell2.setCellStyle(cellStyle1);
HSSFCell createCell3 = createRow1.createCell(2);
createCell3.setCellValue("电压");
createCell3.setCellStyle(cellStyle1);
HSSFCell createCell4 = createRow1.createCell(3);
createCell4.setCellValue("内阻");
createCell4.setCellStyle(cellStyle1);
HSSFCell createCell5 = createRow1.createCell(4);
createCell5.setCellValue("上线状态");
createCell5.setCellStyle(cellStyle1);
HSSFCell createCell6 = createRow1.createCell(5);
createCell6.setCellValue("模组状态");
createCell6.setCellStyle(cellStyle1);
HSSFCell createCell7 = createRow1.createCell(6);
createCell7.setCellValue("工位");
createCell7.setCellStyle(cellStyle1);
//表数据
List<Map<String, Object>> findAll = service.findSCSN(sn);
System.err.println(findAll.size());
num = num+4;
for (int i = 0; i < findAll.size(); i++) {
HSSFRow createRow2 = sheet.createRow(num);
createRow2.setHeight((short) 280);
HSSFCell createCellbt0 = createRow2.createCell(0); // 总成
createCellbt0.setCellValue(String.valueOf(findAll.get(i).get("BATTERIES_NUM")));
createCellbt0.setCellStyle(cellStyle2);
HSSFCell createCellbt17 = createRow2.createCell(1); // 时间
createCellbt17.setCellValue(String.valueOf(findAll.get(i).get("DT")));
createCellbt17.setCellStyle(cellStyle2);
HSSFCell createCellbt1 = createRow2.createCell(2); // 电压
createCellbt1.setCellValue(String.valueOf(findAll.get(i).get("VOLTAGE")));
createCellbt1.setCellStyle(cellStyle2);
HSSFCell createCellbt2 = createRow2.createCell(3); // 内阻
createCellbt2.setCellValue(String.valueOf(findAll.get(i).get("RESISTANCE")));
createCellbt2.setCellStyle(cellStyle2);
HSSFCell createCellbt3 = createRow2.createCell(4); // 上线状态
createCellbt3.setCellValue(String.valueOf(findAll.get(i).get("BATTERIES_STATUS")));
createCellbt3.setCellStyle(cellStyle2);
HSSFCell createCellbt4 = createRow2.createCell(5); // 模组状态
createCellbt4.setCellValue(String.valueOf(findAll.get(i).get("STATUS")));
createCellbt4.setCellStyle(cellStyle2);
HSSFCell createCellbt5= createRow2.createCell(6); // 工位
createCellbt5.setCellValue(String.valueOf(findAll.get(i).get("SOURCE")));
createCellbt5.setCellStyle(cellStyle2);
num = num+1;
}
//c_module_offline_t表
CellRangeAddress cra2 = new CellRangeAddress(num+2, num+2, 0, 4); //表名横跨多少列
sheet.addMergedRegion(cra2);
RegionUtil.setBorderTop(HSSFBorderFormatting.BORDER_THICK, cra2, sheet, wr);
HSSFRow createRowtag2 = sheet.createRow(num+2); // 表名
createRowtag2.setHeight((short) 380);
HSSFCell createCelltag2 = createRowtag2.createCell(0);
createCelltag2.setCellValue("模组下线");
createCelltag2.setCellStyle(cellStyletag);
HSSFRow createRowoffline1 = sheet.createRow(num+3); // 字段名
createRowoffline1.setHeight((short) 380);
HSSFCell createCelloffline1 = createRowoffline1.createCell(0);
createCelloffline1.setCellValue("总成");
createCelloffline1.setCellStyle(cellStyle1);
HSSFCell createCelloffline2 = createRowoffline1.createCell(1);
createCelloffline2.setCellValue("时间");
createCelloffline2.setCellStyle(cellStyle1);
HSSFCell createCelloffline3 = createRowoffline1.createCell(2);
createCelloffline3.setCellValue("状态");
createCelloffline3.setCellStyle(cellStyle1);
HSSFCell createCelloffline4 = createRowoffline1.createCell(3);
createCelloffline4.setCellValue("结果");
createCelloffline4.setCellStyle(cellStyle1);
HSSFCell createCelloffline5 = createRowoffline1.createCell(4);
createCelloffline5.setCellValue("工位");
createCelloffline5.setCellStyle(cellStyle1);
//表数据
List<Map<String, Object>> findAll2 = service.findAll(2, sn);
num = num+4;
for (int i = 0; i < findAll2.size(); i++) {
HSSFRow createRowoffline = sheet.createRow(num);
createRowoffline.setHeight((short) 280);
HSSFCell createCellbt0 = createRowoffline.createCell(0); // 总成
createCellbt0.setCellValue(String.valueOf(findAll2.get(i).get("Barcode")));
createCellbt0.setCellStyle(cellStyle2);
HSSFCell createCellbt17 = createRowoffline.createCell(1); // 时间
createCellbt17.setCellValue(String.valueOf(findAll2.get(i).get("DateTime")));
createCellbt17.setCellStyle(cellStyle2);
HSSFCell createCellbt1 = createRowoffline.createCell(2); // 状态
createCellbt1.setCellValue(String.valueOf(findAll2.get(i).get("State")));
createCellbt1.setCellStyle(cellStyle2);
HSSFCell createCellbt2 = createRowoffline.createCell(3); // 结果
createCellbt2.setCellValue(String.valueOf(findAll2.get(i).get("Reason")));
createCellbt2.setCellStyle(cellStyle2);
HSSFCell createCellbt3 = createRowoffline.createCell(4); // 工位
createCellbt3.setCellValue(String.valueOf(findAll2.get(i).get("Station")));
createCellbt3.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
}
//c_module_ccd_t表
CellRangeAddress cra3 = new CellRangeAddress(num+2, num+2, 0, 3); //表名横跨多少列
sheet.addMergedRegion(cra3);
RegionUtil.setBorderTop(HSSFBorderFormatting.BORDER_THICK, cra3, sheet, wr);
HSSFRow createRowtag3 = sheet.createRow(num+2); // 表名
createRowtag3.setHeight((short) 380);
HSSFCell createCelltag3 = createRowtag3.createCell(0);
createCelltag3.setCellValue("CCD拍照");
createCelltag3.setCellStyle(cellStyletag);
HSSFRow createRowccd1 = sheet.createRow(num+3); // 字段名
createRowccd1.setHeight((short) 380);
HSSFCell createCellccd1 = createRowccd1.createCell(0);
createCellccd1.setCellValue("上传时间");
createCellccd1.setCellStyle(cellStyle1);
HSSFCell createCellccd2 = createRowccd1.createCell(1);
createCellccd2.setCellValue("CCD编码");
createCellccd2.setCellStyle(cellStyle1);
HSSFCell createCellccd3 = createRowccd1.createCell(2);
createCellccd3.setCellValue("高度");
createCellccd3.setCellStyle(cellStyle1);
HSSFCell createCellccd4 = createRowccd1.createCell(3);
createCellccd4.setCellValue("极柱数量编号");
createCellccd4.setCellStyle(cellStyle1);
//表数据
List<Map<String, Object>> findAll3 = service.findAll(3, sn);
num = num+4;
for (int i = 0; i < findAll3.size(); i++) {
HSSFRow createRowccd = sheet.createRow(num);
createRowccd.setHeight((short) 280);
HSSFCell createCellbt0 = createRowccd.createCell(0); // 总成
createCellbt0.setCellValue(String.valueOf(findAll3.get(i).get("UPLOAD_TIME")));
createCellbt0.setCellStyle(cellStyle2);
HSSFCell createCellbt17 = createRowccd.createCell(1); // 时间
createCellbt17.setCellValue(String.valueOf(findAll3.get(i).get("CCD_PHOTOGRAPH_NUM")));
createCellbt17.setCellStyle(cellStyle2);
HSSFCell createCellbt1 = createRowccd.createCell(2); // 状态
createCellbt1.setCellValue(String.valueOf(findAll3.get(i).get("CCD_PHOTOGRAPH_HEIGHT")));
createCellbt1.setCellStyle(cellStyle2);
HSSFCell createCellbt2 = createRowccd.createCell(3); // 状态
createCellbt2.setCellValue(String.valueOf(findAll3.get(i).get("CCD_PHOTOGRAPH_COLUMN_NUM")));
createCellbt2.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
}
//busbar激光焊接表
CellRangeAddress cra4 = new CellRangeAddress(num+2, num+2, 0, 5); //表名横跨多少列
sheet.addMergedRegion(cra4);
RegionUtil.setBorderTop(HSSFBorderFormatting.BORDER_THICK, cra4, sheet, wr);
HSSFRow createRowtag4 = sheet.createRow(num+2); // 表名
createRowtag4.setHeight((short) 380);
HSSFCell createCelltag4 = createRowtag4.createCell(0);
createCelltag4.setCellValue("busbar激光焊接");
createCelltag4.setCellStyle(cellStyletag);
HSSFRow createRowbusbar1 = sheet.createRow(num+3); // 字段名
createRowbusbar1.setHeight((short) 380);
HSSFCell createCellbusbar1 = createRowbusbar1.createCell(0);
createCellbusbar1.setCellValue("上传时间");
createCellbusbar1.setCellStyle(cellStyle1);
HSSFCell createCellbusbar2 = createRowbusbar1.createCell(1);
createCellbusbar2.setCellValue("编码");
createCellbusbar2.setCellStyle(cellStyle1);
HSSFCell createCellbusbar3 = createRowbusbar1.createCell(2);
createCellbusbar3.setCellValue("焊接功率");
createCellbusbar3.setCellStyle(cellStyle1);
HSSFCell createCellbusbar4 = createRowbusbar1.createCell(3);
createCellbusbar4.setCellValue("保护气流量");
createCellbusbar4.setCellStyle(cellStyle1);
HSSFCell createCellbusbar5 = createRowbusbar1.createCell(4);
createCellbusbar5.setCellValue("离焦量");
createCellbusbar5.setCellStyle(cellStyle1);
HSSFCell createCellbusbar6 = createRowbusbar1.createCell(5);
createCellbusbar6.setCellValue("极柱数量编号");
createCellbusbar6.setCellStyle(cellStyle1);
//表数据
List<Map<String, Object>> findAll4 = service.findAll(4, sn);
num = num+4;
for (int i = 0; i < findAll4.size(); i++) {
HSSFRow createRowbusbar = sheet.createRow(num);
createRowbusbar.setHeight((short) 280);
HSSFCell createCellbt0 = createRowbusbar.createCell(0); // 总成
createCellbt0.setCellValue(String.valueOf(findAll4.get(i).get("UPLOAD_TIME")));
createCellbt0.setCellStyle(cellStyle2);
HSSFCell createCellbt17 = createRowbusbar.createCell(1); // 时间
createCellbt17.setCellValue(String.valueOf(findAll4.get(i).get("BUSBAR_NUM")));
createCellbt17.setCellStyle(cellStyle2);
HSSFCell createCellbt1 = createRowbusbar.createCell(2); // 状态
createCellbt1.setCellValue(String.valueOf(findAll4.get(i).get("WELDING_POWER")));
createCellbt1.setCellStyle(cellStyle2);
HSSFCell createCellbt2 = createRowbusbar.createCell(3); // 状态
createCellbt2.setCellValue(String.valueOf(findAll4.get(i).get("PROTECTIVE_GAS_FLWO")));
createCellbt2.setCellStyle(cellStyle2);
HSSFCell createCellbt3 = createRowbusbar.createCell(4); // 状态
createCellbt3.setCellValue(String.valueOf(findAll4.get(i).get("DEFOCUSING")));
createCellbt3.setCellStyle(cellStyle2);
HSSFCell createCellbt4 = createRowbusbar.createCell(5); // 状态
createCellbt4.setCellValue(String.valueOf(findAll4.get(i).get("COLUMN_ID")));
createCellbt4.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
}
//fpc激光焊接表
CellRangeAddress cra5 = new CellRangeAddress(num+2, num+2, 0, 5); //表名横跨多少列
sheet.addMergedRegion(cra5);
RegionUtil.setBorderTop(HSSFBorderFormatting.BORDER_THICK, cra5, sheet, wr);
HSSFRow createRowtag5 = sheet.createRow(num+2); // 表名
createRowtag5.setHeight((short) 380);
HSSFCell createCelltag5 = createRowtag5.createCell(0);
createCelltag5.setCellValue("fpc激光焊接");
createCelltag5.setCellStyle(cellStyletag);
HSSFRow createRowfpc1 = sheet.createRow(num+3); // 字段名
createRowfpc1.setHeight((short) 380);
HSSFCell createCellfpc1 = createRowfpc1.createCell(0);
createCellfpc1.setCellValue("上传时间");
createCellfpc1.setCellStyle(cellStyle1);
HSSFCell createCellfpc2 = createRowfpc1.createCell(1);
createCellfpc2.setCellValue("编码");
createCellfpc2.setCellStyle(cellStyle1);
HSSFCell createCellfpc3 = createRowfpc1.createCell(2);
createCellfpc3.setCellValue("焊接功率");
createCellfpc3.setCellStyle(cellStyle1);
HSSFCell createCellfpc4 = createRowfpc1.createCell(3);
createCellfpc4.setCellValue("保护气流量");
createCellfpc4.setCellStyle(cellStyle1);
HSSFCell createCellfpc5 = createRowfpc1.createCell(4);
createCellfpc5.setCellValue("离焦量");
createCellfpc5.setCellStyle(cellStyle1);
HSSFCell createCellfpc6 = createRowfpc1.createCell(5);
createCellfpc6.setCellValue("极柱数量编号");
createCellfpc6.setCellStyle(cellStyle1);
//表数据
List<Map<String, Object>> findAll5 = service.findAll(5, sn);
num = num+4;
for (int i = 0; i < findAll5.size(); i++) {
HSSFRow createRowfpc = sheet.createRow(num);
createRowfpc.setHeight((short) 280);
HSSFCell createCellbt0 = createRowfpc.createCell(0); // 总成
createCellbt0.setCellValue(String.valueOf(findAll5.get(i).get("UPLOAD_TIME")));
createCellbt0.setCellStyle(cellStyle2);
HSSFCell createCellbt17 = createRowfpc.createCell(1); // 时间
createCellbt17.setCellValue(String.valueOf(findAll5.get(i).get("FPC_NUM")));
createCellbt17.setCellStyle(cellStyle2);
HSSFCell createCellbt1 = createRowfpc.createCell(2); // 状态
createCellbt1.setCellValue(String.valueOf(findAll5.get(i).get("WELDING_POWER")));
createCellbt1.setCellStyle(cellStyle2);
HSSFCell createCellbt2 = createRowfpc.createCell(3); // 状态
createCellbt2.setCellValue(String.valueOf(findAll5.get(i).get("PROTECTIVE_GAS_FLWO")));
createCellbt2.setCellStyle(cellStyle2);
HSSFCell createCellbt3 = createRowfpc.createCell(4); // 状态
createCellbt3.setCellValue(String.valueOf(findAll5.get(i).get("DEFOCUSING")));
createCellbt3.setCellStyle(cellStyle2);
HSSFCell createCellbt4 = createRowfpc.createCell(5); // 状态
createCellbt4.setCellValue(String.valueOf(findAll5.get(i).get("COLUMN_ID")));
createCellbt4.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
}
//ISO表
CellRangeAddress cra6 = new CellRangeAddress(num+2, num+2, 0, 37); //表名横跨多少列
sheet.addMergedRegion(cra6);
RegionUtil.setBorderTop(HSSFBorderFormatting.BORDER_THICK, cra6, sheet, wr);
HSSFRow createRowtag6 = sheet.createRow(num+2); // 表名
createRowtag6.setHeight((short) 380);
HSSFCell createCelltag6 = createRowtag6.createCell(0);
createCelltag6.setCellValue("ISO");
createCelltag6.setCellStyle(cellStyletag);
HSSFRow createRowiso1 = sheet.createRow(num+3); // 字段名
createRowiso1.setHeight((short) 380);
HSSFCell createCelliso1 = createRowiso1.createCell(0);
createCelliso1.setCellValue("上传时间");
createCelliso1.setCellStyle(cellStyle1);
HSSFCell createCelliso2 = createRowiso1.createCell(1);
createCelliso2.setCellValue("模组条码");
createCelliso2.setCellStyle(cellStyle1);
HSSFCell createCelliso3 = createRowiso1.createCell(2);
createCelliso3.setCellValue("侧板导通测试");
createCelliso3.setCellStyle(cellStyle1);
HSSFCell createCelliso4 = createRowiso1.createCell(3);
createCelliso4.setCellValue("电压1");
createCelliso4.setCellStyle(cellStyle1);
HSSFCell createCelliso5 = createRowiso1.createCell(4);
createCelliso5.setCellValue("电压2");
createCelliso5.setCellStyle(cellStyle1);
HSSFCell createCelliso6 = createRowiso1.createCell(5);
createCelliso6.setCellValue("电压3");
createCelliso6.setCellStyle(cellStyle1);
HSSFCell createCelliso7 = createRowiso1.createCell(6);
createCelliso7.setCellValue("电压4");
createCelliso7.setCellStyle(cellStyle1);
HSSFCell createCelliso8 = createRowiso1.createCell(7);
createCelliso8.setCellValue("电压5");
createCelliso8.setCellStyle(cellStyle1);
HSSFCell createCelliso9 = createRowiso1.createCell(8);
createCelliso9.setCellValue("电压6");
createCelliso9.setCellStyle(cellStyle1);
HSSFCell createCelliso10 = createRowiso1.createCell(9);
createCelliso10.setCellValue("电压7");
createCelliso10.setCellStyle(cellStyle1);
HSSFCell createCelliso11 = createRowiso1.createCell(10);
createCelliso11.setCellValue("电压8");
createCelliso11.setCellStyle(cellStyle1);
HSSFCell createCelliso12 = createRowiso1.createCell(11);
createCelliso12.setCellValue("电压9");
createCelliso12.setCellStyle(cellStyle1);
HSSFCell createCelliso13 = createRowiso1.createCell(12);
createCelliso13.setCellValue("电压10");
createCelliso13.setCellStyle(cellStyle1);
HSSFCell createCelliso14 = createRowiso1.createCell(13);
createCelliso14.setCellValue("电压11");
createCelliso14.setCellStyle(cellStyle1);
HSSFCell createCelliso15 = createRowiso1.createCell(14);
createCelliso15.setCellValue("电压12");
createCelliso15.setCellStyle(cellStyle1);
HSSFCell createCelliso16 = createRowiso1.createCell(15);
createCelliso16.setCellValue("电压13");
createCelliso16.setCellStyle(cellStyle1);
HSSFCell createCelliso17 = createRowiso1.createCell(16);
createCelliso17.setCellValue("电压14");
createCelliso17.setCellStyle(cellStyle1);
HSSFCell createCelliso18 = createRowiso1.createCell(17);
createCelliso18.setCellValue("电压15");
createCelliso18.setCellStyle(cellStyle1);
HSSFCell createCelliso19 = createRowiso1.createCell(18);
createCelliso19.setCellValue("电压16");
createCelliso19.setCellStyle(cellStyle1);
HSSFCell createCelliso20 = createRowiso1.createCell(19);
createCelliso20.setCellValue("电芯压差");
createCelliso20.setCellStyle(cellStyle1);
HSSFCell createCelliso21 = createRowiso1.createCell(20);
createCelliso21.setCellValue("正极对正极绝缘阻抗测试_1");
createCelliso21.setCellStyle(cellStyle1);
HSSFCell createCelliso22 = createRowiso1.createCell(21);
createCelliso22.setCellValue("正极对正极绝缘阻抗测试_2");
createCelliso22.setCellStyle(cellStyle1);
HSSFCell createCelliso23 = createRowiso1.createCell(22);
createCelliso23.setCellValue("正极对正极绝缘阻抗测试_3");
createCelliso23.setCellStyle(cellStyle1);
HSSFCell createCelliso24 = createRowiso1.createCell(23);
createCelliso24.setCellValue("正极对正极绝缘阻抗测试_4");
createCelliso24.setCellStyle(cellStyle1);
HSSFCell createCelliso25 = createRowiso1.createCell(24);
createCelliso25.setCellValue("正极对正极绝缘阻抗测试_5");
createCelliso25.setCellStyle(cellStyle1);
HSSFCell createCelliso26 = createRowiso1.createCell(25);
createCelliso26.setCellValue("正极对正极绝缘阻抗测试_6");
createCelliso26.setCellStyle(cellStyle1);
HSSFCell createCelliso27 = createRowiso1.createCell(26);
createCelliso27.setCellValue("正极对正极绝缘阻抗测试_7");
createCelliso27.setCellStyle(cellStyle1);
HSSFCell createCelliso28 = createRowiso1.createCell(27);
createCelliso28.setCellValue("正极对正极绝缘阻抗测试_8");
createCelliso28.setCellStyle(cellStyle1);
HSSFCell createCelliso29 = createRowiso1.createCell(28);
createCelliso29.setCellValue("正极对正极绝缘阻抗测试_9");
createCelliso29.setCellStyle(cellStyle1);
HSSFCell createCelliso30 = createRowiso1.createCell(29);
createCelliso30.setCellValue("正极对正极绝缘阻抗测试_10");
createCelliso30.setCellStyle(cellStyle1);
HSSFCell createCelliso31 = createRowiso1.createCell(30);
createCelliso31.setCellValue("正极对正极绝缘阻抗测试_11");
createCelliso31.setCellStyle(cellStyle1);
HSSFCell createCelliso32 = createRowiso1.createCell(31);
createCelliso32.setCellValue("正极对正极绝缘阻抗测试_12");
createCelliso32.setCellStyle(cellStyle1);
HSSFCell createCelliso33 = createRowiso1.createCell(32);
createCelliso33.setCellValue("正极对正极绝缘阻抗测试_13");
createCelliso33.setCellStyle(cellStyle1);
HSSFCell createCelliso34 = createRowiso1.createCell(33);
createCelliso34.setCellValue("正极对正极绝缘阻抗测试_14");
createCelliso34.setCellStyle(cellStyle1);
HSSFCell createCelliso35 = createRowiso1.createCell(34);
createCelliso35.setCellValue("正极对正极绝缘阻抗测试_15");
createCelliso35.setCellStyle(cellStyle1);
HSSFCell createCelliso36 = createRowiso1.createCell(35);
createCelliso36.setCellValue("所有正极对壳体绝缘阻抗测试");
createCelliso36.setCellStyle(cellStyle1);
HSSFCell createCelliso37 = createRowiso1.createCell(36);
createCelliso37.setCellValue("所有正极对壳体DC耐压测试");
createCelliso37.setCellStyle(cellStyle1);
HSSFCell createCelliso38 = createRowiso1.createCell(37);
createCelliso38.setCellValue("测试结果");
createCelliso38.setCellStyle(cellStyle1);
//表数据
List<Map<String, Object>> findAll6 = service.findAll(6, sn);
num = num+4;
for (int i = 0; i < findAll6.size(); i++) {
HSSFRow createRowiso = sheet.createRow(num);
createRowiso.setHeight((short) 280);
HSSFCell createCellbt0 = createRowiso.createCell(0); // 总成
createCellbt0.setCellValue(String.valueOf(findAll6.get(i).get("DT")));
createCellbt0.setCellStyle(cellStyle2);
HSSFCell createCellbt17 = createRowiso.createCell(1); // 时间
createCellbt17.setCellValue(String.valueOf(findAll6.get(i).get("BARCODE")));
createCellbt17.setCellStyle(cellStyle2);
HSSFCell createCellbt1 = createRowiso.createCell(2); // 状态
createCellbt1.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF1")));
createCellbt1.setCellStyle(cellStyle2);
HSSFCell createCellbt2 = createRowiso.createCell(3); // 状态
createCellbt2.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF2")));
createCellbt2.setCellStyle(cellStyle2);
HSSFCell createCellbt3 = createRowiso.createCell(4); // 状态
createCellbt3.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF3")));
createCellbt3.setCellStyle(cellStyle2);
HSSFCell createCellbt4 =createRowiso.createCell(5); // 状态
createCellbt4.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF4")));
createCellbt4.setCellStyle(cellStyle2);
HSSFCell createCellbt5 =createRowiso.createCell(6); // 状态
createCellbt5.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF5")));
createCellbt5.setCellStyle(cellStyle2);
HSSFCell createCellbt6 =createRowiso.createCell(7); // 状态
createCellbt6.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF6")));
createCellbt6.setCellStyle(cellStyle2);
HSSFCell createCellbt7 =createRowiso.createCell(8); // 状态
createCellbt7.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF7")));
createCellbt7.setCellStyle(cellStyle2);
HSSFCell createCellbt8 =createRowiso.createCell(9); // 状态
createCellbt8.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF8")));
createCellbt8.setCellStyle(cellStyle2);
HSSFCell createCellbt9 =createRowiso.createCell(10); // 状态
createCellbt9.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF9")));
createCellbt9.setCellStyle(cellStyle2);
HSSFCell createCellbt10 =createRowiso.createCell(11); // 状态
createCellbt10.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF10")));
createCellbt10.setCellStyle(cellStyle2);
HSSFCell createCellbt11 =createRowiso.createCell(12); // 状态
createCellbt11.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF11")));
createCellbt11.setCellStyle(cellStyle2);
HSSFCell createCellbt12 =createRowiso.createCell(13); // 状态
createCellbt12.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF12")));
createCellbt12.setCellStyle(cellStyle2);
HSSFCell createCellbt13 =createRowiso.createCell(14); // 状态
createCellbt13.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF13")));
createCellbt13.setCellStyle(cellStyle2);
HSSFCell createCellbt14 =createRowiso.createCell(15); // 状态
createCellbt14.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF14")));
createCellbt14.setCellStyle(cellStyle2);
HSSFCell createCellbt15 =createRowiso.createCell(16); // 状态
createCellbt15.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF15")));
createCellbt15.setCellStyle(cellStyle2);
HSSFCell createCellbt16 =createRowiso.createCell(17); // 状态
createCellbt16.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF16")));
createCellbt16.setCellStyle(cellStyle2);
HSSFCell createCellbt18 =createRowiso.createCell(18); // 状态
createCellbt18.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF17")));
createCellbt18.setCellStyle(cellStyle2);
HSSFCell createCellbt19 =createRowiso.createCell(19); // 状态
createCellbt19.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF18")));
createCellbt19.setCellStyle(cellStyle2);
HSSFCell createCellbt20 =createRowiso.createCell(20); // 状态
createCellbt20.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF19")));
createCellbt20.setCellStyle(cellStyle2);
HSSFCell createCellbt21 =createRowiso.createCell(21); // 状态
createCellbt21.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF20")));
createCellbt21.setCellStyle(cellStyle2);
HSSFCell createCellbt22 =createRowiso.createCell(22); // 状态
createCellbt22.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF21")));
createCellbt22.setCellStyle(cellStyle2);
HSSFCell createCellbt23 =createRowiso.createCell(23); // 状态
createCellbt23.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF22")));
createCellbt23.setCellStyle(cellStyle2);
HSSFCell createCellbt24 =createRowiso.createCell(24); // 状态
createCellbt24.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF23")));
createCellbt24.setCellStyle(cellStyle2);
HSSFCell createCellbt25 =createRowiso.createCell(25); // 状态
createCellbt25.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF24")));
createCellbt25.setCellStyle(cellStyle2);
HSSFCell createCellbt26 =createRowiso.createCell(26); // 状态
createCellbt26.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF25")));
createCellbt26.setCellStyle(cellStyle2);
HSSFCell createCellbt27 =createRowiso.createCell(27); // 状态
createCellbt27.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF26")));
createCellbt27.setCellStyle(cellStyle2);
HSSFCell createCellbt38 =createRowiso.createCell(28); // 状态
createCellbt38.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF27")));
createCellbt38.setCellStyle(cellStyle2);
HSSFCell createCellbt29 =createRowiso.createCell(29); // 状态
createCellbt29.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF28")));
createCellbt29.setCellStyle(cellStyle2);
HSSFCell createCellbt30 =createRowiso.createCell(30); // 状态
createCellbt30.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF29")));
createCellbt30.setCellStyle(cellStyle2);
HSSFCell createCellbt31 =createRowiso.createCell(31); // 状态
createCellbt31.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF30")));
createCellbt31.setCellStyle(cellStyle2);
HSSFCell createCellbt32 =createRowiso.createCell(32); // 状态
createCellbt32.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF31")));
createCellbt32.setCellStyle(cellStyle2);
HSSFCell createCellbt33 =createRowiso.createCell(33); // 状态
createCellbt33.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF32")));
createCellbt33.setCellStyle(cellStyle2);
HSSFCell createCellbt34 =createRowiso.createCell(34); // 状态
createCellbt34.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF33")));
createCellbt34.setCellStyle(cellStyle2);
HSSFCell createCellbt35 =createRowiso.createCell(35); // 状态
createCellbt35.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF34")));
createCellbt35.setCellStyle(cellStyle2);
HSSFCell createCellbt36 =createRowiso.createCell(36); // 状态
createCellbt36.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF35")));
createCellbt36.setCellStyle(cellStyle2);
HSSFCell createCellbt37 =createRowiso.createCell(37); // 状态
createCellbt37.setCellValue(String.valueOf(findAll6.get(i).get("ISO_FF50")));
createCellbt37.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
}
//eol表
CellRangeAddress cra7 = new CellRangeAddress(num+2, num+2, 0, 42); //表名横跨多少列
sheet.addMergedRegion(cra7);
RegionUtil.setBorderTop(HSSFBorderFormatting.BORDER_THICK, cra7, sheet, wr);
HSSFRow createRowtag7 = sheet.createRow(num+2); // 表名
createRowtag7.setHeight((short) 380);
HSSFCell createCelltag7 = createRowtag7.createCell(0);
createCelltag7.setCellValue("EOL");
createCelltag7.setCellStyle(cellStyletag);
HSSFRow createRoweol1 = sheet.createRow(num+3); // 字段名
createRoweol1.setHeight((short) 380);
HSSFCell createCelleol1 = createRoweol1.createCell(0);
createCelleol1.setCellValue("上传时间");
createCelleol1.setCellStyle(cellStyle1);
HSSFCell createCelleol2 = createRoweol1.createCell(1);
createCelleol2.setCellValue("模组条码");
createCelleol2.setCellStyle(cellStyle1);
HSSFCell createCelleol3 = createRoweol1.createCell(2);
createCelleol3.setCellValue("校验电压");
createCelleol3.setCellStyle(cellStyle1);
HSSFCell createCelleol4 = createRoweol1.createCell(3);
createCelleol4.setCellValue("侧板导通测试");
createCelleol4.setCellStyle(cellStyle1);
HSSFCell createCelleol5 = createRoweol1.createCell(4);
createCelleol5.setCellValue("开路内阻");
createCelleol5.setCellStyle(cellStyle1);
HSSFCell createCelleol6 = createRoweol1.createCell(5);
createCelleol6.setCellValue("开路电压");
createCelleol6.setCellStyle(cellStyle1);
HSSFCell createCelleol7 = createRoweol1.createCell(6);
createCelleol7.setCellValue("内阻1");
createCelleol7.setCellStyle(cellStyle1);
HSSFCell createCelleol8 = createRoweol1.createCell(7);
createCelleol8.setCellValue("内阻2");
createCelleol8.setCellStyle(cellStyle1);
HSSFCell createCelleol9 = createRoweol1.createCell(8);
createCelleol9.setCellValue("内阻3");
createCelleol9.setCellStyle(cellStyle1);
HSSFCell createCelleol10 = createRoweol1.createCell(9);
createCelleol10.setCellValue("内阻4");
createCelleol10.setCellStyle(cellStyle1);
HSSFCell createCelleol11 = createRoweol1.createCell(10);
createCelleol11.setCellValue("内阻5");
createCelleol11.setCellStyle(cellStyle1);
HSSFCell createCelleol12 = createRoweol1.createCell(11);
createCelleol12.setCellValue("内阻6");
createCelleol12.setCellStyle(cellStyle1);
HSSFCell createCelleol13 = createRoweol1.createCell(12);
createCelleol13.setCellValue("内阻7");
createCelleol13.setCellStyle(cellStyle1);
HSSFCell createCelleol14 = createRoweol1.createCell(13);
createCelleol14.setCellValue("内阻8");
createCelleol14.setCellStyle(cellStyle1);
HSSFCell createCelleol15 = createRoweol1.createCell(14);
createCelleol15.setCellValue("内阻9");
createCelleol15.setCellStyle(cellStyle1);
HSSFCell createCelleol16 = createRoweol1.createCell(15);
createCelleol16.setCellValue("内阻10");
createCelleol16.setCellStyle(cellStyle1);
HSSFCell createCelleol17 = createRoweol1.createCell(16);
createCelleol17.setCellValue("内阻11");
createCelleol17.setCellStyle(cellStyle1);
HSSFCell createCelleol18 = createRoweol1.createCell(17);
createCelleol18.setCellValue("内阻12");
createCelleol18.setCellStyle(cellStyle1);
HSSFCell createCelleol19 = createRoweol1.createCell(18);
createCelleol19.setCellValue("内阻13");
createCelleol19.setCellStyle(cellStyle1);
HSSFCell createCelleol20 = createRoweol1.createCell(19);
createCelleol20.setCellValue("内阻14");
createCelleol20.setCellStyle(cellStyle1);
HSSFCell createCelleol21 = createRoweol1.createCell(20);
createCelleol21.setCellValue("内阻15");
createCelleol21.setCellStyle(cellStyle1);
HSSFCell createCelleol22 = createRoweol1.createCell(21);
createCelleol22.setCellValue("内阻16");
createCelleol22.setCellStyle(cellStyle1);
HSSFCell createCelleol23 = createRoweol1.createCell(22);
createCelleol23.setCellValue("电压1");
createCelleol23.setCellStyle(cellStyle1);
HSSFCell createCelleol24 = createRoweol1.createCell(23);
createCelleol24.setCellValue("电压2");
createCelleol24.setCellStyle(cellStyle1);
HSSFCell createCelleol25 = createRoweol1.createCell(24);
createCelleol25.setCellValue("电压3");
createCelleol25.setCellStyle(cellStyle1);
HSSFCell createCelleol26 = createRoweol1.createCell(25);
createCelleol26.setCellValue("电压4");
createCelleol26.setCellStyle(cellStyle1);
HSSFCell createCelleol27 = createRoweol1.createCell(26);
createCelleol27.setCellValue("电压5");
createCelleol27.setCellStyle(cellStyle1);
HSSFCell createCelleol28 = createRoweol1.createCell(27);
createCelleol28.setCellValue("电压6");
createCelleol28.setCellStyle(cellStyle1);
HSSFCell createCelleol29 = createRoweol1.createCell(28);
createCelleol29.setCellValue("电压7");
createCelleol29.setCellStyle(cellStyle1);
HSSFCell createCelleol30 = createRoweol1.createCell(29);
createCelleol30.setCellValue("电压8");
createCelleol30.setCellStyle(cellStyle1);
HSSFCell createCelleol31 = createRoweol1.createCell(30);
createCelleol31.setCellValue("电压9");
createCelleol31.setCellStyle(cellStyle1);
HSSFCell createCelleol32 = createRoweol1.createCell(31);
createCelleol32.setCellValue("电压10");
createCelleol32.setCellStyle(cellStyle1);
HSSFCell createCelleol33 = createRoweol1.createCell(32);
createCelleol33.setCellValue("电压11");
createCelleol33.setCellStyle(cellStyle1);
HSSFCell createCelleol34 = createRoweol1.createCell(33);
createCelleol34.setCellValue("电压12");
createCelleol34.setCellStyle(cellStyle1);
HSSFCell createCelleol35 = createRoweol1.createCell(34);
createCelleol35.setCellValue("电压13");
createCelleol35.setCellStyle(cellStyle1);
HSSFCell createCelleol36 = createRoweol1.createCell(35);
createCelleol36.setCellValue("电压14");
createCelleol36.setCellStyle(cellStyle1);
HSSFCell createCelleol37 = createRoweol1.createCell(36);
createCelleol37.setCellValue("电压15");
createCelleol37.setCellStyle(cellStyle1);
HSSFCell createCelleol38 = createRoweol1.createCell(37);
createCelleol38.setCellValue("电压16");
createCelleol38.setCellStyle(cellStyle1);
HSSFCell createCelleol40 = createRoweol1.createCell(38);
createCelleol40.setCellValue("电压差值");
createCelleol40.setCellStyle(cellStyle1);
HSSFCell createCelleol41 = createRoweol1.createCell(39);
createCelleol41.setCellValue("交流内阻差值");
createCelleol41.setCellStyle(cellStyle1);
HSSFCell createCelleol42 = createRoweol1.createCell(40);
createCelleol42.setCellValue("总正对壳体绝缘阻抗测试");
createCelleol42.setCellStyle(cellStyle1);
HSSFCell createCelleol43 = createRoweol1.createCell(41);
createCelleol43.setCellValue("总正对壳体DC耐压测试");
createCelleol43.setCellStyle(cellStyle1);
HSSFCell createCelleol44 = createRoweol1.createCell(42);
createCelleol44.setCellValue("测试结果");
createCelleol44.setCellStyle(cellStyle1);
//表数据
List<Map<String, Object>> findAll7 = service.findAll(7, sn);
num = num+4;
for (int i = 0; i < findAll7.size(); i++) {
HSSFRow createRoweol = sheet.createRow(num);
createRoweol.setHeight((short) 280);
HSSFCell createCellbt0 = createRoweol.createCell(0); // 总成
createCellbt0.setCellValue(String.valueOf(findAll7.get(i).get("DT")));
createCellbt0.setCellStyle(cellStyle2);
HSSFCell createCellbt17 = createRoweol.createCell(1); // 时间
createCellbt17.setCellValue(String.valueOf(findAll7.get(i).get("BARCODE")));
createCellbt17.setCellStyle(cellStyle2);
HSSFCell createCellbt1 = createRoweol.createCell(2); // 状态
createCellbt1.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF1")));
createCellbt1.setCellStyle(cellStyle2);
HSSFCell createCellbt2 = createRoweol.createCell(3); // 状态
createCellbt2.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF2")));
createCellbt2.setCellStyle(cellStyle2);
HSSFCell createCellbt3 = createRoweol.createCell(4); // 状态
createCellbt3.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF3")));
createCellbt3.setCellStyle(cellStyle2);
HSSFCell createCellbt4 =createRoweol.createCell(5); // 状态
createCellbt4.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF4")));
createCellbt4.setCellStyle(cellStyle2);
HSSFCell createCellbt5 =createRoweol.createCell(6); // 状态
createCellbt5.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF5")));
createCellbt5.setCellStyle(cellStyle2);
HSSFCell createCellbt6 =createRoweol.createCell(7); // 状态
createCellbt6.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF6")));
createCellbt6.setCellStyle(cellStyle2);
HSSFCell createCellbt7 =createRoweol.createCell(8); // 状态
createCellbt7.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF7")));
createCellbt7.setCellStyle(cellStyle2);
HSSFCell createCellbt8 =createRoweol.createCell(9); // 状态
createCellbt8.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF8")));
createCellbt8.setCellStyle(cellStyle2);
HSSFCell createCellbt9 =createRoweol.createCell(10); // 状态
createCellbt9.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF9")));
createCellbt9.setCellStyle(cellStyle2);
HSSFCell createCellbt10 =createRoweol.createCell(11); // 状态
createCellbt10.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF10")));
createCellbt10.setCellStyle(cellStyle2);
HSSFCell createCellbt11 =createRoweol.createCell(12); // 状态
createCellbt11.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF11")));
createCellbt11.setCellStyle(cellStyle2);
HSSFCell createCellbt12 =createRoweol.createCell(13); // 状态
createCellbt12.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF12")));
createCellbt12.setCellStyle(cellStyle2);
HSSFCell createCellbt13 =createRoweol.createCell(14); // 状态
createCellbt13.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF13")));
createCellbt13.setCellStyle(cellStyle2);
HSSFCell createCellbt14 =createRoweol.createCell(15); // 状态
createCellbt14.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF14")));
createCellbt14.setCellStyle(cellStyle2);
HSSFCell createCellbt15 =createRoweol.createCell(16); // 状态
createCellbt15.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF15")));
createCellbt15.setCellStyle(cellStyle2);
HSSFCell createCellbt16 =createRoweol.createCell(17); // 状态
createCellbt16.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF16")));
createCellbt16.setCellStyle(cellStyle2);
HSSFCell createCellbt18 =createRoweol.createCell(18); // 状态
createCellbt18.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF17")));
createCellbt18.setCellStyle(cellStyle2);
HSSFCell createCellbt19 =createRoweol.createCell(19); // 状态
createCellbt19.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF18")));
createCellbt19.setCellStyle(cellStyle2);
HSSFCell createCellbt20 =createRoweol.createCell(20); // 状态
createCellbt20.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF19")));
createCellbt20.setCellStyle(cellStyle2);
HSSFCell createCellbt21 =createRoweol.createCell(21); // 状态
createCellbt21.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF20")));
createCellbt21.setCellStyle(cellStyle2);
HSSFCell createCellbt22 =createRoweol.createCell(22); // 状态
createCellbt22.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF21")));
createCellbt22.setCellStyle(cellStyle2);
HSSFCell createCellbt23 =createRoweol.createCell(23); // 状态
createCellbt23.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF22")));
createCellbt23.setCellStyle(cellStyle2);
HSSFCell createCellbt24 =createRoweol.createCell(24); // 状态
createCellbt24.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF23")));
createCellbt24.setCellStyle(cellStyle2);
HSSFCell createCellbt25 =createRoweol.createCell(25); // 状态
createCellbt25.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF24")));
createCellbt25.setCellStyle(cellStyle2);
HSSFCell createCellbt26 =createRoweol.createCell(26); // 状态
createCellbt26.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF25")));
createCellbt26.setCellStyle(cellStyle2);
HSSFCell createCellbt27 =createRoweol.createCell(27); // 状态
createCellbt27.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF26")));
createCellbt27.setCellStyle(cellStyle2);
HSSFCell createCellbt28 =createRoweol.createCell(28); // 状态
createCellbt28.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF27")));
createCellbt28.setCellStyle(cellStyle2);
HSSFCell createCellbt29 =createRoweol.createCell(29); // 状态
createCellbt29.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF28")));
createCellbt29.setCellStyle(cellStyle2);
HSSFCell createCellbt30 =createRoweol.createCell(30); // 状态
createCellbt30.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF29")));
createCellbt30.setCellStyle(cellStyle2);
HSSFCell createCellbt31 =createRoweol.createCell(31); // 状态
createCellbt31.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF30")));
createCellbt31.setCellStyle(cellStyle2);
HSSFCell createCellbt32 =createRoweol.createCell(32); // 状态
createCellbt32.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF31")));
createCellbt32.setCellStyle(cellStyle2);
HSSFCell createCellbt33 =createRoweol.createCell(33); // 状态
createCellbt33.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF32")));
createCellbt33.setCellStyle(cellStyle2);
HSSFCell createCellbt34 =createRoweol.createCell(34); // 状态
createCellbt34.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF33")));
createCellbt34.setCellStyle(cellStyle2);
HSSFCell createCellbt35 =createRoweol.createCell(35); // 状态
createCellbt35.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF34")));
createCellbt35.setCellStyle(cellStyle2);
HSSFCell createCellbt36 =createRoweol.createCell(36); // 状态
createCellbt36.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF35")));
createCellbt36.setCellStyle(cellStyle2);
HSSFCell createCellbt37 =createRoweol.createCell(37); // 状态
createCellbt37.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF36")));
createCellbt37.setCellStyle(cellStyle2);
HSSFCell createCellbt38 =createRoweol.createCell(38); // 状态
createCellbt38.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF37")));
createCellbt38.setCellStyle(cellStyle2);
HSSFCell createCellbt39 =createRoweol.createCell(39); // 状态
createCellbt39.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF38")));
createCellbt39.setCellStyle(cellStyle2);
HSSFCell createCellbt40 =createRoweol.createCell(40); // 状态
createCellbt40.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF39")));
createCellbt40.setCellStyle(cellStyle2);
HSSFCell createCellbt41 =createRoweol.createCell(41); // 状态
createCellbt41.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF40")));
createCellbt41.setCellStyle(cellStyle2);
HSSFCell createCellbt42 =createRoweol.createCell(42); // 状态
createCellbt42.setCellValue(String.valueOf(findAll7.get(i).get("EOL_FF50")));
createCellbt42.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
}
//fpc通讯表
CellRangeAddress cra8 = new CellRangeAddress(num+2, num+2, 0, 23); //表名横跨多少列
sheet.addMergedRegion(cra8);
RegionUtil.setBorderTop(HSSFBorderFormatting.BORDER_THICK, cra8, sheet, wr);
HSSFRow createRowtag8 = sheet.createRow(num+2); // 表名
createRowtag8.setHeight((short) 380);
HSSFCell createCelltag8 = createRowtag8.createCell(0);
createCelltag8.setCellValue("FPC通讯");
createCelltag8.setCellStyle(cellStyletag);
HSSFRow createRowfpct1 = sheet.createRow(num+3); // 字段名
createRowfpct1.setHeight((short) 380);
HSSFCell createCellfpct1 = createRowfpct1.createCell(0);
createCellfpct1.setCellValue("上传时间");
createCellfpct1.setCellStyle(cellStyle1);
HSSFCell createCellfpct2 = createRowfpct1.createCell(1);
createCellfpct2.setCellValue("模组条码");
createCellfpct2.setCellStyle(cellStyle1);
HSSFCell createCellfpct3 = createRowfpct1.createCell(2);
createCellfpct3.setCellValue("开路电压测试");
createCellfpct3.setCellStyle(cellStyle1);
HSSFCell createCellfpct4 = createRowfpct1.createCell(3);
createCellfpct4.setCellValue("电芯电压1");
createCellfpct4.setCellStyle(cellStyle1);
HSSFCell createCellfpct5 = createRowfpct1.createCell(4);
createCellfpct5.setCellValue("电芯电压2");
createCellfpct5.setCellStyle(cellStyle1);
HSSFCell createCellfpct6 = createRowfpct1.createCell(5);
createCellfpct6.setCellValue("电芯电压3");
createCellfpct6.setCellStyle(cellStyle1);
HSSFCell createCellfpct7 = createRowfpct1.createCell(6);
createCellfpct7.setCellValue("电芯电压4");
createCellfpct7.setCellStyle(cellStyle1);
HSSFCell createCellfpct8 = createRowfpct1.createCell(7);
createCellfpct8.setCellValue("电芯电压5");
createCellfpct8.setCellStyle(cellStyle1);
HSSFCell createCellfpct9 = createRowfpct1.createCell(8);
createCellfpct9.setCellValue("电芯电压6");
createCellfpct9.setCellStyle(cellStyle1);
HSSFCell createCellfpct10 = createRowfpct1.createCell(9);
createCellfpct10.setCellValue("电芯电压7");
createCellfpct10.setCellStyle(cellStyle1);
HSSFCell createCellfpct11 = createRowfpct1.createCell(10);
createCellfpct11.setCellValue("电芯电压8");
createCellfpct11.setCellStyle(cellStyle1);
HSSFCell createCellfpct12 = createRowfpct1.createCell(11);
createCellfpct12.setCellValue("电芯电压9");
createCellfpct12.setCellStyle(cellStyle1);
HSSFCell createCellfpct13 = createRowfpct1.createCell(12);
createCellfpct13.setCellValue("电芯电压10");
createCellfpct13.setCellStyle(cellStyle1);
HSSFCell createCellfpct14 = createRowfpct1.createCell(13);
createCellfpct14.setCellValue("电芯电压11");
createCellfpct14.setCellStyle(cellStyle1);
HSSFCell createCellfpct15 = createRowfpct1.createCell(14);
createCellfpct15.setCellValue("电芯电压12");
createCellfpct15.setCellStyle(cellStyle1);
HSSFCell createCellfpct16 = createRowfpct1.createCell(15);
createCellfpct16.setCellValue("电芯电压13");
createCellfpct16.setCellStyle(cellStyle1);
HSSFCell createCellfpct17 = createRowfpct1.createCell(16);
createCellfpct17.setCellValue("电芯电压14");
createCellfpct17.setCellStyle(cellStyle1);
HSSFCell createCellfpct18 = createRowfpct1.createCell(17);
createCellfpct18.setCellValue("电芯电压15");
createCellfpct18.setCellStyle(cellStyle1);
HSSFCell createCellfpct19 = createRowfpct1.createCell(18);
createCellfpct19.setCellValue("电芯电压16");
createCellfpct19.setCellStyle(cellStyle1);
HSSFCell createCellfpct20 = createRowfpct1.createCell(19);
createCellfpct20.setCellValue("NTC阻值1");
createCellfpct20.setCellStyle(cellStyle1);
HSSFCell createCellfpct21 = createRowfpct1.createCell(20);
createCellfpct21.setCellValue("NTC阻值2");
createCellfpct21.setCellStyle(cellStyle1);
HSSFCell createCellfpct22 = createRowfpct1.createCell(21);
createCellfpct22.setCellValue("NTC阻值3");
createCellfpct22.setCellStyle(cellStyle1);
HSSFCell createCellfpct23 = createRowfpct1.createCell(22);
createCellfpct23.setCellValue("压差 DiffVolts");
createCellfpct23.setCellStyle(cellStyle1);
HSSFCell createCellfpct24 = createRowfpct1.createCell(23);
createCellfpct24.setCellValue("测试结果");
createCellfpct24.setCellStyle(cellStyle1);
//表数据
List<Map<String, Object>> findAll8 = service.findAll(8, sn);
num = num+4;
for (int i = 0; i < findAll8.size(); i++) {
HSSFRow createRowfpct = sheet.createRow(num);
createRowfpct.setHeight((short) 280);
HSSFCell createCellbt0 = createRowfpct.createCell(0); // 总成
createCellbt0.setCellValue(String.valueOf(findAll8.get(i).get("DT")));
createCellbt0.setCellStyle(cellStyle2);
HSSFCell createCellbt17 = createRowfpct.createCell(1); // 时间
createCellbt17.setCellValue(String.valueOf(findAll8.get(i).get("BARCODE")));
createCellbt17.setCellStyle(cellStyle2);
HSSFCell createCellbt1 =createRowfpct.createCell(2); // 状态
createCellbt1.setCellValue(String.valueOf(findAll8.get(i).get("FPC_FF1")));
createCellbt1.setCellStyle(cellStyle2);
HSSFCell createCellbt2 = createRowfpct.createCell(3); // 状态
createCellbt2.setCellValue(String.valueOf(findAll8.get(i).get("FPC_FF2")));
createCellbt2.setCellStyle(cellStyle2);
HSSFCell createCellbt3 = createRowfpct.createCell(4); // 状态
createCellbt3.setCellValue(String.valueOf(findAll8.get(i).get("FPC_FF3")));
createCellbt3.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
HSSFCell createCellbt4 = createRowfpct.createCell(5); // 状态
createCellbt4.setCellValue(String.valueOf(findAll8.get(i).get("FPC_FF4")));
createCellbt4.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
HSSFCell createCellbt5 = createRowfpct.createCell(6); // 状态
createCellbt5.setCellValue(String.valueOf(findAll8.get(i).get("FPC_FF5")));
createCellbt5.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
HSSFCell createCellbt6 = createRowfpct.createCell(7); // 状态
createCellbt6.setCellValue(String.valueOf(findAll8.get(i).get("FPC_FF6")));
createCellbt6.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
HSSFCell createCellbt7 = createRowfpct.createCell(8); // 状态
createCellbt7.setCellValue(String.valueOf(findAll8.get(i).get("FPC_FF7")));
createCellbt7.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
HSSFCell createCellbt8 = createRowfpct.createCell(9); // 状态
createCellbt8.setCellValue(String.valueOf(findAll8.get(i).get("FPC_FF8")));
createCellbt8.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
HSSFCell createCellbt9 = createRowfpct.createCell(10); // 状态
createCellbt9.setCellValue(String.valueOf(findAll8.get(i).get("FPC_FF9")));
createCellbt9.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
HSSFCell createCellbt10 = createRowfpct.createCell(11); // 状态
createCellbt10.setCellValue(String.valueOf(findAll8.get(i).get("FPC_FF10")));
createCellbt10.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
HSSFCell createCellbt11 = createRowfpct.createCell(12); // 状态
createCellbt11.setCellValue(String.valueOf(findAll8.get(i).get("FPC_FF11")));
createCellbt11.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
HSSFCell createCellbt12 = createRowfpct.createCell(13); // 状态
createCellbt12.setCellValue(String.valueOf(findAll8.get(i).get("FPC_FF12")));
createCellbt12.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
HSSFCell createCellbt13 = createRowfpct.createCell(14); // 状态
createCellbt13.setCellValue(String.valueOf(findAll8.get(i).get("FPC_FF13")));
createCellbt13.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
HSSFCell createCellbt14 = createRowfpct.createCell(15); // 状态
createCellbt14.setCellValue(String.valueOf(findAll8.get(i).get("FPC_FF14")));
createCellbt14.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
HSSFCell createCellbt15 = createRowfpct.createCell(16); // 状态
createCellbt15.setCellValue(String.valueOf(findAll8.get(i).get("FPC_FF15")));
createCellbt15.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
HSSFCell createCellbt16 = createRowfpct.createCell(17); // 状态
createCellbt16.setCellValue(String.valueOf(findAll8.get(i).get("FPC_FF16")));
createCellbt16.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
HSSFCell createCellbt18 = createRowfpct.createCell(18); // 状态
createCellbt18.setCellValue(String.valueOf(findAll8.get(i).get("FPC_FF17")));
createCellbt18.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
HSSFCell createCellbt19 = createRowfpct.createCell(19); // 状态
createCellbt19.setCellValue(String.valueOf(findAll8.get(i).get("FPC_FF18")));
createCellbt19.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
HSSFCell createCellbt20 = createRowfpct.createCell(20); // 状态
createCellbt20.setCellValue(String.valueOf(findAll8.get(i).get("FPC_FF19")));
createCellbt20.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
HSSFCell createCellbt21 = createRowfpct.createCell(21); // 状态
createCellbt21.setCellValue(String.valueOf(findAll8.get(i).get("FPC_FF20")));
createCellbt21.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
HSSFCell createCellbt22 = createRowfpct.createCell(22); // 状态
createCellbt22.setCellValue(String.valueOf(findAll8.get(i).get("FPC_FF21")));
createCellbt22.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
HSSFCell createCellbt23 = createRowfpct.createCell(23); // 状态
createCellbt23.setCellValue(String.valueOf(findAll8.get(i).get("FPC_FF50")));
createCellbt23.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
}
List<Map<String, Object>> findAll9 = service.findAll(9, sn);
if(findAll9.size()>0){
//模组运行时刻表
CellRangeAddress cra9 = new CellRangeAddress(num+2, num+2, 0, 3); //表名横跨多少列
sheet.addMergedRegion(cra9);
RegionUtil.setBorderTop(HSSFBorderFormatting.BORDER_THICK, cra9, sheet, wr);
HSSFRow createRowtag9 = sheet.createRow(num+2); // 表名
createRowtag9.setHeight((short) 380);
HSSFCell createCelltag9 = createRowtag9.createCell(0);
createCelltag9.setCellValue("模组运行时刻表");
createCelltag9.setCellStyle(cellStyletag);
HSSFRow createRowmzyx1 = sheet.createRow(num+3); // 字段名
createRowmzyx1.setHeight((short) 380);
HSSFCell createCellmzyx1 = createRowmzyx1.createCell(0);
createCellmzyx1.setCellValue("时间");
createCellmzyx1.setCellStyle(cellStyle1);
HSSFCell createCellmzyx2 = createRowmzyx1.createCell(1);
createCellmzyx2.setCellValue("当前工位");
createCellmzyx2.setCellStyle(cellStyle1);
HSSFCell createCellmzyx3 = createRowmzyx1.createCell(2);
createCellmzyx3.setCellValue("模组条码");
createCellmzyx3.setCellStyle(cellStyle1);
HSSFCell createCellmzyx4 =createRowmzyx1.createCell(3);
createCellmzyx4.setCellValue("状态");
createCellmzyx4.setCellStyle(cellStyle1);
//表数据
num = num+4;
for (int i = 0; i < findAll9.size(); i++) {
HSSFRow createRowmzyx = sheet.createRow(num);
createRowmzyx.setHeight((short) 280);
HSSFCell createCellbt0 = createRowmzyx.createCell(0); // 总成
createCellbt0.setCellValue(String.valueOf(findAll9.get(i).get("DT")));
createCellbt0.setCellStyle(cellStyle2);
HSSFCell createCellbt17 = createRowmzyx.createCell(1); // 时间
createCellbt17.setCellValue(String.valueOf(findAll9.get(i).get("ST")));
createCellbt17.setCellStyle(cellStyle2);
HSSFCell createCellbt1 =createRowmzyx.createCell(2); // 状态
createCellbt1.setCellValue(String.valueOf(findAll9.get(i).get("SN")));
createCellbt1.setCellStyle(cellStyle2);
HSSFCell createCellbt2 =createRowmzyx.createCell(3); // 状态
createCellbt2.setCellValue(String.valueOf(findAll9.get(i).get("STATUS")));
createCellbt2.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
}
}
List<Map<String, Object>> findAll10 = service.findAll(10, sn);
if(findAll10.size()>0){
//模组永久性时刻表
CellRangeAddress cra10 = new CellRangeAddress(num+2, num+2, 0, 3); //表名横跨多少列
sheet.addMergedRegion(cra10);
RegionUtil.setBorderTop(HSSFBorderFormatting.BORDER_THICK, cra10, sheet, wr);
HSSFRow createRowtag10 = sheet.createRow(num+2); // 表名
createRowtag10.setHeight((short) 380);
HSSFCell createCelltag10 = createRowtag10.createCell(0);
createCelltag10.setCellValue("模组永久性时刻表");
createCelltag10.setCellStyle(cellStyletag);
HSSFRow createRowmzyj1 = sheet.createRow(num+3); // 字段名
createRowmzyj1.setHeight((short) 380);
HSSFCell createCellmzyj1 = createRowmzyj1.createCell(0);
createCellmzyj1.setCellValue("结束时间");
createCellmzyj1.setCellStyle(cellStyle1);
HSSFCell createCellmzyj2 =createRowmzyj1.createCell(1);
createCellmzyj2.setCellValue("结束工位");
createCellmzyj2.setCellStyle(cellStyle1);
HSSFCell createCellmzyj3 = createRowmzyj1.createCell(2);
createCellmzyj3.setCellValue("模组条码");
createCellmzyj3.setCellStyle(cellStyle1);
HSSFCell createCellmzyj4 =createRowmzyj1.createCell(3);
createCellmzyj4.setCellValue("状态");
createCellmzyj4.setCellStyle(cellStyle1);
//表数据
num = num+4;
for (int i = 0; i < findAll10.size(); i++) {
HSSFRow createRowmzyj = sheet.createRow(num);
createRowmzyj.setHeight((short) 280);
HSSFCell createCellbt0 = createRowmzyj.createCell(0); // 总成
createCellbt0.setCellValue(String.valueOf(findAll10.get(i).get("DT")));
createCellbt0.setCellStyle(cellStyle2);
HSSFCell createCellbt17 = createRowmzyj.createCell(1); // 时间
createCellbt17.setCellValue(String.valueOf(findAll10.get(i).get("ST")));
createCellbt17.setCellStyle(cellStyle2);
HSSFCell createCellbt1 =createRowmzyj.createCell(2); // 状态
createCellbt1.setCellValue(String.valueOf(findAll10.get(i).get("SN")));
createCellbt1.setCellStyle(cellStyle2);
HSSFCell createCellbt2 =createRowmzyj.createCell(3); // 状态
createCellbt2.setCellValue(String.valueOf(findAll10.get(i).get("STATUS")));
createCellbt2.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
}
}
//模组物料记录表
CellRangeAddress cra11 = new CellRangeAddress(num+2, num+2, 0, 5); //表名横跨多少列
sheet.addMergedRegion(cra11);
RegionUtil.setBorderTop(HSSFBorderFormatting.BORDER_THICK, cra11, sheet, wr);
HSSFRow createRowtag11 = sheet.createRow(num+2); // 表名
createRowtag11.setHeight((short) 380);
HSSFCell createCelltag11 = createRowtag11.createCell(0);
createCelltag11.setCellValue("模组物料记录表");
createCelltag11.setCellStyle(cellStyletag);
HSSFRow createRowmzwl1 = sheet.createRow(num+3); // 字段名
createRowmzwl1.setHeight((short) 380);
HSSFCell createCellmzwl1 = createRowmzwl1.createCell(0);
createCellmzwl1.setCellValue("时间");
createCellmzwl1.setCellStyle(cellStyle1);
HSSFCell createCellmzwl2 =createRowmzwl1.createCell(1);
createCellmzwl2.setCellValue("工位");
createCellmzwl2.setCellStyle(cellStyle1);
HSSFCell createCellmzwl3 = createRowmzwl1.createCell(2);
createCellmzwl3.setCellValue("员工");
createCellmzwl3.setCellStyle(cellStyle1);
HSSFCell createCellmzwl4 =createRowmzwl1.createCell(3);
createCellmzwl4.setCellValue("模组条码");
createCellmzwl4.setCellStyle(cellStyle1);
HSSFCell createCellmzwl5 = createRowmzwl1.createCell(4);
createCellmzwl5.setCellValue("物料名称");
createCellmzwl5.setCellStyle(cellStyle1);
HSSFCell createCellmzwl6 = createRowmzwl1.createCell(5);
createCellmzwl6.setCellValue("物料条码");
createCellmzwl6.setCellStyle(cellStyle1);
//表数据
List<Map<String, Object>> findAll11 = service.findAll(11, sn);
num = num+4;
for (int i = 0; i < findAll11.size(); i++) {
HSSFRow createRowmzwl = sheet.createRow(num);
createRowmzwl.setHeight((short) 280);
HSSFCell createCellbt0 = createRowmzwl.createCell(0); // 总成
createCellbt0.setCellValue(String.valueOf(findAll11.get(i).get("DT")));
createCellbt0.setCellStyle(cellStyle2);
HSSFCell createCellbt17 = createRowmzwl.createCell(1); // 时间
createCellbt17.setCellValue(String.valueOf(findAll11.get(i).get("ST")));
createCellbt17.setCellStyle(cellStyle2);
HSSFCell createCellbt1 =createRowmzwl.createCell(2); // 状态
createCellbt1.setCellValue(String.valueOf(findAll11.get(i).get("WID")));
createCellbt1.setCellStyle(cellStyle2);
HSSFCell createCellbt2 =createRowmzwl.createCell(3); // 状态
createCellbt2.setCellValue(String.valueOf(findAll11.get(i).get("SN")));
createCellbt2.setCellStyle(cellStyle2);
HSSFCell createCellbt3 = createRowmzwl.createCell(4); // 状态
createCellbt3.setCellValue(String.valueOf(findAll11.get(i).get("KEYPART_NAME")));
createCellbt3.setCellStyle(cellStyle2);
HSSFCell createCellbt4 =createRowmzwl.createCell(5); // 状态
createCellbt4.setCellValue(String.valueOf(findAll11.get(i).get("KEYPART_PN")));
createCellbt4.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
}
/*//电机物料记录表
CellRangeAddress cra12 = new CellRangeAddress(num+2, num+2, 0, 5); //表名横跨多少列
sheet.addMergedRegion(cra12);
RegionUtil.setBorderTop(HSSFBorderFormatting.BORDER_THICK, cra12, sheet, wr);
HSSFRow createRowtag12 = sheet.createRow(num+2); // 表名
createRowtag12.setHeight((short) 380);
HSSFCell createCelltag12 = createRowtag12.createCell(0);
createCelltag12.setCellValue("电机物料记录表");
createCelltag12.setCellStyle(cellStyletag);
HSSFRow createRowdjwl1 = sheet.createRow(num+3); // 字段名
createRowdjwl1.setHeight((short) 380);
HSSFCell createCelldjwl1 = createRowdjwl1.createCell(0);
createCelldjwl1.setCellValue("时间");
createCelldjwl1.setCellStyle(cellStyle1);
HSSFCell createCelldjwl2 =createRowdjwl1.createCell(1);
createCelldjwl2.setCellValue("工位");
createCelldjwl2.setCellStyle(cellStyle1);
HSSFCell createCelldjwl3 = createRowdjwl1.createCell(2);
createCelldjwl3.setCellValue("员工");
createCelldjwl3.setCellStyle(cellStyle1);
HSSFCell createCelldjwl4 =createRowdjwl1.createCell(3);
createCelldjwl4.setCellValue("模组条码");
createCelldjwl4.setCellStyle(cellStyle1);
HSSFCell createCelldjwl5 = createRowdjwl1.createCell(4);
createCelldjwl5.setCellValue("物料名称");
createCelldjwl5.setCellStyle(cellStyle1);
HSSFCell createCelldjwl6 =createRowdjwl1.createCell(5);
createCelldjwl6.setCellValue("物料条码");
createCelldjwl6.setCellStyle(cellStyle1);
//表数据
List<Map<String, Object>> findAll12 = service.findAll(12, sn);
num = num+4;
for (int i = 0; i < findAll12.size(); i++) {
HSSFRow createRowdjwl = sheet.createRow(num);
createRowdjwl.setHeight((short) 280);
HSSFCell createCellbt0 = createRowdjwl.createCell(0); // 总成
createCellbt0.setCellValue(String.valueOf(findAll12.get(i).get("time")));
createCellbt0.setCellStyle(cellStyle2);
HSSFCell createCellbt17 = createRowdjwl.createCell(1); // 时间
createCellbt17.setCellValue(String.valueOf(findAll12.get(i).get("ST")));
createCellbt17.setCellStyle(cellStyle2);
HSSFCell createCellbt1 =createRowdjwl.createCell(2); // 状态
createCellbt1.setCellValue(String.valueOf(findAll12.get(i).get("WID")));
createCellbt1.setCellStyle(cellStyle2);
HSSFCell createCellbt2 =createRowdjwl.createCell(3); // 状态
createCellbt2.setCellValue(String.valueOf(findAll12.get(i).get("SN")));
createCellbt2.setCellStyle(cellStyle2);
HSSFCell createCellbt3 = createRowdjwl.createCell(4); // 状态
createCellbt3.setCellValue(String.valueOf(findAll12.get(i).get("KEYPART_NAME")));
createCellbt3.setCellStyle(cellStyle2);
HSSFCell createCellbt4 =createRowdjwl.createCell(5); // 状态
createCellbt4.setCellValue(String.valueOf(findAll12.get(i).get("KEYPART_PN")));
createCellbt4.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
}
//电机运行时刻表
CellRangeAddress cra13 = new CellRangeAddress(num+2, num+2, 0, 3); //表名横跨多少列
sheet.addMergedRegion(cra13);
RegionUtil.setBorderTop(HSSFBorderFormatting.BORDER_THICK, cra13, sheet, wr);
HSSFRow createRowtag13 = sheet.createRow(num+2); // 表名
createRowtag13.setHeight((short) 380);
HSSFCell createCelltag13 = createRowtag13.createCell(0);
createCelltag13.setCellValue("电机运行时刻表");
createCelltag13.setCellStyle(cellStyletag);
HSSFRow createRowdjyx1 = sheet.createRow(num+3); // 字段名
createRowdjyx1.setHeight((short) 380);
HSSFCell createCelldjyx1 = createRowdjyx1.createCell(0);
createCelldjyx1.setCellValue("时间");
createCelldjyx1.setCellStyle(cellStyle1);
HSSFCell createCelldjyx2 =createRowdjyx1.createCell(1);
createCelldjyx2.setCellValue("当前工位");
createCelldjyx2.setCellStyle(cellStyle1);
HSSFCell createCelldjyx3 = createRowdjyx1.createCell(2);
createCelldjyx3.setCellValue("模组条码");
createCelldjyx3.setCellStyle(cellStyle1);
HSSFCell createCelldjyx4 =createRowdjyx1.createCell(3);
createCelldjyx4.setCellValue("状态");
createCelldjyx4.setCellStyle(cellStyle1);
//表数据
List<Map<String, Object>> findAll13 = service.findAll(13, sn);
num = num+4;
for (int i = 0; i < findAll13.size(); i++) {
HSSFRow createRowdjyx = sheet.createRow(num);
createRowdjyx.setHeight((short) 280);
HSSFCell createCellbt0 = createRowdjyx.createCell(0); // 总成
createCellbt0.setCellValue(String.valueOf(findAll13.get(i).get("time")));
createCellbt0.setCellStyle(cellStyle2);
HSSFCell createCellbt17 = createRowdjyx.createCell(1); // 时间
createCellbt17.setCellValue(String.valueOf(findAll13.get(i).get("ST")));
createCellbt17.setCellStyle(cellStyle2);
HSSFCell createCellbt1 =createRowdjyx.createCell(2); // 状态
createCellbt1.setCellValue(String.valueOf(findAll13.get(i).get("SN")));
createCellbt1.setCellStyle(cellStyle2);
HSSFCell createCellbt2 =createRowdjyx.createCell(3); // 状态
createCellbt2.setCellValue(String.valueOf(findAll13.get(i).get("STATUS")));
createCellbt2.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
}
//电机永久性时刻表
CellRangeAddress cra14 = new CellRangeAddress(num+2, num+2, 0, 3); //表名横跨多少列
sheet.addMergedRegion(cra14);
RegionUtil.setBorderTop(HSSFBorderFormatting.BORDER_THICK, cra14, sheet, wr);
HSSFRow createRowtag14 = sheet.createRow(num+2); // 表名
createRowtag14.setHeight((short) 380);
HSSFCell createCelltag14 = createRowtag14.createCell(0);
createCelltag14.setCellValue("电机永久性时刻表");
createCelltag14.setCellStyle(cellStyletag);
HSSFRow createRowdjyj1 = sheet.createRow(num+3); // 字段名
createRowdjyj1.setHeight((short) 380);
HSSFCell createCelldjyj1 = createRowdjyj1.createCell(0);
createCelldjyj1.setCellValue("结束时间");
createCelldjyj1.setCellStyle(cellStyle1);
HSSFCell createCelldjyj2 =createRowdjyj1.createCell(1);
createCelldjyj2.setCellValue("结束工位");
createCelldjyj2.setCellStyle(cellStyle1);
HSSFCell createCelldjyj3 = createRowdjyj1.createCell(2);
createCelldjyj3.setCellValue("模组条码");
createCelldjyj3.setCellStyle(cellStyle1);
HSSFCell createCelldjyj4 =createRowdjyj1.createCell(3);
createCelldjyj4.setCellValue("状态");
createCelldjyj4.setCellStyle(cellStyle1);
//表数据
List<Map<String, Object>> findAll14 = service.findAll(14, sn);
num = num+4;
for (int i = 0; i < findAll14.size(); i++) {
HSSFRow createRowdjyj = sheet.createRow(num);
createRowdjyj.setHeight((short) 280);
HSSFCell createCellbt0 =createRowdjyj.createCell(0); // 总成
createCellbt0.setCellValue(String.valueOf(findAll14.get(i).get("time")));
createCellbt0.setCellStyle(cellStyle2);
HSSFCell createCellbt17 = createRowdjyj.createCell(1); // 时间
createCellbt17.setCellValue(String.valueOf(findAll14.get(i).get("ST")));
createCellbt17.setCellStyle(cellStyle2);
HSSFCell createCellbt1 =createRowdjyj.createCell(2); // 状态
createCellbt1.setCellValue(String.valueOf(findAll14.get(i).get("SN")));
createCellbt1.setCellStyle(cellStyle2);
HSSFCell createCellbt2 =createRowdjyj.createCell(3); // 状态
createCellbt2.setCellValue(String.valueOf(findAll14.get(i).get("STATUS")));
createCellbt2.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
}*/
//模组人工目检表
CellRangeAddress cra15 = new CellRangeAddress(num+2, num+2, 0, 4); //表名横跨多少列
sheet.addMergedRegion(cra15);
RegionUtil.setBorderTop(HSSFBorderFormatting.BORDER_THICK, cra15, sheet, wr);
HSSFRow createRowtag15 = sheet.createRow(num+2); // 表名
createRowtag15.setHeight((short) 380);
HSSFCell createCelltag15 = createRowtag15.createCell(0);
createCelltag15.setCellValue("模组人工目检表");
createCelltag15.setCellStyle(cellStyletag);
HSSFRow createRowmzrg1 = sheet.createRow(num+3); // 字段名
createRowmzrg1.setHeight((short) 380);
HSSFCell createCellmzrg1 = createRowmzrg1.createCell(0);
createCellmzrg1.setCellValue("时间");
createCellmzrg1.setCellStyle(cellStyle1);
HSSFCell createCellmzrg2 =createRowmzrg1.createCell(1);
createCellmzrg2.setCellValue("电机条码");
createCellmzrg2.setCellStyle(cellStyle1);
HSSFCell createCellmzrg3 = createRowmzrg1.createCell(2);
createCellmzrg3.setCellValue("操作员");
createCellmzrg3.setCellStyle(cellStyle1);
HSSFCell createCellmzrg4 =createRowmzrg1.createCell(3);
createCellmzrg4.setCellValue("备注");
createCellmzrg4.setCellStyle(cellStyle1);
HSSFCell createCellmzrg5 = createRowmzrg1.createCell(4);
createCellmzrg5.setCellValue("判定结果");
createCellmzrg5.setCellStyle(cellStyle1);
//表数据
List<Map<String, Object>> findAll15 = service.findAll(15, sn);
num = num+4;
for (int i = 0; i < findAll15.size(); i++) {
HSSFRow createRowmzrg= sheet.createRow(num);
createRowmzrg.setHeight((short) 280);
HSSFCell createCellbt0 =createRowmzrg.createCell(0); // 总成
createCellbt0.setCellValue(String.valueOf(findAll15.get(i).get("DT")));
createCellbt0.setCellStyle(cellStyle2);
HSSFCell createCellbt17 =createRowmzrg.createCell(1); // 时间
createCellbt17.setCellValue(String.valueOf(findAll15.get(i).get("SN")));
createCellbt17.setCellStyle(cellStyle2);
HSSFCell createCellbt1 =createRowmzrg.createCell(2); // 状态
createCellbt1.setCellValue(String.valueOf(findAll15.get(i).get("EMP")));
createCellbt1.setCellStyle(cellStyle2);
HSSFCell createCellbt2 =createRowmzrg.createCell(3); // 状态
createCellbt2.setCellValue(String.valueOf(findAll15.get(i).get("DIS")));
createCellbt2.setCellStyle(cellStyle2);
HSSFCell createCellbt3 = createRowmzrg.createCell(4); // 状态
createCellbt3.setCellValue(String.valueOf(findAll15.get(i).get("RESULT")));
createCellbt3.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
}
//模组气密表
CellRangeAddress cra16 = new CellRangeAddress(num+2, num+2, 0, 6); //表名横跨多少列
sheet.addMergedRegion(cra16);
RegionUtil.setBorderTop(HSSFBorderFormatting.BORDER_THICK, cra16, sheet, wr);
HSSFRow createRowtag16 = sheet.createRow(num+2); // 表名
createRowtag16.setHeight((short) 380);
HSSFCell createCelltag16 = createRowtag16.createCell(0);
createCelltag16.setCellValue("模组气密表");
createCelltag16.setCellStyle(cellStyletag);
HSSFRow createRowmzqm1 = sheet.createRow(num+3); // 字段名
createRowmzqm1.setHeight((short) 380);
HSSFCell createCellmzqm1 = createRowmzqm1.createCell(0);
createCellmzqm1.setCellValue("时间");
createCellmzqm1.setCellStyle(cellStyle1);
HSSFCell createCellmzqm2 =createRowmzqm1.createCell(1);
createCellmzqm2.setCellValue("工位");
createCellmzqm2.setCellStyle(cellStyle1);
HSSFCell createCellmzqm3 = createRowmzqm1.createCell(2);
createCellmzqm3.setCellValue("SN");
createCellmzqm3.setCellStyle(cellStyle1);
HSSFCell createCellmzqm4 =createRowmzqm1.createCell(3);
createCellmzqm4.setCellValue("操作员");
createCellmzqm4.setCellStyle(cellStyle1);
HSSFCell createCellmzqm5 = createRowmzqm1.createCell(4);
createCellmzqm5.setCellValue("气压值");
createCellmzqm5.setCellStyle(cellStyle1);
HSSFCell createCellmzqm6 =createRowmzqm1.createCell(5);
createCellmzqm6.setCellValue("泄漏值");
createCellmzqm6.setCellStyle(cellStyle1);
HSSFCell createCellmzqm7 = createRowmzqm1.createCell(6);
createCellmzqm7.setCellValue("结果");
createCellmzqm7.setCellStyle(cellStyle1);
//表数据
List<Map<String, Object>> findAll16 = service.findAll(16, sn);
num = num+4;
for (int i = 0; i < findAll16.size(); i++) {
HSSFRow createRowmzqm= sheet.createRow(num);
createRowmzqm.setHeight((short) 280);
HSSFCell createCellbt0 =createRowmzqm.createCell(0); // 总成
createCellbt0.setCellValue(String.valueOf(findAll16.get(i).get("DT")));
createCellbt0.setCellStyle(cellStyle2);
HSSFCell createCellbt17 =createRowmzqm.createCell(1); // 时间
createCellbt17.setCellValue(String.valueOf(findAll16.get(i).get("ST")));
createCellbt17.setCellStyle(cellStyle2);
HSSFCell createCellbt1 =createRowmzqm.createCell(2); // 状态
createCellbt1.setCellValue(String.valueOf(findAll16.get(i).get("SN")));
createCellbt1.setCellStyle(cellStyle2);
HSSFCell createCellbt2 =createRowmzqm.createCell(3); // 状态
createCellbt2.setCellValue(String.valueOf(findAll16.get(i).get("WID")));
createCellbt2.setCellStyle(cellStyle2);
HSSFCell createCellbt3 = createRowmzqm.createCell(4); // 状态
createCellbt3.setCellValue(String.valueOf(findAll16.get(i).get("LEAKAGE_PV")));
createCellbt3.setCellStyle(cellStyle2);
HSSFCell createCellbt4 =createRowmzqm.createCell(5); // 状态
createCellbt4.setCellValue(String.valueOf(findAll16.get(i).get("LEAKAGE_LV")));
createCellbt4.setCellStyle(cellStyle2);
HSSFCell createCellbt5 =createRowmzqm.createCell(6); // 状态
createCellbt5.setCellValue(String.valueOf(findAll16.get(i).get("LEAKAGE_R")));
createCellbt5.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
}
//模组挤压表
CellRangeAddress cra17 = new CellRangeAddress(num+2, num+2, 0, 4); //表名横跨多少列
sheet.addMergedRegion(cra17);
RegionUtil.setBorderTop(HSSFBorderFormatting.BORDER_THICK, cra17, sheet, wr);
HSSFRow createRowtag17 = sheet.createRow(num+2); // 表名
createRowtag17.setHeight((short) 380);
HSSFCell createCelltag17 = createRowtag17.createCell(0);
createCelltag17.setCellValue("模组挤压表");
createCelltag17.setCellStyle(cellStyletag);
HSSFRow createRowmzjy1 = sheet.createRow(num+3); // 字段名
createRowmzjy1.setHeight((short) 380);
HSSFCell createCellmzjy1 =createRowmzjy1.createCell(0);
createCellmzjy1.setCellValue("时间");
createCellmzjy1.setCellStyle(cellStyle1);
HSSFCell createCellmzjy2 =createRowmzjy1.createCell(1);
createCellmzjy2.setCellValue("模组条码");
createCellmzjy2.setCellStyle(cellStyle1);
HSSFCell createCellmzjy3 = createRowmzjy1.createCell(2);
createCellmzjy3.setCellValue("及压力");
createCellmzjy3.setCellStyle(cellStyle1);
HSSFCell createCellmzjy4 =createRowmzjy1.createCell(3);
createCellmzjy4.setCellValue("模组长度");
createCellmzjy4.setCellStyle(cellStyle1);
HSSFCell createCellmzjy5 = createRowmzjy1.createCell(4);
createCellmzjy5.setCellValue("挤压通道");
createCellmzjy5.setCellStyle(cellStyle1);
//表数据
List<Map<String, Object>> findAll17 = service.findAll(27, sn);
num = num+4;
for (int i = 0; i < findAll17.size(); i++) {
HSSFRow createRowmzjy= sheet.createRow(num);
createRowmzjy.setHeight((short) 280);
HSSFCell createCellbt0 = createRowmzjy.createCell(0); // 总成
createCellbt0.setCellValue(String.valueOf(findAll17.get(i).get("DT")));
createCellbt0.setCellStyle(cellStyle2);
HSSFCell createCellbt17 = createRowmzjy.createCell(1); // 时间
createCellbt17.setCellValue(String.valueOf(findAll17.get(i).get("SN")));
createCellbt17.setCellStyle(cellStyle2);
HSSFCell createCellbt1 = createRowmzjy.createCell(2); // 状态
createCellbt1.setCellValue(String.valueOf(findAll17.get(i).get("Pressure")));
createCellbt1.setCellStyle(cellStyle2);
HSSFCell createCellbt2 = createRowmzjy.createCell(3); // 状态
createCellbt2.setCellValue(String.valueOf(findAll17.get(i).get("Lenght")));
createCellbt2.setCellStyle(cellStyle2);
HSSFCell createCellbt3 = createRowmzjy.createCell(4); // 状态
createCellbt3.setCellValue(String.valueOf(findAll17.get(i).get("Pload")));
createCellbt3.setCellStyle(cellStyle2);
num = num+1;//每一条记录都占用一条
}
/*CellRangeAddress cra18 = new CellRangeAddress(num+2, num+2, 0, 6); //表名横跨多少列(6代表列)从0列0行开始数代表的1行1列
sheet.addMergedRegion(cra18);
RegionUtil.setBorderTop(HSSFBorderFormatting.BORDER_THICK, cra18, sheet, wr);
HSSFRow createRowtag18 = sheet.createRow(num+2); // 表名
createRowtag18.setHeight((short) 380);
HSSFCell createCelltag18 = createRowtag18.createCell(0);
createCelltag18.setCellValue("OCV电芯详情");
createCelltag18.setCellStyle(cellStyletag);
HSSFRow createRowocv1 = sheet.createRow(num+3); // 字段名
createRowocv1.setHeight((short) 380);//设置行高
HSSFCell createCellocv1 = createRowocv1.createCell(0);
createCellocv1.setCellValue("总成");
createCellocv1.setCellStyle(cellStyle1);
HSSFCell createCellocv2 = createRowocv1.createCell(1);
createCellocv2.setCellValue("时间");
createCellocv2.setCellStyle(cellStyle1);
HSSFCell createCellocv3 = createRowocv1.createCell(2);
createCellocv3.setCellValue("电压");
createCellocv3.setCellStyle(cellStyle1);
HSSFCell createCellocv4 = createRowocv1.createCell(3);
createCellocv4.setCellValue("内阻");
createCellocv4.setCellStyle(cellStyle1);
HSSFCell createCellocv5 = createRowocv1.createCell(4);
createCellocv5.setCellValue("上线状态");
createCellocv5.setCellStyle(cellStyle1);
HSSFCell createCellocv6 = createRowocv1.createCell(5);
createCellocv6.setCellValue("模组状态");
createCellocv6.setCellStyle(cellStyle1);
HSSFCell createCellocv7 = createRowocv1.createCell(6);
createCellocv7.setCellValue("工位");
createCellocv7.setCellStyle(cellStyle1);
//表数据
List<Map<String, Object>> findAl18 = service.findAll(1, sn);
System.err.println(findAl18.size());
num = num+4;
for (int i = 0; i < findAl18.size(); i++) {
HSSFRow createRowocv2 = sheet.createRow(num);
createRowocv2.setHeight((short) 280);
HSSFCell createCellbt0 = createRowocv2.createCell(0); // 总成
createCellbt0.setCellValue(String.valueOf(findAl18.get(i).get("BATTERIES_NUM")));
createCellbt0.setCellStyle(cellStyle2);
HSSFCell createCellbt17 = createRowocv2.createCell(1); // 时间
createCellbt17.setCellValue(String.valueOf(findAl18.get(i).get("DT")));
createCellbt17.setCellStyle(cellStyle2);
HSSFCell createCellbt1 =createRowocv2.createCell(2); // 电压
createCellbt1.setCellValue(String.valueOf(findAl18.get(i).get("VOLTAGE")));
createCellbt1.setCellStyle(cellStyle2);
HSSFCell createCellbt2 = createRowocv2.createCell(3); // 内阻
createCellbt2.setCellValue(String.valueOf(findAl18.get(i).get("RESISTANCE")));
createCellbt2.setCellStyle(cellStyle2);
HSSFCell createCellbt3 = createRowocv2.createCell(4); // 上线状态
createCellbt3.setCellValue(String.valueOf(findAl18.get(i).get("BATTERIES_STATUS")));
createCellbt3.setCellStyle(cellStyle2);
HSSFCell createCellbt4 = createRowocv2.createCell(5); // 模组状态
createCellbt4.setCellValue(String.valueOf(findAl18.get(i).get("STATUS")));
createCellbt4.setCellStyle(cellStyle2);
HSSFCell createCellbt5= createRowocv2.createCell(6); // 工位
createCellbt5.setCellValue(String.valueOf(findAl18.get(i).get("SOURCE")));
createCellbt5.setCellStyle(cellStyle2);
num = num+1;
}*/
}
public static void export(HttpServletResponse response, Workbook wb, String fileName) throws Exception {
response.setHeader("Content-Disposition",
"attachment;filename=" + new String(fileName.getBytes("utf-8"), "iso8859-1"));
response.setContentType("application/ynd.ms-excel;charset=UTF-8");
OutputStream out = response.getOutputStream();
wb.write(out);
out.flush();
out.close();
}
28、端口关闭
netstat -ano |findstr "8099"
29、设置VSCODE编码规范
填写文件覆盖旧文件
{
"terminal.integrated.cursorStyle": "line", //终端竖线
"editor.fontSize": 20,
"http.proxyAuthorization": "true",
"editor.formatOnSave": true, //保存时格式化
"editor.defaultFormatter": "octref.vetur", //默认格式化工具
"vetur.format.defaultFormatter.html": "js-beautify-html", //vetur默认的格式化html工具
//vetur默认格式化选项
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
"wrap_attributes": "force-aligned" //属性强制折行对齐
},
"prettier": {
"singleQuote": true, //单引号
"semi": true, //分号
"trailingComma": "all" //拖尾逗号
}
},
// js文件选项
"[javascript]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[vue]": {
"editor.defaultFormatter": "octref.vetur"
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"eslint.validate": [
"javascript",
"json",
"js"
],
/**
todotree的设置
*/
"todo-tree.filtering.ignoreGitSubmodules": true,
//todo-tree settings
"todo-tree.regex.regex": "(//|#|<!--|;|/\\*|^|^\\s*(-|\\d+.))\\s*($TAGS)",
"todo-tree.general.tags": [
"TODO",
"DONE",
"FIXME",
"BUG",
"NOTE",
"STAR"
], // can add more tags with default style like 'STAR'
"todo-tree.regex.regexCaseSensitive": false, // make TODO == todo
"todo-tree.highlights.customHighlight": {
"STAR": {
// "foreground": "white",
"background": "Gold",
"icon": "star-fill",
"rulerColour": "Gold",
"iconColour": "Gold"
},
"DONE": {
"foreground": "white",
"background": "green",
"icon": "check-circle-fill",
"rulerColour": "green",
"iconColour": "green"
},
"FIXME": {
"foreground": "white",
"background": "RoyalBlue",
"icon": "gear",
"rulerColour": "RoyalBlue",
"iconColour": "RoyalBlue"
},
"BUG": {
"foreground": "white",
"background": "Crimson",
"rulerColour": "Crimson",
"iconColour": "Crimson"
},
"NOTE": {
"foreground": "black",
"icon": "bookmark-fill",
"background": "BurlyWood",
"rulerColour": "BurlyWood",
"iconColour": "BurlyWood"
},
},
"vetur.validation.template": false,
"javascript.format.insertSpaceBeforeFunctionParenthesis": false,
"javascript.format.insertSpaceAfterConstructor": false,
"workbench.editorAssociations": [
{
"viewType": "jupyter-notebook",
"filenamePattern": "*.ipynb"
}
],
"tabnine.experimentalAutoImports": true,
}