主订单,订单详情修改
This commit is contained in:
parent
572bfcbc05
commit
4fcdc5a1dc
|
|
@ -22,14 +22,8 @@ import com.ghy.customer.domain.Customer;
|
||||||
import com.ghy.customer.domain.CustomerAddress;
|
import com.ghy.customer.domain.CustomerAddress;
|
||||||
import com.ghy.customer.service.CustomerAddressService;
|
import com.ghy.customer.service.CustomerAddressService;
|
||||||
import com.ghy.customer.service.CustomerService;
|
import com.ghy.customer.service.CustomerService;
|
||||||
import com.ghy.goods.domain.Goods;
|
import com.ghy.goods.domain.*;
|
||||||
import com.ghy.goods.domain.GoodsArea;
|
import com.ghy.goods.service.*;
|
||||||
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.order.domain.*;
|
import com.ghy.order.domain.*;
|
||||||
import com.ghy.order.service.*;
|
import com.ghy.order.service.*;
|
||||||
import com.ghy.payment.domain.FinancialChangeRecord;
|
import com.ghy.payment.domain.FinancialChangeRecord;
|
||||||
|
|
@ -95,6 +89,10 @@ public class OrderMasterController extends BaseController {
|
||||||
private GoodsService goodsService;
|
private GoodsService goodsService;
|
||||||
@Resource
|
@Resource
|
||||||
private GoodsImgsService goodsImgsService;
|
private GoodsImgsService goodsImgsService;
|
||||||
|
@Resource
|
||||||
|
private DeptGoodsCategoryService deptGoodsCategoryService;
|
||||||
|
@Resource
|
||||||
|
private GoodsCategoryService goodsCategoryService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private CustomerService customerService;
|
private CustomerService customerService;
|
||||||
|
|
@ -726,10 +724,30 @@ public class OrderMasterController extends BaseController {
|
||||||
FinancialMaster fm = financialMasterMap.get(master.getId());
|
FinancialMaster fm = financialMasterMap.get(master.getId());
|
||||||
if (fm != null) {
|
if (fm != null) {
|
||||||
master.setFinancialMasterMoney(fm.getPayMoney());
|
master.setFinancialMasterMoney(fm.getPayMoney());
|
||||||
|
master.setFinancialMasterPayMoney(fm.getServerMoney());
|
||||||
}
|
}
|
||||||
Goods good = goodsMap.get(master.getGoodsId());
|
Goods good = goodsMap.get(master.getGoodsId());
|
||||||
if (good != null) {
|
if (good != null) {
|
||||||
master.setGoods(good);
|
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());
|
CustomerAddress customerAddress = addressService.selectByCustomerAddressId(master.getAddressId());
|
||||||
|
|
|
||||||
|
|
@ -605,7 +605,7 @@
|
||||||
var actions = [];
|
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="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="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> ');-->
|
<!-- actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="showOrderWorker(\'' + row.id + '\')"></i>指派</a> ');-->
|
||||||
if (row.payStatus == 0) {
|
if (row.payStatus == 0) {
|
||||||
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="showPayQrcode(\'' + row.id + '\')"></i>付款</a> ');
|
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="showPayQrcode(\'' + row.id + '\')"></i>付款</a> ');
|
||||||
|
|
|
||||||
|
|
@ -627,15 +627,14 @@
|
||||||
return '<div style="display:flex;justify-content: center;align-items: center;">'
|
return '<div style="display:flex;justify-content: center;align-items: center;">'
|
||||||
+ '<img decoding="async" src="' + value.goodsImgUrl + '" width="100" height="100" />'
|
+ '<img decoding="async" src="' + value.goodsImgUrl + '" width="100" height="100" />'
|
||||||
+ '<div>'
|
+ '<div>'
|
||||||
+ '<small> 订单编号:' + row.code + '<small/> <br>'
|
+ '<small>' + row.code + '<small/> <br>'
|
||||||
+ '<h4> ' + value.goodsName + '<h4/>'
|
+ '<small> ' + row.consoleGoodsName + '<small/> <br>'
|
||||||
+ '<small> ' + value.goodsDesc + '</small> <br>'
|
|
||||||
+ '<small> 联系人:' + row.addressName + '</small> <br>'
|
+ '<small> 联系人:' + row.addressName + '</small> <br>'
|
||||||
+ '<small> 联系电话:' + row.addressPhone + '</small> <br>'
|
+ '<small> 联系电话:' + row.addressPhone + '</small> <br>'
|
||||||
+ '<small> 联系地址:' + row.address + '</small> <br>'
|
+ '<small> 联系地址:' + row.address + '</small> <br>'
|
||||||
+ '<small> 下单时间:' + row.createTime + '</small> <br>'
|
+ '<small> 下单时间:' + row.createTime + '</small> <br>'
|
||||||
+ '<small> 预约时间:' + row.expectTimeStart + ' - ' + row.expectTimeEnd + '</small> <br>'
|
+ '<small> 预约时间:' + row.expectTimeStart + ' - ' + row.expectTimeEnd + '</small> <br>'
|
||||||
+ '<small> 总金额:' + row.financialMasterMoney + '元</small> <br>'
|
+ '<small> 下单总金额:' + row.financialMasterMoney + '元,师傅实收金额: '+ row.financialMasterPayMoney + ' </small> <br>'
|
||||||
+ '</div>'
|
+ '</div>'
|
||||||
+ '</div>';
|
+ '</div>';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -122,10 +122,19 @@ public class OrderMaster extends BaseEntity {
|
||||||
|
|
||||||
private List<Long> exceptOrderMasterIds;
|
private List<Long> exceptOrderMasterIds;
|
||||||
|
|
||||||
|
// 下单总金额
|
||||||
private BigDecimal financialMasterMoney;
|
private BigDecimal financialMasterMoney;
|
||||||
|
|
||||||
|
// 师傅应得金额
|
||||||
|
private BigDecimal financialMasterPayMoney;
|
||||||
|
|
||||||
private Goods goods;
|
private Goods goods;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 后台使用的三级类目*数量 例如 【清洗-电器-空调】x 3
|
||||||
|
* */
|
||||||
|
private String consoleGoodsName;
|
||||||
|
|
||||||
private String addressPhone;
|
private String addressPhone;
|
||||||
|
|
||||||
private String addressName;
|
private String addressName;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue