From 6099e462457eb166a740081067e06629c5bdd9fb Mon Sep 17 00:00:00 2001 From: jing's Date: Mon, 1 Jan 2024 21:25:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nflg/product/bomnew/api/user/MBomApi.java | 12 +++++++++ .../service/BomNewMbomDetailService.java | 26 ++++++++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/api/user/MBomApi.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/api/user/MBomApi.java index 431c3f7f..fdc37164 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/api/user/MBomApi.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/api/user/MBomApi.java @@ -6,6 +6,7 @@ import com.nflg.product.base.core.api.BaseApi; import com.nflg.product.base.core.exception.NflgBusinessException; import com.nflg.product.bomnew.constant.MBomConstantEnum; import com.nflg.product.bomnew.pojo.query.BomNewMbomParentQuery; +import com.nflg.product.bomnew.pojo.vo.BomNewMbomDetailVO; import com.nflg.product.bomnew.pojo.vo.BomNewMbomParentVO; import com.nflg.product.bomnew.service.BomNewMbomDetailService; import com.nflg.product.bomnew.service.BomNewMbomParentService; @@ -18,6 +19,7 @@ import nflg.product.common.vo.ResultVO; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import java.util.List; import java.util.Objects; /** @@ -55,6 +57,16 @@ public class MBomApi extends BaseApi { } + @PostMapping("superSaterialList") + @ApiOperation("设置超级物料列表") + public ResultVO> superSaterialList(@RequestParam(value = "rowId") Long rowId ) { + if (Objects.isNull(rowId)) { + throw new NflgBusinessException(STATE.ParamErr, "选择行后操作"); + } + + return ResultVO.success(bomNewMbomDetailService.superSaterialList(rowId)); + } + @PostMapping("superSaterialStatus") @ApiOperation("设置超级物料") diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewMbomDetailService.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewMbomDetailService.java index 05e14b55..f482e378 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewMbomDetailService.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewMbomDetailService.java @@ -2,6 +2,8 @@ package com.nflg.product.bomnew.service; import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.convert.Convert; +import cn.hutool.core.lang.TypeReference; import cn.hutool.core.util.StrUtil; import cn.hutool.extra.spring.SpringUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; @@ -12,6 +14,7 @@ import com.nflg.product.bomnew.constant.MBomConstantEnum; import com.nflg.product.bomnew.mapper.master.BomNewMbomDetailMapper; import com.nflg.product.bomnew.pojo.entity.BomNewMbomDetailEntity; import com.nflg.product.bomnew.pojo.entity.BomNewMbomParentEntity; +import com.nflg.product.bomnew.pojo.vo.BomNewMbomDetailVO; import nflg.product.common.constant.STATE; import org.springframework.stereotype.Service; @@ -30,6 +33,28 @@ import java.util.Objects; public class BomNewMbomDetailService extends ServiceImpl { + + + + + + + + +public List superSaterialList(Long rowId){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(BomNewMbomDetailEntity::getParentRowId,rowId); + List list= this.list(queryWrapper); + List voList= Convert.convert(new TypeReference>() { + } ,list); + + return voList; +} + + + + + /** * 超级物料标签 *

@@ -45,7 +70,6 @@ public class BomNewMbomDetailService extends ServiceImpl