raojiang преди 6 месеца
родител
ревизия
1caed72bce

+ 19 - 0
common/common-core/src/main/java/com/hdkj/lt/core/config/JsonModuleConfig.java

@@ -0,0 +1,19 @@
+package com.hdkj.lt.core.config;
+
+import com.fasterxml.jackson.databind.module.SimpleModule;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @author rj
+ * @date 2026/2/4 10:45
+ * @description
+ */
+@Configuration
+public class JsonModuleConfig extends SimpleModule {
+    public JsonModuleConfig() {
+        this.addSerializer(Long.class, new ToStringSerializer());
+        this.addSerializer(Long.TYPE, new ToStringSerializer());
+    }
+
+}

+ 3 - 0
common/common-core/src/main/java/com/hdkj/lt/core/sys/dao/SysDictMapper.java

@@ -1,6 +1,7 @@
 package com.hdkj.lt.core.sys.dao;
 
 import com.hdkj.lt.core.sys.model.po.DicSingle;
+import com.ruoyi.system.api.domain.SysDictData;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
@@ -17,4 +18,6 @@ public interface SysDictMapper {
 
     List<DicSingle> getDictSingleByTypeName(@Param("typeName") String typeName);
 
+
+    List<SysDictData> getListByTypeName(@Param("typeNames")List<String> typeNames);
 }

+ 30 - 1
common/common-core/src/main/java/com/hdkj/lt/core/sys/service/impl/SysDicRefServiceImpl.java

@@ -1,13 +1,19 @@
 package com.hdkj.lt.core.sys.service.impl;
 
+import com.hdkj.lt.core.sys.dao.SysDictMapper;
+import com.hdkj.lt.core.sys.model.po.DicSingle;
 import com.hdkj.lt.core.sys.model.vo.DicLevelTreeVo;
 import com.hdkj.lt.core.sys.model.vo.DicVo;
 import com.hdkj.lt.core.sys.model.vo.DictVo;
 import com.hdkj.lt.core.sys.service.ISysDicRefService;
+import com.ruoyi.system.api.domain.SysDictData;
+import lombok.RequiredArgsConstructor;
 import org.springframework.stereotype.Service;
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
 
 /**
  * @author rj
@@ -15,7 +21,12 @@ import java.util.List;
  * @description
  */
 @Service
+@RequiredArgsConstructor
 public class SysDicRefServiceImpl implements ISysDicRefService {
+
+    private final SysDictMapper sysDictMapper;
+
+
     //todo: 需要重写
     @Override
     public List<DicVo> getDicListByType(String typeName) {
@@ -24,7 +35,25 @@ public class SysDicRefServiceImpl implements ISysDicRefService {
 
     @Override
     public List<DictVo> getDictVosByTypeNames(List<String> typeNames) {
-        return new ArrayList<>();
+        List<SysDictData> listByTypeName = sysDictMapper.getListByTypeName(typeNames);
+        List<DicSingle> dicSingles = new ArrayList<>();
+        listByTypeName.forEach(i -> {
+            DicSingle dicSingle = new DicSingle();
+            dicSingle.setTypeName(i.getDictType());
+            dicSingle.setValue(i.getDictValue());
+            dicSingle.setLabel(i.getDictLabel());
+            dicSingle.setSort(i.getDictSort().intValue());
+            dicSingles.add(dicSingle);
+        });
+        Map<String, List<DicSingle>> collect = dicSingles.stream().collect(Collectors.groupingBy(DicSingle::getTypeName));
+        List<DictVo> dictVoList = new ArrayList<>();
+        for (String key : collect.keySet()) {
+            DictVo dictVo = new DictVo();
+            dictVo.setTypeName(key);
+            dictVo.setSingleList(collect.get(key));
+            dictVoList.add(dictVo);
+        }
+        return dictVoList;
     }
 
     @Override

+ 15 - 5
common/common-core/src/main/resources/mapper/SysDictMapper.xml

@@ -3,13 +3,23 @@
 <mapper namespace="com.hdkj.lt.core.sys.dao.SysDictMapper">
 
     <select id="getDictSingleByTypeName" resultType="com.hdkj.lt.core.sys.model.po.DicSingle">
-        SELECT
-            sdd.dict_label as label,
-            sdd.dict_value as value,
-            sdd.dict_sort as sort
+        SELECT sdd.dict_label as label,
+               sdd.dict_value as value,
+               sdd.dict_sort  as sort
         FROM sys_dict_type sdt
-        INNER JOIN sys_dict_data sdd ON sdt.dict_type = sdd.dict_type AND sdt.dict_type = #{typeName,jdbcType=VARCHAR}
+                 INNER JOIN sys_dict_data sdd
+                            ON sdt.dict_type = sdd.dict_type AND sdt.dict_type = #{typeName,jdbcType=VARCHAR}
         ORDER BY sdd.dict_sort
     </select>
 
+    <select id="getListByTypeName" resultType="com.ruoyi.system.api.domain.SysDictData">
+        select *
+        from sys_dict_data
+        where dict_type in
+        <foreach collection="typeNames" item="typeName" index="index" open="(" close=")" separator=",">
+            #{typeName}
+        </foreach>
+    </select>
+
+
 </mapper>

+ 1 - 1
services/load-transfer-bf/src/main/java/com/hdkj/lt/bf/mapper/CustomerPowerProtectionConfigMapper.java

@@ -25,5 +25,5 @@ public interface CustomerPowerProtectionConfigMapper extends BaseMapper<Customer
 
     Long insertAllData();
 
-    List<CustomerPowerProtectionConfigVO> getJoinecType(List<String> transformerNoList);
+    List<CustomerPowerProtectionConfigVO> getJoinecType(@Param("transformerNoList") List<String> transformerNoList);
 }

+ 2 - 1
services/load-transfer-bf/src/main/resources/mapper/CustomerPowerProtectionConfigMapper.xml

@@ -3,7 +3,8 @@
 <mapper namespace="com.hdkj.lt.bf.mapper.CustomerPowerProtectionConfigMapper">
 
     <select id="getConfigPage" resultType="com.hdkj.lt.bf.entity.vo.CustomerPowerProtectionConfigVO">
-        select pc.transformer_no,
+        select pc.id,
+               pc.transformer_no,
         pc.transformer_name,
         pc.transformer_list,
         pc.publ_clg_flag,

+ 1 - 1
services/load-transfer-bf/src/main/resources/mapper/DwdShbDsSwitchBaseMapper.xml

@@ -11,7 +11,7 @@
         a.name switchName,
         a.switch_role_name switchRoleName,
         a.feeder_name feederName,
-        s.ORGAN_ALIAS maintOrgName,
+        s.short_name maintOrgName,
         a.station_name stationName,
         c.oc1_value oc1Value,
         c.oc1_delay oc1Delay,