dp2 icon indicating copy to clipboard operation
dp2 copied to clipboard

有关非流通图书仍可以借还书模拟测试

Open wuayang001 opened this issue 4 years ago • 4 comments

  1. 环境模拟 1.1 使用原有的非流通馆藏地进行借还书实验
  2. 问题查找 2.1 新建非流通馆藏地借还书---可以借还,未发现根本问题 2.2 复制粘贴library.xml配置文件----可以借还,未发现根本问题

wuayang001 avatar Oct 08 '21 02:10 wuayang001

环境模拟:(问题重现)

  1. 大备份恢复红泥巴数据到本地
  2. 打开 系统维护/系统管理窗 --馆藏地 记录一个不可流通的馆藏地
  3. 回到实体查询窗,按照馆藏地 查找到非流通的图书(B002)
  4. 回到读者查询窗,找到上个图书馆的读者记录(000101)
  5. 打开快捷出纳窗 借书 成功 问题重现

wuayang001 avatar Oct 08 '21 02:10 wuayang001

问题锁定 :

在library.xml中配置C#代码和JavaScript两处有关 两处代码配置及作用: #105 #157

本章节主要讲述两者关系及应用场景:

wuayang001 avatar Oct 09 '21 03:10 wuayang001

配置环境及代码

在library.xml中定义非流通库的可借还的C#代码:表示允许外借/还书 非流通库的图书。

    bool ItemCanBorrow(
         bool bRenew,
	 Account account, 
	 XmlDocument itemdom,
	 out string strMessageText)
    bool ItemCanBorrow(
         bool bRenew,
	 Account account, 
         XmlDocument readerdom,
	 XmlDocument itemdom,
	 out string strMessageText)

在library.xml中定义非流通库的 代码:

 <library code="红泥巴">
            <item canborrow="yes" canreturn="" itemBarcodeNullable="no">阅览室</item>
            <item canborrow="" canreturn="" itemBarcodeNullable="yes">典藏室</item>

在内务的系统维护/系统管理窗/馆藏地 下面编辑JavaScript代码:

javascript:
result = "no";
message = "Account:Location=(" + account.Location + ")";

wuayang001 avatar Oct 09 '21 03:10 wuayang001

主要关系:

当在library.xml中配置了C#代码之后,优先C#代码,JavaScript代码不起作用。 因为该功能用户使用起来麻烦,所以后面软件改进的时候将该功能被JavaScript代码替代

两者功能相同,所以尽量不要同时配置上,一般情况下为了后续维护方便需要将ItemCanBorrow()代码删掉 如果配置上默认C#起到作用。 在内务中更改C#代码时,记住一定要让代码成功编译。可通过重启实例完成

wuayang001 avatar Oct 09 '21 04:10 wuayang001