|
|
|
@ -135,12 +135,10 @@ public class MesWorkOrderSaveNosortStepService extends BaseStepService {
|
|
|
|
|
Map<String, Object> propertyMap = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
//修改完成数量
|
|
|
|
|
if (calcCompleteQty.compareTo(MesPcnExtConstWords.ZERO) > 0) {
|
|
|
|
|
propertyMap.put(MesPcnExtConstWords.COMPLETE_QTY, MathOperation.add(workOrder.getCompleteQty(), calcCompleteQty));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//修改未完成数量
|
|
|
|
|
if (calcCompleteQty.compareTo(MesPcnExtConstWords.ZERO) > 0 && workOrder.getUnCompleteQty().compareTo(new Double(0)) > 0 &&
|
|
|
|
|
MathOperation.compareTo(MathOperation.sub(workOrder.getUnCompleteQty(), new Double(calcCompleteQty)), new Double(0)) >= 0) {
|
|
|
|
|
if (workOrder.getUnCompleteQty().compareTo(new Double(0)) > 0 && MathOperation.compareTo(MathOperation.sub(workOrder.getUnCompleteQty(), new Double(calcCompleteQty)), new Double(0)) >= 0) {
|
|
|
|
|
propertyMap.put(MesPcnExtConstWords.UN_COMPLETE_QTY, MathOperation.sub(workOrder.getUnCompleteQty(), new Double(calcCompleteQty)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -162,7 +160,7 @@ public class MesWorkOrderSaveNosortStepService extends BaseStepService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (MathOperation.compareTo(workOrder.getCompleteQty(), workOrder.getQty()) >= 0 && workOrder.getWorkOrderStatus().compareTo(MesExtEnumUtil.ORDER_STATUS.COMPLETE.getValue()) != 0) {
|
|
|
|
|
if (MathOperation.compareTo(MathOperation.add(workOrder.getCompleteQty(), calcCompleteQty), workOrder.getQty()) >= 0 && workOrder.getWorkOrderStatus().compareTo(MesExtEnumUtil.ORDER_STATUS.COMPLETE.getValue()) != 0) {
|
|
|
|
|
propertyMap.put(MesPcnExtConstWords.WORK_ORDER_STATUS, MesExtEnumUtil.ORDER_STATUS.COMPLETE.getValue());
|
|
|
|
|
} else if (workOrder.getCompleteQty() >= 0 && workOrder.getWorkOrderStatus() == MesExtEnumUtil.ORDER_STATUS.RELEASE.getValue()) {
|
|
|
|
|
propertyMap.put(MesPcnExtConstWords.WORK_ORDER_STATUS, MesExtEnumUtil.ORDER_STATUS.PROCESS.getValue());
|
|
|
|
|