From bf4317db350d1516a1d64ad592e747b8a1410b49 Mon Sep 17 00:00:00 2001 From: jiangs <373297395@qq.com> Date: Tue, 12 Aug 2025 15:31:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/service/impl/CommonImpl.java | 5 ++++ .../service/impl/Lisinterface_jldermyy.java | 24 ++++++++++--------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/liscommon/src/main/java/com/czlisinterface/system/service/impl/CommonImpl.java b/liscommon/src/main/java/com/czlisinterface/system/service/impl/CommonImpl.java index 35ac503..b24330d 100644 --- a/liscommon/src/main/java/com/czlisinterface/system/service/impl/CommonImpl.java +++ b/liscommon/src/main/java/com/czlisinterface/system/service/impl/CommonImpl.java @@ -309,6 +309,11 @@ public class CommonImpl implements HISInterfaceService { xmFee.setZjf(pinyin); xmFee.setXmlb("HIS"); xmFee.setBz(xmFee.getSfxmmc()); + String sfxmmc = xmFee.getSfxmmc(); + if(sfxmmc.length() >= 20){ + sfxmmc = sfxmmc.substring(0,20); + } + xmFee.setSfxmmc(sfxmmc); commonUtil.insertXmFee(xmFee); j++; } diff --git a/lisinterface_jldermyy/src/main/java/com/czlisinterface/jldermyy/service/impl/Lisinterface_jldermyy.java b/lisinterface_jldermyy/src/main/java/com/czlisinterface/jldermyy/service/impl/Lisinterface_jldermyy.java index 4655f04..d044335 100644 --- a/lisinterface_jldermyy/src/main/java/com/czlisinterface/jldermyy/service/impl/Lisinterface_jldermyy.java +++ b/lisinterface_jldermyy/src/main/java/com/czlisinterface/jldermyy/service/impl/Lisinterface_jldermyy.java @@ -56,11 +56,12 @@ public class Lisinterface_jldermyy extends CommonImpl { @Override public Result invokeHttp(String param) { Result result = super.invokeHttp(param); - if(!result.equals("1")) return result; + if(!result.getResultCode().equals("1")) return result; JSONObject jsonObject = JSONUtil.parseObj(param); String method = jsonObject.getStr("method"); switch (method){ - + case "getDictDPM": + return getDictDPM(""); } return new Result("-1","没有找到接口方法!"); @@ -257,9 +258,9 @@ public class Lisinterface_jldermyy extends CommonImpl { Result result = toXml("00008", "QueryCondition", queryConditionMap); if(!result.getResultCode().equals("0")) return result; Document document = XmlUtil.parseXml(result.getData().toString()); - NodeList nodeListByXPath = XmlUtil.getNodeListByXPath("//Res/DeptList", document); + NodeList nodeListByXPath = XmlUtil.getNodeListByXPath("//Res/DeptList/Row", document); List deptListList = new ArrayList<>(); - for (int i = 1; i <= nodeListByXPath.getLength(); i++) { + for (int i = 0; i < nodeListByXPath.getLength(); i++) { DeptList deptList = XmlUtil.xmlToBean(nodeListByXPath.item(i), DeptList.class); deptListList.add(deptList); } @@ -273,6 +274,7 @@ public class Lisinterface_jldermyy extends CommonImpl { comDict.setYljg("1"); comDictList.add(comDict); } + log.info("comDictList:"+comDictList); return new Result("0","",comDictList); } @@ -287,9 +289,9 @@ public class Lisinterface_jldermyy extends CommonImpl { Result result = toXml("00014", "ItemInfo", itemInfoMap); if(!result.getResultCode().equals("0")) return result; Document document = XmlUtil.parseXml(result.getData().toString()); - NodeList nodeListByXPath = XmlUtil.getNodeListByXPath("//Res/ItemList", document); + NodeList nodeListByXPath = XmlUtil.getNodeListByXPath("//Res/ItemList/Row", document); List itemListList = new ArrayList<>(); - for (int i = 1; i <= nodeListByXPath.getLength(); i++) { + for (int i = 0; i < nodeListByXPath.getLength(); i++) { ItemList itemList = XmlUtil.xmlToBean(nodeListByXPath.item(i), ItemList.class); itemListList.add(itemList); } @@ -297,7 +299,7 @@ public class Lisinterface_jldermyy extends CommonImpl { for (ItemList itemList : itemListList) { XmFee xmFee = new XmFee(); xmFee.setYljg("1"); - xmFee.setSfxmdh(itemList.getItemCode()); + xmFee.setSfxmdh(StrUtil.replace(LisUtil.isBank(itemList.getItemCode()),"041-","")); xmFee.setSfxmmc(itemList.getItemName()); xmFee.setDj(new BigDecimal(itemList.getItemPrice())); xmFee.setSpec(itemList.getItemSpec()); @@ -316,9 +318,9 @@ public class Lisinterface_jldermyy extends CommonImpl { Result result = toXml("00005", "QueryCondition", queryConditionMap); if(!result.getResultCode().equals("0")) return result; Document document = XmlUtil.parseXml(result.getData().toString()); - NodeList nodeListByXPath = XmlUtil.getNodeListByXPath("//Res/UserList", document); + NodeList nodeListByXPath = XmlUtil.getNodeListByXPath("//Res/UserList/Row", document); List userListList = new ArrayList<>(); - for (int i = 1; i <= nodeListByXPath.getLength(); i++) { + for (int i = 0; i < nodeListByXPath.getLength(); i++) { UserList userList = XmlUtil.xmlToBean(nodeListByXPath.item(i), UserList.class); userListList.add(userList); } @@ -350,9 +352,9 @@ public class Lisinterface_jldermyy extends CommonImpl { Result result = toXml("00012", "WardInfo", wardInfoMap); if(!result.getResultCode().equals("0")) return result; Document document = XmlUtil.parseXml(result.getData().toString()); - NodeList nodeListByXPath = XmlUtil.getNodeListByXPath("//Res/WardList", document); + NodeList nodeListByXPath = XmlUtil.getNodeListByXPath("//Res/WardList/Row", document); List wardListList = new ArrayList<>(); - for (int i = 1; i <= nodeListByXPath.getLength(); i++) { + for (int i = 0; i < nodeListByXPath.getLength(); i++) { WardList wardList = XmlUtil.xmlToBean(nodeListByXPath.item(i), WardList.class); wardListList.add(wardList); }