@ -156,6 +156,30 @@ namespace FactorySystemApi.Controllers
}
}
} , apiResult , Request , inParam ) ;
} , apiResult , Request , inParam ) ;
}
}
/// <summary>
/// 根据试验号获取物料
/// </summary>
/// <param name="inParam"></param>
/// <returns></returns>
[HttpPost]
public ApiResult GetMaterialListByFTestCode ( Dictionary < string , object > inParam )
{
ApiResult apiResult = new ApiResult ( ) ;
return ExceptionHelper . TryReturnException ( ( ) = >
{
if ( inParam = = null )
{
apiResult . Error ( "未接收到参数" ) ;
}
else
{
if ( inParam . ContainsKey ( "FTestCode" ) )
{
apiResult . Data = MaterialBll . GetMaterialListByFTestCode ( inParam [ "FTestCode" ] . ToString ( ) ) ;
}
}
} , apiResult , Request , inParam ) ;
}
/// <summary>
/// <summary>
/// ( 对接) MDM获取物料PLM码
/// ( 对接) MDM获取物料PLM码
@ -223,7 +247,7 @@ namespace FactorySystemApi.Controllers
/// 导出视图
/// 导出视图
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
public ApiResult DownMateialView ( Dictionary < string , object > inParam )
public ApiResult DownMateialView ( Dictionary < string , object > inParam )
{
{
ApiResult apiResult = new ApiResult ( ) ;
ApiResult apiResult = new ApiResult ( ) ;
return ExceptionHelper . TryReturnException ( ( ) = >
return ExceptionHelper . TryReturnException ( ( ) = >
@ -279,7 +303,7 @@ namespace FactorySystemApi.Controllers
}
}
/// <summary>
/// <summary>
@ -331,7 +355,7 @@ namespace FactorySystemApi.Controllers
/// </summary>
/// </summary>
/// <param name="inParam"></param>
/// <param name="inParam"></param>
/// <returns></returns>
/// <returns></returns>
public ApiResult DownViewAll ( Dictionary < string , object > inParam )
public ApiResult DownViewAll ( Dictionary < string , object > inParam )
{
{
ApiResult apiResult = new ApiResult ( ) ;
ApiResult apiResult = new ApiResult ( ) ;
return ExceptionHelper . TryReturnException ( ( ) = >
return ExceptionHelper . TryReturnException ( ( ) = >
@ -358,8 +382,8 @@ namespace FactorySystemApi.Controllers
File . Delete ( basePath + string . Format ( "\\File\\Temp\\{0}\\" , "" , str ) ) ;
File . Delete ( basePath + string . Format ( "\\File\\Temp\\{0}\\" , "" , str ) ) ;
MaterialBll . CreateExeclFileALL ( inParam [ "FType" ] . ToString ( ) , savePath ) ;
MaterialBll . CreateExeclFileALL ( inParam [ "FType" ] . ToString ( ) , savePath ) ;
}
}
string url = Request . RequestUri . AbsoluteUri . Replace ( Request . RequestUri . AbsolutePath , "" ) + savePath . Replace ( basePath , "" ) . Replace ( "\\" , "/" ) . Replace ( ".xlsx" , str + ".xlsx" ) ;
string url = Request . RequestUri . AbsoluteUri . Replace ( Request . RequestUri . AbsolutePath , "" ) + savePath . Replace ( basePath , "" ) . Replace ( "\\" , "/" ) . Replace ( ".xlsx" , str + ".xlsx" ) ;
apiResult . Data = url ;
apiResult . Data = url ;
} , apiResult , Request , inParam ) ;
} , apiResult , Request , inParam ) ;
}
}
@ -373,7 +397,7 @@ namespace FactorySystemApi.Controllers
public ApiResult UpdateDataModel2 ( Dictionary < string , object > inParam )
public ApiResult UpdateDataModel2 ( Dictionary < string , object > inParam )
{
{
ApiResult apiResult = new ApiResult ( ) ;
ApiResult apiResult = new ApiResult ( ) ;
//BaseBll.UpdateDataModel(inParam, "TFS_FTeamwork");
//BaseBll.UpdateDataModel(inParam, "TFS_FTeamwork");
return ExceptionHelper . TryReturnException ( ( ) = >
return ExceptionHelper . TryReturnException ( ( ) = >
@ -382,14 +406,14 @@ namespace FactorySystemApi.Controllers
{
{
apiResult . Error ( "未接收到参数" ) ;
apiResult . Error ( "未接收到参数" ) ;
}
}
else if ( ! inParam . ContainsKey ( "tempId" ) )
else if ( ! inParam . ContainsKey ( "tempId" ) )
{
{
apiResult . Error ( "未找到协同ID" ) ;
apiResult . Error ( "未找到协同ID" ) ;
}
}
else
else
{
{
int tempId = int . Parse ( inParam [ "tempId" ] . ToString ( ) ) ;
int tempId = int . Parse ( inParam [ "tempId" ] . ToString ( ) ) ;
int taskId = int . Parse ( inParam [ "taskId" ] . ToString ( ) ) ;
int taskId = int . Parse ( inParam [ "taskId" ] . ToString ( ) ) ;
inParam . Remove ( "tempId" ) ;
inParam . Remove ( "tempId" ) ;
inParam . Remove ( "taskId" ) ;
inParam . Remove ( "taskId" ) ;
@ -401,11 +425,11 @@ namespace FactorySystemApi.Controllers
if ( result . Where ( m = > m . FSuccedaneumID = = 0 ) . Count ( ) = = 0 )
if ( result . Where ( m = > m . FSuccedaneumID = = 0 ) . Count ( ) = = 0 )
{
{
BaseBll . UpdateTeamProcess ( tempId , ( int ) Constant . ProcessType . 替 代 品 确 认 , 2 , 2 ) ;
BaseBll . UpdateTeamProcess ( tempId , ( int ) Constant . ProcessType . 替 代 品 确 认 , 2 , 2 ) ;
int count = MaterialBll . ExecSql ( BaseBll . GetTaskSql ( taskId , 2 , tempId , ( int ) Constant . TaskType . 替 代 料 确 认 ) ) ;
int count = MaterialBll . ExecSql ( BaseBll . GetTaskSql ( taskId , 2 , tempId , ( int ) Constant . TaskType . 替 代 料 确 认 ) ) ;
}
}
}
}
} , apiResult , Request , inParam ) ;
} , apiResult , Request , inParam ) ;
}
}