提交 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
......
......@@ -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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册