lin
2024-03-02 861e9b1eb145094dff6d1caf3dba30d7ce0e11d7
src/main/java/org/springblade/modules/taskPlaceSelfCheck/service/impl/TaskPlaceSelfCheckServiceImpl.java
@@ -23,6 +23,7 @@
import org.springblade.common.constant.CommonConstant;
import org.springblade.common.constant.DictConstant;
import org.springblade.common.param.CommonParamSet;
import org.springblade.common.utils.AuthUtils;
import org.springblade.common.utils.SpringUtils;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.utils.BeanUtil;
@@ -164,12 +165,11 @@
            item.setCreateUser(AuthUtil.getUserId());
         });
         List<TaskPlaceRecordEntity> collect = taskPlaceRecordList.stream().filter(item -> item.getState().equals(0)).collect(Collectors.toList());
         boolean b = bean.saveBatch(collect);
         updateById(taskPlaceSelfCheck);
         if (b) {
            return b;
         if (collect.size() > 0) {
            bean.saveBatch(collect);
         }
         throw new Exception("保存失败!");
         updateById(taskPlaceSelfCheck);
         return save;
      }
      return false;
   }
@@ -204,6 +204,7 @@
   /**
    * 导出消防自查信息
    *
    * @param taskPlaceSelfCheck
    * @return
    */
@@ -248,4 +249,14 @@
      }
      return taskPlaceSelfCheckExcels;
   }
   @Override
   public Integer getCount(String neiCode, int i) {
      // 获取请求头中的角色别名
      String roleName = SpringUtils.getRequestParam("roleName");
      if (AuthUtils.isMj(roleName)) {
         return baseMapper.getCount(neiCode, i, AuthUtil.getUserId());
      }
      return 0;
   }
}