|
|
|
|
@ -11,6 +11,7 @@ using System.Reflection;
|
|
|
|
|
using System.Web.Http;
|
|
|
|
|
using FactorySystemModel.EnumModel;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace FactorySystemApi.Controllers
|
|
|
|
|
{
|
|
|
|
|
@ -322,6 +323,52 @@ namespace FactorySystemApi.Controllers
|
|
|
|
|
}, apiResult, Request, inParam);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 更新替代料 判断任务是否完成
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="inParam"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
public ApiResult UpdateDataModel2(Dictionary<string, object> inParam)
|
|
|
|
|
{
|
|
|
|
|
ApiResult apiResult = new ApiResult();
|
|
|
|
|
|
|
|
|
|
//BaseBll.UpdateDataModel(inParam, "TFS_FTeamwork");
|
|
|
|
|
|
|
|
|
|
return ExceptionHelper.TryReturnException(() =>
|
|
|
|
|
{
|
|
|
|
|
if (inParam == null || inParam.Count < 0)
|
|
|
|
|
{
|
|
|
|
|
apiResult.Error("未接收到参数");
|
|
|
|
|
}
|
|
|
|
|
else if (!inParam.ContainsKey("tempId"))
|
|
|
|
|
{
|
|
|
|
|
apiResult.Error("未找到协同ID");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
int tempId = int.Parse(inParam["tempId"].ToString());
|
|
|
|
|
int taskId= int.Parse(inParam["taskId"].ToString());
|
|
|
|
|
|
|
|
|
|
inParam.Remove("tempId");
|
|
|
|
|
inParam.Remove("taskId");
|
|
|
|
|
|
|
|
|
|
apiResult.Data = BaseBll.UpdateDataModel(inParam, "TFS_Material");
|
|
|
|
|
|
|
|
|
|
List<TFS_Material> result = MaterialBll.GetMaterial(tempId);
|
|
|
|
|
|
|
|
|
|
if (result.Where(m => m.FSuccedaneumID == 0).Count() == 0)
|
|
|
|
|
{
|
|
|
|
|
BaseBll.UpdateTeamProcess(tempId, (int)Constant.ProcessType.替代品确认, 2, 2);
|
|
|
|
|
int count=MaterialBll.ExecSql(BaseBll.GetTaskSql(taskId, 2, tempId, (int)Constant.TaskType.替代料确认));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, apiResult, Request, inParam);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 内部方法
|
|
|
|
|
|
|
|
|
|
|