|  |  |  | 
|---|
|  |  |  | Long id = Long.parseLong(planId); | 
|---|
|  |  |  | Plan plan = planService.selectById(id); | 
|---|
|  |  |  | PlanType planType = planTypeService.selectById(plan.getPlanType()); | 
|---|
|  |  |  | if (plan.getAssistantHostSign()==1){ | 
|---|
|  |  |  | planType.setType(1); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //        String savePath = "D:/crm/plan/file/"+id+"/"; // 指定保存文件的路径 | 
|---|
|  |  |  | try{ | 
|---|
|  |  |  | List<PlanUrl> planUrls = planUrlService.selectPlanUrlByPlanId(id,0,planType.getType(),0); | 
|---|
|  |  |  | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | status=2; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (plan.getAssistantHostSign()==1){ | 
|---|
|  |  |  | planType.setType(1); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | String url = "http://zhongyang-ftpserver.oss-cn-hangzhou.aliyuncs.com/" + filename; | 
|---|
|  |  |  | PlanUrl planUrl = new PlanUrl(id, url, filename, filesize,user.getNickname(),user.getId(),1,planType.getType(),status); | 
|---|
|  |  |  | planUrlService.insert(planUrl); | 
|---|
|  |  |  | 
|---|
|  |  |  | Long id = Long.parseLong(planId); | 
|---|
|  |  |  | int planType =0; | 
|---|
|  |  |  | Plan plan = planService.selectById(id); | 
|---|
|  |  |  | if (!plan.getUserId().equals(getUserId())){ | 
|---|
|  |  |  | List<ProcessPermissions> processPermissionsList = processPermissionsService.selectList(new EntityWrapper<ProcessPermissions>().eq("process_memo", 4).or().eq("process_memo", 5));//2:核价流程 | 
|---|
|  |  |  | for (ProcessPermissions processPermissions:processPermissionsList){ | 
|---|
|  |  |  | if (getUserId().equals(processPermissions.getUserId())){ | 
|---|
|  |  |  | planType=PBN-processPermissions.getProcessMemo(); | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | if (plan.getAssistantHostSign()==1){ | 
|---|
|  |  |  | planType=1; | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | if (!plan.getUserId().equals(getUserId())){ | 
|---|
|  |  |  | List<ProcessPermissions> processPermissionsList = processPermissionsService.selectList(new EntityWrapper<ProcessPermissions>().eq("process_memo", 4).or().eq("process_memo", 5));//2:核价流程 | 
|---|
|  |  |  | for (ProcessPermissions processPermissions:processPermissionsList){ | 
|---|
|  |  |  | if (getUserId().equals(processPermissions.getUserId())){ | 
|---|
|  |  |  | planType=PBN-processPermissions.getProcessMemo(); | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | status=1; | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | status=2; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (plan.getAssistantHostSign()==1){ | 
|---|
|  |  |  | planType.setType(1); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | String url = "http://zhongyang-ftpserver.oss-cn-hangzhou.aliyuncs.com/" + filename; | 
|---|
|  |  |  | PlanUrl planUrl = new PlanUrl(id, url, filename, filesize,user.getNickname(),user.getId(),2,planType.getType(),status); | 
|---|
|  |  |  | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | status=2; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (plan.getAssistantHostSign()==1){ | 
|---|
|  |  |  | planType.setType(1); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | String url = "http://zhongyang-ftpserver.oss-cn-hangzhou.aliyuncs.com/" + filename; | 
|---|
|  |  |  | PlanUrl planUrl = new PlanUrl(id, url, filename, filesize,user.getNickname(),user.getId(),3,planType.getType(),status); | 
|---|
|  |  |  | planUrlService.insert(planUrl); | 
|---|