|
@@ -1729,14 +1729,14 @@ public class ApsServiceImpl implements ApsService {
|
|
|
if (preprocess == null) {
|
|
|
throw new CustomException("小卷成退没有前道工序:" + operationDo.getId());
|
|
|
}
|
|
|
- planprocessrall = preprocess.getPlanprocessrall();
|
|
|
+ planprocessrall = preprocess.getPlanprocessrall()-(preprocess.getCancelrollsum() == null ? 0 : preprocess.getCancelrollsum());
|
|
|
} else {
|
|
|
planprocessrall = new BigDecimal(operationDo.getPlanprocessrall())
|
|
|
.divide(new BigDecimal("20").divide(operationDo.getSinglerollweight(), 2, BigDecimal.ROUND_HALF_UP)
|
|
|
, 2, BigDecimal.ROUND_HALF_UP).setScale(0, RoundingMode.CEILING).intValue();
|
|
|
}
|
|
|
- Integer ys = operationDo.getPlanprocessrall() % planprocessrall;
|
|
|
- Integer js = operationDo.getPlanprocessrall() / planprocessrall;
|
|
|
+ Integer ys = (operationDo.getPlanprocessrall()-operationDo.getCancelrollsum()) % planprocessrall;
|
|
|
+ Integer js = (operationDo.getPlanprocessrall()-operationDo.getCancelrollsum()) / planprocessrall;
|
|
|
for (Integer i = 0; i < planprocessrall; i++) {
|
|
|
ProductionProcesses processes = productionProcessesDetailInit(operationDo, produceOrder, optionalEquipments, outMaterDos, apsBlankOrderVo, processOperationEquDos);
|
|
|
// 已排程的作业明细数据保持ID不变
|
|
@@ -1812,10 +1812,10 @@ public class ApsServiceImpl implements ApsService {
|
|
|
.divide(new BigDecimal("20").divide(operationDo.getSinglerollweight(), 2, BigDecimal.ROUND_HALF_UP)
|
|
|
, 2, BigDecimal.ROUND_HALF_UP).setScale(0, RoundingMode.CEILING).intValue();
|
|
|
} else {
|
|
|
- planprocessrall = preprocess.getPlanprocessrall();
|
|
|
+ planprocessrall = preprocess.getPlanprocessrall()-(preprocess.getCancelrollsum() == null ? 0 : preprocess.getCancelrollsum());
|
|
|
}
|
|
|
- Integer ys = operationDo.getPlanprocessrall() % planprocessrall;
|
|
|
- Integer js = operationDo.getPlanprocessrall() / planprocessrall;
|
|
|
+ Integer ys = (operationDo.getPlanprocessrall()-operationDo.getCancelrollsum()) % planprocessrall;
|
|
|
+ Integer js = (operationDo.getPlanprocessrall()-operationDo.getCancelrollsum()) / planprocessrall;
|
|
|
for (Integer i = 0; i < planprocessrall; i++) {
|
|
|
ProductionProcesses processes = productionProcessesDetailInit(operationDo, produceOrder, optionalEquipments, outMaterDos, apsBlankOrderVo, processOperationEquDos);
|
|
|
// 已排程的作业明细数据保持ID不变
|