|
|
@@ -1,41 +1,27 @@
|
|
|
package org.jeecg.modules.medical.controller;
|
|
|
|
|
|
-import java.util.Arrays;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-import java.util.stream.Collectors;
|
|
|
-import java.io.IOException;
|
|
|
-import java.io.UnsupportedEncodingException;
|
|
|
-import java.net.URLDecoder;
|
|
|
-import javax.servlet.http.HttpServletRequest;
|
|
|
-import javax.servlet.http.HttpServletResponse;
|
|
|
-import org.jeecg.common.api.vo.Result;
|
|
|
-import org.jeecg.common.system.query.QueryGenerator;
|
|
|
-import org.jeecg.common.util.oConvertUtils;
|
|
|
-import org.jeecg.modules.medical.entity.MedicalInsKnowledge;
|
|
|
-import org.jeecg.modules.medical.service.IMedicalInsKnowledgeService;
|
|
|
-
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-
|
|
|
-import org.jeecgframework.poi.excel.ExcelImportUtil;
|
|
|
-import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
|
|
-import org.jeecgframework.poi.excel.entity.ExportParams;
|
|
|
-import org.jeecgframework.poi.excel.entity.ImportParams;
|
|
|
-import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
|
|
+import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
+import org.jeecg.common.api.vo.Result;
|
|
|
+import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
import org.jeecg.common.system.base.controller.JeecgController;
|
|
|
+import org.jeecg.common.system.query.QueryGenerator;
|
|
|
+import org.jeecg.common.system.util.JwtUtil;
|
|
|
+import org.jeecg.modules.medical.common.bo.KnowledgeBaseBO;
|
|
|
+import org.jeecg.modules.medical.entity.MedicalInsKnowledge;
|
|
|
+import org.jeecg.modules.medical.service.IMedicalInsKnowledgeService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
-import org.springframework.web.multipart.MultipartFile;
|
|
|
-import org.springframework.web.multipart.MultipartHttpServletRequest;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
-import com.alibaba.fastjson.JSON;
|
|
|
-import io.swagger.annotations.Api;
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
-import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
-import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
+
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.util.Arrays;
|
|
|
|
|
|
/**
|
|
|
* @Description: medical_ins_knowledge
|
|
|
@@ -50,7 +36,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
public class MedicalInsKnowledgeController extends JeecgController<MedicalInsKnowledge, IMedicalInsKnowledgeService> {
|
|
|
@Autowired
|
|
|
private IMedicalInsKnowledgeService medicalInsKnowledgeService;
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 分页列表查询
|
|
|
*
|
|
|
@@ -72,22 +58,38 @@ public class MedicalInsKnowledgeController extends JeecgController<MedicalInsKno
|
|
|
IPage<MedicalInsKnowledge> pageList = medicalInsKnowledgeService.page(page, queryWrapper);
|
|
|
return Result.OK(pageList);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 添加
|
|
|
*
|
|
|
* @param medicalInsKnowledge
|
|
|
* @return
|
|
|
*/
|
|
|
- @AutoLog(value = "medical_ins_knowledge-添加")
|
|
|
+/* @AutoLog(value = "medical_ins_knowledge-添加")
|
|
|
@ApiOperation(value="medical_ins_knowledge-添加", notes="medical_ins_knowledge-添加")
|
|
|
@RequiresPermissions("medical:medical_ins_knowledge:add")
|
|
|
@PostMapping(value = "/add")
|
|
|
public Result<String> add(@RequestBody MedicalInsKnowledge medicalInsKnowledge) {
|
|
|
medicalInsKnowledgeService.save(medicalInsKnowledge);
|
|
|
return Result.OK("添加成功!");
|
|
|
- }
|
|
|
-
|
|
|
+ }*/
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 添加
|
|
|
+ *
|
|
|
+ * @param medicalInsKnowledge
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @AutoLog(value = "medical_ins_knowledge-添加")
|
|
|
+ @ApiOperation(value="medical_ins_knowledge-添加", notes="medical_ins_knowledge-添加")
|
|
|
+ @RequiresPermissions("medical:medical_ins_knowledge:add")
|
|
|
+ @PostMapping(value = "/add")
|
|
|
+ public Result<String> add(HttpServletRequest request, @RequestBody KnowledgeBaseBO knowledgeBaseBO) {
|
|
|
+ String username = JwtUtil.getUserNameByToken(request);
|
|
|
+ medicalInsKnowledgeService.fileUploadSave(username, knowledgeBaseBO);
|
|
|
+ return Result.OK("添加成功!");
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 编辑
|
|
|
*
|
|
|
@@ -102,7 +104,7 @@ public class MedicalInsKnowledgeController extends JeecgController<MedicalInsKno
|
|
|
medicalInsKnowledgeService.updateById(medicalInsKnowledge);
|
|
|
return Result.OK("编辑成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 通过id删除
|
|
|
*
|
|
|
@@ -117,7 +119,7 @@ public class MedicalInsKnowledgeController extends JeecgController<MedicalInsKno
|
|
|
medicalInsKnowledgeService.removeById(id);
|
|
|
return Result.OK("删除成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 批量删除
|
|
|
*
|
|
|
@@ -132,7 +134,7 @@ public class MedicalInsKnowledgeController extends JeecgController<MedicalInsKno
|
|
|
this.medicalInsKnowledgeService.removeByIds(Arrays.asList(ids.split(",")));
|
|
|
return Result.OK("批量删除成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 通过id查询
|
|
|
*
|