Browse Source

物料件数据更新

master
DouDou 10 months ago
parent
commit
e80b5e3ffa
  1. 16
      src/main/java/com/spring/ifs/api/BaseSearchApi.java
  2. 16
      src/main/java/com/spring/ifs/api/BaseSearchApiTest.java
  3. 16
      src/main/java/com/spring/ifs/bean/InventoryServiceBean.java

16
src/main/java/com/spring/ifs/api/BaseSearchApi.java

@ -114,22 +114,18 @@ public class BaseSearchApi {
*/
public static List<LocationInformationVo> getWarehouseLocations(Server srv, String siteCon, String ifsRowVersion, int startIndex, int pageSize) throws APException {
StringBuilder searchSql = new StringBuilder();
searchSql.append("SELECT wbb.contract site, wbb.location_no location_id, wbb.description location_name, wbb.warehouse_id, 'Y' active, NULL create_date, 'admin' create_by,");
searchSql.append(" NULL update_date, NULL update_by, ilt.inventory_location_type location_type, wbb.objid ifsRowId, wbb.OBJVERSION ifsRowVersion");
searchSql.append(" FROM ifsapp.WAREHOUSE_BAY_BIN wbb, ifsapp.INVENTORY_LOCATION_GROUP ilt");
searchSql.append(" WHERE wbb.location_group = ilt.LOCATION_GROUP");
searchSql.append("SELECT contract site, location_no location_id, location_name, warehouse warehouse_id, 'Y' active, NULL create_date, 'admin' create_by,");
searchSql.append(" '' update_date, '' update_by, location_type location_type");
searchSql.append(" FROM ifsapp.INVENTORY_LOCATION14");
searchSql.append(" WHERE 1 = 1");
//添加判断的查询条件
if(!(null == siteCon || "".equals(siteCon))) {
searchSql.append(" AND wbb.contract IN "+siteCon);
searchSql.append(" AND contract IN "+siteCon);
}
//设置查询的入参
Map<String, String> inParam = new HashMap<>();
if(!(null == ifsRowVersion || "".equals(ifsRowVersion))) {
searchSql.append(" AND wbb.OBJVERSION >= :ifsRowVersion");
inParam.put("ifsRowVersion", ifsRowVersion);
}
//添加排序语句
searchSql.append(" ORDER BY wbb.OBJVERSION, wbb.contract, wbb.location_no");
searchSql.append(" ORDER BY contract, location_no");
//添加分页的查询语句
searchSql.append(" OFFSET "+startIndex+" ROWS FETCH NEXT "+pageSize+" ROWS ONLY");
//调用查询的通用方法

16
src/main/java/com/spring/ifs/api/BaseSearchApiTest.java

@ -105,22 +105,18 @@ public class BaseSearchApiTest {
*/
public static List<WarehouseLocation> getWarehouseLocations(Server srv, String siteCon, String ifsRowVersion, int startIndex, int pageSize) throws APException {
StringBuilder searchSql = new StringBuilder();
searchSql.append("SELECT wbb.contract site, wbb.location_no location_id, wbb.description location_name, wbb.warehouse_id, 'Y' active, NULL create_date, 'admin' create_by,");
searchSql.append(" NULL update_date, NULL update_by, ilt.inventory_location_type location_type, wbb.objid ifsRowId, wbb.OBJVERSION ifsRowVersion");
searchSql.append(" FROM ifsapp.WAREHOUSE_BAY_BIN wbb, ifsapp.INVENTORY_LOCATION_GROUP ilt");
searchSql.append(" WHERE wbb.location_group = ilt.LOCATION_GROUP");
searchSql.append("SELECT contract site, location_no location_id, location_name, warehouse warehouse_id, 'Y' active, NULL create_date, 'admin' create_by,");
searchSql.append(" '' update_date, '' update_by, location_type location_type");
searchSql.append(" FROM ifsapp.INVENTORY_LOCATION14");
searchSql.append(" WHERE 1 = 1");
//添加判断的查询条件
if(!(null == siteCon || "".equals(siteCon))) {
searchSql.append(" AND wbb.contract IN "+siteCon);
searchSql.append(" AND contract IN "+siteCon);
}
//设置查询的入参
Map<String, String> inParam = new HashMap<>();
if(!(null == ifsRowVersion || "".equals(ifsRowVersion))) {
searchSql.append(" AND wbb.OBJVERSION >= :ifsRowVersion");
inParam.put("ifsRowVersion", ifsRowVersion);
}
//添加排序语句
searchSql.append(" ORDER BY wbb.OBJVERSION, wbb.contract, wbb.location_no");
searchSql.append(" ORDER BY contract, location_no");
//添加分页的查询语句
searchSql.append(" OFFSET "+startIndex+" ROWS FETCH NEXT "+pageSize+" ROWS ONLY");
//调用查询的通用方法

16
src/main/java/com/spring/ifs/bean/InventoryServiceBean.java

@ -713,7 +713,7 @@ public class InventoryServiceBean {
* @date 2024/12/9 15:51
* @version 1.0
*/
public Map<String, String> syncCopyPartForInventoryPart(Server srv, CopyPart inData) {
public Map<String, String> syncCopyPartForInventoryPart(Server srv, CopyPart inData) throws APException {
//公共参数
Map<String, String> returnMap = new HashMap<>();
String oriContract = inData.getOriContract();
@ -734,6 +734,15 @@ public class InventoryServiceBean {
String copySPCharacteristics = inData.getCopySPCharacteristics();//对应Sales Part, Characteristics
String copySPDocumentTexts = inData.getCopySPDocumentTexts();//对应Sales Part, Document Texts
String copySPLanguageDescription = inData.getCopySPLanguageDescription();//对应Sales Part, Language Description
boolean masterPartFlag = false;
//查询Master Part的信息
Map<String, String> masterPartMap = MasterPartApi.getMasterPart(srv, partNo);
if (masterPartMap == null || masterPartMap.size() == 0) {
masterPartFlag = true;
}else {
masterPartFlag = false;
}
try{
//调用api方法获取事件的编码
Map<String, String> resultMap = InventoryPartApi.getCopyPartEventNo(srv);
@ -758,7 +767,12 @@ public class InventoryServiceBean {
//处理master Part数据都要传
if(copyDesc.indexOf("Part Catalog,") == 0 || copyDesc.indexOf("Part,") == 0) {
//调用api设置成 必传 重复不添加
//如果maste 需要插入数据
if (masterPartFlag) {
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "TRUE", "TRUE");
}else {
InventoryPartApi.modifyIfsCopyPartItem(srv, ifsRowId, ifsRowVersion, "FALSE", "TRUE");
}
}
//针对Connected Objects 特殊设置 不确定页面和页签
//库存件

Loading…
Cancel
Save