|
|
@@ -12,6 +12,7 @@ import cn.com.ctop.reimburse.mondule.service.IReimburseApplyService;
|
|
|
import cn.com.ctop.reimburse.mondule.service.IReimburseProjectService;
|
|
|
import cn.hutool.core.util.RandomUtil;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
@@ -115,8 +116,15 @@ public class ReimburseApplyServiceImpl extends ServiceImpl<ReimburseApplyMapper,
|
|
|
boolean isFinancialReview = false;
|
|
|
ReimburseApply apply = JSONObject.parseObject(data.toJSONString(), ReimburseApply.class);
|
|
|
Long id = apply.getId();
|
|
|
- List<String> ids = JSONObject.parseArray(data.getJSONArray("ids").toJSONString(), String.class);
|
|
|
- List<ReimburseProject> projects = projectService.getByIds(ids);
|
|
|
+ List<ReimburseProject> projects = null;
|
|
|
+ if (Check.isNull(data.getJSONArray("ids"))) {
|
|
|
+ QueryWrapper<ReimburseProject> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.eq("apply_id", id);
|
|
|
+ projects = projectService.list(queryWrapper);
|
|
|
+ } else {
|
|
|
+ List<String> ids = JSONObject.parseArray(data.getJSONArray("ids").toJSONString(), String.class);
|
|
|
+ projects = projectService.getByIds(ids);
|
|
|
+ }
|
|
|
if (!Check.isNull(projects)) {
|
|
|
Integer invoices = 0;
|
|
|
Double amount = 0.0;
|