Commit a28cc7ad by 东州 翁

改良人事仪表盘60%

parent 56cd4222
...@@ -9,10 +9,14 @@ import java.text.DateFormat; ...@@ -9,10 +9,14 @@ import java.text.DateFormat;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import cn.timer.api.dto.yggl.YgbintuDto;
import lombok.Getter; import lombok.Getter;
import net.sf.ehcache.search.expression.Between;
/** /**
* @date 2020年3月23日 * @date 2020年3月23日
...@@ -168,4 +172,47 @@ public interface YgEnumInterface { ...@@ -168,4 +172,47 @@ public interface YgEnumInterface {
return result.type.toString(); return result.type.toString();
} }
} }
/**
* 工龄
*/
@Getter
enum workage implements YgEnumInterface{
//NEW(0,183),HALF(1,365),ONE(2,548),ONEHALF(3,730),TWO(4,913),LONG(5,10000);
NEW(0,183,0),HALF(184,365,0),ONE(366,548,0),ONEHALF(549,730,0),TWO(731,1000,0),LONG(1001,10000,0);
private Integer begin;
private Integer end;
private Integer number;
workage(Integer begin, Integer end,Integer number) {
this.begin = begin;
this.end = end;
this.number = number;
}
public static Map<String, Integer> choose(List<YgbintuDto> bintu) {
for (YgbintuDto b : bintu) {
Integer index = b.getWorkage();
for (workage item : workage.values()) {
if (index>= item.begin && index<=item.end) {
item.number++;
System.out.println("item"+ item+":"+item.number);
}
}
}
Map<String, Integer> result = new HashMap<String, Integer>();
result.put("x<0.5", NEW.number);
result.put("0.5<x<1", HALF.number);
result.put("1<x<1.5", ONE.number);
result.put("1.5<x<2", ONEHALF.number);
result.put("2<x<3", TWO.number);
result.put("x++", LONG.number);
return result;
}
}
} }
...@@ -8,6 +8,8 @@ package cn.timer.api.controller.yggl; ...@@ -8,6 +8,8 @@ package cn.timer.api.controller.yggl;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
...@@ -15,6 +17,7 @@ import java.util.List; ...@@ -15,6 +17,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import java.util.stream.Collectors;
import javax.transaction.Transactional; import javax.transaction.Transactional;
...@@ -68,19 +71,23 @@ import cn.timer.api.dao.yggl.YgMzDtoMapper; ...@@ -68,19 +71,23 @@ import cn.timer.api.dao.yggl.YgMzDtoMapper;
import cn.timer.api.dao.yggl.YgProDtoMapper; import cn.timer.api.dao.yggl.YgProDtoMapper;
import cn.timer.api.dao.yggl.YgglMainEmpMapper; import cn.timer.api.dao.yggl.YgglMainEmpMapper;
import cn.timer.api.dao.yggl.YgglMainLzbMapper; import cn.timer.api.dao.yggl.YgglMainLzbMapper;
import cn.timer.api.dao.yggl.YgtitleDtoMapper;
import cn.timer.api.dao.zzgl.ZzglBmgwMMapper; import cn.timer.api.dao.zzgl.ZzglBmgwMMapper;
import cn.timer.api.dto.yggl.AddygdaDto; import cn.timer.api.dto.yggl.AddygdaDto;
import cn.timer.api.dto.yggl.LzbQueryDto; import cn.timer.api.dto.yggl.LzbQueryDto;
import cn.timer.api.dto.yggl.LzygQueryDto; import cn.timer.api.dto.yggl.LzygQueryDto;
import cn.timer.api.dto.yggl.YgAreaDto; import cn.timer.api.dto.yggl.YgAreaDto;
import cn.timer.api.dto.yggl.YgCartogramDto;
import cn.timer.api.dto.yggl.YgCityDto; import cn.timer.api.dto.yggl.YgCityDto;
import cn.timer.api.dto.yggl.YgDrjqbDto; import cn.timer.api.dto.yggl.YgDrjqbDto;
import cn.timer.api.dto.yggl.YgDrsDto; import cn.timer.api.dto.yggl.YgDrsDto;
import cn.timer.api.dto.yggl.YgProDto; import cn.timer.api.dto.yggl.YgProDto;
import cn.timer.api.dto.yggl.YgQueryDto; import cn.timer.api.dto.yggl.YgQueryDto;
import cn.timer.api.dto.yggl.YgbintuDto;
import cn.timer.api.dto.yggl.YgglCartogramDto; import cn.timer.api.dto.yggl.YgglCartogramDto;
import cn.timer.api.dto.yggl.YgjgDto; import cn.timer.api.dto.yggl.YgjgDto;
import cn.timer.api.dto.yggl.YgmzDto; import cn.timer.api.dto.yggl.YgmzDto;
import cn.timer.api.dto.yggl.YgtitleDto;
import cn.timer.api.dto.yggl.YgzzDto; import cn.timer.api.dto.yggl.YgzzDto;
import cn.timer.api.utils.Md5; import cn.timer.api.utils.Md5;
import cn.timer.api.utils.Result; import cn.timer.api.utils.Result;
...@@ -122,6 +129,9 @@ public class YgglController { ...@@ -122,6 +129,9 @@ public class YgglController {
//weng(民族) //weng(民族)
@Autowired @Autowired
private YgMzDtoMapper ygMzDtoMapper; private YgMzDtoMapper ygMzDtoMapper;
//weng(人事仪表盘)
@Autowired
private YgtitleDtoMapper ygtitleDtoMapper;
/** /**
* 获取员工档案 * 获取员工档案
* @param * @param
...@@ -1465,7 +1475,53 @@ public class YgglController { ...@@ -1465,7 +1475,53 @@ public class YgglController {
return ResultUtil.data(map, "查询成功"); return ResultUtil.data(map, "查询成功");
} }
/** /**
* 获取成长记录表 * 员工信息统计图
* @return 成功信息(weng)
*/
@GetMapping("/Cartogram")
@ApiOperation(value = "获取员工管理统计图信息", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 63)
public Result<Map<String, Object>> ygCartogram(@CurrentUser UserBean userBean) {
List<YgbintuDto> bintu = ygglMainEmpMapper.rsybp();
bintu.stream().filter(bean ->{
if (bean.getAge() == null) {
bean.setAge(-1);
}
if (bean.getBm() == null) {
bean.setBm("未分配");
}
if (bean.getGw() == null) {
bean.setGw("未分配");
}
if (bean.getProname() == null) {
bean.setProname("未分配");
}
if (bean.getEduname() == null) {
bean.setEduname("未分配");
}
if (bean.getJobStatus() == null) {
bean.setJobStatus(-1);
}
return true;
}).collect(Collectors.toList());
YgtitleDto title = new LambdaQueryChainWrapper<YgtitleDto>(ygtitleDtoMapper).eq(YgtitleDto::getOrgCode, userBean.getOrgCode()).one();
//Map<String, List<YgbintuDto>> map = bintu.stream().collect(Collectors.groupingBy(YgbintuDto::getGw));岗位
//Map<String, List<YgbintuDto>> map = bintu.stream().collect(Collectors.groupingBy(YgbintuDto::getBm));部门
Map<String, Map<String, Long>> bmgw = bintu.stream().collect(Collectors.groupingBy(YgbintuDto::getBm,Collectors.groupingBy(YgbintuDto::getGw,Collectors.counting())));
Map<String, List<YgbintuDto>> edu = bintu.stream().collect(Collectors.groupingBy(YgbintuDto::getEduname));
Map<Integer, List<YgbintuDto>> jobStatus = bintu.stream().collect(Collectors.groupingBy(YgbintuDto::getJobStatus));
Map<String, List<YgbintuDto>> proname = bintu.stream().collect(Collectors.groupingBy(YgbintuDto::getProname));
Map<String, Integer> workage = YgEnumInterface.workage.choose(bintu);
System.out.println(bmgw);
System.out.println(edu);
System.out.println(jobStatus);
System.out.println(proname);
System.out.println(workage);
return ResultUtil.success();
}
/**
* 获取员工社保公积金
* @param * @param
* @return * @return
*/ */
......
package cn.timer.api.dao.yggl; package cn.timer.api.dao.yggl;
import java.util.List; import java.util.List;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.yggl.YgglMainEmp; import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.config.annotation.UserBean; import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.dto.yggl.YgQueryDto; import cn.timer.api.dto.yggl.YgCartogramDto;
import cn.timer.api.dto.yggl.YgglCartogramDto; import cn.timer.api.dto.yggl.YgQueryDto;
import cn.timer.api.dto.yggl.YgbintuDto;
/** import cn.timer.api.dto.yggl.YgglCartogramDto;
* 员工档案+统计图查询
* /**
* @author dsc 2019-11-23 * 员工档案+统计图查询
*/ *
@Repository * @author dsc 2019-11-23
public interface YgglMainEmpMapper extends BaseMapper<YgglMainEmp> { */
@Repository
/** public interface YgglMainEmpMapper extends BaseMapper<YgglMainEmp> {
* 查询员工信息 /**
* @param userBean * 人事仪表盘
* @return * @param userBean
*/ * @return
List<YgQueryDto> queryEmpMessage(UserBean userBean); */
List<YgbintuDto> rsybp();
/** /**
* 查询在职员工(试用员工人数+正式员工人数) * 查询员工信息
* @param userBean * @param userBean
* @return * @return
*/ */
YgglCartogramDto queryInservice(UserBean userBean); List<YgQueryDto> queryEmpMessage(UserBean userBean);
/**
* 查询当月入职人数 /**
* @param userBean * 查询在职员工(试用员工人数+正式员工人数)
* @return * @param userBean
*/ * @return
YgglCartogramDto queryInduction(UserBean userBean); */
YgglCartogramDto queryInservice(UserBean userBean);
/**
* 查询本月转正人数 /**
* @param userBean * 查询当月入职人数
* @return * @param userBean
*/ * @return
YgglCartogramDto queryPositive(UserBean userBean); */
YgglCartogramDto queryInduction(UserBean userBean);
/**
* 查询员工平均年龄 /**
* @param userBean * 查询本月转正人数
* @return * @param userBean
*/ * @return
YgglCartogramDto queryAvgAge(UserBean userBean); */
YgglCartogramDto queryPositive(UserBean userBean);
/**
* 查询部门名称及人数 /**
* @param userBean * 查询员工平均年龄
* @return * @param userBean
*/ * @return
List<YgglCartogramDto> queryDepartmentNum(UserBean userBean); */
YgglCartogramDto queryAvgAge(UserBean userBean);
/**
* 查询岗位名称及人数 /**
* @param userBean * 查询部门名称及人数
* @return * @param userBean
*/ * @return
List<YgglCartogramDto> queryJobsNum(UserBean userBean); */
List<YgglCartogramDto> queryDepartmentNum(UserBean userBean);
/**
* 学历及人数查询 /**
* @param userBean * 查询岗位名称及人数
* @return * @param userBean
*/ * @return
List<YgglCartogramDto> queryEducation(UserBean userBean); */
List<YgglCartogramDto> queryJobsNum(UserBean userBean);
/**
* 员工年龄分布查询 /**
* @param userBean * 学历及人数查询
* @return * @param userBean
*/ * @return
List<YgglCartogramDto> queryEmpAge(UserBean userBean); */
List<YgglCartogramDto> queryEducation(UserBean userBean);
/**
* 籍贯统计(省份)人数分布查询 /**
* @param userBean * 员工年龄分布查询
* @return * @param userBean
*/ * @return
List<YgglCartogramDto> queryNativeplace(UserBean userBean); */
List<YgglCartogramDto> queryEmpAge(UserBean userBean);
/**
* 员工工龄分布查询 /**
* @param userBean * 籍贯统计(省份)人数分布查询
* @return * @param userBean
*/ * @return
List<YgglCartogramDto> queryWorkingAge(UserBean userBean); */
} List<YgglCartogramDto> queryNativeplace(UserBean userBean);
/**
* 员工工龄分布查询
* @param userBean
* @return
*/
List<YgglCartogramDto> queryWorkingAge(UserBean userBean);
}
package cn.timer.api.dao.yggl;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.dto.yggl.YgtitleDto;
/**
* 人事仪表盘饼图表
* @author Tang 2019-11-15
*/
@Repository
public interface YgtitleDtoMapper extends BaseMapper<YgtitleDto> {
}
/**
* @date 2020年4月1日
* @author 翁东州
* @方法中文名称:
*/
package cn.timer.api.dto.yggl;
import io.swagger.annotations.ApiModelProperty;
/**
* @date 2020年4月1日
* @author 翁东州
* @方法中文名称:
*/
public class YgCartogramDto {
@ApiModelProperty(value="统计图--标头 ",example="标头")
private YgtitleDto ygtitleDto;
@ApiModelProperty(value="统计图--饼图和直方图 ",example="饼图和直方图")
private YgbintuDto ygbintuDto;
}
package cn.timer.api.dto.yggl;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author Tang 2019-11-15
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("统计图--饼图和直方图")
public class YgbintuDto{
@Id
@GeneratedValue
@TableId (type = IdType.AUTO)
@ApiModelProperty(value="编号",example="1")
private Integer id;
@ApiModelProperty(value="年龄 ",example="省编码")
private Integer age;
@ApiModelProperty(value="部门岗位id",example="市编码")
private Integer bmgwId;
@ApiModelProperty(value="岗位名",example="市编码")
private String gw;
@ApiModelProperty(value="部门名",example="市编码")
private String bm;
@ApiModelProperty(value="籍贯省份",example="名字")
private String proname;
@ApiModelProperty(value="学历",example="名字")
private String eduname;
@ApiModelProperty(value="员工状态",example="名字")
private Integer jobStatus;
@ApiModelProperty(value="工龄天数",example="名字")
private Integer workage;
}
package cn.timer.api.dto.yggl;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author Tang 2019-11-15
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("yggl_atta_title")
@ApiModel("统计图--标头")
public class YgtitleDto{
@Id
@GeneratedValue
@TableId (type = IdType.AUTO)
@ApiModelProperty(value="id编号",example="1")
private Integer id;
@ApiModelProperty(value="在职人数",example="1")
private Integer zaizhi;
@ApiModelProperty(value="本月新入职 ",example="1")
private Integer xinruzhi;
@ApiModelProperty(value="本月离职",example="1")
private Integer lizhi;
@ApiModelProperty(value="本月转正",example="1")
private Integer zhuanzhen;
@ApiModelProperty(value="平均年龄",example="22")
private Integer nianlin;
@ApiModelProperty(value="组织机构代码",example="117")
private Integer orgCode;
}
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.timer.api.dao.yggl.YgglMainEmpMapper"> <mapper namespace="cn.timer.api.dao.yggl.YgglMainEmpMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.yggl.YgglMainEmp" > <resultMap id="BaseResultMap" type="cn.timer.api.bean.yggl.YgglMainEmp" >
<id column="id" property="id" /> <id column="id" property="id" />
<result column="emp_num" property="empNum" /> <result column="emp_num" property="empNum" />
<result column="phone" property="phone" /> <result column="phone" property="phone" />
<result column="password" property="password" /> <result column="password" property="password" />
<result column="head_url" property="headUrl" /> <result column="head_url" property="headUrl" />
<result column="name" property="name" /> <result column="name" property="name" />
<result column="english_name" property="englishName" /> <result column="english_name" property="englishName" />
<result column="sex" property="sex" /> <result column="sex" property="sex" />
<result column="zj_type" property="zjType" /> <result column="zj_type" property="zjType" />
<result column="zj_num" property="zjNum" /> <result column="zj_num" property="zjNum" />
<result column="sfzyx_time" property="sfzyxTime" /> <result column="sfzyx_time" property="sfzyxTime" />
<result column="birthday" property="birthday" /> <result column="birthday" property="birthday" />
<result column="age" property="age" /> <result column="age" property="age" />
<result column="is_married" property="isMarried" /> <result column="is_married" property="isMarried" />
<result column="is_pregnant" property="isPregnant" /> <result column="is_pregnant" property="isPregnant" />
<result column="area" property="area" /> <result column="area" property="area" />
<result column="mz" property="mz" /> <result column="mz" property="mz" />
<result column="zzmm" property="zzmm" /> <result column="zzmm" property="zzmm" />
<result column="jg" property="jg" /> <result column="jg" property="jg" />
<result column="city" property="city" /> <result column="city" property="city" />
<result column="hk_type" property="hkType" /> <result column="hk_type" property="hkType" />
<result column="hk_address" property="hkAddress" /> <result column="hk_address" property="hkAddress" />
<result column="qq" property="qq" /> <result column="qq" property="qq" />
<result column="wechat" property="wechat" /> <result column="wechat" property="wechat" />
<result column="email" property="email" /> <result column="email" property="email" />
<result column="blood_type" property="bloodType" /> <result column="blood_type" property="bloodType" />
<result column="language" property="language" /> <result column="language" property="language" />
<result column="edu" property="edu" /> <result column="edu" property="edu" />
<result column="zy" property="zy" /> <result column="zy" property="zy" />
<result column="zz_remark" property="zzRemark" /> <result column="zz_remark" property="zzRemark" />
<result column="job_type" property="jobType" /> <result column="job_type" property="jobType" />
<result column="job_status" property="jobStatus" /> <result column="job_status" property="jobStatus" />
<result column="rz_time" property="rzTime" /> <result column="rz_time" property="rzTime" />
<result column="syq" property="syq" /> <result column="syq" property="syq" />
<result column="zz_time" property="zzTime" /> <result column="zz_time" property="zzTime" />
<result column="sjzz_time" property="sjzzTime" /> <result column="sjzz_time" property="sjzzTime" />
<result column="is_jrkq" property="isJrkq" /> <result column="is_jrkq" property="isJrkq" />
<result column="job_num" property="jobNum" /> <result column="job_num" property="jobNum" />
<result column="work_address" property="workAddress" /> <result column="work_address" property="workAddress" />
<result column="work_phone" property="workPhone" /> <result column="work_phone" property="workPhone" />
<result column="work_email" property="workEmail" /> <result column="work_email" property="workEmail" />
<result column="zpqd" property="zpqd" /> <result column="zpqd" property="zpqd" />
<result column="bmgw_id" property="bmgwId" /> <result column="bmgw_id" property="bmgwId" />
<result column="org_code" property="orgCode" /> <result column="org_code" property="orgCode" />
<result column="unionid" property="unionid" /> <result column="unionid" property="unionid" />
<result column="openid" property="openid" /> <result column="openid" property="openid" />
<result column="mpopenid" property="mpopenid" /> <result column="mpopenid" property="mpopenid" />
<result column="appopenid" property="appopenid" /> <result column="appopenid" property="appopenid" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <resultMap id="Bintu" type="cn.timer.api.dto.yggl.YgbintuDto" >
id, <id column="id" property="id" />
emp_num, <result column="age" property="age" />
phone, <result column="bmgwId" property="bmgwId" />
password, <result column="gw" property="gw" />
head_url, <result column="bm" property="bm" />
name, <result column="proname" property="proname" />
english_name, <result column="eduname" property="eduname" />
sex, <result column="jobStatus" property="jobStatus" />
zj_type, <result column="workage" property="workage" />
zj_num, </resultMap>
sfzyx_time,
birthday, <sql id="Base_Column_List">
age, id,
is_married, emp_num,
is_pregnant, phone,
area, password,
mz, head_url,
zzmm, name,
jg, english_name,
city, sex,
hk_type, zj_type,
hk_address, zj_num,
qq, sfzyx_time,
wechat, birthday,
email, age,
blood_type, is_married,
language, is_pregnant,
edu, area,
zy, mz,
zz_remark, zzmm,
job_type, jg,
job_status, city,
rz_time, hk_type,
syq, hk_address,
zz_time, qq,
sjzz_time, wechat,
is_jrkq, email,
job_num, blood_type,
work_address, language,
work_phone, edu,
work_email, zy,
zpqd, zz_remark,
bmgw_id, job_type,
org_code, job_status,
unionid, rz_time,
openid, syq,
mpopenid, zz_time,
appopenid sjzz_time,
</sql> is_jrkq,
job_num,
<sql id="Base_Column_List_Alias"> work_address,
id YgglMainEmp_id, work_phone,
emp_num YgglMainEmp_emp_num, work_email,
phone YgglMainEmp_phone, zpqd,
password YgglMainEmp_password, bmgw_id,
head_url YgglMainEmp_head_url, org_code,
name YgglMainEmp_name, unionid,
english_name YgglMainEmp_english_name, openid,
sex YgglMainEmp_sex, mpopenid,
zj_type YgglMainEmp_zj_type, appopenid
zj_num YgglMainEmp_zj_num, </sql>
sfzyx_time YgglMainEmp_sfzyx_time,
birthday YgglMainEmp_birthday, <sql id="Base_Column_List_Alias">
age YgglMainEmp_age, id YgglMainEmp_id,
is_married YgglMainEmp_is_married, emp_num YgglMainEmp_emp_num,
is_pregnant YgglMainEmp_is_pregnant, phone YgglMainEmp_phone,
area YgglMainEmp_area, password YgglMainEmp_password,
mz YgglMainEmp_mz, head_url YgglMainEmp_head_url,
zzmm YgglMainEmp_zzmm, name YgglMainEmp_name,
jg YgglMainEmp_jg, english_name YgglMainEmp_english_name,
city YgglMainEmp_city, sex YgglMainEmp_sex,
hk_type YgglMainEmp_hk_type, zj_type YgglMainEmp_zj_type,
hk_address YgglMainEmp_hk_address, zj_num YgglMainEmp_zj_num,
qq YgglMainEmp_qq, sfzyx_time YgglMainEmp_sfzyx_time,
wechat YgglMainEmp_wechat, birthday YgglMainEmp_birthday,
email YgglMainEmp_email, age YgglMainEmp_age,
blood_type YgglMainEmp_blood_type, is_married YgglMainEmp_is_married,
language YgglMainEmp_language, is_pregnant YgglMainEmp_is_pregnant,
edu YgglMainEmp_edu, area YgglMainEmp_area,
zy YgglMainEmp_zy, mz YgglMainEmp_mz,
zz_remark YgglMainEmp_zz_remark, zzmm YgglMainEmp_zzmm,
job_type YgglMainEmp_job_type, jg YgglMainEmp_jg,
job_status YgglMainEmp_job_status, city YgglMainEmp_city,
rz_time YgglMainEmp_rz_time, hk_type YgglMainEmp_hk_type,
syq YgglMainEmp_syq, hk_address YgglMainEmp_hk_address,
zz_time YgglMainEmp_zz_time, qq YgglMainEmp_qq,
sjzz_time YgglMainEmp_sjzz_time, wechat YgglMainEmp_wechat,
is_jrkq YgglMainEmp_is_jrkq, email YgglMainEmp_email,
job_num YgglMainEmp_job_num, blood_type YgglMainEmp_blood_type,
work_address YgglMainEmp_work_address, language YgglMainEmp_language,
work_phone YgglMainEmp_work_phone, edu YgglMainEmp_edu,
work_email YgglMainEmp_work_email, zy YgglMainEmp_zy,
zpqd YgglMainEmp_zpqd, zz_remark YgglMainEmp_zz_remark,
bmgw_id YgglMainEmp_bmgw_id, job_type YgglMainEmp_job_type,
org_code YgglMainEmp_org_code, job_status YgglMainEmp_job_status,
unionid YgglMainEmp_unionid, rz_time YgglMainEmp_rz_time,
openid YgglMainEmp_openid, syq YgglMainEmp_syq,
mpopenid YgglMainEmp_mpopenid, zz_time YgglMainEmp_zz_time,
appopenid YgglMainEmp_appopenid sjzz_time YgglMainEmp_sjzz_time,
</sql> is_jrkq YgglMainEmp_is_jrkq,
job_num YgglMainEmp_job_num,
<!-- 查询员工信息 搜索 分页 --> work_address YgglMainEmp_work_address,
<select id="queryEmpMessage" resultType="cn.timer.api.dto.yggl.YgQueryDto"> work_phone YgglMainEmp_work_phone,
SELECT work_email YgglMainEmp_work_email,
a. NAME empName, zpqd YgglMainEmp_zpqd,
a.emp_num empNum, bmgw_id YgglMainEmp_bmgw_id,
b. NAME deptName, org_code YgglMainEmp_org_code,
a.rz_time rzTime, unionid YgglMainEmp_unionid,
a.job_type jobType, openid YgglMainEmp_openid,
a.phone phone, mpopenid YgglMainEmp_mpopenid,
a.job_status jobStatus appopenid YgglMainEmp_appopenid
FROM </sql>
yggl_main_emp a <!-- rsybp人事仪表盘 -->
LEFT JOIN zzgl_bmgw_m b ON a.bmgw_id = b.id <select id="rsybp" resultMap="Bintu">
WHERE SELECT e.id AS id,e.age AS age,e.bmgw_id AS bmgwId,b.`name` AS gw,bb.`name` AS bm, p.`name` AS proname,d.`name` AS eduname,e.job_status AS jobStatus,datediff(CURDATE(),e.rz_time) AS workage
a.org_code = #{orgCode} FROM yggl_main_emp e
AND LEFT JOIN zzgl_bmgw_m b ON b.id = e.bmgw_id
a.job_status != 4 LEFT JOIN zzgl_bmgw_m bb ON bb.id = b.up_id
ORDER BY LEFT JOIN province_class p ON left (e.`jg`,2) = p.province
emp_num DESC LEFT JOIN education_class d ON d.number = e.edu
</select> WHERE e.org_code = 117 AND b.org_code =117;
</select>
<!-- 查询在职员工(试用员工人数+正式员工人数) --> <!-- 查询员工信息 搜索 分页 -->
<select id="queryInservice" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> <select id="queryEmpMessage" resultType="cn.timer.api.dto.yggl.YgQueryDto">
SELECT SELECT
SUM(job_status=1) AS probation, a. NAME empName,
SUM(job_status=2) AS regular a.emp_num empNum,
FROM b. NAME deptName,
yggl_main_emp a.rz_time rzTime,
WHERE a.job_type jobType,
org_code=#{orgCode} a.phone phone,
</select> a.job_status jobStatus
FROM
<!-- 查询当月入职人数 --> yggl_main_emp a
<select id="queryInduction" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> LEFT JOIN zzgl_bmgw_m b ON a.bmgw_id = b.id
SELECT WHERE
EXTRACT(MONTH FROM rz_time) AS month, a.org_code = #{orgCode}
COUNT(emp_num) induction AND
FROM a.job_status != 4
yggl_main_emp ORDER BY
WHERE emp_num DESC
org_code=#{orgCode} </select>
</select>
<!-- 查询在职员工(试用员工人数+正式员工人数) -->
<select id="queryInservice" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
<!-- 查询本月转正人数 --> SELECT
<select id="queryPositive" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> SUM(job_status=1) AS probation,
SELECT SUM(job_status=2) AS regular
EXTRACT(MONTH FROM sjzz_time) AS month, FROM
COUNT(emp_num) positive yggl_main_emp
FROM WHERE
yggl_main_emp org_code=#{orgCode}
WHERE </select>
org_code=#{orgCode}
</select> <!-- 查询当月入职人数 -->
<select id="queryInduction" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
<!-- 查询员工平均年龄 --> SELECT
<select id="queryAvgAge" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> EXTRACT(MONTH FROM rz_time) AS month,
SELECT COUNT(emp_num) induction
avg(age) avgAge FROM
FROM yggl_main_emp
yggl_main_emp WHERE
WHERE org_code=#{orgCode}
org_code=#{orgCode} </select>
</select>
<!-- 查询岗位上级部门id及名称及人数 --> <!-- 查询本月转正人数 -->
<select id="queryDepartmentNum" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> <select id="queryPositive" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
SELECT SELECT
IFNULL(c.name,'null') updeptname, EXTRACT(MONTH FROM sjzz_time) AS month,
IFNULL(b.up_id,0) updeptid, COUNT(emp_num) positive
count(1) updeptnum FROM
FROM yggl_main_emp
yggl_main_emp y WHERE
LEFT JOIN zzgl_bmgw_m b ON y.bmgw_id = b.id org_code=#{orgCode}
LEFT JOIN zzgl_bmgw_m c ON c.id = b.up_id </select>
WHERE
y.org_code = #{orgCode} <!-- 查询员工平均年龄 -->
GROUP BY <select id="queryAvgAge" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
c.name, SELECT
b.up_id avg(age) avgAge
</select> FROM
yggl_main_emp
<!-- 查询岗位名称及人数 --> WHERE
<select id="queryJobsNum" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> org_code=#{orgCode}
SELECT </select>
IFNULL(b.name,'null') jobname,
IFNULL(y.bmgw_id,0) jobid, <!-- 查询岗位上级部门id及名称及人数 -->
count(1) jobnum <select id="queryDepartmentNum" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
FROM SELECT
yggl_main_emp y IFNULL(c.name,'null') updeptname,
LEFT JOIN zzgl_bmgw_m b ON y.bmgw_id = b.id IFNULL(b.up_id,0) updeptid,
WHERE count(1) updeptnum
y.org_code = #{orgCode} FROM
GROUP BY yggl_main_emp y
y.bmgw_id, LEFT JOIN zzgl_bmgw_m b ON y.bmgw_id = b.id
b.name; LEFT JOIN zzgl_bmgw_m c ON c.id = b.up_id
</select> WHERE
y.org_code = #{orgCode}
<!-- 学历及人数查询 --> GROUP BY
<select id="queryEducation" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> c.name,
SELECT b.up_id
IFNULL(e.name,'null') education,count(y.edu) educationNum </select>
FROM
yggl_main_emp y <!-- 查询岗位名称及人数 -->
LEFT JOIN <select id="queryJobsNum" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
education_class e SELECT
ON IFNULL(b.name,'null') jobname,
y.edu = e.id IFNULL(y.bmgw_id,0) jobid,
WHERE count(1) jobnum
org_code = #{orgCode} FROM
GROUP BY yggl_main_emp y
e.name LEFT JOIN zzgl_bmgw_m b ON y.bmgw_id = b.id
ORDER BY WHERE
e.id ASC y.org_code = #{orgCode}
</select> GROUP BY
y.bmgw_id,
<!-- 员工年龄分布查询 --> b.name;
<select id="queryEmpAge" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> </select>
<![CDATA[
SELECT <!-- 学历及人数查询 -->
SUM((CASE WHEN age < 0.5 THEN 1 ELSE 0 END)) AS lowerEighteen, <select id="queryEducation" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
SUM((CASE WHEN age >= 18 AND age < 25 THEN 1 ELSE 0 END)) AS eighteenToTwentyfive, SELECT
SUM((CASE WHEN age >= 25 AND age < 32 THEN 1 ELSE 0 END)) AS twentyfiveToThirtytwo, IFNULL(e.name,'null') education,count(y.edu) educationNum
SUM((CASE WHEN age >= 32 AND age < 38 THEN 1 ELSE 0 END)) AS thirtytwoToThirtyeight, FROM
SUM((CASE WHEN age >= 38 AND age < 45 THEN 1 ELSE 0 END)) AS thirtyeightToFortyfive, yggl_main_emp y
SUM((CASE WHEN age >=45 THEN 1 ELSE 0 END)) AS higherFortyfive LEFT JOIN
FROM education_class e
yggl_main_emp ON
WHERE y.edu = e.id
org_code = #{orgCode} WHERE
]]> org_code = #{orgCode}
</select> GROUP BY
e.name
<!-- 籍贯统计(省份)查询 --> ORDER BY
<select id="queryNativeplace" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> e.id ASC
SELECT </select>
IFNULL(c.name,'null') province,count(y.jg) provinceNum
FROM <!-- 员工年龄分布查询 -->
yggl_main_emp y <select id="queryEmpAge" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
LEFT JOIN <![CDATA[
city_class c SELECT
ON SUM((CASE WHEN age < 0.5 THEN 1 ELSE 0 END)) AS lowerEighteen,
y.jg = c.id SUM((CASE WHEN age >= 18 AND age < 25 THEN 1 ELSE 0 END)) AS eighteenToTwentyfive,
WHERE SUM((CASE WHEN age >= 25 AND age < 32 THEN 1 ELSE 0 END)) AS twentyfiveToThirtytwo,
org_code = #{orgCode} SUM((CASE WHEN age >= 32 AND age < 38 THEN 1 ELSE 0 END)) AS thirtytwoToThirtyeight,
GROUP BY SUM((CASE WHEN age >= 38 AND age < 45 THEN 1 ELSE 0 END)) AS thirtyeightToFortyfive,
c.name SUM((CASE WHEN age >=45 THEN 1 ELSE 0 END)) AS higherFortyfive
</select> FROM
yggl_main_emp
<!-- 员工工龄分布查询 --> WHERE
<select id="queryWorkingAge" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> org_code = #{orgCode}
<![CDATA[ ]]>
SELECT </select>
SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 < 0.5 THEN 1 ELSE 0 END)) AS lowerHalfyear,
SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 >= 0.5 AND TIMESTAMPDIFF(day, rz_time,now())/365 < 1 THEN 1 ELSE 0 END)) AS halfYear, <!-- 籍贯统计(省份)查询 -->
SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 >= 1 AND TIMESTAMPDIFF(day, rz_time,now())/365 < 1.5 THEN 1 ELSE 0 END)) AS oneYear, <select id="queryNativeplace" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 >= 1.5 AND TIMESTAMPDIFF(day, rz_time,now())/365 < 2 THEN 1 ELSE 0 END)) AS onehalfYear, SELECT
SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 >= 2 AND TIMESTAMPDIFF(day, rz_time,now())/365 < 2.5 THEN 1 ELSE 0 END)) AS twoYear, IFNULL(c.name,'null') province,count(y.jg) provinceNum
SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 >=2.5 THEN 1 ELSE 0 END)) AS higherTwohalfYear FROM
FROM yggl_main_emp y
yggl_main_emp LEFT JOIN
WHERE city_class c
org_code = #{orgCode} ON
]]> y.jg = c.id
</select> WHERE
org_code = #{orgCode}
<!-- GROUP BY
c.name
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.yggl.YgglMainEmp"> </select>
INSERT INTO yggl_main_emp
<trim prefix="(" suffix=")" suffixOverrides=","> <!-- 员工工龄分布查询 -->
<if test ='null != empNum'> <select id="queryWorkingAge" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
emp_num, <![CDATA[
</if> SELECT
<if test ='null != phone'> SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 < 0.5 THEN 1 ELSE 0 END)) AS lowerHalfyear,
phone, SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 >= 0.5 AND TIMESTAMPDIFF(day, rz_time,now())/365 < 1 THEN 1 ELSE 0 END)) AS halfYear,
</if> SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 >= 1 AND TIMESTAMPDIFF(day, rz_time,now())/365 < 1.5 THEN 1 ELSE 0 END)) AS oneYear,
<if test ='null != password'> SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 >= 1.5 AND TIMESTAMPDIFF(day, rz_time,now())/365 < 2 THEN 1 ELSE 0 END)) AS onehalfYear,
password, SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 >= 2 AND TIMESTAMPDIFF(day, rz_time,now())/365 < 2.5 THEN 1 ELSE 0 END)) AS twoYear,
</if> SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 >=2.5 THEN 1 ELSE 0 END)) AS higherTwohalfYear
<if test ='null != headUrl'> FROM
head_url, yggl_main_emp
</if> WHERE
<if test ='null != name'> org_code = #{orgCode}
name, ]]>
</if> </select>
<if test ='null != englishName'>
english_name, <!--
</if>
<if test ='null != sex'> <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.yggl.YgglMainEmp">
sex, INSERT INTO yggl_main_emp
</if> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != zjType'> <if test ='null != empNum'>
zj_type, emp_num,
</if> </if>
<if test ='null != zjNum'> <if test ='null != phone'>
zj_num, phone,
</if> </if>
<if test ='null != sfzyxTime'> <if test ='null != password'>
sfzyx_time, password,
</if> </if>
<if test ='null != birthday'> <if test ='null != headUrl'>
birthday, head_url,
</if> </if>
<if test ='null != age'> <if test ='null != name'>
age, name,
</if> </if>
<if test ='null != isMarried'> <if test ='null != englishName'>
is_married, english_name,
</if> </if>
<if test ='null != isPregnant'> <if test ='null != sex'>
is_pregnant, sex,
</if> </if>
<if test ='null != area'> <if test ='null != zjType'>
area, zj_type,
</if> </if>
<if test ='null != mz'> <if test ='null != zjNum'>
mz, zj_num,
</if> </if>
<if test ='null != zzmm'> <if test ='null != sfzyxTime'>
zzmm, sfzyx_time,
</if> </if>
<if test ='null != jg'> <if test ='null != birthday'>
jg, birthday,
</if> </if>
<if test ='null != city'> <if test ='null != age'>
city, age,
</if> </if>
<if test ='null != hkType'> <if test ='null != isMarried'>
hk_type, is_married,
</if> </if>
<if test ='null != hkAddress'> <if test ='null != isPregnant'>
hk_address, is_pregnant,
</if> </if>
<if test ='null != qq'> <if test ='null != area'>
qq, area,
</if> </if>
<if test ='null != wechat'> <if test ='null != mz'>
wechat, mz,
</if> </if>
<if test ='null != email'> <if test ='null != zzmm'>
email, zzmm,
</if> </if>
<if test ='null != bloodType'> <if test ='null != jg'>
blood_type, jg,
</if> </if>
<if test ='null != language'> <if test ='null != city'>
language, city,
</if> </if>
<if test ='null != edu'> <if test ='null != hkType'>
edu, hk_type,
</if> </if>
<if test ='null != zy'> <if test ='null != hkAddress'>
zy, hk_address,
</if> </if>
<if test ='null != zzRemark'> <if test ='null != qq'>
zz_remark, qq,
</if> </if>
<if test ='null != jobType'> <if test ='null != wechat'>
job_type, wechat,
</if> </if>
<if test ='null != jobStatus'> <if test ='null != email'>
job_status, email,
</if> </if>
<if test ='null != rzTime'> <if test ='null != bloodType'>
rz_time, blood_type,
</if> </if>
<if test ='null != syq'> <if test ='null != language'>
syq, language,
</if> </if>
<if test ='null != zzTime'> <if test ='null != edu'>
zz_time, edu,
</if> </if>
<if test ='null != sjzzTime'> <if test ='null != zy'>
sjzz_time, zy,
</if> </if>
<if test ='null != isJrkq'> <if test ='null != zzRemark'>
is_jrkq, zz_remark,
</if> </if>
<if test ='null != jobNum'> <if test ='null != jobType'>
job_num, job_type,
</if> </if>
<if test ='null != workAddress'> <if test ='null != jobStatus'>
work_address, job_status,
</if> </if>
<if test ='null != workPhone'> <if test ='null != rzTime'>
work_phone, rz_time,
</if> </if>
<if test ='null != workEmail'> <if test ='null != syq'>
work_email, syq,
</if> </if>
<if test ='null != zpqd'> <if test ='null != zzTime'>
zpqd, zz_time,
</if> </if>
<if test ='null != bmgwId'> <if test ='null != sjzzTime'>
bmgw_id, sjzz_time,
</if> </if>
<if test ='null != orgCode'> <if test ='null != isJrkq'>
org_code, is_jrkq,
</if> </if>
<if test ='null != unionid'> <if test ='null != jobNum'>
unionid, job_num,
</if> </if>
<if test ='null != openid'> <if test ='null != workAddress'>
openid, work_address,
</if> </if>
<if test ='null != mpopenid'> <if test ='null != workPhone'>
mpopenid, work_phone,
</if> </if>
<if test ='null != appopenid'> <if test ='null != workEmail'>
appopenid work_email,
</if> </if>
</trim> <if test ='null != zpqd'>
<trim prefix="values (" suffix=")" suffixOverrides=","> zpqd,
<if test ='null != empNum'> </if>
#{empNum}, <if test ='null != bmgwId'>
</if> bmgw_id,
<if test ='null != phone'> </if>
#{phone}, <if test ='null != orgCode'>
</if> org_code,
<if test ='null != password'> </if>
#{password}, <if test ='null != unionid'>
</if> unionid,
<if test ='null != headUrl'> </if>
#{headUrl}, <if test ='null != openid'>
</if> openid,
<if test ='null != name'> </if>
#{name}, <if test ='null != mpopenid'>
</if> mpopenid,
<if test ='null != englishName'> </if>
#{englishName}, <if test ='null != appopenid'>
</if> appopenid
<if test ='null != sex'> </if>
#{sex}, </trim>
</if> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != zjType'> <if test ='null != empNum'>
#{zjType}, #{empNum},
</if> </if>
<if test ='null != zjNum'> <if test ='null != phone'>
#{zjNum}, #{phone},
</if> </if>
<if test ='null != sfzyxTime'> <if test ='null != password'>
#{sfzyxTime}, #{password},
</if> </if>
<if test ='null != birthday'> <if test ='null != headUrl'>
#{birthday}, #{headUrl},
</if> </if>
<if test ='null != age'> <if test ='null != name'>
#{age}, #{name},
</if> </if>
<if test ='null != isMarried'> <if test ='null != englishName'>
#{isMarried}, #{englishName},
</if> </if>
<if test ='null != isPregnant'> <if test ='null != sex'>
#{isPregnant}, #{sex},
</if> </if>
<if test ='null != area'> <if test ='null != zjType'>
#{area}, #{zjType},
</if> </if>
<if test ='null != mz'> <if test ='null != zjNum'>
#{mz}, #{zjNum},
</if> </if>
<if test ='null != zzmm'> <if test ='null != sfzyxTime'>
#{zzmm}, #{sfzyxTime},
</if> </if>
<if test ='null != jg'> <if test ='null != birthday'>
#{jg}, #{birthday},
</if> </if>
<if test ='null != city'> <if test ='null != age'>
#{city}, #{age},
</if> </if>
<if test ='null != hkType'> <if test ='null != isMarried'>
#{hkType}, #{isMarried},
</if> </if>
<if test ='null != hkAddress'> <if test ='null != isPregnant'>
#{hkAddress}, #{isPregnant},
</if> </if>
<if test ='null != qq'> <if test ='null != area'>
#{qq}, #{area},
</if> </if>
<if test ='null != wechat'> <if test ='null != mz'>
#{wechat}, #{mz},
</if> </if>
<if test ='null != email'> <if test ='null != zzmm'>
#{email}, #{zzmm},
</if> </if>
<if test ='null != bloodType'> <if test ='null != jg'>
#{bloodType}, #{jg},
</if> </if>
<if test ='null != language'> <if test ='null != city'>
#{language}, #{city},
</if> </if>
<if test ='null != edu'> <if test ='null != hkType'>
#{edu}, #{hkType},
</if> </if>
<if test ='null != zy'> <if test ='null != hkAddress'>
#{zy}, #{hkAddress},
</if> </if>
<if test ='null != zzRemark'> <if test ='null != qq'>
#{zzRemark}, #{qq},
</if> </if>
<if test ='null != jobType'> <if test ='null != wechat'>
#{jobType}, #{wechat},
</if> </if>
<if test ='null != jobStatus'> <if test ='null != email'>
#{jobStatus}, #{email},
</if> </if>
<if test ='null != rzTime'> <if test ='null != bloodType'>
#{rzTime}, #{bloodType},
</if> </if>
<if test ='null != syq'> <if test ='null != language'>
#{syq}, #{language},
</if> </if>
<if test ='null != zzTime'> <if test ='null != edu'>
#{zzTime}, #{edu},
</if> </if>
<if test ='null != sjzzTime'> <if test ='null != zy'>
#{sjzzTime}, #{zy},
</if> </if>
<if test ='null != isJrkq'> <if test ='null != zzRemark'>
#{isJrkq}, #{zzRemark},
</if> </if>
<if test ='null != jobNum'> <if test ='null != jobType'>
#{jobNum}, #{jobType},
</if> </if>
<if test ='null != workAddress'> <if test ='null != jobStatus'>
#{workAddress}, #{jobStatus},
</if> </if>
<if test ='null != workPhone'> <if test ='null != rzTime'>
#{workPhone}, #{rzTime},
</if> </if>
<if test ='null != workEmail'> <if test ='null != syq'>
#{workEmail}, #{syq},
</if> </if>
<if test ='null != zpqd'> <if test ='null != zzTime'>
#{zpqd}, #{zzTime},
</if> </if>
<if test ='null != bmgwId'> <if test ='null != sjzzTime'>
#{bmgwId}, #{sjzzTime},
</if> </if>
<if test ='null != orgCode'> <if test ='null != isJrkq'>
#{orgCode}, #{isJrkq},
</if> </if>
<if test ='null != unionid'> <if test ='null != jobNum'>
#{unionid}, #{jobNum},
</if> </if>
<if test ='null != openid'> <if test ='null != workAddress'>
#{openid}, #{workAddress},
</if> </if>
<if test ='null != mpopenid'> <if test ='null != workPhone'>
#{mpopenid}, #{workPhone},
</if> </if>
<if test ='null != appopenid'> <if test ='null != workEmail'>
#{appopenid} #{workEmail},
</if> </if>
</trim> <if test ='null != zpqd'>
</insert> #{zpqd},
</if>
<delete id="delete" > <if test ='null != bmgwId'>
DELETE FROM yggl_main_emp #{bmgwId},
WHERE id = #{id} </if>
</delete> <if test ='null != orgCode'>
#{orgCode},
<update id="update" parameterType="cn.timer.api.bean.yggl.YgglMainEmp"> </if>
UPDATE yggl_main_emp <if test ='null != unionid'>
<set> #{unionid},
<if test ='null != empNum'>emp_num = #{empNum},</if> </if>
<if test ='null != phone'>phone = #{phone},</if> <if test ='null != openid'>
<if test ='null != password'>password = #{password},</if> #{openid},
<if test ='null != headUrl'>head_url = #{headUrl},</if> </if>
<if test ='null != name'>name = #{name},</if> <if test ='null != mpopenid'>
<if test ='null != englishName'>english_name = #{englishName},</if> #{mpopenid},
<if test ='null != sex'>sex = #{sex},</if> </if>
<if test ='null != zjType'>zj_type = #{zjType},</if> <if test ='null != appopenid'>
<if test ='null != zjNum'>zj_num = #{zjNum},</if> #{appopenid}
<if test ='null != sfzyxTime'>sfzyx_time = #{sfzyxTime},</if> </if>
<if test ='null != birthday'>birthday = #{birthday},</if> </trim>
<if test ='null != age'>age = #{age},</if> </insert>
<if test ='null != isMarried'>is_married = #{isMarried},</if>
<if test ='null != isPregnant'>is_pregnant = #{isPregnant},</if> <delete id="delete" >
<if test ='null != area'>area = #{area},</if> DELETE FROM yggl_main_emp
<if test ='null != mz'>mz = #{mz},</if> WHERE id = #{id}
<if test ='null != zzmm'>zzmm = #{zzmm},</if> </delete>
<if test ='null != jg'>jg = #{jg},</if>
<if test ='null != city'>city = #{city},</if> <update id="update" parameterType="cn.timer.api.bean.yggl.YgglMainEmp">
<if test ='null != hkType'>hk_type = #{hkType},</if> UPDATE yggl_main_emp
<if test ='null != hkAddress'>hk_address = #{hkAddress},</if> <set>
<if test ='null != qq'>qq = #{qq},</if> <if test ='null != empNum'>emp_num = #{empNum},</if>
<if test ='null != wechat'>wechat = #{wechat},</if> <if test ='null != phone'>phone = #{phone},</if>
<if test ='null != email'>email = #{email},</if> <if test ='null != password'>password = #{password},</if>
<if test ='null != bloodType'>blood_type = #{bloodType},</if> <if test ='null != headUrl'>head_url = #{headUrl},</if>
<if test ='null != language'>language = #{language},</if> <if test ='null != name'>name = #{name},</if>
<if test ='null != edu'>edu = #{edu},</if> <if test ='null != englishName'>english_name = #{englishName},</if>
<if test ='null != zy'>zy = #{zy},</if> <if test ='null != sex'>sex = #{sex},</if>
<if test ='null != zzRemark'>zz_remark = #{zzRemark},</if> <if test ='null != zjType'>zj_type = #{zjType},</if>
<if test ='null != jobType'>job_type = #{jobType},</if> <if test ='null != zjNum'>zj_num = #{zjNum},</if>
<if test ='null != jobStatus'>job_status = #{jobStatus},</if> <if test ='null != sfzyxTime'>sfzyx_time = #{sfzyxTime},</if>
<if test ='null != rzTime'>rz_time = #{rzTime},</if> <if test ='null != birthday'>birthday = #{birthday},</if>
<if test ='null != syq'>syq = #{syq},</if> <if test ='null != age'>age = #{age},</if>
<if test ='null != zzTime'>zz_time = #{zzTime},</if> <if test ='null != isMarried'>is_married = #{isMarried},</if>
<if test ='null != sjzzTime'>sjzz_time = #{sjzzTime},</if> <if test ='null != isPregnant'>is_pregnant = #{isPregnant},</if>
<if test ='null != isJrkq'>is_jrkq = #{isJrkq},</if> <if test ='null != area'>area = #{area},</if>
<if test ='null != jobNum'>job_num = #{jobNum},</if> <if test ='null != mz'>mz = #{mz},</if>
<if test ='null != workAddress'>work_address = #{workAddress},</if> <if test ='null != zzmm'>zzmm = #{zzmm},</if>
<if test ='null != workPhone'>work_phone = #{workPhone},</if> <if test ='null != jg'>jg = #{jg},</if>
<if test ='null != workEmail'>work_email = #{workEmail},</if> <if test ='null != city'>city = #{city},</if>
<if test ='null != zpqd'>zpqd = #{zpqd},</if> <if test ='null != hkType'>hk_type = #{hkType},</if>
<if test ='null != bmgwId'>bmgw_id = #{bmgwId},</if> <if test ='null != hkAddress'>hk_address = #{hkAddress},</if>
<if test ='null != orgCode'>org_code = #{orgCode},</if> <if test ='null != qq'>qq = #{qq},</if>
<if test ='null != unionid'>unionid = #{unionid},</if> <if test ='null != wechat'>wechat = #{wechat},</if>
<if test ='null != openid'>openid = #{openid},</if> <if test ='null != email'>email = #{email},</if>
<if test ='null != mpopenid'>mpopenid = #{mpopenid},</if> <if test ='null != bloodType'>blood_type = #{bloodType},</if>
<if test ='null != appopenid'>appopenid = #{appopenid}</if> <if test ='null != language'>language = #{language},</if>
</set> <if test ='null != edu'>edu = #{edu},</if>
WHERE id = #{id} <if test ='null != zy'>zy = #{zy},</if>
</update> <if test ='null != zzRemark'>zz_remark = #{zzRemark},</if>
<if test ='null != jobType'>job_type = #{jobType},</if>
<if test ='null != jobStatus'>job_status = #{jobStatus},</if>
<select id="load" resultMap="BaseResultMap"> <if test ='null != rzTime'>rz_time = #{rzTime},</if>
SELECT <include refid="Base_Column_List" /> <if test ='null != syq'>syq = #{syq},</if>
FROM yggl_main_emp <if test ='null != zzTime'>zz_time = #{zzTime},</if>
WHERE id = #{id} <if test ='null != sjzzTime'>sjzz_time = #{sjzzTime},</if>
</select> <if test ='null != isJrkq'>is_jrkq = #{isJrkq},</if>
<if test ='null != jobNum'>job_num = #{jobNum},</if>
<select id="pageList" resultMap="BaseResultMap"> <if test ='null != workAddress'>work_address = #{workAddress},</if>
SELECT <include refid="Base_Column_List" /> <if test ='null != workPhone'>work_phone = #{workPhone},</if>
FROM yggl_main_emp <if test ='null != workEmail'>work_email = #{workEmail},</if>
LIMIT #{offset}, #{pageSize} <if test ='null != zpqd'>zpqd = #{zpqd},</if>
</select> <if test ='null != bmgwId'>bmgw_id = #{bmgwId},</if>
<if test ='null != orgCode'>org_code = #{orgCode},</if>
<select id="pageListCount" resultType="java.lang.Integer"> <if test ='null != unionid'>unionid = #{unionid},</if>
SELECT count(1) <if test ='null != openid'>openid = #{openid},</if>
FROM yggl_main_emp <if test ='null != mpopenid'>mpopenid = #{mpopenid},</if>
</select> <if test ='null != appopenid'>appopenid = #{appopenid}</if>
</set>
--> WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM yggl_main_emp
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM yggl_main_emp
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM yggl_main_emp
</select>
-->
</mapper> </mapper>
\ No newline at end of file
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