|
@@ -152,10 +152,10 @@ public class OutStoreFormServiceImpl extends BaseServiceImpl<OutStoreFormMapper,
|
|
|
List<OutStoreDetailDTO> detailList = model.getDetailList();
|
|
|
|
|
|
// 获取领用单详情
|
|
|
- SparePickForm sparePickForm = null;
|
|
|
+ /*SparePickForm sparePickForm = null;
|
|
|
if(model.getType().equals(OutStoreTypeEnum.CHUKU_LINGYONG.getValue())){
|
|
|
sparePickForm = sparePickFormMapper.selectByPrimaryKey(model.getPickId());
|
|
|
- }
|
|
|
+ }*/
|
|
|
BigDecimal totalPrice = new BigDecimal(0);
|
|
|
|
|
|
// 判断备件是否在该仓库里面,出库单已经勾选了仓库。这个不允许了,pc和移动端都不允许
|
|
@@ -181,6 +181,7 @@ public class OutStoreFormServiceImpl extends BaseServiceImpl<OutStoreFormMapper,
|
|
|
}
|
|
|
// detail.setStoreId(outStoreForm.getStoreId());
|
|
|
detail.setId(IdGeneratorUtils.getObjectId());
|
|
|
+ detail.setTotalPrice(detail.getNum().multiply(detail.getPrice()));
|
|
|
totalPrice = totalPrice.add(detail.getTotalPrice());
|
|
|
detail.setOutNo(outStoreForm.getOutNo());
|
|
|
OutStoreDetail storeDetail = new OutStoreDetail();
|
|
@@ -192,6 +193,7 @@ public class OutStoreFormServiceImpl extends BaseServiceImpl<OutStoreFormMapper,
|
|
|
};
|
|
|
outStoreForm.setTotalPrice(totalPrice);
|
|
|
mapper.updateByPrimaryKey(outStoreForm);
|
|
|
+ updateStore(outStoreForm.getId());
|
|
|
return outStoreForm;
|
|
|
}
|
|
|
|
|
@@ -342,12 +344,14 @@ public class OutStoreFormServiceImpl extends BaseServiceImpl<OutStoreFormMapper,
|
|
|
}
|
|
|
//detail.setStoreId(model.getStoreId());
|
|
|
detail.setOutNo(model.getOutNo());
|
|
|
+ detail.setTotalPrice(detail.getNum().multiply(detail.getPrice()));
|
|
|
totalPrice = totalPrice.add(detail.getTotalPrice());
|
|
|
OutStoreDetail storeDetail = new OutStoreDetail();
|
|
|
BeanConverterUtil.copyObjectProperties(detail, storeDetail);
|
|
|
storeDetail.setId(IdGeneratorUtils.getObjectId());
|
|
|
addDetailList.add(storeDetail);
|
|
|
}else{// 修改数量的
|
|
|
+ detail.setTotalPrice(detail.getNum().multiply(detail.getPrice()));
|
|
|
totalPrice = totalPrice.add(detail.getTotalPrice());
|
|
|
OutStoreDetail storeDetail = new OutStoreDetail();
|
|
|
BeanConverterUtil.copyObjectProperties(detail, storeDetail);
|