|
@@ -14,6 +14,7 @@ import com.ruoyi.common.utils.wrapper.SqlField;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.util.List;
|
|
|
import java.util.Objects;
|
|
|
|
|
|
|
|
@@ -31,8 +32,7 @@ public class MaterialPreparationServiceImpl extends ServiceImpl<MaterialPreparat
|
|
|
@Autowired
|
|
|
private ProductInfoService productInfoService;
|
|
|
|
|
|
- @Override
|
|
|
- public Page<MaterialPreparationVo> getPage(MaterialPreparationSelectDto dto) {
|
|
|
+ private IWrapper<MaterialPreparation> getPageWrapper(MaterialPreparationSelectDto dto) {
|
|
|
IWrapper<MaterialPreparation> wrapper = getWrapper();
|
|
|
|
|
|
wrapper.eq(MaterialPreparation::getStatus, dto.getStatus());
|
|
@@ -54,10 +54,26 @@ public class MaterialPreparationServiceImpl extends ServiceImpl<MaterialPreparat
|
|
|
|
|
|
wrapper.orderByDesc("mp", MaterialPreparation::getCreateTime);
|
|
|
wrapper.orderByDesc("mp", MaterialPreparation::getId);
|
|
|
+ return wrapper;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Page<MaterialPreparationVo> getPage(MaterialPreparationSelectDto dto) {
|
|
|
+ IWrapper<MaterialPreparation> wrapper = getPageWrapper(dto);
|
|
|
|
|
|
Page<MaterialPreparationVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
|
|
|
|
|
|
return page;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<MaterialPreparationVo> getList(MaterialPreparationSelectDto dto) {
|
|
|
+ IWrapper<MaterialPreparation> wrapper = getPageWrapper(dto);
|
|
|
+
|
|
|
+ wrapper.in("mp", MaterialPreparation::getId, dto.getPreparationIdList());
|
|
|
+
|
|
|
+ return this.baseMapper.getList(wrapper);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|