自动化立体仓库 - WMS系统
1
ZY
2024-09-25 a378c8fbae0c40ae2b5387ba4ff052af27107aaf
1
2个文件已修改
21 ■■■■ 已修改文件
pom.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/task/handler/OrderSendHandler.java 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pom.xml
@@ -15,7 +15,7 @@
    <properties>
        <java.version>1.8</java.version>
        <cool.version>3.2.0</cool.version>
        <cool.version>3.4.5</cool.version>
        <mysql-driver.version>5.1.47</mysql-driver.version>
        <mybatis-plus.version>2.3.2</mybatis-plus.version>
        <fastjson.version>1.2.58</fastjson.version>
src/main/java/com/zy/asrs/task/handler/OrderSendHandler.java
@@ -56,7 +56,7 @@
        param.setcCusName(order.getCstmrName());
        param.setcAccount(order.getNumber());
        param.setcMemo(order.getMemo());
        param.setType(Cools.isEmpty(order.getDocType$())?"":order.getDocType$());
        param.setType(Cools.isEmpty(order.getDocType$()) ? "" : order.getDocType$());
        param.setdDate(Utils.getDateStr(order.getCreateTime()));
        param.setAllocation(order.getItemName());
@@ -64,7 +64,7 @@
        List<OpenOrderPakoutParam.Body> bodyList = new ArrayList<>();
        param.setaDDBody(bodyList);
        for(OrderDetl orderDetl : orderDetlList){
        for (OrderDetl orderDetl : orderDetlList) {
            OpenOrderPakoutParam.Body body = new OpenOrderPakoutParam.Body();
            body.setiQuantity(orderDetl.getQty());
            body.setcInvCode(orderDetl.getMatnr());
@@ -74,13 +74,12 @@
        doHttpRequest(param, "上报ERP出库单据", url, orderReportPath, null, "127.0.0.1");
        orderService.updateSettle(order.getId(),6L,0L);
        orderService.updateSettle(order.getId(), 6L, 0L);
    }
    private int doHttpRequest(Object requestParam, String namespace, String url, String path, String appkey, String ip){
    private int doHttpRequest(Object requestParam, String namespace, String url, String path, String appkey, String ip) {
        String response = "";
        boolean success = false;
        log.error(JSONObject.toJSONString(requestParam));
@@ -93,20 +92,20 @@
                    .doPost();
            JSONObject jsonObject = JSON.parseObject(response);
            if(Cools.isEmpty(jsonObject.get("ErrorCode"))){
            if (Cools.isEmpty(jsonObject.get("ErrorCode"))) {
                throw new CoolException(jsonObject.get("ErrorMsg").toString());
            }
            int code = Integer.parseInt(jsonObject.get("ErrorCode").toString()) ;
            if(code == 0){
            int code = Integer.parseInt(jsonObject.get("ErrorCode").toString());
            if (code != 0) {
                throw new CoolException(jsonObject.get("ErrorMsg").toString());
            }
            success = true;
            return code;
        }catch (Exception e){
        } catch (Exception e) {
            log.error(e.getMessage());
            throw new CoolException("调用接口响应错误");
        }finally {
        } finally {
            apiLogService.save(
                    namespace,
                    url + path,