Yang 2 years ago
commit a0a417bb98

@ -66,6 +66,14 @@ namespace FactorySystemApi.Controllers
string materialName = inParam["FMaterialName"].ToString(); string materialName = inParam["FMaterialName"].ToString();
TFS_Material existMaterial = BaseBll.GetTempModel<TFS_Material>("FName='" + materialName + "'");
if (existMaterial != null)
{
result.Add("TaskId", -8);
}
else
{
inParam.TryGetValue("FState", out object state); inParam.TryGetValue("FState", out object state);
if (null == state) if (null == state)
{ {
@ -170,6 +178,7 @@ namespace FactorySystemApi.Controllers
{ {
result.Add("TaskId", -9); result.Add("TaskId", -9);
} }
}
apiResult.Data = result; apiResult.Data = result;
}, apiResult, Request, inParam); }, apiResult, Request, inParam);

@ -124,7 +124,7 @@ namespace FactorySystemBll
public int SureTeamWork(int teamId) public int SureTeamWork(int teamId)
{ {
return AppSettingsHelper.GetSqlSugar().Ado.ExecuteCommand(string.Format(@" return AppSettingsHelper.GetSqlSugar().Ado.ExecuteCommand(string.Format(@"
if(select count(1) from TFS_Task where FTeamID={0} and FState!=2)=0 if(select count(1) from TFS_Task where FTeamID={0} and FState!=2 and FType!=13)=0
begin begin
update TFS_Task set FCanEdit=2 where FCanEdit!=2 and FTeamID={0}; update TFS_Task set FCanEdit=2 where FCanEdit!=2 and FTeamID={0};
update TFS_Task set FState=2,FFinishDate=getdate() where FState!=2 and FTeamID={0}; update TFS_Task set FState=2,FFinishDate=getdate() where FState!=2 and FTeamID={0};

Loading…
Cancel
Save