leo 3 years ago
commit 11c26c06d6

@ -225,8 +225,8 @@ namespace FactorySystemApi.Controllers
int teamId = int.Parse(inParam["FTeamID"].ToString()); int teamId = int.Parse(inParam["FTeamID"].ToString());
int viewType = int.Parse(inParam["FViewType"].ToString()); int viewType = int.Parse(inParam["FViewType"].ToString());
apiResult.Data = _viewBll.UpdateBatchById3(viewList, materialList, infoList, teamId, viewType, user.FID); apiResult.Data = _viewBll.UpdateBatchById3(viewList, materialList, infoList, teamId, viewType, user.FID);
List<int> ids = new List<int> { 2,3,4,5,10};
if (viewType == 10) if (ids.Contains(viewType))
{ {
// 创建物料视图事项 // 创建物料视图事项
TFS_HalfMaterialFTeamwork teamwork = BaseBll.GetTempModel<TFS_HalfMaterialFTeamwork>(teamId); TFS_HalfMaterialFTeamwork teamwork = BaseBll.GetTempModel<TFS_HalfMaterialFTeamwork>(teamId);
@ -240,7 +240,7 @@ namespace FactorySystemApi.Controllers
int materialType = (int)(long)row["FViewType"]; int materialType = (int)(long)row["FViewType"];
string factoryId = row["FFactoryID"].ToString(); string factoryId = row["FFactoryID"].ToString();
if (materialType == 2 || materialType == 3 || materialType == 4 || materialType == 5) if (ids.Contains(materialType))
{ {
if (hasNewView.ContainsKey(materialType)) if (hasNewView.ContainsKey(materialType))
{ {
@ -255,7 +255,7 @@ namespace FactorySystemApi.Controllers
HalfMaterialTeamworkBll TeamworkBll = new HalfMaterialTeamworkBll(); HalfMaterialTeamworkBll TeamworkBll = new HalfMaterialTeamworkBll();
TeamworkBll.CreateMaterialTask(hasNewView, teamwork, user.FID); 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., 3, 2);
BaseBll.UpdateTeamProcess2(teamwork.FID, (int)Constant.HalfMaterialProcessType., 2, 1); BaseBll.UpdateTeamProcess2(teamwork.FID, (int)Constant.HalfMaterialProcessType., 2, 1);
@ -264,6 +264,38 @@ namespace FactorySystemApi.Controllers
}, apiResult, Request); }, 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>
/// 保存视图编辑的内容(物料新增条线) /// 保存视图编辑的内容(物料新增条线)
/// </summary> /// </summary>

Loading…
Cancel
Save