修改协同物料分类任务后,不生成其他类型物料事项的BUG

master
leo 2 years ago
parent 59bf61e601
commit 2a8508ed85

@ -217,9 +217,6 @@ namespace FactorySystemApi.Controllers
TeamworkBll.CreateMaterialTask(hasNewView, teamwork, user.FID);
}
//补充包材规格
BaseBll.CreateTaskData(teamId, user.FID, "14");
//成品视图

@ -312,14 +312,17 @@ namespace FactorySystemBll
string taskDesc = basicCode.F1;
List<string> funcVal = new List<string>();
string funcTypes = "4, 5";
switch (temp0)
{
case (int)Constant.BasicCode.:
funcType = (int)Constant.RoleType.;
funcTypes = "2";
funcVal.Add(temps[1]);
break;
case (int)Constant.BasicCode.:
funcType = (int)Constant.RoleType.;
funcTypes = "4, 5";
string tType = temps[1];
funcVal = db.Queryable<TBasicCode>().Where(s => s.FType == (int)Constant.BasicCode. &&
s.F1 == tType && s.FState == 1).Select(s => s.FValue).ToList();
@ -339,7 +342,8 @@ namespace FactorySystemBll
))
.Where((a, b, c) => factoryId.Contains(a.FFactoryID))
.Where((a, b, c) => b.FState == 1 && b.FDeleted != 1)
.Where((a, b, c) => c.FType == funcType && funcVal.Contains(c.FFunctionID.ToString()))
//.Where((a, b, c) => c.FType == funcType && funcVal.Contains(c.FFunctionID.ToString()))
.Where((a, b, c) => funcTypes.Contains(c.FType.ToString()) && funcVal.Contains(c.FFunctionID.ToString()))
.GroupBy("b.FID, a.FFactoryID, b.FName, b.FUser")
.Select<TUser>("b.FID, cast(a.FFactoryID as int), b.FName, b.FUser")
.ToList();

@ -537,9 +537,42 @@ namespace FactorySystemBll
}
}
}
else if (viewList[i]["FMRP1ProductType"].ToString() == "10")
{
if (viewList[i].ContainsKey("FViewType"))
{
viewList[i]["FViewType"] = (int)Constant.ViewType.;
}
else
{
viewList[i].Add("FViewType", (int)Constant.ViewType.);
}
}
else if (viewList[i]["FMRP1ProductType"].ToString() == "20")
{
if (viewList[i].ContainsKey("FViewType"))
{
viewList[i]["FViewType"] = (int)Constant.ViewType.;
}
else
{
viewList[i].Add("FViewType", (int)Constant.ViewType.);
}
}
else if (viewList[i]["FMRP1ProductType"].ToString() == "40")
{
if (viewList[i].ContainsKey("FViewType"))
{
viewList[i]["FViewType"] = (int)Constant.ViewType.;
}
else
{
viewList[i].Add("FViewType", (int)Constant.ViewType.);
}
}
if (viewList[i].ContainsKey("FTypeID2")) viewList[i].Remove("FTypeID2");
result += db.Updateable(viewList[i]).AS("TFS_ViewMaterial").WhereColumns("FMaterialID").Where(sqlWhere).ExecuteCommand();
result += db.Updateable(viewList[i]).AS("TFS_ViewMaterial").WhereColumns("FMaterialID").ExecuteCommand();
}
result += UnionModifyData(viewList, "TFS_ViewMaterial", teamId, db, "FMaterialID");

Loading…
Cancel
Save