地址相关表、视图增加账套无关的对应表
发布时间:2026.04.07
| 说明 | 账套相关 | 账套无关 |
| 国家 | t005、t005t | t005ex、t005tex |
| 地区 | t005s、t005u | t005sex、t005uex |
| t005e、t005f | t005eex、t005fex | |
| 城市 | t005g、t005h | t005gex、t005hex |
| 城区 | t005v、t005w | t005vex、t005wex |
新建视图 v_t005ex、v_t005sex、v_t005eex、v_t005gex、v_t005vex
在CGuiVersion中定义一个静态函数UseMandtRelatedAddreassTable(),返回值代表是否使用账套相关的地址类表格,在如下地方使用:
1、缓存数据时,根据UseMandtRelatedAddreassTable()的返回值决定使用哪个视图,比如:
case TB_T005:
if(CGuiVersion::UseMandtRelatedAddreassTable())
sSql.Format(_T("select * from v_t005 where mandt='%s' and spras='%s' and tmstp>='%s'"), sMandt, sSpras, sTmstp);
else
sSql.Format(_T("select * from v_t005ex where spras='%s' and tmstp>='%s'"), sSpras, sTmstp);
break;
2、插入本地表时,也要做调整,比如:
case TB_T005:
{
fs = _T("mandt");
if (CGuiVersion::UseMandtRelatedAddreassTable())
{
vs = pQy->Field(sKey, nIndex, _T("mandt"));
}
else
{
vs = MANDT;
}
pValues->insert(std::pair<CString, CString>(fs, vs));
......
3、电脑客户端不再允许用户自定义国家、地区、城市、城区这些基础数据,由管理员后台维护:
修改CBrowseEditLand1UI、CBrowseEditBlandUI、CBrowseEditCitycUI、CBrowseEditAreacUI的构造函数如下:
......
m_bEnableCreate = CGuiVersion::UseMandtRelatedAddreassTable();
......
上一篇:T459K 需求类
下一篇:没有了!
