新火炬后端单体项目初始化代码
zhangherong
4 天以前 c4e489878e01a41debab8a1d954199d7b831177d
src/main/java/org/jeecg/modules/sap/service/impl/OrderReportServiceImpl.java
@@ -6,6 +6,7 @@
import org.jeecg.common.constant.ApiLogCategoryEnum;
import org.jeecg.config.sap.SapRfcConnectionManager;
import org.jeecg.modules.sap.FunctionConst;
import org.jeecg.modules.sap.dto.OrderReportDTO;
import org.jeecg.modules.sap.request.OrderReportRequest;
import org.jeecg.modules.sap.service.OrderReportService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -48,15 +49,61 @@
        // 执行调用
        function.execute(destination);
        //获取返回结果
        JCoTable eReturn = function.getExportParameterList().getTable("E_RETURN");
        Object eReturn1 = function.getExportParameterList().getValue("E_RETURN");
        OrderReportDTO reportDTO1 = null;
        if (eReturn1 != null) {
            JCoStructure eReturn = (JCoStructure) eReturn1;
            //E Return
            reportDTO1 = new OrderReportDTO();
            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"));
            reportDTO1.setFLG_LOCKED(eReturn.getString("FLG_LOCKED"));
            reportDTO1.setCONF_NO(eReturn.getString("CONF_NO"));
            reportDTO1.setCONF_CNT(eReturn.getString("CONF_CNT"));
        }
        JCoTable tReturn1 = function.getTableParameterList().getTable("T_RETURN");
        String zmess = "";
        String ztype = "";//S 标识 成功
        OrderReportDTO reportDTO2 = null;
        if (tReturn1.getNumRows() > 0) {
            tReturn1.setRow(0);
            reportDTO2 = new OrderReportDTO();
            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"));
            reportDTO2.setFLG_LOCKED(tReturn1.getString("FLG_LOCKED"));
            reportDTO2.setCONF_NO(tReturn1.getString("CONF_NO"));
            reportDTO2.setCONF_CNT(tReturn1.getString("CONF_CNT"));
        }
        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;
    }
}