自动化立体仓库 - WMS系统
#
18516761980
2022-09-30 147fcf9b349bd7314f6488a2c197d91fe6eb86a8
#
5个文件已修改
43 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/task/handler/StandingHandler.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/task/handler/WorkLogHandler.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -86,11 +86,13 @@
    @Value("${mes.url}")
    private String mesUrl;
    @Value("${ren.url}")
    private String renUrl;
    @Value("${mes.startUpTestPACK}")
    @Value("${ren.startUpTestPACK}")
    private String startUpTestPACK;
    @Value("${mes.startUpTestPACK}")
    @Value("${ren.startUpTestPACK}")
    private String suspendTestPACK;
    @Value("${mes.inPath}")
@@ -647,7 +649,7 @@
        combParam.setLocNo(locMast.getLocNo());
        combParam.setPackSts(1);
        combParam.setRequestTime(DateUtils.convert(new Date()));
        postMesData(inpath,combParam);
        postMesData(mesUrl,inpath,combParam);
        if (!locMastService.update(locMast,new EntityWrapper<LocMast>().eq("loc_no", testMast.getLocNo()))){
            throw new CoolException("申请测试失败");
@@ -669,7 +671,7 @@
            combParam.setPackName(testMast.getUserId());
            combParam.setLocNo(testMast.getBarcode());
            combParam.setRequestTime(DateUtils.convert(new Date()));
            return postMesData(startUpTestPACK,combParam);
            return postMesData(renUrl,startUpTestPACK,combParam);
        }catch (Exception e) {
            log.error("fail", e);
            e.printStackTrace();
@@ -683,7 +685,7 @@
            Review review=new Review();
            review.setPause(true);
            review.setRequestTime(DateUtils.convert(new Date()));
            return postMesData(suspendTestPACK,review);
            return postMesData(renUrl,suspendTestPACK,review);
        }catch (Exception e) {
            log.error("fail", e);
            e.printStackTrace();
@@ -692,7 +694,7 @@
        }
    }
    private ReturnT<String> postMesData(String mesPath,Object combParam){
    private ReturnT<String> postMesData(String URL,String Path,Object combParam){
        if(combParam != null){
            String response = "";
            boolean success = false;
@@ -701,8 +703,8 @@
//                map.put("appkey","ea1f0459efc02a79f046f982767939ae");
                response = new HttpHandler.Builder()
//                        .setHeaders(map)
                        .setUri(mesUrl)
                        .setPath(mesPath)
                        .setUri(URL)
                        .setPath(Path)
                        .setJson(JSON.toJSONString(combParam))
                        .build()
                        .doPost();
@@ -713,11 +715,11 @@
                    }else if (jsonObject.getDate("isComplete").equals(false)){
                        success = false;
                    }else {
                        log.error("返回值出错!!!url:{};request:{};response:{}", MesConstant.URL+MesConstant.PAKIN_URL, JSON.toJSONString(combParam), response);
                        log.error("返回值出错!!!url:{};request:{};response:{}", URL+Path, JSON.toJSONString(combParam), response);
                        throw new CoolException("返回值出错");
                    }
                } else {
                    log.error("请求接口失败!!!url:{};request:{};response:{}", MesConstant.URL+MesConstant.PAKIN_URL, JSON.toJSONString(combParam), response);
                    log.error("请求接口失败!!!url:{};request:{};response:{}", URL+Path, JSON.toJSONString(combParam), response);
                    throw new CoolException("上报mes系统失败");
                }
            } catch (Exception e) {
@@ -729,7 +731,7 @@
                    // 保存接口日志
                    apiLogService.save(
                            "成品库入库上报",
                            MesConstant.URL + MesConstant.PAKIN_URL,
                            URL + Path,
                            null,
                            "127.0.0.1",
                            JSON.toJSONString(combParam),
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
@@ -829,11 +829,11 @@
                    }else if (jsonObject.getDate("isComplete").equals(false)){
                        success = false;
                    }else {
                        log.error("返回值出错!!!url:{};request:{};response:{}", MesConstant.URL+MesConstant.PAKIN_URL, JSON.toJSONString(combParam), response);
                        log.error("返回值出错!!!url:{};request:{};response:{}", mesUrl+mesPath, JSON.toJSONString(combParam), response);
                        throw new CoolException("返回值出错");
                    }
                } else {
                    log.error("请求接口失败!!!url:{};request:{};response:{}", MesConstant.URL+MesConstant.PAKIN_URL, JSON.toJSONString(combParam), response);
                    log.error("请求接口失败!!!url:{};request:{};response:{}", mesUrl+mesPath, JSON.toJSONString(combParam), response);
                    throw new CoolException("上报mes系统失败");
                }
            } catch (Exception e) {
@@ -845,7 +845,7 @@
                    // 保存接口日志
                    apiLogService.save(
                            "成品库入库上报",
                            MesConstant.URL + MesConstant.PAKIN_URL,
                            mesUrl + mesPath,
                            null,
                            "127.0.0.1",
                            JSON.toJSONString(combParam),
src/main/java/com/zy/asrs/task/handler/StandingHandler.java
@@ -157,7 +157,7 @@
                if (jsonObject.getInteger("code").equals(200)) {
                    success = true;
                } else {
                    log.error("请求接口失败!!!url:{};request:{};response:{}", MesConstant.URL+MesConstant.PAKIN_URL, JSON.toJSONString(combParam), response);
                    log.error("请求接口失败!!!url:{};request:{};response:{}", mesUrl+mesPath, JSON.toJSONString(combParam), response);
                    throw new CoolException("上报mes系统失败");
                }
            } catch (Exception e) {
@@ -167,9 +167,10 @@
            } finally {
                try {
                    // 保存接口日志
                    //                            MesConstant.URL + MesConstant.PAKIN_URL,
                    apiLogService.save(
                            "成品库入库上报",
                            MesConstant.URL + MesConstant.PAKIN_URL,
                            mesUrl + mesPath,
                            null,
                            "127.0.0.1",
                            JSON.toJSONString(combParam),
src/main/java/com/zy/asrs/task/handler/WorkLogHandler.java
@@ -149,7 +149,7 @@
                if (jsonObject.getInteger("code").equals(200)) {
                    success = true;
                } else {
                    log.error("请求接口失败!!!url:{};request:{};response:{}", MesConstant.URL+MesConstant.PAKIN_URL, JSON.toJSONString(combParam), response);
                    log.error("请求接口失败!!!url:{};request:{};response:{}", mesUrl+mesPath, JSON.toJSONString(combParam), response);
                    throw new CoolException("上报mes系统失败");
                }
            } catch (Exception e) {
@@ -161,7 +161,7 @@
                    // 保存接口日志
                    apiLogService.save(
                            "成品库入库上报",
                            MesConstant.URL + MesConstant.PAKIN_URL,
                            mesUrl + mesPath,
                            null,
                            "127.0.0.1",
                            JSON.toJSONString(combParam),
src/main/resources/application.yml
@@ -54,11 +54,13 @@
mes:
  url: 172.28.15.251:7899
  url2: 172.28.15.251:7899
  # 入库上报
  inPath: mes-pm/in/stock/condition/warehousing
  # 出库上报
  outPath: mes-pm/in/stock/condition/exWarehouse
ren:
  url: 172.28.15.251:7899
  # 启动测试请求
  startUpTestPACK: 127.0.0.1:8080/ynwms/open/asrs/rpv/test/open/auth
  #暂停测试