yzc 2 роки тому
батько
коміт
668970a6f6

+ 4 - 7
hx-oa/src/main/java/com/fjhx/oa/controller/netdisk/NetdiskController.java

@@ -7,10 +7,7 @@ import com.fjhx.oa.entity.netdisk.vo.NetdiskVo;
 import com.fjhx.oa.service.netdisk.NetdiskService;
 import com.ruoyi.common.core.domain.BaseSelectDto;
 import org.springframework.beans.factory.annotation.Autowired;
-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 org.springframework.web.bind.annotation.*;
 
 import java.util.List;
 
@@ -41,9 +38,9 @@ public class NetdiskController {
     /**
      * 网盘子目录树
      */
-    @PostMapping("/tree")
-    public List<NetdiskVo> tree(@RequestBody NetdiskSelectDto dto) {
-        return netdiskService.tree(dto);
+    @GetMapping("/tree")
+    public List<NetdiskVo> tree() {
+        return netdiskService.tree();
     }
 
     /**

+ 4 - 0
hx-oa/src/main/java/com/fjhx/oa/service/daily/impl/DailyReportCommentsServiceImpl.java

@@ -1,6 +1,7 @@
 package com.fjhx.oa.service.daily.impl;
 
 import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.ObjectUtil;
 import com.baomidou.dynamic.datasource.annotation.DS;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -45,6 +46,9 @@ public class DailyReportCommentsServiceImpl extends ServiceImpl<DailyReportComme
         UserUtil.assignmentNickName(records, DailyReportComments::getCreateUser, DailyReportCommentsVo::setUserName);
         //赋值回复评论列表
         List<Long> dailyReportCommentsIds = records.stream().map(DailyReportComments::getId).collect(Collectors.toList());
+        if(ObjectUtil.isEmpty(dailyReportCommentsIds)){
+            return page;
+        }
         List<DailyReportComments> list = list(q -> q.in(DailyReportComments::getReplyId, dailyReportCommentsIds));
         List<DailyReportCommentsVo> dailyReportCommentsVos = BeanUtil.copyToList(list, DailyReportCommentsVo.class);
         UserUtil.assignmentNickName(dailyReportCommentsVos, DailyReportComments::getCreateUser, DailyReportCommentsVo::setUserName);

+ 1 - 1
hx-oa/src/main/java/com/fjhx/oa/service/netdisk/NetdiskService.java

@@ -25,7 +25,7 @@ public interface NetdiskService extends BaseService<Netdisk> {
      */
     Page<NetdiskVo> getPage(NetdiskSelectDto dto);
 
-    List<NetdiskVo> tree(NetdiskSelectDto dto);
+    List<NetdiskVo> tree();
 
         /**
          * 网盘明细

+ 1 - 4
hx-oa/src/main/java/com/fjhx/oa/service/netdisk/impl/NetdiskServiceImpl.java

@@ -62,12 +62,9 @@ public class NetdiskServiceImpl extends ServiceImpl<NetdiskMapper, Netdisk> impl
 
     //网盘目录子目录树
     @Override
-    public List<NetdiskVo> tree(NetdiskSelectDto dto) {
+    public List<NetdiskVo> tree() {
         QueryWrapper<Netdisk> queryWrapper = new QueryWrapper<>();
         queryWrapper.eq("type", 1);
-        if(ObjectUtil.isNotEmpty(dto.getKeyword())) {
-            queryWrapper.like("name", dto.getKeyword());
-        }
         List<Netdisk> list = list(queryWrapper);
         return treeRecursion(list,-1l);
     }

+ 6 - 1
hx-wms/src/main/java/com/fjhx/wms/entity/warehouse/dto/WarehouseSelectDto.java

@@ -7,12 +7,17 @@ import lombok.Setter;
 /**
  * 仓库列表查询入参实体
  *
- * @author 
+ * @author
  * @since 2023-03-20
  */
 @Getter
 @Setter
 public class WarehouseSelectDto extends BaseSelectDto {
 
+    /**
+     * 仓库类型过滤
+     */
+    private String type;
+
 
 }

+ 1 - 0
hx-wms/src/main/java/com/fjhx/wms/service/warehouse/impl/WarehouseServiceImpl.java

@@ -33,6 +33,7 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper, Warehouse
         IWrapper<Warehouse> wrapper = getWrapper();
         wrapper.orderByDesc("w", Warehouse::getId);
         wrapper.like("w",Warehouse::getName,dto.getKeyword());
+        wrapper.eq("w",Warehouse::getType,dto.getType());
         Page<WarehouseVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
         //赋值仓管员名称
         UserUtil.assignmentNickName(page.getRecords(),Warehouse::getKeeperId,WarehouseVo::setKeeperName);