Browse Source

Merge branch 'test' into test-merge

lvy 2 months ago
parent
commit
1b56cd2e67

+ 3 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/SignConfigMapper.xml

@@ -68,8 +68,9 @@
             and a.e_name like concat('%',#{keyword},'%')
         </if>
     </select>
-    <select id="getConfigByENames" resultType="org.springblade.manager.vo.SignConfigVO">
-        select a.id,a.e_name,a.e_id,a.e_key,a.table_type,a.element_type,a.tenant_id,a.create_user,a.create_dept,a.create_time,a.update_user,a.update_time,a.status,a.is_deleted
+    <select id="getConfigByENames" resultMap="signConfigVO">
+        select a.id,a.e_name,a.e_id,a.e_key,a.table_type,a.element_type,a.tenant_id,a.create_user,a.create_dept,a.create_time,a.update_user,a.update_time,a.status,a.is_deleted,
+               b.id,b.conf_id,b.type,b.relation_type,b.relation_id,b.relation_name,b.create_user,b.create_dept,b.create_time,b.update_user,b.update_time,b.status,b.is_deleted
         from m_sign_config a LEFT JOIN m_sign_config_relation b
             on a.id = b.conf_id WHERE a.`status` = 1 and a.is_deleted = 0 and b.is_deleted = 0
         <if test="names != null">

+ 1 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/SignConfigServiceImpl.java

@@ -309,7 +309,7 @@ public class SignConfigServiceImpl extends BaseServiceImpl<SignConfigMapper, Sig
             return textdictInfoVOS;
         }
         List<WbsFormElement> list = this.wbsFormElementMapper.selectList(Wrappers.<WbsFormElement>lambdaQuery().select(WbsFormElement::getEName, WbsFormElement::getEKey)
-                .eq(WbsFormElement::getFId, tableInfos.get(0)).in(WbsFormElement::getEKey, keyMap.keySet()));
+                .eq(WbsFormElement::getFId, tableInfos.get(0).getId()).in(WbsFormElement::getEKey, keyMap.keySet()));
         if (list == null || list.isEmpty()) {
             return textdictInfoVOS;
         }

+ 10 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/TextdictInfoServiceImpl.java

@@ -84,7 +84,7 @@ public class TextdictInfoServiceImpl extends ServiceImpl<TextdictInfoMapper, Tex
                 }else{
                     textdict = baseMapper.selectTextdictInfoByExcelId(page, textdictInfo);
                 }
-                if (textdict != null && !textdict.isEmpty()) {
+                if (textdict != null && !keys.isEmpty()) {
                     for (TextdictInfoVO vo : textdict) {
                         if (!(privateInfo.getPKeyId() + "").equals(vo.getTabId())) {
                             vo.setIsSystem(1);
@@ -93,7 +93,15 @@ public class TextdictInfoServiceImpl extends ServiceImpl<TextdictInfoMapper, Tex
                     }
                     if (Func.isNotEmpty(keys)) {
                         // 查询系统级电签配置
-                        List<TextdictInfoVO> textdictList = iSignConfigService.hasSignConfig(privateInfo.getInitTableName(), keys, textdict.get(0));
+                        TextdictInfoVO temp = textdict.stream().findFirst().orElse(null);
+                        if (temp == null) {
+                            temp = new TextdictInfoVO();
+                            temp.setProjectId(privateInfo.getProjectId());
+                            temp.setExcelId(privateInfo.getExcelId() + "");
+                            temp.setTabId(privateInfo.getPKeyId() + "");
+                            temp.setType(2);
+                        }
+                        List<TextdictInfoVO> textdictList = iSignConfigService.hasSignConfig(privateInfo.getInitTableName(), keys, temp);
                         textdict.addAll(textdictList);
                     }
                 }