|
|
|
@ -700,4 +700,39 @@ public class BaseSearchApi { |
|
|
|
return returnlList; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @description: 获取库存件的预估成本 |
|
|
|
* @author HP |
|
|
|
* @date 2025-12-19 16:25 |
|
|
|
* @version 1.0 |
|
|
|
*/ |
|
|
|
public static InventoryPartUnitCostSumVo getInventoryEstimatedMaterialCostByPartNo(Server srv, String contract, String partNo) throws APException { |
|
|
|
StringBuilder searchSql = new StringBuilder(); |
|
|
|
searchSql.append("SELECT OBJID ifsRowId, OBJVERSION ifsRowVersion, CONTRACT site, PART_NO, CONFIGURATION_ID, ESTIMATED_MATERIAL_COST"); |
|
|
|
searchSql.append(" FROM ifsapp.INVENTORY_PART_CONFIG ipc"); |
|
|
|
searchSql.append(" WHERE ipc.CONTRACT = :contract AND ipc.PART_NO = :partNo AND ipc.CONFIGURATION_ID = '*'"); |
|
|
|
//设置查询的入参 |
|
|
|
Map<String, String> inParam = new HashMap<>(); |
|
|
|
inParam.put("contract", contract); |
|
|
|
inParam.put("partNo", partNo); |
|
|
|
//调用查询的通用方法 |
|
|
|
RecordCollection recordCollection = IfsPlsqlUtils.execSqlSearchGetRecordCollection(srv, searchSql, inParam); |
|
|
|
//判断能否返回 |
|
|
|
if (recordCollection == null) { |
|
|
|
return null; |
|
|
|
} else { |
|
|
|
//调用通用的处理方法 返回Map |
|
|
|
Map<String, String> resultMap = IfsConverterToMap.ConverterIfsToMap(recordCollection.get(0)); |
|
|
|
InventoryPartUnitCostSumVo resultRow = new InventoryPartUnitCostSumVo(); |
|
|
|
//设置参数 |
|
|
|
resultRow.setIfsRowId(resultMap.get("IFSROWID")); |
|
|
|
resultRow.setIfsRowVersion(resultMap.get("IFSROWVERSION")); |
|
|
|
resultRow.setSite(resultMap.get("SITE")); |
|
|
|
resultRow.setPartNo(resultMap.get("PART_NO")); |
|
|
|
resultRow.setConfigurationId(resultMap.get("CONFIGURATION_ID")); |
|
|
|
resultRow.setEstimatedMaterialCost(resultMap.get("ESTIMATED_MATERIAL_COST")); |
|
|
|
return resultRow; |
|
|
|
} |
|
|
|
} |
|
|
|
} |