From e9731fa5d794432eaa57663d19d5976b1ae8a7a7 Mon Sep 17 00:00:00 2001 From: DouDou <877258667@qq.com> Date: Wed, 18 Dec 2024 09:21:20 +0800 Subject: [PATCH] =?UTF-8?q?IFS=20jar=20=E6=B5=8B=E8=AF=95=E5=BC=80?= =?UTF-8?q?=E5=8F=91=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/spring/ifs/api/MasterPartApi.java | 8 ++-- .../spring/ifs/bean/MasterServiceBean.java | 10 ++--- .../ifs/bean/MasterServiceBeanTest.java | 16 +++---- .../ifs/controller/TestIfsController.java | 44 +++++++++---------- 4 files changed, 37 insertions(+), 41 deletions(-) diff --git a/src/main/java/com/spring/ifs/api/MasterPartApi.java b/src/main/java/com/spring/ifs/api/MasterPartApi.java index b674ce3a..eef19fc2 100644 --- a/src/main/java/com/spring/ifs/api/MasterPartApi.java +++ b/src/main/java/com/spring/ifs/api/MasterPartApi.java @@ -1,8 +1,8 @@ package com.spring.ifs.api; -import com.spring.ifs.data.PartCatalog; import com.spring.ifs.utils.IfsConverterToMap; import com.spring.ifs.utils.IfsPlsqlUtils; +import com.spring.modules.part.entity.APIEntity.PartIfsCatalog; import ifs.fnd.ap.*; import java.util.HashMap; @@ -48,7 +48,7 @@ public class MasterPartApi { * @date 2024/12/10 17:59 * @version 1.0 */ - public static Map insertMasterPart(Server srv, PartCatalog inData) throws APException { + public static Map insertMasterPart(Server srv, PartIfsCatalog inData) throws APException { //公共参数 String partNo = inData.getPartNo().toUpperCase(); String partDesc = inData.getPartDesc(); @@ -115,7 +115,7 @@ public class MasterPartApi { * @date 2024/12/11 9:24 * @version 1.0 */ - public static Map modifyMasterPart(Server srv, PartCatalog inData) throws APException { + public static Map modifyMasterPart(Server srv, PartIfsCatalog inData) throws APException { //公共参数 String ifsRowId = inData.getIfsRowId(); String ifsRowVersion = inData.getIfsRowVersion(); @@ -171,7 +171,7 @@ public class MasterPartApi { * @date 2024/12/11 10:01 * @version 1.0 */ - public static void removeMasterPart(Server srv, PartCatalog inData) throws APException { + public static void removeMasterPart(Server srv, PartIfsCatalog inData) throws APException { //公共参数 String ifsRowId = inData.getIfsRowId(); String ifsRowVersion = inData.getIfsRowVersion(); diff --git a/src/main/java/com/spring/ifs/bean/MasterServiceBean.java b/src/main/java/com/spring/ifs/bean/MasterServiceBean.java index 400691fe..fe567cdd 100644 --- a/src/main/java/com/spring/ifs/bean/MasterServiceBean.java +++ b/src/main/java/com/spring/ifs/bean/MasterServiceBean.java @@ -3,7 +3,7 @@ package com.spring.ifs.bean; import com.alibaba.fastjson.JSON; import com.spring.ifs.api.IfsServer; import com.spring.ifs.api.MasterPartApi; -import com.spring.ifs.data.PartCatalog; +import com.spring.modules.part.entity.APIEntity.PartIfsCatalog; import ifs.fnd.ap.APException; import ifs.fnd.ap.Server; import org.slf4j.Logger; @@ -32,7 +32,7 @@ public class MasterServiceBean { * @date 2024/12/9 13:28 * @version 1.0 */ - public Map getMasterPart(Server srv, PartCatalog inData) throws APException { + public Map getMasterPart(Server srv, PartIfsCatalog inData) throws APException { //公共参数 String partNo = inData.getPartNo(); //获取参数 @@ -50,7 +50,7 @@ public class MasterServiceBean { * @date 2024/12/12 15:33 * @version 1.0 */ - public PartCatalog syncPartCatalog(Server srv, PartCatalog inData) throws APException { + public PartIfsCatalog syncPartCatalog(Server srv, PartIfsCatalog inData) throws APException { logger.info("Part Catalog 新增开始:"+ JSON.toJSONString(inData)); //公共参数 String partNo = inData.getPartNo(); @@ -76,7 +76,7 @@ public class MasterServiceBean { * @date 2024/12/12 15:40 * @version 1.0 */ - public PartCatalog modifyPartCatalog(Server srv, PartCatalog inData) throws APException { + public PartIfsCatalog modifyPartCatalog(Server srv, PartIfsCatalog inData) throws APException { logger.info("Part Catalog 修改开始:"+JSON.toJSONString(inData)); //公共参数 String partNo = inData.getPartNo(); @@ -104,7 +104,7 @@ public class MasterServiceBean { * @date 2024/12/12 15:40 * @version 1.0 */ - public void removePartCatalog(Server srv, PartCatalog inData) throws APException { + public void removePartCatalog(Server srv, PartIfsCatalog inData) throws APException { logger.info("Part Catalog 删除开始:"+JSON.toJSONString(inData)); //公共参数 String partNo = inData.getPartNo(); diff --git a/src/main/java/com/spring/ifs/bean/MasterServiceBeanTest.java b/src/main/java/com/spring/ifs/bean/MasterServiceBeanTest.java index f1e23db0..4d97f566 100644 --- a/src/main/java/com/spring/ifs/bean/MasterServiceBeanTest.java +++ b/src/main/java/com/spring/ifs/bean/MasterServiceBeanTest.java @@ -2,7 +2,7 @@ package com.spring.ifs.bean; import com.alibaba.fastjson.JSON; import com.spring.ifs.api.IfsServer; -import com.spring.ifs.api.MasterPartApi; +import com.spring.ifs.api.MasterPartApiTest; import com.spring.ifs.data.PartCatalog; import ifs.fnd.ap.APException; import ifs.fnd.ap.Server; @@ -40,7 +40,7 @@ public class MasterServiceBeanTest { //获取连接 Server srv = ifsServer.getIfsServer(username, password); //获取参数 - Map resultMap = MasterPartApi.getMasterPart(srv, partNo); + Map resultMap = MasterPartApiTest.getMasterPart(srv, partNo); //判断是否存在 if(null == resultMap) { throw new RuntimeException("当前物料件不存在!"); @@ -62,10 +62,10 @@ public class MasterServiceBeanTest { String partNo = inData.getPartNo(); //获取连接 Server srv = ifsServer.getIfsServer(username, password); - Map partMap = MasterPartApi.getMasterPart(srv, partNo); + Map partMap = MasterPartApiTest.getMasterPart(srv, partNo); //判断是否需要插入到ifs if(partMap == null || partMap.size() == 0) { - Map resultMap = MasterPartApi.insertMasterPart(srv, inData); + Map resultMap = MasterPartApiTest.insertMasterPart(srv, inData); //设置ifs 信息 inData.setIfsRowId(resultMap.get("OBJID")); inData.setIfsRowVersion(resultMap.get("OBJVERSION")); @@ -92,7 +92,7 @@ public class MasterServiceBeanTest { String partNo = inData.getPartNo(); //获取连接 Server srv = ifsServer.getIfsServer(username, password); - Map partMap = MasterPartApi.getMasterPart(srv, partNo); + Map partMap = MasterPartApiTest.getMasterPart(srv, partNo); //判断是否需要插入到ifs if(partMap == null && partMap.size() == 0) { throw new RuntimeException("物料件不存在!"); @@ -100,7 +100,7 @@ public class MasterServiceBeanTest { //设置ifs 信息 inData.setIfsRowId(partMap.get("IFSROWID")); inData.setIfsRowVersion(partMap.get("IFSROWVERSION")); - Map resultMap = MasterPartApi.modifyMasterPart(srv, inData); + Map resultMap = MasterPartApiTest.modifyMasterPart(srv, inData); //设置ifs 信息 inData.setIfsRowVersion(resultMap.get("OBJVERSION")); } @@ -123,7 +123,7 @@ public class MasterServiceBeanTest { String partNo = inData.getPartNo(); //获取连接 Server srv = ifsServer.getIfsServer(username, password); - Map partMap = MasterPartApi.getMasterPart(srv, partNo); + Map partMap = MasterPartApiTest.getMasterPart(srv, partNo); //判断是否需要插入到ifs if(partMap == null && partMap.size() == 0) { throw new RuntimeException("物料件不存在!"); @@ -131,7 +131,7 @@ public class MasterServiceBeanTest { //设置ifs 信息 inData.setIfsRowId(partMap.get("IFSROWID")); inData.setIfsRowVersion(partMap.get("IFSROWVERSION")); - MasterPartApi.removeMasterPart(srv, inData); + MasterPartApiTest.removeMasterPart(srv, inData); } logger.info("Part Catalog 删除结束:"+JSON.toJSONString(inData)); } diff --git a/src/main/java/com/spring/ifs/controller/TestIfsController.java b/src/main/java/com/spring/ifs/controller/TestIfsController.java index 1f69ed06..17c5637f 100644 --- a/src/main/java/com/spring/ifs/controller/TestIfsController.java +++ b/src/main/java/com/spring/ifs/controller/TestIfsController.java @@ -1,13 +1,10 @@ package com.spring.ifs.controller; -import com.alibaba.fastjson.JSON; -import com.spring.ifs.api.InventoryPartApi; import com.spring.ifs.bean.BaseSearchBeanTest; -import com.spring.ifs.bean.InventoryServiceBean; +import com.spring.ifs.bean.InventoryServiceBeanTest; import com.spring.ifs.bean.MasterServiceBeanTest; import com.spring.ifs.data.*; import ifs.fnd.ap.APException; -import ifs.fnd.ap.Server; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -27,7 +24,7 @@ public class TestIfsController { @Autowired private MasterServiceBeanTest masterServiceBeanTest; @Autowired - private InventoryServiceBean inventoryServiceBean; + private InventoryServiceBeanTest inventoryServiceBeanTest; @@ -234,7 +231,7 @@ public class TestIfsController { public Object getInventoryPart(@RequestBody InventoryPart inData) throws APException { Map resultMap = new HashMap(); try { - InventoryPart returnRow = inventoryServiceBean.getInventoryPart(inData); + InventoryPart returnRow = inventoryServiceBeanTest.getInventoryPart(inData); resultMap.put("obj", returnRow); resultMap.put("code", 200); resultMap.put("msg", "操作成功!"); @@ -255,7 +252,7 @@ public class TestIfsController { public Object syncInventoryPart(@RequestBody InventoryPart inData) throws APException { Map resultMap = new HashMap(); try { - InventoryPart resultRow = inventoryServiceBean.syncInventoryPart(inData); + InventoryPart resultRow = inventoryServiceBeanTest.syncInventoryPart(inData); resultMap.put("obj", resultRow); resultMap.put("code", 200); resultMap.put("msg", "操作成功!"); @@ -276,7 +273,7 @@ public class TestIfsController { public Object modifyInventoryPart(@RequestBody InventoryPart inData) throws APException { Map resultMap = new HashMap(); try { - InventoryPart resultRow = inventoryServiceBean.modifyInventoryPart(inData); + InventoryPart resultRow = inventoryServiceBeanTest.modifyInventoryPart(inData); resultMap.put("obj", resultRow); resultMap.put("code", 200); resultMap.put("msg", "操作成功!"); @@ -297,7 +294,7 @@ public class TestIfsController { public Object removeInventoryPart(@RequestBody InventoryPart inData) throws APException { Map resultMap = new HashMap(); try { - inventoryServiceBean.removeInventoryPart(inData); + inventoryServiceBeanTest.removeInventoryPart(inData); resultMap.put("code", 200); resultMap.put("msg", "操作成功!"); } catch (Exception e) { @@ -317,7 +314,7 @@ public class TestIfsController { public Object modifyInventoryPartCost(@RequestBody InventoryPartConfig inData) throws APException { Map resultMap = new HashMap(); try { - InventoryPartConfig resultRow = inventoryServiceBean.modifyInventoryPartCost(inData); + InventoryPartConfig resultRow = inventoryServiceBeanTest.modifyInventoryPartCost(inData); resultMap.put("obj", resultRow); resultMap.put("code", 200); resultMap.put("msg", "操作成功!"); @@ -338,7 +335,7 @@ public class TestIfsController { public Object modifyInventoryPartPlan(@RequestBody InventoryPartPlan inData) throws APException { Map resultMap = new HashMap(); try { - InventoryPartPlan resultRow = inventoryServiceBean.modifyInventoryPartPlan(inData); + InventoryPartPlan resultRow = inventoryServiceBeanTest.modifyInventoryPartPlan(inData); resultMap.put("obj", resultRow); resultMap.put("code", 200); resultMap.put("msg", "操作成功!"); @@ -359,7 +356,7 @@ public class TestIfsController { public Object syncInventoryPartLocations(@RequestBody List inDatas) throws APException { Map resultMap = new HashMap(); try { - List resultList = inventoryServiceBean.syncInventoryPartLocations(inDatas); + List resultList = inventoryServiceBeanTest.syncInventoryPartLocations(inDatas); resultMap.put("obj", resultList); resultMap.put("code", 200); resultMap.put("msg", "操作成功!"); @@ -380,7 +377,7 @@ public class TestIfsController { public Object removeInventoryPartLocation(@RequestBody InventoryPartLocation inData) throws APException { Map resultMap = new HashMap(); try { - inventoryServiceBean.removeInventoryPartLocation(inData); + inventoryServiceBeanTest.removeInventoryPartLocation(inData); resultMap.put("code", 200); resultMap.put("msg", "操作成功!"); } catch (Exception e) { @@ -390,7 +387,6 @@ public class TestIfsController { return resultMap; } - /**************************************************************************************************************************/ /** * @description: 修改库存件的制造商 * @author LR @@ -401,7 +397,7 @@ public class TestIfsController { public Object modifyInventoryPartManufacture(@RequestBody InventoryPartManufacture inData) throws APException { Map resultMap = new HashMap(); try { - InventoryPartManufacture resultRow = inventoryServiceBean.modifyInventoryPartManufacture(inData); + InventoryPartManufacture resultRow = inventoryServiceBeanTest.modifyInventoryPartManufacture(inData); resultMap.put("obj", resultRow); resultMap.put("code", 200); resultMap.put("msg", "操作成功!"); @@ -422,7 +418,7 @@ public class TestIfsController { public Object getInventoryPartRevision(@RequestBody InventoryPartRevision inData) throws APException { Map resultMap = new HashMap(); try { - InventoryPartRevision resultRow = inventoryServiceBean.getInventoryPartRevision(inData); + InventoryPartRevision resultRow = inventoryServiceBeanTest.getInventoryPartRevision(inData); resultMap.put("resultRow", resultRow); resultMap.put("code", 200); resultMap.put("msg", "操作成功!"); @@ -443,7 +439,7 @@ public class TestIfsController { public Object syncInventoryPartRevision(@RequestBody InventoryPartRevision inData) throws APException { Map resultMap = new HashMap(); try { - InventoryPartRevision resultRow = inventoryServiceBean.syncInventoryPartRevision(inData); + InventoryPartRevision resultRow = inventoryServiceBeanTest.syncInventoryPartRevision(inData); resultMap.put("resultRow", resultRow); resultMap.put("code", 200); resultMap.put("msg", "操作成功!"); @@ -465,7 +461,7 @@ public class TestIfsController { public Object modifyInventoryPartRevision(@RequestBody InventoryPartRevision inData) throws APException { Map resultMap = new HashMap(); try { - InventoryPartRevision resultRow = inventoryServiceBean.modifyInventoryPartRevision(inData); + InventoryPartRevision resultRow = inventoryServiceBeanTest.modifyInventoryPartRevision(inData); resultMap.put("resultRow", resultRow); resultMap.put("code", 200); resultMap.put("msg", "操作成功!"); @@ -486,7 +482,7 @@ public class TestIfsController { public Object removeInventoryPartRevision(@RequestBody InventoryPartRevision inData) throws APException { Map resultMap = new HashMap(); try { - inventoryServiceBean.removeInventoryPartRevision(inData); + inventoryServiceBeanTest.removeInventoryPartRevision(inData); resultMap.put("code", 200); resultMap.put("msg", "操作成功!"); } catch (Exception e) { @@ -506,7 +502,7 @@ public class TestIfsController { public Object syncInventoryPartCharacteristics(@RequestBody List inDatas) throws APException { Map resultMap = new HashMap(); try { - List resultList = inventoryServiceBean.syncInventoryPartCharacteristics(inDatas); + List resultList = inventoryServiceBeanTest.syncInventoryPartCharacteristics(inDatas); resultMap.put("code", 200); resultMap.put("resultList", resultList); resultMap.put("msg", "操作成功!"); @@ -527,7 +523,7 @@ public class TestIfsController { public Object removeInventoryPartCharacteristicsByPartNo(@RequestBody InventoryPart inData) throws APException { Map resultMap = new HashMap(); try { - inventoryServiceBean.removeInventoryPartCharacteristicsByPartNo(inData); + inventoryServiceBeanTest.removeInventoryPartCharacteristicsByPartNo(inData); resultMap.put("code", 200); resultMap.put("msg", "操作成功!"); } catch (Exception e) { @@ -547,7 +543,7 @@ public class TestIfsController { public Object removeInventoryPartRelationInfo(@RequestBody InventoryPart inData) throws APException { Map resultMap = new HashMap(); try { - inventoryServiceBean.removeInventoryPartRelationInfo(inData); + inventoryServiceBeanTest.removeInventoryPartRelationInfo(inData); resultMap.put("code", 200); resultMap.put("msg", "操作成功!"); } catch (Exception e) { @@ -567,7 +563,7 @@ public class TestIfsController { public Object removeInventoryPartLocations(@RequestBody List inDatas) throws APException { Map resultMap = new HashMap(); try { - inventoryServiceBean.removeInventoryPartLocations(inDatas); + inventoryServiceBeanTest.removeInventoryPartLocations(inDatas); resultMap.put("code", 200); resultMap.put("msg", "操作成功!"); } catch (Exception e) { @@ -587,7 +583,7 @@ public class TestIfsController { public Object syncCopyPartForInventoryPart(@RequestBody CopyPart inData) throws APException { Map resultMap = new HashMap(); try { - inventoryServiceBean.syncCopyPartForInventoryPart(inData); + inventoryServiceBeanTest.syncCopyPartForInventoryPart(inData); resultMap.put("code", 200); resultMap.put("msg", "操作成功!"); } catch (Exception e) {