From 19171d0f422487c3d656169fd5f57c443980d0c2 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期一, 05 八月 2024 16:20:25 +0800
Subject: [PATCH] 代码提交
---
smartor/src/main/java/com/smartor/domain/PatArchiveReq.java | 9
smartor/src/main/java/com/smartor/service/impl/PatSpeciallistCategoryServiceImpl.java | 90 ++++++
ruoyi-generator/src/main/resources/vm/java/domain.java.vm | 133 +++-----
smartor/src/main/java/com/smartor/service/IPatSpeciallistCategoryService.java | 62 ++++
smartor/src/main/resources/mapper/smartor/PatSpeciallistCategoryMapper.xml | 111 +++++++
smartor/src/main/java/com/smartor/mapper/PatSpeciallistCategoryMapper.java | 64 ++++
smartor/src/main/java/com/smartor/service/impl/PatFilterlistServiceImpl.java | 41 +-
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatSpeciallistCategoryController.java | 106 +++++++
ruoyi-generator/src/main/resources/generator.yml | 9
smartor/src/main/java/com/smartor/domain/PatSpeciallistCategory.java | 69 ++++
ruoyi-generator/src/main/resources/vm/java/mapper.java.vm | 28 +
smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml | 21 +
ruoyi-generator/src/main/resources/vm/xml/mapper.xml.vm | 24
ruoyi-generator/src/main/resources/vm/java/controller.java.vm | 18
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java | 15
15 files changed, 658 insertions(+), 142 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java
index 0a36625..8c38bce 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java
@@ -57,7 +57,7 @@
*/
@ApiOperation("瀵煎嚭鎮h�呮。妗堝垪琛�")
@PreAuthorize("@ss.hasPermi('smartor:patarchive:export')")
- @Log(title = "鎮h�呮。妗�", businessType = BusinessType.EXPORT)
+ @Log(title = "鎮h�呮。妗�" , businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, PatArchive patArchive) {
List<PatArchive> list = patArchiveService.selectPatArchiveList(patArchive);
@@ -71,7 +71,7 @@
@ApiOperation("鑾峰彇鎮h�呮。妗堣缁嗕俊鎭�")
@PreAuthorize("@ss.hasPermi('smartor:patarchive:query')")
@GetMapping(value = "/getInfo/{patid}")
- @ApiImplicitParam(name = "patid", value = "鎮h�卛d")
+ @ApiImplicitParam(name = "patid" , value = "鎮h�卛d")
public AjaxResult getInfo(@PathVariable(name = "patid") Long patid) {
return success(patArchiveService.selectPatArchiveByPatid(patid));
}
@@ -92,7 +92,7 @@
*/
@ApiOperation("淇敼鎮h�呮。妗�")
@PreAuthorize("@ss.hasPermi('smartor:patarchive:update')")
- @Log(title = "鎮h�呮。妗�", businessType = BusinessType.UPDATE)
+ @Log(title = "鎮h�呮。妗�" , businessType = BusinessType.UPDATE)
@PostMapping("/update")
public AjaxResult update(@RequestBody PatArchive patArchive) {
return toAjax(patArchiveService.update(patArchive));
@@ -103,7 +103,7 @@
*/
@ApiOperation("鏂板鎴栦慨鏀规偅鑰呮。淇℃伅")
@PreAuthorize("@ss.hasPermi('smartor:patarchive:edit')")
- @Log(title = "鎮h�呮。妗�", businessType = BusinessType.UPDATE)
+ @Log(title = "鎮h�呮。妗�" , businessType = BusinessType.UPDATE)
@PostMapping("/saveOrUpdatePatInfo")
public AjaxResult saveOrUpdatePatInfo(@RequestBody PatArchiveVO patArchiveVO) {
return toAjax(patArchiveService.saveOrUpdatePatInfo(patArchiveVO));
@@ -114,9 +114,9 @@
*/
@ApiOperation("鍒犻櫎鎮h�呮。妗�")
@PreAuthorize("@ss.hasPermi('smartor:patarchive:remove')")
- @Log(title = "鎮h�呮。妗�", businessType = BusinessType.DELETE)
+ @Log(title = "鎮h�呮。妗�" , businessType = BusinessType.DELETE)
@GetMapping("/remove/{patids}")
- @ApiImplicitParam(name = "patids", value = "鎮h�卛d闆嗗悎", dataType = "long", dataTypeClass = Long.class)
+ @ApiImplicitParam(name = "patids" , value = "鎮h�卛d闆嗗悎" , dataType = "long" , dataTypeClass = Long.class)
public AjaxResult remove(@PathVariable Long[] patids) {
return toAjax(patArchiveService.deletePatArchiveByPatids(patids));
}
@@ -129,7 +129,7 @@
*/
@ApiOperation("瀵煎叆鎮h�呮枃浠跺鐞�")
@PostMapping("/importFilehandle")
- @ApiImplicitParams({@ApiImplicitParam(name = "tags", value = "鏍囩"), @ApiImplicitParam(name = "multipartFile", value = "涓婁紶鏂囦欢")})
+ @ApiImplicitParams({@ApiImplicitParam(name = "tags" , value = "鏍囩"), @ApiImplicitParam(name = "multipartFile" , value = "涓婁紶鏂囦欢")})
public AjaxResult importFilehandle(@RequestParam("tags") String tags, @RequestParam("multipartFile") MultipartFile multipartFile) {
Executor executor = Executors.newFixedThreadPool(3);
//鑾峰彇褰撳墠鐧婚檰浜�
@@ -217,4 +217,5 @@
return getDataTable2(count, patientInfo);
}
+
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatSpeciallistCategoryController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatSpeciallistCategoryController.java
new file mode 100644
index 0000000..309ad80
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatSpeciallistCategoryController.java
@@ -0,0 +1,106 @@
+package com.ruoyi.web.controller.smartor;
+
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.smartor.domain.PatSpeciallistCategory;
+import com.smartor.service.IPatSpeciallistCategoryService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 涓撶梾鎮h�呭垎绫籆ontroller
+ *
+ * @author ruoyi
+ * @date 2024-08-05
+ */
+@Api("涓撶梾鎮h�呭垎绫�")
+@RestController
+@RequestMapping("/smartor/patSpeciallistCategory")
+public class PatSpeciallistCategoryController extends BaseController
+{
+ @Autowired
+ private IPatSpeciallistCategoryService patSpeciallistCategoryService;
+
+ /**
+ * 鏌ヨ涓撶梾鎮h�呭垎绫诲垪琛�
+ */
+ @ApiOperation("鏌ヨ涓撶梾鎮h�呭垎绫诲垪琛�")
+ @PreAuthorize("@ss.hasPermi('system:category:list')")
+ @GetMapping("/list")
+ public TableDataInfo list(PatSpeciallistCategory patSpeciallistCategory)
+ {
+ startPage();
+ List<PatSpeciallistCategory> list = patSpeciallistCategoryService.selectPatSpeciallistCategoryList(patSpeciallistCategory);
+ return getDataTable(list);
+ }
+
+ /**
+ * 瀵煎嚭涓撶梾鎮h�呭垎绫诲垪琛�
+ */
+ @ApiOperation("瀵煎嚭涓撶梾鎮h�呭垎绫诲垪琛�")
+ @PreAuthorize("@ss.hasPermi('system:category:export')")
+ @Log(title = "涓撶梾鎮h�呭垎绫�", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, PatSpeciallistCategory patSpeciallistCategory)
+ {
+ List<PatSpeciallistCategory> list = patSpeciallistCategoryService.selectPatSpeciallistCategoryList(patSpeciallistCategory);
+ ExcelUtil<PatSpeciallistCategory> util = new ExcelUtil<PatSpeciallistCategory>(PatSpeciallistCategory.class);
+ util.exportExcel(response, list, "涓撶梾鎮h�呭垎绫绘暟鎹�");
+ }
+
+ /**
+ * 鑾峰彇涓撶梾鎮h�呭垎绫昏缁嗕俊鎭�
+ */
+ @ApiOperation("鑾峰彇涓撶梾鎮h�呭垎绫昏缁嗕俊鎭�")
+ @PreAuthorize("@ss.hasPermi('system:category:query')")
+ @GetMapping(value = "/getInfo/{id}")
+ public AjaxResult getInfo(@PathVariable("id") Long id)
+ {
+ return success(patSpeciallistCategoryService.selectPatSpeciallistCategoryById(id));
+ }
+
+ /**
+ * 鏂板涓撶梾鎮h�呭垎绫�
+ */
+ @PreAuthorize("@ss.hasPermi('system:category:add')")
+ @Log(title = "涓撶梾鎮h�呭垎绫�", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ public AjaxResult add(@RequestBody PatSpeciallistCategory patSpeciallistCategory)
+ {
+ return toAjax(patSpeciallistCategoryService.insertPatSpeciallistCategory(patSpeciallistCategory));
+ }
+
+ /**
+ * 淇敼涓撶梾鎮h�呭垎绫�
+ */
+ @ApiOperation("淇敼涓撶梾鎮h�呭垎绫�")
+ @PreAuthorize("@ss.hasPermi('system:category:edit')")
+ @Log(title = "涓撶梾鎮h�呭垎绫�", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ public AjaxResult edit(@RequestBody PatSpeciallistCategory patSpeciallistCategory)
+ {
+ return toAjax(patSpeciallistCategoryService.updatePatSpeciallistCategory(patSpeciallistCategory));
+ }
+
+ /**
+ * 鍒犻櫎涓撶梾鎮h�呭垎绫�
+ */
+ @ApiOperation("鍒犻櫎涓撶梾鎮h�呭垎绫�")
+ @PreAuthorize("@ss.hasPermi('system:category:remove')")
+ @Log(title = "涓撶梾鎮h�呭垎绫�", businessType = BusinessType.DELETE)
+ @GetMapping("/remove/{ids}")
+ public AjaxResult remove(@PathVariable Long[] ids)
+ {
+ return toAjax(patSpeciallistCategoryService.deletePatSpeciallistCategoryByIds(ids));
+ }
+}
diff --git a/ruoyi-generator/src/main/resources/generator.yml b/ruoyi-generator/src/main/resources/generator.yml
index 5bd3dd6..7fd4a6e 100644
--- a/ruoyi-generator/src/main/resources/generator.yml
+++ b/ruoyi-generator/src/main/resources/generator.yml
@@ -1,10 +1,11 @@
# 浠g爜鐢熸垚
-gen:
+gen:
# 浣滆��
- author: ruoyi
+ author: lihu
# 榛樿鐢熸垚鍖呰矾寰� system 闇�鏀规垚鑷繁鐨勬ā鍧楀悕绉� 濡� system monitor tool
- packageName: com.ruoyi.system
+# packageName: com.ruoyi.system
+ packageName: com.smartor
# 鑷姩鍘婚櫎琛ㄥ墠缂�锛岄粯璁ゆ槸false
autoRemovePre: false
# 琛ㄥ墠缂�锛堢敓鎴愮被鍚嶄笉浼氬寘鍚〃鍓嶇紑锛屽涓敤閫楀彿鍒嗛殧锛�
- tablePrefix: sys_
\ No newline at end of file
+ tablePrefix: sys_
diff --git a/ruoyi-generator/src/main/resources/vm/java/controller.java.vm b/ruoyi-generator/src/main/resources/vm/java/controller.java.vm
index bf88988..2d6166f 100644
--- a/ruoyi-generator/src/main/resources/vm/java/controller.java.vm
+++ b/ruoyi-generator/src/main/resources/vm/java/controller.java.vm
@@ -1,6 +1,8 @@
package ${packageName}.controller;
import java.util.List;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
@@ -26,10 +28,11 @@
/**
* ${functionName}Controller
- *
+ *
* @author ${author}
* @date ${datetime}
*/
+@Api("${functionName}")
@RestController
@RequestMapping("/${moduleName}/${businessName}")
public class ${ClassName}Controller extends BaseController
@@ -40,6 +43,7 @@
/**
* 鏌ヨ${functionName}鍒楄〃
*/
+ @ApiOperation("鏌ヨ${functionName}鍒楄〃")
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:list')")
@GetMapping("/list")
#if($table.crud || $table.sub)
@@ -60,6 +64,7 @@
/**
* 瀵煎嚭${functionName}鍒楄〃
*/
+ @ApiOperation("瀵煎嚭${functionName}鍒楄〃")
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:export')")
@Log(title = "${functionName}", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@@ -73,8 +78,9 @@
/**
* 鑾峰彇${functionName}璇︾粏淇℃伅
*/
+ @ApiOperation("鑾峰彇${functionName}璇︾粏淇℃伅")
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:query')")
- @GetMapping(value = "/{${pkColumn.javaField}}")
+ @GetMapping(value = "/getInfo/{${pkColumn.javaField}}")
public AjaxResult getInfo(@PathVariable("${pkColumn.javaField}") ${pkColumn.javaType} ${pkColumn.javaField})
{
return success(${className}Service.select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaField}));
@@ -85,7 +91,7 @@
*/
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:add')")
@Log(title = "${functionName}", businessType = BusinessType.INSERT)
- @PostMapping
+ @PostMapping("/add")
public AjaxResult add(@RequestBody ${ClassName} ${className})
{
return toAjax(${className}Service.insert${ClassName}(${className}));
@@ -94,9 +100,10 @@
/**
* 淇敼${functionName}
*/
+ @ApiOperation("淇敼${functionName}")
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:edit')")
@Log(title = "${functionName}", businessType = BusinessType.UPDATE)
- @PutMapping
+ @PostMapping("/edit")
public AjaxResult edit(@RequestBody ${ClassName} ${className})
{
return toAjax(${className}Service.update${ClassName}(${className}));
@@ -105,9 +112,10 @@
/**
* 鍒犻櫎${functionName}
*/
+ @ApiOperation("鍒犻櫎${functionName}")
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:remove')")
@Log(title = "${functionName}", businessType = BusinessType.DELETE)
- @DeleteMapping("/{${pkColumn.javaField}s}")
+ @GetMapping("/remove/{${pkColumn.javaField}s}")
public AjaxResult remove(@PathVariable ${pkColumn.javaType}[] ${pkColumn.javaField}s)
{
return toAjax(${className}Service.delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaField}s));
diff --git a/ruoyi-generator/src/main/resources/vm/java/domain.java.vm b/ruoyi-generator/src/main/resources/vm/java/domain.java.vm
index bd51c17..ba405df 100644
--- a/ruoyi-generator/src/main/resources/vm/java/domain.java.vm
+++ b/ruoyi-generator/src/main/resources/vm/java/domain.java.vm
@@ -1,105 +1,78 @@
package ${packageName}.domain;
-#foreach ($import in $importList)
-import ${import};
-#end
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
+ #foreach ($import in $importList)
+ import ${import};
+ #end
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
import com.ruoyi.common.annotation.Excel;
-#if($table.crud || $table.sub)
-import com.ruoyi.common.core.domain.BaseEntity;
-#elseif($table.tree)
-import com.ruoyi.common.core.domain.TreeEntity;
-#end
+ #if($table.crud || $table.sub)
+ import com.ruoyi.common.core.domain.BaseEntity;
+ #elseif($table.tree)
+ import com.ruoyi.common.core.domain.TreeEntity;
+ #end
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
/**
* ${functionName}瀵硅薄 ${tableName}
- *
+ *
* @author ${author}
* @date ${datetime}
*/
#if($table.crud || $table.sub)
-#set($Entity="BaseEntity")
+ #set($Entity="BaseEntity")
#elseif($table.tree)
-#set($Entity="TreeEntity")
+ #set($Entity="TreeEntity")
#end
+@Data
+@ApiModel("${functionName}")
public class ${ClassName} extends ${Entity}
-{
- private static final long serialVersionUID = 1L;
+ {
+private static final long serialVersionUID = 1L;
#foreach ($column in $columns)
-#if(!$table.isSuperColumn($column.javaField))
+ #if(!$table.isSuperColumn($column.javaField))
/** $column.columnComment */
-#if($column.list)
-#set($parentheseIndex=$column.columnComment.indexOf("锛�"))
-#if($parentheseIndex != -1)
-#set($comment=$column.columnComment.substring(0, $parentheseIndex))
-#else
-#set($comment=$column.columnComment)
-#end
-#if($parentheseIndex != -1)
- @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
-#elseif($column.javaType == 'Date')
- @JsonFormat(pattern = "yyyy-MM-dd")
- @Excel(name = "${comment}", width = 30, dateFormat = "yyyy-MM-dd")
-#else
- @Excel(name = "${comment}")
-#end
-#end
+ @ApiModelProperty("$column.columnComment")
+ #if($column.pk)
+ //鏁版嵁搴撹嚜澧炴敼鎴怈TableId(type = IdType.AUTO)
+## @TableId(type = IdType.AUTO)
+ #end
+ #if($column.list)
+ #set($parentheseIndex=$column.columnComment.indexOf("锛�"))
+ #if($parentheseIndex != -1)
+ #set($comment=$column.columnComment.substring(0, $parentheseIndex))
+ #else
+ #set($comment=$column.columnComment)
+ #end
+ #if($parentheseIndex != -1)
+ @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+ #elseif($column.javaType == 'Date')
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @Excel(name = "${comment}", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+ #else
+ @Excel(name = "${comment}")
+ #end
+ #end
private $column.javaType $column.javaField;
-#end
+ #end
#end
#if($table.sub)
- /** $table.subTable.functionName淇℃伅 */
- private List<${subClassName}> ${subclassName}List;
+/** $table.subTable.functionName淇℃伅 */
+private List<${subClassName}> ${subclassName}List;
#end
#foreach ($column in $columns)
-#if(!$table.isSuperColumn($column.javaField))
-#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]"))
-#set($AttrName=$column.javaField)
-#else
-#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
+ #if(!$table.isSuperColumn($column.javaField))
+ #if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]"))
+ #set($AttrName=$column.javaField)
+ #else
+ #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
+ #end
+ #end
#end
- public void set${AttrName}($column.javaType $column.javaField)
- {
- this.$column.javaField = $column.javaField;
- }
+ }
- public $column.javaType get${AttrName}()
- {
- return $column.javaField;
- }
-#end
-#end
-
-#if($table.sub)
- public List<${subClassName}> get${subClassName}List()
- {
- return ${subclassName}List;
- }
-
- public void set${subClassName}List(List<${subClassName}> ${subclassName}List)
- {
- this.${subclassName}List = ${subclassName}List;
- }
-
-#end
- @Override
- public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-#foreach ($column in $columns)
-#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]"))
-#set($AttrName=$column.javaField)
-#else
-#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
-#end
- .append("${column.javaField}", get${AttrName}())
-#end
-#if($table.sub)
- .append("${subclassName}List", get${subClassName}List())
-#end
- .toString();
- }
-}
diff --git a/ruoyi-generator/src/main/resources/vm/java/mapper.java.vm b/ruoyi-generator/src/main/resources/vm/java/mapper.java.vm
index 7e7d7c2..259cc20 100644
--- a/ruoyi-generator/src/main/resources/vm/java/mapper.java.vm
+++ b/ruoyi-generator/src/main/resources/vm/java/mapper.java.vm
@@ -1,6 +1,7 @@
package ${packageName}.mapper;
import java.util.List;
+import org.apache.ibatis.annotations.Mapper;
import ${packageName}.domain.${ClassName};
#if($table.sub)
import ${packageName}.domain.${subClassName};
@@ -8,15 +9,16 @@
/**
* ${functionName}Mapper鎺ュ彛
- *
+ *
* @author ${author}
* @date ${datetime}
*/
-public interface ${ClassName}Mapper
+@Mapper
+public interface ${ClassName}Mapper
{
/**
* 鏌ヨ${functionName}
- *
+ *
* @param ${pkColumn.javaField} ${functionName}涓婚敭
* @return ${functionName}
*/
@@ -24,7 +26,7 @@
/**
* 鏌ヨ${functionName}鍒楄〃
- *
+ *
* @param ${className} ${functionName}
* @return ${functionName}闆嗗悎
*/
@@ -32,7 +34,7 @@
/**
* 鏂板${functionName}
- *
+ *
* @param ${className} ${functionName}
* @return 缁撴灉
*/
@@ -40,7 +42,7 @@
/**
* 淇敼${functionName}
- *
+ *
* @param ${className} ${functionName}
* @return 缁撴灉
*/
@@ -48,7 +50,7 @@
/**
* 鍒犻櫎${functionName}
- *
+ *
* @param ${pkColumn.javaField} ${functionName}涓婚敭
* @return 缁撴灉
*/
@@ -56,7 +58,7 @@
/**
* 鎵归噺鍒犻櫎${functionName}
- *
+ *
* @param ${pkColumn.javaField}s 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
* @return 缁撴灉
*/
@@ -65,24 +67,24 @@
/**
* 鎵归噺鍒犻櫎${subTable.functionName}
- *
+ *
* @param ${pkColumn.javaField}s 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
* @return 缁撴灉
*/
public int delete${subClassName}By${subTableFkClassName}s(${pkColumn.javaType}[] ${pkColumn.javaField}s);
-
+
/**
* 鎵归噺鏂板${subTable.functionName}
- *
+ *
* @param ${subclassName}List ${subTable.functionName}鍒楄〃
* @return 缁撴灉
*/
public int batch${subClassName}(List<${subClassName}> ${subclassName}List);
-
+
/**
* 閫氳繃${functionName}涓婚敭鍒犻櫎${subTable.functionName}淇℃伅
- *
+ *
* @param ${pkColumn.javaField} ${functionName}ID
* @return 缁撴灉
*/
diff --git a/ruoyi-generator/src/main/resources/vm/xml/mapper.xml.vm b/ruoyi-generator/src/main/resources/vm/xml/mapper.xml.vm
index 0ceb3d8..588d65c 100644
--- a/ruoyi-generator/src/main/resources/vm/xml/mapper.xml.vm
+++ b/ruoyi-generator/src/main/resources/vm/xml/mapper.xml.vm
@@ -3,8 +3,8 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="${packageName}.mapper.${ClassName}Mapper">
-
- <resultMap type="${ClassName}" id="${ClassName}Result">
+
+ <resultMap type="${packageName}.domain.${ClassName}" id="${ClassName}Result">
#foreach ($column in $columns)
<result property="${column.javaField}" column="${column.columnName}" />
#end
@@ -26,9 +26,9 @@
select#foreach($column in $columns) $column.columnName#if($foreach.count != $columns.size()),#end#end from ${tableName}
</sql>
- <select id="select${ClassName}List" parameterType="${ClassName}" resultMap="${ClassName}Result">
+ <select id="select${ClassName}List" parameterType="${packageName}.domain.${ClassName}" resultMap="${ClassName}Result">
<include refid="select${ClassName}Vo"/>
- <where>
+ <where>
#foreach($column in $columns)
#set($queryType=$column.queryType)
#set($javaField=$column.javaField)
@@ -57,7 +57,7 @@
#end
</where>
</select>
-
+
<select id="select${ClassName}By${pkColumn.capJavaField}" parameterType="${pkColumn.javaType}" resultMap="#if($table.sub)${ClassName}${subClassName}Result#else${ClassName}Result#end">
#if($table.crud || $table.tree)
<include refid="select${ClassName}Vo"/>
@@ -71,8 +71,8 @@
where a.${pkColumn.columnName} = #{${pkColumn.javaField}}
#end
</select>
-
- <insert id="insert${ClassName}" parameterType="${ClassName}"#if($pkColumn.increment) useGeneratedKeys="true" keyProperty="$pkColumn.javaField"#end>
+
+ <insert id="insert${ClassName}" parameterType="${packageName}.domain.${ClassName}"#if($pkColumn.increment) useGeneratedKeys="true" keyProperty="$pkColumn.javaField"#end>
insert into ${tableName}
<trim prefix="(" suffix=")" suffixOverrides=",">
#foreach($column in $columns)
@@ -90,7 +90,7 @@
</trim>
</insert>
- <update id="update${ClassName}" parameterType="${ClassName}">
+ <update id="update${ClassName}" parameterType="${packageName}.domain.${ClassName}">
update ${tableName}
<trim prefix="SET" suffixOverrides=",">
#foreach($column in $columns)
@@ -107,15 +107,15 @@
</delete>
<delete id="delete${ClassName}By${pkColumn.capJavaField}s" parameterType="String">
- delete from ${tableName} where ${pkColumn.columnName} in
+ delete from ${tableName} where ${pkColumn.columnName} in
<foreach item="${pkColumn.javaField}" collection="array" open="(" separator="," close=")">
#{${pkColumn.javaField}}
</foreach>
</delete>
#if($table.sub)
-
+
<delete id="delete${subClassName}By${subTableFkClassName}s" parameterType="String">
- delete from ${subTableName} where ${subTableFkName} in
+ delete from ${subTableName} where ${subTableFkName} in
<foreach item="${subTableFkclassName}" collection="array" open="(" separator="," close=")">
#{${subTableFkclassName}}
</foreach>
@@ -132,4 +132,4 @@
</foreach>
</insert>
#end
-</mapper>
\ No newline at end of file
+</mapper>
diff --git a/smartor/src/main/java/com/smartor/domain/PatArchiveReq.java b/smartor/src/main/java/com/smartor/domain/PatArchiveReq.java
index 5399440..61d49a7 100644
--- a/smartor/src/main/java/com/smartor/domain/PatArchiveReq.java
+++ b/smartor/src/main/java/com/smartor/domain/PatArchiveReq.java
@@ -18,7 +18,7 @@
* @author ls
* @date 2023-06-14
*/
-@ApiModel(value = "PatArchiveReq", description = "鎮h�呮。妗堣姹傚璞�")
+@ApiModel(value = "PatArchiveReq" , description = "鎮h�呮。妗堣姹傚璞�")
@Data
public class PatArchiveReq {
/**
@@ -137,4 +137,11 @@
private Integer pageSize;
+ /**
+ * 鏄惁杩囪檻
+ */
+ @ApiModelProperty(value = " 鏄惁杩囪檻,榛樿false ")
+ private boolean isFilter = false;
+
+
}
diff --git a/smartor/src/main/java/com/smartor/domain/PatSpeciallistCategory.java b/smartor/src/main/java/com/smartor/domain/PatSpeciallistCategory.java
new file mode 100644
index 0000000..0d08d81
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/domain/PatSpeciallistCategory.java
@@ -0,0 +1,69 @@
+package com.smartor.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 涓撶梾鎮h�呭垎绫诲璞� pat_speciallist_category
+ *
+ * @author ruoyi
+ * @date 2024-08-05
+ */
+@Data
+@ApiModel("涓撶梾鎮h�呭垎绫�")
+public class PatSpeciallistCategory extends BaseEntity {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * $column.columnComment
+ */
+ @ApiModelProperty("$column.columnComment")
+ //鏁版嵁搴撹嚜澧炴敼鎴怈TableId(type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 鍒嗙被鍚嶇О
+ */
+ @ApiModelProperty("鍒嗙被鍚嶇О")
+ @Excel(name = "鍒嗙被鍚嶇О")
+ private String name;
+
+ /**
+ * 搴忓彿
+ */
+ @ApiModelProperty("搴忓彿")
+ @Excel(name = "搴忓彿")
+ private Long seqno;
+
+ /**
+ * 鐖禝D
+ */
+ @ApiModelProperty("鐖禝D")
+ @Excel(name = "鐖禝D")
+ private Long pid;
+
+ /**
+ * GUID
+ */
+ @ApiModelProperty("GUID")
+ @Excel(name = "GUID")
+ private String guid;
+
+ /**
+ * 鍖婚櫌鏈烘瀯id
+ */
+ @ApiModelProperty("鍖婚櫌鏈烘瀯id")
+ @Excel(name = "鍖婚櫌鏈烘瀯id")
+ private Long orgid;
+
+ /**
+ * 鍒犻櫎鏍囧織锛�0锛氭湭鍒犻櫎 1锛氬凡鍒犻櫎锛�
+ */
+ @ApiModelProperty("鍒犻櫎鏍囧織锛�0锛氭湭鍒犻櫎 1锛氬凡鍒犻櫎锛�")
+ private Long delFlag;
+
+}
+
diff --git a/smartor/src/main/java/com/smartor/mapper/PatSpeciallistCategoryMapper.java b/smartor/src/main/java/com/smartor/mapper/PatSpeciallistCategoryMapper.java
new file mode 100644
index 0000000..6f2bf07
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/mapper/PatSpeciallistCategoryMapper.java
@@ -0,0 +1,64 @@
+package com.smartor.mapper;
+
+import com.smartor.domain.PatSpeciallistCategory;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 涓撶梾鎮h�呭垎绫籑apper鎺ュ彛
+ *
+ * @author ruoyi
+ * @date 2024-08-05
+ */
+@Mapper
+public interface PatSpeciallistCategoryMapper
+{
+ /**
+ * 鏌ヨ涓撶梾鎮h�呭垎绫�
+ *
+ * @param id 涓撶梾鎮h�呭垎绫讳富閿�
+ * @return 涓撶梾鎮h�呭垎绫�
+ */
+ public PatSpeciallistCategory selectPatSpeciallistCategoryById(Long id);
+
+ /**
+ * 鏌ヨ涓撶梾鎮h�呭垎绫诲垪琛�
+ *
+ * @param patSpeciallistCategory 涓撶梾鎮h�呭垎绫�
+ * @return 涓撶梾鎮h�呭垎绫婚泦鍚�
+ */
+ public List<PatSpeciallistCategory> selectPatSpeciallistCategoryList(PatSpeciallistCategory patSpeciallistCategory);
+
+ /**
+ * 鏂板涓撶梾鎮h�呭垎绫�
+ *
+ * @param patSpeciallistCategory 涓撶梾鎮h�呭垎绫�
+ * @return 缁撴灉
+ */
+ public int insertPatSpeciallistCategory(PatSpeciallistCategory patSpeciallistCategory);
+
+ /**
+ * 淇敼涓撶梾鎮h�呭垎绫�
+ *
+ * @param patSpeciallistCategory 涓撶梾鎮h�呭垎绫�
+ * @return 缁撴灉
+ */
+ public int updatePatSpeciallistCategory(PatSpeciallistCategory patSpeciallistCategory);
+
+ /**
+ * 鍒犻櫎涓撶梾鎮h�呭垎绫�
+ *
+ * @param id 涓撶梾鎮h�呭垎绫讳富閿�
+ * @return 缁撴灉
+ */
+ public int deletePatSpeciallistCategoryById(Long id);
+
+ /**
+ * 鎵归噺鍒犻櫎涓撶梾鎮h�呭垎绫�
+ *
+ * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
+ * @return 缁撴灉
+ */
+ public int deletePatSpeciallistCategoryByIds(Long[] ids);
+}
diff --git a/smartor/src/main/java/com/smartor/service/IPatSpeciallistCategoryService.java b/smartor/src/main/java/com/smartor/service/IPatSpeciallistCategoryService.java
new file mode 100644
index 0000000..4c19c62
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/service/IPatSpeciallistCategoryService.java
@@ -0,0 +1,62 @@
+package com.smartor.service;
+
+import com.smartor.domain.PatSpeciallistCategory;
+
+import java.util.List;
+
+/**
+ * 涓撶梾鎮h�呭垎绫籗ervice鎺ュ彛
+ *
+ * @author ruoyi
+ * @date 2024-08-05
+ */
+public interface IPatSpeciallistCategoryService
+{
+ /**
+ * 鏌ヨ涓撶梾鎮h�呭垎绫�
+ *
+ * @param id 涓撶梾鎮h�呭垎绫讳富閿�
+ * @return 涓撶梾鎮h�呭垎绫�
+ */
+ public PatSpeciallistCategory selectPatSpeciallistCategoryById(Long id);
+
+ /**
+ * 鏌ヨ涓撶梾鎮h�呭垎绫诲垪琛�
+ *
+ * @param patSpeciallistCategory 涓撶梾鎮h�呭垎绫�
+ * @return 涓撶梾鎮h�呭垎绫婚泦鍚�
+ */
+ public List<PatSpeciallistCategory> selectPatSpeciallistCategoryList(PatSpeciallistCategory patSpeciallistCategory);
+
+ /**
+ * 鏂板涓撶梾鎮h�呭垎绫�
+ *
+ * @param patSpeciallistCategory 涓撶梾鎮h�呭垎绫�
+ * @return 缁撴灉
+ */
+ public int insertPatSpeciallistCategory(PatSpeciallistCategory patSpeciallistCategory);
+
+ /**
+ * 淇敼涓撶梾鎮h�呭垎绫�
+ *
+ * @param patSpeciallistCategory 涓撶梾鎮h�呭垎绫�
+ * @return 缁撴灉
+ */
+ public int updatePatSpeciallistCategory(PatSpeciallistCategory patSpeciallistCategory);
+
+ /**
+ * 鎵归噺鍒犻櫎涓撶梾鎮h�呭垎绫�
+ *
+ * @param ids 闇�瑕佸垹闄ょ殑涓撶梾鎮h�呭垎绫讳富閿泦鍚�
+ * @return 缁撴灉
+ */
+ public int deletePatSpeciallistCategoryByIds(Long[] ids);
+
+ /**
+ * 鍒犻櫎涓撶梾鎮h�呭垎绫讳俊鎭�
+ *
+ * @param id 涓撶梾鎮h�呭垎绫讳富閿�
+ * @return 缁撴灉
+ */
+ public int deletePatSpeciallistCategoryById(Long id);
+}
diff --git a/smartor/src/main/java/com/smartor/service/impl/PatFilterlistServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/PatFilterlistServiceImpl.java
index 874605a..926de0e 100644
--- a/smartor/src/main/java/com/smartor/service/impl/PatFilterlistServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/PatFilterlistServiceImpl.java
@@ -2,10 +2,14 @@
import com.ruoyi.common.utils.DateUtils;
import com.smartor.domain.PatFilterlist;
+import com.smartor.domain.ServiceSubtask;
import com.smartor.mapper.PatFilterlistMapper;
+import com.smartor.mapper.ServiceSubtaskMapper;
import com.smartor.service.IPatFilterlistService;
+import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@@ -16,10 +20,11 @@
* @date 2024-08-02
*/
@Service
-public class PatFilterlistServiceImpl implements IPatFilterlistService
-{
+public class PatFilterlistServiceImpl implements IPatFilterlistService {
@Autowired
private PatFilterlistMapper patFilterlistMapper;
+ @Autowired
+ private ServiceSubtaskMapper serviceSubtaskMapper;
/**
* 鏌ヨ鎮h�呰繃婊ゅ悕鍗�
@@ -28,8 +33,7 @@
* @return 鎮h�呰繃婊ゅ悕鍗�
*/
@Override
- public PatFilterlist selectPatFilterlistById(Long id)
- {
+ public PatFilterlist selectPatFilterlistById(Long id) {
return patFilterlistMapper.selectPatFilterlistById(id);
}
@@ -40,8 +44,7 @@
* @return 鎮h�呰繃婊ゅ悕鍗�
*/
@Override
- public List<PatFilterlist> selectPatFilterlistList(PatFilterlist patFilterlist)
- {
+ public List<PatFilterlist> selectPatFilterlistList(PatFilterlist patFilterlist) {
return patFilterlistMapper.selectPatFilterlistList(patFilterlist);
}
@@ -51,10 +54,20 @@
* @param patFilterlist 鎮h�呰繃婊ゅ悕鍗�
* @return 缁撴灉
*/
+ @Transactional(rollbackFor = Exception.class)
@Override
- public int insertPatFilterlist(PatFilterlist patFilterlist)
- {
+ public int insertPatFilterlist(PatFilterlist patFilterlist) {
+ //鍏堟煡璇竴涓嬶紝璇ユ偅鑰呮槸鍚︽湁鎵ц鐨勪换鍔★紝濡傛灉鏈夌殑璇濓紝灏嗕换鍔℃殏鍋�
+ ServiceSubtask serviceSubtask = new ServiceSubtask();
+ serviceSubtask.setPatid(patFilterlist.getPatid());
+ serviceSubtask.setDelFlag("0");
+ List<ServiceSubtask> selectServiceSubtaskList = serviceSubtaskMapper.selectServiceSubtaskList(serviceSubtask);
+ if (CollectionUtils.isNotEmpty(selectServiceSubtaskList)) {
+ serviceSubtaskMapper.deleteServiceSubtaskById(selectServiceSubtaskList.get(0).getId());
+ }
+ //鏂板鎮h�呰繃婊や俊鎭�
patFilterlist.setCreateTime(DateUtils.getNowDate());
+ patFilterlist.setUpdateTime(DateUtils.getNowDate());
return patFilterlistMapper.insertPatFilterlist(patFilterlist);
}
@@ -64,9 +77,9 @@
* @param patFilterlist 鎮h�呰繃婊ゅ悕鍗�
* @return 缁撴灉
*/
+ @Transactional(rollbackFor = Exception.class)
@Override
- public int updatePatFilterlist(PatFilterlist patFilterlist)
- {
+ public int updatePatFilterlist(PatFilterlist patFilterlist) {
patFilterlist.setUpdateTime(DateUtils.getNowDate());
return patFilterlistMapper.updatePatFilterlist(patFilterlist);
}
@@ -77,9 +90,9 @@
* @param ids 闇�瑕佸垹闄ょ殑鎮h�呰繃婊ゅ悕鍗曚富閿�
* @return 缁撴灉
*/
+ @Transactional(rollbackFor = Exception.class)
@Override
- public int deletePatFilterlistByIds(Long[] ids)
- {
+ public int deletePatFilterlistByIds(Long[] ids) {
return patFilterlistMapper.deletePatFilterlistByIds(ids);
}
@@ -89,9 +102,9 @@
* @param id 鎮h�呰繃婊ゅ悕鍗曚富閿�
* @return 缁撴灉
*/
+ @Transactional(rollbackFor = Exception.class)
@Override
- public int deletePatFilterlistById(Long id)
- {
+ public int deletePatFilterlistById(Long id) {
return patFilterlistMapper.deletePatFilterlistById(id);
}
}
diff --git a/smartor/src/main/java/com/smartor/service/impl/PatSpeciallistCategoryServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/PatSpeciallistCategoryServiceImpl.java
new file mode 100644
index 0000000..d3bb296
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/service/impl/PatSpeciallistCategoryServiceImpl.java
@@ -0,0 +1,90 @@
+package com.smartor.service.impl;
+
+import com.ruoyi.common.utils.DateUtils;
+import com.smartor.domain.PatSpeciallistCategory;
+import com.smartor.mapper.PatSpeciallistCategoryMapper;
+import com.smartor.service.IPatSpeciallistCategoryService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 涓撶梾鎮h�呭垎绫籗ervice涓氬姟灞傚鐞�
+ *
+ * @author ruoyi
+ * @date 2024-08-05
+ */
+@Service
+public class PatSpeciallistCategoryServiceImpl implements IPatSpeciallistCategoryService {
+ @Autowired
+ private PatSpeciallistCategoryMapper patSpeciallistCategoryMapper;
+
+ /**
+ * 鏌ヨ涓撶梾鎮h�呭垎绫�
+ *
+ * @param id 涓撶梾鎮h�呭垎绫讳富閿�
+ * @return 涓撶梾鎮h�呭垎绫�
+ */
+ @Override
+ public PatSpeciallistCategory selectPatSpeciallistCategoryById(Long id) {
+ return patSpeciallistCategoryMapper.selectPatSpeciallistCategoryById(id);
+ }
+
+ /**
+ * 鏌ヨ涓撶梾鎮h�呭垎绫诲垪琛�
+ *
+ * @param patSpeciallistCategory 涓撶梾鎮h�呭垎绫�
+ * @return 涓撶梾鎮h�呭垎绫�
+ */
+ @Override
+ public List<PatSpeciallistCategory> selectPatSpeciallistCategoryList(PatSpeciallistCategory patSpeciallistCategory) {
+ return patSpeciallistCategoryMapper.selectPatSpeciallistCategoryList(patSpeciallistCategory);
+ }
+
+ /**
+ * 鏂板涓撶梾鎮h�呭垎绫�
+ *
+ * @param patSpeciallistCategory 涓撶梾鎮h�呭垎绫�
+ * @return 缁撴灉
+ */
+ @Override
+ public int insertPatSpeciallistCategory(PatSpeciallistCategory patSpeciallistCategory) {
+ patSpeciallistCategory.setCreateTime(DateUtils.getNowDate());
+ return patSpeciallistCategoryMapper.insertPatSpeciallistCategory(patSpeciallistCategory);
+ }
+
+ /**
+ * 淇敼涓撶梾鎮h�呭垎绫�
+ *
+ * @param patSpeciallistCategory 涓撶梾鎮h�呭垎绫�
+ * @return 缁撴灉
+ */
+ @Override
+ public int updatePatSpeciallistCategory(PatSpeciallistCategory patSpeciallistCategory) {
+ patSpeciallistCategory.setUpdateTime(DateUtils.getNowDate());
+ return patSpeciallistCategoryMapper.updatePatSpeciallistCategory(patSpeciallistCategory);
+ }
+
+ /**
+ * 鎵归噺鍒犻櫎涓撶梾鎮h�呭垎绫�
+ *
+ * @param ids 闇�瑕佸垹闄ょ殑涓撶梾鎮h�呭垎绫讳富閿�
+ * @return 缁撴灉
+ */
+ @Override
+ public int deletePatSpeciallistCategoryByIds(Long[] ids) {
+ return patSpeciallistCategoryMapper.deletePatSpeciallistCategoryByIds(ids);
+ }
+
+ /**
+ * 鍒犻櫎涓撶梾鎮h�呭垎绫讳俊鎭�
+ *
+ * @param id 涓撶梾鎮h�呭垎绫讳富閿�
+ * @return 缁撴灉
+ */
+ @Override
+ public int deletePatSpeciallistCategoryById(Long id) {
+ return patSpeciallistCategoryMapper.deletePatSpeciallistCategoryById(id);
+ }
+}
diff --git a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml b/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
index 78c168a..ab22592 100644
--- a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
@@ -315,6 +315,8 @@
LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag GROUP BY patid ) t ON t.patid =
d.patid
<where>
+ d.del_flag != 1
+ AND a.del_flag != 1
<if test="name != null and name != ''">and a.name like concat('%', #{name}, '%')</if>
<if test="idcardno != null and idcardno != ''">and a.idcardno = #{idcardno}</if>
<if test="pid != null and pid != ''">and a.id = #{id}</if>
@@ -353,8 +355,9 @@
#{pid}
</foreach>
</if>
- AND d.del_flag != 1
- AND a.del_flag != 1
+ <if test="isFilter == true">
+ AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid)
+ </if>
</where>
</select>
@@ -394,6 +397,8 @@
LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag GROUP BY patid ) t ON t.patid =
d.patid
<where>
+ d.del_flag != 1
+ AND a.del_flag != 1
<if test="pid != null and pid != ''">and a.id = #{pid}</if>
<if test="name != null and name != ''">and a.name like concat('%', #{name}, '%')</if>
<if test="idcardno != null and idcardno != ''">and a.idcardno = #{idcardno}</if>
@@ -422,8 +427,9 @@
#{pid}
</foreach>
</if>
- AND d.del_flag != 1
- AND a.del_flag != 1
+ <if test="isFilter == true">
+ AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid)
+ </if>
</where>
</select>
@@ -463,6 +469,8 @@
LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag GROUP BY patid ) t ON t.patid =
d.patid
<where>
+ d.del_flag != 1
+ AND a.del_flag != 1
<if test="pid != null and pid != ''">and a.id = #{pid}</if>
<if test="name != null and name != ''">and a.name like concat('%', #{name}, '%')</if>
<if test="idcardno != null and idcardno != ''">and a.idcardno = #{idcardno}</if>
@@ -492,8 +500,9 @@
#{pid}
</foreach>
</if>
- AND d.del_flag != 1
- AND a.del_flag != 1
+ <if test="isFilter == true">
+ AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid)
+ </if>
</where>
</select>
diff --git a/smartor/src/main/resources/mapper/smartor/PatSpeciallistCategoryMapper.xml b/smartor/src/main/resources/mapper/smartor/PatSpeciallistCategoryMapper.xml
new file mode 100644
index 0000000..21a55c1
--- /dev/null
+++ b/smartor/src/main/resources/mapper/smartor/PatSpeciallistCategoryMapper.xml
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.smartor.mapper.PatSpeciallistCategoryMapper">
+
+ <resultMap type="com.smartor.domain.PatSpeciallistCategory" id="PatSpeciallistCategoryResult">
+ <result property="id" column="id"/>
+ <result property="name" column="name"/>
+ <result property="seqno" column="seqno"/>
+ <result property="pid" column="pid"/>
+ <result property="guid" column="guid"/>
+ <result property="orgid" column="orgid"/>
+ <result property="delFlag" column="del_flag"/>
+ <result property="createBy" column="create_by"/>
+ <result property="createTime" column="create_time"/>
+ <result property="updateBy" column="update_by"/>
+ <result property="updateTime" column="update_time"/>
+ </resultMap>
+
+ <sql id="selectPatSpeciallistCategoryVo">
+ select id,
+ name,
+ seqno,
+ pid,
+ guid,
+ orgid,
+ del_flag,
+ create_by,
+ create_time,
+ update_by,
+ update_time
+ from pat_speciallist_category
+ </sql>
+
+ <select id="selectPatSpeciallistCategoryList" parameterType="com.smartor.domain.PatSpeciallistCategory"
+ resultMap="PatSpeciallistCategoryResult">
+ <include refid="selectPatSpeciallistCategoryVo"/>
+ <where>
+ <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
+ <if test="seqno != null ">and seqno = #{seqno}</if>
+ <if test="pid != null ">and pid = #{pid}</if>
+ <if test="guid != null and guid != ''">and guid = #{guid}</if>
+ <if test="orgid != null ">and orgid = #{orgid}</if>
+ </where>
+ </select>
+
+ <select id="selectPatSpeciallistCategoryById" parameterType="Long" resultMap="PatSpeciallistCategoryResult">
+ <include refid="selectPatSpeciallistCategoryVo"/>
+ where id = #{id}
+ </select>
+
+ <insert id="insertPatSpeciallistCategory" parameterType="com.smartor.domain.PatSpeciallistCategory"
+ useGeneratedKeys="true" keyProperty="id">
+ insert into pat_speciallist_category
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="name != null">name,</if>
+ <if test="seqno != null">seqno,</if>
+ <if test="pid != null">pid,</if>
+ <if test="guid != null">guid,</if>
+ <if test="orgid != null">orgid,</if>
+ <if test="delFlag != null">del_flag,</if>
+ <if test="createBy != null">create_by,</if>
+ <if test="createTime != null">create_time,</if>
+ <if test="updateBy != null">update_by,</if>
+ <if test="updateTime != null">update_time,</if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="name != null">#{name},</if>
+ <if test="seqno != null">#{seqno},</if>
+ <if test="pid != null">#{pid},</if>
+ <if test="guid != null">#{guid},</if>
+ <if test="orgid != null">#{orgid},</if>
+ <if test="delFlag != null">#{delFlag},</if>
+ <if test="createBy != null">#{createBy},</if>
+ <if test="createTime != null">#{createTime},</if>
+ <if test="updateBy != null">#{updateBy},</if>
+ <if test="updateTime != null">#{updateTime},</if>
+ </trim>
+ </insert>
+
+ <update id="updatePatSpeciallistCategory" parameterType="com.smartor.domain.PatSpeciallistCategory">
+ update pat_speciallist_category
+ <trim prefix="SET" suffixOverrides=",">
+ <if test="name != null">name = #{name},</if>
+ <if test="seqno != null">seqno = #{seqno},</if>
+ <if test="pid != null">pid = #{pid},</if>
+ <if test="guid != null">guid = #{guid},</if>
+ <if test="orgid != null">orgid = #{orgid},</if>
+ <if test="delFlag != null">del_flag = #{delFlag},</if>
+ <if test="createBy != null">create_by = #{createBy},</if>
+ <if test="createTime != null">create_time = #{createTime},</if>
+ <if test="updateBy != null">update_by = #{updateBy},</if>
+ <if test="updateTime != null">update_time = #{updateTime},</if>
+ </trim>
+ where id = #{id}
+ </update>
+
+ <delete id="deletePatSpeciallistCategoryById" parameterType="Long">
+ delete
+ from pat_speciallist_category
+ where id = #{id}
+ </delete>
+
+ <delete id="deletePatSpeciallistCategoryByIds" parameterType="String">
+ delete from pat_speciallist_category where id in
+ <foreach item="id" collection="array" open="(" separator="," close=")">
+ #{id}
+ </foreach>
+ </delete>
+</mapper>
--
Gitblit v1.9.3