From 4ffab9658f41f298372d771a2400d76455de3a7b Mon Sep 17 00:00:00 2001
From: rentaiming <806181062@qq.com>
Date: 星期三, 24 七月 2024 08:58:21 +0800
Subject: [PATCH] 森林防火 供应商管理

---
 ruoyi-modules/ruoyi-management/src/main/java/com/ruoyi/management/service/impl/InventoriesSuppliesServiceImpl.java |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/ruoyi-modules/ruoyi-management/src/main/java/com/ruoyi/management/service/impl/InventoriesSuppliesServiceImpl.java b/ruoyi-modules/ruoyi-management/src/main/java/com/ruoyi/management/service/impl/InventoriesSuppliesServiceImpl.java
index 8272827..a1c2e2b 100644
--- a/ruoyi-modules/ruoyi-management/src/main/java/com/ruoyi/management/service/impl/InventoriesSuppliesServiceImpl.java
+++ b/ruoyi-modules/ruoyi-management/src/main/java/com/ruoyi/management/service/impl/InventoriesSuppliesServiceImpl.java
@@ -29,6 +29,7 @@
 import com.ruoyi.system.api.domain.SysUser;
 import com.ruoyi.system.api.domain.WebsocketMessageDTO;
 import com.ruoyi.system.api.feignClient.SysUserClient;
+import io.swagger.models.auth.In;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -61,10 +62,10 @@
     @Override
     public PageDTO<InventoriesSuppliesVO> getInventoriesSuppliesList(InventoriesSuppliesQuery inventoriesSuppliesQuery) {
         LambdaQueryWrapper<SlStoreManagement> wrapper= Wrappers.lambdaQuery();
-        if (inventoriesSuppliesQuery.getStoreManagementName()!=null){
+        if (inventoriesSuppliesQuery.getStoreManagementName()!=null&&inventoriesSuppliesQuery.getStoreManagementName()!=""){
             wrapper.eq(SlStoreManagement::getStoreManagementName,inventoriesSuppliesQuery.getStoreManagementName());
         }
-        if (inventoriesSuppliesQuery.getStoreManagementNo()!=null){
+        if (inventoriesSuppliesQuery.getStoreManagementNo()!=null&&inventoriesSuppliesQuery.getStoreManagementNo()!=""){
         wrapper.eq(SlStoreManagement::getStoreManagementNo,inventoriesSuppliesQuery.getStoreManagementNo());
         }
         List<SlStoreManagement> slStoreManagements = slStoreManagementMapper.selectList(wrapper);
@@ -75,7 +76,9 @@
 
         Page<InventoriesSupplies> page = new Page<>(inventoriesSuppliesQuery.getPageCurr(), inventoriesSuppliesQuery.getPageSize());
         LambdaQueryWrapper< InventoriesSupplies> wrapper1= Wrappers.lambdaQuery();
-        wrapper1.like(InventoriesSupplies::getPdrName,inventoriesSuppliesQuery.getPdrName());
+        if (inventoriesSuppliesQuery.getPdrName()!=null&&inventoriesSuppliesQuery.getPdrName()!=""){
+            wrapper1.like(InventoriesSupplies::getPdrName,inventoriesSuppliesQuery.getPdrName());
+        }
         if (slStoreManagementIdList.size()>0){
             wrapper1.in(InventoriesSupplies::getMaterialsId,slStoreManagementIdList);
         }else {
@@ -87,7 +90,7 @@
 
             wrapper1.gt(InventoriesSupplies::getPdTime, inventoriesSuppliesQuery.getStartpdTime());
         }
-        if (inventoriesSuppliesQuery.getEndpdTime()!=null){
+        if (inventoriesSuppliesQuery.getEndpdTime()!=null&&inventoriesSuppliesQuery.getPdrName()!=""){
             wrapper1.le(InventoriesSupplies::getPdTime, inventoriesSuppliesQuery.getEndpdTime());
        }
 
@@ -124,6 +127,11 @@
         wrapper1.eq( SlVolumeProductionRk::getDelFlag,0);
         wrapper1.orderByDesc(SlVolumeProductionRk::getCreateTime);
         SlVolumeProductionRk page2 = slVolumeProductionRkMapper.selectOne(wrapper1);
+        if (page2.getSmerwmNum()>0){
+            Integer i=page2.getSmerwmNum()-1;
+            page2.setSmerwmNum(i);
+            slVolumeProductionRkMapper.updateById(page2);
+        }
         Map<String, Object> map = new ConcurrentHashMap<>();
         map.put("notification_type", NotificationTypeConstant.SCANCODES);
         map.put("SlVolumeProductionRk",page2);

--
Gitblit v1.7.1