|  |  |  | 
|---|
|  |  |  | import com.doumee.core.model.PageData; | 
|---|
|  |  |  | import com.doumee.core.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.core.utils.Constants; | 
|---|
|  |  |  | import com.doumee.core.utils.DateUtil; | 
|---|
|  |  |  | import com.doumee.core.utils.Utils; | 
|---|
|  |  |  | import com.doumee.dao.business.*; | 
|---|
|  |  |  | import com.doumee.dao.business.dto.YwWorkorderDataDTO; | 
|---|
|  |  |  | import com.doumee.dao.business.model.*; | 
|---|
|  |  |  | import com.doumee.dao.business.vo.YwWorkorderDataVO; | 
|---|
|  |  |  | import com.doumee.dao.system.MultifileMapper; | 
|---|
|  |  |  | import com.doumee.dao.system.SystemUserMapper; | 
|---|
|  |  |  | import com.doumee.dao.system.model.Multifile; | 
|---|
|  |  |  | 
|---|
|  |  |  | import org.springframework.util.CollectionUtils; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.*; | 
|---|
|  |  |  | import java.util.stream.Collectors; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 运维工单信息表Service实现 | 
|---|
|  |  |  | 
|---|
|  |  |  | QueryWrapper<YwWorkorder> wrapper = new QueryWrapper<>(ywWorkorder); | 
|---|
|  |  |  | return ywWorkorderMapper.selectCount(wrapper); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public YwWorkorderDataVO getDataVO(YwWorkorderDataDTO dto){ | 
|---|
|  |  |  | YwWorkorderDataVO ywWorkorderDataVO = new YwWorkorderDataVO(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | List<YwWorkorder> list = ywWorkorderMapper.selectList(new QueryWrapper<YwWorkorder>().lambda() | 
|---|
|  |  |  | .eq(YwWorkorder::getIsdeleted,Constants.ZERO) | 
|---|
|  |  |  | .eq(Constants.equalsInteger(dto.getQueryType(),Constants.ONE),YwWorkorder::getProjectId,dto.getQueryId()) | 
|---|
|  |  |  | .eq(Constants.equalsInteger(dto.getQueryType(),Constants.TWO),YwWorkorder::getFloorId,dto.getQueryId()) | 
|---|
|  |  |  | .eq(Constants.equalsInteger(dto.getQueryType(),Constants.THREE),YwWorkorder::getRoomId,dto.getQueryId())); | 
|---|
|  |  |  | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(list)){ | 
|---|
|  |  |  | ywWorkorderDataVO.setAmount(list.size()); | 
|---|
|  |  |  | ywWorkorderDataVO.setMonthAmount(list.stream().filter(i-> DateUtil.formatDate(i.getSubmitDate(),"yyyy-MM").equals(DateUtil.formatDate(new Date(),"yyyy-MM"))).collect(Collectors.toList()).size()); | 
|---|
|  |  |  | ywWorkorderDataVO.setWaitDealAmount(list.stream().filter(i-> Constants.equalsInteger(i.getDealStatus(),Constants.ONE)).collect(Collectors.toList()).size()); | 
|---|
|  |  |  | ywWorkorderDataVO.setWaitAssignAmount(list.stream().filter(i-> Constants.equalsInteger(i.getDealStatus(),Constants.ZERO)).collect(Collectors.toList()).size()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return ywWorkorderDataVO; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|