|
|
@ -332,6 +332,49 @@ public class InventoryPartApi{ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @description: 查询PLM需要的参数 |
|
|
|
|
|
* @author LR |
|
|
|
|
|
* @date 2026/3/18 17:48 |
|
|
|
|
|
* @version 1.0 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
public static PartIfsInventoryConfig getInventoryPartCost(Server srv, String contract, String partNo) throws APException { |
|
|
|
|
|
//公共参数 |
|
|
|
|
|
StringBuilder searchSql = new StringBuilder(); |
|
|
|
|
|
searchSql.append("SELECT CONTRACT, PART_NO partNo, CONFIGURATION_ID, CONFIGURATION_ID, OBJID ifsRowId, OBJVERSION ifsRowVersion"); |
|
|
|
|
|
searchSql.append(" FROM ifsapp.INVENTORY_PART_CONFIG"); |
|
|
|
|
|
searchSql.append(" WHERE CONTRACT = :contract AND PART_NO = :partNo AND CONFIGURATION_ID = :configurationId"); |
|
|
|
|
|
//设置查询的入参 |
|
|
|
|
|
Map<String, String> inParam = new HashMap<>(); |
|
|
|
|
|
inParam.put("contract", contract); |
|
|
|
|
|
inParam.put("partNo", partNo); |
|
|
|
|
|
inParam.put("configurationId", "*");//目前填写固定值 |
|
|
|
|
|
//调用查询的通用方法 |
|
|
|
|
|
RecordCollection recordCollection = IfsPlsqlUtils.execSqlSearchGetRecordCollection(srv, searchSql, inParam); |
|
|
|
|
|
//判断能否返回 |
|
|
|
|
|
if (recordCollection == null) { |
|
|
|
|
|
return null; |
|
|
|
|
|
} else { |
|
|
|
|
|
Record recordData = recordCollection.get(0); |
|
|
|
|
|
Map<String, String> resultMap = IfsConverterToMap.ConverterIfsToMap(recordData); |
|
|
|
|
|
//判断是否存在 |
|
|
|
|
|
if(null == resultMap || resultMap.size() == 0){ |
|
|
|
|
|
return null; |
|
|
|
|
|
}else { |
|
|
|
|
|
//解析数据 |
|
|
|
|
|
PartIfsInventoryConfig tempPart = new PartIfsInventoryConfig(); |
|
|
|
|
|
tempPart.setContract(resultMap.get("CONTRACT")); |
|
|
|
|
|
tempPart.setPartNo(resultMap.get("PART_NO")); // |
|
|
|
|
|
tempPart.setIfsRowId(resultMap.get("IFSROWID")); |
|
|
|
|
|
tempPart.setIfsRowVersion(resultMap.get("IFSROWVERSION")); |
|
|
|
|
|
tempPart.setConfigurationId(resultMap.get("CONFIGURATION_ID")); |
|
|
|
|
|
tempPart.setEstimatedMaterialCost(resultMap.get("ESTIMATED_MATERIAL_COST")); |
|
|
|
|
|
return tempPart; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @description: 修改库存件的cost的信息 |
|
|
* @description: 修改库存件的cost的信息 |
|
|
* @author LR |
|
|
* @author LR |
|
|
|