|
|
@ -6,6 +6,7 @@ import com.spring.ifs.utils.IfsConverterToMap; |
|
|
import com.spring.ifs.utils.IfsPlsqlUtils; |
|
|
import com.spring.ifs.utils.IfsPlsqlUtils; |
|
|
import com.spring.modules.base.entity.WorkCenterCost; |
|
|
import com.spring.modules.base.entity.WorkCenterCost; |
|
|
import com.spring.modules.base.vo.PersonnelLevelVo; |
|
|
import com.spring.modules.base.vo.PersonnelLevelVo; |
|
|
|
|
|
import com.spring.modules.part.entity.APIEntity.PartIfsInventory; |
|
|
import com.spring.modules.part.vo.InventoryPartUnitCostSumVo; |
|
|
import com.spring.modules.part.vo.InventoryPartUnitCostSumVo; |
|
|
import com.spring.modules.part.vo.LocationInformationVo; |
|
|
import com.spring.modules.part.vo.LocationInformationVo; |
|
|
import com.spring.modules.part.vo.WorkCenterVo; |
|
|
import com.spring.modules.part.vo.WorkCenterVo; |
|
|
@ -493,4 +494,88 @@ public class BaseSearchApi { |
|
|
return technicalAttributes; |
|
|
return technicalAttributes; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @description: 按照时间获取所有域下的库存件信息 |
|
|
|
|
|
* @author LR |
|
|
|
|
|
* @date 2025/3/7 10:58 |
|
|
|
|
|
* @version 1.0 |
|
|
|
|
|
*/ |
|
|
|
|
|
public static List<PartIfsInventory> getInventoryParts(Server srv, String ifsRowVersion, int startIndex, int pageSize) throws APException { |
|
|
|
|
|
StringBuilder searchSql = new StringBuilder(); |
|
|
|
|
|
searchSql.append("SELECT OBJID ifsRowId, OBJVERSION ifsRowVersion, PART_NO, DESCRIPTION, CONTRACT, TYPE_CODE, PLANNER_BUYER,"); |
|
|
|
|
|
searchSql.append(" UNIT_MEAS, PRIME_COMMODITY, SECOND_COMMODITY, ASSET_CLASS, PART_STATUS, ABC_CLASS, FREQUENCY_CLASS, LIFECYCLE_STAGE,"); |
|
|
|
|
|
searchSql.append(" HAZARD_CODE, ACCOUNTING_GROUP, PART_PRODUCT_CODE, PART_PRODUCT_FAMILY, TYPE_DESIGNATION, DIM_QUALITY, CREATE_DATE,"); |
|
|
|
|
|
searchSql.append(" NOTE_TEXT, LEAD_TIME_CODE, PURCH_LEADTIME, MANUF_LEADTIME, EXPECTED_LEADTIME, DURABILITY_DAY, COUNTRY_OF_ORIGIN, REGION_OF_ORIGIN,"); |
|
|
|
|
|
searchSql.append(" SUPPLY_CODE, INVENTORY_VALUATION_METHOD, INVENTORY_PART_COST_LEVEL, INVOICE_CONSIDERATION, ZERO_COST_FLAG, PART_COST_GROUP_ID,"); |
|
|
|
|
|
searchSql.append(" STD_NAME_ID, ENG_ATTRIBUTE"); |
|
|
|
|
|
searchSql.append(" FROM ifsapp.INVENTORY_PART"); |
|
|
|
|
|
searchSql.append(" WHERE OBJVERSION >:ifsRowVersion"); |
|
|
|
|
|
|
|
|
|
|
|
//设置查询的入参 |
|
|
|
|
|
Map<String, String> inParam = new HashMap<>(); |
|
|
|
|
|
inParam.put("ifsRowVersion", ifsRowVersion); |
|
|
|
|
|
//添加排序语句 |
|
|
|
|
|
searchSql.append(" ORDER BY OBJVERSION ASC"); |
|
|
|
|
|
//添加分页的查询语句 |
|
|
|
|
|
searchSql.append(" OFFSET "+startIndex+" ROWS FETCH NEXT "+pageSize+" ROWS ONLY"); |
|
|
|
|
|
logger.info("库存件查询语句sql"+searchSql.toString()); |
|
|
|
|
|
//调用查询的通用方法 |
|
|
|
|
|
RecordCollection recordCollection = IfsPlsqlUtils.execSqlSearchGetRecordCollection(srv, searchSql, inParam); |
|
|
|
|
|
//判断能否返回 |
|
|
|
|
|
if (recordCollection == null) { |
|
|
|
|
|
return new ArrayList<>(); |
|
|
|
|
|
} else { |
|
|
|
|
|
List<PartIfsInventory> returnlList = new ArrayList<>(); |
|
|
|
|
|
//处理结果集 |
|
|
|
|
|
List<Map<String, String>> resultList = IfsConverterToMap.ConverterIfsToList(recordCollection); |
|
|
|
|
|
//获取数据转bean |
|
|
|
|
|
for (int i = 0; i < resultList.size(); i++) { |
|
|
|
|
|
Map<String, String> tempMap = resultList.get(i); |
|
|
|
|
|
PartIfsInventory tempItem = new PartIfsInventory(); |
|
|
|
|
|
//设置参数 |
|
|
|
|
|
tempItem.setIfsRowId(tempMap.get("IFSROWID")); |
|
|
|
|
|
tempItem.setIfsRowVersion(tempMap.get("IFSROWVERSION")); |
|
|
|
|
|
tempItem.setContract(tempMap.get("CONTRACT")); |
|
|
|
|
|
tempItem.setPartNo(tempMap.get("PART_NO")); |
|
|
|
|
|
tempItem.setPartDesc(tempMap.get("DESCRIPTION")); |
|
|
|
|
|
tempItem.setTypeCode(tempMap.get("TYPE_CODE")); |
|
|
|
|
|
tempItem.setPlannerBuyer(tempMap.get("PLANNER_BUYER")); |
|
|
|
|
|
tempItem.setUnitMeas(tempMap.get("UNIT_MEAS")); |
|
|
|
|
|
tempItem.setPrimeCommodity(tempMap.get("PRIME_COMMODITY")); |
|
|
|
|
|
tempItem.setSecondCommodity(tempMap.get("SECOND_COMMODITY")); |
|
|
|
|
|
tempItem.setAssetClass(tempMap.get("ASSET_CLASS")); |
|
|
|
|
|
tempItem.setPartStatus(tempMap.get("PART_STATUS")); |
|
|
|
|
|
tempItem.setAbcClass(tempMap.get("ABC_CLASS")); |
|
|
|
|
|
tempItem.setFrequencyClass(tempMap.get("FREQUENCY_CLASS")); |
|
|
|
|
|
tempItem.setLifecycleStage(tempMap.get("LIFECYCLE_STAGE")); |
|
|
|
|
|
tempItem.setHazardCode(tempMap.get("HAZARD_CODE")); |
|
|
|
|
|
tempItem.setAccountingGroup(tempMap.get("ACCOUNTING_GROUP")); |
|
|
|
|
|
tempItem.setPartProductCode(tempMap.get("PART_PRODUCT_CODE")); |
|
|
|
|
|
tempItem.setPartProductFamily(tempMap.get("PART_PRODUCT_FAMILY")); |
|
|
|
|
|
tempItem.setTypeDesignation(tempMap.get("TYPE_DESIGNATION")); |
|
|
|
|
|
tempItem.setDimQuality(tempMap.get("DIM_QUALITY")); |
|
|
|
|
|
tempItem.setNoteText(tempMap.get("NOTE_TEXT")); |
|
|
|
|
|
tempItem.setLeadTimeCode(tempMap.get("LEAD_TIME_CODE")); |
|
|
|
|
|
tempItem.setManufLeadtime(tempMap.get("MANUF_LEADTIME")); |
|
|
|
|
|
tempItem.setExpectedLeadtime(tempMap.get("EXPECTED_LEADTIME")); |
|
|
|
|
|
tempItem.setDurabilityDay(tempMap.get("DURABILITY_DAY")); |
|
|
|
|
|
tempItem.setCountryOfOrigin(tempMap.get("COUNTRY_OF_ORIGIN")); |
|
|
|
|
|
tempItem.setRegionOfOrigin(tempMap.get("REGION_OF_ORIGIN")); |
|
|
|
|
|
tempItem.setInventoryValuationMethod(tempMap.get("INVENTORY_VALUATION_METHOD")); |
|
|
|
|
|
tempItem.setInventoryPartCostLevel(tempMap.get("INVENTORY_PART_COST_LEVEL")); |
|
|
|
|
|
tempItem.setInvoiceConsideration(tempMap.get("INVOICE_CONSIDERATION")); |
|
|
|
|
|
tempItem.setZeroCostFlag(tempMap.get("ZERO_COST_FLAG")); |
|
|
|
|
|
tempItem.setPartCostGroupId(tempMap.get("PART_COST_GROUP_ID")); |
|
|
|
|
|
tempItem.setEngAttribute(tempMap.get("ENG_ATTRIBUTE")); |
|
|
|
|
|
String createdDate = tempMap.get("CREATE_DATE"); |
|
|
|
|
|
if (!(null == createdDate || "".equals(createdDate))){ |
|
|
|
|
|
tempItem.setCreatedDate(DateUtils.getStringToDate(createdDate, "yyyy-MM-dd HH:mm:ss")); |
|
|
|
|
|
} |
|
|
|
|
|
//添加对象 |
|
|
|
|
|
returnlList.add(tempItem); |
|
|
|
|
|
} |
|
|
|
|
|
return returnlList; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |