|
|
@ -76,10 +76,10 @@ namespace Myshipping.Application
|
|
|
|
public async Task<long> SyncCustomer(DjyCustomerSyncDto model)
|
|
|
|
public async Task<long> SyncCustomer(DjyCustomerSyncDto model)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(model.CodeName)) {
|
|
|
|
if (string.IsNullOrWhiteSpace(model.BSNO)) {
|
|
|
|
throw Oops.Bah("请上传正确数据,Code未录入");
|
|
|
|
throw Oops.Bah("BSNO未录入");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var m = await _djycustomer.Where(x => x.CodeName == model.CodeName).FirstAsync();
|
|
|
|
var m = await _djycustomer.Where(x => x.BSNO == model.BSNO).FirstAsync();
|
|
|
|
var entity = model.Adapt<DjyCustomer>();
|
|
|
|
var entity = model.Adapt<DjyCustomer>();
|
|
|
|
if (m == null)
|
|
|
|
if (m == null)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -115,11 +115,11 @@ namespace Myshipping.Application
|
|
|
|
public async Task<long> SyncVesselDate(DjyVesselInfoDto model)
|
|
|
|
public async Task<long> SyncVesselDate(DjyVesselInfoDto model)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(model.Vessel)|| string.IsNullOrWhiteSpace(model.CARRIERID))
|
|
|
|
if (string.IsNullOrWhiteSpace(model.BSNO))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
throw Oops.Bah("请上传正确数据,船公司或船名未录入");
|
|
|
|
throw Oops.Bah("BSNO未录入");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var m = await _vesselinfo.Where(x => x.Vessel==model.Vessel.ToUpper().Trim()&&x.CARRIERID==model.CARRIERID).FirstAsync();
|
|
|
|
var m = await _vesselinfo.Where(x => x.BSNO==model.BSNO).FirstAsync();
|
|
|
|
var entity = model.Adapt<DjyVesselInfo>();
|
|
|
|
var entity = model.Adapt<DjyVesselInfo>();
|
|
|
|
entity.Vessel = model.Vessel.ToUpper().Trim();
|
|
|
|
entity.Vessel = model.Vessel.ToUpper().Trim();
|
|
|
|
if (m == null)
|
|
|
|
if (m == null)
|
|
|
|