自动化立体仓库 - WMS系统
*
lsh
2 天以前 fc6a73660fb4c76a2b0479bb8108768b7ff0d146
src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java
@@ -24,6 +24,7 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.List;
/**
@@ -75,21 +76,25 @@
                    success = true;
                    // 修改订单状态 4.完成 ===>> 6.已上报
                    if (!orderService.updateSettle(order.getId(), 6L, null)) {
                        throw new CoolException("服务器内部错误,请联系管理员");
                        throw new CoolException("上报完成更新订单状态异常,请联系管理员");
                    }
                } else {
                    log.error("请求接口失败!!!url:{};request:{};response:{}", MesConstant.URL+MesConstant.PAKIN_URL, JSON.toJSONString(pakinParam), response);
                    order.setUpdateTime(new Date());
                    orderService.updateById(order);
                    throw new CoolException("上报mes系统失败");
                }
            } catch (Exception e) {
                log.error("fail", e);
//            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
                order.setUpdateTime(new Date());
                orderService.updateById(order);
                return FAIL.setMsg(e.getMessage());
            } finally {
                try {
                    // 保存接口日志
                    apiLogService.save(
                            "成品库入库上报",
                            "胶料入库上报至ERP",
                            MesConstant.URL + MesConstant.PAKIN_URL,
                            null,
                            "127.0.0.1",
@@ -129,7 +134,7 @@
                    success = true;
                    // 修改订单状态 4.完成 ===>> 6.已上报
                    if (!orderService.updateSettle(order.getId(), 6L, null)) {
                        throw new CoolException("服务器内部错误,请联系管理员");
                        throw new CoolException("上报完成更新订单状态异常,请联系管理员");
                    }
                } else {
                    log.error("请求接口失败!!!url:{};request:{};response:{}", MesConstant.URL+MesConstant.PAKOUT_URL, JSON.toJSONString(pakoutParam), response);