From e64197421cf28099935f71f193989a3394d47fe0 Mon Sep 17 00:00:00 2001
From: mrzcc <121184950@qq.com>
Date: 星期一, 17 二月 2020 18:12:38 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 OrderService/src/main/java/com/java110/order/smo/impl/OrderServiceSMOImpl.java |  431 +++--------------------------------------------------
 1 files changed, 30 insertions(+), 401 deletions(-)

diff --git a/OrderService/src/main/java/com/java110/order/smo/impl/OrderServiceSMOImpl.java b/OrderService/src/main/java/com/java110/order/smo/impl/OrderServiceSMOImpl.java
index e0e2a7e..8183d6e 100644
--- a/OrderService/src/main/java/com/java110/order/smo/impl/OrderServiceSMOImpl.java
+++ b/OrderService/src/main/java/com/java110/order/smo/impl/OrderServiceSMOImpl.java
@@ -2,32 +2,32 @@
 
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
-import com.java110.common.cache.MappingCache;
-import com.java110.common.constant.CommonConstant;
-import com.java110.common.constant.KafkaConstant;
-import com.java110.common.constant.MappingConstant;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.constant.ServiceBusinessConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.exception.BusinessException;
-import com.java110.common.exception.BusinessStatusException;
-import com.java110.common.exception.ConfigDataException;
-import com.java110.common.exception.DAOException;
-import com.java110.common.exception.DecryptException;
-import com.java110.common.exception.InitConfigDataException;
-import com.java110.common.exception.NoAuthorityException;
-import com.java110.common.exception.NoSupportException;
-import com.java110.common.exception.OrdersException;
-import com.java110.common.exception.RuleException;
-import com.java110.common.exception.SMOException;
-import com.java110.common.factory.ApplicationContextFactory;
-import com.java110.common.kafka.KafkaFactory;
-import com.java110.common.log.LoggerEngine;
-import com.java110.common.util.Assert;
-import com.java110.common.util.DateUtil;
-import com.java110.common.util.ServiceBusinessUtil;
-import com.java110.common.util.StringUtil;
-import com.java110.common.util.WebServiceAxisClient;
+import com.java110.utils.cache.MappingCache;
+import com.java110.utils.constant.CommonConstant;
+import com.java110.utils.constant.KafkaConstant;
+import com.java110.utils.constant.MappingConstant;
+import com.java110.utils.constant.ResponseConstant;
+import com.java110.utils.constant.ServiceBusinessConstant;
+import com.java110.utils.constant.StatusConstant;
+import com.java110.utils.exception.BusinessException;
+import com.java110.utils.exception.BusinessStatusException;
+import com.java110.utils.exception.ConfigDataException;
+import com.java110.utils.exception.DAOException;
+import com.java110.utils.exception.DecryptException;
+import com.java110.utils.exception.InitConfigDataException;
+import com.java110.utils.exception.NoAuthorityException;
+import com.java110.utils.exception.NoSupportException;
+import com.java110.utils.exception.OrdersException;
+import com.java110.utils.exception.RuleException;
+import com.java110.utils.exception.SMOException;
+import com.java110.utils.factory.ApplicationContextFactory;
+import com.java110.utils.kafka.KafkaFactory;
+import com.java110.utils.log.LoggerEngine;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.DateUtil;
+import com.java110.utils.util.ServiceBusinessUtil;
+import com.java110.utils.util.StringUtil;
+import com.java110.utils.util.WebServiceAxisClient;
 import com.java110.core.client.RestTemplate;
 import com.java110.core.context.DataFlow;
 import com.java110.core.context.IOrderDataFlowContext;
@@ -70,19 +70,12 @@
  */
 @Service("orderServiceSMOImpl")
 //@Transactional
-public class OrderServiceSMOImpl implements IOrderServiceSMO {
+public class OrderServiceSMOImpl extends AbstractOrderServiceSMOImpl implements IOrderServiceSMO {
 
     private static Logger logger = LoggerFactory.getLogger(OrderServiceSMOImpl.class);
 
 
-    @Autowired
-    ICenterServiceDAO centerServiceDaoImpl;
 
-    @Autowired
-    private RestTemplate restTemplate;
-
-    @Autowired
-    private RestTemplate restTemplateNoLoadBalanced;
 
     @Autowired
     private IQueryServiceSMO queryServiceSMOImpl;
@@ -156,20 +149,6 @@
         }
     }
 
-    /**
-     * 鍒疯繑鍥炲��
-     *
-     * @param dataFlow
-     */
-    private void refreshOrderDataFlowResJson(IOrderDataFlowContext dataFlow) {
-
-//        if(dataFlow.getResJson() == null || dataFlow.getResJson().isEmpty()){
-//            JSONObject resJson = new JSONObject();
-//            resJson.put("msg","鎴愬姛");
-//            dataFlow.setResJson(resJson);
-//        }
-
-    }
 
     /**
      * 鎶掑啓杩斿洖澶翠俊鎭�
@@ -233,87 +212,6 @@
      */
     private void initConfigData(IOrderDataFlowContext dataFlow) {
 
-    }
-
-    /**
-     * 4.0瑙勫垯鏍¢獙
-     *
-     * @param dataFlow
-     * @throws RuleException
-     */
-    private void ruleValidate(IOrderDataFlowContext dataFlow) throws RuleException {
-        Date startDate = DateUtil.getCurrentDate();
-        try {
-
-            if (MappingConstant.VALUE_OFF.equals(MappingCache.getValue(MappingConstant.KEY_RULE_ON_OFF))
-                    || (MappingCache.getValue(MappingConstant.KEY_NO_NEED_RULE_VALDATE_ORDER) != null
-                    && MappingCache.getValue(MappingConstant.KEY_NO_NEED_RULE_VALDATE_ORDER).contains(dataFlow.getOrders().getOrderTypeCd()))) {
-                //涓嶅仛鏍¢獙
-                //娣诲姞鑰楁椂
-                OrderDataFlowContextFactory.addCostTime(dataFlow, "ruleValidate", "瑙勫垯鏍¢獙鑰楁椂", startDate);
-                return;
-            }
-
-            //璋冪敤瑙勫垯
-
-        } catch (Exception e) {
-            //娣诲姞鑰楁椂
-            OrderDataFlowContextFactory.addCostTime(dataFlow, "ruleValidate", "瑙勫垯鏍¢獙鑰楁椂", startDate);
-            throw new RuleException(ResponseConstant.RESULT_CODE_RULE_ERROR, "瑙勫垯鏍¢獙寮傚父澶辫触锛�" + e.getMessage());
-        }
-
-        OrderDataFlowContextFactory.addCostTime(dataFlow, "ruleValidate", "瑙勫垯鏍¢獙鑰楁椂", startDate);
-
-    }
-
-    /**
-     * 5.0 淇濆瓨璁㈠崟鍜屼笟鍔¢」 c_orders c_order_attrs c_business c_business_attrs
-     *
-     * @param dataFlow
-     * @throws OrdersException
-     */
-    private void saveOrdersAndBusiness(IOrderDataFlowContext dataFlow) throws OrdersException {
-        Date startDate = DateUtil.getCurrentDate();
-        if (MappingCache.getValue(MappingConstant.KEY_NO_SAVE_ORDER) != null
-                && MappingCache.getValue(MappingConstant.KEY_NO_SAVE_ORDER).contains(dataFlow.getOrders().getOrderTypeCd())) {
-            //涓嶄繚瀛樿鍗曚俊鎭�
-            OrderDataFlowContextFactory.addCostTime(dataFlow, "saveOrdersAndBusiness", "淇濆瓨璁㈠崟鍜屼笟鍔¢」鑰楁椂", startDate);
-            return;
-        }
-
-
-        //1.0 淇濆瓨 orders淇℃伅
-        centerServiceDaoImpl.saveOrder(OrderDataFlowContextFactory.getOrder(dataFlow.getOrders()));
-
-
-        centerServiceDaoImpl.saveOrderAttrs(OrderDataFlowContextFactory.getOrderAttrs(dataFlow.getOrders()));
-
-        //2.0 淇濆瓨 business淇℃伅
-
-        centerServiceDaoImpl.saveBusiness(OrderDataFlowContextFactory.getBusiness(dataFlow));
-
-        centerServiceDaoImpl.saveBusinessAttrs(OrderDataFlowContextFactory.getBusinessAttrs(dataFlow));
-
-        OrderDataFlowContextFactory.addCostTime(dataFlow, "saveOrdersAndBusiness", "淇濆瓨璁㈠崟鍜屼笟鍔¢」鑰楁椂", startDate);
-    }
-
-    /**
-     * 6.0 璋冪敤涓嬫父绯荤粺
-     *
-     * @param dataFlow
-     * @throws BusinessException
-     */
-    private void invokeBusinessSystem(IOrderDataFlowContext dataFlow) throws BusinessException {
-        Date startDate = DateUtil.getCurrentDate();
-        //6.1 鍏堝鐞嗗悓姝ユ柟寮忕殑鏈嶅姟锛屾瘡涓�鍚屾鍚庡彂甯冧簨浠跺箍鎾�
-
-        doSynchronousBusinesses(dataFlow);
-
-        //6.2 澶勭悊寮傛鏈嶅姟
-        doAsynchronousBusinesses(dataFlow);
-
-
-        OrderDataFlowContextFactory.addCostTime(dataFlow, "invokeBusinessSystem", "璋冪敤涓嬫父绯荤粺鑰楁椂", startDate);
     }
 
 
@@ -427,28 +325,7 @@
 
     }
 
-    /**
-     * 灏嗚鍗曠姸鎬佹敼涓轰綔搴熺姸鎬併��
-     *
-     * @param dataFlow
-     */
-    private void updateOrderAndBusinessDelete(IOrderDataFlowContext dataFlow) {
 
-        Date startDate = DateUtil.getCurrentDate();
-
-        //浣滃簾 璁㈠崟
-        centerServiceDaoImpl.updateOrder(OrderDataFlowContextFactory.getNeedInvalidOrder(dataFlow));
-
-        //浣滃簾璁㈠崟椤�
-        centerServiceDaoImpl.updateBusiness(OrderDataFlowContextFactory.getNeedDeleteBusiness(dataFlow));
-
-        //鍔犲叆鎾ゅ崟璁板綍
-        //doAddDeleteOrderBusinessData(dataFlow);
-
-
-        OrderDataFlowContextFactory.addCostTime(dataFlow, "updateOrderAndBusinessError", "璁㈠崟鐘舵�佹敼涓哄け璐ヨ�楁椂", startDate);
-
-    }
 
     /**
      * 鍔犲叆鎾ゅ崟璁板綍
@@ -754,212 +631,6 @@
                 DateUtil.getCurrentDate().getTime() - startTime);*/
     }
 
-    /**
-     * 澶勭悊鍚屾涓氬姟
-     *
-     * @param dataFlow
-     */
-    private void doSynchronousBusinesses(IOrderDataFlowContext dataFlow) throws BusinessException {
-        Date startDate = DateUtil.getCurrentDate();
-        List<Business> synchronousBusinesses = OrderDataFlowContextFactory.getSynchronousBusinesses(dataFlow);
-
-        List<Business> deleteBusinesses = new ArrayList<Business>();
-
-        if (synchronousBusinesses == null || synchronousBusinesses.size() == 0) {
-            return;
-        }
-        JSONArray responseBusinesses = new JSONArray();
-
-        //6.1澶勭悊鍚屾鏈嶅姟 鍙戣捣Business
-        doSaveDataInfoToBusinessTable(dataFlow, synchronousBusinesses, responseBusinesses);
-
-        try {
-            //6.2鍙戣捣Instance
-            doBusinessTableDataInfoToInstanceTable(dataFlow, synchronousBusinesses, deleteBusinesses);
-        } catch (Exception e) {
-            try {
-                //杩欓噷鍙戣捣鎾ゅ崟閫昏緫
-                doDeleteOrderAndInstanceData(dataFlow, deleteBusinesses);
-            } catch (Exception e1) {
-                logger.error("鎾ゅ崟澶辫触", e1);
-                //杩欓噷璁板綍鎾ゅ崟澶辫触鐨勪俊鎭�
-            }
-            throw new BusinessException(ResponseConstant.RESULT_PARAM_ERROR, e.getMessage());
-        }
-        //6.3 c_business 鏁版嵁淇敼涓哄畬鎴�
-        /*List<Business> asynchronousBusinesses = OrderDataFlowContextFactory.getAsynchronousBusinesses(dataFlow);
-        if(asynchronousBusinesses == null || asynchronousBusinesses.size() == 0){
-            doComplateOrderAndBusiness(dataFlow,synchronousBusinesses);
-        }*/
-        OrderDataFlowContextFactory.addCostTime(dataFlow, "doSynchronousBusinesses", "鍚屾璋冪敤涓氬姟绯荤粺鎬昏�楁椂", startDate);
-    }
-
-    /**
-     * 鍙戣捣鎾ゅ崟涓氬姟
-     *
-     * @param dataFlow
-     * @param deleteBusinesses
-     */
-    private void doDeleteOrderAndInstanceData(IOrderDataFlowContext dataFlow, List<Business> deleteBusinesses) {
-
-        if (deleteBusinesses == null || deleteBusinesses.size() == 0) {
-            return;
-        }
-
-        //1.0 鍦╟_business 琛ㄤ腑鍔犲叆 鎾ゅ崟璁板綍
-        centerServiceDaoImpl.saveBusiness(OrderDataFlowContextFactory.getDeleteOrderBusiness(dataFlow, "涓氬姟绯荤粺瀹炰緥澶辫触锛屽彂璧锋挙鍗�"));
-        //2.0 浣滃簾 c_orders 鍜� c_business 鏁版嵁
-        updateOrderAndBusinessDelete(dataFlow);
-        //3.0 鍙戣捣 鎾ゅ崟涓氬姟
-        doDeleteBusinessSystemInstanceData(dataFlow, deleteBusinesses);
-    }
-
-    /**
-     * 瀹屾垚璁㈠崟鐘舵��
-     * @param synchronousBusinesses
-     */
-    /*private void doComplateOrderAndBusiness(DataFlow dataFlow,List<Business> synchronousBusinesses) {
-
-        //Complete Order and business
-        Map order = new HashMap();
-        order.put("oId",dataFlow.getoId());
-        order.put("statusCd", StatusConstant.STATUS_CD_COMPLETE);
-        order.put("finishTime",DateUtil.getCurrentDate());
-        centerServiceDaoImpl.updateOrder(order);
-        centerServiceDaoImpl.updateBusiness(order);
-        Date businessStartDate;
-        AppService service;
-        JSONObject requestBusinessJson;
-        for(Business business : synchronousBusinesses){
-            businessStartDate = DateUtil.getCurrentDate();
-            service = OrderDataFlowContextFactory.getService(dataFlow,business.getServiceCode());
-            if(!CommonConstant.INSTANCE_Y.equals(service.getIsInstance())){
-                continue;
-            }
-            requestBusinessJson = OrderDataFlowContextFactory.getCompleteInstanceDataJson(dataFlow,business);
-            JSONObject responseJson = doRequestBusinessSystem(dataFlow, service, requestBusinessJson);
-
-            OrderDataFlowContextFactory.addCostTime(dataFlow, business.getServiceCode(), "璋冪敤"+business.getServiceName()+"-doComplete鑰楁椂", businessStartDate);
-            saveLogMessage(dataFlow,LogAgent.createLogMessage(dataFlow.getRequestCurrentHeaders(),requestBusinessJson.toJSONString()),
-                    LogAgent.createLogMessage(dataFlow.getResponseCurrentHeaders(),responseJson.toJSONString()),
-                    DateUtil.getCurrentDate().getTime() - businessStartDate.getTime());
-        }
-
-    }*/
-
-    /**
-     * 灏咮usinessTable 涓殑鏁版嵁淇濆瓨鍒� InstanceTable
-     *
-     * @param dataFlow
-     * @param synchronousBusinesses
-     */
-    private void doBusinessTableDataInfoToInstanceTable(IOrderDataFlowContext dataFlow, List<Business> synchronousBusinesses, List<Business> deleteBusinesses) {
-        Date businessStartDate;
-        ServiceBusiness serviceBusiness;
-        JSONObject requestBusinessJson;
-        for (Business business : synchronousBusinesses) {
-            businessStartDate = DateUtil.getCurrentDate();
-            serviceBusiness = ServiceBusinessUtil.getServiceBusiness(business.getBusinessTypeCd());
-            //娣诲姞闇�瑕佹挙鍗曠殑涓氬姟淇℃伅
-            deleteBusinesses.add(business);
-
-            requestBusinessJson = OrderDataFlowContextFactory.getBusinessTableDataInfoToInstanceTableJson(dataFlow, business);
-            JSONObject responseJson = doRequestBusinessSystem(dataFlow, serviceBusiness, requestBusinessJson);
-            //鍙戝竷浜嬩欢
-            DataFlowEventPublishing.invokeBusinessISuccess(dataFlow, business);
-            updateBusinessStatusCdByBId(business.getbId(), StatusConstant.STATUS_CD_COMPLETE);
-            OrderDataFlowContextFactory.addCostTime(dataFlow, business.getBusinessTypeCd(), "璋冪敤" + business.getBusinessTypeCd() + "鑰楁椂", businessStartDate);
-          /*  saveLogMessage(dataFlow,LogAgent.createLogMessage(dataFlow.getRequestCurrentHeaders(),requestBusinessJson.toJSONString()),
-                    LogAgent.createLogMessage(dataFlow.getResponseCurrentHeaders(),responseJson.toJSONString()),
-                    DateUtil.getCurrentDate().getTime() - businessStartDate.getTime());*/
-        }
-
-      /*  if(dataFlow.getCurrentBusiness() == null){
-            return ;
-        }*/
-
-        //鍒ゆ柇涓氬姟鍔ㄤ綔鏄惁閮界宸ワ紝涓昏鑰冭檻 璇锋眰鎶ユ枃涓� 鏈夊紓姝ヤ篃鏈夊悓姝ョ殑鎯呭喌
-        //濡傛灉涓氬姟閮藉畬鎴愶紝鍒欏皢 璁㈠崟鏀逛负瀹屾垚鐘舵��
-        centerServiceDaoImpl.completeOrderByOId(dataFlow.getOrders().getoId());
-    }
-
-    /**
-     * 涓氬姟绯荤粺鎾ゅ崟
-     *
-     * @param dataFlow
-     * @param deleteBusinesses
-     */
-    private void doDeleteBusinessSystemInstanceData(IOrderDataFlowContext dataFlow, List<Business> deleteBusinesses) {
-        Date businessStartDate;
-        JSONObject requestBusinessJson;
-        ServiceBusiness serviceBusiness;
-        for (Business business : deleteBusinesses) {
-            businessStartDate = DateUtil.getCurrentDate();
-            requestBusinessJson = OrderDataFlowContextFactory.getDeleteInstanceTableJson(dataFlow, business);
-            serviceBusiness = ServiceBusinessUtil.getServiceBusiness(business.getBusinessTypeCd());
-            JSONObject responseJson = doRequestBusinessSystem(dataFlow, serviceBusiness, requestBusinessJson);
-            OrderDataFlowContextFactory.addCostTime(dataFlow, business.getBusinessTypeCd(), "璋冪敤" + business.getBusinessTypeCd() + "-鎾ゅ崟 鑰楁椂", businessStartDate);
-//            saveLogMessage(dataFlow,LogAgent.createLogMessage(dataFlow.getRequestCurrentHeaders(),requestBusinessJson.toJSONString()),
-//                    LogAgent.createLogMessage(dataFlow.getResponseCurrentHeaders(),responseJson.toJSONString()),
-//                    DateUtil.getCurrentDate().getTime() - businessStartDate.getTime());
-        }
-    }
-
-    /**
-     * 璋冪敤涓嬫父绯荤粺
-     *
-     * @param dataFlow
-     * @param serviceBusiness
-     * @param requestBusinessJson 璇锋眰鎶ユ枃
-     * @return
-     */
-    private JSONObject doRequestBusinessSystem(IOrderDataFlowContext dataFlow, ServiceBusiness serviceBusiness, JSONObject requestBusinessJson) {
-        String responseMessage;
-
-        Assert.hasLength(serviceBusiness.getInvokeType(), "c_service_business琛ㄩ厤缃嚭閿欙紝invoke_type 涓嶈兘涓虹┖" + serviceBusiness.getBusinessTypeCd());
-        String httpUrl = "";
-        if (ServiceBusinessConstant.INVOKE_TYPE_WEBSERVICE.equals(serviceBusiness.getInvokeType())) {//webservice鏂瑰紡
-            String url = serviceBusiness.getUrl();
-            String[] urls = url.split("#");
-
-            if (urls.length != 2) {
-                throw new ConfigDataException(ResponseConstant.RESULT_CODE_CONFIG_ERROR, "閰嶇疆閿欒锛歝_service_business閰嶇疆url瀛楁閿欒" + serviceBusiness.getBusinessTypeCd());
-            }
-            httpUrl = MappingCache.getValue(urls[0]);
-            String method = MappingCache.getValue(urls[1]);
-            responseMessage = (String) WebServiceAxisClient.callWebService(httpUrl, method,
-                    new Object[]{requestBusinessJson.toJSONString()},
-                    serviceBusiness.getTimeout());
-        } else if (ServiceBusinessConstant.INVOKE_TYPE_HTTP_POST.equals(serviceBusiness.getInvokeType())) {
-            //http://user-service/test/sayHello
-            httpUrl = MappingCache.getValue(serviceBusiness.getUrl());
-            responseMessage = restTemplate.postForObject(httpUrl, requestBusinessJson.toJSONString(), String.class);
-        } else if (ServiceBusinessConstant.INVOKE_TYPE_OUT_HTTP_POST.equals(serviceBusiness.getInvokeType())) {
-            httpUrl = MappingCache.getValue(serviceBusiness.getUrl());
-            responseMessage = restTemplateNoLoadBalanced.postForObject(httpUrl, requestBusinessJson.toJSONString(), String.class);
-        } else {//post鏂瑰紡
-            throw new ConfigDataException(ResponseConstant.RESULT_CODE_CONFIG_ERROR, "閰嶇疆閿欒锛歝_service_business閰嶇疆url瀛楁閿欒,褰撳墠鏃犳硶璇嗗埆" + serviceBusiness.getBusinessTypeCd());
-        }
-
-
-        logger.debug("璋冪敤鍦板潃锛歿}, 璁㈠崟鏈嶅姟璋冪敤涓嬫父鏈嶅姟璇锋眰鎶ユ枃锛歿}锛岃繑鍥炴姤鏂囷細{}", httpUrl, requestBusinessJson, responseMessage);
-
-        if (StringUtil.isNullOrNone(responseMessage) || !Assert.isJsonObject(responseMessage)) {
-            throw new BusinessException(ResponseConstant.RESULT_CODE_INNER_ERROR, "涓嬫父绯荤粺杩斿洖鏍煎紡涓嶆纭紝璇锋寜鍗忚瑙勮寖澶勭悊");
-        }
-        JSONObject responseJson = JSONObject.parseObject(responseMessage);
-
-        Assert.jsonObjectHaveKey(responseJson, "response", "涓嬫父杩斿洖鎶ユ枃鏍煎紡閿欒锛屾病鏈夊寘鍚玶esponseJson鑺傜偣銆�" + serviceBusiness.getBusinessTypeCd() + "銆�");
-
-        JSONObject responseInfo = responseJson.getJSONObject("response");
-
-        Assert.jsonObjectHaveKey(responseInfo, "code", "涓嬫父杩斿洖鎶ユ枃鏍煎紡閿欒锛宺esponse 鑺傜偣涓病鏈夊寘鍚玞ode鑺傜偣銆�" + serviceBusiness.getBusinessTypeCd() + "銆�");
-
-        if (!ResponseConstant.RESULT_CODE_SUCCESS.equals(responseInfo.getString("code"))) {
-            throw new BusinessException(ResponseConstant.RESULT_PARAM_ERROR, "涓氬姟绯荤粺澶勭悊澶辫触锛�" + responseInfo.getString("message"));
-        }
-        return responseJson;
-    }
 
     private String doTransferRequestBusinessSystem(DataFlow dataFlow, AppService service, String reqData) {
         String responseMessage;
@@ -979,45 +650,15 @@
         return responseMessage;
     }
 
-    /**
-     * 鏁版嵁淇濆瓨鍒癇usinessTable 涓�
-     *
-     * @param dataFlow
-     * @param synchronousBusinesses
-     * @param responseBusinesses
-     */
-    private void doSaveDataInfoToBusinessTable(IOrderDataFlowContext dataFlow, List<Business> synchronousBusinesses, JSONArray responseBusinesses) {
-        Date businessStartDate;
-        ServiceBusiness serviceBusiness;
-        JSONObject requestBusinessJson;
-        for (Business business : synchronousBusinesses) {
-            businessStartDate = DateUtil.getCurrentDate();
-            //鍙戣捣Business杩囩▼
-            updateBusinessStatusCdByBId(business.getbId(), StatusConstant.STATUS_CD_BUSINESS);
 
-            serviceBusiness = ServiceBusinessUtil.getServiceBusiness(business.getBusinessTypeCd());
-            requestBusinessJson = OrderDataFlowContextFactory.getRequestBusinessJson(dataFlow, business);
-
-            JSONObject responseJson = doRequestBusinessSystem(dataFlow, serviceBusiness, requestBusinessJson);
-
-            //鍙戝竷浜嬩欢
-            DataFlowEventPublishing.invokeBusinessBSuccess(dataFlow, business, responseJson);
-
-            responseBusinesses.add(responseJson);
-
-            OrderDataFlowContextFactory.addCostTime(dataFlow, business.getBusinessTypeCd(), "璋冪敤" + business.getBusinessTypeCd() + "鑰楁椂", businessStartDate);
-   /*         saveLogMessage(null,LogAgent.createLogMessage(dataFlow.getRequestCurrentHeaders(),requestBusinessJson.toJSONString()),
-                    LogAgent.createLogMessage(dataFlow.getResponseCurrentHeaders(),responseJson.toJSONString()),
-                    DateUtil.getCurrentDate().getTime()-businessStartDate.getTime());*/
-        }
-    }
 
     /**
      * 澶勭悊寮傛涓氬姟
      *
      * @param
      */
-    private void doAsynchronousBusinesses(IOrderDataFlowContext dataFlow) throws BusinessException {
+    @Override
+    protected void doAsynchronousBusinesses(IOrderDataFlowContext dataFlow) throws BusinessException {
         Date startDate = DateUtil.getCurrentDate();
         //6.3 澶勭悊寮傛锛屾寜娑堟伅闃熼噷澶勭悊
         List<Business> asynchronousBusinesses = OrderDataFlowContextFactory.getAsynchronousBusinesses(dataFlow);
@@ -1106,19 +747,7 @@
         }
     }
 
-    /**
-     * 淇敼c_business鐘舵��
-     *
-     * @param bId
-     * @param statusCd
-     */
-    private void updateBusinessStatusCdByBId(String bId, String statusCd) {
-        Map business = new HashMap();
-        business.put("bId", bId);
-        business.put("statusCd", statusCd);
-        business.put("finishTime", DateUtil.getCurrentDate());
-        centerServiceDaoImpl.updateBusinessByBId(business);
-    }
+
 
     public ICenterServiceDAO getCenterServiceDaoImpl() {
         return centerServiceDaoImpl;

--
Gitblit v1.8.0