自动化立体仓库 - WMS系统
*
lsh
6 小时以前 4448779d76ff424e666d65f2f168a5890642c857
*
3个文件已修改
44 ■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/OrderPakoutController.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/OrderPakoutController.java
@@ -9,19 +9,17 @@
import com.core.common.*;
import com.core.exception.CoolException;
import com.zy.asrs.entity.*;
import com.zy.asrs.entity.param.OrderDomainParam;
import com.zy.asrs.entity.param.QualityGroupListParam;
import com.zy.asrs.entity.result.OrderPakoutDetailVo;
import com.zy.asrs.entity.result.OrderPakoutMainVo;
import com.zy.asrs.entity.result.WrkTraceVo;
import com.zy.asrs.service.*;
import com.zy.common.constant.MesConstant;
import com.zy.common.model.DetlDto;
import com.zy.common.utils.HttpHandler;
import com.zy.common.web.BaseController;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
@@ -52,6 +50,11 @@
    private WrkMastLogService wrkMastLogService;
    @Autowired
    private ApiLogService apiLogService;
    @Value("${srXghyMes.actualShipmentMesUrl}")
    private String actualShipmentMesUrl;
    @Value("${srXghyMes.actualShipmentMes}")
    private String actualShipmentMes;
    @RequestMapping(value = "/order/nav/list/auth")
    @ManagerAuth
@@ -401,8 +404,8 @@
        boolean success = false;
        try {
            response = new HttpHandler.Builder()
                    .setUri(MesConstant.URL)
                    .setPath(MesConstant.PAKIN_URL)
                    .setUri(actualShipmentMesUrl)
                    .setPath(actualShipmentMes)
                    .setJson(JSON.toJSONString(qualityGroupListParam))
                    .build()
                    .doPost();
@@ -422,7 +425,7 @@
//                    throw new CoolException("服务器内部错误,请联系管理员");
                    log.error("组货单更新状态失败!!!组货单号"+itemName+".updateItemName");
                }
                log.error("请求接口失败!!!url:{};request:{};response:{}", MesConstant.URL+MesConstant.PAKIN_URL, JSON.toJSONString(qualityGroupListParam), response);
                log.error("请求接口失败!!!url:{};request:{};response:{}", actualShipmentMesUrl+"/"+actualShipmentMes, JSON.toJSONString(qualityGroupListParam), response);
            }
            return R.error("上报mes系统失败").add("上报mes系统失败");
        } catch (Exception e) {
@@ -436,7 +439,7 @@
                // 保存接口日志
                apiLogService.save(
                        "上报MES实际组货单",
                        MesConstant.URL + MesConstant.PAKIN_URL,
                        actualShipmentMesUrl+"/"+actualShipmentMes,
                        null,
                        "127.0.0.1",
                        JSON.toJSONString(qualityGroupListParam),
src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java
@@ -22,6 +22,7 @@
import com.zy.common.utils.HttpHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -50,6 +51,11 @@
    private WrkDetlServiceImpl wrkDetlService;
    @Autowired
    private SnowflakeIdWorker snowflakeIdWorker;
    @Value("${srXghyMes.productInventoryUrl}")
    private String productInventoryUrl;
    @Value("${srXghyMes.productInventory}")
    private String productInventory;
    @Transactional
    public ReturnT<String> start(Order order) {
@@ -251,8 +257,8 @@
        boolean success = false;
        try {
            response = new HttpHandler.Builder()
                    .setUri(MesConstant.URL)
                    .setPath(MesConstant.PAKIN_URL)
                    .setUri(productInventoryUrl)
                    .setPath(productInventory)
                    .setJson(JSON.toJSONString(orderMesXGHYParam))
                    .build()
                    .doPost();
@@ -260,7 +266,7 @@
            if (jsonObject.getInteger("code").equals(200)) {
                success = true;
            } else {
                log.error("请求接口失败!!!url:{};request:{};response:{}", MesConstant.URL+MesConstant.PAKIN_URL, JSON.toJSONString(orderMesXGHYParam), response);
                log.error("请求接口失败!!!url:{};request:{};response:{}", productInventoryUrl+"/"+productInventory, JSON.toJSONString(orderMesXGHYParam), response);
            }
        } catch (Exception e) {
            log.error("fail", e);
@@ -271,7 +277,7 @@
                // 保存接口日志
                apiLogService.save(
                        "成品库入库上报",
                        MesConstant.URL + MesConstant.PAKIN_URL,
                        productInventoryUrl+"/"+productInventory,
                        null,
                        "127.0.0.1",
                        JSON.toJSONString(orderMesXGHYParam),
@@ -280,7 +286,6 @@
                );
            } catch (Exception e) { log.error("", e); }
        }
//        System.out.println(orderMesXGHYParam.toString());
        return SUCCESS;
    }
src/main/resources/application.yml
@@ -81,6 +81,18 @@
  inPath: EosServer/PluginGateway.ashx?pluginid=DataIOHttp&func=senddata&userno=ASRS&sign=5DD885999945BA2F3DC9A61F1B857DB3&dataname=cprkwc
  # 出库上报
  outPath: EosServer/PluginGateway.ashx?pluginid=DataIOHttp&func=senddata&userno=ASRS&sign=5DD885999945BA2F3DC9A61F1B857DB3&dataname=cpckwc
srXghyMes:
  # 上报MES实际组货单
  actualShipmentMesUrl: 172.22.152.3:8157
  actualShipmentMes: qualityGroupList/v1/updateGroupList
  # 上报MES出入库数据
  productInventoryUrl: 172.22.152.3:8160
  productInventory: productInventory/v1/saveDto
  # 查询卷号是否合格
  qualityFinishedCheckoutUrl: 172.22.152.3:8157
  qualityFinishedCheckout: qualityFinishedCheckout/v1/querybatchNoWMS
srHangJia:
  url: 192.168.18.229:16126
  # 拆垛信息上传