// TODO more update data public boolean updateBatchHeaderRecord(BillingBatchHeaderData val) { BillingONHeader b = dao.find(Integer.parseInt(val.getId())); if (b != null) { b.setMohOffice(val.moh_office); b.setBatchId(val.batch_id); b.setSpecialty(val.specialty); b.setCreator(val.creator); b.setUpdateDateTime(new Date()); b.setAction(val.action); b.setComment(val.comment); dao.merge(b); } return true; }
public BillingBatchHeaderData getBatchHeaderObj( BillingProviderData providerData, String disk_id) { BillingBatchHeaderData obj = new BillingBatchHeaderData(); List<BillingONHeader> bs = dao.findByDiskIdAndProviderRegNum(Integer.parseInt(disk_id), providerData.getOhipNo()); for (BillingONHeader b : bs) { obj.setId("" + b.getId()); obj.setDisk_id(disk_id); obj.setTransc_id(b.getTransactionId()); obj.setRec_id(b.getRecordId()); obj.setSpec_id(b.getSpecId()); obj.setMoh_office(b.getMohOffice()); obj.setBatch_id(b.getBatchId()); obj.setOperator(b.getOperator()); obj.setGroup_num(b.getGroupNum()); obj.setProvider_reg_num(b.getProviderRegNum()); obj.setSpecialty(b.getSpecialty()); obj.setH_count(b.gethCount()); obj.setR_count(b.getrCount()); obj.setT_count(b.gettCount()); obj.setBatch_date(dateformatter.format(b.getBatchDate())); obj.setCreatedatetime(tsFormatter.format(b.getCreateDateTime())); obj.setUpdatedatetime(tsFormatter.format(b.getUpdateDateTime())); obj.setCreator(b.getCreator()); obj.setAction(b.getAction()); obj.setComment(b.getComment()); } return obj; }