| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -144,10 +144,10 @@ public class BaseUtil { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                } | 
					 | 
					 | 
					 | 
					                } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            } | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            // 表格处理
 | 
					 | 
					 | 
					 | 
					            // 表格处理
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if (templatePath.equals("template/卫生自查表.docx")) { | 
					 | 
					 | 
					 | 
					            if ("template/卫生自查表.docx".equals(templatePath)) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                formatHygieneRecordTable(xwpfDocument); | 
					 | 
					 | 
					 | 
					                formatHygieneRecordTable(xwpfDocument); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            } | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if (templatePath.equals("template/车辆检查表.docx")) { | 
					 | 
					 | 
					 | 
					            if ("template/车辆检查表.docx".equals(templatePath)) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                formatCarCheckRecordTable(xwpfDocument); | 
					 | 
					 | 
					 | 
					                formatCarCheckRecordTable(xwpfDocument); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            } | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } catch (Exception e) { | 
					 | 
					 | 
					 | 
					        } catch (Exception e) { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -225,13 +225,18 @@ public class BaseUtil { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                List<XWPFTableRow> rows = table.getRows(); | 
					 | 
					 | 
					 | 
					                List<XWPFTableRow> rows = table.getRows(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                // 第三行到倒数第二行为需合并区域
 | 
					 | 
					 | 
					 | 
					                // 第三行到倒数第二行为需合并区域
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                for (int row = 3; row < rows.size() - 1;) { | 
					 | 
					 | 
					 | 
					                for (int row = 3; row < rows.size() - 1;) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    XWPFTableCell startCell = rows.get(row).getCell(0); | 
					 | 
					 | 
					 | 
					                    // 判断责任区和责任人是否完全一致,一致则合并
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    String startText = startCell.getText(); | 
					 | 
					 | 
					 | 
					                    XWPFTableCell startFirstCell = rows.get(row).getCell(0); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                    String startFirstText = startFirstCell.getText(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                    XWPFTableCell startSecondCell = rows.get(row).getCell(1); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                    String startSecondText = startSecondCell.getText(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    int index = row + 1; | 
					 | 
					 | 
					 | 
					                    int index = row + 1; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    for (; index < rows.size(); index++) { | 
					 | 
					 | 
					 | 
					                    for (; index < rows.size(); index++) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        XWPFTableCell endCell = rows.get(index).getCell(0); | 
					 | 
					 | 
					 | 
					                        XWPFTableCell endFirstCell = rows.get(index).getCell(0); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        String endText = endCell.getText(); | 
					 | 
					 | 
					 | 
					                        String endFirstText = endFirstCell.getText(); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        if (!startText.equals(endText)) { | 
					 | 
					 | 
					 | 
					                        XWPFTableCell endSecondCell = rows.get(index).getCell(1); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                        String endSecondText = endSecondCell.getText(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                        if (!startFirstText.equals(endFirstText) || !startSecondText.equals(endSecondText)) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                            break; | 
					 | 
					 | 
					 | 
					                            break; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        } | 
					 | 
					 | 
					 | 
					                        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    } | 
					 | 
					 | 
					 | 
					                    } | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |