Showing
3 changed files
with
14 additions
and
42 deletions
| ... | @@ -33,44 +33,10 @@ public class DictionaryEntries implements Serializable { | ... | @@ -33,44 +33,10 @@ public class DictionaryEntries implements Serializable { |
| 33 | @Column(name = "DICT_CODE") | 33 | @Column(name = "DICT_CODE") |
| 34 | private String dictCode; | 34 | private String dictCode; |
| 35 | 35 | ||
| 36 | + @Column(name = "EXT3") | ||
| 37 | + private String ext3; | ||
| 38 | + | ||
| 36 | @Column(name = "EXT6") | 39 | @Column(name = "EXT6") |
| 37 | private String ext6; | 40 | private String ext6; |
| 38 | 41 | ||
| 39 | -// @Column(name = "DICT_CODE") | ||
| 40 | -// private String dictCode; | ||
| 41 | -// | ||
| 42 | -// @Column(name = "ENGLISH_NAME") | ||
| 43 | -// private String englishName; | ||
| 44 | -// | ||
| 45 | -// @Column(name = "DESCRIPTION") | ||
| 46 | -// private String description; | ||
| 47 | -// | ||
| 48 | -// @Column(name = "STATUS") | ||
| 49 | -// private Integer status; | ||
| 50 | -// | ||
| 51 | -// @Column(name="DICT_ID") | ||
| 52 | -// private String dictId; | ||
| 53 | -// | ||
| 54 | -// @Column(name = "EXT1") | ||
| 55 | -// private Integer ext1; | ||
| 56 | -// | ||
| 57 | -// @Column(name = "EXT2") | ||
| 58 | -// private String ext2; | ||
| 59 | -// | ||
| 60 | -// @Column(name = "EXT3") | ||
| 61 | -// private String ext3; | ||
| 62 | -// | ||
| 63 | -// @Column(name = "EXT4") | ||
| 64 | -// private BigDecimal ext4; | ||
| 65 | -// | ||
| 66 | -// @Column(name = "EXT5") | ||
| 67 | -// private Integer ext5; | ||
| 68 | -// | ||
| 69 | -// @Column(name = "ORDINAL") | ||
| 70 | -// private Integer ordinal; | ||
| 71 | -// | ||
| 72 | -// @Column(name = "EXT6") | ||
| 73 | -// private String ext6; | ||
| 74 | - | ||
| 75 | - | ||
| 76 | } | 42 | } | ... | ... |
| ... | @@ -30,7 +30,7 @@ public interface DictionaryEntriesRepository extends JpaRepository<DictionaryEn | ... | @@ -30,7 +30,7 @@ public interface DictionaryEntriesRepository extends JpaRepository<DictionaryEn |
| 30 | * 查找全部DictionaryEntries | 30 | * 查找全部DictionaryEntries |
| 31 | * @return | 31 | * @return |
| 32 | */ | 32 | */ |
| 33 | - @Query(nativeQuery = true, value = "select ID,CODE,CHINESE_NAME,DICT_CODE,EXT6 from T_BI_DICTIONARY_ENTRIES where STATUS=1") | 33 | + @Query(nativeQuery = true, value = "select ID,CODE,CHINESE_NAME,DICT_CODE,EXT3,EXT6 from T_BI_DICTIONARY_ENTRIES where STATUS=1") |
| 34 | public List<DictionaryEntries> findAllDictionaryEntries(); | 34 | public List<DictionaryEntries> findAllDictionaryEntries(); |
| 35 | 35 | ||
| 36 | } | 36 | } | ... | ... |
| ... | @@ -35,21 +35,27 @@ public class DictionaryEntriesService { | ... | @@ -35,21 +35,27 @@ public class DictionaryEntriesService { |
| 35 | 35 | ||
| 36 | 36 | ||
| 37 | /** | 37 | /** |
| 38 | - * 初始化AppInfo | 38 | + * 初始化字典表 |
| 39 | */ | 39 | */ |
| 40 | public void initDictionaryEntries() { | 40 | public void initDictionaryEntries() { |
| 41 | try { | 41 | try { |
| 42 | Constant.dictionaryEntriesCache.clear(); | 42 | Constant.dictionaryEntriesCache.clear(); |
| 43 | List<DictionaryEntries> dictionaryEntriesList = this.getAllDictionaryEntries(); | 43 | List<DictionaryEntries> dictionaryEntriesList = this.getAllDictionaryEntries(); |
| 44 | for (DictionaryEntries dictionaryEntries : dictionaryEntriesList) { | 44 | for (DictionaryEntries dictionaryEntries : dictionaryEntriesList) { |
| 45 | + //成交方式 | ||
| 45 | if(Objects.equals(dictionaryEntries.getDictCode(),"ClinchType")){ | 46 | if(Objects.equals(dictionaryEntries.getDictCode(),"ClinchType")){ |
| 46 | - Constant.dictionaryEntriesCache.put(dictionaryEntries.getDictCode()+"_"+dictionaryEntries.getExt6(),dictionaryEntries); | 47 | + Constant.dictionaryEntriesCache.put(Constant.CLINCH_TYPE+dictionaryEntries.getExt6(),dictionaryEntries); |
| 47 | - }else{ | 48 | + } |
| 49 | + //国家 | ||
| 50 | + else if(Objects.equals(dictionaryEntries.getDictCode(),"Country")){ | ||
| 51 | + Constant.dictionaryEntriesCache.put(Constant.COUNTRY+dictionaryEntries.getExt3(),dictionaryEntries); | ||
| 52 | + } | ||
| 53 | + else{ | ||
| 48 | Constant.dictionaryEntriesCache.put(dictionaryEntries.getCode(),dictionaryEntries); | 54 | Constant.dictionaryEntriesCache.put(dictionaryEntries.getCode(),dictionaryEntries); |
| 49 | } | 55 | } |
| 50 | } | 56 | } |
| 51 | } catch (Exception e) { | 57 | } catch (Exception e) { |
| 52 | - log.error("initAppInfo() error" + e.getMessage()); | 58 | + log.error("initDictionaryEntries() error" + e.getMessage()); |
| 53 | } | 59 | } |
| 54 | } | 60 | } |
| 55 | 61 | ... | ... |
-
Please register or login to post a comment