|
@@ -626,52 +626,59 @@ public class TInvoiceBookingworkticketController extends BaseController {
|
|
StringBuilder contentUserWorkType = new StringBuilder();
|
|
StringBuilder contentUserWorkType = new StringBuilder();
|
|
String cuw = "";
|
|
String cuw = "";
|
|
for (TInvoiceWorkcontent t : tInvoiceWorkcontentList) {
|
|
for (TInvoiceWorkcontent t : tInvoiceWorkcontentList) {
|
|
- if (t.getBookingworkticket().getStatus() != 3) {
|
|
|
|
- continue;
|
|
|
|
- }
|
|
|
|
- Row row = sheet.createRow(rowIndex);
|
|
|
|
- //开始时间
|
|
|
|
- if (t.getBookingworkticket().getWorkStartTime() != null) {
|
|
|
|
- row.createCell(0).setCellValue(new SimpleDateFormat("yyyy/MM/dd").format(t.getBookingworkticket().getWorkStartTime()));
|
|
|
|
- }
|
|
|
|
- //作业类型
|
|
|
|
- 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 (String c : contentlist)
|
|
|
|
- if (c.equals(p.getDictValue())) {
|
|
|
|
- contentUserWorkType.append("," + p.getDictLabel());//作业类型
|
|
|
|
- }
|
|
|
|
|
|
+ try {
|
|
|
|
+ if (t.getBookingworkticket().getStatus() != 3) {
|
|
|
|
+ continue;
|
|
}
|
|
}
|
|
- if (contentUserWorkType.toString().startsWith(",")) {
|
|
|
|
- cuw = contentUserWorkType.substring(1);
|
|
|
|
|
|
+ Row row = sheet.createRow(rowIndex);
|
|
|
|
+ //开始时间
|
|
|
|
+ if (t.getBookingworkticket().getWorkStartTime() != null) {
|
|
|
|
+ row.createCell(0).setCellValue(new SimpleDateFormat("yyyy/MM/dd").format(t.getBookingworkticket().getWorkStartTime()));
|
|
}
|
|
}
|
|
- row.createCell(1).setCellValue(cuw);
|
|
|
|
- }
|
|
|
|
- if (t.getBookingworkticket().getWorkArea() != null) {
|
|
|
|
- row.createCell(2).setCellValue(t.getBookingworkticket().getWorkArea());
|
|
|
|
- }
|
|
|
|
- //作业地址
|
|
|
|
- if (t.getWorkDescription() != null) {
|
|
|
|
- row.createCell(3).setCellValue(t.getWorkDescription());
|
|
|
|
- }
|
|
|
|
- //工艺主管
|
|
|
|
- row.createCell(4).setCellValue(t.getBookingworkticket().getUserSupName() + " " + t.getBookingworkticket().getUserSupPhone());
|
|
|
|
- //作业单位
|
|
|
|
- if (t.getBookingworkticket().getWorkUnit() != null) {
|
|
|
|
- row.createCell(5).setCellValue(t.getBookingworkticket().getWorkUnit());
|
|
|
|
|
|
+ //作业类型
|
|
|
|
+ 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 (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().getWorkArea() != null) {
|
|
|
|
+ row.createCell(2).setCellValue(t.getBookingworkticket().getWorkArea());
|
|
|
|
+ }
|
|
|
|
+ //作业地址
|
|
|
|
+ if (t.getWorkDescription() != null) {
|
|
|
|
+ row.createCell(3).setCellValue(t.getWorkDescription());
|
|
|
|
+ }
|
|
|
|
+ //工艺主管
|
|
|
|
+ row.createCell(4).setCellValue(t.getBookingworkticket().getUserSupName() + " " + t.getBookingworkticket().getUserSupPhone());
|
|
|
|
+ //作业单位
|
|
|
|
+ if (t.getBookingworkticket().getWorkUnit() != null) {
|
|
|
|
+ row.createCell(5).setCellValue(t.getBookingworkticket().getWorkUnit());
|
|
|
|
+ }
|
|
|
|
+ //负责人
|
|
|
|
+ row.createCell(6).setCellValue(t.getBookingworkticket().getContact());
|
|
|
|
+ //电话
|
|
|
|
+ row.createCell(7).setCellValue(t.getBookingworkticket().getPhonenumber());
|
|
|
|
+ //用户
|
|
|
|
+ row.createCell(8).setCellValue(t.getBookingworkticket().getUserMgName() + " " + t.getBookingworkticket().getUserMgPhone());
|
|
|
|
+ //票号
|
|
|
|
+ String ticketNo = t.getWhgzxkzh() + t.getDhzyxkzh()+t.getGczyxkzh()+t.getMbzyxkzh()+t.getXzkjxkzh() + t.getYqxkzh();
|
|
|
|
+ row.createCell(9).setCellValue(ticketNo.replaceAll("null" , ""));
|
|
|
|
+ rowIndex++;
|
|
|
|
+ contentUserWorkType.delete(0, contentUserWorkType.length());
|
|
|
|
+ }catch (Exception e) {
|
|
|
|
+ logger.error(e.toString());
|
|
}
|
|
}
|
|
- //负责人
|
|
|
|
- row.createCell(6).setCellValue(t.getBookingworkticket().getContact());
|
|
|
|
- //电话
|
|
|
|
- row.createCell(7).setCellValue(t.getBookingworkticket().getPhonenumber());
|
|
|
|
- //用户
|
|
|
|
- row.createCell(8).setCellValue(t.getBookingworkticket().getUserMgName() + " " + t.getBookingworkticket().getUserMgPhone());
|
|
|
|
|
|
|
|
- rowIndex++;
|
|
|
|
- contentUserWorkType.delete(0, contentUserWorkType.length());
|
|
|
|
}
|
|
}
|
|
|
|
|
|
OutputStream out = null;
|
|
OutputStream out = null;
|