租电订单

This commit is contained in:
19173159168
2025-08-18 23:36:15 +08:00
parent 8a45487020
commit d25251405c
15 changed files with 766 additions and 59 deletions

View File

@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.baseUser.mapper.ZcBaseWalletChangeMapper">
<resultMap type="ZcBaseWalletChange" id="ZcBaseWalletChangeResult">
<result property="id" column="id" />
<result property="userId" column="user_id" />
<result property="changeType" column="change_type" />
<result property="payType" column="pay_type" />
<result property="changeTime" column="change_time" />
<result property="changeAmount" column="change_amount" />
<result property="referralOrderNo" column="referral_order_no" />
<result property="delFlag" column="del_flag" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="userName" column="userName" />
</resultMap>
<sql id="selectZcBaseWalletChangeVo">
select id, user_id, change_type, pay_type, change_time, change_amount, referral_order_no, del_flag, create_time, update_time from zc_base_wallet_change
</sql>
<select id="selectZcBaseWalletChangeList" parameterType="ZcBaseWalletChange" resultMap="ZcBaseWalletChangeResult">
select a.id, a.user_id, a.change_type, a.pay_type, a.change_time, a.change_amount, a.referral_order_no, a.del_flag, a.create_time, a.update_time,
b.user_name as userName
from zc_base_wallet_change a
left join zc_base_user b on a.user_id = b.id
<where>
<if test="userId != null "> and a.user_id = #{userId}</if>
<if test="changeType != null and changeType != ''"> and a.change_type = #{changeType}</if>
<if test="payType != null and payType != ''"> and a.pay_type = #{payType}</if>
<if test="changeTime != null "> and a.change_time = #{changeTime}</if>
<if test="changeAmount != null "> and a.change_amount = #{changeAmount}</if>
<if test="referralOrderNo != null and referralOrderNo != ''"> and a.referral_order_no = #{referralOrderNo}</if>
<if test="userName != null and userName != ''"> and b.user_name = #{userName}</if>
</where>
</select>
<select id="selectZcBaseWalletChangeById" parameterType="Long" resultMap="ZcBaseWalletChangeResult">
<include refid="selectZcBaseWalletChangeVo"/>
where id = #{id}
</select>
<insert id="insertZcBaseWalletChange" parameterType="ZcBaseWalletChange" useGeneratedKeys="true" keyProperty="id">
insert into zc_base_wallet_change
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">user_id,</if>
<if test="changeType != null and changeType != ''">change_type,</if>
<if test="payType != null and payType != ''">pay_type,</if>
<if test="changeTime != null">change_time,</if>
<if test="changeAmount != null">change_amount,</if>
<if test="referralOrderNo != null">referral_order_no,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">#{userId},</if>
<if test="changeType != null and changeType != ''">#{changeType},</if>
<if test="payType != null and payType != ''">#{payType},</if>
<if test="changeTime != null">#{changeTime},</if>
<if test="changeAmount != null">#{changeAmount},</if>
<if test="referralOrderNo != null">#{referralOrderNo},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateZcBaseWalletChange" parameterType="ZcBaseWalletChange">
update zc_base_wallet_change
<trim prefix="SET" suffixOverrides=",">
<if test="userId != null">user_id = #{userId},</if>
<if test="changeType != null and changeType != ''">change_type = #{changeType},</if>
<if test="payType != null and payType != ''">pay_type = #{payType},</if>
<if test="changeTime != null">change_time = #{changeTime},</if>
<if test="changeAmount != null">change_amount = #{changeAmount},</if>
<if test="referralOrderNo != null">referral_order_no = #{referralOrderNo},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteZcBaseWalletChangeById" parameterType="Long">
delete from zc_base_wallet_change where id = #{id}
</delete>
<delete id="deleteZcBaseWalletChangeByIds" parameterType="String">
delete from zc_base_wallet_change where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -111,7 +111,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="overdueFee != null "> and a.overdue_fee = #{overdueFee}</if>
<if test="isDepositFree != null "> and a.is_deposit_free = #{isDepositFree}</if>
<if test="isAutoDeduct != null "> and a.is_auto_deduct = #{isAutoDeduct}</if>
<if test="firstOrderTime != null "> and a.first_order_time = #{firstOrderTime}</if>
<if test="startRentTime != null "> and a.start_rent_time = #{startRentTime}</if>
<if test="overdueDays != null "> and a.overdue_days = #{overdueDays}</if>
<if test="renewalTimes != null "> and a.renewal_times = #{renewalTimes}</if>
@ -121,6 +120,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="storeName != null and storeName!= '' "> and s.name = #{storeName}</if>
<if test="licensePlate != null and licensePlate!= '' "> and zc.license_plate = #{licensePlate}</if>
<if test="params.beginFirstOrderTime != null and params.beginFirstOrderTime != ''"><!-- 开始时间检索 -->
and date_format(a.first_order_time,'%y%m%d') &gt;= date_format(#{params.beginFirstOrderTime},'%y%m%d')
</if>
<if test="params.endFirstOrderTime != null and params.endFirstOrderTime != ''"><!-- 结束时间检索 -->
and date_format(a.first_order_time,'%y%m%d') &lt;= date_format(#{params.endFirstOrderTime},'%y%m%d')
</if>
</where>
order by a.update_time desc
</select>

View File

@ -37,6 +37,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createdAt != null "> and created_at = #{createdAt}</if>
<if test="paymentId != null and paymentId != ''"> and payment_id = #{paymentId}</if>
<if test="paidAt != null "> and paid_at = #{paidAt}</if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
</if>
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
and date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
</if>
</where>
</select>

View File

@ -0,0 +1,66 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增钱包变更记录')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-walletChange-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required">用户id</label>
<div class="col-sm-8">
<input name="userId" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">变更时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="changeTime" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">变更金额(元)</label>
<div class="col-sm-8">
<input name="changeAmount" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">引荐订单:</label>
<div class="col-sm-8">
<input name="referralOrderNo" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">删除标志:</label>
<div class="col-sm-8">
<input name="delFlag" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "baseUser/walletChange"
$("#form-walletChange-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-walletChange-add').serialize());
}
}
$("input[name='changeTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

View File

@ -0,0 +1,61 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改钱包变更记录')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-walletChange-edit" th:object="${zcBaseWalletChange}">
<input name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">用户id</label>
<div class="col-sm-8">
<input name="userId" th:field="*{userId}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">变更时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="changeTime" th:value="${#dates.format(zcBaseWalletChange.changeTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">变更金额(元)</label>
<div class="col-sm-8">
<input name="changeAmount" th:field="*{changeAmount}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">引荐订单:</label>
<div class="col-sm-8">
<input name="referralOrderNo" th:field="*{referralOrderNo}" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "baseUser/walletChange";
$("#form-walletChange-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-walletChange-edit').serialize());
}
}
$("input[name='changeTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

View File

@ -0,0 +1,114 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('钱包变更记录列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>用户:</label>
<input type="text" name="userName"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="baseUser:walletChange:add">-->
<!-- <i class="fa fa-plus"></i> 添加-->
<!-- </a>-->
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="baseUser:walletChange:edit">-->
<!-- <i class="fa fa-edit"></i> 修改-->
<!-- </a>-->
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="baseUser:walletChange:remove">-->
<!-- <i class="fa fa-remove"></i> 删除-->
<!-- </a>-->
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="baseUser:walletChange:export">-->
<!-- <i class="fa fa-download"></i> 导出-->
<!-- </a>-->
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('baseUser:walletChange:edit')}]];
var removeFlag = [[${@permission.hasPermi('baseUser:walletChange:remove')}]];
var changeTypeDatas = [[${@dict.getType('key_wallet_change_type')}]];
var payTypeDatas = [[${@dict.getType('key_wallet_pay_type')}]];
var prefix = ctx + "baseUser/walletChange";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "钱包变更记录",
columns: [{
checkbox: true
},
{
field: 'id',
title: 'id主键',
visible: false
},
{
field: 'userName',
title: '用户'
},
{
field: 'changeType',
title: '变更类型',
formatter: function(value, row, index) {
return $.table.selectDictLabel(changeTypeDatas, value);
}
},
{
field: 'payType',
title: '支付类型',
formatter: function(value, row, index) {
return $.table.selectDictLabel(payTypeDatas, value);
}
},
{
field: 'changeTime',
title: '变更时间'
},
{
field: 'changeAmount',
title: '变更金额(元)'
},
{
field: 'referralOrderNo',
title: '引荐订单'
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + ' btnOption" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>修改</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + ' btnOption" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>

View File

@ -60,7 +60,12 @@
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li class="select-time">
<label>下单时间: </label>
<input type="text" class="time-input" id="beginFirstOrderTime" placeholder="开始时间" name="params[beginFirstOrderTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endFirstOrderTime" placeholder="结束时间" name="params[endFirstOrderTime]"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>

View File

@ -9,40 +9,37 @@
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<input type="hidden" name="suborderType" th:field="*{zcOrderSub.suborderType}"/>
<ul>
<!-- <li>-->
<!-- <label>订单号:</label>-->
<!-- <input type="text" name="orderId"/>-->
<!-- </li>-->
<li>
<label>订单号:</label>
<input type="text" name="orderId"/>
</li>
<li>
<label>子订单编号:</label>
<label>订单号:</label>
<input type="text" name="suborderNo"/>
</li>
<li>
<label>子订单类型:</label>
<select name="suborderType" th:with="type=${@dict.getType('key_order_suborder_type')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>订单金额:</label>
<input type="text" name="amount"/>
</li>
<li>
<label>支付方式:</label>
<input type="text" name="paymentMethod"/>
</li>
<!-- <li>-->
<!-- <label>子订单类型:</label>-->
<!-- <select name="suborderType" th:with="type=${@dict.getType('key_order_suborder_type')}">-->
<!-- <option value="">所有</option>-->
<!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
<!-- </select>-->
<!-- </li>-->
<li>
<label>车架/电池编号:</label>
<input type="text" name="vinBatteryNo"/>
</li>
<li>
<label>订单产生时间:</label>
<input type="text" class="time-input" placeholder="请选择订单产生时间" name="createdAt"/>
<li class="select-time">
<label>创建时间: </label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
@ -76,6 +73,7 @@
var editFlag = [[${@permission.hasPermi('orders:orderSub:edit')}]];
var removeFlag = [[${@permission.hasPermi('orders:orderSub:remove')}]];
var suborderTypeDatas = [[${@dict.getType('key_order_suborder_type')}]];
var paymentMethodDatas = [[${@dict.getType('key_order_payment_method')}]];
var prefix = ctx + "orders/orderSub";
$(function() {
@ -85,26 +83,17 @@
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "租车子订单",
modalName: "租订单",
columns: [{
checkbox: true
},
{
field: 'suborderId',
title: '子订单',
visible: false
},
{
field: 'orderId',
title: '订单号'
},
{
field: 'suborderNo',
title: '订单编号'
title: '订单编号'
},
{
field: 'suborderType',
title: '订单类型',
title: '订单类型',
formatter: function(value, row, index) {
return $.table.selectDictLabel(suborderTypeDatas, value);
}
@ -115,7 +104,10 @@
},
{
field: 'paymentMethod',
title: '支付方式'
title: '支付方式',
formatter: function(value, row, index) {
return $.table.selectDictLabel(paymentMethodDatas, value);
}
},
{
field: 'vinBatteryNo',
@ -134,14 +126,14 @@
title: '实际支付时间'
},
{
title: '操作',
field: 'createTime',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + ' btnOption" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.suborderId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + ' btnOption" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.suborderId + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
title: '创建时间'
},
{
field: 'updateTime',
align: 'center',
title: '更新时间'
}]
};
$.table.init(options);