|
@@ -2,6 +2,7 @@ package org.jeecg.modules.archives.controller;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.validation.Valid;
|
|
|
+import com.google.common.collect.Lists;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
@@ -12,13 +13,17 @@ import org.jeecg.common.dto.archives.ExpensePriceReqDTO;
|
|
|
import org.jeecg.common.dto.archives.ExpensePriceRespDTO;
|
|
|
import org.jeecg.common.dto.archives.ProArchivesAddReqDTO;
|
|
|
import org.jeecg.common.dto.archives.ProArchivesAddRespDTO;
|
|
|
+import org.jeecg.common.dto.archives.ProPlanListReqDTO;
|
|
|
+import org.jeecg.common.dto.archives.ProPlanListRespDTO;
|
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
|
import org.jeecg.modules.archives.entity.ProjectManageArchives;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.jeecg.modules.archives.entity.ProjectManageBusinessOther;
|
|
|
import org.jeecg.modules.archives.service.ProjectManageArchivesService;
|
|
|
+import org.jeecg.modules.archives.service.ProjectManageBusinessOtherService;
|
|
|
import org.jeecg.modules.payment.service.ManagerPaymentAndReceiptSlipService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.validation.BindingResult;
|
|
@@ -28,6 +33,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
+import java.util.List;
|
|
|
|
|
|
|
|
|
* @Author jihaosen
|
|
@@ -42,6 +48,8 @@ public class ProjectManageArchivesController {
|
|
|
private ProjectManageArchivesService projectManageArchivesService;
|
|
|
@Autowired
|
|
|
private ManagerPaymentAndReceiptSlipService managerPaymentAndReceiptSlipService;
|
|
|
+ @Autowired
|
|
|
+ private ProjectManageBusinessOtherService projectManageBusinessOtherService;
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "项目档案分页查询接口", notes = "项目档案分页查询")
|
|
@@ -284,4 +292,39 @@ public class ProjectManageArchivesController {
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value = "项目档案计划列表查询", notes = "根据主表id查询项目档案计划列表")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name="id", value="id",required=true, dataType="String")
|
|
|
+ })
|
|
|
+ @GetMapping(value = "/getPlanListById")
|
|
|
+ public Result<List<ProPlanListRespDTO>> getListById(@Valid ProPlanListReqDTO reqDTO, BindingResult bindingResult) {
|
|
|
+ Result<List<ProPlanListRespDTO>> result = new Result<List<ProPlanListRespDTO>>();
|
|
|
+ try {
|
|
|
+ StringBuilder sb = new StringBuilder();
|
|
|
+ if(bindingResult.hasErrors()) {
|
|
|
+
|
|
|
+ bindingResult.getAllErrors().stream().forEach(error -> sb.append(error.getDefaultMessage() + "<br/>"));
|
|
|
+ result.error500(sb.toString());
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ QueryWrapper<ProjectManageBusinessOther> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.eq("del_flag", "0").eq("pro_archives_id", reqDTO.getId())
|
|
|
+ .eq("plan_type", reqDTO.getPlanType());
|
|
|
+
|
|
|
+ List<ProjectManageBusinessOther> list = projectManageBusinessOtherService.list(queryWrapper);
|
|
|
+ List<ProPlanListRespDTO> respDTOS = Lists.newArrayList();
|
|
|
+ for(ProjectManageBusinessOther other : list){
|
|
|
+ respDTOS.add(new ProPlanListRespDTO(other.getId(), other.getMuilesId(), other.getMuilesName()));
|
|
|
+ }
|
|
|
+ result.setResult(respDTOS);
|
|
|
+ result.setSuccess(true);
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ log.info(e.getMessage());
|
|
|
+ result.error500("操作失败");
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
}
|