租车订单详情展示车辆变更记录
This commit is contained in:
@ -0,0 +1,127 @@
|
||||
package com.ruoyi.orders.controller;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.orders.domain.ZcOrderCarChange;
|
||||
import com.ruoyi.orders.service.IZcOrderCarChangeService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 订单车辆变更Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-05
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/orders/change")
|
||||
public class ZcOrderCarChangeController extends BaseController
|
||||
{
|
||||
private String prefix = "orders/change";
|
||||
|
||||
@Autowired
|
||||
private IZcOrderCarChangeService zcOrderCarChangeService;
|
||||
|
||||
@RequiresPermissions("orders:change:view")
|
||||
@GetMapping()
|
||||
public String change()
|
||||
{
|
||||
return prefix + "/change";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单车辆变更列表
|
||||
*/
|
||||
@RequiresPermissions("orders:change:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(ZcOrderCarChange zcOrderCarChange)
|
||||
{
|
||||
startPage();
|
||||
List<ZcOrderCarChange> list = zcOrderCarChangeService.selectZcOrderCarChangeList(zcOrderCarChange);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出订单车辆变更列表
|
||||
*/
|
||||
@RequiresPermissions("orders:change:export")
|
||||
@Log(title = "订单车辆变更", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(ZcOrderCarChange zcOrderCarChange)
|
||||
{
|
||||
List<ZcOrderCarChange> list = zcOrderCarChangeService.selectZcOrderCarChangeList(zcOrderCarChange);
|
||||
ExcelUtil<ZcOrderCarChange> util = new ExcelUtil<ZcOrderCarChange>(ZcOrderCarChange.class);
|
||||
return util.exportExcel(list, "订单车辆变更数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单车辆变更
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存订单车辆变更
|
||||
*/
|
||||
@RequiresPermissions("orders:change:add")
|
||||
@Log(title = "订单车辆变更", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(ZcOrderCarChange zcOrderCarChange)
|
||||
{
|
||||
return toAjax(zcOrderCarChangeService.insertZcOrderCarChange(zcOrderCarChange));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单车辆变更
|
||||
*/
|
||||
@RequiresPermissions("orders:change:edit")
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||
{
|
||||
ZcOrderCarChange zcOrderCarChange = zcOrderCarChangeService.selectZcOrderCarChangeById(id);
|
||||
mmap.put("zcOrderCarChange", zcOrderCarChange);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存订单车辆变更
|
||||
*/
|
||||
@RequiresPermissions("orders:change:edit")
|
||||
@Log(title = "订单车辆变更", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(ZcOrderCarChange zcOrderCarChange)
|
||||
{
|
||||
return toAjax(zcOrderCarChangeService.updateZcOrderCarChange(zcOrderCarChange));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单车辆变更
|
||||
*/
|
||||
@RequiresPermissions("orders:change:remove")
|
||||
@Log(title = "订单车辆变更", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(zcOrderCarChangeService.deleteZcOrderCarChangeByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -7,6 +7,8 @@ import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.operation.domain.Company;
|
||||
import com.ruoyi.operation.service.ICompanyService;
|
||||
import com.ruoyi.orders.domain.ZcOrderCarChange;
|
||||
import com.ruoyi.orders.service.IZcOrderCarChangeService;
|
||||
import com.ruoyi.orders.util.OrderStatusEnum;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -41,6 +43,8 @@ public class ZcOrderMainController extends BaseController
|
||||
@Autowired
|
||||
private IZcOrderMainService zcOrderMainService;
|
||||
@Autowired
|
||||
private IZcOrderCarChangeService zcOrderCarChangeService;
|
||||
@Autowired
|
||||
private ICompanyService companyService;
|
||||
|
||||
@RequiresPermissions("orders:order:view")
|
||||
@ -119,6 +123,10 @@ public class ZcOrderMainController extends BaseController
|
||||
mmap.put("zcOrderMain", zcOrderMain);
|
||||
ZcOrderMain zcOrderMainImg = zcOrderMainService.selectZcOrderMainImgByOrderId(orderId);
|
||||
mmap.put("zcOrderMainImg", zcOrderMainImg);
|
||||
ZcOrderCarChange zcOrderCarChange = new ZcOrderCarChange();
|
||||
zcOrderCarChange.setOrderId(orderId);
|
||||
List<ZcOrderCarChange> changeList = zcOrderCarChangeService.selectZcOrderCarChangeList(zcOrderCarChange);
|
||||
mmap.put("zcOrderCarChangeList", changeList);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,164 @@
|
||||
package com.ruoyi.orders.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 订单车辆变更对象 zc_order_car_change
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-05
|
||||
*/
|
||||
public class ZcOrderCarChange extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** ID(主键) */
|
||||
private Long id;
|
||||
|
||||
/** 关联的订单ID(外键) */
|
||||
@Excel(name = "关联的订单ID", readConverterExp = "外=键")
|
||||
private Long orderId;
|
||||
|
||||
/** 订单编号 */
|
||||
@Excel(name = "订单编号")
|
||||
private String orderNo;
|
||||
|
||||
/** 子订单编号 */
|
||||
@Excel(name = "子订单编号")
|
||||
private String orderSubNo;
|
||||
|
||||
/** 原车辆ID */
|
||||
@Excel(name = "原车辆ID")
|
||||
private Long oldVehicleId;
|
||||
|
||||
/** 原车车架号 */
|
||||
@Excel(name = "原车车架号")
|
||||
private String oldVehicleVin;
|
||||
|
||||
/** 新车辆ID */
|
||||
@Excel(name = "新车辆ID")
|
||||
private Long newVehicleId;
|
||||
|
||||
/** 新车车架号 */
|
||||
@Excel(name = "新车车架号")
|
||||
private String newVehicleVin;
|
||||
|
||||
/** 操作人id */
|
||||
@Excel(name = "操作人id")
|
||||
private Long operatorId;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setOrderId(Long orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Long getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
public void setOrderNo(String orderNo)
|
||||
{
|
||||
this.orderNo = orderNo;
|
||||
}
|
||||
|
||||
public String getOrderNo()
|
||||
{
|
||||
return orderNo;
|
||||
}
|
||||
public void setOrderSubNo(String orderSubNo)
|
||||
{
|
||||
this.orderSubNo = orderSubNo;
|
||||
}
|
||||
|
||||
public String getOrderSubNo()
|
||||
{
|
||||
return orderSubNo;
|
||||
}
|
||||
public void setOldVehicleId(Long oldVehicleId)
|
||||
{
|
||||
this.oldVehicleId = oldVehicleId;
|
||||
}
|
||||
|
||||
public Long getOldVehicleId()
|
||||
{
|
||||
return oldVehicleId;
|
||||
}
|
||||
public void setOldVehicleVin(String oldVehicleVin)
|
||||
{
|
||||
this.oldVehicleVin = oldVehicleVin;
|
||||
}
|
||||
|
||||
public String getOldVehicleVin()
|
||||
{
|
||||
return oldVehicleVin;
|
||||
}
|
||||
public void setNewVehicleId(Long newVehicleId)
|
||||
{
|
||||
this.newVehicleId = newVehicleId;
|
||||
}
|
||||
|
||||
public Long getNewVehicleId()
|
||||
{
|
||||
return newVehicleId;
|
||||
}
|
||||
public void setNewVehicleVin(String newVehicleVin)
|
||||
{
|
||||
this.newVehicleVin = newVehicleVin;
|
||||
}
|
||||
|
||||
public String getNewVehicleVin()
|
||||
{
|
||||
return newVehicleVin;
|
||||
}
|
||||
public void setOperatorId(Long operatorId)
|
||||
{
|
||||
this.operatorId = operatorId;
|
||||
}
|
||||
|
||||
public Long getOperatorId()
|
||||
{
|
||||
return operatorId;
|
||||
}
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("orderId", getOrderId())
|
||||
.append("orderNo", getOrderNo())
|
||||
.append("orderSubNo", getOrderSubNo())
|
||||
.append("oldVehicleId", getOldVehicleId())
|
||||
.append("oldVehicleVin", getOldVehicleVin())
|
||||
.append("newVehicleId", getNewVehicleId())
|
||||
.append("newVehicleVin", getNewVehicleVin())
|
||||
.append("operatorId", getOperatorId())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.orders.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.orders.domain.ZcOrderCarChange;
|
||||
|
||||
/**
|
||||
* 订单车辆变更Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-05
|
||||
*/
|
||||
public interface ZcOrderCarChangeMapper
|
||||
{
|
||||
/**
|
||||
* 查询订单车辆变更
|
||||
*
|
||||
* @param id 订单车辆变更主键
|
||||
* @return 订单车辆变更
|
||||
*/
|
||||
public ZcOrderCarChange selectZcOrderCarChangeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询订单车辆变更列表
|
||||
*
|
||||
* @param zcOrderCarChange 订单车辆变更
|
||||
* @return 订单车辆变更集合
|
||||
*/
|
||||
public List<ZcOrderCarChange> selectZcOrderCarChangeList(ZcOrderCarChange zcOrderCarChange);
|
||||
|
||||
/**
|
||||
* 新增订单车辆变更
|
||||
*
|
||||
* @param zcOrderCarChange 订单车辆变更
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertZcOrderCarChange(ZcOrderCarChange zcOrderCarChange);
|
||||
|
||||
/**
|
||||
* 修改订单车辆变更
|
||||
*
|
||||
* @param zcOrderCarChange 订单车辆变更
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateZcOrderCarChange(ZcOrderCarChange zcOrderCarChange);
|
||||
|
||||
/**
|
||||
* 删除订单车辆变更
|
||||
*
|
||||
* @param id 订单车辆变更主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZcOrderCarChangeById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除订单车辆变更
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZcOrderCarChangeByIds(String[] ids);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.orders.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.orders.domain.ZcOrderCarChange;
|
||||
|
||||
/**
|
||||
* 订单车辆变更Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-05
|
||||
*/
|
||||
public interface IZcOrderCarChangeService
|
||||
{
|
||||
/**
|
||||
* 查询订单车辆变更
|
||||
*
|
||||
* @param id 订单车辆变更主键
|
||||
* @return 订单车辆变更
|
||||
*/
|
||||
public ZcOrderCarChange selectZcOrderCarChangeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询订单车辆变更列表
|
||||
*
|
||||
* @param zcOrderCarChange 订单车辆变更
|
||||
* @return 订单车辆变更集合
|
||||
*/
|
||||
public List<ZcOrderCarChange> selectZcOrderCarChangeList(ZcOrderCarChange zcOrderCarChange);
|
||||
|
||||
/**
|
||||
* 新增订单车辆变更
|
||||
*
|
||||
* @param zcOrderCarChange 订单车辆变更
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertZcOrderCarChange(ZcOrderCarChange zcOrderCarChange);
|
||||
|
||||
/**
|
||||
* 修改订单车辆变更
|
||||
*
|
||||
* @param zcOrderCarChange 订单车辆变更
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateZcOrderCarChange(ZcOrderCarChange zcOrderCarChange);
|
||||
|
||||
/**
|
||||
* 批量删除订单车辆变更
|
||||
*
|
||||
* @param ids 需要删除的订单车辆变更主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZcOrderCarChangeByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除订单车辆变更信息
|
||||
*
|
||||
* @param id 订单车辆变更主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZcOrderCarChangeById(Long id);
|
||||
}
|
||||
@ -0,0 +1,97 @@
|
||||
package com.ruoyi.orders.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.orders.mapper.ZcOrderCarChangeMapper;
|
||||
import com.ruoyi.orders.domain.ZcOrderCarChange;
|
||||
import com.ruoyi.orders.service.IZcOrderCarChangeService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 订单车辆变更Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-05
|
||||
*/
|
||||
@Service
|
||||
public class ZcOrderCarChangeServiceImpl implements IZcOrderCarChangeService
|
||||
{
|
||||
@Autowired
|
||||
private ZcOrderCarChangeMapper zcOrderCarChangeMapper;
|
||||
|
||||
/**
|
||||
* 查询订单车辆变更
|
||||
*
|
||||
* @param id 订单车辆变更主键
|
||||
* @return 订单车辆变更
|
||||
*/
|
||||
@Override
|
||||
public ZcOrderCarChange selectZcOrderCarChangeById(Long id)
|
||||
{
|
||||
return zcOrderCarChangeMapper.selectZcOrderCarChangeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单车辆变更列表
|
||||
*
|
||||
* @param zcOrderCarChange 订单车辆变更
|
||||
* @return 订单车辆变更
|
||||
*/
|
||||
@Override
|
||||
public List<ZcOrderCarChange> selectZcOrderCarChangeList(ZcOrderCarChange zcOrderCarChange)
|
||||
{
|
||||
return zcOrderCarChangeMapper.selectZcOrderCarChangeList(zcOrderCarChange);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单车辆变更
|
||||
*
|
||||
* @param zcOrderCarChange 订单车辆变更
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertZcOrderCarChange(ZcOrderCarChange zcOrderCarChange)
|
||||
{
|
||||
zcOrderCarChange.setCreateTime(DateUtils.getNowDate());
|
||||
return zcOrderCarChangeMapper.insertZcOrderCarChange(zcOrderCarChange);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单车辆变更
|
||||
*
|
||||
* @param zcOrderCarChange 订单车辆变更
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateZcOrderCarChange(ZcOrderCarChange zcOrderCarChange)
|
||||
{
|
||||
zcOrderCarChange.setUpdateTime(DateUtils.getNowDate());
|
||||
return zcOrderCarChangeMapper.updateZcOrderCarChange(zcOrderCarChange);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除订单车辆变更
|
||||
*
|
||||
* @param ids 需要删除的订单车辆变更主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteZcOrderCarChangeByIds(String ids)
|
||||
{
|
||||
return zcOrderCarChangeMapper.deleteZcOrderCarChangeByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单车辆变更信息
|
||||
*
|
||||
* @param id 订单车辆变更主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteZcOrderCarChangeById(Long id)
|
||||
{
|
||||
return zcOrderCarChangeMapper.deleteZcOrderCarChangeById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
<?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.orders.mapper.ZcOrderCarChangeMapper">
|
||||
|
||||
<resultMap type="ZcOrderCarChange" id="ZcOrderCarChangeResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="orderNo" column="order_no" />
|
||||
<result property="orderSubNo" column="order_sub_no" />
|
||||
<result property="oldVehicleId" column="old_vehicle_id" />
|
||||
<result property="oldVehicleVin" column="old_vehicle_vin" />
|
||||
<result property="newVehicleId" column="new_vehicle_id" />
|
||||
<result property="newVehicleVin" column="new_vehicle_vin" />
|
||||
<result property="operatorId" column="operator_id" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZcOrderCarChangeVo">
|
||||
select id, order_id, order_no, order_sub_no, old_vehicle_id, old_vehicle_vin, new_vehicle_id, new_vehicle_vin, operator_id, del_flag, create_time, update_time from zc_order_car_change
|
||||
</sql>
|
||||
|
||||
<select id="selectZcOrderCarChangeList" parameterType="ZcOrderCarChange" resultMap="ZcOrderCarChangeResult">
|
||||
<include refid="selectZcOrderCarChangeVo"/>
|
||||
<where>
|
||||
<if test="orderId != null "> and order_id = #{orderId}</if>
|
||||
<if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
|
||||
<if test="orderSubNo != null and orderSubNo != ''"> and order_sub_no = #{orderSubNo}</if>
|
||||
<if test="oldVehicleId != null "> and old_vehicle_id = #{oldVehicleId}</if>
|
||||
<if test="oldVehicleVin != null and oldVehicleVin != ''"> and old_vehicle_vin = #{oldVehicleVin}</if>
|
||||
<if test="newVehicleId != null "> and new_vehicle_id = #{newVehicleId}</if>
|
||||
<if test="newVehicleVin != null and newVehicleVin != ''"> and new_vehicle_vin = #{newVehicleVin}</if>
|
||||
<if test="operatorId != null "> and operator_id = #{operatorId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectZcOrderCarChangeById" parameterType="Long" resultMap="ZcOrderCarChangeResult">
|
||||
<include refid="selectZcOrderCarChangeVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertZcOrderCarChange" parameterType="ZcOrderCarChange" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into zc_order_car_change
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id,</if>
|
||||
<if test="orderNo != null and orderNo != ''">order_no,</if>
|
||||
<if test="orderSubNo != null and orderSubNo != ''">order_sub_no,</if>
|
||||
<if test="oldVehicleId != null">old_vehicle_id,</if>
|
||||
<if test="oldVehicleVin != null">old_vehicle_vin,</if>
|
||||
<if test="newVehicleId != null">new_vehicle_id,</if>
|
||||
<if test="newVehicleVin != null">new_vehicle_vin,</if>
|
||||
<if test="operatorId != null">operator_id,</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="orderId != null">#{orderId},</if>
|
||||
<if test="orderNo != null and orderNo != ''">#{orderNo},</if>
|
||||
<if test="orderSubNo != null and orderSubNo != ''">#{orderSubNo},</if>
|
||||
<if test="oldVehicleId != null">#{oldVehicleId},</if>
|
||||
<if test="oldVehicleVin != null">#{oldVehicleVin},</if>
|
||||
<if test="newVehicleId != null">#{newVehicleId},</if>
|
||||
<if test="newVehicleVin != null">#{newVehicleVin},</if>
|
||||
<if test="operatorId != null">#{operatorId},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZcOrderCarChange" parameterType="ZcOrderCarChange">
|
||||
update zc_order_car_change
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id = #{orderId},</if>
|
||||
<if test="orderNo != null and orderNo != ''">order_no = #{orderNo},</if>
|
||||
<if test="orderSubNo != null and orderSubNo != ''">order_sub_no = #{orderSubNo},</if>
|
||||
<if test="oldVehicleId != null">old_vehicle_id = #{oldVehicleId},</if>
|
||||
<if test="oldVehicleVin != null">old_vehicle_vin = #{oldVehicleVin},</if>
|
||||
<if test="newVehicleId != null">new_vehicle_id = #{newVehicleId},</if>
|
||||
<if test="newVehicleVin != null">new_vehicle_vin = #{newVehicleVin},</if>
|
||||
<if test="operatorId != null">operator_id = #{operatorId},</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="deleteZcOrderCarChangeById" parameterType="Long">
|
||||
delete from zc_order_car_change where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZcOrderCarChangeByIds" parameterType="String">
|
||||
delete from zc_order_car_change where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@ -30,31 +30,31 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">支持电池类型:</label>
|
||||
<label class="col-sm-2 control-label is-required">支持电池类型:</label>
|
||||
<div class="col-sm-9">
|
||||
<select name="batteryType" class="form-control m-b select2-multiple" multiple th:with="type=${@dict.getType('key_car_battery_type')}">
|
||||
<select name="batteryType" class="form-control m-b select2-multiple" multiple th:with="type=${@dict.getType('key_car_battery_type')}" required>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">整车重量(kg):</label>
|
||||
<label class="col-sm-2 control-label is-required">整车重量(kg):</label>
|
||||
<div class="col-sm-9">
|
||||
<input name="weight" class="form-control" type="text" maxlength="10" >
|
||||
<input name="weight" class="form-control" type="text" maxlength="10" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">最高时速(km/h):</label>
|
||||
<label class="col-sm-2 control-label is-required">最高时速(km/h):</label>
|
||||
<div class="col-sm-9">
|
||||
<input name="maxSpeed" class="form-control" type="text" maxlength="10" >
|
||||
<input name="maxSpeed" class="form-control" type="text" maxlength="10" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">车型图片:</label>
|
||||
<label class="col-sm-2 control-label is-required">车型图片:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="hidden" name="image">
|
||||
<div class="file-loading">
|
||||
<input class="form-control file-upload" id="image" name="file" type="file">
|
||||
<input class="form-control file-upload" id="image" name="file" type="file" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -33,31 +33,31 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">支持电池类型:</label>
|
||||
<label class="col-sm-2 control-label is-required">支持电池类型:</label>
|
||||
<div class="col-sm-9">
|
||||
<select name="batteryType" class="form-control m-b select2-multiple" multiple th:with="type=${@dict.getType('key_car_battery_type')}">
|
||||
<select name="batteryType" class="form-control m-b select2-multiple" multiple th:with="type=${@dict.getType('key_car_battery_type')}" required>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{batteryType}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">整车重量(kg):</label>
|
||||
<label class="col-sm-2 control-label is-required">整车重量(kg):</label>
|
||||
<div class="col-sm-9">
|
||||
<input name="weight" th:field="*{weight}" class="form-control" type="text" maxlength="10">
|
||||
<input name="weight" th:field="*{weight}" class="form-control" type="text" maxlength="10" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">最高时速(km/h):</label>
|
||||
<label class="col-sm-2 control-label is-required">最高时速(km/h):</label>
|
||||
<div class="col-sm-9">
|
||||
<input name="maxSpeed" th:field="*{maxSpeed}" class="form-control" type="text" maxlength="10">
|
||||
<input name="maxSpeed" th:field="*{maxSpeed}" class="form-control" type="text" maxlength="10" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">车型图片:</label>
|
||||
<label class="col-sm-2 control-label is-required">车型图片:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="hidden" name="image" th:value="*{image}">
|
||||
<div class="file-loading">
|
||||
<input class="form-control file-upload" id="image" name="file" type="file">
|
||||
<input class="form-control file-upload" id="image" name="file" type="file" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -0,0 +1,79 @@
|
||||
<!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-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">关联的订单ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="orderId" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">订单编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="orderNo" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">子订单编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="orderSubNo" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">原车辆ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="oldVehicleId" 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="oldVehicleVin" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">新车辆ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="newVehicleId" 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="newVehicleVin" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">操作人id:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="operatorId" 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="delFlag" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "orders/change"
|
||||
$("#form-change-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-change-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,109 @@
|
||||
<!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="orderNo"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>子订单编号:</label>
|
||||
<input type="text" name="orderSubNo"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>原车架号:</label>
|
||||
<input type="text" name="oldVehicleVin"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label>新车车架号:</label>
|
||||
<input type="text" name="newVehicleVin"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="orders:change:add">-->
|
||||
<!-- <i class="fa fa-plus"></i> 添加-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="orders:change:edit">-->
|
||||
<!-- <i class="fa fa-edit"></i> 修改-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="orders:change:remove">-->
|
||||
<!-- <i class="fa fa-remove"></i> 删除-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="orders:change: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('orders:change:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('orders:change:remove')}]];
|
||||
var prefix = ctx + "orders/change";
|
||||
|
||||
$(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: 'orderNo',
|
||||
title: '订单编号'
|
||||
},
|
||||
{
|
||||
field: 'orderSubNo',
|
||||
title: '子订单编号'
|
||||
},
|
||||
{
|
||||
field: 'oldVehicleVin',
|
||||
title: '原车架号'
|
||||
},
|
||||
|
||||
{
|
||||
field: 'newVehicleVin',
|
||||
title: '新车架号'
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '操作时间'
|
||||
}
|
||||
]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,74 @@
|
||||
<!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-edit" th:object="${zcOrderCarChange}">
|
||||
<input name="id" th:field="*{id}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">关联的订单ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="orderId" th:field="*{orderId}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">订单编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="orderNo" th:field="*{orderNo}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">子订单编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="orderSubNo" th:field="*{orderSubNo}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">原车辆ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="oldVehicleId" th:field="*{oldVehicleId}" 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="oldVehicleVin" th:field="*{oldVehicleVin}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">新车辆ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="newVehicleId" th:field="*{newVehicleId}" 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="newVehicleVin" th:field="*{newVehicleVin}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">操作人id:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="operatorId" th:field="*{operatorId}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "orders/change";
|
||||
$("#form-change-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-change-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -166,6 +166,15 @@
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<h4 class="form-header h4">租车订单车辆变更信息</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table-car-change"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<button type="button" th:if="not (*{orderStatus} == 'AUTO_END' or *{orderStatus} == 'MANUAL_END' or *{orderStatus} == 'WAIT_PAY')" class="btn btn-success btn-xs" onclick="manualEndOrder()">手动结束订单</i></button>
|
||||
</form>
|
||||
</div>
|
||||
@ -329,6 +338,41 @@
|
||||
}]
|
||||
};
|
||||
$.table.init(options2);
|
||||
|
||||
var options3 = {
|
||||
data: [[${zcOrderCarChangeList}]],
|
||||
pagination: false,
|
||||
showSearch: false,
|
||||
showRefresh: false,
|
||||
showToggle: false,
|
||||
showColumns: false,
|
||||
sidePagination: "client",
|
||||
columns: [
|
||||
{
|
||||
field: 'orderNo',
|
||||
title: '订单编号'
|
||||
},
|
||||
{
|
||||
field: 'orderSubNo',
|
||||
title: '子订单编号'
|
||||
},
|
||||
{
|
||||
field: 'oldVehicleVin',
|
||||
title: '原车架号'
|
||||
},
|
||||
|
||||
{
|
||||
field: 'newVehicleVin',
|
||||
title: '新车架号'
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '操作时间'
|
||||
}
|
||||
]
|
||||
};
|
||||
$('#bootstrap-table-car-change').bootstrapTable(options3);
|
||||
|
||||
});
|
||||
|
||||
function manualEndOrder(){
|
||||
|
||||
Reference in New Issue
Block a user