|
@@ -1,6 +1,7 @@
|
|
|
using DataSharing.LuZhou.Encrypt;
|
|
|
using DataSharing.LuZhou.LuZhou110;
|
|
|
using DataSharing.LuZhou.LZ110;
|
|
|
+using DataSharing.RawData;
|
|
|
using DataSharing.Share.Dtos.LuZhou;
|
|
|
using Hotline.Share.Dtos.Order;
|
|
|
using Hotline.Share.Enums.Order;
|
|
@@ -17,6 +18,7 @@ namespace DataSharing.Police110.HaiNengDa110
|
|
|
private readonly ILogger<HndService> _logger;
|
|
|
private readonly IRepository<DsPoliceSendChainAlarmHnd> _policeSendChainAlarmHndRepository;
|
|
|
private readonly IRepository<DsPoliceSendChainDealHnd> _policeSendChainDealHndRepository;
|
|
|
+ private readonly IRepository<DsOrder> _dsOrderRepository;
|
|
|
private readonly ISharingConfigurationManager _sharingConfigurationManager;
|
|
|
private readonly IRepository<WaitSendTaskLuZhou110> _waitSendTaskLuZhou110Repository;
|
|
|
private readonly IRepository<SendTaskLuZhou110> _sendTaskLuZhou110Repository;
|
|
@@ -34,6 +36,7 @@ namespace DataSharing.Police110.HaiNengDa110
|
|
|
public HndService(IMapper mapper, ILogger<HndService> logger,
|
|
|
IRepository<DsPoliceSendChainAlarmHnd> policeSendChainAlarmHndRepository,
|
|
|
IRepository<DsPoliceSendChainDealHnd> policeSendChainDealHndRepository,
|
|
|
+ IRepository<DsOrder> dsOrderRepository,
|
|
|
ISharingConfigurationManager sharingConfigurationManager,
|
|
|
IRepository<WaitSendTaskLuZhou110> waitSendTaskLuZhou110Repository,
|
|
|
IRepository<SendTaskLuZhou110> sendTaskLuZhou110Repository)
|
|
@@ -42,6 +45,7 @@ namespace DataSharing.Police110.HaiNengDa110
|
|
|
_logger = logger;
|
|
|
_policeSendChainAlarmHndRepository = policeSendChainAlarmHndRepository;
|
|
|
_policeSendChainDealHndRepository = policeSendChainDealHndRepository;
|
|
|
+ _dsOrderRepository = dsOrderRepository;
|
|
|
_sharingConfigurationManager = sharingConfigurationManager;
|
|
|
_waitSendTaskLuZhou110Repository = waitSendTaskLuZhou110Repository;
|
|
|
_sendTaskLuZhou110Repository = sendTaskLuZhou110Repository;
|
|
@@ -69,6 +73,8 @@ namespace DataSharing.Police110.HaiNengDa110
|
|
|
if (!string.IsNullOrEmpty(orderDto.HotspotId))
|
|
|
policeTypeCode = orderDto.HotspotId.Length > 8 ? orderDto.HotspotId.Substring(0, 7) : orderDto.HotspotId;
|
|
|
|
|
|
+ var Title = orderDto.Title.Length > 60 ? orderDto.Title.Substring(0, 60) : orderDto.Title;
|
|
|
+
|
|
|
DsPoliceSendChainAlarmHnd policeSend = new()
|
|
|
{
|
|
|
SerialNumber = orderDto.ExternalId,
|
|
@@ -84,23 +90,25 @@ namespace DataSharing.Police110.HaiNengDa110
|
|
|
JurisdictionalUnitCode = config.GXDWDM,
|
|
|
JurisdictionalUnitName = config.GXDWMC,
|
|
|
JurisdictionalUnitNumber = config.GXDWDH,
|
|
|
- AlarmReceivingUnitCode = "510300010000",
|
|
|
- AlarmReceivingUnitName = "四川省自贡市公安局指挥中心",
|
|
|
+ AlarmReceivingUnitCode = "510500000000",
|
|
|
+ AlarmReceivingUnitName = "四川省泸州市市公安局",
|
|
|
CallPoliceTime = Convert.ToDateTime(orderDto.CreationTime),
|
|
|
PushTime = DateTime.Now,
|
|
|
AlarmReceptionType = "0",
|
|
|
AreaCode = orderDto.AreaCode.Substring(0, 6),
|
|
|
CallPoliceAddress = orderDto.FullAddress,
|
|
|
OrderId = orderDto.Id,
|
|
|
- No = orderDto.No
|
|
|
+ No = orderDto.No,
|
|
|
+ IsSecret = orderDto.IsSecret == true ? "1" : "0",
|
|
|
+ Title = Title,
|
|
|
};
|
|
|
|
|
|
policeSend.FromGender = orderDto.FromGender switch
|
|
|
{
|
|
|
- Hotline.Share.Enums.Order.EGender.Female => "0",
|
|
|
+ Hotline.Share.Enums.Order.EGender.Female => "2",
|
|
|
Hotline.Share.Enums.Order.EGender.Male => "1",
|
|
|
- Hotline.Share.Enums.Order.EGender.Unknown => "2",
|
|
|
- _ => "2",
|
|
|
+ Hotline.Share.Enums.Order.EGender.Unknown => "0",
|
|
|
+ _ => "0",
|
|
|
};
|
|
|
|
|
|
if (string.IsNullOrEmpty(policeSend.AlarmReceiptNumber))
|
|
@@ -109,41 +117,6 @@ namespace DataSharing.Police110.HaiNengDa110
|
|
|
policeSend.SerialNumber = areaCodeDefu + "1234512345" + orderDto.No;
|
|
|
}
|
|
|
|
|
|
- //这里网泸州110待推送表写入数据
|
|
|
- #region 接受数据汇聚 工单基础信息
|
|
|
- //var order = orderDto;
|
|
|
- //var gender = "";
|
|
|
- //if (order.FromGender == EGender.Female)
|
|
|
- // gender = "女";
|
|
|
- //if (order.FromGender == EGender.Male)
|
|
|
- // gender = "男";
|
|
|
- //LZ110ZBasicInfoDto basicInfoDto = new LZ110ZBasicInfoDto()
|
|
|
- //{
|
|
|
- // FlowID = order.Id,
|
|
|
- // Code = order.No,
|
|
|
- // PoliceCode = order.ExternalId,
|
|
|
- // AreaName = order.AreaCode.Substring(0, 6),
|
|
|
- // AddDate = order.CreationTime.ToString("yyyy/MM/dd HH:mm:ss"),
|
|
|
- // FromTel = order.FromPhone,
|
|
|
- // CallerName = order.FromName,
|
|
|
- // Gender = gender,
|
|
|
- // ContactTel = order.Contact,
|
|
|
- // IDCard = order.LicenceNo,
|
|
|
- // TelHome = "",
|
|
|
- // Address = order.Province + order.City + order.County + order.Street,
|
|
|
- // WorkUnit = "",
|
|
|
- // Title = order.Title,
|
|
|
- // PurTypeName = order.AcceptType,
|
|
|
- // FromName = order.SourceChannel,
|
|
|
- // ConTypeName = order.HotspotSpliceName,
|
|
|
- // Content = order.Content,
|
|
|
- // IsSecrecy = order.IsSecret == true ? "1" : "0"
|
|
|
- //};
|
|
|
- //var GDJCXXInfoObject = EncryptHandler.AES(basicInfoDto);
|
|
|
-
|
|
|
- //await InitSendData(order.Id, order.No, "1", LZ110Defaults.InteractiveBasicInfo, JsonConvert.SerializeObject(basicInfoDto), JsonConvert.SerializeObject(GDJCXXInfoObject), cancellationToken);
|
|
|
- #endregion
|
|
|
-
|
|
|
//查询是否有此工单,如果没有新增此工单
|
|
|
var data = await _policeSendChainAlarmHndRepository.GetAsync(p => p.OrderId == orderDto.Id && p.AlarmReceptionType == "1", cancellationToken);
|
|
|
if (data == null)
|