diff --git a/src/main/java/com/spring/ifs/api/InventoryPartApi.java b/src/main/java/com/spring/ifs/api/InventoryPartApi.java index 58b83bc4..ab6c759f 100644 --- a/src/main/java/com/spring/ifs/api/InventoryPartApi.java +++ b/src/main/java/com/spring/ifs/api/InventoryPartApi.java @@ -1,8 +1,11 @@ package com.spring.ifs.api; -import com.spring.ifs.data.*; +import com.spring.ifs.data.CharacteristicTemplate; +import com.spring.ifs.data.CopyPartItem; +import com.spring.ifs.data.IfsParamBean; import com.spring.ifs.utils.IfsConverterToMap; import com.spring.ifs.utils.IfsPlsqlUtils; +import com.spring.modules.part.entity.APIEntity.*; import ifs.fnd.ap.*; import java.util.ArrayList; @@ -45,8 +48,13 @@ public class InventoryPartApi{ } } - - public static InventoryPart getInventoryPart(Server srv, String contract, String partNo) throws APException { + /** + * @description: 获取库存件的对象 + * @author LR + * @date 2024/12/18 10:02 + * @version 1.0 + */ + public static PartIfsInventory getInventoryPart(Server srv, String contract, String partNo) throws APException { StringBuilder searchSql = new StringBuilder(); searchSql.append("SELECT CONTRACT, PART_NO, OBJID ifsRowId, OBJVERSION ifsRowVersion"); searchSql.append(" FROM IFSAPP.INVENTORY_PART"); @@ -68,7 +76,7 @@ public class InventoryPartApi{ return null; }else { //解析数据 - InventoryPart tempPart = new InventoryPart(); + PartIfsInventory tempPart = new PartIfsInventory(); tempPart.setContract(resultMap.get("CONTRACT")); tempPart.setPartNo(resultMap.get("PART_NO")); // tempPart.setIfsRowId(resultMap.get("IFSROWID")); @@ -84,7 +92,7 @@ public class InventoryPartApi{ * @date 2024/12/11 9:51 * @version 1.0 */ - public static Map insertInventoryPart(Server srv, InventoryPart inData) throws APException { + public static Map insertInventoryPart(Server srv, PartIfsInventory inData) throws APException { //公共参数 String contract = inData.getContract(); String partNo = inData.getPartNo().toUpperCase(); @@ -185,7 +193,7 @@ public class InventoryPartApi{ * @date 2024/12/11 9:59 * @version 1.0 */ - public static Map modifyInventoryPart(Server srv, InventoryPart inData) throws APException { + public static Map modifyInventoryPart(Server srv, PartIfsInventory inData) throws APException { //公共参数 String ifsRowId = inData.getIfsRowId(); String ifsRowVersion = inData.getIfsRowVersion(); @@ -268,7 +276,7 @@ public class InventoryPartApi{ * @date 2024/12/11 10:04 * @version 1.0 */ - public static void removeInventoryPart(Server srv, PartCatalog inData) throws APException { + public static void removeInventoryPart(Server srv, PartIfsInventory inData) throws APException { //公共参数 String ifsRowId = inData.getIfsRowId(); String ifsRowVersion = inData.getIfsRowVersion(); @@ -319,7 +327,7 @@ public class InventoryPartApi{ * @date 2024/12/11 10:23 * @version 1.0 */ - public static Map modifyInventoryPartCost(Server srv, InventoryPartConfig inData) throws APException { + public static Map modifyInventoryPartCost(Server srv, PartIfsInventoryConfig inData) throws APException { //公共参数 String ifsRowId = inData.getIfsRowId(); String ifsRowVersion = inData.getIfsRowVersion(); @@ -373,7 +381,7 @@ public class InventoryPartApi{ * @date 2024/12/11 10:44 * @version 1.0 */ - public static Map modifyInventoryPartPlan(Server srv, InventoryPartPlan inData) throws APException { + public static Map modifyInventoryPartPlan(Server srv, PartIfsInventoryPlan inData) throws APException { //公共参数 String ifsRowId = inData.getIfsRowId(); String ifsRowVersion = inData.getIfsRowVersion(); @@ -442,7 +450,7 @@ public class InventoryPartApi{ * @date 2024/12/11 10:52 * @version 1.0 */ - public static Map insertInventoryPartLocation(Server srv, InventoryPartLocation inData) throws APException { + public static Map insertInventoryPartLocation(Server srv, PartIfsInventoryLocation inData) throws APException { //公共参数 String contract = inData.getContract(); String partNo = inData.getPartNo().toUpperCase(); @@ -473,7 +481,7 @@ public class InventoryPartApi{ * @date 2024/12/11 10:59 * @version 1.0 */ - public static void removeInventoryPartLocation(Server srv, InventoryPartLocation inData) throws APException { + public static void removeInventoryPartLocation(Server srv, PartIfsInventoryLocation inData) throws APException { //公共参数 String ifsRowId = inData.getIfsRowId(); String ifsRowVersion = inData.getIfsRowVersion(); @@ -523,7 +531,7 @@ public class InventoryPartApi{ * @date 2024/12/11 11:11 * @version 1.0 */ - public static Map modifyInventoryPartManufacture(Server srv, InventoryPartManufacture inData) throws APException { + public static Map modifyInventoryPartManufacture(Server srv, PartIfsInventoryManufacture inData) throws APException { //公共参数 String ifsRowId = inData.getIfsRowId(); String ifsRowVersion = inData.getIfsRowVersion(); @@ -606,7 +614,7 @@ public class InventoryPartApi{ * @date 2024/12/11 11:21 * @version 1.0 */ - public static Map insertInventoryPartRevision(Server srv, InventoryPartRevision inData) throws APException { + public static Map insertInventoryPartRevision(Server srv, PartIfsInventoryRevision inData) throws APException { //公共参数 String contract = inData.getContract(); String partNo = inData.getPartNo().toUpperCase(); @@ -657,7 +665,7 @@ public class InventoryPartApi{ * @date 2024/12/11 11:23 * @version 1.0 */ - public static Map modifyInventoryPartRevision(Server srv, InventoryPartRevision inData) throws APException { + public static Map modifyInventoryPartRevision(Server srv, PartIfsInventoryRevision inData) throws APException { //公共参数 String ifsRowId = inData.getIfsRowId(); String ifsRowVersion = inData.getIfsRowVersion(); @@ -699,7 +707,7 @@ public class InventoryPartApi{ * @date 2024/12/11 11:25 * @version 1.0 */ - public static void removeInventoryPartRevision(Server srv, InventoryPartRevision inData) throws APException { + public static void removeInventoryPartRevision(Server srv, PartIfsInventoryRevision inData) throws APException { //公共参数 String ifsRowId = inData.getIfsRowId(); String ifsRowVersion = inData.getIfsRowVersion(); @@ -808,7 +816,7 @@ public class InventoryPartApi{ * @date 2024/12/11 14:27 * @version 1.0 */ - public static List getInventoryPartCharacteristicCodes(Server srv, String contract, String partNo) throws APException { + public static List getInventoryPartCharacteristicCodes(Server srv, String contract, String partNo) throws APException { StringBuilder searchSql = new StringBuilder(); searchSql.append("SELECT OBJID ifsRowId, OBJVERSION ifsRowVersion, CONTRACT, PART_NO, CHARACTERISTIC_CODE,"); searchSql.append(" ifsapp.CHARACTERISTIC_API.Get_Description(CHARACTERISTIC_CODE) characteristicDesc,"); @@ -825,7 +833,7 @@ public class InventoryPartApi{ if (recordCollection == null) { return null; } else { - List resultItems = new ArrayList<>(); + List resultItems = new ArrayList<>(); List> resultList = IfsConverterToMap.ConverterIfsToList(recordCollection); //判断是否存在数据 if(resultList == null) { @@ -834,14 +842,14 @@ public class InventoryPartApi{ //获取数据转bean for (int i = 0; i < resultList.size(); i++) { Map tempMap = resultList.get(i); - CharacteristicCode tempItem = new CharacteristicCode(); + PartIfsInventoryProperty tempItem = new PartIfsInventoryProperty(); //设置参数 tempItem.setIfsRowId(tempMap.get("IFSROWID")); tempItem.setIfsRowVersion(tempMap.get("IFSROWVERSION")); tempItem.setContract(tempMap.get("CONTRACT")); tempItem.setPartNo(tempMap.get("PART_NO")); tempItem.setCharacteristicCode(tempMap.get("CHARACTERISTIC_CODE")); - tempItem.setCharacteristicDesc(tempMap.get("CHARACTERISTICDESC")); // 这个是通过函数获取的描述 + //tempItem.setCharacteristicDesc(tempMap.get("CHARACTERISTICDESC")); // 这个是通过函数获取的描述 tempItem.setAttrValueNumeric(tempMap.get("ATTR_VALUE_NUMERIC")); tempItem.setAttrValueAlpha(tempMap.get("ATTR_VALUE_ALPHA")); tempItem.setUnitMeas(tempMap.get("UNIT_MEAS")); @@ -858,7 +866,7 @@ public class InventoryPartApi{ * @date 2024/12/11 14:31 * @version 1.0 */ - public static Map insertInventoryPartCharacteristicCode(Server srv, CharacteristicCode inData) throws APException { + public static Map insertInventoryPartCharacteristicCode(Server srv, PartIfsInventoryProperty inData) throws APException { //公共参数 String contract = inData.getContract(); String partNo = inData.getPartNo().toUpperCase(); @@ -899,7 +907,7 @@ public class InventoryPartApi{ * @date 2024/12/11 14:37 * @version 1.0 */ - public static Map modifyInventoryPartCharacteristicCode(Server srv, CharacteristicCode inData) throws APException { + public static Map modifyInventoryPartCharacteristicCode(Server srv, PartIfsInventoryProperty inData) throws APException { //公共参数 String ifsRowId = inData.getIfsRowId(); String ifsRowVersion = inData.getIfsRowVersion(); @@ -934,7 +942,7 @@ public class InventoryPartApi{ * @date 2024/12/11 14:38 * @version 1.0 */ - public static Map removeInventoryPartCharacteristic(Server srv, CharacteristicCode inData) throws APException { + public static Map removeInventoryPartCharacteristic(Server srv, PartIfsInventoryProperty inData) throws APException { //公共参数 String ifsRowId = inData.getIfsRowId(); String ifsRowVersion = inData.getIfsRowVersion(); diff --git a/src/main/java/com/spring/ifs/bean/InventoryServiceBean.java b/src/main/java/com/spring/ifs/bean/InventoryServiceBean.java index daf265af..4c6544e5 100644 --- a/src/main/java/com/spring/ifs/bean/InventoryServiceBean.java +++ b/src/main/java/com/spring/ifs/bean/InventoryServiceBean.java @@ -3,6 +3,9 @@ package com.spring.ifs.bean; import com.alibaba.fastjson.JSON; import com.spring.ifs.api.*; import com.spring.ifs.data.*; +import com.spring.modules.part.entity.APIEntity.*; +import com.spring.modules.part.entity.APIEntity.CopyPart; +import com.spring.modules.part.vo.PartInformationVo; import ifs.fnd.ap.APException; import ifs.fnd.ap.Server; import org.slf4j.Logger; @@ -33,15 +36,12 @@ public class InventoryServiceBean { * @date 2024/12/12 15:49 * @version 1.0 */ - public InventoryPart getInventoryPart(InventoryPart inData) throws APException { + public InventoryPart getInventoryPart(Server srv, InventoryPart inData) throws APException { logger.info("Inventory Part 查询开始:"+ JSON.toJSONString(inData)); //查询的参数 - String username = inData.getIfsUsername(); - String password = inData.getIfsPassword(); String contract = inData.getContract(); String partNo = inData.getPartNo(); - //获取连接 - Server srv = ifsServer.getIfsServer(username, password); + //获取数据 Map partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo); //判断是否需要插入到ifs if(partMap == null || partMap.size() == 0) { @@ -64,15 +64,12 @@ public class InventoryServiceBean { * @date 2024/12/12 15:52 * @version 1.0 */ - public InventoryPart syncInventoryPart(InventoryPart inData) throws APException { + public PartIfsInventory syncInventoryPart(Server srv, PartIfsInventory inData) throws APException { logger.info("Inventory Part 新增开始:"+JSON.toJSONString(inData)); //查询的参数 - String username = inData.getIfsUsername(); - String password = inData.getIfsPassword(); String contract = inData.getContract(); String partNo = inData.getPartNo(); - //获取连接 - Server srv = ifsServer.getIfsServer(username, password); + //获取数据 Map partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo); //判断是否需要插入到ifs if(partMap == null || partMap.size() == 0) { @@ -96,15 +93,12 @@ public class InventoryServiceBean { * @date 2024/12/12 15:55 * @version 1.0 */ - public InventoryPart modifyInventoryPart(InventoryPart inData) throws APException { + public PartIfsInventory modifyInventoryPart(Server srv, PartIfsInventory inData) throws APException { logger.info("Inventory Part 修改开始:"+JSON.toJSONString(inData)); //查询的参数 - String username = inData.getIfsUsername(); - String password = inData.getIfsPassword(); String contract = inData.getContract(); String partNo = inData.getPartNo(); - //获取连接 - Server srv = ifsServer.getIfsServer(username, password); + //获取数据 Map partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo); //判断是否需要插入到ifs if(partMap == null || partMap.size() == 0) { @@ -129,15 +123,12 @@ public class InventoryServiceBean { * @date 2024/12/12 15:58 * @version 1.0 */ - public void removeInventoryPart(InventoryPart inData) throws APException { + public void removeInventoryPart(Server srv, PartIfsInventory inData) throws APException { logger.info("Inventory Part 删除开始:"+JSON.toJSONString(inData)); //查询的参数 - String username = inData.getIfsUsername(); - String password = inData.getIfsPassword(); String contract = inData.getContract(); String partNo = inData.getPartNo(); - //获取连接 - Server srv = ifsServer.getIfsServer(username, password); + //获取数据 Map partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo); //判断是否需要插入到ifs if(partMap == null || partMap.size() == 0) { @@ -158,15 +149,12 @@ public class InventoryServiceBean { * @date 2024/12/12 16:11 * @version 1.0 */ - public InventoryPartConfig modifyInventoryPartCost(InventoryPartConfig inData) throws APException { + public PartIfsInventoryConfig modifyInventoryPartCost(Server srv, PartIfsInventoryConfig inData) throws APException { logger.info("Inventory Part Cost 修改开始:"+JSON.toJSONString(inData)); //查询的参数 - String username = inData.getIfsUsername(); - String password = inData.getIfsPassword(); String contract = inData.getContract(); String partNo = inData.getPartNo(); - //获取连接 - Server srv = ifsServer.getIfsServer(username, password); + //获取数据 Map partMap = InventoryPartApi.getInventoryPartConfig(srv, contract, partNo); //判断是否需要插入到ifs if(partMap == null || partMap.size() == 0) { @@ -191,15 +179,12 @@ public class InventoryServiceBean { * @date 2024/12/12 16:31 * @version 1.0 */ - public InventoryPartPlan modifyInventoryPartPlan(InventoryPartPlan inData) throws APException { + public PartIfsInventoryPlan modifyInventoryPartPlan(Server srv, PartIfsInventoryPlan inData) throws APException { logger.info("Inventory Part Plan 修改开始:"+JSON.toJSONString(inData)); //查询的参数 - String username = inData.getIfsUsername(); - String password = inData.getIfsPassword(); String contract = inData.getContract(); String partNo = inData.getPartNo(); - //获取连接 - Server srv = ifsServer.getIfsServer(username, password); + //获取数据 Map partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo); //判断是否需要插入到ifs if(partMap == null || partMap.size() == 0) { @@ -226,21 +211,19 @@ public class InventoryServiceBean { * @date 2024/12/12 16:36 * @version 1.0 */ - public List syncInventoryPartLocations(List inDatas) throws APException { + public List syncInventoryPartLocations(Server srv, List inDatas) throws APException { logger.info("Inventory Part Location 批量新增开始:"+JSON.toJSONString(inDatas)); - String username = inDatas.get(0).getIfsUsername(); - String password = inDatas.get(0).getIfsPassword(); - String contract = inDatas.get(0).getContract(); - String partNo = inDatas.get(0).getPartNo(); - //获取连接 - Server srv = ifsServer.getIfsServer(username, password); + PartIfsInventoryLocation zeroData = inDatas.get(0); + String contract = zeroData.getContract(); + String partNo = zeroData.getPartNo(); + //获取数据 Map partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo); //判断是否需要插入到ifs if(partMap == null || partMap.size() == 0) { throw new RuntimeException("域:" + contract + "库存件:" + partNo + "不存在!"); } //编辑处理需要处理的数据 - for(InventoryPartLocation inData : inDatas) { + for(PartIfsInventoryLocation inData : inDatas) { Map resultMap = InventoryPartApi.insertInventoryPartLocation(srv, inData); //设置ifs 信息 inData.setIfsRowId(resultMap.get("OBJID")); @@ -257,16 +240,12 @@ public class InventoryServiceBean { * @date 2024/12/12 16:37 * @version 1.0 */ - public void removeInventoryPartLocation(InventoryPartLocation inData) throws APException { + public void removeInventoryPartLocation(Server srv, PartIfsInventoryLocation inData) throws APException { logger.info("Inventory Part Location 删除开始:"+JSON.toJSONString(inData)); - String username = inData.getIfsUsername(); - String password = inData.getIfsPassword(); String contract = inData.getContract(); String partNo = inData.getPartNo(); String locationNo = inData.getLocationNo(); - //获取连接 - Server srv = ifsServer.getIfsServer(username, password); - //获取库存件Plan配置的信息 + //获取数据 Map locationMap = InventoryPartApi.getInventoryPartLocation(srv, contract, partNo, locationNo); //判断是否需要插入到ifs if(locationMap == null || locationMap.size() == 0) { @@ -286,16 +265,13 @@ public class InventoryServiceBean { * @date 2024/12/12 16:42 * @version 1.0 */ - public void removeInventoryPartLocations(List inDatas) throws APException { + public void removeInventoryPartLocations(Server srv, List inDatas) throws APException { logger.info("Inventory Part Location 批量删除开始:"+JSON.toJSONString(inDatas)); - String username = inDatas.get(0).getIfsUsername(); - String password = inDatas.get(0).getIfsPassword(); - String contract = inDatas.get(0).getContract(); - String partNo = inDatas.get(0).getPartNo(); - //获取连接 - Server srv = ifsServer.getIfsServer(username, password); + PartIfsInventoryLocation zeroData = inDatas.get(0); + String contract = zeroData.getContract(); + String partNo = zeroData.getPartNo(); //循环处理数据 - for(InventoryPartLocation inData : inDatas) { + for(PartIfsInventoryLocation inData : inDatas) { String locationNo = inData.getLocationNo(); //获取库存件Plan配置的信息 Map locationMap = InventoryPartApi.getInventoryPartLocation(srv, contract, partNo, locationNo); @@ -318,15 +294,11 @@ public class InventoryServiceBean { * @date 2024/12/12 16:44 * @version 1.0 */ - public InventoryPartManufacture modifyInventoryPartManufacture(InventoryPartManufacture inData) throws APException { + public PartIfsInventoryManufacture modifyInventoryPartManufacture(Server srv, PartIfsInventoryManufacture inData) throws APException { logger.info("Inventory Part Manufacture 修改开始:"+JSON.toJSONString(inData)); //公共参数 - String username = inData.getIfsUsername(); - String password = inData.getIfsPassword(); String contract = inData.getContract(); String partNo = inData.getPartNo(); - //获取连接 - Server srv = ifsServer.getIfsServer(username, password); //查询制造商信息 Map manufMap = InventoryPartApi.getInventoryManufacture(srv, contract, partNo); //判断是否需要插入到ifs @@ -352,17 +324,13 @@ public class InventoryServiceBean { * @date 2024/12/12 16:59 * @version 1.0 */ - public InventoryPartRevision getInventoryPartRevision(InventoryPartRevision inData) throws APException { + public PartIfsInventoryRevision getInventoryPartRevision(Server srv, PartIfsInventoryRevision inData) throws APException { logger.info("Inventory Part Revision 查询开始:"+JSON.toJSONString(inData)); //公共参数 - String username = inData.getIfsUsername(); - String password = inData.getIfsPassword(); String contract = inData.getContract(); String partNo = inData.getPartNo(); String engChgLevel = inData.getEngChgLevel(); - //获取连接 - Server srv = ifsServer.getIfsServer(username, password); - //查询制造商信息 + //获取数据 Map revisionMap = InventoryPartApi.getInventoryPartRevision(srv, contract, partNo, engChgLevel); //判断是否需要插入到ifs if(revisionMap == null) { @@ -382,17 +350,13 @@ public class InventoryServiceBean { * @date 2024/12/12 17:03 * @version 1.0 */ - public InventoryPartRevision syncInventoryPartRevision(InventoryPartRevision inData) throws APException { + public PartIfsInventoryRevision syncInventoryPartRevision(Server srv, PartIfsInventoryRevision inData) throws APException { logger.info("Inventory Part Revision 新增开始:"+JSON.toJSONString(inData)); //公共参数 - String username = inData.getIfsUsername(); - String password = inData.getIfsPassword(); String contract = inData.getContract(); String partNo = inData.getPartNo(); String engChgLevel = inData.getEngChgLevel(); - //获取连接 - Server srv = ifsServer.getIfsServer(username, password); - //查询制造商信息 + //获取数据 Map revisionMap = InventoryPartApi.getInventoryPartRevision(srv, contract, partNo, engChgLevel); //判断是否需要插入到ifs if(revisionMap != null) { @@ -415,17 +379,13 @@ public class InventoryServiceBean { * @date 2024/12/12 17:06 * @version 1.0 */ - public InventoryPartRevision modifyInventoryPartRevision(InventoryPartRevision inData) throws APException { + public PartIfsInventoryRevision modifyInventoryPartRevision(Server srv, PartIfsInventoryRevision inData) throws APException { logger.info("Inventory Part Revision 修改开始:"+JSON.toJSONString(inData)); //公共参数 - String username = inData.getIfsUsername(); - String password = inData.getIfsPassword(); String contract = inData.getContract(); String partNo = inData.getPartNo(); String engChgLevel = inData.getEngChgLevel(); - //获取连接 - Server srv = ifsServer.getIfsServer(username, password); - //查询制造商信息 + //获取数据 Map revisionMap = InventoryPartApi.getInventoryPartRevision(srv, contract, partNo, engChgLevel); //判断是否需要插入到ifs if(revisionMap == null || revisionMap.size() == 0) { @@ -450,17 +410,13 @@ public class InventoryServiceBean { * @date 2024/12/12 17:07 * @version 1.0 */ - public void removeInventoryPartRevision(InventoryPartRevision inData) throws APException { + public void removeInventoryPartRevision(Server srv, PartIfsInventoryRevision inData) throws APException { logger.info("Inventory Part Revision 删除开始:"+JSON.toJSONString(inData)); //公共参数 - String username = inData.getIfsUsername(); - String password = inData.getIfsPassword(); String contract = inData.getContract(); String partNo = inData.getPartNo(); String engChgLevel = inData.getEngChgLevel(); - //获取连接 - Server srv = ifsServer.getIfsServer(username, password); - //查询制造商信息 + //获取数据 Map revisionMap = InventoryPartApi.getInventoryPartRevision(srv, contract, partNo, engChgLevel); //判断是否需要插入到ifs if(revisionMap == null || revisionMap.size() == 0) { @@ -481,17 +437,14 @@ public class InventoryServiceBean { * @date 2024/12/12 17:23 * @version 1.0 */ - public List syncInventoryPartCharacteristics(List inDatas) throws APException { + public List syncInventoryPartCharacteristics(Server srv, List inDatas) throws APException { logger.info("Inventory Part Characteristic Code 批量新增开始:"+JSON.toJSONString(inDatas)); + PartIfsInventoryProperty zeroData = inDatas.get(0); //公共参数 - String username = inDatas.get(0).getIfsUsername(); - String password = inDatas.get(0).getIfsPassword(); - String contract = inDatas.get(0).getContract(); - String partNo = inDatas.get(0).getPartNo(); - //获取连接 - Server srv = ifsServer.getIfsServer(username, password); + String contract = zeroData.getContract(); + String partNo = zeroData.getPartNo(); //递归判断 - for(CharacteristicCode characteristic : inDatas) { + for(PartIfsInventoryProperty characteristic : inDatas) { String characteristicCode = characteristic.getCharacteristicCode(); Map characteristicMap = InventoryPartApi.getInventoryPartCharacteristicCode(srv, contract, partNo, characteristicCode); if(characteristicMap != null && characteristicMap.size() > 0) { @@ -514,20 +467,16 @@ public class InventoryServiceBean { * @date 2024/12/12 17:28 * @version 1.0 */ - public void removeInventoryPartCharacteristicsByPartNo(InventoryPart inData) throws APException { + public void removeInventoryPartCharacteristicsByPartNo(Server srv, InventoryPart inData) throws APException { logger.info("删除库存件的所有属性开始:"+JSON.toJSONString(inData)); //公共参数 - String username = inData.getIfsUsername(); - String password = inData.getIfsPassword(); String contract = inData.getContract(); String partNo = inData.getPartNo(); - //获取连接 - Server srv = ifsServer.getIfsServer(username, password); //查询当前物料的属性 先删除物料属性 再删除库存件 - List characteristicList = InventoryPartApi.getInventoryPartCharacteristicCodes(srv, contract, partNo); + List characteristicList = InventoryPartApi.getInventoryPartCharacteristicCodes(srv, contract, partNo); //如果存在就批量删掉数据 if(characteristicList != null && characteristicList.size() > 0) { - for(CharacteristicCode characteristic : characteristicList) { + for(PartIfsInventoryProperty characteristic : characteristicList) { //一个一个删掉库存件的属性 InventoryPartApi.removeInventoryPartCharacteristic(srv, characteristic); } @@ -535,22 +484,17 @@ public class InventoryServiceBean { logger.info("删除库存件的所有属性结束:"+JSON.toJSONString(inData)); } - /** * @description: 删除库存件关联的数据 * @author LR * @date 2024/12/12 17:38 * @version 1.0 */ - public void removeInventoryPartRelationInfo(InventoryPart inData) throws APException { + public void removeInventoryPartRelationInfo(Server srv, InventoryPart inData) throws APException { logger.info("删除库存件的关联信息开始:"+JSON.toJSONString(inData)); //公共参数 - String username = inData.getIfsUsername(); - String password = inData.getIfsPassword(); String contract = inData.getContract(); String partNo = inData.getPartNo(); - //获取连接 - Server srv = ifsServer.getIfsServer(username, password); //按照条件查询Bom的相关信息 按照海波的要求 删除Bom Header List bomHeaders = BomApi.getBomHeadersByPartNo(srv, contract, partNo); //判断是否存在 @@ -572,14 +516,14 @@ public class InventoryServiceBean { } //判断库存件是否存在 - InventoryPart inventoryPart = InventoryPartApi.getInventoryPart(srv, contract, partNo); + PartIfsInventory inventoryPart = InventoryPartApi.getInventoryPart(srv, contract, partNo); //如果存在需要删掉 if(inventoryPart != null) { //查询当前物料的属性 先删除物料属性 再删除库存件 - List characteristicCodes = InventoryPartApi.getInventoryPartCharacteristicCodes(srv, contract, partNo); + List characteristicCodes = InventoryPartApi.getInventoryPartCharacteristicCodes(srv, contract, partNo); //如果存在就批量删掉数据 if(characteristicCodes.size() > 0) { - for(CharacteristicCode characteristic : characteristicCodes) { + for(PartIfsInventoryProperty characteristic : characteristicCodes) { //一个一个删掉库存件的属性 InventoryPartApi.removeInventoryPartCharacteristic(srv, characteristic); } @@ -595,10 +539,8 @@ public class InventoryServiceBean { * @date 2024/12/9 15:51 * @version 1.0 */ - public void syncCopyPartForInventoryPart(CopyPart inData) throws APException { + public void syncCopyPartForInventoryPart(Server srv, CopyPart inData) throws APException { //公共参数 - String username = inData.getIfsUsername(); - String password = inData.getIfsPassword(); String oriContract = inData.getOriContract(); String oriPartNo = inData.getOriPartNo(); String contract = inData.getContract(); @@ -617,8 +559,6 @@ public class InventoryServiceBean { String copySPCharacteristics = inData.getCopySPCharacteristics();//对应Sales Part, Characteristics String copySPDocumentTexts = inData.getCopySPDocumentTexts();//对应Sales Part, Document Texts String copySPLanguageDescription = inData.getCopySPLanguageDescription();//对应Sales Part, Language Description - //获取连接 - Server srv = ifsServer.getIfsServer(username, password); //调用api方法获取事件的编码 Map resultMap = InventoryPartApi.getCopyPartEventNo(srv); String eventNo = resultMap.get("EVENT_NO"); @@ -824,6 +764,4 @@ public class InventoryServiceBean { } - - } diff --git a/src/main/java/com/spring/ifs/bean/InventoryServiceBeanTest.java b/src/main/java/com/spring/ifs/bean/InventoryServiceBeanTest.java index badd2ac5..7aacbc23 100644 --- a/src/main/java/com/spring/ifs/bean/InventoryServiceBeanTest.java +++ b/src/main/java/com/spring/ifs/bean/InventoryServiceBeanTest.java @@ -1,10 +1,7 @@ package com.spring.ifs.bean; import com.alibaba.fastjson.JSON; -import com.spring.ifs.api.BomApi; -import com.spring.ifs.api.IfsServer; -import com.spring.ifs.api.InventoryPartApi; -import com.spring.ifs.api.RoutingApi; +import com.spring.ifs.api.*; import com.spring.ifs.data.*; import ifs.fnd.ap.APException; import ifs.fnd.ap.Server; @@ -45,7 +42,7 @@ public class InventoryServiceBeanTest { String partNo = inData.getPartNo(); //获取连接 Server srv = ifsServer.getIfsServer(username, password); - Map partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo); + Map partMap = InventoryPartApiTest.getInventoryPartByPartNo(srv, contract, partNo); //判断是否需要插入到ifs if(partMap == null || partMap.size() == 0) { throw new RuntimeException("库存件不存在!"); @@ -54,7 +51,7 @@ public class InventoryServiceBeanTest { inData.setIfsRowId(partMap.get("IFSROWID")); inData.setIfsRowVersion(partMap.get("IFSROWVERSION")); //查询库存件的属性模版 - Map templateMap = InventoryPartApi.getInventoryPartCharacteristicTemplate(srv, contract, partNo); + Map templateMap = InventoryPartApiTest.getInventoryPartCharacteristicTemplate(srv, contract, partNo); //设置模版 inData.setEngAttribute(templateMap.get("ENG_ATTRIBUTE")); logger.info("Inventory Part 查询结束:"+JSON.toJSONString(inData)); @@ -76,11 +73,11 @@ public class InventoryServiceBeanTest { String partNo = inData.getPartNo(); //获取连接 Server srv = ifsServer.getIfsServer(username, password); - Map partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo); + Map partMap = InventoryPartApiTest.getInventoryPartByPartNo(srv, contract, partNo); //判断是否需要插入到ifs if(partMap == null || partMap.size() == 0) { //调用api - Map resultMap = InventoryPartApi.insertInventoryPart(srv, inData); + Map resultMap = InventoryPartApiTest.insertInventoryPart(srv, inData); //设置ifs 信息 inData.setIfsRowId(resultMap.get("OBJID")); inData.setIfsRowVersion(resultMap.get("OBJVERSION")); @@ -108,7 +105,7 @@ public class InventoryServiceBeanTest { String partNo = inData.getPartNo(); //获取连接 Server srv = ifsServer.getIfsServer(username, password); - Map partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo); + Map partMap = InventoryPartApiTest.getInventoryPartByPartNo(srv, contract, partNo); //判断是否需要插入到ifs if(partMap == null || partMap.size() == 0) { throw new RuntimeException("域:"+contract+"库存件:"+partNo+"不存在!"); @@ -116,7 +113,7 @@ public class InventoryServiceBeanTest { //设置ifs 信息 inData.setIfsRowId(partMap.get("IFSROWID")); inData.setIfsRowVersion(partMap.get("IFSROWVERSION")); - Map resultMap = InventoryPartApi.modifyInventoryPart(srv, inData); + Map resultMap = InventoryPartApiTest.modifyInventoryPart(srv, inData); //设置ifs 信息 inData.setIfsRowVersion(resultMap.get("OBJVERSION")); } @@ -141,7 +138,7 @@ public class InventoryServiceBeanTest { String partNo = inData.getPartNo(); //获取连接 Server srv = ifsServer.getIfsServer(username, password); - Map partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo); + Map partMap = InventoryPartApiTest.getInventoryPartByPartNo(srv, contract, partNo); //判断是否需要插入到ifs if(partMap == null || partMap.size() == 0) { throw new RuntimeException("域:"+contract+"库存件:"+partNo+"不存在!"); @@ -149,7 +146,7 @@ public class InventoryServiceBeanTest { //设置ifs 信息 inData.setIfsRowId(partMap.get("IFSROWID")); inData.setIfsRowVersion(partMap.get("IFSROWVERSION")); - InventoryPartApi.removeInventoryPart(srv, inData); + InventoryPartApiTest.removeInventoryPart(srv, inData); } //打印日志 logger.info("Inventory Part 删除结束:"+JSON.toJSONString(inData)); @@ -170,7 +167,7 @@ public class InventoryServiceBeanTest { String partNo = inData.getPartNo(); //获取连接 Server srv = ifsServer.getIfsServer(username, password); - Map partMap = InventoryPartApi.getInventoryPartConfig(srv, contract, partNo); + Map partMap = InventoryPartApiTest.getInventoryPartConfig(srv, contract, partNo); //判断是否需要插入到ifs if(partMap == null || partMap.size() == 0) { throw new RuntimeException("域:"+contract+"库存件:"+partNo+"不存在!"); @@ -178,7 +175,7 @@ public class InventoryServiceBeanTest { //设置ifs 信息 inData.setIfsRowId(partMap.get("IFSROWID")); inData.setIfsRowVersion(partMap.get("IFSROWVERSION")); - Map resultMap = InventoryPartApi.modifyInventoryPartCost(srv, inData); + Map resultMap = InventoryPartApiTest.modifyInventoryPartCost(srv, inData); //设置ifs 信息 inData.setIfsRowVersion(resultMap.get("OBJVERSION")); } @@ -203,17 +200,17 @@ public class InventoryServiceBeanTest { String partNo = inData.getPartNo(); //获取连接 Server srv = ifsServer.getIfsServer(username, password); - Map partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo); + Map partMap = InventoryPartApiTest.getInventoryPartByPartNo(srv, contract, partNo); //判断是否需要插入到ifs if(partMap == null || partMap.size() == 0) { throw new RuntimeException("域:"+contract+"库存件:"+partNo+"不存在!"); }else { //获取库存件Plan配置的信息 - Map planMap = InventoryPartApi.getInventoryPartPlan(srv, contract, partNo); + Map planMap = InventoryPartApiTest.getInventoryPartPlan(srv, contract, partNo); //设置ifs 信息 inData.setIfsRowId(planMap.get("IFSROWID")); inData.setIfsRowVersion(planMap.get("IFSROWVERSION")); - Map resultMap = InventoryPartApi.modifyInventoryPartPlan(srv, inData); + Map resultMap = InventoryPartApiTest.modifyInventoryPartPlan(srv, inData); //设置ifs 信息 inData.setIfsRowVersion(resultMap.get("OBJVERSION")); } @@ -237,14 +234,14 @@ public class InventoryServiceBeanTest { String partNo = inDatas.get(0).getPartNo(); //获取连接 Server srv = ifsServer.getIfsServer(username, password); - Map partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo); + Map partMap = InventoryPartApiTest.getInventoryPartByPartNo(srv, contract, partNo); //判断是否需要插入到ifs if(partMap == null || partMap.size() == 0) { throw new RuntimeException("域:" + contract + "库存件:" + partNo + "不存在!"); } //编辑处理需要处理的数据 for(InventoryPartLocation inData : inDatas) { - Map resultMap = InventoryPartApi.insertInventoryPartLocation(srv, inData); + Map resultMap = InventoryPartApiTest.insertInventoryPartLocation(srv, inData); //设置ifs 信息 inData.setIfsRowId(resultMap.get("OBJID")); inData.setIfsRowVersion(resultMap.get("OBJVERSION")); @@ -270,7 +267,7 @@ public class InventoryServiceBeanTest { //获取连接 Server srv = ifsServer.getIfsServer(username, password); //获取库存件Plan配置的信息 - Map locationMap = InventoryPartApi.getInventoryPartLocation(srv, contract, partNo, locationNo); + Map locationMap = InventoryPartApiTest.getInventoryPartLocation(srv, contract, partNo, locationNo); //判断是否需要插入到ifs if(locationMap == null || locationMap.size() == 0) { throw new RuntimeException("域:" + contract + "库存件:" + partNo + "库位编码:" + locationNo +"不存在!"); @@ -278,7 +275,7 @@ public class InventoryServiceBeanTest { //设置ifs 信息 inData.setIfsRowId(locationMap.get("IFSROWID")); inData.setIfsRowVersion(locationMap.get("IFSROWVERSION")); - InventoryPartApi.removeInventoryPartLocation(srv, inData); + InventoryPartApiTest.removeInventoryPartLocation(srv, inData); //打印日志 logger.info("Inventory Part Location 删除结束:"+JSON.toJSONString(inData)); } @@ -301,7 +298,7 @@ public class InventoryServiceBeanTest { for(InventoryPartLocation inData : inDatas) { String locationNo = inData.getLocationNo(); //获取库存件Plan配置的信息 - Map locationMap = InventoryPartApi.getInventoryPartLocation(srv, contract, partNo, locationNo); + Map locationMap = InventoryPartApiTest.getInventoryPartLocation(srv, contract, partNo, locationNo); //判断是否需要插入到ifs if(locationMap == null || locationMap.size() == 0) { throw new RuntimeException("域:" + contract + "库存件:" + partNo + "库位编码:" + locationNo +"不存在!"); @@ -309,7 +306,7 @@ public class InventoryServiceBeanTest { //设置ifs 信息 inData.setIfsRowId(locationMap.get("IFSROWID")); inData.setIfsRowVersion(locationMap.get("IFSROWVERSION")); - InventoryPartApi.removeInventoryPartLocation(srv, inData); + InventoryPartApiTest.removeInventoryPartLocation(srv, inData); } //打印日志 logger.info("Inventory Part Location 批量删除结束:"+JSON.toJSONString(inDatas)); @@ -331,7 +328,7 @@ public class InventoryServiceBeanTest { //获取连接 Server srv = ifsServer.getIfsServer(username, password); //查询制造商信息 - Map manufMap = InventoryPartApi.getInventoryManufacture(srv, contract, partNo); + Map manufMap = InventoryPartApiTest.getInventoryManufacture(srv, contract, partNo); //判断是否需要插入到ifs if(manufMap == null || manufMap.size() == 0) { throw new RuntimeException("域:"+contract+"库存件:"+partNo+"不存在制造商信息!"); @@ -339,7 +336,7 @@ public class InventoryServiceBeanTest { //设置ifs 信息 inData.setIfsRowId(manufMap.get("IFSROWID")); inData.setIfsRowVersion(manufMap.get("IFSROWVERSION")); - Map resultMap = InventoryPartApi.modifyInventoryPartManufacture(srv, inData); + Map resultMap = InventoryPartApiTest.modifyInventoryPartManufacture(srv, inData); //设置ifs 信息 inData.setIfsRowVersion(resultMap.get("IFSROWVERSION")); } @@ -366,7 +363,7 @@ public class InventoryServiceBeanTest { //获取连接 Server srv = ifsServer.getIfsServer(username, password); //查询制造商信息 - Map revisionMap = InventoryPartApi.getInventoryPartRevision(srv, contract, partNo, engChgLevel); + Map revisionMap = InventoryPartApiTest.getInventoryPartRevision(srv, contract, partNo, engChgLevel); //判断是否需要插入到ifs if(revisionMap == null) { throw new RuntimeException("当前版本信息不存在!"); @@ -396,13 +393,13 @@ public class InventoryServiceBeanTest { //获取连接 Server srv = ifsServer.getIfsServer(username, password); //查询制造商信息 - Map revisionMap = InventoryPartApi.getInventoryPartRevision(srv, contract, partNo, engChgLevel); + Map revisionMap = InventoryPartApiTest.getInventoryPartRevision(srv, contract, partNo, engChgLevel); //判断是否需要插入到ifs if(revisionMap != null) { throw new RuntimeException("当前版本信息已存在!"); } //调用新增api - Map resultMap = InventoryPartApi.insertInventoryPartRevision(srv, inData); + Map resultMap = InventoryPartApiTest.insertInventoryPartRevision(srv, inData); //设置ifs 信息 inData.setIfsRowId(resultMap.get("OBJID")); inData.setIfsRowVersion(resultMap.get("OBJVERSION")); @@ -429,7 +426,7 @@ public class InventoryServiceBeanTest { //获取连接 Server srv = ifsServer.getIfsServer(username, password); //查询制造商信息 - Map revisionMap = InventoryPartApi.getInventoryPartRevision(srv, contract, partNo, engChgLevel); + Map revisionMap = InventoryPartApiTest.getInventoryPartRevision(srv, contract, partNo, engChgLevel); //判断是否需要插入到ifs if(revisionMap == null || revisionMap.size() == 0) { throw new RuntimeException("当前版本信息不存在!"); @@ -438,7 +435,7 @@ public class InventoryServiceBeanTest { inData.setIfsRowId(revisionMap.get("IFSROWID")); inData.setIfsRowVersion(revisionMap.get("IFSROWVERSION")); //调用api - Map resultMap = InventoryPartApi.modifyInventoryPartRevision(srv, inData); + Map resultMap = InventoryPartApiTest.modifyInventoryPartRevision(srv, inData); //设置ifs 信息 inData.setIfsRowVersion(resultMap.get("OBJVERSION")); //打印日志 @@ -464,7 +461,7 @@ public class InventoryServiceBeanTest { //获取连接 Server srv = ifsServer.getIfsServer(username, password); //查询制造商信息 - Map revisionMap = InventoryPartApi.getInventoryPartRevision(srv, contract, partNo, engChgLevel); + Map revisionMap = InventoryPartApiTest.getInventoryPartRevision(srv, contract, partNo, engChgLevel); //判断是否需要插入到ifs if(revisionMap == null || revisionMap.size() == 0) { throw new RuntimeException("当前版本信息不存在!"); @@ -473,7 +470,7 @@ public class InventoryServiceBeanTest { inData.setIfsRowId(revisionMap.get("IFSROWID")); inData.setIfsRowVersion(revisionMap.get("IFSROWVERSION")); //调用api - InventoryPartApi.removeInventoryPartRevision(srv, inData); + InventoryPartApiTest.removeInventoryPartRevision(srv, inData); //打印日志 logger.info("Inventory Part Revision 删除结束:"+JSON.toJSONString(inData)); } @@ -496,12 +493,12 @@ public class InventoryServiceBeanTest { //递归判断 for(CharacteristicCode characteristic : inDatas) { String characteristicCode = characteristic.getCharacteristicCode(); - Map characteristicMap = InventoryPartApi.getInventoryPartCharacteristicCode(srv, contract, partNo, characteristicCode); + Map characteristicMap = InventoryPartApiTest.getInventoryPartCharacteristicCode(srv, contract, partNo, characteristicCode); if(characteristicMap != null && characteristicMap.size() > 0) { throw new RuntimeException("属性编码已存在!"); } //校验通过继续新增 - Map resultMap = InventoryPartApi.insertInventoryPartCharacteristicCode(srv, characteristic); + Map resultMap = InventoryPartApiTest.insertInventoryPartCharacteristicCode(srv, characteristic); //设置ifs 信息 characteristic.setIfsRowId(resultMap.get("OBJID")); characteristic.setIfsRowVersion(resultMap.get("OBJVERSION")); @@ -527,12 +524,12 @@ public class InventoryServiceBeanTest { //获取连接 Server srv = ifsServer.getIfsServer(username, password); //查询当前物料的属性 先删除物料属性 再删除库存件 - List characteristicList = InventoryPartApi.getInventoryPartCharacteristicCodes(srv, contract, partNo); + List characteristicList = InventoryPartApiTest.getInventoryPartCharacteristicCodes(srv, contract, partNo); //如果存在就批量删掉数据 if(characteristicList != null && characteristicList.size() > 0) { for(CharacteristicCode characteristic : characteristicList) { //一个一个删掉库存件的属性 - InventoryPartApi.removeInventoryPartCharacteristic(srv, characteristic); + InventoryPartApiTest.removeInventoryPartCharacteristic(srv, characteristic); } } logger.info("删除库存件的所有属性结束:"+JSON.toJSONString(inData)); @@ -575,19 +572,19 @@ public class InventoryServiceBeanTest { } //判断库存件是否存在 - InventoryPart inventoryPart = InventoryPartApi.getInventoryPart(srv, contract, partNo); + InventoryPart inventoryPart = InventoryPartApiTest.getInventoryPart(srv, contract, partNo); //如果存在需要删掉 if(inventoryPart != null) { //查询当前物料的属性 先删除物料属性 再删除库存件 - List characteristicCodes = InventoryPartApi.getInventoryPartCharacteristicCodes(srv, contract, partNo); + List characteristicCodes = InventoryPartApiTest.getInventoryPartCharacteristicCodes(srv, contract, partNo); //如果存在就批量删掉数据 if(characteristicCodes.size() > 0) { for(CharacteristicCode characteristic : characteristicCodes) { //一个一个删掉库存件的属性 - InventoryPartApi.removeInventoryPartCharacteristic(srv, characteristic); + InventoryPartApiTest.removeInventoryPartCharacteristic(srv, characteristic); } } - InventoryPartApi.removeInventoryPart(srv, inventoryPart); + InventoryPartApiTest.removeInventoryPart(srv, inventoryPart); } logger.info("删除库存件的关联信息结束:"+JSON.toJSONString(inData)); } @@ -623,10 +620,10 @@ public class InventoryServiceBeanTest { //获取连接 Server srv = ifsServer.getIfsServer(username, password); //调用api方法获取事件的编码 - Map resultMap = InventoryPartApi.getCopyPartEventNo(srv); + Map resultMap = InventoryPartApiTest.getCopyPartEventNo(srv); String eventNo = resultMap.get("EVENT_NO"); //调整选择的接口数据 - List copyPartItems = InventoryPartApi.getCopyPartItemsByEventNo(srv, eventNo); + List copyPartItems = InventoryPartApiTest.getCopyPartItemsByEventNo(srv, eventNo); //循环遍历 for(CopyPartItem copyPartItem : copyPartItems) { String copyDesc = copyPartItem.getCopyDesc(); @@ -635,34 +632,34 @@ public class InventoryServiceBeanTest { //处理Bom的数据都要传 if(copyDesc.indexOf("Manufacturing Structure,") == 0) { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); } //处理Routing的数据都要传 if(copyDesc.indexOf("Manufacturing Routings,") == 0) { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); } //处理master Part数据都要传 if(copyDesc.indexOf("Part Catalog,") == 0 || copyDesc.indexOf("Part,") == 0) { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); } //针对Connected Objects 特殊设置 不确定页面和页签 //库存件 if(copyDesc.equalsIgnoreCase("Inventory Part, Connected Objects")) { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); } //库存件 if(copyDesc.equalsIgnoreCase("Inventory Part, Document Texts")) { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE"); } //销售件 if(copyDesc.equalsIgnoreCase("Sales Part, Connected Objects")) { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); } //针对特殊PLM控制的的数据 设置对应的参数 @@ -671,10 +668,10 @@ public class InventoryServiceBeanTest { //根据plm的设置填充数据 if("Y".equals(copyGeneral)) { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); }else { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE"); } } @@ -683,10 +680,10 @@ public class InventoryServiceBeanTest { //根据plm的设置填充数据 if("Y".equals(copyDefaultLocation)) { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); }else { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE"); } } @@ -695,10 +692,10 @@ public class InventoryServiceBeanTest { //根据plm的设置填充数据 if("Y".equals(copyCharacteristic)) { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); }else { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE"); } } @@ -707,10 +704,10 @@ public class InventoryServiceBeanTest { //根据plm的设置填充数据 if("Y".equals(copyManufacturing)) { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); }else { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE"); } } @@ -719,10 +716,10 @@ public class InventoryServiceBeanTest { //根据plm的设置填充数据 if("Y".equals(copyPPGeneral)) { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); }else { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE"); } } @@ -731,10 +728,10 @@ public class InventoryServiceBeanTest { //根据plm的设置填充数据 if("Y".equals(copyPPDocumentTexts)) { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); }else { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE"); } } @@ -743,10 +740,10 @@ public class InventoryServiceBeanTest { //根据plm的设置填充数据 if("Y".equals(copyPPConnectedObjects)) { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); }else { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE"); } } @@ -755,10 +752,10 @@ public class InventoryServiceBeanTest { //根据plm的设置填充数据 if("Y".equals(copySPPGeneral)) { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); }else { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE"); } } @@ -767,10 +764,10 @@ public class InventoryServiceBeanTest { //根据plm的设置填充数据 if("Y".equals(copySPPDocumentTexts)) { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); }else { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE"); } } @@ -779,10 +776,10 @@ public class InventoryServiceBeanTest { //根据plm的设置填充数据 if("Y".equals(copySPGeneral)) { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); }else { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE"); } } @@ -791,10 +788,10 @@ public class InventoryServiceBeanTest { //根据plm的设置填充数据 if("Y".equals(copySPCharacteristics)) { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); }else { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE"); } } @@ -803,10 +800,10 @@ public class InventoryServiceBeanTest { //根据plm的设置填充数据 if("Y".equals(copySPDocumentTexts)) { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); }else { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE"); } } @@ -815,15 +812,15 @@ public class InventoryServiceBeanTest { //根据plm的设置填充数据 if("Y".equals(copySPLanguageDescription)) { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE"); }else { //调用api设置成 必传 重复不添加 - InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE"); + InventoryPartApiTest.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE"); } } } //执行拷贝的操作 - InventoryPartApi.processIfsCopyPart(srv, oriContract, oriPartNo, contract, partNo, partDesc, "FALSE", eventNo); + InventoryPartApiTest.processIfsCopyPart(srv, oriContract, oriPartNo, contract, partNo, partDesc, "FALSE", eventNo); } diff --git a/src/main/java/com/spring/modules/part/entity/APIEntity/PartIfsInventoryProperty.java b/src/main/java/com/spring/modules/part/entity/APIEntity/PartIfsInventoryProperty.java index a613e1a0..e0b0a6a1 100644 --- a/src/main/java/com/spring/modules/part/entity/APIEntity/PartIfsInventoryProperty.java +++ b/src/main/java/com/spring/modules/part/entity/APIEntity/PartIfsInventoryProperty.java @@ -12,4 +12,7 @@ public class PartIfsInventoryProperty { private String attrValueAlpha; private String unitMeas; private String characteristicType; + //2024-12-18 LR 后加字段 + private String ifsRowId; + private String ifsRowVersion; }