0902-修改材料管理接口
This commit is contained in:
@@ -78,7 +78,7 @@
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog(ex, "材料管理接口定时器", "MCSWebService.getPojectInfo");
|
||||
ErrLogInfo.WriteLog(ex, "材料管理接口定时器", "MCSWebService.getPojectInfo" + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog(ex, "材料管理接口定时器", "MCSWebService.getPoDetails");
|
||||
ErrLogInfo.WriteLog(ex, "材料管理接口定时器", "MCSWebService.getPoDetails" + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog(ex, "材料管理接口定时器", "MCSWebService.getIssueDetails");
|
||||
ErrLogInfo.WriteLog(ex, "材料管理接口定时器", "MCSWebService.getIssueDetails" + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -215,7 +215,46 @@
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog(ex, "材料管理接口定时器", "MCSWebService.getPartNoInfo");
|
||||
ErrLogInfo.WriteLog(ex, "材料管理接口定时器", "MCSWebService.getPartNoInfo" + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public static void getMTODetailInfo(long projectId)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
MCSService.WebService1SoapClient mscsC = new MCSService.WebService1SoapClient();
|
||||
var details = mscsC.getPojectReport(projectId, "MTO明细信息一览表");
|
||||
if (!string.IsNullOrEmpty(details))
|
||||
{
|
||||
var q = from x in db.CLGL_Material where x.ProjectId == projectId.ToString() select x;
|
||||
if (q.Count() > 0)
|
||||
{
|
||||
db.CLGL_Material.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
JArray arr = JArray.Parse(details);
|
||||
foreach (var item in arr)
|
||||
{
|
||||
Model.CLGL_Material material = new Model.CLGL_Material();
|
||||
material.Id = SQLHelper.GetNewID();
|
||||
material.ProjectId = projectId.ToString();
|
||||
material.MaterialCode = item["材料编码"].ToString();
|
||||
material.TagNo = item["位号"].ToString();
|
||||
material.MaterialName = item["材料名称"].ToString();
|
||||
material.Def = item["规格描述"].ToString();
|
||||
material.Unit = item["计量单位"].ToString();
|
||||
db.CLGL_Material.InsertOnSubmit(material);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog(ex, "材料管理接口定时器", "MCSWebService.getMTODetailInfo" + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,7 +290,7 @@
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog(ex, "材料管理接口定时器", "MCSWebService.getPartNoInfo");
|
||||
ErrLogInfo.WriteLog(ex, "材料管理接口定时器", "MCSWebService.getPartNoInfo" + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -287,7 +326,7 @@
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog(ex, "材料管理接口定时器", "MCSWebService.getSubcontractor");
|
||||
ErrLogInfo.WriteLog(ex, "材料管理接口定时器", "MCSWebService.getSubcontractor" + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -322,7 +361,7 @@
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog(ex, "材料管理接口定时器", "MCSWebService.getVendor");
|
||||
ErrLogInfo.WriteLog(ex, "材料管理接口定时器", "MCSWebService.getVendor" + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -374,7 +413,7 @@
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog(ex, "材料管理接口定时器", "MCSWebService.getVendor");
|
||||
ErrLogInfo.WriteLog(ex, "材料管理接口定时器", "MCSWebService.getVendor" + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user