Commit 02cf8701 zshaohui

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

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