From f600f38c6c23a282b61ed4db1b2da094d695276f Mon Sep 17 00:00:00 2001
From: zhangfeng <1603559716@qq.com>
Date: Fri, 25 Nov 2022 16:43:52 +0800
Subject: [PATCH] 安全物资和设备管理调整
---
equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/service/baseService/impl/SafeMaterialDetailInfoServiceImpl.java | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 51 insertions(+), 6 deletions(-)
diff --git a/equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/service/baseService/impl/SafeMaterialDetailInfoServiceImpl.java b/equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/service/baseService/impl/SafeMaterialDetailInfoServiceImpl.java
index 1107562..6a8537b 100644
--- a/equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/service/baseService/impl/SafeMaterialDetailInfoServiceImpl.java
+++ b/equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/service/baseService/impl/SafeMaterialDetailInfoServiceImpl.java
@@ -1,12 +1,11 @@
package com.gkhy.safePlatform.equipment.service.baseService.impl;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gkhy.safePlatform.commons.enums.ResultCodes;
-import com.gkhy.safePlatform.equipment.entity.SafeMaterialDetailBO;
-import com.gkhy.safePlatform.equipment.entity.SafeMaterialDetailInfo;
-import com.gkhy.safePlatform.equipment.entity.SafeMaterialDetailCountDO;
-import com.gkhy.safePlatform.equipment.entity.SafeMaterialDetailInfoDO;
+import com.gkhy.safePlatform.commons.utils.StringUtils;
+import com.gkhy.safePlatform.equipment.entity.*;
import com.gkhy.safePlatform.equipment.enums.IssueReceiptEnum;
import com.gkhy.safePlatform.equipment.enums.ValidStatusEnum;
import com.gkhy.safePlatform.equipment.excepiton.EquipmentException;
@@ -14,6 +13,7 @@
import com.gkhy.safePlatform.equipment.repository.SafeMaterialDetailInfoRepository;
import com.gkhy.safePlatform.equipment.service.baseService.SafeMaterialDetailInfoService;
import jodd.util.StringUtil;
+import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
@@ -77,8 +77,8 @@
}
@Override
- public void deleteBatch(Long[] ids) {
- if(ids.length == 0){
+ public void deleteBatch(List<Long> ids) {
+ if(CollectionUtils.isEmpty(ids)){
throw new EquipmentException(ResultCodes.CLIENT_PARAM_NULL);
}
repository.deleteBatch(ids);
@@ -143,5 +143,50 @@
repository.updateValidStatus(id,ValidStatusEnum.NO.getCode());
}
+ @Override
+ public List<Long> getRfidNotNullList(Integer count,Long smId) {
+ if(null == count || null == smId){
+ throw new EquipmentException(ResultCodes.CLIENT_PARAM_NULL);
+ }
+ return repository.getRfidNotNullList(count,smId);
+ }
+
+ @Override
+ public List<Long> getRfidNullList(Integer count,Long smId) {
+ if(null == count || null == smId){
+ throw new EquipmentException(ResultCodes.CLIENT_PARAM_NULL);
+ }
+ return repository.getRfidNullList(count,smId);
+ }
+
+ @Override
+ public List<Long> getIdListByRfid(Integer count, Long smId, String rfid) {
+ return repository.getIdListByRfid(count,smId,rfid);
+ }
+
+ @Override
+ public List<SafeMaterialClassifyStockDO> getSmallClassifyStockByIds(List<Long> smallClassifyIds) {
+ if(CollectionUtils.isEmpty(smallClassifyIds) ){
+ throw new EquipmentException(ResultCodes.CLIENT_PARAM_NULL);
+ }
+ return repository.getSmallClassifyStockByIds(smallClassifyIds);
+ }
+
+ @Override
+ public List<SafeMaterialDetailDO> getListBySmallClassifyIds(List<Long> smallClassifyIds,List<Long> depIds) {
+ if(CollectionUtils.isEmpty(smallClassifyIds) || CollectionUtils.isEmpty(depIds)){
+ throw new EquipmentException(ResultCodes.CLIENT_PARAM_NULL);
+ }
+ return repository.getListBySmallClassifyIds(smallClassifyIds,depIds);
+ }
+
+ @Override
+ public List<SafeMaterialDetailInfoDO> getListByRfids(List<String> rfids) {
+ if(CollectionUtils.isEmpty(rfids)){
+ throw new EquipmentException(ResultCodes.CLIENT_PARAM_NULL);
+ }
+ return repository.getListByRfids(rfids);
+ }
+
}
--
Gitblit v1.9.2