Commit 69e275b2 by 284718418@qq.com

1.人事管理

parent 4f23ff67
......@@ -211,6 +211,12 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
@ApiModelProperty(value="自定义工号",example="")
private String customNum;
@ApiModelProperty(value="对应合同公司字典ID",example="0")
private Integer zpglCompanyId;
@ApiModelProperty(value="对应工作地点典ID",example="0")
private Integer zpglGzddId;
@Transient
@TableField(exist = false)
private String workTime;//工龄
......
......@@ -197,6 +197,13 @@ public class ZpglRcxx extends Model<ZpglRcxx> {
*/
@ApiModelProperty(value = "爱好特长")
private String hobby;
/**
* 自我介绍
*/
@ApiModelProperty(value = "自我介绍")
private String contMyDesc;
/**
* 受到奖励
*/
......
......@@ -22,6 +22,7 @@ import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import javax.transaction.Transactional;
import cn.timer.api.config.enuminterface.JxglEnumInterface;
import cn.timer.api.utils.redis.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
......@@ -281,6 +282,7 @@ public class YgglController {
String zjNum = addygdaDto.getZjNum();
Integer attgroupid = addygdaDto.getAttgroupid();//考勤组id
boolean isvalid = true;
if(zjType != null){
switch (zjType) {
case 0:
isvalid = IdcardUtil.isValidCard15(zjNum) || IdcardUtil.isValidCard18(zjNum);
......@@ -303,6 +305,7 @@ public class YgglController {
default:
break;
}
}
// if (!isvalid) {
// return ResultUtil.error("证件格式不对!");
// }
......@@ -334,7 +337,10 @@ public class YgglController {
.status(CommonEnum.U_STS_ON.getType()).build().insert();
ygglMainEmp = YgglMainEmp.builder().name(name).phone(phone).zjType(zjType).zjNum(zjNum).jobType(jobType)
.jobStatus(jobStatus.SHIYONG.getType()).rzTime(rzTime).syq(syq).sex(sex)
.empNum(login.getId()).orgCode(orgCode).bmgwId(bmgwId).customNum(customNum).build();
.empNum(login.getId()).orgCode(orgCode).bmgwId(bmgwId).customNum(customNum)
.zpglCompanyId(addygdaDto.getZpglCompanyId())
.zpglGzddId(addygdaDto.getZpglGzddId())
.build();
if(addygdaDto.getAttgroupid() != null) {
KqglAssoYhkqz.builder().kqzid(attgroupid).userid(login.getId()).qyid(userBean.getOrgCode()).build().insert();
......@@ -373,7 +379,7 @@ public class YgglController {
}
}
if(syq != null){
if(syq == 0) {
ygglMainEmp.setZzTime(rzTime);
}else {
......@@ -384,6 +390,7 @@ public class YgglController {
ygglMainEmp.setZzTime(ClockInTool.strToDateLong(zztime));
}
}
ygglMainEmp.insert();
......@@ -521,9 +528,23 @@ public class YgglController {
empQuery.setEmpNums(empNums);
IPage<YgglMainEmp> ygglMainEmpPage = ygglMainEmpMapper.selectME(page, empQuery);
List<YgglMainEmp> ygglMainEmps = ygglMainEmpPage.getRecords();
return ResultUtil.data(page, ygglMainEmps);
Map<String, Object> map = new HashMap<>(9);
// 在职
map.put("list", ygglMainEmpPage.getRecords());
// 在职
map.put("zaizhi", ygglMainEmpMapper.selectEmpCount(orgCode,1));
// 全职
map.put("quanzhi", ygglMainEmpMapper.selectEmpCount(orgCode,2));
// 试用期
map.put("shiyongqi", ygglMainEmpMapper.selectEmpCount(orgCode,3));
// 正式
map.put("zhengshi", ygglMainEmpMapper.selectEmpCount(orgCode,4));
// 待离职
map.put("dailizhi", ygglMainEmpMapper.selectEmpCount(orgCode,5));
// 已离职
map.put("yilizhi", ygglMainEmpMapper.selectEmpCount(orgCode,6));
return ResultUtil.data(ygglMainEmpPage, map);
}
/**
......
......@@ -575,6 +575,8 @@ public class ZpglServiceImpl implements ZpglService {
zpglRcxx.setCompany(reumeSdkResult.getWork_company());
zpglRcxx.setZjzw(reumeSdkResult.getWork_position());
zpglRcxx.setContMyDesc(reumeSdkResult.getCont_my_desc());
zpglRcxx.setHobby(reumeSdkResult.getCont_hobby());
zpglRcxx.insert();
/** 基础信息结束 */
if (!StringUtils.isEmpty(zpglRcxx.getId())) {
......
......@@ -131,4 +131,13 @@ public interface YgglMainEmpMapper extends BaseMapper<YgglMainEmp> {
IPage<YgglMainEmp> selectME(Page<YgglMainEmp> page,@Param("param") EmpQuery empQuery);
List<DepartmentStaffDto> DepartmentStaff(Integer orgcode,Integer upid);
/**
* 查询在职员工数
* @param orgCode
* @param status 1在职 2全职 3试用期 4正式 5待离职 6已离职
* @return
*/
Integer selectEmpCount(Integer orgCode,Integer status);
}
......@@ -74,6 +74,8 @@ public class ReumeSdkResult implements Serializable {
private Date resume_parse_time;
private String resume_name;
private String avatar_data;
private String cont_my_desc;
private String cont_hobby;
private List<Education_objs> education_objs;
private List<Job_exp_objs> job_exp_objs;
private List<Proj_exp_objs> proj_exp_objs;
......
......@@ -45,15 +45,15 @@ public class AddygdaDto extends Page implements Serializable{
@ApiModelProperty(value="手机号",example="101")
private String phone;
@NotNull(message = ValidationMsg.NOTNULL)
/*@NotNull(message = ValidationMsg.NOTNULL)*/
@ApiModelProperty(value="证件类型 0:身份证;1:港澳居民来往内地通行证;2:台湾居民来往大陆通行证;3:外国护照;4:其他",example="0")
private Integer zjType;
@NotBlank(message = ValidationMsg.NOTBLANK)
/*@NotBlank(message = ValidationMsg.NOTBLANK)*/
@ApiModelProperty(value="证件号码 ",example="证件号码")
private String zjNum;
@NotNull(message = ValidationMsg.NOTNULL)
/*@NotNull(message = ValidationMsg.NOTNULL)*/
@ApiModelProperty(value="工作性质 0全职、1实习生、2兼职、3劳务派遣、4劳务、5派遣、6外包、7退休返聘",example="0")
private Integer jobType;
......@@ -62,7 +62,7 @@ public class AddygdaDto extends Page implements Serializable{
@ApiModelProperty(value="入职日期 ",example="客户注册后的时间为入职时间")
private Date rzTime;
@NotNull(message = ValidationMsg.NOTNULL)
/*@NotNull(message = ValidationMsg.NOTNULL)*/
@ApiModelProperty(value="试用期 0:无试用期;1:1个月;2:2个月;3:3个月;4:4个月;5:5个月;6:6个月(有试用期显示选项)",example="0")
private Integer syq;
......@@ -79,5 +79,11 @@ public class AddygdaDto extends Page implements Serializable{
@ApiModelProperty(value="考勤组id",example="0")
private Integer attgroupid;
@ApiModelProperty(value="对应合同公司字典ID",example="0")
private Integer zpglCompanyId;
@ApiModelProperty(value="对应工作地点典ID",example="0")
private Integer zpglGzddId;
}
......@@ -36,5 +36,8 @@ public class EmpQuery extends Page implements Serializable{
@ApiModelProperty(value = "员工id列表", example = "")
private List<Integer> empNums;
@ApiModelProperty(value="类型筛选:1在职 2全职 3试用期 4正式 5待离职 6已离职",example="1")
private Integer status;
}
......@@ -184,13 +184,30 @@
FROM yggl_main_emp a
<where>
AND a.org_code = #{param.orgCode}
AND a.job_status IN (0,1,2)
<if test="param.jobType != null">
AND a.job_type = #{param.jobType}
</if>
<if test="param.jobStatus != null">
AND a.job_status = #{param.jobStatus}
<if test="param.status == 1">
AND a.job_status BETWEEN 0 and 3
</if>
<if test="param.status == 2">
AND a.job_type = 0
</if>
<if test="param.status == 3">
AND a.job_status = 0
</if>
<if test="param.status == 4">
AND a.job_status = 1
</if>
<if test="param.status == 5">
AND a.job_status = 2
</if>
<if test="param.status == 6">
AND a.job_status = 3
</if>
<if test="param.query != null and param.query != ''">
AND (
a.name like CONCAT('%',#{param.query},'%') or
......@@ -392,5 +409,28 @@
org_code = #{orgCode}
]]>
</select>
<!-- 查询在职员工数 -->
<select id="selectEmpCount" resultType="Integer">
<if test="status != null and status != ''">
<if test="status == 1">
SELECT SUM(job_status BETWEEN 0 and 3) AS probation FROM yggl_main_emp WHERE org_code = #{orgCode}
</if>
<if test="status == 2">
SELECT SUM(job_type = 0) AS probation FROM yggl_main_emp WHERE org_code = #{orgCode}
</if>
<if test="status == 3">
SELECT SUM(job_status = 0) AS probation FROM yggl_main_emp WHERE org_code = #{orgCode}
</if>
<if test="status == 4">
SELECT SUM(job_status = 1) AS probation FROM yggl_main_emp WHERE org_code = #{orgCode}
</if>
<if test="status == 5">
SELECT SUM(job_status = 2) AS probation FROM yggl_main_emp WHERE org_code = #{orgCode}
</if>
<if test="status == 6">
SELECT SUM(job_status = 3) AS probation FROM yggl_main_lzb WHERE org_code = #{orgCode}
</if>
</if>
</select>
</mapper>
\ No newline at end of file
......@@ -37,6 +37,7 @@
<result property="workStatus" column="work_status"/>
<result property="workTimer" column="work_timer"/>
<result property="hobby" column="hobby"/>
<result property="contMyDesc" column="cont_my_desc"/>
<result property="reward" column="reward"/>
<result property="record" column="record"/>
<result property="zpglZpqdId" column="zpgl_zpqd_id"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment