密炼生产计划优化
This commit is contained in:
@@ -34,11 +34,22 @@ public class MesMaterialController extends JeecgController<MesMaterial, IMesMate
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
@RequestParam(name = "onlySales", required = false) Integer onlySales,
|
||||
@RequestParam(name = "excludeProductionFB1", required = false) Integer excludeProductionFB1,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<MesMaterial> queryWrapper = QueryGenerator.initQueryWrapper(model, req.getParameterMap());
|
||||
if (onlySales != null && onlySales == 1) {
|
||||
queryWrapper.and(w -> w.isNull("material_phase").or().eq("material_phase", ""));
|
||||
}
|
||||
if (excludeProductionFB1 != null && excludeProductionFB1 == 1) {
|
||||
queryWrapper.and(
|
||||
w ->
|
||||
w.and(p -> p.isNull("material_phase").or().notLikeRight("material_phase", "F"))
|
||||
.and(p -> p.isNull("material_phase").or().notLikeRight("material_phase", "B1"))
|
||||
.and(c -> c.isNull("material_code").or().notLikeRight("material_code", "F"))
|
||||
.and(c -> c.isNull("material_code").or().notLikeRight("material_code", "B1"))
|
||||
.and(n -> n.isNull("material_name").or().notLikeRight("material_name", "F"))
|
||||
.and(n -> n.isNull("material_name").or().notLikeRight("material_name", "B1")));
|
||||
}
|
||||
IPage<MesMaterial> pageList = mesMaterialService.page(new Page<>(pageNo, pageSize), queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user