EBOM-最新版反查
This commit is contained in:
parent
56c9ed0a66
commit
a9cf538ba9
|
|
@ -66,6 +66,8 @@ public interface BomNewEbomParentMapper extends BaseMapper<BomNewEbomParentEntit
|
|||
Integer checkIsUserRoot(@Param("materialNo")String materialNo, @Param("jobNo")String jobNo);
|
||||
|
||||
List<ReverseReportVO> eBomReverseReport(@Param("bomVersionRowId")Long bomVersionRowId,@Param("startDate") String startDate, @Param("endDate")String endDate, @Param("materialNo")String materialNo);
|
||||
|
||||
List<ReverseReportVO> eBomReverseReportNewst(@Param("materialNo")String materialNo);
|
||||
Integer getCountForWaitReviewByMaterialNo(@Param("materialNo") String materialNo);
|
||||
|
||||
void updateRootForWaitReview();
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ public class EBomQueryService {
|
|||
public List<ReverseReportVO> singleLevelReport(ReverseReportQuery queryParam) {
|
||||
Long bomVersionRowId=0L;
|
||||
//指定版本
|
||||
List<ReverseReportVO> vos=new ArrayList<>();
|
||||
if (queryParam.getVersionStrategy().equals(2)
|
||||
|| (queryParam.getVersionStrategy().equals(1) && StrUtil.isNotBlank(queryParam.getBomVersion()))) {
|
||||
BomNewEbomParentFormalEntity one = ebomParentFormalService.lambdaQuery()
|
||||
|
|
@ -64,6 +65,8 @@ public class EBomQueryService {
|
|||
.eq(BomNewEbomParentFormalEntity::getCurrentVersion, queryParam.getBomVersion())
|
||||
.one();
|
||||
bomVersionRowId = Objects.nonNull(one) ? one.getRowId() : 0L;
|
||||
|
||||
vos = ebomParentService.getBaseMapper().eBomReverseReport(bomVersionRowId, queryParam.getStartDate(), queryParam.getEndDate(), queryParam.getMaterialNo());
|
||||
}//最新版本
|
||||
else if (queryParam.getVersionStrategy().equals(0)) {
|
||||
BomNewEbomParentEntity one = ebomParentService.lambdaQuery()
|
||||
|
|
@ -73,8 +76,8 @@ public class EBomQueryService {
|
|||
if (Objects.nonNull(one)) {
|
||||
bomVersionRowId = one.getRowId();
|
||||
}
|
||||
vos = ebomParentService.getBaseMapper().eBomReverseReportNewst(queryParam.getMaterialNo());
|
||||
}
|
||||
List<ReverseReportVO> vos = ebomParentService.getBaseMapper().eBomReverseReport(bomVersionRowId, queryParam.getStartDate(), queryParam.getEndDate(), queryParam.getMaterialNo());
|
||||
if (CollUtil.isNotEmpty(vos)) {
|
||||
List<BaseMaterialVO> materialVOS = materialMainService.getMaterialBaseInfo(vos.stream().map(ReverseReportVO::getMaterialNo).collect(Collectors.toList()));
|
||||
vos.forEach(it -> {
|
||||
|
|
|
|||
|
|
@ -365,6 +365,13 @@
|
|||
and a.material_no =#{materialNo}
|
||||
</select>
|
||||
|
||||
<!--ebom单层反查-->
|
||||
<select id="eBomReverseReportNewst" resultType="com.nflg.product.bomnew.pojo.vo.ReverseReportVO">
|
||||
select b.* , a.drawing_no as childDrawingNo from t_bom_new_ebom_child a
|
||||
join t_bom_new_ebom_parent b on a.parent_row_id=b.row_id
|
||||
where a.material_no =#{materialNo} and b.status=4
|
||||
</select>
|
||||
|
||||
<select id="getCountForWaitReviewByMaterialNo" resultType="java.lang.Integer">
|
||||
select COUNT(1)
|
||||
from t_bom_new_ebom_child
|
||||
|
|
|
|||
Loading…
Reference in New Issue