名字不显示问题

This commit is contained in:
kuang.yife 2024-03-02 20:54:15 +08:00
parent a8452e1f52
commit 660acc64ee
1 changed files with 49 additions and 8 deletions

View File

@ -10,15 +10,9 @@ import com.ghy.customer.domain.Customer;
import com.ghy.customer.domain.CustomerAddress;
import com.ghy.customer.service.CustomerAddressService;
import com.ghy.customer.service.CustomerService;
import com.ghy.goods.domain.DeptGoodsCategory;
import com.ghy.goods.domain.Goods;
import com.ghy.goods.domain.GoodsImgs;
import com.ghy.goods.domain.GoodsStandard;
import com.ghy.goods.domain.*;
import com.ghy.goods.request.AppGoodsRequest;
import com.ghy.goods.service.DeptGoodsCategoryService;
import com.ghy.goods.service.GoodsImgsService;
import com.ghy.goods.service.GoodsService;
import com.ghy.goods.service.GoodsStandardService;
import com.ghy.goods.service.*;
import com.ghy.order.domain.*;
import com.ghy.order.request.AppOrderAssignRequest;
import com.ghy.order.request.AppOrderRequest;
@ -111,6 +105,9 @@ public class OrderController extends BaseController {
@Resource
private GoodsImgsService goodsImgsService;
@Resource
private GoodsCategoryService goodsCategoryService;
@GetMapping("/imgs")
public String orderImgs(Long orderId, ModelMap mmap){
@ -1389,6 +1386,28 @@ public class OrderController extends BaseController {
GoodsStandard goodsStandard = goodsStandardService.selectById(orderStandardList.get(0).getGoodsStandardId());
Goods goods = goodsService.selectById(goodsStandard.getGoodsId());
// 填充商品三级类目
if(goods.getDeptGoodsCategoryId() != null){
DeptGoodsCategory deptGoodsCategory = deptGoodsCategoryService.get(goods.getDeptGoodsCategoryId());
if(deptGoodsCategory == null){
deptGoodsCategory = new DeptGoodsCategory();
deptGoodsCategory.setGoodsCategoryId(goods.getDeptGoodsCategoryId());
}
if(deptGoodsCategory != null){
GoodsCategory one = goodsCategoryService.selectById(deptGoodsCategory.getGoodsCategoryId());
if(one != null && one.getParentCategoryId() != null){
GoodsCategory two = goodsCategoryService.selectById(one.getParentCategoryId());
if(two != null && two.getParentCategoryId() != null){
GoodsCategory three = goodsCategoryService.selectById(two.getParentCategoryId());
if(three != null){
goods.setGoodsName("" + three.getGoodsCategoryName()
+ "-" + two.getGoodsCategoryName()
+ "-" + one.getGoodsCategoryName() + "");
}
}
}
}
}
// 财务信息
FinancialMaster financialMaster = financialMasterService.selectByOrderMasterId(master.getId());
@ -1492,6 +1511,28 @@ public class OrderController extends BaseController {
GoodsStandard goodsStandard = goodsStandardService.selectById(orderStandardList.get(0).getGoodsStandardId());
Goods goods = goodsService.selectById(goodsStandard.getGoodsId());
// 填充商品三级类目
if(goods.getDeptGoodsCategoryId() != null){
DeptGoodsCategory deptGoodsCategory = deptGoodsCategoryService.get(goods.getDeptGoodsCategoryId());
if(deptGoodsCategory == null){
deptGoodsCategory = new DeptGoodsCategory();
deptGoodsCategory.setGoodsCategoryId(goods.getDeptGoodsCategoryId());
}
if(deptGoodsCategory != null){
GoodsCategory one = goodsCategoryService.selectById(deptGoodsCategory.getGoodsCategoryId());
if(one != null && one.getParentCategoryId() != null){
GoodsCategory two = goodsCategoryService.selectById(one.getParentCategoryId());
if(two != null && two.getParentCategoryId() != null){
GoodsCategory three = goodsCategoryService.selectById(two.getParentCategoryId());
if(three != null){
goods.setGoodsName("" + three.getGoodsCategoryName()
+ "-" + two.getGoodsCategoryName()
+ "-" + one.getGoodsCategoryName() + "");
}
}
}
}
}
// 财务信息
FinancialDetail financialDetail = financialDetailService.selectByOrderDetailId(detail.getId());