自动化立体仓库 - WCS系统
123
ZY
3 天以前 364b9ccc44bc6863280c5cc00aa8512cfff548d4
src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java
@@ -1,7 +1,5 @@
package com.zy.asrs.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.core.common.Cools;
@@ -9,13 +7,9 @@
import com.zy.asrs.entity.LocMast;
import com.zy.asrs.entity.WmsLocStatus;
import com.zy.asrs.mapper.LocMastMapper;
import com.zy.asrs.service.ApiLogService;
import com.zy.asrs.service.LocMastService;
import com.zy.asrs.utils.Utils;
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.stereotype.Service;
import java.util.HashMap;
@@ -25,10 +19,6 @@
@Slf4j
@Service("locMastService")
public class LocMastServiceImpl extends ServiceImpl<LocMastMapper, LocMast> implements LocMastService {
    @Value("${wms.url}")
    private String wmsUrl;
    @Autowired
    private ApiLogService apiLogService;
    @Override
    public List<Integer> queryDistinctRow(Integer crnNo) {
@@ -104,28 +94,28 @@
            param.setContainerTypeCode(locMast.getContainerTypeCode());
        }
        try {
            response = new HttpHandler.Builder()
                    .setHeaders(map)
                    .setUri(wmsUrl)
                    .setPath("wcsManager/wcsInterface/locationUpdate")
                    .setJson(JSON.toJSONString(param))
                    .build()
                    .doPost();
        } catch (Exception e) {
            log.error("堆垛机任务完成,请求wms任务完成接口失败");
        }
        JSONObject jsonObject = JSON.parseObject(response);
        apiLogService.save("Wms变更货位状态"
                , wmsUrl + "wcsManager/wcsInterface/inboundTaskApply"
                , null
                , "127.0.0.1"
                , JSON.toJSONString(param)
                , response
                , true
        );
//        try {
//            response = new HttpHandler.Builder()
//                    .setHeaders(map)
//                    .setUri(wmsUrl)
//                    .setPath("wcsManager/wcsInterface/locationUpdate")
//                    .setJson(JSON.toJSONString(param))
//                    .build()
//                    .doPost();
//        } catch (Exception e) {
//            log.error("堆垛机任务完成,请求wms任务完成接口失败");
//        }
//        JSONObject jsonObject = JSON.parseObject(response);
//
//
//        apiLogService.save("Wms变更货位状态"
//                , wmsUrl + "wcsManager/wcsInterface/inboundTaskApply"
//                , null
//                , "127.0.0.1"
//                , JSON.toJSONString(param)
//                , response
//                , true
//        );
        return null;
    }