Commit 5444868a zshaohui

1.料盒出库,取出指定料盘

2.消息列表导出修改
1 个父辈 37298b2d
...@@ -345,6 +345,9 @@ public class FileUtil extends cn.hutool.core.io.FileUtil { ...@@ -345,6 +345,9 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
} }
// 写出响应 // 写出响应
os.write(0xef);
os.write(0xbb);
os.write(0xbf);
os.write(buf.toString().getBytes("UTF-8")); os.write(buf.toString().getBytes("UTF-8"));
os.flush(); os.flush();
os.close(); os.close();
......
...@@ -463,6 +463,19 @@ public class Barcode extends BasePo implements Serializable { ...@@ -463,6 +463,19 @@ public class Barcode extends BasePo implements Serializable {
return null; return null;
} }
public Barcode getSubCode(String barcodeStr,String pnStr) {
if (subCodeList == null) {
return null;
}
for (Barcode barcode : subCodeList
) {
if (barcode.getPartNumber().equals(pnStr) && barcode.getBarcode().equals(barcodeStr)) {
return barcode;
}
}
return null;
}
public void UpdateSubCode(Barcode barcode) { public void UpdateSubCode(Barcode barcode) {
if (subCodeList == null) { if (subCodeList == null) {
......
...@@ -183,7 +183,7 @@ public class DeviceController { ...@@ -183,7 +183,7 @@ public class DeviceController {
for (DataLog dataLog : taskService.getQueueTasks()) { for (DataLog dataLog : taskService.getQueueTasks()) {
//判断是否有正在执行的任务 //判断是否有正在执行的任务
if (dataLog.isCheckOutTask()) { /*if (dataLog.isCheckOutTask()) {
String cid = dataLog.getCid(); String cid = dataLog.getCid();
Storage storage = dataCache.getStorage(cid); Storage storage = dataCache.getStorage(cid);
if (storage != null && storage.isXLC()) { if (storage != null && storage.isXLC()) {
...@@ -194,7 +194,7 @@ public class DeviceController { ...@@ -194,7 +194,7 @@ public class DeviceController {
return resultMap; return resultMap;
} }
} }
} }*/
//已经在任务当中,返回对应的信息 //已经在任务当中,返回对应的信息
if (dataLog.getBarcode().equals(barcode.getBarcode())) { if (dataLog.getBarcode().equals(barcode.getBarcode())) {
throw new ValidateException("smfcore.error.barcode.executing","条码[{0}}]任务正在执行",new String[]{barcode.getBarcode()}); throw new ValidateException("smfcore.error.barcode.executing","条码[{0}}]任务正在执行",new String[]{barcode.getBarcode()});
......
...@@ -153,12 +153,12 @@ public class MaterialBoxController { ...@@ -153,12 +153,12 @@ public class MaterialBoxController {
String code = paramMap.get("barcode");//料盒条码 String code = paramMap.get("barcode");//料盒条码
String subPN = paramMap.get("subPN");//物料条码 String subPN = paramMap.get("subPN");//物料条码
String qtyStr = paramMap.get("qty");//数量 String qtyStr = paramMap.get("qty");//数量
String subCode = paramMap.get("subCode"); //料盒中物料信息
Barcode barcode = barcodeManager.findByBarcode(code); Barcode barcode = barcodeManager.findByBarcode(code);
if (barcode == null) { if (barcode == null) {
throw new ValidateException("smfcore.materialBox.invalid", "未找到料盒信息{0}", new String[]{code}); throw new ValidateException("smfcore.materialBox.invalid", "未找到料盒信息{0}", new String[]{code});
} }
Barcode subBarcode = barcode.getSubCode(subPN); Barcode subBarcode = barcode.getSubCode(subCode, subPN);
if (subBarcode == null) { if (subBarcode == null) {
throw new ValidateException("smfcore.materialBox.noReel", "料盒中未找到对应物料"); throw new ValidateException("smfcore.materialBox.noReel", "料盒中未找到对应物料");
} }
......
...@@ -9,4 +9,6 @@ public class CheckOutDto { ...@@ -9,4 +9,6 @@ public class CheckOutDto {
private String[] pids; private String[] pids;
@ApiModelProperty("是否是单盘出库") @ApiModelProperty("是否是单盘出库")
private String singleOut; private String singleOut;
@ApiModelProperty("物料唯一码")
private String[] barcodeStrs;
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!