扫码填报日报修改

This commit is contained in:
2024-12-02 17:51:43 +08:00
parent 871b95771a
commit f094390835
6 changed files with 42 additions and 13 deletions
+17
View File
@@ -327,6 +327,23 @@
db.SubmitChanges();
}
}
public static void SaveSysHttpLog(string userName, string httpUrl, string logTxt, string method)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Model.Sys_HttpLog newLog = new Model.Sys_HttpLog()
{
HttpLogId = SQLHelper.GetNewID(),
LogTime = DateTime.Now,
UserName = userName,
HttpUrl = httpUrl,
LogTxt = logTxt,
MeThod = method
};
db.Sys_HttpLog.InsertOnSubmit(newLog);
db.SubmitChanges();
}
}
/// <summary>
@@ -261,7 +261,8 @@ namespace BLL
{
string res = "";
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
{
try {
var peson=db.Person_Persons.FirstOrDefault(x => x.PersonId == Personid);
if (peson == null)
{
@@ -275,6 +276,7 @@ namespace BLL
return res;
}
var weldingDaily = db.HJGL_WeldingDaily.FirstOrDefault(x => x.WeldingDate.Value.Date == Convert.ToDateTime(time).Date);
var weldTask=db.HJGL_WeldTask.FirstOrDefault(x=>x.WeldJointId==joint.WeldJointId);
if (weldingDaily == null)
{
string perfix = string.Format("{0:yyyyMMdd}", System.DateTime.Now) + "-" + peson.PersonName + "-";
@@ -284,7 +286,7 @@ namespace BLL
weldingDaily.WeldingDate = Convert.ToDateTime(time).Date;
weldingDaily.ProjectId = joint.ProjectId;
weldingDaily.UnitWorkId = joint.UnitWorkId;
weldingDaily.UnitId = joint.UnitId;
weldingDaily.UnitId = weldTask?.UnitId;
weldingDaily.Tabler = Personid;
weldingDaily.TableDate = Convert.ToDateTime(time).Date;
db.HJGL_WeldingDaily.InsertOnSubmit(weldingDaily);
@@ -297,7 +299,11 @@ namespace BLL
InsertWeldingDailyItem(WeldJointId, Personid, Personid, joint.JointAttribute, weldingDaily.WeldingDate, batchCondition, true, weldingDaily.WeldingDailyId, joint.ProjectId);
}
BLL.WeldJointService.UpdateWeldJointAddG(WeldJointId, joint.JointAttribute, Const.BtnAdd);
}
catch (Exception ex)
{
APICommonService.SaveSysAPILog("erro", ex.ToString(),"-1");
}
}
return res;