| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.BeanUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | |
| | | import com.gkhy.safePlatform.targetDuty.service.CommonService; |
| | | import com.gkhy.safePlatform.targetDuty.service.TargetDivideDetailService; |
| | | import com.gkhy.safePlatform.targetDuty.service.TargetMngService; |
| | | import com.gkhy.safePlatform.targetDuty.utils.BeanToMapUtil; |
| | | import com.gkhy.safePlatform.targetDuty.utils.QueryHelpPlus; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.beans.IntrospectionException; |
| | | import java.io.Serializable; |
| | | import java.lang.reflect.InvocationTargetException; |
| | | import java.util.*; |
| | | import java.util.function.Function; |
| | | import java.util.stream.Collectors; |
| | |
| | | QueryHelpPlus.getPredicate(TargetMng.class, pageQuery.getSearchParams())); |
| | | List<TargetMngDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), TargetMngDto.class); |
| | | respList.forEach(dto->{ |
| | | // --------------------------- 获取部门信息----------------------- |
| | | dto.setMakerDepartmentName(commonService.getDepName(dto.getMakerDepartmentId())); |
| | | |
| | | //查询关联分解信息 |
| | | TargetDivideDetailQueryCriteria criteria = new TargetDivideDetailQueryCriteria(); |
| | | criteria.setTargetId(dto.getId()); |
| | |
| | | collectDepIdSet.add(f.getMakerDepartmentId()); |
| | | }); |
| | | //获取部门名集合 |
| | | Map<Long,String> depNameMap = commonService.getDepName(collectDepIdSet); |
| | | Map<Long, String> depNameMap = commonService.getDepName(collectDepIdSet); |
| | | |
| | | respList1.forEach(f->{ |
| | | f.setDutyDepartmentName(depNameMap.get(f.getDutyDepartmentId())); |
| | |
| | | //获取目标分类名集合 |
| | | if(!collectTypeSet.isEmpty()){ |
| | | List<TargetType> typeList = targetTypeRepository.selectBatchIds(collectTypeSet); // TODO |
| | | Map<Long,String> typeNameMap = typeList.stream() |
| | | Map<Long, String> typeNameMap = typeList.stream() |
| | | .collect(Collectors.toMap(TargetType::getId, TargetType::getTypeName,(k1, k2)->k1)); |
| | | |
| | | respList1.forEach(f->{ |
| | |
| | | return null; |
| | | } |
| | | TargetMngDto targetMngDto = BeanCopyUtils.copyBean(targetMng, TargetMngDto.class); |
| | | // --------------------------- 获取部门信息----------------------- |
| | | targetMngDto.setMakerDepartmentName(commonService.getDepName(targetMngDto.getMakerDepartmentId())); |
| | | |
| | | //查询关联分解信息 |
| | | TargetDivideDetailQueryCriteria criteria = new TargetDivideDetailQueryCriteria(); |
| | |
| | | collectDepIdSet.add(f.getMakerDepartmentId()); |
| | | }); |
| | | //获取部门名集合 |
| | | Map<Long,String> depNameMap = commonService.getDepName(collectDepIdSet); |
| | | Map<Long, String> depNameMap = commonService.getDepName(collectDepIdSet); |
| | | |
| | | respList.forEach(f->{ |
| | | f.setDutyDepartmentName(depNameMap.get(f.getDutyDepartmentId())); |
| | |
| | | //获取核结果集合 |
| | | if(!collectExamResultSet.isEmpty()){ |
| | | List<TargetExamine> typeList = targetExamineRepository.selectList(new QueryWrapper<TargetExamine>().in("target_divide_detail_id",collectExamResultSet)); |
| | | Map<Long,TargetExamine> examResultMap = typeList.stream() |
| | | Map<Long, TargetExamine> examResultMap = typeList.stream() |
| | | .collect(Collectors.toMap(TargetExamine::getTargetDivideDetailId, Function.identity(),(k1, k2)->k1)); |
| | | |
| | | respList.forEach(f->{ |
| | |
| | | |
| | | @Override |
| | | public Object statistics(TargetMngQueryCriteria criteria) { |
| | | Map<String,String> map = new HashMap<>(); |
| | | Map<String, String> map = new HashMap<>(); |
| | | // 查询总数 |
| | | Integer total = 0; |
| | | // 完成数量 |