Commit 0e22d7c5 by liyanlin

fix

parent 3d748923
......@@ -159,6 +159,9 @@ public class CostPlanDomain implements Serializable {
private CostTemplate costTemplate;
@TableField(exist = false)
private List<CostPlanTempDomain> costPlanTempDomainList;
@TableField(exist = false)
@ApiModelProperty("借还单 借还支付币种 -> 借支币种汇率")
private BigDecimal cur;
......
package com.blt.other.module.cost.controller;
import com.bailuntec.cost.api.dto.CostPlanTempDto;
import com.bailuntec.cost.api.response.CostResult;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.blt.other.common.annotation.LoginIgnore;
import com.blt.other.common.util.CurUtils;
import com.blt.other.database.model.CostLogDomain;
import com.blt.other.database.model.CostPlanDomain;
import com.blt.other.module.cost.dto.request.GetAllCostPlanReq;
import com.blt.other.module.cost.dto.response.GetAllCostPlanResp;
import com.blt.other.module.cost.dto.response.GetCostPlanResp;
......@@ -116,4 +121,12 @@ public class CostPlanController {
.contentType(MediaType.parseMediaType("application/octet-stream"))
.body(new InputStreamResource(inputStream));
}
@LoginIgnore
@ApiOperation("获取4k费用计划数据")
@GetMapping("/costPlanFor4k/{pageSize}/{pageNum}")
public Page<CostPlanDomain> getCostLogFor4k(@PathVariable("pageSize") long pageSize,
@PathVariable("pageNum") long pageNum) {
return costPlanService.get4kCostPlan(new Page(pageNum, pageSize));
}
}
package com.blt.other.module.cost.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.blt.other.database.model.CostPlanDomain;
import com.blt.other.module.cost.model.CostDomain;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -26,4 +28,5 @@ public interface CostPlanDao extends BaseMapper<CostPlanDomain> {
List<CostPlanDomain> selectAll(@Param("userId") Integer userId);
Page<CostPlanDomain> queryPageFor4k(@Param("page") Page<Object> page);
}
package com.blt.other.module.cost.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.blt.other.module.cost.dto.request.GetAllCostPlanReq;
import com.blt.other.module.cost.dto.response.GetAllCostPlanResp;
import com.blt.other.module.cost.dto.response.GetCostPlanResp;
......@@ -72,4 +73,10 @@ public interface CostPlanService {
* @return 费用计划详情
*/
GetCostPlanResp getByPlanNo(String planNo);
/**
* 获取4k费用计划
* @return
*/
Page<CostPlanDomain> get4kCostPlan(Page page);
}
......@@ -3,6 +3,8 @@ package com.blt.other.module.cost.service.impl.costplan;
import com.bailuntec.common.ListUtil;
import com.bailuntec.common.StringUtils;
import com.bailuntec.cost.api.dto.CostPlanDto;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.blt.other.common.exception.BizRuntimeException;
import com.blt.other.database.model.*;
import com.blt.other.module.auth.dao.UserDao;
......@@ -204,6 +206,19 @@ public abstract class AbstractCostPlanService implements CostPlanService {
return result;
}
@Override
public Page<CostPlanDomain> get4kCostPlan(Page page){
Page<CostPlanDomain> costPlanDomainPage = costPlanDao.queryPageFor4k(page);
costPlanDomainPage.getRecords().forEach(costPlanDomain -> {
List<CostPlanTempDomain> costPlanTempDomainList = costPlanTempDao.selectList(new LambdaQueryWrapper<CostPlanTempDomain>()
.eq(CostPlanTempDomain::getCostPlanNo,costPlanDomain.getCostPlanNo()));
if(costPlanTempDomainList != null){
costPlanDomain.setCostPlanTempDomainList(costPlanTempDomainList);
}
});
return costPlanDomainPage;
}
protected CostDomain planToCost(String costPlanNo) {
CostDomain costDomain = new CostDomain();
......
......@@ -44,4 +44,11 @@
id DESC
</select>
<select id="queryPageFor4k" resultType="com.blt.other.database.model.CostPlanDomain">
select cp.* from cost_plan cp
left join oa_user ou on ou.oa_user_id = cp.create_userid
where ou.company_id in(18, 27, 32)
order by cp.id desc
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment