增加功能

This commit is contained in:
jiangs 2025-08-12 15:31:05 +08:00
parent 048188674a
commit bf4317db35
2 changed files with 18 additions and 11 deletions

View File

@ -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++;
}

View File

@ -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<DeptList> 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<ItemList> 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<UserList> 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<WardList> 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);
}