|
@@ -1,5 +1,6 @@
|
|
|
package com.sd.business.service.work.impl;
|
|
|
|
|
|
+import cn.hutool.core.util.ArrayUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
@@ -295,7 +296,7 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
|
|
|
*/
|
|
|
private void scheduling(Long bomSpecId, Long printingPaperBomSpecId, List<OrderSku> list, Map<Long, SkuSpec> skuSpecMap) {
|
|
|
|
|
|
- if (ObjectUtil.isNotEmpty(list)) {
|
|
|
+ if (ObjectUtil.isEmpty(list)) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -328,7 +329,7 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
|
|
|
private void fixationScheduling(Long bomSpecId, Long printingPaperBomSpecId,
|
|
|
List<OrderSku> list, Map<Long, SkuSpec> skuSpecMap) {
|
|
|
|
|
|
- if (ObjectUtil.isNotEmpty(list)) {
|
|
|
+ if (ObjectUtil.isEmpty(list)) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -452,7 +453,7 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
|
|
|
private void notFixationScheduling(Long bomSpecId, Long printingPaperBomSpecId, List<OrderSku> list,
|
|
|
Map<Long, SkuSpec> skuSpecMap, boolean carpeting) {
|
|
|
|
|
|
- if (ObjectUtil.isNotEmpty(list)) {
|
|
|
+ if (ObjectUtil.isEmpty(list)) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -472,6 +473,10 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
|
|
|
return itemList.stream();
|
|
|
}).toArray(Item[]::new);
|
|
|
|
|
|
+ if (items.length > 430) {
|
|
|
+ items = ArrayUtil.resize(items, 430);
|
|
|
+ }
|
|
|
+
|
|
|
Solution solve = GA.solve(MaterialsConstant.MASTER_LENGTH, MaterialsConstant.MASTER_WIDTH, items);
|
|
|
|
|
|
List<PlaceItem> placeItemList = solve.getPlaceItemList();
|
|
@@ -598,7 +603,7 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
|
|
|
.selectAll(OrderSku.class)
|
|
|
.from(OrderInfo.class)
|
|
|
.innerJoin(OrderSku.class, OrderSku::getOrderId, OrderInfo::getId)
|
|
|
- .eq(OrderInfo::getExceptionType, OrderExceptionTypeEnum.NORMAL)
|
|
|
+ .eq(OrderInfo::getExceptionType, OrderExceptionTypeEnum.NORMAL.getKey())
|
|
|
.eq(OrderSku::getCompleteScheduling, StatusConstant.NO)
|
|
|
.eq(OrderSku::getBomSpecId, bomSpecId)
|
|
|
.eq(OrderSku::getPrintingPaperBomSpecId, printingPaperBomSpecId)
|
|
@@ -645,14 +650,14 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
|
|
|
InOutStorageBom master = new InOutStorageBom();
|
|
|
master.setBomSpecId(workOrder.getMasterBomSpecId());
|
|
|
master.setQuantity(BigDecimal.ONE);
|
|
|
- master.setMeter(workOrder.getMasterLength());
|
|
|
+ master.setMeter(workOrder.getMasterLength().divide(new BigDecimal("100")));
|
|
|
inOutStorageBomList.add(master);
|
|
|
|
|
|
// 打印纸
|
|
|
InOutStorageBom printingPaper = new InOutStorageBom();
|
|
|
printingPaper.setBomSpecId(workOrder.getPrintingPaperBomSpecId());
|
|
|
printingPaper.setQuantity(BigDecimal.ONE);
|
|
|
- printingPaper.setMeter(workOrder.getPrintingPaperLength());
|
|
|
+ printingPaper.setMeter(workOrder.getPrintingPaperLength().divide(new BigDecimal("100")));
|
|
|
inOutStorageBomList.add(printingPaper);
|
|
|
|
|
|
inStorageService.add(inOutStorageDto);
|