|  |  | 
 |  |  | package com.zy.asrs.task.handler; | 
 |  |  |  | 
 |  |  | import com.alibaba.fastjson.JSON; | 
 |  |  | import com.core.common.Cools; | 
 |  |  | import com.core.common.DateUtils; | 
 |  |  | import com.core.exception.CoolException; | 
 |  |  | import com.zy.asrs.entity.DocType; | 
 |  |  | 
 |  |  |         if (null == docType) { | 
 |  |  |             return SUCCESS; | 
 |  |  |         } | 
 |  |  |         if (!Cools.isEmpty(docType.getMemo())) { | 
 |  |  |             if (docType.getMemo().equals("hand")) { | 
 |  |  |                 // 修改订单状态 4.完成 ===>> 6.已上报 | 
 |  |  |                 if (!orderService.updateSettle(order.getId(), 6L, null)) { | 
 |  |  |                     throw new CoolException("服务器内部错误,请联系管理员"); | 
 |  |  |                 } | 
 |  |  |                 return SUCCESS; | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         List<OrderDetl> orderDetls = orderDetlService.selectByOrderId(order.getId()); | 
 |  |  |         // 入库完成上报 | 
 |  |  |         if (docType.getPakin() == 1) { | 
 |  |  | 
 |  |  |                     throw new CoolException(order.getOrderNo() + "订单修改State为"+state+"失败"); | 
 |  |  |                 } else { | 
 |  |  |                     erpService.updateTimeForVoucherDetail(order.getOrderNo()); | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 // 修改订单状态 4.完成 ===>> 6.已上报 | 
 |  |  |                 if (!orderService.updateSettle(order.getId(), 6L, null)) { | 
 |  |  |                     throw new CoolException("服务器内部错误,请联系管理员"); | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |             } catch (Exception e) { | 
 |  |  | 
 |  |  |                     } | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 // 修改订单状态 4.完成 ===>> 6.已上报 | 
 |  |  |                 if (!orderService.updateSettle(order.getId(), 6L, null)) { | 
 |  |  |                     throw new CoolException("服务器内部错误,请联系管理员"); | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |             } catch (Exception e) { | 
 |  |  |                 log.error("fail", e); | 
 |  |  |                 TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |