diff --git a/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderMasterController.java b/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderMasterController.java index ce7eec31..9a39e4da 100644 --- a/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderMasterController.java +++ b/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderMasterController.java @@ -22,14 +22,8 @@ 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.Goods; -import com.ghy.goods.domain.GoodsArea; -import com.ghy.goods.domain.GoodsImgs; -import com.ghy.goods.domain.GoodsStandard; -import com.ghy.goods.service.GoodsAreaService; -import com.ghy.goods.service.GoodsImgsService; -import com.ghy.goods.service.GoodsService; -import com.ghy.goods.service.GoodsStandardService; +import com.ghy.goods.domain.*; +import com.ghy.goods.service.*; import com.ghy.order.domain.*; import com.ghy.order.service.*; import com.ghy.payment.domain.FinancialChangeRecord; @@ -95,6 +89,10 @@ public class OrderMasterController extends BaseController { private GoodsService goodsService; @Resource private GoodsImgsService goodsImgsService; + @Resource + private DeptGoodsCategoryService deptGoodsCategoryService; + @Resource + private GoodsCategoryService goodsCategoryService; @Autowired private CustomerService customerService; @@ -726,10 +724,30 @@ public class OrderMasterController extends BaseController { FinancialMaster fm = financialMasterMap.get(master.getId()); if (fm != null) { master.setFinancialMasterMoney(fm.getPayMoney()); + master.setFinancialMasterPayMoney(fm.getServerMoney()); } Goods good = goodsMap.get(master.getGoodsId()); if (good != null) { master.setGoods(good); + // 填充商品三级类目 + if(good.getDeptGoodsCategoryId() != null){ + DeptGoodsCategory deptGoodsCategory = deptGoodsCategoryService.get(good.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){ + int totalNum = orderGoodsService.selectByOrderMasterId(master.getId()).stream().mapToInt(OrderGoods::getGoodsNum).sum(); + master.setConsoleGoodsName("【" + three.getGoodsCategoryName() + + "-" + two.getGoodsCategoryName() + + "-" + one.getGoodsCategoryName() + "】x" + totalNum); + } + } + } + } + } } // 地址信息 CustomerAddress customerAddress = addressService.selectByCustomerAddressId(master.getAddressId()); diff --git a/ghy-admin/src/main/resources/templates/order/master.html b/ghy-admin/src/main/resources/templates/order/master.html index 00dcac59..121d93f6 100644 --- a/ghy-admin/src/main/resources/templates/order/master.html +++ b/ghy-admin/src/main/resources/templates/order/master.html @@ -605,7 +605,7 @@ var actions = []; actions.push('查看 '); actions.push('师傅退单 '); - actions.push('商家退单 '); + // actions.push('商家退单 '); if (row.payStatus == 0) { actions.push('付款 '); diff --git a/ghy-admin/src/main/resources/templates/order/orderManager.html b/ghy-admin/src/main/resources/templates/order/orderManager.html index 6523e806..da52a814 100644 --- a/ghy-admin/src/main/resources/templates/order/orderManager.html +++ b/ghy-admin/src/main/resources/templates/order/orderManager.html @@ -627,15 +627,14 @@ return '
' + '' + '
' - + ' 订单编号:' + row.code + '
' - + '

' + value.goodsName + '

' - + ' ' + value.goodsDesc + '
' + + '' + row.code + '
' + + ' ' + row.consoleGoodsName + '
' + ' 联系人:' + row.addressName + '
' + ' 联系电话:' + row.addressPhone + '
' + ' 联系地址:' + row.address + '
' + ' 下单时间:' + row.createTime + '
' + ' 预约时间:' + row.expectTimeStart + ' - ' + row.expectTimeEnd + '
' - + ' 总金额:' + row.financialMasterMoney + '元
' + + ' 下单总金额:' + row.financialMasterMoney + '元,师傅实收金额: '+ row.financialMasterPayMoney + '
' + '

' + '
'; } diff --git a/ghy-order/src/main/java/com/ghy/order/domain/OrderMaster.java b/ghy-order/src/main/java/com/ghy/order/domain/OrderMaster.java index 772db79b..61d477c9 100644 --- a/ghy-order/src/main/java/com/ghy/order/domain/OrderMaster.java +++ b/ghy-order/src/main/java/com/ghy/order/domain/OrderMaster.java @@ -122,10 +122,19 @@ public class OrderMaster extends BaseEntity { private List exceptOrderMasterIds; + // 下单总金额 private BigDecimal financialMasterMoney; + // 师傅应得金额 + private BigDecimal financialMasterPayMoney; + private Goods goods; + /* + * 后台使用的三级类目*数量 例如 【清洗-电器-空调】x 3 + * */ + private String consoleGoodsName; + private String addressPhone; private String addressName;