|
@@ -288,6 +288,13 @@ public class DocumentsServiceImpl extends ServiceImpl<DocumentsMapper, Documents
|
|
|
//总箱数
|
|
|
BigDecimal sumPackQuantity = (BigDecimal) dataMap.get("sumPackQuantity");
|
|
|
|
|
|
+ //获取合同其他收费项目
|
|
|
+ List<ContractProject> contractProjectList = contractProjectService.list(q -> q.eq(ContractProject::getContractId, contract.getId()));
|
|
|
+ BigDecimal contractProjectAmountCount = contractProjectList.stream().map(ContractProject::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ //获取买方 客户信息里面的 国家名称
|
|
|
+ Map<Long, String> buyCountryAreaMapByIds = CustomizeAreaUtil.getAreaMapByIds(Arrays.asList(customer.getCountryId()));
|
|
|
+ String buyCountryName = buyCountryAreaMapByIds.get(customer.getCountryId());
|
|
|
+
|
|
|
//------------------ 封装页面展示数据 ------------------
|
|
|
//发件公司清关负责人
|
|
|
data.put("contacts", contract.getSellContactName());
|
|
@@ -326,7 +333,7 @@ public class DocumentsServiceImpl extends ServiceImpl<DocumentsMapper, Documents
|
|
|
//合同协议号(根据合同填写)
|
|
|
data.put("contractCode", contract.getCode());
|
|
|
//贸易国(合同买方所在国)
|
|
|
- data.put("tradingCountry", documents.getCountryName());
|
|
|
+ data.put("tradingCountry", buyCountryName);
|
|
|
//运抵国
|
|
|
data.put("arrivalCountry", documents.getCountryName());
|
|
|
//指运港(不用填写)
|
|
@@ -346,7 +353,7 @@ public class DocumentsServiceImpl extends ServiceImpl<DocumentsMapper, Documents
|
|
|
//成交方式
|
|
|
data.put("tradeModeName", contract.getTradeMethods());
|
|
|
//运费
|
|
|
- data.put("freightPrice", BigDecimal.ZERO);//暂无
|
|
|
+ data.put("freightPrice", contractProjectAmountCount);//暂无
|
|
|
// 保费
|
|
|
data.put("premiumPrice", BigDecimal.ZERO);//暂无
|
|
|
// 杂费(如有请填写)
|
|
@@ -357,6 +364,10 @@ public class DocumentsServiceImpl extends ServiceImpl<DocumentsMapper, Documents
|
|
|
data.put("shippingMark", documents.getRemark());
|
|
|
// 境内货源地
|
|
|
data.put("cityChinese", contract.getSellCountryName());
|
|
|
+ //获取卖方公司 多公司信息里的国家信息
|
|
|
+ Map<Long, String> areaMapByIds = CustomizeAreaUtil.getAreaMapByIds(Arrays.asList(corporation.getCountryId()));
|
|
|
+ String sellCountryName = areaMapByIds.get(corporation.getCountryId());
|
|
|
+
|
|
|
// 产品数据
|
|
|
if (CollectionUtils.isNotEmpty(products)) {
|
|
|
Integer num = 1;
|
|
@@ -367,7 +378,7 @@ public class DocumentsServiceImpl extends ServiceImpl<DocumentsMapper, Documents
|
|
|
// 商品编号(13位)原10位海关编码+3位检验检疫附加编码
|
|
|
object.put("customsCode", product.getCustomsCode());
|
|
|
// 商品名称
|
|
|
- object.put("productName", product.getProductName());
|
|
|
+ object.put("productName", product.getSubDescribe());
|
|
|
//品牌
|
|
|
object.put("brand", "");
|
|
|
//品牌类型
|
|
@@ -385,7 +396,7 @@ public class DocumentsServiceImpl extends ServiceImpl<DocumentsMapper, Documents
|
|
|
//成交单位
|
|
|
object.put("unit", product.getProductUnit());
|
|
|
//原产国(地区)
|
|
|
- object.put("countryChinese", contract.getSellCountryName());
|
|
|
+ object.put("countryChinese", sellCountryName);
|
|
|
//总价与币制
|
|
|
object.put("sumPrice", "");
|
|
|
//成交单价
|