优化展示。修复bug
This commit is contained in:
parent
739976b1f9
commit
bc960bbb2b
|
|
@ -140,6 +140,9 @@ public class PayCallbackService implements CallBackService {
|
||||||
financialMasterService.updateFinancialMaster(financialMaster2Update);
|
financialMasterService.updateFinancialMaster(financialMaster2Update);
|
||||||
log.info("订单追加[{}]支付成功", relationId);
|
log.info("订单追加[{}]支付成功", relationId);
|
||||||
|
|
||||||
|
} else if (PaymentRelation.CONSULT_ADD.equals(relation.getRelationIdType())) {
|
||||||
|
// 更新加价单的支付信息
|
||||||
|
financialChangeRecordService.updatePay(relationId, paymentId, PayStatus.PAID.getCode());
|
||||||
} else {
|
} else {
|
||||||
log.error("未知的订单类型: relationIdType={}, relationId={}", relation.getRelationIdType(), relationId);
|
log.error("未知的订单类型: relationIdType={}, relationId={}", relation.getRelationIdType(), relationId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -265,6 +265,7 @@ public class OrderController extends BaseController {
|
||||||
orderMaster.setConsultMode(request.getConsultMode());
|
orderMaster.setConsultMode(request.getConsultMode());
|
||||||
if("01".equalsIgnoreCase(orderMaster.getConsultMode())){
|
if("01".equalsIgnoreCase(orderMaster.getConsultMode())){
|
||||||
orderMaster.setOrderMode("02");
|
orderMaster.setOrderMode("02");
|
||||||
|
orderMaster.setPayMode("01");
|
||||||
}
|
}
|
||||||
// 存在登陆用户的情况下
|
// 存在登陆用户的情况下
|
||||||
if(getSysUser() != null){
|
if(getSysUser() != null){
|
||||||
|
|
@ -1393,7 +1394,7 @@ public class OrderController extends BaseController {
|
||||||
if(goods.getDeptGoodsCategoryId() != null){
|
if(goods.getDeptGoodsCategoryId() != null){
|
||||||
Long categoryId = null;
|
Long categoryId = null;
|
||||||
// 前端发单和后台派单
|
// 前端发单和后台派单
|
||||||
if(com.ghy.common.utils.StringUtils.isEmpty(orderMaster.getOrderMode())){
|
if(com.ghy.common.utils.StringUtils.isEmpty(orderMaster.getOrderMode())||"01".equals(orderMaster.getConsultMode())){
|
||||||
DeptGoodsCategory deptGoodsCategory = deptGoodsCategoryService.selectOneByGoodsCategoryId(goods.getDeptGoodsCategoryId());
|
DeptGoodsCategory deptGoodsCategory = deptGoodsCategoryService.selectOneByGoodsCategoryId(goods.getDeptGoodsCategoryId());
|
||||||
if(deptGoodsCategory != null){
|
if(deptGoodsCategory != null){
|
||||||
categoryId = deptGoodsCategory.getGoodsCategoryId();
|
categoryId = deptGoodsCategory.getGoodsCategoryId();
|
||||||
|
|
|
||||||
|
|
@ -561,9 +561,6 @@ public class OrderDetailController extends BaseController {
|
||||||
// 商品规格及信息
|
// 商品规格及信息
|
||||||
List<OrderGoods> orderStandardList = orderGoodsService.selectByOrderDetailId(detail.getId());
|
List<OrderGoods> orderStandardList = orderGoodsService.selectByOrderDetailId(detail.getId());
|
||||||
|
|
||||||
// 商品信息
|
|
||||||
GoodsStandard goodsStandard = goodsStandardService.selectById(orderStandardList.get(0).getGoodsStandardId());
|
|
||||||
|
|
||||||
Goods goods = goodsService.selectById(orderMaster.getGoodsId());
|
Goods goods = goodsService.selectById(orderMaster.getGoodsId());
|
||||||
// 填充商品三级类目
|
// 填充商品三级类目
|
||||||
if(goods.getDeptGoodsCategoryId() != null){
|
if(goods.getDeptGoodsCategoryId() != null){
|
||||||
|
|
@ -994,8 +991,8 @@ public class OrderDetailController extends BaseController {
|
||||||
if (orderDetail.getOrderStatus().equals(OrderStatus.FINISH_CHECK.code())) {
|
if (orderDetail.getOrderStatus().equals(OrderStatus.FINISH_CHECK.code())) {
|
||||||
return AjaxResult.success("发起成功");
|
return AjaxResult.success("发起成功");
|
||||||
}
|
}
|
||||||
if (orderDetail.getOrderStatus() != OrderStatus.SERVER.code()
|
if (!"01".equals(orderMaster.getConsultMode()) && (orderDetail.getOrderStatus() != OrderStatus.SERVER.code()
|
||||||
|| !orderMaster.getPayStatus().equals(PayStatus.PAID.getCode())) {
|
|| !orderMaster.getPayStatus().equals(PayStatus.PAID.getCode()))) {
|
||||||
return AjaxResult.error("未支付订单或非服务中订单,发起完单失败");
|
return AjaxResult.error("未支付订单或非服务中订单,发起完单失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ import com.ghy.customer.service.CustomerService;
|
||||||
import com.ghy.goods.domain.*;
|
import com.ghy.goods.domain.*;
|
||||||
import com.ghy.goods.service.*;
|
import com.ghy.goods.service.*;
|
||||||
import com.ghy.order.domain.*;
|
import com.ghy.order.domain.*;
|
||||||
|
import com.ghy.order.request.OrderChangePriceReq;
|
||||||
import com.ghy.order.request.SysOrderAssignRequest;
|
import com.ghy.order.request.SysOrderAssignRequest;
|
||||||
import com.ghy.order.request.SysOrderGoodsStandards;
|
import com.ghy.order.request.SysOrderGoodsStandards;
|
||||||
import com.ghy.order.service.*;
|
import com.ghy.order.service.*;
|
||||||
|
|
@ -121,6 +122,19 @@ public class OrderMasterController extends BaseController {
|
||||||
@Resource
|
@Resource
|
||||||
private CustomerAddressService customerAddressService;
|
private CustomerAddressService customerAddressService;
|
||||||
|
|
||||||
|
@GetMapping("/changePrice/{orderIds}")
|
||||||
|
public String changePrice(@PathVariable("orderIds") String orderIds, ModelMap mmap)
|
||||||
|
{
|
||||||
|
mmap.put("orderIds", orderIds);
|
||||||
|
return "order/batchChangePrice";
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping(value = "batchChangePrice")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult batchChangePrice(@Validated OrderChangePriceReq changePriceReq){
|
||||||
|
return orderMasterService.batchChangePrice(changePriceReq);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// @RequiresPermissions("order:master:view")
|
// @RequiresPermissions("order:master:view")
|
||||||
@GetMapping()
|
@GetMapping()
|
||||||
|
|
|
||||||
|
|
@ -178,15 +178,18 @@ public class AlipayController extends BaseController {
|
||||||
ArrayList<PaymentRelation> relations = new ArrayList<>();
|
ArrayList<PaymentRelation> relations = new ArrayList<>();
|
||||||
// 主单是否付款 没付款的话一起付
|
// 主单是否付款 没付款的话一起付
|
||||||
boolean fmPaid = Objects.equals(PayStatus.WAIT_PAY.getCode(), fm.getPayStatus());
|
boolean fmPaid = Objects.equals(PayStatus.WAIT_PAY.getCode(), fm.getPayStatus());
|
||||||
if (fmPaid) {
|
if (fmPaid && !"01".equals(orderMaster.getConsultMode())) {
|
||||||
payMoney = payMoney.add(fm.getPayMoney());
|
payMoney = payMoney.add(fm.getPayMoney());
|
||||||
relations.add(new PaymentRelation(null, fm.getId(), PaymentRelation.FINANCIAL_MASTER, fm.getPayMoney()));
|
relations.add(new PaymentRelation(null, fm.getId(), PaymentRelation.FINANCIAL_MASTER, fm.getPayMoney()));
|
||||||
}
|
}
|
||||||
// 查询关联的加价单
|
// 查询关联的加价单
|
||||||
FinancialChangeRecord fcr = financialChangeRecordService.selectNotPayRecordByDetailId(orderDetailId);
|
FinancialChangeRecord fcr = financialChangeRecordService.selectNotPayRecordByDetailId(orderDetailId);
|
||||||
if (fcr != null) {
|
if (fcr != null && !"01".equals(orderMaster.getConsultMode())) {
|
||||||
payMoney = payMoney.add(fcr.getChangeMoney());
|
payMoney = payMoney.add(fcr.getChangeMoney());
|
||||||
relations.add(new PaymentRelation(null, fcr.getId(), PaymentRelation.FINANCIAL_CHANGE, fcr.getChangeMoney()));
|
relations.add(new PaymentRelation(null, fcr.getId(), PaymentRelation.FINANCIAL_CHANGE, fcr.getChangeMoney()));
|
||||||
|
}else if(fcr != null){
|
||||||
|
payMoney = payMoney.add(fcr.getChangeMoney());
|
||||||
|
relations.add(new PaymentRelation(null, fcr.getId(), PaymentRelation.CONSULT_ADD, fcr.getChangeMoney()));
|
||||||
}
|
}
|
||||||
OrderAttachmentRecord param = new OrderAttachmentRecord();
|
OrderAttachmentRecord param = new OrderAttachmentRecord();
|
||||||
param.setOrderDetailId(orderDetailId);
|
param.setOrderDetailId(orderDetailId);
|
||||||
|
|
|
||||||
|
|
@ -262,7 +262,12 @@ public class WorkerController extends BaseController {
|
||||||
setDistrictIds(worker.getDistrictIds());
|
setDistrictIds(worker.getDistrictIds());
|
||||||
}}));
|
}}));
|
||||||
} else {
|
} else {
|
||||||
workerListResponse.setWorkerAreas(workerAreaService.getByWorker(w.getWorkerId()));
|
List<WorkerArea> workerAreas = workerAreaService.getByWorker(w.getWorkerId());
|
||||||
|
if(workerAreas.size() > 10){
|
||||||
|
workerListResponse.setWorkerAreas(workerAreas.subList(0,10));
|
||||||
|
}else {
|
||||||
|
workerListResponse.setWorkerAreas(workerAreas);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
workerListResponse.setGoodsCategories(workerGoodsCategoryService.getByWorker(w.getWorkerId()));
|
workerListResponse.setGoodsCategories(workerGoodsCategoryService.getByWorker(w.getWorkerId()));
|
||||||
workerListResponse.setSpecialSkills(specialSkillService.getByWorker(w.getWorkerId()));
|
workerListResponse.setSpecialSkills(specialSkillService.getByWorker(w.getWorkerId()));
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.ghy.web.pojo.vo;
|
package com.ghy.web.pojo.vo;
|
||||||
|
|
||||||
|
import com.ghy.common.core.domain.BaseEntity;
|
||||||
import com.ghy.worker.domain.Worker;
|
import com.ghy.worker.domain.Worker;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
@ -10,7 +11,7 @@ import java.util.List;
|
||||||
* @date : 2022-06-24 17:38
|
* @date : 2022-06-24 17:38
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class WorkerListRequest {
|
public class WorkerListRequest extends BaseEntity {
|
||||||
private Long areaId;
|
private Long areaId;
|
||||||
|
|
||||||
private List<Long> areaIds;
|
private List<Long> areaIds;
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ spring:
|
||||||
druid:
|
druid:
|
||||||
# 主库数据源
|
# 主库数据源
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://121.62.23.77:3306/gqz?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://121.62.23.77:3306/gqz?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
|
||||||
username: gqz
|
username: gqz
|
||||||
password: Clunt@12345
|
password: Clunt@12345
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
|
|
|
||||||
|
|
@ -19,22 +19,33 @@ body {
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
}
|
}
|
||||||
.cascader-wrap:after {
|
.cascader-wrap:after {
|
||||||
opacity: 1;
|
/*opacity: 1;*/
|
||||||
content: "";
|
content: "展开";
|
||||||
border-color: transparent transparent #888 transparent;
|
padding: 5px 10px;
|
||||||
border-style: solid;
|
background-color: #1d85c6;
|
||||||
height: 0;
|
color: #feffff;
|
||||||
margin-top: -2px;
|
border-radius: 4px;
|
||||||
|
text-align: center;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 12%;
|
||||||
right: 10px;
|
right: 5px;
|
||||||
width: 0;
|
/*border-color: transparent transparent #888 transparent;*/
|
||||||
border-width: 0 4px 5px 4px;
|
/*border-style: solid;*/
|
||||||
transform: rotate(180deg);
|
/*height: 0;*/
|
||||||
|
/*margin-top: -2px;*/
|
||||||
|
/*position: absolute;*/
|
||||||
|
/*top: 50%;*/
|
||||||
|
/*right: 10px;*/
|
||||||
|
/*width: 0;*/
|
||||||
|
/*border-width: 0 4px 5px 4px;*/
|
||||||
|
/*transform: rotate(180deg);*/
|
||||||
transition: all 0.1s;
|
transition: all 0.1s;
|
||||||
}
|
}
|
||||||
.cascader-wrap.is-show:after {
|
.cascader-wrap.is-show:after {
|
||||||
transform: rotate(0deg);
|
/*transform: rotate(0deg);*/
|
||||||
|
content: "收起";
|
||||||
|
background-color: #e82d2d;
|
||||||
|
color: #feffff;
|
||||||
}
|
}
|
||||||
.cascader-wrap.is-show .eo-cascader-panel {
|
.cascader-wrap.is-show .eo-cascader-panel {
|
||||||
display: block;
|
display: block;
|
||||||
|
|
@ -62,7 +73,7 @@ body {
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
}
|
}
|
||||||
.cascader-wrap.is-clear:after {
|
.cascader-wrap.is-clear:after {
|
||||||
opacity: 0;
|
/*opacity: 0;*/
|
||||||
}
|
}
|
||||||
.eo-cascader-panel {
|
.eo-cascader-panel {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
<!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-change-price">
|
||||||
|
<input name="orderIds" type="hidden" th:value="${orderIds}" />
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">输入修改后价格:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input class="form-control" type="text" name="changePrice" id="changePrice">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script type="text/javascript">
|
||||||
|
$("#changePrice").validate({
|
||||||
|
rules:{
|
||||||
|
changePrice:{
|
||||||
|
required:true
|
||||||
|
},
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(ctx + "order/master/batchChangePrice", $('#form-change-price').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
|
|
@ -630,14 +630,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>'
|
+ '<p> ' + row.code + '<p/>'
|
||||||
+ '<small> ' + row.consoleGoodsName+ '<small/> <br>'
|
+ '<p> ' + row.consoleGoodsName + '<p/>'
|
||||||
+ '<small> 联系人:' + row.addressName + '</small> <br>'
|
+ '<p> 联系人:' + row.addressName + '</p>'
|
||||||
+ '<small> 联系电话:' + row.addressPhone + '</small> <br>'
|
+ '<p> 联系电话:' + row.addressPhone + '</p>'
|
||||||
+ '<small> 联系地址:' + row.address + '</small> <br>'
|
+ '<p> 联系地址:' + row.address + '</p>'
|
||||||
+ '<small> 下单时间:' + row.createTime + '</small> <br>'
|
+ '<p> 下单时间:' + row.createTime + '</p>'
|
||||||
+ '<small> 预约时间:' + row.mixExpectTime + '</small> <br>'
|
+ '<p> 预约时间:' + row.mixExpectTime + '</p>'
|
||||||
+ '<small> 总金额:' + row.financialMasterMoney + '元 应得金额:' + row.financialDetailMoney + '元</small> <br>'
|
+ '<p> 总金额:' + row.financialMasterMoney + '元 应得金额:' + row.financialDetailMoney + '元</p>'
|
||||||
+ '</div>'
|
+ '</div>'
|
||||||
+ '</div>';
|
+ '</div>';
|
||||||
}
|
}
|
||||||
|
|
@ -656,21 +656,21 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'goodsWorker',
|
field: 'goodsWorker',
|
||||||
title: '接单师傅',
|
title: '师傅接单信息',
|
||||||
formatter: function (value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
if(value){
|
if(value){
|
||||||
return '<small>' + value.name + '</small><br>'
|
return '<p>' + value.name + '</p>'
|
||||||
+ '<small>' + value.phone + '</small>';
|
+ '<p>' + value.phone + '</p>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
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 '<p>' + value.name + value.phone + '</p>'
|
||||||
+ '<small>接单时间:' + value.createTime + '</small>';
|
+ '<p>接单时间:' + value.createTime + '</p>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -322,6 +322,9 @@
|
||||||
<a class="btn btn-default" onclick="showPcOrderWorker()">
|
<a class="btn btn-default" onclick="showPcOrderWorker()">
|
||||||
<i class="fa fa-money"></i> 指派
|
<i class="fa fa-money"></i> 指派
|
||||||
</a>
|
</a>
|
||||||
|
<a class="btn btn-default" onclick="batchChangePrice()">
|
||||||
|
<i class="fa fa-money"></i> 批量改价
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -640,14 +643,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>'
|
+ '<p>' + row.code + ' + <p/>'
|
||||||
+ '<small> ' + row.consoleGoodsName + '<small/> <br>'
|
+ '<p> ' + row.consoleGoodsName + '<p/>'
|
||||||
+ '<small> 联系人:' + row.addressName + '</small> <br>'
|
+ '<p> 联系人:' + row.addressName + '</p>'
|
||||||
+ '<small> 联系电话:' + row.addressPhone + '</small> <br>'
|
+ '<p> 联系电话:' + row.addressPhone + '</p>'
|
||||||
+ '<small> 联系地址:' + row.address + '</small> <br>'
|
+ '<p> 联系地址:' + row.address + '</p>'
|
||||||
+ '<small> 下单时间:' + row.createTime + '</small> <br>'
|
+ '<p> 下单时间:' + row.createTime + '</p>'
|
||||||
+ '<small> 预约时间:' + row.mixExpectTime + '</small> <br>'
|
+ '<p> 预约时间:' + row.mixExpectTime + '</p>'
|
||||||
+ '<small> 下单总金额:' + row.financialMasterMoney + '元,师傅实收金额: '+ row.financialMasterPayMoney + ' </small> <br>'
|
+ '<p> 下单总金额:' + row.financialMasterMoney + '元,师傅实收金额: '+ row.financialMasterPayMoney + ' </p>'
|
||||||
+ '</div>'
|
+ '</div>'
|
||||||
+ '</div>';
|
+ '</div>';
|
||||||
}
|
}
|
||||||
|
|
@ -680,11 +683,11 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
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 '<p>' + value.name + value.phone + '</p>'
|
||||||
+ '<small>接单时间:' + row.createTime + '</small>';
|
+ '<p>接单时间:' + row.createTime + '</p>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -978,6 +981,17 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function batchChangePrice() {
|
||||||
|
table.set();
|
||||||
|
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
|
||||||
|
if (rows.length === 0) {
|
||||||
|
$.modal.alertWarning("请至少选择一条记录");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var url = prefix + "/changePrice/" + rows.join(",");
|
||||||
|
$.modal.open("批量改价", url, '800', '300');
|
||||||
|
}
|
||||||
|
|
||||||
function mergePay() {
|
function mergePay() {
|
||||||
table.set();
|
table.set();
|
||||||
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
|
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
|
||||||
|
|
|
||||||
|
|
@ -421,16 +421,16 @@
|
||||||
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>'
|
+ '<p>' + row.code + '<p/>'
|
||||||
+ '<small> ' + row.consoleGoodsName + '<small/> <br>'
|
+ '<p> ' + row.consoleGoodsName + '<p/> '
|
||||||
+ '<small> 联系人:' + row.addressName + '</small> <br>'
|
+ '<p> 联系人:' + row.addressName + '</p> '
|
||||||
+ '<small> 联系电话:' + row.addressPhone + '</small> <br>'
|
+ '<p> 联系电话:' + row.addressPhone + '</p> '
|
||||||
+ '<small> 联系地址:' + row.address + '</small> <br>'
|
+ '<p> 联系地址:' + row.address + '</p> '
|
||||||
+ '<small> 下单时间:' + row.createTime + '</small> <br>'
|
+ '<p> 下单时间:' + row.createTime + '</p> '
|
||||||
+ '<small> 预约时间:' + row.mixExpectTime + '</small> <br>'
|
+ '<p> 预约时间:' + row.mixExpectTime + '</p> '
|
||||||
+ '<small> 下单总金额:' + row.financialMasterMoney + '元,师傅实收金额: '+ row.financialMasterPayMoney + ' </small> <br>'
|
+ '<p> 下单总金额:' + row.financialMasterMoney + '元,师傅实收金额: '+ row.financialMasterPayMoney + ' </p> '
|
||||||
+ '</div>'
|
+ '</p>'
|
||||||
+ '</div>';
|
+ '</p>';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -443,11 +443,11 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'worker',
|
field: 'worker',
|
||||||
title: '接单信息',
|
title: '师傅接单信息',
|
||||||
formatter: function (value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
if(value){
|
if(value){
|
||||||
return '<small>' + value.name + '</small><br>'
|
return '<p>' + value.name + '</p>'
|
||||||
+ '<small>接单时间:' + row.createTime + '</small>';
|
+ '<p>接单时间:' + row.createTime + '</p>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
package com.ghy.order.request;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Max;
|
||||||
|
import javax.validation.constraints.Min;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class OrderChangePriceReq {
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
private String orderIds;
|
||||||
|
|
||||||
|
@Min(value = 1L)
|
||||||
|
@Max(value = 9999L)
|
||||||
|
private String changePrice;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -4,6 +4,7 @@ import com.ghy.common.core.domain.AjaxResult;
|
||||||
import com.ghy.order.domain.OrderMaster;
|
import com.ghy.order.domain.OrderMaster;
|
||||||
import com.ghy.order.domain.OrderMasterCount;
|
import com.ghy.order.domain.OrderMasterCount;
|
||||||
import com.ghy.order.request.AppOrderRequest;
|
import com.ghy.order.request.AppOrderRequest;
|
||||||
|
import com.ghy.order.request.OrderChangePriceReq;
|
||||||
import com.huifu.adapay.core.exception.BaseAdaPayException;
|
import com.huifu.adapay.core.exception.BaseAdaPayException;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
@ -168,4 +169,10 @@ public interface OrderMasterService {
|
||||||
int reject(OrderMaster orderMaster);
|
int reject(OrderMaster orderMaster);
|
||||||
|
|
||||||
OrderMasterCount differentStatusOrderCount(OrderMaster orderMaster);
|
OrderMasterCount differentStatusOrderCount(OrderMaster orderMaster);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param changePriceReq 批量改价
|
||||||
|
*/
|
||||||
|
AjaxResult batchChangePrice(OrderChangePriceReq changePriceReq);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
package com.ghy.order.service.impl;
|
package com.ghy.order.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.ghy.common.adapay.model.AdapayStatusEnum;
|
import com.ghy.common.adapay.model.AdapayStatusEnum;
|
||||||
import com.ghy.common.adapay.model.AdpCode;
|
import com.ghy.common.adapay.model.AdpCode;
|
||||||
import com.ghy.common.adapay.model.DivMember;
|
import com.ghy.common.adapay.model.DivMember;
|
||||||
import com.ghy.common.adapay.model.PaymentDTO;
|
import com.ghy.common.adapay.model.PaymentDTO;
|
||||||
import com.ghy.common.constant.UserConstants;
|
import com.ghy.common.constant.UserConstants;
|
||||||
|
import com.ghy.common.core.domain.AjaxResult;
|
||||||
import com.ghy.common.core.text.Convert;
|
import com.ghy.common.core.text.Convert;
|
||||||
import com.ghy.common.enums.AdapayOrderType;
|
import com.ghy.common.enums.AdapayOrderType;
|
||||||
import com.ghy.common.enums.OrderStatus;
|
import com.ghy.common.enums.OrderStatus;
|
||||||
|
|
@ -18,6 +20,7 @@ import com.ghy.order.domain.OrderMaster;
|
||||||
import com.ghy.order.domain.OrderMasterCount;
|
import com.ghy.order.domain.OrderMasterCount;
|
||||||
import com.ghy.order.mapper.OrderMasterMapper;
|
import com.ghy.order.mapper.OrderMasterMapper;
|
||||||
import com.ghy.order.request.AppOrderRequest;
|
import com.ghy.order.request.AppOrderRequest;
|
||||||
|
import com.ghy.order.request.OrderChangePriceReq;
|
||||||
import com.ghy.order.service.OrderDetailService;
|
import com.ghy.order.service.OrderDetailService;
|
||||||
import com.ghy.order.service.OrderGoodsService;
|
import com.ghy.order.service.OrderGoodsService;
|
||||||
import com.ghy.order.service.OrderMasterService;
|
import com.ghy.order.service.OrderMasterService;
|
||||||
|
|
@ -575,4 +578,30 @@ public class OrderMasterServiceImpl implements OrderMasterService {
|
||||||
public OrderMasterCount differentStatusOrderCount(OrderMaster orderMaster) {
|
public OrderMasterCount differentStatusOrderCount(OrderMaster orderMaster) {
|
||||||
return orderMasterMapper.differentStatusOrderCount(orderMaster);
|
return orderMasterMapper.differentStatusOrderCount(orderMaster);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult batchChangePrice(OrderChangePriceReq changePriceReq) {
|
||||||
|
BigDecimal changePrice = new BigDecimal(changePriceReq.getChangePrice());
|
||||||
|
String [] idStr = changePriceReq.getOrderIds().split(",");
|
||||||
|
List<Long> idsList = new ArrayList<>();
|
||||||
|
for (String id : idStr){
|
||||||
|
idsList.add(Long.parseLong(id));
|
||||||
|
}
|
||||||
|
List<OrderMaster> orderMasters = orderMasterMapper.selectByIds(idsList);
|
||||||
|
long statusCount = orderMasters.stream().filter(x->x.getOrderStatus() != 1 && x.getOrderStatus() != 2).count();
|
||||||
|
if(statusCount > 0){
|
||||||
|
return AjaxResult.error("请不要选择不符合状态的订单!");
|
||||||
|
}
|
||||||
|
for (OrderMaster model : orderMasters) {
|
||||||
|
FinancialMaster financialMaster = financialMasterService.selectByOrderMasterId(model.getId());
|
||||||
|
if (NumberUtil.isGreater(changePrice, financialMaster.getServerMoney())) {
|
||||||
|
// 补充付款 todo 插入改价表数据
|
||||||
|
}else {
|
||||||
|
// 减少大师傅所得 todo 插入改价表数据
|
||||||
|
}
|
||||||
|
financialMaster.setServerMoney(changePrice);
|
||||||
|
financialMasterService.updateFinancialMaster(financialMaster);
|
||||||
|
}
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -192,9 +192,9 @@
|
||||||
#{drawCashStatus}
|
#{drawCashStatus}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="workFinishTimeExisted">
|
<!-- <if test="workFinishTimeExisted">-->
|
||||||
AND od.work_finish_time is not null
|
<!-- AND od.work_finish_time is not null-->
|
||||||
</if>
|
<!-- </if>-->
|
||||||
<if test="timeout != null">
|
<if test="timeout != null">
|
||||||
AND od.timeout_ = #{timeout}
|
AND od.timeout_ = #{timeout}
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -260,9 +260,9 @@
|
||||||
<if test="shelveStatus != null">
|
<if test="shelveStatus != null">
|
||||||
AND od.shelve_status = ${shelveStatus}
|
AND od.shelve_status = ${shelveStatus}
|
||||||
</if>
|
</if>
|
||||||
<if test="workFinishTimeExisted">
|
<!-- <if test="workFinishTimeExisted">-->
|
||||||
AND od.work_finish_time is not null
|
<!-- AND od.work_finish_time is not null-->
|
||||||
</if>
|
<!-- </if>-->
|
||||||
<if test="drawCashStatusList != null and drawCashStatusList.size() > 0">
|
<if test="drawCashStatusList != null and drawCashStatusList.size() > 0">
|
||||||
AND od.draw_cash_status in
|
AND od.draw_cash_status in
|
||||||
<foreach collection="drawCashStatusList" item="drawCashStatus" open="(" separator="," close=")">
|
<foreach collection="drawCashStatusList" item="drawCashStatus" open="(" separator="," close=")">
|
||||||
|
|
|
||||||
|
|
@ -49,4 +49,6 @@ public class PaymentRelation {
|
||||||
public static final String FINANCIAL_CHANGE = "financial_change";
|
public static final String FINANCIAL_CHANGE = "financial_change";
|
||||||
public static final String ORDER_ATTACHMENT = "order_attachment";
|
public static final String ORDER_ATTACHMENT = "order_attachment";
|
||||||
public static final String ORDER_ADD = "order_add";
|
public static final String ORDER_ADD = "order_add";
|
||||||
|
/** 合约订单加价 */
|
||||||
|
public static final String CONSULT_ADD = "consult_add";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -76,11 +76,11 @@ public class OrderServiceImpl implements OrderService {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询符合超时的子单
|
// 查询符合超时的子单
|
||||||
// List<OrderDetail> orders = orderDetailService.selectByStatus(timeoutOrderStatus);
|
List<OrderDetail> orders = orderDetailService.selectByStatus(timeoutOrderStatus);
|
||||||
// log.info("扫描到{}条未完成的子订单", orders.size());
|
log.info("扫描到{}条未完成的子订单", orders.size());
|
||||||
// for (OrderDetail order : orders) {
|
for (OrderDetail order : orders) {
|
||||||
// executor.execute(() -> checkTimeout(order));
|
executor.execute(() -> checkTimeout(order));
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
|
@ -181,7 +181,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
OrderTimeoutRecord record = new OrderTimeoutRecord(order.getId(), order.getWorkerId(), order.getDeptId(), order.getOrderStatus());
|
OrderTimeoutRecord record = new OrderTimeoutRecord(order.getId(), order.getWorkerId(), order.getDeptId(), order.getOrderStatus());
|
||||||
record.setPayMoney(getFineMoney(order));
|
record.setPayMoney(getFineMoney(order));
|
||||||
record.setFineStatus(0);
|
record.setFineStatus(0);
|
||||||
orderFineRecordMapper.insert(record);
|
// orderFineRecordMapper.insert(record);
|
||||||
orderDetailService.updateTimeout(order.getId(), 1, 1);
|
orderDetailService.updateTimeout(order.getId(), 1, 1);
|
||||||
}
|
}
|
||||||
} else if (timeoutOrderStatus.contains(order.getOrderStatus())) {
|
} else if (timeoutOrderStatus.contains(order.getOrderStatus())) {
|
||||||
|
|
@ -210,7 +210,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
OrderTimeoutRecord record = new OrderTimeoutRecord(order.getId(), order.getWorkerId(), order.getDeptId(), order.getOrderStatus());
|
OrderTimeoutRecord record = new OrderTimeoutRecord(order.getId(), order.getWorkerId(), order.getDeptId(), order.getOrderStatus());
|
||||||
record.setPayMoney(getFineMoney(order));
|
record.setPayMoney(getFineMoney(order));
|
||||||
record.setFineStatus(0);
|
record.setFineStatus(0);
|
||||||
orderFineRecordMapper.insert(record);
|
// orderFineRecordMapper.insert(record);
|
||||||
orderDetailService.updateTimeout(order.getId(), 1, 1);
|
orderDetailService.updateTimeout(order.getId(), 1, 1);
|
||||||
}
|
}
|
||||||
} else if (times == 1) {
|
} else if (times == 1) {
|
||||||
|
|
@ -223,7 +223,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
OrderTimeoutRecord record = new OrderTimeoutRecord(order.getId(), order.getWorkerId(), order.getDeptId(), order.getOrderStatus());
|
OrderTimeoutRecord record = new OrderTimeoutRecord(order.getId(), order.getWorkerId(), order.getDeptId(), order.getOrderStatus());
|
||||||
record.setPayMoney(getFineMoney(order));
|
record.setPayMoney(getFineMoney(order));
|
||||||
record.setFineStatus(0);
|
record.setFineStatus(0);
|
||||||
orderFineRecordMapper.insert(record);
|
// orderFineRecordMapper.insert(record);
|
||||||
orderDetailService.updateTimeout(order.getId(), 1, 2);
|
orderDetailService.updateTimeout(order.getId(), 1, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue