From a9e0b7395e48c6693c8e145b25904118f957273d Mon Sep 17 00:00:00 2001 From: huangzj <826100833@qq.com> Date: Wed, 22 Mar 2023 09:02:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BA=E6=99=AE=E6=B5=8B=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../process/pojo/po/RGeneralSurveyPlanPO.java | 3 +++ .../RGeneralSurveyPlanController.java | 6 +++--- .../service/RGeneralSurveyPlanPOService.java | 2 +- .../impl/RGeneralSurveyPlanPOServiceImpl.java | 19 ++++++++++++++++--- 4 files changed, 23 insertions(+), 7 deletions(-) diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RGeneralSurveyPlanPO.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RGeneralSurveyPlanPO.java index 67f5f441c..e45562175 100644 --- a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RGeneralSurveyPlanPO.java +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RGeneralSurveyPlanPO.java @@ -128,4 +128,7 @@ public class RGeneralSurveyPlanPO { @TableField(value = "upload_time") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date uploadTime; + @TableField(value = "create_person") + private String createPerson; + } diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/controller/RGeneralSurveyPlanController.java b/pqs-process/process-boot/src/main/java/com/njcn/process/controller/RGeneralSurveyPlanController.java index 7d8363c41..7969385fa 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/controller/RGeneralSurveyPlanController.java +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/controller/RGeneralSurveyPlanController.java @@ -158,7 +158,7 @@ public class RGeneralSurveyPlanController extends BaseController { public HttpResult> queryPlan(@Validated @RequestBody RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm){ String methodDescribe = getMethodDescribe("queryPlan"); - IPage rGeneralSurveyPlanVOS = rGeneralSurveyPlanPOService.query (rGeneralSurveyPlanQueryParm, Stream.of ("0","1","2","3").collect (Collectors.toList ())); + IPage rGeneralSurveyPlanVOS = rGeneralSurveyPlanPOService.query (rGeneralSurveyPlanQueryParm, Stream.of ("0","1","2","3").collect (Collectors.toList ()),"1"); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rGeneralSurveyPlanVOS, methodDescribe); } @@ -169,7 +169,7 @@ public class RGeneralSurveyPlanController extends BaseController { public HttpResult> queryPlanAudit(@Validated @RequestBody RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm){ String methodDescribe = getMethodDescribe("queryPlanAudit"); - IPage rGeneralSurveyPlanVOS = rGeneralSurveyPlanPOService.query (rGeneralSurveyPlanQueryParm, Stream.of ("1","2").collect (Collectors.toList ())); + IPage rGeneralSurveyPlanVOS = rGeneralSurveyPlanPOService.query (rGeneralSurveyPlanQueryParm, Stream.of ("1","2").collect (Collectors.toList ()),"2"); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rGeneralSurveyPlanVOS, methodDescribe); } @@ -191,7 +191,7 @@ public class RGeneralSurveyPlanController extends BaseController { public HttpResult> queryPlanResult(@Validated @RequestBody RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm){ String methodDescribe = getMethodDescribe("queryPlanResult"); - IPage rGeneralSurveyPlanVOS = rGeneralSurveyPlanPOService.query (rGeneralSurveyPlanQueryParm, Stream.of ("3","4").collect (Collectors.toList ())); + IPage rGeneralSurveyPlanVOS = rGeneralSurveyPlanPOService.query (rGeneralSurveyPlanQueryParm, Stream.of ("3","4").collect (Collectors.toList ()),"3"); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rGeneralSurveyPlanVOS, methodDescribe); } diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/RGeneralSurveyPlanPOService.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/RGeneralSurveyPlanPOService.java index 029abf2d2..df33a17b9 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/service/RGeneralSurveyPlanPOService.java +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/RGeneralSurveyPlanPOService.java @@ -37,7 +37,7 @@ public interface RGeneralSurveyPlanPOService extends IMppService query(RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm,List statusList); + IPage query(RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm,List statusList,String type); /** * @Description: surveyResultUpload * @Param: [surveyResultUploadParam] diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/RGeneralSurveyPlanPOServiceImpl.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/RGeneralSurveyPlanPOServiceImpl.java index f0fb43cd8..23467dc85 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/RGeneralSurveyPlanPOServiceImpl.java +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/RGeneralSurveyPlanPOServiceImpl.java @@ -34,7 +34,9 @@ import com.njcn.system.api.DicDataFeignClient; import com.njcn.system.enums.DicDataTypeEnum; import com.njcn.system.pojo.po.DictData; import com.njcn.user.api.DeptFeignClient; +import com.njcn.user.pojo.po.Dept; import com.njcn.user.pojo.vo.PvTerminalTreeVO; +import com.njcn.web.utils.RequestUtil; import org.apache.poi.ss.usermodel.Workbook; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -113,7 +115,11 @@ public class RGeneralSurveyPlanPOServiceImpl extends MppServiceImpl queryWrapper = new QueryWrapper ( ); queryWrapper.lambda ( ).eq (RGeneralSurveyPlanDetail::getPlanNo, rGeneralSurveyPlanAddParm.getPlanNo ( )); @@ -149,11 +155,18 @@ public class RGeneralSurveyPlanPOServiceImpl extends MppServiceImpl query(RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm, List statusList) { + public IPage query(RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm, List statusList,String type) { IPage page = new Page<> (rGeneralSurveyPlanQueryParm.getCurrentPage ( ), rGeneralSurveyPlanQueryParm.getPageSize ( )); IPage returnpage = new Page<> (rGeneralSurveyPlanQueryParm.getCurrentPage ( ), rGeneralSurveyPlanQueryParm.getPageSize ( )); LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<> ( ); + /*type=1:新建页面:查看自己负责的计划;type=2:审核页面:审核者==当前用户;结果页面:查看自己负责的计划*/ + if(type=="1"||type=="3"){ + queryWrapper.eq (RGeneralSurveyPlanPO::getCreatePerson,RequestUtil.getUserIndex ()); + } + if(type=="2"){ + queryWrapper.eq (RGeneralSurveyPlanPO::getCheckPerson,RequestUtil.getDeptIndex ()); + } if (!StringUtils.isEmpty (rGeneralSurveyPlanQueryParm.getOrgNo ( ))) { List data = deptFeignClient.getDepSonIdtByDeptId (rGeneralSurveyPlanQueryParm.getOrgNo ( )).getData ( ); @@ -382,7 +395,7 @@ public class RGeneralSurveyPlanPOServiceImpl extends MppServiceImpl updateWrapper = new UpdateWrapper ( ); updateWrapper.eq ("plan_no", rGeneralSurveyPlanChcekParm.getPlanNo ( )); updateWrapper.set ("check_comment", rGeneralSurveyPlanChcekParm.getCheckComment ( )); - updateWrapper.set ("check_person", rGeneralSurveyPlanChcekParm.getCheckPerson ( )); +// updateWrapper.set ("check_person", rGeneralSurveyPlanChcekParm.getCheckPerson ( )); updateWrapper.set ("status", Objects.equals ("1", rGeneralSurveyPlanChcekParm.getCheckResult ( )) ? 3 : 2); result = this.update (updateWrapper); return result;