|
|
@ -308,6 +308,7 @@ public class ExcelTemplateTX { |
|
|
Set<Integer> invoiceTotalPriceCols = new HashSet<>(); |
|
|
Set<Integer> invoiceTotalPriceCols = new HashSet<>(); |
|
|
Set<Integer> declarationFixedPriceCols = new HashSet<>(); |
|
|
Set<Integer> declarationFixedPriceCols = new HashSet<>(); |
|
|
Set<Integer> declarationQtyCols = new HashSet<>(); |
|
|
Set<Integer> declarationQtyCols = new HashSet<>(); |
|
|
|
|
|
Set<Integer> declarationHsCodeDescCols = new HashSet<>(); |
|
|
Set<Integer> packingVolumeCols = new HashSet<>(); |
|
|
Set<Integer> packingVolumeCols = new HashSet<>(); |
|
|
Set<Integer> packingNetWeightCols = new HashSet<>(); |
|
|
Set<Integer> packingNetWeightCols = new HashSet<>(); |
|
|
//整体填值 |
|
|
//整体填值 |
|
|
@ -345,6 +346,9 @@ public class ExcelTemplateTX { |
|
|
if (isDeclarationQtyField(dtlField)) { |
|
|
if (isDeclarationQtyField(dtlField)) { |
|
|
declarationQtyCols.add(j); |
|
|
declarationQtyCols.add(j); |
|
|
} |
|
|
} |
|
|
|
|
|
if (isDeclarationHsCodeDescField(dtlField)) { |
|
|
|
|
|
declarationHsCodeDescCols.add(j); |
|
|
|
|
|
} |
|
|
if (isPackingVolumeField(dtlField)) { |
|
|
if (isPackingVolumeField(dtlField)) { |
|
|
packingVolumeCols.add(j); |
|
|
packingVolumeCols.add(j); |
|
|
} |
|
|
} |
|
|
@ -652,8 +656,11 @@ public class ExcelTemplateTX { |
|
|
font.setFontName("Arial"); |
|
|
font.setFontName("Arial"); |
|
|
font.setFontHeightInPoints((short) 10); |
|
|
font.setFontHeightInPoints((short) 10); |
|
|
style.setFont(font); |
|
|
style.setFont(font); |
|
|
style.setVerticalAlignment(VerticalAlignment.CENTER); |
|
|
|
|
|
|
|
|
boolean declarationHsCodeDescColumn = declarationHsCodeDescCols.contains(i); |
|
|
|
|
|
boolean keepWrapText = c7.getCellStyle() != null && c7.getCellStyle().getWrapText(); |
|
|
|
|
|
style.setVerticalAlignment(declarationHsCodeDescColumn ? VerticalAlignment.TOP : VerticalAlignment.CENTER); |
|
|
style.setAlignment(HorizontalAlignment.LEFT); |
|
|
style.setAlignment(HorizontalAlignment.LEFT); |
|
|
|
|
|
style.setWrapText(keepWrapText || declarationHsCodeDescColumn); |
|
|
c7.setCellStyle(style); |
|
|
c7.setCellStyle(style); |
|
|
boolean declarationFixedTwoScaleColumn = fixedDeclarationPriceScale && declarationFixedPriceCols.contains(i); |
|
|
boolean declarationFixedTwoScaleColumn = fixedDeclarationPriceScale && declarationFixedPriceCols.contains(i); |
|
|
boolean declarationQtyColumn = fixedDeclarationPriceScale && declarationQtyCols.contains(i); |
|
|
boolean declarationQtyColumn = fixedDeclarationPriceScale && declarationQtyCols.contains(i); |
|
|
@ -945,6 +952,10 @@ public class ExcelTemplateTX { |
|
|
return "qty".equalsIgnoreCase(field); |
|
|
return "qty".equalsIgnoreCase(field); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private boolean isDeclarationHsCodeDescField(String field) { |
|
|
|
|
|
return "hs_code_desc".equalsIgnoreCase(field); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
private boolean isPackingVolumeField(String field) { |
|
|
private boolean isPackingVolumeField(String field) { |
|
|
return "volume".equalsIgnoreCase(field); |
|
|
return "volume".equalsIgnoreCase(field); |
|
|
} |
|
|
} |
|
|
|