|
@@ -134,8 +134,9 @@ public class TInvoiceBookingworkticketController extends BaseController
|
|
|
|
|
|
List<TInvoiceWorkcontent> tInvoiceWorkcontentList = tInvoiceBookingworkticketService.selectTInvoiceWorkcontentList(tInvoiceBookingworkticket);
|
|
List<TInvoiceWorkcontent> tInvoiceWorkcontentList = tInvoiceBookingworkticketService.selectTInvoiceWorkcontentList(tInvoiceBookingworkticket);
|
|
for (TInvoiceWorkcontent workcontent : tInvoiceWorkcontentList) {
|
|
for (TInvoiceWorkcontent workcontent : tInvoiceWorkcontentList) {
|
|
- TInvoiceBookingworkticket bookingworkticket=tInvoiceBookingworkticketService.selectTInvoiceBookingworkticketById(workcontent.getBookingticketId());
|
|
|
|
- workcontent.setBookingworkticket(bookingworkticket);
|
|
|
|
|
|
+
|
|
|
|
+ TInvoiceBookingworkticket bookingworkticket=tInvoiceBookingworkticketService.selectTInvoiceBookingworkticketById(workcontent.getBookingticketId());
|
|
|
|
+ workcontent.setBookingworkticket(bookingworkticket);
|
|
}
|
|
}
|
|
|
|
|
|
SXSSFWorkbook wb = new SXSSFWorkbook(1000);
|
|
SXSSFWorkbook wb = new SXSSFWorkbook(1000);
|
|
@@ -185,16 +186,29 @@ public class TInvoiceBookingworkticketController extends BaseController
|
|
//填充数据
|
|
//填充数据
|
|
int rowIndex = 1;
|
|
int rowIndex = 1;
|
|
int columnIndex = 1;
|
|
int columnIndex = 1;
|
|
|
|
+ StringBuilder contentUserWorkType=new StringBuilder();
|
|
|
|
+ String cuw="";
|
|
for (TInvoiceWorkcontent t: tInvoiceWorkcontentList) {
|
|
for (TInvoiceWorkcontent t: tInvoiceWorkcontentList) {
|
|
|
|
+ if(t.getBookingworkticket().getStatus()!=3){
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
Row row = sheet.createRow(rowIndex);
|
|
Row row = sheet.createRow(rowIndex);
|
|
row.createCell(0).setCellValue("扬子石化-巴斯夫有限责任公司");
|
|
row.createCell(0).setCellValue("扬子石化-巴斯夫有限责任公司");
|
|
//作业类型
|
|
//作业类型
|
|
if (t.getWorkType()!= null){
|
|
if (t.getWorkType()!= null){
|
|
|
|
+ String newStr=t.getWorkType()+",";
|
|
|
|
+ String[] wtArr=newStr.split(",");
|
|
|
|
+ List<String> contentlist = Arrays.asList(wtArr);
|
|
for (SysDictData p : book_work_type) {
|
|
for (SysDictData p : book_work_type) {
|
|
- if (t.getWorkType().toString().equals(p.getDictValue())) {
|
|
|
|
- row.createCell(1).setCellValue(p.getDictLabel());
|
|
|
|
- }
|
|
|
|
|
|
+ for (String c : contentlist)
|
|
|
|
+ if (c.equals(p.getDictValue())) {
|
|
|
|
+ contentUserWorkType.append(","+p.getDictLabel());//作业类型
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(contentUserWorkType.toString().startsWith(",")){
|
|
|
|
+ cuw=contentUserWorkType.substring(1);
|
|
}
|
|
}
|
|
|
|
+ row.createCell(1).setCellValue(cuw);
|
|
}
|
|
}
|
|
if (t.getBookingworkticket().getWorkStartTime()!= null){
|
|
if (t.getBookingworkticket().getWorkStartTime()!= null){
|
|
row.createCell(2).setCellValue(new SimpleDateFormat("yyyy/MM/dd").format(t.getBookingworkticket().getWorkStartTime()));
|
|
row.createCell(2).setCellValue(new SimpleDateFormat("yyyy/MM/dd").format(t.getBookingworkticket().getWorkStartTime()));
|
|
@@ -226,6 +240,7 @@ public class TInvoiceBookingworkticketController extends BaseController
|
|
//
|
|
//
|
|
row.createCell(12).setCellValue("");
|
|
row.createCell(12).setCellValue("");
|
|
rowIndex++;
|
|
rowIndex++;
|
|
|
|
+ contentUserWorkType.delete(0, contentUserWorkType.length());
|
|
}
|
|
}
|
|
// 接着上面的最后一行追加
|
|
// 接着上面的最后一行追加
|
|
int rowIndex1 = sheet.getLastRowNum()+1;
|
|
int rowIndex1 = sheet.getLastRowNum()+1;
|
|
@@ -285,7 +300,11 @@ public class TInvoiceBookingworkticketController extends BaseController
|
|
int workType10=0; int workType11=0; int workType12=0; int workType13=0; int workType14=0;
|
|
int workType10=0; int workType11=0; int workType12=0; int workType13=0; int workType14=0;
|
|
int workType15=0; int workType16=0; int workType17=0;
|
|
int workType15=0; int workType16=0; int workType17=0;
|
|
//填充下一个表格
|
|
//填充下一个表格
|
|
|
|
+ int count=0;
|
|
for (TInvoiceWorkcontent t: tInvoiceWorkcontentList) {
|
|
for (TInvoiceWorkcontent t: tInvoiceWorkcontentList) {
|
|
|
|
+ if(t.getBookingworkticket().getStatus()!=3){
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
//先将字符串 分割数组 再转成集合 防止出现 1,11这种情况判断不清
|
|
//先将字符串 分割数组 再转成集合 防止出现 1,11这种情况判断不清
|
|
String newStr=t.getWorkType()+",";
|
|
String newStr=t.getWorkType()+",";
|
|
String[] wtArr=newStr.split(",");
|
|
String[] wtArr=newStr.split(",");
|
|
@@ -319,6 +338,7 @@ public class TInvoiceBookingworkticketController extends BaseController
|
|
}else {
|
|
}else {
|
|
//变更、承包、停车装置暂无数据
|
|
//变更、承包、停车装置暂无数据
|
|
}
|
|
}
|
|
|
|
+ count++;
|
|
}
|
|
}
|
|
|
|
|
|
Row row = sheet.createRow(rowIndex1+1);
|
|
Row row = sheet.createRow(rowIndex1+1);
|
|
@@ -340,7 +360,7 @@ public class TInvoiceBookingworkticketController extends BaseController
|
|
row.createCell(15).setCellValue(0);
|
|
row.createCell(15).setCellValue(0);
|
|
row.createCell(16).setCellValue(0);
|
|
row.createCell(16).setCellValue(0);
|
|
row.createCell(17).setCellValue(0);
|
|
row.createCell(17).setCellValue(0);
|
|
- row.createCell(18).setCellValue(tInvoiceWorkcontentList.size());
|
|
|
|
|
|
+ row.createCell(18).setCellValue(count);
|
|
|
|
|
|
|
|
|
|
OutputStream out = null;
|
|
OutputStream out = null;
|