车型
This commit is contained in:
@ -0,0 +1,164 @@
|
||||
package com.ruoyi.operation.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.operation.domain.*;
|
||||
import com.ruoyi.operation.service.IZcCarModelPackageService;
|
||||
import com.ruoyi.operation.service.IZcRentCarRuleService;
|
||||
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.*;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.operation.service.IZcCarModelService;
|
||||
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-10
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/operation/carModel")
|
||||
public class ZcCarModelController extends BaseController
|
||||
{
|
||||
private String prefix = "operation/carModel";
|
||||
|
||||
@Autowired
|
||||
private IZcCarModelService zcCarModelService;
|
||||
@Autowired
|
||||
private IZcRentCarRuleService zcRentCarRuleService;
|
||||
@Autowired
|
||||
private IZcCarModelPackageService zcCarModelPackageService;
|
||||
|
||||
@RequiresPermissions("operation:carModel:view")
|
||||
@GetMapping()
|
||||
public String carModel()
|
||||
{
|
||||
return prefix + "/carModel";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询车型管理列表
|
||||
*/
|
||||
@RequiresPermissions("operation:carModel:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(ZcCarModel zcCarModel)
|
||||
{
|
||||
startPage();
|
||||
List<ZcCarModel> list = zcCarModelService.selectZcCarModelList(zcCarModel);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出车型管理列表
|
||||
*/
|
||||
@RequiresPermissions("operation:carModel:export")
|
||||
@Log(title = "车型管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(ZcCarModel zcCarModel)
|
||||
{
|
||||
List<ZcCarModel> list = zcCarModelService.selectZcCarModelList(zcCarModel);
|
||||
ExcelUtil<ZcCarModel> util = new ExcelUtil<ZcCarModel>(ZcCarModel.class);
|
||||
return util.exportExcel(list, "车型管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增车型管理
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add(ModelMap mmap)
|
||||
{
|
||||
ZcRentCarRule zcRentCarRule = new ZcRentCarRule();
|
||||
zcRentCarRule.setStatus("0");
|
||||
List<ZcRentCarRule> rentCarRuleList = zcRentCarRuleService.selectZcRentCarRuleList(zcRentCarRule);
|
||||
mmap.put("rentCarRuleList", rentCarRuleList);
|
||||
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存车型管理
|
||||
*/
|
||||
@RequiresPermissions("operation:carModel:add")
|
||||
@Log(title = "车型管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(@RequestParam("rentCarRuleIds") List<Long> rentCarRuleIds, ZcCarModel zcCarModel)
|
||||
{
|
||||
zcCarModel.setCreateBy(getLoginName());
|
||||
int flag = zcCarModelService.insertZcCarModel(zcCarModel);
|
||||
|
||||
// 保存关联表 ZcRentCarRuleBattery 数据
|
||||
List<ZcCarModelPackage> carModelPackageList = new ArrayList<>();
|
||||
for (Long rentCarRuleId : rentCarRuleIds) {
|
||||
ZcCarModelPackage zcCarModelPackage = new ZcCarModelPackage();
|
||||
zcCarModelPackage.setCarModelId(zcCarModel.getId());
|
||||
zcCarModelPackage.setCarRuleId(rentCarRuleId);
|
||||
zcCarModelPackage.setCreateTime(new Date());
|
||||
carModelPackageList.add(zcCarModelPackage);
|
||||
}
|
||||
if (!carModelPackageList.isEmpty()) {
|
||||
zcCarModelPackageService.batchInsert(carModelPackageList);
|
||||
}
|
||||
return toAjax(flag);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车型管理
|
||||
*/
|
||||
@RequiresPermissions("operation:carModel:edit")
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||
{
|
||||
ZcCarModel zcCarModel = zcCarModelService.selectZcCarModelById(id);
|
||||
mmap.put("zcCarModel", zcCarModel);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存车型管理
|
||||
*/
|
||||
@RequiresPermissions("operation:carModel:edit")
|
||||
@Log(title = "车型管理", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(ZcCarModel zcCarModel)
|
||||
{
|
||||
zcCarModel.setUpdateBy(getLoginName());
|
||||
return toAjax(zcCarModelService.updateZcCarModel(zcCarModel));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除车型管理
|
||||
*/
|
||||
@RequiresPermissions("operation:carModel:remove")
|
||||
@Log(title = "车型管理", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(zcCarModelService.deleteZcCarModelByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
@Log(title = "车型管理", businessType = BusinessType.UPDATE)
|
||||
@RequiresPermissions("operation:carModel:edit")
|
||||
@PostMapping("/changeStatus")
|
||||
@ResponseBody
|
||||
public AjaxResult changeStatus(ZcCarModel zcCarModel)
|
||||
{
|
||||
return toAjax(zcCarModelService.changeStatus(zcCarModel));
|
||||
}
|
||||
|
||||
}
|
||||
@ -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.ZcCarModelPackage;
|
||||
import com.ruoyi.operation.service.IZcCarModelPackageService;
|
||||
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-10
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/operation/carModelPackage")
|
||||
public class ZcCarModelPackageController extends BaseController
|
||||
{
|
||||
private String prefix = "operation/carModelPackage";
|
||||
|
||||
@Autowired
|
||||
private IZcCarModelPackageService zcCarModelPackageService;
|
||||
|
||||
@RequiresPermissions("operation:carModelPackage:view")
|
||||
@GetMapping()
|
||||
public String carModelPackage()
|
||||
{
|
||||
return prefix + "/carModelPackage";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询车型与租车规则关联列表
|
||||
*/
|
||||
@RequiresPermissions("operation:carModelPackage:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(ZcCarModelPackage zcCarModelPackage)
|
||||
{
|
||||
startPage();
|
||||
List<ZcCarModelPackage> list = zcCarModelPackageService.selectZcCarModelPackageList(zcCarModelPackage);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出车型与租车规则关联列表
|
||||
*/
|
||||
@RequiresPermissions("operation:carModelPackage:export")
|
||||
@Log(title = "车型与租车规则关联", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(ZcCarModelPackage zcCarModelPackage)
|
||||
{
|
||||
List<ZcCarModelPackage> list = zcCarModelPackageService.selectZcCarModelPackageList(zcCarModelPackage);
|
||||
ExcelUtil<ZcCarModelPackage> util = new ExcelUtil<ZcCarModelPackage>(ZcCarModelPackage.class);
|
||||
return util.exportExcel(list, "车型与租车规则关联数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增车型与租车规则关联
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存车型与租车规则关联
|
||||
*/
|
||||
@RequiresPermissions("operation:carModelPackage:add")
|
||||
@Log(title = "车型与租车规则关联", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(ZcCarModelPackage zcCarModelPackage)
|
||||
{
|
||||
return toAjax(zcCarModelPackageService.insertZcCarModelPackage(zcCarModelPackage));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车型与租车规则关联
|
||||
*/
|
||||
@RequiresPermissions("operation:carModelPackage:edit")
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||
{
|
||||
ZcCarModelPackage zcCarModelPackage = zcCarModelPackageService.selectZcCarModelPackageById(id);
|
||||
mmap.put("zcCarModelPackage", zcCarModelPackage);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存车型与租车规则关联
|
||||
*/
|
||||
@RequiresPermissions("operation:carModelPackage:edit")
|
||||
@Log(title = "车型与租车规则关联", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(ZcCarModelPackage zcCarModelPackage)
|
||||
{
|
||||
return toAjax(zcCarModelPackageService.updateZcCarModelPackage(zcCarModelPackage));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除车型与租车规则关联
|
||||
*/
|
||||
@RequiresPermissions("operation:carModelPackage:remove")
|
||||
@Log(title = "车型与租车规则关联", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(zcCarModelPackageService.deleteZcCarModelPackageByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -189,6 +189,13 @@ public class ZcRentCarRuleController extends BaseController
|
||||
return toAjax(zcRentCarRuleService.changeStatus(zcRentCarRule));
|
||||
}
|
||||
|
||||
@GetMapping("/listAllValid")
|
||||
@ResponseBody
|
||||
public List<ZcRentCarRule> listAllValid() {
|
||||
ZcRentCarRule zcRentCarRule = new ZcRentCarRule();
|
||||
zcRentCarRule.setStatus("0");
|
||||
return zcRentCarRuleService.selectZcRentCarRuleList(zcRentCarRule);
|
||||
}
|
||||
|
||||
public static String generateTimestampBasedCode() {
|
||||
Random random = new Random();
|
||||
|
||||
@ -0,0 +1,189 @@
|
||||
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_car_model
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
public class ZcCarModel extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 车型ID */
|
||||
private Long id;
|
||||
|
||||
/** 车型名称 */
|
||||
@Excel(name = "车型名称")
|
||||
private String modelName;
|
||||
|
||||
/** 品牌ID */
|
||||
private Long brandId;
|
||||
|
||||
/** 品牌名称 */
|
||||
@Excel(name = "品牌名称")
|
||||
private String brandName;
|
||||
|
||||
/** 电池类型 */
|
||||
private String batteryType;
|
||||
|
||||
/** 最高时速(km/h) */
|
||||
private Long maxSpeed;
|
||||
|
||||
/** 整车重量(kg) */
|
||||
private BigDecimal weight;
|
||||
|
||||
/** 状态(0正常 1停用) */
|
||||
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
||||
private String status;
|
||||
|
||||
/** 删除标志(0存在 2删除) */
|
||||
private String delFlag;
|
||||
|
||||
/** 扩展字段1 */
|
||||
private String extend1;
|
||||
|
||||
/** 扩展字段2 */
|
||||
private String extend2;
|
||||
|
||||
/** 扩展字段3 */
|
||||
private String extend3;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setModelName(String modelName)
|
||||
{
|
||||
this.modelName = modelName;
|
||||
}
|
||||
|
||||
public String getModelName()
|
||||
{
|
||||
return modelName;
|
||||
}
|
||||
public void setBrandId(Long brandId)
|
||||
{
|
||||
this.brandId = brandId;
|
||||
}
|
||||
|
||||
public Long getBrandId()
|
||||
{
|
||||
return brandId;
|
||||
}
|
||||
public void setBrandName(String brandName)
|
||||
{
|
||||
this.brandName = brandName;
|
||||
}
|
||||
|
||||
public String getBrandName()
|
||||
{
|
||||
return brandName;
|
||||
}
|
||||
public void setBatteryType(String batteryType)
|
||||
{
|
||||
this.batteryType = batteryType;
|
||||
}
|
||||
|
||||
public String getBatteryType()
|
||||
{
|
||||
return batteryType;
|
||||
}
|
||||
public void setMaxSpeed(Long maxSpeed)
|
||||
{
|
||||
this.maxSpeed = maxSpeed;
|
||||
}
|
||||
|
||||
public Long getMaxSpeed()
|
||||
{
|
||||
return maxSpeed;
|
||||
}
|
||||
public void setWeight(BigDecimal weight)
|
||||
{
|
||||
this.weight = weight;
|
||||
}
|
||||
|
||||
public BigDecimal getWeight()
|
||||
{
|
||||
return weight;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("modelName", getModelName())
|
||||
.append("brandId", getBrandId())
|
||||
.append("brandName", getBrandName())
|
||||
.append("batteryType", getBatteryType())
|
||||
.append("maxSpeed", getMaxSpeed())
|
||||
.append("weight", getWeight())
|
||||
.append("status", getStatus())
|
||||
.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())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -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_car_model_package
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
public class ZcCarModelPackage extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 规则ID */
|
||||
private Long id;
|
||||
|
||||
/** */
|
||||
@Excel(name = "")
|
||||
private Long carModelId;
|
||||
|
||||
/** */
|
||||
@Excel(name = "")
|
||||
private Long carRuleId;
|
||||
|
||||
/** */
|
||||
@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 setCarModelId(Long carModelId)
|
||||
{
|
||||
this.carModelId = carModelId;
|
||||
}
|
||||
|
||||
public Long getCarModelId()
|
||||
{
|
||||
return carModelId;
|
||||
}
|
||||
public void setCarRuleId(Long carRuleId)
|
||||
{
|
||||
this.carRuleId = carRuleId;
|
||||
}
|
||||
|
||||
public Long getCarRuleId()
|
||||
{
|
||||
return carRuleId;
|
||||
}
|
||||
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("carModelId", getCarModelId())
|
||||
.append("carRuleId", getCarRuleId())
|
||||
.append("sortOrder", getSortOrder())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.operation.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.operation.domain.ZcCarModel;
|
||||
|
||||
/**
|
||||
* 车型管理Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
public interface ZcCarModelMapper
|
||||
{
|
||||
/**
|
||||
* 查询车型管理
|
||||
*
|
||||
* @param id 车型管理主键
|
||||
* @return 车型管理
|
||||
*/
|
||||
public ZcCarModel selectZcCarModelById(Long id);
|
||||
|
||||
/**
|
||||
* 查询车型管理列表
|
||||
*
|
||||
* @param zcCarModel 车型管理
|
||||
* @return 车型管理集合
|
||||
*/
|
||||
public List<ZcCarModel> selectZcCarModelList(ZcCarModel zcCarModel);
|
||||
|
||||
/**
|
||||
* 新增车型管理
|
||||
*
|
||||
* @param zcCarModel 车型管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertZcCarModel(ZcCarModel zcCarModel);
|
||||
|
||||
/**
|
||||
* 修改车型管理
|
||||
*
|
||||
* @param zcCarModel 车型管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateZcCarModel(ZcCarModel zcCarModel);
|
||||
|
||||
/**
|
||||
* 删除车型管理
|
||||
*
|
||||
* @param id 车型管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZcCarModelById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除车型管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZcCarModelByIds(String[] ids);
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
package com.ruoyi.operation.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.operation.domain.ZcCarModelPackage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 车型与租车规则关联Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
public interface ZcCarModelPackageMapper
|
||||
{
|
||||
/**
|
||||
* 查询车型与租车规则关联
|
||||
*
|
||||
* @param id 车型与租车规则关联主键
|
||||
* @return 车型与租车规则关联
|
||||
*/
|
||||
public ZcCarModelPackage selectZcCarModelPackageById(Long id);
|
||||
|
||||
/**
|
||||
* 查询车型与租车规则关联列表
|
||||
*
|
||||
* @param zcCarModelPackage 车型与租车规则关联
|
||||
* @return 车型与租车规则关联集合
|
||||
*/
|
||||
public List<ZcCarModelPackage> selectZcCarModelPackageList(ZcCarModelPackage zcCarModelPackage);
|
||||
|
||||
int batchInsert(@Param("list") List<ZcCarModelPackage> zcCarModelPackageList);
|
||||
|
||||
/**
|
||||
* 新增车型与租车规则关联
|
||||
*
|
||||
* @param zcCarModelPackage 车型与租车规则关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertZcCarModelPackage(ZcCarModelPackage zcCarModelPackage);
|
||||
|
||||
/**
|
||||
* 修改车型与租车规则关联
|
||||
*
|
||||
* @param zcCarModelPackage 车型与租车规则关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateZcCarModelPackage(ZcCarModelPackage zcCarModelPackage);
|
||||
|
||||
/**
|
||||
* 删除车型与租车规则关联
|
||||
*
|
||||
* @param id 车型与租车规则关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZcCarModelPackageById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除车型与租车规则关联
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZcCarModelPackageByIds(String[] ids);
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.ruoyi.operation.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.operation.domain.ZcCarModelPackage;
|
||||
|
||||
/**
|
||||
* 车型与租车规则关联Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
public interface IZcCarModelPackageService
|
||||
{
|
||||
/**
|
||||
* 查询车型与租车规则关联
|
||||
*
|
||||
* @param id 车型与租车规则关联主键
|
||||
* @return 车型与租车规则关联
|
||||
*/
|
||||
public ZcCarModelPackage selectZcCarModelPackageById(Long id);
|
||||
|
||||
/**
|
||||
* 查询车型与租车规则关联列表
|
||||
*
|
||||
* @param zcCarModelPackage 车型与租车规则关联
|
||||
* @return 车型与租车规则关联集合
|
||||
*/
|
||||
public List<ZcCarModelPackage> selectZcCarModelPackageList(ZcCarModelPackage zcCarModelPackage);
|
||||
|
||||
/**
|
||||
* 新增车型与租车规则关联
|
||||
*
|
||||
* @param zcCarModelPackage 车型与租车规则关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertZcCarModelPackage(ZcCarModelPackage zcCarModelPackage);
|
||||
|
||||
public int batchInsert(List<ZcCarModelPackage> zcCarModelPackageList);
|
||||
/**
|
||||
* 修改车型与租车规则关联
|
||||
*
|
||||
* @param zcCarModelPackage 车型与租车规则关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateZcCarModelPackage(ZcCarModelPackage zcCarModelPackage);
|
||||
|
||||
/**
|
||||
* 批量删除车型与租车规则关联
|
||||
*
|
||||
* @param ids 需要删除的车型与租车规则关联主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZcCarModelPackageByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除车型与租车规则关联信息
|
||||
*
|
||||
* @param id 车型与租车规则关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZcCarModelPackageById(Long id);
|
||||
}
|
||||
@ -0,0 +1,65 @@
|
||||
package com.ruoyi.operation.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.operation.domain.ZcCarModel;
|
||||
|
||||
/**
|
||||
* 车型管理Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
public interface IZcCarModelService
|
||||
{
|
||||
/**
|
||||
* 查询车型管理
|
||||
*
|
||||
* @param id 车型管理主键
|
||||
* @return 车型管理
|
||||
*/
|
||||
public ZcCarModel selectZcCarModelById(Long id);
|
||||
|
||||
/**
|
||||
* 查询车型管理列表
|
||||
*
|
||||
* @param zcCarModel 车型管理
|
||||
* @return 车型管理集合
|
||||
*/
|
||||
public List<ZcCarModel> selectZcCarModelList(ZcCarModel zcCarModel);
|
||||
|
||||
/**
|
||||
* 新增车型管理
|
||||
*
|
||||
* @param zcCarModel 车型管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertZcCarModel(ZcCarModel zcCarModel);
|
||||
|
||||
/**
|
||||
* 修改车型管理
|
||||
*
|
||||
* @param zcCarModel 车型管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateZcCarModel(ZcCarModel zcCarModel);
|
||||
|
||||
/**
|
||||
* 批量删除车型管理
|
||||
*
|
||||
* @param ids 需要删除的车型管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZcCarModelByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除车型管理信息
|
||||
*
|
||||
* @param id 车型管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZcCarModelById(Long id);
|
||||
|
||||
|
||||
public int changeStatus(ZcCarModel zcCarModel);
|
||||
|
||||
}
|
||||
@ -0,0 +1,102 @@
|
||||
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.ZcCarModelPackageMapper;
|
||||
import com.ruoyi.operation.domain.ZcCarModelPackage;
|
||||
import com.ruoyi.operation.service.IZcCarModelPackageService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 车型与租车规则关联Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
@Service
|
||||
public class ZcCarModelPackageServiceImpl implements IZcCarModelPackageService
|
||||
{
|
||||
@Autowired
|
||||
private ZcCarModelPackageMapper zcCarModelPackageMapper;
|
||||
|
||||
/**
|
||||
* 查询车型与租车规则关联
|
||||
*
|
||||
* @param id 车型与租车规则关联主键
|
||||
* @return 车型与租车规则关联
|
||||
*/
|
||||
@Override
|
||||
public ZcCarModelPackage selectZcCarModelPackageById(Long id)
|
||||
{
|
||||
return zcCarModelPackageMapper.selectZcCarModelPackageById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询车型与租车规则关联列表
|
||||
*
|
||||
* @param zcCarModelPackage 车型与租车规则关联
|
||||
* @return 车型与租车规则关联
|
||||
*/
|
||||
@Override
|
||||
public List<ZcCarModelPackage> selectZcCarModelPackageList(ZcCarModelPackage zcCarModelPackage)
|
||||
{
|
||||
return zcCarModelPackageMapper.selectZcCarModelPackageList(zcCarModelPackage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增车型与租车规则关联
|
||||
*
|
||||
* @param zcCarModelPackage 车型与租车规则关联
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertZcCarModelPackage(ZcCarModelPackage zcCarModelPackage)
|
||||
{
|
||||
zcCarModelPackage.setCreateTime(DateUtils.getNowDate());
|
||||
return zcCarModelPackageMapper.insertZcCarModelPackage(zcCarModelPackage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int batchInsert(List<ZcCarModelPackage> zcCarModelPackageList) {
|
||||
return zcCarModelPackageMapper.batchInsert(zcCarModelPackageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车型与租车规则关联
|
||||
*
|
||||
* @param zcCarModelPackage 车型与租车规则关联
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateZcCarModelPackage(ZcCarModelPackage zcCarModelPackage)
|
||||
{
|
||||
zcCarModelPackage.setUpdateTime(DateUtils.getNowDate());
|
||||
return zcCarModelPackageMapper.updateZcCarModelPackage(zcCarModelPackage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除车型与租车规则关联
|
||||
*
|
||||
* @param ids 需要删除的车型与租车规则关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteZcCarModelPackageByIds(String ids)
|
||||
{
|
||||
return zcCarModelPackageMapper.deleteZcCarModelPackageByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除车型与租车规则关联信息
|
||||
*
|
||||
* @param id 车型与租车规则关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteZcCarModelPackageById(Long id)
|
||||
{
|
||||
return zcCarModelPackageMapper.deleteZcCarModelPackageById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
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.ZcCarModelMapper;
|
||||
import com.ruoyi.operation.domain.ZcCarModel;
|
||||
import com.ruoyi.operation.service.IZcCarModelService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 车型管理Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
@Service
|
||||
public class ZcCarModelServiceImpl implements IZcCarModelService
|
||||
{
|
||||
@Autowired
|
||||
private ZcCarModelMapper zcCarModelMapper;
|
||||
|
||||
/**
|
||||
* 查询车型管理
|
||||
*
|
||||
* @param id 车型管理主键
|
||||
* @return 车型管理
|
||||
*/
|
||||
@Override
|
||||
public ZcCarModel selectZcCarModelById(Long id)
|
||||
{
|
||||
return zcCarModelMapper.selectZcCarModelById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询车型管理列表
|
||||
*
|
||||
* @param zcCarModel 车型管理
|
||||
* @return 车型管理
|
||||
*/
|
||||
@Override
|
||||
public List<ZcCarModel> selectZcCarModelList(ZcCarModel zcCarModel)
|
||||
{
|
||||
return zcCarModelMapper.selectZcCarModelList(zcCarModel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增车型管理
|
||||
*
|
||||
* @param zcCarModel 车型管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertZcCarModel(ZcCarModel zcCarModel)
|
||||
{
|
||||
zcCarModel.setCreateTime(DateUtils.getNowDate());
|
||||
zcCarModel.setUpdateTime(DateUtils.getNowDate());
|
||||
return zcCarModelMapper.insertZcCarModel(zcCarModel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车型管理
|
||||
*
|
||||
* @param zcCarModel 车型管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateZcCarModel(ZcCarModel zcCarModel)
|
||||
{
|
||||
zcCarModel.setUpdateTime(DateUtils.getNowDate());
|
||||
return zcCarModelMapper.updateZcCarModel(zcCarModel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除车型管理
|
||||
*
|
||||
* @param ids 需要删除的车型管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteZcCarModelByIds(String ids)
|
||||
{
|
||||
return zcCarModelMapper.deleteZcCarModelByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除车型管理信息
|
||||
*
|
||||
* @param id 车型管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteZcCarModelById(Long id)
|
||||
{
|
||||
return zcCarModelMapper.deleteZcCarModelById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int changeStatus(ZcCarModel zcCarModel) {
|
||||
zcCarModel.setUpdateTime(DateUtils.getNowDate());
|
||||
return zcCarModelMapper.updateZcCarModel(zcCarModel);
|
||||
}
|
||||
|
||||
}
|
||||
@ -101,4 +101,5 @@ public class ZcRentCarRuleServiceImpl implements IZcRentCarRuleService
|
||||
zcRentCarRule.setUpdateTime(DateUtils.getNowDate());
|
||||
return zcRentCarRuleMapper.updateZcRentCarRule(zcRentCarRule);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user