第三点,A,订单编号那4个字不要,编号后面是品牌、规格这两个信息;
订单信息里的预约时间:表示方式2013-10-31 08:-10:00 第4订单状态未对,子师傅订单状态未约未排,未拆。师傅排单时间未提后台。 第5接单信息,师傅是实名(这里看回那个取认证名字的步骤是否影响了),拔打次数和详情展示(拔打详情有),接单信息未展示。子师傅的也未展示,子师傅的分做单与接单师傅展示。看整个第5条
This commit is contained in:
parent
cc2abf126a
commit
e32a57baf7
|
|
@ -0,0 +1,143 @@
|
||||||
|
package com.ghy.web.controller.order;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import com.ghy.common.annotation.Log;
|
||||||
|
import com.ghy.common.enums.BusinessType;
|
||||||
|
import com.ghy.order.domain.OrderAddRecord;
|
||||||
|
import com.ghy.order.service.IOrderAddRecordService;
|
||||||
|
import com.ghy.common.core.controller.BaseController;
|
||||||
|
import com.ghy.common.core.domain.AjaxResult;
|
||||||
|
import com.ghy.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ghy.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发单加价记录Controller
|
||||||
|
*
|
||||||
|
* @author clunt
|
||||||
|
* @date 2023-11-03
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/add/record")
|
||||||
|
public class OrderAddRecordController extends BaseController
|
||||||
|
{
|
||||||
|
private String prefix = "add/record";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IOrderAddRecordService orderAddRecordService;
|
||||||
|
|
||||||
|
@RequiresPermissions("worker:record:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String record()
|
||||||
|
{
|
||||||
|
return prefix + "/record";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询发单加价记录列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("worker:record:list")
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo list(OrderAddRecord orderAddRecord)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<OrderAddRecord> list = orderAddRecordService.selectOrderAddRecordList(orderAddRecord);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* App查询发单加价记录列表
|
||||||
|
*/
|
||||||
|
@PostMapping("/app/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo appList(@RequestBody OrderAddRecord orderAddRecord)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<OrderAddRecord> list = orderAddRecordService.selectOrderAddRecordList(orderAddRecord);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/app/add")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult appAddSave(@RequestBody OrderAddRecord orderAddRecord)
|
||||||
|
{
|
||||||
|
return toAjax(orderAddRecordService.insertOrderAddRecord(orderAddRecord));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出发单加价记录列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("worker:record:export")
|
||||||
|
@Log(title = "发单加价记录", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult export(OrderAddRecord orderAddRecord)
|
||||||
|
{
|
||||||
|
List<OrderAddRecord> list = orderAddRecordService.selectOrderAddRecordList(orderAddRecord);
|
||||||
|
ExcelUtil<OrderAddRecord> util = new ExcelUtil<OrderAddRecord>(OrderAddRecord.class);
|
||||||
|
return util.exportExcel(list, "发单加价记录数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增发单加价记录
|
||||||
|
*/
|
||||||
|
@GetMapping("/add")
|
||||||
|
public String add()
|
||||||
|
{
|
||||||
|
return prefix + "/add";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存发单加价记录
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("worker:record:add")
|
||||||
|
@Log(title = "发单加价记录", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult addSave(OrderAddRecord orderAddRecord)
|
||||||
|
{
|
||||||
|
return toAjax(orderAddRecordService.insertOrderAddRecord(orderAddRecord));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改发单加价记录
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("worker:record:edit")
|
||||||
|
@GetMapping("/edit/{id}")
|
||||||
|
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||||
|
{
|
||||||
|
OrderAddRecord orderAddRecord = orderAddRecordService.selectOrderAddRecordById(id);
|
||||||
|
mmap.put("orderAddRecord", orderAddRecord);
|
||||||
|
return prefix + "/edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存发单加价记录
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("worker:record:edit")
|
||||||
|
@Log(title = "发单加价记录", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult editSave(OrderAddRecord orderAddRecord)
|
||||||
|
{
|
||||||
|
return toAjax(orderAddRecordService.updateOrderAddRecord(orderAddRecord));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除发单加价记录
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("worker:record:remove")
|
||||||
|
@Log(title = "发单加价记录", businessType = BusinessType.DELETE)
|
||||||
|
@PostMapping( "/remove")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult remove(String ids)
|
||||||
|
{
|
||||||
|
return toAjax(orderAddRecordService.deleteOrderAddRecordByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -12,14 +12,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.DeptGoodsCategory;
|
import com.ghy.goods.domain.*;
|
||||||
import com.ghy.goods.domain.Goods;
|
import com.ghy.goods.service.*;
|
||||||
import com.ghy.goods.domain.GoodsImgs;
|
|
||||||
import com.ghy.goods.domain.GoodsStandard;
|
|
||||||
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.order.domain.*;
|
import com.ghy.order.domain.*;
|
||||||
import com.ghy.order.request.OrderProcessRequest;
|
import com.ghy.order.request.OrderProcessRequest;
|
||||||
import com.ghy.order.service.*;
|
import com.ghy.order.service.*;
|
||||||
|
|
@ -111,6 +105,8 @@ public class OrderDetailController extends BaseController {
|
||||||
private IOrderCallRecordService orderCallRecordService;
|
private IOrderCallRecordService orderCallRecordService;
|
||||||
@Resource
|
@Resource
|
||||||
private DeptGoodsCategoryService deptGoodsCategoryService;
|
private DeptGoodsCategoryService deptGoodsCategoryService;
|
||||||
|
@Resource
|
||||||
|
private GoodsCategoryService goodsCategoryService;
|
||||||
|
|
||||||
@RequiresPermissions("order:detail:view")
|
@RequiresPermissions("order:detail:view")
|
||||||
@GetMapping()
|
@GetMapping()
|
||||||
|
|
@ -190,6 +186,9 @@ public class OrderDetailController extends BaseController {
|
||||||
detail.setCustomerPhone(customer.getPhone());
|
detail.setCustomerPhone(customer.getPhone());
|
||||||
}
|
}
|
||||||
OrderMaster orderMaster = orderMasterMap.get(detail.getOrderMasterId());
|
OrderMaster orderMaster = orderMasterMap.get(detail.getOrderMasterId());
|
||||||
|
if(orderMaster.getExpectTimeStart() != null && orderMaster.getExpectTimeEnd() != null){
|
||||||
|
detail.setMixExpectTime(DateUtils.parseDateToStr("yyyy-MM-dd HH:mm",orderMaster.getExpectTimeStart()) +"-"+ DateUtils.parseDateToStr("HH:mm",orderMaster.getExpectTimeEnd()));
|
||||||
|
}
|
||||||
if (orderMaster != null) {
|
if (orderMaster != null) {
|
||||||
detail.setPayStatus(orderMaster.getPayStatus());
|
detail.setPayStatus(orderMaster.getPayStatus());
|
||||||
detail.setPayType(orderMaster.getPayType());
|
detail.setPayType(orderMaster.getPayType());
|
||||||
|
|
@ -201,20 +200,49 @@ public class OrderDetailController extends BaseController {
|
||||||
Goods good = goodsMap.get(orderMaster.getGoodsId());
|
Goods good = goodsMap.get(orderMaster.getGoodsId());
|
||||||
if (good != null) {
|
if (good != null) {
|
||||||
detail.setGoods(good);
|
detail.setGoods(good);
|
||||||
detail.setGoodsWorker(workerMap.get(good.getWorkerId()));
|
// 填充商品三级类目
|
||||||
|
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.selectByOrderDetailId(detail.getId()).stream().mapToInt(OrderGoods::getGoodsNum).sum();
|
||||||
|
detail.setConsoleGoodsName("【" + three.getGoodsCategoryName()
|
||||||
|
+ "-" + two.getGoodsCategoryName()
|
||||||
|
+ "-" + one.getGoodsCategoryName() + "】x" + totalNum);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
detail.setGoodsWorker(workerMap.get(orderMaster.getWorkerId()));
|
||||||
}
|
}
|
||||||
// 地址信息
|
// 地址信息
|
||||||
CustomerAddress customerAddress = addressService.selectByCustomerAddressId(orderMaster.getAddressId());
|
CustomerAddress customerAddress = addressService.selectByCustomerAddressId(orderMaster.getAddressId());
|
||||||
if (customerAddress != null) {
|
if (customerAddress != null) {
|
||||||
|
SysArea sysArea = sysAreaService.selectById(customerAddress.getCountryId());
|
||||||
|
String completeAddress = sysArea.getMergerName().replaceAll(",", "") + customerAddress.getAddress();
|
||||||
detail.setAddressName(customerAddress.getName());
|
detail.setAddressName(customerAddress.getName());
|
||||||
detail.setAddressPhone(customerAddress.getPhone());
|
detail.setAddressPhone(customerAddress.getPhone());
|
||||||
detail.setAddress(customerAddress.getAddress());
|
detail.setAddress(completeAddress);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FinancialDetail fd = financialDetailMap.get(detail.getId());
|
FinancialDetail fd = financialDetailMap.get(detail.getId());
|
||||||
if (fd != null) {
|
if (fd != null) {
|
||||||
detail.setFinancialDetailMoney(fd.getPayMoney());
|
detail.setFinancialDetailMoney(fd.getPayMoney());
|
||||||
}
|
}
|
||||||
|
OrderCallRecord orderCallRecordParam = new OrderCallRecord();
|
||||||
|
orderCallRecordParam.setOrderType("01");
|
||||||
|
orderCallRecordParam.setOrderId(detail.getOrderMasterId());
|
||||||
|
List<OrderCallRecord> orderCallRecords = orderCallRecordService.selectOrderCallRecordList(orderCallRecordParam);
|
||||||
|
if(CollectionUtils.isNotEmpty(orderCallRecords)){
|
||||||
|
OrderCallRecord newOne = orderCallRecords.stream().sorted(Comparator.comparing(OrderCallRecord::getCallTime).reversed()).collect(Collectors.toList()).get(0);
|
||||||
|
detail.setLastCallTime(DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",newOne.getCallTime()) + " 拨号次数x" + orderCallRecords.size());
|
||||||
|
}
|
||||||
FinancialChangeRecord fc = fcMap.get(detail.getId());
|
FinancialChangeRecord fc = fcMap.get(detail.getId());
|
||||||
if (fc != null) {
|
if (fc != null) {
|
||||||
detail.setChangeMoney(fc.getChangeMoney());
|
detail.setChangeMoney(fc.getChangeMoney());
|
||||||
|
|
|
||||||
|
|
@ -762,7 +762,7 @@ public class OrderMasterController extends BaseController {
|
||||||
List<OrderCallRecord> orderCallRecords = orderCallRecordService.selectOrderCallRecordList(orderCallRecordParam);
|
List<OrderCallRecord> orderCallRecords = orderCallRecordService.selectOrderCallRecordList(orderCallRecordParam);
|
||||||
if(CollectionUtils.isNotEmpty(orderCallRecords)){
|
if(CollectionUtils.isNotEmpty(orderCallRecords)){
|
||||||
OrderCallRecord newOne = orderCallRecords.stream().sorted(Comparator.comparing(OrderCallRecord::getCallTime).reversed()).collect(Collectors.toList()).get(0);
|
OrderCallRecord newOne = orderCallRecords.stream().sorted(Comparator.comparing(OrderCallRecord::getCallTime).reversed()).collect(Collectors.toList()).get(0);
|
||||||
master.setLastCallTime(DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",newOne.getCallTime()));
|
master.setLastCallTime(DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",newOne.getCallTime()) + " 拨号次数x" + orderCallRecords.size());
|
||||||
}
|
}
|
||||||
Goods good = goodsMap.get(master.getGoodsId());
|
Goods good = goodsMap.get(master.getGoodsId());
|
||||||
if (good != null) {
|
if (good != null) {
|
||||||
|
|
@ -796,6 +796,9 @@ public class OrderMasterController extends BaseController {
|
||||||
master.setAddressPhone(customerAddress.getPhone());
|
master.setAddressPhone(customerAddress.getPhone());
|
||||||
master.setAddress(completeAddress);
|
master.setAddress(completeAddress);
|
||||||
}
|
}
|
||||||
|
if(master.getExpectTimeStart() != null && master.getExpectTimeEnd() != null){
|
||||||
|
master.setMixExpectTime(DateUtils.parseDateToStr("yyyy-MM-dd HH:mm",master.getExpectTimeStart()) +"-"+ DateUtils.parseDateToStr("HH:mm",master.getExpectTimeEnd()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return getDataTable(orderMasterList);
|
return getDataTable(orderMasterList);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,9 @@ import com.huifu.adapay.core.AdapayCore;
|
||||||
import com.huifu.adapay.core.util.AdapaySign;
|
import com.huifu.adapay.core.util.AdapaySign;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -72,6 +74,12 @@ public class AdapayCallbackController extends BaseController {
|
||||||
return "NG";
|
return "NG";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/adapay/callback")
|
||||||
|
@ResponseBody
|
||||||
|
public String test() {
|
||||||
|
return "NG";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验签名
|
* 校验签名
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('新增发单加价记录')" />
|
||||||
|
</head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-record-add">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">订单id:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="orderId" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">申请师傅:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="workerId" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">报价金额:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="addMoney" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">备注:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="remark" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "worker/record"
|
||||||
|
$("#form-record-add").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/add", $('#form-record-add').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,50 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('修改发单加价记录')" />
|
||||||
|
</head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-record-edit" th:object="${orderAddRecord}">
|
||||||
|
<input name="id" th:field="*{id}" type="hidden">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">订单id:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="orderId" th:field="*{orderId}" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">申请师傅:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="workerId" th:field="*{workerId}" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">报价金额:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="addMoney" th:field="*{addMoney}" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">备注:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="remark" th:field="*{remark}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "worker/record";
|
||||||
|
$("#form-record-edit").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/edit", $('#form-record-edit').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,110 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('发单加价记录列表')" />
|
||||||
|
</head>
|
||||||
|
<body class="gray-bg">
|
||||||
|
<div class="container-div">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 search-collapse">
|
||||||
|
<form id="formId">
|
||||||
|
<div class="select-list">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<label>订单id:</label>
|
||||||
|
<input type="text" name="orderId"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>申请师傅:</label>
|
||||||
|
<input type="text" name="workerId"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>报价金额:</label>
|
||||||
|
<input type="text" name="addMoney"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||||
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="worker:record:add">
|
||||||
|
<i class="fa fa-plus"></i> 添加
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="worker:record:edit">
|
||||||
|
<i class="fa fa-edit"></i> 修改
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="worker:record:remove">
|
||||||
|
<i class="fa fa-remove"></i> 删除
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="worker:record:export">
|
||||||
|
<i class="fa fa-download"></i> 导出
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-table"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var editFlag = [[${@permission.hasPermi('worker:record:edit')}]];
|
||||||
|
var removeFlag = [[${@permission.hasPermi('worker:record:remove')}]];
|
||||||
|
var prefix = ctx + "worker/record";
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/list",
|
||||||
|
createUrl: prefix + "/add",
|
||||||
|
updateUrl: prefix + "/edit/{id}",
|
||||||
|
removeUrl: prefix + "/remove",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
|
modalName: "发单加价记录",
|
||||||
|
columns: [{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'id',
|
||||||
|
title: '主键',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'orderId',
|
||||||
|
title: '订单id'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'workerId',
|
||||||
|
title: '申请师傅'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'addMoney',
|
||||||
|
title: '报价金额'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'status',
|
||||||
|
title: '状态 01初始 02选中'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'remark',
|
||||||
|
title: '备注'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
var actions = [];
|
||||||
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||||
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -77,9 +77,13 @@
|
||||||
待付款
|
待付款
|
||||||
(<span id="nonPaidOrderNum">0</span>)
|
(<span id="nonPaidOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 1})">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 1, isCall : '01'})">
|
||||||
已接单
|
待约单
|
||||||
(<span id="acceptedOrderNum">0</span>)
|
(<span id="notCallOrderNum">0</span>)
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 1, isCall : '02'})">
|
||||||
|
待排期
|
||||||
|
(<span id="notSetTimeOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 2})">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 2})">
|
||||||
待上门
|
待上门
|
||||||
|
|
@ -413,7 +417,36 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
<!-- 不同状态超时订单数量统计-->
|
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
dataType:"json",
|
||||||
|
data: {isCall: '01'},
|
||||||
|
url: prefix + '/differentStatus/count',
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#notCallOrderNum').text(result.data.acceptedOrderNum);
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
dataType:"json",
|
||||||
|
data: {isCall: '02'},
|
||||||
|
url: prefix + '/differentStatus/count',
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#notSetTimeOrderNum').text(result.data.acceptedOrderNum);
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "GET",
|
type: "GET",
|
||||||
dataType:"json",
|
dataType:"json",
|
||||||
|
|
@ -567,14 +600,12 @@
|
||||||
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 +' ' + row.addressName + '</small> <br>'
|
||||||
+ '<small>' + row.addressName + '</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.mixExpectTime + '</small> <br>'
|
||||||
+ '<small> 总金额:' + row.financialMasterMoney + '元 应得金额:' + row.financialDetailMoney + '元</small> <br>'
|
+ '<small> 总金额:' + row.financialMasterMoney + '元 应得金额:' + row.financialDetailMoney + '元</small> <br>'
|
||||||
+ '</div>'
|
+ '</div>'
|
||||||
+ '</div>';
|
+ '</div>';
|
||||||
|
|
@ -588,9 +619,19 @@
|
||||||
return $.table.selectDictLabel(orderStatus, value);
|
return $.table.selectDictLabel(orderStatus, value);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: 'goodsWorker',
|
||||||
|
title: '接单师傅',
|
||||||
|
formatter: function (value, row, index) {
|
||||||
|
if(value){
|
||||||
|
return '<small>' + value.name + '</small><br>'
|
||||||
|
+ '<small>' + value.phone + '</small>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'worker',
|
field: 'worker',
|
||||||
title: '接单信息',
|
title: '做单信息',
|
||||||
formatter: function (value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
if(value){
|
if(value){
|
||||||
return '<small>' + value.name + value.phone + '</small><br>'
|
return '<small>' + value.name + value.phone + '</small><br>'
|
||||||
|
|
@ -598,12 +639,17 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: 'lastCallTime',
|
||||||
|
title: '最近联系时间'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
formatter: function (value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
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="callDetail(\'' + row.orderMasterId + '\')"><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> ');-->
|
||||||
|
|
@ -613,16 +659,6 @@
|
||||||
return actions.join('');
|
return actions.join('');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
field: 'goodsWorker',
|
|
||||||
title: '商家信息',
|
|
||||||
formatter: function (value, row, index) {
|
|
||||||
if(value){
|
|
||||||
return '<small>' + value.name + '</small><br>'
|
|
||||||
+ '<small>' + value.phone + '</small>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
field: 'changeMoney',
|
field: 'changeMoney',
|
||||||
title: '商家追加金额',
|
title: '商家追加金额',
|
||||||
|
|
@ -669,6 +705,12 @@
|
||||||
var url = "order/goods?orderId=" + id;
|
var url = "order/goods?orderId=" + id;
|
||||||
$.modal.open("商品信息", url);
|
$.modal.open("商品信息", url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function callDetail(id) {
|
||||||
|
var url = "order/record?orderId=" + id;
|
||||||
|
$.modal.open("拨号记录", url);
|
||||||
|
}
|
||||||
|
|
||||||
function orderDetailReject(id) {
|
function orderDetailReject(id) {
|
||||||
$.modal.confirm("确定要退单吗?", function() {
|
$.modal.confirm("确定要退单吗?", function() {
|
||||||
const url = "detail/reject";
|
const url = "detail/reject";
|
||||||
|
|
|
||||||
|
|
@ -635,7 +635,7 @@
|
||||||
+ '<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.mixExpectTime + '</small> <br>'
|
||||||
+ '<small> 下单总金额:' + row.financialMasterMoney + '元,师傅实收金额: '+ row.financialMasterPayMoney + ' </small> <br>'
|
+ '<small> 下单总金额:' + row.financialMasterMoney + '元,师傅实收金额: '+ row.financialMasterPayMoney + ' </small> <br>'
|
||||||
+ '</div>'
|
+ '</div>'
|
||||||
+ '</div>';
|
+ '</div>';
|
||||||
|
|
|
||||||
|
|
@ -420,7 +420,7 @@
|
||||||
+ '<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.mixExpectTime + '</small> <br>'
|
||||||
+ '<small> 下单总金额:' + row.financialMasterMoney + '元,师傅实收金额: '+ row.financialMasterPayMoney + ' </small> <br>'
|
+ '<small> 下单总金额:' + row.financialMasterMoney + '元,师傅实收金额: '+ row.financialMasterPayMoney + ' </small> <br>'
|
||||||
+ '</div>'
|
+ '</div>'
|
||||||
+ '</div>';
|
+ '</div>';
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
package com.ghy.order.domain;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import com.ghy.common.annotation.Excel;
|
||||||
|
import com.ghy.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发单加价记录对象 order_add_record
|
||||||
|
*
|
||||||
|
* @author clunt
|
||||||
|
* @date 2023-11-03
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OrderAddRecord extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 订单id */
|
||||||
|
@Excel(name = "订单id")
|
||||||
|
private Long orderId;
|
||||||
|
|
||||||
|
/** 申请师傅 */
|
||||||
|
@Excel(name = "申请师傅")
|
||||||
|
private Long workerId;
|
||||||
|
|
||||||
|
/** 报价金额 */
|
||||||
|
@Excel(name = "报价金额")
|
||||||
|
private BigDecimal addMoney;
|
||||||
|
|
||||||
|
/** 状态 01初始 02选中 */
|
||||||
|
@Excel(name = "状态 01初始 02选中")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -70,6 +70,7 @@ public class OrderDetail extends BaseEntity {
|
||||||
private Worker worker;
|
private Worker worker;
|
||||||
// 商品归属师傅
|
// 商品归属师傅
|
||||||
private Worker goodsWorker;
|
private Worker goodsWorker;
|
||||||
|
// 接单师傅
|
||||||
|
|
||||||
@Excel(name = "接单时间", cellType = Excel.ColumnType.STRING)
|
@Excel(name = "接单时间", cellType = Excel.ColumnType.STRING)
|
||||||
private Date revTime;
|
private Date revTime;
|
||||||
|
|
@ -93,6 +94,10 @@ public class OrderDetail extends BaseEntity {
|
||||||
private Goods goods;
|
private Goods goods;
|
||||||
private String goodsName;
|
private String goodsName;
|
||||||
|
|
||||||
|
private String consoleGoodsName;
|
||||||
|
private String lastCallTime;
|
||||||
|
private String mixExpectTime;
|
||||||
|
|
||||||
private Long countryId;
|
private Long countryId;
|
||||||
|
|
||||||
private Boolean isOverTime;
|
private Boolean isOverTime;
|
||||||
|
|
@ -198,4 +203,7 @@ public class OrderDetail extends BaseEntity {
|
||||||
private LocalDateTime createTimeEnd;
|
private LocalDateTime createTimeEnd;
|
||||||
|
|
||||||
private Boolean needImgs;
|
private Boolean needImgs;
|
||||||
|
|
||||||
|
private String isCall;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,8 @@ public class OrderMaster extends BaseEntity {
|
||||||
|
|
||||||
private Date expectTimeEnd;
|
private Date expectTimeEnd;
|
||||||
|
|
||||||
|
private String mixExpectTime;
|
||||||
|
|
||||||
private Worker worker;
|
private Worker worker;
|
||||||
|
|
||||||
private String customerName;
|
private String customerName;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.ghy.order.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ghy.order.domain.OrderAddRecord;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发单加价记录Mapper接口
|
||||||
|
*
|
||||||
|
* @author clunt
|
||||||
|
* @date 2023-11-03
|
||||||
|
*/
|
||||||
|
public interface OrderAddRecordMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询发单加价记录
|
||||||
|
*
|
||||||
|
* @param id 发单加价记录主键
|
||||||
|
* @return 发单加价记录
|
||||||
|
*/
|
||||||
|
public OrderAddRecord selectOrderAddRecordById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询发单加价记录列表
|
||||||
|
*
|
||||||
|
* @param orderAddRecord 发单加价记录
|
||||||
|
* @return 发单加价记录集合
|
||||||
|
*/
|
||||||
|
public List<OrderAddRecord> selectOrderAddRecordList(OrderAddRecord orderAddRecord);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增发单加价记录
|
||||||
|
*
|
||||||
|
* @param orderAddRecord 发单加价记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertOrderAddRecord(OrderAddRecord orderAddRecord);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改发单加价记录
|
||||||
|
*
|
||||||
|
* @param orderAddRecord 发单加价记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateOrderAddRecord(OrderAddRecord orderAddRecord);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除发单加价记录
|
||||||
|
*
|
||||||
|
* @param id 发单加价记录主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteOrderAddRecordById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除发单加价记录
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteOrderAddRecordByIds(String[] ids);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.ghy.order.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ghy.order.domain.OrderAddRecord;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发单加价记录Service接口
|
||||||
|
*
|
||||||
|
* @author clunt
|
||||||
|
* @date 2023-11-03
|
||||||
|
*/
|
||||||
|
public interface IOrderAddRecordService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询发单加价记录
|
||||||
|
*
|
||||||
|
* @param id 发单加价记录主键
|
||||||
|
* @return 发单加价记录
|
||||||
|
*/
|
||||||
|
public OrderAddRecord selectOrderAddRecordById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询发单加价记录列表
|
||||||
|
*
|
||||||
|
* @param orderAddRecord 发单加价记录
|
||||||
|
* @return 发单加价记录集合
|
||||||
|
*/
|
||||||
|
public List<OrderAddRecord> selectOrderAddRecordList(OrderAddRecord orderAddRecord);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增发单加价记录
|
||||||
|
*
|
||||||
|
* @param orderAddRecord 发单加价记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertOrderAddRecord(OrderAddRecord orderAddRecord);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改发单加价记录
|
||||||
|
*
|
||||||
|
* @param orderAddRecord 发单加价记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateOrderAddRecord(OrderAddRecord orderAddRecord);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除发单加价记录
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的发单加价记录主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteOrderAddRecordByIds(String ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除发单加价记录信息
|
||||||
|
*
|
||||||
|
* @param id 发单加价记录主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteOrderAddRecordById(Long id);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,97 @@
|
||||||
|
package com.ghy.order.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ghy.common.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ghy.order.mapper.OrderAddRecordMapper;
|
||||||
|
import com.ghy.order.domain.OrderAddRecord;
|
||||||
|
import com.ghy.order.service.IOrderAddRecordService;
|
||||||
|
import com.ghy.common.core.text.Convert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发单加价记录Service业务层处理
|
||||||
|
*
|
||||||
|
* @author clunt
|
||||||
|
* @date 2023-11-03
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class OrderAddRecordServiceImpl implements IOrderAddRecordService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private OrderAddRecordMapper orderAddRecordMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询发单加价记录
|
||||||
|
*
|
||||||
|
* @param id 发单加价记录主键
|
||||||
|
* @return 发单加价记录
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public OrderAddRecord selectOrderAddRecordById(Long id)
|
||||||
|
{
|
||||||
|
return orderAddRecordMapper.selectOrderAddRecordById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询发单加价记录列表
|
||||||
|
*
|
||||||
|
* @param orderAddRecord 发单加价记录
|
||||||
|
* @return 发单加价记录
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<OrderAddRecord> selectOrderAddRecordList(OrderAddRecord orderAddRecord)
|
||||||
|
{
|
||||||
|
return orderAddRecordMapper.selectOrderAddRecordList(orderAddRecord);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增发单加价记录
|
||||||
|
*
|
||||||
|
* @param orderAddRecord 发单加价记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertOrderAddRecord(OrderAddRecord orderAddRecord)
|
||||||
|
{
|
||||||
|
orderAddRecord.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return orderAddRecordMapper.insertOrderAddRecord(orderAddRecord);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改发单加价记录
|
||||||
|
*
|
||||||
|
* @param orderAddRecord 发单加价记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateOrderAddRecord(OrderAddRecord orderAddRecord)
|
||||||
|
{
|
||||||
|
orderAddRecord.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return orderAddRecordMapper.updateOrderAddRecord(orderAddRecord);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除发单加价记录
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的发单加价记录主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteOrderAddRecordByIds(String ids)
|
||||||
|
{
|
||||||
|
return orderAddRecordMapper.deleteOrderAddRecordByIds(Convert.toStrArray(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除发单加价记录信息
|
||||||
|
*
|
||||||
|
* @param id 发单加价记录主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteOrderAddRecordById(Long id)
|
||||||
|
{
|
||||||
|
return orderAddRecordMapper.deleteOrderAddRecordById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,92 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ghy.order.mapper.OrderAddRecordMapper">
|
||||||
|
|
||||||
|
<resultMap type="OrderAddRecord" id="OrderAddRecordResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="orderId" column="order_id" />
|
||||||
|
<result property="workerId" column="worker_id" />
|
||||||
|
<result property="addMoney" column="add_money" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="status" column="status" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectOrderAddRecordVo">
|
||||||
|
select id, order_id, worker_id, add_money, create_time, status, create_by, update_by, update_time, remark from order_add_record
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectOrderAddRecordList" parameterType="OrderAddRecord" resultMap="OrderAddRecordResult">
|
||||||
|
<include refid="selectOrderAddRecordVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="orderId != null "> and order_id = #{orderId}</if>
|
||||||
|
<if test="workerId != null "> and worker_id = #{workerId}</if>
|
||||||
|
<if test="addMoney != null "> and add_money = #{addMoney}</if>
|
||||||
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectOrderAddRecordById" parameterType="Long" resultMap="OrderAddRecordResult">
|
||||||
|
<include refid="selectOrderAddRecordVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertOrderAddRecord" parameterType="OrderAddRecord" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into order_add_record
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="orderId != null">order_id,</if>
|
||||||
|
<if test="workerId != null">worker_id,</if>
|
||||||
|
<if test="addMoney != null">add_money,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="status != null and status != ''">status,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="orderId != null">#{orderId},</if>
|
||||||
|
<if test="workerId != null">#{workerId},</if>
|
||||||
|
<if test="addMoney != null">#{addMoney},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="status != null and status != ''">#{status},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateOrderAddRecord" parameterType="OrderAddRecord">
|
||||||
|
update order_add_record
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="orderId != null">order_id = #{orderId},</if>
|
||||||
|
<if test="workerId != null">worker_id = #{workerId},</if>
|
||||||
|
<if test="addMoney != null">add_money = #{addMoney},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="status != null and status != ''">status = #{status},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteOrderAddRecordById" parameterType="Long">
|
||||||
|
delete from order_add_record where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteOrderAddRecordByIds" parameterType="String">
|
||||||
|
delete from order_add_record where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -198,6 +198,9 @@
|
||||||
<if test="timeout != null">
|
<if test="timeout != null">
|
||||||
AND od.timeout_ = #{timeout}
|
AND od.timeout_ = #{timeout}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isCall != null">
|
||||||
|
AND om.is_call = #{isCall}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by od.create_time
|
order by od.create_time
|
||||||
<trim suffixOverrides=",">
|
<trim suffixOverrides=",">
|
||||||
|
|
@ -453,10 +456,13 @@
|
||||||
count(case when od.order_status = 4 then 1 else null end) as confirmingOrderNum,
|
count(case when od.order_status = 4 then 1 else null end) as confirmingOrderNum,
|
||||||
count(case when od.order_status = 5 then 1 else null end) as finishedOrderNum,
|
count(case when od.order_status = 5 then 1 else null end) as finishedOrderNum,
|
||||||
count(case when od.order_status = 6 then 1 else null end) as canceledOrderNum
|
count(case when od.order_status = 6 then 1 else null end) as canceledOrderNum
|
||||||
from order_detail od
|
from order_detail od left join order_master om on od.order_master_id = om.id
|
||||||
where 1 = 1
|
where 1 = 1
|
||||||
<if test="timeout != null">
|
<if test="timeout != null">
|
||||||
AND od.timeout_ = #{timeout}
|
AND od.timeout_ = #{timeout}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isCall != null">
|
||||||
|
AND om.is_call = #{isCall}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue