Commit b26ce83a zshaohui

931单据转库 和 单据退料 接口修改

1 个父辈 5c485c6c
......@@ -376,6 +376,8 @@ public class Barcode extends BasePo implements Serializable {
//记录序列号
private int seq = 0;
//标签码
private String labelId = "";
private Map<String,Integer> heightMap = new HashMap<>();
......
......@@ -11,7 +11,6 @@ import com.neotel.smfcore.common.utils.StringUtils;
import com.neotel.smfcore.core.api.listener.DefaultSmfApiListener;
import com.neotel.smfcore.core.barcode.service.po.Barcode;
import com.neotel.smfcore.core.storage.service.manager.IStoragePosManager;
import com.neotel.smfcore.core.storage.service.po.StoragePos;
import com.neotel.smfcore.core.system.service.po.DataLog;
import com.neotel.smfcore.custom.luxsan.api.bean.request.*;
import com.neotel.smfcore.custom.luxsan.api.bean.result.*;
......@@ -1041,6 +1040,23 @@ public class LuxsanApi extends DefaultSmfApiListener {
}
public static void ticketPick(TicketPickRequest request) {
log.info("ticketPick接口请求参数为:" + JSON.toJSONString(request)+",地址为:"+ticketPickUrl);
try {
String resultStr = HttpHelper.postJson(ticketPickUrl, request);
log.info("ticketPick接口返回为:" + resultStr);
LuxsanApiResult apiResult = JSONObject.parseObject(resultStr, LuxsanApiResult.class);
if (LuxsanApiEnum.ERROR.equals(apiResult.getMSGTY())) {
throw new ValidateException("smfcore.api.error", "接口请求失败[{0}]", new String[]{apiResult.getMSGTX()});
}
} catch (ApiException e) {
e.printStackTrace();
throw new ValidateException("smfcore.api.error", "接口请求失败[{0}]", new String[]{e.getMessage()});
}
}
@Override
public void outTaskStatusChange(String outNotifyUrl, DataLog task) {
//pickingIssue(new PickingIssueRequest());
......@@ -1327,4 +1343,11 @@ public class LuxsanApi extends DefaultSmfApiListener {
public void setBoxNGsnListUrl(String url){
LuxsanApi.getBoxNGsnListUrl = url;
}
public static String ticketPickUrl;
@Value("${api.ticketPick}")
public void setTicketPickUrl(String url){
LuxsanApi.ticketPickUrl = url;
}
}
package com.neotel.smfcore.custom.luxsan.api.bean.request;
import lombok.Data;
import java.util.List;
@Data
public class TicketPickLabelList {
private String LABEL_ID;
private List<String> REEL_LIST;
}
package com.neotel.smfcore.custom.luxsan.api.bean.request;
import lombok.Data;
import java.util.List;
@Data
public class TicketPickRequest {
private String PLANT_CODE;
private String TICKET_CODE;
private String TICKET_ITEM;
private int QTY;
private String BIN_CODE;
private List<TicketPickLabelList> LABEL_LIST;
}
package com.neotel.smfcore.custom.luxsan.api.bean.request;
package com.neotel.smfcore.custom.luxsan.api.bean.result;
import lombok.Data;
......
......@@ -4,5 +4,20 @@ import lombok.Data;
@Data
public class TicketUpResult {
private String PLANT_CODE;
private String LABEL_ID;
private String MATERIAL_CODE;
private String WAREHOUSE_CODE;
private int LABEL_QTY;
private String VENDOR_CODE;
private String VENDOR_NAME;
private String VERSION; // 如果VERSION可以是null,则可能需要使用Integer而不是int
private String GR_DATE; // 假设这是日期类型
private String TRAN_DATE; // 假设这也是日期类型
private int STATUS;
private String KEEPER_CODE;
private String BRAND;
private String UNIT;
private String BATCH_CODE;
private String MATERIAL_TYPE;
}
......@@ -27,6 +27,8 @@ import com.neotel.smfcore.custom.lizhen.agvBox.util.BoxUtil;
import com.neotel.smfcore.custom.luxsan.api.LuxsanApi;
import com.neotel.smfcore.custom.luxsan.api.bean.request.*;
import com.neotel.smfcore.custom.luxsan.api.bean.result.BinMoveResult;
import com.neotel.smfcore.custom.luxsan.api.bean.result.NewLabelToCellResult;
import com.neotel.smfcore.custom.luxsan.api.bean.result.TicketUpResult;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.bean.BindGrInfo;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.bean.StorTransfer;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.bean.TicketReturn;
......@@ -203,17 +205,18 @@ public class CDeviceController {
if (BinCacheUtil.canPutInBinCode(binCodeStr, warhouseCode)) {
//绑定gr
if (MaterialUtil.bindGr(materialStr)){
if (MaterialUtil.bindGr(materialStr)) {
BindGrInfo bindGrInfo = MaterialUtil.getBindGrInfo(materialStr);
LuxsanApi.newLabelToCell(new NewLabelToCellRequest(
NewLabelToCellResult cell = LuxsanApi.newLabelToCell(new NewLabelToCellRequest(
CommonUtil.plantCode,
Arrays.asList(bindGrInfo.getUdCode()),
barcode.getAmount(),
binCodeStr,Arrays.asList(barcode.getFullCode())
binCodeStr, Arrays.asList(barcode.getFullCode())
));
//将GR日期设置为生产日期
Date grDate = DateUtil.getNoTimeDate(bindGrInfo.getGrDate());
barcode.setProduceDate(grDate);
barcode.setLabelId(cell.getLABEL_ID());
}
//储位移转
......@@ -223,18 +226,34 @@ public class CDeviceController {
Date grDate = DateUtil.getNoTimeDate(binMoveResult.getGR_DATE());
barcode.setProduceDate(grDate);
}
barcode.setLabelId(binMoveResult.getLABEL_ID());
}
//单据转库
else if (MaterialUtil.ticketTransfer(materialStr)){
//311单据转库
else if (MaterialUtil.ticketTransfer(materialStr)) {
TicketTransfer transfer = MaterialUtil.getTicketTransferInfo(materialStr);
LuxsanApi.ticketMove(new TicketMoveRequest(CommonUtil.plantCode,transfer.getTicket(),transfer.getTicketItem(),binCodeStr,Arrays.asList(barcode.getBarcode())));
TicketPickRequest request = new TicketPickRequest();
request.setPLANT_CODE(CommonUtil.plantCode);
request.setTICKET_CODE(transfer.getTicket());
request.setTICKET_ITEM(transfer.getTicketItem());
request.setQTY(barcode.getAmount());
request.setBIN_CODE(binCodeStr);
List<TicketPickLabelList> labelList = new ArrayList<>();
TicketPickLabelList tickPick = new TicketPickLabelList();
tickPick.setREEL_LIST(Arrays.asList(barcode.getBarcode()));
tickPick.setLABEL_ID(barcode.getLabelId());
labelList.add(tickPick);
request.setLABEL_LIST(labelList);
LuxsanApi.ticketPick(request);
}
//单据退库上架
else if (MaterialUtil.ticketReturn(materialStr)){
TicketReturn ticketReturn = MaterialUtil.getTicketReturnInfo(materialStr);
LuxsanApi.ticketUp(new TicketUpRequest(CommonUtil.plantCode,ticketReturn.getTicket(),ticketReturn.getTicketItem(),binCodeStr,Arrays.asList(barcode.getBarcode())));
TicketUpResult ticketUp = LuxsanApi.ticketUp(new TicketUpRequest(CommonUtil.plantCode, ticketReturn.getTicket(), ticketReturn.getTicketItem(), binCodeStr, Arrays.asList(barcode.getBarcode())));
barcode.setLabelId(ticketUp.getLABEL_ID());
}
......
......@@ -9,7 +9,7 @@ import com.neotel.smfcore.core.barcode.utils.CodeResolve;
import com.neotel.smfcore.core.device.util.DataCache;
import com.neotel.smfcore.custom.luxsan.api.LuxsanApi;
import com.neotel.smfcore.custom.luxsan.api.bean.request.BrandQtyRequest;
import com.neotel.smfcore.custom.luxsan.api.bean.request.BrandQtyResult;
import com.neotel.smfcore.custom.luxsan.api.bean.result.BrandQtyResult;
import com.neotel.smfcore.custom.luxsan.api.bean.request.QueryGrRequest;
import com.neotel.smfcore.custom.luxsan.api.bean.request.QueryGrStatusRequest;
import com.neotel.smfcore.custom.luxsan.api.bean.result.QueryGrResult;
......
......@@ -8,7 +8,7 @@ import com.neotel.smfcore.core.barcode.utils.CodeResolve;
import com.neotel.smfcore.core.device.util.DataCache;
import com.neotel.smfcore.custom.luxsan.api.LuxsanApi;
import com.neotel.smfcore.custom.luxsan.api.bean.request.BrandQtyRequest;
import com.neotel.smfcore.custom.luxsan.api.bean.request.BrandQtyResult;
import com.neotel.smfcore.custom.luxsan.api.bean.result.BrandQtyResult;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.bean.StorTransfer;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.util.MaterialUtil;
import com.neotel.smfcore.custom.luxsan.factory_c.common.util.CacheNameUtil;
......
......@@ -14,7 +14,7 @@ import com.neotel.smfcore.core.order.service.po.LiteOrder;
import com.neotel.smfcore.core.order.service.po.LiteOrderItem;
import com.neotel.smfcore.custom.luxsan.api.LuxsanApi;
import com.neotel.smfcore.custom.luxsan.api.bean.request.BrandQtyRequest;
import com.neotel.smfcore.custom.luxsan.api.bean.request.BrandQtyResult;
import com.neotel.smfcore.custom.luxsan.api.bean.result.BrandQtyResult;
import com.neotel.smfcore.custom.luxsan.api.bean.request.FetchMoveTicketRequest;
import com.neotel.smfcore.custom.luxsan.api.bean.result.FetchMoveTicketResult;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.bean.TicketReturn;
......
......@@ -160,10 +160,13 @@ api:
shipCancelUpshelf: http://10.68.30.22:8082/api/mlb/ShipCancelUpshelf
#单据退库上架
ticketUp: http://10.68.30.22:8082/api/mlb/TicketUp
ticketUp: http://10.68.30.22:8082/api/mlb/ticketLabelToCell
#自动仓内单据转库
ticketMove: http://10.42.220.171:8082/api/mlb/TicketMove
ticketMove: http://10.68.30.22:8082/api/mlb/TicketMove
#获取箱内NGSN列表
getBoxNGsnListUrl: http://10.68.25.30:8000/mesoffline/GetBoxNgSnList
#原料单据备料
ticketPick: http://10.68.30.22:8082/api/mlb/TicketPick
......@@ -160,10 +160,13 @@ api:
shipCancelUpshelf: http://10.42.220.171:8082/api/mlb/ShipCancelUpshelf
#单据退库上架
ticketUp: http://10.42.220.171:8082/api/mlb/TicketUp
ticketUp: http://10.42.220.171:8082/api/mlb/ticketLabelToCell
#自动仓内单据转库
ticketMove: http://10.42.220.171:8082/api/mlb/TicketMove
#获取箱内NGSN列表
getBoxNGsnListUrl: http://10.68.25.30:8000/mesoffline/GetBoxNgSnList
#原料单据备料
ticketPick: http://10.42.220.171:8082/api/mlb/TicketPick
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!