|
@@ -14,6 +14,7 @@ using Hotline.FlowEngine.Workflows;
|
|
using Hotline.Import;
|
|
using Hotline.Import;
|
|
using Hotline.Orders;
|
|
using Hotline.Orders;
|
|
using Hotline.Orders.Notifications;
|
|
using Hotline.Orders.Notifications;
|
|
|
|
+using Hotline.OrderTranspond;
|
|
using Hotline.Permissions;
|
|
using Hotline.Permissions;
|
|
using Hotline.Push.FWMessage;
|
|
using Hotline.Push.FWMessage;
|
|
using Hotline.Push.Notifies;
|
|
using Hotline.Push.Notifies;
|
|
@@ -104,6 +105,7 @@ public class OrderController : BaseController
|
|
private readonly IRepository<OrderSendBackAudit> _orderSendBackAuditRepository;
|
|
private readonly IRepository<OrderSendBackAudit> _orderSendBackAuditRepository;
|
|
private readonly IRepository<User> _userRepository;
|
|
private readonly IRepository<User> _userRepository;
|
|
private readonly IExportApplication _exportApplication;
|
|
private readonly IExportApplication _exportApplication;
|
|
|
|
+ private readonly IRepository<TranspondCityRawData> _transpondCityRawDataRepository;
|
|
|
|
|
|
public OrderController(
|
|
public OrderController(
|
|
IOrderDomainService orderDomainService,
|
|
IOrderDomainService orderDomainService,
|
|
@@ -153,7 +155,8 @@ public class OrderController : BaseController
|
|
ITypedCache<YbEnterpriseToken> cacheResponse,
|
|
ITypedCache<YbEnterpriseToken> cacheResponse,
|
|
IRepository<OrderSendBackAudit> orderSendBackAuditRepository,
|
|
IRepository<OrderSendBackAudit> orderSendBackAuditRepository,
|
|
IRepository<User> userRepository,
|
|
IRepository<User> userRepository,
|
|
- IExportApplication exportApplication
|
|
|
|
|
|
+ IExportApplication exportApplication,
|
|
|
|
+ IRepository<TranspondCityRawData> transpondCityRawDataRepository
|
|
)
|
|
)
|
|
{
|
|
{
|
|
_orderDomainService = orderDomainService;
|
|
_orderDomainService = orderDomainService;
|
|
@@ -204,6 +207,7 @@ public class OrderController : BaseController
|
|
_orderSendBackAuditRepository = orderSendBackAuditRepository;
|
|
_orderSendBackAuditRepository = orderSendBackAuditRepository;
|
|
_userRepository = userRepository;
|
|
_userRepository = userRepository;
|
|
_exportApplication = exportApplication;
|
|
_exportApplication = exportApplication;
|
|
|
|
+ _transpondCityRawDataRepository = transpondCityRawDataRepository;
|
|
}
|
|
}
|
|
|
|
|
|
#region 工单发布
|
|
#region 工单发布
|
|
@@ -233,6 +237,7 @@ public class OrderController : BaseController
|
|
.WhereIF(dto.IsCountersign != null && dto.IsCountersign == false, d => d.CounterSignType == null)
|
|
.WhereIF(dto.IsCountersign != null && dto.IsCountersign == false, d => d.CounterSignType == null)
|
|
.WhereIF(dto.AcceptTypes.Any(), d => dto.AcceptTypes.Contains(d.AcceptType))
|
|
.WhereIF(dto.AcceptTypes.Any(), d => dto.AcceptTypes.Contains(d.AcceptType))
|
|
.WhereIF(dto.HotspotIds.Any(), d => dto.HotspotIds.Contains(d.HotspotId))
|
|
.WhereIF(dto.HotspotIds.Any(), d => dto.HotspotIds.Contains(d.HotspotId))
|
|
|
|
+ .WhereIF(dto.Resolve.HasValue, d=> d.OrderPublish.Resolve == dto.Resolve)
|
|
.WhereIF(dto.CreationTimeStart.HasValue, d => d.CreationTime >= dto.CreationTimeStart)
|
|
.WhereIF(dto.CreationTimeStart.HasValue, d => d.CreationTime >= dto.CreationTimeStart)
|
|
.WhereIF(dto.CreationTimeEnd.HasValue, d => d.CreationTime <= dto.CreationTimeEnd)
|
|
.WhereIF(dto.CreationTimeEnd.HasValue, d => d.CreationTime <= dto.CreationTimeEnd)
|
|
.WhereIF(dto.FiledTimeStart.HasValue, d => d.OrderPublish.CreationTime >= dto.CreationTimeStart)
|
|
.WhereIF(dto.FiledTimeStart.HasValue, d => d.OrderPublish.CreationTime >= dto.CreationTimeStart)
|
|
@@ -469,12 +474,13 @@ public class OrderController : BaseController
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
[Permission(EPermission.PublishedOrder)]
|
|
[Permission(EPermission.PublishedOrder)]
|
|
[HttpGet("published")]
|
|
[HttpGet("published")]
|
|
- public async Task<PagedDto<PublishedDto>> PublishedOrderList([FromQuery] PagedKeywordRequest dto)
|
|
|
|
|
|
+ public async Task<PagedDto<PublishedDto>> PublishedOrderList([FromQuery] PublishedPagedRequest dto)
|
|
{
|
|
{
|
|
var (total, items) = await _orderPublishRepository.Queryable()
|
|
var (total, items) = await _orderPublishRepository.Queryable()
|
|
.Includes(x => x.Order)
|
|
.Includes(x => x.Order)
|
|
.WhereIF(!string.IsNullOrEmpty(dto.Keyword),
|
|
.WhereIF(!string.IsNullOrEmpty(dto.Keyword),
|
|
d => d.Order.Title.Contains(dto.Keyword!) || d.Order.No.Contains(dto.Keyword!))
|
|
d => d.Order.Title.Contains(dto.Keyword!) || d.Order.No.Contains(dto.Keyword!))
|
|
|
|
+ .WhereIF(dto.Resolve.HasValue, x=>x.Resolve == dto.Resolve)
|
|
.OrderBy(d => d.CreationTime)
|
|
.OrderBy(d => d.CreationTime)
|
|
.ToPagedListAsync(dto.PageIndex, dto.PageSize, HttpContext.RequestAborted);
|
|
.ToPagedListAsync(dto.PageIndex, dto.PageSize, HttpContext.RequestAborted);
|
|
|
|
|
|
@@ -2340,9 +2346,10 @@ public class OrderController : BaseController
|
|
|
|
|
|
//内容分词
|
|
//内容分词
|
|
await _orderApplication.OrderParticiple(dto.Content, order.Id, HttpContext.RequestAborted);
|
|
await _orderApplication.OrderParticiple(dto.Content, order.Id, HttpContext.RequestAborted);
|
|
-
|
|
|
|
- //sms
|
|
|
|
- try
|
|
|
|
|
|
+ //敏感分词
|
|
|
|
+ await _orderApplication.OrderSensitiveParticiple(dto.Content, order.Id, HttpContext.RequestAborted);
|
|
|
|
+ //sms
|
|
|
|
+ try
|
|
{
|
|
{
|
|
if (order.AcceptSms)
|
|
if (order.AcceptSms)
|
|
{
|
|
{
|
|
@@ -2452,7 +2459,9 @@ public class OrderController : BaseController
|
|
if (dto.Files.Any())
|
|
if (dto.Files.Any())
|
|
order.FileJson = await _fileRepository.AddFileAsync(dto.Files, order.Id, "", HttpContext.RequestAborted);
|
|
order.FileJson = await _fileRepository.AddFileAsync(dto.Files, order.Id, "", HttpContext.RequestAborted);
|
|
await _orderRepository.UpdateNav(order).Include(d => d.OrderExtension).ExecuteCommandAsync();
|
|
await _orderRepository.UpdateNav(order).Include(d => d.OrderExtension).ExecuteCommandAsync();
|
|
- }
|
|
|
|
|
|
+ //敏感分词
|
|
|
|
+ await _orderApplication.OrderSensitiveParticiple(dto.Content, order.Id, HttpContext.RequestAborted);
|
|
|
|
+ }
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 开始工单办理流程
|
|
/// 开始工单办理流程
|
|
@@ -2493,20 +2502,31 @@ public class OrderController : BaseController
|
|
|
|
|
|
try
|
|
try
|
|
{
|
|
{
|
|
- // 平均派单
|
|
|
|
- if (dto.Workflow.BusinessType == EBusinessType.Send)
|
|
|
|
- {
|
|
|
|
- dto.Workflow.NextHandlers = await _orderDomainService.AverageOrder(HttpContext.RequestAborted);
|
|
|
|
- }
|
|
|
|
|
|
+ // 平均派单
|
|
|
|
+ if (dto.Workflow.BusinessType == EBusinessType.Send)
|
|
|
|
+ {
|
|
|
|
+ dto.Workflow.NextHandlers = await _orderDomainService.AverageOrder(HttpContext.RequestAborted);
|
|
|
|
+ }
|
|
//是否市州互转
|
|
//是否市州互转
|
|
- if (dto.Data.Transpond.HasValue && dto.Data.Transpond.Value)
|
|
|
|
|
|
+ if (dto.Data.Transpond.HasValue && dto.Data.Transpond.Value)
|
|
{
|
|
{
|
|
var order = await _orderRepository.GetAsync(id, HttpContext.RequestAborted);
|
|
var order = await _orderRepository.GetAsync(id, HttpContext.RequestAborted);
|
|
var orderDto = _mapper.Map<OrderDto>(order);
|
|
var orderDto = _mapper.Map<OrderDto>(order);
|
|
- await _capPublisher.PublishAsync(Hotline.Share.Mq.EventNames.HotlineOrderTranspondCity, orderDto);
|
|
|
|
- }
|
|
|
|
|
|
+ await _capPublisher.PublishAsync(Hotline.Share.Mq.EventNames.HotlineOrderTranspondCity, orderDto);
|
|
|
|
+ //保存本地数据
|
|
|
|
+ TranspondCityRawData cityRawData = new TranspondCityRawData
|
|
|
|
+ {
|
|
|
|
+ OrderCode = order.No,
|
|
|
|
+ TransferOutTime = DateTime.Now,
|
|
|
|
+ CityName = order.TranspondCityName,
|
|
|
|
+ Direction = ETranspondDirection.Out
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ await _transpondCityRawDataRepository.AddAsync(cityRawData, HttpContext.RequestAborted);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
|
|
- var startDto = _mapper.Map<StartWorkflowDto>(dto.Workflow);
|
|
|
|
|
|
+ var startDto = _mapper.Map<StartWorkflowDto>(dto.Workflow);
|
|
startDto.DefinitionModuleCode = WorkflowModuleConsts.OrderHandle;
|
|
startDto.DefinitionModuleCode = WorkflowModuleConsts.OrderHandle;
|
|
startDto.Title = dto.Data.Title;
|
|
startDto.Title = dto.Data.Title;
|
|
await _workflowApplication.StartWorkflowAsync(startDto, id, dto.Data.ExpiredTime, HttpContext.RequestAborted);
|
|
await _workflowApplication.StartWorkflowAsync(startDto, id, dto.Data.ExpiredTime, HttpContext.RequestAborted);
|
|
@@ -2573,18 +2593,14 @@ public class OrderController : BaseController
|
|
|
|
|
|
_mapper.Map(expiredTimeConfig, order);
|
|
_mapper.Map(expiredTimeConfig, order);
|
|
await _orderRepository.UpdateAsync(order, HttpContext.RequestAborted);
|
|
await _orderRepository.UpdateAsync(order, HttpContext.RequestAborted);
|
|
- // 平均派单
|
|
|
|
- if (dto.BusinessType == EBusinessType.Send)
|
|
|
|
|
|
+ var averageSendOrder = bool.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.AverageSendOrder).SettingValue[0]);
|
|
|
|
+ // 平均派单
|
|
|
|
+ if (dto.BusinessType == EBusinessType.Send && averageSendOrder)
|
|
{
|
|
{
|
|
dto.NextHandlers = await _orderDomainService.AverageOrder(HttpContext.RequestAborted);
|
|
dto.NextHandlers = await _orderDomainService.AverageOrder(HttpContext.RequestAborted);
|
|
}
|
|
}
|
|
|
|
|
|
await _workflowApplication.NextAsync(dto, order.ExpiredTime, HttpContext.RequestAborted);
|
|
await _workflowApplication.NextAsync(dto, order.ExpiredTime, HttpContext.RequestAborted);
|
|
-
|
|
|
|
- if (dto.IsSms)
|
|
|
|
- {
|
|
|
|
- //发送短信
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -2651,8 +2667,8 @@ public class OrderController : BaseController
|
|
var definition = wfModule.Definition;
|
|
var definition = wfModule.Definition;
|
|
var rsp = new
|
|
var rsp = new
|
|
{
|
|
{
|
|
- TranspondCity = _sysDicDataCacheManager.GetSysDicDataCache(SysDicTypeConsts.TranspondCity),
|
|
|
|
- AcceptTypeOptions = _sysDicDataCacheManager.GetSysDicDataCache(SysDicTypeConsts.AcceptType),
|
|
|
|
|
|
+ TranspondCity = _sysDicDataCacheManager.GetSysDicDataCache(SysDicTypeConsts.TranspondCity),
|
|
|
|
+ AcceptTypeOptions = _sysDicDataCacheManager.GetSysDicDataCache(SysDicTypeConsts.AcceptType),
|
|
ChannelOptions = _sysDicDataCacheManager.GetSysDicDataCache(TimeLimitBaseDataConsts.SourceChannel),
|
|
ChannelOptions = _sysDicDataCacheManager.GetSysDicDataCache(TimeLimitBaseDataConsts.SourceChannel),
|
|
OrgsOptions = await _organizeRepository.GetOrgJson(),
|
|
OrgsOptions = await _organizeRepository.GetOrgJson(),
|
|
EmergencyLevelOptions = EnumExts.GetDescriptions<EEmergencyLevel>(),
|
|
EmergencyLevelOptions = EnumExts.GetDescriptions<EEmergencyLevel>(),
|
|
@@ -2673,8 +2689,8 @@ public class OrderController : BaseController
|
|
{
|
|
{
|
|
var rsp = new
|
|
var rsp = new
|
|
{
|
|
{
|
|
- TranspondCity = _sysDicDataCacheManager.GetSysDicDataCache(SysDicTypeConsts.TranspondCity),
|
|
|
|
- ChannelOptions = _sysDicDataCacheManager.GetSysDicDataCache(TimeLimitBaseDataConsts.SourceChannel),
|
|
|
|
|
|
+ TranspondCity = _sysDicDataCacheManager.GetSysDicDataCache(SysDicTypeConsts.TranspondCity),
|
|
|
|
+ ChannelOptions = _sysDicDataCacheManager.GetSysDicDataCache(TimeLimitBaseDataConsts.SourceChannel),
|
|
AcceptTypeOptions = _sysDicDataCacheManager.GetSysDicDataCache(SysDicTypeConsts.AcceptType),
|
|
AcceptTypeOptions = _sysDicDataCacheManager.GetSysDicDataCache(SysDicTypeConsts.AcceptType),
|
|
EmergencyLevelOptions = EnumExts.GetDescriptions<EEmergencyLevel>(),
|
|
EmergencyLevelOptions = EnumExts.GetDescriptions<EEmergencyLevel>(),
|
|
PushTypeOptions = _sysDicDataCacheManager.GetSysDicDataCache(SysDicTypeConsts.PushType),
|
|
PushTypeOptions = _sysDicDataCacheManager.GetSysDicDataCache(SysDicTypeConsts.PushType),
|
|
@@ -3168,7 +3184,7 @@ public class OrderController : BaseController
|
|
Opinion = dto.Cause
|
|
Opinion = dto.Cause
|
|
};
|
|
};
|
|
//if (dto.AlterTime)
|
|
//if (dto.AlterTime)
|
|
- // recall.External = new External { TimeLimit = dto.TimeLimit, TimeLimitUnit = dto.TimeLimitUnit };
|
|
|
|
|
|
+ // recall.External = new External { TimeLimit = dto.TimeLimit, TimeLimitUnit = ETimeType.WorkDay };
|
|
//if (dto.Files.Any()) recall.Files = dto.Files;
|
|
//if (dto.Files.Any()) recall.Files = dto.Files;
|
|
|
|
|
|
//todo 特提重办,按审批通过时间依据中心派至部门的规则计算期满时间,更新order
|
|
//todo 特提重办,按审批通过时间依据中心派至部门的规则计算期满时间,更新order
|
|
@@ -3226,12 +3242,90 @@ public class OrderController : BaseController
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- /// <summary>
|
|
|
|
- /// 审批工单特提信息
|
|
|
|
- /// </summary>
|
|
|
|
- /// <param name="dto"></param>
|
|
|
|
- /// <returns></returns>
|
|
|
|
- [Permission(EPermission.AuditSpecial)]
|
|
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 工单重办信息
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="dtos"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [Permission(EPermission.ApplySpecial)]
|
|
|
|
+ [HttpPost("re_transact")]
|
|
|
|
+ [LogFilter("工单重办")]
|
|
|
|
+ public async Task Add([FromBody] OrderReTransactDto dto)
|
|
|
|
+ {
|
|
|
|
+ var specialAny = await _orderSpecialRepository.Queryable().Where(x => x.OrderId == dto.OrderId && x.State == 0)
|
|
|
|
+ .AnyAsync();
|
|
|
|
+ if (specialAny) throw UserFriendlyException.SameMessage("工单已存在待审批特提信息!");
|
|
|
|
+
|
|
|
|
+ var screen = await _orderScreenRepository.Queryable().Where(x => x.OrderId == dto.OrderId && (int)x.Status < 2).AnyAsync();
|
|
|
|
+ if (screen) throw UserFriendlyException.SameMessage("工单存在甄别中的信息!");
|
|
|
|
+
|
|
|
|
+ var order = await _orderRepository
|
|
|
|
+ .Queryable()
|
|
|
|
+ .Includes(d => d.Workflow)
|
|
|
|
+ .FirstAsync(d => d.Id == dto.OrderId);
|
|
|
|
+ if (order.Workflow.IsInCountersign) throw UserFriendlyException.SameMessage("工单会签中,无法进行重办!");
|
|
|
|
+
|
|
|
|
+ var model = _mapper.Map<OrderSpecial>(dto);
|
|
|
|
+ var orgs = order.HandlerOrgs;
|
|
|
|
+ model.OrgId = orgs != null && orgs.Count > 0 ? orgs[0].Key : "";
|
|
|
|
+ model.OrgName = orgs != null && orgs.Count > 0 ? orgs[0].Value : "";
|
|
|
|
+ var step = await _workflowDomainService.FindLastStepAsync(model.WorkflowId, HttpContext.RequestAborted);
|
|
|
|
+ model.StepName = step.Name;
|
|
|
|
+ model.StepCode = step.Code;
|
|
|
|
+ model.State = 1;
|
|
|
|
+ model.ESpecialType = ESpecialType.ReTransact;
|
|
|
|
+
|
|
|
|
+ model.InitId();
|
|
|
|
+ if (dto.Files.Any())
|
|
|
|
+ model.FileJson = await _fileRepository.AddFileAsync(dto.Files, model.Id, "", HttpContext.RequestAborted);
|
|
|
|
+ await _orderSpecialRepository.AddAsync(model, HttpContext.RequestAborted);
|
|
|
|
+ if (model.State == 1)
|
|
|
|
+ {
|
|
|
|
+ var recall = new RecallDto
|
|
|
|
+ {
|
|
|
|
+ WorkflowId = dto.WorkflowId!,
|
|
|
|
+ NextStepCode = dto.NextStepCode,
|
|
|
|
+ NextStepName = dto.NextStepName,
|
|
|
|
+ NextHandlers = dto.NextHandlers,
|
|
|
|
+ Opinion = dto.Cause
|
|
|
|
+ };
|
|
|
|
+ if (dto.AlterTime)
|
|
|
|
+ recall.External = new External { TimeLimit = dto.TimeLimit, TimeLimitUnit = ETimeType.WorkDay };
|
|
|
|
+
|
|
|
|
+ await _workflowApplication.RecallAsync(recall, order.ExpiredTime, HttpContext.RequestAborted);
|
|
|
|
+
|
|
|
|
+ var publish = await _orderPublishRepository.GetAsync(x => x.OrderId == dto.OrderId);
|
|
|
|
+ if (publish != null)
|
|
|
|
+ {
|
|
|
|
+ var publishHistory = _mapper.Map<OrderPublishHistory>(publish);
|
|
|
|
+ publishHistory.OrderPublishId = publish.Id;
|
|
|
|
+ publishHistory.ArrangeTitleAfter = publish.ArrangeTitle;
|
|
|
|
+ publishHistory.ArrangeTitleBefor = publish.ArrangeTitle;
|
|
|
|
+ publishHistory.ArrangeContentAfter = publish.ArrangeContent;
|
|
|
|
+ publishHistory.ArrangeContentBefor = publish.ArrangeContent;
|
|
|
|
+ publishHistory.ArrangeOpinionAfter = publish.ArrangeOpinion;
|
|
|
|
+ publishHistory.ArrangeOpinionBefor = publish.ArrangeOpinion;
|
|
|
|
+ await _orderPublishHistoryRepository.AddAsync(publishHistory, HttpContext.RequestAborted);
|
|
|
|
+ await _orderPublishRepository.RemoveAsync(publish, false, HttpContext.RequestAborted);
|
|
|
|
+ }
|
|
|
|
+ var reTransactNum = order.ReTransactNum.HasValue ? order.ReTransactNum.Value + 1 : 1;
|
|
|
|
+ await _orderRepository.Updateable().SetColumns(o=> new Order() { ReTransactNum = reTransactNum } ).Where(o=>o.Id == order.Id).ExecuteCommandAsync(HttpContext.RequestAborted);
|
|
|
|
+
|
|
|
|
+ var visit = await _orderVisitRepository.GetAsync(x => x.OrderId == dto.OrderId && x.VisitState != EVisitState.None);
|
|
|
|
+ if (visit != null)
|
|
|
|
+ {
|
|
|
|
+ visit.VisitState = EVisitState.None;
|
|
|
|
+ await _orderVisitRepository.UpdateAsync(visit, HttpContext.RequestAborted);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 审批工单特提信息
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="dto"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [Permission(EPermission.AuditSpecial)]
|
|
[HttpPut("special")]
|
|
[HttpPut("special")]
|
|
[LogFilter("审批工单特提")]
|
|
[LogFilter("审批工单特提")]
|
|
public async Task Update([FromBody] AuditOrderSpecialDto dto)
|
|
public async Task Update([FromBody] AuditOrderSpecialDto dto)
|
|
@@ -3461,29 +3555,75 @@ public class OrderController : BaseController
|
|
public async Task<object> SpecialBaseData(string id)
|
|
public async Task<object> SpecialBaseData(string id)
|
|
{
|
|
{
|
|
var step = await _workflowApplication.GetRecallStepsAsync(id, HttpContext.RequestAborted);
|
|
var step = await _workflowApplication.GetRecallStepsAsync(id, HttpContext.RequestAborted);
|
|
- if (step != null && step.Steps.Any() && _sessionContext.Roles.Contains("zuoxi"))
|
|
|
|
|
|
+ var specialSeats = bool.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.SpecialSeats).SettingValue[0]);
|
|
|
|
+ var specialSendOrder = bool.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.SpecialSendOrder).SettingValue[0]);
|
|
|
|
+
|
|
|
|
+ var baseTypeId = string.Empty;
|
|
|
|
+ if (step != null && step.Steps.Any() && _sessionContext.Roles.Contains("zuoxi") && specialSeats)
|
|
{
|
|
{
|
|
- step.Steps = step.Steps.Where(x => x.Key == "start").ToList();
|
|
|
|
- }
|
|
|
|
|
|
+ step.Steps = step.Steps.Where(x => x.Key.ToLower() == "start").ToList();
|
|
|
|
+ if (step.Steps.Any()) baseTypeId = step.Steps[0].Key;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (step != null && step.Steps.Any() && _sessionContext.Roles.Contains("paidanyuan") && specialSendOrder)
|
|
|
|
+ {
|
|
|
|
+ step.Steps = step.Steps.Where(d => d.BusinessType is EBusinessType.Send).ToList();
|
|
|
|
+ if (step.Steps.Any()) baseTypeId = step.Steps[0].Key;
|
|
|
|
+ }
|
|
var rsp = new
|
|
var rsp = new
|
|
{
|
|
{
|
|
SpecialTimeType = EnumExts.GetDescriptions<ETimeType>(),
|
|
SpecialTimeType = EnumExts.GetDescriptions<ETimeType>(),
|
|
SpecialReason = _sysDicDataCacheManager.GetSysDicDataCache(SysDicTypeConsts.SpecialReason),
|
|
SpecialReason = _sysDicDataCacheManager.GetSysDicDataCache(SysDicTypeConsts.SpecialReason),
|
|
- Step = step
|
|
|
|
- };
|
|
|
|
|
|
+ Step = step,
|
|
|
|
+ BaseTypeId = baseTypeId
|
|
|
|
+ };
|
|
return rsp;
|
|
return rsp;
|
|
}
|
|
}
|
|
|
|
|
|
- #endregion
|
|
|
|
-
|
|
|
|
- #region 市民信息
|
|
|
|
-
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
- /// 新增市民信息
|
|
|
|
|
|
+ /// 重办基础数据
|
|
/// </summary>
|
|
/// </summary>
|
|
- /// <param name="dtos"></param>
|
|
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- [HttpPost("citizen")]
|
|
|
|
|
|
+ [HttpGet("reTransact/base/{id}")]
|
|
|
|
+ public async Task<object> ReTransactBaseData(string id)
|
|
|
|
+ {
|
|
|
|
+ var order = await _orderRepository.GetAsync(id, HttpContext.RequestAborted);
|
|
|
|
+ List<Kv> orgs = new List<Kv> { new Kv { Key = "001", Value = "市民热线服务系统" } };
|
|
|
|
+ if (order == null ) throw UserFriendlyException.SameMessage("无效工单信息!");
|
|
|
|
+ if (order.CounterSignType == ECounterSignType.Center)
|
|
|
|
+ {
|
|
|
|
+ //中心会签调取方法
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ if (!string.IsNullOrEmpty(order.OrgLevelOneCode) && order.OrgLevelOneCode != "001")
|
|
|
|
+ {
|
|
|
|
+ orgs.Add(new Kv { Key = order.OrgLevelOneCode,Value = order.OrgLevelOneName });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ var step = await _workflowApplication.GetRecallStepsAsync(order.WorkflowId, HttpContext.RequestAborted);
|
|
|
|
+ //获取部门信息
|
|
|
|
+ var rsp = new
|
|
|
|
+ {
|
|
|
|
+ SpecialTimeType = EnumExts.GetDescriptions<ETimeType>(),
|
|
|
|
+ SpecialReason = _sysDicDataCacheManager.GetSysDicDataCache(SysDicTypeConsts.SpecialReason),
|
|
|
|
+ ReTransactErrorType = _sysDicDataCacheManager.GetSysDicDataCache(SysDicTypeConsts.ReTransactErrorType),
|
|
|
|
+ Step = step,
|
|
|
|
+ Orgs = orgs,
|
|
|
|
+ };
|
|
|
|
+ return rsp;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ #endregion
|
|
|
|
+
|
|
|
|
+ #region 市民信息
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 新增市民信息
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="dtos"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [HttpPost("citizen")]
|
|
[LogFilter("新增市民信息")]
|
|
[LogFilter("新增市民信息")]
|
|
public async Task Add([FromBody] CitizenAddDto dto)
|
|
public async Task Add([FromBody] CitizenAddDto dto)
|
|
{
|
|
{
|