主订单,订单详情修改

This commit is contained in:
kuang.yife 2023-10-16 18:18:20 +08:00
parent 572bfcbc05
commit 4fcdc5a1dc
4 changed files with 39 additions and 13 deletions

View File

@ -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());

View File

@ -605,7 +605,7 @@
var actions = [];
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="detail(\'' + row.id + '\')"><i class="fa fa-info"></i>查看</a> ');
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="orderDetailReject(\'' + row.id + '\')"></i>师傅退单</a> ');
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="orderMasterReject(\'' + row.orderMasterId + '\')"></i>商家退单</a> ');
// actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="orderMasterReject(\'' + row.orderMasterId + '\')"></i>商家退单</a> ');
<!-- actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="showOrderWorker(\'' + row.id + '\')"></i>指派</a> ');-->
if (row.payStatus == 0) {
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="showPayQrcode(\'' + row.id + '\')"></i>付款</a> ');

View File

@ -627,15 +627,14 @@
return '<div style="display:flex;justify-content: center;align-items: center;">'
+ '<img decoding="async" src="' + value.goodsImgUrl + '" width="100" height="100" />'
+ '<div>'
+ '<small> 订单编号:' + row.code + '<small/> <br>'
+ '<h4> ' + value.goodsName + '<h4/>'
+ '<small> ' + value.goodsDesc + '</small> <br>'
+ '<small>' + row.code + '<small/> <br>'
+ '<small> ' + row.consoleGoodsName + '<small/> <br>'
+ '<small> 联系人:' + row.addressName + '</small> <br>'
+ '<small> 联系电话:' + row.addressPhone + '</small> <br>'
+ '<small> 联系地址:' + row.address + '</small> <br>'
+ '<small> 下单时间:' + row.createTime + '</small> <br>'
+ '<small> 预约时间:' + row.expectTimeStart + ' - ' + row.expectTimeEnd + '</small> <br>'
+ '<small> 总金额:' + row.financialMasterMoney + '元</small> <br>'
+ '<small> 下单总金额:' + row.financialMasterMoney + '元,师傅实收金额: '+ row.financialMasterPayMoney + ' </small> <br>'
+ '</div>'
+ '</div>';
}

View File

@ -122,10 +122,19 @@ public class OrderMaster extends BaseEntity {
private List<Long> exceptOrderMasterIds;
// 下单总金额
private BigDecimal financialMasterMoney;
// 师傅应得金额
private BigDecimal financialMasterPayMoney;
private Goods goods;
/*
* 后台使用的三级类目*数量 例如 清洗-电器-空调x 3
* */
private String consoleGoodsName;
private String addressPhone;
private String addressName;