Commit 3691d45c authored by zhenbin wang's avatar zhenbin wang

feature-wzb:新增代码

parent f684cf33
package com.yifu.cloud.plus.v1.yifu.archives.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeRetirementFlagDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author 86187
* @description 针对表【t_employee_retirement_flag_detail】的数据库操作Mapper
* @createDate 2023-05-20 16:18:07
* @Entity generator.domain.TEmployeeRetirementFlagDetail
*/
@Mapper
public interface TEmployeeRetirementFlagDetailMapper extends BaseMapper<TEmployeeRetirementFlagDetail> {
List<TEmployeeRetirementFlagDetail> getDatail(@Param("id") String id);
}
package com.yifu.cloud.plus.v1.yifu.archives.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeRetirement;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
/**
* @author 86187
* @description 针对表【t_employee_retirement】的数据库操作Mapper
* @createDate 2023-05-18 15:40:46
* @Entity generator.domain.TEmployeeRetirement
*/
@Mapper
public interface TEmployeeRetirementMapper extends BaseMapper<TEmployeeRetirement> {
IPage<TEmployeeRetirement> getTEmployeeRetirementPage(Page page, @Param("searchVo") TEmployeeRetirementSearchVo searchVo);
List<TEmployeeRetirement> getBirthday(@Param("TT") String TT, @Param("LL") String LL);
boolean changeHandleFlagAll(@Param("changeHandleFlagAllVo") ChangeHandleFlagAllVo changeHandleFlagAllVo);
boolean changeHandleFlag(@Param("changeHandleFlagVo")ChangeHandleFlagVo changeHandleFlagVo);
int selectByEmpIdcard(@Param("empIdCard") String empIdCard);
int add(@Param("tEmployeeRetirement") TEmployeeRetirement tEmployeeRetirement);
long selectExportCount(@Param("tEmployeeRetirement") TEmployeeRetirementExportVo tEmployeeRetirement);
List<TEmployeeRetirementExportVo>noPageDiy(@Param("searchVo")TEmployeeRetirementSearchVo searchVo);
int noPageCountDiy(@Param("searchVo")TEmployeeRetirementSearchVo searchVo);
String selectByIdd(@Param("id")Integer id);
}
package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeRetirementFlagDetail;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeRetirementFlagDetailMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeRetirementFlagDetailService;
import org.springframework.stereotype.Service;
/**
* @author 86187
* @description 针对表【t_employee_retirement_flag_detail】的数据库操作Service实现
* @createDate 2023-05-20 16:18:07
*/
@Service
public class TEmployeeRetirementFlagDetailServiceImpl extends ServiceImpl<TEmployeeRetirementFlagDetailMapper, TEmployeeRetirementFlagDetail>
implements TEmployeeRetirementFlagDetailService {
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeRetirementFlagDetailMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeRetirementFlagDetail">
<id property="id" column="ID" jdbcType="VARCHAR"/>
<result property="datailId" column="DATAIL_ID" jdbcType="VARCHAR"/>
<result property="createBy" column="CREATE_BY" jdbcType="VARCHAR"/>
<result property="createName" column="CREATE_NAME" jdbcType="VARCHAR"/>
<result property="createTime" column="CREATE_TIME" jdbcType="TIMESTAMP"/>
<result property="updateBy" column="UPDATE_BY" jdbcType="VARCHAR"/>
<result property="updateTime" column="UPDATE_TIME" jdbcType="TIMESTAMP"/>
<result property="context" column="CONTEXT" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
ID,CREATE_BY,CREATE_NAME,DATAIL_ID,
CREATE_TIME,UPDATE_BY,UPDATE_TIME,
CONTEXT
</sql>
<select id="getDatail" resultType="com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeRetirementFlagDetail">
SELECT a.ID,a.DATAIL_ID,a.CREATE_NAME,a.CREATE_BY,a.CREATE_TIME,a.CONTEXT
FROM t_employee_retirement_flag_detail a
where a.DATAIL_ID=#{id}
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeRetirementMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeRetirement">
<id property="id" column="ID" jdbcType="VARCHAR"/>
<result property="empName" column="EMP_NAME" jdbcType="VARCHAR"/>
<result property="empIdcard" column="EMP_IDCARD" jdbcType="VARCHAR"/>
<result property="empPhone" column="EMP_PHONE" jdbcType="VARCHAR"/>
<result property="empSex" column="EMP_SEX" jdbcType="VARCHAR"/>
<result property="empAge" column="EMP_AGE" jdbcType="INTEGER"/>
<result property="empNatrue" column="EMP_NATRUE" jdbcType="VARCHAR"/>
<result property="fileProvince" column="FILE_PROVINCE" jdbcType="INTEGER"/>
<result property="fileCity" column="FILE_CITY" jdbcType="INTEGER"/>
<result property="fileTown" column="FILE_TOWN" jdbcType="INTEGER"/>
<result property="socialProvince" column="SOCIAL_PROVINCE" jdbcType="INTEGER"/>
<result property="socialCity" column="SOCIAL_CITY" jdbcType="INTEGER"/>
<result property="socialTown" column="SOCIAL_TOWN" jdbcType="INTEGER"/>
<result property="deptName" column="DEPT_NAME" jdbcType="VARCHAR"/>
<result property="unitName" column="UNIT_NAME" jdbcType="VARCHAR"/>
<result property="unitNo" column="UNIT_NO" jdbcType="VARCHAR"/>
<result property="deptNo" column="DEPT_NO" jdbcType="VARCHAR"/>
<result property="handleFlag" column="HANDLE_FLAG" jdbcType="INTEGER"/>
<result property="createBy" column="CREATE_BY" jdbcType="VARCHAR"/>
<result property="createName" column="CREATE_NAME" jdbcType="VARCHAR"/>
<result property="createTime" column="CREATE_TIME" jdbcType="TIMESTAMP"/>
<result property="updateBy" column="UPDATE_BY" jdbcType="VARCHAR"/>
<result property="updateTime" column="UPDATE_TIME" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
ID,EMP_NAME,EMP_IDCARD,
EMP_PHONE,EMP_SEX,EMP_AGE,
EMP_NATRUE,FILE_PROVINCE,FILE_CITY,
FILE_TOWN,SOCIAL_PROVINCE,SOCIAL_CITY,
SOCIAL_TOWN,DEPT_NAME,UNIT_NAME,
UNIT_NO,DEPT_NO,HANDLE_FLAG,
CREATE_BY,CREATE_NAME,CREATE_TIME,
UPDATE_BY,UPDATE_TIME
</sql>
<sql id="tEmployeeRetirement_pageWhere">
<if test="searchVo.empName != null and searchVo.empName.trim() != ''">
AND a.EMP_NAME like concat('%',#{searchVo.empName},'%')
</if>
<if test="searchVo.empIdcard != null and searchVo.empIdcard.trim() != ''">
AND a.EMP_IDCARD like concat('%',#{searchVo.empIdcard},'%')
</if>
<if test="searchVo.fileProvince != null">
AND a.FILE_PROVINCE = #{searchVo.fileProvince}
</if>
<if test="searchVo.fileCity != null">
AND a.FILE_CITY = #{searchVo.fileCity}
</if>
<if test="searchVo.fileTown != null">
AND a.FILE_TOWN = #{searchVo.fileTown}
</if>
<if test="searchVo.socialProvince != null">
AND a.SOCIAL_PROVINCE = #{searchVo.socialProvince}
</if>
<if test="searchVo.socialCity != null">
AND a.SOCIAL_CITY = #{searchVo.socialCity}
</if>
<if test="searchVo.socialTown != null">
AND a.SOCIAL_TOWN = #{searchVo.socialTown}
</if>
<if test="searchVo.unitName!= null">
AND a.UNIT_NAME = #{searchVo.unitName}
</if>
<if test="searchVo.unitNo!= null">
AND a.UNIT_NO = #{searchVo.unitNo}
</if>
<if test="searchVo.deptName!= null">
AND a.DEPT_NAME like concat('%',#{searchVo.deptName},'%')
</if>
<if test="searchVo.deptNo!= null">
AND a.DEPT_NO =#{searchVo.deptNo}
</if>
<if test="searchVo.handleFlag!= null">
AND a.HANDLE_FLAG =#{searchVo.handleFlag}
</if>
<if test="searchVo.empTypeList != null and searchVo.empTypeList.length>0">
AND a.EMP_NATRUE IN
<foreach collection="searchVo.empTypeList" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="searchVo.idList != null and searchVo.idList.length > 0">
and a.ID in
<foreach collection="searchVo.idList" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
</sql>
<sql id="tEmployeeRetirement_where">
<if test="searchVo.empName != null and searchVo.empName.trim() != ''">
AND a.EMP_NAME like concat('%',#{searchVo.empName},'%')
</if>
<if test="searchVo.empIdcard != null and searchVo.empIdcard.trim() != ''">
AND a.EMP_IDCARD like concat('%',#{searchVo.empIdcard},'%')
</if>
<if test="searchVo.fileProvince != null">
AND b.FILE_PROVINCE = #{searchVo.fileProvince}
</if>
<if test="searchVo.fileCity != null">
AND b.FILE_CITY = #{searchVo.fileCity}
</if>
<if test="searchVo.fileTown != null">
AND b.FILE_TOWN = #{searchVo.fileTown}
</if>
<if test="searchVo.socialProvince != null">
AND a.SOCIAL_PROVINCE = #{searchVo.socialProvince}
</if>
<if test="searchVo.socialCity != null">
AND a.SOCIAL_CITY = #{searchVo.socialCity}
</if>
<if test="searchVo.socialTown != null">
AND a.SOCIAL_TOWN = #{searchVo.socialTown}
</if>
<if test="searchVo.unitName!= null">
AND a.UNIT_NAME = #{searchVo.unitName}
</if>
<if test="searchVo.unitNo!= null">
AND a.UNIT_NO = #{searchVo.unitNo}
</if>
<if test="searchVo.deptName!= null">
AND a.DEPT_NAME like concat('%',#{searchVo.deptName},'%')
</if>
<if test="searchVo.deptNo!= null">
AND a.DEPART_NO =#{searchVo.deptNo}
</if>
<if test="searchVo.handleFlag!= null">
AND a.HANDLE_FLAG =#{searchVo.handleFlag}
</if>
<if test="searchVo.empTypeList != null and searchVo.empTypeList.length>0">
AND a.EMP_NATRUE IN
<foreach collection="searchVo.empTypeList" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</sql>
<select id="getTEmployeeRetirementPage" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_employee_retirement a
<where>
<include refid="tEmployeeRetirement_pageWhere"/>
</where>
order by a.CREATE_TIME desc
</select>
<select id="selectByEmpIdcard" resultType="Integer">
SELECT count(*)
<include refid="Base_Column_List"/>
FROM t_employee_retirement a
where EMP_IDCARD=#{empIdCard}
</select>
<select id="getBirthday" parameterType="String" resultMap="BaseResultMap">
SELECT a.EMP_NAME,
a.EMP_IDCARD,
b.EMP_SEX,
b.EMP_AGE,
b.EMP_PHONE,
CASE
WHEN MAX(a.EMP_NATRUE)=3 THEN "3"
WHEN MIN(a.EMP_NATRUE)=0 THEN "0"
WHEN MIN(a.EMP_NATRUE)=1 THEN "1"
ELSE a.EMP_NATRUE END as EMP_NATRUE,
a.UNIT_NAME,
a.UNIT_NO,
a.DEPT_NAME,
a.DEPT_NO,
b.FILE_PROVINCE,
b.FILE_CITY,
b.FILE_TOWN,
a.SOCIAL_PROVINCE,
a.SOCIAL_CITY,
a.SOCIAL_TOWN,
b.EMP_BIRTHDAY
FROM t_employee_project a
LEFT JOIN t_employee_info b ON a.EMP_IDCARD = b.EMP_IDCARD
where datediff(#{TT}, b.EMP_BIRTHDAY) = 0
and
b.EMP_SEX = '1'
and b.FILE_STATUS = 0
or datediff(#{LL}, b.EMP_BIRTHDAY) = 0
and b.EMP_SEX = '2'
and b.FILE_STATUS = 0
GROUP BY a.EMP_ID
</select>
<update id="changeHandleFlagAll" parameterType="com.yifu.cloud.plus.v1.yifu.archives.vo.ChangeHandleFlagAllVo">
update t_employee_retirement a
set a.HANDLE_FLAG=#{changeHandleFlagAllVo.handleFlag}
where a.ID in
<foreach item="idStr" index="index" collection="changeHandleFlagAllVo.ids" open="(" separator="," close=")">
#{idStr}
</foreach>
</update>
<update id="changeHandleFlag" parameterType="com.yifu.cloud.plus.v1.yifu.archives.vo.ChangeHandleFlagVo">
update t_employee_retirement a
set a.HANDLE_FLAG=#{changeHandleFlagVo.handleFlag}
where a.ID = #{changeHandleFlagVo.id}
</update>
<insert id="add">
insert into t_employee_retirement (EMP_NAME)
value (#{tEmployeeRetirement.empName})
</insert>
<select id="selectExportCount" resultType="java.lang.Long">
SELECT
count(1)
from t_employee_retirement a
<where>
<include refid="tEmployeeRetirement_pageWhere"/>
</where>
</select>
<select id="noPageDiy" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeRetirementExportVo">
SELECT a.ID,
EMP_NAME,
EMP_IDCARD,
EMP_PHONE,
CASE WHEN a.EMP_SEX=1 THEN "男"
WHEN a.EMP_SEX =2 THEN "女"
ELSE "" END as "EMP_SEX",
EMP_AGE,
CASE WHEN a.EMP_NATRUE='0' THEN "外包"
WHEN a.EMP_NATRUE='1' THEN "派遣"
WHEN a.EMP_NATRUE='2' THEN "代理"
WHEN a.EMP_NATRUE='3' THEN "内部员工"
ELSE "" END as "EMP_NATRUE",
FILE_PROVINCE,
CASE WHEN a.HANDLE_FLAG=0 THEN "未处理"
WHEN a.HANDLE_FLAG =1 THEN "已处理"
ELSE "" END as "HANDLE_FLAG",
FILE_CITY, FILE_TOWN, SOCIAL_PROVINCE, SOCIAL_CITY, SOCIAL_TOWN,
DEPT_NAME, UNIT_NAME, UNIT_NO, DEPT_NO
<include refid="Base_Column_List"/>
FROM t_employee_retirement a
<where>
<include refid="tEmployeeRetirement_pageWhere"/>
</where>
order by a.CREATE_TIME desc
</select>
<!--tEmployeeInfo导出查询count改造 fxj 2022-11-03-->
<select id="noPageCountDiy" resultType="java.lang.Integer">
SELECT
count(1)
from t_employee_retirement a
<where>
<include refid="tEmployeeRetirement_pageWhere"/>
</where>
</select>
<select id="selectByIdd" resultType="String">
SELECT a.AREA_NAME
from mvp_salary.sys_area a
where id = #{id}
</select>
</mapper>
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