修改VOLTA

master
jianghaiqing 4 weeks ago
parent 423470b480
commit ed856bf0f6

@ -1036,19 +1036,30 @@ namespace Myshipping.Application.EDI.VOLTA
Shipping = formatEdiStr("txt", bill.MARKS);
ShippingList = formatlengthStr(Shipping, 35);
for (var i = 0; i < Math.Ceiling(Convert.ToDecimal(Convert.ToDecimal(ShippingList.Count) / Convert.ToDecimal(10))); i++)
//for (var i = 0; i < Math.Ceiling(Convert.ToDecimal(Convert.ToDecimal(ShippingList.Count) / Convert.ToDecimal(10))); i++)
//{
// var tempstr = "44:";
// for (var z = 0; z < 10; z++)
// {
// if ((i * 10 + z) < ShippingList.Count)
// tempstr = tempstr + ShippingList[i * 10 + z];
// if (z < 9) tempstr = tempstr + ":";
// }
// if (tempstr != "44:")
// {
// r.WriteLine(tempstr + "'");
// icount++;
// }
//}
if (ShippingList.Count != 0 && Shipping.Length > 0)
{
var tempstr = "44:";
for (var z = 0; z < 10; z++)
{
if ((i * 10 + z) < ShippingList.Count)
tempstr = tempstr + ShippingList[i * 10 + z];
if (z < 9) tempstr = tempstr + ":";
}
if (tempstr != "44:")
for (var i = 0; i < ShippingList.Count; i++)
{
r.WriteLine(tempstr + "'");
icount++;
if (!string.IsNullOrWhiteSpace(ShippingList[i]))
{
r.WriteLine("44:" + ShippingList[i] + "'");
icount = icount + 1;
}
}
}
@ -1062,28 +1073,33 @@ namespace Myshipping.Application.EDI.VOLTA
for (var i = 0; i < ShippingList.Count; i++)
{
if (ShippingList[i] != "")
if (!string.IsNullOrWhiteSpace(ShippingList[i]))
{
if (m <= 5)
{
if (m == 1) strtemp = "47:" + ShippingList[i] + ":";
else
{
if (m == 5)
strtemp = strtemp + ShippingList[i];
else
strtemp = strtemp + ShippingList[i] + ":";
}
}
else
{
m = 1;
r.WriteLine(strtemp + "'");
strtemp = "47:" + ShippingList[i] + ":";
icount = icount + 1;
}
m = m + 1;
r.WriteLine("47:" + ShippingList[i] + "'");
icount = icount + 1;
}
//if (ShippingList[i] != "")
//{
// if (m <= 5)
// {
// if (m == 1) strtemp = "47:" + ShippingList[i] + ":";
// else
// {
// if (m == 5)
// strtemp = strtemp + ShippingList[i];
// else
// strtemp = strtemp + ShippingList[i] + ":";
// }
// }
// else
// {
// m = 1;
// r.WriteLine(strtemp + "'");
// strtemp = "47:" + ShippingList[i] + ":";
// icount = icount + 1;
// }
// m = m + 1;
//}
}
}
if (!string.IsNullOrWhiteSpace(strtemp))

@ -2250,7 +2250,7 @@ namespace Myshipping.Application
if (!input.DoNotSendDS)
{
//推送东胜
await SendBookingOrder(new long[] { main.ParentId == 0 ? Id : (long)main.ParentId });
await SendBookingOrder(new long[] { main.ParentId == 0 ? Id : (long)main.ParentId }, null, input.OddCode);
if (!string.IsNullOrEmpty(reqId))
{
@ -10891,7 +10891,7 @@ namespace Myshipping.Application
/// <param name="syncTypeEnum"></param>
/// <returns></returns>
[NonAction]
public async Task<dynamic> SendBookingOrder(long[] ids, BookingOrderSyncTypeEnum? syncTypeEnum = null)
public async Task<dynamic> SendBookingOrder(long[] ids, BookingOrderSyncTypeEnum? syncTypeEnum = null,string oddCode = "")
{
if (App.Configuration["RunType"] is CommonConst.RUN_TYPE_DJY)
{

@ -911,6 +911,11 @@ namespace Myshipping.Application
/// 不推送东胜。在有些地方调用保存数据时,不需要推送东胜。
/// </summary>
public bool DoNotSendDS { get; set; } = false;
/// <summary>
/// 保存特殊要求时可以赋值
/// </summary>
public string OddCode { get; set; }
}
/// <summary>

@ -19,6 +19,7 @@ using Microsoft.AspNetCore.Authorization;
using static NPOI.HSSF.Util.HSSFColor;
using TinyPinyin;
using Myshipping.Core.Const;
using Furion.JsonSerialization;
namespace Myshipping.Core.Service
{
@ -163,6 +164,8 @@ namespace Myshipping.Core.Service
[HttpPost("/DjyCustomer/edit"), SqlSugarUnitOfWork]
public async Task<long> Update(UpdateDjyCustomerInput input)
{
_logger.LogInformation($"往来单位修改请求json={JSON.Serialize(input)}");
var find = await _rep.FirstOrDefaultAsync(u => u.Id == input.Id);
if (find == null)
{

@ -24,6 +24,7 @@ using Furion.EventBus;
using Microsoft.AspNetCore.Authorization;
using Myshipping.Core.Const;
using MathNet.Numerics.RootFinding;
using Microsoft.Extensions.Logging;
namespace Myshipping.Core.Service;
@ -43,6 +44,7 @@ public class SysUserService : ISysUserService, IDynamicApiController, ITransient
private readonly IEventPublisher _publisher;
private readonly ISysDataUserMenu _sysDataUserMenu;
private readonly ISysRoleService _sysRoleService;
private readonly ILogger<SysUserService> _logger;
public SysUserService(SqlSugarRepository<SysUser> sysUserRep,
ISysCacheService sysCacheService,
@ -53,7 +55,7 @@ public class SysUserService : ISysUserService, IDynamicApiController, ITransient
ISysEmpPosService sysEmpPosService,
IEventPublisher publisher,
ISysDataUserMenu sysDataUserMenu,
ISysRoleService sysRoleService)
ISysRoleService sysRoleService, ILogger<SysUserService> logger)
{
_sysUserRep = sysUserRep;
_sysCacheService = sysCacheService;
@ -65,6 +67,7 @@ public class SysUserService : ISysUserService, IDynamicApiController, ITransient
_publisher = publisher;
_sysDataUserMenu = sysDataUserMenu;
_sysRoleService = sysRoleService;
_logger = logger;
}
/// <summary>
@ -234,6 +237,7 @@ public class SysUserService : ISysUserService, IDynamicApiController, ITransient
[HttpPost("/sysUser/edit")]
public async Task UpdateUser(UpdateUserInput input)
{
// 数据范围检查
CheckDataScopeByUserId(input.Id);

Loading…
Cancel
Save