| 
					
				 | 
			
			
				@@ -4,49 +4,55 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.ozs.base.domain.BaseAgency; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.ozs.base.service.BaseAgencyService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.ozs.common.constant.Constants; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.common.core.domain.AjaxResult; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.common.core.domain.entity.SysDept; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.common.core.domain.entity.SysDictData; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.common.core.domain.entity.SysRole; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.common.core.domain.entity.SysUser; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.common.core.domain.model.LoginUser; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.ozs.common.enums.IsExcess; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.ozs.common.enums.PmProjectStatus; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.ozs.common.enums.ProjectStatus; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.ozs.common.enums.ProjectTypes; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.ozs.common.enums.SysFileRefEnum; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.ozs.common.enums.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.common.exception.ServiceException; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.common.utils.PageUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.common.utils.SecurityUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.common.utils.StringUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.common.utils.bean.BeanUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.ozs.home.domain.vo.HomeToDoQueryResVo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.plan.doman.PlanQuarter; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.plan.doman.PlanYears; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.ozs.plan.doman.ProvisionalPlan; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.plan.doman.vo.requestVo.PlanYearsStandardVo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.ozs.plan.doman.vo.responseVo.PlanQuarterResponseVo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.plan.doman.vo.responseVo.PlanYearsResponseVo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.plan.mapper.PlanQuarterMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.plan.mapper.PlanYearsMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.ozs.plan.mapper.ProvisionalPlanMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.plan.service.PlanYearsService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.ozs.pm.doman.PmDemand; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.ozs.pm.doman.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.ozs.pm.doman.vo.responseVo.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.pm.mapper.PmDemandMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.ozs.pm.service.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.system.domain.SysFileInfo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.system.domain.SysFileRef; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.system.domain.vo.responseVo.SysDeptResponseVo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.system.mapper.SysDeptMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.system.mapper.SysFileRefMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.system.mapper.SysRoleMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.ozs.system.service.ISysDeptService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.ozs.system.service.ISysDictTypeService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.ozs.system.service.ISysUserService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.ozs.system.service.SysFileService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.ozs.system.service.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import lombok.extern.slf4j.Slf4j; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.stereotype.Service; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.transaction.annotation.Transactional; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.util.ObjectUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import javax.annotation.Resource; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import javax.servlet.http.HttpServletRequest; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import javax.validation.Validator; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.math.BigDecimal; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import java.text.ParseException; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import java.text.SimpleDateFormat; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.util.ArrayList; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.util.Date; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.util.HashMap; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -65,7 +71,7 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     PlanYearsMapper planYearsMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    PlanQuarterMapper planQuarterMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private PlanQuarterMapper planQuarterMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     protected Validator validator; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -73,7 +79,7 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private ISysDeptService deptService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    SysFileRefMapper sysFileRefMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private SysFileRefMapper sysFileRefMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private SysDeptMapper deptMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -84,27 +90,41 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private ISysUserService userService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private PmDemandMapper pmDemandMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private PlanQuarterServiceImpl quartzServiceImpl; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private IPmDemandService demandService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private ProvisionalPlanMapper provisionalPlanMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private IPmDemandService pmDemandService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private ISysDictDataService dictDataService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private BaseAgencyService baseAgencyService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private PmBookBuildingService pmBookBuildingService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private PmReleaseAnnouncementService pmReleaseAnnouncementService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private PmDemandExpertRefService pmDemandExpertRefService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private PmBidOpeningService pmBidOpeningService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private PmBidWinningService pmBidWinningService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private PmBidFailureService pmBidFailureService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private PmContractInfoService pmContractInfoService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private PmProjectConstructionService pmProjectConstructionService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private SysFileRefService sysFileRefService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public Page selectPlanYearsList(PlanYearsStandardVo vo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        PlanYears ofYears = new PlanYears(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<PlanYears> planYears; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<PlanYears> planYearsList = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            BeanUtils.copyProperties(vo, ofYears); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            planYears = planYearsMapper.selectPlanYearsList(ofYears); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            planYearsList = changeTo(planYears); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } catch (Exception e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            e.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        Page pages = PageUtils.getPages(vo.getPageNum().intValue(), vo.getPageSize().intValue(), planYearsList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return pages; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public List<PlanYears> selectPlanYearsListEXP(PlanYearsStandardVo vo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public List<PlanYearsResponseVo> selectPlanYearsListEXP(PlanYearsStandardVo vo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<PlanYears> list = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<PlanYears> planYearsList = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<PlanYearsResponseVo> planYearsList = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             int num = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             int size = 200; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -128,6 +148,7 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (!ObjectUtils.isEmpty(vo.getEndTime())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     lw.le(PlanYears::getPlanDemandSubTime, vo.getEndTime()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                lw.eq(PlanYears::getDelFlay, DataIsDelete.DataNOTDelete.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 Page<PlanYears> page = planYearsMapper.selectPage(new Page<PlanYears>(num, size, false), lw); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 list.addAll(page.getRecords()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 size = page.getRecords().size(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -141,25 +162,9 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public Page selectPlanYearsExamineList(PlanYearsStandardVo vo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        PlanYears ofYears = new PlanYears(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<PlanYears> planYears; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<PlanYears> planYearsList = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            BeanUtils.copyProperties(vo, ofYears); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            planYears = planYearsMapper.selectPlanYearsExamineList(ofYears); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            planYearsList = changeTo(planYears); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } catch (Exception e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            e.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        Page pages = PageUtils.getPages(vo.getPageNum().intValue(), vo.getPageSize().intValue(), planYearsList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return pages; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public List<PlanYears> selectPlanYearsExamineListEXP(PlanYearsStandardVo vo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public List<PlanYearsResponseVo> selectPlanYearsExamineListEXP(PlanYearsStandardVo vo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<PlanYears> list = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<PlanYears> planYearsList = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<PlanYearsResponseVo> planYearsList = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             int num = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             int size = 200; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -185,6 +190,7 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (!ObjectUtils.isEmpty(vo.getEndTime())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     lw.le(PlanYears::getPlanDemandSubTime, vo.getEndTime()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                lw.eq(PlanYears::getDelFlay, DataIsDelete.DataNOTDelete); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 Page<PlanYears> page = planYearsMapper.selectPage(new Page<PlanYears>(num, size, false), lw); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 list.addAll(page.getRecords()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 size = page.getRecords().size(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -348,7 +354,11 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     if (ofYear.getProjectAttr().contains(",")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         String[] split = ofYear.getProjectAttr().split(","); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         for (String s : split) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            builder.append(projectAttributes.get(s) + ","); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            if (!ofYear.getProjectAttr().endsWith(s)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                builder.append(projectAttributes.get(s) + ","); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                builder.append(projectAttributes.get(s)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         builder.append(projectAttributes.get(ofYear.getProjectAttr())); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -424,29 +434,56 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Transactional 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult reviewTo(PlanYearsStandardVo vo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //年度计划审核通过后同步到季度计划和项目管理 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         PlanYears ofYears = new PlanYears(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        BeanUtils.copyProperties(vo, ofYears); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //年度计划审核通过后同步到季度计划 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        PlanYears byId = planYearsMapper.getById(vo.getPlanYearId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         PlanQuarter quarters = new PlanQuarter(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        PmDemand demand = new PmDemand(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        PlanYears byId = planYearsMapper.getById(vo.getPlanYearId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         BeanUtils.copyProperties(byId, quarters); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        quarters.setProjectStatus(ProjectStatus.PLANWAITCOMMIT.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        planQuarterMapper.insertPlanQuarter(quarters); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ofYears.setPlanYearId(vo.getPlanYearId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ofYears.setProjectStatus(ProjectStatus.PLANTOEXAMINE.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return review(vo, ofYears); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        BeanUtils.copyProperties(byId, demand); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //同步到季度计划状态为已审核---(已审核过的不再同步) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        PlanQuarter quarter = planQuarterMapper.getByPlanYearId(vo.getPlanYearId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (ObjectUtils.isEmpty(quarter)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            quarters.setPlanType(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            quarters.setPlanYearId(byId.getPlanYearId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            quarters.setProjectStatus(ProjectStatus.PLANTOEXAMINE.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            quarters.setCreateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            planQuarterMapper.insertPlanQuarter(quarters); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //同步到项目管理状态为需求待填制 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            demand.setPlanId(quarters.getPlanPracticalId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            demand.setEvaluation(byId.getEvaluation().doubleValue()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            demand.setProjectStatus(PmProjectStatus.DEMAND_WAIT_FILL.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            demand.setPurchaseDeptId(Long.valueOf(byId.getPurchaseDeptId())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            demand.setCreateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            pmDemandMapper.insert(demand); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //计划附件也进行同步---查询年度计划附件后复制一份改为项目需求附件 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            LambdaQueryWrapper<SysFileRef> sysFileRefLp = new LambdaQueryWrapper<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            sysFileRefLp.eq(SysFileRef::getType, SysFileRefEnum.PLAN_YEAR.getType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            sysFileRefLp.eq(SysFileRef::getRedId, vo.getPlanYearId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            List<SysFileRef> sysFileRefs = sysFileRefMapper.selectList(sysFileRefLp); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (!ObjectUtils.isEmpty(sysFileRefs)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                for (SysFileRef ref : sysFileRefs) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    ref.setRedId(demand.getDemandId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    ref.setType(SysFileRefEnum.PM_DEMAND.getType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    ref.setId(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    sysFileRefMapper.insert(ref); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        vo.setProjectStatus(ProjectStatus.PLANTOEXAMINE.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return review(vo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Transactional 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult reviewReturn(PlanYearsStandardVo vo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        PlanYears ofYears = new PlanYears(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        BeanUtils.copyProperties(vo, ofYears); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ofYears.setProjectStatus(ProjectStatus.PLANTOBACK.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return review(vo, ofYears); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        vo.setProjectStatus(ProjectStatus.PLANTOBACK.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return review(vo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    private AjaxResult review(PlanYearsStandardVo vo, PlanYears ofYears) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private AjaxResult review(PlanYearsStandardVo vo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<SysFileRef> sysFileRefs = vo.getSysFileRefs(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (!ObjectUtils.isEmpty(sysFileRefs)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             for (SysFileRef ref : sysFileRefs) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -459,7 +496,7 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 sysFileRefMapper.insert(ref); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        int review = planYearsMapper.review(ofYears); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        int review = planYearsMapper.review(vo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (review != 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return AjaxResult.error("项目状态数据异常"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -468,11 +505,9 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult appUpdate(PlanYearsStandardVo vo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        PlanYears ofYears = new PlanYears(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        BeanUtils.copyProperties(vo, ofYears); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //申请后会成为未提交的状态,可以进行修改 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ofYears.setProjectStatus(ProjectStatus.PLANWAITCOMMIT.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        int review = planYearsMapper.review(ofYears); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        vo.setProjectStatus(ProjectStatus.PLANWAITCOMMIT.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        int review = planYearsMapper.review(vo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (review != 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return AjaxResult.error("项目状态数据异常"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -481,7 +516,7 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult sendLetter(PlanYearsStandardVo yearsStandardVo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        int review = planYearsMapper.sendLetter(yearsStandardVo.getPlanYearId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        int review = planYearsMapper.sendLetter(yearsStandardVo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (review != 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return AjaxResult.error("项目状态数据异常"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -773,6 +808,404 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return AjaxResult.success(pmDemands.size()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 查询需求单位待办事项(计划待提交) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public List<PlanQuarterResponseVo> planWaitCommit() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return getListByProjectStatus(ProjectStatus.PLANWAITCOMMIT.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 采购管理部门首页待办事项(计划待审核) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public List<PlanQuarterResponseVo> planWaitExamine() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return getListByProjectStatus(ProjectStatus.PLANWAIEXAMINE.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 需求单位待办事项 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public AjaxResult demandUnitWillManipulateTotal() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<HomeToDoQueryResVo> homeRes = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //计划待提交,需求待提交,合同待填制,项目建设待完成 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<PlanQuarterResponseVo> planRes = getListByProjectStatus(ProjectStatus.PLANWAITCOMMIT.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<PmDemandResVo> demandRes = demandService.demandWaitCommit(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        demandRes.addAll(demandService.contractWaitFilled()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        demandRes.addAll(demandService.projectWaitFinish()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //转为首页table展示数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (!ObjectUtils.isEmpty(planRes) && planRes.size() > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            for (PlanQuarterResponseVo planVo : planRes) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                HomeToDoQueryResVo home = new HomeToDoQueryResVo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                BeanUtils.copyProperties(planVo, home); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                homeRes.add(home); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (!ObjectUtils.isEmpty(demandRes) && demandRes.size() > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            for (PmDemandResVo demandResVo : demandRes) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                HomeToDoQueryResVo home = new HomeToDoQueryResVo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                BeanUtils.copyProperties(demandResVo, home); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                homeRes.add(home); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return AjaxResult.success(homeRes); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public AjaxResult purchasingManagementWillManipulateTotal() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<HomeToDoQueryResVo> homeRes = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //计划待审核,需求待审核,任务待下达 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<PlanQuarterResponseVo> planRes = getListByProjectStatus(ProjectStatus.PLANWAIEXAMINE.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<PmDemandResVo> demandRes = demandService.demandWaitExamine(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        demandRes.addAll(demandService.taskWaitRelease()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //转为首页table展示数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (!ObjectUtils.isEmpty(planRes) && planRes.size() > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            for (PlanQuarterResponseVo planVo : planRes) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                HomeToDoQueryResVo home = new HomeToDoQueryResVo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                BeanUtils.copyProperties(planVo, home); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                homeRes.add(home); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (!ObjectUtils.isEmpty(demandRes) && demandRes.size() > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            for (PmDemandResVo demandResVo : demandRes) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                HomeToDoQueryResVo home = new HomeToDoQueryResVo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                BeanUtils.copyProperties(demandResVo, home); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                homeRes.add(home); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return AjaxResult.success(homeRes); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 通过年度ID,查询季度、临时计划详情,通过季度、临时计划ID查询项目 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @param yearsStandardVo 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public AjaxResult projectDetails(PlanYearsStandardVo yearsStandardVo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Map<String, Object> returnMap = new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // 通过年度ID查询年度详情 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        PlanYears byId = planYearsMapper.getById(yearsStandardVo.getPlanYearId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (StringUtils.isNull(byId)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return AjaxResult.error("没有查到相关数据!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // 通过年度ID查询季度、临时计划详情 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ProvisionalPlan provisionalPlan = provisionalPlanMapper.selectProvisionalPlanByYearId(yearsStandardVo.getPlanYearId().intValue()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (StringUtils.isNull(provisionalPlan)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return AjaxResult.error("没有查到相关数据!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // 通过季度、临时计划ID查询项目数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        PmDemand pmDemand = pmDemandService.selectByPlanId(provisionalPlan.getPlanPracticalId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (StringUtils.isNotNull(pmDemand)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            String detailType = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (StringUtils.isNotNull(yearsStandardVo.getDetailType())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                detailType = yearsStandardVo.getDetailType(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // 详情类型(1项目计划,2需求建档,3任务下达,4中标信息,5合同信息,6建设情况) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // 项目计划 4之前(包括4) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // 需求建党 4之后(不包括4) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // 任务下达 8之后(不包括8) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // 采购执行 9之后(不包括9) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // 合同信息 15之后(不包括15) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // 项目建设 17 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                Integer projectStatus = Integer.valueOf(pmDemand.getProjectStatus()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (projectStatus <= 4) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    detailType = "1"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else if (4 < projectStatus && projectStatus <= 8) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    detailType = "2"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else if (8 < projectStatus && projectStatus <= 9) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    detailType = "3"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else if (9 < projectStatus && projectStatus <= 15) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    detailType = "4"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else if (15 < projectStatus && projectStatus < 17) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    detailType = "5"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else if (projectStatus == 17) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    detailType = "6"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            Long demandId = pmDemand.getDemandId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            PmDemandResVo vo = new PmDemandResVo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            vo.setDemandId(demandId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            vo.setDetailType(detailType); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if ("1".equals(detailType)) { //项目计划 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                BeanUtils.copyProperties(pmDemand, vo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                SysDeptResponseVo sysDeptResponseVo = (SysDeptResponseVo) deptService.selectDeptById(vo.getPurchaseDeptId()).get("sysDept"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (sysDeptResponseVo != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    vo.setPurchaseDeptName(sysDeptResponseVo.getDeptName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                String purchaseServicesName = dictDataService.selectDictLabel("purchase_services", vo.getPurchaseServices()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (StringUtils.isNotEmpty(purchaseServicesName)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    vo.setPurchaseServicesName(purchaseServicesName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //采购需求附件 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                List<SysFileInfo> demandFileInfos = getSysFileInfoList(vo.getDemandId(), SysFileRefEnum.PM_DEMAND.getType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (!ObjectUtils.isEmpty(demandFileInfos)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    vo.setDemandFileInfos(demandFileInfos); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //项目类型 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                for (ProjectTypes value : ProjectTypes.values()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (vo.getProjectType() != null && vo.getProjectType().equals(value.getCode())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        vo.setProjectTypeName(value.getInfo()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //是否为超限额计划 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                for (IsExcess value : IsExcess.values()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (vo.getIsExcess() != null && vo.getIsExcess().equals(value.getCode())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        vo.setIsExcessName(value.getInfo()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //采购方式 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                for (PlanPurchaseMode value : PlanPurchaseMode.values()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (vo.getPurchaseMode() != null && vo.getPurchaseMode().equals(value.getCode())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        vo.setPurchaseModeName(value.getInfo()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //项目属性 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                for (ProjectAttribute value : ProjectAttribute.values()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (vo.getProjectAttr() != null && vo.getProjectAttr().equals(value.getCode())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        vo.setProjectAttrName(value.getInfo()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //预警状态 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                for (WarnStatus value : WarnStatus.values()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (vo.getWarnStatus() != null && vo.getWarnStatus().equals(value.getCode())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        vo.setWarnStatusName(value.getInfo()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //项目状态 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                for (PmProjectStatus value : PmProjectStatus.values()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (vo.getProjectStatus() != null && vo.getProjectStatus().equals(value.getCode())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        vo.setProjectStatusName(value.getInfo()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else if ("2".equals(detailType)) { //需求建档 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //采购需求审核文件 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                List<SysFileInfo> auditFileInfos = getSysFileInfoList(vo.getDemandId(), SysFileRefEnum.PM_DEMAND_EXAMINE.getType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (!ObjectUtils.isEmpty(auditFileInfos)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    vo.setAuditFileInfos(auditFileInfos); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                LambdaQueryWrapper<PmBookBuilding> lambdaQueryWrapper = new LambdaQueryWrapper<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                lambdaQueryWrapper.eq(PmBookBuilding::getDemandId, demandId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                PmBookBuilding pmBookBuilding = pmBookBuildingService.getOne(lambdaQueryWrapper); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (pmBookBuilding != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    PmBookBuildingResVo responseVo = new PmBookBuildingResVo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    BeanUtils.copyProperties(pmBookBuilding, responseVo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    List<SysFileInfo> fileInfos = getSysFileInfoList(pmBookBuilding.getId(), SysFileRefEnum.PM_BOOK_BUILDING.getType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (!ObjectUtils.isEmpty(fileInfos)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        responseVo.setFileInfos(fileInfos); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    vo.setPmBookBuildingResVo(responseVo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else if ("3".equals(detailType)) { //任务下达 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //任务下达文件 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                List<SysFileInfo> taskReleaseFileInfos = getSysFileInfoList(vo.getDemandId(), SysFileRefEnum.PM_TAST_RELEASE.getType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (!ObjectUtils.isEmpty(taskReleaseFileInfos)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    vo.setTaskReleaseFileInfos(taskReleaseFileInfos); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else if ("4".equals(detailType)) { //中标信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                PmPurchaseExecutionResVo pmPurchaseExecutionResVo = new PmPurchaseExecutionResVo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //代理商信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                BaseAgency baseAgency = this.baseAgencyService.getById(pmDemand.getAgencyId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                pmPurchaseExecutionResVo.setBaseAgency(baseAgency); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //发布公告列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                LambdaQueryWrapper<PmReleaseAnnouncement> lambdaQueryWrapper = new LambdaQueryWrapper<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                lambdaQueryWrapper.eq(PmReleaseAnnouncement::getDemandId, demandId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                List<PmReleaseAnnouncement> pmReleaseAnnouncementList = this.pmReleaseAnnouncementService.list(lambdaQueryWrapper); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (!ObjectUtils.isEmpty(pmReleaseAnnouncementList)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    List<PmReleaseAnnouncementResVo> pmReleaseAnnouncementResVoList = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    for (PmReleaseAnnouncement pmReleaseAnnouncement : pmReleaseAnnouncementList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        PmReleaseAnnouncementResVo pmReleaseAnnouncementResVo = new PmReleaseAnnouncementResVo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        BeanUtils.copyProperties(pmReleaseAnnouncement, pmReleaseAnnouncementResVo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        List<SysFileInfo> fileInfos = getSysFileInfoList(pmReleaseAnnouncement.getId(), SysFileRefEnum.PM_ANNOUNCEMENT_FILE.getType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        if (!ObjectUtils.isEmpty(fileInfos)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            pmReleaseAnnouncementResVo.setFileInfos(fileInfos); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        pmReleaseAnnouncementResVoList.add(pmReleaseAnnouncementResVo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    pmPurchaseExecutionResVo.setPmReleaseAnnouncementResVoList(pmReleaseAnnouncementResVoList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //专家信息列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                List<PmBaseExpertResVo> pmBaseExpertResVoList = this.pmDemandExpertRefService.getPmBaseExpertResVoList(demandId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                pmPurchaseExecutionResVo.setPmBaseExpertResVoList(pmBaseExpertResVoList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //开标信息列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                List<PmBidOpeningResVo> pmBidOpeningResVoList = this.pmBidOpeningService.getPmBidOpeningResVoList(demandId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                pmPurchaseExecutionResVo.setPmBidOpeningResVoList(pmBidOpeningResVoList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //中标信息列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                LambdaQueryWrapper<PmBidWinning> lambdaQueryWrapper1 = new LambdaQueryWrapper<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                lambdaQueryWrapper1.eq(PmBidWinning::getDemandId, demandId).orderByDesc(PmBidWinning::getBidAnnouncementTime); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                List<PmBidWinning> pmBidWinningList = this.pmBidWinningService.list(lambdaQueryWrapper1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (!ObjectUtils.isEmpty(pmBidWinningList)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    List<PmBidWinningResVo> pmBidWinningResVoList = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    for (PmBidWinning pmBidWinning : pmBidWinningList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        PmBidWinningResVo pmBidWinningResVo = new PmBidWinningResVo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        BeanUtils.copyProperties(pmBidWinning, pmBidWinningResVo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        List<SysFileInfo> fileInfos = getSysFileInfoList(pmBidWinning.getId(), SysFileRefEnum.PM_BID_WINNING_FILE.getType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        if (!ObjectUtils.isEmpty(fileInfos)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            pmBidWinningResVo.setFileInfos(fileInfos); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        pmBidWinningResVoList.add(pmBidWinningResVo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    pmPurchaseExecutionResVo.setPmBidWinningResVoList(pmBidWinningResVoList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //质疑情况 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                List<SysFileInfo> callRequestFileInfos = getSysFileInfoList(vo.getDemandId(), SysFileRefEnum.PM_BID_CALL_QEUSTION_FILE.getType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (!ObjectUtils.isEmpty(callRequestFileInfos)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    pmPurchaseExecutionResVo.setCallRequestFileInfos(callRequestFileInfos); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //流标情况 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                LambdaQueryWrapper<PmBidFailure> lambdaQueryWrapper2 = new LambdaQueryWrapper<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                lambdaQueryWrapper2.eq(PmBidFailure::getDemandId, demandId).orderByDesc(PmBidFailure::getBidFailureTime); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                List<PmBidFailure> pmBidFailureList = this.pmBidFailureService.list(lambdaQueryWrapper2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (!ObjectUtils.isEmpty(pmBidFailureList)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    List<PmBidFailureResVo> pmBidFailureResVoList = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    for (PmBidFailure pmBidFailure : pmBidFailureList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        PmBidFailureResVo pmBidFailureResVo = new PmBidFailureResVo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        BeanUtils.copyProperties(pmBidFailure, pmBidFailureResVo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        List<SysFileInfo> fileInfos = getSysFileInfoList(pmBidFailure.getId(), SysFileRefEnum.PM_BID_FAILURE_FILE.getType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        if (!ObjectUtils.isEmpty(fileInfos)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            pmPurchaseExecutionResVo.setFileInfos(fileInfos); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        pmBidFailureResVoList.add(pmBidFailureResVo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    pmPurchaseExecutionResVo.setPmBidFailureResVoList(pmBidFailureResVoList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //中标通知书 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                List<SysFileInfo> pmBidWinningNotificationFileInfos = getSysFileInfoList(vo.getDemandId(), SysFileRefEnum.PM_BID_WINNING_NOTIFICATION.getType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (!ObjectUtils.isEmpty(pmBidWinningNotificationFileInfos)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    pmPurchaseExecutionResVo.setPmBidWinningNotificationFileInfos(pmBidWinningNotificationFileInfos); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                vo.setPmPurchaseExecutionResVo(pmPurchaseExecutionResVo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else if ("5".equals(detailType)) { //合同信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                LambdaQueryWrapper<PmContractInfo> lambdaQueryWrapper = new LambdaQueryWrapper<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                lambdaQueryWrapper.eq(PmContractInfo::getDemandId, demandId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                PmContractInfo pmContractInfo = pmContractInfoService.getOne(lambdaQueryWrapper); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (pmContractInfo != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    PmContractInfoResVo pmContractInfoResVo = new PmContractInfoResVo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    BeanUtils.copyProperties(pmContractInfo, pmContractInfoResVo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    //合同信息文件 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    List<SysFileInfo> fileInfos = getSysFileInfoList(pmContractInfo.getId(), SysFileRefEnum.PM_CONTRACT_INFO.getType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (!ObjectUtils.isEmpty(fileInfos)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        pmContractInfoResVo.setFileInfos(fileInfos); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    vo.setPmContractInfoResVo(pmContractInfoResVo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else if ("6".equals(detailType)) { //建设情况 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                LambdaQueryWrapper<PmProjectConstruction> lambdaQueryWrapper = new LambdaQueryWrapper<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                lambdaQueryWrapper.eq(PmProjectConstruction::getDemandId, demandId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                PmProjectConstruction pmProjectConstruction = pmProjectConstructionService.getOne(lambdaQueryWrapper); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (pmProjectConstruction != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    PmProjectConstructionResVo pmProjectConstructionResVo = new PmProjectConstructionResVo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    BeanUtils.copyProperties(pmProjectConstruction, pmProjectConstructionResVo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    //建设情况文件 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    List<SysFileInfo> fileInfos = getSysFileInfoList(pmProjectConstruction.getId(), SysFileRefEnum.PM_PROJECT_CONSTRUCTION.getType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (!ObjectUtils.isEmpty(fileInfos)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        pmProjectConstructionResVo.setFileInfos(fileInfos); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    vo.setPmProjectConstructionResVo(pmProjectConstructionResVo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return AjaxResult.success(vo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (StringUtils.isNotNull(provisionalPlan)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                return AjaxResult.success(provisionalPlan); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (StringUtils.isNotNull(byId)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    return AjaxResult.success(byId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return AjaxResult.error("没有查到相关数据!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private List<SysFileInfo> getSysFileInfoList(Long redId, Integer type) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        HashMap<String, Object> map = new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        map.put("red_id", redId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        map.put("type", type); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<SysFileRef> fileRefs = sysFileRefService.listByMap(map); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (!ObjectUtils.isEmpty(fileRefs)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            List<SysFileInfo> fileInfos = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            for (SysFileRef ref : fileRefs) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                SysFileInfo fileInfo = fileService.getById(ref.getFileId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                fileInfos.add(fileInfo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return fileInfos; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 查询已被催告发函的计划 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public List<PlanQuarterResponseVo> willSendLetter() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LambdaQueryWrapper<PlanYears> yearsLp = new LambdaQueryWrapper<PlanYears>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        yearsLp.eq(PlanYears::getDelFlay, DataIsDelete.DataNOTDelete.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        yearsLp.eq(PlanYears::getSendLetter, "1"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<PlanYears> planYears = planYearsMapper.selectList(yearsLp); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LambdaQueryWrapper<PlanQuarter> quarterLp = new LambdaQueryWrapper<PlanQuarter>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        quarterLp.eq(PlanQuarter::getDelFlay, DataIsDelete.DataNOTDelete.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        quarterLp.eq(PlanQuarter::getSendLetter, "1"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<PlanQuarter> planQuarters = planQuarterMapper.selectList(quarterLp); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //融合一起 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<PlanQuarterResponseVo> vos = planComplex(planYears, planQuarters); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return vos; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public List<PlanQuarterResponseVo> getListByProjectStatus(String projectStatus) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LambdaQueryWrapper<PlanYears> yearsLp = new LambdaQueryWrapper<PlanYears>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        yearsLp.eq(PlanYears::getDelFlay, DataIsDelete.DataNOTDelete.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        yearsLp.eq(PlanYears::getProjectStatus, projectStatus); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<PlanYears> planYears = planYearsMapper.selectList(yearsLp); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LambdaQueryWrapper<PlanQuarter> quarterLp = new LambdaQueryWrapper<PlanQuarter>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        quarterLp.eq(PlanQuarter::getDelFlay, DataIsDelete.DataNOTDelete.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        quarterLp.eq(PlanQuarter::getProjectStatus, projectStatus); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<PlanQuarter> planQuarters = planQuarterMapper.selectList(quarterLp); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //融合一起 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<PlanQuarterResponseVo> vos = planComplex(planYears, planQuarters); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return vos; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 年度计划与季度数据一起 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public List<PlanQuarterResponseVo> planComplex(List<PlanYears> planYears, List<PlanQuarter> planQuarters) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<PlanYearsResponseVo> yearsRes = changeTo(planYears); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<PlanQuarterResponseVo> quarterRes = quartzServiceImpl.changeTo(planQuarters); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (!ObjectUtils.isEmpty(yearsRes) && yearsRes.size() > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            for (PlanYearsResponseVo yearsRe : yearsRes) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                PlanQuarterResponseVo responseVo = new PlanQuarterResponseVo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                BeanUtils.copyProperties(yearsRe, responseVo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                quarterRes.add(responseVo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return quarterRes; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //判断是否为超额计划 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public String isExcessOrNo(String projectType, BigDecimal evaluation) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         BigDecimal threshold = new BigDecimal(0); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -800,15 +1233,32 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //字段赋值对应的名称 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public List<PlanYears> changeTo(List<PlanYears> planYears) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public List<PlanYearsResponseVo> changeTo(List<PlanYears> planYears) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //获取年度计划提报时间的阈值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<SysDictData> supTime = dictTypeService.selectDictDataByType("sys_annual_plan"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        HashMap<String, String> thresholdMap = new LinkedHashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //年度提报时间的阈值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        for (SysDictData dictData : supTime) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //    字段名称----阈值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            thresholdMap.put(dictData.getDictLabel(), dictData.getDictValue()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //提前或延后*天进行提醒 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<SysDictData> alertTime = dictTypeService.selectDictDataByType("alert_time_setting"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        HashMap<String, String> alertTimeMap = new LinkedHashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //根据时间类别设定的提醒时间 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        for (SysDictData dictData : alertTime) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //    字段名称----阈值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            alertTimeMap.put(dictData.getDictLabel(), dictData.getDictValue()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //获取字典数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         HashMap<String, HashMap<String, String>> planEnums = dictTypeService.getAboutEnums(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         HashMap<String, String> projectTypesMap = planEnums.get("projectTypes"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         HashMap<String, String> planPurchaseModesMap = planEnums.get("planPurchaseModes"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         HashMap<String, String> projectAttributes = planEnums.get("projectAttributes"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         HashMap<String, String> purchaseServices = planEnums.get("purchaseServices"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<PlanYears> list = new ArrayList<PlanYears>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<PlanYearsResponseVo> list = new ArrayList<PlanYearsResponseVo>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for (PlanYears planYear : planYears) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            PlanYearsResponseVo responseVo = new PlanYearsResponseVo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             SysDeptResponseVo sysDeptResponseVo = (SysDeptResponseVo) deptService.selectDeptById(Long.valueOf(planYear.getPurchaseDeptId())).get("sysDept"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             planYear.setPurchaseDeptName(sysDeptResponseVo.getDeptName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -832,7 +1282,11 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     for (String s : split) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         for (Map.Entry<String, String> entry : projectAttributes.entrySet()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             if (s.equals(entry.getValue())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                builder.append(entry.getKey() + ","); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                if (!planYear.getProjectAttr().endsWith(s)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    builder.append(entry.getKey() + ","); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    builder.append(entry.getKey()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                 break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -853,9 +1307,53 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            list.add(planYear); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            BeanUtils.copyProperties(planYear, responseVo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                responseVo.setTipsMessage(planYearsGetTips(responseVo, thresholdMap, alertTimeMap)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } catch (ParseException e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                e.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            list.add(responseVo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return list; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 根据年度计划提报时间的阈值进行提示 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public String planYearsGetTips(PlanYearsResponseVo responseVo, HashMap<String, String> thresholdMap, HashMap<String, String> alertTimeMap) throws ParseException { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //提示信息:定义距离结束时间*天内提示 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        int alertDay = Integer.parseInt(alertTimeMap.get("计划提报时间")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Integer remindTime = 1000 * 60 * 60 * 24 * alertDay; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //提报时间的结束时间阈值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Date thresholdTime = dateFormat.parse(thresholdMap.get("起止时间结束")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Date date = new Date(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        thresholdTime.setYear(date.getYear()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        double surplus = thresholdTime.getTime() - date.getTime(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //少于设定天数便提醒 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (surplus < remindTime && surplus > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //剩余天数(向上取整) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            int i = new Double(Math.ceil(surplus / 1000 / 60 / 60 / 24)).intValue(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (i > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                return "距离计划提报时间不足" + i + "天"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //距离计划完成采购时间一周内提醒 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Integer alertTime = 1000 * 60 * 60 * 24 * 7; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        double surplusTwo = responseVo.getPlanPurchaseFinishTime().getTime() - System.currentTimeMillis(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //少于设定阈值便提醒 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (surplusTwo < alertTime && surplusTwo > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //剩余天数(向上取整) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            int i = new Double(Math.ceil(surplusTwo / 1000 / 60 / 60 / 24)).intValue(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (i > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                return "距离计划完成采购时间不足" + i + "天"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |