Esempio n. 1
0
  public void addNewContract(TContractInfo info, List<TContractItem> items, TUser u) {

    contractDAO.save(info);

    if (items != null) {
      for (TContractItem item : items) {
        item.setContractNo(info.getContractNo());
        contractDAO.saveDetail(item);
      }
    }
  }
Esempio n. 2
0
  public void editContract(TContractInfo info, List<TContractItem> items, TUser u) {

    TContractInfo po = contractDAO.queryContractById(info.getId());

    po.setUpdateTime(new Date());
    po.setBuyer(info.getBuyer());
    po.setBuyerAccountBank(info.getBuyerAccountBank());
    po.setBuyerAccountNo(info.getBuyerAccountNo());
    po.setBuyerAddress(info.getBuyerAddress());
    po.setBuyerFax(info.getBuyerFax());
    po.setBuyerMan(info.getBuyerMan());
    po.setBuyerTel(info.getBuyerTel());
    po.setDeliverPlace(info.getDeliverPlace());
    po.setMemo(info.getMemo());
    po.setPackage_(info.getPackage_());
    po.setPayChannel(info.getPayChannel());
    po.setSeller(info.getSeller());
    po.setSellerAccountBank(info.getSellerAccountBank());
    po.setSellerAccountNo(info.getSellerAccountNo());
    po.setSellerAddress(info.getSellerAddress());
    po.setSellerFax(info.getSellerFax());
    po.setSellerMan(info.getSellerMan());
    po.setBuyerDate(info.getBuyerDate());
    po.setSellerDate(info.getSellerDate());
    contractDAO.update(po);

    contractDAO.deleteAllItems(info.getContractNo());

    if (items != null) {
      for (TContractItem item : items) {
        item.setContractNo(info.getContractNo());
        contractDAO.saveDetail(item);
      }
    }
  }
Esempio n. 3
0
 public void trashContract(TContractInfo info, TUser u) {
   contractDAO.trashContract(info.getContractNo(), u);
 }