wuxw
2019-11-14 ba015933485ecb8debddd66d28fb38354ae66a11
HardwareAdapationService/src/main/java/com/java110/hardwareAdapation/thread/TranslateOwnerToMachine.java
@@ -1,5 +1,6 @@
package com.java110.hardwareAdapation.thread;
import com.alibaba.fastjson.JSONObject;
import com.java110.core.factory.GenerateCodeFactory;
import com.java110.core.smo.hardwareAdapation.IMachineInnerServiceSMO;
import com.java110.core.smo.order.IOrderInnerServiceSMO;
@@ -35,9 +36,10 @@
    private IMachineTranslateServiceDao machineTranslateServiceDaoImpl;
    public TranslateOwnerToMachine() {
        orderInnerServiceSMOImpl = ApplicationContextFactory.getBean("orderInnerServiceSMOImpl", IOrderInnerServiceSMO.class);
        ownerInnerServiceSMOImpl = ApplicationContextFactory.getBean("ownerInnerServiceSMOImpl", IOwnerInnerServiceSMO.class);
    public TranslateOwnerToMachine(boolean state) {
        TRANSLATE_STATE = state;
        orderInnerServiceSMOImpl = ApplicationContextFactory.getBean(IOrderInnerServiceSMO.class.getName(), IOrderInnerServiceSMO.class);
        ownerInnerServiceSMOImpl = ApplicationContextFactory.getBean(IOwnerInnerServiceSMO.class.getName(), IOwnerInnerServiceSMO.class);
        machineInnerServiceSMOImpl = ApplicationContextFactory.getBean("machineInnerServiceSMOImpl", IMachineInnerServiceSMO.class);
        machineTranslateServiceDaoImpl = ApplicationContextFactory.getBean("machineTranslateServiceDaoImpl", IMachineTranslateServiceDao.class);
@@ -68,6 +70,7 @@
        List<OrderDto> orderDtos = orderInnerServiceSMOImpl.queryOwenrOrders(orderDto);
        for (OrderDto tmpOrderDto : orderDtos) {
            try {
                logger.debug("开始处理订单"+ JSONObject.toJSONString(tmpOrderDto));
                //根据bId 查询业主信息
                ownerDto = new OwnerDto();
                ownerDto.setbId(tmpOrderDto.getbId());
@@ -78,6 +81,8 @@
                dealData(tmpOrderDto, ownerDtos.get(0));
                //刷新 状态为C1
                orderInnerServiceSMOImpl.updateBusinessStatusCd(tmpOrderDto);
                logger.debug("处理订单结束"+ JSONObject.toJSONString(tmpOrderDto));
            } catch (Exception e) {
                logger.error("执行订单任务失败", e);
            }