EAS_通过updatePartial只更新部分字段

InvoiceDetailInfo invoiceDetailInfo = InvoiceDetailFactory.getRemoteInstance().getInvoiceDetailInfo(new ObjectUuidPK(id));
if(invoiceDetailInfo.isIsRzAppointVoucher() && invoiceDetailInfo.isFivouchered()){
    invoiceDetailInfo.setIsRzReturn(false);
    invoiceDetailInfo.setIsRzAppointVoucher(false);
    invoiceDetailInfo.setFivouchered(false);
      InvoiceDetailEntryCollection invoiceDetailEntryCollection = invoiceDetailInfo.getEntrys();
      for (int j = 0; j < invoiceDetailEntryCollection.size(); j++) {
          InvoiceDetailEntryInfo  invoiceDetailEntryInfo = invoiceDetailEntryCollection.get(j);
          if(invoiceDetailEntryInfo.isIsCancel()){
              continue;
          }
          invoiceDetailEntryInfo.setIsVoucher(false);
          invoiceDetailEntryInfo.setRzpzh(null);
          invoiceDetailEntryInfo.setIsRzReturn(false);
      }
      SelectorItemCollection selector = new SelectorItemCollection();
      selector.add("isRzReturn");
      selector.add("isRzAppointVoucher");
      selector.add("fivouchered");

      selector.add("entrys.isRzReturn");
      selector.add("entrys.isVoucher");
      selector.add("entrys.rzpzh");
      InvoiceDetailFactory.getRemoteInstance().updatePartial(invoiceDetailInfo, selector);

 

posted @ 2023-08-21 11:18  凉了记忆  阅读(40)  评论(0编辑  收藏  举报