public ArrayList<LogisticsLossVO> getStockLoss() {
   ArrayList<LogisticsLossVO> stocklossList = new ArrayList<LogisticsLossVO>();
   for (LogisticsLossPO slp : slds.getStockLoss()) {
     stocklossList.add(stockLossPoToVo(slp));
   }
   return stocklossList;
 }
  public boolean approvalStockLoss(String id, int approval) {
    ArrayList<LogisticsLossPO> stocklosslist = new ArrayList<LogisticsLossPO>();
    stocklosslist = slds.getStockLoss();
    LogisticsLossVO sofv = new LogisticsLossVO();
    for (LogisticsLossPO slp : stocklosslist) {
      if (slp.getId().equals(id)) {
        slp.setApproval(approval);
        slds.update(slp);
        sofv = stockLossPoToVo(slp);
        break;
      }
    }

    if (sofv.approval == 1) {
      for (CommodityVO cv : cb.getCommodity()) {
        if (sofv.name.equals(cv.commodityname) && sofv.model.equals(cv.model)) {
          CommodityVO newCv = (CommodityVO) cv.clone();
          newCv.number = cv.number - sofv.lossNumber;
          if (cb.updateCommodity(cv, newCv, cb.getFather(cv))) {
            if (newCv.number < newCv.dangerNumber) {
              mb.add(new MessageVO("物流报警", cv.commodityname, cv.model, newCv.number, "空", false));
            }
            return true;
          } else {
            return false;
          }
        }
      }
    }
    return true;
  }
 public ArrayList<LogisticsLossVO> getUncheckedStockLoss() {
   ArrayList<LogisticsLossVO> stocklossList = new ArrayList<LogisticsLossVO>();
   for (LogisticsLossPO slp : slds.getStockLoss()) {
     if (slp.getApproval() == 3) {
       stocklossList.add(stockLossPoToVo(slp));
     }
   }
   return stocklossList;
 }
 public LogisticsLossPO getStockLossPO(String id) {
   if (id == null) {
     return null;
   }
   for (LogisticsLossPO slp : slds.getStockLoss()) {
     if (slp.getId().equals(id)) {
       return slp;
     }
   }
   return null;
 }