|
|
@ -26,6 +26,7 @@ import com.qs.serve.modules.tbs.entity.*; |
|
|
|
import com.qs.serve.modules.tbs.entity.bo.TbsAffairCommitBo; |
|
|
|
import com.qs.serve.modules.tbs.entity.bo.TbsCostApplyBo; |
|
|
|
import com.qs.serve.modules.tbs.entity.dto.TbsBudgetCostResult; |
|
|
|
import com.qs.serve.modules.tbs.entity.vo.CtpAffairVo; |
|
|
|
import com.qs.serve.modules.tbs.entity.vo.TbsBudgetTableVo; |
|
|
|
import com.qs.serve.modules.tbs.entity.vo.TbsCostApplyVo; |
|
|
|
import com.qs.serve.modules.tbs.service.*; |
|
|
@ -197,7 +198,7 @@ public class TbsCostApplyController { |
|
|
|
*/ |
|
|
|
@GetMapping("/pageMemberAffair") |
|
|
|
@SysLog(module = SystemModule.Budget, title = "费用申请", biz = BizType.DELETE) |
|
|
|
public R<?> pageMemberAffair(Integer state,Integer pageNum,Integer pageSize){ |
|
|
|
public R<PageVo<CtpAffairVo>> pageMemberAffair(Integer state,Integer pageNum,Integer pageSize){ |
|
|
|
SysUser sysUser = sysUserService.getById(AuthContextUtils.getSysUserId()); |
|
|
|
if(!StringUtils.hasText(sysUser.getSyUserId())||!StringUtils.hasText(sysUser.getSyAccount())){ |
|
|
|
return R.error("当前账号未绑定致远用户信息"); |
|
|
@ -214,20 +215,19 @@ public class TbsCostApplyController { |
|
|
|
if(ctpAffairs.size()>0){ |
|
|
|
List<String> costApplyIds = ctpAffairs.stream().map(CtpAffair::getCostApplyId).collect(Collectors.toList()); |
|
|
|
List<TbsCostApply> costApplyList = tbsCostApplyService.listByIds(costApplyIds); |
|
|
|
for (TbsCostApply costApply : costApplyList) { |
|
|
|
for (CtpAffair ctpAffair : ctpAffairs) { |
|
|
|
List<CtpAffairVo> result = new ArrayList<>(); |
|
|
|
for (CtpAffair ctpAffair : ctpAffairs) { |
|
|
|
CtpAffairVo ctpAffairVo = new CtpAffairVo(); |
|
|
|
for (TbsCostApply costApply : costApplyList) { |
|
|
|
if(costApply.getId().toString().equals(ctpAffair.getCostApplyId())){ |
|
|
|
costApply.setAffairId(ctpAffair.getAffairId()); |
|
|
|
ctpAffairVo.setCostApply(costApply); |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
ctpAffairVo.setAffairInfo(ctpAffair); |
|
|
|
result.add(ctpAffairVo); |
|
|
|
} |
|
|
|
PageVo<TbsCostApply> costApplyPageVo = new PageVo<>(); |
|
|
|
costApplyPageVo.setPageNum(pageVo.getPageNum()); |
|
|
|
costApplyPageVo.setPageSize(pageVo.getPageSize()); |
|
|
|
costApplyPageVo.setTotal(pageVo.getTotal()); |
|
|
|
costApplyPageVo.setTotalPage(pageVo.getTotalPage()); |
|
|
|
costApplyPageVo.setList(costApplyList); |
|
|
|
PageVo<CtpAffairVo> costApplyPageVo = PageVo.initNewList(pageVo,result); |
|
|
|
return R.ok(costApplyPageVo); |
|
|
|
} |
|
|
|
return R.byEmptyList(); |
|
|
|