wei.zhou

提交代码

......@@ -15,18 +15,29 @@ import java.util.Map;
@Component
public class Constant {
/**
* 用户密码
*/
public static Map<String,HashMap<String,String>> appIdSecurityCache = new HashMap<>();
//字典表
/**
* 字典表 code:entity
*/
public static Map<String , DictionaryEntries> dictionaryEntriesCache = new HashMap<>();
//货源地
/**
* 货源地
*/
public static Map<String,DomesticDestinationMapping> domesticDestinationMappingCache = new HashMap();
//目的港口
/**
* 目的港口
*/
public static Map<String, OrigplacecodeMapping> origplacecodeMappingCache = new HashMap<>();
//港口表
/**
* 港口表
*/
public static Map<String, ChmCarryPort> chmCarryPortCache = new HashMap<>();
public static String MSG_TYPE_C="C";
......
......@@ -30,6 +30,11 @@ public class DictionaryEntries implements Serializable {
@Column(name = "CHINESE_NAME")
private String chineseName;
@Column(name = "DICT_CODE")
private String dictCode;
@Column(name = "EXT6")
private String ext6;
// @Column(name = "DICT_CODE")
// private String dictCode;
......
......@@ -30,10 +30,7 @@ public interface DictionaryEntriesRepository extends JpaRepository<DictionaryEn
* 查找全部DictionaryEntries
* @return
*/
@Query(nativeQuery = true, value = "select ID,CODE,CHINESE_NAME from T_BI_DICTIONARY_ENTRIES where STATUS=1")
@Query(nativeQuery = true, value = "select ID,CODE,CHINESE_NAME,DICT_CODE,EXT6 from T_BI_DICTIONARY_ENTRIES where STATUS=1")
public List<DictionaryEntries> findAllDictionaryEntries();
}
......
......@@ -137,8 +137,7 @@ public class ChmConsignmentService {
//境内收发货人名称
result.setOperateUnitName(mawb.getTradeName());
//TODO 成交方式
// DictionaryEntries dealModeDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.CLINCH_TYPE+mawb.getTransMode());
DictionaryEntries dealModeDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.CLINCH_TYPE+"CIF");
DictionaryEntries dealModeDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.CLINCH_TYPE+mawb.getTransMode());
result.setDealModeDic(dealModeDictionaryEntries);
result.setDealMode(dealModeDictionaryEntries.getChineseName());
......@@ -277,7 +276,7 @@ public class ChmConsignmentService {
//TODO 提交时需要打开
&& pushTime.getTime()>chmConsignmentDB.getUpdateTime().getTime()
){
//TODO 更新数据
//更新数据
log.info("更新主单"+ mawb.getBillNo());
......
......@@ -10,6 +10,7 @@ import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Objects;
/**
* @author Administrator
......@@ -40,7 +41,11 @@ public class DictionaryEntriesService {
try {
List<DictionaryEntries> dictionaryEntriesList = this.getAllDictionaryEntries();
for (DictionaryEntries dictionaryEntries : dictionaryEntriesList) {
Constant.dictionaryEntriesCache.put(dictionaryEntries.getCode(),dictionaryEntries);
if(Objects.equals(dictionaryEntries.getDictCode(),"ClinchType")){
Constant.dictionaryEntriesCache.put(dictionaryEntries.getDictCode()+"_"+dictionaryEntries.getExt6(),dictionaryEntries);
}else{
Constant.dictionaryEntriesCache.put(dictionaryEntries.getCode(),dictionaryEntries);
}
}
} catch (Exception e) {
log.error("initAppInfo() error" + e.getMessage());
......
......@@ -103,7 +103,7 @@ public class ChmConsignmentServiceTest extends IClearApiApplicationTests {
mawb.setBillNo("202105210784");
mawb.setContrNo("NO.565733");
mawb.setCustomMaster("0101");
mawb.setCutMode("1");//TODO levyType_1 到底是什么code?
mawb.setCutMode("101");
mawb.setDeclTrnRel("0");
mawb.setDistinatePort("ASM000");
mawb.setEdiId("001");
......