1. @Override
    2. public ResponseBO<ImportPurchaseSettlementLineResp> importPurchaseSettlementLine(MultipartFile file) throws Exception {
    3. ImportPurchaseSettlementLineResp resp = new ImportPurchaseSettlementLineResp();
    4. // 校验
    5. ImportParams params = new ImportParams();
    6. // 表头设置为2行
    7. params.setHeadRows(1);
    8. // 标题行设置为0行,默认是0,可以不设置
    9. params.setTitleRows(1);
    10. // 开启Excel校验
    11. params.setNeedVerify(true);
    12. ExcelImportResult<PomSettlementLineExcelBO> result = ExcelImportUtil.importExcelMore(file.getInputStream(), PomSettlementLineExcelBO.class, params);
    13. List<PomSettlementLineExcelBO> failList = result.getFailList();
    14. List<PomSettlementLineExcelBO> succList = result.getList();
    15. log.info("是否校验失败: " + result.isVerifyFail());
    16. log.info("校验失败的集合:" + failList.size());
    17. log.info("校验通过的集合:" + succList.size());
    18. for(PomSettlementLineExcelBO fail : failList){
    19. String msg = "第" + fail.getSerialNumber() + "行的错误是:" + fail.getErrorMsg();
    20. log.info(msg);
    21. }
    22. for (int i = 0; i < succList.size(); i++) {
    23. PomSettlementLineExcelBO settlementLineBO = succList.get(i);
    24. if(settlementLineBO != null){
    25. //税额+不含税金额 是否 =含税金额
    26. BigDecimal taxAmount = new BigDecimal(StringUtil.isBlank(settlementLineBO.getTaxAmount()) ? "0" : settlementLineBO.getTaxAmount());
    27. BigDecimal noTaxAmount = new BigDecimal(StringUtil.isBlank(settlementLineBO.getNoTaxAmount()) ? "0" : settlementLineBO.getNoTaxAmount());
    28. BigDecimal purchaseTaxAmount = new BigDecimal(StringUtil.isBlank(settlementLineBO.getPurchaseTaxAmount()) ? "0" : settlementLineBO.getPurchaseTaxAmount());
    29. BigDecimal settlementQuantity = new BigDecimal(StringUtil.isBlank(settlementLineBO.getInvoiceQuantity()) ? "0" : settlementLineBO.getInvoiceQuantity());
    30. BigDecimal purchasePrice = new BigDecimal(StringUtil.isBlank(settlementLineBO.getPurchasePrice()) ? "0" : settlementLineBO.getPurchasePrice());
    31. if(taxAmount.add(noTaxAmount).compareTo(purchaseTaxAmount)!=0){
    32. settlementLineBO.setErrorMsg("税额+不含税金额与含税金额不一致");
    33. failList.add(settlementLineBO);
    34. // 从循环中去除
    35. succList.remove(i);
    36. i--;
    37. continue;
    38. }
    39. //开票数量*单价 是否 =含税金额
    40. if(settlementQuantity.multiply(purchasePrice).compareTo(purchaseTaxAmount)!=0){
    41. settlementLineBO.setErrorMsg("开票数量*单价与含税金额不一致");
    42. failList.add(settlementLineBO);
    43. // 从循环中去除
    44. succList.remove(i);
    45. i--;
    46. continue;
    47. }
    48. //效验税务分类枚举
    49. PomSettlementLineReq pomSettlementLineReq = PomSettlementLineReq.copy(settlementLineBO);
    50. pomPurchaseSettlementLineFeignClient.update(pomSettlementLineReq);
    51. }
    52. }
    53. resp.setOver(true);
    54. resp.setResult((succList.size() + failList.size()) > 0);
    55. resp.setSuccess(succList.size());
    56. resp.setFails(failList.size());
    57. resp.setTotal(succList.size() + failList.size());
    58. if(CollectionUtil.isNotEmpty(failList)){
    59. ResponseBO<FileInfoResp> fileInfoResp;
    60. //excel返回错误数据
    61. List<PomSettlementLineErrorExcelResp> errorExcelResps = failList.stream().map(PomSettlementLineExcelBO::copy).collect(Collectors.toList());
    62. int num =0;
    63. for (PomSettlementLineErrorExcelResp errorExcelResp : errorExcelResps) {
    64. num++;
    65. errorExcelResp.setSerialNumber(String.valueOf(num));
    66. }
    67. //Workbook workbook = OfficeExportUtil.getWorkbook(titleText, sheetText, PomSettlementLineErrorExcelResp.class,errorExcelResps);
    68. //查询商品税务表数据
    69. TaxClassificationReq classificationReq = new TaxClassificationReq();
    70. ResponseBO<List<TaxClassificationVO>> taxClassificationResp = pomPurchaseSettlementLineFeignClient.taxClassification(classificationReq);
    71. List<TaxClassificationVO> taxClassificationList = taxClassificationResp.getData();
    72. List<TaxClassificationExcelResp> classificationExcelList = BeanUtil.convert(taxClassificationList, TaxClassificationExcelResp.class);
    73. String titleText = " 错误数据 ";
    74. String sheetText = "【发票系统号码】导出入模板";
    75. //Workbook workbook = OfficeExportUtil.getWorkbook(titleText, sheetText, PomSettlementLineExcelResp.class,settlementLineExcelResps);
    76. ExportParams exportParams1 = new ExportParams(titleText, sheetText);
    77. Map<String, Object> sheet1 = new HashMap<>();
    78. sheet1.put("title", exportParams1);
    79. sheet1.put("entity", PomSettlementLineErrorExcelResp.class);
    80. sheet1.put("data", errorExcelResps);
    81. ExportParams exportParams2 = new ExportParams("商品税务分类", "商品税务分类");
    82. Map<String, Object> sheet2 = new HashMap<>();
    83. sheet2.put("title", exportParams2);
    84. sheet2.put("entity", TaxClassificationExcelResp.class);
    85. sheet2.put("data", classificationExcelList);
    86. List<Map<String, Object>> sheetList = new ArrayList<>();
    87. sheetList.add(sheet1);
    88. sheetList.add(sheet2);
    89. Workbook workbook = ExcelExportUtil.exportExcel(sheetList, ExcelType.HSSF);
    90. Sheet sheet = workbook.getSheetAt(0);
    91. List<String> strings = taxClassificationList.stream().map(TaxClassificationVO::getTaxClassificationName).collect(Collectors.toList());
    92. addValidationToSheet(workbook, sheet, strings.toArray(new String[0]), 'E', 2, 300);
    93. addStyle(failList, workbook, sheet);
    94. addComment(failList, workbook, sheet);
    95. // 隐藏存储下拉列表数据的sheet;可以注释掉该行以便查看、理解存储格式
    96. hideTempDataSheet(workbook, 2);
    97. byte[] bytes = POIUtil.createWorkbook(workbook);
    98. // 上传到oss
    99. UploadFileReq uploadFileReq = new UploadFileReq();
    100. uploadFileReq.setContType("application/msexcel");
    101. uploadFileReq.setInfo(bytes);
    102. uploadFileReq.setFileName("采购发票-" + DateUtil.toDateString(new Date(), "yyyyMMddHHmmssSSS") + ".xls");
    103. fileInfoResp = fileCommonServiceFeign.uploadPublicByte(uploadFileReq);
    104. resp.setErrorFileUrl(fileInfoResp.getData().getUrl());
    105. }
    106. return ResponseUtil.ok(resp);
    107. }
    108. /**
    109. * 增加批注
    110. * @param settlementLineList
    111. * @param workbook
    112. * @param sheet
    113. */
    114. private void addComment(List<PomSettlementLineExcelBO> settlementLineList, Workbook workbook, Sheet sheet) {
    115. Row row0 = sheet.getRow(0);
    116. Cell cell = row0.getCell(0);
    117. CellStyle style = getBaseCellStyle(workbook);
    118. cell.setCellStyle(style);
    119. CellStyle cellStyle = designComment(workbook);
    120. CellStyle fontStyle = POIUtil.fontBold(workbook);
    121. Row row = sheet.getRow(1);
    122. Cell cell0 = row.getCell(0);
    123. addDraw(sheet, cell0, "序号不能修改", 0);
    124. cell0.setCellStyle(fontStyle);
    125. Cell cell1 = row.getCell(1);
    126. addDraw(sheet, cell1, "采购订单不能修改", 1);
    127. cell1.setCellStyle(fontStyle);
    128. Cell cell2 = row.getCell(2);
    129. addDraw(sheet, cell2, "商品名称不能修改", 2);
    130. cell2.setCellStyle(fontStyle);
    131. Cell cell3 = row.getCell(3);
    132. addDraw(sheet, cell3, "规格型号不能修改", 3);
    133. cell3.setCellStyle(fontStyle);
    134. Cell cell4 = row.getCell(4);
    135. addDraw(sheet, cell4, "税务分类名称,必填", 4);
    136. cell4.setCellStyle(cellStyle);
    137. Cell cell5 = row.getCell(5);
    138. addDraw(sheet, cell5, "商品的开票名称,必填", 5);
    139. cell5.setCellStyle(cellStyle);
    140. Cell cell6 = row.getCell(6);
    141. addDraw(sheet, cell6, "单位不要变动", 6);
    142. cell6.setCellStyle(fontStyle);
    143. Cell cell7 = row.getCell(7);
    144. addDraw(sheet, cell7, "发票的开票单位", 7);
    145. cell7.setCellStyle(cellStyle);
    146. Cell cell8 = row.getCell(8);
    147. addDraw(sheet, cell8, "单价类型不能修改", 8);
    148. cell8.setCellStyle(fontStyle);
    149. Cell cell9 = row.getCell(9);
    150. addDraw(sheet, cell9, "开票量不能修改", 9);
    151. cell9.setCellStyle(fontStyle);
    152. //税率
    153. Cell cell10 = row.getCell(10);
    154. cell10.setCellStyle(cellStyle);
    155. addDraw(sheet, cell10, "整数", 10);
    156. //单价(含税/元)
    157. Cell cell11 = row.getCell(11);
    158. addDraw(sheet, cell11, "最多支持到两位小数", 11);
    159. cell11.setCellStyle(cellStyle);
    160. //不含税金额(元)
    161. Cell cell12 = row.getCell(12);
    162. addDraw(sheet, cell12, "最多支持到两位小数", 12);
    163. cell12.setCellStyle(cellStyle);
    164. //税额(元)
    165. Cell cell13 = row.getCell(13);
    166. cell13.setCellStyle(cellStyle);
    167. addDraw(sheet, cell13, "最多支持到两位小数", 13);
    168. //含税金额(元)
    169. Cell cell14 = row.getCell(14);
    170. addDraw(sheet, cell14, "含税金额不能修改", 14);
    171. cell14.setCellStyle(fontStyle);
    172. Cell cell15 = row.getCell(15);
    173. addDraw(sheet, cell15, "商品单价不能修改", 15);
    174. cell15.setCellStyle(fontStyle);
    175. Cell cell16 = row.getCell(16);
    176. addDraw(sheet, cell16, "发货单不能修改", 16);
    177. cell16.setCellStyle(fontStyle);
    178. Cell cell17 = row.getCell(17);
    179. addDraw(sheet, cell17, "发货明细不能修改", 17);
    180. cell17.setCellStyle(fontStyle);
    181. Cell cell18 = row.getCell(18);
    182. cell18.setCellStyle(cellStyle);
    183. addDraw(sheet, cell18, "限50个文本以内", 18);
    184. Cell cell19 = row.getCell(19);
    185. addDraw(sheet, cell19, "采购发票ID不能修改", 19);
    186. cell19.setCellStyle(fontStyle);
    187. Cell cell20 = row.getCell(20);
    188. addDraw(sheet, cell20, "采购发票子项ID不能修改", 20);
    189. cell20.setCellStyle(fontStyle);
    190. }
    191. private static final short FONT_TEN = 10;
    192. private static final short FONT_TEN_BIG = 10;
    193. /**
    194. * 设置单元格样式
    195. * @param workbook Excel文本对象
    196. * @return
    197. */
    198. public static CellStyle designComment(Workbook workbook){
    199. //创建单元格样式
    200. CellStyle style = workbook.createCellStyle();
    201. //下边框
    202. style.setBorderBottom(BorderStyle.THIN);
    203. //左边框
    204. style.setBorderLeft(BorderStyle.THIN);
    205. //上边框
    206. style.setBorderTop(BorderStyle.THIN);
    207. //右边框
    208. style.setBorderRight(BorderStyle.THIN);
    209. //水平居中
    210. style.setAlignment(HorizontalAlignment.CENTER);
    211. //上下居中
    212. style.setVerticalAlignment(VerticalAlignment.CENTER);
    213. //设置自动换行
    214. style.setWrapText(true);
    215. //创建文本样式
    216. Font font = workbook.createFont();
    217. //字体样式
    218. font.setFontName("宋体");
    219. //是否加粗
    220. font.setBold(true);
    221. //字体大小
    222. font.setFontHeightInPoints(FONT_TEN);
    223. font.setColor(IndexedColors.RED.getIndex());
    224. style.setFont(font);
    225. //设置背景色
    226. style.setFillForegroundColor(IndexedColors.LIGHT_YELLOW.getIndex());
    227. style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
    228. return style;
    229. }
    230. /**
    231. * 增加批注
    232. * @param sheet
    233. * @param cell
    234. * @param name
    235. * @param rowIndex
    236. */
    237. private void addDraw(Sheet sheet, Cell cell, String name, int rowIndex) {
    238. if(name == null){
    239. cell.removeCellComment();
    240. return;
    241. }
    242. Drawing drawing = sheet.createDrawingPatriarch();
    243. CreationHelper factory = sheet.getWorkbook().getCreationHelper();
    244. ClientAnchor anchor = factory.createClientAnchor();
    245. anchor.setCol1(0);
    246. anchor.setCol2(2);
    247. anchor.setRow1(0);
    248. anchor.setRow2(2);
    249. anchor.setDx1(0);
    250. anchor.setDy1(0);
    251. anchor.setDy2(0);
    252. anchor.setDx2(0);
    253. anchor.setAnchorType(ClientAnchor.AnchorType.MOVE_AND_RESIZE);
    254. Comment comment = drawing.createCellComment(anchor);
    255. RichTextString str = factory.createRichTextString(name);
    256. comment.setString(str);
    257. comment.setAuthor("Auto+");
    258. comment.setRow(3);
    259. cell.setCellComment(comment);
    260. }
    261. /**
    262. * 基础样式
    263. *
    264. * @return
    265. */
    266. public static CellStyle getBaseCellStyle(Workbook workbook) {
    267. CellStyle style = workbook.createCellStyle();
    268. //下边框
    269. style.setBorderBottom(BorderStyle.THIN);
    270. //左边框
    271. style.setBorderLeft(BorderStyle.THIN);
    272. //上边框
    273. style.setBorderTop(BorderStyle.THIN);
    274. //右边框
    275. style.setBorderRight(BorderStyle.THIN);
    276. //水平居中
    277. style.setAlignment(HorizontalAlignment.LEFT);
    278. //上下居中
    279. style.setVerticalAlignment(VerticalAlignment.CENTER);
    280. //创建文本样式
    281. Font font = workbook.createFont();
    282. //字体样式
    283. font.setFontName("宋体");
    284. //是否加粗
    285. font.setBold(true);
    286. font.setFontHeightInPoints(FONT_TEN_BIG);
    287. font.setColor(IndexedColors.RED.getIndex());
    288. style.setFont(font);
    289. //设置自动换行
    290. style.setWrapText(true);
    291. return style;
    292. }
    293. /**
    294. * 增加样式
    295. * @param settlementLineList
    296. * @param workbook
    297. * @param sheet
    298. */
    299. private void addStyle(List<PomSettlementLineExcelBO> settlementLineList, Workbook workbook, Sheet sheet) {
    300. CellStyle cellStyle = POIUtil.designStyles(workbook);
    301. for(int b = 2;b < settlementLineList.size()+2;b++){
    302. Row row = sheet.getRow(b);
    303. Cell cell4 = row.getCell(4);
    304. cell4.setCellStyle(cellStyle);
    305. Cell cell5 = row.getCell(5);
    306. cell5.setCellStyle(cellStyle);
    307. Cell cell7 = row.getCell(7);
    308. cell7.setCellStyle(cellStyle);
    309. //税率
    310. Cell cell10 = row.getCell(10);
    311. cell10.setCellStyle(cellStyle);
    312. //单价(含税/元)
    313. Cell cell11 = row.getCell(11);
    314. cell11.setCellStyle(cellStyle);
    315. //不含税金额(元)
    316. Cell cell12 = row.getCell(12);
    317. cell12.setCellStyle(cellStyle);
    318. int j = b + 1;
    319. cell12.setCellFormula("ROUND((O"+ j +")/(1+K"+ j +"/100), 2)");
    320. //税额(元)
    321. Cell cell13 = row.getCell(13);
    322. cell13.setCellStyle(cellStyle);
    323. cell13.setCellFormula("ROUND(O"+ j + "-M"+ j + ", 2)");
    324. //含税金额(元)
    325. Cell cell14 = row.getCell(14);
    326. cell14.setCellFormula("ROUND(J" + j + "*L" + j + ", 2)");
    327. Cell cell18 = row.getCell(18);
    328. cell18.setCellStyle(cellStyle);
    329. }
    330. }
    331. /**
    332. * 给sheet页,添加下拉列表
    333. *
    334. * @param workbook excel文件,用于添加Name
    335. * @param targetSheet 级联列表所在sheet页
    336. * @param options 级联数据 ['百度','阿里巴巴']
    337. * @param column 下拉列表所在列 从'A'开始
    338. * @param fromRow 下拉限制开始行
    339. * @param endRow 下拉限制结束行
    340. */
    341. public static void addValidationToSheet(Workbook workbook, Sheet targetSheet, String[] options, char column, int fromRow, int endRow) {
    342. String hiddenSheetName = "sheet" + workbook.getNumberOfSheets();
    343. Sheet optionsSheet = workbook.createSheet(hiddenSheetName);
    344. String nameName = column + "_parent";
    345. int rowIndex = 0;
    346. for (Object option : options) {
    347. int columnIndex = 0;
    348. Row row = optionsSheet.createRow(rowIndex++);
    349. Cell cell = row.createCell(columnIndex++);
    350. cell.setCellValue(option.toString());
    351. }
    352. createName(workbook, nameName, hiddenSheetName + "!$A$1:$A$" + options.length);
    353. DVConstraint constraint = DVConstraint.createFormulaListConstraint(nameName);
    354. CellRangeAddressList regions = new CellRangeAddressList(fromRow, endRow, (int) column - 'A', (int) column - 'A');
    355. targetSheet.addValidationData(new HSSFDataValidation(regions, constraint));
    356. }
    357. /**
    358. * 隐藏excel中的sheet页
    359. *
    360. * @param workbook
    361. * @param start 需要隐藏的 sheet开始索引
    362. */
    363. private static void hideTempDataSheet(Workbook workbook, int start) {
    364. for (int i = start; i < workbook.getNumberOfSheets(); i++) {
    365. workbook.setSheetHidden(i, true);
    366. }
    367. }
    368. private static Name createName(Workbook workbook, String nameName, String formula) {
    369. Name name = workbook.createName();
    370. name.setNameName(nameName);
    371. name.setRefersToFormula(formula);
    372. return name;
    373. }
    374. @Override
    375. public ResponseBO<List<TaxClassificationVO>> taxClassificationList(TaxClassificationReq req) {
    376. return pomPurchaseSettlementLineFeignClient.taxClassificationList(req);
    377. }
    1. import java.io.ByteArrayOutputStream;
    2. import java.io.IOException;
    3. import lombok.extern.slf4j.Slf4j;
    4. import org.apache.poi.ss.usermodel.BorderStyle;
    5. import org.apache.poi.ss.usermodel.CellStyle;
    6. import org.apache.poi.ss.usermodel.FillPatternType;
    7. import org.apache.poi.ss.usermodel.Font;
    8. import org.apache.poi.ss.usermodel.HorizontalAlignment;
    9. import org.apache.poi.ss.usermodel.IndexedColors;
    10. import org.apache.poi.ss.usermodel.VerticalAlignment;
    11. import org.apache.poi.ss.usermodel.Workbook;
    12. @Slf4j
    13. public class POIUtil {
    14. private static final short FONT_TEN = 10;
    15. /**
    16. * 创建xls文本
    17. * @return
    18. */
    19. /**
    20. * 创建xls文本
    21. * @return
    22. */
    23. public static byte[] createWorkbook(Workbook workbook){
    24. try (ByteArrayOutputStream bos = new ByteArrayOutputStream()){
    25. workbook.write(bos);
    26. return bos.toByteArray();
    27. } catch (IOException e) {
    28. log.error(e.getMessage());
    29. }
    30. return null;
    31. }
    32. /**
    33. * 设置单元格样式
    34. * @param workbook Excel文本对象
    35. * @return
    36. */
    37. public static CellStyle designStyles(Workbook workbook){
    38. //创建单元格样式
    39. CellStyle style = workbook.createCellStyle();
    40. //下边框
    41. style.setBorderBottom(BorderStyle.THIN);
    42. //左边框
    43. style.setBorderLeft(BorderStyle.THIN);
    44. //上边框
    45. style.setBorderTop(BorderStyle.THIN);
    46. //右边框
    47. style.setBorderRight(BorderStyle.THIN);
    48. //水平居中
    49. style.setAlignment(HorizontalAlignment.CENTER);
    50. //上下居中
    51. style.setVerticalAlignment(VerticalAlignment.CENTER);
    52. //设置自动换行
    53. style.setWrapText(true);
    54. //创建文本样式
    55. Font font = workbook.createFont();
    56. //字体样式
    57. font.setFontName("宋体");
    58. //是否加粗
    59. font.setBold(false);
    60. //字体大小
    61. font.setFontHeightInPoints(FONT_TEN);
    62. style.setFont(font);
    63. //设置背景色
    64. style.setFillForegroundColor(IndexedColors.LIGHT_YELLOW.getIndex());
    65. style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
    66. return style;
    67. }
    68. /**
    69. * 设置单元格样式
    70. * @param workbook Excel文本对象
    71. * @return
    72. */
    73. public static CellStyle fontBold(Workbook workbook){
    74. //创建单元格样式
    75. CellStyle style = workbook.createCellStyle();
    76. //下边框
    77. style.setBorderBottom(BorderStyle.THIN);
    78. //左边框
    79. style.setBorderLeft(BorderStyle.THIN);
    80. //上边框
    81. style.setBorderTop(BorderStyle.THIN);
    82. //右边框
    83. style.setBorderRight(BorderStyle.THIN);
    84. //水平居中
    85. style.setAlignment(HorizontalAlignment.CENTER);
    86. //上下居中
    87. style.setVerticalAlignment(VerticalAlignment.CENTER);
    88. //设置自动换行
    89. style.setWrapText(true);
    90. //创建文本样式
    91. Font font = workbook.createFont();
    92. //字体样式
    93. font.setFontName("宋体");
    94. //是否加粗
    95. font.setBold(true);
    96. style.setFont(font);
    97. return style;
    98. }
    99. }
    1. import java.io.Serializable;
    2. import java.math.BigDecimal;
    3. import cn.afterturn.easypoi.excel.annotation.Excel;
    4. import lombok.Getter;
    5. import lombok.Setter;
    6. @Getter
    7. @Setter
    8. public class PomSettlementLineErrorExcelResp implements Serializable {
    9. /**
    10. * 序号
    11. */
    12. @Excel(name = "序列")
    13. private String serialNumber;
    14. /**
    15. * 采购订单code : PURCHASE_CONTRACT_HEAD_CODE
    16. */
    17. @Excel(name = "采购订单", width = 15 , replace = {"-_null", "-_ "})
    18. private String purchaseContractCode;
    19. /**
    20. * 商品名称: STOCK_ITEM_LINE_CODE
    21. */
    22. @Excel(name = "商品标题", width = 15 , replace = {"-_null", "-_ "})
    23. private String stockItemName;
    24. /**
    25. * 规格型号
    26. */
    27. @Excel(name = "规格型号", width = 15 , replace = {"-_null", "-_ "})
    28. private String stockItemSpecDesc;
    29. /**
    30. * 商品税务分类
    31. */
    32. @Excel(name = "*税务分类名称", width = 15 , replace = {"-_null", "-_ "})
    33. private String taxClassification;
    34. /**
    35. * 开票名称
    36. */
    37. @Excel(name = "*开票名称", width = 15 , replace = {"-_null", "-_ "})
    38. private String itemInvoiceName;
    39. /**
    40. * 商品计量单位 : STOCK_UNIT_TYPE
    41. */
    42. @Excel(name = "单位", width = 15 , replace = {"-_null", "-_ "})
    43. private String stockUnitType;
    44. /**
    45. * 发票计量单位 : INVOICE_UNIT_TYPE
    46. */
    47. @Excel(name = "开票单位", width = 15 , replace = {"-_null", "-_ "})
    48. private String invoiceUnitType;
    49. /**
    50. * 税率类型 : TAX_CODE_TYPE
    51. */
    52. @Excel(name = "单价类型", width = 15 , replace = {"-_null", "-_ "})
    53. private String taxCodeType;
    54. /**
    55. * 已开票量
    56. */
    57. @Excel(name = "开票量", width = 15, numFormat="0.00", type = 10, replace = {"_null", "_ "})
    58. private BigDecimal invoiceQuantity;
    59. /**
    60. * 税码 : TAX_TYPE
    61. */
    62. @Excel(name = "税率(%)", width = 15 , replace = {"-_null", "-_ "})
    63. private String taxCode;
    64. /**
    65. * 单价
    66. */
    67. @Excel(name = "*单价(含税/元)", width = 15, numFormat="0.00", type = 10, replace = {"_null", "_ "})
    68. private BigDecimal invoicePrice;
    69. /**
    70. * 不含税金额 : NO_TAX_AMOUNT
    71. */
    72. @Excel(name = "*不含税金额(元)", width = 15, numFormat="0.00", type = 10, replace = {"_null", "_ "})
    73. private BigDecimal noTaxAmount;
    74. /**
    75. * 税额 : TAX_AMOUNT
    76. */
    77. @Excel(name = "*税额(元)", width = 15, numFormat="0.00", type = 10, replace = {"_null", "_ "})
    78. private BigDecimal taxAmount;
    79. /**
    80. * 商品含税金额
    81. */
    82. @Excel(name = "含税金额(元)", width = 15, numFormat="0.00", type = 10, replace = {"_null", "_ "})
    83. private BigDecimal purchaseTaxAmount;
    84. /**
    85. * 商品单价
    86. */
    87. @Excel(name = "商品单价(元)", width = 15, numFormat="0.00", type = 10, replace = {"_null", "_ "})
    88. private BigDecimal purchasePrice;
    89. /**
    90. * 出库单号
    91. */
    92. @Excel(name = "发货单", width = 15 , replace = {"-_null", "-_ "})
    93. private String deliveryOrderNo;
    94. /**
    95. * 发货单明细Code
    96. */
    97. @Excel(name = "发货单明细", width = 15 , replace = {"-_null", "-_ "})
    98. private String consignmentLotCode;
    99. /**
    100. * 备注
    101. */
    102. @Excel(name = "备注", width = 15 , replace = {"-_null", "-_ "})
    103. private String settlementLineRemark;
    104. /**
    105. * 采购发票id
    106. */
    107. @Excel(name = "采购发票id", width = 15 , replace = {"-_null", "-_ "})
    108. private String purchaseSettlementHeadId;
    109. /**
    110. * 采购发票子项id : PURCHASE_SETTLEMENT_LINE_ID
    111. */
    112. @Excel(name = "采购发票子项id", width = 15 , replace = {"-_null", "-_ "})
    113. private String purchaseSettlementLineId;
    114. /**
    115. * 错误信息
    116. */
    117. @Excel(name = "错误信息", width = 15 , replace = {"-_null", "-_ "})
    118. private String errorMsg;
    119. }