车辆导入开始
This commit is contained in:
@ -26,7 +26,7 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 车型管理Controller
|
||||
* 车辆管理Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-13
|
||||
@ -50,7 +50,7 @@ public class ZcCarController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询车型管理列表
|
||||
* 查询车辆管理列表
|
||||
*/
|
||||
@RequiresPermissions("operation:car:list")
|
||||
@PostMapping("/list")
|
||||
@ -63,21 +63,21 @@ public class ZcCarController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出车型管理列表
|
||||
* 导出车辆管理列表
|
||||
*/
|
||||
@RequiresPermissions("operation:car:export")
|
||||
@Log(title = "车型管理", businessType = BusinessType.EXPORT)
|
||||
@Log(title = "车辆管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(ZcCar zcCar)
|
||||
{
|
||||
List<ZcCar> list = zcCarService.selectZcCarList(zcCar);
|
||||
ExcelUtil<ZcCar> util = new ExcelUtil<ZcCar>(ZcCar.class);
|
||||
return util.exportExcel(list, "车型管理数据");
|
||||
return util.exportExcel(list, "车辆管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增车型管理
|
||||
* 新增车辆管理
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add(ModelMap mmap)
|
||||
@ -89,10 +89,10 @@ public class ZcCarController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存车型管理
|
||||
* 新增保存车辆管理
|
||||
*/
|
||||
@RequiresPermissions("operation:car:add")
|
||||
@Log(title = "车型管理", businessType = BusinessType.INSERT)
|
||||
@Log(title = "车辆管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(ZcCar zcCar)
|
||||
@ -106,7 +106,7 @@ public class ZcCarController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车型管理
|
||||
* 修改车辆管理
|
||||
*/
|
||||
@RequiresPermissions("operation:car:edit")
|
||||
@GetMapping("/edit/{id}")
|
||||
@ -121,7 +121,7 @@ public class ZcCarController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存车型管理
|
||||
* 修改保存车辆管理
|
||||
*/
|
||||
@RequiresPermissions("operation:car:edit")
|
||||
@Log(title = "车型管理", businessType = BusinessType.UPDATE)
|
||||
@ -138,14 +138,33 @@ public class ZcCarController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除车型管理
|
||||
* 删除车辆管理
|
||||
*/
|
||||
@RequiresPermissions("operation:car:remove")
|
||||
@Log(title = "车型管理", businessType = BusinessType.DELETE)
|
||||
@Log(title = "车辆管理", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(zcCarService.deleteZcCarByIds(ids));
|
||||
}
|
||||
|
||||
@Log(title = "车辆管理", businessType = BusinessType.UPDATE)
|
||||
@RequiresPermissions("operation:car:edit")
|
||||
@PostMapping("/changeStatus")
|
||||
@ResponseBody
|
||||
public AjaxResult changeStatus(ZcCar zcCar)
|
||||
{
|
||||
return toAjax(zcCarService.changeStatus(zcCar));
|
||||
}
|
||||
|
||||
@RequiresPermissions("operation:car:view")
|
||||
@GetMapping("/importTemplate")
|
||||
@ResponseBody
|
||||
public AjaxResult importTemplate()
|
||||
{
|
||||
ExcelUtil<ZcCar> util = new ExcelUtil<ZcCar>(ZcCar.class);
|
||||
return util.importTemplateExcel("车辆数据");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -180,7 +180,7 @@ public class ZcRentCarRuleController extends BaseController
|
||||
|
||||
|
||||
|
||||
@Log(title = "运营商管理", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "租车计费", businessType = BusinessType.UPDATE)
|
||||
@RequiresPermissions("operation:company:edit")
|
||||
@PostMapping("/changeStatus")
|
||||
@ResponseBody
|
||||
|
||||
@ -66,4 +66,6 @@ public interface IZcCarService
|
||||
* @return 是否唯一 (0:唯一, 1:不唯一)
|
||||
*/
|
||||
String checkVinUnique(ZcCar zcCar);
|
||||
|
||||
public int changeStatus(ZcCar zcCar);
|
||||
}
|
||||
|
||||
@ -106,4 +106,12 @@ public class ZcCarServiceImpl implements IZcCarService
|
||||
}
|
||||
return OperationConstants.USER_VIN_UNIQUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int changeStatus(ZcCar zcCar) {
|
||||
zcCar.setUpdateTime(DateUtils.getNowDate());
|
||||
return zcCarMapper.updateZcCar(zcCar);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user