Commit 0e22d7c5 by liyanlin

fix

parent 3d748923
...@@ -159,6 +159,9 @@ public class CostPlanDomain implements Serializable { ...@@ -159,6 +159,9 @@ public class CostPlanDomain implements Serializable {
private CostTemplate costTemplate; private CostTemplate costTemplate;
@TableField(exist = false) @TableField(exist = false)
private List<CostPlanTempDomain> costPlanTempDomainList;
@TableField(exist = false)
@ApiModelProperty("借还单 借还支付币种 -> 借支币种汇率") @ApiModelProperty("借还单 借还支付币种 -> 借支币种汇率")
private BigDecimal cur; private BigDecimal cur;
......
package com.blt.other.module.cost.controller; package com.blt.other.module.cost.controller;
import com.bailuntec.cost.api.dto.CostPlanTempDto; 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.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.request.GetAllCostPlanReq;
import com.blt.other.module.cost.dto.response.GetAllCostPlanResp; import com.blt.other.module.cost.dto.response.GetAllCostPlanResp;
import com.blt.other.module.cost.dto.response.GetCostPlanResp; import com.blt.other.module.cost.dto.response.GetCostPlanResp;
...@@ -116,4 +121,12 @@ public class CostPlanController { ...@@ -116,4 +121,12 @@ public class CostPlanController {
.contentType(MediaType.parseMediaType("application/octet-stream")) .contentType(MediaType.parseMediaType("application/octet-stream"))
.body(new InputStreamResource(inputStream)); .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; package com.blt.other.module.cost.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; 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.database.model.CostPlanDomain;
import com.blt.other.module.cost.model.CostDomain;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -26,4 +28,5 @@ public interface CostPlanDao extends BaseMapper<CostPlanDomain> { ...@@ -26,4 +28,5 @@ public interface CostPlanDao extends BaseMapper<CostPlanDomain> {
List<CostPlanDomain> selectAll(@Param("userId") Integer userId); List<CostPlanDomain> selectAll(@Param("userId") Integer userId);
Page<CostPlanDomain> queryPageFor4k(@Param("page") Page<Object> page);
} }
package com.blt.other.module.cost.service; 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.request.GetAllCostPlanReq;
import com.blt.other.module.cost.dto.response.GetAllCostPlanResp; import com.blt.other.module.cost.dto.response.GetAllCostPlanResp;
import com.blt.other.module.cost.dto.response.GetCostPlanResp; import com.blt.other.module.cost.dto.response.GetCostPlanResp;
...@@ -72,4 +73,10 @@ public interface CostPlanService { ...@@ -72,4 +73,10 @@ public interface CostPlanService {
* @return 费用计划详情 * @return 费用计划详情
*/ */
GetCostPlanResp getByPlanNo(String planNo); GetCostPlanResp getByPlanNo(String planNo);
/**
* 获取4k费用计划
* @return
*/
Page<CostPlanDomain> get4kCostPlan(Page page);
} }
...@@ -3,6 +3,8 @@ package com.blt.other.module.cost.service.impl.costplan; ...@@ -3,6 +3,8 @@ package com.blt.other.module.cost.service.impl.costplan;
import com.bailuntec.common.ListUtil; import com.bailuntec.common.ListUtil;
import com.bailuntec.common.StringUtils; import com.bailuntec.common.StringUtils;
import com.bailuntec.cost.api.dto.CostPlanDto; 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.common.exception.BizRuntimeException;
import com.blt.other.database.model.*; import com.blt.other.database.model.*;
import com.blt.other.module.auth.dao.UserDao; import com.blt.other.module.auth.dao.UserDao;
...@@ -204,6 +206,19 @@ public abstract class AbstractCostPlanService implements CostPlanService { ...@@ -204,6 +206,19 @@ public abstract class AbstractCostPlanService implements CostPlanService {
return result; 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) { protected CostDomain planToCost(String costPlanNo) {
CostDomain costDomain = new CostDomain(); CostDomain costDomain = new CostDomain();
......
...@@ -44,4 +44,11 @@ ...@@ -44,4 +44,11 @@
id DESC id DESC
</select> </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> </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