Browse Source

merge baseInfoCOntroller

hill.liu 8 months ago
parent
commit
48025d77da

+ 11 - 1
src/main/java/com/sy/coinage/workshop/controller/BaseInfoController.java

@@ -70,8 +70,18 @@ public class BaseInfoController extends BaseController {
         queryWrapper.gt(BaseInfo::getId, 0); // 没条件时 排序生效
         queryWrapper.gt(BaseInfo::getId, 0); // 没条件时 排序生效
         queryWrapper.eq(req.getDeptId() != null && req.getDeptId() > 0, BaseInfo::getDeptId,
         queryWrapper.eq(req.getDeptId() != null && req.getDeptId() > 0, BaseInfo::getDeptId,
                 req.getDeptId());
                 req.getDeptId());
+        if (req.getQualityStatus() != null && req.getQualityStatus() > 0) {
+            if (req.getQualityStatus().intValue() == 1) {
+                queryWrapper.and(qw -> {
+                    qw.eq(BaseInfo::getQualityStatus, req.getQualityStatus())
+                            .or().isNull(BaseInfo::getQualityStatus);
+                });
+            } else {
+                queryWrapper.eq(BaseInfo::getQualityStatus, req.getQualityStatus());
+            }
+        }
         queryWrapper.eq(req.getLocWareId() != null && req.getLocWareId() > 0,
         queryWrapper.eq(req.getLocWareId() != null && req.getLocWareId() > 0,
-            BaseInfo::getLocWareId, req.getLocWareId());
+                BaseInfo::getLocWareId, req.getLocWareId());
         queryWrapper.eq(req.getSecuritiesId() != null && req.getSecuritiesId() > 0, BaseInfo::getSecuritiesId, req.getSecuritiesId());
         queryWrapper.eq(req.getSecuritiesId() != null && req.getSecuritiesId() > 0, BaseInfo::getSecuritiesId, req.getSecuritiesId());
         if (req.getStartDate() != null) {
         if (req.getStartDate() != null) {
             queryWrapper.ge(BaseInfo::getWeightDate, DateUtils.getDayStartTime(req.getStartDate()));
             queryWrapper.ge(BaseInfo::getWeightDate, DateUtils.getDayStartTime(req.getStartDate()));