zhongrj
2024-01-20 625d68d8fa25b0077bd8ff9608f03f2b17e6208d
src/main/java/org/springblade/modules/task/service/impl/TaskServiceImpl.java
@@ -31,8 +31,10 @@
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.modules.category.entity.CategoryEntity;
import org.springblade.modules.category.service.ICategoryService;
import org.springblade.modules.grid.entity.GridEntity;
import org.springblade.modules.grid.entity.GridWorkLogEntity;
import org.springblade.modules.grid.entity.GridmanEntity;
import org.springblade.modules.grid.service.IGridService;
import org.springblade.modules.grid.service.IGridWorkLogService;
import org.springblade.modules.grid.service.IGridmanService;
import org.springblade.modules.house.service.IHouseRentalService;
@@ -72,9 +74,6 @@
   @Autowired
   private IHouseRentalService iHouseRentalService;
   @Autowired
   private IDeptService deptService;
   @Autowired
   private ICategoryService categoryService;
@@ -205,7 +204,7 @@
      taskVO.setReportType(2);
      taskVO.setIsDeleted(0);
      // 查询网格员对应的网格id
      Integer gridId = getGridId();
      String gridCode = getGridCode();
      // 标签事件
      Integer bqsj = baseMapper.selectTaskCount(taskVO);
      taskVO.setReportType(1);
@@ -223,7 +222,7 @@
      // 场所审核
      Integer cssh = SpringUtils.getBean(IPlaceExtService.class).selectCount(roleType > 0 ? AuthUtil.getUserId() : null, neiCode, 1);
      // 走访日志
      Integer zfrw = SpringUtils.getBean(IGridWorkLogService.class).getGridWorkCountHandleCount(gridId,1);
      Integer zfrw = SpringUtils.getBean(IGridWorkLogService.class).getGridWorkCountHandleCount(gridCode,1);
      // 设置
      objectObjectHashMap.put("qbhs", qbhs);
      objectObjectHashMap.put("bqsj", bqsj);
@@ -239,12 +238,10 @@
    * 获取网格员id
    * @return
    */
   private Integer getGridId() {
      QueryWrapper<GridmanEntity> wrapper = new QueryWrapper<>();
      wrapper.eq("is_deleted",0).eq("user_id",AuthUtil.getUserId());
      List<GridmanEntity> list = SpringUtils.getBean(IGridmanService.class).list(wrapper);
      if (list.size()>0){
         return list.get(0).getGridId();
   private String getGridCode() {
      GridEntity grid = SpringUtils.getBean(IGridService.class).getGridByUserId(AuthUtil.getUserId());
      if (null!=grid){
         return grid.getGridCode();
      }
      return null;
   }