Commit 02cf8701 zshaohui

1.解析条码时 重新设置完整条码

2.增加料串流走,通知服务器接口
3.推送入料串/出料串,入料箱/出料箱,料盘入库/料盘出库信息到中控
1 个父辈 1eb34d4e
......@@ -198,6 +198,15 @@ public class CodeResolve {
barcode.setAmount(barcodeFromRule.getLabelAmount());
needUpdate = true;
}
String newFullCode = barcodeFromRule.getFullCode();
String oldFullCode = barcode.getFullCode();
if (!newFullCode.equals(oldFullCode)){
log.info("旧的完整条码为:"+oldFullCode+",新的完成条码为:"+newFullCode+",需要更新");
barcode.setFullCode(newFullCode);
needUpdate = true;
}
if(needUpdate){
try {
barcode = barcodeManager.save(barcode);
......
......@@ -325,7 +325,7 @@ public class OrderController {
public OrderDto detial(@RequestParam(required = false) String id, @RequestParam(required = false) String orderNo,
@RequestParam(required = false) String warehouseCode,@RequestParam(required = false) String brand) {
List<LiteOrderItem> lackItemList = liteOrderCache.getLackItems(liteOrderCache.getAllLiteOrder());
List<LiteOrderItem> lackItemList = new ArrayList<>();
if (!ObjectUtils.isEmpty(id)) {
LiteOrder liteOrder = liteOrderManager.get(id);
......
......@@ -34,6 +34,7 @@ import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.bean.*;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.bean.dto.ValidBin;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.enums.LiteorderCheckType;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.enums.TaskCurrentLoc;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.kafka.service.KafkaService;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.util.BinCacheUtil;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.util.BoxHandleUtil;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.util.MaterialUtil;
......@@ -93,6 +94,9 @@ public class CDeviceController {
@Autowired
private ILiteOrderManager liteOrderManager;
@Autowired
private KafkaService kafkaService;
@ApiOperation("获取料盘尺寸信息")
@RequestMapping("/partNumberComponent")
......@@ -306,6 +310,9 @@ public class CDeviceController {
inPos.setBarcode(boxBarcode);
storagePosManager.save(inPos);
}
kafkaService.sendMachineParameterStackerAndBox(materialStr,currentLoc,barcode.getAmount(),boxBarcode.getBarcode(),0,1);
return ResultBean.newOkResult("");
}
}
......@@ -371,6 +378,8 @@ public class CDeviceController {
//清空入料线体缓存
RawInLineUtil.clearInLineStacker(materialStr);
kafkaService.sendMachineParameterStackerAndBox(materialStr, "", 0, "", 0, 2);
return ResultBean.newOkResult("");
}
......@@ -454,6 +463,9 @@ public class CDeviceController {
Storage storage = dataCache.getStorageById(pos.getStorageId());
DataLog dataLog = taskService.addPutInTaskToExecute(storage, boxBarcode, pos, boxLoc);
kafkaService.sendMachineParameterStackerAndBox("","",0,boxBarcode.getBarcode(),0,3);
return ResultBean.newOkResult(dataLog);
}
......@@ -709,6 +721,7 @@ public class CDeviceController {
resultMap.put("barcode",barcode.getBarcode());
resultMap.put("pickingId",orderNo);
kafkaService.sendMachineParameterStackerAndBox(materialStr,currentLoc,0,boxBarcode.getBarcode(),barcode.getAmount(),4);
return ResultBean.newOkResult(resultMap);
}
......@@ -1095,6 +1108,14 @@ public class CDeviceController {
return ResultBean.newOkResult("");
}
@ApiOperation("料串离开出料工位")
@RequestMapping("/starckerLeaveOutStation")
@AnonymousAccess
public ResultBean starckerLeaveOutStation(String stacker) {
kafkaService.sendMachineParameterStackerAndBox(stacker, "", 0, "", 0, 6);
return ResultBean.newOkResult("");
}
private void generatePutInTask(Barcode barcode, Barcode boxBarcode,String status,String currentLoc) {
......
......@@ -590,6 +590,7 @@ public class CtuDeviceController {
resultMap.put("loc", currentLoc);
resultMap.put("type", type);
resultMap.put("outMap", outMap);
resultList.add(resultMap);
}
return ResultBean.newOkResult(resultList);
......
package com.neotel.smfcore.custom.luxsan.factory_c.rawstor.kafka.bean;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class BoxKafkaCache {
private String machineId;
private String box;
private String putInDateStr;
private String checkOutDateStr;
private int totalAmount;
}
package com.neotel.smfcore.custom.luxsan.factory_c.rawstor.kafka.bean;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class StackerKafkaCache {
private String machineId;
private String box;
private String stacker;
private String putInDateStr;
private String checkOutDateStr;
private int totalAmount;
}
......@@ -421,7 +421,7 @@ public class BinCacheUtil {
if (canPutIn.isEmpty()) {
validBinList.add(binId);
} else {
//log.info(canPutIn);
log.info(stackerBarcode.getBarcode()+"对应的料格不可用:"+binId+",原因是:"+canPutIn);
}
}
}
......
......@@ -15,6 +15,7 @@ import com.neotel.smfcore.core.storage.service.po.StoragePos;
import com.neotel.smfcore.core.system.service.po.DataLog;
import com.neotel.smfcore.core.system.util.TaskService;
import com.neotel.smfcore.custom.luxsan.factory_c.common.util.CacheNameUtil;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.kafka.service.KafkaService;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.util.BoxHandleUtil;
import com.neotel.smfcore.security.annotation.AnonymousAccess;
import io.swagger.annotations.Api;
......@@ -50,6 +51,9 @@ public class ManualLineController {
@Autowired
private IStoragePosManager storagePosManager;
@Autowired
private KafkaService kafkaService;
//人工分拣线体工位定时(1秒)将工位状态通知SMF, 若工位无料箱, boxCode传空值.
@ApiOperation("人工分拣线体工位定时状态通知")
......@@ -199,6 +203,9 @@ public class ManualLineController {
log.info(boxStr + "入库到智能仓,分配的储位为:" + pos.getPosName());
DataLog dataLog = taskService.addPutInTaskToExecute(storage, boxBarcode, pos, lineNo + "_out");
kafkaService.sendMachineParameterStackerAndBox("",lineNo,0,boxBarcode.getBarcode(),0,5);
return ResultBean.newOkResult("");
}
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!