提交代码
This commit is contained in:
parent
25f117de1a
commit
ea4dc8fd8f
|
@ -69,7 +69,7 @@ namespace BLL
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var result = Funs.DB.Sys_UserSettings.Where(a => a.Id== newId).ToList();
|
var result = Funs.DB.Sys_UserSettings.Where(a => a.Id == newId).ToList();
|
||||||
if (result.Count > 0)
|
if (result.Count > 0)
|
||||||
{
|
{
|
||||||
Funs.DB.Sys_UserSettings.DeleteAllOnSubmit(result);
|
Funs.DB.Sys_UserSettings.DeleteAllOnSubmit(result);
|
||||||
|
@ -149,7 +149,7 @@ namespace BLL
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var result = Funs.DB.Sys_UserSettings_c.Where(a => a.SettingId==newId).ToList();
|
var result = Funs.DB.Sys_UserSettings_c.Where(a => a.SettingId == newId).ToList();
|
||||||
if (result.Count > 0)
|
if (result.Count > 0)
|
||||||
{
|
{
|
||||||
Funs.DB.Sys_UserSettings_c.DeleteAllOnSubmit(result);
|
Funs.DB.Sys_UserSettings_c.DeleteAllOnSubmit(result);
|
||||||
|
@ -172,11 +172,13 @@ namespace BLL
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 添加项目时,添加项目用户和单位
|
#region 添加项目时,添加项目用户和单位
|
||||||
public class uItem {
|
public class uItem
|
||||||
|
{
|
||||||
public string UserId { get; set; }
|
public string UserId { get; set; }
|
||||||
public string UnitId { get; set; }
|
public string UnitId { get; set; }
|
||||||
}
|
}
|
||||||
public static void addUserAnUnitByProjectId(string projectid,string userid) {
|
public static void addUserAnUnitByProjectId(string projectid, string userid, string currUserId)
|
||||||
|
{
|
||||||
var AddProject_UserList = new List<Model.Project_User>();
|
var AddProject_UserList = new List<Model.Project_User>();
|
||||||
var AddProject_Unit = new List<Model.Project_Unit>();
|
var AddProject_Unit = new List<Model.Project_Unit>();
|
||||||
|
|
||||||
|
@ -186,14 +188,14 @@ namespace BLL
|
||||||
|
|
||||||
var bUser = Funs.DB.Sys_User;
|
var bUser = Funs.DB.Sys_User;
|
||||||
var bUnit = Funs.DB.Project_Unit;
|
var bUnit = Funs.DB.Project_Unit;
|
||||||
if (list.Count!=0)
|
if (list.Count != 0)
|
||||||
{
|
{
|
||||||
foreach (var item in list)
|
foreach (var item in list)
|
||||||
{
|
{
|
||||||
//获取子表中的包含角色和包含用户
|
//获取子表中的包含角色和包含用户
|
||||||
#region 用户
|
#region 用户
|
||||||
var listUser = Funs.DB.Sys_UserSettings_c.Where(x => x.SettingId == item.Id && x.UserType == "0").ToList();
|
var listUser = Funs.DB.Sys_UserSettings_c.Where(x => x.SettingId == item.Id && x.UserType == "0").ToList();
|
||||||
if (listUser.Count>0)
|
if (listUser.Count > 0)
|
||||||
{
|
{
|
||||||
foreach (var itemC in listUser)
|
foreach (var itemC in listUser)
|
||||||
{
|
{
|
||||||
|
@ -203,9 +205,12 @@ namespace BLL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//添加创建人用户
|
//添加创建人用户
|
||||||
uItem cm = new uItem();
|
if (userid != BLL.Const.GlyId && userid != currUserId)
|
||||||
cm.UserId = userid;
|
{
|
||||||
uItemList.Add(cm);
|
uItem cm = new uItem();
|
||||||
|
cm.UserId = userid;
|
||||||
|
uItemList.Add(cm);
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 角色
|
#region 角色
|
||||||
|
@ -216,7 +221,7 @@ namespace BLL
|
||||||
{
|
{
|
||||||
//根据角色获取所有用户
|
//根据角色获取所有用户
|
||||||
var listU = bUser.Where(x => x.RoleId == itemC.ValId).ToList();
|
var listU = bUser.Where(x => x.RoleId == itemC.ValId).ToList();
|
||||||
if (listU.Count>0)
|
if (listU.Count > 0)
|
||||||
{
|
{
|
||||||
foreach (var itemR in listU)
|
foreach (var itemR in listU)
|
||||||
{
|
{
|
||||||
|
@ -232,7 +237,7 @@ namespace BLL
|
||||||
//去重复
|
//去重复
|
||||||
uItemList = uItemList.GroupBy(x => x.UserId).Select(s => new uItem { UserId = s.Key }).ToList();
|
uItemList = uItemList.GroupBy(x => x.UserId).Select(s => new uItem { UserId = s.Key }).ToList();
|
||||||
}
|
}
|
||||||
if (uItemList.Count>0)
|
if (uItemList.Count > 0)
|
||||||
{
|
{
|
||||||
foreach (var item in uItemList)
|
foreach (var item in uItemList)
|
||||||
{
|
{
|
||||||
|
@ -246,12 +251,12 @@ namespace BLL
|
||||||
|
|
||||||
//增加单位
|
//增加单位
|
||||||
uItem m = new uItem();
|
uItem m = new uItem();
|
||||||
m.UnitId = bUser.FirstOrDefault(x=>x.UserId==item.UserId).UnitId;
|
m.UnitId = bUser.FirstOrDefault(x => x.UserId == item.UserId).UnitId;
|
||||||
unitItemList.Add(m);
|
unitItemList.Add(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
unitItemList = unitItemList.GroupBy(x => x.UnitId).Select(s => new uItem { UnitId = s.Key }).ToList();
|
unitItemList = unitItemList.GroupBy(x => x.UnitId).Select(s => new uItem { UnitId = s.Key }).ToList();
|
||||||
if (unitItemList.Count>0)
|
if (unitItemList.Count > 0)
|
||||||
{
|
{
|
||||||
foreach (var item in unitItemList)
|
foreach (var item in unitItemList)
|
||||||
{
|
{
|
||||||
|
@ -260,7 +265,7 @@ namespace BLL
|
||||||
pUnit.ProjectId = projectid;
|
pUnit.ProjectId = projectid;
|
||||||
pUnit.UnitId = item.UnitId;
|
pUnit.UnitId = item.UnitId;
|
||||||
//单位类型
|
//单位类型
|
||||||
var bresult = bUnit.FirstOrDefault(x => x.UnitId == item.UnitId && x.UnitType!=null && x.UnitType!="");
|
var bresult = bUnit.FirstOrDefault(x => x.UnitId == item.UnitId && x.UnitType != null && x.UnitType != "");
|
||||||
if (bresult != null)
|
if (bresult != null)
|
||||||
{
|
{
|
||||||
pUnit.UnitType = bresult.UnitType;
|
pUnit.UnitType = bresult.UnitType;
|
||||||
|
|
|
@ -30,3 +30,25 @@ IP地址:::1
|
||||||
|
|
||||||
出错时间:05/27/2025 16:56:28
|
出错时间:05/27/2025 16:56:28
|
||||||
|
|
||||||
|
|
||||||
|
错误信息开始=====>
|
||||||
|
错误类型:XmlException
|
||||||
|
错误信息:名称不能以“<”字符(十六进制值 0x3C)开头。 第 14 行,位置 2。
|
||||||
|
错误堆栈:
|
||||||
|
在 System.Xml.XmlTextReaderImpl.Throw(Exception e)
|
||||||
|
在 System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
|
||||||
|
在 System.Xml.XmlTextReaderImpl.ParseQName(Boolean isQName, Int32 startOffset, Int32& colonPos)
|
||||||
|
在 System.Xml.XmlTextReaderImpl.ParseElement()
|
||||||
|
在 System.Xml.XmlTextReaderImpl.ParseElementContent()
|
||||||
|
在 System.Xml.XmlTextReaderImpl.Read()
|
||||||
|
在 System.Xml.XmlTextReader.Read()
|
||||||
|
在 System.Configuration.XmlUtil.CopyXmlNode(XmlUtilWriter utilWriter)
|
||||||
|
在 System.Configuration.XmlUtil.CopyElement(XmlUtilWriter utilWriter)
|
||||||
|
在 System.Configuration.XmlUtil.CopySection()
|
||||||
|
在 System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(XmlUtil xmlUtil, String parentConfigKey, Boolean inLocation, String locationSubPath, OverrideModeSetting overrideMode, Boolean skipInChildApps)
|
||||||
|
在 System.Configuration.BaseConfigurationRecord.ScanSections(XmlUtil xmlUtil)
|
||||||
|
在 System.Configuration.BaseConfigurationRecord.InitConfigFromFile()
|
||||||
|
出错时间:06/09/2025 10:47:53
|
||||||
|
|
||||||
|
出错时间:06/09/2025 10:47:53
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<FineUIPro DebugMode="false" Theme="Cupertino"/>
|
<FineUIPro DebugMode="false" Theme="Cupertino"/>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<!--连接字符串-->
|
<!--连接字符串-->
|
||||||
<add key="ConnectionString" value="Server=.\SQL2022;Database=HJGLDB_DS;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Max Pool Size = 1000;Connect Timeout=1200"/>
|
<add key="ConnectionString" value="Server=.\MSSQLSERVER01;Database=HJGLDB_DS;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Max Pool Size = 1000;Connect Timeout=1200"/>
|
||||||
<!--系统名称-->
|
<!--系统名称-->
|
||||||
<add key="SystemName" value="诺必达焊接管理系统"/>
|
<add key="SystemName" value="诺必达焊接管理系统"/>
|
||||||
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>
|
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>
|
||||||
|
|
|
@ -217,7 +217,7 @@ namespace FineUIPro.Web.common.BaseInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
//给新项目新增默认参与用户中的配置,项目用户及项目单位
|
//给新项目新增默认参与用户中的配置,项目用户及项目单位
|
||||||
BLL.Sys_UserSettingsService.addUserAnUnitByProjectId(newProjectId, project.CreateManId);
|
BLL.Sys_UserSettingsService.addUserAnUnitByProjectId(newProjectId, project.CreateManId, this.CurrUser.UserId);
|
||||||
|
|
||||||
//if (project.ProjectSoft == "2")//当选择压力容器时,在新项目中增加制造分公司
|
//if (project.ProjectSoft == "2")//当选择压力容器时,在新项目中增加制造分公司
|
||||||
//{
|
//{
|
||||||
|
|
Loading…
Reference in New Issue