| | |
| | | import org.jeecg.common.constant.ApiLogCategoryEnum; |
| | | import org.jeecg.config.sap.SapRfcConnectionManager; |
| | | import org.jeecg.modules.sap.FunctionConst; |
| | | import org.jeecg.modules.sap.dto.OrderLoadDTO; |
| | | import org.jeecg.modules.sap.dto.OrderReportDTO; |
| | | import org.jeecg.modules.sap.request.OrderLoadRequest; |
| | | import org.jeecg.modules.sap.service.OrderLoadService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | // 执行调用 |
| | | function.execute(destination); |
| | | //获取返回结果 |
| | | JCoTable eReturn = function.getExportParameterList().getTable("E_RETURN"); |
| | | Object eReturn1 = function.getExportParameterList().getValue("E_RETURN"); |
| | | OrderLoadDTO reportDTO1 = null; |
| | | if (eReturn1 != null) { |
| | | JCoStructure eReturn = (JCoStructure) eReturn1; |
| | | //E Return |
| | | reportDTO1 = new OrderLoadDTO(); |
| | | reportDTO1.setTYPE(eReturn.getString("TYPE")); |
| | | reportDTO1.setID(eReturn.getString("ID")); |
| | | reportDTO1.setNUMBER(eReturn.getString("NUMBER")); |
| | | reportDTO1.setMESSAGE(eReturn.getString("MESSAGE")); |
| | | reportDTO1.setLOG_NO(eReturn.getString("LOG_NO")); |
| | | reportDTO1.setLOG_MSG_NO(eReturn.getString("LOG_MSG_NO")); |
| | | reportDTO1.setMESSAGE_V1(eReturn.getString("MESSAGE_V1")); |
| | | reportDTO1.setMESSAGE_V2(eReturn.getString("MESSAGE_V2")); |
| | | reportDTO1.setMESSAGE_V3(eReturn.getString("MESSAGE_V3")); |
| | | reportDTO1.setMESSAGE_V4(eReturn.getString("MESSAGE_V4")); |
| | | reportDTO1.setPARAMETER(eReturn.getString("PARAMETER")); |
| | | reportDTO1.setROW(eReturn.getString("ROW")); |
| | | reportDTO1.setFIELD(eReturn.getString("FIELD")); |
| | | reportDTO1.setSYSTEM(eReturn.getString("SYSTEM")); |
| | | } |
| | | JCoTable tReturn1 = function.getTableParameterList().getTable("T_RETURN"); |
| | | String zmess = ""; |
| | | String ztype = "";//S 标识 成功 |
| | | OrderLoadDTO reportDTO2 = null; |
| | | if (tReturn1.getNumRows() > 0) { |
| | | tReturn1.setRow(0); |
| | | reportDTO2 = new OrderLoadDTO(); |
| | | reportDTO2.setTYPE(tReturn1.getString("TYPE")); |
| | | reportDTO2.setID(tReturn1.getString("ID")); |
| | | reportDTO2.setNUMBER(tReturn1.getString("NUMBER")); |
| | | reportDTO2.setMESSAGE(tReturn1.getString("MESSAGE")); |
| | | reportDTO2.setLOG_NO(tReturn1.getString("LOG_NO")); |
| | | reportDTO2.setLOG_MSG_NO(tReturn1.getString("LOG_MSG_NO")); |
| | | reportDTO2.setMESSAGE_V1(tReturn1.getString("MESSAGE_V1")); |
| | | reportDTO2.setMESSAGE_V2(tReturn1.getString("MESSAGE_V2")); |
| | | reportDTO2.setMESSAGE_V3(tReturn1.getString("MESSAGE_V3")); |
| | | reportDTO2.setMESSAGE_V4(tReturn1.getString("MESSAGE_V4")); |
| | | reportDTO2.setPARAMETER(tReturn1.getString("PARAMETER")); |
| | | reportDTO2.setROW(tReturn1.getString("ROW")); |
| | | reportDTO2.setFIELD(tReturn1.getString("FIELD")); |
| | | reportDTO2.setSYSTEM(tReturn1.getString("SYSTEM")); |
| | | } |
| | | |
| | | String zmess = reportDTO1 == null ? (reportDTO2 == null ? "" : reportDTO2.getMESSAGE()) : reportDTO1.getMESSAGE(); |
| | | String ztype = reportDTO1 == null ? (reportDTO2 == null ? "" : reportDTO2.getTYPE()) : reportDTO1.getTYPE(); //S 标识 成功 |
| | | |
| | | resultMap.put("zmess", zmess); |
| | | resultMap.put("ztype", ztype); |
| | | resultMap.put("importParameters", request); |
| | | resultMap.put("result", null); |
| | | resultMap.put("result", reportDTO1 == null ? reportDTO2 : reportDTO1); |
| | | return resultMap; |
| | | } |
| | | } |