wet 2 years ago
parent d3b6098fd7
commit 7a5d6d5f25

@ -1109,9 +1109,10 @@ namespace djy.Service.Ams
DbBus.Get(DbList.AMSCenter).Transaction(() =>
{
var masterid = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => x.IsDel != true && x.GID == retdto.businessId).ToList().Select(x => x.PID).FirstOrDefault();
var house = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => x.GID == retdto.businessId).ToOne();
if (retdto.status == "W2")
{
var house = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => x.GID == retdto.businessId).ToOne();
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { State = "1" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
if (house != null)
@ -1157,6 +1158,7 @@ namespace djy.Service.Ams
}
else if (retdto.status == "1Y")
{
var house = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => x.GID == retdto.businessId).ToOne();
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { State = "1" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
if (house != null)
{
@ -1199,7 +1201,7 @@ namespace djy.Service.Ams
else if (retdto.status == "3Z")
{
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { State = "1" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
var house = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => x.GID == retdto.businessId).ToOne();
if (house != null)
{
AMS_MasterHistory history = new AMS_MasterHistory();
@ -1226,6 +1228,7 @@ namespace djy.Service.Ams
}
else if (retdto.status == "W1")
{
var house = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => x.GID == retdto.businessId).ToOne();
AMS_MasterHistory history = new AMS_MasterHistory();
history.GID = Guid.NewGuid().ToString("N");
history.AM_ID = retdto.businessId;
@ -1262,6 +1265,7 @@ namespace djy.Service.Ams
}
else if (retdto.status == "2Z")
{
var house = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => x.GID == retdto.businessId).ToOne();
AMS_MasterHistory history = new AMS_MasterHistory();
history.GID = Guid.NewGuid().ToString("N");
history.AM_ID = retdto.businessId;

Loading…
Cancel
Save