ソースを参照

add
增加APP端科室列表接口

wangzl 4 ヶ月 前
コミット
9dfbf6e6ba

+ 37 - 0
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/app/controller/APPDeptController.java

@@ -0,0 +1,37 @@
+package cn.tr.module.smart.app.controller;
+
+import cn.tr.core.pojo.CommonResult;
+import cn.tr.module.smart.common.dto.BizDeptQueryDTO;
+import cn.tr.module.smart.common.service.IBizDeptService;
+import cn.tr.module.smart.wx.controller.vo.BizWxDeptVO;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @author wangzl
+ * @description: App科室列表
+ * @date 2025/8/4 10:16
+ */
+@Api(tags = "科室")
+@RestController
+@RequestMapping("/app/dept")
+@AllArgsConstructor
+public class APPDeptController {
+
+    private final IBizDeptService bizDeptService;
+
+    @ApiOperationSupport(author = "lf",order = 1)
+    @ApiOperation(value="根据条件查询科室",notes = "权限: 无")
+    @PostMapping("/query/list")
+    public CommonResult<List<BizWxDeptVO>> selectList(@RequestBody BizDeptQueryDTO query) {
+        return CommonResult.success(bizDeptService.stdWxAppletSelectBizDeptList(query));
+    }
+}

+ 3 - 1
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/dto/BizDeptQueryDTO.java

@@ -4,6 +4,8 @@ import lombok.ToString;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+
+import java.io.Serializable;
 import java.util.*;
 /**
  * 科室查询参数
@@ -14,7 +16,7 @@ import java.util.*;
 @Data
 @ApiModel("科室查询参数")
 @ToString
-public class BizDeptQueryDTO  {
+public class BizDeptQueryDTO implements Serializable {
     private static final long serialVersionUID = 1L;
     @ApiModelProperty("科室名称")
     private String name;

+ 2 - 1
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/service/impl/BizDeptServiceImpl.java

@@ -49,9 +49,10 @@ public class BizDeptServiceImpl implements IBizDeptService {
     public List<BizDeptDTO> selectBizDeptList(BizDeptQueryDTO query){
         return BizDeptMapper.INSTANCE.convertDtoList(
                 baseRepository.selectList(new LambdaQueryWrapper<BizDeptPO>()
+                        .like(StrUtil.isNotBlank(query.getName()),BizDeptPO::getName, query.getName())
                 )
         );
-    };
+    }
 
     /**
     * 根据id查询科室