|
|
|
@ -188,14 +188,8 @@ namespace FactorySystemApi.Controllers
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//对接获取
|
|
|
|
//对接获取
|
|
|
|
//inParam.Add("FMdmCode", GetMdmCode(inParam));
|
|
|
|
//inParam.Add("FMdmCode", GetMdmCode(inParam));
|
|
|
|
var ts = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, 0);
|
|
|
|
//var ts = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, 0);
|
|
|
|
inParam.Add("FMdmCode", ts.TotalSeconds.ToString("F0"));
|
|
|
|
//inParam.Add("FMdmCode", ts.TotalSeconds.ToString("F0"));
|
|
|
|
if (!inParam.ContainsKey("FMdmCode") || string.IsNullOrEmpty(inParam["FMdmCode"].ToString().Trim()))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
apiResult.Error("获取MDM失败");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
inParam.TryGetValue("FState", out object state);
|
|
|
|
inParam.TryGetValue("FState", out object state);
|
|
|
|
@ -293,8 +287,8 @@ namespace FactorySystemApi.Controllers
|
|
|
|
//}
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
//开始BOM下载
|
|
|
|
//开始BOM下载
|
|
|
|
int dow= DockGetBomData(teamwork.FID, user.FID);
|
|
|
|
int dow = DockGetBomData(teamwork.FID, user.FID);
|
|
|
|
if (dow > 0 || editMaterialList.Count()>0)
|
|
|
|
if (dow > 0 || editMaterialList.Count() > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MaterialTeamworkBll.HasMaterialTestCode(teamwork);
|
|
|
|
MaterialTeamworkBll.HasMaterialTestCode(teamwork);
|
|
|
|
BaseBll.CreateTaskData2(teamwork.FID, user.FID, "1"); //新增物料分类事项
|
|
|
|
BaseBll.CreateTaskData2(teamwork.FID, user.FID, "1"); //新增物料分类事项
|
|
|
|
@ -326,11 +320,9 @@ namespace FactorySystemApi.Controllers
|
|
|
|
catch (Exception ex)
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//失败则把修改的更新回去
|
|
|
|
//失败则把修改的更新回去
|
|
|
|
MaterialTeamworkBll.UpdateFormula(inParam["FTestCode"].ToString(), inParam["FNewTestCode"].ToString(),0,0,string.Join(",",ids));
|
|
|
|
MaterialTeamworkBll.UpdateFormula(inParam["FTestCode"].ToString(), inParam["FNewTestCode"].ToString(), 0, 0, string.Join(",", ids));
|
|
|
|
throw;
|
|
|
|
throw;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}, apiResult, Request, inParam);
|
|
|
|
}, apiResult, Request, inParam);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -613,6 +605,10 @@ namespace FactorySystemApi.Controllers
|
|
|
|
OAService oAService = new OAService();
|
|
|
|
OAService oAService = new OAService();
|
|
|
|
specifList[0].Code = formula.FTestCode;
|
|
|
|
specifList[0].Code = formula.FTestCode;
|
|
|
|
specifList[0].Version = formula.FVersionCode;
|
|
|
|
specifList[0].Version = formula.FVersionCode;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
specifList[0].SP = formula.FPlmCode;
|
|
|
|
|
|
|
|
specifList[0].SP_Version = formula.FVersionCode;
|
|
|
|
|
|
|
|
|
|
|
|
RestResult restResult = oAService.GetSpecificationsList(specifList.ToArray());
|
|
|
|
RestResult restResult = oAService.GetSpecificationsList(specifList.ToArray());
|
|
|
|
string bomStr = restResult.data == null ? "[]" : restResult.data.ToString();
|
|
|
|
string bomStr = restResult.data == null ? "[]" : restResult.data.ToString();
|
|
|
|
ExceptionHelper.AddSystemJournal(Request, specifList[0], restResult,user.FID, "DockGetBomData");
|
|
|
|
ExceptionHelper.AddSystemJournal(Request, specifList[0], restResult,user.FID, "DockGetBomData");
|
|
|
|
@ -683,6 +679,11 @@ namespace FactorySystemApi.Controllers
|
|
|
|
OAService oAService = new OAService();
|
|
|
|
OAService oAService = new OAService();
|
|
|
|
specifList[0].Code = teamwork.FNewTestCode;
|
|
|
|
specifList[0].Code = teamwork.FNewTestCode;
|
|
|
|
specifList[0].Version = formula.FVersionCode;
|
|
|
|
specifList[0].Version = formula.FVersionCode;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
specifList[0].SP = formula.FPlmCode;
|
|
|
|
|
|
|
|
specifList[0].SP_Version = formula.FVersionCode;
|
|
|
|
|
|
|
|
|
|
|
|
RestResult restResult = oAService.GetSpecificationsList(specifList.ToArray());
|
|
|
|
RestResult restResult = oAService.GetSpecificationsList(specifList.ToArray());
|
|
|
|
string bomStr = restResult.data == null ? "[]" : restResult.data.ToString();
|
|
|
|
string bomStr = restResult.data == null ? "[]" : restResult.data.ToString();
|
|
|
|
ExceptionHelper.AddSystemJournal(Request, specifList[0], restResult, userId, "DockGetBomData");
|
|
|
|
ExceptionHelper.AddSystemJournal(Request, specifList[0], restResult, userId, "DockGetBomData");
|
|
|
|
@ -1152,7 +1153,7 @@ namespace FactorySystemApi.Controllers
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
dataList = MaterialTeamworkBll.GetTeamworkViewData(selectSql.Trim(','), whereSql, joinSql);
|
|
|
|
dataList = MaterialTeamworkBll.GetHalfMaterialTeamworkViewData(selectSql.Trim(','), whereSql, joinSql);
|
|
|
|
dataList.Columns.Remove("FMaterialID");
|
|
|
|
dataList.Columns.Remove("FMaterialID");
|
|
|
|
if (intType == (int)Constant.TeamViewType.生产版本视图)
|
|
|
|
if (intType == (int)Constant.TeamViewType.生产版本视图)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|