Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于馆藏限定范围 #218

Open
renyh opened this issue Nov 29, 2018 · 2 comments
Open

关于馆藏限定范围 #218

renyh opened this issue Nov 29, 2018 · 2 comments

Comments

@renyh
Copy link
Collaborator

renyh commented Nov 29, 2018

我爱图书馆公众号的馆藏地限定范围,原来主要用于馆员或有借还权限的读者在借还时扫入ISBN时,只对关注的馆藏地进行借还,后来公众号的借还取消了扫ISBN的情况,所以这个设置其实对借还没有意义了。

但这个选择关注的馆藏地范围,可以作为工作人员或读者的偏好,比较在书目检索时,关注的馆藏地的册排在前面显示。

列出哪些馆藏地?是根据当前帐户的分馆代码来决定的:
1)如果是工作人员帐户,分馆代码为空,列出总馆和所有分馆的馆藏地;如果分馆代码不为空(有可能是多个分馆),则列出管理的这些分馆的馆藏地。
2)如果是读者帐户,分馆代码为空,列出总馆和所有分馆的馆藏地;如果有分馆代码(读者只能有一个所属的分馆),则列该分馆的馆藏地。

开发上是调用dp2library的getSystemParameter接口,参数为catalog=circulation,name=locationTypes。

            List<string> dataList = null;
            int nRet = this.GetInfo(lib,
                loginInfo,
                "getSystemParameter",
                "circulation",
                "locationTypes",
                out dataList,
                out error);
            if (nRet == -1 || nRet == 0)
                return -1;
            location = dataList[0];

返回的location格式,注意是没有根元素的哦。

<item canborrow="no" itemBarcodeNullable="yes">保存本库</item>
<item canborrow="no" itemBarcodeNullable="yes">阅览室</item>
<item canborrow="yes" itemBarcodeNullable="yes">流通库</item>
<library code="方洲小学">
  <item canborrow="yes" itemBarcodeNullable="yes">图书总库</item>
</library>
<library code="星洲小学">
  <item canborrow="yes" itemBarcodeNullable="yes">阅览室</item>
</library>

这里也说明一下,获取图书类型和读者类型,可以用catalogo=_valueTable,name=bookType来获取,但获取馆藏地只能用catalog=circulation,name=locationTypes来获取。

            List<string> dataList3 = null;
            int nRet3 = this.GetInfo(lib,
                loginInfo,
                "getSystemParameter",
                "_valueTable",
                "bookType",
                out dataList3,
                out error);
@renyh
Copy link
Collaborator Author

renyh commented Apr 7, 2020

因为从服务器上得到的馆藏地、读者类型、图书类型的值,会根据登录帐户,返回不同范围的值。所以在我爱图书馆这边,不适合存储在图书馆的本地库,也不适合放在图书馆的内存对象里。而是应设在当前登录帐户的session里。
每次一个用户打开我爱图书馆web端或微信会有一个session,这个session存储了当前用户的各种信息,当需要用到图书类型和馆藏地(例如册登记时)或者用到读者类型(例如读者审核时),如果发现session中没有这个值则从服务器获取,有则直接使用。

@renyh
Copy link
Collaborator Author

renyh commented Apr 7, 2020

某用户是由几个分院组成,每个分院配置了不同的馆藏地,用户希望自己关心的馆藏地的册记录,在书目下显示的时候排在前面。开发上这样处理:
1)用户进入书目查询时,先弹出设置对话框,让用户选择一下关注的馆藏地,如果设置过了,则不弹出来。
2)在书目下显示册记录时,检查当前用户关注的馆藏地是什么,这个馆藏地的册记录排在前面。
3)在图书馆也加一个配置项,表示该馆是否要求 在书目查询时,先检查关注馆藏地配置。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant