pad-仓库、后勤矩阵查询接口增加指令包内容
This commit is contained in:
parent
91517969c1
commit
abd4a76a35
|
|
@ -3,15 +3,15 @@ package com.nu.modules.biz.plan.invoicing.service.impl;
|
|||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.entity.CareDirectiveEntity;
|
||||
import com.nu.entity.DirectiveOrderEntity;
|
||||
import com.nu.entity.InvoicingDirectiveEntity;
|
||||
import com.nu.entity.*;
|
||||
import com.nu.modules.biz.datapool.service.IInvoicingDataPoolService;
|
||||
import com.nu.modules.biz.plan.care.entity.CareDirectivePlan;
|
||||
import com.nu.modules.biz.plan.invoicing.entity.InvoicingDirectivePlan;
|
||||
import com.nu.modules.biz.plan.invoicing.mapper.InvoicingDirectivePlanMapper;
|
||||
import com.nu.modules.biz.plan.invoicing.service.IInvoicingDirectivePlanService;
|
||||
import com.nu.modules.config.directivepackage.service.impl.DirectivePackageServiceImpl;
|
||||
import com.nu.modules.invoicing.api.IInvoicingDirectivePlanApi;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -20,6 +20,7 @@ import org.springframework.util.CollectionUtils;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元客户仓库类服务指令计划
|
||||
|
|
@ -32,6 +33,8 @@ public class InvoicingDirectivePlanServiceImpl extends ServiceImpl<InvoicingDire
|
|||
|
||||
@Autowired
|
||||
private IInvoicingDataPoolService dataPoolServiceImpl;
|
||||
@Autowired
|
||||
private DirectivePackageServiceImpl directivePackageService;
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getPlanList(InvoicingDirectiveEntity invoicingDirectiveEntity) {
|
||||
|
|
@ -39,6 +42,33 @@ public class InvoicingDirectivePlanServiceImpl extends ServiceImpl<InvoicingDire
|
|||
//服务指令计划
|
||||
invoicingDirectiveEntity.setQueryType("service");
|
||||
List<InvoicingDirectivePlan> groupList = baseMapper.list(invoicingDirectiveEntity);
|
||||
if (!CollectionUtils.isEmpty(groupList)) {
|
||||
//将包的指令塞进去(写一个sql效率低)
|
||||
CareDirectivePackageEntity queryParams = new CareDirectivePackageEntity();
|
||||
List<CareDirectivePackageEntity> ids = Lists.newArrayList();
|
||||
groupList.stream().forEach(item -> {
|
||||
CareDirectivePackageEntity d_ = new CareDirectivePackageEntity();
|
||||
if ("Y".equals(item.getIzPackage())) {
|
||||
d_.setId(item.getDirectiveId());
|
||||
ids.add(d_);
|
||||
}
|
||||
});
|
||||
List<CareDirectivePackageEntity> packagelist = directivePackageService.getNcPackagelist(queryParams, ids);
|
||||
if (!CollectionUtils.isEmpty(groupList)) {
|
||||
Map<String, CareDirectivePackageEntity> packageMap = packagelist.stream()
|
||||
.collect(Collectors.toMap(
|
||||
CareDirectivePackageEntity::getId,
|
||||
entity -> entity,
|
||||
(existing, replacement) -> existing
|
||||
));
|
||||
groupList.stream().forEach(item -> {
|
||||
if ("Y".equals(item.getIzPackage())) {
|
||||
List<DirectiveEntity> directives = packageMap.get(item.getDirectiveId()).getDirectives();
|
||||
item.setDirectivesList(BeanUtil.copyToList(directives, InvoicingDirectivePlan.class));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
resMap.put("serviceList", groupList);//服务指令计划
|
||||
|
||||
//即时指令
|
||||
|
|
|
|||
|
|
@ -3,16 +3,15 @@ package com.nu.modules.biz.plan.logistics.service.impl;
|
|||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.entity.CareDirectiveEntity;
|
||||
import com.nu.entity.DirectiveOrderEntity;
|
||||
import com.nu.entity.InvoicingDirectiveEntity;
|
||||
import com.nu.entity.LogisticsDirectiveEntity;
|
||||
import com.nu.entity.*;
|
||||
import com.nu.modules.biz.datapool.service.ILogisticsDataPoolService;
|
||||
import com.nu.modules.biz.plan.invoicing.entity.InvoicingDirectivePlan;
|
||||
import com.nu.modules.biz.plan.logistics.entity.LogisticsDirectivePlan;
|
||||
import com.nu.modules.biz.plan.logistics.mapper.LogisticsDirectivePlanMapper;
|
||||
import com.nu.modules.biz.plan.logistics.service.LogisticsDirectivePlanService;
|
||||
import com.nu.modules.config.directivepackage.service.impl.DirectivePackageServiceImpl;
|
||||
import com.nu.modules.logistics.api.ILogisticsDirectivePlanApi;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -21,6 +20,7 @@ import org.springframework.util.CollectionUtils;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 后勤服务指令计划
|
||||
|
|
@ -33,6 +33,8 @@ public class LogisticsDirectivePlanServiceImpl extends ServiceImpl<LogisticsDire
|
|||
|
||||
@Autowired
|
||||
private ILogisticsDataPoolService dataPoolServiceImpl;
|
||||
@Autowired
|
||||
private DirectivePackageServiceImpl directivePackageService;
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getPlanList(LogisticsDirectiveEntity logisticsDirectiveEntity) {
|
||||
|
|
@ -40,6 +42,33 @@ public class LogisticsDirectivePlanServiceImpl extends ServiceImpl<LogisticsDire
|
|||
//服务指令计划
|
||||
logisticsDirectiveEntity.setQueryType("service");
|
||||
List<LogisticsDirectivePlan> groupList = baseMapper.list(logisticsDirectiveEntity);
|
||||
if (!CollectionUtils.isEmpty(groupList)) {
|
||||
//将包的指令塞进去(写一个sql效率低)
|
||||
CareDirectivePackageEntity queryParams = new CareDirectivePackageEntity();
|
||||
List<CareDirectivePackageEntity> ids = Lists.newArrayList();
|
||||
groupList.stream().forEach(item -> {
|
||||
CareDirectivePackageEntity d_ = new CareDirectivePackageEntity();
|
||||
if ("Y".equals(item.getIzPackage())) {
|
||||
d_.setId(item.getDirectiveId());
|
||||
ids.add(d_);
|
||||
}
|
||||
});
|
||||
List<CareDirectivePackageEntity> packagelist = directivePackageService.getNcPackagelist(queryParams, ids);
|
||||
if (!CollectionUtils.isEmpty(groupList)) {
|
||||
Map<String, CareDirectivePackageEntity> packageMap = packagelist.stream()
|
||||
.collect(Collectors.toMap(
|
||||
CareDirectivePackageEntity::getId,
|
||||
entity -> entity,
|
||||
(existing, replacement) -> existing
|
||||
));
|
||||
groupList.stream().forEach(item -> {
|
||||
if ("Y".equals(item.getIzPackage())) {
|
||||
List<DirectiveEntity> directives = packageMap.get(item.getDirectiveId()).getDirectives();
|
||||
item.setDirectivesList(BeanUtil.copyToList(directives, LogisticsDirectivePlan.class));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
resMap.put("serviceList", groupList);//服务指令计划
|
||||
|
||||
//即时指令
|
||||
|
|
|
|||
Loading…
Reference in New Issue