租车套餐

This commit is contained in:
19173159168
2025-07-08 00:58:41 +08:00
parent d837a9438f
commit 8a9d3b392e
33 changed files with 3681 additions and 16 deletions

View File

@ -46,7 +46,7 @@ public class CompanyStoreController extends BaseController
@GetMapping()
public String store(ModelMap mmap)
{
List<Company> companyList = getCompanyList(new Company()); // 获取运营商列表
List<Company> companyList = companyService.getCompanyList(new Company(),getSysUser()); // 获取运营商列表
mmap.put("companyList", companyList); // 将运营商列表传递到前端
return prefix + "/store";
}
@ -88,7 +88,7 @@ public class CompanyStoreController extends BaseController
@GetMapping("/add")
public String add(ModelMap mmap)
{
List<Company> companyList = getCompanyList(new Company()); // 获取运营商列表
List<Company> companyList = companyService.getCompanyList(new Company(),getSysUser()); // 获取运营商列表
mmap.put("companyList", companyList); // 将运营商列表传递到前端
return prefix + "/add";
}
@ -113,7 +113,7 @@ public class CompanyStoreController extends BaseController
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Long id, ModelMap mmap)
{
List<Company> companyList = getCompanyList(new Company()); // 获取运营商列表
List<Company> companyList = companyService.getCompanyList(new Company(),getSysUser()); // 获取运营商列表
mmap.put("companyList", companyList); // 将运营商列表传递到前端
CompanyStore companyStore = companyStoreService.selectCompanyStoreById(id);
@ -157,12 +157,4 @@ public class CompanyStoreController extends BaseController
return toAjax(companyStoreService.changeStatus(companyStore));
}
private List<Company> getCompanyList(Company company) {
company.setStatus(CompanyConstants.company_status_0);
// 运营者账号,只能查询所属商户数据
if(UserConstants.USER_TYPE_02 .equals(getSysUser().getUserType())){
company.setId(getSysUser().getGroupId());
}
return companyService.selectCompanyList(company);
}
}

View File

@ -0,0 +1,127 @@
package com.ruoyi.operation.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.operation.domain.ZcRentBatteyRule;
import com.ruoyi.operation.service.IZcRentBatteyRuleService;
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-07-07
*/
@Controller
@RequestMapping("/operation/rentBatteyRule")
public class ZcRentBatteyRuleController extends BaseController
{
private String prefix = "operation/rentBatteyRule";
@Autowired
private IZcRentBatteyRuleService zcRentBatteyRuleService;
@RequiresPermissions("operation:rentBatteyRule:view")
@GetMapping()
public String rentBatteyRule()
{
return prefix + "/rentBatteyRule";
}
/**
* 查询租电套餐列表
*/
@RequiresPermissions("operation:rentBatteyRule:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(ZcRentBatteyRule zcRentBatteyRule)
{
startPage();
List<ZcRentBatteyRule> list = zcRentBatteyRuleService.selectZcRentBatteyRuleList(zcRentBatteyRule);
return getDataTable(list);
}
/**
* 导出租电套餐列表
*/
@RequiresPermissions("operation:rentBatteyRule:export")
@Log(title = "租电套餐", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(ZcRentBatteyRule zcRentBatteyRule)
{
List<ZcRentBatteyRule> list = zcRentBatteyRuleService.selectZcRentBatteyRuleList(zcRentBatteyRule);
ExcelUtil<ZcRentBatteyRule> util = new ExcelUtil<ZcRentBatteyRule>(ZcRentBatteyRule.class);
return util.exportExcel(list, "租电套餐数据");
}
/**
* 新增租电套餐
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存租电套餐
*/
@RequiresPermissions("operation:rentBatteyRule:add")
@Log(title = "租电套餐", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(ZcRentBatteyRule zcRentBatteyRule)
{
return toAjax(zcRentBatteyRuleService.insertZcRentBatteyRule(zcRentBatteyRule));
}
/**
* 修改租电套餐
*/
@RequiresPermissions("operation:rentBatteyRule:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Long id, ModelMap mmap)
{
ZcRentBatteyRule zcRentBatteyRule = zcRentBatteyRuleService.selectZcRentBatteyRuleById(id);
mmap.put("zcRentBatteyRule", zcRentBatteyRule);
return prefix + "/edit";
}
/**
* 修改保存租电套餐
*/
@RequiresPermissions("operation:rentBatteyRule:edit")
@Log(title = "租电套餐", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(ZcRentBatteyRule zcRentBatteyRule)
{
return toAjax(zcRentBatteyRuleService.updateZcRentBatteyRule(zcRentBatteyRule));
}
/**
* 删除租电套餐
*/
@RequiresPermissions("operation:rentBatteyRule:remove")
@Log(title = "租电套餐", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(zcRentBatteyRuleService.deleteZcRentBatteyRuleByIds(ids));
}
}

View File

@ -0,0 +1,127 @@
package com.ruoyi.operation.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.operation.domain.ZcRentCarRuleBattery;
import com.ruoyi.operation.service.IZcRentCarRuleBatteryService;
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-07-07
*/
@Controller
@RequestMapping("/operation/rentCarBattey")
public class ZcRentCarRuleBatteryController extends BaseController
{
private String prefix = "operation/rentCarBattey";
@Autowired
private IZcRentCarRuleBatteryService zcRentCarRuleBatteryService;
@RequiresPermissions("operation:rentCarBattey:view")
@GetMapping()
public String rentCarBattey()
{
return prefix + "/rentCarBattey";
}
/**
* 查询租车规则租电规则关联列表
*/
@RequiresPermissions("operation:rentCarBattey:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(ZcRentCarRuleBattery zcRentCarRuleBattery)
{
startPage();
List<ZcRentCarRuleBattery> list = zcRentCarRuleBatteryService.selectZcRentCarRuleBatteryList(zcRentCarRuleBattery);
return getDataTable(list);
}
/**
* 导出租车规则租电规则关联列表
*/
@RequiresPermissions("operation:rentCarBattey:export")
@Log(title = "租车规则租电规则关联", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(ZcRentCarRuleBattery zcRentCarRuleBattery)
{
List<ZcRentCarRuleBattery> list = zcRentCarRuleBatteryService.selectZcRentCarRuleBatteryList(zcRentCarRuleBattery);
ExcelUtil<ZcRentCarRuleBattery> util = new ExcelUtil<ZcRentCarRuleBattery>(ZcRentCarRuleBattery.class);
return util.exportExcel(list, "租车规则租电规则关联数据");
}
/**
* 新增租车规则租电规则关联
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存租车规则租电规则关联
*/
@RequiresPermissions("operation:rentCarBattey:add")
@Log(title = "租车规则租电规则关联", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(ZcRentCarRuleBattery zcRentCarRuleBattery)
{
return toAjax(zcRentCarRuleBatteryService.insertZcRentCarRuleBattery(zcRentCarRuleBattery));
}
/**
* 修改租车规则租电规则关联
*/
@RequiresPermissions("operation:rentCarBattey:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Long id, ModelMap mmap)
{
ZcRentCarRuleBattery zcRentCarRuleBattery = zcRentCarRuleBatteryService.selectZcRentCarRuleBatteryById(id);
mmap.put("zcRentCarRuleBattery", zcRentCarRuleBattery);
return prefix + "/edit";
}
/**
* 修改保存租车规则租电规则关联
*/
@RequiresPermissions("operation:rentCarBattey:edit")
@Log(title = "租车规则租电规则关联", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(ZcRentCarRuleBattery zcRentCarRuleBattery)
{
return toAjax(zcRentCarRuleBatteryService.updateZcRentCarRuleBattery(zcRentCarRuleBattery));
}
/**
* 删除租车规则租电规则关联
*/
@RequiresPermissions("operation:rentCarBattey:remove")
@Log(title = "租车规则租电规则关联", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(zcRentCarRuleBatteryService.deleteZcRentCarRuleBatteryByIds(ids));
}
}

View File

@ -0,0 +1,163 @@
package com.ruoyi.operation.controller;
import java.util.List;
import java.util.Random;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.operation.domain.Company;
import com.ruoyi.operation.service.ICompanyService;
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.operation.domain.ZcRentCarRule;
import com.ruoyi.operation.service.IZcRentCarRuleService;
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-07-07
*/
@Controller
@RequestMapping("/operation/rentCarRule")
public class ZcRentCarRuleController extends BaseController
{
private String prefix = "operation/rentCarRule";
@Autowired
private IZcRentCarRuleService zcRentCarRuleService;
@Autowired
private ICompanyService companyService;
@RequiresPermissions("operation:rentCarRule:view")
@GetMapping()
public String rentCarRule(ModelMap mmap)
{
List<Company> companyList = companyService.getCompanyList(new Company(),getSysUser()); // 获取运营商列表
mmap.put("companyList", companyList); // 将运营商列表传递到前端
return prefix + "/rentCarRule";
}
/**
* 查询租车计费规则列表
*/
@RequiresPermissions("operation:rentCarRule:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(ZcRentCarRule zcRentCarRule)
{
startPage();
// 运营者账号,只能查询所属商户数据
if(UserConstants.USER_TYPE_02 .equals(getSysUser().getUserType())){
zcRentCarRule.setOperatingCompanyId(getSysUser().getGroupId());
}
List<ZcRentCarRule> list = zcRentCarRuleService.selectZcRentCarRuleList(zcRentCarRule);
return getDataTable(list);
}
/**
* 导出租车计费规则列表
*/
@RequiresPermissions("operation:rentCarRule:export")
@Log(title = "租车计费规则", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(ZcRentCarRule zcRentCarRule)
{
List<ZcRentCarRule> list = zcRentCarRuleService.selectZcRentCarRuleList(zcRentCarRule);
ExcelUtil<ZcRentCarRule> util = new ExcelUtil<ZcRentCarRule>(ZcRentCarRule.class);
return util.exportExcel(list, "租车计费规则数据");
}
/**
* 新增租车计费规则
*/
@GetMapping("/add")
public String add(ModelMap mmap)
{
List<Company> companyList = companyService.getCompanyList(new Company(),getSysUser()); // 获取运营商列表
mmap.put("companyList", companyList); // 将运营商列表传递到前端
return prefix + "/add";
}
/**
* 新增保存租车计费规则
*/
@RequiresPermissions("operation:rentCarRule:add")
@Log(title = "租车计费规则", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(ZcRentCarRule zcRentCarRule)
{
zcRentCarRule.setRuleCode(generateTimestampBasedCode());
zcRentCarRule.setCreateBy(getLoginName());
return toAjax(zcRentCarRuleService.insertZcRentCarRule(zcRentCarRule));
}
/**
* 修改租车计费规则
*/
@RequiresPermissions("operation:rentCarRule:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Long id, ModelMap mmap)
{
List<Company> companyList = companyService.getCompanyList(new Company(),getSysUser()); // 获取运营商列表
mmap.put("companyList", companyList); // 将运营商列表传递到前端
ZcRentCarRule zcRentCarRule = zcRentCarRuleService.selectZcRentCarRuleById(id);
mmap.put("zcRentCarRule", zcRentCarRule);
return prefix + "/edit";
}
/**
* 修改保存租车计费规则
*/
@RequiresPermissions("operation:rentCarRule:edit")
@Log(title = "租车计费规则", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(ZcRentCarRule zcRentCarRule)
{
zcRentCarRule.setUpdateBy(getLoginName());
return toAjax(zcRentCarRuleService.updateZcRentCarRule(zcRentCarRule));
}
/**
* 删除租车计费规则
*/
@RequiresPermissions("operation:rentCarRule:remove")
@Log(title = "租车计费规则", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(zcRentCarRuleService.deleteZcRentCarRuleByIds(ids));
}
public static String generateTimestampBasedCode() {
Random random = new Random();
// 获取当前时间戳的后6位
long timestampPart = System.currentTimeMillis() % 1000000;
// 生成3位随机数
int randomPart = 100 + random.nextInt(900);
// 组合成9位数
long code = timestampPart * 1000 + randomPart;
return String.format("%09d", code);
}
}

View File

@ -0,0 +1,402 @@
package com.ruoyi.operation.domain;
import java.math.BigDecimal;
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_rent_battey_rule
*
* @author ruoyi
* @date 2025-07-07
*/
public class ZcRentBatteyRule extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** */
private Long id;
/** 商品标题 */
@Excel(name = "商品标题")
private String title;
/** 商品描述 */
@Excel(name = "商品描述")
private String detail;
/** 图标 */
@Excel(name = "图标")
private String icon;
/** 电压 */
@Excel(name = "电压")
private String voltage;
/** 电容 */
@Excel(name = "电容")
private String ah;
/** 最大里程 */
@Excel(name = "最大里程")
private Long maxMileage;
/** 最小里程 默认0 */
@Excel(name = "最小里程 默认0")
private Long minMileage;
/** 押金 */
@Excel(name = "押金")
private BigDecimal depositPrice;
/** 租金 */
@Excel(name = "租金")
private BigDecimal rentPrice;
/** 计时方式 */
@Excel(name = "计时方式")
private Long durationType;
/** 租赁时长 */
@Excel(name = "租赁时长")
private Long duration;
/** 盗抢险 */
@Excel(name = "盗抢险")
private BigDecimal insurancePrice;
/** 是否强制投保 默认0 false */
@Excel(name = "是否强制投保 默认0 false")
private Integer compulsoryInsurance;
/** 保险有效时长 默认12个月 */
@Excel(name = "保险有效时长 默认12个月")
private Long insuranceDuration;
/** 换电次数 */
@Excel(name = "换电次数")
private Long changeNum;
/** 1、有限次数 2无限次数 */
@Excel(name = "1、有限次数 2无限次数")
private Long changeType;
/** */
@Excel(name = "")
private Integer isDelete;
/** */
@Excel(name = "")
private Long cityId;
/** */
@Excel(name = "")
private Long operatorId;
/** */
@Excel(name = "")
private Long provinceId;
/** 电池类型 */
@Excel(name = "电池类型")
private Long categoryId;
/** 套餐类型 换电/租电 */
@Excel(name = "套餐类型 换电/租电")
private Long mealType;
/** 套餐排序规则 */
@Excel(name = "套餐排序规则")
private Long mealSort;
/** */
@Excel(name = "")
private Integer isJoinInvite;
/** 套餐渠道租车默认 id号待定 */
@Excel(name = "套餐渠道租车默认 id号待定")
private Long mealChannel;
/** 购买限制类型 */
@Excel(name = "购买限制类型")
private Long buyLimitType;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setTitle(String title)
{
this.title = title;
}
public String getTitle()
{
return title;
}
public void setDetail(String detail)
{
this.detail = detail;
}
public String getDetail()
{
return detail;
}
public void setIcon(String icon)
{
this.icon = icon;
}
public String getIcon()
{
return icon;
}
public void setVoltage(String voltage)
{
this.voltage = voltage;
}
public String getVoltage()
{
return voltage;
}
public void setAh(String ah)
{
this.ah = ah;
}
public String getAh()
{
return ah;
}
public void setMaxMileage(Long maxMileage)
{
this.maxMileage = maxMileage;
}
public Long getMaxMileage()
{
return maxMileage;
}
public void setMinMileage(Long minMileage)
{
this.minMileage = minMileage;
}
public Long getMinMileage()
{
return minMileage;
}
public void setDepositPrice(BigDecimal depositPrice)
{
this.depositPrice = depositPrice;
}
public BigDecimal getDepositPrice()
{
return depositPrice;
}
public void setRentPrice(BigDecimal rentPrice)
{
this.rentPrice = rentPrice;
}
public BigDecimal getRentPrice()
{
return rentPrice;
}
public void setDurationType(Long durationType)
{
this.durationType = durationType;
}
public Long getDurationType()
{
return durationType;
}
public void setDuration(Long duration)
{
this.duration = duration;
}
public Long getDuration()
{
return duration;
}
public void setInsurancePrice(BigDecimal insurancePrice)
{
this.insurancePrice = insurancePrice;
}
public BigDecimal getInsurancePrice()
{
return insurancePrice;
}
public void setCompulsoryInsurance(Integer compulsoryInsurance)
{
this.compulsoryInsurance = compulsoryInsurance;
}
public Integer getCompulsoryInsurance()
{
return compulsoryInsurance;
}
public void setInsuranceDuration(Long insuranceDuration)
{
this.insuranceDuration = insuranceDuration;
}
public Long getInsuranceDuration()
{
return insuranceDuration;
}
public void setChangeNum(Long changeNum)
{
this.changeNum = changeNum;
}
public Long getChangeNum()
{
return changeNum;
}
public void setChangeType(Long changeType)
{
this.changeType = changeType;
}
public Long getChangeType()
{
return changeType;
}
public void setIsDelete(Integer isDelete)
{
this.isDelete = isDelete;
}
public Integer getIsDelete()
{
return isDelete;
}
public void setCityId(Long cityId)
{
this.cityId = cityId;
}
public Long getCityId()
{
return cityId;
}
public void setOperatorId(Long operatorId)
{
this.operatorId = operatorId;
}
public Long getOperatorId()
{
return operatorId;
}
public void setProvinceId(Long provinceId)
{
this.provinceId = provinceId;
}
public Long getProvinceId()
{
return provinceId;
}
public void setCategoryId(Long categoryId)
{
this.categoryId = categoryId;
}
public Long getCategoryId()
{
return categoryId;
}
public void setMealType(Long mealType)
{
this.mealType = mealType;
}
public Long getMealType()
{
return mealType;
}
public void setMealSort(Long mealSort)
{
this.mealSort = mealSort;
}
public Long getMealSort()
{
return mealSort;
}
public void setIsJoinInvite(Integer isJoinInvite)
{
this.isJoinInvite = isJoinInvite;
}
public Integer getIsJoinInvite()
{
return isJoinInvite;
}
public void setMealChannel(Long mealChannel)
{
this.mealChannel = mealChannel;
}
public Long getMealChannel()
{
return mealChannel;
}
public void setBuyLimitType(Long buyLimitType)
{
this.buyLimitType = buyLimitType;
}
public Long getBuyLimitType()
{
return buyLimitType;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("title", getTitle())
.append("detail", getDetail())
.append("icon", getIcon())
.append("voltage", getVoltage())
.append("ah", getAh())
.append("maxMileage", getMaxMileage())
.append("minMileage", getMinMileage())
.append("depositPrice", getDepositPrice())
.append("rentPrice", getRentPrice())
.append("durationType", getDurationType())
.append("duration", getDuration())
.append("insurancePrice", getInsurancePrice())
.append("compulsoryInsurance", getCompulsoryInsurance())
.append("insuranceDuration", getInsuranceDuration())
.append("changeNum", getChangeNum())
.append("changeType", getChangeType())
.append("isDelete", getIsDelete())
.append("cityId", getCityId())
.append("operatorId", getOperatorId())
.append("provinceId", getProvinceId())
.append("categoryId", getCategoryId())
.append("mealType", getMealType())
.append("mealSort", getMealSort())
.append("isJoinInvite", getIsJoinInvite())
.append("mealChannel", getMealChannel())
.append("buyLimitType", getBuyLimitType())
.toString();
}
}

View File

@ -0,0 +1,314 @@
package com.ruoyi.operation.domain;
import java.math.BigDecimal;
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;
import org.springframework.data.annotation.Transient;
/**
* 租车计费规则对象 zc_rent_car_rule
*
* @author ruoyi
* @date 2025-07-07
*/
public class ZcRentCarRule extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 规则ID */
private Long id;
/** 套餐名称 */
@Excel(name = "套餐名称")
private String ruleName;
/** 套餐编码 */
@Excel(name = "套餐编码")
private String ruleCode;
/** 租赁类型 */
@Excel(name = "租赁类型")
private String rentalType;
/** 租赁天数 */
@Excel(name = "租赁天数当")
private Long rentalDays;
/** 租车价格(元) */
@Excel(name = "租车价格(元)")
private BigDecimal rentalPrice;
/** 押金价格(元) */
@Excel(name = "押金价格(元)")
private BigDecimal depositPrice;
/** 逾期金额(元) */
@Excel(name = "逾期金额(元)")
private BigDecimal overdueFee;
/** 逾期计费类型 */
@Excel(name = "逾期计费类型")
private String overdueType;
/** 是否支持免押 */
@Excel(name = "是否支持免押")
private String depositFree;
/** 是否支持代扣 */
@Excel(name = "是否支持代扣")
private String autoDeduct;
/** 运营商 */
private Long operatingCompanyId;
/** 状态0正常 1停用 */
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
private String status;
/** 是否默认套餐0否 1是 */
@Excel(name = "是否默认套餐", readConverterExp = "0=否,1=是")
private String isDefault;
/** 删除标志0代表存在 2代表删除 */
private String delFlag;
/** 扩展字段1 */
private String extend1;
/** 扩展字段2 */
private String extend2;
/** 扩展字段3 */
private String extend3;
/** 扩展字段4 */
private String extend4;
/** 扩展字段5 */
private String extend5;
@Transient
private String operatingCompanyName;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setRuleName(String ruleName)
{
this.ruleName = ruleName;
}
public String getRuleName()
{
return ruleName;
}
public void setRuleCode(String ruleCode)
{
this.ruleCode = ruleCode;
}
public String getRuleCode()
{
return ruleCode;
}
public void setRentalType(String rentalType)
{
this.rentalType = rentalType;
}
public String getRentalType()
{
return rentalType;
}
public void setRentalDays(Long rentalDays)
{
this.rentalDays = rentalDays;
}
public Long getRentalDays()
{
return rentalDays;
}
public void setRentalPrice(BigDecimal rentalPrice)
{
this.rentalPrice = rentalPrice;
}
public BigDecimal getRentalPrice()
{
return rentalPrice;
}
public void setDepositPrice(BigDecimal depositPrice)
{
this.depositPrice = depositPrice;
}
public BigDecimal getDepositPrice()
{
return depositPrice;
}
public void setOverdueFee(BigDecimal overdueFee)
{
this.overdueFee = overdueFee;
}
public BigDecimal getOverdueFee()
{
return overdueFee;
}
public void setOverdueType(String overdueType)
{
this.overdueType = overdueType;
}
public String getOverdueType()
{
return overdueType;
}
public void setDepositFree(String depositFree)
{
this.depositFree = depositFree;
}
public String getDepositFree()
{
return depositFree;
}
public void setAutoDeduct(String autoDeduct)
{
this.autoDeduct = autoDeduct;
}
public String getAutoDeduct()
{
return autoDeduct;
}
public Long getOperatingCompanyId() {
return operatingCompanyId;
}
public void setOperatingCompanyId(Long operatingCompanyId) {
this.operatingCompanyId = operatingCompanyId;
}
public void setStatus(String status)
{
this.status = status;
}
public String getStatus()
{
return status;
}
public void setIsDefault(String isDefault)
{
this.isDefault = isDefault;
}
public String getIsDefault()
{
return isDefault;
}
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
public String getDelFlag()
{
return delFlag;
}
public void setExtend1(String extend1)
{
this.extend1 = extend1;
}
public String getExtend1()
{
return extend1;
}
public void setExtend2(String extend2)
{
this.extend2 = extend2;
}
public String getExtend2()
{
return extend2;
}
public void setExtend3(String extend3)
{
this.extend3 = extend3;
}
public String getExtend3()
{
return extend3;
}
public void setExtend4(String extend4)
{
this.extend4 = extend4;
}
public String getExtend4()
{
return extend4;
}
public void setExtend5(String extend5)
{
this.extend5 = extend5;
}
public String getExtend5()
{
return extend5;
}
public String getOperatingCompanyName() {
return operatingCompanyName;
}
public void setOperatingCompanyName(String operatingCompanyName) {
this.operatingCompanyName = operatingCompanyName;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("ruleName", getRuleName())
.append("ruleCode", getRuleCode())
.append("rentalType", getRentalType())
.append("rentalDays", getRentalDays())
.append("rentalPrice", getRentalPrice())
.append("depositPrice", getDepositPrice())
.append("overdueFee", getOverdueFee())
.append("overdueType", getOverdueType())
.append("depositFree", getDepositFree())
.append("autoDeduct", getAutoDeduct())
.append("operatingCompanyId", getOperatingCompanyId())
.append("status", getStatus())
.append("isDefault", getIsDefault())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("extend1", getExtend1())
.append("extend2", getExtend2())
.append("extend3", getExtend3())
.append("extend4", getExtend4())
.append("extend5", getExtend5())
.toString();
}
}

View File

@ -0,0 +1,97 @@
package com.ruoyi.operation.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_rent_car_rule_battery
*
* @author ruoyi
* @date 2025-07-07
*/
public class ZcRentCarRuleBattery extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 规则ID */
private Long id;
/** */
@Excel(name = "")
private Long carRuleId;
/** */
@Excel(name = "")
private Long batteryRuleId;
/** */
@Excel(name = "")
private Long sortOrder;
/** 删除标志0代表存在 2代表删除 */
private String delFlag;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setCarRuleId(Long carRuleId)
{
this.carRuleId = carRuleId;
}
public Long getCarRuleId()
{
return carRuleId;
}
public void setBatteryRuleId(Long batteryRuleId)
{
this.batteryRuleId = batteryRuleId;
}
public Long getBatteryRuleId()
{
return batteryRuleId;
}
public void setSortOrder(Long sortOrder)
{
this.sortOrder = sortOrder;
}
public Long getSortOrder()
{
return sortOrder;
}
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("carRuleId", getCarRuleId())
.append("batteryRuleId", getBatteryRuleId())
.append("sortOrder", getSortOrder())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.operation.mapper;
import java.util.List;
import com.ruoyi.operation.domain.ZcRentBatteyRule;
/**
* 租电套餐Mapper接口
*
* @author ruoyi
* @date 2025-07-07
*/
public interface ZcRentBatteyRuleMapper
{
/**
* 查询租电套餐
*
* @param id 租电套餐主键
* @return 租电套餐
*/
public ZcRentBatteyRule selectZcRentBatteyRuleById(Long id);
/**
* 查询租电套餐列表
*
* @param zcRentBatteyRule 租电套餐
* @return 租电套餐集合
*/
public List<ZcRentBatteyRule> selectZcRentBatteyRuleList(ZcRentBatteyRule zcRentBatteyRule);
/**
* 新增租电套餐
*
* @param zcRentBatteyRule 租电套餐
* @return 结果
*/
public int insertZcRentBatteyRule(ZcRentBatteyRule zcRentBatteyRule);
/**
* 修改租电套餐
*
* @param zcRentBatteyRule 租电套餐
* @return 结果
*/
public int updateZcRentBatteyRule(ZcRentBatteyRule zcRentBatteyRule);
/**
* 删除租电套餐
*
* @param id 租电套餐主键
* @return 结果
*/
public int deleteZcRentBatteyRuleById(Long id);
/**
* 批量删除租电套餐
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteZcRentBatteyRuleByIds(String[] ids);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.operation.mapper;
import java.util.List;
import com.ruoyi.operation.domain.ZcRentCarRuleBattery;
/**
* 租车规则租电规则关联Mapper接口
*
* @author ruoyi
* @date 2025-07-07
*/
public interface ZcRentCarRuleBatteryMapper
{
/**
* 查询租车规则租电规则关联
*
* @param id 租车规则租电规则关联主键
* @return 租车规则租电规则关联
*/
public ZcRentCarRuleBattery selectZcRentCarRuleBatteryById(Long id);
/**
* 查询租车规则租电规则关联列表
*
* @param zcRentCarRuleBattery 租车规则租电规则关联
* @return 租车规则租电规则关联集合
*/
public List<ZcRentCarRuleBattery> selectZcRentCarRuleBatteryList(ZcRentCarRuleBattery zcRentCarRuleBattery);
/**
* 新增租车规则租电规则关联
*
* @param zcRentCarRuleBattery 租车规则租电规则关联
* @return 结果
*/
public int insertZcRentCarRuleBattery(ZcRentCarRuleBattery zcRentCarRuleBattery);
/**
* 修改租车规则租电规则关联
*
* @param zcRentCarRuleBattery 租车规则租电规则关联
* @return 结果
*/
public int updateZcRentCarRuleBattery(ZcRentCarRuleBattery zcRentCarRuleBattery);
/**
* 删除租车规则租电规则关联
*
* @param id 租车规则租电规则关联主键
* @return 结果
*/
public int deleteZcRentCarRuleBatteryById(Long id);
/**
* 批量删除租车规则租电规则关联
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteZcRentCarRuleBatteryByIds(String[] ids);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.operation.mapper;
import java.util.List;
import com.ruoyi.operation.domain.ZcRentCarRule;
/**
* 租车计费规则Mapper接口
*
* @author ruoyi
* @date 2025-07-07
*/
public interface ZcRentCarRuleMapper
{
/**
* 查询租车计费规则
*
* @param id 租车计费规则主键
* @return 租车计费规则
*/
public ZcRentCarRule selectZcRentCarRuleById(Long id);
/**
* 查询租车计费规则列表
*
* @param zcRentCarRule 租车计费规则
* @return 租车计费规则集合
*/
public List<ZcRentCarRule> selectZcRentCarRuleList(ZcRentCarRule zcRentCarRule);
/**
* 新增租车计费规则
*
* @param zcRentCarRule 租车计费规则
* @return 结果
*/
public int insertZcRentCarRule(ZcRentCarRule zcRentCarRule);
/**
* 修改租车计费规则
*
* @param zcRentCarRule 租车计费规则
* @return 结果
*/
public int updateZcRentCarRule(ZcRentCarRule zcRentCarRule);
/**
* 删除租车计费规则
*
* @param id 租车计费规则主键
* @return 结果
*/
public int deleteZcRentCarRuleById(Long id);
/**
* 批量删除租车计费规则
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteZcRentCarRuleByIds(String[] ids);
}

View File

@ -1,6 +1,8 @@
package com.ruoyi.operation.service;
import java.util.List;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.operation.domain.Company;
/**
@ -27,7 +29,7 @@ public interface ICompanyService
*/
public List<Company> selectCompanyList(Company company);
public List<Company> getCompanyList(Company company, SysUser user);
/**
* 校验手机号是否唯一

View File

@ -0,0 +1,61 @@
package com.ruoyi.operation.service;
import java.util.List;
import com.ruoyi.operation.domain.ZcRentBatteyRule;
/**
* 租电套餐Service接口
*
* @author ruoyi
* @date 2025-07-07
*/
public interface IZcRentBatteyRuleService
{
/**
* 查询租电套餐
*
* @param id 租电套餐主键
* @return 租电套餐
*/
public ZcRentBatteyRule selectZcRentBatteyRuleById(Long id);
/**
* 查询租电套餐列表
*
* @param zcRentBatteyRule 租电套餐
* @return 租电套餐集合
*/
public List<ZcRentBatteyRule> selectZcRentBatteyRuleList(ZcRentBatteyRule zcRentBatteyRule);
/**
* 新增租电套餐
*
* @param zcRentBatteyRule 租电套餐
* @return 结果
*/
public int insertZcRentBatteyRule(ZcRentBatteyRule zcRentBatteyRule);
/**
* 修改租电套餐
*
* @param zcRentBatteyRule 租电套餐
* @return 结果
*/
public int updateZcRentBatteyRule(ZcRentBatteyRule zcRentBatteyRule);
/**
* 批量删除租电套餐
*
* @param ids 需要删除的租电套餐主键集合
* @return 结果
*/
public int deleteZcRentBatteyRuleByIds(String ids);
/**
* 删除租电套餐信息
*
* @param id 租电套餐主键
* @return 结果
*/
public int deleteZcRentBatteyRuleById(Long id);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.operation.service;
import java.util.List;
import com.ruoyi.operation.domain.ZcRentCarRuleBattery;
/**
* 租车规则租电规则关联Service接口
*
* @author ruoyi
* @date 2025-07-07
*/
public interface IZcRentCarRuleBatteryService
{
/**
* 查询租车规则租电规则关联
*
* @param id 租车规则租电规则关联主键
* @return 租车规则租电规则关联
*/
public ZcRentCarRuleBattery selectZcRentCarRuleBatteryById(Long id);
/**
* 查询租车规则租电规则关联列表
*
* @param zcRentCarRuleBattery 租车规则租电规则关联
* @return 租车规则租电规则关联集合
*/
public List<ZcRentCarRuleBattery> selectZcRentCarRuleBatteryList(ZcRentCarRuleBattery zcRentCarRuleBattery);
/**
* 新增租车规则租电规则关联
*
* @param zcRentCarRuleBattery 租车规则租电规则关联
* @return 结果
*/
public int insertZcRentCarRuleBattery(ZcRentCarRuleBattery zcRentCarRuleBattery);
/**
* 修改租车规则租电规则关联
*
* @param zcRentCarRuleBattery 租车规则租电规则关联
* @return 结果
*/
public int updateZcRentCarRuleBattery(ZcRentCarRuleBattery zcRentCarRuleBattery);
/**
* 批量删除租车规则租电规则关联
*
* @param ids 需要删除的租车规则租电规则关联主键集合
* @return 结果
*/
public int deleteZcRentCarRuleBatteryByIds(String ids);
/**
* 删除租车规则租电规则关联信息
*
* @param id 租车规则租电规则关联主键
* @return 结果
*/
public int deleteZcRentCarRuleBatteryById(Long id);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.operation.service;
import java.util.List;
import com.ruoyi.operation.domain.ZcRentCarRule;
/**
* 租车计费规则Service接口
*
* @author ruoyi
* @date 2025-07-07
*/
public interface IZcRentCarRuleService
{
/**
* 查询租车计费规则
*
* @param id 租车计费规则主键
* @return 租车计费规则
*/
public ZcRentCarRule selectZcRentCarRuleById(Long id);
/**
* 查询租车计费规则列表
*
* @param zcRentCarRule 租车计费规则
* @return 租车计费规则集合
*/
public List<ZcRentCarRule> selectZcRentCarRuleList(ZcRentCarRule zcRentCarRule);
/**
* 新增租车计费规则
*
* @param zcRentCarRule 租车计费规则
* @return 结果
*/
public int insertZcRentCarRule(ZcRentCarRule zcRentCarRule);
/**
* 修改租车计费规则
*
* @param zcRentCarRule 租车计费规则
* @return 结果
*/
public int updateZcRentCarRule(ZcRentCarRule zcRentCarRule);
/**
* 批量删除租车计费规则
*
* @param ids 需要删除的租车计费规则主键集合
* @return 结果
*/
public int deleteZcRentCarRuleByIds(String ids);
/**
* 删除租车计费规则信息
*
* @param id 租车计费规则主键
* @return 结果
*/
public int deleteZcRentCarRuleById(Long id);
}

View File

@ -2,6 +2,7 @@ package com.ruoyi.operation.service.impl;
import java.util.List;
import com.ruoyi.common.constant.CompanyConstants;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
@ -50,7 +51,16 @@ public class CompanyServiceImpl implements ICompanyService
return companyMapper.selectCompanyList(company);
}
@Override
public List<Company> getCompanyList(Company company,SysUser user)
{
company.setStatus(CompanyConstants.company_status_0);
// 运营者账号,只能查询所属商户数据
if(UserConstants.USER_TYPE_02 .equals(user.getUserType())){
company.setId(user.getGroupId());
}
return companyMapper.selectCompanyList(company);
}
@Override
public String checkPhoneUnique(Company company){

View File

@ -0,0 +1,94 @@
package com.ruoyi.operation.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.operation.mapper.ZcRentBatteyRuleMapper;
import com.ruoyi.operation.domain.ZcRentBatteyRule;
import com.ruoyi.operation.service.IZcRentBatteyRuleService;
import com.ruoyi.common.core.text.Convert;
/**
* 租电套餐Service业务层处理
*
* @author ruoyi
* @date 2025-07-07
*/
@Service
public class ZcRentBatteyRuleServiceImpl implements IZcRentBatteyRuleService
{
@Autowired
private ZcRentBatteyRuleMapper zcRentBatteyRuleMapper;
/**
* 查询租电套餐
*
* @param id 租电套餐主键
* @return 租电套餐
*/
@Override
public ZcRentBatteyRule selectZcRentBatteyRuleById(Long id)
{
return zcRentBatteyRuleMapper.selectZcRentBatteyRuleById(id);
}
/**
* 查询租电套餐列表
*
* @param zcRentBatteyRule 租电套餐
* @return 租电套餐
*/
@Override
public List<ZcRentBatteyRule> selectZcRentBatteyRuleList(ZcRentBatteyRule zcRentBatteyRule)
{
return zcRentBatteyRuleMapper.selectZcRentBatteyRuleList(zcRentBatteyRule);
}
/**
* 新增租电套餐
*
* @param zcRentBatteyRule 租电套餐
* @return 结果
*/
@Override
public int insertZcRentBatteyRule(ZcRentBatteyRule zcRentBatteyRule)
{
return zcRentBatteyRuleMapper.insertZcRentBatteyRule(zcRentBatteyRule);
}
/**
* 修改租电套餐
*
* @param zcRentBatteyRule 租电套餐
* @return 结果
*/
@Override
public int updateZcRentBatteyRule(ZcRentBatteyRule zcRentBatteyRule)
{
return zcRentBatteyRuleMapper.updateZcRentBatteyRule(zcRentBatteyRule);
}
/**
* 批量删除租电套餐
*
* @param ids 需要删除的租电套餐主键
* @return 结果
*/
@Override
public int deleteZcRentBatteyRuleByIds(String ids)
{
return zcRentBatteyRuleMapper.deleteZcRentBatteyRuleByIds(Convert.toStrArray(ids));
}
/**
* 删除租电套餐信息
*
* @param id 租电套餐主键
* @return 结果
*/
@Override
public int deleteZcRentBatteyRuleById(Long id)
{
return zcRentBatteyRuleMapper.deleteZcRentBatteyRuleById(id);
}
}

View File

@ -0,0 +1,97 @@
package com.ruoyi.operation.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.operation.mapper.ZcRentCarRuleBatteryMapper;
import com.ruoyi.operation.domain.ZcRentCarRuleBattery;
import com.ruoyi.operation.service.IZcRentCarRuleBatteryService;
import com.ruoyi.common.core.text.Convert;
/**
* 租车规则租电规则关联Service业务层处理
*
* @author ruoyi
* @date 2025-07-07
*/
@Service
public class ZcRentCarRuleBatteryServiceImpl implements IZcRentCarRuleBatteryService
{
@Autowired
private ZcRentCarRuleBatteryMapper zcRentCarRuleBatteryMapper;
/**
* 查询租车规则租电规则关联
*
* @param id 租车规则租电规则关联主键
* @return 租车规则租电规则关联
*/
@Override
public ZcRentCarRuleBattery selectZcRentCarRuleBatteryById(Long id)
{
return zcRentCarRuleBatteryMapper.selectZcRentCarRuleBatteryById(id);
}
/**
* 查询租车规则租电规则关联列表
*
* @param zcRentCarRuleBattery 租车规则租电规则关联
* @return 租车规则租电规则关联
*/
@Override
public List<ZcRentCarRuleBattery> selectZcRentCarRuleBatteryList(ZcRentCarRuleBattery zcRentCarRuleBattery)
{
return zcRentCarRuleBatteryMapper.selectZcRentCarRuleBatteryList(zcRentCarRuleBattery);
}
/**
* 新增租车规则租电规则关联
*
* @param zcRentCarRuleBattery 租车规则租电规则关联
* @return 结果
*/
@Override
public int insertZcRentCarRuleBattery(ZcRentCarRuleBattery zcRentCarRuleBattery)
{
zcRentCarRuleBattery.setCreateTime(DateUtils.getNowDate());
return zcRentCarRuleBatteryMapper.insertZcRentCarRuleBattery(zcRentCarRuleBattery);
}
/**
* 修改租车规则租电规则关联
*
* @param zcRentCarRuleBattery 租车规则租电规则关联
* @return 结果
*/
@Override
public int updateZcRentCarRuleBattery(ZcRentCarRuleBattery zcRentCarRuleBattery)
{
zcRentCarRuleBattery.setUpdateTime(DateUtils.getNowDate());
return zcRentCarRuleBatteryMapper.updateZcRentCarRuleBattery(zcRentCarRuleBattery);
}
/**
* 批量删除租车规则租电规则关联
*
* @param ids 需要删除的租车规则租电规则关联主键
* @return 结果
*/
@Override
public int deleteZcRentCarRuleBatteryByIds(String ids)
{
return zcRentCarRuleBatteryMapper.deleteZcRentCarRuleBatteryByIds(Convert.toStrArray(ids));
}
/**
* 删除租车规则租电规则关联信息
*
* @param id 租车规则租电规则关联主键
* @return 结果
*/
@Override
public int deleteZcRentCarRuleBatteryById(Long id)
{
return zcRentCarRuleBatteryMapper.deleteZcRentCarRuleBatteryById(id);
}
}

View File

@ -0,0 +1,98 @@
package com.ruoyi.operation.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.operation.mapper.ZcRentCarRuleMapper;
import com.ruoyi.operation.domain.ZcRentCarRule;
import com.ruoyi.operation.service.IZcRentCarRuleService;
import com.ruoyi.common.core.text.Convert;
/**
* 租车计费规则Service业务层处理
*
* @author ruoyi
* @date 2025-07-07
*/
@Service
public class ZcRentCarRuleServiceImpl implements IZcRentCarRuleService
{
@Autowired
private ZcRentCarRuleMapper zcRentCarRuleMapper;
/**
* 查询租车计费规则
*
* @param id 租车计费规则主键
* @return 租车计费规则
*/
@Override
public ZcRentCarRule selectZcRentCarRuleById(Long id)
{
return zcRentCarRuleMapper.selectZcRentCarRuleById(id);
}
/**
* 查询租车计费规则列表
*
* @param zcRentCarRule 租车计费规则
* @return 租车计费规则
*/
@Override
public List<ZcRentCarRule> selectZcRentCarRuleList(ZcRentCarRule zcRentCarRule)
{
return zcRentCarRuleMapper.selectZcRentCarRuleList(zcRentCarRule);
}
/**
* 新增租车计费规则
*
* @param zcRentCarRule 租车计费规则
* @return 结果
*/
@Override
public int insertZcRentCarRule(ZcRentCarRule zcRentCarRule)
{
zcRentCarRule.setCreateTime(DateUtils.getNowDate());
zcRentCarRule.setUpdateTime(DateUtils.getNowDate());
return zcRentCarRuleMapper.insertZcRentCarRule(zcRentCarRule);
}
/**
* 修改租车计费规则
*
* @param zcRentCarRule 租车计费规则
* @return 结果
*/
@Override
public int updateZcRentCarRule(ZcRentCarRule zcRentCarRule)
{
zcRentCarRule.setUpdateTime(DateUtils.getNowDate());
return zcRentCarRuleMapper.updateZcRentCarRule(zcRentCarRule);
}
/**
* 批量删除租车计费规则
*
* @param ids 需要删除的租车计费规则主键
* @return 结果
*/
@Override
public int deleteZcRentCarRuleByIds(String ids)
{
return zcRentCarRuleMapper.deleteZcRentCarRuleByIds(Convert.toStrArray(ids));
}
/**
* 删除租车计费规则信息
*
* @param id 租车计费规则主键
* @return 结果
*/
@Override
public int deleteZcRentCarRuleById(Long id)
{
return zcRentCarRuleMapper.deleteZcRentCarRuleById(id);
}
}

View File

@ -0,0 +1,182 @@
<?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.operation.mapper.ZcRentBatteyRuleMapper">
<resultMap type="ZcRentBatteyRule" id="ZcRentBatteyRuleResult">
<result property="id" column="id" />
<result property="title" column="title" />
<result property="detail" column="detail" />
<result property="icon" column="icon" />
<result property="voltage" column="voltage" />
<result property="ah" column="ah" />
<result property="maxMileage" column="max_mileage" />
<result property="minMileage" column="min_mileage" />
<result property="depositPrice" column="deposit_price" />
<result property="rentPrice" column="rent_price" />
<result property="durationType" column="duration_type" />
<result property="duration" column="duration" />
<result property="insurancePrice" column="insurance_price" />
<result property="compulsoryInsurance" column="compulsory_insurance" />
<result property="insuranceDuration" column="insurance_duration" />
<result property="changeNum" column="change_num" />
<result property="changeType" column="change_type" />
<result property="isDelete" column="is_delete" />
<result property="cityId" column="city_id" />
<result property="operatorId" column="operator_id" />
<result property="provinceId" column="province_id" />
<result property="categoryId" column="category_id" />
<result property="mealType" column="meal_type" />
<result property="mealSort" column="meal_sort" />
<result property="isJoinInvite" column="is_join_invite" />
<result property="mealChannel" column="meal_channel" />
<result property="buyLimitType" column="buy_limit_type" />
</resultMap>
<sql id="selectZcRentBatteyRuleVo">
select id, title, detail, icon, voltage, ah, max_mileage, min_mileage, deposit_price, rent_price, duration_type, duration, insurance_price, compulsory_insurance, insurance_duration, change_num, change_type, is_delete, city_id, operator_id, province_id, category_id, meal_type, meal_sort, is_join_invite, meal_channel, buy_limit_type from zc_rent_battey_rule
</sql>
<select id="selectZcRentBatteyRuleList" parameterType="ZcRentBatteyRule" resultMap="ZcRentBatteyRuleResult">
<include refid="selectZcRentBatteyRuleVo"/>
<where>
<if test="title != null and title != ''"> and title = #{title}</if>
<if test="detail != null and detail != ''"> and detail = #{detail}</if>
<if test="icon != null and icon != ''"> and icon = #{icon}</if>
<if test="voltage != null and voltage != ''"> and voltage = #{voltage}</if>
<if test="ah != null and ah != ''"> and ah = #{ah}</if>
<if test="maxMileage != null "> and max_mileage = #{maxMileage}</if>
<if test="minMileage != null "> and min_mileage = #{minMileage}</if>
<if test="depositPrice != null "> and deposit_price = #{depositPrice}</if>
<if test="rentPrice != null "> and rent_price = #{rentPrice}</if>
<if test="durationType != null "> and duration_type = #{durationType}</if>
<if test="duration != null "> and duration = #{duration}</if>
<if test="insurancePrice != null "> and insurance_price = #{insurancePrice}</if>
<if test="compulsoryInsurance != null "> and compulsory_insurance = #{compulsoryInsurance}</if>
<if test="insuranceDuration != null "> and insurance_duration = #{insuranceDuration}</if>
<if test="changeNum != null "> and change_num = #{changeNum}</if>
<if test="changeType != null "> and change_type = #{changeType}</if>
<if test="isDelete != null "> and is_delete = #{isDelete}</if>
<if test="cityId != null "> and city_id = #{cityId}</if>
<if test="operatorId != null "> and operator_id = #{operatorId}</if>
<if test="provinceId != null "> and province_id = #{provinceId}</if>
<if test="categoryId != null "> and category_id = #{categoryId}</if>
<if test="mealType != null "> and meal_type = #{mealType}</if>
<if test="mealSort != null "> and meal_sort = #{mealSort}</if>
<if test="isJoinInvite != null "> and is_join_invite = #{isJoinInvite}</if>
<if test="mealChannel != null "> and meal_channel = #{mealChannel}</if>
<if test="buyLimitType != null "> and buy_limit_type = #{buyLimitType}</if>
</where>
</select>
<select id="selectZcRentBatteyRuleById" parameterType="Long" resultMap="ZcRentBatteyRuleResult">
<include refid="selectZcRentBatteyRuleVo"/>
where id = #{id}
</select>
<insert id="insertZcRentBatteyRule" parameterType="ZcRentBatteyRule" useGeneratedKeys="true" keyProperty="id">
insert into zc_rent_battey_rule
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="title != null and title != ''">title,</if>
<if test="detail != null and detail != ''">detail,</if>
<if test="icon != null">icon,</if>
<if test="voltage != null and voltage != ''">voltage,</if>
<if test="ah != null and ah != ''">ah,</if>
<if test="maxMileage != null">max_mileage,</if>
<if test="minMileage != null">min_mileage,</if>
<if test="depositPrice != null">deposit_price,</if>
<if test="rentPrice != null">rent_price,</if>
<if test="durationType != null">duration_type,</if>
<if test="duration != null">duration,</if>
<if test="insurancePrice != null">insurance_price,</if>
<if test="compulsoryInsurance != null">compulsory_insurance,</if>
<if test="insuranceDuration != null">insurance_duration,</if>
<if test="changeNum != null">change_num,</if>
<if test="changeType != null">change_type,</if>
<if test="isDelete != null">is_delete,</if>
<if test="cityId != null">city_id,</if>
<if test="operatorId != null">operator_id,</if>
<if test="provinceId != null">province_id,</if>
<if test="categoryId != null">category_id,</if>
<if test="mealType != null">meal_type,</if>
<if test="mealSort != null">meal_sort,</if>
<if test="isJoinInvite != null">is_join_invite,</if>
<if test="mealChannel != null">meal_channel,</if>
<if test="buyLimitType != null">buy_limit_type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="title != null and title != ''">#{title},</if>
<if test="detail != null and detail != ''">#{detail},</if>
<if test="icon != null">#{icon},</if>
<if test="voltage != null and voltage != ''">#{voltage},</if>
<if test="ah != null and ah != ''">#{ah},</if>
<if test="maxMileage != null">#{maxMileage},</if>
<if test="minMileage != null">#{minMileage},</if>
<if test="depositPrice != null">#{depositPrice},</if>
<if test="rentPrice != null">#{rentPrice},</if>
<if test="durationType != null">#{durationType},</if>
<if test="duration != null">#{duration},</if>
<if test="insurancePrice != null">#{insurancePrice},</if>
<if test="compulsoryInsurance != null">#{compulsoryInsurance},</if>
<if test="insuranceDuration != null">#{insuranceDuration},</if>
<if test="changeNum != null">#{changeNum},</if>
<if test="changeType != null">#{changeType},</if>
<if test="isDelete != null">#{isDelete},</if>
<if test="cityId != null">#{cityId},</if>
<if test="operatorId != null">#{operatorId},</if>
<if test="provinceId != null">#{provinceId},</if>
<if test="categoryId != null">#{categoryId},</if>
<if test="mealType != null">#{mealType},</if>
<if test="mealSort != null">#{mealSort},</if>
<if test="isJoinInvite != null">#{isJoinInvite},</if>
<if test="mealChannel != null">#{mealChannel},</if>
<if test="buyLimitType != null">#{buyLimitType},</if>
</trim>
</insert>
<update id="updateZcRentBatteyRule" parameterType="ZcRentBatteyRule">
update zc_rent_battey_rule
<trim prefix="SET" suffixOverrides=",">
<if test="title != null and title != ''">title = #{title},</if>
<if test="detail != null and detail != ''">detail = #{detail},</if>
<if test="icon != null">icon = #{icon},</if>
<if test="voltage != null and voltage != ''">voltage = #{voltage},</if>
<if test="ah != null and ah != ''">ah = #{ah},</if>
<if test="maxMileage != null">max_mileage = #{maxMileage},</if>
<if test="minMileage != null">min_mileage = #{minMileage},</if>
<if test="depositPrice != null">deposit_price = #{depositPrice},</if>
<if test="rentPrice != null">rent_price = #{rentPrice},</if>
<if test="durationType != null">duration_type = #{durationType},</if>
<if test="duration != null">duration = #{duration},</if>
<if test="insurancePrice != null">insurance_price = #{insurancePrice},</if>
<if test="compulsoryInsurance != null">compulsory_insurance = #{compulsoryInsurance},</if>
<if test="insuranceDuration != null">insurance_duration = #{insuranceDuration},</if>
<if test="changeNum != null">change_num = #{changeNum},</if>
<if test="changeType != null">change_type = #{changeType},</if>
<if test="isDelete != null">is_delete = #{isDelete},</if>
<if test="cityId != null">city_id = #{cityId},</if>
<if test="operatorId != null">operator_id = #{operatorId},</if>
<if test="provinceId != null">province_id = #{provinceId},</if>
<if test="categoryId != null">category_id = #{categoryId},</if>
<if test="mealType != null">meal_type = #{mealType},</if>
<if test="mealSort != null">meal_sort = #{mealSort},</if>
<if test="isJoinInvite != null">is_join_invite = #{isJoinInvite},</if>
<if test="mealChannel != null">meal_channel = #{mealChannel},</if>
<if test="buyLimitType != null">buy_limit_type = #{buyLimitType},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteZcRentBatteyRuleById" parameterType="Long">
delete from zc_rent_battey_rule where id = #{id}
</delete>
<delete id="deleteZcRentBatteyRuleByIds" parameterType="String">
delete from zc_rent_battey_rule where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,91 @@
<?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.operation.mapper.ZcRentCarRuleBatteryMapper">
<resultMap type="ZcRentCarRuleBattery" id="ZcRentCarRuleBatteryResult">
<result property="id" column="id" />
<result property="carRuleId" column="car_rule_id" />
<result property="batteryRuleId" column="battery_rule_id" />
<result property="sortOrder" column="sort_order" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectZcRentCarRuleBatteryVo">
select id, car_rule_id, battery_rule_id, sort_order, del_flag, create_by, create_time, update_by, update_time, remark from zc_rent_car_rule_battery
</sql>
<select id="selectZcRentCarRuleBatteryList" parameterType="ZcRentCarRuleBattery" resultMap="ZcRentCarRuleBatteryResult">
<include refid="selectZcRentCarRuleBatteryVo"/>
<where>
<if test="carRuleId != null "> and car_rule_id = #{carRuleId}</if>
<if test="batteryRuleId != null "> and battery_rule_id = #{batteryRuleId}</if>
<if test="sortOrder != null "> and sort_order = #{sortOrder}</if>
</where>
</select>
<select id="selectZcRentCarRuleBatteryById" parameterType="Long" resultMap="ZcRentCarRuleBatteryResult">
<include refid="selectZcRentCarRuleBatteryVo"/>
where id = #{id}
</select>
<insert id="insertZcRentCarRuleBattery" parameterType="ZcRentCarRuleBattery" useGeneratedKeys="true" keyProperty="id">
insert into zc_rent_car_rule_battery
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="carRuleId != null">car_rule_id,</if>
<if test="batteryRuleId != null">battery_rule_id,</if>
<if test="sortOrder != null">sort_order,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="carRuleId != null">#{carRuleId},</if>
<if test="batteryRuleId != null">#{batteryRuleId},</if>
<if test="sortOrder != null">#{sortOrder},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateZcRentCarRuleBattery" parameterType="ZcRentCarRuleBattery">
update zc_rent_car_rule_battery
<trim prefix="SET" suffixOverrides=",">
<if test="carRuleId != null">car_rule_id = #{carRuleId},</if>
<if test="batteryRuleId != null">battery_rule_id = #{batteryRuleId},</if>
<if test="sortOrder != null">sort_order = #{sortOrder},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteZcRentCarRuleBatteryById" parameterType="Long">
delete from zc_rent_car_rule_battery where id = #{id}
</delete>
<delete id="deleteZcRentCarRuleBatteryByIds" parameterType="String">
delete from zc_rent_car_rule_battery where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,165 @@
<?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.operation.mapper.ZcRentCarRuleMapper">
<resultMap type="ZcRentCarRule" id="ZcRentCarRuleResult">
<result property="id" column="id" />
<result property="ruleName" column="rule_name" />
<result property="ruleCode" column="rule_code" />
<result property="rentalType" column="rental_type" />
<result property="rentalDays" column="rental_days" />
<result property="rentalPrice" column="rental_price" />
<result property="depositPrice" column="deposit_price" />
<result property="overdueFee" column="overdue_fee" />
<result property="overdueType" column="overdue_type" />
<result property="depositFree" column="deposit_free" />
<result property="autoDeduct" column="auto_deduct" />
<result property="operatingCompanyId" column="operating_company_id" />
<result property="operatingCompanyName" column="operating_company_name" />
<result property="status" column="status" />
<result property="isDefault" column="is_default" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="extend1" column="extend1" />
<result property="extend2" column="extend2" />
<result property="extend3" column="extend3" />
<result property="extend4" column="extend4" />
<result property="extend5" column="extend5" />
</resultMap>
<sql id="selectZcRentCarRuleVo">
select id, rule_name, rule_code, rental_type, rental_days, rental_price, deposit_price, overdue_fee, overdue_type, deposit_free, auto_deduct, operating_company_id, status, is_default, del_flag, create_by, create_time, update_by, update_time, remark, extend1, extend2, extend3, extend4, extend5 from zc_rent_car_rule
</sql>
<select id="selectZcRentCarRuleList" parameterType="ZcRentCarRule" resultMap="ZcRentCarRuleResult">
select a.id, a.rule_name, a.rule_code, a.rental_type, a.rental_days, a.rental_price, a.deposit_price, a.overdue_fee, a.overdue_type, a.deposit_free, a.auto_deduct, a.operating_company_id, a.status, a.is_default, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, a.extend1, a.extend2, a.extend3, a.extend4, a.extend5
,c.company_name as operating_company_name
from zc_rent_car_rule a
left join zc_company c on c.id = a.operating_company_id
<where>
<if test="ruleName != null and ruleName != ''"> and a.rule_name like concat('%', #{ruleName}, '%')</if>
<if test="ruleCode != null and ruleCode != ''"> and a.rule_code = #{ruleCode}</if>
<if test="rentalType != null and rentalType != ''"> and a.rental_type = #{rentalType}</if>
<if test="rentalDays != null "> and a.rental_days = #{rentalDays}</if>
<if test="rentalPrice != null "> and a.rental_price = #{rentalPrice}</if>
<if test="depositPrice != null "> and a.deposit_price = #{depositPrice}</if>
<if test="overdueFee != null "> and a.overdue_fee = #{overdueFee}</if>
<if test="overdueType != null and overdueType != ''"> and a.overdue_type = #{overdueType}</if>
<if test="depositFree != null and depositFree != ''"> and a.deposit_free = #{depositFree}</if>
<if test="autoDeduct != null and autoDeduct != ''"> and a.auto_deduct = #{autoDeduct}</if>
<if test="operatingCompanyId != null and operatingCompanyId != ''"> and a.operating_company_id = #{operatingCompanyId}</if>
<if test="status != null and status != ''"> and a.status = #{status}</if>
<if test="isDefault != null and isDefault != ''"> and a.is_default = #{isDefault}</if>
</where>
</select>
<select id="selectZcRentCarRuleById" parameterType="Long" resultMap="ZcRentCarRuleResult">
<include refid="selectZcRentCarRuleVo"/>
where id = #{id}
</select>
<insert id="insertZcRentCarRule" parameterType="ZcRentCarRule" useGeneratedKeys="true" keyProperty="id">
insert into zc_rent_car_rule
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="ruleName != null and ruleName != ''">rule_name,</if>
<if test="ruleCode != null and ruleCode != ''">rule_code,</if>
<if test="rentalType != null and rentalType != ''">rental_type,</if>
<if test="rentalDays != null">rental_days,</if>
<if test="rentalPrice != null">rental_price,</if>
<if test="depositPrice != null">deposit_price,</if>
<if test="overdueFee != null">overdue_fee,</if>
<if test="overdueType != null">overdue_type,</if>
<if test="depositFree != null">deposit_free,</if>
<if test="autoDeduct != null">auto_deduct,</if>
<if test="operatingCompanyId != null">operating_company_id,</if>
<if test="status != null">status,</if>
<if test="isDefault != null">is_default,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
<if test="extend1 != null">extend1,</if>
<if test="extend2 != null">extend2,</if>
<if test="extend3 != null">extend3,</if>
<if test="extend4 != null">extend4,</if>
<if test="extend5 != null">extend5,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="ruleName != null and ruleName != ''">#{ruleName},</if>
<if test="ruleCode != null and ruleCode != ''">#{ruleCode},</if>
<if test="rentalType != null and rentalType != ''">#{rentalType},</if>
<if test="rentalDays != null">#{rentalDays},</if>
<if test="rentalPrice != null">#{rentalPrice},</if>
<if test="depositPrice != null">#{depositPrice},</if>
<if test="overdueFee != null">#{overdueFee},</if>
<if test="overdueType != null">#{overdueType},</if>
<if test="depositFree != null">#{depositFree},</if>
<if test="autoDeduct != null">#{autoDeduct},</if>
<if test="operatingCompanyId != null">#{operatingCompanyId},</if>
<if test="status != null">#{status},</if>
<if test="isDefault != null">#{isDefault},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
<if test="extend1 != null">#{extend1},</if>
<if test="extend2 != null">#{extend2},</if>
<if test="extend3 != null">#{extend3},</if>
<if test="extend4 != null">#{extend4},</if>
<if test="extend5 != null">#{extend5},</if>
</trim>
</insert>
<update id="updateZcRentCarRule" parameterType="ZcRentCarRule">
update zc_rent_car_rule
<trim prefix="SET" suffixOverrides=",">
<if test="ruleName != null and ruleName != ''">rule_name = #{ruleName},</if>
<if test="ruleCode != null and ruleCode != ''">rule_code = #{ruleCode},</if>
<if test="rentalType != null and rentalType != ''">rental_type = #{rentalType},</if>
<if test="rentalDays != null">rental_days = #{rentalDays},</if>
<if test="rentalPrice != null">rental_price = #{rentalPrice},</if>
<if test="depositPrice != null">deposit_price = #{depositPrice},</if>
<if test="overdueFee != null">overdue_fee = #{overdueFee},</if>
<if test="overdueType != null">overdue_type = #{overdueType},</if>
<if test="depositFree != null">deposit_free = #{depositFree},</if>
<if test="autoDeduct != null">auto_deduct = #{autoDeduct},</if>
<if test="operatingCompanyId != null">operating_company_id = #{operatingCompanyId},</if>
<if test="status != null">status = #{status},</if>
<if test="isDefault != null">is_default = #{isDefault},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="extend1 != null">extend1 = #{extend1},</if>
<if test="extend2 != null">extend2 = #{extend2},</if>
<if test="extend3 != null">extend3 = #{extend3},</if>
<if test="extend4 != null">extend4 = #{extend4},</if>
<if test="extend5 != null">extend5 = #{extend5},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteZcRentCarRuleById" parameterType="Long">
delete from zc_rent_car_rule where id = #{id}
</delete>
<delete id="deleteZcRentCarRuleByIds" parameterType="String">
delete from zc_rent_car_rule where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -658,7 +658,7 @@ label {
.select-list li p, .select-list li label:not(.radio-box){
float: left;
width: 100px;
width: 120px;
margin: 10px 0px 0px 0px;
text-align:right;
}

View File

@ -0,0 +1,189 @@
<!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-rentBatteyRule-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required">商品标题:</label>
<div class="col-sm-8">
<input name="title" 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="detail" 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="icon" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">电压:</label>
<div class="col-sm-8">
<input name="voltage" 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="ah" 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="maxMileage" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">最小里程 默认0</label>
<div class="col-sm-8">
<input name="minMileage" 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="depositPrice" 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="rentPrice" 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">
<select name="durationType" class="form-control m-b" th:with="type=${@dict.getType('key_battey_duration_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-3 control-label is-required">租赁时长:</label>
<div class="col-sm-8">
<input name="duration" 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="insurancePrice" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否强制投保 默认0 false</label>
<div class="col-sm-8">
<input name="compulsoryInsurance" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">保险有效时长 默认12个月</label>
<div class="col-sm-8">
<input name="insuranceDuration" 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="changeNum" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">1、有限次数 2无限次数</label>
<div class="col-sm-8">
<select name="changeType" class="form-control m-b" th:with="type=${@dict.getType('key_battey_change_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-3 control-label is-required"></label>
<div class="col-sm-8">
<input name="isDelete" 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="cityId" 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="operatorId" 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="provinceId" 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="categoryId" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">套餐类型 换电/租电:</label>
<div class="col-sm-8">
<select name="mealType" class="form-control m-b" th:with="type=${@dict.getType('key_battey_meal_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-3 control-label is-required">套餐排序规则:</label>
<div class="col-sm-8">
<input name="mealSort" 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="isJoinInvite" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">套餐渠道租车默认 id号待定</label>
<div class="col-sm-8">
<input name="mealChannel" 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">
<select name="buyLimitType" class="form-control m-b" th:with="type=${@dict.getType('key_battey_buy_limit_type')}" required>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "operation/rentBatteyRule"
$("#form-rentBatteyRule-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-rentBatteyRule-add').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,190 @@
<!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-rentBatteyRule-edit" th:object="${zcRentBatteyRule}">
<input name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">商品标题:</label>
<div class="col-sm-8">
<input name="title" th:field="*{title}" 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="detail" th:field="*{detail}" 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="icon" th:field="*{icon}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">电压:</label>
<div class="col-sm-8">
<input name="voltage" th:field="*{voltage}" 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="ah" th:field="*{ah}" 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="maxMileage" th:field="*{maxMileage}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">最小里程 默认0</label>
<div class="col-sm-8">
<input name="minMileage" th:field="*{minMileage}" 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="depositPrice" th:field="*{depositPrice}" 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="rentPrice" th:field="*{rentPrice}" 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">
<select name="durationType" class="form-control m-b" th:with="type=${@dict.getType('key_battey_duration_type')}" required>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{durationType}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">租赁时长:</label>
<div class="col-sm-8">
<input name="duration" th:field="*{duration}" 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="insurancePrice" th:field="*{insurancePrice}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否强制投保 默认0 false</label>
<div class="col-sm-8">
<input name="compulsoryInsurance" th:field="*{compulsoryInsurance}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">保险有效时长 默认12个月</label>
<div class="col-sm-8">
<input name="insuranceDuration" th:field="*{insuranceDuration}" 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="changeNum" th:field="*{changeNum}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">1、有限次数 2无限次数</label>
<div class="col-sm-8">
<select name="changeType" class="form-control m-b" th:with="type=${@dict.getType('key_battey_change_type')}" required>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{changeType}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required"></label>
<div class="col-sm-8">
<input name="isDelete" th:field="*{isDelete}" 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="cityId" th:field="*{cityId}" 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="operatorId" th:field="*{operatorId}" 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="provinceId" th:field="*{provinceId}" 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="categoryId" th:field="*{categoryId}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">套餐类型 换电/租电:</label>
<div class="col-sm-8">
<select name="mealType" class="form-control m-b" th:with="type=${@dict.getType('key_battey_meal_type')}" required>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{mealType}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">套餐排序规则:</label>
<div class="col-sm-8">
<input name="mealSort" th:field="*{mealSort}" 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="isJoinInvite" th:field="*{isJoinInvite}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">套餐渠道租车默认 id号待定</label>
<div class="col-sm-8">
<input name="mealChannel" th:field="*{mealChannel}" 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">
<select name="buyLimitType" class="form-control m-b" th:with="type=${@dict.getType('key_battey_buy_limit_type')}" required>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{buyLimitType}"></option>
</select>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "operation/rentBatteyRule";
$("#form-rentBatteyRule-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-rentBatteyRule-edit').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,314 @@
<!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="title"/>
</li>
<li>
<label>商品描述:</label>
<input type="text" name="detail"/>
</li>
<li>
<label>图标:</label>
<input type="text" name="icon"/>
</li>
<li>
<label>电压:</label>
<input type="text" name="voltage"/>
</li>
<li>
<label>电容:</label>
<input type="text" name="ah"/>
</li>
<li>
<label>最大里程:</label>
<input type="text" name="maxMileage"/>
</li>
<li>
<label>最小里程 默认0</label>
<input type="text" name="minMileage"/>
</li>
<li>
<label>押金:</label>
<input type="text" name="depositPrice"/>
</li>
<li>
<label>租金:</label>
<input type="text" name="rentPrice"/>
</li>
<li>
<label>计时方式:</label>
<select name="durationType" th:with="type=${@dict.getType('key_battey_duration_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="duration"/>
</li>
<li>
<label>盗抢险:</label>
<input type="text" name="insurancePrice"/>
</li>
<li>
<label>是否强制投保 默认0 false</label>
<input type="text" name="compulsoryInsurance"/>
</li>
<li>
<label>保险有效时长 默认12个月</label>
<input type="text" name="insuranceDuration"/>
</li>
<li>
<label>换电次数:</label>
<input type="text" name="changeNum"/>
</li>
<li>
<label>1、有限次数 2无限次数</label>
<select name="changeType" th:with="type=${@dict.getType('key_battey_change_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="isDelete"/>
</li>
<li>
<label></label>
<input type="text" name="cityId"/>
</li>
<li>
<label></label>
<input type="text" name="operatorId"/>
</li>
<li>
<label></label>
<input type="text" name="provinceId"/>
</li>
<li>
<label>电池类型:</label>
<input type="text" name="categoryId"/>
</li>
<li>
<label>套餐类型 换电/租电:</label>
<select name="mealType" th:with="type=${@dict.getType('key_battey_meal_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="mealSort"/>
</li>
<li>
<label></label>
<input type="text" name="isJoinInvite"/>
</li>
<li>
<label>套餐渠道租车默认 id号待定</label>
<input type="text" name="mealChannel"/>
</li>
<li>
<label>购买限制类型:</label>
<select name="buyLimitType" th:with="type=${@dict.getType('key_battey_buy_limit_type')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</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="operation:rentBatteyRule:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="operation:rentBatteyRule:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="operation:rentBatteyRule:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="operation:rentBatteyRule: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('operation:rentBatteyRule:edit')}]];
var removeFlag = [[${@permission.hasPermi('operation:rentBatteyRule:remove')}]];
var durationTypeDatas = [[${@dict.getType('key_battey_duration_type')}]];
var changeTypeDatas = [[${@dict.getType('key_battey_change_type')}]];
var mealTypeDatas = [[${@dict.getType('key_battey_meal_type')}]];
var buyLimitTypeDatas = [[${@dict.getType('key_battey_buy_limit_type')}]];
var prefix = ctx + "operation/rentBatteyRule";
$(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: '',
visible: false
},
{
field: 'title',
title: '商品标题'
},
{
field: 'detail',
title: '商品描述'
},
{
field: 'icon',
title: '图标'
},
{
field: 'voltage',
title: '电压'
},
{
field: 'ah',
title: '电容'
},
{
field: 'maxMileage',
title: '最大里程'
},
{
field: 'minMileage',
title: '最小里程 默认0'
},
{
field: 'depositPrice',
title: '押金'
},
{
field: 'rentPrice',
title: '租金'
},
{
field: 'durationType',
title: '计时方式',
formatter: function(value, row, index) {
return $.table.selectDictLabel(durationTypeDatas, value);
}
},
{
field: 'duration',
title: '租赁时长'
},
{
field: 'insurancePrice',
title: '盗抢险'
},
{
field: 'compulsoryInsurance',
title: '是否强制投保 默认0 false'
},
{
field: 'insuranceDuration',
title: '保险有效时长 默认12个月'
},
{
field: 'changeNum',
title: '换电次数'
},
{
field: 'changeType',
title: '1、有限次数 2无限次数',
formatter: function(value, row, index) {
return $.table.selectDictLabel(changeTypeDatas, value);
}
},
{
field: 'isDelete',
title: ''
},
{
field: 'cityId',
title: ''
},
{
field: 'operatorId',
title: ''
},
{
field: 'provinceId',
title: ''
},
{
field: 'categoryId',
title: '电池类型'
},
{
field: 'mealType',
title: '套餐类型 换电/租电',
formatter: function(value, row, index) {
return $.table.selectDictLabel(mealTypeDatas, value);
}
},
{
field: 'mealSort',
title: '套餐排序规则'
},
{
field: 'isJoinInvite',
title: ''
},
{
field: 'mealChannel',
title: '套餐渠道租车默认 id号待定'
},
{
field: 'buyLimitType',
title: '购买限制类型',
formatter: function(value, row, index) {
return $.table.selectDictLabel(buyLimitTypeDatas, value);
}
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" 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 + '" 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

@ -0,0 +1,55 @@
<!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-rentCarBattey-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required"></label>
<div class="col-sm-8">
<input name="carRuleId" 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="batteryRuleId" 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="sortOrder" 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>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<textarea name="remark" class="form-control"></textarea>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "operation/rentCarBattey"
$("#form-rentCarBattey-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-rentCarBattey-add').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,50 @@
<!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-rentCarBattey-edit" th:object="${zcRentCarRuleBattery}">
<input name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required"></label>
<div class="col-sm-8">
<input name="carRuleId" th:field="*{carRuleId}" 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="batteryRuleId" th:field="*{batteryRuleId}" 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="sortOrder" th:field="*{sortOrder}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<textarea name="remark" class="form-control">[[*{remark}]]</textarea>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "operation/rentCarBattey";
$("#form-rentCarBattey-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-rentCarBattey-edit').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,106 @@
<!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="carRuleId"/>
</li>
<li>
<label></label>
<input type="text" name="batteryRuleId"/>
</li>
<li>
<label></label>
<input type="text" name="sortOrder"/>
</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="operation:rentCarBattey:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="operation:rentCarBattey:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="operation:rentCarBattey:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="operation:rentCarBattey: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('operation:rentCarBattey:edit')}]];
var removeFlag = [[${@permission.hasPermi('operation:rentCarBattey:remove')}]];
var prefix = ctx + "operation/rentCarBattey";
$(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: 'carRuleId',
title: ''
},
{
field: 'batteryRuleId',
title: ''
},
{
field: 'sortOrder',
title: ''
},
{
field: 'remark',
title: '备注'
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" 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 + '" 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

@ -0,0 +1,120 @@
<!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-rentCarRule-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required">套餐名称:</label>
<div class="col-sm-8">
<input name="ruleName" 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="ruleCode" 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="col-sm-10">
<div class="radio-box" th:each="dict : ${@dict.getType('key_rent_type')}">
<input type="radio" th:id="${'rentalType_' + dict.dictCode}" name="rentalType" th:value="${dict.dictValue}" th:checked="${dict.default}" required>
<label th:for="${'rentalType_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">租赁天数:</label>
<div class="col-sm-8">
<input name="rentalDays" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">租车价格(元)</label>
<div class="col-sm-8">
<input id="rentalPrice" name="rentalPrice" 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 id="depositPrice" name="depositPrice" 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 id="overdueFee" name="overdueFee" 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">
<div class="radio-box" th:each="dict : ${@dict.getType('key_rent_overdue_type')}">
<input type="radio" th:id="${'overdueType_' + dict.dictCode}" name="overdueType" th:value="${dict.dictValue}" th:checked="${dict.default}" required>
<label th:for="${'overdueType_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否支持免押:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('key_rent_deposit_free')}">
<input type="radio" th:id="${'depositFree_' + dict.dictCode}" name="depositFree" th:value="${dict.dictValue}" th:checked="${dict.default}" required>
<label th:for="${'depositFree_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否支持代扣:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('key_rent_auto_deduct')}">
<input type="radio" th:id="${'autoDeduct_' + dict.dictCode}" name="autoDeduct" th:value="${dict.dictValue}" th:checked="${dict.default}" required>
<label th:for="${'autoDeduct_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">所属运营商:</label>
<div class="col-sm-8">
<select name="operatingCompanyId" id="operatingCompanyId" class="form-control m-b">
<option value="">请选择所属运营商</option>
<option th:each="company : ${companyList}" th:value="${company.id}" th:text="${company.companyName}"></option>
</select>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "operation/rentCarRule"
$("#form-rentCarRule-add").validate({
rules:{
rentalPrice:{
number:true
},
depositPrice:{
number:true
},
overdueFee:{
number:true
}
},
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-rentCarRule-add').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,122 @@
<!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-rentCarRule-edit" th:object="${zcRentCarRule}">
<input name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">套餐名称:</label>
<div class="col-sm-8">
<input name="ruleName" th:field="*{ruleName}" 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="ruleCode" th:field="*{ruleCode}" 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="radio-box" th:each="dict : ${@dict.getType('key_rent_type')}">
<input type="radio" th:id="${'rentalType_' + dict.dictCode}" name="rentalType" th:value="${dict.dictValue}" th:checked="${dict.default}" th:field="*{rentalType}" required>
<label th:for="${'rentalType_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">租赁天数:</label>
<div class="col-sm-8">
<input name="rentalDays" th:field="*{rentalDays}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">租车价格(元)</label>
<div class="col-sm-8">
<input name="rentalPrice" th:field="*{rentalPrice}" 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="depositPrice" th:field="*{depositPrice}" 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="overdueFee" th:field="*{overdueFee}" 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">
<div class="radio-box" th:each="dict : ${@dict.getType('key_rent_overdue_type')}">
<input type="radio" th:id="${'overdueType_' + dict.dictCode}" name="overdueType" th:value="${dict.dictValue}" th:checked="${dict.default}" th:field="*{overdueType}" required>
<label th:for="${'overdueType_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否支持免押:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('key_rent_deposit_free')}">
<input type="radio" th:id="${'depositFree_' + dict.dictCode}" name="depositFree" th:value="${dict.dictValue}" th:checked="${dict.default}" th:field="*{depositFree}" required>
<label th:for="${'depositFree_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否支持代扣:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('key_rent_auto_deduct')}">
<input type="radio" th:id="${'autoDeduct_' + dict.dictCode}" name="autoDeduct" th:value="${dict.dictValue}" th:checked="${dict.default}" th:field="*{autoDeduct}" required>
<label th:for="${'autoDeduct_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">所属运营商:</label>
<div class="col-sm-8">
<select name="operatingCompanyId" id="operatingCompanyId" class="form-control m-b">
<option value="">请选择所属运营商</option>
<option th:each="company : ${companyList}" th:value="${company.id}" th:text="${company.companyName}" th:field="*{operatingCompanyId}" ></option>
</select>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "operation/rentCarRule";
$("#form-rentCarRule-edit").validate({
rules:{
rentalPrice:{
number:true
},
depositPrice:{
number:true
},
overdueFee:{
number:true
}
},
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-rentCarRule-edit').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,192 @@
<!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>
<select name="operatingCompanyId" id="operatingCompanyId" >
<option value="">请选择所属运营商</option>
<option th:each="company : ${companyList}" th:value="${company.id}" th:text="${company.companyName}"></option>
</select>
</li>
<li>
<label>套餐名称:</label>
<input type="text" name="ruleName"/>
</li>
<li>
<label>套餐编码:</label>
<input type="text" name="ruleCode"/>
</li>
<li>
<label>租赁类型:</label>
<select name="rentalType" th:with="type=${@dict.getType('key_rent_type')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>逾期计费类型:</label>
<select name="overdueType" th:with="type=${@dict.getType('key_rent_overdue_type')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>是否支持免押:</label>
<select name="depositFree" th:with="type=${@dict.getType('key_rent_deposit_free')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>是否支持代扣:</label>
<select name="autoDeduct" th:with="type=${@dict.getType('key_rent_auto_deduct')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</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="operation:rentCarRule:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="operation:rentCarRule:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="operation:rentCarRule:remove">
<i class="fa fa-remove"></i> 删除
</a>
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="operation:rentCarRule: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('operation:rentCarRule:edit')}]];
var removeFlag = [[${@permission.hasPermi('operation:rentCarRule:remove')}]];
var rentalTypeDatas = [[${@dict.getType('key_rent_type')}]];
var overdueTypeDatas = [[${@dict.getType('key_rent_overdue_type')}]];
var depositFreeDatas = [[${@dict.getType('key_rent_deposit_free')}]];
var autoDeductDatas = [[${@dict.getType('key_rent_auto_deduct')}]];
var prefix = ctx + "operation/rentCarRule";
$(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: 'ruleName',
title: '套餐名称'
},
{
field: 'ruleCode',
title: '套餐编码'
},
{
field: 'rentalType',
title: '租赁类型',
formatter: function(value, row, index) {
return $.table.selectDictLabel(rentalTypeDatas, value);
}
},
{
field: 'rentalDays',
title: '租赁天数'
},
{
field: 'rentalPrice',
title: '租车价格(元)'
},
{
field: 'depositPrice',
title: '押金价格(元)'
},
{
field: 'overdueFee',
title: '逾期金额(元)'
},
{
field: 'overdueType',
title: '逾期计费类型',
formatter: function(value, row, index) {
return $.table.selectDictLabel(overdueTypeDatas, value);
}
},
{
field: 'depositFree',
title: '是否支持免押',
formatter: function(value, row, index) {
return $.table.selectDictLabel(depositFreeDatas, value);
}
},
{
field: 'autoDeduct',
title: '是否支持代扣',
formatter: function(value, row, index) {
return $.table.selectDictLabel(autoDeductDatas, value);
}
},
{
field: 'operatingCompanyId',
title: '关联电池套餐'
},
{
field: 'status',
title: '状态'
},
{
field: 'operatingCompanyName',
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

@ -45,7 +45,7 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">所属运营公司</label>
<label class="col-sm-3 control-label is-required">所属运营</label>
<div class="col-sm-8">
<select name="operatingCompanyId" id="operatingCompanyId" class="form-control m-b">
<option value="">请选择所属运营商</option>

View File

@ -46,7 +46,7 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">所属运营公司</label>
<label class="col-sm-3 control-label is-required">所属运营</label>
<div class="col-sm-8">
<select name="operatingCompanyId" id="operatingCompanyId" class="form-control m-b">
<option value="">请选择所属运营商</option>