|
|
@@ -83,8 +83,7 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService {
|
|
|
if (item.getReplyQty() > item.getQty())
|
|
|
throw new IllegalOperatorException("回复的数量合计超过了订单数量");
|
|
|
// 该行回复状态
|
|
|
- item.setStatus((short) (Double.compare(item.getReplyQty(), item.getQty()) == 0 ? Status.REPLIED.value()
|
|
|
- : Status.NOT_REPLY.value()));
|
|
|
+ item.setStatus((short) (Double.compare(item.getReplyQty(), item.getQty()) == 0 ? Status.REPLIED.value() : Status.NOT_REPLY.value()));
|
|
|
purchaseOrderReplyDao.save(reply);
|
|
|
purchaseOrderItemDao.save(item);
|
|
|
// 订单主记录状态
|
|
|
@@ -97,7 +96,8 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService {
|
|
|
|
|
|
@Override
|
|
|
public PurchaseOrderAll findByCode(String code) {
|
|
|
- List<PurchaseOrderAll> purchaseOrderAlls = purchaseOrderAllDao.findByCode(code);
|
|
|
+ List<PurchaseOrderAll> purchaseOrderAlls = purchaseOrderAllDao.findByVendUUAndCode(SystemSession.getUser().getEnterprise().getUu(),
|
|
|
+ code);
|
|
|
if (purchaseOrderAlls.size() == 0)
|
|
|
throw new NotFoundException(code);
|
|
|
return purchaseOrderAlls.get(0);
|
|
|
@@ -135,7 +135,8 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService {
|
|
|
|
|
|
@Override
|
|
|
public List<PurchaseOrderReply> findNotUploadReply() {
|
|
|
- return purchaseOrderReplyDao.findByEnUUAndStatus(SystemSession.getUser().getEnterprise().getUu(), (short) Status.NOT_UPLOAD.value());
|
|
|
+ return purchaseOrderReplyDao
|
|
|
+ .findByEnUUAndStatus(SystemSession.getUser().getEnterprise().getUu(), (short) Status.NOT_UPLOAD.value());
|
|
|
}
|
|
|
|
|
|
}
|