| | |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.LocMast; |
| | | import com.zy.asrs.entity.WmsLocStatus; |
| | | import com.zy.asrs.entity.param.TaskOverToWms; |
| | | import com.zy.asrs.entity.param.WMSAndAGVInterfaceParam; |
| | | import com.zy.asrs.mapper.LocMastMapper; |
| | | import com.zy.asrs.service.ApiLogService; |
| | | import com.zy.asrs.service.LocMastService; |
| | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Slf4j |
| | | @Service("locMastService") |
| | | public class LocMastServiceImpl extends ServiceImpl<LocMastMapper, LocMast> implements LocMastService { |
| | |
| | | |
| | | @Override |
| | | public LocMast selectByLocNo(String locNo) { |
| | | return this.selectOne(new EntityWrapper<LocMast>().eq("loc_no",locNo)); |
| | | return this.selectOne(new EntityWrapper<LocMast>().eq("loc_no", locNo)); |
| | | |
| | | //return this.baseMapper.selectByLocNo(locNo); |
| | | } |
| | |
| | | public R toWmsLocStatus(LocMast locMast) { |
| | | String response = null; |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("x-api-key","7a15b5db-29b6-552c-8cff-0cfec3756da2"); |
| | | map.put("x-api-key", "7a15b5db-29b6-552c-8cff-0cfec3756da2"); |
| | | WmsLocStatus param = new WmsLocStatus(); |
| | | param.setWarehouseId("1688469798893297665"); |
| | | param.setLocationCode(Utils.getWmsLocNo(locMast.getLocNo())); |
| | | param.setEmptyContainer(locMast.getEmptyContainer$()); |
| | | if (locMast.getLocSts().equals("Z")){ |
| | | if (locMast.getLocSts().equals("Z")) { |
| | | param.setStatus("JY"); |
| | | }else { |
| | | } else { |
| | | param.setStatus("QY"); |
| | | } |
| | | if (Cools.isEmpty(locMast.getBarcode()) || locMast.getLocSts().equals("O")){ |
| | | if (Cools.isEmpty(locMast.getBarcode()) || locMast.getLocSts().equals("O")) { |
| | | param.setContainerCode(""); |
| | | param.setContainerTypeCode(""); |
| | | }else { |
| | | } else { |
| | | param.setContainerCode(locMast.getBarcode()); |
| | | param.setContainerTypeCode(locMast.getContainerTypeCode()); |
| | | } |
| | |
| | | .setJson(JSON.toJSONString(param)) |
| | | .build() |
| | | .doPost(); |
| | | }catch (Exception e){ |
| | | } 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 |
| | | , wmsUrl + "wcsManager/wcsInterface/inboundTaskApply" |
| | | , null |
| | | , "127.0.0.1" |
| | | , JSON.toJSONString(param) |
| | | , response |
| | | , true |
| | | ); |
| | | |
| | | return null; |