合同项目关系修改
This commit is contained in:
parent
ff266a3cef
commit
729a202e63
@ -5,9 +5,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.SystemUser;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService;
|
||||
import com.zhgd.xmgl.modules.cost.entity.CostContract;
|
||||
import com.zhgd.xmgl.modules.cost.entity.CostContractPay;
|
||||
import com.zhgd.xmgl.modules.cost.entity.CostPayPlan;
|
||||
import com.zhgd.xmgl.modules.cost.mapper.CostContractPayMapper;
|
||||
import com.zhgd.xmgl.modules.cost.service.ICostContractPayService;
|
||||
import com.zhgd.xmgl.modules.cost.service.ICostContractService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -26,10 +29,16 @@ import java.util.stream.Collectors;
|
||||
public class CostContractPayServiceImpl extends ServiceImpl<CostContractPayMapper, CostContractPay> implements ICostContractPayService {
|
||||
|
||||
@Autowired
|
||||
private ISystemUserService systemUserService;
|
||||
private ICostContractService costContractService;
|
||||
|
||||
@Override
|
||||
public IPage<CostContractPay> pageList(Page page, Wrapper<CostContractPay> wrapper) {
|
||||
return baseMapper.pageList(page, wrapper);
|
||||
Page<CostContractPay> pageList = this.page(page, wrapper);
|
||||
List<CostContract> contractList = costContractService.list();
|
||||
for (CostContractPay record : pageList.getRecords()) {
|
||||
List<CostContract> contracts = contractList.stream().filter(s -> s.getId().toString().equals(record.getHtmc())).collect(Collectors.toList());
|
||||
record.setHtmcName(contracts.size() > 0 ? contracts.get(0).getHtmc() : "");
|
||||
}
|
||||
return pageList;
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,11 +6,13 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.SystemUser;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService;
|
||||
import com.zhgd.xmgl.modules.cost.dto.ContractPayOverviewDto;
|
||||
import com.zhgd.xmgl.modules.cost.entity.CostContract;
|
||||
import com.zhgd.xmgl.modules.cost.entity.CostContractPay;
|
||||
import com.zhgd.xmgl.modules.cost.entity.CostPayPlan;
|
||||
import com.zhgd.xmgl.modules.cost.entity.CostQuantity;
|
||||
import com.zhgd.xmgl.modules.cost.mapper.CostPayPlanMapper;
|
||||
import com.zhgd.xmgl.modules.cost.service.ICostContractPayService;
|
||||
import com.zhgd.xmgl.modules.cost.service.ICostContractService;
|
||||
import com.zhgd.xmgl.modules.cost.service.ICostPayPlanService;
|
||||
import com.zhgd.xmgl.modules.cost.service.ICostQuantityService;
|
||||
import com.zhgd.xmgl.modules.project.entity.Project;
|
||||
@ -34,8 +36,6 @@ import java.util.stream.Collectors;
|
||||
@Service
|
||||
public class CostPayPlanServiceImpl extends ServiceImpl<CostPayPlanMapper, CostPayPlan> implements ICostPayPlanService {
|
||||
|
||||
@Autowired
|
||||
private ICostQuantityService costQuantityService;
|
||||
|
||||
@Autowired
|
||||
private IProjectService projectService;
|
||||
@ -44,11 +44,17 @@ public class CostPayPlanServiceImpl extends ServiceImpl<CostPayPlanMapper, CostP
|
||||
private ICostContractPayService costContractPayService;
|
||||
|
||||
@Autowired
|
||||
private ISystemUserService systemUserService;
|
||||
private ICostContractService costContractService;
|
||||
|
||||
@Override
|
||||
public Page<CostPayPlan> pageList(Page page, Wrapper<CostPayPlan> wrapper) {
|
||||
return baseMapper.pageList(page, wrapper);
|
||||
Page<CostPayPlan> pageList = this.page(page, wrapper);
|
||||
List<CostContract> contractList = costContractService.list();
|
||||
for (CostPayPlan record : pageList.getRecords()) {
|
||||
List<CostContract> contracts = contractList.stream().filter(s -> s.getId().toString().equals(record.getHtmc())).collect(Collectors.toList());
|
||||
record.setHtmcName(contracts.size() > 0 ? contracts.get(0).getHtmc() : "");
|
||||
}
|
||||
return pageList;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user