Merge remote-tracking branch 'origin/develop' into feature/ml

pull/161/head^2
Mlin 2 years ago
commit f04216a113

@ -106,7 +106,8 @@
</trim>
</insert>
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.personnelcard.po.CardAccessPO" databaseId="oracle">
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.personnelcard.po.CardAccessPO"
databaseId="oracle">
<selectKey keyProperty="id" resultType="long" order="AFTER">
select JCL_ORG_CARDACCESS_ID.currval from dual
</selectKey>
@ -235,6 +236,50 @@
</foreach>
</update>
<update id="saveCardAccess" parameterType="java.util.List" databaseId="postgresql">
update jcl_org_cardaccess
<trim prefix="set" suffixOverrides=",">
<trim prefix="status =case" suffix="end,">
<foreach collection="dataList" item="item" index="index">
<if test="item.status != null">
when id=#{item.id} then #{item.status}
</if>
</foreach>
</trim>
<trim prefix="all_people =case" suffix="end,">
<foreach collection="dataList" item="item" index="index">
<if test="item.allPeople != null">
when id=#{item.id} then #{item.allPeople}
</if>
</foreach>
</trim>
<trim prefix="superior =case" suffix="end,">
<foreach collection="dataList" item="item" index="index">
<if test="item.superior != null">
when id=#{item.id} then #{item.superior}
</if>
</foreach>
</trim>
<trim prefix="all_superior =case" suffix="end,">
<foreach collection="dataList" item="item" index="index">
<if test="item.allSuperior != null">
when id=#{item.id} then #{item.allSuperior}
</if>
</foreach>
</trim>
<trim prefix="custom =case" suffix="end,">
<foreach collection="dataList" item="item" index="index">
when id=#{item.id} then #{item.custom}
</foreach>
</trim>
update_time=now(),
</trim>
where
<foreach collection="dataList" separator="or" item="item" index="index">
id=#{item.id}
</foreach>
</update>
<update id="deleteByIds">
UPDATE jcl_org_cardaccess
SET delete_type = 1

@ -40,11 +40,11 @@
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.engine.organization.entity.hrmresource.po.JclOrgCustomTemplatePO" useGeneratedKeys="true">
insert into jcl_org_custom_template
( id,name,basic_fields
(name,basic_fields
,personal_fields,work_fields,isused
,creator,create_time,update_time
)
values (#{id,jdbcType=INTEGER},#{name,jdbcType=VARCHAR},#{basicFields,jdbcType=VARCHAR}
values (#{name,jdbcType=VARCHAR},#{basicFields,jdbcType=VARCHAR}
,#{personalFields,jdbcType=VARCHAR},#{workFields,jdbcType=VARCHAR},#{isused,jdbcType=INTEGER}
,#{creator,jdbcType=INTEGER},#{createTime,jdbcType=DATE},#{updateTime,jdbcType=DATE}
)

@ -285,10 +285,10 @@ public class HrmPersonnelCardServiceImpl extends Service implements HrmPersonnel
List<CardButtonPO> cardButtonPOS = getCardButtonMapper().listEnableButton();
List<CardButtonPO> buttonList = new ArrayList<>();
HrmCommonService hrmCommonService = new HrmCommonServiceImpl();
List<String> roleIds = new ArrayList<>(Arrays.asList(hrmCommonService.getRoleIds(user.getUID()).split(",")));
for (CardButtonPO cardButton : cardButtonPOS) {
List<String> roleIds = new ArrayList<>(Arrays.asList(hrmCommonService.getRoleIds(user.getUID()).split(",")));
List<String> accessRoleIds = new ArrayList<>(Arrays.asList(Util.null2String(cardButton.getRoles()).split(",")));
roleIds.retainAll(accessRoleIds);
if (isAdmin || (isMySelf && "0".equals(cardButton.getSysDefault())) || CollectionUtils.isNotEmpty(roleIds)) {

Loading…
Cancel
Save