Compare commits

...

2 Commits

Author SHA1 Message Date
kuang.yife a329df620d 1.主订单规格展示
3.电话姓名查找订单筛选
4.主单派单时,弹框通过手机号搜索子师傅
2024-05-27 11:19:50 +08:00
kuang.yife bc960bbb2b 优化展示。修复bug 2024-05-20 09:19:08 +08:00
24 changed files with 354 additions and 79 deletions

View File

@ -140,6 +140,9 @@ public class PayCallbackService implements CallBackService {
financialMasterService.updateFinancialMaster(financialMaster2Update);
log.info("订单追加[{}]支付成功", relationId);
} else if (PaymentRelation.CONSULT_ADD.equals(relation.getRelationIdType())) {
// 更新加价单的支付信息
financialChangeRecordService.updatePay(relationId, paymentId, PayStatus.PAID.getCode());
} else {
log.error("未知的订单类型: relationIdType={}, relationId={}", relation.getRelationIdType(), relationId);
}

View File

@ -265,6 +265,7 @@ public class OrderController extends BaseController {
orderMaster.setConsultMode(request.getConsultMode());
if("01".equalsIgnoreCase(orderMaster.getConsultMode())){
orderMaster.setOrderMode("02");
orderMaster.setPayMode("01");
}
// 存在登陆用户的情况下
if(getSysUser() != null){
@ -1393,7 +1394,7 @@ public class OrderController extends BaseController {
if(goods.getDeptGoodsCategoryId() != 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());
if(deptGoodsCategory != null){
categoryId = deptGoodsCategory.getGoodsCategoryId();

View File

@ -561,9 +561,6 @@ public class OrderDetailController extends BaseController {
// 商品规格及信息
List<OrderGoods> orderStandardList = orderGoodsService.selectByOrderDetailId(detail.getId());
// 商品信息
GoodsStandard goodsStandard = goodsStandardService.selectById(orderStandardList.get(0).getGoodsStandardId());
Goods goods = goodsService.selectById(orderMaster.getGoodsId());
// 填充商品三级类目
if(goods.getDeptGoodsCategoryId() != null){
@ -994,8 +991,8 @@ public class OrderDetailController extends BaseController {
if (orderDetail.getOrderStatus().equals(OrderStatus.FINISH_CHECK.code())) {
return AjaxResult.success("发起成功");
}
if (orderDetail.getOrderStatus() != OrderStatus.SERVER.code()
|| !orderMaster.getPayStatus().equals(PayStatus.PAID.getCode())) {
if (!"01".equals(orderMaster.getConsultMode()) && (orderDetail.getOrderStatus() != OrderStatus.SERVER.code()
|| !orderMaster.getPayStatus().equals(PayStatus.PAID.getCode()))) {
return AjaxResult.error("未支付订单或非服务中订单,发起完单失败");
}

View File

@ -44,6 +44,14 @@ public class OrderGoodsController extends BaseController {
return prefix;
}
@GetMapping(value = "/master")
public String orderMasterGoods(Long orderId, ModelMap mmap) {
OrderMaster orderMaster = orderMasterService.selectById(orderId);
mmap.put("orderId", orderId);
mmap.put("orderMaster", orderMaster);
return "order/masterGoods";
}
// @RequiresPermissions("order:goods:list")
@PostMapping("/list")
@ResponseBody

View File

@ -24,6 +24,7 @@ import com.ghy.customer.service.CustomerService;
import com.ghy.goods.domain.*;
import com.ghy.goods.service.*;
import com.ghy.order.domain.*;
import com.ghy.order.request.OrderChangePriceReq;
import com.ghy.order.request.SysOrderAssignRequest;
import com.ghy.order.request.SysOrderGoodsStandards;
import com.ghy.order.service.*;
@ -121,6 +122,19 @@ public class OrderMasterController extends BaseController {
@Resource
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")
@GetMapping()

View File

@ -178,15 +178,18 @@ public class AlipayController extends BaseController {
ArrayList<PaymentRelation> relations = new ArrayList<>();
// 主单是否付款 没付款的话一起付
boolean fmPaid = Objects.equals(PayStatus.WAIT_PAY.getCode(), fm.getPayStatus());
if (fmPaid) {
if (fmPaid && !"01".equals(orderMaster.getConsultMode())) {
payMoney = payMoney.add(fm.getPayMoney());
relations.add(new PaymentRelation(null, fm.getId(), PaymentRelation.FINANCIAL_MASTER, fm.getPayMoney()));
}
// 查询关联的加价单
FinancialChangeRecord fcr = financialChangeRecordService.selectNotPayRecordByDetailId(orderDetailId);
if (fcr != null) {
if (fcr != null && !"01".equals(orderMaster.getConsultMode())) {
payMoney = payMoney.add(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();
param.setOrderDetailId(orderDetailId);

View File

@ -10,6 +10,7 @@ import com.ghy.common.enums.WorkerStatus;
import com.ghy.common.enums.WorkerType;
import com.ghy.common.utils.CacheUtils;
import com.ghy.common.utils.ExceptionUtil;
import com.ghy.common.utils.StringUtils;
import com.ghy.goods.domain.Goods;
import com.ghy.goods.domain.GoodsCategory;
import com.ghy.goods.service.GoodsCategoryService;
@ -151,6 +152,9 @@ public class WorkerController extends BaseController {
Worker worker = new Worker();
worker.setWorkerIds(CollectionUtils.isNotEmpty(resWorkerIds) ? resWorkerIds : null);
worker.setKeyWords(workerListRequest.getWorkerName());
if(StringUtils.isNotEmpty(workerListRequest.getWorkerPhone())){
worker.setPhone(workerListRequest.getWorkerPhone());
}
if(this.getSysUser().getDept().getParentId() != 101){
worker.setDeptId(this.getSysUser().getDept().getParentId());
}
@ -262,7 +266,12 @@ public class WorkerController extends BaseController {
setDistrictIds(worker.getDistrictIds());
}}));
} 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.setSpecialSkills(specialSkillService.getByWorker(w.getWorkerId()));

View File

@ -1,5 +1,6 @@
package com.ghy.web.pojo.vo;
import com.ghy.common.core.domain.BaseEntity;
import com.ghy.worker.domain.Worker;
import lombok.Data;
@ -10,7 +11,7 @@ import java.util.List;
* @date : 2022-06-24 17:38
*/
@Data
public class WorkerListRequest {
public class WorkerListRequest extends BaseEntity {
private Long areaId;
private List<Long> areaIds;
@ -19,6 +20,8 @@ public class WorkerListRequest {
private String workerName;
private String workerPhone;
private Long workerId;
private Long exceptParentAreaId;

View File

@ -45,7 +45,7 @@ spring:
druid:
# 主库数据源
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
password: Clunt@12345
# 从库数据源

View File

@ -19,22 +19,33 @@ body {
z-index: 100;
}
.cascader-wrap:after {
opacity: 1;
content: "";
border-color: transparent transparent #888 transparent;
border-style: solid;
height: 0;
margin-top: -2px;
/*opacity: 1;*/
content: "展开";
padding: 5px 10px;
background-color: #1d85c6;
color: #feffff;
border-radius: 4px;
text-align: center;
position: absolute;
top: 50%;
right: 10px;
width: 0;
border-width: 0 4px 5px 4px;
transform: rotate(180deg);
top: 12%;
right: 5px;
/*border-color: transparent transparent #888 transparent;*/
/*border-style: solid;*/
/*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;
}
.cascader-wrap.is-show:after {
transform: rotate(0deg);
/*transform: rotate(0deg);*/
content: "收起";
background-color: #e82d2d;
color: #feffff;
}
.cascader-wrap.is-show .eo-cascader-panel {
display: block;
@ -62,7 +73,7 @@ body {
z-index: 9;
}
.cascader-wrap.is-clear:after {
opacity: 0;
/*opacity: 0;*/
}
.eo-cascader-panel {
display: flex;

View File

@ -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>

View File

@ -630,14 +630,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>'
+ '<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.mixExpectTime + '</small> <br>'
+ '<small> 总金额:' + row.financialMasterMoney + '元 应得金额:' + row.financialDetailMoney + '元</small> <br>'
+ '<p> ' + row.code + '<p/>'
+ '<p> ' + row.consoleGoodsName + '<p/>'
+ '<p> 联系人:' + row.addressName + '</p>'
+ '<p> 联系电话:' + row.addressPhone + '</p>'
+ '<p> 联系地址:' + row.address + '</p>'
+ '<p> 下单时间:' + row.createTime + '</p>'
+ '<p> 预约时间:' + row.mixExpectTime + '</p>'
+ '<p> 总金额:' + row.financialMasterMoney + '元 应得金额:' + row.financialDetailMoney + '元</p>'
+ '</div>'
+ '</div>';
}
@ -656,21 +656,21 @@
},
{
field: 'goodsWorker',
title: '接单师傅',
title: '师傅接单信息',
formatter: function (value, row, index) {
if(value){
return '<small>' + value.name + '</small><br>'
+ '<small>' + value.phone + '</small>';
return '<p>' + value.name + '</p>'
+ '<p>' + value.phone + '</p>';
}
}
},
{
field: 'worker',
title: '做单信息',
title: '师傅做单信息',
formatter: function (value, row, index) {
if(value){
return '<small>' + value.name + value.phone + '</small><br>'
+ '<small>接单时间:' + value.createTime + '</small>';
return '<p>' + value.name + value.phone + '</p>'
+ '<p>接单时间:' + value.createTime + '</p>';
}
}
},

View File

@ -0,0 +1,91 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<th:block th:include="include :: header('订单商品列表')"/>
<th:block th:include="include :: layout-latest-css"/>
</head>
<body class="gray-bg">
<div class="ui-layout-center">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="order-goods-form">
<!-- <input type="hidden" id="orderId" name="orderId" th:value="${orderMaster.id}">-->
</form>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: layout-latest-js"/>
<script th:inline="javascript">
var prefix = ctx + "order/goods";
var orderId = '[[${orderId}]]';
$(function () {
var panehHidden = false;
if ($(this).width() < 769) {
panehHidden = true;
}
$('body').layout({initClosed: panehHidden, west__size: 185});
// 回到顶部绑定
if ($.fn.toTop !== undefined) {
var opt = {
win: $('.ui-layout-center'),
doc: $('.ui-layout-center')
};
$('#scroll-up').toTop(opt);
}
queryOrderGoodsList();
});
function queryOrderGoodsList() {
var options = {
url: prefix + "/list?orderId=" + orderId,
modalName: "订单商品",
search: false,
showSearch: false,
showToggle: false,
showColumns: false,
showRefresh: false,
columns: [
{
field: 'orderGoodsId',
title: '订单商品id',
visible: false
},
{
field: 'orderId',
title: '订单id',
visible: false
},
{
field: 'goodsName',
title: '商品名称'
},
{
field: 'goodsNum',
title: '商品数量'
},
{
field: 'serverGoodsNum',
title: '已服务数量'
}
]
};
$.table.init(options);
}
</script>
</body>
</html>

View File

@ -322,6 +322,9 @@
<a class="btn btn-default" onclick="showPcOrderWorker()">
<i class="fa fa-money"></i> 指派
</a>
<a class="btn btn-default" onclick="batchChangePrice()">
<i class="fa fa-money"></i> 批量改价
</a>
</div>
</div>
@ -640,14 +643,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>'
+ '<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.mixExpectTime + '</small> <br>'
+ '<small> 下单总金额:' + row.financialMasterMoney + '元,师傅实收金额: '+ row.financialMasterPayMoney + ' </small> <br>'
+ '<p>' + row.code + ' + <p/>'
+ '<p> ' + row.consoleGoodsName + '<p/>'
+ '<p> 联系人:' + row.addressName + '</p>'
+ '<p> 联系电话:' + row.addressPhone + '</p>'
+ '<p> 联系地址:' + row.address + '</p>'
+ '<p> 下单时间:' + row.createTime + '</p>'
+ '<p> 预约时间:' + row.mixExpectTime + '</p>'
+ '<p> 下单总金额:' + row.financialMasterMoney + '元,师傅实收金额: '+ row.financialMasterPayMoney + ' </p>'
+ '</div>'
+ '</div>';
}
@ -680,11 +683,11 @@
},
{
field: 'worker',
title: '接单信息',
title: '师傅接单信息',
formatter: function (value, row, index) {
if(value){
return '<small>' + value.name + value.phone + '</small><br>'
+ '<small>接单时间:' + row.createTime + '</small>';
return '<p>' + value.name + value.phone + '</p>'
+ '<p>接单时间:' + row.createTime + '</p>';
}
}
},
@ -828,7 +831,7 @@
}
function detail(id) {
var url = "order/goods?orderId=" + id;
var url = "order/goods/master?orderId=" + id;
$.modal.open("商品信息", url);
}
@ -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() {
table.set();
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);

View File

@ -92,6 +92,10 @@
<label class="form-control-label">人员名称:</label>
<input name="workerName" type="text" class="form-control normal-input m-r">
</div>
<div class="flex-board input-content m-t">
<label class="form-control-label">手机号:</label>
<input name="workerPhone" type="text" class="form-control normal-input m-r">
</div>
<div class="m-t">
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search('workerForm')"><i
class="fa fa-search"></i>&nbsp;搜索</a>
@ -215,7 +219,12 @@
checkbox: true
}, {
field: 'name',
title: '人员名称',
title: '昵称',
align: "left"
},
{
field: 'realName',
title: '真实姓名',
align: "left"
}, {
field: 'phone',

View File

@ -421,16 +421,16 @@
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>'
+ '<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.mixExpectTime + '</small> <br>'
+ '<small> 下单总金额:' + row.financialMasterMoney + '元,师傅实收金额: '+ row.financialMasterPayMoney + ' </small> <br>'
+ '</div>'
+ '</div>';
+ '<p>' + row.code + '<p/>'
+ '<p> ' + row.consoleGoodsName + '<p/> '
+ '<p> 联系人:' + row.addressName + '</p> '
+ '<p> 联系电话:' + row.addressPhone + '</p> '
+ '<p> 联系地址:' + row.address + '</p> '
+ '<p> 下单时间:' + row.createTime + '</p> '
+ '<p> 预约时间:' + row.mixExpectTime + '</p> '
+ '<p> 下单总金额:' + row.financialMasterMoney + '元,师傅实收金额: '+ row.financialMasterPayMoney + ' </p> '
+ '</p>'
+ '</p>';
}
},
{
@ -443,11 +443,11 @@
},
{
field: 'worker',
title: '接单信息',
title: '师傅接单信息',
formatter: function (value, row, index) {
if(value){
return '<small>' + value.name + '</small><br>'
+ '<small>接单时间:' + row.createTime + '</small>';
return '<p>' + value.name + '</p>'
+ '<p>接单时间:' + row.createTime + '</p>';
}
}
},

View File

@ -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;
}

View File

@ -4,6 +4,7 @@ import com.ghy.common.core.domain.AjaxResult;
import com.ghy.order.domain.OrderMaster;
import com.ghy.order.domain.OrderMasterCount;
import com.ghy.order.request.AppOrderRequest;
import com.ghy.order.request.OrderChangePriceReq;
import com.huifu.adapay.core.exception.BaseAdaPayException;
import java.util.Collection;
@ -168,4 +169,10 @@ public interface OrderMasterService {
int reject(OrderMaster orderMaster);
OrderMasterCount differentStatusOrderCount(OrderMaster orderMaster);
/**
* @param changePriceReq 批量改价
*/
AjaxResult batchChangePrice(OrderChangePriceReq changePriceReq);
}

View File

@ -1,11 +1,13 @@
package com.ghy.order.service.impl;
import cn.hutool.core.util.NumberUtil;
import com.alibaba.fastjson.JSONObject;
import com.ghy.common.adapay.model.AdapayStatusEnum;
import com.ghy.common.adapay.model.AdpCode;
import com.ghy.common.adapay.model.DivMember;
import com.ghy.common.adapay.model.PaymentDTO;
import com.ghy.common.constant.UserConstants;
import com.ghy.common.core.domain.AjaxResult;
import com.ghy.common.core.text.Convert;
import com.ghy.common.enums.AdapayOrderType;
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.mapper.OrderMasterMapper;
import com.ghy.order.request.AppOrderRequest;
import com.ghy.order.request.OrderChangePriceReq;
import com.ghy.order.service.OrderDetailService;
import com.ghy.order.service.OrderGoodsService;
import com.ghy.order.service.OrderMasterService;
@ -575,4 +578,30 @@ public class OrderMasterServiceImpl implements OrderMasterService {
public OrderMasterCount differentStatusOrderCount(OrderMaster 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();
}
}

View File

@ -102,6 +102,14 @@
<select id="selectOrderDetailList" parameterType="com.ghy.order.domain.OrderDetail" resultMap="OrderDetailResult">
<include refid="selectOrderDetailMoreInfo"/>
<where>
<if test="keyWords != null and keyWords != ''">
AND
(
om.code LIKE concat('%', #{keyWords}, '%')
or ca.name LIKE concat('%', #{keyWords}, '%')
or ca.phone LIKE concat('%', #{keyWords}, '%')
)
</if>
<if test="deptId != null and deptId != ''">
AND w.dept_id = #{deptId}
</if>
@ -192,9 +200,9 @@
#{drawCashStatus}
</foreach>
</if>
<if test="workFinishTimeExisted">
AND od.work_finish_time is not null
</if>
<!-- <if test="workFinishTimeExisted">-->
<!-- AND od.work_finish_time is not null-->
<!-- </if>-->
<if test="timeout != null">
AND od.timeout_ = #{timeout}
</if>
@ -260,9 +268,9 @@
<if test="shelveStatus != null">
AND od.shelve_status = ${shelveStatus}
</if>
<if test="workFinishTimeExisted">
AND od.work_finish_time is not null
</if>
<!-- <if test="workFinishTimeExisted">-->
<!-- AND od.work_finish_time is not null-->
<!-- </if>-->
<if test="drawCashStatusList != null and drawCashStatusList.size() > 0">
AND od.draw_cash_status in
<foreach collection="drawCashStatusList" item="drawCashStatus" open="(" separator="," close=")">

View File

@ -49,4 +49,6 @@ public class PaymentRelation {
public static final String FINANCIAL_CHANGE = "financial_change";
public static final String ORDER_ATTACHMENT = "order_attachment";
public static final String ORDER_ADD = "order_add";
/** 合约订单加价 */
public static final String CONSULT_ADD = "consult_add";
}

View File

@ -76,11 +76,11 @@ public class OrderServiceImpl implements OrderService {
}
// 查询符合超时的子单
// List<OrderDetail> orders = orderDetailService.selectByStatus(timeoutOrderStatus);
// log.info("扫描到{}条未完成的子订单", orders.size());
// for (OrderDetail order : orders) {
// executor.execute(() -> checkTimeout(order));
// }
List<OrderDetail> orders = orderDetailService.selectByStatus(timeoutOrderStatus);
log.info("扫描到{}条未完成的子订单", orders.size());
for (OrderDetail order : orders) {
executor.execute(() -> checkTimeout(order));
}
}
@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());
record.setPayMoney(getFineMoney(order));
record.setFineStatus(0);
orderFineRecordMapper.insert(record);
// orderFineRecordMapper.insert(record);
orderDetailService.updateTimeout(order.getId(), 1, 1);
}
} 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());
record.setPayMoney(getFineMoney(order));
record.setFineStatus(0);
orderFineRecordMapper.insert(record);
// orderFineRecordMapper.insert(record);
orderDetailService.updateTimeout(order.getId(), 1, 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());
record.setPayMoney(getFineMoney(order));
record.setFineStatus(0);
orderFineRecordMapper.insert(record);
// orderFineRecordMapper.insert(record);
orderDetailService.updateTimeout(order.getId(), 1, 2);
}
}

View File

@ -93,4 +93,6 @@ public class Worker extends BaseEntity {
private Long exceptParentAreaId;
private String keyWords;
private String realName;
}

View File

@ -49,7 +49,16 @@
</sql>
<select id="getWorkerList" parameterType="com.ghy.worker.domain.Worker" resultMap="WorkerResult">
<include refid="selectWorker" /> where w.worker_id in (
SELECT
w.worker_id, w.name, w.account, w.phone, w.password, w.open_id, w.wx_open_id, w.dept_id, w.status, w.worker_logo_url,
w.leader_team_rate, w.leader_team_money, w.create_by, w.create_time, w.update_by, w.update_time,
w.remark, w.type, w.store_status, w.alipay_account, w.alipay_name,concat(wc.surname, wc.name) as realName,
sd.dept_name, sdc.banner_url
FROM worker w
LEFT JOIN sys_dept sd ON w.dept_id = sd.dept_id
LEFT JOIN sys_dept_config sdc ON w.dept_id = sdc.dept_id
LEFT JOIN worker_certification wc on w.worker_id = wc.worker_id
where w.worker_id in (
SELECT w.worker_id FROM worker w
LEFT JOIN worker_area wa ON wa.worker_id = w.worker_id
LEFT JOIN worker_goods_category wgc ON wgc.worker_id = w.worker_id