|
|
|
|
@ -225,8 +225,8 @@ namespace FactorySystemApi.Controllers
|
|
|
|
|
int teamId = int.Parse(inParam["FTeamID"].ToString());
|
|
|
|
|
int viewType = int.Parse(inParam["FViewType"].ToString());
|
|
|
|
|
apiResult.Data = _viewBll.UpdateBatchById3(viewList, materialList, infoList, teamId, viewType, user.FID);
|
|
|
|
|
|
|
|
|
|
if (viewType == 10)
|
|
|
|
|
List<int> ids = new List<int> { 2,3,4,5,10};
|
|
|
|
|
if (ids.Contains(viewType))
|
|
|
|
|
{
|
|
|
|
|
// 创建物料视图事项
|
|
|
|
|
TFS_HalfMaterialFTeamwork teamwork = BaseBll.GetTempModel<TFS_HalfMaterialFTeamwork>(teamId);
|
|
|
|
|
@ -240,7 +240,7 @@ namespace FactorySystemApi.Controllers
|
|
|
|
|
int materialType = (int)(long)row["FViewType"];
|
|
|
|
|
string factoryId = row["FFactoryID"].ToString();
|
|
|
|
|
|
|
|
|
|
if (materialType == 2 || materialType == 3 || materialType == 4 || materialType == 5)
|
|
|
|
|
if (ids.Contains(materialType))
|
|
|
|
|
{
|
|
|
|
|
if (hasNewView.ContainsKey(materialType))
|
|
|
|
|
{
|
|
|
|
|
@ -255,7 +255,7 @@ namespace FactorySystemApi.Controllers
|
|
|
|
|
HalfMaterialTeamworkBll TeamworkBll = new HalfMaterialTeamworkBll();
|
|
|
|
|
TeamworkBll.CreateMaterialTask(hasNewView, teamwork, user.FID);
|
|
|
|
|
}
|
|
|
|
|
BaseBll.CreateTaskData2(teamId, user.FID, "3");
|
|
|
|
|
BaseBll.CreateTaskData2(teamId, user.FID, "2");
|
|
|
|
|
|
|
|
|
|
BaseBll.UpdateTeamProcess2(teamwork.FID, (int)Constant.HalfMaterialProcessType.物料分类, 3, 2);
|
|
|
|
|
BaseBll.UpdateTeamProcess2(teamwork.FID, (int)Constant.HalfMaterialProcessType.物料编辑, 2, 1);
|
|
|
|
|
@ -264,6 +264,38 @@ namespace FactorySystemApi.Controllers
|
|
|
|
|
}, apiResult, Request);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 保存视图编辑的内容 更换试验号结束
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
public ApiResult UpdateBatchById4(Dictionary<string, object> inParam)
|
|
|
|
|
{
|
|
|
|
|
var apiResult = new ApiResult();
|
|
|
|
|
return ExceptionHelper.TryReturnException(() =>
|
|
|
|
|
{
|
|
|
|
|
if (Request.Properties["token"] is ApiAuthInfo user)
|
|
|
|
|
{
|
|
|
|
|
inParam.TryGetValue("TFS_ViewMaterial", out object viewObj);
|
|
|
|
|
inParam.TryGetValue("TFS_Material", out object materialObj);
|
|
|
|
|
inParam.TryGetValue("TFS_MaterialInfo", out object infoObj);
|
|
|
|
|
List<Dictionary<string, object>> viewList = JsonConvert.DeserializeObject<List<Dictionary<string, object>>>(JsonConvert.SerializeObject(viewObj));
|
|
|
|
|
List<Dictionary<string, object>> materialList = JsonConvert.DeserializeObject<List<Dictionary<string, object>>>(JsonConvert.SerializeObject(materialObj));
|
|
|
|
|
List<Dictionary<string, object>> infoList = JsonConvert.DeserializeObject<List<Dictionary<string, object>>>(JsonConvert.SerializeObject(infoObj));
|
|
|
|
|
int teamId = int.Parse(inParam["FTeamID"].ToString());
|
|
|
|
|
int viewType = int.Parse(inParam["FViewType"].ToString());
|
|
|
|
|
apiResult.Data = _viewBll.UpdateBatchById3(viewList, materialList, infoList, teamId, viewType, user.FID);
|
|
|
|
|
List<int> ids = new List<int> { 2, 3, 4, 5, 10 };
|
|
|
|
|
if (ids.Contains(viewType))
|
|
|
|
|
{
|
|
|
|
|
// 创建物料视图事项
|
|
|
|
|
TFS_HalfMaterialFTeamwork teamwork = BaseBll.GetTempModel<TFS_HalfMaterialFTeamwork>(teamId);
|
|
|
|
|
|
|
|
|
|
BaseBll.UpdateTeamProcess2(teamwork.FID, (int)Constant.HalfMaterialProcessType.物料编辑, 2, 2);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, apiResult, Request);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 保存视图编辑的内容(物料新增条线)
|
|
|
|
|
/// </summary>
|
|
|
|
|
|