| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import liquibase.pro.packaged.W; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.jetbrains.annotations.NotNull; |
| | | import org.springblade.common.constant.DictConstant; |
| | | import org.springblade.common.utils.SpringUtils; |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | | 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.GridWorkLogEntity; |
| | | import org.springblade.modules.grid.entity.GridmanEntity; |
| | | import org.springblade.modules.grid.service.IGridWorkLogService; |
| | | import org.springblade.modules.grid.service.IGridmanService; |
| | | import org.springblade.modules.house.service.IHouseRentalService; |
| | | import org.springblade.modules.house.service.IHouseholdService; |
| | | import org.springblade.modules.house.vo.HouseRentalTenantVO; |
| | |
| | | * @since 2023-11-06 |
| | | */ |
| | | @Service |
| | | public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, TaskEntity> implements ITaskService { |
| | | public class TaskServiceImpl extends ServiceImpl<TaskMapper, TaskEntity> implements ITaskService { |
| | | |
| | | @Autowired |
| | | private IPlaceService placeService; |
| | |
| | | taskVO.setNeiCode(neiCode); |
| | | taskVO.setReportType(2); |
| | | taskVO.setIsDeleted(0); |
| | | // 查询网格员对应的网格id |
| | | Integer gridId = getGridId(); |
| | | // 标签事件 |
| | | Integer bqsj = baseMapper.selectTaskCount(taskVO); |
| | | taskVO.setReportType(1); |
| | |
| | | Integer czsh = iHouseRentalService.getStatisticsCount(houseRentalTenantVO); |
| | | // 场所审核 |
| | | Integer cssh = SpringUtils.getBean(IPlaceExtService.class).selectCount(roleType > 0 ? AuthUtil.getUserId() : null, neiCode, 1); |
| | | // 走访日志 |
| | | Integer zfrw = SpringUtils.getBean(IGridWorkLogService.class).getGridWorkCountHandleCount(gridId,1); |
| | | // 设置 |
| | | objectObjectHashMap.put("qbhs", qbhs); |
| | | objectObjectHashMap.put("bqsj", bqsj); |
| | | objectObjectHashMap.put("bsbx", bsbx); |
| | | objectObjectHashMap.put("zhsh", zhsh); |
| | | objectObjectHashMap.put("czsh", czsh); |
| | | objectObjectHashMap.put("cssh", cssh); |
| | | objectObjectHashMap.put("zfrw", zfrw); |
| | | return objectObjectHashMap; |
| | | } |
| | | |
| | | /** |
| | | * 获取网格员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(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | |
| | | GridWorkLogEntity gridWorkLogEntity = new GridWorkLogEntity(); |
| | | gridWorkLogEntity.setHouseholdId(household.getId()); |
| | | gridWorkLogEntity.setType(2); |
| | | gridWorkLogEntity.setPersonType(20); |
| | | gridWorkLogEntity.setPersonType(1006); |
| | | // 系统下发 |
| | | gridWorkLogEntity.setSource(2); |
| | | // 待处理 |
| | | gridWorkLogEntity.setStatus(1); |
| | | // 新增 |
| | | gridWorkLogService.save(gridWorkLogEntity); |
| | | } |
| | |
| | | taskEntity.setCreateTime(new Date()); |
| | | taskEntity.setHouseCode(houseCode); |
| | | taskEntity.setReportType(reportType); |
| | | // 系统下发 |
| | | taskEntity.setSource(2); |
| | | // 待场所负责人上报完善处理 |
| | | taskEntity.setStatus(4); |
| | | // 新增 |