提交 502947a7 编写于 作者: ibizdev's avatar ibizdev

xignzi006 发布系统代码

上级 f81c2287
......@@ -317,4 +317,28 @@ export interface HREmployee {
* @memberof HREmployee
*/
nativeplace?: any;
/**
* 职位标识
*
* @returns {*}
* @memberof HREmployee
*/
hrpostid?: any;
/**
* 职位
*
* @returns {*}
* @memberof HREmployee
*/
hrpostname?: any;
/**
* 职务
*
* @returns {*}
* @memberof HREmployee
*/
hrdutyname?: any;
}
\ No newline at end of file
......@@ -40,6 +40,9 @@ export default {
empstate: "员工状态",
jobstate: "在岗状态",
nativeplace: "籍贯",
hrpostid: "职位标识",
hrpostname: "职位",
hrdutyname: "职务",
},
views: {
v_001: {
......
......@@ -39,6 +39,9 @@ export default {
empstate: "员工状态",
jobstate: "在岗状态",
nativeplace: "籍贯",
hrpostid: "职位标识",
hrpostname: "职位",
hrdutyname: "职务",
},
views: {
v_001: {
......
......@@ -31,6 +31,11 @@ export default class MainModel {
prop: 'organizationname',
dataType: 'PICKUPTEXT',
},
{
name: 'hrpostid',
prop: 'hrpostid',
dataType: 'PICKUP',
},
{
name: 'birthday',
prop: 'birthday',
......
......@@ -132,6 +132,15 @@ export default class PickupViewpickupviewpanelModel {
{
name: 'nativeplace',
},
{
name: 'hrpostid',
},
{
name: 'hrpostname',
},
{
name: 'hrdutyname',
},
]
}
......
......@@ -132,6 +132,15 @@ export default class TREE_001Model {
{
name: 'nativeplace',
},
{
name: 'hrpostid',
},
{
name: 'hrpostname',
},
{
name: 'hrdutyname',
},
]
}
......
......@@ -132,6 +132,15 @@ export default class TreeExpViewtreeexpbarModel {
{
name: 'nativeplace',
},
{
name: 'hrpostid',
},
{
name: 'hrpostname',
},
{
name: 'hrdutyname',
},
]
}
......
......@@ -324,6 +324,27 @@ public class HREmployee extends EntityMP implements Serializable {
@JSONField(name = "nativeplace")
@JsonProperty("nativeplace")
private String nativeplace;
/**
* 职位标识
*/
@TableField(value = "hrpostid")
@JSONField(name = "hrpostid")
@JsonProperty("hrpostid")
private String hrpostid;
/**
* 职位
*/
@TableField(exist = false)
@JSONField(name = "hrpostname")
@JsonProperty("hrpostname")
private String hrpostname;
/**
* 职务
*/
@TableField(exist = false)
@JSONField(name = "hrdutyname")
@JsonProperty("hrdutyname")
private String hrdutyname;
/**
*
......@@ -341,6 +362,14 @@ public class HREmployee extends EntityMP implements Serializable {
@TableField(exist = false)
private cn.ibizlab.humanresource.core.humanresource.domain.HREmpState hrempstate;
/**
* 职位
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.humanresource.core.humanresource.domain.HRPost hrpost;
/**
......@@ -631,6 +660,14 @@ public class HREmployee extends EntityMP implements Serializable {
this.modify("nativeplace",nativeplace);
}
/**
* 设置 [职位标识]
*/
public void setHrpostid(String hrpostid){
this.hrpostid = hrpostid ;
this.modify("hrpostid",hrpostid);
}
}
......
......@@ -132,6 +132,27 @@ public class HREmployeeSearchContext extends QueryWrapperContext<HREmployee> {
this.getSearchCond().eq("empstate", n_empstate_eq);
}
}
private String n_hrpostid_eq;//[职位标识]
public void setN_hrpostid_eq(String n_hrpostid_eq) {
this.n_hrpostid_eq = n_hrpostid_eq;
if(!ObjectUtils.isEmpty(this.n_hrpostid_eq)){
this.getSearchCond().eq("hrpostid", n_hrpostid_eq);
}
}
private String n_hrpostname_eq;//[职位]
public void setN_hrpostname_eq(String n_hrpostname_eq) {
this.n_hrpostname_eq = n_hrpostname_eq;
if(!ObjectUtils.isEmpty(this.n_hrpostname_eq)){
this.getSearchCond().eq("hrpostname", n_hrpostname_eq);
}
}
private String n_hrpostname_like;//[职位]
public void setN_hrpostname_like(String n_hrpostname_like) {
this.n_hrpostname_like = n_hrpostname_like;
if(!ObjectUtils.isEmpty(this.n_hrpostname_like)){
this.getSearchCond().like("hrpostname", n_hrpostname_like);
}
}
/**
* 启用快速搜索
......
......@@ -66,4 +66,6 @@ public interface HREmployeeMapper extends BaseMapper<HREmployee>{
List<HREmployee> selectByEmpstate(@Param("hrempstateid") Serializable hrempstateid) ;
List<HREmployee> selectByHrpostid(@Param("hrpostid") Serializable hrpostid) ;
}
......@@ -41,6 +41,8 @@ public interface IHREmployeeService extends IService<HREmployee>{
void removeByOrganizationid(String organizationid) ;
List<HREmployee> selectByEmpstate(String hrempstateid) ;
void removeByEmpstate(String hrempstateid) ;
List<HREmployee> selectByHrpostid(String hrpostid) ;
void removeByHrpostid(String hrpostid) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
......
......@@ -93,6 +93,9 @@ public class HREmployeeServiceImpl extends ServiceImpl<HREmployeeMapper, HREmplo
@Autowired
@Lazy
protected cn.ibizlab.humanresource.core.humanresource.service.IHREmpStateService hrempstateService;
@Autowired
@Lazy
protected cn.ibizlab.humanresource.core.humanresource.service.IHRPostService hrpostService;
protected int batchSize = 500;
......@@ -215,6 +218,16 @@ public class HREmployeeServiceImpl extends ServiceImpl<HREmployeeMapper, HREmplo
this.remove(new QueryWrapper<HREmployee>().eq("empstate",hrempstateid));
}
@Override
public List<HREmployee> selectByHrpostid(String hrpostid) {
return baseMapper.selectByHrpostid(hrpostid);
}
@Override
public void removeByHrpostid(String hrpostid) {
this.remove(new QueryWrapper<HREmployee>().eq("hrpostid",hrpostid));
}
/**
* 查询集合 DEFAULT
......@@ -252,6 +265,17 @@ public class HREmployeeServiceImpl extends ServiceImpl<HREmployeeMapper, HREmplo
}
et.setJobstate(hrempstate.getJobstate());
}
//实体关系[DER1N_HREMPLOYEE_HRPOST_HRPOSTID_BE6FB0]
if(!ObjectUtils.isEmpty(et.getHrpostid())){
cn.ibizlab.humanresource.core.humanresource.domain.HRPost hrpost=et.getHrpost();
if(ObjectUtils.isEmpty(hrpost)){
cn.ibizlab.humanresource.core.humanresource.domain.HRPost majorEntity=hrpostService.get(et.getHrpostid());
et.setHrpost(majorEntity);
hrpost=majorEntity;
}
et.setHrpostname(hrpost.getHrpostname());
et.setHrdutyname(hrpost.getHrdutyname());
}
}
......
......@@ -50,6 +50,9 @@ public class HRPostServiceImpl extends ServiceImpl<HRPostMapper, HRPost> impleme
protected cn.ibizlab.humanresource.core.humanresource.service.IHRDistributionService hrdistributionService;
@Autowired
@Lazy
protected cn.ibizlab.humanresource.core.humanresource.service.IHREmployeeService hremployeeService;
@Autowired
@Lazy
protected cn.ibizlab.humanresource.core.humanresource.service.IHRPostRelService hrpostrelService;
@Autowired
@Lazy
......
......@@ -296,7 +296,7 @@
<!--输出实体[HREMPLOYEE]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-hremployee-221-12">
<changeSet author="a_LAB01_e85d8801c" id="tab-hremployee-224-12">
<createTable tableName="EMPLOYEE">
<column name="EMPLOYEENAME" remarks="" type="VARCHAR(200)">
</column>
......@@ -371,6 +371,8 @@
</column>
<column name="NATIVEPLACE" remarks="" type="VARCHAR(100)">
</column>
<column name="HRPOSTID" remarks="" type="VARCHAR(100)">
</column>
</createTable>
</changeSet>
......@@ -716,7 +718,7 @@
<!--输出实体[HRPOST]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-hrpost-106-27">
<changeSet author="a_LAB01_e85d8801c" id="tab-hrpost-107-27">
<createTable tableName="T_HRPOST">
<column name="HRPOSTID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_HRPOST_HRPOSTID"/>
......@@ -925,88 +927,91 @@
</changeSet>
<!--输出实体[HREMPSTATE]外键关系 -->
<!--输出实体[HREMPLOYEE]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-hremployee-221-43">
<changeSet author="a_LAB01_e85d8801c" id="fk-hremployee-224-43">
<addForeignKeyConstraint baseColumnNames="ORGANIZATIONID" baseTableName="EMPLOYEE" constraintName="DER1N_EMPLOYEE_ORGANIZATION_OR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGANIZATIONID" referencedTableName="ORGANIZATION" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-hremployee-221-44">
<changeSet author="a_LAB01_e85d8801c" id="fk-hremployee-224-44">
<addForeignKeyConstraint baseColumnNames="EMPSTATE" baseTableName="EMPLOYEE" constraintName="DER1N_HREMPLOYEE_HREMPSTATE_EM" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="HREMPSTATEID" referencedTableName="T_HREMPSTATE" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-hremployee-224-45">
<addForeignKeyConstraint baseColumnNames="HRPOSTID" baseTableName="EMPLOYEE" constraintName="DER1N_HREMPLOYEE_HRPOST_HRPOST" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="HRPOSTID" referencedTableName="T_HRPOST" validate="true"/>
</changeSet>
<!--输出实体[HRFAMILY]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-hrfamily-8-45">
<changeSet author="a_LAB01_e85d8801c" id="fk-hrfamily-8-46">
<addForeignKeyConstraint baseColumnNames="HREMPLOYEEID" baseTableName="T_HRFAMILY" constraintName="DER1N_HRFAMILY_HREMPLOYEE_HREM" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EMPLOYEEID" referencedTableName="EMPLOYEE" validate="true"/>
</changeSet>
<!--输出实体[HRLANGUAGEABILITY]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-hrlanguageability-8-46">
<changeSet author="a_LAB01_e85d8801c" id="fk-hrlanguageability-8-47">
<addForeignKeyConstraint baseColumnNames="HREMPLOYEEID" baseTableName="T_HRLANGUAGEABILITY" constraintName="DER1N_HRLANGUAGEABILITY_HREMPL" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EMPLOYEEID" referencedTableName="EMPLOYEE" validate="true"/>
</changeSet>
<!--输出实体[HRLEAVE]外键关系 -->
<!--输出实体[HRLEGAL]外键关系 -->
<!--输出实体[HROMHIERARCHYPURPOSE]外键关系 -->
<!--输出实体[HROMHIERARCHY]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-hromhierarchy-76-47">
<changeSet author="a_LAB01_e85d8801c" id="fk-hromhierarchy-76-48">
<addForeignKeyConstraint baseColumnNames="HROMHIERARCHYCATID" baseTableName="OMHIERARCHY" constraintName="DER1N_HROMHIERARCHY_HROMHIERAR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="OMHIERARCHYCATID" referencedTableName="OMHIERARCHYCAT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-hromhierarchy-76-48">
<changeSet author="a_LAB01_e85d8801c" id="fk-hromhierarchy-76-49">
<addForeignKeyConstraint baseColumnNames="POMHIERARCHYID" baseTableName="OMHIERARCHY" constraintName="DER1N_OMHIERARCHY_OMHIERARCHY_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="OMHIERARCHYID" referencedTableName="OMHIERARCHY" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-hromhierarchy-76-49">
<changeSet author="a_LAB01_e85d8801c" id="fk-hromhierarchy-76-50">
<addForeignKeyConstraint baseColumnNames="ORGANIZATIONID" baseTableName="OMHIERARCHY" constraintName="DER1N_OMHIERARCHY_ORGANIZATION" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGANIZATIONID" referencedTableName="ORGANIZATION" validate="true"/>
</changeSet>
<!--输出实体[HROMHIERARCHYCAT]外键关系 -->
<!--输出实体[HROMHIERARCHYPURPOSEREF]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-hromhierarchypurposeref-6-50">
<changeSet author="a_LAB01_e85d8801c" id="fk-hromhierarchypurposeref-6-51">
<addForeignKeyConstraint baseColumnNames="OMHIERARCHYCATID" baseTableName="OMHIERARCHYPURPOSEREF" constraintName="DER1N_OMHIERARCHYPURPOSEREF_OM" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="OMHIERARCHYCATID" referencedTableName="OMHIERARCHYCAT" validate="true"/>
</changeSet>
<!--输出实体[HROPERATIONUNIT]外键关系 -->
<!--输出实体[HRORGADDRESS]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-hrorgaddress-29-52">
<changeSet author="a_LAB01_e85d8801c" id="fk-hrorgaddress-29-53">
<addForeignKeyConstraint baseColumnNames="HRORGANIZATIONID" baseTableName="T_HRORGADDRESS" constraintName="DER1N_HRORGADDRESS_HRORGANIZAT" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGANIZATIONID" referencedTableName="ORGANIZATION" validate="true"/>
</changeSet>
<!--输出实体[HRORGCONTACT]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-hrorgcontact-24-53">
<changeSet author="a_LAB01_e85d8801c" id="fk-hrorgcontact-24-54">
<addForeignKeyConstraint baseColumnNames="HRORGANIZATIONID" baseTableName="T_HRORGCONTACT" constraintName="DER1N_HRORGCONTACT_HRORGANIZAT" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGANIZATIONID" referencedTableName="ORGANIZATION" validate="true"/>
</changeSet>
<!--输出实体[HRORGANIZATION]外键关系 -->
<!--输出实体[HRPAPER]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-hrpaper-6-54">
<changeSet author="a_LAB01_e85d8801c" id="fk-hrpaper-6-55">
<addForeignKeyConstraint baseColumnNames="HREMPLOYEEID" baseTableName="T_HRPAPER" constraintName="DER1N_HRPAPER_HREMPLOYEE_HREMP" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EMPLOYEEID" referencedTableName="EMPLOYEE" validate="true"/>
</changeSet>
<!--输出实体[HRPATENT]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-hrpatent-7-55">
<changeSet author="a_LAB01_e85d8801c" id="fk-hrpatent-7-56">
<addForeignKeyConstraint baseColumnNames="HREMPLOYEEID" baseTableName="T_HRPATENT" constraintName="DER1N_HRPATENT_HREMPLOYEE_HREM" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EMPLOYEEID" referencedTableName="EMPLOYEE" validate="true"/>
</changeSet>
<!--输出实体[HRPOST]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-hrpost-106-56">
<changeSet author="a_LAB01_e85d8801c" id="fk-hrpost-107-57">
<addForeignKeyConstraint baseColumnNames="HRDUTYID" baseTableName="T_HRPOST" constraintName="DER1N_HRPOST_HRDUTY_HRDUTYID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="HRDUTYID" referencedTableName="T_HRDUTY" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-hrpost-106-57">
<changeSet author="a_LAB01_e85d8801c" id="fk-hrpost-107-58">
<addForeignKeyConstraint baseColumnNames="HRORGANIZATIONID" baseTableName="T_HRPOST" constraintName="DER1N_HRPOST_HRORGANIZATION_HR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGANIZATIONID" referencedTableName="ORGANIZATION" validate="true"/>
</changeSet>
<!--输出实体[HRPOSTREL]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-hrpostrel-29-58">
<changeSet author="a_LAB01_e85d8801c" id="fk-hrpostrel-29-59">
<addForeignKeyConstraint baseColumnNames="HRPOSTID" baseTableName="T_HRPOSTREL" constraintName="DER1N_HRPOSTREL_HRPOST_HRPOSTI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="HRPOSTID" referencedTableName="T_HRPOST" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-hrpostrel-29-59">
<changeSet author="a_LAB01_e85d8801c" id="fk-hrpostrel-29-60">
<addForeignKeyConstraint baseColumnNames="PHRPOSTID" baseTableName="T_HRPOSTREL" constraintName="DER1N_HRPOSTREL_HRPOST_PHRPOST" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="HRPOSTID" referencedTableName="T_HRPOST" validate="true"/>
</changeSet>
<!--输出实体[HRRESEARCH]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-hrresearch-8-60">
<changeSet author="a_LAB01_e85d8801c" id="fk-hrresearch-8-61">
<addForeignKeyConstraint baseColumnNames="HREMPLOYEEID" baseTableName="T_HRRESEARCH" constraintName="DER1N_HRRESEARCH_HREMPLOYEE_HR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EMPLOYEEID" referencedTableName="EMPLOYEE" validate="true"/>
</changeSet>
<!--输出实体[HRREWARD]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-hrreward-8-61">
<changeSet author="a_LAB01_e85d8801c" id="fk-hrreward-8-62">
<addForeignKeyConstraint baseColumnNames="HREMPLOYEEID" baseTableName="T_HRREWARD" constraintName="DER1N_HRREWARD_HREMPLOYEE_HREM" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EMPLOYEEID" referencedTableName="EMPLOYEE" validate="true"/>
</changeSet>
<!--输出实体[HRTECHNICALTITLE]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-hrtechnicaltitle-8-62">
<changeSet author="a_LAB01_e85d8801c" id="fk-hrtechnicaltitle-8-63">
<addForeignKeyConstraint baseColumnNames="HREMPLOYEEID" baseTableName="T_HRTECHNICALTITLE" constraintName="DER1N_HRTECHNICALTITLE_HREMPLO" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EMPLOYEEID" referencedTableName="EMPLOYEE" validate="true"/>
</changeSet>
<!--输出实体[HRTRAININGRECORD]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-hrtrainingrecord-8-63">
<changeSet author="a_LAB01_e85d8801c" id="fk-hrtrainingrecord-8-64">
<addForeignKeyConstraint baseColumnNames="HREMPLOYEEID" baseTableName="T_HRTRAININGRECORD" constraintName="DER1N_HRTRAININGRECORD_HREMPLO" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EMPLOYEEID" referencedTableName="EMPLOYEE" validate="true"/>
</changeSet>
<!--输出实体[HRWORKRECORD]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-hrworkrecord-8-64">
<changeSet author="a_LAB01_e85d8801c" id="fk-hrworkrecord-8-65">
<addForeignKeyConstraint baseColumnNames="HREMPLOYEEID" baseTableName="T_HRWORKRECORD" constraintName="DER1N_HRWORKRECORD_HREMPLOYEE_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EMPLOYEEID" referencedTableName="EMPLOYEE" validate="true"/>
</changeSet>
......
......@@ -5,7 +5,7 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="HREmployeeResultMap" databaseId="mysql">
<![CDATA[select t1.* from (SELECT (TIMESTAMPDIFF(YEAR, t1.`BIRTHDAY`, CURDATE())) AS `AGE`, t1.`BIRTHADDRESS`, t1.`BIRTHDAY`, t1.`BLOODTYPE`, t1.`CERTIFICATES`, t1.`CERTNUM`, t1.`CERTTYPE`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EMAIL`, t1.`EMPLOYEECODE`, t1.`EMPLOYEEID`, t1.`EMPLOYEENAME`, t1.`EMPSTATE`, t1.`ENTRYTYPE`, t1.`FIRSTDEGREE`, t1.`HEALTH`, t1.`HIGHESTDEGREE`, t1.`HOBBY`, t21.`JOBSTATE`, t1.`MARRIAGE`, t1.`MOBILE`, t1.`NATION`, t1.`NATIVEADDRESS`, t1.`NATIVEPLACE`, t1.`NATIVETYPE`, t1.`ORGANIZATIONID`, t11.`ORGANIZATIONNAME`, t1.`PHOTO`, t1.`POLITICAL`, t1.`POLITICALTIME`, t1.`POSTALADDRESS`, t1.`SEX`, t1.`STARTORGTIME`, t1.`STARTWORKTIME`, t1.`TECHNICALTITLE`, t1.`TELEPHONE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `EMPLOYEE` t1 LEFT JOIN ORGANIZATION t11 ON t1.ORGANIZATIONID = t11.ORGANIZATIONID LEFT JOIN T_HREMPSTATE t21 ON t1.EMPSTATE = t21.HREMPSTATEID ) t1 where employeeid=#{id}]]>
<![CDATA[select t1.* from (SELECT (TIMESTAMPDIFF(YEAR, t1.`BIRTHDAY`, CURDATE())) AS `AGE`, t1.`BIRTHADDRESS`, t1.`BIRTHDAY`, t1.`BLOODTYPE`, t1.`CERTIFICATES`, t1.`CERTNUM`, t1.`CERTTYPE`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EMAIL`, t1.`EMPLOYEECODE`, t1.`EMPLOYEEID`, t1.`EMPLOYEENAME`, t1.`EMPSTATE`, t1.`ENTRYTYPE`, t1.`FIRSTDEGREE`, t1.`HEALTH`, t1.`HIGHESTDEGREE`, t1.`HOBBY`, t41.`HRDUTYNAME`, t1.`HRPOSTID`, t31.`HRPOSTNAME`, t21.`JOBSTATE`, t1.`MARRIAGE`, t1.`MOBILE`, t1.`NATION`, t1.`NATIVEADDRESS`, t1.`NATIVEPLACE`, t1.`NATIVETYPE`, t1.`ORGANIZATIONID`, t11.`ORGANIZATIONNAME`, t1.`PHOTO`, t1.`POLITICAL`, t1.`POLITICALTIME`, t1.`POSTALADDRESS`, t1.`SEX`, t1.`STARTORGTIME`, t1.`STARTWORKTIME`, t1.`TECHNICALTITLE`, t1.`TELEPHONE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `EMPLOYEE` t1 LEFT JOIN ORGANIZATION t11 ON t1.ORGANIZATIONID = t11.ORGANIZATIONID LEFT JOIN T_HREMPSTATE t21 ON t1.EMPSTATE = t21.HREMPSTATEID LEFT JOIN T_HRPOST t31 ON t1.HRPOSTID = t31.HRPOSTID LEFT JOIN T_HRDUTY t41 ON t31.HRDUTYID = t41.HRDUTYID ) t1 where employeeid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
......@@ -13,12 +13,15 @@
<id property="employeeid" column="employeeid" /><!--主键字段映射-->
<result property="organizationid" column="organizationid" />
<result property="empstate" column="empstate" />
<result property="hrpostid" column="hrpostid" />
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="organization" javaType="cn.ibizlab.humanresource.core.base.domain.HROrganization" column="organizationid" select="cn.ibizlab.humanresource.core.base.mapper.HROrganizationMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="hrempstate" javaType="cn.ibizlab.humanresource.core.humanresource.domain.HREmpState" column="empstate" select="cn.ibizlab.humanresource.core.humanresource.mapper.HREmpStateMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="hrpost" javaType="cn.ibizlab.humanresource.core.humanresource.domain.HRPost" column="hrpostid" select="cn.ibizlab.humanresource.core.humanresource.mapper.HRPostMapper.selectById" fetchType="lazy"></association>
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_EMPLOYEE_ORGANIZATION_ORGANIZATIONID] -->
......@@ -34,6 +37,13 @@
<include refid="Default" />
) t1
where empstate=#{hrempstateid}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_HREMPLOYEE_HRPOST_HRPOSTID_BE6FB0] -->
<select id="selectByHrpostid" resultMap="HREmployeeResultMap">
select t1.* from (
<include refid="Default" />
) t1
where hrpostid=#{hrpostid}
</select>
<!--数据集合[Default]-->
......@@ -47,12 +57,12 @@
<!--数据查询[Default]-->
<sql id="Default" databaseId="mysql">
<![CDATA[ SELECT (TIMESTAMPDIFF(YEAR, t1.`BIRTHDAY`, CURDATE())) AS `AGE`, t1.`BIRTHADDRESS`, t1.`BIRTHDAY`, t1.`BLOODTYPE`, t1.`CERTIFICATES`, t1.`CERTNUM`, t1.`CERTTYPE`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EMAIL`, t1.`EMPLOYEECODE`, t1.`EMPLOYEEID`, t1.`EMPLOYEENAME`, t1.`EMPSTATE`, t1.`ENTRYTYPE`, t1.`FIRSTDEGREE`, t1.`HEALTH`, t1.`HIGHESTDEGREE`, t1.`HOBBY`, t21.`JOBSTATE`, t1.`MARRIAGE`, t1.`MOBILE`, t1.`NATION`, t1.`NATIVEADDRESS`, t1.`NATIVEPLACE`, t1.`NATIVETYPE`, t1.`ORGANIZATIONID`, t11.`ORGANIZATIONNAME`, t1.`PHOTO`, t1.`POLITICAL`, t1.`POLITICALTIME`, t1.`POSTALADDRESS`, t1.`SEX`, t1.`STARTORGTIME`, t1.`STARTWORKTIME`, t1.`TECHNICALTITLE`, t1.`TELEPHONE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `EMPLOYEE` t1 LEFT JOIN ORGANIZATION t11 ON t1.ORGANIZATIONID = t11.ORGANIZATIONID LEFT JOIN T_HREMPSTATE t21 ON t1.EMPSTATE = t21.HREMPSTATEID
<![CDATA[ SELECT (TIMESTAMPDIFF(YEAR, t1.`BIRTHDAY`, CURDATE())) AS `AGE`, t1.`BIRTHADDRESS`, t1.`BIRTHDAY`, t1.`BLOODTYPE`, t1.`CERTIFICATES`, t1.`CERTNUM`, t1.`CERTTYPE`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EMAIL`, t1.`EMPLOYEECODE`, t1.`EMPLOYEEID`, t1.`EMPLOYEENAME`, t1.`EMPSTATE`, t1.`ENTRYTYPE`, t1.`FIRSTDEGREE`, t1.`HEALTH`, t1.`HIGHESTDEGREE`, t1.`HOBBY`, t41.`HRDUTYNAME`, t1.`HRPOSTID`, t31.`HRPOSTNAME`, t21.`JOBSTATE`, t1.`MARRIAGE`, t1.`MOBILE`, t1.`NATION`, t1.`NATIVEADDRESS`, t1.`NATIVEPLACE`, t1.`NATIVETYPE`, t1.`ORGANIZATIONID`, t11.`ORGANIZATIONNAME`, t1.`PHOTO`, t1.`POLITICAL`, t1.`POLITICALTIME`, t1.`POSTALADDRESS`, t1.`SEX`, t1.`STARTORGTIME`, t1.`STARTWORKTIME`, t1.`TECHNICALTITLE`, t1.`TELEPHONE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `EMPLOYEE` t1 LEFT JOIN ORGANIZATION t11 ON t1.ORGANIZATIONID = t11.ORGANIZATIONID LEFT JOIN T_HREMPSTATE t21 ON t1.EMPSTATE = t21.HREMPSTATEID LEFT JOIN T_HRPOST t31 ON t1.HRPOSTID = t31.HRPOSTID LEFT JOIN T_HRDUTY t41 ON t31.HRDUTYID = t41.HRDUTYID
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="mysql">
<![CDATA[ SELECT (TIMESTAMPDIFF(YEAR, t1.`BIRTHDAY`, CURDATE())) AS `AGE`, t1.`BIRTHADDRESS`, t1.`BIRTHDAY`, t1.`BLOODTYPE`, t1.`CERTIFICATES`, t1.`CERTNUM`, t1.`CERTTYPE`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EMAIL`, t1.`EMPLOYEECODE`, t1.`EMPLOYEEID`, t1.`EMPLOYEENAME`, t1.`EMPSTATE`, t1.`ENTRYTYPE`, t1.`FIRSTDEGREE`, t1.`HEALTH`, t1.`HIGHESTDEGREE`, t1.`HOBBY`, t21.`JOBSTATE`, t1.`MARRIAGE`, t1.`MOBILE`, t1.`NATION`, t1.`NATIVEADDRESS`, t1.`NATIVEPLACE`, t1.`NATIVETYPE`, t1.`ORGANIZATIONID`, t11.`ORGANIZATIONNAME`, t1.`PHOTO`, t1.`POLITICAL`, t1.`POLITICALTIME`, t1.`POSTALADDRESS`, t1.`SEX`, t1.`STARTORGTIME`, t1.`STARTWORKTIME`, t1.`TECHNICALTITLE`, t1.`TELEPHONE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `EMPLOYEE` t1 LEFT JOIN ORGANIZATION t11 ON t1.ORGANIZATIONID = t11.ORGANIZATIONID LEFT JOIN T_HREMPSTATE t21 ON t1.EMPSTATE = t21.HREMPSTATEID
<![CDATA[ SELECT (TIMESTAMPDIFF(YEAR, t1.`BIRTHDAY`, CURDATE())) AS `AGE`, t1.`BIRTHADDRESS`, t1.`BIRTHDAY`, t1.`BLOODTYPE`, t1.`CERTIFICATES`, t1.`CERTNUM`, t1.`CERTTYPE`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EMAIL`, t1.`EMPLOYEECODE`, t1.`EMPLOYEEID`, t1.`EMPLOYEENAME`, t1.`EMPSTATE`, t1.`ENTRYTYPE`, t1.`FIRSTDEGREE`, t1.`HEALTH`, t1.`HIGHESTDEGREE`, t1.`HOBBY`, t41.`HRDUTYNAME`, t1.`HRPOSTID`, t31.`HRPOSTNAME`, t21.`JOBSTATE`, t1.`MARRIAGE`, t1.`MOBILE`, t1.`NATION`, t1.`NATIVEADDRESS`, t1.`NATIVEPLACE`, t1.`NATIVETYPE`, t1.`ORGANIZATIONID`, t11.`ORGANIZATIONNAME`, t1.`PHOTO`, t1.`POLITICAL`, t1.`POLITICALTIME`, t1.`POSTALADDRESS`, t1.`SEX`, t1.`STARTORGTIME`, t1.`STARTWORKTIME`, t1.`TECHNICALTITLE`, t1.`TELEPHONE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `EMPLOYEE` t1 LEFT JOIN ORGANIZATION t11 ON t1.ORGANIZATIONID = t11.ORGANIZATIONID LEFT JOIN T_HREMPSTATE t21 ON t1.EMPSTATE = t21.HREMPSTATEID LEFT JOIN T_HRPOST t31 ON t1.HRPOSTID = t31.HRPOSTID LEFT JOIN T_HRDUTY t41 ON t31.HRDUTYID = t41.HRDUTYID
]]>
</sql>
</mapper>
......
{
"systemid":"iBizHumanResources",
"systemname":"iBiz人力资源",
"unires":[
],
"entities":[
......
......@@ -342,6 +342,30 @@ public class HREmployeeDTO extends DTOBase implements Serializable {
@JsonProperty("nativeplace")
private String nativeplace;
/**
* 属性 [HRPOSTID]
*
*/
@JSONField(name = "hrpostid")
@JsonProperty("hrpostid")
private String hrpostid;
/**
* 属性 [HRPOSTNAME]
*
*/
@JSONField(name = "hrpostname")
@JsonProperty("hrpostname")
private String hrpostname;
/**
* 属性 [HRDUTYNAME]
*
*/
@JSONField(name = "hrdutyname")
@JsonProperty("hrdutyname")
private String hrdutyname;
/**
* 设置 [EMPLOYEENAME]
......@@ -591,6 +615,14 @@ public class HREmployeeDTO extends DTOBase implements Serializable {
this.modify("nativeplace",nativeplace);
}
/**
* 设置 [HRPOSTID]
*/
public void setHrpostid(String hrpostid){
this.hrpostid = hrpostid ;
this.modify("hrpostid",hrpostid);
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册