|  |  |  | 
|---|
|  |  |  | package com.zy.common.service; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.alibaba.fastjson.JSON; | 
|---|
|  |  |  | import com.zy.asrs.entity.WaitPakin; | 
|---|
|  |  |  | import com.zy.common.utils.HttpHandler; | 
|---|
|  |  |  | import com.zy.core.properties.SystemProperties; | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | 
|---|
|  |  |  | @Slf4j | 
|---|
|  |  |  | @Service | 
|---|
|  |  |  | public class WmsService { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public boolean fullStorePutStart(String barcode, Integer sourceStaNo, List<WaitPakin> waitPakins) { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | Map<String, Object> param = new HashMap<>(); | 
|---|
|  |  |  | param.put("barcode", barcode); | 
|---|
|  |  |  | param.put("devpNo", sourceStaNo); | 
|---|
|  |  |  | List<Map<String, Object>> list = new ArrayList<>(); | 
|---|
|  |  |  | for (WaitPakin waitPakin : waitPakins) { | 
|---|
|  |  |  | Map<String, Object> mat = new HashMap<>(); | 
|---|
|  |  |  | mat.put("matNo", waitPakin.getMatnr()); | 
|---|
|  |  |  | mat.put("count", waitPakin.getAnfme()); | 
|---|
|  |  |  | list.add(mat); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | param.put("list", list); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String response = new HttpHandler.Builder() | 
|---|
|  |  |  | .setUri(SystemProperties.WMS_URL) | 
|---|
|  |  |  | .setPath("/full/store/put/start") | 
|---|
|  |  |  | .setJson(JSON.toJSONString(param)) | 
|---|
|  |  |  | .build() | 
|---|
|  |  |  | .doPost(); | 
|---|
|  |  |  | } catch (IOException e) { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return true; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|