|
@@ -59,6 +59,10 @@ namespace DataSharing.Police110.DCJT110
|
|
|
}
|
|
|
// var registerNo = string.IsNullOrEmpty(orderDto.AcceptorId) == true ? "1001" : orderDto.AcceptorId.Substring(orderDto.AcceptorId.Length - 12);
|
|
|
var Content = orderDto.Content.Length > 1900 ? orderDto.Content.Substring(0, 1900) : orderDto.Content;
|
|
|
+ var policeTypeCode = "01";
|
|
|
+ if (!string.IsNullOrEmpty(orderDto.HotspotId))
|
|
|
+ policeTypeCode = orderDto.HotspotId.Length > 8 ? orderDto.HotspotId.Substring(0, 7) : orderDto.HotspotId;
|
|
|
+
|
|
|
DsPoliceSendChainAlarmDcjt policeSend = new()
|
|
|
{
|
|
|
SerialNumber = orderDto.ExternalId,
|
|
@@ -69,16 +73,16 @@ namespace DataSharing.Police110.DCJT110
|
|
|
CallPoliceName = orderDto.FromName,
|
|
|
PhoneNumber = orderDto.Contact,
|
|
|
CallPoliceContent = Content,
|
|
|
- PoliceTypeCode = "07240400",
|
|
|
- PoliceTypeName = "人民调解、社区矫正、基层法律服务和帮教",
|
|
|
+ PoliceTypeCode = policeTypeCode,
|
|
|
+ PoliceTypeName = orderDto.HotspotSpliceName,
|
|
|
JurisdictionalUnitCode = config.GXDWDM,
|
|
|
JurisdictionalUnitName = config.GXDWMC,
|
|
|
JurisdictionalUnitNumber = config.GXDWDH,
|
|
|
- AlarmReceivingUnitCode = "12345",
|
|
|
- AlarmReceivingUnitName = "12345热线中心",
|
|
|
+ AlarmReceivingUnitCode = "510300010000",
|
|
|
+ AlarmReceivingUnitName = "四川省自贡市公安局指挥中心",
|
|
|
CallPoliceTime = Convert.ToDateTime(orderDto.CreationTime),
|
|
|
PushTime = DateTime.Now,
|
|
|
- AlarmReceptionType = "1",
|
|
|
+ AlarmReceptionType = "0",
|
|
|
AreaCode = orderDto.AreaCode.Substring(0, 6),
|
|
|
CallPoliceAddress = orderDto.FullAddress,
|
|
|
OrderId = orderDto.Id
|
|
@@ -94,8 +98,8 @@ namespace DataSharing.Police110.DCJT110
|
|
|
|
|
|
if (string.IsNullOrEmpty(policeSend.AlarmReceiptNumber))
|
|
|
{
|
|
|
- policeSend.AlarmReceiptNumber = areaCodeDefu + "12345" + orderDto.No;
|
|
|
- policeSend.SerialNumber = areaCodeDefu + "12345" + orderDto.No;
|
|
|
+ policeSend.AlarmReceiptNumber = areaCodeDefu + "1234512345" + orderDto.No;
|
|
|
+ policeSend.SerialNumber = areaCodeDefu + "1234512345" + orderDto.No;
|
|
|
}
|
|
|
|
|
|
//修改外部唯一ID
|
|
@@ -107,7 +111,7 @@ namespace DataSharing.Police110.DCJT110
|
|
|
}
|
|
|
|
|
|
//查询是否有此工单,如果没有新增此工单
|
|
|
- var data = await _policeSendChainAlarmDcjtRepository.GetAsync(p => p.OrderId == orderDto.Id, cancellationToken);
|
|
|
+ var data = await _policeSendChainAlarmDcjtRepository.GetAsync(p => p.OrderId == orderDto.Id && p.AlarmReceptionType == "1", cancellationToken);
|
|
|
if (data == null)
|
|
|
await _policeSendChainAlarmDcjtRepository.AddAsync(policeSend, cancellationToken);
|
|
|
}
|
|
@@ -119,7 +123,7 @@ namespace DataSharing.Police110.DCJT110
|
|
|
/// <returns></returns>
|
|
|
public async Task InitPoliceSendChainDealAsync(OrderFlowDto dto, CancellationToken cancellationToken)
|
|
|
{
|
|
|
- var data = await _policeSendChainDealDcjtRepository.GetAsync(p => p.OrderId == dto.Order.Id && p.DisposalType == (int)EDsDisposalType.OrderFiled, cancellationToken);
|
|
|
+ var data = await _policeSendChainDealDcjtRepository.GetAsync(p => p.OrderId == dto.Order.Id && p.DisposalType == "1", cancellationToken);
|
|
|
var actualOpinion = dto.Order.ActualOpinion.Length > 1500 ? dto.Order.ActualOpinion.Substring(0, 1500) : dto.Order.ActualOpinion;
|
|
|
var feedbackPersonNumber = "10001";
|
|
|
if (!string.IsNullOrEmpty(dto.Order.AcceptorStaffNo))
|
|
@@ -147,7 +151,7 @@ namespace DataSharing.Police110.DCJT110
|
|
|
FeedbackUnitCode = actualHandleOrgCode,
|
|
|
FeedbackUnitName = dto.Order.ActualHandleOrgName,
|
|
|
WarehousingTime = DateTime.Now,
|
|
|
- DisposalType = 1,
|
|
|
+ DisposalType = "1",
|
|
|
OrderId = dto.Order.Id
|
|
|
};
|
|
|
await _policeSendChainDealDcjtRepository.AddAsync(data, cancellationToken);
|
|
@@ -175,7 +179,7 @@ namespace DataSharing.Police110.DCJT110
|
|
|
/// <returns></returns>
|
|
|
public async Task ReturnPoliceAsync(Hotline.Share.Dtos.Order.OrderDto orderDto, CancellationToken cancellationToken)
|
|
|
{
|
|
|
- var checkData = await _policeSendChainDealDcjtRepository.AnyAsync(p => p.AlarmReceiptNumber == orderDto.ExternalId && p.DisposalType == (int)EDsDisposalType.Return, cancellationToken);
|
|
|
+ var checkData = await _policeSendChainDealDcjtRepository.AnyAsync(p => p.AlarmReceiptNumber == orderDto.ExternalId && p.DisposalType == "2", cancellationToken);
|
|
|
if (!checkData)
|
|
|
{
|
|
|
var actualOpinion = orderDto.ActualOpinion.Length > 100 ? orderDto.ActualOpinion.Substring(0, 80) : orderDto.ActualOpinion;
|
|
@@ -188,7 +192,7 @@ namespace DataSharing.Police110.DCJT110
|
|
|
ReturnOpinion = actualOpinion,
|
|
|
ReturnTime = orderDto.ActualHandleTime,
|
|
|
WarehousingTime = DateTime.Now,
|
|
|
- DisposalType = 2
|
|
|
+ DisposalType = "2"
|
|
|
};
|
|
|
await _policeSendChainDealDcjtRepository.AddAsync(dataPolice, cancellationToken);
|
|
|
}
|
|
@@ -208,7 +212,7 @@ namespace DataSharing.Police110.DCJT110
|
|
|
"4" or "5" => "1",
|
|
|
_ => "2",
|
|
|
};
|
|
|
- var checkData = await _policeSendChainDealDcjtRepository.GetAsync(p => p.AlarmReceiptNumber == dto.Order.ExternalId && p.DisposalType == (int)EDsDisposalType.Visit, cancellationToken);
|
|
|
+ var checkData = await _policeSendChainDealDcjtRepository.GetAsync(p => p.AlarmReceiptNumber == dto.Order.ExternalId && p.DisposalType == "3", cancellationToken);
|
|
|
string visitRemark = "默认评价";
|
|
|
if (!string.IsNullOrEmpty(dto.VisitRemark))
|
|
|
{
|
|
@@ -223,7 +227,8 @@ namespace DataSharing.Police110.DCJT110
|
|
|
CheckingContent = visitRemark,
|
|
|
VisitContent = visitRemark,
|
|
|
VisitResult = VisitResult,
|
|
|
- DisposalType = 3
|
|
|
+ DisposalType = "3",
|
|
|
+ CreatorName = dto.VisitName
|
|
|
};
|
|
|
await _policeSendChainDealDcjtRepository.AddAsync(checkData, cancellationToken);
|
|
|
}
|
|
@@ -234,9 +239,116 @@ namespace DataSharing.Police110.DCJT110
|
|
|
checkData.CheckingContent = visitRemark;
|
|
|
checkData.VisitContent = visitRemark;
|
|
|
checkData.VisitResult = VisitResult;
|
|
|
+ checkData.CreatorName = dto.VisitName;
|
|
|
await _policeSendChainDealDcjtRepository.UpdateAsync(checkData, cancellationToken);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 签收状态
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="orderDto"></param>
|
|
|
+ /// <param name="cancellationToken"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public async Task SingForPoliceAsync(Hotline.Share.Dtos.Order.OrderDto orderDto, CancellationToken cancellationToken)
|
|
|
+ {
|
|
|
+ var checkData = await _policeSendChainDealDcjtRepository.AnyAsync(p => p.AlarmReceiptNumber == orderDto.ExternalId && p.DisposalType == "4", cancellationToken);
|
|
|
+ if (!checkData)
|
|
|
+ {
|
|
|
+ var dataPolice = new DsPoliceSendChainDealDcjt()
|
|
|
+ {
|
|
|
+ OrderId = orderDto.Id,
|
|
|
+ AlarmReceiptNumber = orderDto.ExternalId,
|
|
|
+ DisposalType = "4",
|
|
|
+ WarehousingTime = DateTime.Now,
|
|
|
+ };
|
|
|
+ await _policeSendChainDealDcjtRepository.AddAsync(dataPolice, cancellationToken);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 结果签收
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="orderDto"></param>
|
|
|
+ /// <param name="cancellationToken"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public async Task FileEndPoliceAsync(Hotline.Share.Dtos.Order.OrderDto orderDto, CancellationToken cancellationToken)
|
|
|
+ {
|
|
|
+ var checkData = await _policeSendChainDealDcjtRepository.AnyAsync(p => p.AlarmReceiptNumber == orderDto.ExternalId && p.DisposalType == "5", cancellationToken);
|
|
|
+ if (!checkData)
|
|
|
+ {
|
|
|
+ var dataPolice = new DsPoliceSendChainDealDcjt()
|
|
|
+ {
|
|
|
+ OrderId = orderDto.Id,
|
|
|
+ AlarmReceiptNumber = orderDto.ExternalId,
|
|
|
+ DisposalType = "5",
|
|
|
+ WarehousingTime = DateTime.Now,
|
|
|
+ };
|
|
|
+ await _policeSendChainDealDcjtRepository.AddAsync(dataPolice, cancellationToken);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 给110推送行政审批工单(自贡独有)
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="orderDto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public async Task InitPoliceAdministrativeApproval(Hotline.Share.Dtos.Order.OrderDto orderDto, CancellationToken cancellationToken)
|
|
|
+ {
|
|
|
+ var areaCodeDefu = _sharingConfigurationManager.GetCityCode();
|
|
|
+ var config = _sharingConfigurationManager.GetZiGongConfig().PoliceDCJT;
|
|
|
+ var registerNo = "10001";
|
|
|
+ if (!string.IsNullOrEmpty(orderDto.AcceptorStaffNo))
|
|
|
+ registerNo = orderDto.AcceptorStaffNo;
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if (!string.IsNullOrEmpty(orderDto.AcceptorId))
|
|
|
+ registerNo = orderDto.AcceptorId.Substring(orderDto.AcceptorId.Length - 12);
|
|
|
+ }
|
|
|
+ var Content = orderDto.Content.Length > 1900 ? orderDto.Content.Substring(0, 1900) : orderDto.Content;
|
|
|
+ var policeTypeCode = "01";
|
|
|
+ if (!string.IsNullOrEmpty(orderDto.HotspotId))
|
|
|
+ policeTypeCode = orderDto.HotspotId.Length > 8 ? orderDto.HotspotId.Substring(0, 7) : orderDto.HotspotId;
|
|
|
+ DsPoliceSendChainAlarmDcjt policeSend = new()
|
|
|
+ {
|
|
|
+ SerialNumber = orderDto.ExternalId,
|
|
|
+ AlarmReceiptNumber = orderDto.ExternalId,
|
|
|
+ RegisterNo = registerNo,
|
|
|
+ RegisterName = orderDto.AcceptorName,
|
|
|
+ CallPoliceNumber = string.IsNullOrEmpty(orderDto.FromPhone) == true ? orderDto.Contact : orderDto.FromPhone,
|
|
|
+ CallPoliceName = orderDto.FromName,
|
|
|
+ PhoneNumber = orderDto.Contact,
|
|
|
+ CallPoliceContent = Content,
|
|
|
+ PoliceTypeCode = policeTypeCode,
|
|
|
+ PoliceTypeName = orderDto.HotspotSpliceName,
|
|
|
+ JurisdictionalUnitCode = config.GXDWDM,
|
|
|
+ JurisdictionalUnitName = config.GXDWMC,
|
|
|
+ JurisdictionalUnitNumber = config.GXDWDH,
|
|
|
+ AlarmReceivingUnitCode = "510300010000",
|
|
|
+ AlarmReceivingUnitName = "四川省自贡市公安局指挥中心",
|
|
|
+ CallPoliceTime = Convert.ToDateTime(orderDto.CreationTime),
|
|
|
+ PushTime = DateTime.Now,
|
|
|
+ AlarmReceptionType = "3",
|
|
|
+ AreaCode = orderDto.AreaCode.Substring(0, 6),
|
|
|
+ CallPoliceAddress = orderDto.FullAddress,
|
|
|
+ OrderId = orderDto.Id
|
|
|
+ };
|
|
|
+
|
|
|
+ policeSend.FromGender = orderDto.FromGender switch
|
|
|
+ {
|
|
|
+ Hotline.Share.Enums.Order.EGender.Female => "0",
|
|
|
+ Hotline.Share.Enums.Order.EGender.Male => "1",
|
|
|
+ Hotline.Share.Enums.Order.EGender.Unknown => "2",
|
|
|
+ _ => "2",
|
|
|
+ };
|
|
|
+
|
|
|
+ policeSend.AlarmReceiptNumber = areaCodeDefu + "1234512345" + orderDto.No;
|
|
|
+ policeSend.SerialNumber = areaCodeDefu + "1234512345" + orderDto.No;
|
|
|
+
|
|
|
+ //查询是否有此工单,如果没有新增此工单
|
|
|
+ var data = await _policeSendChainAlarmDcjtRepository.GetAsync(p => p.OrderId == orderDto.Id && p.AlarmReceptionType == "3", cancellationToken);
|
|
|
+ if (data == null)
|
|
|
+ await _policeSendChainAlarmDcjtRepository.AddAsync(policeSend, cancellationToken);
|
|
|
+ }
|
|
|
}
|
|
|
}
|