1 public void doAction(ActionEvent evt) 2 throws Exception 3 { 4 //获得编辑事件 5 PsndocFormEditor formEditor = (PsndocFormEditor)getEditor(); 6 //得到标题表,最后得到表体表(hi_psnjob)模式 7 BillModel billModel = formEditor.getBillCardPanel().getBillModel(PsnJobVO.getDefaultTableName()); 8 if(billModel == null) 9 return; 10 /* 11 * 用getBodyValueVOs(PsnJobVO.class.getName())得到VO数组, 12 * 13 */ 14 String psncherkcode = ""; 15 PsnJobVO psnJobVOs[] = (PsnJobVO[])(PsnJobVO[])billModel.getBodyValueVOs(PsnJobVO.class.getName()); 16 for (int i = 0; i < psnJobVOs.length; i++) { 17 psnJobVOs[i].setPk_psncl("1001H210000000002GES"); 18 psncherkcode = psnJobVOs[i].getClerkcode(); 19 } 20 BillItem[] billItems = billModel.getBodyItems(); 21 for(BillItem item : billItems){ 22 if(item.getKey().equals("pk_psncl")){ 23 item.setValue("1001H210000000002GES"); 24 } 25 } 26 billModel.setBodyDataVO(psnJobVOs); 27 super.doAction(evt); 28 29 //更新人员类别pk_psncl 30 31 32 33 34 }
时间: 2024-10-12 20:47:48