Commit 5f3615fb zshaohui

1.UID出库 接口拆分

2.手动入库 bug修改,库位名信息
3.看板 完成/取消 的任务 不展示
1 个父辈 3fa505cd
...@@ -163,6 +163,9 @@ public class BarcodeDto implements Serializable { ...@@ -163,6 +163,9 @@ public class BarcodeDto implements Serializable {
@Transient @Transient
private List<String> relationCodes; private List<String> relationCodes;
private boolean needExpand = false;
/** /**
* 是否是锡膏 * 是否是锡膏
*/ */
......
...@@ -133,6 +133,11 @@ public class BoxKanbanController { ...@@ -133,6 +133,11 @@ public class BoxKanbanController {
List<BoxTaskDto> dtos=new ArrayList<>(); List<BoxTaskDto> dtos=new ArrayList<>();
for (DataLog datalog : for (DataLog datalog :
allTasks) { allTasks) {
if (datalog.isFinished() || datalog.isCancel()){
continue;
}
//判断类型 //判断类型
if (criteria.getType() != null && (!criteria.getType().equals(datalog.getType()))) { if (criteria.getType() != null && (!criteria.getType().equals(datalog.getType()))) {
continue; continue;
......
...@@ -503,21 +503,30 @@ public class StoragePosController { ...@@ -503,21 +503,30 @@ public class StoragePosController {
barcodeDto.setFirstPutInDate(barcodeDto.getCreateDate()); barcodeDto.setFirstPutInDate(barcodeDto.getCreateDate());
//storagePosDto.setBarcode(barcode); //storagePosDto.setBarcode(barcode);
} }
Barcode barcode = barcodeManager.findByBarcode(barcodeDto.getBarcode()); barcodeDto.setPosName(storagePosDto.getPosName());
if (ObjectUtil.isNotNull(barcode)) { List<BarcodeDto> subCodeList = barcodeDto.getSubCodeList();
barcodeDto.setLabelId(barcode.getLabelId()); if (subCodeList != null && !subCodeList.isEmpty()){
barcodeDto.setNeedExpand(true);
barcodeDto.setSubCodeList(new ArrayList<>());
} }
} }
} }
// for (StoragePosDto storagePosDto : StoragePosDtos) {
// BarcodeDto barcode = storagePosDto.getBarcode();
// List<BarcodeDto> subCodes = Lists.newArrayList(barcode);
// barcode.setSubCodeList(subCodes);
// storagePosDto.setBarcode(barcode);
// }
return new PageData(StoragePosDtos, pages.getTotalElements()); return new PageData(StoragePosDtos, pages.getTotalElements());
} }
@ApiOperation("根据料箱号查询barcode信息")
@GetMapping("/getBarcodeInfo")
public BarcodeDto getBarcodeInfo(String boxStr) {
StoragePos pos = storagePosManager.getByBarcode(boxStr);
if (pos != null) {
StoragePosDto dto = storagePosMapper.toDto(pos);
BarcodeDto barcode = dto.getBarcode();
return barcode;
}
return null;
}
@ApiOperation("根据条件查找出库") @ApiOperation("根据条件查找出库")
@GetMapping("/out") @GetMapping("/out")
......
...@@ -256,15 +256,17 @@ public class TaskService { ...@@ -256,15 +256,17 @@ public class TaskService {
public void addTaskToExecute(DataLog taskToExecute) throws ValidateException { public void addTaskToExecute(DataLog taskToExecute) throws ValidateException {
Collection<DataLog> tasks = taskMap.values(); Collection<DataLog> tasks = taskMap.values();
for (DataLog task : tasks) { for (DataLog task : tasks) {
String barcode = taskToExecute.getBarcode(); if (!task.isFinished() && !task.isCancel()) {
String posName = taskToExecute.getPosName(); String barcode = taskToExecute.getBarcode();
if (task.getType() == taskToExecute.getType()) { String posName = taskToExecute.getPosName();
if (!Strings.isNullOrEmpty(barcode) && task.getBarcode().equals(barcode)) { if (task.getType() == taskToExecute.getType()) {
log.info("二维码:[" + barcode + "]已在操作队列中,操作失败"); if (!Strings.isNullOrEmpty(barcode) && task.getBarcode().equals(barcode)) {
throw new ValidateException("smfcore.error.barcode.inQueue", "二维码[{0}]已在操作队列中,操作失败", new String[]{barcode}); log.info("二维码:[" + barcode + "]已在操作队列中,操作失败");
} else if (task.getPosName().equals(posName) && ObjectUtil.isNotEmpty(posName)) { throw new ValidateException("smfcore.error.barcode.inQueue", "二维码[{0}]已在操作队列中,操作失败", new String[]{barcode});
log.info("位置:[" + posName + "]已在操作队列中,操作失败"); } else if (task.getPosName().equals(posName) && ObjectUtil.isNotEmpty(posName)) {
throw new ValidateException("smfcore.error.pos.inQueue", "位置:[{0}}]已在操作队列中,操作失败", new String[]{posName}); log.info("位置:[" + posName + "]已在操作队列中,操作失败");
throw new ValidateException("smfcore.error.pos.inQueue", "位置:[{0}}]已在操作队列中,操作失败", new String[]{posName});
}
} }
} }
} }
...@@ -325,6 +327,7 @@ public class TaskService { ...@@ -325,6 +327,7 @@ public class TaskService {
//从正在执行和等待列表中移除 //从正在执行和等待列表中移除
removeQueueTask(task); removeQueueTask(task);
task.setStatus(OP_STATUS.CANCEL.name()); task.setStatus(OP_STATUS.CANCEL.name());
task.setOperator(SecurityUtils.getLoginUsername());
task.setUpdateDate(new Date()); task.setUpdateDate(new Date());
updateFinishedTask(task); updateFinishedTask(task);
log.info("任务[" + task.getId() + "] posName[" + task.getPosName() + "] Reel Id[" + task.getBarcode() + "]取消成功"); log.info("任务[" + task.getId() + "] posName[" + task.getPosName() + "] Reel Id[" + task.getBarcode() + "]取消成功");
......
...@@ -208,7 +208,7 @@ public class ManualGrPutInController { ...@@ -208,7 +208,7 @@ public class ManualGrPutInController {
int w = 7; int w = 7;
int h = 8; int h = 8;
Component component = componentManager.findByPartNumberAndProvider(noDbBarcode.getPartNumber(), noDbBarcode.getProvider()); Component component = null;
if (component == null) { if (component == null) {
BrandQtyResult result = LuxsanApi.brandQtyUrl(new BrandQtyRequest(noDbBarcode.getPartNumber(), noDbBarcode.getProvider())); BrandQtyResult result = LuxsanApi.brandQtyUrl(new BrandQtyRequest(noDbBarcode.getPartNumber(), noDbBarcode.getProvider()));
if (result == null) { if (result == null) {
...@@ -391,7 +391,7 @@ public class ManualGrPutInController { ...@@ -391,7 +391,7 @@ public class ManualGrPutInController {
if (storage.isVirtual()){ if (storage.isVirtual()){
return ResultBean.newErrorResult(-1,"","料箱:"+boxStr+"所属的库位为:"+pos.getPosName()+",属于虚拟仓,请在虚拟仓页面进行操作"); return ResultBean.newErrorResult(-1,"","料箱:"+boxStr+"所属的库位为:"+pos.getPosName()+",属于虚拟仓,请在虚拟仓页面进行操作");
} }
boxBarcode.setPosName(pos.getPosName());
pos.setBarcode(boxBarcode); pos.setBarcode(boxBarcode);
storagePosManager.save(pos); storagePosManager.save(pos);
log.info(boxStr+"入库到智能仓,分配的储位为:"+pos.getPosName()); log.info(boxStr+"入库到智能仓,分配的储位为:"+pos.getPosName());
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!