Merge branch 'old-version'
This commit is contained in:
commit
062164f90d
|
|
@ -354,6 +354,7 @@ public class OrderMasterController extends BaseController {
|
|||
|
||||
// 编辑返回属性
|
||||
orderListResponse.setOrderMasterId(master.getId());
|
||||
orderListResponse.setGoods(goods);
|
||||
orderListResponse.setGoodsName(goods.getGoodsName());
|
||||
orderListResponse.setGoodsLogoUrl(goods.getGoodsImgUrl());
|
||||
orderListResponse.setDiscountMoney(financialMaster.getDiscountMoney());
|
||||
|
|
@ -624,6 +625,10 @@ public class OrderMasterController extends BaseController {
|
|||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(OrderMaster orderMaster) {
|
||||
if (orderMaster.getSearchAfterList() !=null && orderMaster.getSearchAfterList()) {
|
||||
return this.afterList(orderMaster);
|
||||
}
|
||||
|
||||
startPage();
|
||||
if (this.getSysUser().getDept().getParentId() != 101) {
|
||||
orderMaster.setDeptId(this.getSysUser().getDept().getParentId());
|
||||
|
|
@ -897,8 +902,8 @@ public class OrderMasterController extends BaseController {
|
|||
|
||||
@GetMapping("/differentStatus/count")
|
||||
@ResponseBody
|
||||
public AjaxResult differentStatusOrderCount() {
|
||||
return AjaxResult.success(orderMasterService.differentStatusOrderCount());
|
||||
public AjaxResult differentStatusOrderCount(OrderMaster orderMaster) {
|
||||
return AjaxResult.success(orderMasterService.differentStatusOrderCount(orderMaster));
|
||||
}
|
||||
|
||||
@GetMapping("/count")
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public class SysDeptController extends BaseController
|
|||
return prefix + "/dept";
|
||||
}
|
||||
|
||||
@RequiresPermissions("system:dept:list")
|
||||
// @RequiresPermissions("system:dept:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public List<SysDept> list(SysDept dept)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.ghy.web.controller.system;
|
||||
|
||||
import com.ghy.common.core.domain.dto.SysUserAddDTO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
|
@ -12,6 +13,8 @@ import com.ghy.common.utils.StringUtils;
|
|||
import com.ghy.framework.shiro.service.SysRegisterService;
|
||||
import com.ghy.system.service.ISysConfigService;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 注册验证
|
||||
*
|
||||
|
|
@ -34,13 +37,13 @@ public class SysRegisterController extends BaseController
|
|||
|
||||
@PostMapping("/register")
|
||||
@ResponseBody
|
||||
public AjaxResult ajaxRegister(SysUser user)
|
||||
public AjaxResult ajaxRegister(@Valid SysUserAddDTO userAddDTO)
|
||||
{
|
||||
if (!("true".equals(configService.selectConfigByKey("sys.account.registerUser"))))
|
||||
{
|
||||
return error("当前系统没有开启注册功能!");
|
||||
}
|
||||
String msg = registerService.register(user);
|
||||
String msg = registerService.register(userAddDTO);
|
||||
return StringUtils.isEmpty(msg) ? success() : error(msg);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,41 @@ $(function() {
|
|||
var url = ctx + "captcha/captchaImage?type=" + captchaType + "&s=" + Math.random();
|
||||
$(".imgcode").attr("src", url);
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
dataType:"json",
|
||||
url: ctx + "system/dept/list",
|
||||
data: { parentId: 100 },
|
||||
success: function (data) {
|
||||
$.each(data, function (index, value) {
|
||||
$('#deptId').append("<option value=" + value.deptId + ">" + value.deptName + "</option>");
|
||||
});
|
||||
}
|
||||
})
|
||||
// $('#deptId').select2({
|
||||
// placeholder: '请选择公司编码',
|
||||
// minimumResultsForSearch: -1,
|
||||
// ajax: {
|
||||
// type: "POST",
|
||||
// dataType:"json",
|
||||
// url: ctx + "system/dept/list",
|
||||
// data: { parentId: 100 },
|
||||
// processResults: function (data) {
|
||||
// var processedData = [];
|
||||
// $.each(data, function (index, value) {
|
||||
// processedData.push({
|
||||
// id: value.deptId,
|
||||
// text: value.deptName
|
||||
// })
|
||||
// });
|
||||
// return {
|
||||
// results: processedData
|
||||
// };
|
||||
// },
|
||||
// cache: true
|
||||
// }
|
||||
// });
|
||||
});
|
||||
|
||||
$.validator.setDefaults({
|
||||
|
|
@ -16,6 +51,8 @@ $.validator.setDefaults({
|
|||
function register() {
|
||||
$.modal.loading($("#btnSubmit").data("loading"));
|
||||
var username = $.common.trim($("input[name='username']").val());
|
||||
var phonenumber = $.common.trim($("input[name='phonenumber']").val());
|
||||
var deptId = $.common.trim($('#deptId').val());
|
||||
var password = $.common.trim($("input[name='password']").val());
|
||||
var validateCode = $("input[name='validateCode']").val();
|
||||
$.ajax({
|
||||
|
|
@ -23,6 +60,8 @@ function register() {
|
|||
url: ctx + "register",
|
||||
data: {
|
||||
"loginName": username,
|
||||
"phonenumber": phonenumber,
|
||||
"deptId": deptId,
|
||||
"password": password,
|
||||
"validateCode": validateCode
|
||||
},
|
||||
|
|
@ -49,15 +88,23 @@ function register() {
|
|||
|
||||
function validateRule() {
|
||||
var icon = "<i class='fa fa-times-circle'></i> ";
|
||||
$.validator.addMethod("checkPhone",function(value,element,params){
|
||||
var regex = /^1[345678]\d{9}$/;
|
||||
return regex.test(value);
|
||||
}, "请输入正确的手机号码");
|
||||
$("#registerForm").validate({
|
||||
rules: {
|
||||
username: {
|
||||
required: true,
|
||||
minlength: 2
|
||||
rangelength: [2,20]
|
||||
},
|
||||
phonenumber: {
|
||||
required: true,
|
||||
checkPhone: true
|
||||
},
|
||||
password: {
|
||||
required: true,
|
||||
minlength: 5
|
||||
rangelength: [5,20]
|
||||
},
|
||||
confirmPassword: {
|
||||
required: true,
|
||||
|
|
@ -66,15 +113,18 @@ function validateRule() {
|
|||
},
|
||||
messages: {
|
||||
username: {
|
||||
required: icon + "请输入您的用户名",
|
||||
minlength: icon + "用户名不能小于2个字符"
|
||||
required: icon + "请输入用户名",
|
||||
rangelength: icon + "账户长度必须在2到20个字符之间"
|
||||
},
|
||||
phonenumber: {
|
||||
required: icon + "请输入手机号码"
|
||||
},
|
||||
password: {
|
||||
required: icon + "请输入您的密码",
|
||||
minlength: icon + "密码不能小于5个字符",
|
||||
required: icon + "请输入密码",
|
||||
rangelength: icon + "密码长度必须在5到20个字符之间"
|
||||
},
|
||||
confirmPassword: {
|
||||
required: icon + "请再次输入您的密码",
|
||||
required: icon + "请再次输入密码",
|
||||
equalTo: icon + "两次密码输入不一致"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@
|
|||
</a>
|
||||
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {timeout: 1, orderStatus: 0})">
|
||||
接单超时
|
||||
(<span id="newOrderTimeoutNum">0</span>)
|
||||
(<span id="newTimeoutOrderNum">0</span>)
|
||||
</a>
|
||||
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {timeout: 1, orderStatus: 1})">
|
||||
约单超时
|
||||
|
|
@ -284,7 +284,7 @@
|
|||
客诉中
|
||||
(<span>0</span>)
|
||||
</a>
|
||||
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {timeout: 1, orderStatus: 4})">
|
||||
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 4})">
|
||||
审核中
|
||||
(<span class="confirmingOrderNum">0</span>)
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -80,16 +80,18 @@
|
|||
已发布
|
||||
(<span id="publishedOrderNum">0</span>)
|
||||
</a>
|
||||
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 1})">
|
||||
已接单
|
||||
(<span id="acceptedOrderNum">0</span>)
|
||||
<!-- <a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 1})">-->
|
||||
<!-- 已接单-->
|
||||
<!-- (<span id="acceptedOrderNum">0</span>)-->
|
||||
<!-- </a>-->
|
||||
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 1, isCall: '01'})">
|
||||
未约时
|
||||
(<span id="notAppointedOrderNum">0</span>)
|
||||
</a>
|
||||
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 1, isCall: '02'})">
|
||||
未排班
|
||||
(<span id="notArrangedOrderNum">0</span>)
|
||||
</a>
|
||||
<!-- <a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 1, isCall: '01'})">-->
|
||||
<!-- 未约时-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 1, isCall: '02'})">-->
|
||||
<!-- 未排班-->
|
||||
<!-- </a>-->
|
||||
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 2})">
|
||||
待上门
|
||||
(<span id="waitForDoorOrderNum">0</span>)
|
||||
|
|
@ -100,7 +102,7 @@
|
|||
</a>
|
||||
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 4})">
|
||||
确认审核
|
||||
(<span id="confirmingOrderNum">0</span>)
|
||||
(<span class="confirmingOrderNum">0</span>)
|
||||
</a>
|
||||
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 5})">
|
||||
完成
|
||||
|
|
@ -118,14 +120,22 @@
|
|||
明日待上门
|
||||
(<span id="tomorrowOrderNum">0</span>)
|
||||
</a>
|
||||
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: -1})">
|
||||
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {searchAfterList: true})">
|
||||
售后
|
||||
(<span>0</span>)
|
||||
(<span id="afterServiceOrderNum">0</span>)
|
||||
</a>
|
||||
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: -1})">
|
||||
急报中
|
||||
(<span>0</span>)
|
||||
</a>
|
||||
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: -1})">
|
||||
退单
|
||||
(<span>0</span>)
|
||||
</a>
|
||||
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: -1})">
|
||||
售后纠纷
|
||||
(<span>0</span>)
|
||||
</a>
|
||||
</div>
|
||||
<div class="flex-board">
|
||||
<div class="flex-board m-t">
|
||||
|
|
@ -137,6 +147,42 @@
|
|||
<select class="street form-control cx-select-input m-r" name="streetId" id="streetId" data-first-title="选择街道" ></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-board m-t">
|
||||
创建时间:
|
||||
<div class="input-group date">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
<input id="createTimeStart" type="text" class="form-control date-input" placeholder="开始日期" readonly>
|
||||
</div>
|
||||
至
|
||||
<div class="input-group date m-r">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
<input id="createTimeEnd" type="text" class="form-control date-input" placeholder="结束日期" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="flex-board m-t">-->
|
||||
<!-- 服务时间:-->
|
||||
<!-- <div class="input-group date">-->
|
||||
<!-- <span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
|
||||
<!-- <input id="workBeginTimeStart" type="text" class="form-control date-input" placeholder="开始日期" readonly>-->
|
||||
<!-- </div>-->
|
||||
<!-- 至-->
|
||||
<!-- <div class="input-group date m-r">-->
|
||||
<!-- <span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
|
||||
<!-- <input id="workBeginTimeEnd" type="text" class="form-control date-input" placeholder="结束日期" readonly>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="flex-board m-t">-->
|
||||
<!-- 完成时间:-->
|
||||
<!-- <div class="input-group date">-->
|
||||
<!-- <span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
|
||||
<!-- <input id="workFinishTimeStart" type="text" class="form-control date-input" placeholder="开始日期" readonly>-->
|
||||
<!-- </div>-->
|
||||
<!-- 至-->
|
||||
<!-- <div class="input-group date m-r">-->
|
||||
<!-- <span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
|
||||
<!-- <input id="workFinishTimeEnd" type="text" class="form-control date-input" placeholder="结束日期" readonly>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="flex-board m-t">
|
||||
类别筛选:
|
||||
<div id="categoryCxSelect" class="flex-board-no-wrap">
|
||||
|
|
@ -146,17 +192,118 @@
|
|||
<select class="category4 form-control cx-select-input m-r" name="category4" id="category4" data-first-title="选择四类" ></select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="flex-board-no-wrap m-t">-->
|
||||
<!-- <label class="form-control-label">后台人员:</label>-->
|
||||
<!-- <input type="text" class="form-control normal-input m-r">-->
|
||||
<!-- </div>-->
|
||||
<div class="flex-board-no-wrap m-t">
|
||||
<label class="form-control-label">商家名称:</label>
|
||||
<input id="storeName" type="text" class="form-control normal-input m-r">
|
||||
</div>
|
||||
<div class="flex-board-no-wrap m-t">
|
||||
<label class="form-control-label">商家电话:</label>
|
||||
<input id="storePhone" type="text" class="form-control normal-input m-r">
|
||||
</div>
|
||||
<div class="flex-board-no-wrap m-t">
|
||||
<label class="form-control-label">接单师傅名称:</label>
|
||||
<input id="workerName" type="text" class="form-control normal-input m-r">
|
||||
</div>
|
||||
<div class="flex-board-no-wrap m-t">
|
||||
<label class="form-control-label">接单师傅电话:</label>
|
||||
<input id="workerPhone" type="text" class="form-control normal-input m-r">
|
||||
</div>
|
||||
<!-- <div class="flex-board-no-wrap m-t">-->
|
||||
<!-- <label class="form-control-label">师傅类型:</label>-->
|
||||
<!-- <select class="form-control normal-select-input m-r">-->
|
||||
<!-- <option value="">全部</option>-->
|
||||
<!-- <option value="">大师傅</option>-->
|
||||
<!-- <option value="">小师傅</option>-->
|
||||
<!-- </select>-->
|
||||
<!-- <input type="text" class="form-control normal-input m-r" placeholder="师傅姓名电话">-->
|
||||
<!-- </div>-->
|
||||
<div class="flex-board-no-wrap m-t">
|
||||
<label class="form-control-label">订单模式:</label>
|
||||
<select id="orderMode" class="form-control normal-select-input m-r" onchange="changeOrderMode(this.options[this.options.selectedIndex].value)">
|
||||
<option value="0">全部</option>
|
||||
<option value="B2B">B2B</option>
|
||||
<option value="B2C">B2C</option>
|
||||
</select>
|
||||
<select id="B2BOptions" class="form-control normal-select-input m-r">
|
||||
<option value="">全部</option>
|
||||
<option value="">常规单</option>
|
||||
<option value="">赠送单</option>
|
||||
<option value="">合规单</option>
|
||||
</select>
|
||||
<select id="B2COptions" class="form-control normal-select-input m-r">
|
||||
<option value="">全部</option>
|
||||
<option value="">商品配件类目</option>
|
||||
<option value="">服务类目</option>
|
||||
<option value="">社区类目</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="flex-board-no-wrap m-t">
|
||||
<label class="form-control-label">订单标签:</label>
|
||||
<select class="form-control normal-select-input m-r">
|
||||
<option value="">全部</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="flex-board-no-wrap m-t">
|
||||
<label class="form-control-label">订单查询:</label>
|
||||
<input type="text" class="form-control long-input m-r" placeholder="请输入订单号、姓名、电话或地址、品牌、规格">
|
||||
<input id="keyWords" type="text" class="form-control long-input m-r" placeholder="请输入订单号、姓名、电话或地址、品牌、规格">
|
||||
</div>
|
||||
<div class="m-t">
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="searchByForm()"><i
|
||||
class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="resetForm()"><i
|
||||
class="fa fa-refresh"></i> 重置</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="m-t condition-btn">
|
||||
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 0})">
|
||||
新订单
|
||||
(<span id="newOrderNum">0</span>)
|
||||
</a>
|
||||
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {timeout: 1, orderStatus: 0})">
|
||||
接单超时
|
||||
(<span id="newTimeoutOrderNum">0</span>)
|
||||
</a>
|
||||
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {timeout: 1, orderStatus: 1, isCall: '01'})">
|
||||
约单超时
|
||||
(<span id="notAppointedTimeoutOrderNum">0</span>)
|
||||
</a>
|
||||
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {timeout: 1, orderStatus: 1, isCall: '02'})">
|
||||
排单超时
|
||||
(<span id="notArrangedTimeoutOrderNum">0</span>)
|
||||
</a>
|
||||
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: -1})">
|
||||
无法排单
|
||||
(<span>0</span>)
|
||||
</a>
|
||||
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {timeout: 1, orderStatus: 2})">
|
||||
待上门超时
|
||||
(<span id="waitForDoorTimeoutOrderNum">0</span>)
|
||||
</a>
|
||||
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {timeout: 1, orderStatus: 3})">
|
||||
进行超时
|
||||
(<span id="servingTimeoutOrderNum">0</span>)
|
||||
</a>
|
||||
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: -1})">
|
||||
售后超时
|
||||
(<span>0</span>)
|
||||
</a>
|
||||
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: -1})">
|
||||
客诉中
|
||||
(<span>0</span>)
|
||||
</a>
|
||||
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 4})">
|
||||
审核中
|
||||
(<span class="confirmingOrderNum">0</span>)
|
||||
</a>
|
||||
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: -1})">
|
||||
一票价未改价
|
||||
(<span>0</span>)
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
@ -265,9 +412,11 @@
|
|||
url: prefix + '/differentStatus/count',
|
||||
success: function (result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
$('#acceptedOrderNum').text(result.data.acceptedOrderNum);
|
||||
$('#newOrderNum').text(result.data.newOrderNum);
|
||||
$('#notAppointedOrderNum').text(result.data.notAppointedOrderNum);
|
||||
$('#notArrangedOrderNum').text(result.data.notArrangedOrderNum);
|
||||
$('#canceledOrderNum').text(result.data.canceledOrderNum);
|
||||
$('#confirmingOrderNum').text(result.data.confirmingOrderNum);
|
||||
$('.confirmingOrderNum').text(result.data.confirmingOrderNum);
|
||||
$('#finishedOrderNum').text(result.data.finishedOrderNum);
|
||||
$('#servingOrderNum').text(result.data.servingOrderNum);
|
||||
$('#waitForDoorOrderNum').text(result.data.waitForDoorOrderNum);
|
||||
|
|
@ -277,6 +426,25 @@
|
|||
}
|
||||
})
|
||||
|
||||
<!-- 不同状态超时订单数量统计-->
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
dataType:"json",
|
||||
url: prefix + '/differentStatus/count',
|
||||
data: {timeout: 1},
|
||||
success: function (result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
$('#newTimeoutOrderNum').text(result.data.newOrderNum);
|
||||
$('#notAppointedTimeoutOrderNum').text(result.data.notAppointedOrderNum);
|
||||
$('#notArrangedTimeoutOrderNum').text(result.data.notArrangedOrderNum);
|
||||
$('#servingTimeoutOrderNum').text(result.data.servingOrderNum);
|
||||
$('#waitForDoorTimeoutOrderNum').text(result.data.waitForDoorOrderNum);
|
||||
} else {
|
||||
$.modal.msgError("数据加载错误,请重试!")
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
<!-- 待付款订单数量统计-->
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
|
|
@ -343,6 +511,22 @@
|
|||
}
|
||||
}
|
||||
})
|
||||
|
||||
<!-- 售后订单数量统计-->
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
dataType:"json",
|
||||
url: prefix + '/after/count',
|
||||
contentType: 'application/json',
|
||||
data: JSON.stringify({}),
|
||||
success: function (result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
$('#afterServiceOrderNum').text(result.data);
|
||||
} else {
|
||||
$.modal.msgError("数据加载错误,请重试!")
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
function changeOrderMode(orderMode) {
|
||||
|
|
@ -596,6 +780,25 @@
|
|||
$.table.search();
|
||||
}
|
||||
|
||||
function searchByForm() {
|
||||
let params = {
|
||||
createTimeStart: $('#createTimeStart').val() ? $('#createTimeStart').val() + " 00:00:00" : undefined,
|
||||
createTimeEnd: $('#createTimeEnd').val() ? $('#createTimeEnd').val() + " 23:59:59" : undefined,
|
||||
<!-- workBeginTimeStart: $('#workBeginTimeStart').val(),-->
|
||||
<!-- workBeginTimeEnd: $('#workBeginTimeEnd').val() ? $('#workBeginTimeEnd').val() + " 23:59:59" : undefined,-->
|
||||
<!-- workFinishTimeStart: $('#workFinishTimeStart').val(),-->
|
||||
<!-- workFinishTimeEnd: $('#workFinishTimeEnd').val() ? $('#workFinishTimeEnd').val() + " 23:59:59" : undefined,-->
|
||||
storeName: $('#storeName').val(),
|
||||
storePhone: $('#storePhone').val(),
|
||||
workerName: $('#workerName').val(),
|
||||
workerPhone: $('#workerPhone').val(),
|
||||
keyWords: $('#keyWords').val()
|
||||
}
|
||||
|
||||
customParams = Object.assign(customParams, params);
|
||||
$.table.search();
|
||||
}
|
||||
|
||||
function resetForm() {
|
||||
$.form.reset();
|
||||
customParams = {};
|
||||
|
|
|
|||
|
|
@ -15,25 +15,22 @@
|
|||
<!-- 避免IE使用兼容模式 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link rel="shortcut icon" href="../static/favicon.ico" th:href="@{favicon.ico}"/>
|
||||
<style type="text/css">label.error { position:inherit; }</style>
|
||||
<style type="text/css">
|
||||
label.error { position:inherit; }
|
||||
#registerForm input,
|
||||
#registerForm select {
|
||||
color: black
|
||||
}
|
||||
</style>
|
||||
<th:block th:include="include :: select2-css" />
|
||||
</head>
|
||||
<body class="signin">
|
||||
<div class="signinpanel">
|
||||
<div class="row">
|
||||
<div class="col-sm-7">
|
||||
<div class="signin-info">
|
||||
<div class="logopanel m-b">
|
||||
<h1><img alt="[ 工圈子 ]" src="../static/ruoyi.png" th:src="@{/ruoyi.png}"></h1>
|
||||
</div>
|
||||
<div class="m-b"></div>
|
||||
<h4>欢迎使用 <strong>工圈子 后台管理系统</strong></h4>
|
||||
<ul class="m-b">
|
||||
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> SpringBoot</li>
|
||||
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> Mybatis</li>
|
||||
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> Shiro</li>
|
||||
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> Thymeleaf</li>
|
||||
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> Bootstrap</li>
|
||||
</ul>
|
||||
<strong>已经注册过? <a th:href="@{/login}">直接登录»</a></strong>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -41,9 +38,13 @@
|
|||
<form id="registerForm" autocomplete="off">
|
||||
<h4 class="no-margins">注册:</h4>
|
||||
<p class="m-t-md">你若不离不弃,我必生死相依</p>
|
||||
<input type="text" name="username" class="form-control uname" placeholder="用户名" maxlength="20" />
|
||||
<input type="password" name="password" class="form-control pword" placeholder="密码" maxlength="20" />
|
||||
<input type="password" name="confirmPassword" class="form-control pword" placeholder="确认密码" maxlength="20" />
|
||||
<input type="text" name="username" class="form-control username" placeholder="用户名"/>
|
||||
<input type="text" name="phonenumber" class="form-control phonenumber" placeholder="手机号"/>
|
||||
<select id="deptId" class="form-control" name="deptId">
|
||||
<option value="" selected>请选择公司编码</option>
|
||||
</select>
|
||||
<input type="password" name="password" class="form-control pword" placeholder="密码"/>
|
||||
<input type="password" name="confirmPassword" class="form-control pword" placeholder="确认密码"/>
|
||||
<div class="row m-t" th:if="${captchaEnabled==true}">
|
||||
<div class="col-xs-6">
|
||||
<input type="text" name="validateCode" class="form-control code" placeholder="验证码" maxlength="5" >
|
||||
|
|
@ -54,17 +55,18 @@
|
|||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="checkbox-custom" th:classappend="${captchaEnabled==false} ? 'm-t'">
|
||||
<input type="checkbox" id="acceptTerm" name="acceptTerm"> <label for="acceptTerm">我已阅读并同意</label>
|
||||
<a href="https://gitee.com/y_project/RuoYi/blob/master/README.md" target="_blank">使用条款</a>
|
||||
</div>
|
||||
<!-- <div class="checkbox-custom" th:classappend="${captchaEnabled==false} ? 'm-t'">-->
|
||||
<!-- <input type="checkbox" id="acceptTerm" name="acceptTerm"> <label for="acceptTerm">我已阅读并同意</label>-->
|
||||
<!-- <a href="https://gitee.com/y_project/RuoYi/blob/master/README.md" target="_blank">使用条款</a>-->
|
||||
<!-- </div>-->
|
||||
<button class="btn btn-success btn-block" id="btnSubmit" data-loading="正在验证注册,请稍候...">注册</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="signup-footer">
|
||||
<div class="pull-left">
|
||||
© 2018-2021 All Rights Reserved. RuoYi <br>
|
||||
Copyright © 2018-2021 opsoul.com All Rights Reserved. <br>
|
||||
备案号 粤ICP备2021044349号-1
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -76,5 +78,6 @@
|
|||
<script src="../static/ajax/libs/blockUI/jquery.blockUI.js" th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.7.2}"></script>
|
||||
<script src="../static/ruoyi/register.js" th:src="@{/ruoyi/register.js}"></script>
|
||||
<th:block th:include="include :: select2-js" />
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
package com.ghy.common.core.domain.dto;
|
||||
|
||||
import com.ghy.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
/**
|
||||
* @description:
|
||||
* @author: yangdanqi
|
||||
* @date: 2023/7/1
|
||||
*/
|
||||
@Data
|
||||
public class SysUserAddDTO extends BaseEntity {
|
||||
@NotNull(message = "公司编码不能为空")
|
||||
private Long deptId;
|
||||
|
||||
@NotBlank(message = "账号不能为空")
|
||||
@Length(min = 2, max = 20, message = "账户长度必须在2到20个字符之间")
|
||||
private String loginName;
|
||||
|
||||
@NotBlank(message = "手机号码不能为空")
|
||||
@Pattern(regexp = "^1[345678]\\d{9}$", message = "手机号码格式不正确")
|
||||
private String phonenumber;
|
||||
|
||||
@NotBlank(message = "密码不能为空")
|
||||
@Length(min = 5, max = 20, message = "密码长度必须在5到20个字符之间")
|
||||
private String password;
|
||||
}
|
||||
|
|
@ -287,6 +287,7 @@ public class ShiroConfig
|
|||
filterChainDefinitionMap.put("/tool/**", "anon");
|
||||
filterChainDefinitionMap.put("/adapay/**", "anon");
|
||||
filterChainDefinitionMap.put("/system/area/**", "anon");
|
||||
filterChainDefinitionMap.put("/system/dept/list", "anon");
|
||||
filterChainDefinitionMap.put("/customer/address/**", "anon");
|
||||
filterChainDefinitionMap.put("/customer/place/app/**", "anon");
|
||||
filterChainDefinitionMap.put("/customer/selection/app/**", "anon");
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
package com.ghy.framework.shiro.service;
|
||||
|
||||
import com.ghy.common.core.domain.dto.SysUserAddDTO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import com.ghy.common.constant.Constants;
|
||||
|
|
@ -10,10 +12,10 @@ import com.ghy.common.utils.DateUtils;
|
|||
import com.ghy.common.utils.MessageUtils;
|
||||
import com.ghy.common.utils.ServletUtils;
|
||||
import com.ghy.common.utils.ShiroUtils;
|
||||
import com.ghy.common.utils.StringUtils;
|
||||
import com.ghy.framework.manager.AsyncManager;
|
||||
import com.ghy.framework.manager.factory.AsyncFactory;
|
||||
import com.ghy.system.service.ISysUserService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 注册校验方法
|
||||
|
|
@ -32,50 +34,30 @@ public class SysRegisterService
|
|||
/**
|
||||
* 注册
|
||||
*/
|
||||
public String register(SysUser user)
|
||||
{
|
||||
String msg = "", loginName = user.getLoginName(), password = user.getPassword();
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String register(SysUserAddDTO userAddDTO) {
|
||||
String msg = "";
|
||||
SysUser sysUser = new SysUser();
|
||||
BeanUtils.copyProperties(userAddDTO, sysUser);
|
||||
|
||||
if (ShiroConstants.CAPTCHA_ERROR.equals(ServletUtils.getRequest().getAttribute(ShiroConstants.CURRENT_CAPTCHA)))
|
||||
{
|
||||
if (ShiroConstants.CAPTCHA_ERROR.equals(ServletUtils.getRequest().getAttribute(ShiroConstants.CURRENT_CAPTCHA))) {
|
||||
msg = "验证码错误";
|
||||
}
|
||||
else if (StringUtils.isEmpty(loginName))
|
||||
{
|
||||
msg = "用户名不能为空";
|
||||
}
|
||||
else if (StringUtils.isEmpty(password))
|
||||
{
|
||||
msg = "用户密码不能为空";
|
||||
}
|
||||
else if (password.length() < UserConstants.PASSWORD_MIN_LENGTH
|
||||
|| password.length() > UserConstants.PASSWORD_MAX_LENGTH)
|
||||
{
|
||||
msg = "密码长度必须在5到20个字符之间";
|
||||
}
|
||||
else if (loginName.length() < UserConstants.USERNAME_MIN_LENGTH
|
||||
|| loginName.length() > UserConstants.USERNAME_MAX_LENGTH)
|
||||
{
|
||||
msg = "账户长度必须在2到20个字符之间";
|
||||
}
|
||||
else if (UserConstants.USER_NAME_NOT_UNIQUE.equals(userService.checkLoginNameUnique(loginName)))
|
||||
{
|
||||
msg = "保存用户'" + loginName + "'失败,注册账号已存在";
|
||||
}
|
||||
else
|
||||
{
|
||||
user.setPwdUpdateDate(DateUtils.getNowDate());
|
||||
user.setUserName(loginName);
|
||||
user.setSalt(ShiroUtils.randomSalt());
|
||||
user.setPassword(passwordService.encryptPassword(user.getLoginName(), user.getPassword(), user.getSalt()));
|
||||
boolean regFlag = userService.registerUser(user);
|
||||
if (!regFlag)
|
||||
{
|
||||
} else if (UserConstants.USER_NAME_NOT_UNIQUE.equals(userService.checkLoginNameUnique(sysUser.getLoginName()))) {
|
||||
msg = "保存用户'" + userAddDTO.getLoginName() + "'失败,注册账号已存在";
|
||||
} else if (UserConstants.USER_NAME_NOT_UNIQUE.equals(userService.checkPhoneUnique(sysUser))) {
|
||||
msg = "保存手机号码'" + userAddDTO.getPhonenumber() + "'失败,该手机号码已被注册";
|
||||
} else {
|
||||
sysUser.setPwdUpdateDate(DateUtils.getNowDate());
|
||||
sysUser.setUserName(userAddDTO.getLoginName());
|
||||
sysUser.setSalt(ShiroUtils.randomSalt());
|
||||
sysUser.setPassword(passwordService.encryptPassword(sysUser.getLoginName(), sysUser.getPassword(), sysUser.getSalt()));
|
||||
boolean regFlag = userService.registerUser(sysUser);
|
||||
SysUser registeredUserInfo = userService.selectUserByLoginName(sysUser.getLoginName());
|
||||
userService.insertUserAuth(registeredUserInfo.getUserId(), new Long[]{101l});
|
||||
if (!regFlag) {
|
||||
msg = "注册失败,请联系系统管理人员";
|
||||
}
|
||||
else
|
||||
{
|
||||
AsyncManager.me().execute(AsyncFactory.recordLogininfor(loginName, Constants.REGISTER, MessageUtils.message("user.register.success")));
|
||||
} else {
|
||||
AsyncManager.me().execute(AsyncFactory.recordLogininfor(userAddDTO.getLoginName(), Constants.REGISTER, MessageUtils.message("user.register.success")));
|
||||
}
|
||||
}
|
||||
return msg;
|
||||
|
|
|
|||
|
|
@ -11,8 +11,10 @@ import com.ghy.payment.domain.FinancialMaster;
|
|||
import com.ghy.worker.domain.Worker;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -150,4 +152,12 @@ public class OrderMaster extends BaseEntity {
|
|||
private String isCall;
|
||||
|
||||
private BigDecimal serverMoney;
|
||||
|
||||
private Boolean searchAfterList;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTimeStart;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTimeEnd;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,4 +9,7 @@ import lombok.Data;
|
|||
*/
|
||||
@Data
|
||||
public class OrderMasterCount extends OrderCount {
|
||||
private Integer notAppointedOrderNum;
|
||||
|
||||
private Integer notArrangedOrderNum;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -109,5 +109,5 @@ public interface OrderMasterMapper {
|
|||
*/
|
||||
int removeWorker(Long id);
|
||||
|
||||
OrderMasterCount differentStatusOrderCount();
|
||||
OrderMasterCount differentStatusOrderCount(OrderMaster orderMaster);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -167,5 +167,5 @@ public interface OrderMasterService {
|
|||
|
||||
int reject(OrderMaster orderMaster);
|
||||
|
||||
OrderMasterCount differentStatusOrderCount();
|
||||
OrderMasterCount differentStatusOrderCount(OrderMaster orderMaster);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,12 +113,20 @@ public class OrderDetailServiceImpl implements OrderDetailService {
|
|||
@Transactional(rollbackFor = Exception.class)
|
||||
public int updateOrderDetail(OrderDetail orderDetail) {
|
||||
if (orderDetail.getOrderStatus() == null) {
|
||||
// 修改预约时间的时候需要清除超时状态
|
||||
if (orderDetail.getExpectTimeStart() != null && orderDetail.getExpectTimeStart().compareTo(new Date()) > 0) {
|
||||
orderDetail.setTimeout(0);
|
||||
}
|
||||
return orderDetailMapper.updateOrderDetail(orderDetail);
|
||||
}
|
||||
int orderStatus = orderDetail.getOrderStatus();
|
||||
boolean flag = Boolean.TRUE;
|
||||
// 查子单信息
|
||||
OrderDetail originOrderDetail = this.orderDetailMapper.selectById(orderDetail.getId());
|
||||
if (!Objects.equals(originOrderDetail.getOrderStatus(), orderDetail.getOrderStatus())) {
|
||||
// 修改状态的时候需要清除超时状态
|
||||
orderDetail.setTimeout(0);
|
||||
}
|
||||
int result = orderDetailMapper.updateOrderDetail(orderDetail);
|
||||
// 查询主单关联商品
|
||||
List<OrderGoods> masterOrderGoodsList = orderGoodsService.selectByOrderMasterId(originOrderDetail.getOrderMasterId());
|
||||
|
|
@ -161,6 +169,10 @@ public class OrderDetailServiceImpl implements OrderDetailService {
|
|||
boolean allAssign = orderMasterService.isAllAssign(detailInfo.getOrderMasterId());
|
||||
if (flag && allAssign) {
|
||||
OrderMaster orderMaster = orderMasterMapper.selectById(detailInfo.getOrderMasterId());
|
||||
if (!Objects.equals(orderMaster.getOrderStatus(), orderStatus)) {
|
||||
// 修改状态的时候需要清除超时状态
|
||||
orderMaster.setTimeout(0);
|
||||
}
|
||||
if (ObjectUtils.isEmpty(orderDetail.getExpectTimeStart())) {
|
||||
orderMaster.setOrderStatus(orderStatus);
|
||||
orderMasterMapper.updateOrderMaster(orderMaster);
|
||||
|
|
|
|||
|
|
@ -98,6 +98,12 @@ public class OrderMasterServiceImpl implements OrderMasterService {
|
|||
|
||||
@Override
|
||||
public int updateOrderMaster(OrderMaster orderMaster) {
|
||||
OrderMaster oldOrder = this.selectById(orderMaster.getId());
|
||||
if ((orderMaster.getOrderStatus() != null && !Objects.equals(oldOrder.getOrderStatus(), orderMaster.getOrderStatus()))
|
||||
|| orderMaster.getExpectTimeStart() != null && orderMaster.getExpectTimeStart().compareTo(new Date()) > 0) {
|
||||
// 状态变更或者预约时间大于当前时间便清除超时状态
|
||||
orderMaster.setTimeout(0);
|
||||
}
|
||||
return orderMasterMapper.updateOrderMaster(orderMaster);
|
||||
}
|
||||
|
||||
|
|
@ -560,7 +566,7 @@ public class OrderMasterServiceImpl implements OrderMasterService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public OrderMasterCount differentStatusOrderCount() {
|
||||
return orderMasterMapper.differentStatusOrderCount();
|
||||
public OrderMasterCount differentStatusOrderCount(OrderMaster orderMaster) {
|
||||
return orderMasterMapper.differentStatusOrderCount(orderMaster);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -336,6 +336,7 @@
|
|||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="ledgerAccountStatus != null">ledger_account_status = #{ledgerAccountStatus},</if>
|
||||
<if test="timeout != null">timeout_ = #{timeout},</if>
|
||||
update_time = SYSDATE()
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@
|
|||
AND om.create_time >= #{createTimeStart}
|
||||
</if>
|
||||
<if test="createTimeEnd != null">
|
||||
AND om.create_time < #{createTimeEnd}
|
||||
AND om.create_time <= #{createTimeEnd}
|
||||
</if>
|
||||
<if test="orderMasterIds != null and orderMasterIds != ''">
|
||||
AND om.id in (${orderMasterIds})
|
||||
|
|
@ -315,6 +315,7 @@
|
|||
<if test="resetAllSelfAssigned">all_self_assigned = null,</if>
|
||||
<if test="hasDispatchedAll != null">has_dispatched_all = #{hasDispatchedAll},</if>
|
||||
<if test="isCall != null">is_call = #{isCall},</if>
|
||||
<if test="timeout != null">timeout_ = #{timeout},</if>
|
||||
update_time = SYSDATE()
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
|
|
@ -423,15 +424,25 @@
|
|||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="differentStatusOrderCount" resultType="com.ghy.order.domain.OrderMasterCount">
|
||||
<select id="differentStatusOrderCount" resultType="com.ghy.order.domain.OrderMasterCount" parameterType="com.ghy.order.domain.OrderMaster">
|
||||
select
|
||||
count(case when om.order_status = 0 then 1 else null end) as newOrderNum,
|
||||
count(case when om.order_status = 1 then 1 else null end) as acceptedOrderNum,
|
||||
count(case when om.order_status = 1 and om.is_call = '01' then 1 else null end) as notAppointedOrderNum,
|
||||
count(case when om.order_status = 1 and om.is_call = '02' then 1 else null end) as notArrangedOrderNum,
|
||||
count(case when om.order_status = 2 then 1 else null end) as waitForDoorOrderNum,
|
||||
count(case when om.order_status = 3 then 1 else null end) as servingOrderNum,
|
||||
count(case when om.order_status = 4 then 1 else null end) as confirmingOrderNum,
|
||||
count(case when om.order_status = 5 then 1 else null end) as finishedOrderNum,
|
||||
count(case when om.order_status = 6 then 1 else null end) as canceledOrderNum
|
||||
from order_master om
|
||||
where 1 = 1
|
||||
<if test="timeout != null">
|
||||
AND om.timeout_ = #{timeout}
|
||||
</if>
|
||||
<if test="isCall != null">
|
||||
AND om.is_call = #{isCall}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -138,11 +138,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</select>
|
||||
|
||||
<select id="checkLoginNameUnique" parameterType="String" resultType="int">
|
||||
select count(1) from sys_user where login_name=#{loginName} limit 1
|
||||
select count(1) from sys_user where login_name=#{loginName} and del_flag = 0 limit 1
|
||||
</select>
|
||||
|
||||
<select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">
|
||||
select user_id, phonenumber from sys_user where phonenumber=#{phonenumber} limit 1
|
||||
select user_id, phonenumber from sys_user where phonenumber=#{phonenumber} and del_flag = 0 limit 1
|
||||
</select>
|
||||
|
||||
<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
|
||||
|
|
|
|||
Loading…
Reference in New Issue