Browse Source

销售订单导出第三版

fenghaifu 3 tháng trước cách đây
mục cha
commit
27ba3eabd8

+ 12 - 5
srm-module-code/src/main/java/org/jeecg/modules/saleCode/controller/SaleOrderController.java

@@ -24,10 +24,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import org.apache.commons.lang.StringUtils;
 import org.jeecg.common.aspect.annotation.PermissionData;
 import org.jeecg.common.util.DateUtils;
-import org.jeecg.modules.baseCode.entity.BaseProductArchive;
-import org.jeecg.modules.baseCode.entity.BaseProductClass;
-import org.jeecg.modules.baseCode.entity.BaseShipArchive;
-import org.jeecg.modules.baseCode.entity.BaseTemplates;
+import org.jeecg.modules.baseCode.entity.*;
 import org.jeecg.modules.baseCode.service.*;
 import org.jeecg.modules.cuspCode.entity.CuspCustomerProfile;
 import org.jeecg.modules.cuspCode.service.ICuspCustomerProfileService;
@@ -114,6 +111,8 @@ public class SaleOrderController {
     private IBaseShipArchiveService baseShipArchiveService;
     @Autowired
     private IBaseProductArchiveService baseProductArchiveService;
+    @Autowired
+    private IBaseProjectArchiveService baseProjectArchiveService;
 
     @Value(value = "${jeecg.path.upload}")
     private String uploadpath;
@@ -952,7 +951,15 @@ public class SaleOrderController {
                 }
                 saleOrder.setShipName(shipname);
                 saleOrder.setImo(imo);
-                saleOrder.setContactsNo(saleOrder.getProjectName());
+                // 项目名称
+                if (saleOrder.getProject() != null){
+                    BaseProjectArchive projectArchive = baseProjectArchiveService.getById(saleOrder.getProject());
+                    if (projectArchive != null){
+                        saleOrder.setContactsNo(projectArchive.getName());
+                    }
+
+                }
+
                 if(productList.size() > 0){
 
                     saleOrder.setQualityGrade(productList.get(0).getQualityGrade());

+ 1 - 0
srm-module-code/src/main/java/org/jeecg/modules/saleCode/entity/SaleOrderProduct.java

@@ -165,6 +165,7 @@ public class SaleOrderProduct implements Serializable {
     private BigDecimal exchangeRateGys;//美元汇率
     private BigDecimal taxPriceGys;//供应商采购单价
 
+    // 导出用
     @TableField(exist = false)
     private Integer rowNumber;
     @TableField(exist = false)