|
@@ -17,6 +17,7 @@ import org.jeecg.common.dto.archives.ProArchivesAddRespDTO;
|
|
import org.jeecg.common.dto.archives.ProPlanListReqDTO;
|
|
import org.jeecg.common.dto.archives.ProPlanListReqDTO;
|
|
import org.jeecg.common.dto.archives.ProPlanListRespDTO;
|
|
import org.jeecg.common.dto.archives.ProPlanListRespDTO;
|
|
import org.jeecg.common.dto.basedata.ArchivesBusinessListReqDTO;
|
|
import org.jeecg.common.dto.basedata.ArchivesBusinessListReqDTO;
|
|
|
|
+import org.jeecg.common.dto.basedata.ArchivesBusinessListRespDTO;
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
import org.jeecg.modules.archives.entity.ProjectManageArchives;
|
|
import org.jeecg.modules.archives.entity.ProjectManageArchives;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
@@ -343,8 +344,8 @@ public class ProjectManageArchivesController {
|
|
@ApiImplicitParam(name="pkOrg", value="组织",required=true, dataType="String")
|
|
@ApiImplicitParam(name="pkOrg", value="组织",required=true, dataType="String")
|
|
})
|
|
})
|
|
@GetMapping(value = "/getBusinessList")
|
|
@GetMapping(value = "/getBusinessList")
|
|
- public Result<List<ProjectManageArchivesAndBusiness>> getBusinessList(@Valid ArchivesBusinessListReqDTO reqDTO, BindingResult bindingResult) {
|
|
|
|
- Result<List<ProjectManageArchivesAndBusiness>> result = new Result<List<ProjectManageArchivesAndBusiness>>();
|
|
|
|
|
|
+ public Result<List<ArchivesBusinessListRespDTO>> getBusinessList(@Valid ArchivesBusinessListReqDTO reqDTO, BindingResult bindingResult) {
|
|
|
|
+ Result<List<ArchivesBusinessListRespDTO>> result = new Result<List<ArchivesBusinessListRespDTO>>();
|
|
try {
|
|
try {
|
|
StringBuilder sb = new StringBuilder();
|
|
StringBuilder sb = new StringBuilder();
|
|
if(bindingResult.hasErrors()) {
|
|
if(bindingResult.hasErrors()) {
|
|
@@ -361,10 +362,35 @@ public class ProjectManageArchivesController {
|
|
}
|
|
}
|
|
if(StringUtils.isNotBlank(reqDTO.getPkOrg())){
|
|
if(StringUtils.isNotBlank(reqDTO.getPkOrg())){
|
|
queryWrapper.eq("pkOrg", reqDTO.getPkOrg());
|
|
queryWrapper.eq("pkOrg", reqDTO.getPkOrg());
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotBlank(reqDTO.getPlanId())){
|
|
|
|
+ queryWrapper.eq("plan_id", reqDTO.getPlanId());
|
|
}
|
|
}
|
|
queryWrapper.orderByAsc("sort");
|
|
queryWrapper.orderByAsc("sort");
|
|
List<ProjectManageArchivesAndBusiness> list = projectManageArchivesAndBusinessService.list(queryWrapper);
|
|
List<ProjectManageArchivesAndBusiness> list = projectManageArchivesAndBusinessService.list(queryWrapper);
|
|
- result.setResult(list);
|
|
|
|
|
|
+ List<ArchivesBusinessListRespDTO> respDTOS = Lists.newArrayList();
|
|
|
|
+ if(!CollectionUtils.isEmpty(list)){
|
|
|
|
+ ProjectManageArchivesAndBusiness business = list.get(0);
|
|
|
|
+ if(StringUtils.isNotBlank(business.getMileId1())){
|
|
|
|
+ respDTOS.add(new ArchivesBusinessListRespDTO(business.getId(), business.getMileId1(), business.getMilestone1(), business.getPrice1()));
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotBlank(business.getMileId2())){
|
|
|
|
+ respDTOS.add(new ArchivesBusinessListRespDTO(business.getId(), business.getMileId2(), business.getMilestone2(), business.getPrice2()));
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotBlank(business.getMileId3())){
|
|
|
|
+ respDTOS.add(new ArchivesBusinessListRespDTO(business.getId(), business.getMileId3(), business.getMilestone3(), business.getPrice3()));
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotBlank(business.getMileId4())){
|
|
|
|
+ respDTOS.add(new ArchivesBusinessListRespDTO(business.getId(), business.getMileId4(), business.getMilestone4(), business.getPrice4()));
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotBlank(business.getMileId5())){
|
|
|
|
+ respDTOS.add(new ArchivesBusinessListRespDTO(business.getId(), business.getMileId5(), business.getMilestone5(), business.getPrice5()));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ result.setResult(respDTOS);
|
|
result.setSuccess(true);
|
|
result.setSuccess(true);
|
|
}
|
|
}
|
|
catch (Exception e) {
|
|
catch (Exception e) {
|