| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | @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) { |
| | |
| | | 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; |
| | | } |