|
|
@ -33,8 +33,8 @@ public class InventoryPartApi{ |
|
|
*/ |
|
|
*/ |
|
|
public static Map<String, String> getInventoryPartByPartNo(Server srv, String contract, String partNo) throws APException { |
|
|
public static Map<String, String> getInventoryPartByPartNo(Server srv, String contract, String partNo) throws APException { |
|
|
StringBuilder searchSql = new StringBuilder(); |
|
|
StringBuilder searchSql = new StringBuilder(); |
|
|
searchSql.append("SELECT CONTRACT, PART_NO partNo, OBJID ifsRowId, OBJVERSION ifsRowVersion"); |
|
|
|
|
|
searchSql.append(" FROM IFSAPP.INVENTORY_PART"); |
|
|
|
|
|
|
|
|
searchSql.append("SELECT CONTRACT, PART_NO partNo, CF$_CCL_COMM_GROUP_3 commGroup3, OBJID ifsRowId, OBJVERSION ifsRowVersion"); |
|
|
|
|
|
searchSql.append(" FROM IFSAPP.INVENTORY_PART_CFV"); |
|
|
searchSql.append(" WHERE CONTRACT = :contract AND PART_NO = :partNo"); |
|
|
searchSql.append(" WHERE CONTRACT = :contract AND PART_NO = :partNo"); |
|
|
//设置查询的入参 |
|
|
//设置查询的入参 |
|
|
Map<String, String> inParam = new HashMap<>(); |
|
|
Map<String, String> inParam = new HashMap<>(); |
|
|
@ -181,7 +181,7 @@ public class InventoryPartApi{ |
|
|
inParam.put("STOCK_MANAGEMENT_DB", "SYSTEM MANAGED INVENTORY"); // 固定参数 |
|
|
inParam.put("STOCK_MANAGEMENT_DB", "SYSTEM MANAGED INVENTORY"); // 固定参数 |
|
|
inParam.put("SPECIAL_CONSUMPTION_TAX_DB", "FALSE"); // SPECIAL_CONSUMPTION_TAX_DB |
|
|
inParam.put("SPECIAL_CONSUMPTION_TAX_DB", "FALSE"); // SPECIAL_CONSUMPTION_TAX_DB |
|
|
inParam.put("CUSTOMS_DECL_NO_LEVEL", "Not Used"); // CUSTOMS_DECL_NO_LEVEL |
|
|
inParam.put("CUSTOMS_DECL_NO_LEVEL", "Not Used"); // CUSTOMS_DECL_NO_LEVEL |
|
|
//inParam.put("SUPPLY_CODE", supplyCode); // 2025-12-22 新增IFS字段 |
|
|
|
|
|
|
|
|
inParam.put("SUPPLY_CODE", supplyCode); // 2025-12-22 新增IFS字段 |
|
|
logger.info("insertInventoryPart inParam:" + JSON.toJSONString(inParam)); |
|
|
logger.info("insertInventoryPart inParam:" + JSON.toJSONString(inParam)); |
|
|
//执行存储过程 获取结果集 |
|
|
//执行存储过程 获取结果集 |
|
|
//执行check的操作 |
|
|
//执行check的操作 |
|
|
@ -266,7 +266,7 @@ public class InventoryPartApi{ |
|
|
inParam.put("ZERO_COST_FLAG", zeroCostFlag); // ZERO_COST_FLAG |
|
|
inParam.put("ZERO_COST_FLAG", zeroCostFlag); // ZERO_COST_FLAG |
|
|
inParam.put("PART_COST_GROUP_ID", partCostGroupId); // PART_COST_GROUP_ID |
|
|
inParam.put("PART_COST_GROUP_ID", partCostGroupId); // PART_COST_GROUP_ID |
|
|
inParam.put("ENG_ATTRIBUTE", engAttribute); // 库存件模版 |
|
|
inParam.put("ENG_ATTRIBUTE", engAttribute); // 库存件模版 |
|
|
//inParam.put("SUPPLY_CODE", supplyCode); // 2025-12-22 新增IFS字段 |
|
|
|
|
|
|
|
|
inParam.put("SUPPLY_CODE", supplyCode); // 2025-12-22 新增IFS字段 |
|
|
//打印存储过程入参 |
|
|
//打印存储过程入参 |
|
|
logger.info("modifyInventoryPart inParam:" + JSON.toJSONString(inParam)); |
|
|
logger.info("modifyInventoryPart inParam:" + JSON.toJSONString(inParam)); |
|
|
|
|
|
|
|
|
@ -1078,4 +1078,109 @@ public class InventoryPartApi{ |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @description: 同步库存件的时候 同时修改库存件的COMM_GROUP_3 字段 |
|
|
|
|
|
* @author LR |
|
|
|
|
|
* @date 2026-3-9 13:42 |
|
|
|
|
|
* @version 1.0 |
|
|
|
|
|
*/ |
|
|
|
|
|
public static void modifyInventoryPartCommGroup3(Server srv, PartIfsInventory inData) throws APException { |
|
|
|
|
|
//公共参数 |
|
|
|
|
|
String objId = inData.getIfsRowId(); |
|
|
|
|
|
//String objVersion = inData.getIfsRowVersion(); |
|
|
|
|
|
//String commGroup3 = inData.getCommGroup3(); |
|
|
|
|
|
String commGroup3 = "HOOK & LOOP"; |
|
|
|
|
|
//后添加的参数 |
|
|
|
|
|
/*String contract = inData.getContract(); |
|
|
|
|
|
String partNo = inData.getPartNo().toUpperCase(); |
|
|
|
|
|
String partDesc = inData.getPartDesc(); |
|
|
|
|
|
String typeCode = inData.getTypeCode(); |
|
|
|
|
|
String plannerBuyer = inData.getPlannerBuyer(); |
|
|
|
|
|
String unitMeas = inData.getUnitMeas(); |
|
|
|
|
|
String primeCommodity = inData.getPrimeCommodity();//主分组 |
|
|
|
|
|
String secondCommodity = inData.getSecondCommodity();//第二分组 |
|
|
|
|
|
String assetClass = inData.getAssetClass(); |
|
|
|
|
|
String partStatus = inData.getPartStatus(); |
|
|
|
|
|
String hazardCode = inData.getHazardCode(); |
|
|
|
|
|
String accountingGroup = inData.getAccountingGroup(); |
|
|
|
|
|
String partProductCode = inData.getPartProductCode(); |
|
|
|
|
|
String partProductFamily = inData.getPartProductFamily(); |
|
|
|
|
|
String typeDesignation = inData.getTypeDesignation(); |
|
|
|
|
|
String dimQuality = inData.getDimQuality(); |
|
|
|
|
|
String noteText = inData.getNoteText(); |
|
|
|
|
|
String leadTimeCode = inData.getLeadTimeCode(); |
|
|
|
|
|
String manufLeadtime = inData.getManufLeadtime(); |
|
|
|
|
|
String expectedLeadtime = inData.getExpectedLeadtime(); |
|
|
|
|
|
String durabilityDay = inData.getDurabilityDay(); |
|
|
|
|
|
String countryOfOrigin = inData.getCountryOfOrigin(); |
|
|
|
|
|
String regionOfOrigin = inData.getRegionOfOrigin(); |
|
|
|
|
|
String customsStatNo = inData.getCustomsStatNo(); |
|
|
|
|
|
String intrastatConvFactor = inData.getIntrastatConvFactor(); |
|
|
|
|
|
String inventoryValuationMethod = inData.getInventoryValuationMethod();// |
|
|
|
|
|
String inventoryPartCostLevel = inData.getInventoryPartCostLevel();// |
|
|
|
|
|
String invoiceConsideration = inData.getInvoiceConsideration();// |
|
|
|
|
|
String zeroCostFlag = inData.getZeroCostFlag();// |
|
|
|
|
|
String partCostGroupId = inData.getPartCostGroupId();// |
|
|
|
|
|
String engAttribute = inData.getEngAttribute(); |
|
|
|
|
|
String supplyCode = inData.getSupplyCode();*/ |
|
|
|
|
|
//入参 |
|
|
|
|
|
Map<String, String> inParam = new HashMap<>(); |
|
|
|
|
|
//填充参数 |
|
|
|
|
|
inParam.put("OBJID", objId); |
|
|
|
|
|
inParam.put("CF$_CCL_COMM_GROUP_3", commGroup3); |
|
|
|
|
|
/* inParam.put("OBJVERSION", objVersion); |
|
|
|
|
|
inParam.put("CONTRACT", contract); // ifs域 |
|
|
|
|
|
inParam.put("PART_NO", partNo); // 物料编码 |
|
|
|
|
|
inParam.put("DESCRIPTION", partDesc); // 物料描述 |
|
|
|
|
|
inParam.put("TYPE_CODE", typeCode); // 物料大类 |
|
|
|
|
|
inParam.put("PLANNER_BUYER", plannerBuyer); // 计划购买者 |
|
|
|
|
|
inParam.put("UNIT_MEAS", unitMeas); // 单位 |
|
|
|
|
|
inParam.put("PRIME_COMMODITY", primeCommodity); // 主分组 |
|
|
|
|
|
inParam.put("SECOND_COMMODITY", secondCommodity); // 副分组 |
|
|
|
|
|
inParam.put("ASSET_CLASS", assetClass); // ASSET_CLASS |
|
|
|
|
|
inParam.put("PART_STATUS", partStatus); // ASSET_CLASS |
|
|
|
|
|
inParam.put("HAZARD_CODE", hazardCode); // HAZARD_CODE |
|
|
|
|
|
inParam.put("ACCOUNTING_GROUP", accountingGroup); // 商品属性 半成品 成品 原材料 |
|
|
|
|
|
inParam.put("PART_PRODUCT_CODE", partProductCode); // 产品代码 |
|
|
|
|
|
inParam.put("PART_PRODUCT_FAMILY", partProductFamily); // 零部件标识 |
|
|
|
|
|
inParam.put("TYPE_DESIGNATION", typeDesignation); // 类型标识 |
|
|
|
|
|
inParam.put("DIM_QUALITY", dimQuality); // DIM_QUALITY |
|
|
|
|
|
inParam.put("NOTE_TEXT", noteText); // 备注 |
|
|
|
|
|
inParam.put("LEAD_TIME_CODE", leadTimeCode); // LEAD_TIME_CODE |
|
|
|
|
|
inParam.put("MANUF_LEADTIME", manufLeadtime); // MANUF_LEADTIME |
|
|
|
|
|
inParam.put("EXPECTED_LEADTIME", expectedLeadtime); // |
|
|
|
|
|
inParam.put("DURABILITY_DAY", durabilityDay); // DURABILITY_DAY |
|
|
|
|
|
inParam.put("COUNTRY_OF_ORIGIN", countryOfOrigin); // 国家 |
|
|
|
|
|
inParam.put("REGION_OF_ORIGIN", regionOfOrigin); // 区域 |
|
|
|
|
|
inParam.put("CUSTOMS_STAT_NO", customsStatNo); // CUSTOMS_STAT_NO |
|
|
|
|
|
inParam.put("INTRASTAT_CONV_FACTOR", intrastatConvFactor); // INTRASTAT_CONV_FACTOR |
|
|
|
|
|
inParam.put("INVENTORY_VALUATION_METHOD", inventoryValuationMethod); // INVENTORY_VALUATION_METHOD |
|
|
|
|
|
inParam.put("INVENTORY_PART_COST_LEVEL", inventoryPartCostLevel); // INVENTORY_PART_COST_LEVEL |
|
|
|
|
|
inParam.put("INVOICE_CONSIDERATION", invoiceConsideration); // INVOICE_CONSIDERATION |
|
|
|
|
|
inParam.put("ZERO_COST_FLAG", zeroCostFlag); // ZERO_COST_FLAG |
|
|
|
|
|
inParam.put("PART_COST_GROUP_ID", partCostGroupId); // PART_COST_GROUP_ID |
|
|
|
|
|
inParam.put("ENG_ATTRIBUTE", engAttribute); // 库存件模版 |
|
|
|
|
|
// 固定参数 |
|
|
|
|
|
inParam.put("CATCH_UNIT_MEAS", ""); // 拼接固定值CATCH_UNIT_MEAS |
|
|
|
|
|
inParam.put("PURCH_LEADTIME", "0"); // 拼接固定值PURCH_LEADTIME |
|
|
|
|
|
inParam.put("MIN_DURAB_DAYS_CO_DELIV", "0"); // 拼接固定参数 |
|
|
|
|
|
inParam.put("MIN_DURAB_DAYS_PLANNING", "0"); // 拼接固定参数 |
|
|
|
|
|
inParam.put("MANDATORY_EXPIRATION_DATE_DB", "FALSE"); // 拼接固定参数 |
|
|
|
|
|
inParam.put("SUPPLY_CODE", "Inventory Order"); // 拼接固定参数 |
|
|
|
|
|
inParam.put("DOP_CONNECTION", "Automatic DOP"); // 拼接固定参数 |
|
|
|
|
|
inParam.put("DOP_NETTING", "No Netting"); // 拼接固定参数 |
|
|
|
|
|
inParam.put("QTY_CALC_ROUNDING", "16"); // 拼接固定参数 |
|
|
|
|
|
inParam.put("CYCLE_PERIOD", "0"); // 拼接固定参数 |
|
|
|
|
|
inParam.put("CYCLE_CODE_DB", "N"); // 拼接固定参数 |
|
|
|
|
|
inParam.put("STOCK_MANAGEMENT_DB", "SYSTEM MANAGED INVENTORY"); // 固定参数 |
|
|
|
|
|
inParam.put("SPECIAL_CONSUMPTION_TAX_DB", "FALSE"); // SPECIAL_CONSUMPTION_TAX_DB |
|
|
|
|
|
inParam.put("CUSTOMS_DECL_NO_LEVEL", "Not Used"); // CUSTOMS_DECL_NO_LEVEL |
|
|
|
|
|
inParam.put("SUPPLY_CODE", supplyCode); // 2025-12-22 新增IFS字段*/ |
|
|
|
|
|
logger.info("修改库存件的COMM_GROUP_3字段 入参:{}", JSON.toJSONString(inParam)); |
|
|
|
|
|
//执行do的操作 |
|
|
|
|
|
Map<String, String> resultMap = IfsPlsqlUtils.execProcedureGetRecord(srv, "INVENTORY_PART_CFP", |
|
|
|
|
|
"Cf_Modify__", PlsqlBaseMethodType.MODIFY, PlsqlBaseMethodAction.DO, inParam); |
|
|
|
|
|
logger.info("修改库存件的COMM_GROUP_3字段 出参:{}", JSON.toJSONString(resultMap)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |