小程序接口修改
This commit is contained in:
@@ -450,13 +450,36 @@ namespace BLL
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据焊接日报ID获取焊接日期
|
||||
/// </summary>
|
||||
/// <param name="dReportID"></param>
|
||||
/// <returns></returns>
|
||||
public static DateTime GetReportDateByDReportID(string dReportID)
|
||||
public static void UpdateJointNoAddGForApi(string jotId, string jointAttribute, string operateState)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
if (operateState == Const.BtnDelete || jointAttribute != "固定")
|
||||
{
|
||||
Model.PW_JointInfo deleteJointInfo = db.PW_JointInfo.FirstOrDefault(e => e.JOT_ID == jotId);
|
||||
if (deleteJointInfo.JOT_JointNo.Last() == 'G')
|
||||
{
|
||||
deleteJointInfo.JOT_JointNo = deleteJointInfo.JOT_JointNo.Substring(0, deleteJointInfo.JOT_JointNo.Length - 1);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.PW_JointInfo addJointInfo = db.PW_JointInfo.FirstOrDefault(e => e.JOT_ID == jotId);
|
||||
if (addJointInfo.JOT_JointNo.Last() != 'G')
|
||||
{
|
||||
addJointInfo.JOT_JointNo += "G";
|
||||
}
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据焊接日报ID获取焊接日期
|
||||
/// </summary>
|
||||
/// <param name="dReportID"></param>
|
||||
/// <returns></returns>
|
||||
public static DateTime GetReportDateByDReportID(string dReportID)
|
||||
{
|
||||
return (from y in Funs.DB.BO_WeldReportMain where y.DReportID == dReportID select y.JOT_WeldDate).FirstOrDefault();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user