|
|
|
|
@ -26,6 +26,7 @@ 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;
|
|
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 品牌Controller
|
|
|
|
|
@ -66,7 +67,7 @@ public class BaseCarbrandController extends BaseController
|
|
|
|
|
* 导出品牌列表
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermissions("tyre:carbrand:export")
|
|
|
|
|
@Log(title = "品牌", businessType = BusinessType.EXPORT)
|
|
|
|
|
@Log(title = "车辆车牌", businessType = BusinessType.EXPORT)
|
|
|
|
|
@PostMapping("/export")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public AjaxResult export(BaseCarbrand baseCarbrand)
|
|
|
|
|
@ -77,7 +78,37 @@ public class BaseCarbrandController extends BaseController
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 新增品牌
|
|
|
|
|
* 导出车牌信息
|
|
|
|
|
* @param file
|
|
|
|
|
* @param updateSupport
|
|
|
|
|
* @return
|
|
|
|
|
* @throws Exception
|
|
|
|
|
*/
|
|
|
|
|
@Log(title = "车辆车牌", businessType = BusinessType.IMPORT)
|
|
|
|
|
@RequiresPermissions("tyre:carbrand:import")
|
|
|
|
|
@PostMapping("/importData")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
|
|
|
|
|
{
|
|
|
|
|
ExcelUtil<BaseCarbrand> util = new ExcelUtil<BaseCarbrand>(BaseCarbrand.class);
|
|
|
|
|
List<BaseCarbrand> brandList = util.importExcel(file.getInputStream());
|
|
|
|
|
String operName = ShiroUtils.getSysUser().getLoginName();
|
|
|
|
|
String message = baseCarbrandService.importBrand(brandList, updateSupport, operName);
|
|
|
|
|
return AjaxResult.success(message);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequiresPermissions("tyre:carbrand:view")
|
|
|
|
|
@GetMapping("/importTemplate")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public AjaxResult importTemplate()
|
|
|
|
|
{
|
|
|
|
|
ExcelUtil<BaseCarbrand> util = new ExcelUtil<BaseCarbrand>(BaseCarbrand.class);
|
|
|
|
|
return util.importTemplateExcel("车牌数据");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 新增车辆车牌
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping("/add")
|
|
|
|
|
public String add()
|
|
|
|
|
@ -86,10 +117,10 @@ public class BaseCarbrandController extends BaseController
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 新增保存品牌
|
|
|
|
|
* 新增保存车辆车牌
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermissions("tyre:carbrand:add")
|
|
|
|
|
@Log(title = "品牌", businessType = BusinessType.INSERT)
|
|
|
|
|
@Log(title = "车辆车牌", businessType = BusinessType.INSERT)
|
|
|
|
|
@PostMapping("/add")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public AjaxResult addSave(BaseCarbrand baseCarbrand)
|
|
|
|
|
@ -108,7 +139,7 @@ public class BaseCarbrandController extends BaseController
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 修改品牌
|
|
|
|
|
* 修改车辆车牌
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping("/edit/{objid}")
|
|
|
|
|
public String edit(@PathVariable("objid") Long objid, ModelMap mmap)
|
|
|
|
|
@ -119,10 +150,10 @@ public class BaseCarbrandController extends BaseController
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 修改保存品牌
|
|
|
|
|
* 修改保存车辆车牌
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermissions("tyre:carbrand:edit")
|
|
|
|
|
@Log(title = "品牌", businessType = BusinessType.UPDATE)
|
|
|
|
|
@Log(title = "车辆车牌", businessType = BusinessType.UPDATE)
|
|
|
|
|
@PostMapping("/edit")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public AjaxResult editSave(BaseCarbrand baseCarbrand)
|
|
|
|
|
@ -141,10 +172,10 @@ public class BaseCarbrandController extends BaseController
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 删除品牌
|
|
|
|
|
* 删除车辆车牌
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermissions("tyre:carbrand:remove")
|
|
|
|
|
@Log(title = "品牌", businessType = BusinessType.DELETE)
|
|
|
|
|
@Log(title = "车辆车牌", businessType = BusinessType.DELETE)
|
|
|
|
|
@PostMapping( "/remove")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public AjaxResult remove(String ids)
|
|
|
|
|
|