zhangxiaofeng 3 months ago
commit 5c42fa3289

@ -78,4 +78,16 @@ public class CM_BaseInfoController : ApiController
return res; return res;
} }
/// <summary>
/// 处理附件
/// </summary>
/// <returns></returns>
[HttpPost]
[Route("CM_DealExcel")]
public DataResult CM_DealExcel([FromBody] CM_DealExcelReq model)
{
var res = _invokeService.CM_DealExcel(model);
return res;
}
} }

@ -0,0 +1,28 @@
using DS.Module.Core;
using DS.Module.Core.Enums;
using DS.WMS.ContainerManagement.Info.Entity;
using FluentValidation;
using Mapster;
using Masuit.Tools.Systems;
using SqlSugar;
namespace DS.WMS.ContainerManagement.Info.Dtos;
/// <summary>
/// 箱管_处理附件
/// </summary>
public class CM_DealExcelReq
{
/// <summary>
/// 主键编号
/// </summary>
public long Id { get; set; }
public string FormName { get; set; }
public string TableName { get; set; }
public long FileId { get; set; }
}

@ -118,4 +118,8 @@ public class VW_CM_RentOut_NeedRentRes
/// </summary> /// </summary>
public DateTime CreateTime { get; set; } public DateTime CreateTime { get; set; }
/// <summary>
/// Desc:关联放箱单号
/// </summary>
public string? CtnReleaseNo { get; set; }
} }

@ -139,4 +139,9 @@ public class VW_CM_SellCtn_NeedSellRes
/// </summary> /// </summary>
public decimal? CtnValue_BuyingPrice { get; set; } public decimal? CtnValue_BuyingPrice { get; set; }
/// <summary>
/// Desc:关联放箱单号
/// </summary>
public string? CtnReleaseNo { get; set; }
} }

@ -38,4 +38,12 @@ public interface ICM_BaseInfoService
/// <param name="id"></param> /// <param name="id"></param>
/// <returns></returns> /// <returns></returns>
DataResult<CM_CheckCntrnoRes> CM_CheckCntrno(CM_CheckCntrno model); DataResult<CM_CheckCntrnoRes> CM_CheckCntrno(CM_CheckCntrno model);
/// <summary>
/// 获取详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
DataResult CM_DealExcel(CM_DealExcelReq model);
} }

@ -16,6 +16,7 @@ using DS.WMS.Core.Op.View;
using DS.WMS.Core.Sys.Entity; using DS.WMS.Core.Sys.Entity;
using Mapster; using Mapster;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Newtonsoft.Json;
using SqlSugar; using SqlSugar;
namespace DS.WMS.ContainerManagement.Info.Method; namespace DS.WMS.ContainerManagement.Info.Method;
@ -254,4 +255,33 @@ public class CM_BaseInfoService : ICM_BaseInfoService
return true; return true;
} }
/// <summary>
/// 处理附件
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
public DataResult CM_DealExcel(CM_DealExcelReq req)
{
return DataResult.Successed($"调用成功!{JsonConvert.SerializeObject(req)}", MultiLanguageConst.DataUpdateSuccess);
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
}
/// <summary>
/// 处理附件
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
public DataResult CM_CheckCtnBase(CM_DealExcelReq req)
{
return DataResult.Successed($"", MultiLanguageConst.DataUpdateSuccess);
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
}
} }

@ -542,7 +542,7 @@ public class CM_CtnScrapService : CMServiceBase, ICM_CtnScrapService
/// <summary> /// <summary>
/// 租箱租入明细视图_列表 /// 报废箱 待取列表
/// </summary> /// </summary>
/// <param name="request"></param> /// <param name="request"></param>
/// <returns></returns> /// <returns></returns>

@ -421,8 +421,12 @@ public class CM_RentInService : CMServiceBase, ICM_RentInService
//如果没有填写提箱日期 则变动来源id设为租箱主单 变动日期设为业务日期 //如果没有填写提箱日期 则变动来源id设为租箱主单 变动日期设为业务日期
//如果填写了提箱日期 则变动来源id设为租箱主单 变动日期设为提箱日期 //如果填写了提箱日期 则变动来源id设为租箱主单 变动日期设为提箱日期
if (detail.PickupDate != null) //20240911 改为通过明细中的提箱日期 或 开始计费日期(如果两者皆有,则优先使用提箱日期)来确定变动日期
if (detail.PickupDate != null|| detail.FeeStartDate != null)
{ {
var changedate = detail.PickupDate==null?detail.FeeStartDate:detail.PickupDate;
changerec.CtnStateId = CMCtnStateEnum.AV; changerec.CtnStateId = CMCtnStateEnum.AV;
changerec.ChangeSourceDetailId = detail.Id; changerec.ChangeSourceDetailId = detail.Id;
changerec.CtnFlowStateId = CMCtnFlowStateEnum.; changerec.CtnFlowStateId = CMCtnFlowStateEnum.;
@ -786,7 +790,7 @@ public class CM_RentInService : CMServiceBase, ICM_RentInService
/// <summary> /// <summary>
/// 租箱租入明细视图_列表 /// 租箱租入 退租待取用明细视图_列表
/// </summary> /// </summary>
/// <param name="request"></param> /// <param name="request"></param>
/// <returns></returns> /// <returns></returns>

@ -1,4 +1,5 @@
using DS.Module.Core; using DS.Module.Core;
using DS.Module.Core.Data;
using DS.Module.Core.Extensions; using DS.Module.Core.Extensions;
using DS.WMS.Core.Flow.Dtos; using DS.WMS.Core.Flow.Dtos;
using DS.WMS.Core.Flow.Entity; using DS.WMS.Core.Flow.Entity;
@ -28,6 +29,7 @@ public class FlowInstanceService : ServiceBase, IFlowInstanceService
/// <param name="serviceProvider"></param> /// <param name="serviceProvider"></param>
public FlowInstanceService(IServiceProvider serviceProvider) : base(serviceProvider) public FlowInstanceService(IServiceProvider serviceProvider) : base(serviceProvider)
{ {
Db.QueryFilter.Clear<ITenantId>();
} }
/// <summary> /// <summary>

@ -68,10 +68,6 @@ public class ClientInfoService : ServiceBase, IClientInfoService
if (await queryable.AnyAsync(x => (SqlFunc.IsNullOrEmpty(x.Tel) && SqlFunc.IsNullOrEmpty(x.Mobile)) || (SqlFunc.IsNullOrEmpty(x.Email) && SqlFunc.IsNullOrEmpty(x.QQ)))) if (await queryable.AnyAsync(x => (SqlFunc.IsNullOrEmpty(x.Tel) && SqlFunc.IsNullOrEmpty(x.Mobile)) || (SqlFunc.IsNullOrEmpty(x.Email) && SqlFunc.IsNullOrEmpty(x.QQ))))
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.ClientInfoIncomplete)); return DataResult.FailedWithDesc(nameof(MultiLanguageConst.ClientInfoIncomplete));
var template = await FindTemplateAsync(INFO_CLIENT_TASK);
if (template == null)
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.TemplateNotFound));
if (await taskService.Value.HasAuthorizedAsync()) if (await taskService.Value.HasAuthorizedAsync())
{ {
var requests = list.Select(x => new TaskCreationRequest var requests = list.Select(x => new TaskCreationRequest
@ -106,6 +102,10 @@ public class ClientInfoService : ServiceBase, IClientInfoService
} }
} }
var template = await FindTemplateAsync(INFO_CLIENT_TASK);
if (template == null)
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.TemplateNotFound));
for (int i = 0; i < idModel.Ids.Length; i++) for (int i = 0; i < idModel.Ids.Length; i++)
{ {
var id = idModel.Ids[i]; var id = idModel.Ids[i];

@ -344,13 +344,16 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
if (updateFlag) if (updateFlag)
{ {
await SetTaskStatusAsync(new TaskUpdateRequest result = await SetTaskStatusAsync(new TaskUpdateRequest
{ {
BusinessId = request.BusinessId, BusinessId = request.BusinessId,
BusinessType = request.BusinessType, BusinessType = request.BusinessType,
TaskTypeName = request.TaskTypeName, TaskTypeName = request.TaskTypeName,
TaskStatus = TaskStatusEnum.Create TaskStatus = TaskStatusEnum.Create
}, false); }, false);
if (!result.Succeeded)
return result;
} }
} }
@ -447,8 +450,8 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.EmptyData)); return DataResult.FailedWithDesc(nameof(MultiLanguageConst.EmptyData));
if (task.TaskStatus == TaskStatusEnum.Complete) if (task.TaskStatus == TaskStatusEnum.Complete)
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.TaskCompleted)); return DataResult.FailedWithDesc(nameof(MultiLanguageConst.TaskCompleted));
if (task.TaskStatus == TaskStatusEnum.Cancel) //if (task.TaskStatus == TaskStatusEnum.Cancel)
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.TaskCancelled)); // return DataResult.FailedWithDesc(nameof(MultiLanguageConst.TaskCancelled));
var result = await ManagerService.SetTaskStatusWithBsno(request.BusinessId, request.TaskType, request.TaskStatus, DateTime.Now); var result = await ManagerService.SetTaskStatusWithBsno(request.BusinessId, request.TaskType, request.TaskStatus, DateTime.Now);
if (!result.Succeeded) if (!result.Succeeded)
@ -461,10 +464,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
task.RejectReason = request.RejectReason; task.RejectReason = request.RejectReason;
//更新当前任务状态 //更新当前任务状态
task.TaskStatus = request.TaskStatus; task.TaskStatus = request.TaskStatus;
if (AuditTaskTypes.Contains(task.TaskType)) await TenantDb.Updateable(task).UpdateColumns(x => new { x.TaskStatus, x.RejectReason }).ExecuteCommandAsync();
task.FlowId = null;
await TenantDb.Updateable(task).UpdateColumns(x => new { x.TaskStatus, x.FlowId, x.RejectReason }).ExecuteCommandAsync();
if (task.TaskStatus == TaskStatusEnum.Complete && task.NextType.HasValue && request.AutoCreateNext) if (task.TaskStatus == TaskStatusEnum.Complete && task.NextType.HasValue && request.AutoCreateNext)
{ {

@ -2,16 +2,19 @@ using System.IO;
using System.Reflection; using System.Reflection;
using DS.Module.Core; using DS.Module.Core;
using DS.Module.Core.Extensions; using DS.Module.Core.Extensions;
using DS.Module.Core.Helpers;
using DS.Module.SqlSugar; using DS.Module.SqlSugar;
using DS.WMS.Core.Code.Interface; using DS.WMS.Core.Code.Interface;
using DS.WMS.Core.Op.Entity; using DS.WMS.Core.Op.Entity;
using DS.WMS.Core.Op.Interface; using DS.WMS.Core.Op.Interface;
using DS.WMS.Core.Sys.Entity; using DS.WMS.Core.Sys.Entity;
using DS.WMS.Core.Sys.Interface; using DS.WMS.Core.Sys.Interface;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Newtonsoft.Json; using Newtonsoft.Json;
using NPOI.HPSF; using NPOI.HPSF;
using Org.BouncyCastle.Ocsp;
using SharpCompress.Common; using SharpCompress.Common;
using SqlSugar; using SqlSugar;
using SqlSugar.IOC; using SqlSugar.IOC;
@ -47,13 +50,16 @@ public class OpTest
Assert.True(true); Assert.True(true);
} }
/// <summary>
/// 租户用户授权数
/// </summary>
[Fact] [Fact]
public void OpTest2() public void OpTest2()
{ {
//var tenantDb = saasService.GetBizDbScopeById("1750335377144680448"); //var tenantDb = saasService.GetBizDbScopeById("1750335377144680448");
//var data = _commonSetService.GetSequenceNext<SeaExport>(); //var data = _commonSetService.GetSequenceNext<SeaExport>();
var str = EncrypteHelper.EncryptData("300", "ba31a8758af1c6b7");
Assert.True(true); Assert.True(true);
} }

Loading…
Cancel
Save