20211229与博晟数据对接接口优化

This commit is contained in:
2021-12-29 18:38:36 +08:00
parent 3bda153d7c
commit 93996822ec
3 changed files with 34 additions and 7 deletions
+14 -3
View File
@@ -43,7 +43,7 @@ namespace BLL
/// </summary>
/// <param name="sender">Timer组件</param>
/// <param name="e">事件参数</param>
private static void AddData(object sender, ElapsedEventArgs e)
public static void AddData(object sender, ElapsedEventArgs e)
{
try
{
@@ -97,9 +97,20 @@ namespace BLL
}
else
{
if (type == "1")
string OtherDepartId = obj["OtherDepartId"].ToString();
var getPByCode= Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectCode == OtherDepartId);
if (getPByCode != null)
{
projectId = AddProject(arr);
getPByCode.FromProjectId = fromprojectId;
Funs.DB.SubmitChanges();
projectId = getPByCode.ProjectId;
}
else
{
if (type == "1")
{
projectId = AddProject(arr);
}
}
}