| | |
| | | package com.aps.core.service.impl; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.alibaba.fastjson2.JSONArray; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.aps.common.core.utils.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | import com.aps.core.mapper.ApsMaterialStorageManagementMapper; |
| | | import com.aps.core.domain.ApsMaterialStorageManagement; |
| | |
| | | { |
| | | @Autowired |
| | | private ApsMaterialStorageManagementMapper apsMaterialStorageManagementMapper; |
| | | |
| | | @Autowired |
| | | public RedisTemplate redisTemplate; |
| | | /** |
| | | * 查询物料库存管理 |
| | | * |
| | |
| | | { |
| | | return apsMaterialStorageManagementMapper.deleteApsMaterialStorageManagementById(id); |
| | | } |
| | | |
| | | public ApsMaterialStorageManagement getRdsStorage(String plant,String itemCode){ |
| | | |
| | | JSONObject materialStorage = (JSONObject)redisTemplate.opsForValue().get("MaterialStorage:Material_"+plant+"_"+itemCode); |
| | | if(materialStorage!=null){ |
| | | ApsMaterialStorageManagement apsMaterialStorageManagement = new ApsMaterialStorageManagement(); |
| | | apsMaterialStorageManagement.setId(materialStorage.getString("id")); |
| | | apsMaterialStorageManagement.setItemNumber(materialStorage.getString("itemNumber")); |
| | | apsMaterialStorageManagement.setRemainderStock(materialStorage.getBigDecimal("remainderStock")); |
| | | apsMaterialStorageManagement.setVersion(materialStorage.getInteger("version")); |
| | | |
| | | return apsMaterialStorageManagement; |
| | | }else { |
| | | return null; |
| | | } |
| | | |
| | | } |
| | | } |