Commit 5f3615fb zshaohui

1.UID出库 接口拆分

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