|
@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.fjhx.account.entity.account.po.AccountManagement;
|
|
|
import com.fjhx.account.service.account.AccountManagementService;
|
|
|
+import com.fjhx.area.entity.po.CustomizeArea;
|
|
|
import com.fjhx.area.utils.CustomizeAreaUtil;
|
|
|
import com.fjhx.common.constant.SourceConstant;
|
|
|
import com.fjhx.common.entity.contract.po.ContractTemplate;
|
|
@@ -375,6 +376,25 @@ public class SampleServiceImpl extends ServiceImpl<SampleMapper, Sample> impleme
|
|
|
contractPdfInfoVo.setSellCorporationName(corporation.getName());
|
|
|
contractPdfInfoVo.setSellContactName(sample.getSellContactName());
|
|
|
contractPdfInfoVo.setSellContactNumber(sample.getSellContactNumber());
|
|
|
+
|
|
|
+
|
|
|
+ //赋值地址中文信息
|
|
|
+ List<Long> areaIdList = Arrays.asList(
|
|
|
+ corporation.getCountryId(),
|
|
|
+ corporation.getProvinceId(),
|
|
|
+ corporation.getCityId()
|
|
|
+ );
|
|
|
+
|
|
|
+ Map<Long, String> areaMap = CustomizeAreaUtil.getAreaMapByIds(areaIdList);
|
|
|
+ contractPdfInfoVo.setSellCountryName(areaMap.get(corporation.getCountryId()));
|
|
|
+ contractPdfInfoVo.setSellProvinceName(areaMap.get(corporation.getProvinceId()));
|
|
|
+ contractPdfInfoVo.setSellCityName(areaMap.get(corporation.getCityId()));
|
|
|
+ contractPdfInfoVo.setSellDetailedAddress(corporation.getAddress());
|
|
|
+ //赋值英文名地址信息
|
|
|
+ contractPdfInfoVo.setSellCountryNameEn(corporation.getCountryEnStr());
|
|
|
+ contractPdfInfoVo.setSellProvinceNameEn(corporation.getProvinceEnStr());
|
|
|
+ contractPdfInfoVo.setSellCityNameEn(corporation.getCityEnStr());
|
|
|
+ contractPdfInfoVo.setSellDetailedAddressEn(corporation.getAddressEn());
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -404,10 +424,11 @@ public class SampleServiceImpl extends ServiceImpl<SampleMapper, Sample> impleme
|
|
|
|
|
|
Map<Long, String> areaMap = CustomizeAreaUtil.getAreaMapByIds(areaIdList);
|
|
|
|
|
|
- contractPdfInfoVo.setSellCountryName(sample.getSellCountryName());
|
|
|
- contractPdfInfoVo.setSellProvinceName(sample.getSellProvinceName());
|
|
|
- contractPdfInfoVo.setSellCityName(sample.getSellCityName());
|
|
|
- contractPdfInfoVo.setSellDetailedAddress(sample.getSellAddress());
|
|
|
+
|
|
|
+// contractPdfInfoVo.setSellCountryName(sample.getSellCountryName());
|
|
|
+// contractPdfInfoVo.setSellProvinceName(sample.getSellProvinceName());
|
|
|
+// contractPdfInfoVo.setSellCityName(sample.getSellCityName());
|
|
|
+// contractPdfInfoVo.setSellDetailedAddress(sample.getSellAddress());
|
|
|
|
|
|
contractPdfInfoVo.setBuyCountryName(areaMap.get(sample.getBuyCountryId()));
|
|
|
contractPdfInfoVo.setBuyProvinceName(areaMap.get(sample.getBuyProvinceId()));
|
|
@@ -433,8 +454,10 @@ public class SampleServiceImpl extends ServiceImpl<SampleMapper, Sample> impleme
|
|
|
contractPdfInfoVo.setAdvanceRatio(sample.getAdvanceRatio());
|
|
|
|
|
|
//赋值创建人名称
|
|
|
- Map<Long, String> nickNameMapByIds = UserUtil.getNickNameMapByIds(Arrays.asList(sample.getCreateUser()));
|
|
|
- contractPdfInfoVo.setCreateUserName(nickNameMapByIds.get(sample.getCreateUser()));
|
|
|
+ Map<Long, SysUser> nickNameMapByIds = UserUtil.getMapByIds(Arrays.asList(sample.getCreateUser()));
|
|
|
+ SysUser sysUser = nickNameMapByIds.get(sample.getCreateUser());
|
|
|
+ contractPdfInfoVo.setCreateUserName(sysUser.getNickName());//中文名
|
|
|
+ contractPdfInfoVo.setCreateUserName(sysUser.getNickNameEn());//英文名
|
|
|
//赋值创建人邮箱地址
|
|
|
List<EnterpriseMailbox> enterpriseMailboxList = enterpriseMailboxService.list(q -> q.eq(EnterpriseMailbox::getUserId, sample.getCreateUser()));
|
|
|
String eMailAddress = "";
|
|
@@ -480,6 +503,7 @@ public class SampleServiceImpl extends ServiceImpl<SampleMapper, Sample> impleme
|
|
|
productIndo.setProductPrice(item.getPrice());
|
|
|
productIndo.setAmount(item.getAmount());
|
|
|
productIndo.setProductName(item.getProductName());
|
|
|
+ productIndo.setProductModel(item.getProductModel());
|
|
|
|
|
|
if (ObjectUtil.isNotEmpty(productInfo)) {
|
|
|
productIndo.setProductRemark(productInfo.getRemark());
|
|
@@ -503,18 +527,25 @@ public class SampleServiceImpl extends ServiceImpl<SampleMapper, Sample> impleme
|
|
|
}
|
|
|
|
|
|
private void setAccountManagement(SamplePdfInfoVo contractPdfInfoVo, Sample sample) {
|
|
|
- Long shroffAccountId = sample.getShroffAccountId();
|
|
|
- AccountManagement accountManagement = accountManagementService.getById(shroffAccountId);
|
|
|
- if (accountManagement == null) {
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- contractPdfInfoVo.setBeneficiaryName(accountManagement.getBeneficiaryName());
|
|
|
- contractPdfInfoVo.setBeneficiaryBank(accountManagement.getBeneficiaryBank());
|
|
|
- contractPdfInfoVo.setBeneficiaryBankAddress(accountManagement.getBeneficiaryBankAddress());
|
|
|
- contractPdfInfoVo.setBeneficiaryAccountNumber(accountManagement.getBeneficiaryAccountNumber());
|
|
|
- contractPdfInfoVo.setSwiftCode(accountManagement.getSwiftCode());
|
|
|
- contractPdfInfoVo.setBeneficiaryAddress(accountManagement.getBeneficiaryAddress());
|
|
|
+// Long shroffAccountId = sample.getShroffAccountId();
|
|
|
+// AccountManagement accountManagement = accountManagementService.getById(shroffAccountId);
|
|
|
+// if (accountManagement == null) {
|
|
|
+// return;
|
|
|
+// }
|
|
|
+
|
|
|
+// contractPdfInfoVo.setBeneficiaryName(accountManagement.getBeneficiaryName());
|
|
|
+// contractPdfInfoVo.setBeneficiaryBank(accountManagement.getBeneficiaryBank());
|
|
|
+// contractPdfInfoVo.setBeneficiaryBankAddress(accountManagement.getBeneficiaryBankAddress());
|
|
|
+// contractPdfInfoVo.setBeneficiaryAccountNumber(accountManagement.getBeneficiaryAccountNumber());
|
|
|
+// contractPdfInfoVo.setSwiftCode(accountManagement.getSwiftCode());
|
|
|
+// contractPdfInfoVo.setBeneficiaryAddress(accountManagement.getBeneficiaryAddress());
|
|
|
+
|
|
|
+ contractPdfInfoVo.setBeneficiaryName(sample.getBeneficiaryName());
|
|
|
+ contractPdfInfoVo.setBeneficiaryBank(sample.getBeneficiaryBank());
|
|
|
+ contractPdfInfoVo.setBeneficiaryBankAddress(sample.getBeneficiaryBankAddress());
|
|
|
+ contractPdfInfoVo.setBeneficiaryAccountNumber(sample.getBeneficiaryAccountNumber());
|
|
|
+ contractPdfInfoVo.setSwiftCode(sample.getSwiftCode());
|
|
|
+ contractPdfInfoVo.setBeneficiaryAddress(sample.getBeneficiaryAddress());
|
|
|
}
|
|
|
|
|
|
}
|