You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

767 lines
35 KiB

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;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;
import java.util.Map;
/**
* @description: 处理库存件的
* @author LR
* @date 2024/12/9 15:44
* @version 1.0
*/
@Component
public class InventoryServiceBean {
@Autowired
private IfsServer ifsServer;
private static final Logger logger = LoggerFactory.getLogger(InventoryServiceBean.class);
/**
* @description: 查询库存件的信息
* @author LR
* @date 2024/12/12 15:49
* @version 1.0
*/
public InventoryPart getInventoryPart(Server srv, InventoryPart inData) throws APException {
logger.info("Inventory Part 查询开始:"+ JSON.toJSONString(inData));
//查询的参数
String contract = inData.getContract();
String partNo = inData.getPartNo();
//获取数据
Map<String, String> partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo);
//判断是否需要插入到ifs
if(partMap == null || partMap.size() == 0) {
throw new RuntimeException("库存件不存在!");
}
//设置ifs 信息
inData.setIfsRowId(partMap.get("IFSROWID"));
inData.setIfsRowVersion(partMap.get("IFSROWVERSION"));
//查询库存件的属性模版
Map<String, String> templateMap = InventoryPartApi.getInventoryPartCharacteristicTemplate(srv, contract, partNo);
//设置模版
inData.setEngAttribute(templateMap.get("ENG_ATTRIBUTE"));
logger.info("Inventory Part 查询结束:"+JSON.toJSONString(inData));
return inData;
}
/**
* @description: 库存件新增
* @author LR
* @date 2024/12/12 15:52
* @version 1.0
*/
public PartIfsInventory syncInventoryPart(Server srv, PartIfsInventory inData) throws APException {
logger.info("Inventory Part 新增开始:"+JSON.toJSONString(inData));
//查询的参数
String contract = inData.getContract();
String partNo = inData.getPartNo();
//获取数据
Map<String, String> partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo);
//判断是否需要插入到ifs
if(partMap == null || partMap.size() == 0) {
//调用api
Map<String, String> resultMap = InventoryPartApi.insertInventoryPart(srv, inData);
//设置ifs 信息
inData.setIfsRowId(resultMap.get("OBJID"));
inData.setIfsRowVersion(resultMap.get("OBJVERSION"));
}else {
throw new RuntimeException("库存件已存在!");
}
//打印日志
logger.info("Inventory Part 新增结束:"+JSON.toJSONString(inData));
//返回结果集
return inData;
}
/**
* @description: 库存件修改
* @author LR
* @date 2024/12/12 15:55
* @version 1.0
*/
public PartIfsInventory modifyInventoryPart(Server srv, PartIfsInventory inData) throws APException {
logger.info("Inventory Part 修改开始:"+JSON.toJSONString(inData));
//查询的参数
String contract = inData.getContract();
String partNo = inData.getPartNo();
//获取数据
Map<String, String> partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo);
//判断是否需要插入到ifs
if(partMap == null || partMap.size() == 0) {
throw new RuntimeException("域:"+contract+"库存件:"+partNo+"不存在!");
}else {
//设置ifs 信息
inData.setIfsRowId(partMap.get("IFSROWID"));
inData.setIfsRowVersion(partMap.get("IFSROWVERSION"));
Map<String, String> resultMap = InventoryPartApi.modifyInventoryPart(srv, inData);
//设置ifs 信息
inData.setIfsRowVersion(resultMap.get("OBJVERSION"));
}
//打印日志
logger.info("Inventory Part 修改结束:"+JSON.toJSONString(inData));
//返回结果集
return inData;
}
/**
* @description: 库存件删除
* @author LR
* @date 2024/12/12 15:58
* @version 1.0
*/
public void removeInventoryPart(Server srv, PartIfsInventory inData) throws APException {
logger.info("Inventory Part 删除开始:"+JSON.toJSONString(inData));
//查询的参数
String contract = inData.getContract();
String partNo = inData.getPartNo();
//获取数据
Map<String, String> partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo);
//判断是否需要插入到ifs
if(partMap == null || partMap.size() == 0) {
throw new RuntimeException("域:"+contract+"库存件:"+partNo+"不存在!");
}else {
//设置ifs 信息
inData.setIfsRowId(partMap.get("IFSROWID"));
inData.setIfsRowVersion(partMap.get("IFSROWVERSION"));
InventoryPartApi.removeInventoryPart(srv, inData);
}
//打印日志
logger.info("Inventory Part 删除结束:"+JSON.toJSONString(inData));
}
/**
* @description: 修改库存件的配置信息
* @author LR
* @date 2024/12/12 16:11
* @version 1.0
*/
public PartIfsInventoryConfig modifyInventoryPartCost(Server srv, PartIfsInventoryConfig inData) throws APException {
logger.info("Inventory Part Cost 修改开始:"+JSON.toJSONString(inData));
//查询的参数
String contract = inData.getContract();
String partNo = inData.getPartNo();
//获取数据
Map<String, String> partMap = InventoryPartApi.getInventoryPartConfig(srv, contract, partNo);
//判断是否需要插入到ifs
if(partMap == null || partMap.size() == 0) {
throw new RuntimeException("域:"+contract+"库存件:"+partNo+"不存在!");
}else {
//设置ifs 信息
inData.setIfsRowId(partMap.get("IFSROWID"));
inData.setIfsRowVersion(partMap.get("IFSROWVERSION"));
Map<String, String> resultMap = InventoryPartApi.modifyInventoryPartCost(srv, inData);
//设置ifs 信息
inData.setIfsRowVersion(resultMap.get("OBJVERSION"));
}
//打印日志
logger.info("Inventory Part Cost 修改结束:"+JSON.toJSONString(inData));
//返回结果集
return inData;
}
/**
* @description: 修改库存件的Plan
* @author LR
* @date 2024/12/12 16:31
* @version 1.0
*/
public PartIfsInventoryPlan modifyInventoryPartPlan(Server srv, PartIfsInventoryPlan inData) throws APException {
logger.info("Inventory Part Plan 修改开始:"+JSON.toJSONString(inData));
//查询的参数
String contract = inData.getContract();
String partNo = inData.getPartNo();
//获取数据
Map<String, String> partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo);
//判断是否需要插入到ifs
if(partMap == null || partMap.size() == 0) {
throw new RuntimeException("域:"+contract+"库存件:"+partNo+"不存在!");
}else {
//获取库存件Plan配置的信息
Map<String, String> planMap = InventoryPartApi.getInventoryPartPlan(srv, contract, partNo);
//设置ifs 信息
inData.setIfsRowId(planMap.get("IFSROWID"));
inData.setIfsRowVersion(planMap.get("IFSROWVERSION"));
Map<String, String> resultMap = InventoryPartApi.modifyInventoryPartPlan(srv, inData);
//设置ifs 信息
inData.setIfsRowVersion(resultMap.get("OBJVERSION"));
}
//打印日志
logger.info("Inventory Part Plan 修改结束:"+JSON.toJSONString(inData));
//返回结果集
return inData;
}
/**
* @description: 批量新增库位
* @author LR
* @date 2024/12/12 16:36
* @version 1.0
*/
public List<PartIfsInventoryLocation> syncInventoryPartLocations(Server srv, List<PartIfsInventoryLocation> inDatas) throws APException {
logger.info("Inventory Part Location 批量新增开始:"+JSON.toJSONString(inDatas));
PartIfsInventoryLocation zeroData = inDatas.get(0);
String contract = zeroData.getContract();
String partNo = zeroData.getPartNo();
//获取数据
Map<String, String> partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo);
//判断是否需要插入到ifs
if(partMap == null || partMap.size() == 0) {
throw new RuntimeException("域:" + contract + "库存件:" + partNo + "不存在!");
}
//编辑处理需要处理的数据
for(PartIfsInventoryLocation inData : inDatas) {
Map<String, String> resultMap = InventoryPartApi.insertInventoryPartLocation(srv, inData);
//设置ifs 信息
inData.setIfsRowId(resultMap.get("OBJID"));
inData.setIfsRowVersion(resultMap.get("OBJVERSION"));
}
logger.info("Inventory Part Location 批量新增结束:"+JSON.toJSONString(inDatas));
//返回结果集
return inDatas;
}
/**
* @description: 删除单个库存件的 Location
* @author LR
* @date 2024/12/12 16:37
* @version 1.0
*/
public void removeInventoryPartLocation(Server srv, PartIfsInventoryLocation inData) throws APException {
logger.info("Inventory Part Location 删除开始:"+JSON.toJSONString(inData));
String contract = inData.getContract();
String partNo = inData.getPartNo();
String locationNo = inData.getLocationNo();
//获取数据
Map<String, String> locationMap = InventoryPartApi.getInventoryPartLocation(srv, contract, partNo, locationNo);
//判断是否需要插入到ifs
if(locationMap == null || locationMap.size() == 0) {
throw new RuntimeException("域:" + contract + "库存件:" + partNo + "库位编码:" + locationNo +"不存在!");
}
//设置ifs 信息
inData.setIfsRowId(locationMap.get("IFSROWID"));
inData.setIfsRowVersion(locationMap.get("IFSROWVERSION"));
InventoryPartApi.removeInventoryPartLocation(srv, inData);
//打印日志
logger.info("Inventory Part Location 删除结束:"+JSON.toJSONString(inData));
}
/**
* @description: 批量删除库位的信息
* @author LR
* @date 2024/12/12 16:42
* @version 1.0
*/
public void removeInventoryPartLocations(Server srv, List<PartIfsInventoryLocation> inDatas) throws APException {
logger.info("Inventory Part Location 批量删除开始:"+JSON.toJSONString(inDatas));
PartIfsInventoryLocation zeroData = inDatas.get(0);
String contract = zeroData.getContract();
String partNo = zeroData.getPartNo();
//循环处理数据
for(PartIfsInventoryLocation inData : inDatas) {
String locationNo = inData.getLocationNo();
//获取库存件Plan配置的信息
Map<String, String> locationMap = InventoryPartApi.getInventoryPartLocation(srv, contract, partNo, locationNo);
//判断是否需要插入到ifs
if(locationMap == null || locationMap.size() == 0) {
throw new RuntimeException("域:" + contract + "库存件:" + partNo + "库位编码:" + locationNo +"不存在!");
}
//设置ifs 信息
inData.setIfsRowId(locationMap.get("IFSROWID"));
inData.setIfsRowVersion(locationMap.get("IFSROWVERSION"));
InventoryPartApi.removeInventoryPartLocation(srv, inData);
}
//打印日志
logger.info("Inventory Part Location 批量删除结束:"+JSON.toJSONString(inDatas));
}
/**
* @description: 修改库存件的Manufacture
* @author LR
* @date 2024/12/12 16:44
* @version 1.0
*/
public PartIfsInventoryManufacture modifyInventoryPartManufacture(Server srv, PartIfsInventoryManufacture inData) throws APException {
logger.info("Inventory Part Manufacture 修改开始:"+JSON.toJSONString(inData));
//公共参数
String contract = inData.getContract();
String partNo = inData.getPartNo();
//查询制造商信息
Map<String, String> manufMap = InventoryPartApi.getInventoryManufacture(srv, contract, partNo);
//判断是否需要插入到ifs
if(manufMap == null || manufMap.size() == 0) {
throw new RuntimeException("域:"+contract+"库存件:"+partNo+"不存在制造商信息!");
}else {
//设置ifs 信息
inData.setIfsRowId(manufMap.get("IFSROWID"));
inData.setIfsRowVersion(manufMap.get("IFSROWVERSION"));
Map<String, String> resultMap = InventoryPartApi.modifyInventoryPartManufacture(srv, inData);
//设置ifs 信息
inData.setIfsRowVersion(resultMap.get("IFSROWVERSION"));
}
//打印日志
logger.info("Inventory Part Manufacture 修改结束:"+JSON.toJSONString(inData));
//返回信息
return inData;
}
/**
* @description: 查询库存件 Revision
* @author LR
* @date 2024/12/12 16:59
* @version 1.0
*/
public PartIfsInventoryRevision getInventoryPartRevision(Server srv, PartIfsInventoryRevision inData) throws APException {
logger.info("Inventory Part Revision 查询开始:"+JSON.toJSONString(inData));
//公共参数
String contract = inData.getContract();
String partNo = inData.getPartNo();
String engChgLevel = inData.getEngChgLevel();
//获取数据
Map<String, String> revisionMap = InventoryPartApi.getInventoryPartRevision(srv, contract, partNo, engChgLevel);
//判断是否需要插入到ifs
if(revisionMap == null) {
throw new RuntimeException("当前版本信息不存在!");
}
//设置ifs 信息
inData.setIfsRowId(revisionMap.get("IFSROWID"));
inData.setIfsRowVersion(revisionMap.get("IFSROWVERSION"));
//打印日志
logger.info("Inventory Part Revision 查询结束:"+JSON.toJSONString(inData));
return inData;
}
/**
* @description: 插入库存件的版本
* @author LR
* @date 2024/12/12 17:03
* @version 1.0
*/
public PartIfsInventoryRevision syncInventoryPartRevision(Server srv, PartIfsInventoryRevision inData) throws APException {
logger.info("Inventory Part Revision 新增开始:"+JSON.toJSONString(inData));
//公共参数
String contract = inData.getContract();
String partNo = inData.getPartNo();
String engChgLevel = inData.getEngChgLevel();
//获取数据
Map<String, String> revisionMap = InventoryPartApi.getInventoryPartRevision(srv, contract, partNo, engChgLevel);
//判断是否需要插入到ifs
if(revisionMap != null) {
throw new RuntimeException("当前版本信息已存在!");
}
//调用新增api
Map<String, String> resultMap = InventoryPartApi.insertInventoryPartRevision(srv, inData);
//设置ifs 信息
inData.setIfsRowId(resultMap.get("OBJID"));
inData.setIfsRowVersion(resultMap.get("OBJVERSION"));
//打印日志
logger.info("Inventory Part Revision 新增结束:"+JSON.toJSONString(inData));
//返回结果
return inData;
}
/**
* @description: 修改库存件的版本
* @author LR
* @date 2024/12/12 17:06
* @version 1.0
*/
public PartIfsInventoryRevision modifyInventoryPartRevision(Server srv, PartIfsInventoryRevision inData) throws APException {
logger.info("Inventory Part Revision 修改开始:"+JSON.toJSONString(inData));
//公共参数
String contract = inData.getContract();
String partNo = inData.getPartNo();
String engChgLevel = inData.getEngChgLevel();
//获取数据
Map<String, String> revisionMap = InventoryPartApi.getInventoryPartRevision(srv, contract, partNo, engChgLevel);
//判断是否需要插入到ifs
if(revisionMap == null || revisionMap.size() == 0) {
throw new RuntimeException("当前版本信息不存在!");
}
//设置ifs 信息
inData.setIfsRowId(revisionMap.get("IFSROWID"));
inData.setIfsRowVersion(revisionMap.get("IFSROWVERSION"));
//调用api
Map<String, String> resultMap = InventoryPartApi.modifyInventoryPartRevision(srv, inData);
//设置ifs 信息
inData.setIfsRowVersion(resultMap.get("OBJVERSION"));
//打印日志
logger.info("Inventory Part Revision 修改结束:"+JSON.toJSONString(inData));
//返回结果
return inData;
}
/**
* @description: 删除库存件 Revision
* @author LR
* @date 2024/12/12 17:07
* @version 1.0
*/
public void removeInventoryPartRevision(Server srv, PartIfsInventoryRevision inData) throws APException {
logger.info("Inventory Part Revision 删除开始:"+JSON.toJSONString(inData));
//公共参数
String contract = inData.getContract();
String partNo = inData.getPartNo();
String engChgLevel = inData.getEngChgLevel();
//获取数据
Map<String, String> revisionMap = InventoryPartApi.getInventoryPartRevision(srv, contract, partNo, engChgLevel);
//判断是否需要插入到ifs
if(revisionMap == null || revisionMap.size() == 0) {
throw new RuntimeException("当前版本信息不存在!");
}
//设置ifs 信息
inData.setIfsRowId(revisionMap.get("IFSROWID"));
inData.setIfsRowVersion(revisionMap.get("IFSROWVERSION"));
//调用api
InventoryPartApi.removeInventoryPartRevision(srv, inData);
//打印日志
logger.info("Inventory Part Revision 删除结束:"+JSON.toJSONString(inData));
}
/**
* @description: 批量新增属性
* @author LR
* @date 2024/12/12 17:23
* @version 1.0
*/
public List<PartIfsInventoryProperty> syncInventoryPartCharacteristics(Server srv, List<PartIfsInventoryProperty> inDatas) throws APException {
logger.info("Inventory Part Characteristic Code 批量新增开始:"+JSON.toJSONString(inDatas));
PartIfsInventoryProperty zeroData = inDatas.get(0);
//公共参数
String contract = zeroData.getContract();
String partNo = zeroData.getPartNo();
//递归判断
for(PartIfsInventoryProperty characteristic : inDatas) {
String characteristicCode = characteristic.getCharacteristicCode();
Map<String, String> characteristicMap = InventoryPartApi.getInventoryPartCharacteristicCode(srv, contract, partNo, characteristicCode);
if(characteristicMap != null && characteristicMap.size() > 0) {
throw new RuntimeException("属性编码已存在!");
}
//校验通过继续新增
Map<String, String> resultMap = InventoryPartApi.insertInventoryPartCharacteristicCode(srv, characteristic);
//设置ifs 信息
characteristic.setIfsRowId(resultMap.get("OBJID"));
characteristic.setIfsRowVersion(resultMap.get("OBJVERSION"));
}
//打印日志
logger.info("Inventory Part Characteristic Code 批量新增结束:"+JSON.toJSONString(inDatas));
return inDatas;
}
/**
* @description: 按照料号删除库存件的属性
* @author LR
* @date 2024/12/12 17:28
* @version 1.0
*/
public void removeInventoryPartCharacteristicsByPartNo(Server srv, InventoryPart inData) throws APException {
logger.info("删除库存件的所有属性开始:"+JSON.toJSONString(inData));
//公共参数
String contract = inData.getContract();
String partNo = inData.getPartNo();
//查询当前物料的属性 先删除物料属性 再删除库存件
List<PartIfsInventoryProperty> characteristicList = InventoryPartApi.getInventoryPartCharacteristicCodes(srv, contract, partNo);
//如果存在就批量删掉数据
if(characteristicList != null && characteristicList.size() > 0) {
for(PartIfsInventoryProperty characteristic : characteristicList) {
//一个一个删掉库存件的属性
InventoryPartApi.removeInventoryPartCharacteristic(srv, characteristic);
}
}
logger.info("删除库存件的所有属性结束:"+JSON.toJSONString(inData));
}
/**
* @description: 删除库存件关联的数据
* @author LR
* @date 2024/12/12 17:38
* @version 1.0
*/
public void removeInventoryPartRelationInfo(Server srv, InventoryPart inData) throws APException {
logger.info("删除库存件的关联信息开始:"+JSON.toJSONString(inData));
//公共参数
String contract = inData.getContract();
String partNo = inData.getPartNo();
//按照条件查询Bom的相关信息 按照海波的要求 删除Bom Header
List<BomHeader> bomHeaders = BomApi.getBomHeadersByPartNo(srv, contract, partNo);
//判断是否存在
if(bomHeaders != null && bomHeaders.size() > 0) {
for(BomHeader bomHeader : bomHeaders) {
//执行删除的操作
BomApi.removeBomHeader(srv, bomHeader);
}
}
//按照条件查询Routing的相关信息 按照海波的要求
List<RoutingHeader> routingHeaders = RoutingApi.getRoutingHeadersByPartNo(srv, contract, partNo);
//判断是否存在
if(routingHeaders != null && routingHeaders.size() > 0) {
for(RoutingHeader routingHeader : routingHeaders) {
//执行删除的操作
RoutingApi.removeRoutingHeader(srv, routingHeader);
}
}
//判断库存件是否存在
PartIfsInventory inventoryPart = InventoryPartApi.getInventoryPart(srv, contract, partNo);
//如果存在需要删掉
if(inventoryPart != null) {
//查询当前物料的属性 先删除物料属性 再删除库存件
List<PartIfsInventoryProperty> characteristicCodes = InventoryPartApi.getInventoryPartCharacteristicCodes(srv, contract, partNo);
//如果存在就批量删掉数据
if(characteristicCodes.size() > 0) {
for(PartIfsInventoryProperty characteristic : characteristicCodes) {
//一个一个删掉库存件的属性
InventoryPartApi.removeInventoryPartCharacteristic(srv, characteristic);
}
}
InventoryPartApi.removeInventoryPart(srv, inventoryPart);
}
logger.info("删除库存件的关联信息结束:"+JSON.toJSONString(inData));
}
/**
* @description: 执行copy part的操作
* @author LR
* @date 2024/12/9 15:51
* @version 1.0
*/
public void syncCopyPartForInventoryPart(Server srv, CopyPart inData) throws APException {
//公共参数
String oriContract = inData.getOriContract();
String oriPartNo = inData.getOriPartNo();
String contract = inData.getContract();
String partNo = inData.getPartNo();
String partDesc = inData.getPartDesc();
String copyGeneral = inData.getCopyGeneral();//对应Inventory Part, General
String copyDefaultLocation = inData.getCopyDefaultLocation(); //Inventory Part, Default Locations
String copyCharacteristic = inData.getCopyCharacteristic(); //Inventory Part, Characteristics
String copyManufacturing = inData.getCopyManufacturing(); //Inventory Part, Manufacturing
String copyPPGeneral = inData.getCopyPPGeneral();//对应Purchase Part, General
String copyPPDocumentTexts = inData.getCopyPPDocumentTexts();//对应Purchase Part, Document Texts
String copyPPConnectedObjects = inData.getCopyPPConnectedObjects();//对应Purchase Part, Connected Objects
String copySPPGeneral = inData.getCopySPPGeneral();//对应Supplier for Purchase Part, General
String copySPPDocumentTexts = inData.getCopySPPDocumentTexts();//对应Supplier for Purchase Part, Document Texts
String copySPGeneral = inData.getCopySPGeneral();//对应Sales Part, General
String copySPCharacteristics = inData.getCopySPCharacteristics();//对应Sales Part, Characteristics
String copySPDocumentTexts = inData.getCopySPDocumentTexts();//对应Sales Part, Document Texts
String copySPLanguageDescription = inData.getCopySPLanguageDescription();//对应Sales Part, Language Description
//调用api方法获取事件的编码
Map<String, String> resultMap = InventoryPartApi.getCopyPartEventNo(srv);
String eventNo = resultMap.get("EVENT_NO");
//调整选择的接口数据
List<CopyPartItem> copyPartItems = InventoryPartApi.getCopyPartItemsByEventNo(srv, eventNo);
//循环遍历
for(CopyPartItem copyPartItem : copyPartItems) {
String copyDesc = copyPartItem.getCopyDesc();
String ifsRowId = copyPartItem.getIfsRowId();
String ifsRowVersion = copyPartItem.getIfsRowVersion();
//处理Bom的数据都要传
if(copyDesc.indexOf("Manufacturing Structure,") == 0) {
//调用api设置成 必传 重复不添加
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE");
}
//处理Routing的数据都要传
if(copyDesc.indexOf("Manufacturing Routings,") == 0) {
//调用api设置成 必传 重复不添加
InventoryPartApi.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");
}
//针对Connected Objects 特殊设置 不确定页面和页签
//库存件
if(copyDesc.equalsIgnoreCase("Inventory Part, Connected Objects")) {
//调用api设置成 必传 重复不添加
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE");
}
//库存件
if(copyDesc.equalsIgnoreCase("Inventory Part, Document Texts")) {
//调用api设置成 必传 重复不添加
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE");
}
//销售件
if(copyDesc.equalsIgnoreCase("Sales Part, Connected Objects")) {
//调用api设置成 必传 重复不添加
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE");
}
//针对特殊PLM控制的的数据 设置对应的参数
//1.Inventory Part, General
if(copyDesc.equalsIgnoreCase("Inventory Part, General")) {
//根据plm的设置填充数据
if("Y".equals(copyGeneral)) {
//调用api设置成 必传 重复不添加
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE");
}else {
//调用api设置成 必传 重复不添加
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE");
}
}
//2.Inventory Part, Default Locations
if(copyDesc.equalsIgnoreCase("Inventory Part, Default Locations")) {
//根据plm的设置填充数据
if("Y".equals(copyDefaultLocation)) {
//调用api设置成 必传 重复不添加
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE");
}else {
//调用api设置成 必传 重复不添加
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE");
}
}
//3.Inventory Part, Characteristics
if(copyDesc.equalsIgnoreCase("Inventory Part, Characteristics")) {
//根据plm的设置填充数据
if("Y".equals(copyCharacteristic)) {
//调用api设置成 必传 重复不添加
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE");
}else {
//调用api设置成 必传 重复不添加
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE");
}
}
//4.Inventory Part, Manufacturing
if(copyDesc.equalsIgnoreCase("Inventory Part, Manufacturing")) {
//根据plm的设置填充数据
if("Y".equals(copyManufacturing)) {
//调用api设置成 必传 重复不添加
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE");
}else {
//调用api设置成 必传 重复不添加
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE");
}
}
//5.Purchase Part, General
if(copyDesc.equalsIgnoreCase("Purchase Part, General")) {
//根据plm的设置填充数据
if("Y".equals(copyPPGeneral)) {
//调用api设置成 必传 重复不添加
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE");
}else {
//调用api设置成 必传 重复不添加
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE");
}
}
//6.Purchase Part, Document Texts
if(copyDesc.equalsIgnoreCase("Purchase Part, Document Texts")) {
//根据plm的设置填充数据
if("Y".equals(copyPPDocumentTexts)) {
//调用api设置成 必传 重复不添加
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE");
}else {
//调用api设置成 必传 重复不添加
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE");
}
}
//7.Purchase Part, Connected Objects
if(copyDesc.equalsIgnoreCase("Purchase Part, Connected Objects")) {
//根据plm的设置填充数据
if("Y".equals(copyPPConnectedObjects)) {
//调用api设置成 必传 重复不添加
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE");
}else {
//调用api设置成 必传 重复不添加
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE");
}
}
//8.Supplier for Purchase Part, General
if(copyDesc.equalsIgnoreCase("Supplier for Purchase Part, General")) {
//根据plm的设置填充数据
if("Y".equals(copySPPGeneral)) {
//调用api设置成 必传 重复不添加
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE");
}else {
//调用api设置成 必传 重复不添加
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE");
}
}
//9.Supplier for Purchase Part, Document Texts
if(copyDesc.equalsIgnoreCase("Supplier for Purchase Part, Document Texts")) {
//根据plm的设置填充数据
if("Y".equals(copySPPDocumentTexts)) {
//调用api设置成 必传 重复不添加
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE");
}else {
//调用api设置成 必传 重复不添加
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE");
}
}
//10.Sales Part, General
if(copyDesc.equalsIgnoreCase("Sales Part, General")) {
//根据plm的设置填充数据
if("Y".equals(copySPGeneral)) {
//调用api设置成 必传 重复不添加
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE");
}else {
//调用api设置成 必传 重复不添加
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE");
}
}
//11.Sales Part, Characteristics
if(copyDesc.equalsIgnoreCase("Sales Part, Characteristics")) {
//根据plm的设置填充数据
if("Y".equals(copySPCharacteristics)) {
//调用api设置成 必传 重复不添加
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE");
}else {
//调用api设置成 必传 重复不添加
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE");
}
}
//12.Sales Part, Document Texts
if(copyDesc.equalsIgnoreCase("Sales Part, Document Texts")) {
//根据plm的设置填充数据
if("Y".equals(copySPDocumentTexts)) {
//调用api设置成 必传 重复不添加
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE");
}else {
//调用api设置成 必传 重复不添加
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE");
}
}
//13.Sales Part, Language Description
if(copyDesc.equalsIgnoreCase("Sales Part, Language Description")) {
//根据plm的设置填充数据
if("Y".equals(copySPLanguageDescription)) {
//调用api设置成 必传 重复不添加
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE");
}else {
//调用api设置成 必传 重复不添加
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE");
}
}
}
//执行拷贝的操作
InventoryPartApi.processIfsCopyPart(srv, oriContract, oriPartNo, contract, partNo, partDesc, "FALSE", eventNo);
}
}