|
|
@@ -1,101 +0,0 @@
|
|
|
-package com.zd.airbottle.controller;
|
|
|
-
|
|
|
-import com.zd.airbottle.domain.QpTransportUserCredentials;
|
|
|
-import com.zd.airbottle.service.IQpTransportUserCredentialsService;
|
|
|
-import com.zd.common.core.utils.poi.ExcelUtil;
|
|
|
-import com.zd.common.core.web.controller.BaseController;
|
|
|
-import com.zd.common.core.web.page.TableDataInfo;
|
|
|
-import com.zd.common.log.annotation.Log;
|
|
|
-import com.zd.common.log.enums.BusinessType;
|
|
|
-import com.zd.common.response.ResultData;
|
|
|
-import com.zd.common.security.annotation.PreAuthorize;
|
|
|
-import io.swagger.annotations.Api;
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.*;
|
|
|
-
|
|
|
-import javax.servlet.http.HttpServletResponse;
|
|
|
-import java.io.IOException;
|
|
|
-import java.util.List;
|
|
|
-
|
|
|
-/**
|
|
|
- * 运输人员证件Controller
|
|
|
- *
|
|
|
- * @author zd
|
|
|
- * @date 2022-05-12
|
|
|
- */
|
|
|
-@RestController
|
|
|
-@Api(tags = "【运输人员证件】")
|
|
|
-@RequestMapping("/userCredentials")
|
|
|
-public class QpTransportUserCredentialsController extends BaseController<QpTransportUserCredentials> {
|
|
|
- @Autowired
|
|
|
- private IQpTransportUserCredentialsService qpTransportUserCredentialsService;
|
|
|
-
|
|
|
- /**
|
|
|
- * 查询运输人员证件列表
|
|
|
- */
|
|
|
- @PreAuthorize(hasPermi = "airbottle:supplier:list")
|
|
|
- @GetMapping("/list")
|
|
|
- @ApiOperation(value = "查询运输人员证件列表")
|
|
|
- public TableDataInfo<QpTransportUserCredentials> list(QpTransportUserCredentials qpTransportUserCredentials) {
|
|
|
- startPage();
|
|
|
- List<QpTransportUserCredentials> list = qpTransportUserCredentialsService.selectQpTransportUserCredentialsList(qpTransportUserCredentials);
|
|
|
- return getDataTable(list);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 导出运输人员证件列表
|
|
|
- */
|
|
|
- @ApiOperation(value = "导出运输人员证件列表")
|
|
|
- @PreAuthorize(hasPermi = "airbottle:supplier:export")
|
|
|
- @Log(title = "运输人员证件", businessType = BusinessType.EXPORT)
|
|
|
- @PostMapping("/export")
|
|
|
- public void export(HttpServletResponse response, QpTransportUserCredentials qpTransportUserCredentials) throws IOException {
|
|
|
- List<QpTransportUserCredentials> list = qpTransportUserCredentialsService.selectQpTransportUserCredentialsList(qpTransportUserCredentials);
|
|
|
- ExcelUtil<QpTransportUserCredentials> util = new ExcelUtil<>(QpTransportUserCredentials.class);
|
|
|
- util.exportExcel(response, list, "运输人员证件数据");
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 获取运输人员证件详细信息
|
|
|
- */
|
|
|
- @ApiOperation(value = "获取运输人员证件详细信息")
|
|
|
- @PreAuthorize(hasPermi = "airbottle:supplier:query")
|
|
|
- @GetMapping(value = "/{id}")
|
|
|
- public ResultData<QpTransportUserCredentials> getInfo(@PathVariable("id") Long id) {
|
|
|
- return ResultData.success(qpTransportUserCredentialsService.selectQpTransportUserCredentialsById(id));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 新增运输人员证件
|
|
|
- */
|
|
|
- @ApiOperation(value = "新增运输人员证件")
|
|
|
- @PreAuthorize(hasPermi = "airbottle:supplier:add")
|
|
|
- @Log(title = "运输人员证件", businessType = BusinessType.INSERT)
|
|
|
- @PostMapping
|
|
|
- public ResultData<Boolean> add(@RequestBody QpTransportUserCredentials qpTransportUserCredentials) {
|
|
|
- return ResultData.result(qpTransportUserCredentialsService.insertQpTransportUserCredentials(qpTransportUserCredentials));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 修改运输人员证件
|
|
|
- */
|
|
|
- @ApiOperation(value = "修改运输人员证件")
|
|
|
- @PreAuthorize(hasPermi = "airbottle:supplier:edit")
|
|
|
- @Log(title = "运输人员证件", businessType = BusinessType.UPDATE)
|
|
|
- @PutMapping
|
|
|
- public ResultData<Boolean> edit(@RequestBody QpTransportUserCredentials qpTransportUserCredentials) {
|
|
|
- return ResultData.result(qpTransportUserCredentialsService.updateQpTransportUserCredentials(qpTransportUserCredentials));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 删除运输人员证件
|
|
|
- */
|
|
|
- @ApiOperation(value = "删除运输人员证件")
|
|
|
- @PreAuthorize(hasPermi = "airbottle:supplier:remove")
|
|
|
- @Log(title = "运输人员证件", businessType = BusinessType.DELETE)
|
|
|
- @DeleteMapping("/{ids}")
|
|
|
- public ResultData<Boolean> remove(@PathVariable Long[] ids) {
|
|
|
- return ResultData.result(qpTransportUserCredentialsService.deleteQpTransportUserCredentialsByIds(ids));
|
|
|
- }
|
|
|
-}
|