private String convertCdyy(Fill report, final String reportType) { final String hbcdyy = report.getHbcdyy(); final String hbywlb = report.getHbywlb(); if (isCancelReject(reportType, hbcdyy, hbywlb)) { return CANCEL_FAIL_REASON; } if (StringUtils.isEmpty(hbcdyy)) { return "0"; } return hbcdyy; }
ExecutionReport convertToReportEvent(Fill report, String omsSequence) { String reportType = getReportType(report.getHbywlb(), report.getHbcdyy(), report.getHbcjsl()); ExecutionReport executionReport = new ExecutionReport(); executionReport.setReportType(reportType); executionReport.setExecutionId(omsSequence); executionReport.setPrice(report.getHbcjjg()); executionReport.setQuantity(Math.abs((long) report.getHbcjsl())); executionReport.setSymbol(report.getHbzqdm()); String convertCdyy = convertCdyy(report, executionReport.getReportType()); executionReport.setErrorCode(convertCdyy); return executionReport; }