| | |
| | | import com.zy.asrs.service.OrderPakinService; |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.common.constant.ApiInterfaceConstant; |
| | | import com.zy.common.constant.MesConstant; |
| | | import com.zy.common.model.MesPakinParam; |
| | | import com.zy.common.utils.HttpHandler; |
| | |
| | | ReturnT<String> result = SUCCESS; |
| | | try { |
| | | response = new HttpHandler.Builder() |
| | | .setUri(MesConstant.URI) |
| | | .setPath(MesConstant.PAKIN_PATH) |
| | | .setUri(ApiInterfaceConstant.ERP_IP) |
| | | .setPath(ApiInterfaceConstant.PAKIN_PATH) |
| | | .setJson(JSON.toJSONString(param)) |
| | | .build() |
| | | .doPost(); |
| | |
| | | orderPakinService.updateSettle(order.getId(), 6L, null); |
| | | success = true; |
| | | } else { |
| | | log.error("å
¥åºå®æä¸æ¥erp失败ï¼urlï¼{}ï¼requestï¼{}ï¼responseï¼{}", MesConstant.URI + MesConstant.PAKIN_PATH, JSON.toJSONString(param), response); |
| | | log.error("å
¥åºå®æä¸æ¥erp失败ï¼urlï¼{}ï¼requestï¼{}ï¼responseï¼{}", ApiInterfaceConstant.ERP_IP + ApiInterfaceConstant.PAKIN_PATH, JSON.toJSONString(param), response); |
| | | throw new CoolException("å
¥åºå®æä¸æ¥erp失败"); |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | // ä¿åæ¥å£æ¥å¿ |
| | | apiLogService.save( |
| | | "å
¥åºå®æä¸æ¥", |
| | | MesConstant.URI + MesConstant.PAKIN_PATH, |
| | | ApiInterfaceConstant.ERP_IP + ApiInterfaceConstant.PAKIN_PATH, |
| | | null, |
| | | "127.0.0.1", |
| | | JSON.toJSONString(param), |
| | |
| | | import com.zy.asrs.service.OrderPakoutService; |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.common.constant.ApiInterfaceConstant; |
| | | import com.zy.common.constant.MesConstant; |
| | | import com.zy.common.model.MesPakoutParam; |
| | | import com.zy.common.utils.HttpHandler; |
| | |
| | | ReturnT<String> result = SUCCESS; |
| | | try { |
| | | response = new HttpHandler.Builder() |
| | | .setUri(MesConstant.URI) |
| | | .setPath(MesConstant.PAKOUT_PATH) |
| | | .setUri(ApiInterfaceConstant.ERP_IP) |
| | | .setPath(ApiInterfaceConstant.PAKOUT_PATH) |
| | | .setJson(JSON.toJSONString(param)) |
| | | .build() |
| | | .doPost(); |
| | |
| | | orderPakoutService.updateSettle(order.getId(), 6L, null); |
| | | success = true; |
| | | } else { |
| | | log.error("åºåºå®æä¸æ¥erp失败ï¼urlï¼{}ï¼requestï¼{}ï¼responseï¼{}", MesConstant.URI + MesConstant.PAKOUT_PATH, JSON.toJSONString(param), response); |
| | | log.error("åºåºå®æä¸æ¥erp失败ï¼urlï¼{}ï¼requestï¼{}ï¼responseï¼{}", ApiInterfaceConstant.ERP_IP + ApiInterfaceConstant.PAKOUT_PATH, JSON.toJSONString(param), response); |
| | | throw new CoolException("åºåºå®æä¸æ¥erp失败"); |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | // ä¿åæ¥å£æ¥å¿ |
| | | apiLogService.save( |
| | | "åºåºå®æä¸æ¥", |
| | | MesConstant.URI + MesConstant.PAKOUT_PATH, |
| | | ApiInterfaceConstant.ERP_IP + ApiInterfaceConstant.PAKOUT_PATH, |
| | | null, |
| | | "127.0.0.1", |
| | | JSON.toJSONString(param), |
| New file |
| | |
| | | package com.zy.common.constant; |
| | | |
| | | /** |
| | | * @author pang.jiabao |
| | | * @description è°ç¨å¤é¨APIå°å常é |
| | | * @createDate 2025/11/13 13:10 |
| | | */ |
| | | public class ApiInterfaceConstant { |
| | | |
| | | /* **************************************ERPæ¥å£å¯¹æ¥ start*******************************************************/ |
| | | |
| | | /** |
| | | * ERP对æ¥åºç¡å°å |
| | | */ |
| | | // public static final String URI = "http://192.168.99.130:80"; |
| | | // æµè¯å°å |
| | | public static final String ERP_IP = "http://127.0.0.1:8080/yhfzwms/open/asrs"; |
| | | |
| | | /** |
| | | * å
¥åºå®æä¸æ¥è·¯å¾ |
| | | */ |
| | | public static final String PAKIN_PATH = "/inOrderFinishReport"; |
| | | |
| | | /** |
| | | * åºåºå®æä¸æ¥è·¯å¾ |
| | | */ |
| | | public static final String PAKOUT_PATH = "/outOrderFinishReport"; |
| | | |
| | | /* ***************************************AGVæ¥å£å¯¹æ¥ start*******************************************************/ |
| | | |
| | | /** |
| | | * AGV对æ¥åºç¡å°å |
| | | */ |
| | | public static final String AGV_IP = "http://192.168.99.130:80"; |
| | | |
| | | /** |
| | | * å
¥åºå¼å«AGVåè´§ |
| | | */ |
| | | public static final String AGV_CALL_IN_PATH = "mes/api/zy/v1/packDown/sendList"; |
| | | |
| | | } |
| | |
| | | |
| | | public static final String PACK_DOWN_URL = "mes/api/zy/v1/packDown/sendList"; |
| | | |
| | | // å
¥åºå®æä¸æ¥è·¯å¾ |
| | | public static final String PAKIN_PATH = "/inOrderFinishReport"; |
| | | |
| | | // åºåºå®æä¸æ¥è·¯å¾ |
| | | public static final String PAKOUT_PATH = "/outOrderFinishReport"; |
| | | |
| | | |
| | | /** |
| | | * tokenéè¿headerä¼ éçåç§° |
| | | */ |
| | | public static final String TOKEN_HEADER_NAME = "Authorization"; |
| | | |
| | | /** |
| | | * tokenéè¿åæ°ä¼ éçåç§° |
| | | */ |
| | | public static final String TOKEN_PARAM_NAME = "access_token"; |
| | | |
| | | } |