|
|
@@ -6,6 +6,10 @@ import com.kingdee.bos.dao.IObjectPK;
|
|
|
import com.kingdee.bos.dao.ormapping.ObjectUuidPK;
|
|
|
import com.kingdee.bos.metadata.entity.SelectorItemCollection;
|
|
|
import com.kingdee.bos.util.BOSUuid;
|
|
|
+import com.kingdee.eas.base.codingrule.CodingRuleManagerFactory;
|
|
|
+import com.kingdee.eas.base.codingrule.ICodingRuleManager;
|
|
|
+import com.kingdee.eas.basedata.org.AdminOrgUnitInfo;
|
|
|
+import com.kingdee.eas.basedata.org.HROrgUnitInfo;
|
|
|
import com.kingdee.eas.basedata.person.IPerson;
|
|
|
import com.kingdee.eas.basedata.person.PersonFactory;
|
|
|
import com.kingdee.eas.basedata.person.PersonInfo;
|
|
|
@@ -27,6 +31,7 @@ import com.kingdee.eas.hr.base.HRBaseException;
|
|
|
import com.kingdee.eas.hr.base.HRBillBaseInfo;
|
|
|
import com.kingdee.eas.hr.base.HRBillStateEnum;
|
|
|
import com.kingdee.eas.hr.emp.IPersonPosition;
|
|
|
+import com.kingdee.eas.hr.emp.PersonPositionCollection;
|
|
|
import com.kingdee.eas.hr.emp.PersonPositionFactory;
|
|
|
import com.kingdee.eas.hr.emp.PersonPositionInfo;
|
|
|
import com.kingdee.eas.util.app.DbUtil;
|
|
|
@@ -131,11 +136,12 @@ public class CheckInApplicationControllerBean extends AbstractCheckInApplication
|
|
|
personInfo = iPerson.getPersonInfo(new ObjectUuidPK(personId));
|
|
|
//生成入住人员信息
|
|
|
PersonPositionInfo pp = iPersonPosition.getPersonPositionInfo(
|
|
|
- "select personDep.*,primaryPosition.* where person = '" + personId + "'");
|
|
|
+ "select personDep.* ,primaryPosition.* ,hrOrgUnit.fid where person = '" + personId + "'");
|
|
|
//生成入住人员信息
|
|
|
OccupantsInfo occupantsInfo = new OccupantsInfo();
|
|
|
//入住人员
|
|
|
occupantsInfo.setPerson(personInfo);
|
|
|
+ occupantsInfo.setName(personInfo.getName());
|
|
|
//入住日期
|
|
|
occupantsInfo.setCheckInDate(entryInfo.getCheckInDate());
|
|
|
//退宿日期
|
|
|
@@ -147,6 +153,16 @@ public class CheckInApplicationControllerBean extends AbstractCheckInApplication
|
|
|
occupantsInfo.setPersonPosition(pp);
|
|
|
//状态:启用
|
|
|
occupantsInfo.setState(BasicItemStateEnum.ENABLE);
|
|
|
+
|
|
|
+ if (pp != null) {
|
|
|
+ HROrgUnitInfo hrOrgUnit = pp.getHrOrgUnit();
|
|
|
+ ICodingRuleManager iCodingRuleManager = CodingRuleManagerFactory.getLocalInstance(ctx);
|
|
|
+ if (iCodingRuleManager.isExist(info, hrOrgUnit.getId().toString())) {
|
|
|
+ String number = iCodingRuleManager.getNumber(info, hrOrgUnit.getId().toString());
|
|
|
+ occupantsInfo.setNumber(number);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
iOccupants.addnew(occupantsInfo);
|
|
|
entryInfo.setOccupants(occupantsInfo);
|
|
|
}
|
|
|
@@ -300,6 +316,8 @@ public class CheckInApplicationControllerBean extends AbstractCheckInApplication
|
|
|
Date checkInDate = entryInfo.getCheckInDate();
|
|
|
Date checkoutDate = entryInfo.getCheckoutDate();
|
|
|
PersonInfo person = entryInfo.getPerson();
|
|
|
+ IPerson iPerson = PersonFactory.getLocalInstance(ctx);
|
|
|
+ person = iPerson.getPersonInfo(new ObjectUuidPK(person.getId().toString()));
|
|
|
String personId = person.getId().toString();
|
|
|
OccupantsInfo occupants = entryInfo.getOccupants();
|
|
|
String occupantsId = occupants.getId().toString();
|