linwei
2024-02-07 0f0b60762ec17a2e94eaf750920419ab7f80885a
src/main/java/org/springblade/modules/task/service/impl/TaskServiceImpl.java
@@ -54,6 +54,8 @@
import org.springblade.modules.task.mapper.TaskMapper;
import org.springblade.modules.task.service.*;
import org.springblade.modules.task.vo.TaskVO;
import org.springblade.modules.taskPlaceSelfCheck.entity.TaskPlaceSelfCheckEntity;
import org.springblade.modules.taskPlaceSelfCheck.service.ITaskPlaceSelfCheckService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -258,6 +260,7 @@
   /**
    * 获取网格员id
    *
    * @return
    */
   private String getGridCode() {
@@ -334,6 +337,7 @@
   /**
    * 根据类型创建任务
    *
    * @param param 参数
    * @return
    */
@@ -376,6 +380,7 @@
   /**
    * 新增走访任务
    *
    * @param household
    */
   public void saveGridWordTask(HouseholdVO household) {
@@ -475,6 +480,7 @@
   /**
    * 新增校园安全检查任务
    *
    * @param placeVO
    * @param taskEntity
    */
@@ -496,6 +502,7 @@
   /**
    * 新增旅馆安全检查任务
    *
    * @param placeVO
    * @param taskEntity
    */
@@ -518,6 +525,7 @@
   /**
    * 新增打金店/二手车/二手手机任务
    *
    * @param placeVO
    * @param taskEntity
    * @param taskName
@@ -554,6 +562,7 @@
   /**
    * 插入任务信息
    *
    * @param houseCode
    * @param type
    * @param taskName
@@ -582,4 +591,35 @@
      // 返回
      return taskEntity;
   }
   /**
    * 任务审核
    * @param task
    * @return
    */
   @Override
   public Boolean examine(TaskEntity task) {
      // 二手交易
      if (task.getReportType().equals(5)) {
         boolean b = updateById(task);
         if (b) {
            ITaskLabelReportingEventService bean = SpringUtils.getBean(ITaskLabelReportingEventService.class);
            return bean.update(Wrappers.<TaskLabelReportingEventEntity>lambdaUpdate()
               .set(TaskLabelReportingEventEntity::getConfirmFlag, task.getStatus())
               .eq(TaskLabelReportingEventEntity::getTaskId, task.getId()));
         }
      }
      // 消防只查
      if (task.getReportType().equals(2)) {
         boolean b = updateById(task);
         if (b) {
            ITaskPlaceSelfCheckService bean = SpringUtils.getBean(ITaskPlaceSelfCheckService.class);
            return bean.update(Wrappers.<TaskPlaceSelfCheckEntity>lambdaUpdate()
               .set(TaskPlaceSelfCheckEntity::getStatus, task.getStatus())
               .eq(TaskPlaceSelfCheckEntity::getTaskId, task.getId()));
         }
      }
      return false;
   }
}