EmpEnrollBizBillControllerBeanEx.java 1.7 KB

123456789101112131415161718192021222324252627282930313233343536
  1. package com.kingdee.eas.hr.affair.app;
  2. import com.kingdee.bos.BOSException;
  3. import com.kingdee.bos.Context;
  4. import com.kingdee.eas.basedata.person.*;
  5. import com.kingdee.eas.common.EASBizException;
  6. import com.kingdee.eas.framework.CoreBaseCollection;
  7. import com.kingdee.eas.hr.affair.EmpEnrollBizBillEntryInfo;
  8. import com.kingdee.eas.hr.affair.HRAffairBizBillEntryInfo;
  9. public class EmpEnrollBizBillControllerBeanEx extends EmpEnrollBizBillControllerBean{
  10. @Override
  11. protected void _doWithPriorityThingEffect(Context ctx, HRAffairBizBillEntryInfo entry) throws BOSException, EASBizException {
  12. //super._doWithPriorityThingEffect(ctx, entry);
  13. EmpEnrollBillBizBean enrollBizBean = (EmpEnrollBillBizBean)this.getBizBean();
  14. enrollBizBean.doWithPriorityThingEffect(ctx, entry);
  15. this.processPersonBankRecord(ctx, entry);
  16. EmpEnrollBizBillEntryInfo entryInfo = (EmpEnrollBizBillEntryInfo)entry;
  17. String oaUserName = (String)entryInfo.get("oaUserName");
  18. PersonInfo person = entryInfo.getPerson();
  19. person.put("oaUserName",oaUserName);
  20. PersonFactory.getLocalInstance(ctx).save(person);
  21. CoreBaseCollection coreBaseCollection = new CoreBaseCollection();
  22. PersonHisCollection personHisCollection = PersonHisFactory.getLocalInstance(ctx).getPersonHisCollection("where number = '" + person.getNumber() + "'");
  23. for (int i = 0; i < personHisCollection.size(); i++) {
  24. PersonHisInfo personHisInfo = personHisCollection.get(i);
  25. personHisInfo.put("oaUserName",oaUserName);
  26. coreBaseCollection.add(personHisInfo);
  27. }
  28. PersonHisFactory.getLocalInstance(ctx).saveBatchData(coreBaseCollection);
  29. }
  30. }