|
|
|
@ -14,6 +14,7 @@ import cn.iocoder.yudao.module.mes.dal.dataobject.workreportplan.WorkReportPlanD
|
|
|
|
import cn.iocoder.yudao.module.mes.dal.mysql.workreportplan.ReportPlanSummaryMapper;
|
|
|
|
import cn.iocoder.yudao.module.mes.dal.mysql.workreportplan.ReportPlanSummaryMapper;
|
|
|
|
import cn.iocoder.yudao.module.mes.dal.mysql.workreportplan.ReportPlanViewMapper;
|
|
|
|
import cn.iocoder.yudao.module.mes.dal.mysql.workreportplan.ReportPlanViewMapper;
|
|
|
|
import cn.iocoder.yudao.module.mes.dal.mysql.workreportplan.WorkReportPlanMapper;
|
|
|
|
import cn.iocoder.yudao.module.mes.dal.mysql.workreportplan.WorkReportPlanMapper;
|
|
|
|
|
|
|
|
import cn.iocoder.yudao.module.mes.service.organization.OrganizationService;
|
|
|
|
import cn.iocoder.yudao.module.mes.service.plan.PlanService;
|
|
|
|
import cn.iocoder.yudao.module.mes.service.plan.PlanService;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
@ -47,6 +48,8 @@ public class WorkReportPlanServiceImpl implements WorkReportPlanService {
|
|
|
|
private PlanService planService;
|
|
|
|
private PlanService planService;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private ReportPlanSummaryMapper planSummaryMapper;
|
|
|
|
private ReportPlanSummaryMapper planSummaryMapper;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private OrganizationService organizationService;
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public Long createWorkReportPlan(WorkReportPlanSaveReqVO createReqVO) {
|
|
|
|
public Long createWorkReportPlan(WorkReportPlanSaveReqVO createReqVO) {
|
|
|
|
// 插入
|
|
|
|
// 插入
|
|
|
|
@ -156,6 +159,7 @@ public class WorkReportPlanServiceImpl implements WorkReportPlanService {
|
|
|
|
convertSet(list, ReportPlanSummaryDO::getProductId));
|
|
|
|
convertSet(list, ReportPlanSummaryDO::getProductId));
|
|
|
|
Map<Long, PlanDO> planMap = planService.getPlanMap(
|
|
|
|
Map<Long, PlanDO> planMap = planService.getPlanMap(
|
|
|
|
convertSet(list, ReportPlanSummaryDO::getPlanId));
|
|
|
|
convertSet(list, ReportPlanSummaryDO::getPlanId));
|
|
|
|
|
|
|
|
|
|
|
|
return BeanUtils.toBean(list, ReportPlanSummaryRespVO.class, item -> {
|
|
|
|
return BeanUtils.toBean(list, ReportPlanSummaryRespVO.class, item -> {
|
|
|
|
MapUtils.findAndThen(map, item.getProductId(),
|
|
|
|
MapUtils.findAndThen(map, item.getProductId(),
|
|
|
|
product -> item.setProductName(product.getName()));
|
|
|
|
product -> item.setProductName(product.getName()));
|
|
|
|
|