|
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.fjhx.common.enums.CodingRuleEnum;
|
|
|
import com.fjhx.common.service.coding.CodingRuleService;
|
|
|
import com.fjhx.common.utils.Assert;
|
|
|
+import com.fjhx.item.entity.product.po.ProductInfo;
|
|
|
import com.fjhx.item.service.product.ProductInfoService;
|
|
|
import com.fjhx.sale.entity.after.dto.AfterSalesDto;
|
|
|
import com.fjhx.sale.entity.after.dto.AfterSalesSelectDto;
|
|
@@ -23,6 +24,7 @@ import com.ruoyi.system.utils.UserUtil;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
@@ -85,6 +87,18 @@ public class AfterSalesServiceImpl extends ServiceImpl<AfterSalesMapper, AfterSa
|
|
|
public AfterSalesVo detail(Long id) {
|
|
|
AfterSales AfterSales = this.getById(id);
|
|
|
AfterSalesVo result = BeanUtil.toBean(AfterSales, AfterSalesVo.class);
|
|
|
+ //赋值产品信息
|
|
|
+ ProductInfo productInfo = productInfoService.getById(result.getProductId());
|
|
|
+ result.setProductName(productInfo.getName());
|
|
|
+ result.setProductCode(productInfo.getCustomCode());
|
|
|
+ result.setProductLength(productInfo.getLength());
|
|
|
+ result.setProductWidth(productInfo.getWidth());
|
|
|
+ result.setProductHeight(productInfo.getHeight());
|
|
|
+ result.setProductColor(productInfo.getColor());
|
|
|
+
|
|
|
+ //赋值用户名称
|
|
|
+ UserUtil.assignmentNickName(Arrays.asList(result), AfterSalesVo::getUserId, AfterSalesVo::setUserName);
|
|
|
+
|
|
|
return result;
|
|
|
}
|
|
|
|