This commit is contained in:
linfso 2024-09-19 17:25:50 +08:00
parent 07243d85fd
commit 35d4224dc9
3 changed files with 40 additions and 0 deletions

View File

@ -35,6 +35,9 @@ public interface EmisCountryMapper extends BaseMapper<EmisCountry>
*/
public EmisCountry selectEmisCountryById(Integer id);
public EmisCountry selectEmisCountryByCode(String code);
/**
* 查询列表
*

View File

@ -2002,6 +2002,10 @@ public class EmisBaseService {
// k17 -清关方式
// k18 -目的网点三字码
// k19 -寄件国中文
// k20 -寄件国英文
JSONObject extData = new JSONObject();
extData.put("k1",waybill.getReceiveCountryName());
@ -2040,6 +2044,17 @@ public class EmisBaseService {
extData.put("k18",WaybillHelper.removeUnSeeChar(destSite.getSizeCode3()));
// 寄件国中文K19 ,英文 K20
extData.put("k19",WaybillHelper.removeUnSeeChar(waybill.getSendCountryName()));
String sendCountryNameEn="";
EmisCountry sendCountry=getCountryByCode(waybill.getSendCountry());
if(sendCountry!=null){
sendCountryNameEn=sendCountry.getNameEn();
}
extData.put("k20",WaybillHelper.removeUnSeeChar(sendCountryNameEn));
String pickupMethod="";
if(!StringUtils.isEmpty(waybill.getPickupMethod())){
pickupMethod=DictUtils.getDictLabel("emis_qujian_fangshi",waybill.getPickupMethod());
@ -2622,6 +2637,22 @@ public class EmisBaseService {
return emisTransProductMapper.selectTransProductByName(lineCode,prodName);
}
/**
* 根据国家代码获取国家
* @param code
* @return
*/
public EmisCountry getCountryByCode(String code) {
if(StringUtils.isEmpty(code)){
return null;
}
EmisCountry emisCountry=emisCountryMapper.selectEmisCountryByCode(code);
return emisCountry;
}
/**
* 根据国家名称获取国家
* @param name

View File

@ -54,6 +54,12 @@
where a.id = #{id}
</select>
<select id="selectEmisCountryByCode" parameterType="String" resultMap="EmisCountryResult">
select id, name, name_en, code, tel_area_code, iso_code, continent_id, order_num, two_code, three_code, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
from emis_country a
where a.code = #{code} limit 1
</select>
<insert id="insertEmisCountry" parameterType="EmisCountry">
insert into emis_country
<trim prefix="(" suffix=")" suffixOverrides=",">