|
|
@ -44,7 +44,6 @@ namespace djy.Service.Ams
|
|
|
|
string[] ReportStates = null;
|
|
|
|
string[] ReportStates = null;
|
|
|
|
if (req.ReportState != null)
|
|
|
|
if (req.ReportState != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
ReportStates = req.ReportState.Split(',');
|
|
|
|
ReportStates = req.ReportState.Split(',');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
List<string> hou = null;
|
|
|
|
List<string> hou = null;
|
|
|
@ -55,7 +54,7 @@ namespace djy.Service.Ams
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var dto = DbBus.Get(DbList.AMSCenter).Select<AMS_Master>()
|
|
|
|
var dto = DbBus.Get(DbList.AMSCenter).Select<AMS_Master>()
|
|
|
|
.Where(x => x.IsDel != true)
|
|
|
|
.Where(x => x.IsDel != true)
|
|
|
|
.WhereIf(aut.CompayId!=null,x=>x.CompID== aut.CompayId.ToString())
|
|
|
|
.WhereIf(aut.CompayId != null, x => x.CompID == aut.CompayId.ToString())
|
|
|
|
.WhereIf(aut.UserId != null, x => x.UserID == aut.UserId.ToString())
|
|
|
|
.WhereIf(aut.UserId != null, x => x.UserID == aut.UserId.ToString())
|
|
|
|
.WhereIf(req.MBLNO != null, x => x.MBLNO.Contains(req.MBLNO.Trim()))
|
|
|
|
.WhereIf(req.MBLNO != null, x => x.MBLNO.Contains(req.MBLNO.Trim()))
|
|
|
|
.WhereIf(req.PORTDISCHARGECode != null, x => x.PORTDISCHARGECode == req.PORTDISCHARGECode)
|
|
|
|
.WhereIf(req.PORTDISCHARGECode != null, x => x.PORTDISCHARGECode == req.PORTDISCHARGECode)
|
|
|
@ -65,16 +64,13 @@ namespace djy.Service.Ams
|
|
|
|
.WhereIf(hou != null, x => hou.Contains(x.GID))
|
|
|
|
.WhereIf(hou != null, x => hou.Contains(x.GID))
|
|
|
|
.WhereIf(req.BDate != null, x => x.CreateTime >= req.BDate)
|
|
|
|
.WhereIf(req.BDate != null, x => x.CreateTime >= req.BDate)
|
|
|
|
.WhereIf(req.EDate != null, x => x.CreateTime <= req.EDate).OrderByDescending(x => x.CreateTime);
|
|
|
|
.WhereIf(req.EDate != null, x => x.CreateTime <= req.EDate).OrderByDescending(x => x.CreateTime);
|
|
|
|
|
|
|
|
|
|
|
|
var list = dto.Page(req.Page, req.Limit).ToList<AMSDto>();
|
|
|
|
var list = dto.Page(req.Page, req.Limit).ToList<AMSDto>();
|
|
|
|
if (list != null)
|
|
|
|
if (list != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var item in list)
|
|
|
|
foreach (var item in list)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var historyDto = DbBus.Get(DbList.AMSCenter).Select<AMS_MasterHistory>().Where(x => x.AM_ID == item.GID).OrderByDescending(x => x.SendTime).ToList();
|
|
|
|
var hodto = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => x.IsDel != true && x.PID == item.GID)
|
|
|
|
item.HistoryDto = historyDto;
|
|
|
|
|
|
|
|
var hodto = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x =>x.IsDel !=true && x.PID == item.GID)
|
|
|
|
|
|
|
|
.WhereIf(req.HBLNo != null, x => x.HBLNo.Contains(req.HBLNo.Trim()))
|
|
|
|
.WhereIf(req.HBLNo != null, x => x.HBLNo.Contains(req.HBLNo.Trim()))
|
|
|
|
.WhereIf(req.ReportState == "0", x => x.ReportState == "未申报" || x.ReportState == "接收失败")
|
|
|
|
.WhereIf(req.ReportState == "0", x => x.ReportState == "未申报" || x.ReportState == "接收失败")
|
|
|
|
.WhereIf(req.ReportState == "1", x => !(x.ReportState == "未申报" || x.ReportState == "接收失败"))
|
|
|
|
.WhereIf(req.ReportState == "1", x => !(x.ReportState == "未申报" || x.ReportState == "接收失败"))
|
|
|
@ -83,26 +79,30 @@ namespace djy.Service.Ams
|
|
|
|
item.HouseDto = hodto;
|
|
|
|
item.HouseDto = hodto;
|
|
|
|
if (hodto != null)
|
|
|
|
if (hodto != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var it in hodto)
|
|
|
|
foreach (var it in hodto)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var cnt = DbBus.Get(DbList.AMSCenter).Select<AMS_Cntrno>().Where(x => x.IsDel != true && x.HID == it.GID).ToList();
|
|
|
|
var cnt = DbBus.Get(DbList.AMSCenter).Select<AMS_Cntrno>().Where(x => x.IsDel != true && x.HID == it.GID).ToList();
|
|
|
|
it.CntrnoDto = cnt;
|
|
|
|
it.CntrnoDto = cnt;
|
|
|
|
|
|
|
|
var historyDto = DbBus.Get(DbList.AMSCenter).Select<AMS_MasterHistory>().Where(x => x.AM_ID == it.GID).OrderByDescending(x => x.SendTime).ToList();
|
|
|
|
|
|
|
|
it.HistoryDto = historyDto;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
count += hodto.Count();
|
|
|
|
count += hodto.Count();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
result.data = list.Where(x=>x.HouseDto!=null && x.HouseDto.Count() > 0).ToList();
|
|
|
|
result.data = list.Where(x => x.HouseDto != null && x.HouseDto.Count() > 0).ToList();
|
|
|
|
if (req.ReportState == "0")
|
|
|
|
if (req.ReportState == "0")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
result.count = list.Where(x => x.HouseDto != null && x.HouseDto.Count() > 0).ToList().Count();
|
|
|
|
result.count = list.Where(x => x.HouseDto != null && x.HouseDto.Count() > 0).ToList().Count();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
result.count = count;
|
|
|
|
result.count = count;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
@ -144,9 +144,9 @@ namespace djy.Service.Ams
|
|
|
|
string guid = "";
|
|
|
|
string guid = "";
|
|
|
|
List<string> hblist = null;
|
|
|
|
List<string> hblist = null;
|
|
|
|
hblist = dto.HouseDto.Select(x => x.HBLNo.Trim()).ToList();
|
|
|
|
hblist = dto.HouseDto.Select(x => x.HBLNo.Trim()).ToList();
|
|
|
|
var mlist= DbBus.Get(DbList.AMSCenter).Select<AMS_Master>().Where(x => x.IsDel != true && x.MBLNO == dto.MBLNO.Trim() && x.GID!=dto.GID&& x.MBLNO!="").ToOne();
|
|
|
|
var mlist = DbBus.Get(DbList.AMSCenter).Select<AMS_Master>().Where(x => x.IsDel != true && x.MBLNO == dto.MBLNO.Trim() && x.GID != dto.GID && x.MBLNO != "").ToOne();
|
|
|
|
var hlist = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => x.IsDel != true && hblist.Contains(x.HBLNo)&& x.PID!=dto.GID&&x.HBLNo!="").ToOne();
|
|
|
|
var hlist = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => x.IsDel != true && hblist.Contains(x.HBLNo) && x.PID != dto.GID && x.HBLNo != "").ToOne();
|
|
|
|
if (mlist!=null|| hlist!=null)
|
|
|
|
if (mlist != null || hlist != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return "-1";
|
|
|
|
return "-1";
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -170,24 +170,11 @@ namespace djy.Service.Ams
|
|
|
|
master.LastUpdate = DateTime.Now;
|
|
|
|
master.LastUpdate = DateTime.Now;
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(master).ExecuteAffrows();
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(master).ExecuteAffrows();
|
|
|
|
|
|
|
|
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
|
|
|
|
history.AM_ID = master.GID;
|
|
|
|
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
|
|
|
|
history.State = "已新增";
|
|
|
|
|
|
|
|
history.Type = "新增";
|
|
|
|
|
|
|
|
history.Operator = user.SHOWNAME;
|
|
|
|
|
|
|
|
history.Remark = user.SHOWNAME + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "创建了单据";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (dto.HouseDto != null && dto.HouseDto.Count() > 0)
|
|
|
|
if (dto.HouseDto != null && dto.HouseDto.Count() > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
foreach (var item in dto.HouseDto)
|
|
|
|
foreach (var item in dto.HouseDto)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AMS_House house = item.MapTo<AMS_House>();
|
|
|
|
AMS_House house = item.MapTo<AMS_House>();
|
|
|
|
|
|
|
|
|
|
|
|
house.GID = Guid.NewGuid().ToString("N");
|
|
|
|
house.GID = Guid.NewGuid().ToString("N");
|
|
|
|
house.PID = master.GID;
|
|
|
|
house.PID = master.GID;
|
|
|
|
house.IsDel = false;
|
|
|
|
house.IsDel = false;
|
|
|
@ -207,7 +194,17 @@ namespace djy.Service.Ams
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(cntrno).ExecuteAffrows();
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(cntrno).ExecuteAffrows();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
|
|
|
|
history.AM_ID = house.GID;
|
|
|
|
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
|
|
|
|
history.State = "已新增";
|
|
|
|
|
|
|
|
history.Type = "新增";
|
|
|
|
|
|
|
|
history.Operator = user.SHOWNAME;
|
|
|
|
|
|
|
|
history.Remark = user.SHOWNAME + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "创建了单据";
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -241,11 +238,11 @@ namespace djy.Service.Ams
|
|
|
|
master.LoadingPort = DbBus.Get(DbList.Common).Select<CodePortLoad>().Where(x => x.EdiCode == master.LoadingPortCode).ToList().Select(x => x.EnName).FirstOrDefault();
|
|
|
|
master.LoadingPort = DbBus.Get(DbList.Common).Select<CodePortLoad>().Where(x => x.EdiCode == master.LoadingPortCode).ToList().Select(x => x.EnName).FirstOrDefault();
|
|
|
|
master.LastNoUsPort = DbBus.Get(DbList.Common).Select<CodePort>().Where(x => x.Code == master.LastNoUsPortCode).ToList().Select(x => x.EnName).FirstOrDefault();
|
|
|
|
master.LastNoUsPort = DbBus.Get(DbList.Common).Select<CodePort>().Where(x => x.Code == master.LastNoUsPortCode).ToList().Select(x => x.EnName).FirstOrDefault();
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_Master>().SetSource(master).ExecuteAffrows();
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_Master>().SetSource(master).ExecuteAffrows();
|
|
|
|
|
|
|
|
|
|
|
|
List<string> houseid = dto.HouseDto.Select(x => x.GID).ToList();
|
|
|
|
List<string> houseid = dto.HouseDto.Select(x => x.GID).ToList();
|
|
|
|
DbBus.Get(DbList.AMSCenter).Delete<AMS_House>().Where(w => w.PID == master.GID && !houseid.Contains(w.GID)).ExecuteAffrows();
|
|
|
|
DbBus.Get(DbList.AMSCenter).Delete<AMS_House>().Where(w => w.PID == master.GID && !houseid.Contains(w.GID)).ExecuteAffrows();
|
|
|
|
DbBus.Get(DbList.AMSCenter).Delete<AMS_Cntrno>().Where(w => w.PID == master.GID).ExecuteAffrows();
|
|
|
|
DbBus.Get(DbList.AMSCenter).Delete<AMS_Cntrno>().Where(w => w.PID == master.GID).ExecuteAffrows();
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var item in dto.HouseDto)
|
|
|
|
foreach (var item in dto.HouseDto)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var house = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(w => w.GID == item.GID).ToOne();
|
|
|
|
var house = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(w => w.GID == item.GID).ToOne();
|
|
|
@ -275,22 +272,31 @@ namespace djy.Service.Ams
|
|
|
|
{
|
|
|
|
{
|
|
|
|
foreach (var it in item.CntrnoDto)
|
|
|
|
foreach (var it in item.CntrnoDto)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var cntrno = new AMS_Cntrno();
|
|
|
|
var cntrno = new AMS_Cntrno();
|
|
|
|
cntrno = it.MapTo<AMS_Cntrno>();
|
|
|
|
cntrno = it.MapTo<AMS_Cntrno>();
|
|
|
|
cntrno.GID = Guid.NewGuid().ToString("N");
|
|
|
|
cntrno.GID = Guid.NewGuid().ToString("N");
|
|
|
|
cntrno.PID = master.GID;
|
|
|
|
cntrno.PID = master.GID;
|
|
|
|
cntrno.HID = house.GID;
|
|
|
|
cntrno.HID = house.GID;
|
|
|
|
cntrno.IsDel = false;
|
|
|
|
cntrno.IsDel = false;
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(cntrno).ExecuteAffrows();
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(cntrno).ExecuteAffrows();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
|
|
|
|
history.AM_ID = item.GID;
|
|
|
|
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
|
|
|
|
history.State = "已修改";
|
|
|
|
|
|
|
|
history.Type = "修改";
|
|
|
|
|
|
|
|
history.Operator = user.SHOWNAME;
|
|
|
|
|
|
|
|
history.Remark = user.SHOWNAME + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "修改了单据";
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
house = item.MapTo<AMS_House>();
|
|
|
|
house = item.MapTo<AMS_House>();
|
|
|
|
|
|
|
|
|
|
|
|
house.GID = Guid.NewGuid().ToString("N");
|
|
|
|
house.GID = Guid.NewGuid().ToString("N");
|
|
|
|
house.PID = master.GID;
|
|
|
|
house.PID = master.GID;
|
|
|
|
house.IsDel = false;
|
|
|
|
house.IsDel = false;
|
|
|
@ -311,110 +317,111 @@ namespace djy.Service.Ams
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(cntrno).ExecuteAffrows();
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(cntrno).ExecuteAffrows();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
|
|
|
|
history.AM_ID = house.GID;
|
|
|
|
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
|
|
|
|
history.State = "已新增";
|
|
|
|
|
|
|
|
history.Type = "新增";
|
|
|
|
|
|
|
|
history.Operator = user.SHOWNAME;
|
|
|
|
|
|
|
|
history.Remark = user.SHOWNAME + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "创建了单据";
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
|
|
|
|
history.AM_ID = master.GID;
|
|
|
|
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
|
|
|
|
history.State = "已修改";
|
|
|
|
|
|
|
|
history.Type = "修改";
|
|
|
|
|
|
|
|
history.Operator = user.SHOWNAME;
|
|
|
|
|
|
|
|
history.Remark = user.SHOWNAME + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "修改了单据";
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
guid = master.GID;
|
|
|
|
guid = master.GID;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Transaction(() =>
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var master = DbBus.Get(DbList.AMSCenter).Select<AMS_Master>().Where(w => w.GID == dto.GID).ToOne();
|
|
|
|
DbBus.Get(DbList.AMSCenter).Transaction(() =>
|
|
|
|
master.CARRIERID = dto.CARRIERID;
|
|
|
|
|
|
|
|
master.MBLNO = dto.MBLNO;
|
|
|
|
|
|
|
|
master.VESSEL = dto.VESSEL;
|
|
|
|
|
|
|
|
master.VOYNO = dto.VOYNO;
|
|
|
|
|
|
|
|
master.ShippingType = dto.ShippingType;
|
|
|
|
|
|
|
|
master.SHIPPERADDR = dto.SHIPPERADDR;
|
|
|
|
|
|
|
|
master.ETA = dto.ETA;
|
|
|
|
|
|
|
|
master.ETD = dto.ETD;
|
|
|
|
|
|
|
|
master.LastUpdate = DateTime.Now;
|
|
|
|
|
|
|
|
master.ShippingNo = dto.ShippingNo;
|
|
|
|
|
|
|
|
master.ConsignmentType = dto.ConsignmentType;
|
|
|
|
|
|
|
|
master.LoadingPortCode = dto.LoadingPortCode;
|
|
|
|
|
|
|
|
master.PORTDISCHARGECode = dto.PORTDISCHARGECode;
|
|
|
|
|
|
|
|
master.LastNoUsPortCode = dto.LastNoUsPortCode;
|
|
|
|
|
|
|
|
master.PORTDISCHARGE = DbBus.Get(DbList.Common).Select<CodePort>().Where(x => x.Code == master.PORTDISCHARGECode).ToList().Select(x => x.EnName).FirstOrDefault();
|
|
|
|
|
|
|
|
master.CARRIER = DbBus.Get(DbList.Common).Select<CodeCarrier>().Where(x => x.Code == master.CARRIERID).ToList().Select(x => x.EnName).FirstOrDefault();
|
|
|
|
|
|
|
|
master.LoadingPort = DbBus.Get(DbList.Common).Select<CodePortLoad>().Where(x => x.EdiCode == master.LoadingPortCode).ToList().Select(x => x.EnName).FirstOrDefault();
|
|
|
|
|
|
|
|
master.LastNoUsPort = DbBus.Get(DbList.Common).Select<CodePort>().Where(x => x.Code == master.LastNoUsPortCode).ToList().Select(x => x.EnName).FirstOrDefault();
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_Master>().SetSource(master).ExecuteAffrows();
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Delete<AMS_Cntrno>().Where(w => w.PID == master.GID).ExecuteAffrows();
|
|
|
|
|
|
|
|
List<string> houseid = dto.HouseDto.Select(x => x.GID).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var item in dto.HouseDto)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var house = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(w => w.GID == item.GID).ToOne();
|
|
|
|
var master = DbBus.Get(DbList.AMSCenter).Select<AMS_Master>().Where(w => w.GID == dto.GID).ToOne();
|
|
|
|
if (house != null)
|
|
|
|
master.CARRIERID = dto.CARRIERID;
|
|
|
|
{
|
|
|
|
master.MBLNO = dto.MBLNO;
|
|
|
|
house.HBLNo = item.HBLNo;
|
|
|
|
master.VESSEL = dto.VESSEL;
|
|
|
|
house.SHIPPERNAME = item.SHIPPERNAME;
|
|
|
|
master.VOYNO = dto.VOYNO;
|
|
|
|
house.SHIPPERADDR = item.SHIPPERADDR;
|
|
|
|
master.ShippingType = dto.ShippingType;
|
|
|
|
house.SHIPPERTEL = item.SHIPPERTEL;
|
|
|
|
master.SHIPPERADDR = dto.SHIPPERADDR;
|
|
|
|
house.CONSIGNEEName = item.CONSIGNEEName;
|
|
|
|
master.ETA = dto.ETA;
|
|
|
|
house.CONSIGNEEDADDR = item.CONSIGNEEDADDR;
|
|
|
|
master.ETD = dto.ETD;
|
|
|
|
house.CONSIGNEETEL = item.CONSIGNEETEL;
|
|
|
|
master.LastUpdate = DateTime.Now;
|
|
|
|
house.NOTIFYPARTYNAME = item.NOTIFYPARTYNAME;
|
|
|
|
master.ShippingNo = dto.ShippingNo;
|
|
|
|
house.NOTIFYPARTYADDR = item.NOTIFYPARTYADDR;
|
|
|
|
master.ConsignmentType = dto.ConsignmentType;
|
|
|
|
house.NOTIFYPARTYTEL = item.NOTIFYPARTYTEL;
|
|
|
|
master.LoadingPortCode = dto.LoadingPortCode;
|
|
|
|
house.SHIPPERCountry = item.SHIPPERCountry;
|
|
|
|
master.PORTDISCHARGECode = dto.PORTDISCHARGECode;
|
|
|
|
house.SHIPPERCountryCode = item.SHIPPERCountryCode;
|
|
|
|
master.LastNoUsPortCode = dto.LastNoUsPortCode;
|
|
|
|
house.SHIPPERCity = item.SHIPPERCity;
|
|
|
|
master.PORTDISCHARGE = DbBus.Get(DbList.Common).Select<CodePort>().Where(x => x.Code == master.PORTDISCHARGECode).ToList().Select(x => x.EnName).FirstOrDefault();
|
|
|
|
house.CONSIGNEECountry = item.CONSIGNEECountry;
|
|
|
|
master.CARRIER = DbBus.Get(DbList.Common).Select<CodeCarrier>().Where(x => x.Code == master.CARRIERID).ToList().Select(x => x.EnName).FirstOrDefault();
|
|
|
|
house.CONSIGNEECountryCode = item.CONSIGNEECountryCode;
|
|
|
|
master.LoadingPort = DbBus.Get(DbList.Common).Select<CodePortLoad>().Where(x => x.EdiCode == master.LoadingPortCode).ToList().Select(x => x.EnName).FirstOrDefault();
|
|
|
|
house.CONSIGNEECity = item.CONSIGNEECity;
|
|
|
|
master.LastNoUsPort = DbBus.Get(DbList.Common).Select<CodePort>().Where(x => x.Code == master.LastNoUsPortCode).ToList().Select(x => x.EnName).FirstOrDefault();
|
|
|
|
house.NOTIFYPARTYCountry = item.NOTIFYPARTYCountry;
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_Master>().SetSource(master).ExecuteAffrows();
|
|
|
|
house.NOTIFYPARTYCountryCode = item.NOTIFYPARTYCountryCode;
|
|
|
|
DbBus.Get(DbList.AMSCenter).Delete<AMS_Cntrno>().Where(w => w.PID == master.GID).ExecuteAffrows();
|
|
|
|
house.NOTIFYPARTYCity = item.NOTIFYPARTYCity;
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().SetSource(house).ExecuteAffrows();
|
|
|
|
List<string> houseid = dto.HouseDto.Select(x => x.GID).ToList();
|
|
|
|
if (item.CntrnoDto != null && item.CntrnoDto.Count() > 0) {
|
|
|
|
|
|
|
|
foreach (var it in item.CntrnoDto)
|
|
|
|
foreach (var item in dto.HouseDto)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var cntrno = new AMS_Cntrno();
|
|
|
|
var house = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(w => w.GID == item.GID).ToOne();
|
|
|
|
cntrno = it.MapTo<AMS_Cntrno>();
|
|
|
|
if (house != null)
|
|
|
|
cntrno.GID = Guid.NewGuid().ToString("N");
|
|
|
|
{
|
|
|
|
cntrno.PID = master.GID;
|
|
|
|
house.HBLNo = item.HBLNo;
|
|
|
|
cntrno.HID = house.GID;
|
|
|
|
house.SHIPPERNAME = item.SHIPPERNAME;
|
|
|
|
cntrno.IsDel = false;
|
|
|
|
house.SHIPPERADDR = item.SHIPPERADDR;
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(cntrno).ExecuteAffrows();
|
|
|
|
house.SHIPPERTEL = item.SHIPPERTEL;
|
|
|
|
|
|
|
|
house.CONSIGNEEName = item.CONSIGNEEName;
|
|
|
|
}
|
|
|
|
house.CONSIGNEEDADDR = item.CONSIGNEEDADDR;
|
|
|
|
}
|
|
|
|
house.CONSIGNEETEL = item.CONSIGNEETEL;
|
|
|
|
}
|
|
|
|
house.NOTIFYPARTYNAME = item.NOTIFYPARTYNAME;
|
|
|
|
|
|
|
|
house.NOTIFYPARTYADDR = item.NOTIFYPARTYADDR;
|
|
|
|
}
|
|
|
|
house.NOTIFYPARTYTEL = item.NOTIFYPARTYTEL;
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
house.SHIPPERCountry = item.SHIPPERCountry;
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
house.SHIPPERCountryCode = item.SHIPPERCountryCode;
|
|
|
|
history.AM_ID = master.GID;
|
|
|
|
house.SHIPPERCity = item.SHIPPERCity;
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
house.CONSIGNEECountry = item.CONSIGNEECountry;
|
|
|
|
history.State = "已修改";
|
|
|
|
house.CONSIGNEECountryCode = item.CONSIGNEECountryCode;
|
|
|
|
history.Type = "修改";
|
|
|
|
house.CONSIGNEECity = item.CONSIGNEECity;
|
|
|
|
history.Operator = user.SHOWNAME;
|
|
|
|
house.NOTIFYPARTYCountry = item.NOTIFYPARTYCountry;
|
|
|
|
history.Remark = user.SHOWNAME + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "修改了单据";
|
|
|
|
house.NOTIFYPARTYCountryCode = item.NOTIFYPARTYCountryCode;
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
|
|
|
|
house.NOTIFYPARTYCity = item.NOTIFYPARTYCity;
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().SetSource(house).ExecuteAffrows();
|
|
|
|
guid = master.GID;
|
|
|
|
if (item.CntrnoDto != null && item.CntrnoDto.Count() > 0)
|
|
|
|
});
|
|
|
|
{
|
|
|
|
|
|
|
|
foreach (var it in item.CntrnoDto)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var cntrno = new AMS_Cntrno();
|
|
|
|
|
|
|
|
cntrno = it.MapTo<AMS_Cntrno>();
|
|
|
|
|
|
|
|
cntrno.GID = Guid.NewGuid().ToString("N");
|
|
|
|
|
|
|
|
cntrno.PID = master.GID;
|
|
|
|
|
|
|
|
cntrno.HID = house.GID;
|
|
|
|
|
|
|
|
cntrno.IsDel = false;
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(cntrno).ExecuteAffrows();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
|
|
|
|
history.AM_ID = item.GID;
|
|
|
|
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
|
|
|
|
history.State = "已修改";
|
|
|
|
|
|
|
|
history.Type = "修改";
|
|
|
|
|
|
|
|
history.Operator = user.SHOWNAME;
|
|
|
|
|
|
|
|
history.Remark = user.SHOWNAME + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "修改了单据";
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
guid = master.GID;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return guid;
|
|
|
|
return guid;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 第三方接口
|
|
|
|
#region 第三方接口
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 发送接口
|
|
|
|
/// 发送接口
|
|
|
@ -422,7 +429,7 @@ namespace djy.Service.Ams
|
|
|
|
/// <param name="Gid"></param>
|
|
|
|
/// <param name="Gid"></param>
|
|
|
|
/// <param name="userid"></param>
|
|
|
|
/// <param name="userid"></param>
|
|
|
|
/// <param name="docType"></param>
|
|
|
|
/// <param name="docType"></param>
|
|
|
|
public async Task<Response> SendDE(string Gid, User user , string docType, string hid = null)
|
|
|
|
public async Task<Response> SendDE(string Gid, User user, string docType, string hid = null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
Response req = new Response();
|
|
|
|
Response req = new Response();
|
|
|
@ -430,7 +437,8 @@ namespace djy.Service.Ams
|
|
|
|
{
|
|
|
|
{
|
|
|
|
string[] id = Gid.Split(',');
|
|
|
|
string[] id = Gid.Split(',');
|
|
|
|
string[] House = null;
|
|
|
|
string[] House = null;
|
|
|
|
if (hid != null) {
|
|
|
|
if (hid != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
House = hid.Split(',');
|
|
|
|
House = hid.Split(',');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var AMSAccount = DbBus.Get(DbList.djydb).Select<ParamSet>().Where(x => x.PARAMNAME == "AMSAccount").ToOne();
|
|
|
|
var AMSAccount = DbBus.Get(DbList.djydb).Select<ParamSet>().Where(x => x.PARAMNAME == "AMSAccount").ToOne();
|
|
|
@ -440,21 +448,18 @@ namespace djy.Service.Ams
|
|
|
|
var timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
|
var timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
|
foreach (string oid in id)
|
|
|
|
foreach (string oid in id)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (oid != "")
|
|
|
|
if (oid != "")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var docContent = "";
|
|
|
|
var docContent = "";
|
|
|
|
var fin = new FinanceService();
|
|
|
|
var fin = new FinanceService();
|
|
|
|
var master = DbBus.Get(DbList.AMSCenter).Select<AMS_Master>().Where(x =>x.IsDel != true && x.CompID == user.CompId && x.GID == oid).ToOne();
|
|
|
|
var master = DbBus.Get(DbList.AMSCenter).Select<AMS_Master>().Where(x => x.IsDel != true && x.CompID == user.CompId && x.GID == oid).ToOne();
|
|
|
|
var hodto = new List<AMS_HouseDto>();
|
|
|
|
var hodto = new List<AMS_HouseDto>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (docType == "AMSDOC")
|
|
|
|
if (docType == "AMSDOC")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
hodto = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => x.IsDel != true && x.PID == oid && x.State == "0").
|
|
|
|
hodto = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => x.IsDel != true && x.PID == oid && x.State == "0").
|
|
|
|
ToList<AMS_HouseDto>();
|
|
|
|
ToList<AMS_HouseDto>();
|
|
|
|
#region docContent 新增
|
|
|
|
#region docContent 新增
|
|
|
|
|
|
|
|
|
|
|
|
var cARRIERIDList = DbBus.Get(DbList.Common).Select<MappingCarrier>().Where(map => map.Module == "AMS").ToList();
|
|
|
|
var cARRIERIDList = DbBus.Get(DbList.Common).Select<MappingCarrier>().Where(map => map.Module == "AMS").ToList();
|
|
|
@ -472,10 +477,11 @@ namespace djy.Service.Ams
|
|
|
|
{
|
|
|
|
{
|
|
|
|
masterBillInfo.voyage = master.VOYNO.TrimAll().Substring(0, 5);
|
|
|
|
masterBillInfo.voyage = master.VOYNO.TrimAll().Substring(0, 5);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
masterBillInfo.voyage = master.VOYNO;
|
|
|
|
masterBillInfo.voyage = master.VOYNO;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
masterBillInfo.requesterDea = sysOptionConfig.Webconfig.requesterDea;
|
|
|
|
masterBillInfo.requesterDea = sysOptionConfig.Webconfig.requesterDea;
|
|
|
|
masterBillInfo.consignmentType = master.ConsignmentType;
|
|
|
|
masterBillInfo.consignmentType = master.ConsignmentType;
|
|
|
|
masterBillInfo.loadHarbour = master.LoadingPort;
|
|
|
|
masterBillInfo.loadHarbour = master.LoadingPort;
|
|
|
@ -491,30 +497,30 @@ namespace djy.Service.Ams
|
|
|
|
List<HouseBillInfoListItem> houseBillInfoListItems = new List<HouseBillInfoListItem>();
|
|
|
|
List<HouseBillInfoListItem> houseBillInfoListItems = new List<HouseBillInfoListItem>();
|
|
|
|
foreach (var item in hodto)
|
|
|
|
foreach (var item in hodto)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
var getfinrs = fin.Expend(new CustFee
|
|
|
|
var getfinrs = fin.Expend(new CustFee
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ETD = master.ETD,
|
|
|
|
ETD = master.ETD,
|
|
|
|
VOYNO = master.VOYNO,
|
|
|
|
VOYNO = master.VOYNO,
|
|
|
|
VESSEL = master.VESSEL,
|
|
|
|
VESSEL = master.VESSEL,
|
|
|
|
HBLNO = item.HBLNo,
|
|
|
|
HBLNO = item.HBLNo,
|
|
|
|
SENDUSERID = user.GID,
|
|
|
|
SENDUSERID = user.GID,
|
|
|
|
LURURENID = user.GID,
|
|
|
|
LURURENID = user.GID,
|
|
|
|
CtnrCount = 1,
|
|
|
|
CtnrCount = 1,
|
|
|
|
CtnrInfo = string.Empty,
|
|
|
|
CtnrInfo = string.Empty,
|
|
|
|
BSTYPE = 15,
|
|
|
|
BSTYPE = 15,
|
|
|
|
SENDTYPE = 0,
|
|
|
|
SENDTYPE = 0,
|
|
|
|
BSNO = oid.ToString(),
|
|
|
|
BSNO = oid.ToString(),
|
|
|
|
MBLNO = master.MBLNO.ToString(),
|
|
|
|
MBLNO = master.MBLNO.ToString(),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
, 0);
|
|
|
|
, 0);
|
|
|
|
if (!getfinrs.Status)
|
|
|
|
if (!getfinrs.Status)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
req.Code = 201;
|
|
|
|
req.Code = 201;
|
|
|
|
req.Message = getfinrs.Message;
|
|
|
|
req.Message = getfinrs.Message;
|
|
|
|
return req;
|
|
|
|
return req;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
HouseBillInfoListItem houseinfo = new HouseBillInfoListItem();
|
|
|
|
HouseBillInfoListItem houseinfo = new HouseBillInfoListItem();
|
|
|
|
houseinfo.businessId = item.GID;
|
|
|
|
houseinfo.businessId = item.GID;
|
|
|
|
houseinfo.shippingNo = null;
|
|
|
|
houseinfo.shippingNo = null;
|
|
|
@ -581,10 +587,11 @@ namespace djy.Service.Ams
|
|
|
|
docContent = JsonConvert.SerializeObject(aMSDoc).ToBase64();
|
|
|
|
docContent = JsonConvert.SerializeObject(aMSDoc).ToBase64();
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (docType == "AMSAR" || docType == "AMSM") {
|
|
|
|
else if (docType == "AMSAR" || docType == "AMSM")
|
|
|
|
hodto = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => x.IsDel != true && x.PID == oid ).
|
|
|
|
{
|
|
|
|
WhereIf(hid != null, x => House.Contains(x.GID)).
|
|
|
|
hodto = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => x.IsDel != true && x.PID == oid).
|
|
|
|
ToList<AMS_HouseDto>();
|
|
|
|
WhereIf(hid != null, x => House.Contains(x.GID)).
|
|
|
|
|
|
|
|
ToList<AMS_HouseDto>();
|
|
|
|
|
|
|
|
|
|
|
|
#region docContent 修改 重发
|
|
|
|
#region docContent 修改 重发
|
|
|
|
if (string.IsNullOrEmpty(hid))
|
|
|
|
if (string.IsNullOrEmpty(hid))
|
|
|
@ -614,7 +621,7 @@ namespace djy.Service.Ams
|
|
|
|
masterBillInfo.voyage = master.VOYNO;
|
|
|
|
masterBillInfo.voyage = master.VOYNO;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
masterBillInfo.requesterDea = sysOptionConfig.Webconfig.requesterDea;
|
|
|
|
masterBillInfo.requesterDea = sysOptionConfig.Webconfig.requesterDea;
|
|
|
|
masterBillInfo.consignmentType = master.ConsignmentType;
|
|
|
|
masterBillInfo.consignmentType = master.ConsignmentType;
|
|
|
|
masterBillInfo.loadHarbour = master.LoadingPort;
|
|
|
|
masterBillInfo.loadHarbour = master.LoadingPort;
|
|
|
@ -707,7 +714,7 @@ namespace djy.Service.Ams
|
|
|
|
houseinfo.notifyCity = item.NOTIFYPARTYCity;
|
|
|
|
houseinfo.notifyCity = item.NOTIFYPARTYCity;
|
|
|
|
houseinfo.notifyCountry = item.NOTIFYPARTYCountry;
|
|
|
|
houseinfo.notifyCountry = item.NOTIFYPARTYCountry;
|
|
|
|
houseinfo.notifyCountryCode = item.NOTIFYPARTYCountryCode;
|
|
|
|
houseinfo.notifyCountryCode = item.NOTIFYPARTYCountryCode;
|
|
|
|
var cnt = DbBus.Get(DbList.AMSCenter).Select<AMS_Cntrno>().Where(x => x.IsDel!=true && x.HID == item.GID).ToList();
|
|
|
|
var cnt = DbBus.Get(DbList.AMSCenter).Select<AMS_Cntrno>().Where(x => x.IsDel != true && x.HID == item.GID).ToList();
|
|
|
|
CtnInfo CtnInfo = new CtnInfo();
|
|
|
|
CtnInfo CtnInfo = new CtnInfo();
|
|
|
|
List<InsertListItem> list = new List<InsertListItem>();
|
|
|
|
List<InsertListItem> list = new List<InsertListItem>();
|
|
|
|
foreach (var it in cnt)
|
|
|
|
foreach (var it in cnt)
|
|
|
@ -758,35 +765,35 @@ namespace djy.Service.Ams
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
hodto = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => x.IsDel != true && x.PID == oid).
|
|
|
|
hodto = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => x.IsDel != true && x.PID == oid).
|
|
|
|
WhereIf(hid != null, x => House.Contains(x.GID)).
|
|
|
|
WhereIf(hid != null, x => House.Contains(x.GID)).
|
|
|
|
ToList<AMS_HouseDto>();
|
|
|
|
ToList<AMS_HouseDto>();
|
|
|
|
foreach (var item in hodto)
|
|
|
|
foreach (var item in hodto)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
var getfinrs = fin.Expend(new CustFee
|
|
|
|
var getfinrs = fin.Expend(new CustFee
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ETD = master.ETD,
|
|
|
|
ETD = master.ETD,
|
|
|
|
VOYNO = master.VOYNO,
|
|
|
|
VOYNO = master.VOYNO,
|
|
|
|
VESSEL = master.VESSEL,
|
|
|
|
VESSEL = master.VESSEL,
|
|
|
|
HBLNO = item.HBLNo,
|
|
|
|
HBLNO = item.HBLNo,
|
|
|
|
SENDUSERID = user.GID,
|
|
|
|
SENDUSERID = user.GID,
|
|
|
|
LURURENID = user.GID,
|
|
|
|
LURURENID = user.GID,
|
|
|
|
CtnrCount = 1,
|
|
|
|
CtnrCount = 1,
|
|
|
|
CtnrInfo = string.Empty,
|
|
|
|
CtnrInfo = string.Empty,
|
|
|
|
BSTYPE = 15,
|
|
|
|
BSTYPE = 15,
|
|
|
|
SENDTYPE = 5,
|
|
|
|
SENDTYPE = 5,
|
|
|
|
BSNO = oid.ToString(),
|
|
|
|
BSNO = oid.ToString(),
|
|
|
|
MBLNO = master.MBLNO.ToString(),
|
|
|
|
MBLNO = master.MBLNO.ToString(),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
, 0);
|
|
|
|
, 0);
|
|
|
|
if (!getfinrs.Status)
|
|
|
|
if (!getfinrs.Status)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
req.Code = 201;
|
|
|
|
req.Code = 201;
|
|
|
|
req.Message = getfinrs.Message;
|
|
|
|
req.Message = getfinrs.Message;
|
|
|
|
return req;
|
|
|
|
return req;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (item.ReportState == "删单成功")
|
|
|
|
if (item.ReportState == "删单成功")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
req.Code = 201;
|
|
|
|
req.Code = 201;
|
|
|
@ -807,7 +814,7 @@ namespace djy.Service.Ams
|
|
|
|
|
|
|
|
|
|
|
|
docContent = JsonConvert.SerializeObject(aMSDDto).ToBase64();
|
|
|
|
docContent = JsonConvert.SerializeObject(aMSDDto).ToBase64();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/////MD5加密
|
|
|
|
/////MD5加密
|
|
|
|
string stringSign = string.Format("{0}{1}{2}", AMSAccount.PARAMVALUE, key.PARAMVALUE, timestamp);
|
|
|
|
string stringSign = string.Format("{0}{1}{2}", AMSAccount.PARAMVALUE, key.PARAMVALUE, timestamp);
|
|
|
@ -839,7 +846,8 @@ namespace djy.Service.Ams
|
|
|
|
JObject rlt = JObject.Parse(gethtml);
|
|
|
|
JObject rlt = JObject.Parse(gethtml);
|
|
|
|
var code = rlt.GetValue("code").ToString();
|
|
|
|
var code = rlt.GetValue("code").ToString();
|
|
|
|
var msg = rlt.GetValue("msg").ToString();
|
|
|
|
var msg = rlt.GetValue("msg").ToString();
|
|
|
|
if (msg== "验签失败") {
|
|
|
|
if (msg == "验签失败")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
req.Code = 200;
|
|
|
|
req.Code = 200;
|
|
|
|
req.Message = "验签失败";
|
|
|
|
req.Message = "验签失败";
|
|
|
@ -848,44 +856,50 @@ namespace djy.Service.Ams
|
|
|
|
var data = rlt.GetValue("data").ToString();
|
|
|
|
var data = rlt.GetValue("data").ToString();
|
|
|
|
JObject drlt = JObject.Parse(data);
|
|
|
|
JObject drlt = JObject.Parse(data);
|
|
|
|
var result = drlt.GetValue("result").ToString();
|
|
|
|
var result = drlt.GetValue("result").ToString();
|
|
|
|
|
|
|
|
|
|
|
|
if (code == "F" || result == "false")
|
|
|
|
if (code == "F" || result == "false")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var errorInfo = drlt.GetValue("errorInfo").ToString();
|
|
|
|
var errorInfo = drlt.GetValue("errorInfo").ToString();
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
|
|
|
|
history.AM_ID = oid;
|
|
|
|
foreach (var item in hodto)
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
|
|
|
|
if (docType == "AMSDOC")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
history.State = "新增发送失败";
|
|
|
|
|
|
|
|
history.Type = "接收失败";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (docType == "AMSAR")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
history.State = "重发失败";
|
|
|
|
|
|
|
|
history.Type = "接收失败";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (docType == "AMSM")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
history.State = "修改发送失败";
|
|
|
|
|
|
|
|
history.Type = "修改失败";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
history.State = "删除发送失败";
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
history.Type = "删单失败";
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
}
|
|
|
|
history.AM_ID = item.GID;
|
|
|
|
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
|
|
|
|
if (docType == "AMSDOC")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
history.State = "新增发送失败";
|
|
|
|
|
|
|
|
history.Type = "接收失败";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (docType == "AMSAR")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
history.State = "重发失败";
|
|
|
|
|
|
|
|
history.Type = "接收失败";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (docType == "AMSM")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
history.State = "修改发送失败";
|
|
|
|
|
|
|
|
history.Type = "修改失败";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
history.State = "删除发送失败";
|
|
|
|
|
|
|
|
history.Type = "删单失败";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
history.Operator = user.SHOWNAME;
|
|
|
|
history.Operator = user.SHOWNAME;
|
|
|
|
history.Remark = user.SHOWNAME + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "发送单据失败,失败原因:" + msg;
|
|
|
|
history.Remark = user.SHOWNAME + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "发送单据失败,失败原因:" + msg;
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
req.Code = 201;
|
|
|
|
req.Code = 201;
|
|
|
|
req.Message = "操作失败," + msg + errorInfo;
|
|
|
|
req.Message = "操作失败," + msg + errorInfo;
|
|
|
|
return req;
|
|
|
|
return req;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (code == "T" && result == "true")
|
|
|
|
if (code == "T" && result == "true")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
history.AM_ID = oid;
|
|
|
|
history.AM_ID = oid;
|
|
|
@ -917,20 +931,20 @@ namespace djy.Service.Ams
|
|
|
|
|
|
|
|
|
|
|
|
if (docType == "AMSDOC")
|
|
|
|
if (docType == "AMSDOC")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState="", ReportState = "已提交", NewNotice = "新增发送成功" }).Where(w => w.PID == oid).ExecuteAffrows();
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = "", ReportState = "已提交", NewNotice = "新增发送成功" }).Where(w => w.PID == oid).ExecuteAffrows();
|
|
|
|
foreach (var item in hodto)
|
|
|
|
foreach (var item in hodto)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var getfinrs = fin.Expend(new CustFee
|
|
|
|
var getfinrs = fin.Expend(new CustFee
|
|
|
|
{
|
|
|
|
{
|
|
|
|
CARRIER=master.CARRIER,
|
|
|
|
CARRIER = master.CARRIER,
|
|
|
|
ETD = master.ETA,
|
|
|
|
ETD = master.ETA,
|
|
|
|
VOYNO = master.VOYNO,
|
|
|
|
VOYNO = master.VOYNO,
|
|
|
|
VESSEL = master.VESSEL,
|
|
|
|
VESSEL = master.VESSEL,
|
|
|
|
HBLNO = item.HBLNo,
|
|
|
|
HBLNO = item.HBLNo,
|
|
|
|
SENDUSERID = user.GID,
|
|
|
|
SENDUSERID = user.GID,
|
|
|
|
LURURENID = user.GID,
|
|
|
|
LURURENID = user.GID,
|
|
|
|
CtnrCount = DbBus.Get(DbList.AMSCenter).Select<AMS_Cntrno>().Where(x => x.IsDel != true && x.HID == item.GID ).ToList().Count(),
|
|
|
|
CtnrCount = DbBus.Get(DbList.AMSCenter).Select<AMS_Cntrno>().Where(x => x.IsDel != true && x.HID == item.GID).ToList().Count(),
|
|
|
|
CtnrInfo = string.Empty,
|
|
|
|
CtnrInfo = string.Empty,
|
|
|
|
BSTYPE = 15,
|
|
|
|
BSTYPE = 15,
|
|
|
|
SENDTYPE = 0,
|
|
|
|
SENDTYPE = 0,
|
|
|
@ -941,7 +955,7 @@ namespace djy.Service.Ams
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (docType == "AMSAR")
|
|
|
|
else if (docType == "AMSAR")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = "", ReportState = "已提交", NewNotice = "重发发送成功" }).Where(w => House.Contains(w.GID)).ExecuteAffrows();
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = "", ReportState = "已提交", NewNotice = "重发发送成功" }).Where(w => House.Contains(w.GID)).ExecuteAffrows();
|
|
|
|
foreach (var item in hodto)
|
|
|
|
foreach (var item in hodto)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1010,7 +1024,7 @@ namespace djy.Service.Ams
|
|
|
|
}
|
|
|
|
}
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = "", ReportState = "已提交", NewNotice = "删除发送成功" }).Where(w => House.Contains(w.GID)).ExecuteAffrows();
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = "", ReportState = "已提交", NewNotice = "删除发送成功" }).Where(w => House.Contains(w.GID)).ExecuteAffrows();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
@ -1036,7 +1050,7 @@ namespace djy.Service.Ams
|
|
|
|
Response req = new Response();
|
|
|
|
Response req = new Response();
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
AMSReturnDto retdto = Json.JsonToObject<AMSReturnDto>(msg);
|
|
|
|
AMSReturnDto retdto = Json.JsonToObject<AMSReturnDto>(msg);
|
|
|
|
_LogsAdd("SaveReceipt", "post", $"AMS接口推送:{msg}");
|
|
|
|
_LogsAdd("SaveReceipt", "post", $"AMS接口推送:{msg}");
|
|
|
|
if (retdto != null)
|
|
|
|
if (retdto != null)
|
|
|
@ -1053,7 +1067,7 @@ namespace djy.Service.Ams
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
history.AM_ID = masterid;
|
|
|
|
history.AM_ID = retdto.businessId;
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
history.State = "海关接收成功";
|
|
|
|
history.State = "海关接收成功";
|
|
|
|
history.Type = "匹配成功";
|
|
|
|
history.Type = "匹配成功";
|
|
|
@ -1070,10 +1084,11 @@ namespace djy.Service.Ams
|
|
|
|
if (house.MateState.Contains("3Z"))
|
|
|
|
if (house.MateState.Contains("3Z"))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = "3Z,"+retdto.status, NewNotice = "海关接收成功", ReportState = "接收成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = "3Z," + retdto.status, NewNotice = "海关接收成功", ReportState = "接收成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = house.MateState + "," + retdto.status, NewNotice = "海关接收成功", ReportState = "接收成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = house.MateState + "," + retdto.status, NewNotice = "海关接收成功", ReportState = "接收成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1096,7 +1111,7 @@ namespace djy.Service.Ams
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
history.AM_ID = masterid;
|
|
|
|
history.AM_ID = retdto.businessId;
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
history.State = "船司匹配成功";
|
|
|
|
history.State = "船司匹配成功";
|
|
|
|
history.Type = "匹配成功";
|
|
|
|
history.Type = "匹配成功";
|
|
|
@ -1138,7 +1153,7 @@ namespace djy.Service.Ams
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
history.AM_ID = masterid;
|
|
|
|
history.AM_ID = retdto.businessId;
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
history.State = "ISF匹配成功";
|
|
|
|
history.State = "ISF匹配成功";
|
|
|
|
history.Type = "匹配成功";
|
|
|
|
history.Type = "匹配成功";
|
|
|
@ -1162,7 +1177,7 @@ namespace djy.Service.Ams
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
history.AM_ID = masterid;
|
|
|
|
history.AM_ID = retdto.businessId;
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
history.State = "海关拒绝";
|
|
|
|
history.State = "海关拒绝";
|
|
|
|
history.Type = "匹配失败";
|
|
|
|
history.Type = "匹配失败";
|
|
|
@ -1198,7 +1213,7 @@ namespace djy.Service.Ams
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
history.AM_ID = masterid;
|
|
|
|
history.AM_ID = retdto.businessId;
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
history.State = "箱货信息不匹配";
|
|
|
|
history.State = "箱货信息不匹配";
|
|
|
|
history.Type = "匹配失败";
|
|
|
|
history.Type = "匹配失败";
|
|
|
@ -1234,7 +1249,7 @@ namespace djy.Service.Ams
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
history.AM_ID = masterid;
|
|
|
|
history.AM_ID = retdto.businessId;
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
history.State = "匹配失败";
|
|
|
|
history.State = "匹配失败";
|
|
|
|
history.Type = "匹配失败";
|
|
|
|
history.Type = "匹配失败";
|
|
|
@ -1443,7 +1458,7 @@ namespace djy.Service.Ams
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public List<CommonCodeValue> GetCodeProvince(string code)
|
|
|
|
public List<CommonCodeValue> GetCodeProvince(string code)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1457,7 +1472,8 @@ namespace djy.Service.Ams
|
|
|
|
return List;
|
|
|
|
return List;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
var List = DbBus.Get(DbList.Common).Select<CodeProvince>().ToList().Select(x => new CommonCodeValue
|
|
|
|
var List = DbBus.Get(DbList.Common).Select<CodeProvince>().ToList().Select(x => new CommonCodeValue
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1467,7 +1483,7 @@ namespace djy.Service.Ams
|
|
|
|
return List;
|
|
|
|
return List;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (Exception e)
|
|
|
|
catch (Exception e)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1625,8 +1641,8 @@ namespace djy.Service.Ams
|
|
|
|
{
|
|
|
|
{
|
|
|
|
string guid = "";
|
|
|
|
string guid = "";
|
|
|
|
|
|
|
|
|
|
|
|
var list = DbBus.Get(DbList.AMSCenter).Select<AMS_AddrTemplate>().Where(w => w.UserID == user.GID && w.TemPlateName == dto.TemPlateName&&w.Type==dto.Type&&w.GID!=dto.GID).ToOne();
|
|
|
|
var list = DbBus.Get(DbList.AMSCenter).Select<AMS_AddrTemplate>().Where(w => w.UserID == user.GID && w.TemPlateName == dto.TemPlateName && w.Type == dto.Type && w.GID != dto.GID).ToOne();
|
|
|
|
if (list!=null)
|
|
|
|
if (list != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return "-1";
|
|
|
|
return "-1";
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1657,17 +1673,17 @@ namespace djy.Service.Ams
|
|
|
|
#region 获取模板
|
|
|
|
#region 获取模板
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public List<AMS_AddrTemplate> GetTemplate(User user, string type, string TemPlateName)
|
|
|
|
public List<AMS_AddrTemplate> GetTemplate(User user, string type, string TemPlateName)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var List = DbBus.Get(DbList.AMSCenter).Select<AMS_AddrTemplate>().
|
|
|
|
var List = DbBus.Get(DbList.AMSCenter).Select<AMS_AddrTemplate>().
|
|
|
|
Where(x => x.IsDel == false || x.IsDel == null).
|
|
|
|
Where(x => x.IsDel == false || x.IsDel == null).
|
|
|
|
Where(x => x.UserID == user.GID).
|
|
|
|
Where(x => x.UserID == user.GID).
|
|
|
|
WhereIf(type != null, x => x.Type == type).
|
|
|
|
WhereIf(type != null, x => x.Type == type).
|
|
|
|
WhereIf(TemPlateName != null, x => TemPlateName.Contains(x.TemPlateName)).
|
|
|
|
WhereIf(TemPlateName != null, x => TemPlateName.Contains(x.TemPlateName)).
|
|
|
|
ToList();
|
|
|
|
ToList();
|
|
|
|
return List;
|
|
|
|
return List;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (Exception e)
|
|
|
|
catch (Exception e)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1689,7 +1705,7 @@ namespace djy.Service.Ams
|
|
|
|
{
|
|
|
|
{
|
|
|
|
DbBus.Get(DbList.AMSCenter).Transaction(() =>
|
|
|
|
DbBus.Get(DbList.AMSCenter).Transaction(() =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Delete<AMS_AddrTemplate>().Where(w => w.GID == oid).ExecuteAffrows();
|
|
|
|
DbBus.Get(DbList.AMSCenter).Delete<AMS_AddrTemplate>().Where(w => w.GID == oid).ExecuteAffrows();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|