bom 选择
This commit is contained in:
parent
b280a73b4d
commit
b860ed2de6
|
|
@ -6,9 +6,11 @@ import com.nflg.product.base.core.api.BaseApi;
|
|||
import com.nflg.product.bomnew.pojo.query.ReverseReportQuery;
|
||||
import com.nflg.product.bomnew.pojo.vo.BomNewEbomParentVO;
|
||||
import com.nflg.product.bomnew.pojo.vo.ReverseReportVO;
|
||||
import com.nflg.product.bomnew.service.ForwardReportService;
|
||||
import com.nflg.product.bomnew.service.ReverseReportService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import nflg.product.common.constant.STATE;
|
||||
import nflg.product.common.vo.ResultVO;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
|
@ -17,6 +19,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@Api(tags = "BOM-报表接口")
|
||||
@RestController
|
||||
|
|
@ -26,6 +29,8 @@ public class BomReportApi extends BaseApi {
|
|||
@Resource
|
||||
ReverseReportService reverseReportService;
|
||||
|
||||
@Resource
|
||||
ForwardReportService forwardReportService;
|
||||
@PostMapping("reverseReport")
|
||||
@ApiOperation("bom-反查")
|
||||
public ResultVO<Page<ReverseReportVO>> reverseReport(@RequestBody ReverseReportQuery query) {
|
||||
|
|
@ -37,6 +42,19 @@ public class BomReportApi extends BaseApi {
|
|||
@PostMapping("forwardReport")
|
||||
@ApiOperation("bom-正查")
|
||||
public ResultVO<List<ReverseReportVO>> forwardReport(@RequestBody ReverseReportQuery query) {
|
||||
|
||||
if (Objects.isNull(query.getBomType())) {
|
||||
return ResultVO.error(STATE.ParamErr, "请选择BOM类型");
|
||||
}
|
||||
|
||||
if (Objects.isNull(query.getQueryType())) {
|
||||
return ResultVO.error(STATE.ParamErr, "请选择查询方式");
|
||||
}
|
||||
if (Objects.isNull(query.getBomVersion())) {
|
||||
return ResultVO.error(STATE.ParamErr, "请选择版本策略");
|
||||
}
|
||||
|
||||
forwardReportService.factoryBomType(query);
|
||||
return ResultVO.success();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ public class MBomApi extends BaseApi {
|
|||
if (Objects.isNull(dto.getRowId())) {
|
||||
throw new NflgBusinessException(STATE.ParamErr, "rowId 不能为空");
|
||||
}
|
||||
return ResultVO.success(bomNewMbomParentService.getChild(dto));
|
||||
return ResultVO.success(bomNewMbomParentService.getChild(dto));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@ public class ReportConstant {
|
|||
public enum BomTypeEnum implements ValueEnum<Integer> {
|
||||
|
||||
//BOM 类型 0-原始BOM 1-EBom 2-PBom 3-MBom
|
||||
ORIGINAL_BOM(0, "原始BOM"),
|
||||
E_BOM(1, "EBom"),
|
||||
P_BOM(2, "PBom"),
|
||||
M_BOM(3, "MBom");
|
||||
ORIGINALBOM(0, "原始BOM"),
|
||||
EBOM(1, "EBom"),
|
||||
PBOM(2, "PBom"),
|
||||
MBOM(3, "MBom");
|
||||
|
||||
private final Integer value;
|
||||
private final String description;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
package com.nflg.product.bomnew.service;
|
||||
|
||||
import com.nflg.product.bomnew.constant.ReportConstant;
|
||||
import com.nflg.product.bomnew.pojo.query.ReverseReportQuery;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
|
|
@ -8,5 +10,40 @@ public class ForwardReportService {
|
|||
|
||||
|
||||
|
||||
public void factoryBomType(ReverseReportQuery query){
|
||||
//原始BOM
|
||||
if (query.getBomType().compareTo(ReportConstant.BomTypeEnum.ORIGINALBOM.getValue()) == 0) {
|
||||
queryOriginalBom(query);
|
||||
}
|
||||
|
||||
//EBOM
|
||||
if (query.getBomType().compareTo(ReportConstant.BomTypeEnum.EBOM.getValue()) == 0) {
|
||||
queryEBom(query);
|
||||
}
|
||||
|
||||
//PBOM
|
||||
if (query.getBomType().compareTo(ReportConstant.BomTypeEnum.PBOM.getValue()) == 0) {
|
||||
queryPBom(query);
|
||||
}
|
||||
//MBOM
|
||||
if (query.getBomType().compareTo(ReportConstant.BomTypeEnum.MBOM.getValue()) == 0) {
|
||||
queryMBom(query);
|
||||
}
|
||||
}
|
||||
|
||||
void queryOriginalBom(ReverseReportQuery query){
|
||||
|
||||
}
|
||||
|
||||
|
||||
void queryEBom(ReverseReportQuery query){
|
||||
|
||||
}
|
||||
|
||||
void queryPBom(ReverseReportQuery query){
|
||||
|
||||
}
|
||||
void queryMBom(ReverseReportQuery query){
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue