Commit 56457bb8 authored by huyuchen's avatar huyuchen

huyc 项目档案代码提交

parent d1527afa
......@@ -17,6 +17,7 @@
package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
......@@ -66,32 +67,36 @@ public class TElecEmployeeInfo extends BaseEntity {
* 员工编码
*/
@Schema(description ="员工编码")
@NotNull(message = "员工编码不能为空")
@Size(max = 20, message = "员工编码不可超过20位")
@TableField(exist = false)
private String empNo;
/**
* 单位名称
*/
@Schema(description ="单位名称")
private String belongUnit;
@TableField(exist = false)
private String unitName;
/**
* 项目名称
*/
@Schema(description ="项目名称")
private String itemName;
@TableField(exist = false)
private String deptName;
/**
* 项目编码
*/
@Schema(description ="项目编码")
private String itemCode;
@TableField(exist = false)
private String deptNo;
/**
* 资料类型
*/
@Schema(description ="资料类型")
@NotNull(message = "资料类型不能为空")
@Size(max = 2, message = "身资料类型不可超过2位")
private String dataType;
/**
......@@ -100,6 +105,12 @@ public class TElecEmployeeInfo extends BaseEntity {
@Schema(description ="附件")
private String attaInfo;
/**
* 附件id
*/
@Schema(description ="附件id")
private String fileId;
/**
* 是否删除 0否/1是
*/
......
......@@ -20,7 +20,10 @@ package com.yifu.cloud.plus.v1.yifu.archives.controller;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TElecEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.service.TElecEmployeeInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeInfoService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import io.swagger.v3.oas.annotations.Operation;
......@@ -46,6 +49,8 @@ public class TElecEmployeeInfoController {
private final TElecEmployeeInfoService tElecEmployeeInfoService;
private final TEmployeeInfoService tEmployeeInfoService;
/**
* 分页查询
* @param page 分页对象
......@@ -56,7 +61,7 @@ public class TElecEmployeeInfoController {
@GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('archives_telecemployeeinfo_get')" )
public R getTElecEmployeeInfoPage(Page page, TElecEmployeeInfo tElecEmployeeInfo) {
return R.ok(tElecEmployeeInfoService.page(page, Wrappers.query(tElecEmployeeInfo)));
return R.ok(tElecEmployeeInfoService.getTElecEmployeeInfoPage(page,tElecEmployeeInfo));
}
......@@ -111,4 +116,20 @@ public class TElecEmployeeInfoController {
return R.ok(tElecEmployeeInfoService.removeById(id));
}
/**
* 通过身份证号查询人员档案
* @param idCard
* @return R
*/
@Operation(summary = "通过身份证号查询人员档案", description = "通过身份证号查询人员档案")
@SysLog("通过身份证号查询人员档案" )
@PostMapping("/getEmpInfo" )
public R getEmpInfoByCard(@RequestParam String idCard) {
TEmployeeInfo tEmployeeInfo = tEmployeeInfoService.getOne((Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard,idCard)));
if (Common.isNotNull(tEmployeeInfo)) {
return R.ok(tEmployeeInfo);
}
return R.failed("未找到身份证号对应的档案信息");
}
}
......@@ -143,7 +143,7 @@ public class TEmployeeProjectController {
@SysLog("新增项目档案校验" )
@PostMapping("/check")
@PreAuthorize("@pms.hasPermission('archives_temployeeproject_addcheck')" )
public R addCheck(@Valid @RequestBody TEmployeeProject tEmployeeProject) {
public R addCheck(@RequestBody TEmployeeProject tEmployeeProject) {
return R.ok(tEmployeeProjectService.addCheck(tEmployeeProject));
}
......
......@@ -18,8 +18,11 @@
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.TElecEmployeeInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 电子档案信息表
......@@ -30,4 +33,5 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface TElecEmployeeInfoMapper extends BaseMapper<TElecEmployeeInfo> {
IPage<TElecEmployeeInfo> getTElecEmployeeInfoPage(Page page, @Param("tElecEmployeeInfo") TElecEmployeeInfo tElecEmployeeInfo);
}
......@@ -17,6 +17,8 @@
package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TElecEmployeeInfo;
......@@ -28,4 +30,5 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TElecEmployeeInfo;
*/
public interface TElecEmployeeInfoService extends IService<TElecEmployeeInfo> {
IPage<TElecEmployeeInfo> getTElecEmployeeInfoPage(Page page, TElecEmployeeInfo vo);
}
......@@ -16,6 +16,8 @@
*/
package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TElecEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TElecEmployeeInfoMapper;
......@@ -35,4 +37,9 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
public boolean save(TElecEmployeeInfo entity) {
return super.save(entity);
}
@Override
public IPage<TElecEmployeeInfo> getTElecEmployeeInfoPage(Page page, TElecEmployeeInfo tElecEmployeeInfo) {
return baseMapper.getTElecEmployeeInfoPage(page,tElecEmployeeInfo);
}
}
......@@ -28,11 +28,12 @@
<result property="empName" column="EMP_NAME"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="empNo" column="EMP_NO"/>
<result property="belongUnit" column="BELONG_UNIT"/>
<result property="itemName" column="ITEM_NAME"/>
<result property="itemCode" column="ITEM_CODE"/>
<result property="unitName" column="UNIT_NAME"/>
<result property="deptName" column="DEPT_NAME"/>
<result property="deptNo" column="DEPT_NO"/>
<result property="dataType" column="DATA_TYPE"/>
<result property="attaInfo" column="ATTA_INFO"/>
<result property="fileId" column="FILE_ID"/>
<result property="deleteFlag" column="DELETE_FLAG"/>
<result property="createBy" column="CREATE_BY"/>
<result property="updateBy" column="UPDATE_BY"/>
......@@ -45,12 +46,13 @@
a.ID,
a.EMP_NAME,
a.EMP_IDCARD,
a.EMP_NO,
a.BELONG_UNIT,
a.ITEM_NAME,
a.ITEM_CODE,
b.EMP_NO,
b.UNIT_NAME,
b.deptNo,
b.DEPT_NAME,
a.DATA_TYPE,
a.ATTA_INFO,
a.FILE_ID,
a.DELETE_FLAG,
a.UPDATE_BY,
a.CREATE_BY,
......@@ -70,17 +72,17 @@
<if test="tElecEmployeeInfo.empIdcard != null and tElecEmployeeInfo.empIdcard.trim() != ''">
AND a.EMP_IDCARD = #{tElecEmployeeInfo.empIdcard}
</if>
<if test="tElecEmployeeInfo.empNo != null and tElecEmployeeInfo.empNo.trim() != ''">
AND a.EMP_NO = #{tElecEmployeeInfo.empNo}
<if test="tElecEmployeeInfo.empCode != null and tElecEmployeeInfo.empCode.trim() != ''">
AND b.EMP_CODE = #{tElecEmployeeInfo.empCode}
</if>
<if test="tElecEmployeeInfo.belongUnit != null and tElecEmployeeInfo.belongUnit.trim() != ''">
AND a.BELONG_UNIT like concat('%',#{tElecEmployeeInfo.belongUnit},'%')
<if test="tElecEmployeeInfo.unitName != null and tElecEmployeeInfo.unitName.trim() != ''">
AND b.UNIT_NAME like concat('%',#{tElecEmployeeInfo.unitName},'%')
</if>
<if test="tElecEmployeeInfo.itemName != null and tElecEmployeeInfo.itemName.trim() != ''">
AND a.ITEM_NAME like concat('%',#{tElecEmployeeInfo.itemName},'%')
<if test="tElecEmployeeInfo.deptName != null and tElecEmployeeInfo.deptName.trim() != ''">
AND b.DEPT_NAME like concat('%',#{tElecEmployeeInfo.deptName},'%')
</if>
<if test="tElecEmployeeInfo.itemCode != null and tElecEmployeeInfo.itemCode.trim() != ''">
AND a.ITEM_CODE like concat('%',#{tElecEmployeeInfo.itemCode},'%')
<if test="tElecEmployeeInfo.deptNo != null and tElecEmployeeInfo.deptNo.trim() != ''">
AND b.DEPT_NO like concat('%',#{tElecEmployeeInfo.deptNo},'%')
</if>
<if test="tElecEmployeeInfo.dataType != null and tElecEmployeeInfo.dataType.trim() != ''">
AND a.DATA_TYPE = #{tElecEmployeeInfo.dataType}
......@@ -88,6 +90,9 @@
<if test="tElecEmployeeInfo.attaInfo != null and tElecEmployeeInfo.attaInfo.trim() != ''">
AND a.ATTA_INFO = #{tElecEmployeeInfo.attaInfo}
</if>
<if test="tElecEmployeeInfo.fileId != null and tElecEmployeeInfo.fileId.trim() != ''">
AND a.FILE_ID = #{tElecEmployeeInfo.fileId}
</if>
<if test="tElecEmployeeInfo.createBy != null and tElecEmployeeInfo.createBy.trim() != ''">
AND a.CREATE_BY = #{tElecEmployeeInfo.createBy}
</if>
......@@ -111,8 +116,9 @@
SELECT
<include refid="Base_Column_List"/>
FROM t_elec_employee_info a
left join t_employee_project b on a.EMP_IDCARD = b.EMP_IDCARD
<where>
1=1 AND a.DELETE_FLAG = 0
1=1 AND a.DELETE_FLAG = '0' AND b.DELETE_FLAG = '0'
<include refid="tElecEmployeeInfo_where"/>
</where>
</select>
......
......@@ -83,12 +83,9 @@
<result property="bankName" column="BANK_NAME"/>
<result property="bankSubName" column="BANK_SUB_NAME"/>
<result property="bankNo" column="BANK_NO"/>
<result property="isLeaveEmployee" column="IS_LEAVE_EMPLOYEE"/>
<result property="empNo" column="EMP_NO"/>
<result property="unitId" column="UNIT_ID"/>
<result property="unitName" column="UNIT_NAME"/>
<result property="unitNo" column="UNIT_NO"/>
<result property="deptId" column="DEPT_ID"/>
<result property="deptName" column="DEPT_NAME"/>
<result property="deptNo" column="DEPT_NO"/>
<result property="businessType" column="BUSINESS_TYPE"/>
......@@ -101,7 +98,6 @@
<result property="empNatrue" column="EMP_NATRUE"/>
<result property="proCreateName" column="PROCREATE_NAME"/>
<result property="proCreateTime" column="PROCREATE_TIME"/>
<result property="taxMonth" column="TAX_MONTH"/>
<result property="status" column="STATUS"/>
<result property="fileProvince" column="FILE_PROVINCE"/>
<result property="fileCity" column="FILE_CITY"/>
......@@ -174,11 +170,9 @@
a.BANK_NAME,
a.BANK_SUB_NAME,
a.BANK_NO,
a.IS_LEAVE_EMPLOYEE,
a.EMP_NO,
a.UNIT_NAME,
a.UNIT_NO,
a.DEPT_ID,
a.DEPT_NAME,
a.DEPT_NO,
concat(a.BUSINESS_PRIMARY_TYPE,'/',BUSINESS_SECOND_TYPE,'/',a.BUSINESS_THIRD_TYPE) AS BUSINESS_TYPE,
......@@ -188,7 +182,6 @@
a.ENJOIN_DATE,
a.TRY_PERIOD,
a.PROJECT_SOURCE,
a.TAX_MONTH,
b.STATUS AS PROSTATUS,
b.CREATE_NAME AS PROCREATE_NAME,
b.CREATE_TIME AS PROCREATE_TIME,
......@@ -391,24 +384,15 @@
<if test="tEmployeeProject.bankNo != null and tEmployeeProject.bankNo.trim() != ''">
AND a.BANK_NO = #{tEmployeeProject.bankNo}
</if>
<if test="tEmployeeProject.isLeaveEmployee != null">
AND a.IS_LEAVE_EMPLOYEE = #{tEmployeeProject.isLeaveEmployee}
</if>
<if test="tEmployeeProject.empNo != null and tEmployeeProject.empNo.trim() != ''">
AND a.EMP_NO = #{tEmployeeProject.empNo}
</if>
<if test="tEmployeeProject.unitId != null and tEmployeeProject.unitId.trim() != ''">
AND a.UNIT_ID = #{tEmployeeProject.unitId}
</if>
<if test="tEmployeeProject.unitName != null and tEmployeeProject.unitName.trim() != ''">
AND a.UNIT_NAME like concat('%',#{tEmployeeProject.unitName},'%')
</if>
<if test="tEmployeeProject.unitNo != null and tEmployeeProject.unitNo.trim() != ''">
AND a.UNIT_NO = #{tEmployeeProject.unitNo}
</if>
<if test="tEmployeeProject.deptId != null and tEmployeeProject.deptId.trim() != ''">
AND a.DEPT_ID = #{tEmployeeProject.deptId}
</if>
<if test="tEmployeeProject.deptName != null and tEmployeeProject.deptName.trim() != ''">
AND a.DEPT_NAME like concat('%',#{tEmployeeProject.deptName},'%')
</if>
......@@ -442,9 +426,6 @@
<if test="tEmployeeProject.projectSource != null and tEmployeeProject.projectSource.trim() != ''">
AND a.PROJECT_SOURCE = #{tEmployeeProject.projectSource}
</if>
<if test="tEmployeeProject.taxMonth != null and tEmployeeProject.taxMonth.trim() != ''">
AND a.TAX_MONTH = #{tEmployeeProject.taxMonth}
</if>
<if test="tEmployeeProject.proStatus != null">
AND a.STATUS = #{tEmployeeProject.proStatus}
</if>
......
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