AMS发送时日志记录从主单改为分单

master
zhangxiaofeng 2 months ago
parent 44f861f9cf
commit 122776a9c3

@ -871,11 +871,11 @@ namespace djy.Service.Ams
AMSDDto aMSDDto = new AMSDDto();
if (AMSRequestDEA != null)
{
aMSDDto.fromdea = AMSRequestDEA.ItemCode;
aMSDDto.fromdea = AMSRequestDEA.ItemCode;
}
else
{
aMSDDto.fromdea = sysOptionConfig.Webconfig.requesterDea;
aMSDDto.fromdea = sysOptionConfig.Webconfig.requesterDea;
}
@ -970,35 +970,35 @@ namespace djy.Service.Ams
}
if (code == "T" && result == "true")
{
AMS_MasterHistory history = new AMS_MasterHistory();
history.GID = Guid.NewGuid().ToString("N");
history.AM_ID = oid;
history.SendTime = DateTime.Now;
history.Type = "0";
if (docType == "AMSDOC")
{
history.State = "新增发送成功";
}
else if (docType == "AMSAR")
{
history.State = "重发成功";
}
else if (docType == "AMSM")
{
history.State = "修改发送成功";
}
else
List<AMS_MasterHistory> hisList = new(hodto.Count);
foreach (var item in hodto)
{
history.State = "删除发送成功";
AMS_MasterHistory history = new AMS_MasterHistory();
history.GID = Guid.NewGuid().ToString("N");
history.AM_ID = item.GID;
history.SendTime = DateTime.Now;
history.Type = "0";
if (docType == "AMSDOC")
{
history.State = "新增发送成功";
}
else if (docType == "AMSAR")
{
history.State = "重发成功";
}
else if (docType == "AMSM")
{
history.State = "修改发送成功";
}
else
{
history.State = "删除发送成功";
}
history.Operator = user.SHOWNAME;
history.Remark = user.SHOWNAME + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "发送了单据";
hisList.Add(history);
}
history.Operator = user.SHOWNAME;
history.Remark = user.SHOWNAME + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "发送了单据";
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
DbBus.Get(DbList.AMSCenter).Insert(hisList).ExecuteAffrows();
if (docType == "AMSDOC")
{

Loading…
Cancel
Save