2023-02-16 焊接修改
This commit is contained in:
@@ -57,13 +57,33 @@ namespace BLL
|
||||
person.Message += item.UserCode + "--工号信息不能为空|";
|
||||
continue;
|
||||
}
|
||||
if (item.IdentityCard == null || item.IdentityCard == "")
|
||||
{
|
||||
|
||||
var getPerson = Person_PersonsService.GetPerson_PersonsByJobNum(item.UserCode);
|
||||
PersonDataItem personDataItem = new PersonDataItem
|
||||
{
|
||||
UserCode = item.UserCode,
|
||||
UserName = item.UserName,
|
||||
IdentityCard = item.IdentityCard,
|
||||
Image = item.Image
|
||||
};
|
||||
person.data.Add(personDataItem);
|
||||
person.Message += item.UserCode + "--身份信息不能为空|";
|
||||
continue;
|
||||
}
|
||||
Person_Persons getPerson = new Person_Persons();
|
||||
getPerson = Person_PersonsService.GetPerson_PersonsByIdCard(item.IdentityCard);
|
||||
if (getPerson==null)
|
||||
{
|
||||
getPerson = Person_PersonsService.GetPerson_PersonsByJobNum(item.UserCode);
|
||||
|
||||
}
|
||||
if (getPerson != null)
|
||||
{
|
||||
getPerson.JobNum = item.UserCode;
|
||||
getPerson.PersonName = item.UserName;
|
||||
getPerson.DataFrom = "API";
|
||||
getPerson.IdentityCard = item.IdentityCard;
|
||||
if (item.Image != "")
|
||||
{
|
||||
// Image bb = Image.FromFile("C:\\Users\\1420031550\\Desktop\\签名.jpg");
|
||||
|
||||
@@ -24,6 +24,8 @@ namespace BLL
|
||||
/// 现场安装
|
||||
/// </summary>
|
||||
public const string PipeArea_FIELD = "2";
|
||||
|
||||
public const int pageSize = 20;
|
||||
public static List<Model.HJGL_Pipeline> hJGL_Pipelines
|
||||
{
|
||||
|
||||
@@ -615,5 +617,42 @@ namespace BLL
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
public static void BindTreeNodes(FineUIPro.TreeNode node,string pipecode,string ProjectId,int pageSize)
|
||||
{
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == ProjectId && x.UnitWorkId == node.NodeID
|
||||
&& x.PipelineCode.Contains(pipecode)
|
||||
orderby x.PipelineCode
|
||||
select x).ToList();
|
||||
var hJGL_WeldJoints = (from x in Funs.DB.HJGL_WeldJoint where x.ProjectId == ProjectId select x).ToList();
|
||||
int pageindex = int.Parse(node.CommandName.Split('|')[0]);
|
||||
int pageCount = int.Parse(node.CommandName.Split('|')[1]);
|
||||
if (pageindex <= pageCount)
|
||||
{
|
||||
pipeline = pipeline.Skip(pageSize * (pageindex - 1)).Take(pageSize).ToList();
|
||||
foreach (var item in pipeline)
|
||||
{
|
||||
var jotCount = (from x in hJGL_WeldJoints where x.PipelineId == item.PipelineId /*&& x.IsTwoJoint == null*/ select x).Count();
|
||||
FineUIPro.TreeNode newNode = new FineUIPro.TreeNode();
|
||||
newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||
newNode.NodeID = item.PipelineId;
|
||||
newNode.CommandName = "管线";
|
||||
newNode.EnableClickEvent = true;
|
||||
node.Nodes.Add(newNode);
|
||||
}
|
||||
if (pageindex < pageCount)
|
||||
{
|
||||
FineUIPro.TreeNode newNode = new FineUIPro.TreeNode();
|
||||
newNode.Text = "加载";
|
||||
newNode.NodeID = SQLHelper.GetNewID();
|
||||
newNode.CommandName = "加载";
|
||||
newNode.Icon = FineUIPro.Icon.ArrowDown;
|
||||
newNode.EnableClickEvent = true;
|
||||
node.Nodes.Add(newNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -433,7 +433,7 @@ namespace BLL
|
||||
&& (string.IsNullOrEmpty(model.PipelineId) || x.PipelineId.Contains(model.PipelineId))
|
||||
&& (string.IsNullOrEmpty(model.PipelineCode) || x.PipelineCode.Contains(model.PipelineCode))
|
||||
&& (string.IsNullOrEmpty(model.WeldJointCode) || x.WeldJointCode.Contains(model.WeldJointCode))
|
||||
orderby x.WeldJointCode select x).ToList();
|
||||
orderby x.WeldJointCode select x).AsParallel().ToList();
|
||||
return q;
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
@@ -268,7 +268,17 @@ namespace BLL
|
||||
return q;
|
||||
}
|
||||
}
|
||||
|
||||
public static List<Model.Base_Unit> GetAllUnit()
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var q = (from x in db.Base_Unit
|
||||
|
||||
orderby x.UnitCode
|
||||
select x).Distinct().ToList();
|
||||
return q;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据项目Id获取单位名称下拉选择项
|
||||
/// </summary>
|
||||
@@ -558,7 +568,17 @@ namespace BLL
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
public static void GetALLUnit(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "UnitId";
|
||||
dropName.DataTextField = "UnitName";
|
||||
dropName.DataSource = GetAllUnit();
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 单位表下拉框
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user