|
@@ -712,9 +712,9 @@ public class SaleInvoiceController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(saleOrder != null){
|
|
|
- saleInvoice.setContacts(saleOrder.getSalesmanName());
|
|
|
- }
|
|
|
+// if(saleOrder != null){
|
|
|
+// saleInvoice.setContacts(saleOrder.getSalesmanName());
|
|
|
+// }
|
|
|
|
|
|
// if (StringUtils.isNotBlank(orderCode)) {
|
|
|
// LambdaQueryWrapper<SaleDelivery> saleDeliveryQueryWrapper = new LambdaQueryWrapper<>();
|
|
@@ -736,7 +736,7 @@ public class SaleInvoiceController {
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
- /*
|
|
|
+
|
|
|
String customerId = saleInvoice.getCustomer();
|
|
|
if (StringUtils.isNotBlank(customerId)) {
|
|
|
|
|
@@ -747,7 +747,8 @@ public class SaleInvoiceController {
|
|
|
saleInvoice.setPhone(classEnt.getPhone());
|
|
|
saleInvoice.setEmail(classEnt.getEmail());
|
|
|
}
|
|
|
- }*/
|
|
|
+ }
|
|
|
+
|
|
|
// 获取计产品档案
|
|
|
List<BaseProductArchive> productArchiveList = new ArrayList<>();
|
|
|
if (oConvertUtils.listIsNotEmpty(productList)){
|
|
@@ -858,10 +859,13 @@ public class SaleInvoiceController {
|
|
|
saleInvoice.setOrderMoney(orderMoney.setScale(2));
|
|
|
saleInvoice.setAgreementTerms(saleOrder.getAgreementTerms());
|
|
|
// 制单人信息
|
|
|
- SysUser sysUser = sysUserService.getUserByName(saleInvoice.getCreateBy());
|
|
|
- saleInvoice.setSalesPhone(sysUser.getPhone());
|
|
|
- saleInvoice.setSalesEmail(sysUser.getEmail());
|
|
|
- saleInvoice.setSalesmanName(sysUser.getRealname());
|
|
|
+// SysUser sysUser = sysUserService.getUserByName(saleInvoice.getCreateBy());
|
|
|
+ if(saleOrder !=null){
|
|
|
+ SysUser sysUser = sysUserService.getUserByName(saleOrder.getCreateBy());
|
|
|
+ saleInvoice.setSalesPhone(sysUser.getPhone());
|
|
|
+ saleInvoice.setSalesEmail(sysUser.getEmail());
|
|
|
+ saleInvoice.setSalesmanName(sysUser.getRealname());
|
|
|
+ }
|
|
|
|
|
|
String templateFilePath = uploadpath + templates.getTemplateFile();
|
|
|
String tempFilePath = uploadpath + "/"+ UUIDGenerator.generate()+".xlsx";
|