新增商品信息

This commit is contained in:
kuang.yifei@iwhalecloud.com 2022-06-02 14:37:13 +08:00
parent 399a1af0a8
commit 54da5e3c98
2 changed files with 14 additions and 1 deletions

View File

@ -12,6 +12,7 @@ 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.service.GoodsStandardService;
import com.ghy.order.domain.OrderDetail;
import com.ghy.order.domain.OrderGoods;
import com.ghy.order.domain.OrderMaster;
@ -66,6 +67,8 @@ public class OrderMasterController extends BaseController {
private FinancialDetailService financialDetailService;
@Autowired
private FinancialMasterService financialMasterService;
@Autowired
private GoodsStandardService goodsStandardService;
@RequiresPermissions("order:master:view")
@GetMapping()
@ -82,8 +85,15 @@ public class OrderMasterController extends BaseController {
// 添加师傅信息
master.setWorker(workerService.selectById(master.getWorkerId()));
OrderGoods orderGoods = orderGoodsService.selectByOrderMasterId(master.getId());
// 添加商品信息
if(goodsStandardService.selectByGoodsId(orderGoods.getGoodsId())!=null){
orderGoods.setGoodsStandard(goodsStandardService.selectByGoodsId(orderGoods.getGoodsId()).get(0));
}
// 添加订单商品信息
master.setOrderGoods(orderGoodsService.selectByOrderMasterId(master.getId()));
master.setOrderGoods(orderGoods);
// 添加财务主单信息
master.setFinancialMaster(financialMasterService.selectByOrderMasterId(master.getId()));

View File

@ -3,6 +3,7 @@ package com.ghy.order.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ghy.common.annotation.Excel;
import com.ghy.common.core.domain.BaseEntity;
import com.ghy.goods.domain.GoodsStandard;
import lombok.Data;
import java.util.Date;
@ -38,6 +39,8 @@ public class OrderGoods extends BaseEntity {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date finishTime;
private GoodsStandard goodsStandard;
public OrderGoods() {
}