第2批问题修复-物料查询

This commit is contained in:
luolm 2024-10-24 21:59:38 +08:00
parent 334dd5a393
commit 3f05eb4ac2
2 changed files with 6 additions and 4 deletions

View File

@ -336,7 +336,9 @@ public class BomReportApi extends BaseApi {
@PostMapping("queryMaterial") @PostMapping("queryMaterial")
@ApiOperation("物料查询") @ApiOperation("物料查询")
public ResultVO<Page<MaterialQueryResult>> materialQuery(@RequestBody MaterialQueryDTO queryParam){ public ResultVO<Page<MaterialQueryResult>> materialQuery(@RequestBody MaterialQueryDTO queryParam){
if(StrUtil.isNotBlank(queryParam.getDrawingNo())){
queryParam.setDrawingNo(StrUtil.replace(queryParam.getDrawingNo(),"*",""));
}
Page<MaterialQueryDTO> page = new PageVO<>(queryParam.getPage(), queryParam.getPageSize()); Page<MaterialQueryDTO> page = new PageVO<>(queryParam.getPage(), queryParam.getPageSize());
Page<MaterialQueryResult> result = materialMainService.getBaseMapper().queryMaterial(page , queryParam); Page<MaterialQueryResult> result = materialMainService.getBaseMapper().queryMaterial(page , queryParam);
//排序 //排序

View File

@ -217,13 +217,13 @@
</choose> </choose>
from t_material_main where 1=1 from t_material_main where 1=1
<if test="query.materialCategoryCode != null and query.materialCategoryCode != ''"> <if test="query.materialCategoryCode != null and query.materialCategoryCode != ''">
and material_category_code = #{query.materialCategoryCode} and material_category_code like concat( #{query.materialCategoryCode} ,'%')
</if> </if>
<if test="query.materialNo != null and query.materialNo != ''"> <if test="query.materialNo != null and query.materialNo != ''">
and material_no like concat(#{query.materialNo},'%') and material_no like concat('%', #{query.materialNo},'%')
</if> </if>
<if test="query.drawingNo != null and query.drawingNo != ''"> <if test="query.drawingNo != null and query.drawingNo != ''">
and drawing_no like concat(#{query.drawingNo},'%') and drawing_no like concat('%', #{query.drawingNo},'%')
</if> </if>
<if test="query.materialDesc != null and query.materialDesc != ''"> <if test="query.materialDesc != null and query.materialDesc != ''">
and material_desc like concat('%',#{query.materialDesc},'%') and material_desc like concat('%',#{query.materialDesc},'%')