wei.zhou

提交代码

...@@ -15,18 +15,29 @@ import java.util.Map; ...@@ -15,18 +15,29 @@ import java.util.Map;
15 @Component 15 @Component
16 public class Constant { 16 public class Constant {
17 17
18 + /**
19 + * 用户密码
20 + */
18 public static Map<String,HashMap<String,String>> appIdSecurityCache = new HashMap<>(); 21 public static Map<String,HashMap<String,String>> appIdSecurityCache = new HashMap<>();
19 22
20 - //字典表 23 + /**
24 + * 字典表 code:entity
25 + */
21 public static Map<String , DictionaryEntries> dictionaryEntriesCache = new HashMap<>(); 26 public static Map<String , DictionaryEntries> dictionaryEntriesCache = new HashMap<>();
22 27
23 - //货源地 28 + /**
29 + * 货源地
30 + */
24 public static Map<String,DomesticDestinationMapping> domesticDestinationMappingCache = new HashMap(); 31 public static Map<String,DomesticDestinationMapping> domesticDestinationMappingCache = new HashMap();
25 32
26 - //目的港口 33 + /**
34 + * 目的港口
35 + */
27 public static Map<String, OrigplacecodeMapping> origplacecodeMappingCache = new HashMap<>(); 36 public static Map<String, OrigplacecodeMapping> origplacecodeMappingCache = new HashMap<>();
28 37
29 - //港口表 38 + /**
39 + * 港口表
40 + */
30 public static Map<String, ChmCarryPort> chmCarryPortCache = new HashMap<>(); 41 public static Map<String, ChmCarryPort> chmCarryPortCache = new HashMap<>();
31 42
32 public static String MSG_TYPE_C="C"; 43 public static String MSG_TYPE_C="C";
......
...@@ -30,6 +30,11 @@ public class DictionaryEntries implements Serializable { ...@@ -30,6 +30,11 @@ public class DictionaryEntries implements Serializable {
30 @Column(name = "CHINESE_NAME") 30 @Column(name = "CHINESE_NAME")
31 private String chineseName; 31 private String chineseName;
32 32
33 + @Column(name = "DICT_CODE")
34 + private String dictCode;
35 +
36 + @Column(name = "EXT6")
37 + private String ext6;
33 38
34 // @Column(name = "DICT_CODE") 39 // @Column(name = "DICT_CODE")
35 // private String dictCode; 40 // private String dictCode;
......
...@@ -30,10 +30,7 @@ public interface DictionaryEntriesRepository extends JpaRepository<DictionaryEn ...@@ -30,10 +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 from T_BI_DICTIONARY_ENTRIES where STATUS=1") 33 + @Query(nativeQuery = true, value = "select ID,CODE,CHINESE_NAME,DICT_CODE,EXT6 from T_BI_DICTIONARY_ENTRIES where STATUS=1")
34 public List<DictionaryEntries> findAllDictionaryEntries(); 34 public List<DictionaryEntries> findAllDictionaryEntries();
35 35
36 -
37 -
38 -
39 } 36 }
......
...@@ -137,8 +137,7 @@ public class ChmConsignmentService { ...@@ -137,8 +137,7 @@ public class ChmConsignmentService {
137 //境内收发货人名称 137 //境内收发货人名称
138 result.setOperateUnitName(mawb.getTradeName()); 138 result.setOperateUnitName(mawb.getTradeName());
139 //TODO 成交方式 139 //TODO 成交方式
140 -// DictionaryEntries dealModeDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.CLINCH_TYPE+mawb.getTransMode()); 140 + DictionaryEntries dealModeDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.CLINCH_TYPE+mawb.getTransMode());
141 - DictionaryEntries dealModeDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.CLINCH_TYPE+"CIF");
142 result.setDealModeDic(dealModeDictionaryEntries); 141 result.setDealModeDic(dealModeDictionaryEntries);
143 result.setDealMode(dealModeDictionaryEntries.getChineseName()); 142 result.setDealMode(dealModeDictionaryEntries.getChineseName());
144 143
...@@ -277,7 +276,7 @@ public class ChmConsignmentService { ...@@ -277,7 +276,7 @@ public class ChmConsignmentService {
277 //TODO 提交时需要打开 276 //TODO 提交时需要打开
278 && pushTime.getTime()>chmConsignmentDB.getUpdateTime().getTime() 277 && pushTime.getTime()>chmConsignmentDB.getUpdateTime().getTime()
279 ){ 278 ){
280 - //TODO 更新数据 279 + //更新数据
281 log.info("更新主单"+ mawb.getBillNo()); 280 log.info("更新主单"+ mawb.getBillNo());
282 281
283 282
......
...@@ -10,6 +10,7 @@ import org.springframework.stereotype.Service; ...@@ -10,6 +10,7 @@ import org.springframework.stereotype.Service;
10 import java.util.ArrayList; 10 import java.util.ArrayList;
11 import java.util.HashMap; 11 import java.util.HashMap;
12 import java.util.List; 12 import java.util.List;
13 +import java.util.Objects;
13 14
14 /** 15 /**
15 * @author Administrator 16 * @author Administrator
...@@ -40,7 +41,11 @@ public class DictionaryEntriesService { ...@@ -40,7 +41,11 @@ public class DictionaryEntriesService {
40 try { 41 try {
41 List<DictionaryEntries> dictionaryEntriesList = this.getAllDictionaryEntries(); 42 List<DictionaryEntries> dictionaryEntriesList = this.getAllDictionaryEntries();
42 for (DictionaryEntries dictionaryEntries : dictionaryEntriesList) { 43 for (DictionaryEntries dictionaryEntries : dictionaryEntriesList) {
43 - Constant.dictionaryEntriesCache.put(dictionaryEntries.getCode(),dictionaryEntries); 44 + if(Objects.equals(dictionaryEntries.getDictCode(),"ClinchType")){
45 + Constant.dictionaryEntriesCache.put(dictionaryEntries.getDictCode()+"_"+dictionaryEntries.getExt6(),dictionaryEntries);
46 + }else{
47 + Constant.dictionaryEntriesCache.put(dictionaryEntries.getCode(),dictionaryEntries);
48 + }
44 } 49 }
45 } catch (Exception e) { 50 } catch (Exception e) {
46 log.error("initAppInfo() error" + e.getMessage()); 51 log.error("initAppInfo() error" + e.getMessage());
......
...@@ -103,7 +103,7 @@ public class ChmConsignmentServiceTest extends IClearApiApplicationTests { ...@@ -103,7 +103,7 @@ public class ChmConsignmentServiceTest extends IClearApiApplicationTests {
103 mawb.setBillNo("202105210784"); 103 mawb.setBillNo("202105210784");
104 mawb.setContrNo("NO.565733"); 104 mawb.setContrNo("NO.565733");
105 mawb.setCustomMaster("0101"); 105 mawb.setCustomMaster("0101");
106 - mawb.setCutMode("1");//TODO levyType_1 到底是什么code? 106 + mawb.setCutMode("101");
107 mawb.setDeclTrnRel("0"); 107 mawb.setDeclTrnRel("0");
108 mawb.setDistinatePort("ASM000"); 108 mawb.setDistinatePort("ASM000");
109 mawb.setEdiId("001"); 109 mawb.setEdiId("001");
......