| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | 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); |
| | | } |
| | | |
| | | |
| | | } |