|  | @@ -3,7 +3,6 @@ package com.xunmei.core.safetyCheck.service.impl;
 | 
	
		
			
				|  |  |  import cn.hutool.core.collection.CollectionUtil;
 | 
	
		
			
				|  |  |  import cn.hutool.core.date.DateField;
 | 
	
		
			
				|  |  |  import cn.hutool.core.date.DateUtil;
 | 
	
		
			
				|  |  | -import cn.hutool.core.util.NumberUtil;
 | 
	
		
			
				|  |  |  import cn.hutool.core.util.ObjectUtil;
 | 
	
		
			
				|  |  |  import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 | 
	
		
			
				|  |  |  import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 | 
	
	
		
			
				|  | @@ -41,7 +40,6 @@ import com.xunmei.system.api.RemoteUserService;
 | 
	
		
			
				|  |  |  import com.xunmei.system.api.domain.SysOrg;
 | 
	
		
			
				|  |  |  import com.xunmei.system.api.domain.SysUser;
 | 
	
		
			
				|  |  |  import com.xunmei.system.api.model.LoginUser;
 | 
	
		
			
				|  |  | -import io.reactivex.rxjava3.core.Completable;
 | 
	
		
			
				|  |  |  import lombok.extern.slf4j.Slf4j;
 | 
	
		
			
				|  |  |  import org.springframework.stereotype.Service;
 | 
	
		
			
				|  |  |  import org.springframework.transaction.annotation.Transactional;
 | 
	
	
		
			
				|  | @@ -176,36 +174,35 @@ public class SafetyCheckRegisterSericeImpl extends ServiceImpl<CoreSafetyTaskMap
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  | -    public TaskRegisterVo<TaskRegisterAreaVo> info(Long id) {
 | 
	
		
			
				|  |  | +    public TaskRegisterVo<TaskRegisterRuleVo> info(Long id) {
 | 
	
		
			
				|  |  |          TaskRegisterVo<AppTaskRegisterPointVo> appvo = getPointVos(id);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        TaskRegisterVo<TaskRegisterAreaVo> vo = new TaskRegisterVo<>();
 | 
	
		
			
				|  |  | +        TaskRegisterVo<TaskRegisterRuleVo> vo = new TaskRegisterVo<>();
 | 
	
		
			
				|  |  |          BeanUtils.copyProperties(appvo, vo);
 | 
	
		
			
				|  |  |          vo.setCheckList(new ArrayList<>());
 | 
	
		
			
				|  |  | -        appvo.getCheckList().stream().collect(Collectors.groupingBy(AppTaskRegisterPointVo::getAreaId))
 | 
	
		
			
				|  |  | +        appvo.getCheckList().stream().collect(Collectors.groupingBy(AppTaskRegisterPointVo::getRuleId))
 | 
	
		
			
				|  |  |                  .forEach((k, list) -> {
 | 
	
		
			
				|  |  | -                    TaskRegisterAreaVo areavo = new TaskRegisterAreaVo();
 | 
	
		
			
				|  |  | -                    areavo.setAreaId(list.get(0).getAreaId());
 | 
	
		
			
				|  |  | -                    areavo.setAreaName(list.get(0).getAreaName());
 | 
	
		
			
				|  |  | -                    areavo.setItemList(new ArrayList<>());
 | 
	
		
			
				|  |  | -                    areavo.setNfcList(new ArrayList<>());
 | 
	
		
			
				|  |  | -                    vo.getCheckList().add(areavo);
 | 
	
		
			
				|  |  | +                    TaskRegisterRuleVo ruleVo = new TaskRegisterRuleVo();
 | 
	
		
			
				|  |  | +                    ruleVo.setRuleId(list.get(0).getRuleId());
 | 
	
		
			
				|  |  | +                    ruleVo.setRuleName(list.get(0).getRuleName());
 | 
	
		
			
				|  |  | +                    ruleVo.setItemList(new ArrayList<>());
 | 
	
		
			
				|  |  | +//                    ruleVo.setNfcList(new ArrayList<>());
 | 
	
		
			
				|  |  | +                    vo.getCheckList().add(ruleVo);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                      list.stream().collect(Collectors.groupingBy(AppTaskRegisterPointVo::getItemId))
 | 
	
		
			
				|  |  |                              .forEach((itemid, points) -> {
 | 
	
		
			
				|  |  | -                                TaskRegisterItemVo itemVo = new TaskRegisterItemVo();
 | 
	
		
			
				|  |  | +                                AppTaskRegisterItemVo itemVo = new AppTaskRegisterItemVo();
 | 
	
		
			
				|  |  |                                  itemVo.setItemId(points.get(0).getItemId());
 | 
	
		
			
				|  |  |                                  itemVo.setItemName(points.get(0).getItemName());
 | 
	
		
			
				|  |  | -                                itemVo.setPointList(points.stream().map(p -> {
 | 
	
		
			
				|  |  | -                                    if (CollectionUtil.isNotEmpty(p.getNfcList())) {
 | 
	
		
			
				|  |  | -                                        areavo.getNfcList().addAll(p.getNfcList());
 | 
	
		
			
				|  |  | -                                    }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -                                    TaskRegisterPointVo pointVo = new TaskRegisterPointVo();
 | 
	
		
			
				|  |  | -                                    BeanUtils.copyProperties(p, pointVo);
 | 
	
		
			
				|  |  | -                                    return pointVo;
 | 
	
		
			
				|  |  | -                                }).collect(Collectors.toList()));
 | 
	
		
			
				|  |  | -                                areavo.getItemList().add(itemVo);
 | 
	
		
			
				|  |  | +                                itemVo.setPointList(points);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +//                                points.stream().forEach(p -> {
 | 
	
		
			
				|  |  | +//                                    if (CollectionUtil.isNotEmpty(p.getNfcList())) {
 | 
	
		
			
				|  |  | +//                                        ruleVo.getNfcList().addAll(p.getNfcList());
 | 
	
		
			
				|  |  | +//                                    }
 | 
	
		
			
				|  |  | +//                                });
 | 
	
		
			
				|  |  | +                                ruleVo.getItemList().add(itemVo);
 | 
	
		
			
				|  |  |                              });
 | 
	
		
			
				|  |  |                  });
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -258,6 +255,7 @@ public class SafetyCheckRegisterSericeImpl extends ServiceImpl<CoreSafetyTaskMap
 | 
	
		
			
				|  |  |              throw new ServiceException("受检机构没有机构类型");
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          /**
 | 
	
		
			
				|  |  |           * 已经完成任务的信息应该从任务信息中获取
 | 
	
		
			
				|  |  |           * 其它状态的任务消息从计划和任务中联合获取
 | 
	
	
		
			
				|  | @@ -374,28 +372,28 @@ public class SafetyCheckRegisterSericeImpl extends ServiceImpl<CoreSafetyTaskMap
 | 
	
		
			
				|  |  |       * @return
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  | -    public Boolean webSubmit(TaskRegisterVo<TaskRegisterAreaVo> data) {
 | 
	
		
			
				|  |  | +    public Boolean webSubmit(TaskRegisterVo<TaskRegisterRuleVo> data) {
 | 
	
		
			
				|  |  |          return webSubmit(data, false);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    private Boolean webSubmit(TaskRegisterVo<TaskRegisterAreaVo> data, Boolean isNewTask) {
 | 
	
		
			
				|  |  | +    private Boolean webSubmit(TaskRegisterVo<TaskRegisterRuleVo> data, Boolean isNewTask) {
 | 
	
		
			
				|  |  |          TaskRegisterVo<AppTaskRegisterPointVo> appdata = new TaskRegisterVo<AppTaskRegisterPointVo>();
 | 
	
		
			
				|  |  |          BeanUtils.copyProperties(data, appdata);
 | 
	
		
			
				|  |  |          appdata.setCheckList(new ArrayList<>());
 | 
	
		
			
				|  |  | -        for (TaskRegisterAreaVo areaVo : data.getCheckList()) {
 | 
	
		
			
				|  |  | -            boolean firstPoint = true;
 | 
	
		
			
				|  |  | -            for (TaskRegisterItemVo itemVo : areaVo.getItemList()) {
 | 
	
		
			
				|  |  | -                for (TaskRegisterPointVo pointVo : itemVo.getPointList()) {
 | 
	
		
			
				|  |  | -                    AppTaskRegisterPointVo appPointVo = new AppTaskRegisterPointVo();
 | 
	
		
			
				|  |  | -                    BeanUtils.copyProperties(pointVo, appPointVo);
 | 
	
		
			
				|  |  | -                    BeanUtils.copyProperties(itemVo, appPointVo);
 | 
	
		
			
				|  |  | -                    BeanUtils.copyProperties(areaVo, appPointVo);
 | 
	
		
			
				|  |  | -                    appPointVo.setNfcList(new ArrayList<>());
 | 
	
		
			
				|  |  | -                    if (firstPoint) {
 | 
	
		
			
				|  |  | -                        appPointVo.setNfcList(areaVo.getNfcList());
 | 
	
		
			
				|  |  | -                        firstPoint = false;
 | 
	
		
			
				|  |  | -                    }
 | 
	
		
			
				|  |  | -                    appdata.getCheckList().add(appPointVo);
 | 
	
		
			
				|  |  | +        for (TaskRegisterRuleVo areaVo : data.getCheckList()) {
 | 
	
		
			
				|  |  | +//            boolean firstPoint = true;
 | 
	
		
			
				|  |  | +            for (AppTaskRegisterItemVo itemVo : areaVo.getItemList()) {
 | 
	
		
			
				|  |  | +                for (AppTaskRegisterPointVo pointVo : itemVo.getPointList()) {
 | 
	
		
			
				|  |  | +//                    AppTaskRegisterPointVo appPointVo = new AppTaskRegisterPointVo();
 | 
	
		
			
				|  |  | +//                    BeanUtils.copyProperties(pointVo, appPointVo);
 | 
	
		
			
				|  |  | +//                    BeanUtils.copyProperties(itemVo, appPointVo);
 | 
	
		
			
				|  |  | +//                    BeanUtils.copyProperties(areaVo, appPointVo);
 | 
	
		
			
				|  |  | +//                    appPointVo.setNfcList(new ArrayList<>());
 | 
	
		
			
				|  |  | +//                    if (firstPoint) {
 | 
	
		
			
				|  |  | +//                        appPointVo.setNfcList(areaVo.getNfcList());
 | 
	
		
			
				|  |  | +//                        firstPoint = false;
 | 
	
		
			
				|  |  | +//                    }
 | 
	
		
			
				|  |  | +                    appdata.getCheckList().add(pointVo);
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 | 
	
	
		
			
				|  | @@ -410,7 +408,7 @@ public class SafetyCheckRegisterSericeImpl extends ServiceImpl<CoreSafetyTaskMap
 | 
	
		
			
				|  |  |       * @return
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  | -    public Boolean webTempSubmit(@RequestBody TaskRegisterVo<TaskRegisterAreaVo> data) {
 | 
	
		
			
				|  |  | +    public Boolean webTempSubmit(@RequestBody TaskRegisterVo<TaskRegisterRuleVo> data) {
 | 
	
		
			
				|  |  |          if (ObjectUtil.isNull(data.getId())) {
 | 
	
		
			
				|  |  |              data.setId(IDHelper.id());
 | 
	
		
			
				|  |  |          }
 |