Commit 3c04a6ac LN

转储入库bug修改

1 个父辈 5b26cb19
......@@ -376,27 +376,32 @@ public class NLPShelfHandler extends BaseDeviceHandler{
log.error(msg);
WebSocketServer.sendMsg("",new SocketMsg(msg, MsgType.INFO,"smfclient.nlp.inputOk",new String[]{queueTask.getBarcode(),pos.getPosName()}));
try {
//判断是否是入库单入库
if (queueTask.getInType() == 5) {
InList inList = inListCache.getInList(queueTask.getSourceName());
Barcode barcode = barcodeManager.findByBarcode(queueTask.getBarcode());
InListItem item = inListCache.UpdateInList(queueTask.getSourceName(), pos, barcode);
if (item != null) {
//入库完成,调用 7.2转储单入库过账接口
TransferOrderInInfo inInfo = new TransferOrderInInfo(inList.getName(), inList.getDocType(), queueTask.getBarcode(), item.getBaseCode(), item.getInLgort(), queueTask.getNum());
boolean result = HikApi.transferOrderInApi(queueTask.getOperator(), inInfo);
}
} else {
//入库完成,调用 7.5入库上架过账接口
boolean result = HikApi.putInApi(queueTask.getOperator(), InOutApiInfo.inputInfo(queueTask.getInType(), queueTask.getBarcode(), queueTask.getNum()));
//判断是否是入库单入库
if(queueTask.getInType()==5){
InList inList=inListCache.getInList(queueTask.getSourceName());
InListItem item= inListCache.UpdateInList(queueTask.getSourceName(),pos,pos.getBarcode());
if(item!=null){
//入库完成,调用 7.2转储单入库过账接口
TransferOrderInInfo inInfo=new TransferOrderInInfo(inList.getName(),inList.getDocType(),queueTask.getBarcode(),item.getBaseCode(),item.getInLgort(),queueTask.getNum());
boolean result= HikApi.transferOrderInApi(queueTask.getOperator(), inInfo);
}
}else{
//入库完成,调用 7.5入库上架过账接口
boolean result= HikApi.putInApi(queueTask.getOperator(), InOutApiInfo.inputInfo(queueTask.getInType(),queueTask.getBarcode(),queueTask.getNum()));
} catch (Exception e) {
log.error("入库完成接口处理报错:", e);
return ResultBean.newErrorResult(-1, "smfcore.inputError", "入库出错:{0}", new String[]{e.getMessage()});
}
break;
} catch (Exception e) {
log.error("入库出错", e);
log.error("入库完成处理出错:", e);
return ResultBean.newErrorResult(-1, "smfcore.inputError", "入库出错:{0}", new String[]{e.getMessage()});
}
}
......
......@@ -23,7 +23,7 @@ public class InListItemDto implements Serializable {
private String name;
@ApiModelProperty(value = "物料编号")
private String PN;
private String materialNo;
@ApiModelProperty(value = "目标入库数量")
private Integer num;
......
......@@ -8,6 +8,7 @@ import lombok.NoArgsConstructor;
import org.springframework.data.mongodb.core.mapping.Document;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@Data
@Document
......@@ -73,6 +74,9 @@ public class InListItem extends BasePo implements Serializable {
public void addReelInfo(ItemReelInfo reelInfo){
if(reelLists==null){
reelLists=new ArrayList<>();
}
reelLists.add(reelInfo);
inNum+=reelInfo.getInNum();
inReelCount+=1;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!