'报表分析-业绩利润统计-业务操作系数台账模块,其数据可见性改为受单独的权限限制'

QDHHYT
ddlucky 2 years ago
parent 721f1e224f
commit ce09c059a0

@ -2180,6 +2180,183 @@ namespace DSWeb.Areas.CommMng.DAL
return result;
}
/// <summary>
/// 用于数据库中的权限字段都是user.showname的内容时使用
/// </summary>
/// <param name="rangetype"></param>
/// <param name="modName"></param>
/// <param name="USERID"></param>
/// <param name="COMPANYFIELDNAME"></param>
/// <param name="USERFIELDArray"></param>
/// <param name="DEPTFIELDNAME"></param>
/// <returns></returns>
public static string GetRangeCondition_SHOWNAME(RangeType rangetype, string modName, string USERID, string COMPANYFIELDNAME, string[] USERFIELDArray, string DEPTFIELDNAME = "")
{
var RANGENAME = "";
if (rangetype == RangeType.Visable)
{
RANGENAME = "VISIBLERANGE";
}
if (rangetype == RangeType.Operate)
{
RANGENAME = "OPERATERANGE";
}
if (RANGENAME == "") return " 1=2 ";
var evList = BasicDataRefDAL.GetAR(modName, USERID);
if (evList.Count == 0) return " 1=2 ";
AuthorityRangemb head = null;
var result = "";
var RANGEVALUE = "3";
if (evList.Count > 0)
head = evList[0];
if (head == null)
{
head = new AuthorityRangemb();
}
else
{
if (rangetype == RangeType.Visable)
{
RANGEVALUE = head.VISIBLERANGE;
}
if (rangetype == RangeType.Operate)
{
RANGEVALUE = head.OPERATERANGE;
}
}
//0 全部
if (RANGEVALUE == "0")
{
result = "1=1";
}
else
if (RANGEVALUE == "1")
{//1 分公司
if (!string.IsNullOrEmpty(COMPANYFIELDNAME))
{
result = COMPANYFIELDNAME + " in(select top 1 companyid from vw_user where userid='" + USERID + "' or showname='" + USERID + "')";
}
else if (USERFIELDArray.Length > 0)
{
var _S = "";
foreach (var USERFIELD in USERFIELDArray)
{
if (_S != "") _S += " or ";
_S = _S + USERFIELD + " in( select USERID from vw_user where companyid in(select companyid from vw_user where userid='" + USERID + "' or showname='" + USERID + "')" +
" union all select SHOWNAME from vw_user where companyid in(select top 1 companyid from vw_user where userid = '" + USERID + "' or showname = '" + USERID + "'))";
}
result = "(" + _S + ")";
}
}
else
if (RANGEVALUE == "2")
{
if (!string.IsNullOrEmpty(COMPANYFIELDNAME))
{
result = COMPANYFIELDNAME + " in(select top 1 companyid from vw_user where userid='" + USERID + "' or showname='" + USERID + "')";
result += " and " + DEPTFIELDNAME + " in(select top 1 deptgid from vw_user where userid='" + USERID + "' or showname='" + USERID + "' union all select top 1 deptname from vw_user where userid='" + USERID + "' or showname='" + USERID + "' ) ";
}
else if (USERFIELDArray.Length > 0)
{
var _S = "";
foreach (var USERFIELD in USERFIELDArray)
{
if (_S != "") _S += " or ";
_S = _S + USERFIELD + " in( select SHOWNAME from vw_user where deptgid in(select deptgid from vw_user where userid = '" + USERID + "' or showname = '" + USERID + "'))";
}
result = "(" + _S + ")";
}
}
else
if (RANGEVALUE == "3")
{
if (USERFIELDArray.Length > 0)
{
//result = USERFIELD + " ='" + USERID + "' ";
var _S = "";
foreach (var USERFIELD in USERFIELDArray)
{
if (_S != "") _S += " or ";
_S = _S + USERFIELD + " =( select SHOWNAME from vw_user where USERID in(select USERID from vw_user where userid = '" + USERID + "' or showname = '" + USERID + "'))";
}
result = "(" + _S + ")";
}
}
else
if (RANGEVALUE == "4")
{
if (USERFIELDArray.Length > 0)
{
result = "1=2";
}
}
else
if (RANGEVALUE == "5")
{//选择公司
if (!string.IsNullOrEmpty(COMPANYFIELDNAME))
{
result = COMPANYFIELDNAME + " in(select COMPANYID from user_authority_range_company where AUTHORITYID=(select GID from user_authority_info where Name='" + modName + "' or DESCRIPTION='" + modName + "') and " + RANGENAME + " = 1)";
}
else if (USERFIELDArray.Length > 0)
{
var _S = "";
foreach (var USERFIELD in USERFIELDArray)
{
if (_S != "") _S += " or ";
_S = _S + " exists(select 1 from vw_user where companyid in " +
"(select companyid from user_authority_range_company where AUTHORITYID = " +
"(select GID from user_authority_info where Name = '" + modName + "' or DESCRIPTION = '" + modName + "') and " + RANGENAME + " = 1 " +
") and( SHOWNAME = " + USERFIELD + "))";
}
result = "(" + _S + ")";
//result = USERFIELD + " in(select USERID from vw_user where companyid in(select COMPANYID from user_authority_range_company where userid='"
// + USERID + "' and AUTHORITYID=(select GID from user_authority_info where name='" + modName + "') and VISIBLERANGE=1)";
}
}
else
if (RANGEVALUE == "6")
{//选择个人
if (USERFIELDArray.Length > 0)
{
var _S = "";
foreach (var USERFIELD in USERFIELDArray)
{
if (_S != "") _S += " or ";
_S = _S + USERFIELD + " in(select showname from vw_user where userid in(select OPID from user_authority_range_op where userid = (select userid from vw_user where userid = '" + USERID + "'" +
" or showname = '" + USERID + "') and AUTHORITYID = (select GID from user_authority_info where name = '" + modName + "' or description = '" + modName + "') and " + RANGENAME + " = 1))";
}
result = "(" + _S + ")";
//result = USERFIELD + " in(select OPID from user_authority_range_op where userid='"
// + USERID + "' and AUTHORITYID=(select GID from user_authority_info where name='" + modName + "') and VISIBLERANGE=1)";
}
}
if (head == null || result == "")
{
result = "1=2";
}
return result;
}
public enum RangeType
{
Visable,

@ -42,17 +42,18 @@ namespace DSWeb.MvcShipping.Controllers
public ContentResult OpXsListData(int start, int limit, string condition, string sort, string printstr, string sortstr)
{
var strDa = GetRangDAStr("index", Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]));
//var strDa = GetRangDAStr("index", Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]));
var rangestr = BasicDataRefDAL.GetRangeCondition(BasicDataRefDAL.RangeType.Visable, "modRptOpXsList", Convert.ToString(Session["USERID"]), "CORPID", new string[] { "OP", "CUSTSERVICE", "SALE" });
if (!string.IsNullOrEmpty(strDa))
if (!string.IsNullOrEmpty(rangestr))
{
if (!string.IsNullOrEmpty(condition))
{
condition = condition + " and " + strDa;
condition = condition + " and " + rangestr;
}
else
{
condition = strDa;
condition = rangestr;
}
}

@ -283,6 +283,13 @@ Ext.extend(Shipping.MsOpSeaeSaleIndex, Ext.Panel, {
header: '开船日期',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'ATD',
header: 'ETD',
width: 80
},
{
sortable: true,
id: '',

@ -145,10 +145,16 @@ Ext.extend(Shipping.MsSeaeOrderIndex, Ext.Panel, {
},
{
sortable: true,
dataIndex: 'ETD',//'ETD'
dataIndex: 'ETD',//'ATD'
header: '开船日期',
width: 80
},
{
sortable: true,
dataIndex: 'ATD',//'ETD'
header: 'ETD',
width: 80
},
{
sortable: true,
dataIndex: 'BLTYPE',

@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Project>
<PropertyGroup>
<_PublishTargetUrl>F:\DS7Deploy</_PublishTargetUrl>
<History>True|2022-07-08T09:56:36.6537953Z;True|2022-07-08T11:32:07.8054365+08:00;</History>
<History>False|2022-07-14T06:03:07.0514178Z;True|2022-07-08T17:56:36.6537953+08:00;True|2022-07-08T11:32:07.8054365+08:00;</History>
</PropertyGroup>
<ItemGroup>
<File Include="About.aspx">
@ -2727,7 +2727,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<publishTime>04/22/2022 16:55:25</publishTime>
</File>
<File Include="Areas/Import/Viewsjs/ImportTrade/MsOpBillEdit.js">
<publishTime>04/22/2022 16:55:25</publishTime>
<publishTime>07/14/2022 13:33:29</publishTime>
</File>
<File Include="Areas/Import/Viewsjs/ImportTrade/MsOpBillIndex.js">
<publishTime>04/22/2022 16:55:25</publishTime>
@ -7536,16 +7536,16 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<publishTime>04/22/2022 16:55:10</publishTime>
</File>
<File Include="Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpBillEdit.js">
<publishTime>04/22/2022 16:55:10</publishTime>
<publishTime>07/14/2022 13:33:29</publishTime>
</File>
<File Include="Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpBillIndex.js">
<publishTime>04/22/2022 16:55:10</publishTime>
</File>
<File Include="Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpBillLSEdit.js">
<publishTime>07/08/2022 09:32:49</publishTime>
<publishTime>07/14/2022 13:06:44</publishTime>
</File>
<File Include="Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpBillLSEditIndex.js">
<publishTime>04/22/2022 16:55:10</publishTime>
<publishTime>07/14/2022 13:10:48</publishTime>
</File>
<File Include="Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpBillModel.js">
<publishTime>07/08/2022 09:32:49</publishTime>
@ -7566,7 +7566,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<publishTime>07/11/2022 19:13:45</publishTime>
</File>
<File Include="Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeCancelIndex.js">
<publishTime>07/11/2022 19:13:46</publishTime>
<publishTime>07/14/2022 13:57:45</publishTime>
</File>
<File Include="Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeCtnListIndex.js">
<publishTime>07/11/2022 19:13:46</publishTime>
@ -7608,7 +7608,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<publishTime>07/08/2022 09:32:49</publishTime>
</File>
<File Include="Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeSaleIndex.js">
<publishTime>07/08/2022 09:32:49</publishTime>
<publishTime>07/14/2022 14:21:36</publishTime>
</File>
<File Include="Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeTaskView.js">
<publishTime>07/08/2022 09:32:49</publishTime>
@ -8346,7 +8346,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<publishTime>07/08/2022 09:32:49</publishTime>
</File>
<File Include="Areas/MvcShipping/Viewsjs/MsSeaeOrder/MsSeaeOrderIndex.js">
<publishTime>07/11/2022 19:13:45</publishTime>
<publishTime>07/14/2022 14:23:04</publishTime>
</File>
<File Include="Areas/MvcShipping/Viewsjs/MsSeaeOrder/MsSeaeOrderModel.js">
<publishTime>04/22/2022 16:55:12</publishTime>
@ -12633,28 +12633,28 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<publishTime>09/19/2019 15:18:20</publishTime>
</File>
<File Include="bin/DSWeb.Common.dll">
<publishTime>07/11/2022 19:15:19</publishTime>
<publishTime>07/14/2022 17:47:22</publishTime>
</File>
<File Include="bin/DSWeb.Common.dll.config">
<publishTime>07/01/2022 11:51:48</publishTime>
</File>
<File Include="bin/DSWeb.Common.pdb">
<publishTime>07/11/2022 19:15:19</publishTime>
<publishTime>07/14/2022 17:47:22</publishTime>
</File>
<File Include="bin/DSWeb.dll">
<publishTime>07/11/2022 19:15:38</publishTime>
<publishTime>07/14/2022 17:47:37</publishTime>
</File>
<File Include="bin/DSWeb.Interface.dll">
<publishTime>07/11/2022 19:15:19</publishTime>
<publishTime>07/14/2022 17:47:22</publishTime>
</File>
<File Include="bin/DSWeb.Interface.pdb">
<publishTime>07/11/2022 19:15:19</publishTime>
<publishTime>07/14/2022 17:47:22</publishTime>
</File>
<File Include="bin/DSWeb.pdb">
<publishTime>07/11/2022 19:15:38</publishTime>
<publishTime>07/14/2022 17:47:37</publishTime>
</File>
<File Include="bin/DSWeb.XmlSerializers.dll">
<publishTime>07/11/2022 19:15:40</publishTime>
<publishTime>07/14/2022 17:47:38</publishTime>
</File>
<File Include="bin/DSWebComponent.dll">
<publishTime>07/08/2022 09:54:43</publishTime>
@ -23571,7 +23571,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<publishTime>07/01/2022 11:51:57</publishTime>
</File>
<File Include="Web.config">
<publishTime>07/08/2022 10:46:43</publishTime>
<publishTime>07/14/2022 12:05:12</publishTime>
</File>
<File Include="WebSearchEngine/SearchEngineAdapter.aspx">
<publishTime>07/01/2022 11:51:57</publishTime>

Loading…
Cancel
Save