| | |
| | | package com.aps.core.service.impl; |
| | | |
| | | import com.alibaba.fastjson2.JSONArray; |
| | | import com.aps.common.core.utils.DateUtils; |
| | | import com.aps.core.domain.ApsBom; |
| | | import com.aps.core.domain.ApsBomHeader; |
| | |
| | | build.setOrgCode(apsBomHeader.getOrgCode()); |
| | | bomLineList = apsBomMapper.selectApsBomList(build); |
| | | } |
| | | // JSONArray jsonArray = (JSONArray)redisTemplate.opsForValue().get("BOM:BOM_"+plant+"_"+itemNumber); |
| | | // for (int i = 0; i < jsonArray.size(); i++){ |
| | | // ApsBom apsBom = jsonArray.getJSONObject(i).to(ApsBom.class); |
| | | // bomLineList.add(apsBom); |
| | | // } |
| | | |
| | | return bomLineList; |
| | | } |
| | | |
| | | @Override |
| | | public List<ApsBom> selectRdsBomLineList(String plant, String itemNumber) |
| | | { |
| | | List<ApsBom> bomLineList =new ArrayList<>(); |
| | | JSONArray jsonArray = (JSONArray)redisTemplate.opsForValue().get("BOM:BOM_"+plant+"_"+itemNumber); |
| | | if (jsonArray != null && !jsonArray.isEmpty()) { |
| | | for (int i = 0; i < jsonArray.size(); i++){ |
| | | ApsBom apsBom = jsonArray.getJSONObject(i).to(ApsBom.class); |
| | | bomLineList.add(apsBom); |
| | | } |
| | | } |
| | | return bomLineList; |
| | | } |
| | | } |