|
|
|
@ -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<String, String> partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo); |
|
|
|
Map<String, String> 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<String, String> templateMap = InventoryPartApi.getInventoryPartCharacteristicTemplate(srv, contract, partNo); |
|
|
|
Map<String, String> 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<String, String> partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo); |
|
|
|
Map<String, String> partMap = InventoryPartApiTest.getInventoryPartByPartNo(srv, contract, partNo); |
|
|
|
//判断是否需要插入到ifs |
|
|
|
if(partMap == null || partMap.size() == 0) { |
|
|
|
//调用api |
|
|
|
Map<String, String> resultMap = InventoryPartApi.insertInventoryPart(srv, inData); |
|
|
|
Map<String, String> 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<String, String> partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo); |
|
|
|
Map<String, String> 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<String, String> resultMap = InventoryPartApi.modifyInventoryPart(srv, inData); |
|
|
|
Map<String, String> 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<String, String> partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo); |
|
|
|
Map<String, String> 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<String, String> partMap = InventoryPartApi.getInventoryPartConfig(srv, contract, partNo); |
|
|
|
Map<String, String> 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<String, String> resultMap = InventoryPartApi.modifyInventoryPartCost(srv, inData); |
|
|
|
Map<String, String> 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<String, String> partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo); |
|
|
|
Map<String, String> partMap = InventoryPartApiTest.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); |
|
|
|
Map<String, String> planMap = InventoryPartApiTest.getInventoryPartPlan(srv, contract, partNo); |
|
|
|
//设置ifs 信息 |
|
|
|
inData.setIfsRowId(planMap.get("IFSROWID")); |
|
|
|
inData.setIfsRowVersion(planMap.get("IFSROWVERSION")); |
|
|
|
Map<String, String> resultMap = InventoryPartApi.modifyInventoryPartPlan(srv, inData); |
|
|
|
Map<String, String> 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<String, String> partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo); |
|
|
|
Map<String, String> partMap = InventoryPartApiTest.getInventoryPartByPartNo(srv, contract, partNo); |
|
|
|
//判断是否需要插入到ifs |
|
|
|
if(partMap == null || partMap.size() == 0) { |
|
|
|
throw new RuntimeException("域:" + contract + "库存件:" + partNo + "不存在!"); |
|
|
|
} |
|
|
|
//编辑处理需要处理的数据 |
|
|
|
for(InventoryPartLocation inData : inDatas) { |
|
|
|
Map<String, String> resultMap = InventoryPartApi.insertInventoryPartLocation(srv, inData); |
|
|
|
Map<String, String> 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<String, String> locationMap = InventoryPartApi.getInventoryPartLocation(srv, contract, partNo, locationNo); |
|
|
|
Map<String, String> 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<String, String> locationMap = InventoryPartApi.getInventoryPartLocation(srv, contract, partNo, locationNo); |
|
|
|
Map<String, String> 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<String, String> manufMap = InventoryPartApi.getInventoryManufacture(srv, contract, partNo); |
|
|
|
Map<String, String> 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<String, String> resultMap = InventoryPartApi.modifyInventoryPartManufacture(srv, inData); |
|
|
|
Map<String, String> 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<String, String> revisionMap = InventoryPartApi.getInventoryPartRevision(srv, contract, partNo, engChgLevel); |
|
|
|
Map<String, String> 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<String, String> revisionMap = InventoryPartApi.getInventoryPartRevision(srv, contract, partNo, engChgLevel); |
|
|
|
Map<String, String> revisionMap = InventoryPartApiTest.getInventoryPartRevision(srv, contract, partNo, engChgLevel); |
|
|
|
//判断是否需要插入到ifs |
|
|
|
if(revisionMap != null) { |
|
|
|
throw new RuntimeException("当前版本信息已存在!"); |
|
|
|
} |
|
|
|
//调用新增api |
|
|
|
Map<String, String> resultMap = InventoryPartApi.insertInventoryPartRevision(srv, inData); |
|
|
|
Map<String, String> 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<String, String> revisionMap = InventoryPartApi.getInventoryPartRevision(srv, contract, partNo, engChgLevel); |
|
|
|
Map<String, String> 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<String, String> resultMap = InventoryPartApi.modifyInventoryPartRevision(srv, inData); |
|
|
|
Map<String, String> 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<String, String> revisionMap = InventoryPartApi.getInventoryPartRevision(srv, contract, partNo, engChgLevel); |
|
|
|
Map<String, String> 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<String, String> characteristicMap = InventoryPartApi.getInventoryPartCharacteristicCode(srv, contract, partNo, characteristicCode); |
|
|
|
Map<String, String> characteristicMap = InventoryPartApiTest.getInventoryPartCharacteristicCode(srv, contract, partNo, characteristicCode); |
|
|
|
if(characteristicMap != null && characteristicMap.size() > 0) { |
|
|
|
throw new RuntimeException("属性编码已存在!"); |
|
|
|
} |
|
|
|
//校验通过继续新增 |
|
|
|
Map<String, String> resultMap = InventoryPartApi.insertInventoryPartCharacteristicCode(srv, characteristic); |
|
|
|
Map<String, String> 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<CharacteristicCode> characteristicList = InventoryPartApi.getInventoryPartCharacteristicCodes(srv, contract, partNo); |
|
|
|
List<CharacteristicCode> 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<CharacteristicCode> characteristicCodes = InventoryPartApi.getInventoryPartCharacteristicCodes(srv, contract, partNo); |
|
|
|
List<CharacteristicCode> 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<String, String> resultMap = InventoryPartApi.getCopyPartEventNo(srv); |
|
|
|
Map<String, String> resultMap = InventoryPartApiTest.getCopyPartEventNo(srv); |
|
|
|
String eventNo = resultMap.get("EVENT_NO"); |
|
|
|
//调整选择的接口数据 |
|
|
|
List<CopyPartItem> copyPartItems = InventoryPartApi.getCopyPartItemsByEventNo(srv, eventNo); |
|
|
|
List<CopyPartItem> 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); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|