|
|
|
@ -14,6 +14,7 @@ using System.Data;
|
|
|
|
using System.IO;
|
|
|
|
using System.IO;
|
|
|
|
using System.Security.Cryptography;
|
|
|
|
using System.Security.Cryptography;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
using System.Web.UI.WebControls;
|
|
|
|
|
|
|
|
|
|
|
|
namespace FactorySystemApi.Controllers
|
|
|
|
namespace FactorySystemApi.Controllers
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -436,7 +437,11 @@ namespace FactorySystemApi.Controllers
|
|
|
|
result.Add("ViewId", vmId);
|
|
|
|
result.Add("ViewId", vmId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
List<TUser> users = MaterialTaskBll.GetTaskUsers(1, view.FMRP1ProductType, factory.FID);
|
|
|
|
string productType = view.FMRP1ProductType;
|
|
|
|
|
|
|
|
string materialName = material.FName;
|
|
|
|
|
|
|
|
string vType = GetViewType(productType, materialName);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<TUser> users = MaterialTaskBll.GetTaskUsers(1, vType, factory.FID);
|
|
|
|
|
|
|
|
|
|
|
|
if (users == null || users.Count > 0)
|
|
|
|
if (users == null || users.Count > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -595,6 +600,40 @@ namespace FactorySystemApi.Controllers
|
|
|
|
return vType;
|
|
|
|
return vType;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private string GetViewType(string viewType, string materialName)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
string vType = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 成品视图
|
|
|
|
|
|
|
|
if ("10".Equals(viewType))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
vType = "1";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// 半成品视图
|
|
|
|
|
|
|
|
else if ("20".Equals(viewType))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
vType = "2";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// 中间品视图
|
|
|
|
|
|
|
|
else if ("30".Equals(viewType))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
vType = "3";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 香基视图
|
|
|
|
|
|
|
|
if (materialName.Contains("香基"))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
vType = "4";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// 原料视图
|
|
|
|
|
|
|
|
else if ("40".Equals(viewType))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
vType = "5";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return vType;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
public T Clone<T>(T obj) where T : class
|
|
|
|
public T Clone<T>(T obj) where T : class
|
|
|
|
|