Commit fc73e923cbd8f1e5ad721b1e43d1a60cf98fdc0a

Authored by 房远帅
1 parent 773ef75a

订货单:批量打印增加合同类型(经销、加工、外贸)

... ... @@ -277,6 +277,8 @@ public class BusinessDataExportHandler implements ExportHandler {
277 277 dataMap.put("officeClerk", reviewer.getOfficeClerk());
278 278 // 办事处主管
279 279 dataMap.put("officeSupervisor", reviewer.getOfficeSupervisor());
  280 + // 合同类型
  281 + dataMap.put("contractType", handleContractType(orderInfo.getContractType()));
280 282 ExcelUtil.processTemplate(workbook, dataMap);
281 283
282 284 String createTime = orderInfo.getCreateTime().format(dateTimeFormatter);
... ... @@ -326,6 +328,20 @@ public class BusinessDataExportHandler implements ExportHandler {
326 328 }
327 329 }
328 330
  331 + private String handleContractType(String contractType) {
  332 + String result = "";
  333 + if ("DISTRIB_STD".equals(contractType) || "DIST_STOCK_CONTRACT".equals(contractType)
  334 + || "DRAFT_DIST_AGMT".equals(contractType)) {
  335 + result = "经销";
  336 + } else if ("INTL_STD_CONTRACT".equals(contractType) || "INTL_INVENTORY_AGMT".equals(contractType)
  337 + || "INTL_OPEN_SPEC_AGMT".equals(contractType)) {
  338 + result = "外贸";
  339 + } else if ("PROCESS_STD_AGMT".equals(contractType)) {
  340 + result = "加工";
  341 + }
  342 + return result;
  343 + }
  344 +
329 345 private int setCellValue(Workbook workbook, Sheet sheet, int rowIndex, List<ReceiptLedgerReportDetail> detailList) {
330 346 if (CollectionUtils.isEmpty(detailList)) {
331 347 return rowIndex;
... ...