|  | @@ -129,7 +129,7 @@ public class TargetManagementService {
 | 
	
		
			
				|  |  |          target.setId(dto.getId());
 | 
	
		
			
				|  |  |          target.setPid(dto.getPid());
 | 
	
		
			
				|  |  |          ZbZdBaseInfo zdBaseInfo = zbZdDao.selectZbZdBaseInfoById(target);
 | 
	
		
			
				|  |  | -        int num = 0;
 | 
	
		
			
				|  |  | +        int num;
 | 
	
		
			
				|  |  |          if(zdBaseInfo != null){
 | 
	
		
			
				|  |  |              num = zbZdDao.updateZbZdBaseInfo(dto);
 | 
	
		
			
				|  |  |          } else {
 | 
	
	
		
			
				|  | @@ -522,7 +522,7 @@ public class TargetManagementService {
 | 
	
		
			
				|  |  |              typeMap.put(zdReport.getReportType(), zdReport);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        Map<String, List<ReportBaseInfo>> reportMap = list.stream().collect(Collectors.groupingBy(reportBaseInfo -> reportBaseInfo.getReportType()));
 | 
	
		
			
				|  |  | +        Map<String, List<ReportBaseInfo>> reportMap = list.stream().collect(Collectors.groupingBy(ReportBaseInfo::getReportType));
 | 
	
		
			
				|  |  |          List<Map<String, Object>> resultList = new ArrayList<>();
 | 
	
		
			
				|  |  |          Map<String, Object> rootMap = new HashMap<>();
 | 
	
		
			
				|  |  |          rootMap.put("id", "zbJc");
 | 
	
	
		
			
				|  | @@ -580,12 +580,12 @@ public class TargetManagementService {
 | 
	
		
			
				|  |  |       * @param: [dto]
 | 
	
		
			
				|  |  |       * @return: ResultVo<Map<String,Object>>
 | 
	
		
			
				|  |  |       **/
 | 
	
		
			
				|  |  | -    public ResultVo<Map<String, Object>> deleteReportDictById(HighReportDto dto) {
 | 
	
		
			
				|  |  | -        if (StringUtil.isBlank(dto.getReportId())) {
 | 
	
		
			
				|  |  | +    public ResultVo<Map<String, Object>> deleteReportDictById(TargetManagement dto) {
 | 
	
		
			
				|  |  | +        if (StringUtil.isBlank(dto.getId())) {
 | 
	
		
			
				|  |  |              return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "id不存在,请检查!");
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          Map<String, Object> resultMap = new HashMap<>();
 | 
	
		
			
				|  |  | -        int num = reportDao.updateReportDictById(dto.getReportId());
 | 
	
		
			
				|  |  | +        int num = reportDao.updateReportDictById(dto.getId());
 | 
	
		
			
				|  |  |          if (num == 0) {
 | 
	
		
			
				|  |  |              return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "作废指标报表失败!");
 | 
	
		
			
				|  |  |          }
 | 
	
	
		
			
				|  | @@ -720,8 +720,36 @@ public class TargetManagementService {
 | 
	
		
			
				|  |  |       * @return: ResultVo<List<ZbReportResult>>
 | 
	
		
			
				|  |  |       **/
 | 
	
		
			
				|  |  |      public ResultVo<List<ZbReportResult>> selectTargetReportResult(TargetManagement dto) {
 | 
	
		
			
				|  |  | -        List<ZbReportResult> list = reportDao.selectReportResultById(dto.getId(), dto.getPid());
 | 
	
		
			
				|  |  | +        List<ZbReportResult> list = reportDao.selectReportResultById(dto.getId(), dto.getPid(), dto.getStartTime(), dto.getEndTime());
 | 
	
		
			
				|  |  |          return ResultVoUtil.success(list);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    /**
 | 
	
		
			
				|  |  | +     * @description: 保存/更新指标报表基本信息
 | 
	
		
			
				|  |  | +     * @author: hsh
 | 
	
		
			
				|  |  | +     * @date: 2023/7/27 9:55
 | 
	
		
			
				|  |  | +     * @param: [info]
 | 
	
		
			
				|  |  | +     * @return: ResultVo<Map<String,Object>>
 | 
	
		
			
				|  |  | +     **/
 | 
	
		
			
				|  |  | +    public ResultVo<Map<String, Object>> saveReportBaseInfo(ReportBaseInfo info) {
 | 
	
		
			
				|  |  | +        Map<String, Object> resultMap = new HashMap<>();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        if(info == null || StringUtil.isBlank(info.getReportId())){
 | 
	
		
			
				|  |  | +            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "报表详情为空,保存指标详情失败!");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        ReportBaseInfo report = reportDao.selectReportPortalMenu(info.getReportId(), null, null);
 | 
	
		
			
				|  |  | +        if (report != null) {
 | 
	
		
			
				|  |  | +            reportDao.deleteReportBaseInfoById(info.getReportId());
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        int n = dao.insert(info);
 | 
	
		
			
				|  |  | +        if (n <= 0) {
 | 
	
		
			
				|  |  | +            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "保存指标详情失败!");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        resultMap.put("cg", "保存指标详情成功!");
 | 
	
		
			
				|  |  | +        return ResultVoUtil.success(resultMap);
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  }
 |