From 0a79dc6c910d9e00a6c0f81b7b8ec6b9bdb2ba2e Mon Sep 17 00:00:00 2001 From: zhengyf Date: Tue, 27 Aug 2024 13:33:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BD=E7=9F=A5=EF=BC=9A=E5=AD=98=E8=B4=A7?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/SKUClassPluginInitializer.java | 142 +----------------- 1 file changed, 2 insertions(+), 140 deletions(-) diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/base/SKUClassPluginInitializer.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/base/SKUClassPluginInitializer.java index 0c594dce..e85a4092 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/base/SKUClassPluginInitializer.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/base/SKUClassPluginInitializer.java @@ -301,13 +301,11 @@ public class SKUClassPluginInitializer extends PluginBaseEntity { mapStr = JSONUtil.toJsonStr(map); ZTResult ztResult = pushU8CByApiCode.pushByCode(url, mapStr); //两层判断,一层中台转发,一层u8c返回 + Attribute attribute = ztResult.getAttribute(); if ("false".equals(ztResult.getFlag())) { //转发失败 - Assert.state(false, "丽知:OFS货品档案分类--->U8C货品档案分类.中台转发失败,失败原因:{}", ztResult.getAttribute().getErrormsg()); + Assert.state(false, "丽知:OFS货品档案分类--->U8C货品档案分类.中台转发失败,失败原因:{}", attribute.getErrormsg()); } - Attribute attribute = ztResult.getAttribute(); - System.out.println(attribute); - boolean isSuccess = false; String invclasscode = ""; if ("success".equals(attribute.getStatus())) { @@ -352,142 +350,6 @@ public class SKUClassPluginInitializer extends PluginBaseEntity { } - } -// -// //查询pk_corp=0001下的所有分类 -// List bdInvclEntities = queryU8CAllInvcl(); -// //将pk_corp=0001下的所有分类分为123级 -// List u8cLevel1 = new ArrayList<>();//length==2 -// List u8cLevel2 = new ArrayList<>();//length==5 -// List u8cLevel3 = new ArrayList<>();//length==9 -// for (BdInvclEntity bdInvclEntity : bdInvclEntities) { -// switch (bdInvclEntity.getInvclasscode().length()) { -// case 2: System.out.println("U8C:1级分类:" + bdInvclEntity.getInvclasscode()); u8cLevel1.add(bdInvclEntity); break; -// case 5: System.out.println("U8C:2级分类:" + bdInvclEntity.getInvclasscode()); u8cLevel2.add(bdInvclEntity); break; -// case 9: System.out.println("U8C:3级分类:" + bdInvclEntity.getInvclasscode()); u8cLevel3.add(bdInvclEntity); break; -// } -// } -// -// List ofsLevel1 = new ArrayList<>();//length==2 -// List ofsLevel2 = new ArrayList<>();//length==5 -// List ofsLevel3 = new ArrayList<>();//length==9 -// for (OFSSKUClassSearchResponse.SKUClass ofsSKUClass : filterSKUClasss) { -// switch (ofsSKUClass.getCInvCCode().length()) { -// case 2: System.out.println("OFS:1级分类:" + ofsSKUClass.getCInvCCode()); ofsLevel1.add(ofsSKUClass); break; -// case 5: System.out.println("OFS:2级分类:" + ofsSKUClass.getCInvCCode()); ofsLevel2.add(ofsSKUClass); break; -// case 9: System.out.println("OFS:3级分类:" + ofsSKUClass.getCInvCCode()); ofsLevel3.add(ofsSKUClass); break; -// } -// } -// System.out.println(1111); -// -// -// //分三次推送,按顺序123 -// if(ofsLevel1!=null&&ofsLevel1.size()>0){ -// specificImplement(ofsLevel1,u8cLevel1); -// } -// if(ofsLevel2!=null&&ofsLevel2.size()>0){ -// specificImplement(ofsLevel2,u8cLevel2); -// } -// if(ofsLevel3!=null&&ofsLevel3.size()>0){ -// specificImplement(ofsLevel3,u8cLevel3); -// } - - -// //生成业务日期 -// String businessFormat = ""; -// String mapStr=""; -// -// -// String invclasscode=null; -// String invclassname=null; -// try { -// -// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); // 定义日期格式 -// Date date = new Date(System.currentTimeMillis()); // 创建Date对象 -// businessFormat = sdf.format(date); // 将Date对象格式化为字符串 -// -// -// -// -// List bdInvclEntities = new ArrayList<>(); -// -// BdInvclEntity bdInvclEntity = new BdInvclEntity(); -// -// //分类编码-invclasscode -// invclasscode = "AA004"; -// bdInvclEntity.setInvclasscode(invclasscode); -// -// //分类名称-invclassname -// invclassname = "分类名称:AA004"; -// -// bdInvclEntity.setInvclassname(invclassname); -// //公司编码-pk_corp -// String pk_corp = "1001"; -// bdInvclEntity.setPk_corp(pk_corp); -// //分类级别-invclasslevel -// bdInvclEntities.add(bdInvclEntity); -// -// String jsonStr = JSONUtil.toJsonStr(bdInvclEntities); -// -// Map map = new HashMap<>(); -// map.put("invcl", jsonStr); -// mapStr = JSONUtil.toJsonStr(map); -// -// String response = pushDataByU8cUtil.pushU8CByPK(OverallConstant.getOverAllValue("bdinvclSave"), mapStr); -// System.out.println(response); -// boolean isSuccess = false; -// if (response != null && !"".equals(response)) { -// ReusltStrDto reusltStrDto = JSON.parseObject(response, ReusltStrDto.class); -// if ("success".equals(reusltStrDto.getStatus())) { -// isSuccess = true; -// } -// } -// if (!isSuccess) { -// Assert.state(false, "推送U8C-->丽知:OFS货品档案分类--->U8C货品档案分类失败 接口返回结果:{} 接口入参:{}", response, jsonStr); -// } -// //成功 -// IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity(); -// integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_Y); -// integrationTaskLivingDetailsEntity.setRootAppNewData(mapStr); -// integrationTaskLivingDetailsEntity.setNewTransmitInfo(response); -// integrationTaskLivingDetailsEntity.setNewPushDate(new Date()); -// integrationTaskLivingDetailsEntity.setBusinessDate(businessFormat); -// integrationTaskLivingDetailsEntity.setRootAppPk(invclasscode); -// integrationTaskLivingDetailsEntity.setRootAppBill(invclassname); -// integrationTaskLivingDetailsEntity.setPluginId(getPluginId()); -// saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity); -// -// -// } catch (Exception e) { -// e.printStackTrace(); -// logger.error("丽知:OFS货品档案分类--->U8C货品档案分类,implement()方法报错:", e); -// //失败 -// String ErrMessage = e.getMessage(); -// IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity(); -// integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_N); -// integrationTaskLivingDetailsEntity.setRootAppNewData(mapStr); -// integrationTaskLivingDetailsEntity.setNewTransmitInfo(ErrMessage); -// integrationTaskLivingDetailsEntity.setNewPushDate(new Date()); -// integrationTaskLivingDetailsEntity.setBusinessDate(businessFormat); -// integrationTaskLivingDetailsEntity.setRootAppPk(invclasscode); -// integrationTaskLivingDetailsEntity.setRootAppBill(invclassname); -// integrationTaskLivingDetailsEntity.setPluginId(getPluginId()); -// saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity); -// } -// } - - /** - * 具体推送,支持新增,删除,修改 - * 根据编码和名称对应 - * ofs的id传U8C的forinvname - * - * @param ofsLevel OFS中的存货分类 - * @param u8cLevel U8C中的存货分类 - */ - public void specificImplement(List ofsLevel,List u8cLevel){ - - - } /**