Commit aa8dfd6a authored by huyuchen's avatar huyuchen

huyc 项目档案代码提交

parent 351d13cd
...@@ -24,6 +24,9 @@ import io.swagger.v3.oas.annotations.media.Schema; ...@@ -24,6 +24,9 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
/** /**
* 电子档案信息表 * 电子档案信息表
* *
...@@ -36,29 +39,35 @@ import lombok.EqualsAndHashCode; ...@@ -36,29 +39,35 @@ import lombok.EqualsAndHashCode;
@Schema(description = "电子档案信息表") @Schema(description = "电子档案信息表")
public class TElecEmployeeInfo extends BaseEntity { public class TElecEmployeeInfo extends BaseEntity {
/** /**
* id * 主键
*/ */
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@Schema(description ="id") @Schema(description ="主键")
private Long id; private String id;
/** /**
* 员工姓名 * 员工姓名
*/ */
@Schema(description ="员工姓名") @Schema(description ="员工姓名")
@NotNull(message = "员工姓名不能为空")
@Size(max = 20, message = "员工姓名不可超过20位")
private String empName; private String empName;
/** /**
* 身份证号 * 身份证号码
*/ */
@Schema(description ="身份证号") @Schema(description ="身份证号码")
@NotNull(message = "身份证号码不能为空")
@Size(max = 20, message = "身份证号码不可超过20位")
private String empIdcard; private String empIdcard;
/** /**
* 员工编码 * 员工编码
*/ */
@Schema(description ="员工编码") @Schema(description ="员工编码")
@NotNull(message = "员工编码不能为空")
@Size(max = 20, message = "员工编码不可超过20位")
private String empNo; private String empNo;
/** /**
...@@ -91,5 +100,10 @@ public class TElecEmployeeInfo extends BaseEntity { ...@@ -91,5 +100,10 @@ public class TElecEmployeeInfo extends BaseEntity {
@Schema(description ="附件") @Schema(description ="附件")
private String attaInfo; private String attaInfo;
/**
* 是否删除 0否/1是
*/
@Schema(description ="是否删除 0否/1是")
private String deleteFlag;
} }
...@@ -33,10 +33,87 @@ ...@@ -33,10 +33,87 @@
<result property="itemCode" column="ITEM_CODE"/> <result property="itemCode" column="ITEM_CODE"/>
<result property="dataType" column="DATA_TYPE"/> <result property="dataType" column="DATA_TYPE"/>
<result property="attaInfo" column="ATTA_INFO"/> <result property="attaInfo" column="ATTA_INFO"/>
<result property="deleteFlag" column="DELETE_FLAG"/>
<result property="createBy" column="CREATE_BY"/> <result property="createBy" column="CREATE_BY"/>
<result property="updateBy" column="UPDATE_BY"/> <result property="updateBy" column="UPDATE_BY"/>
<result property="createName" column="CREATE_NAME"/> <result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/> <result property="createTime" column="CREATE_TIME"/>
<result property="updateTime" column="UPDATE_TIME"/> <result property="updateTime" column="UPDATE_TIME"/>
</resultMap> </resultMap>
<sql id="Base_Column_List">
a.ID,
a.EMP_NAME,
a.EMP_IDCARD,
a.EMP_NO,
a.BELONG_UNIT,
a.ITEM_NAME,
a.ITEM_CODE,
a.DATA_TYPE,
a.ATTA_INFO,
a.DELETE_FLAG,
a.UPDATE_BY,
a.CREATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_TIME
</sql>
<sql id="tElecEmployeeInfo_where">
<if test="tElecEmployeeInfo != null">
<if test="tElecEmployeeInfo.id != null and tElecEmployeeInfo.id.trim() != ''">
AND a.ID = #{tElecEmployeeInfo.id}
</if>
<if test="tElecEmployeeInfo.empName != null and tElecEmployeeInfo.empName.trim() != ''">
AND a.EMP_NAME = #{tElecEmployeeInfo.empName}
</if>
<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>
<if test="tElecEmployeeInfo.belongUnit != null and tElecEmployeeInfo.belongUnit.trim() != ''">
AND a.BELONG_UNIT like concat('%',#{tElecEmployeeInfo.belongUnit},'%')
</if>
<if test="tElecEmployeeInfo.itemName != null and tElecEmployeeInfo.itemName.trim() != ''">
AND a.ITEM_NAME like concat('%',#{tElecEmployeeInfo.itemName},'%')
</if>
<if test="tElecEmployeeInfo.itemCode != null and tElecEmployeeInfo.itemCode.trim() != ''">
AND a.ITEM_CODE like concat('%',#{tElecEmployeeInfo.itemCode},'%')
</if>
<if test="tElecEmployeeInfo.dataType != null and tElecEmployeeInfo.dataType.trim() != ''">
AND a.DATA_TYPE = #{tElecEmployeeInfo.dataType}
</if>
<if test="tElecEmployeeInfo.attaInfo != null and tElecEmployeeInfo.attaInfo.trim() != ''">
AND a.ATTA_INFO = #{tElecEmployeeInfo.attaInfo}
</if>
<if test="tElecEmployeeInfo.createBy != null and tElecEmployeeInfo.createBy.trim() != ''">
AND a.CREATE_BY = #{tElecEmployeeInfo.createBy}
</if>
<if test="tElecEmployeeInfo.createName != null and tElecEmployeeInfo.createName.trim() != ''">
AND a.CREATE_NAME = #{tElecEmployeeInfo.createName}
</if>
<if test="tElecEmployeeInfo.createTime != null">
AND a.CREATE_TIME = #{tElecEmployeeInfo.createTime}
</if>
<if test="tElecEmployeeInfo.updateBy != null and tElecEmployeeInfo.updateBy.trim() != ''">
AND a.UPDATE_BY = #{tElecEmployeeInfo.updateBy}
</if>
<if test="tElecEmployeeInfo.updateTime != null">
AND a.UPDATE_TIME = #{tElecEmployeeInfo.updateTime}
</if>
</if>
</sql>
<!--tElecEmployeeInfo简单分页查询-->
<select id="getTElecEmployeeInfoPage" resultMap="tElecEmployeeInfoMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_elec_employee_info a
<where>
1=1 AND a.DELETE_FLAG = 0
<include refid="tElecEmployeeInfo_where"/>
</where>
</select>
</mapper> </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