-
Notifications
You must be signed in to change notification settings - Fork 34
Thiết kế mô đun quản lý người dùng cán bộ
Tạ Tuấn Anh edited this page Mar 23, 2016
·
3 revisions
Service.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.2.0//EN" "http://www.liferay.com/dtd/liferay- service-builder_6_2_0.dtd">
<service-builder package-path="org.opencps.usermgt">
<author>khoavd</author>
<namespace>usermgt</namespace>
<entity name="WorkingUnit" local-service="true"
remote-service="true" table="opencps_workingunit">
<!-- PK fields -->
<column name="workingunitId" type="long" primary="true" />
<!-- Audit fields -->
<column name="companyId" type="long" />
<column name="groupId" type="long" />
<column name="userId" type="long" />
<column name="createDate" type="Date" />
<column name="modifiedDate" type="Date" />
<!-- Other fields -->
<column name="name" type="String" />
<column name="enName" type="String" />
<column name="govAgencyCode" type="String"/>
<column name="parentWorkingUnitId" type="long" />
<column name="treeIndex" type="String" />
<column name="address" type="String" />
<column name="cityCode" type="String" />
<column name="districtCode" type="String" />
<column name="wardCode" type="String" />
<column name="telNo" type="String" />
<column name="faxNo" type="String" />
<column name="email" type="String" />
<column name="website" type="String" />
<column name="isEmployer" type="boolean" />
<column name="mappingOrganisationId" type="long" />
<column name="entries" type="Collection" entity="JobPos"
mapping-table="WorkingUnit_JobPos" />
<!-- Order -->
<order by="asc">
<order-column name="name" />
</order>
<!-- Finder methods -->
<finder name="G_E" return-type="Collection">
<finder-column name="groupId" />
<finder-column name="isEmployer" />
</finder>
<finder name="GroupId" return-type="Collection">
<finder-column name="groupId" />
</finder>
<finder name="G_N" return-type="Collection">
<finder-column name="groupId"/>
<finder-column name="name" comparator="LIKE" arrayable-operator="OR"/>
</finder>
</entity>
<entity name="JobPos" local-service="true" remote-service="true"
table="opencps_jobpos">
<!-- PK fields -->
<column name="jobposId" type="long" primary="true" />
<!-- Audit fields -->
<column name="companyId" type="long" />
<column name="groupId" type="long" />
<column name="userId" type="long" />
<column name="createDate" type="Date" />
<column name="modifiedDate" type="Date" />
<!-- Other fields -->
<column name="title" type="String" />
<column name="description" type="String" />
<column name="workingUnitId" type="long" />
<column name="directWorkingUnitId" type="long" />
<column name="leader" type="int" />
<column name="mappingRoleId" type="long" />
<!-- Relationships -->
<column name="entries" type="Collection" entity="Employee"
mapping-table="Employee_JobPos" />
<column name="entries" type="Collection" entity="WorkingUnit"
mapping-table="WorkingUnit_JobPos" />
<!-- Order -->
<!-- Finder methods -->
<finder name="G_W" return-type="Collection">
<finder-column name="groupId" />
<finder-column name="workingUnitId" />
</finder>
<finder name="G_W_D" return-type="Collection">
<finder-column name="groupId" />
<finder-column name="workingUnitId" />
<finder-column name="directWorkingUnitId" />
</finder>
</entity>
<entity name="Employee" local-service="true" remote-service="true"
table="opencps_employee">
<!-- PK fields -->
<column name="employeeId" type="long" primary="true" />
<!-- Audit fields -->
<column name="companyId" type="long" />
<column name="groupId" type="long" />
<column name="userId" type="long" />
<column name="createDate" type="Date" />
<column name="modifiedDate" type="Date" />
<!-- Other fields -->
<column name="workingUnitId" type="long" />
<column name="employeeNo" type="String" />
<column name="fullName" type="String"/>
<column name="gender" type="int"/>
<column name="birthdate" type="Date" />
<column name="telNo" type="String" />
<column name="mobile" type="String" />
<column name="email" type="String" />
<column name="workingStatus" type="int" />
<column name="mainJobPosId" type="long" />
<column name="entries" type="Collection" entity="JobPos"
mapping-table="Employee_JobPos" />
<!-- Order -->
<order by="asc">
<order-column name="fullName" />
</order>
<!-- Finder methods -->
<finder name="G_W" return-type="Collection">
<finder-column name="groupId" />
<finder-column name="mainJobPosId" />
</finder>
<finder name="G_W_MJP" return-type="Collection">
<finder-column name="groupId" />
<finder-column name="workingUnitId" />
<finder-column name="mainJobPosId" />
</finder>
</entity>
<exceptions>
<exception>EmptyWorkingUnitName</exception>
<exception>EmptyJobPosTitle</exception>
<exception>DuplicatEgovAgencyCode</exception>
<exception>DuplicateWorkingUnit</exception>
<exception>DuplicateJobPos</exception>
<exception>OutOfLengthUnitName</exception>
<exception>OutOfLengthUnitEnName</exception>
<exception>OutOfLengthJobTitle</exception>
<exception>OutOfLengthFullName</exception>
<exception>OutOfLengthDescription</exception>
</exceptions>
</service-builder>
portlet-model-hints.xml
<?xml version="1.0"?>
<model-hints>
<hint-collection name="TEXTAREA">
<hint name="display-height">105</hint>
<hint name="display-width">500</hint>
<hint name="max-length">4000</hint>
</hint-collection>
<model name="org.opencps.datamgt.model.DictCollection">
<default-hints>
<hint name="display-width">150</hint>
</default-hints>
<field name="dictCollectionId" type="long" />
<field name="companyId" type="long" />
<field name="groupId" type="long" />
<field name="userId" type="long" />
<field name="createDate" type="Date" />
<field name="modifiedDate" type="Date" />
<field name="collectionCode" type="String">
<hint name="max-length">100</hint>
</field>
<field name="collectionName" type="String" localized="true">
<hint name="max-length">255</hint>
</field>
<field name="description" type="String">
<hint-collection name="TEXTAREA" />
</field>
</model>
<model name="org.opencps.datamgt.model.DictItem">
<field name="dictItemId" type="long" />
<field name="companyId" type="long" />
<field name="groupId" type="long" />
<field name="userId" type="long" />
<field name="createDate" type="Date" />
<field name="modifiedDate" type="Date" />
<field name="dictCollectionId" type="long" />
<field name="itemCode" type="String">
<hint name="max-length">100</hint>
</field>
<field name="itemName" type="String" localized="true">
<hint name="max-length">255</hint>
</field>
<field name="parentItemId" type="long" />
<field name="treeIndex" type="String" />
<field name="issueStatus" type="int" />
<field name="dictVersionId" type="long" />
</model>
<model name="org.opencps.datamgt.model.DictVersion">
<field name="dictVersionId" type="long" />
<field name="companyId" type="long" />
<field name="groupId" type="long" />
<field name="userId" type="long" />
<field name="createDate" type="Date" />
<field name="modifiedDate" type="Date" />
<field name="dictCollectionId" type="long" />
<field name="version" type="String" />
<field name="description" type="String">
<hint-collection name="TEXTAREA" />
</field>
<field name="validatedFrom" type="Date" />
<field name="validatedTo" type="Date" />
<field name="issueStatus" type="int" />
</model>
<model name="org.opencps.usermgt.model.Employee">
<field name="employeeId" type="long" />
<field name="companyId" type="long" />
<field name="groupId" type="long" />
<field name="userId" type="long" />
<field name="createDate" type="Date" />
<field name="modifiedDate" type="Date" />
<field name="workingUnitId" type="long" />
<field name="employeeNo" type="String">
<hint name="max-length">100</hint>
</field>
<field name="fullName" type="String">
<hint name="max-length">255</hint>
</field>
<field name="gender" type="int" />
<field name="birthdate" type="Date" />
<field name="telNo" type="String">
<hint name="max-length">100</hint>
</field>
<field name="mobile" type="String">
<hint name="max-length">100</hint>
</field>
<field name="email" type="String">
<hint name="max-length">255</hint>
</field>
<field name="workingStatus" type="int" />
<field name="mainJobPosId" type="long" />
</model>
<model name="org.opencps.usermgt.model.JobPos">
<field name="jobposId" type="long" />
<field name="companyId" type="long" />
<field name="groupId" type="long" />
<field name="userId" type="long" />
<field name="createDate" type="Date" />
<field name="modifiedDate" type="Date" />
<field name="title" type="String">
<hint name="max-length">255</hint>
</field>
<field name="description" type="String">
<hint-collection name="TEXTAREA" />
</field>
<field name="workingUnitId" type="long" />
<field name="directWorkingUnitId" type="long" />
<field name="leader" type="int" />
<field name="mappingRoleId" type="long" />
</model>
<model name="org.opencps.usermgt.model.WorkingUnit">
<field name="workingunitId" type="long" />
<field name="companyId" type="long" />
<field name="groupId" type="long" />
<field name="userId" type="long" />
<field name="createDate" type="Date" />
<field name="modifiedDate" type="Date" />
<field name="name" type="String">
<hint name="max-length">255</hint>
</field>
<field name="enName" type="String">
<hint name="max-length">255</hint>
</field>
<field name="govAgencyCode" type="String" />
<field name="parentWorkingUnitId" type="long" />
<field name="treeIndex" type="String" />
<field name="address" type="String">
<hint name="max-length">500</hint>
</field>
<field name="cityCode" type="String" />
<field name="districtCode" type="String" />
<field name="wardCode" type="String" />
<field name="telNo" type="String">
<hint name="max-length">100</hint>
</field>
<field name="faxNo" type="String">
<hint name="max-length">100</hint>
</field>
<field name="email" type="String">
<hint name="max-length">255</hint>
</field>
<field name="website" type="String">
<hint name="max-length">1000</hint>
</field>
<field name="isEmployer" type="boolean" />
<field name="mappingOrganisationId" type="long" />
</model>
</model-hints>