|
@@ -14,6 +14,8 @@ 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.ProArchivesMilestoneListReqDTO;
|
|
|
+import org.jeecg.common.dto.archives.ProArchivesMilestoneListRespDTO;
|
|
|
import org.jeecg.common.dto.archives.ProPlanListReqDTO;
|
|
|
import org.jeecg.common.dto.archives.ProPlanListRespDTO;
|
|
|
import org.jeecg.common.dto.basedata.ArchivesBusinessListReqDTO;
|
|
@@ -338,15 +340,14 @@ public class ProjectManageArchivesController {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "项目档案—商务收款计划", notes = "根据主表id查询项目档案计划列表")
|
|
|
+ @ApiOperation(value = "根据主表id与类型查询商务里程碑信息收付款条线列表", notes = "根据主表id和类型查询商务信息收付款条线列表")
|
|
|
@ApiImplicitParams({
|
|
|
- @ApiImplicitParam(name="id", value="项目档案id",required=true, dataType="String"),
|
|
|
- @ApiImplicitParam(name="planType", value="计划类型",required=true, dataType="String"),
|
|
|
- @ApiImplicitParam(name="pkOrg", value="组织",required=true, dataType="String")
|
|
|
+ @ApiImplicitParam(name="proArchivesId", value="项目档案主表id",required=true, dataType="String"),
|
|
|
+ @ApiImplicitParam(name="planType", value="计划类型 1.收款计划 2.回款情况 3.付款计划 4.付款情况",required=true, dataType="String"),
|
|
|
})
|
|
|
- @GetMapping(value = "/getBusinessList")
|
|
|
- public Result<List<ArchivesBusinessListRespDTO>> getBusinessList(@Valid ArchivesBusinessListReqDTO reqDTO, BindingResult bindingResult) {
|
|
|
- Result<List<ArchivesBusinessListRespDTO>> result = new Result<List<ArchivesBusinessListRespDTO>>();
|
|
|
+ @GetMapping(value = "/getLineList")
|
|
|
+ public Result<List<ProArchivesMilestoneListRespDTO>> get(@Valid ProArchivesMilestoneListReqDTO reqDTO, BindingResult bindingResult) {
|
|
|
+ Result<List<ProArchivesMilestoneListRespDTO>> result = new Result<List<ProArchivesMilestoneListRespDTO>>();
|
|
|
try {
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
if(bindingResult.hasErrors()) {
|
|
@@ -357,21 +358,48 @@ public class ProjectManageArchivesController {
|
|
|
}
|
|
|
QueryWrapper<ProjectManageArchivesAndBusiness> queryWrapper = new QueryWrapper<>();
|
|
|
queryWrapper.eq("del_flag", "0")
|
|
|
- .eq("pro_archives_id", reqDTO.getId());
|
|
|
- if(StringUtils.isNotBlank(reqDTO.getPlanType())){
|
|
|
- queryWrapper.eq("plan_type", reqDTO.getPlanType());
|
|
|
- }
|
|
|
- if(StringUtils.isNotBlank(reqDTO.getPkOrg())){
|
|
|
- queryWrapper.eq("pkOrg", reqDTO.getPkOrg());
|
|
|
+ .eq("pro_archives_id", reqDTO.getProArchivesId())
|
|
|
+ .eq("plan_type", reqDTO.getPlanType());
|
|
|
+ List<ProjectManageArchivesAndBusiness> list = projectManageArchivesAndBusinessService.list(queryWrapper);
|
|
|
+
|
|
|
+ List<ProArchivesMilestoneListRespDTO> respDTOS = Lists.newArrayList();
|
|
|
+ for(ProjectManageArchivesAndBusiness business : list){
|
|
|
+ respDTOS.add(new ProArchivesMilestoneListRespDTO(business.getId(), business.getPlanId(), business.getPlanName()));
|
|
|
}
|
|
|
- if(StringUtils.isNotBlank(reqDTO.getPlanId())){
|
|
|
- queryWrapper.eq("plan_id", reqDTO.getPlanId());
|
|
|
+
|
|
|
+ result.setResult(respDTOS);
|
|
|
+ result.setSuccess(true);
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ log.info(e.getMessage());
|
|
|
+ result.error500("操作失败");
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @ApiOperation(value = "根据id商务里程碑信息", notes = "根据主表id查询项目档案商务收款计划里程碑相关数据")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name="businessId", value="项目档案里程碑信息表id",required=true, dataType="String"),
|
|
|
+ })
|
|
|
+ @GetMapping(value = "/getMileNameById")
|
|
|
+ public Result<List<ArchivesBusinessListRespDTO>> getBusinessList(@Valid ArchivesBusinessListReqDTO reqDTO, BindingResult bindingResult) {
|
|
|
+ Result<List<ArchivesBusinessListRespDTO>> result = new Result<List<ArchivesBusinessListRespDTO>>();
|
|
|
+ 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.orderByAsc("sort");
|
|
|
- List<ProjectManageArchivesAndBusiness> list = projectManageArchivesAndBusinessService.list(queryWrapper);
|
|
|
+ QueryWrapper<ProjectManageArchivesAndBusiness> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.eq("del_flag", "0")
|
|
|
+ .eq("id", reqDTO.getBusinessId());
|
|
|
+ ProjectManageArchivesAndBusiness business = projectManageArchivesAndBusinessService.getOne(queryWrapper);
|
|
|
List<ArchivesBusinessListRespDTO> respDTOS = Lists.newArrayList();
|
|
|
- if(!CollectionUtils.isEmpty(list)){
|
|
|
- ProjectManageArchivesAndBusiness business = list.get(0);
|
|
|
+ if(business != null){
|
|
|
if(StringUtils.isNotBlank(business.getMileId1())){
|
|
|
respDTOS.add(new ArchivesBusinessListRespDTO(business.getId(), business.getMileId1(), business.getMilestone1(), business.getPrice1()));
|
|
|
}
|
|
@@ -389,8 +417,6 @@ public class ProjectManageArchivesController {
|
|
|
respDTOS.add(new ArchivesBusinessListRespDTO(business.getId(), business.getMileId5(), business.getMilestone5(), business.getPrice5()));
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
result.setResult(respDTOS);
|
|
|
result.setSuccess(true);
|
|
|
}
|
|
@@ -402,8 +428,6 @@ public class ProjectManageArchivesController {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* @desc 将计划列表转成树状结构
|
|
|
*/
|