|
@@ -889,8 +889,8 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
List<BomProcedureTray> procedureTrayList =
|
|
List<BomProcedureTray> procedureTrayList =
|
|
|
- procedureTrayService.list(Wraps.<BomProcedureTray>lbQ().eq(BomProcedureTray::getGroupId,
|
|
|
|
|
- task.getProcedureTrayGroupId()));
|
|
|
|
|
|
|
+ procedureTrayService.list(Wraps.<BomProcedureTray>lbQ().eq(BomProcedureTray::getProcedureId,
|
|
|
|
|
+ task.getProcedureId()));
|
|
|
List<TTaskStockUniqueCode> stockUniqueCodeList = new ArrayList<TTaskStockUniqueCode>();
|
|
List<TTaskStockUniqueCode> stockUniqueCodeList = new ArrayList<TTaskStockUniqueCode>();
|
|
|
TWorkpiece currWorkpiece = workpieceService.getWorkPiece(taskNode.getId());
|
|
TWorkpiece currWorkpiece = workpieceService.getWorkPiece(taskNode.getId());
|
|
|
List<StockInfo> stockInfoList = this.getConnectTray(procedureTrayList, currWorkpiece.getIsReload());
|
|
List<StockInfo> stockInfoList = this.getConnectTray(procedureTrayList, currWorkpiece.getIsReload());
|
|
@@ -1874,7 +1874,6 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
|
|
|
* @param callBackJson
|
|
* @param callBackJson
|
|
|
*/
|
|
*/
|
|
|
public R<String> demoLineStock(TaskNode taskNode, TTask task, JSONObject callBackJson, TWorkpiece currWorkpiece) {
|
|
public R<String> demoLineStock(TaskNode taskNode, TTask task, JSONObject callBackJson, TWorkpiece currWorkpiece) {
|
|
|
-
|
|
|
|
|
//没有回传参数,直接不需要出入库操作
|
|
//没有回传参数,直接不需要出入库操作
|
|
|
String stockType = callBackJson.getString(DemoLineConstant.DEMOLINE_STOCK_TYPE);
|
|
String stockType = callBackJson.getString(DemoLineConstant.DEMOLINE_STOCK_TYPE);
|
|
|
//如果没有起始、终点,则不需要出入库处理
|
|
//如果没有起始、终点,则不需要出入库处理
|
|
@@ -1923,8 +1922,21 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
|
|
|
// 毛料出库
|
|
// 毛料出库
|
|
|
if (meterialList != null && meterialList.size() > 0) {
|
|
if (meterialList != null && meterialList.size() > 0) {
|
|
|
|
|
|
|
|
|
|
+ //List<StockInfo> trayList = stockInfoService.list(new LbqWrapper<StockInfo>().eq(StockInfo::getStorgeId, ));
|
|
|
R<String> ckresult = stockInfoService.meterialStockOut(meterialList.get(0),
|
|
R<String> ckresult = stockInfoService.meterialStockOut(meterialList.get(0),
|
|
|
Long.parseLong(srcStorgeId), task.getCompleteBatchNo());
|
|
Long.parseLong(srcStorgeId), task.getCompleteBatchNo());
|
|
|
|
|
+
|
|
|
|
|
+ List<BomProcedureTray> trayList =
|
|
|
|
|
+ procedureTrayService.list(Wraps.<BomProcedureTray>lbQ().eq(BomProcedureTray::getProcedureId,
|
|
|
|
|
+ task.getProcedureId()).orderByAsc(BomProcedureTray::getBizType));
|
|
|
|
|
+ if (trayList != null && trayList.size() > 0) {
|
|
|
|
|
+ //毛料出库 清空子盘工装的批次信息
|
|
|
|
|
+ List<StockInfo> stockInfoList = this.getConnectTray(trayList, currWorkpiece.getIsReload());
|
|
|
|
|
+ stockInfoList.stream().forEach(stockInfo -> {
|
|
|
|
|
+ stockInfo.setCompleteBatchNo("");
|
|
|
|
|
+ });
|
|
|
|
|
+ stockInfoService.saveBatch(stockInfoList);
|
|
|
|
|
+ }
|
|
|
return ckresult;
|
|
return ckresult;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -1939,8 +1951,8 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
List<BomProcedureTray> trayList =
|
|
List<BomProcedureTray> trayList =
|
|
|
- procedureTrayService.list(Wraps.<BomProcedureTray>lbQ().eq(BomProcedureTray::getGroupId,
|
|
|
|
|
- task.getProcedureTrayGroupId()).orderByAsc(BomProcedureTray::getBizType));
|
|
|
|
|
|
|
+ procedureTrayService.list(Wraps.<BomProcedureTray>lbQ().eq(BomProcedureTray::getProcedureId,
|
|
|
|
|
+ task.getProcedureId()).orderByAsc(BomProcedureTray::getBizType));
|
|
|
R<String> result = null;
|
|
R<String> result = null;
|
|
|
if (trayList != null && trayList.size() > 0) {
|
|
if (trayList != null && trayList.size() > 0) {
|
|
|
List<StockInfo> stockInfoList = this.getConnectTray(trayList, currWorkpiece.getIsReload());
|
|
List<StockInfo> stockInfoList = this.getConnectTray(trayList, currWorkpiece.getIsReload());
|
|
@@ -1975,8 +1987,8 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
|
|
|
// List<BomProcedureTray> trayList = procedureTrayService.list(Wraps.<BomProcedureTray>lbQ().eq
|
|
// List<BomProcedureTray> trayList = procedureTrayService.list(Wraps.<BomProcedureTray>lbQ().eq
|
|
|
// (BomProcedureTray::getId,task.ge()));
|
|
// (BomProcedureTray::getId,task.ge()));
|
|
|
List<BomProcedureTray> trayList =
|
|
List<BomProcedureTray> trayList =
|
|
|
- procedureTrayService.list(Wraps.<BomProcedureTray>lbQ().eq(BomProcedureTray::getGroupId,
|
|
|
|
|
- task.getProcedureTrayGroupId()).orderByAsc(BomProcedureTray::getBizType));
|
|
|
|
|
|
|
+ procedureTrayService.list(Wraps.<BomProcedureTray>lbQ().eq(BomProcedureTray::getProcedureId,
|
|
|
|
|
+ task.getProcedureId()).orderByAsc(BomProcedureTray::getBizType));
|
|
|
R<String> result = null;
|
|
R<String> result = null;
|
|
|
if (trayList != null && trayList.size() > 0) {
|
|
if (trayList != null && trayList.size() > 0) {
|
|
|
List<StockInfo> stockInfoList = this.getConnectTray(trayList, currWorkpiece.getIsReload());
|
|
List<StockInfo> stockInfoList = this.getConnectTray(trayList, currWorkpiece.getIsReload());
|
|
@@ -2005,8 +2017,8 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
|
|
|
ckresult.getData(), task.getCompleteBatchNo());
|
|
ckresult.getData(), task.getCompleteBatchNo());
|
|
|
}
|
|
}
|
|
|
List<BomProcedureTray> trayList =
|
|
List<BomProcedureTray> trayList =
|
|
|
- procedureTrayService.list(Wraps.<BomProcedureTray>lbQ().eq(BomProcedureTray::getGroupId,
|
|
|
|
|
- task.getProcedureTrayGroupId()).orderByAsc(BomProcedureTray::getBizType));
|
|
|
|
|
|
|
+ procedureTrayService.list(Wraps.<BomProcedureTray>lbQ().eq(BomProcedureTray::getProcedureId,
|
|
|
|
|
+ task.getProcedureId()).orderByAsc(BomProcedureTray::getBizType));
|
|
|
R<String> result = null;
|
|
R<String> result = null;
|
|
|
if (trayList != null && trayList.size() > 0) {
|
|
if (trayList != null && trayList.size() > 0) {
|
|
|
List<StockInfo> stockInfoList = this.getConnectTray(trayList, currWorkpiece.getIsReload());
|
|
List<StockInfo> stockInfoList = this.getConnectTray(trayList, currWorkpiece.getIsReload());
|
|
@@ -2044,8 +2056,8 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
|
|
|
ckresult.getData(), task.getCompleteBatchNo());
|
|
ckresult.getData(), task.getCompleteBatchNo());
|
|
|
}
|
|
}
|
|
|
List<BomProcedureTray> trayList =
|
|
List<BomProcedureTray> trayList =
|
|
|
- procedureTrayService.list(Wraps.<BomProcedureTray>lbQ().eq(BomProcedureTray::getGroupId,
|
|
|
|
|
- task.getProcedureTrayGroupId()).orderByAsc(BomProcedureTray::getBizType));
|
|
|
|
|
|
|
+ procedureTrayService.list(Wraps.<BomProcedureTray>lbQ().eq(BomProcedureTray::getProcedureId,
|
|
|
|
|
+ task.getProcedureId()).orderByAsc(BomProcedureTray::getBizType));
|
|
|
R<String> result = null;
|
|
R<String> result = null;
|
|
|
if (trayList != null && trayList.size() > 0) {
|
|
if (trayList != null && trayList.size() > 0) {
|
|
|
List<StockInfo> stockInfoList = this.getConnectTray(trayList, currWorkpiece.getIsReload());
|
|
List<StockInfo> stockInfoList = this.getConnectTray(trayList, currWorkpiece.getIsReload());
|
|
@@ -2087,8 +2099,8 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
List<BomProcedureTray> trayList =
|
|
List<BomProcedureTray> trayList =
|
|
|
- procedureTrayService.list(Wraps.<BomProcedureTray>lbQ().eq(BomProcedureTray::getGroupId,
|
|
|
|
|
- task.getProcedureTrayGroupId()).orderByAsc(BomProcedureTray::getBizType));
|
|
|
|
|
|
|
+ procedureTrayService.list(Wraps.<BomProcedureTray>lbQ().eq(BomProcedureTray::getProcedureId,
|
|
|
|
|
+ task.getProcedureId()).orderByAsc(BomProcedureTray::getBizType));
|
|
|
R<String> result = null;
|
|
R<String> result = null;
|
|
|
if (trayList != null && trayList.size() > 0) {
|
|
if (trayList != null && trayList.size() > 0) {
|
|
|
List<StockInfo> stockInfoList = this.getConnectTray(trayList, currWorkpiece.getIsReload());
|
|
List<StockInfo> stockInfoList = this.getConnectTray(trayList, currWorkpiece.getIsReload());
|
|
@@ -2778,9 +2790,9 @@ planId));
|
|
|
private List<StockInfo> getConnectTray(List<BomProcedureTray> bomProcedureTrayList, int isReload){
|
|
private List<StockInfo> getConnectTray(List<BomProcedureTray> bomProcedureTrayList, int isReload){
|
|
|
List<StockInfo> stockInfoList = null;
|
|
List<StockInfo> stockInfoList = null;
|
|
|
List<Long> trayIds = bomProcedureTrayList.stream().map(tray->tray.getTrayId()).collect(Collectors.toList());
|
|
List<Long> trayIds = bomProcedureTrayList.stream().map(tray->tray.getTrayId()).collect(Collectors.toList());
|
|
|
- stockInfoList = stockInfoService.list(new LbqWrapper<StockInfo>().in(StockInfo::getGoodsId, trayIds).orderByAsc(StockInfo::getGoodsType));
|
|
|
|
|
|
|
+ stockInfoList = stockInfoService.list(new LbqWrapper<StockInfo>().in(StockInfo::getGoodsId, trayIds).in(StockInfo::getGoodsType, "1,2").last("limit 2").orderByAsc(StockInfo::getGoodsType));
|
|
|
|
|
|
|
|
- if(CollectionUtil.isNotEmpty(stockInfoList) && stockInfoList.size()==2) {
|
|
|
|
|
|
|
+ if(CollectionUtil.isNotEmpty(stockInfoList)) {
|
|
|
boolean bool = stockInfoList.get(0).getStorgeId().equals(stockInfoList.get(1).getStorgeId());
|
|
boolean bool = stockInfoList.get(0).getStorgeId().equals(stockInfoList.get(1).getStorgeId());
|
|
|
if (!bool) {
|
|
if (!bool) {
|
|
|
//已经换装,以工装作为点位参考
|
|
//已经换装,以工装作为点位参考
|
|
@@ -2795,37 +2807,4 @@ planId));
|
|
|
return stockInfoList;
|
|
return stockInfoList;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- * 立库获取终点位置,取空库位的数据
|
|
|
|
|
- * @return
|
|
|
|
|
- */
|
|
|
|
|
- private long getLikuStockInList(){
|
|
|
|
|
- List <StockInfo> returnList = null;
|
|
|
|
|
-
|
|
|
|
|
- List<Productionresource> productionresources = productionresourceBizMapper.selectList(Wraps.<Productionresource>lbQ().like(Productionresource::getCode,DictionaryKey.YJ_ZONE_XBK.get("plateAndClamp")));
|
|
|
|
|
- List<Long> productionresourceIds = productionresources.stream().map(t->t.getId()).collect(Collectors.toList());
|
|
|
|
|
-
|
|
|
|
|
- if(CollectionUtil.isEmpty(productionresourceIds)){
|
|
|
|
|
- return -1;
|
|
|
|
|
- }
|
|
|
|
|
- String resourceIds = "";
|
|
|
|
|
- for(int i = 0; i < productionresourceIds.size(); i++){
|
|
|
|
|
- if(i == productionresourceIds.size() - 1){
|
|
|
|
|
- resourceIds = resourceIds + productionresourceIds.get(i);
|
|
|
|
|
- }else{
|
|
|
|
|
- resourceIds = resourceIds + productionresourceIds.get(i)+ ",";
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- Map queryMap = new HashMap();
|
|
|
|
|
- queryMap.put("resourceIds",resourceIds);
|
|
|
|
|
-
|
|
|
|
|
- // 判断夹具是否有可用的,查询330个库位信息中是否还有夹具
|
|
|
|
|
-
|
|
|
|
|
- List<Long> allStockList = stockInfoMapper.getAvailableStorge(queryMap);
|
|
|
|
|
- if(allStockList.size() > 0){
|
|
|
|
|
- return allStockList.get(0);
|
|
|
|
|
- }else{
|
|
|
|
|
- return -1;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|