20241015 修改基本完成

dev
dengyu 1 month ago
parent d2edf31a56
commit c54715ddac

@ -91,4 +91,5 @@ public class CM_BaseInfoController : ApiController
return res;
}
}

@ -46,10 +46,5 @@ public interface ICM_BaseInfoService
/// <returns></returns>
public Task<DataResult> CM_DealExcel(CM_DealExcelReq model);
/// <summary>
/// 判断箱号是否合规
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public bool ValidateContainerNumber(string containerNumber, out string trueCntrno);
}

@ -210,7 +210,9 @@ public class CM_BaseInfoService : ICM_BaseInfoService
return result;
}
public bool ValidateContainerNumber(string containerNumber,out string trueCntrno)
public static bool ValidateContainerNumber(string containerNumber,out string trueCntrno)
{
// 集装箱号的校验规则
// - 由4位字母ISO代码+ 6位数字 + 1位校验码组成

@ -456,10 +456,16 @@ public class CM_RentOneWayService : CMServiceBase, ICM_RentOneWayService
newrec = addrec.Adapt<CM_RentOneWay_Detail>();
newrec.Id = 0;
newrec.Pid = id;
newrec.RentDirectId = CMRentDirectEnum.退;
newrec.RentDirectId = CMRentDirectEnum.;
newrec.DropoffDate = head.Bsdate;
newrec.RentDetailId = addrec.Id;//
//newrec.PickupPortid = null;
//newrec.PickupPort = null;
//newrec.PickupPortCode = null;
//newrec.PickupDate = null;
addList.Add(newrec);
}
@ -513,7 +519,7 @@ public class CM_RentOneWayService : CMServiceBase, ICM_RentOneWayService
// } };
//}
request.SetDefaultOrderField("StateTime");
request.SetDefaultOrderField("PickUpDate");
//序列化查询条件
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);

@ -124,6 +124,12 @@ public class CM_RentOneWay_InService : CMServiceBase, ICM_RentOneWay_InService
item.Pid = entity.Id;
item.RentDirectId = CMRentDirectEnum.;
item.RentTypeId = CMRentTypeEnum.;
if (item.OldContainerOwnerId == null|| item.OldContainerOwnerId == 0) {
item.OldContainerOwnerId = data.OldContainerOwnerId;
item.OldContainerOwner = data.OldContainerOwner;
}
var newdetail = item.Adapt<CM_RentOneWay_Detail>();
await tenantDb.Insertable(newdetail).ExecuteCommandAsync();
}
@ -153,12 +159,22 @@ public class CM_RentOneWay_InService : CMServiceBase, ICM_RentOneWay_InService
item.Pid = info.Id;
item.RentDirectId = CMRentDirectEnum.;
item.RentTypeId = CMRentTypeEnum.;
if (item.OldContainerOwnerId == null || item.OldContainerOwnerId == 0)
{
item.OldContainerOwnerId = info.OldContainerOwnerId;
item.OldContainerOwner = info.OldContainerOwner;
}
var newdetail = item.Adapt<CM_RentOneWay_Detail>();
await tenantDb.Insertable(newdetail).ExecuteCommandAsync();
}
else
{
var updrec = _BodyList.First(x => x.Id == item.Id);
if (item.OldContainerOwnerId == null || item.OldContainerOwnerId == 0)
{
item.OldContainerOwnerId = info.OldContainerOwnerId;
item.OldContainerOwner = info.OldContainerOwner;
}
updrec = item.Adapt(updrec);
await tenantDb.Updateable(updrec).ExecuteCommandAsync();
}

@ -69,7 +69,7 @@ public class CM_State_Change_TemplatImportService : CMServiceBase, ICM_State_Cha
private readonly ICM_RentOneWayService _CM_RentOneWay;
private readonly ICM_RentOneWay_InService _CM_RentOneWay_In;
private readonly ICM_CtnScrapService _CM_CtnScrap;
private readonly ICM_BaseInfoService _CM_BaseInfo;
//private readonly ICM_BaseInfoService _CM_BaseInfo;
/// <summary>
@ -96,8 +96,7 @@ public class CM_State_Change_TemplatImportService : CMServiceBase, ICM_State_Cha
_CM_RentOneWay = _serviceProvider.GetRequiredService<ICM_RentOneWayService>();
_CM_RentOneWay_In = _serviceProvider.GetRequiredService<ICM_RentOneWay_InService>();
_CM_CtnScrap = _serviceProvider.GetRequiredService<ICM_CtnScrapService>();
_CM_BaseInfo = _serviceProvider.GetRequiredService<ICM_BaseInfoService>();
//_CM_BaseInfo = _serviceProvider.GetRequiredService<ICM_BaseInfoService>();
}
@ -992,7 +991,7 @@ public class CM_State_Change_TemplatImportService : CMServiceBase, ICM_State_Cha
foreach (var ctn in changelist)
{
var trueCntrno = "";
var istrue = _CM_BaseInfo.ValidateContainerNumber(ctn.Cntrno, out trueCntrno);
var istrue = CM_BaseInfoService.ValidateContainerNumber(ctn.Cntrno, out trueCntrno);
if (istrue == true)
{

Loading…
Cancel
Save