fix(ebom): 修复精确搜索的bug
This commit is contained in:
parent
76b549fdeb
commit
1011bda857
|
|
@ -2223,13 +2223,17 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
|||
query.setPage(1L);
|
||||
query.setPageSize(20L);
|
||||
}
|
||||
Page<BomNewEbomParentVO> result = this.getBaseMapper().workDetailsListByPageNew(new Page<>(query.getPage()
|
||||
, query.getPageSize()), query, userRoleService.getUserJob(), SessionUtil.getUserCode(), SessionUtil.getDepartRowId());
|
||||
Page<BomNewEbomParentVO> result;
|
||||
if (StrUtil.isBlank(query.getMaterialNo()) && StrUtil.isBlank(query.getDrawingNo())) {
|
||||
result = this.getBaseMapper().workDetailsListByPageNew(new Page<>(query.getPage()
|
||||
, query.getPageSize()), query, userRoleService.getUserJob(), SessionUtil.getUserCode(), SessionUtil.getDepartRowId());
|
||||
//列表搜索
|
||||
materialMainService.intiMaterialInfo(result.getRecords(), EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT);
|
||||
return result;
|
||||
}
|
||||
query.setShowMySelfOnly(0);
|
||||
result = this.getBaseMapper().workDetailsListByPageNew(new Page<>(query.getPage()
|
||||
, query.getPageSize()), query, userRoleService.getUserJob(), SessionUtil.getUserCode(), SessionUtil.getDepartRowId());
|
||||
//根据编号或图号搜索
|
||||
//从顶级开始查找
|
||||
List<BomNewEbomParentVO> roots = result.getRecords().stream()
|
||||
|
|
|
|||
|
|
@ -457,12 +457,14 @@
|
|||
, b.*
|
||||
FROM t_bom_new_ebom_child b
|
||||
LEFT JOIN t_bom_new_ebom_parent a ON a.material_no = b.material_no
|
||||
<if test="materialNo!=null and materialNo!=''">
|
||||
WHERE b.material_no = #{materialNo}
|
||||
</if>
|
||||
<if test="drawingNo!=null and drawingNo!=''">
|
||||
WHERE b.drawingNo = #{drawingNo}
|
||||
</if>
|
||||
<where>
|
||||
<if test="materialNo!=null and materialNo!=''">
|
||||
AND b.material_no = #{materialNo}
|
||||
</if>
|
||||
<if test="drawingNo!=null and drawingNo!=''">
|
||||
AND b.drawing_no = #{drawingNo}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY b.order_number
|
||||
</select>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue