人员信息模块
parent
776d60674b
commit
ca7d34a5bd
@ -0,0 +1,33 @@
|
|||||||
|
package com.engine.organization.entity.hrmresource.po;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author weaver_cl
|
||||||
|
* @Description:
|
||||||
|
* @Date 2022/8/24
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class ResourceItemClassPO {
|
||||||
|
|
||||||
|
private Integer fid;
|
||||||
|
|
||||||
|
private String fno;
|
||||||
|
|
||||||
|
private String fname;
|
||||||
|
|
||||||
|
private String fmemo;
|
||||||
|
|
||||||
|
private Long creator;
|
||||||
|
private Date createTime;
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
package com.engine.organization.entity.hrmresource.po;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author weaver_cl
|
||||||
|
* @Description:
|
||||||
|
* @Date 2022/8/24
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class ResourceItemPO {
|
||||||
|
|
||||||
|
private Integer fid;
|
||||||
|
|
||||||
|
private Integer fclassid;
|
||||||
|
|
||||||
|
private String fno;
|
||||||
|
|
||||||
|
private String fname;
|
||||||
|
|
||||||
|
private String fmemo;
|
||||||
|
|
||||||
|
private Integer fdelete;
|
||||||
|
|
||||||
|
private Long creator;
|
||||||
|
private Date createTime;
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
package com.engine.organization.mapper.hrmresource;
|
||||||
|
|
||||||
|
|
||||||
|
import com.engine.organization.entity.TreeData;
|
||||||
|
import com.engine.organization.entity.hrmresource.po.ResourceItemPO;
|
||||||
|
import org.apache.ibatis.annotations.MapKey;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author weaver_cl
|
||||||
|
* @Description:
|
||||||
|
* @Date 2022/8/24
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
public interface ResourceBasicInfoMapper {
|
||||||
|
|
||||||
|
ArrayList<TreeData> getTreeData();
|
||||||
|
|
||||||
|
@MapKey("id")
|
||||||
|
List<Map<String, Object>> browserDatas(@Param("ids") Collection<Long> ids);
|
||||||
|
|
||||||
|
|
||||||
|
ResourceItemPO getResourceItemByFid(@Param("fid")Integer fid);
|
||||||
|
|
||||||
|
List<ResourceItemPO> selectItemByIds(@Param("ids")Collection<Long> ids);
|
||||||
|
|
||||||
|
int deleteByIds(@Param("ids")Collection<Long> ids);
|
||||||
|
|
||||||
|
int recoverByIds(@Param("ids")Collection<Long> ids);
|
||||||
|
|
||||||
|
List<ResourceItemPO> selectItemByFNo(@Param("fno")String fno);
|
||||||
|
|
||||||
|
int insertIgnoreNull(ResourceItemPO resourceItemPO);
|
||||||
|
}
|
@ -0,0 +1,147 @@
|
|||||||
|
<?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.engine.organization.mapper.hrmresource.ResourceBasicInfoMapper">
|
||||||
|
|
||||||
|
<resultMap id="ItemResultMap" type="com.engine.organization.entity.hrmresource.po.ResourceItemPO">
|
||||||
|
<result column="fid" property="fid"/>
|
||||||
|
<result column="fclassid" property="fclassid"/>
|
||||||
|
<result column="fno" property="fno"/>
|
||||||
|
<result column="fname" property="fname"/>
|
||||||
|
<result column="fmemo" property="fmemo"/>
|
||||||
|
<result column="fdelete" property="fdelete"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap id="TreeResultMap" type="com.engine.organization.entity.TreeData">
|
||||||
|
<result column="id" property="key"/>
|
||||||
|
<result column="scheme_name" property="title"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="getTreeData" resultMap="TreeResultMap">
|
||||||
|
select fid, fname
|
||||||
|
from jcl_org_itemclass
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="browserDatas" resultType="java.util.Map">
|
||||||
|
select
|
||||||
|
fid as `id`,
|
||||||
|
fname as `name`
|
||||||
|
from jcl_org_itemclass
|
||||||
|
AND id IN
|
||||||
|
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getResourceItemByFid" resultType="com.engine.organization.entity.hrmresource.po.ResourceItemPO">
|
||||||
|
select fid,fclassid,fno,fname,fmemo,fdelete,creator,create_time,update_time
|
||||||
|
from jcl_org_item
|
||||||
|
where fdelete = 0 and fid = #{fid}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectItemByIds" resultMap="ItemResultMap">
|
||||||
|
select fid,fclassid,fno,fname,fmemo,fdelete,creator,create_time,update_time
|
||||||
|
from jcl_org_item
|
||||||
|
where fdelete = 0
|
||||||
|
AND fid IN
|
||||||
|
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectItemByFNo" resultMap="ItemResultMap">
|
||||||
|
select fid,fclassid,fno,fname,fmemo,fdelete,creator,create_time,update_time
|
||||||
|
from jcl_org_item
|
||||||
|
where fdelete = 0
|
||||||
|
AND fno = #{fno}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="deleteByIds">
|
||||||
|
UPDATE jcl_org_item
|
||||||
|
SET fdelete = 1
|
||||||
|
WHERE fdelete = 0
|
||||||
|
AND fid IN
|
||||||
|
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
<update id="recoverByIds">
|
||||||
|
UPDATE jcl_org_item
|
||||||
|
SET fdelete = 0
|
||||||
|
WHERE fdelete = 1
|
||||||
|
AND fid IN
|
||||||
|
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.hrmresource.po.ResourceItemPO" keyProperty="id"
|
||||||
|
keyColumn="id" useGeneratedKeys="true">
|
||||||
|
INSERT INTO jcl_org_item
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="fclassid != null">
|
||||||
|
fclassid,
|
||||||
|
</if>
|
||||||
|
<if test="fno != null">
|
||||||
|
fno,
|
||||||
|
</if>
|
||||||
|
<if test="fname != null">
|
||||||
|
fname,
|
||||||
|
</if>
|
||||||
|
<if test="fmemo != null">
|
||||||
|
fmemo,
|
||||||
|
</if>
|
||||||
|
<if test="fdelete != null">
|
||||||
|
fdelete,
|
||||||
|
</if>
|
||||||
|
<if test="creator != null">
|
||||||
|
creator,
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time,
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
update_time,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="fclassid != null">
|
||||||
|
#{fclassid},
|
||||||
|
</if>
|
||||||
|
<if test="fno != null">
|
||||||
|
#{fno},
|
||||||
|
</if>
|
||||||
|
<if test="fname != null">
|
||||||
|
#{fname},
|
||||||
|
</if>
|
||||||
|
<if test="fmemo != null">
|
||||||
|
#{fmemo},
|
||||||
|
</if>
|
||||||
|
<if test="fdelete != null">
|
||||||
|
#{fdelete},
|
||||||
|
</if>
|
||||||
|
<if test="creator != null">
|
||||||
|
#{creator},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
#{createTime},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
#{updateTime},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<!--oracle未处理-->
|
||||||
|
<!--<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.hrmresource.po.ResourceItemPO"-->
|
||||||
|
<!--databaseId="oracle">-->
|
||||||
|
<!--</insert>-->
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue