diff --git a/process-api/src/main/java/com/njcn/process/pojo/param/RGeneralSurveyPlanAddParm.java b/process-api/src/main/java/com/njcn/process/pojo/param/RGeneralSurveyPlanAddParm.java index 96bba923c..dbecf23ec 100644 --- a/process-api/src/main/java/com/njcn/process/pojo/param/RGeneralSurveyPlanAddParm.java +++ b/process-api/src/main/java/com/njcn/process/pojo/param/RGeneralSurveyPlanAddParm.java @@ -16,7 +16,6 @@ import java.util.List; * @author clam * @version V1.0.0 */ -@ApiModel(value="com-njcn-process-pojo-param-RGeneralSurveyPlanAddParm") @Data public class RGeneralSurveyPlanAddParm { diff --git a/process-api/src/main/java/com/njcn/process/pojo/param/RGeneralSurveyPlanQueryParm.java b/process-api/src/main/java/com/njcn/process/pojo/param/RGeneralSurveyPlanQueryParm.java index 629fe10bc..910f26724 100644 --- a/process-api/src/main/java/com/njcn/process/pojo/param/RGeneralSurveyPlanQueryParm.java +++ b/process-api/src/main/java/com/njcn/process/pojo/param/RGeneralSurveyPlanQueryParm.java @@ -1,7 +1,6 @@ package com.njcn.process.pojo.param; import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -17,7 +16,6 @@ import java.util.Date; * @author clam * @version V1.0.0 */ -@ApiModel(value="com-njcn-process-pojo-param-RGeneralSurveyPlanAddParm") @Data public class RGeneralSurveyPlanQueryParm { @@ -37,6 +35,10 @@ public class RGeneralSurveyPlanQueryParm { @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") private Date planStartTime; + @ApiModelProperty(value="计划结束时间") + @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") + private Date planEndTime; + @ApiModelProperty(value="计划状态(0:新建 1:待审核 2:审核未通过 3:已发布 4:已完成)") private String status; diff --git a/process-api/src/main/java/com/njcn/process/pojo/param/RGeneralSurveyPlandetailQueryParm.java b/process-api/src/main/java/com/njcn/process/pojo/param/RGeneralSurveyPlandetailQueryParm.java index ab1a29506..d32bb6154 100644 --- a/process-api/src/main/java/com/njcn/process/pojo/param/RGeneralSurveyPlandetailQueryParm.java +++ b/process-api/src/main/java/com/njcn/process/pojo/param/RGeneralSurveyPlandetailQueryParm.java @@ -1,6 +1,5 @@ package com.njcn.process.pojo.param; -import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -15,7 +14,6 @@ import javax.validation.constraints.NotNull; * @author clam * @version V1.0.0 */ -@ApiModel(value="com-njcn-process-pojo-param-RGeneralSurveyPlanAddParm") @Data public class RGeneralSurveyPlandetailQueryParm { diff --git a/process-api/src/main/java/com/njcn/process/pojo/param/SurveyPlanQuestionQueryParm.java b/process-api/src/main/java/com/njcn/process/pojo/param/SurveyPlanQuestionQueryParm.java index d6ae73b19..760e7432b 100644 --- a/process-api/src/main/java/com/njcn/process/pojo/param/SurveyPlanQuestionQueryParm.java +++ b/process-api/src/main/java/com/njcn/process/pojo/param/SurveyPlanQuestionQueryParm.java @@ -26,6 +26,7 @@ public class SurveyPlanQuestionQueryParm { @ApiModelProperty(value="计划开始时间") @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") + @NotNull(message="计划开始时间不能为空!") private Date planStartTime; @ApiModelProperty(value="计划名称") diff --git a/process-api/src/main/java/com/njcn/process/pojo/param/SurveyResultUploadParam.java b/process-api/src/main/java/com/njcn/process/pojo/param/SurveyResultUploadParam.java index 9c2c545fb..e9b7d4439 100644 --- a/process-api/src/main/java/com/njcn/process/pojo/param/SurveyResultUploadParam.java +++ b/process-api/src/main/java/com/njcn/process/pojo/param/SurveyResultUploadParam.java @@ -22,9 +22,9 @@ public class SurveyResultUploadParam { @NotBlank(message = ValidMessage.ID_NOT_BLANK) private String planId; - @ApiModelProperty(name = "files",value = "普测结果报告",required = true) + @ApiModelProperty(name = "file",value = "普测结果报告",required = true) @NotNull(message = "普测结果报告") - private MultipartFile[] files; + private MultipartFile[] file; diff --git a/process-api/src/main/java/com/njcn/process/pojo/po/RGeneralSurveyPlanDetail.java b/process-api/src/main/java/com/njcn/process/pojo/po/RGeneralSurveyPlanDetail.java index 4f1004fb9..a6f7bdc91 100644 --- a/process-api/src/main/java/com/njcn/process/pojo/po/RGeneralSurveyPlanDetail.java +++ b/process-api/src/main/java/com/njcn/process/pojo/po/RGeneralSurveyPlanDetail.java @@ -104,10 +104,17 @@ public class RGeneralSurveyPlanDetail { @ApiModelProperty(value="离线监测点id") private String measurementPointId; + /** + * 是否实现监测(0:否 1:是) + */ + @TableField(value = "is_survey") + @ApiModelProperty(value="是否生成问题(0:否 1:是)") + private Integer isSurvey; + /** * 是否生成问题(0:否 1:是) */ @TableField(value = "is_problem") @ApiModelProperty(value="是否生成问题(0:否 1:是)") - private Byte isProblem; + private Integer isProblem; } \ No newline at end of file diff --git a/process-api/src/main/java/com/njcn/process/pojo/vo/RGeneralSurveyPlanVO.java b/process-api/src/main/java/com/njcn/process/pojo/vo/RGeneralSurveyPlanVO.java index 9378ee1f1..407fabdb1 100644 --- a/process-api/src/main/java/com/njcn/process/pojo/vo/RGeneralSurveyPlanVO.java +++ b/process-api/src/main/java/com/njcn/process/pojo/vo/RGeneralSurveyPlanVO.java @@ -17,12 +17,14 @@ import java.util.List; * @author clam * @version V1.0.0 */ -@ApiModel(value="com-njcn-process-pojo-param-RGeneralSurveyPlanAddParm") @Data public class RGeneralSurveyPlanVO { @ApiModelProperty(value="单位ID") private String orgNo; + @ApiModelProperty(value="单位名称") + private String orgName; + @ApiModelProperty(value="普测计划编号") private String planNo; @@ -45,11 +47,11 @@ public class RGeneralSurveyPlanVO { private Long busCount; @ApiModelProperty(value="计划状态(0:新建 1:待审核 2:审核未通过 3:已发布 4:已完成)") - private int status; + private Integer status; @TableField(value = "is_file_upload") @ApiModelProperty(value="文件是否上传(0:否 1:是)") - private Byte isFileUpload; + private Integer isFileUpload; /** * 上传文件数量 @@ -116,6 +118,13 @@ public class RGeneralSurveyPlanVO { @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") private Date generalSurveyTime; + /** + * 是否实现监测(0:否 1:是) + */ + @TableField(value = "is_survey") + @ApiModelProperty(value="是否生成问题(0:否 1:是)") + private Integer isSurvey; + /** * 测试负责人 */ diff --git a/process-api/src/main/java/com/njcn/process/pojo/po/SurveyPlanExcel.java b/process-api/src/main/java/com/njcn/process/pojo/vo/SurveyPlanExcel.java similarity index 97% rename from process-api/src/main/java/com/njcn/process/pojo/po/SurveyPlanExcel.java rename to process-api/src/main/java/com/njcn/process/pojo/vo/SurveyPlanExcel.java index 9fde41b4e..15e4a2a3c 100644 --- a/process-api/src/main/java/com/njcn/process/pojo/po/SurveyPlanExcel.java +++ b/process-api/src/main/java/com/njcn/process/pojo/vo/SurveyPlanExcel.java @@ -1,4 +1,4 @@ -package com.njcn.process.pojo.po; +package com.njcn.process.pojo.vo; import cn.afterturn.easypoi.excel.annotation.Excel; import com.fasterxml.jackson.annotation.JsonFormat; diff --git a/process-boot/src/main/java/com/njcn/process/controller/RGeneralSurveyPlanController.java b/process-boot/src/main/java/com/njcn/process/controller/RGeneralSurveyPlanController.java index 5c999e450..db147ae3f 100644 --- a/process-boot/src/main/java/com/njcn/process/controller/RGeneralSurveyPlanController.java +++ b/process-boot/src/main/java/com/njcn/process/controller/RGeneralSurveyPlanController.java @@ -9,9 +9,11 @@ import com.njcn.common.pojo.enums.common.LogEnum; import com.njcn.common.pojo.enums.response.CommonResponseEnum; import com.njcn.common.pojo.response.HttpResult; import com.njcn.common.utils.HttpResultUtil; +import com.njcn.minio.bo.MinIoUploadResDTO; import com.njcn.poi.util.PoiUtil; import com.njcn.process.pojo.param.*; -import com.njcn.process.pojo.po.SurveyPlanExcel; +import com.njcn.process.pojo.po.RGeneralSurveyPlanPO; +import com.njcn.process.pojo.vo.SurveyPlanExcel; import com.njcn.process.pojo.vo.RGeneralSurveyPlanDetailOnQuestionVO; import com.njcn.process.pojo.vo.RGeneralSurveyPlanVO; import com.njcn.process.service.RGeneralSurveyPlanDetailService; @@ -29,6 +31,8 @@ import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.Stream; /** * Description: @@ -68,16 +72,7 @@ public class RGeneralSurveyPlanController extends BaseController { return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, addFlag, methodDescribe); } -// @OperateInfo(info = LogEnum.BUSINESS_COMMON) -// @PostMapping("/updatePlan") -// @ApiOperation("新增普测计划") -// @ApiImplicitParam(name = "rGeneralSurveyPlanAddParm", value = "新增普测计划参数", required = true) -// public HttpResult updatePlan(@RequestBody RGeneralSurveyPlanAddParm rGeneralSurveyPlanAddParm){ -// String methodDescribe = getMethodDescribe("addPlan"); -// -//// Boolean addFlag = rGeneralSurveyPlanPOService.updatePlan(rGeneralSurveyPlanAddParm); -// return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, addFlag, methodDescribe); -// } + @OperateInfo(info = LogEnum.BUSINESS_COMMON) @PostMapping("/queryPlan") @@ -86,7 +81,7 @@ public class RGeneralSurveyPlanController extends BaseController { public HttpResult> queryPlan(@Validated @RequestBody RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm){ String methodDescribe = getMethodDescribe("queryPlan"); - IPage rGeneralSurveyPlanVOS = rGeneralSurveyPlanPOService.query (rGeneralSurveyPlanQueryParm); + IPage rGeneralSurveyPlanVOS = rGeneralSurveyPlanPOService.query (rGeneralSurveyPlanQueryParm, Stream.of ("0","1","2","3").collect (Collectors.toList ())); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rGeneralSurveyPlanVOS, methodDescribe); } @@ -97,7 +92,7 @@ public class RGeneralSurveyPlanController extends BaseController { public HttpResult> queryPlanAudit(@Validated @RequestBody RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm){ String methodDescribe = getMethodDescribe("queryPlanAudit"); - IPage rGeneralSurveyPlanVOS = rGeneralSurveyPlanPOService.query (rGeneralSurveyPlanQueryParm); + IPage rGeneralSurveyPlanVOS = rGeneralSurveyPlanPOService.query (rGeneralSurveyPlanQueryParm, Stream.of ("1").collect (Collectors.toList ())); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rGeneralSurveyPlanVOS, methodDescribe); } @@ -108,7 +103,7 @@ public class RGeneralSurveyPlanController extends BaseController { public HttpResult> queryPlanResult(@Validated @RequestBody RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm){ String methodDescribe = getMethodDescribe("queryPlanResult"); - IPage rGeneralSurveyPlanVOS = rGeneralSurveyPlanPOService.query (rGeneralSurveyPlanQueryParm); + IPage rGeneralSurveyPlanVOS = rGeneralSurveyPlanPOService.query (rGeneralSurveyPlanQueryParm, Stream.of ("3","4").collect (Collectors.toList ())); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rGeneralSurveyPlanVOS, methodDescribe); } @@ -143,9 +138,9 @@ public class RGeneralSurveyPlanController extends BaseController { @PostMapping("/surveyResultDownload") @ApiOperation("下载普测结果报告") @ApiImplicitParam(name = "planNo", value = "计划号", required = true) - public HttpResult> surveyResultDownload(@RequestParam("planNo") String planNo ){ + public HttpResult> surveyResultDownload(@RequestParam("planNo") String planNo ){ String methodDescribe = getMethodDescribe("surveyResultDownload"); - List downloadUrls = rGeneralSurveyPlanPOService.surveyResultDownload(planNo); + List downloadUrls = rGeneralSurveyPlanPOService.surveyResultDownload(planNo); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, downloadUrls, methodDescribe); @@ -184,6 +179,19 @@ public class RGeneralSurveyPlanController extends BaseController { } + @ResponseBody + @ApiOperation("普测计划名称查询") + @PostMapping(value = "querySurveyPlanName") + @ApiImplicitParam(name = "questionQueryParm", value = "普测计划名称查询参数", required = true) + public HttpResult> querySurveyPlanName(@Validated @RequestBody SurveyPlanQuestionQueryParm questionQueryParm) { + String methodDescribe = getMethodDescribe("querySurveyPlanName"); + + List list= rGeneralSurveyPlanPOService.querySurveyPlanName(questionQueryParm); + + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); + + } + } diff --git a/process-boot/src/main/java/com/njcn/process/mapper/RGeneralSurveyPlanDetailMapper.java b/process-boot/src/main/java/com/njcn/process/mapper/RGeneralSurveyPlanDetailMapper.java index b53db752c..816ad606b 100644 --- a/process-boot/src/main/java/com/njcn/process/mapper/RGeneralSurveyPlanDetailMapper.java +++ b/process-boot/src/main/java/com/njcn/process/mapper/RGeneralSurveyPlanDetailMapper.java @@ -19,18 +19,23 @@ import java.util.List; * @version V1.0.0 */ public interface RGeneralSurveyPlanDetailMapper extends MppBaseMapper { - @Select ("SELECT\n" + + @Select ({""}) List querySurveyPlanOnQuestion(@Param("questionQueryParm") SurveyPlanQuestionQueryParm questionQueryParm); } \ No newline at end of file diff --git a/process-boot/src/main/java/com/njcn/process/service/RGeneralSurveyPlanPOService.java b/process-boot/src/main/java/com/njcn/process/service/RGeneralSurveyPlanPOService.java index d655e0d09..c345a1a5a 100644 --- a/process-boot/src/main/java/com/njcn/process/service/RGeneralSurveyPlanPOService.java +++ b/process-boot/src/main/java/com/njcn/process/service/RGeneralSurveyPlanPOService.java @@ -2,12 +2,13 @@ package com.njcn.process.service; import com.baomidou.mybatisplus.core.metadata.IPage; import com.github.jeffreyning.mybatisplus.service.IMppService; +import com.njcn.minio.bo.MinIoUploadResDTO; import com.njcn.process.pojo.param.RGeneralSurveyPlanAddParm; import com.njcn.process.pojo.param.RGeneralSurveyPlanQueryParm; import com.njcn.process.pojo.param.SurveyPlanQuestionQueryParm; import com.njcn.process.pojo.param.SurveyResultUploadParam; import com.njcn.process.pojo.po.RGeneralSurveyPlanPO; -import com.njcn.process.pojo.po.SurveyPlanExcel; +import com.njcn.process.pojo.vo.SurveyPlanExcel; import com.njcn.process.pojo.vo.RGeneralSurveyPlanDetailOnQuestionVO; import com.njcn.process.pojo.vo.RGeneralSurveyPlanVO; @@ -39,7 +40,7 @@ public interface RGeneralSurveyPlanPOService extends IMppService query(RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm); + IPage query(RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm,List statusList); /** * @Description: surveyResultUpload * @Param: [surveyResultUploadParam] @@ -55,11 +56,11 @@ public interface RGeneralSurveyPlanPOService extends IMppService surveyResultDownload(String planNo); + List surveyResultDownload(String planNo); /** * @Description: exportSurveyPlan * @Param: [] - * @return: java.util.List + * @return: java.util.List * @Author: clam * @Date: 2022/11/21 */ @@ -72,4 +73,12 @@ public interface RGeneralSurveyPlanPOService extends IMppService querySurveyPlanOnQuestion(SurveyPlanQuestionQueryParm questionQueryParm); + /** + * @Description: 更具questionQueryParm查计划名称 + * @Param: [questionQueryParm] + * @return: java.util.List + * @Author: clam + * @Date: 2022/12/1 + */ + List querySurveyPlanName(SurveyPlanQuestionQueryParm questionQueryParm); } diff --git a/process-boot/src/main/java/com/njcn/process/service/impl/RGeneralSurveyPlanPOServiceImpl.java b/process-boot/src/main/java/com/njcn/process/service/impl/RGeneralSurveyPlanPOServiceImpl.java index 856595e8d..1427686ba 100644 --- a/process-boot/src/main/java/com/njcn/process/service/impl/RGeneralSurveyPlanPOServiceImpl.java +++ b/process-boot/src/main/java/com/njcn/process/service/impl/RGeneralSurveyPlanPOServiceImpl.java @@ -1,6 +1,7 @@ package com.njcn.process.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.github.jeffreyning.mybatisplus.service.MppServiceImpl; @@ -17,11 +18,13 @@ import com.njcn.process.pojo.param.SurveyPlanQuestionQueryParm; import com.njcn.process.pojo.param.SurveyResultUploadParam; import com.njcn.process.pojo.po.RGeneralSurveyPlanDetail; import com.njcn.process.pojo.po.RGeneralSurveyPlanPO; -import com.njcn.process.pojo.po.SurveyPlanExcel; +import com.njcn.process.pojo.vo.SurveyPlanExcel; import com.njcn.process.pojo.vo.RGeneralSurveyPlanDetailOnQuestionVO; import com.njcn.process.pojo.vo.RGeneralSurveyPlanVO; import com.njcn.process.service.RGeneralSurveyPlanDetailService; import com.njcn.process.service.RGeneralSurveyPlanPOService; +import com.njcn.user.api.DeptFeignClient; +import com.njcn.user.pojo.vo.PvTerminalTreeVO; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -31,6 +34,7 @@ import org.springframework.util.StringUtils; import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; +import java.text.SimpleDateFormat; import java.util.*; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -60,6 +64,10 @@ public class RGeneralSurveyPlanPOServiceImpl extends MppServiceImpl rGeneralSurveyPlanDetailAddParm = rGeneralSurveyPlanAddParm.getRGeneralSurveyPlanDetailAddParm ( ); - + QueryWrapper queryWrapper = new QueryWrapper (); + queryWrapper.lambda ().eq (RGeneralSurveyPlanDetail::getPlanNo, rGeneralSurveyPlanAddParm.getPlanNo ()); + boolean remove = rGeneralSurveyPlanDetailService.remove (queryWrapper); List rGeneralSurveyPlanDetailList = new ArrayList<> (); rGeneralSurveyPlanDetailAddParm.forEach (temp->{ RGeneralSurveyPlanDetail rGeneralSurveyPlanDetail = new RGeneralSurveyPlanDetail(); @@ -91,9 +100,9 @@ public class RGeneralSurveyPlanPOServiceImpl extends MppServiceImpl query(RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm) { + public IPage query(RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm,List statusList ) { IPage page = new Page<> (rGeneralSurveyPlanQueryParm.getCurrentPage(), rGeneralSurveyPlanQueryParm.getPageSize()); IPage returnpage = new Page<> (rGeneralSurveyPlanQueryParm.getCurrentPage(), rGeneralSurveyPlanQueryParm.getPageSize()); LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<> (); if (!StringUtils.isEmpty (rGeneralSurveyPlanQueryParm.getOrgNo ())) { - queryWrapper.eq (RGeneralSurveyPlanPO::getOrgNo, rGeneralSurveyPlanQueryParm.getOrgNo ()); + List data = deptFeignClient.getDepSonIdtByDeptId (rGeneralSurveyPlanQueryParm.getOrgNo ()).getData ( ); + + queryWrapper.in (RGeneralSurveyPlanPO::getOrgNo, data); } if (!StringUtils.isEmpty (rGeneralSurveyPlanQueryParm. getStatus ())) { queryWrapper.eq (RGeneralSurveyPlanPO::getStatus, rGeneralSurveyPlanQueryParm.getStatus ()); @@ -120,14 +131,27 @@ public class RGeneralSurveyPlanPOServiceImpl extends MppServiceImpl rGeneralSurveyPlanPOS = rGeneralSurveyPlanPOMapper.selectPage (page,queryWrapper).getRecords (); if(CollectionUtils.isEmpty (rGeneralSurveyPlanPOS)){ return returnpage; } + + //部门处理:根据部门code取名称 + List dept = deptFeignClient.allDeptList().getData(); + Map pvTerminalTreeVOMap = dept.stream(). + collect(Collectors. + toMap(PvTerminalTreeVO::getId, + PvTerminalTreeVO::getName)); + + List collect = rGeneralSurveyPlanPOS.stream ( ).map (RGeneralSurveyPlanPO::getPlanNo).collect (Collectors.toList ( )); LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<> (); lambdaQueryWrapper.in (RGeneralSurveyPlanDetail::getPlanNo, collect); @@ -136,8 +160,6 @@ public class RGeneralSurveyPlanPOServiceImpl extends MppServiceImpl{ RGeneralSurveyPlanVO rGeneralSurveyPlanVO = new RGeneralSurveyPlanVO(); BeanUtils.copyProperties (temp, rGeneralSurveyPlanVO); - Stream rGeneralSurveyPlanDetailStream = rGeneralSurveyPlanDetails.stream ( ). - filter (surveyPlanDetail -> Objects.equals (surveyPlanDetail.getPlanNo ( ), temp.getPlanNo ( ))); long Busbarcount = rGeneralSurveyPlanDetails.stream ( ). filter (surveyPlanDetail -> Objects.equals (surveyPlanDetail.getPlanNo ( ), temp.getPlanNo ( ))). map (RGeneralSurveyPlanDetail::getBusbarId).distinct ( ).count ( ); @@ -154,6 +176,7 @@ public class RGeneralSurveyPlanPOServiceImpl extends MppServiceImpl surveyResultDownload(String planNo) { + public List surveyResultDownload(String planNo) { RGeneralSurveyPlanPO rGeneralSurveyPlanPO = new RGeneralSurveyPlanPO(); rGeneralSurveyPlanPO.setPlanNo (planNo); rGeneralSurveyPlanPO = this.selectByMultiId (rGeneralSurveyPlanPO); @@ -211,8 +234,9 @@ public class RGeneralSurveyPlanPOServiceImpl extends MppServiceImpl collect = Stream.of (split).map (temp -> { - return minIoUtils.getObjectUrl (minIoProperties.getBucket ( ), temp, 7 * 24 * 60 * 60); + List collect = Stream.of (split).map (temp -> { + MinIoUploadResDTO dto = new MinIoUploadResDTO("",minIoUtils.getObjectUrl (minIoProperties.getBucket ( ), temp, 7 * 24 * 60 * 60)); + return dto ; }).collect (Collectors.toList ( )); return collect; } @@ -220,7 +244,7 @@ public class RGeneralSurveyPlanPOServiceImpl extends MppServiceImpl + * @return: java.util.List * @Author: clam * @Date: 2022/11/21 */ @@ -233,6 +257,13 @@ public class RGeneralSurveyPlanPOServiceImpl extends MppServiceImpl lambdaQueryWrapper = new LambdaQueryWrapper<> (); lambdaQueryWrapper.in (RGeneralSurveyPlanDetail::getPlanNo, planIdList); List rGeneralSurveyPlanDetails = rGeneralSurveyPlanDetailMapper.selectList (lambdaQueryWrapper); + + //部门处理:根据部门code取名称 + List dept = deptFeignClient.allDeptList().getData(); + Map pvTerminalTreeVOMap = dept.stream(). + collect(Collectors. + toMap(PvTerminalTreeVO::getId, + PvTerminalTreeVO::getName)); rGeneralSurveyPlanPOS.forEach (temp->{ SurveyPlanExcel surveyPlanExcel = new SurveyPlanExcel(); BeanUtils.copyProperties (temp, surveyPlanExcel); @@ -246,6 +277,7 @@ public class RGeneralSurveyPlanPOServiceImpl extends MppServiceImpl + * @Author: clam + * @Date: 2022/12/1 + */ + @Override + public List querySurveyPlanName(SurveyPlanQuestionQueryParm questionQueryParm) { + + List data = deptFeignClient.getDepSonIdtByDeptId (questionQueryParm.getOrgNo ()).getData ( ); + + QueryWrapper queryWrapper = new QueryWrapper<> (); + queryWrapper.select ("plan_name"). + in ("org_no", data). + eq ("DATE_FORMAT(upload_time, '%Y-%m')", new SimpleDateFormat ("yyyy-MM"). + format (questionQueryParm.getPlanStartTime ())); + List list = this.list (queryWrapper); + + return list; + } + /** * 上传文件到Minio *