Commit 8168ca41 authored by 赵啸非's avatar 赵啸非

添加离职人员同步删除考勤组相关人员

parent 2700c8ff
...@@ -20,8 +20,6 @@ ...@@ -20,8 +20,6 @@
<result property="salaName" column="salaName" /> <result property="salaName" column="salaName" />
<result property="staffId" column="staffId" /> <result property="staffId" column="staffId" />
<result property="staffName" column="staffName" /> <result property="staffName" column="staffName" />
<result property="systemUserId" column="systemUserId" />
<result property="systemUserName" column="systemUserName" />
<collection property="windowOwnerDetailList" column="id" ofType="WindowOwnerDetailEntity" javaType="ArrayList" select="getWindowOwnerDetailByOwnerId"></collection> <collection property="windowOwnerDetailList" column="id" ofType="WindowOwnerDetailEntity" javaType="ArrayList" select="getWindowOwnerDetailByOwnerId"></collection>
</resultMap> </resultMap>
<resultMap type="WindowOwnerDetailEntity" id="WindowOwnerDetailEntity-Map"> <resultMap type="WindowOwnerDetailEntity" id="WindowOwnerDetailEntity-Map">
...@@ -88,12 +86,6 @@ ...@@ -88,12 +86,6 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('staffName') or colPickMode == 1 and data.containsKey('staffName')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('staffName') or colPickMode == 1 and data.containsKey('staffName')))">
a.staffName, a.staffName,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('systemUserId') or colPickMode == 1 and data.containsKey('systemUserId')))">
a.systemUserId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('systemUserName') or colPickMode == 1 and data.containsKey('systemUserName')))">
a.systemUserName,
</if>
</trim> </trim>
</sql> </sql>
<!-- 子表所有列 --> <!-- 子表所有列 -->
...@@ -105,18 +97,18 @@ ...@@ -105,18 +97,18 @@
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="WindowOwnerEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="WindowOwnerEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_window_owner insert into mortals_xhx_window_owner
(deptId,deptName,number,phone,windowCount,remark,createTime,createUserId,updateUserId,updateTime,salaId,salaName,staffId,staffName,systemUserId,systemUserName) (deptId,deptName,number,phone,windowCount,remark,createTime,createUserId,updateUserId,updateTime,salaId,salaName,staffId,staffName)
VALUES VALUES
(#{deptId},#{deptName},#{number},#{phone},#{windowCount},#{remark},#{createTime},#{createUserId},#{updateUserId},#{updateTime},#{salaId},#{salaName},#{staffId},#{staffName},#{systemUserId},#{systemUserName}) (#{deptId},#{deptName},#{number},#{phone},#{windowCount},#{remark},#{createTime},#{createUserId},#{updateUserId},#{updateTime},#{salaId},#{salaName},#{staffId},#{staffName})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_window_owner insert into mortals_xhx_window_owner
(deptId,deptName,number,phone,windowCount,remark,createTime,createUserId,updateUserId,updateTime,salaId,salaName,staffId,staffName,systemUserId,systemUserName) (deptId,deptName,number,phone,windowCount,remark,createTime,createUserId,updateUserId,updateTime,salaId,salaName,staffId,staffName)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.deptId},#{item.deptName},#{item.number},#{item.phone},#{item.windowCount},#{item.remark},#{item.createTime},#{item.createUserId},#{item.updateUserId},#{item.updateTime},#{item.salaId},#{item.salaName},#{item.staffId},#{item.staffName},#{item.systemUserId},#{item.systemUserName}) (#{item.deptId},#{item.deptName},#{item.number},#{item.phone},#{item.windowCount},#{item.remark},#{item.createTime},#{item.createUserId},#{item.updateUserId},#{item.updateTime},#{item.salaId},#{item.salaName},#{item.staffId},#{item.staffName})
</foreach> </foreach>
</insert> </insert>
...@@ -186,15 +178,6 @@ ...@@ -186,15 +178,6 @@
<if test="(colPickMode==0 and data.containsKey('staffName')) or (colPickMode==1 and !data.containsKey('staffName'))"> <if test="(colPickMode==0 and data.containsKey('staffName')) or (colPickMode==1 and !data.containsKey('staffName'))">
a.staffName=#{data.staffName}, a.staffName=#{data.staffName},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('systemUserId')) or (colPickMode==1 and !data.containsKey('systemUserId'))">
a.systemUserId=#{data.systemUserId},
</if>
<if test="(colPickMode==0 and data.containsKey('systemUserIdIncrement')) or (colPickMode==1 and !data.containsKey('systemUserIdIncrement'))">
a.systemUserId=ifnull(a.systemUserId,0) + #{data.systemUserIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('systemUserName')) or (colPickMode==1 and !data.containsKey('systemUserName'))">
a.systemUserName=#{data.systemUserName},
</if>
</trim> </trim>
<trim suffixOverrides="where" suffix=""> <trim suffixOverrides="where" suffix="">
where where
...@@ -335,25 +318,6 @@ ...@@ -335,25 +318,6 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="systemUserId=(case" suffix="ELSE systemUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('systemUserId')) or (colPickMode==1 and !item.containsKey('systemUserId'))">
when a.id=#{item.id} then #{item.systemUserId}
</when>
<when test="(colPickMode==0 and item.containsKey('systemUserIdIncrement')) or (colPickMode==1 and !item.containsKey('systemUserIdIncrement'))">
when a.id=#{item.id} then ifnull(a.systemUserId,0) + #{item.systemUserIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="systemUserName=(case" suffix="ELSE systemUserName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('systemUserName')) or (colPickMode==1 and !item.containsKey('systemUserName'))">
when a.id=#{item.id} then #{item.systemUserName}
</if>
</foreach>
</trim>
</trim> </trim>
where id in where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")"> <foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
...@@ -823,54 +787,6 @@ ...@@ -823,54 +787,6 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('systemUserId')">
<if test="conditionParamRef.systemUserId != null ">
${_conditionType_} a.systemUserId = #{${_conditionParam_}.systemUserId}
</if>
<if test="conditionParamRef.systemUserId == null">
${_conditionType_} a.systemUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('systemUserIdList') and conditionParamRef.systemUserIdList.size() > 0">
${_conditionType_} a.systemUserId in
<foreach collection="conditionParamRef.systemUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('systemUserIdNotList') and conditionParamRef.systemUserIdNotList.size() > 0">
${_conditionType_} a.systemUserId not in
<foreach collection="conditionParamRef.systemUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('systemUserIdStart') and conditionParamRef.systemUserIdStart != null">
${_conditionType_} a.systemUserId <![CDATA[ >= ]]> #{${_conditionParam_}.systemUserIdStart}
</if>
<if test="conditionParamRef.containsKey('systemUserIdEnd') and conditionParamRef.systemUserIdEnd != null">
${_conditionType_} a.systemUserId <![CDATA[ <= ]]> #{${_conditionParam_}.systemUserIdEnd}
</if>
<if test="conditionParamRef.containsKey('systemUserName')">
<if test="conditionParamRef.systemUserName != null and conditionParamRef.systemUserName != ''">
${_conditionType_} a.systemUserName like #{${_conditionParam_}.systemUserName}
</if>
<if test="conditionParamRef.systemUserName == null">
${_conditionType_} a.systemUserName is null
</if>
</if>
<if test="conditionParamRef.containsKey('systemUserNameList') and conditionParamRef.systemUserNameList.size() > 0">
${_conditionType_} a.systemUserName in
<foreach collection="conditionParamRef.systemUserNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('systemUserNameNotList') and conditionParamRef.systemUserNameNotList.size() > 0">
${_conditionType_} a.systemUserName not in
<foreach collection="conditionParamRef.systemUserNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
</sql> </sql>
<sql id="_orderCols_"> <sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()"> <if test="orderColList != null and !orderColList.isEmpty()">
...@@ -924,13 +840,6 @@ ...@@ -924,13 +840,6 @@
</foreach> </foreach>
, ,
</if> </if>
<if test="conditionParamRef.containsKey('systemUserIdList') and conditionParamRef.systemUserIdList.size() > 0">
field(a.systemUserId,
<foreach collection="conditionParamRef.systemUserIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
<foreach collection="orderColList" open="" close="" index="index" item="item" separator=","> <foreach collection="orderColList" open="" close="" index="index" item="item" separator=",">
a.${item.colName} ${item.sortKind} a.${item.colName} ${item.sortKind}
...@@ -988,13 +897,6 @@ ...@@ -988,13 +897,6 @@
</foreach> </foreach>
, ,
</if> </if>
<if test="conditionParamRef.containsKey('systemUserIdList') and conditionParamRef.systemUserIdList.size() > 0">
field(a.systemUserId,
<foreach collection="conditionParamRef.systemUserIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
<if test="orderCol.containsKey('id')"> <if test="orderCol.containsKey('id')">
a.id a.id
...@@ -1071,16 +973,6 @@ ...@@ -1071,16 +973,6 @@
<if test='orderCol.staffName != null and "DESC".equalsIgnoreCase(orderCol.staffName)'>DESC</if> <if test='orderCol.staffName != null and "DESC".equalsIgnoreCase(orderCol.staffName)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('systemUserId')">
a.systemUserId
<if test='orderCol.systemUserId != null and "DESC".equalsIgnoreCase(orderCol.systemUserId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('systemUserName')">
a.systemUserName
<if test='orderCol.systemUserName != null and "DESC".equalsIgnoreCase(orderCol.systemUserName)'>DESC</if>
,
</if>
</trim> </trim>
</if> </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