From a3380ce0bd562c2da0a1090ce003bae71ca06af7 Mon Sep 17 00:00:00 2001 From: dxfeng Date: Wed, 16 Aug 2023 16:40:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=91=98=E5=BF=AB=E6=8D=B7=E6=90=9C?= =?UTF-8?q?=E7=B4=A2BUG=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/condition/QuickSearchMapper.java | 13 ++++++++-- .../mapper/condition/QuickSearchMapper.xml | 26 +++++++++++++++---- .../service/impl/HrmResourceServiceImpl.java | 2 +- .../service/impl/QuickSearchServiceImpl.java | 6 +++-- 4 files changed, 37 insertions(+), 10 deletions(-) diff --git a/src/com/engine/organization/mapper/condition/QuickSearchMapper.java b/src/com/engine/organization/mapper/condition/QuickSearchMapper.java index 86e9323a..dc5e04e6 100644 --- a/src/com/engine/organization/mapper/condition/QuickSearchMapper.java +++ b/src/com/engine/organization/mapper/condition/QuickSearchMapper.java @@ -32,6 +32,14 @@ public interface QuickSearchMapper { */ List getQuickSearchConditionList(@Param("belongTo") Integer belongTo, @Param("modelId") Integer modelId); + /** + * 获取快速搜索条件 + * + * @param id id + * @return return + */ + QuickSearchCondition getQuickSearchConditionById(@Param("id") String id); + /** * 获取快速搜索选项列表 * @@ -115,10 +123,11 @@ public interface QuickSearchMapper { /** * 按条件Id获取快速搜索字段列表 * - * @param id 条件Id + * @param fieldName 字段名称 + * @param scopeId scopeId * @return return */ - List getQuickSearchFieldListByConditionId(@Param("id") String id); + QuickSearchField getQuickSearchFieldListByConditionId(@Param("fieldName") String fieldName, @Param("scopeId") String scopeId); /** * 更新快速搜索详细信息 diff --git a/src/com/engine/organization/mapper/condition/QuickSearchMapper.xml b/src/com/engine/organization/mapper/condition/QuickSearchMapper.xml index af2ed2bf..50afdace 100644 --- a/src/com/engine/organization/mapper/condition/QuickSearchMapper.xml +++ b/src/com/engine/organization/mapper/condition/QuickSearchMapper.xml @@ -18,6 +18,13 @@ order by c.orderid, c.id + + - select b.fieldhtmltype, b.type, b.fielddbtype - from jcl_quicksearch_condition c - left join hrm_formfield b on b.fieldid = c.fieldid - where c.id = #{id} + SELECT * + FROM (SELECT t2.fielddbtype, t2.fieldhtmltype, t2.type, t1.scopeid as scopeId, t2.fieldname + FROM cus_formfield t1, + cus_formdict t2 + WHERE t1.fieldid = t2.id + AND t1.scope = 'HrmCustomFieldByInfoType' + UNION ALL + SELECT t3.fielddbtype, t3.fieldhtmltype, t3.TYPE, c.grouptype as scopeId, t3.fieldname + FROM hrm_formfield t3 + inner join hrm_fieldgroup c on c.id = t3.groupid and c.grouptype in (-1, 1, 3)) hrmallfield + WHERE FIELDHTMLTYPE != '6' + and fieldname = #{fieldName} + and scopeId = #{scopeId}