Commit 418e04f7 authored by solho's avatar solho

fixed id

parent 4f55691d
...@@ -445,11 +445,6 @@ namespace WebAPI.Controllers ...@@ -445,11 +445,6 @@ namespace WebAPI.Controllers
if (dsr["esn_todos_sn"] == DBNull.Value) //insert if (dsr["esn_todos_sn"] == DBNull.Value) //insert
{ {
if (JtSn["validclass"] == null || string.IsNullOrEmpty(JtSn["validclass"].ToString()))
{
return_msg_error.Add(dsr["esn_todos_sn"] + ":無FLOW資料時,請設定來源身分代碼(設定validclass )");
continue;
}
if (JtSn["targetclass"] == null || string.IsNullOrEmpty(JtSn["targetclass"].ToString())) if (JtSn["targetclass"] == null || string.IsNullOrEmpty(JtSn["targetclass"].ToString()))
{ {
return_msg_error.Add(dsr["esn_todos_sn"] + ":無FLOW資料時,請設定目的身分代碼(設定targetclass )"); return_msg_error.Add(dsr["esn_todos_sn"] + ":無FLOW資料時,請設定目的身分代碼(設定targetclass )");
...@@ -458,13 +453,11 @@ namespace WebAPI.Controllers ...@@ -458,13 +453,11 @@ namespace WebAPI.Controllers
CStepTypeCur = AllStepType.Where(p => p.Map_Class.Contains(JtSn["validclass"].ToString())).FirstOrDefault(); CStepTypeCur = AllStepType.Where(p => p.Map_Class.Contains(JtSn["validclass"].ToString())).FirstOrDefault();
StepType_idHis = CStepTypeCur.id;
if (JtSn["targetclass"] != null && !string.IsNullOrEmpty(JtSn["targetclass"].ToString()))
{
CStepTypeNext = AllStepType.Where(p => p.id == AllStepType.Where(p2 => p2.Map_Class == JtSn["targetclass"].ToString()).FirstOrDefault().id).FirstOrDefault(); CStepTypeNext = AllStepType.Where(p => p.id == AllStepType.Where(p2 => p2.Map_Class == JtSn["targetclass"].ToString()).FirstOrDefault().id).FirstOrDefault();
} CStepTypeCur = AllStepType.Where(p => p.id == Convert.ToInt32(CStepTypeNext.Step_Id_previous)).FirstOrDefault();
else StepType_idHis = CStepTypeCur.id;
CStepTypeNext = AllStepType.Where(p => p.id == CStepTypeCur.Step_Id_Next).FirstOrDefault(); //else
// CStepTypeNext = AllStepType.Where(p => p.id == CStepTypeCur.Step_Id_Next).FirstOrDefault();
//CStepTypeCur = CStepTypeNext; //CStepTypeCur = CStepTypeNext;
Tsql += @"insert into esn_todos_Flow(esn_todos_sn,[StepType_id],[" + CStepTypeCur.Map_Class Tsql += @"insert into esn_todos_Flow(esn_todos_sn,[StepType_id],[" + CStepTypeCur.Map_Class
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment