合并最新

This commit is contained in:
2022-12-20 09:32:32 +08:00
parent 844e9f1488
commit 1abdaa9476
654 changed files with 73563 additions and 9746 deletions
@@ -343,6 +343,56 @@ namespace BLL
}
}
#region
/// <summary>
/// 批量删除
/// </summary>
/// <returns></returns>
public static Model.ResponeData DelAllJots(string projectId, string isoId,string JointNo)
{
var responeData = new Model.ResponeData();
try
{
int pcount = 0;
IQueryable<Model.PW_JointInfo> getDataList = Funs.DB.PW_JointInfo.Where(x => x.ProjectId == projectId && x.ISO_ID == isoId);
if (!string.IsNullOrEmpty(JointNo))
{
getDataList = getDataList.Where(x => x.JOT_JointNo.Contains(JointNo));
}
pcount = getDataList.Count();
if (pcount == 0)
{
responeData.code = 0;
responeData.message = "没有符合条件数据!";
}
else
{
var getDJot = getDataList.FirstOrDefault(x => x.DReportID != null);
if (getDJot != null)
{
responeData.code = 0;
responeData.message = "存在已做日报的焊口!";
}
else
{
Funs.DB.PW_JointInfo.DeleteAllOnSubmit(getDataList);
Funs.DB.SubmitChanges();
responeData.code = 1;
responeData.message = "删除焊口:" + pcount.ToString() + "个。";
}
}
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
/// <summary>
/// 修改
/// </summary>