17 changed files with 3386 additions and 0 deletions
-
32src/main/java/com/spring/ifs/api/IfsServer.java
-
1061src/main/java/com/spring/ifs/api/InventoryPartApi.java
-
830src/main/java/com/spring/ifs/bean/InventoryServiceBean.java
-
71src/main/java/com/spring/ifs/data/CharacteristicCode.java
-
15src/main/java/com/spring/ifs/data/CharacteristicTemplate.java
-
152src/main/java/com/spring/ifs/data/CopyPart.java
-
90src/main/java/com/spring/ifs/data/CopyPartItem.java
-
52src/main/java/com/spring/ifs/data/IfsParamBean.java
-
294src/main/java/com/spring/ifs/data/InventoryPart.java
-
27src/main/java/com/spring/ifs/data/InventoryPartConfig.java
-
26src/main/java/com/spring/ifs/data/InventoryPartLocation.java
-
134src/main/java/com/spring/ifs/data/InventoryPartManufacture.java
-
81src/main/java/com/spring/ifs/data/InventoryPartPlan.java
-
75src/main/java/com/spring/ifs/data/InventoryPartRevision.java
-
90src/main/java/com/spring/ifs/data/InventoryValue.java
-
176src/main/java/com/spring/ifs/utils/IfsConverterToMap.java
-
180src/main/java/com/spring/ifs/utils/IfsPlsqlUtils.java
@ -0,0 +1,32 @@ |
|||
package com.spring.ifs.api; |
|||
|
|||
import ifs.fnd.ap.Server; |
|||
import org.springframework.beans.factory.annotation.Value; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* @description: 获取IFS Server |
|||
* @author LR |
|||
* @date 2024/12/9 10:57 |
|||
* @version 1.0 |
|||
*/ |
|||
@Component |
|||
public class IfsServer { |
|||
|
|||
@Value("${ifs.target.url}") |
|||
private String ifsTargetUrl; |
|||
|
|||
/** |
|||
* @description: 获取IFS所需的链接 |
|||
* @author LR |
|||
* @date 2024/12/9 11:08 |
|||
* @version 1.0 |
|||
*/ |
|||
public Server getIfsServer(String username, String passWord){ |
|||
Server srv = new Server(); |
|||
srv.setConnectionString(ifsTargetUrl);// 测试期间使用固定配置文件 |
|||
srv.setCredentials(username, passWord);//配置文件 |
|||
return srv; |
|||
} |
|||
|
|||
} |
|||
1061
src/main/java/com/spring/ifs/api/InventoryPartApi.java
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,830 @@ |
|||
package com.spring.ifs.bean; |
|||
|
|||
import com.alibaba.fastjson.JSON; |
|||
import com.spring.ifs.api.*; |
|||
import com.spring.ifs.data.*; |
|||
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(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<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 InventoryPart syncInventoryPart(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<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 InventoryPart modifyInventoryPart(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<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(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<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 InventoryPartConfig modifyInventoryPartCost(InventoryPartConfig 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<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 InventoryPartPlan modifyInventoryPartPlan(InventoryPartPlan 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<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<InventoryPartLocation> syncInventoryPartLocations(List<InventoryPartLocation> 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); |
|||
Map<String, String> partMap = InventoryPartApi.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); |
|||
//设置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(InventoryPartLocation 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<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(List<InventoryPartLocation> 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); |
|||
//循环处理数据 |
|||
for(InventoryPartLocation 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 InventoryPartManufacture modifyInventoryPartManufacture(InventoryPartManufacture 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<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 InventoryPartRevision getInventoryPartRevision(InventoryPartRevision 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<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 InventoryPartRevision syncInventoryPartRevision(InventoryPartRevision 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<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("IFSROWID")); |
|||
inData.setIfsRowVersion(resultMap.get("IFSROWVERSION")); |
|||
//打印日志 |
|||
logger.info("Inventory Part Revision 新增结束:"+JSON.toJSONString(inData)); |
|||
//返回结果 |
|||
return inData; |
|||
} |
|||
|
|||
/** |
|||
* @description: 修改库存件的版本 |
|||
* @author LR |
|||
* @date 2024/12/12 17:06 |
|||
* @version 1.0 |
|||
*/ |
|||
public InventoryPartRevision modifyInventoryPartRevision(InventoryPartRevision 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<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.setIfsRowId(resultMap.get("IFSROWID")); |
|||
inData.setIfsRowVersion(resultMap.get("IFSROWVERSION")); |
|||
//打印日志 |
|||
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(InventoryPartRevision 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<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<CharacteristicCode> syncInventoryPartCharacteristics(List<CharacteristicCode> inDatas) throws APException { |
|||
logger.info("Inventory Part Characteristic Code 批量新增开始:"+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); |
|||
//递归判断 |
|||
for(CharacteristicCode 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("IFSROWID")); |
|||
characteristic.setIfsRowVersion(resultMap.get("IFSROWVERSION")); |
|||
} |
|||
//打印日志 |
|||
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(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<CharacteristicCode> characteristicList = InventoryPartApi.getInventoryPartCharacteristicCodes(srv, contract, partNo); |
|||
//如果存在就批量删掉数据 |
|||
if(characteristicList != null && characteristicList.size() > 0) { |
|||
for(CharacteristicCode 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(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<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); |
|||
} |
|||
} |
|||
|
|||
//判断库存件是否存在 |
|||
InventoryPart inventoryPart = InventoryPartApi.getInventoryPart(srv, contract, partNo); |
|||
//如果存在需要删掉 |
|||
if(inventoryPart != null) { |
|||
//查询当前物料的属性 先删除物料属性 再删除库存件 |
|||
List<CharacteristicCode> characteristicCodes = InventoryPartApi.getInventoryPartCharacteristicCodes(srv, contract, partNo); |
|||
//如果存在就批量删掉数据 |
|||
if(characteristicCodes.size() > 0) { |
|||
for(CharacteristicCode 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(CopyPart inData) throws APException { |
|||
//公共参数 |
|||
String username = inData.getIfsUsername(); |
|||
String password = inData.getIfsPassword(); |
|||
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 |
|||
//获取连接 |
|||
Server srv = ifsServer.getIfsServer(username, password); |
|||
//调用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); |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,71 @@ |
|||
package com.spring.ifs.data; |
|||
|
|||
/** |
|||
* |
|||
* @ClassName: CharacteristicCodeData |
|||
* @Description:属性类 |
|||
* @author: LR |
|||
* @date: 2024年10月20日 下午5:35:05 |
|||
* @Copyright: |
|||
*/ |
|||
public class CharacteristicCode extends PartCatalog { |
|||
private String characteristicCode; |
|||
private String characteristicDesc; |
|||
private String attrValueNumeric; |
|||
private String attrValueAlpha; |
|||
private String unitMeas; |
|||
private String characteristicType; |
|||
|
|||
public CharacteristicCode() { |
|||
super(); |
|||
} |
|||
|
|||
public String getCharacteristicCode() { |
|||
return characteristicCode; |
|||
} |
|||
|
|||
public void setCharacteristicCode(String characteristicCode) { |
|||
this.characteristicCode = characteristicCode; |
|||
} |
|||
|
|||
public String getCharacteristicDesc() { |
|||
return characteristicDesc; |
|||
} |
|||
|
|||
public void setCharacteristicDesc(String characteristicDesc) { |
|||
this.characteristicDesc = characteristicDesc; |
|||
} |
|||
|
|||
public String getAttrValueNumeric() { |
|||
return attrValueNumeric; |
|||
} |
|||
|
|||
public void setAttrValueNumeric(String attrValueNumeric) { |
|||
this.attrValueNumeric = attrValueNumeric; |
|||
} |
|||
|
|||
public String getAttrValueAlpha() { |
|||
return attrValueAlpha; |
|||
} |
|||
|
|||
public void setAttrValueAlpha(String attrValueAlpha) { |
|||
this.attrValueAlpha = attrValueAlpha; |
|||
} |
|||
|
|||
public String getUnitMeas() { |
|||
return unitMeas; |
|||
} |
|||
|
|||
public void setUnitMeas(String unitMeas) { |
|||
this.unitMeas = unitMeas; |
|||
} |
|||
|
|||
public String getCharacteristicType() { |
|||
return characteristicType; |
|||
} |
|||
|
|||
public void setCharacteristicType(String characteristicType) { |
|||
this.characteristicType = characteristicType; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,15 @@ |
|||
package com.spring.ifs.data; |
|||
|
|||
/** |
|||
* @description: 库存件 |
|||
* @author LR |
|||
* @date 2024/12/11 9:53 |
|||
* @version 1.0 |
|||
*/ |
|||
public class CharacteristicTemplate extends InventoryPart { |
|||
|
|||
public CharacteristicTemplate() { |
|||
} |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,152 @@ |
|||
package com.spring.ifs.data; |
|||
|
|||
/** |
|||
* |
|||
* @ClassName: CopyPart |
|||
* @Description: CopyPart功能使用 |
|||
* @author: LR |
|||
* @date: 2024年11月25日 上午9:25:50 |
|||
* @Copyright: |
|||
*/ |
|||
public class CopyPart extends PartCatalog { |
|||
private String oriContract;// |
|||
private String oriPartNo;// |
|||
private String copyGeneral;//对应Inventory Part, General |
|||
private String copyDefaultLocation; //Inventory Part, Default Locations |
|||
private String copyCharacteristic; //Inventory Part, Characteristics |
|||
private String copyManufacturing; //Inventory Part, Manufacturing |
|||
private String copyPPGeneral;//对应Purchase Part, General |
|||
private String copyPPDocumentTexts;//对应Purchase Part, Document Texts |
|||
private String copyPPConnectedObjects;//对应Purchase Part, Connected Objects |
|||
private String copySPPGeneral;//对应Supplier for Purchase Part, General |
|||
private String copySPPDocumentTexts;//对应Supplier for Purchase Part, Document Texts |
|||
private String copySPGeneral;//对应Sales Part, General |
|||
private String copySPCharacteristics;//对应Sales Part, Characteristics |
|||
private String copySPDocumentTexts;//对应Sales Part, Document Texts |
|||
private String copySPLanguageDescription;//对应Sales Part, Language Description |
|||
|
|||
public CopyPart() { |
|||
super(); |
|||
} |
|||
|
|||
public String getOriContract() { |
|||
return oriContract; |
|||
} |
|||
|
|||
public void setOriContract(String oriContract) { |
|||
this.oriContract = oriContract; |
|||
} |
|||
|
|||
public String getOriPartNo() { |
|||
return oriPartNo; |
|||
} |
|||
|
|||
public void setOriPartNo(String oriPartNo) { |
|||
this.oriPartNo = oriPartNo; |
|||
} |
|||
|
|||
public String getCopyGeneral() { |
|||
return copyGeneral; |
|||
} |
|||
|
|||
public void setCopyGeneral(String copyGeneral) { |
|||
this.copyGeneral = copyGeneral; |
|||
} |
|||
|
|||
public String getCopyDefaultLocation() { |
|||
return copyDefaultLocation; |
|||
} |
|||
|
|||
public void setCopyDefaultLocation(String copyDefaultLocation) { |
|||
this.copyDefaultLocation = copyDefaultLocation; |
|||
} |
|||
|
|||
public String getCopyCharacteristic() { |
|||
return copyCharacteristic; |
|||
} |
|||
|
|||
public void setCopyCharacteristic(String copyCharacteristic) { |
|||
this.copyCharacteristic = copyCharacteristic; |
|||
} |
|||
|
|||
public String getCopyManufacturing() { |
|||
return copyManufacturing; |
|||
} |
|||
|
|||
public void setCopyManufacturing(String copyManufacturing) { |
|||
this.copyManufacturing = copyManufacturing; |
|||
} |
|||
|
|||
public String getCopyPPGeneral() { |
|||
return copyPPGeneral; |
|||
} |
|||
|
|||
public void setCopyPPGeneral(String copyPPGeneral) { |
|||
this.copyPPGeneral = copyPPGeneral; |
|||
} |
|||
|
|||
public String getCopyPPDocumentTexts() { |
|||
return copyPPDocumentTexts; |
|||
} |
|||
|
|||
public void setCopyPPDocumentTexts(String copyPPDocumentTexts) { |
|||
this.copyPPDocumentTexts = copyPPDocumentTexts; |
|||
} |
|||
|
|||
public String getCopyPPConnectedObjects() { |
|||
return copyPPConnectedObjects; |
|||
} |
|||
|
|||
public void setCopyPPConnectedObjects(String copyPPConnectedObjects) { |
|||
this.copyPPConnectedObjects = copyPPConnectedObjects; |
|||
} |
|||
|
|||
public String getCopySPPGeneral() { |
|||
return copySPPGeneral; |
|||
} |
|||
|
|||
public void setCopySPPGeneral(String copySPPGeneral) { |
|||
this.copySPPGeneral = copySPPGeneral; |
|||
} |
|||
|
|||
public String getCopySPPDocumentTexts() { |
|||
return copySPPDocumentTexts; |
|||
} |
|||
|
|||
public void setCopySPPDocumentTexts(String copySPPDocumentTexts) { |
|||
this.copySPPDocumentTexts = copySPPDocumentTexts; |
|||
} |
|||
|
|||
public String getCopySPGeneral() { |
|||
return copySPGeneral; |
|||
} |
|||
|
|||
public void setCopySPGeneral(String copySPGeneral) { |
|||
this.copySPGeneral = copySPGeneral; |
|||
} |
|||
|
|||
public String getCopySPCharacteristics() { |
|||
return copySPCharacteristics; |
|||
} |
|||
|
|||
public void setCopySPCharacteristics(String copySPCharacteristics) { |
|||
this.copySPCharacteristics = copySPCharacteristics; |
|||
} |
|||
|
|||
public String getCopySPDocumentTexts() { |
|||
return copySPDocumentTexts; |
|||
} |
|||
|
|||
public void setCopySPDocumentTexts(String copySPDocumentTexts) { |
|||
this.copySPDocumentTexts = copySPDocumentTexts; |
|||
} |
|||
|
|||
public String getCopySPLanguageDescription() { |
|||
return copySPLanguageDescription; |
|||
} |
|||
|
|||
public void setCopySPLanguageDescription(String copySPLanguageDescription) { |
|||
this.copySPLanguageDescription = copySPLanguageDescription; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,90 @@ |
|||
package com.spring.ifs.data; |
|||
|
|||
/** |
|||
* |
|||
* @ClassName: CopyPartItemData |
|||
* @Description:查询复制物料的明细控制明细 |
|||
* @author: LR |
|||
* @date: 2024年11月26日 上午11:26:18 |
|||
* @Copyright: |
|||
*/ |
|||
public class CopyPartItem { |
|||
private String ifsRowId; |
|||
private String ifsRowVersion; |
|||
private String enabledDb; |
|||
private String copyDesc; |
|||
private String cancelWhenNoSourceDb; |
|||
private String cancelWhenExistingCopyDb; |
|||
private String datasetId; |
|||
private String module; |
|||
|
|||
public CopyPartItem() { |
|||
super(); |
|||
// TODO Auto-generated constructor stub |
|||
} |
|||
|
|||
public String getIfsRowId() { |
|||
return ifsRowId; |
|||
} |
|||
|
|||
public void setIfsRowId(String ifsRowId) { |
|||
this.ifsRowId = ifsRowId; |
|||
} |
|||
|
|||
public String getIfsRowVersion() { |
|||
return ifsRowVersion; |
|||
} |
|||
|
|||
public void setIfsRowVersion(String ifsRowVersion) { |
|||
this.ifsRowVersion = ifsRowVersion; |
|||
} |
|||
|
|||
public String getEnabledDb() { |
|||
return enabledDb; |
|||
} |
|||
|
|||
public void setEnabledDb(String enabledDb) { |
|||
this.enabledDb = enabledDb; |
|||
} |
|||
|
|||
public String getCopyDesc() { |
|||
return copyDesc; |
|||
} |
|||
|
|||
public void setCopyDesc(String copyDesc) { |
|||
this.copyDesc = copyDesc; |
|||
} |
|||
|
|||
public String getCancelWhenNoSourceDb() { |
|||
return cancelWhenNoSourceDb; |
|||
} |
|||
|
|||
public void setCancelWhenNoSourceDb(String cancelWhenNoSourceDb) { |
|||
this.cancelWhenNoSourceDb = cancelWhenNoSourceDb; |
|||
} |
|||
|
|||
public String getCancelWhenExistingCopyDb() { |
|||
return cancelWhenExistingCopyDb; |
|||
} |
|||
|
|||
public void setCancelWhenExistingCopyDb(String cancelWhenExistingCopyDb) { |
|||
this.cancelWhenExistingCopyDb = cancelWhenExistingCopyDb; |
|||
} |
|||
|
|||
public String getDatasetId() { |
|||
return datasetId; |
|||
} |
|||
|
|||
public void setDatasetId(String datasetId) { |
|||
this.datasetId = datasetId; |
|||
} |
|||
|
|||
public String getModule() { |
|||
return module; |
|||
} |
|||
|
|||
public void setModule(String module) { |
|||
this.module = module; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,52 @@ |
|||
package com.spring.ifs.data; |
|||
|
|||
/** |
|||
* |
|||
* @ClassName: InParamBean |
|||
* @Description:入参控制类 |
|||
* @author: LR |
|||
* @date: 2024年12月10日 下午4:05:11 |
|||
* @Copyright: |
|||
*/ |
|||
public class IfsParamBean { |
|||
private String columnName; |
|||
private String columnType; |
|||
private String columnValue; |
|||
|
|||
public IfsParamBean() { |
|||
super(); |
|||
// TODO Auto-generated constructor stub |
|||
} |
|||
|
|||
public IfsParamBean(String columnName, String columnType, String columnValue) { |
|||
super(); |
|||
this.columnName = columnName; |
|||
this.columnType = columnType; |
|||
this.columnValue = columnValue; |
|||
} |
|||
|
|||
public String getColumnName() { |
|||
return columnName; |
|||
} |
|||
|
|||
public void setColumnName(String columnName) { |
|||
this.columnName = columnName; |
|||
} |
|||
|
|||
public String getColumnType() { |
|||
return columnType; |
|||
} |
|||
|
|||
public void setColumnType(String columnType) { |
|||
this.columnType = columnType; |
|||
} |
|||
|
|||
public String getColumnValue() { |
|||
return columnValue; |
|||
} |
|||
|
|||
public void setColumnValue(String columnValue) { |
|||
this.columnValue = columnValue; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,294 @@ |
|||
package com.spring.ifs.data; |
|||
|
|||
/** |
|||
* @description: 库存件 |
|||
* @author LR |
|||
* @date 2024/12/11 9:53 |
|||
* @version 1.0 |
|||
*/ |
|||
public class InventoryPart extends PartCatalog { |
|||
private String typeCode;// 大分类 |
|||
private String plannerBuyer;// 计划购买人员 |
|||
private String unitMeas;// 单位 |
|||
private String primeCommodity;// |
|||
private String secondCommodity;// |
|||
private String assetClass;// |
|||
private String partStatus;// 状态 |
|||
private String abcClass;// 状态 |
|||
private String hazardCode;// |
|||
private String accountingGroup;// 商品属性编码 |
|||
private String partProductCode;// 产品代码 |
|||
private String partProductFamily;// 分类 |
|||
private String typeDesignation;// 类型标识 |
|||
private String dimQuality;// 功能 |
|||
private String noteText;// 备注 |
|||
private String leadTimeCode;// |
|||
private String manufLeadtime;// |
|||
private String expectedLeadtime;// |
|||
private String countryOfOrigin;// 国家 |
|||
private String regionOfOrigin;// 产地区域 |
|||
private String customsStatNo;// |
|||
private String intrastatConvFactor;// |
|||
private String durabilityDay;// |
|||
private String inventoryValuationMethod;// |
|||
private String inventoryPartCostLevel;// |
|||
private String invoiceConsideration;// |
|||
private String zeroCostFlag;// |
|||
private String partCostGroupId;// |
|||
private String engAttribute;// 库存件的属性模版 |
|||
private String engChgLevel;// |
|||
private String bomType; |
|||
|
|||
public InventoryPart() { |
|||
super(); |
|||
} |
|||
|
|||
public String getTypeCode() { |
|||
return typeCode; |
|||
} |
|||
|
|||
public void setTypeCode(String typeCode) { |
|||
this.typeCode = typeCode; |
|||
} |
|||
|
|||
public String getPlannerBuyer() { |
|||
return plannerBuyer; |
|||
} |
|||
|
|||
public void setPlannerBuyer(String plannerBuyer) { |
|||
this.plannerBuyer = plannerBuyer; |
|||
} |
|||
|
|||
public String getUnitMeas() { |
|||
return unitMeas; |
|||
} |
|||
|
|||
public void setUnitMeas(String unitMeas) { |
|||
this.unitMeas = unitMeas; |
|||
} |
|||
|
|||
public String getPrimeCommodity() { |
|||
return primeCommodity; |
|||
} |
|||
|
|||
public void setPrimeCommodity(String primeCommodity) { |
|||
this.primeCommodity = primeCommodity; |
|||
} |
|||
|
|||
public String getSecondCommodity() { |
|||
return secondCommodity; |
|||
} |
|||
|
|||
public void setSecondCommodity(String secondCommodity) { |
|||
this.secondCommodity = secondCommodity; |
|||
} |
|||
|
|||
public String getAssetClass() { |
|||
return assetClass; |
|||
} |
|||
|
|||
public void setAssetClass(String assetClass) { |
|||
this.assetClass = assetClass; |
|||
} |
|||
|
|||
public String getPartStatus() { |
|||
return partStatus; |
|||
} |
|||
|
|||
public void setPartStatus(String partStatus) { |
|||
this.partStatus = partStatus; |
|||
} |
|||
|
|||
public String getAbcClass() { |
|||
return abcClass; |
|||
} |
|||
|
|||
public void setAbcClass(String abcClass) { |
|||
this.abcClass = abcClass; |
|||
} |
|||
|
|||
public String getHazardCode() { |
|||
return hazardCode; |
|||
} |
|||
|
|||
public void setHazardCode(String hazardCode) { |
|||
this.hazardCode = hazardCode; |
|||
} |
|||
|
|||
public String getAccountingGroup() { |
|||
return accountingGroup; |
|||
} |
|||
|
|||
public void setAccountingGroup(String accountingGroup) { |
|||
this.accountingGroup = accountingGroup; |
|||
} |
|||
|
|||
public String getPartProductCode() { |
|||
return partProductCode; |
|||
} |
|||
|
|||
public void setPartProductCode(String partProductCode) { |
|||
this.partProductCode = partProductCode; |
|||
} |
|||
|
|||
public String getPartProductFamily() { |
|||
return partProductFamily; |
|||
} |
|||
|
|||
public void setPartProductFamily(String partProductFamily) { |
|||
this.partProductFamily = partProductFamily; |
|||
} |
|||
|
|||
public String getTypeDesignation() { |
|||
return typeDesignation; |
|||
} |
|||
|
|||
public void setTypeDesignation(String typeDesignation) { |
|||
this.typeDesignation = typeDesignation; |
|||
} |
|||
|
|||
public String getDimQuality() { |
|||
return dimQuality; |
|||
} |
|||
|
|||
public void setDimQuality(String dimQuality) { |
|||
this.dimQuality = dimQuality; |
|||
} |
|||
|
|||
public String getNoteText() { |
|||
return noteText; |
|||
} |
|||
|
|||
public void setNoteText(String noteText) { |
|||
this.noteText = noteText; |
|||
} |
|||
|
|||
public String getLeadTimeCode() { |
|||
return leadTimeCode; |
|||
} |
|||
|
|||
public void setLeadTimeCode(String leadTimeCode) { |
|||
this.leadTimeCode = leadTimeCode; |
|||
} |
|||
|
|||
public String getManufLeadtime() { |
|||
return manufLeadtime; |
|||
} |
|||
|
|||
public void setManufLeadtime(String manufLeadtime) { |
|||
this.manufLeadtime = manufLeadtime; |
|||
} |
|||
|
|||
public String getExpectedLeadtime() { |
|||
return expectedLeadtime; |
|||
} |
|||
|
|||
public void setExpectedLeadtime(String expectedLeadtime) { |
|||
this.expectedLeadtime = expectedLeadtime; |
|||
} |
|||
|
|||
public String getCountryOfOrigin() { |
|||
return countryOfOrigin; |
|||
} |
|||
|
|||
public void setCountryOfOrigin(String countryOfOrigin) { |
|||
this.countryOfOrigin = countryOfOrigin; |
|||
} |
|||
|
|||
public String getRegionOfOrigin() { |
|||
return regionOfOrigin; |
|||
} |
|||
|
|||
public void setRegionOfOrigin(String regionOfOrigin) { |
|||
this.regionOfOrigin = regionOfOrigin; |
|||
} |
|||
|
|||
public String getCustomsStatNo() { |
|||
return customsStatNo; |
|||
} |
|||
|
|||
public void setCustomsStatNo(String customsStatNo) { |
|||
this.customsStatNo = customsStatNo; |
|||
} |
|||
|
|||
public String getIntrastatConvFactor() { |
|||
return intrastatConvFactor; |
|||
} |
|||
|
|||
public void setIntrastatConvFactor(String intrastatConvFactor) { |
|||
this.intrastatConvFactor = intrastatConvFactor; |
|||
} |
|||
|
|||
public String getDurabilityDay() { |
|||
return durabilityDay; |
|||
} |
|||
|
|||
public void setDurabilityDay(String durabilityDay) { |
|||
this.durabilityDay = durabilityDay; |
|||
} |
|||
|
|||
public String getInventoryValuationMethod() { |
|||
return inventoryValuationMethod; |
|||
} |
|||
|
|||
public void setInventoryValuationMethod(String inventoryValuationMethod) { |
|||
this.inventoryValuationMethod = inventoryValuationMethod; |
|||
} |
|||
|
|||
public String getInventoryPartCostLevel() { |
|||
return inventoryPartCostLevel; |
|||
} |
|||
|
|||
public void setInventoryPartCostLevel(String inventoryPartCostLevel) { |
|||
this.inventoryPartCostLevel = inventoryPartCostLevel; |
|||
} |
|||
|
|||
public String getInvoiceConsideration() { |
|||
return invoiceConsideration; |
|||
} |
|||
|
|||
public void setInvoiceConsideration(String invoiceConsideration) { |
|||
this.invoiceConsideration = invoiceConsideration; |
|||
} |
|||
|
|||
public String getZeroCostFlag() { |
|||
return zeroCostFlag; |
|||
} |
|||
|
|||
public void setZeroCostFlag(String zeroCostFlag) { |
|||
this.zeroCostFlag = zeroCostFlag; |
|||
} |
|||
|
|||
public String getPartCostGroupId() { |
|||
return partCostGroupId; |
|||
} |
|||
|
|||
public void setPartCostGroupId(String partCostGroupId) { |
|||
this.partCostGroupId = partCostGroupId; |
|||
} |
|||
|
|||
public String getEngAttribute() { |
|||
return engAttribute; |
|||
} |
|||
|
|||
public void setEngAttribute(String engAttribute) { |
|||
this.engAttribute = engAttribute; |
|||
} |
|||
|
|||
public String getEngChgLevel() { |
|||
return engChgLevel; |
|||
} |
|||
|
|||
public void setEngChgLevel(String engChgLevel) { |
|||
this.engChgLevel = engChgLevel; |
|||
} |
|||
|
|||
public String getBomType() { |
|||
return bomType; |
|||
} |
|||
|
|||
public void setBomType(String bomType) { |
|||
this.bomType = bomType; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,27 @@ |
|||
package com.spring.ifs.data; |
|||
|
|||
public class InventoryPartConfig extends PartCatalog { |
|||
private String configurationId;// |
|||
private String estimatedMaterialCost;// |
|||
|
|||
public InventoryPartConfig() { |
|||
super(); |
|||
} |
|||
|
|||
public String getConfigurationId() { |
|||
return configurationId; |
|||
} |
|||
|
|||
public void setConfigurationId(String configurationId) { |
|||
this.configurationId = configurationId; |
|||
} |
|||
|
|||
public String getEstimatedMaterialCost() { |
|||
return estimatedMaterialCost; |
|||
} |
|||
|
|||
public void setEstimatedMaterialCost(String estimatedMaterialCost) { |
|||
this.estimatedMaterialCost = estimatedMaterialCost; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,26 @@ |
|||
package com.spring.ifs.data; |
|||
|
|||
public class InventoryPartLocation extends PartCatalog { |
|||
private String locationNo; // |
|||
private String locationType; // |
|||
|
|||
public InventoryPartLocation() { |
|||
} |
|||
|
|||
public String getLocationNo() { |
|||
return locationNo; |
|||
} |
|||
|
|||
public void setLocationNo(String locationNo) { |
|||
this.locationNo = locationNo; |
|||
} |
|||
|
|||
public String getLocationType() { |
|||
return locationType; |
|||
} |
|||
|
|||
public void setLocationType(String locationType) { |
|||
this.locationType = locationType; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,134 @@ |
|||
package com.spring.ifs.data; |
|||
|
|||
public class InventoryPartManufacture extends PartCatalog { |
|||
private String cumLeadtime; // |
|||
private String unprotectedLeadTime; // |
|||
private String fixedLeadtimeDay; // |
|||
private String variableLeadtimeDay; // |
|||
private String fixedLeadtimeHour; // |
|||
private String variableLeadtimeHour; // |
|||
private String backflushPart; // |
|||
private String issueType; // |
|||
private String overReporting; // |
|||
private String overReportTolerance; // |
|||
private String byProdAsSupplyInMrpDb; // |
|||
private String mrpControlFlagDb; // |
|||
private String useTheoriticalDensityDb; // |
|||
private String density; // |
|||
|
|||
public InventoryPartManufacture() { |
|||
} |
|||
|
|||
public String getCumLeadtime() { |
|||
return cumLeadtime; |
|||
} |
|||
|
|||
public void setCumLeadtime(String cumLeadtime) { |
|||
this.cumLeadtime = cumLeadtime; |
|||
} |
|||
|
|||
public String getUnprotectedLeadTime() { |
|||
return unprotectedLeadTime; |
|||
} |
|||
|
|||
public void setUnprotectedLeadTime(String unprotectedLeadTime) { |
|||
this.unprotectedLeadTime = unprotectedLeadTime; |
|||
} |
|||
|
|||
public String getFixedLeadtimeDay() { |
|||
return fixedLeadtimeDay; |
|||
} |
|||
|
|||
public void setFixedLeadtimeDay(String fixedLeadtimeDay) { |
|||
this.fixedLeadtimeDay = fixedLeadtimeDay; |
|||
} |
|||
|
|||
public String getVariableLeadtimeDay() { |
|||
return variableLeadtimeDay; |
|||
} |
|||
|
|||
public void setVariableLeadtimeDay(String variableLeadtimeDay) { |
|||
this.variableLeadtimeDay = variableLeadtimeDay; |
|||
} |
|||
|
|||
public String getFixedLeadtimeHour() { |
|||
return fixedLeadtimeHour; |
|||
} |
|||
|
|||
public void setFixedLeadtimeHour(String fixedLeadtimeHour) { |
|||
this.fixedLeadtimeHour = fixedLeadtimeHour; |
|||
} |
|||
|
|||
public String getVariableLeadtimeHour() { |
|||
return variableLeadtimeHour; |
|||
} |
|||
|
|||
public void setVariableLeadtimeHour(String variableLeadtimeHour) { |
|||
this.variableLeadtimeHour = variableLeadtimeHour; |
|||
} |
|||
|
|||
public String getBackflushPart() { |
|||
return backflushPart; |
|||
} |
|||
|
|||
public void setBackflushPart(String backflushPart) { |
|||
this.backflushPart = backflushPart; |
|||
} |
|||
|
|||
public String getIssueType() { |
|||
return issueType; |
|||
} |
|||
|
|||
public void setIssueType(String issueType) { |
|||
this.issueType = issueType; |
|||
} |
|||
|
|||
public String getOverReporting() { |
|||
return overReporting; |
|||
} |
|||
|
|||
public void setOverReporting(String overReporting) { |
|||
this.overReporting = overReporting; |
|||
} |
|||
|
|||
public String getOverReportTolerance() { |
|||
return overReportTolerance; |
|||
} |
|||
|
|||
public void setOverReportTolerance(String overReportTolerance) { |
|||
this.overReportTolerance = overReportTolerance; |
|||
} |
|||
|
|||
public String getByProdAsSupplyInMrpDb() { |
|||
return byProdAsSupplyInMrpDb; |
|||
} |
|||
|
|||
public void setByProdAsSupplyInMrpDb(String byProdAsSupplyInMrpDb) { |
|||
this.byProdAsSupplyInMrpDb = byProdAsSupplyInMrpDb; |
|||
} |
|||
|
|||
public String getMrpControlFlagDb() { |
|||
return mrpControlFlagDb; |
|||
} |
|||
|
|||
public void setMrpControlFlagDb(String mrpControlFlagDb) { |
|||
this.mrpControlFlagDb = mrpControlFlagDb; |
|||
} |
|||
|
|||
public String getUseTheoriticalDensityDb() { |
|||
return useTheoriticalDensityDb; |
|||
} |
|||
|
|||
public void setUseTheoriticalDensityDb(String useTheoriticalDensityDb) { |
|||
this.useTheoriticalDensityDb = useTheoriticalDensityDb; |
|||
} |
|||
|
|||
public String getDensity() { |
|||
return density; |
|||
} |
|||
|
|||
public void setDensity(String density) { |
|||
this.density = density; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,81 @@ |
|||
package com.spring.ifs.data; |
|||
|
|||
public class InventoryPartPlan extends PartCatalog { |
|||
private String planningMethod; // |
|||
private String safetyStock; // |
|||
private String safetyLeadTime; // |
|||
private String minOrderQty; // |
|||
private String maxOrderQty; // |
|||
private String mulOrderQty; // |
|||
private String shrinkageFac; // |
|||
private String stdOrderSize; // |
|||
|
|||
public InventoryPartPlan() { |
|||
super(); |
|||
} |
|||
|
|||
public String getPlanningMethod() { |
|||
return planningMethod; |
|||
} |
|||
|
|||
public void setPlanningMethod(String planningMethod) { |
|||
this.planningMethod = planningMethod; |
|||
} |
|||
|
|||
public String getSafetyStock() { |
|||
return safetyStock; |
|||
} |
|||
|
|||
public void setSafetyStock(String safetyStock) { |
|||
this.safetyStock = safetyStock; |
|||
} |
|||
|
|||
public String getSafetyLeadTime() { |
|||
return safetyLeadTime; |
|||
} |
|||
|
|||
public void setSafetyLeadTime(String safetyLeadTime) { |
|||
this.safetyLeadTime = safetyLeadTime; |
|||
} |
|||
|
|||
public String getMinOrderQty() { |
|||
return minOrderQty; |
|||
} |
|||
|
|||
public void setMinOrderQty(String minOrderQty) { |
|||
this.minOrderQty = minOrderQty; |
|||
} |
|||
|
|||
public String getMaxOrderQty() { |
|||
return maxOrderQty; |
|||
} |
|||
|
|||
public void setMaxOrderQty(String maxOrderQty) { |
|||
this.maxOrderQty = maxOrderQty; |
|||
} |
|||
|
|||
public String getMulOrderQty() { |
|||
return mulOrderQty; |
|||
} |
|||
|
|||
public void setMulOrderQty(String mulOrderQty) { |
|||
this.mulOrderQty = mulOrderQty; |
|||
} |
|||
|
|||
public String getShrinkageFac() { |
|||
return shrinkageFac; |
|||
} |
|||
|
|||
public void setShrinkageFac(String shrinkageFac) { |
|||
this.shrinkageFac = shrinkageFac; |
|||
} |
|||
|
|||
public String getStdOrderSize() { |
|||
return stdOrderSize; |
|||
} |
|||
|
|||
public void setStdOrderSize(String stdOrderSize) { |
|||
this.stdOrderSize = stdOrderSize; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,75 @@ |
|||
package com.spring.ifs.data; |
|||
|
|||
public class InventoryPartRevision extends PartCatalog { |
|||
private String engChgLevel; // |
|||
private String revisionText;// |
|||
private String effPhaseInDate; // 启用时间 |
|||
private String effPhaseOutDate; // 失效时间 |
|||
private String engRevision; // |
|||
private String engRevisionDesc; // |
|||
|
|||
public InventoryPartRevision() { |
|||
super(); |
|||
} |
|||
|
|||
|
|||
public String getEngChgLevel() { |
|||
return engChgLevel; |
|||
} |
|||
|
|||
|
|||
public void setEngChgLevel(String engChgLevel) { |
|||
this.engChgLevel = engChgLevel; |
|||
} |
|||
|
|||
|
|||
public String getRevisionText() { |
|||
return revisionText; |
|||
} |
|||
|
|||
|
|||
public void setRevisionText(String revisionText) { |
|||
this.revisionText = revisionText; |
|||
} |
|||
|
|||
|
|||
public String getEffPhaseInDate() { |
|||
return effPhaseInDate; |
|||
} |
|||
|
|||
|
|||
public void setEffPhaseInDate(String effPhaseInDate) { |
|||
this.effPhaseInDate = effPhaseInDate; |
|||
} |
|||
|
|||
|
|||
public String getEffPhaseOutDate() { |
|||
return effPhaseOutDate; |
|||
} |
|||
|
|||
|
|||
public void setEffPhaseOutDate(String effPhaseOutDate) { |
|||
this.effPhaseOutDate = effPhaseOutDate; |
|||
} |
|||
|
|||
|
|||
public String getEngRevision() { |
|||
return engRevision; |
|||
} |
|||
|
|||
|
|||
public void setEngRevision(String engRevision) { |
|||
this.engRevision = engRevision; |
|||
} |
|||
|
|||
|
|||
public String getEngRevisionDesc() { |
|||
return engRevisionDesc; |
|||
} |
|||
|
|||
|
|||
public void setEngRevisionDesc(String engRevisionDesc) { |
|||
this.engRevisionDesc = engRevisionDesc; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,90 @@ |
|||
package com.spring.ifs.data; |
|||
|
|||
/** |
|||
* @ClassName: IfsInventoryValue |
|||
* @Description: 库存件的数据 |
|||
* @author: LR |
|||
* @date: 2024年11月13日 上午10:41:55 |
|||
* @Copyright: |
|||
*/ |
|||
public class InventoryValue { |
|||
private String site;// |
|||
private String partNo;// |
|||
private String configurationId;// |
|||
private String lotBatchNo;// |
|||
private String serialNo;// |
|||
private String inventoryValue; |
|||
private String ifsRowId; |
|||
private String ifsRowVersion; |
|||
|
|||
public InventoryValue() { |
|||
super(); |
|||
} |
|||
|
|||
|
|||
public String getSite() { |
|||
return site; |
|||
} |
|||
|
|||
|
|||
public void setSite(String site) { |
|||
this.site = site; |
|||
} |
|||
|
|||
|
|||
public String getPartNo() { |
|||
return partNo; |
|||
} |
|||
|
|||
public void setPartNo(String partNo) { |
|||
this.partNo = partNo; |
|||
} |
|||
|
|||
public String getConfigurationId() { |
|||
return configurationId; |
|||
} |
|||
|
|||
public void setConfigurationId(String configurationId) { |
|||
this.configurationId = configurationId; |
|||
} |
|||
|
|||
public String getLotBatchNo() { |
|||
return lotBatchNo; |
|||
} |
|||
|
|||
public void setLotBatchNo(String lotBatchNo) { |
|||
this.lotBatchNo = lotBatchNo; |
|||
} |
|||
|
|||
public String getSerialNo() { |
|||
return serialNo; |
|||
} |
|||
|
|||
public void setSerialNo(String serialNo) { |
|||
this.serialNo = serialNo; |
|||
} |
|||
|
|||
public String getInventoryValue() { |
|||
return inventoryValue; |
|||
} |
|||
|
|||
public void setInventoryValue(String inventoryValue) { |
|||
this.inventoryValue = inventoryValue; |
|||
} |
|||
|
|||
public String getIfsRowId() { |
|||
return ifsRowId; |
|||
} |
|||
|
|||
public void setIfsRowId(String ifsRowId) { |
|||
this.ifsRowId = ifsRowId; |
|||
} |
|||
|
|||
public String getIfsRowVersion() { |
|||
return ifsRowVersion; |
|||
} |
|||
|
|||
public void setIfsRowVersion(String ifsRowVersion) { |
|||
this.ifsRowVersion = ifsRowVersion; |
|||
} |
|||
} |
|||
@ -0,0 +1,176 @@ |
|||
package com.spring.ifs.utils; |
|||
|
|||
import ifs.fnd.ap.*; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.text.SimpleDateFormat; |
|||
import java.util.*; |
|||
|
|||
/** |
|||
* @description: 转换类型 |
|||
* @author LR |
|||
* @date 2024/12/9 9:17 |
|||
* @version 1.0 |
|||
*/ |
|||
public class IfsConverterToMap { |
|||
|
|||
/** |
|||
* @description: 把IFS的集合数据转换成List<Map<String, String>> |
|||
* @author LR |
|||
* @date 2024/12/9 9:29 |
|||
* @version 1.0 |
|||
*/ |
|||
public static List<Map<String, String>> ConverterIfsToList(RecordCollection recordCollection) { |
|||
List<Map<String, String>> resultList = new ArrayList<>(); |
|||
//外层遍历单个集合的数据 |
|||
RecordIterator recordIterator = recordCollection.recordIterator(); |
|||
while (recordIterator.hasNext()) { |
|||
Record tempRecord = recordIterator.nextRecord(); |
|||
//内层遍历单个map |
|||
if (tempRecord != null && tempRecord.getAttributes() != null) { |
|||
Map<String, String> tempMap = new HashMap<>(); |
|||
RecordAttributeIterator attributeIterator = tempRecord.getAttributes().attributeIterator(); |
|||
//遍历单个Bean的数据 |
|||
while (attributeIterator.hasNext()) { |
|||
RecordAttribute attribute = (RecordAttribute) attributeIterator.next(); |
|||
String key = attribute.getNameOf(); |
|||
Object objValue = attribute.getValue(); |
|||
DataType dataType = attribute.getDataType(); |
|||
//处理NULL |
|||
if (objValue == null) { |
|||
tempMap.put(key, ""); |
|||
continue; |
|||
} else if (dataType == DataType.TEXT || dataType == DataType.LONG_TEXT) { |
|||
tempMap.put(key, String.valueOf(objValue)); |
|||
} else if (dataType == DataType.FLOAT) { |
|||
//区分数据的类型 |
|||
if (objValue instanceof Float) { |
|||
BigDecimal bigDecimal = new BigDecimal((Double) objValue); |
|||
// 设置小数位数,最多保留 16 位有效数字 |
|||
bigDecimal = bigDecimal.setScale(16, BigDecimal.ROUND_HALF_UP); |
|||
// 去除尾部的零 |
|||
bigDecimal = bigDecimal.stripTrailingZeros(); |
|||
String formatterValue = bigDecimal.toPlainString(); |
|||
tempMap.put(key, formatterValue); |
|||
} else if (objValue instanceof Double) { |
|||
BigDecimal bigDecimal = new BigDecimal((Double) objValue); |
|||
// 设置小数位数,最多保留 16 位有效数字 |
|||
bigDecimal = bigDecimal.setScale(16, BigDecimal.ROUND_HALF_UP); |
|||
// 去除尾部的零 |
|||
bigDecimal = bigDecimal.stripTrailingZeros(); |
|||
String formatterValue = bigDecimal.toPlainString(); |
|||
tempMap.put(key, formatterValue); |
|||
} else if (objValue instanceof Integer) { |
|||
BigDecimal bigDecimal = new BigDecimal((Integer) objValue); |
|||
// 设置小数位数,最多保留 16 位有效数字 |
|||
String formatterValue = bigDecimal.toPlainString(); |
|||
tempMap.put(key, formatterValue); |
|||
} else { |
|||
System.err.println("特殊的数字:" + String.valueOf(objValue)); |
|||
} |
|||
} else if (dataType == DataType.TIMESTAMP) { |
|||
if (objValue instanceof Date) { |
|||
// 使用 SimpleDateFormat 格式化 Date |
|||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
|||
String formattedDate = sdf.format(objValue); |
|||
tempMap.put(key, formattedDate); |
|||
} |
|||
} else if (dataType == DataType.DATE) { |
|||
if (objValue instanceof Date) { |
|||
// 使用 SimpleDateFormat 格式化 Date |
|||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
|||
String formattedDate = sdf.format(objValue); |
|||
tempMap.put(key, formattedDate); |
|||
} |
|||
} else if (dataType == DataType.BOOLEAN) { |
|||
if (objValue instanceof Boolean) { |
|||
// 使用 SimpleDateFormat 格式化 Date |
|||
String formattedFlag = String.valueOf(objValue).toUpperCase(Locale.ROOT); |
|||
tempMap.put(key, formattedFlag); |
|||
} |
|||
} else { |
|||
System.err.println("字段类型:" + dataType + "字段:" + key + "数值:" + String.valueOf(objValue)); |
|||
} |
|||
} |
|||
//数据保存到结果的list |
|||
resultList.add(tempMap); |
|||
} |
|||
} |
|||
return resultList; |
|||
} |
|||
|
|||
/** |
|||
* @description: 解析IFS的数据成Map数据 |
|||
* @author LR |
|||
* @date 2024/12/9 10:50 |
|||
* @version 1.0 |
|||
*/ |
|||
public static Map<String, String> ConverterIfsToMap(Record record){ |
|||
Map<String, String> resultMap = new HashMap<>(); |
|||
RecordAttributeIterator attributeIterator = record.getAttributes().attributeIterator(); |
|||
//遍历单个Bean的数据 |
|||
while (attributeIterator.hasNext()) { |
|||
RecordAttribute attribute = (RecordAttribute) attributeIterator.next(); |
|||
String key = attribute.getNameOf(); |
|||
Object objValue = attribute.getValue(); |
|||
DataType dataType = attribute.getDataType(); |
|||
//处理NULL |
|||
if (objValue == null) { |
|||
resultMap.put(key, ""); |
|||
continue; |
|||
} else if (dataType == DataType.TEXT || dataType == DataType.LONG_TEXT) { |
|||
resultMap.put(key, String.valueOf(objValue)); |
|||
} else if (dataType == DataType.FLOAT) { |
|||
//区分数据的类型 |
|||
if (objValue instanceof Float) { |
|||
BigDecimal bigDecimal = new BigDecimal((Double) objValue); |
|||
// 设置小数位数,最多保留 16 位有效数字 |
|||
bigDecimal = bigDecimal.setScale(16, BigDecimal.ROUND_HALF_UP); |
|||
// 去除尾部的零 |
|||
bigDecimal = bigDecimal.stripTrailingZeros(); |
|||
String formatterValue = bigDecimal.toPlainString(); |
|||
resultMap.put(key, formatterValue); |
|||
} else if (objValue instanceof Double) { |
|||
BigDecimal bigDecimal = new BigDecimal((Double) objValue); |
|||
// 设置小数位数,最多保留 16 位有效数字 |
|||
bigDecimal = bigDecimal.setScale(16, BigDecimal.ROUND_HALF_UP); |
|||
// 去除尾部的零 |
|||
bigDecimal = bigDecimal.stripTrailingZeros(); |
|||
String formatterValue = bigDecimal.toPlainString(); |
|||
resultMap.put(key, formatterValue); |
|||
} else if (objValue instanceof Integer) { |
|||
BigDecimal bigDecimal = new BigDecimal((Integer) objValue); |
|||
// 设置小数位数,最多保留 16 位有效数字 |
|||
String formatterValue = bigDecimal.toPlainString(); |
|||
resultMap.put(key, formatterValue); |
|||
} else { |
|||
System.err.println("特殊的数字:" + String.valueOf(objValue)); |
|||
} |
|||
} else if (dataType == DataType.TIMESTAMP) { |
|||
if (objValue instanceof Date) { |
|||
// 使用 SimpleDateFormat 格式化 Date |
|||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
|||
String formattedDate = sdf.format(objValue); |
|||
resultMap.put(key, formattedDate); |
|||
} |
|||
} else if (dataType == DataType.DATE) { |
|||
if (objValue instanceof Date) { |
|||
// 使用 SimpleDateFormat 格式化 Date |
|||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
|||
String formattedDate = sdf.format(objValue); |
|||
resultMap.put(key, formattedDate); |
|||
} |
|||
} else if (dataType == DataType.BOOLEAN) { |
|||
if (objValue instanceof Boolean) { |
|||
// 使用 SimpleDateFormat 格式化 Date |
|||
String formattedFlag = String.valueOf(objValue).toUpperCase(Locale.ROOT); |
|||
resultMap.put(key, formattedFlag); |
|||
} |
|||
} else { |
|||
System.err.println("字段类型:" + dataType + "字段:" + key + "数值:" + String.valueOf(objValue)); |
|||
} |
|||
} |
|||
return resultMap; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,180 @@ |
|||
package com.spring.ifs.utils; |
|||
|
|||
import com.spring.ifs.data.IfsParamBean; |
|||
import ifs.fnd.ap.*; |
|||
|
|||
import java.util.HashMap; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @description: IFS的通用方法 |
|||
* @author LR |
|||
* @date 2024/12/9 11:18 |
|||
* @version 1.0 |
|||
*/ |
|||
public class IfsPlsqlUtils { |
|||
|
|||
/** |
|||
* @description: 调用查询的通用方法-- 返回单个Bean |
|||
* @author LR |
|||
* @date 2024/12/9 11:21 |
|||
* @version 1.0 |
|||
*/ |
|||
public static Record execSqlSearchGetRecord(Server srv, StringBuilder searchSql, Map<String, String> inParam) throws APException { |
|||
//创建查询体 |
|||
PlsqlSelectCommand selCmd = new PlsqlSelectCommand(srv, searchSql.toString()); |
|||
//获取绑定参数 |
|||
Record bindVars = selCmd.getBindVariables(); |
|||
//循环设置入参 |
|||
for(Map.Entry<String, String> entry : inParam.entrySet()) { |
|||
String key = entry.getKey(); |
|||
String value = entry.getValue(); |
|||
//设置入参 |
|||
bindVars.add(key, value).setBindVariableDirection(BindVariableDirection.IN); |
|||
} |
|||
//执行查询 |
|||
RecordCollection result = selCmd.executeQuery(); |
|||
//判断是否查询到数据 |
|||
if (null == result || result.size() == 0){ |
|||
return null; |
|||
}else { |
|||
return result.get(0); |
|||
} |
|||
} |
|||
|
|||
|
|||
/** |
|||
* @description: 执行参数返回 集合参数 |
|||
* @author LR |
|||
* @date 2024/12/9 11:36 |
|||
* @version 1.0 |
|||
*/ |
|||
public static RecordCollection execSqlSearchGetRecordCollection(Server srv, StringBuilder searchSql, Map<String, String> inParam) throws APException { |
|||
//创建查询体 |
|||
PlsqlSelectCommand selCmd = new PlsqlSelectCommand(srv, searchSql.toString()); |
|||
//获取绑定参数 |
|||
Record bindVars = selCmd.getBindVariables(); |
|||
//循环设置入参 |
|||
for(Map.Entry<String, String> entry : inParam.entrySet()) { |
|||
String key = entry.getKey(); |
|||
String value = entry.getValue(); |
|||
//设置入参 |
|||
bindVars.add(key, value).setBindVariableDirection(BindVariableDirection.IN); |
|||
} |
|||
//执行查询 |
|||
RecordCollection result = selCmd.executeQuery(); |
|||
//判断是否查询到数据 |
|||
if (null == result || result.size() == 0){ |
|||
return null; |
|||
}else { |
|||
return result; |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* @description: 执行存储过程 返回需要的数据 |
|||
* @author LR |
|||
* @date 2024/12/9 16:17 |
|||
* @version 1.0 |
|||
*/ |
|||
public static Map<String, String> execProcedureGetRecord(Server srv, String packageName, String methodName, |
|||
PlsqlBaseMethodType methodType, PlsqlBaseMethodAction methodAction, Map<String, String> inParam) throws APException { |
|||
//创建查询体 |
|||
Record profile = new Record("PROFILE"); |
|||
//填充参数 |
|||
//循环设置入参 |
|||
for(Map.Entry<String, String> entry : inParam.entrySet()) { |
|||
String key = entry.getKey(); |
|||
String value = entry.getValue(); |
|||
//设置入参 |
|||
profile.add(key, value); |
|||
} |
|||
//创建执行的框体 |
|||
PlsqlBaseMethodCommand methodCommand = new PlsqlBaseMethodCommand( |
|||
srv, |
|||
methodType, |
|||
packageName, |
|||
methodName, |
|||
profile, |
|||
methodAction); |
|||
//执行 |
|||
methodCommand.execute(); |
|||
//转换类型 |
|||
Map<String, String> resultMap = IfsConverterToMap.ConverterIfsToMap(profile); |
|||
//返回结果集 |
|||
return resultMap; |
|||
} |
|||
|
|||
/** |
|||
* |
|||
* @Title: execProcedureGetRecord |
|||
* @Description: 调用特殊的存储过程 出参和入参严格规范后的数据 入参和出参 不重复的数据 |
|||
* @author: LR |
|||
* @date 2024年12月10日 下午3:54:22 |
|||
* @return: Map<String,String> |
|||
* @throws |
|||
*/ |
|||
public static Map<String, String> execProcedureGetRecord(Server srv, String packageName, String methodName, |
|||
List<IfsParamBean> inParams, List<IfsParamBean> outParams) throws APException { |
|||
Map<String, String> resultMap = new HashMap<>(); |
|||
//创建查询体 |
|||
StringBuilder searchSql = new StringBuilder(); |
|||
searchSql.append("BEGIN ifsapp.").append(packageName).append(".").append(methodName).append("("); |
|||
//首先循环写入出参 |
|||
for(int i = 0; i < outParams.size(); i++) { |
|||
IfsParamBean param = outParams.get(i); |
|||
//判断一下是否有入参 |
|||
if(inParams != null) { |
|||
searchSql.append(":").append(param.getColumnName()).append(", "); |
|||
}else { |
|||
searchSql.append(":").append(param.getColumnName()); |
|||
//判断是否是最后一个参数 |
|||
if(i < outParams.size() - 1) { |
|||
searchSql.append(", "); |
|||
} |
|||
} |
|||
|
|||
} |
|||
//然后填充入参 |
|||
for(int i = 0; i < inParams.size(); i++) { |
|||
IfsParamBean param = inParams.get(i); |
|||
searchSql.append(":").append(param.getColumnName()); |
|||
//判断是否是最后一个参数 |
|||
if(i < inParams.size() - 1) { |
|||
searchSql.append(", "); |
|||
} |
|||
|
|||
} |
|||
//拼接最终的sql |
|||
searchSql.append("); END;"); |
|||
//打印最终调用的sql语句 |
|||
System.err.println(searchSql.toString()); |
|||
PlsqlSelectCommand selCmd = new PlsqlSelectCommand(srv, searchSql.toString()); |
|||
Record bindVars = selCmd.getBindVariables(); |
|||
//循环设置入参 |
|||
for(IfsParamBean param : inParams) { |
|||
bindVars.add(param.getColumnName(), param.getColumnValue()).setBindVariableDirection(BindVariableDirection.IN); |
|||
} |
|||
//循环设置出参 |
|||
for(IfsParamBean param : outParams) { |
|||
bindVars.add(param.getColumnName()).setBindVariableDirection(BindVariableDirection.OUT); |
|||
} |
|||
//执行查询 |
|||
selCmd.executeQuery(); |
|||
//遍历返回结果集 |
|||
for(IfsParamBean param : outParams) { |
|||
String columnName = param.getColumnName(); |
|||
String columnValue = bindVars.find(param.getColumnName()).getString(); |
|||
resultMap.put(columnName, columnValue); |
|||
} |
|||
|
|||
//返回结果集 |
|||
return resultMap; |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue