|
@@ -0,0 +1,146 @@
|
|
|
|
|
+package com.zd.laboratory.controller;
|
|
|
|
|
+
|
|
|
|
|
+import com.zd.common.core.annotation.Log;
|
|
|
|
|
+import com.zd.common.core.annotation.PreAuthorize;
|
|
|
|
|
+import com.zd.common.core.exception.NoRollException;
|
|
|
|
|
+import com.zd.common.core.log.BusinessType;
|
|
|
|
|
+import com.zd.common.core.security.TokenService;
|
|
|
|
|
+import com.zd.common.core.utils.ExcelUtil;
|
|
|
|
|
+import com.zd.common.core.web.controller.BaseController;
|
|
|
|
|
+import com.zd.laboratory.domain.LabWhiteJoinSublist;
|
|
|
|
|
+import com.zd.laboratory.domain.LabWhitelist;
|
|
|
|
|
+import com.zd.laboratory.domain.XxpClassify;
|
|
|
|
|
+import com.zd.laboratory.domain.vo.LabSubjectVO;
|
|
|
|
|
+import com.zd.laboratory.domain.vo.LabWhitelistVO;
|
|
|
|
|
+import com.zd.laboratory.service.ILabWhiteJoinSublistService;
|
|
|
|
|
+import com.zd.laboratory.service.ILabWhitelistService;
|
|
|
|
|
+import com.zd.laboratory.service.IXxpClassifyService;
|
|
|
|
|
+import com.zd.laboratory.service.impl.HaiKangDoorService;
|
|
|
|
|
+import com.zd.model.constant.HttpStatus;
|
|
|
|
|
+import com.zd.model.domain.ResultData;
|
|
|
|
|
+import com.zd.model.domain.per.PerFun;
|
|
|
|
|
+import com.zd.model.domain.per.PerPrefix;
|
|
|
|
|
+import com.zd.model.entity.SysUser;
|
|
|
|
|
+import com.zd.model.page.TableDataInfo;
|
|
|
|
|
+import io.swagger.annotations.Api;
|
|
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
+
|
|
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
+import java.io.IOException;
|
|
|
|
|
+import java.util.Date;
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ * 信息牌类目Controller
|
|
|
|
|
+ *
|
|
|
|
|
+ * @author xxf
|
|
|
|
|
+ * @date 2023-03-22
|
|
|
|
|
+ */
|
|
|
|
|
+@RestController
|
|
|
|
|
+@Api(tags = "【信息牌类目】")
|
|
|
|
|
+@RequestMapping("/XxpClassify")
|
|
|
|
|
+public class LabXxpClassifyController extends BaseController
|
|
|
|
|
+{
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private IXxpClassifyService xxpClassifyService;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private TokenService tokenService;
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 查询信息牌类目列表
|
|
|
|
|
+ */
|
|
|
|
|
+ @PreAuthorize(hasPermi = PerPrefix.LABORATORY_CLASSIFY + PerFun.LIST)
|
|
|
|
|
+ @GetMapping("/list")
|
|
|
|
|
+ @ApiOperation(value = "查询信息牌类目列表")
|
|
|
|
|
+ public TableDataInfo<XxpClassify> list(XxpClassify xxpClassify)
|
|
|
|
|
+ {
|
|
|
|
|
+ // 排序规则获取
|
|
|
|
|
+ String sort= "s".equals(xxpClassify.getRemark())?"sort":"create_time";
|
|
|
|
|
+ startPage(sort,"descending");
|
|
|
|
|
+ List<XxpClassify> list = xxpClassifyService.selectXxpClassifyList(xxpClassify);
|
|
|
|
|
+ return getDataTable(list);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 导出信息牌类目列表
|
|
|
|
|
+ */
|
|
|
|
|
+ @ApiOperation(value = "导出信息牌类目列表")
|
|
|
|
|
+ @PreAuthorize(hasPermi = PerPrefix.LABORATORY_CLASSIFY + PerFun.EXPORT)
|
|
|
|
|
+ @Log(title = "信息牌类目", businessType = BusinessType.EXPORT)
|
|
|
|
|
+ @PostMapping("/export")
|
|
|
|
|
+ public void export(HttpServletResponse response, XxpClassify xxpClassify) throws IOException
|
|
|
|
|
+ {
|
|
|
|
|
+ List<XxpClassify> list = xxpClassifyService.selectXxpClassifyList(xxpClassify);
|
|
|
|
|
+ ExcelUtil<XxpClassify> util = new ExcelUtil<XxpClassify>(XxpClassify.class);
|
|
|
|
|
+ util.exportExcel(response, list, "信息牌类目数据");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取信息牌类目详细
|
|
|
|
|
+ */
|
|
|
|
|
+ @ApiOperation(value = "获取信息牌类目详细")
|
|
|
|
|
+ @PreAuthorize(hasPermi = PerPrefix.LABORATORY_CLASSIFY + PerFun.QUERY)
|
|
|
|
|
+ @GetMapping(value = "/{id}")
|
|
|
|
|
+ public ResultData<XxpClassify> getInfo(@PathVariable("id") Long id)
|
|
|
|
|
+ {
|
|
|
|
|
+ return ResultData.success(xxpClassifyService.selectXxpClassifyById(id));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 新增信息牌类目
|
|
|
|
|
+ */
|
|
|
|
|
+ @ApiOperation(value = "新增信息牌类目")
|
|
|
|
|
+ @PreAuthorize(hasPermi = PerPrefix.LABORATORY_CLASSIFY + PerFun.ADD)
|
|
|
|
|
+ @Log(title = "信息牌类目", businessType = BusinessType.INSERT)
|
|
|
|
|
+ @PostMapping
|
|
|
|
|
+ public ResultData add(@RequestBody XxpClassify xxpClassify)
|
|
|
|
|
+ {
|
|
|
|
|
+ return ResultData.result(xxpClassifyService.insertXxpClassify(xxpClassify));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 修改信息牌类目
|
|
|
|
|
+ */
|
|
|
|
|
+ @ApiOperation(value = "修改信息牌类目")
|
|
|
|
|
+ @PreAuthorize(hasPermi = PerPrefix.LABORATORY_CLASSIFY + PerFun.EDIT)
|
|
|
|
|
+ @Log(title = "信息牌类目", businessType = BusinessType.UPDATE)
|
|
|
|
|
+ @PutMapping
|
|
|
|
|
+ public ResultData edit(@RequestBody XxpClassify xxpClassify)
|
|
|
|
|
+ {
|
|
|
|
|
+ return ResultData.result(xxpClassifyService.updateXxpClassify(xxpClassify));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 删除信息牌类目
|
|
|
|
|
+ */
|
|
|
|
|
+ @ApiOperation(value = "删除信息牌类目")
|
|
|
|
|
+ @PreAuthorize(hasPermi = PerPrefix.LABORATORY_CLASSIFY + PerFun.REMOVE)
|
|
|
|
|
+ @Log(title = "信息牌类目", businessType = BusinessType.DELETE)
|
|
|
|
|
+ @DeleteMapping("/{ids}")
|
|
|
|
|
+ public ResultData remove(@PathVariable Long[] ids)
|
|
|
|
|
+ {
|
|
|
|
|
+ return ResultData.result(xxpClassifyService.deleteXxpClassifyByIds(ids));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 根据id删除
|
|
|
|
|
+ * @param id
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ @ApiOperation(value = "根据id删除信息牌类目")
|
|
|
|
|
+ @PreAuthorize(hasPermi = PerPrefix.LABORATORY_CLASSIFY + PerFun.REMOVE)
|
|
|
|
|
+ @Log(title = "信息牌类目", businessType = BusinessType.DELETE)
|
|
|
|
|
+ @PostMapping("/{id}")
|
|
|
|
|
+ public ResultData remove(@PathVariable Long id)
|
|
|
|
|
+ {
|
|
|
|
|
+ return ResultData.result(xxpClassifyService.deleteXxpClassifyById(id));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+}
|