|
@@ -14,7 +14,8 @@ namespace DataTransmission.Joint
|
|
|
public DataTable GetOrder( string st_time, string end_time) {
|
|
|
var conn = tool.GetConSqlServer();
|
|
|
//获取工单数据
|
|
|
- var orderSql = $@"SELECT ROW_NUMBER() OVER (ORDER BY FSH_FlowID) AS Serial, CHPRCI.RCI_FlowID,*,REPLACE(CAST(FCT.FCT_Content AS NVARCHAR(MAX)),CHAR(13)+CHAR(10), '') 受理内容,REPLACE(CAST(ISNULL(FTC2.FTC_RRemark,FTRB.FTRB_RRemark) AS NVARCHAR(MAX)),CHAR(13)+CHAR(10), '') 承办意见 FROM dbo.View_Flow_Process FSH
|
|
|
+ var orderSql = $@"SELECT ROW_NUMBER() OVER (ORDER BY FSH_FlowID) AS Serial, CHPRCI.RCI_FlowID,*,REPLACE(CAST(FCT.FCT_Content AS NVARCHAR(MAX)),CHAR(13)+CHAR(10), '') 受理内容,REPLACE(CAST(ISNULL(FTC2.FTC_RRemark,FTRB.FTRB_RRemark) AS NVARCHAR(MAX)),CHAR(13)+CHAR(10), '') 承办意见
|
|
|
+ FROM dbo.View_Flow_Process FSH
|
|
|
LEFT JOIN dbo.Flow05_LinkMan FLM ON FSH.FSH_FlowID = FLM.FLM_FlowID
|
|
|
LEFT JOIN dbo.Flow01_Type FT ON FT.FTE_TypeFlag =2 AND FSH.FSH_ConTypeID = FT.FTE_TypeID
|
|
|
LEFT JOIN dbo.SYS19_Area SA ON FSH.FSH_AreaID = SA.SA_AreaID
|
|
@@ -48,13 +49,48 @@ namespace DataTransmission.Joint
|
|
|
{
|
|
|
tool.SaveLog(" OrderMessage :" + e.Message + ";" + row["FSH_AcceptBMID"].ToString() + " ;", 1);
|
|
|
}
|
|
|
-
|
|
|
- var pgOrderSql = $@"INSERT INTO ""public"".""order"" (""Id"", ""CallId"", ""FromPhone"", ""TransferPhone"", ""FromName"", ""FromGender"", ""IdentityType"", ""LicenceTypeCode"",
|
|
|
- ""LicenceType"", ""LicenceNo"", ""AgeRangeCode"", ""AgeRange"", ""Contact"", ""ContactMask"", ""AcceptSms"", ""Company"",
|
|
|
- ""No"", ""AcceptType"", ""EmergencyLevel"", ""Title"", ""HotspotId"", ""HotspotName"", ""HotspotSpliceName"", ""HotspotExternal"",
|
|
|
- ""IncidentTime"", ""PushTypeCode"", ""PushType"", ""Content"", ""Status"", ""StartTime"", ""ExpiredTime"", ""FiledTime"",
|
|
|
- ""ExpiredStatus"", ""WorkflowId"", ""ExpiredTimeConfigId"", ""Longitude"", ""Latitude"", ""AreaCode"", ""Street"", ""LastModificationTime"",
|
|
|
- ""IsDeleted"", ""DeletionTime"", ""CreationTime"", ""CreatorOrgId"", ""CreatorId"", ""AreaId"", ""Source"", ""SmsSended"",
|
|
|
+ #region CrEnt
|
|
|
+ var order = new Entity.Order();
|
|
|
+ order.InitId();
|
|
|
+ order.CallId = row["FSH_SessionID"].ToString();
|
|
|
+ order.FromPhone = row["FSH_FromTel"].ToString();
|
|
|
+ order.TransferPhone = row["FSH_HotlineNum"].ToString();
|
|
|
+ order.FromName = row["FSH_LinkName"].ToString();
|
|
|
+ order.FromGender = (Enum.EGender)sex;
|
|
|
+ order.IdentityType = (Enum.EIdentityType)identityType;
|
|
|
+ order.Contact = row["FSH_LinkTel"].ToString();
|
|
|
+ order.ContactMask = ContactMask;
|
|
|
+ order.AcceptSms = false;
|
|
|
+ order.No = row["FSH_Code"].ToString().Trim();
|
|
|
+ order.AcceptType = row["FSH_PurTypeName"].ToString();
|
|
|
+ order.Title = row["FSH_Title_ys"].ToString();
|
|
|
+ order.HotspotId = row["FTE_ProvinceCode"].ToString();
|
|
|
+ order.HotspotName = row["FTE_TypeName"].ToString();
|
|
|
+ order.HotspotSpliceName = row["FTE_TypeNameFull"].ToString();
|
|
|
+ order.PushTypeCode = row["FSH_PushType"].ToString();
|
|
|
+ order.Content = row["受理内容"].ToString();
|
|
|
+ order.Status = Enum.EOrderStatus.Visited;
|
|
|
+ order.StartTime = DateTime.Parse(row["FSH_AddDate"].ToString());
|
|
|
+ order.ExpiredTime = DateTime.Parse(row["FSH_TTime"].ToString());
|
|
|
+ order.FiledTime = DateTime.Parse(row["FSH_DisposeDate"].ToString());
|
|
|
+ order.ExpiredStatus = (Enum.EExpiredStatus)ExpiredStatus;
|
|
|
+ order.AreaCode = row["SA_AreaCode"].ToString();
|
|
|
+ order.Street = row["FLM_LKAddress"].ToString();
|
|
|
+ order.IsDeleted = false;
|
|
|
+ order.CreationTime = DateTime.Parse(row["FSH_AddDate"].ToString());
|
|
|
+ order.SmsSended = false;
|
|
|
+ order.ProcessType = row["FSH_AcceptBMID"].ToString() == CommonTool.CenterId ? Enum.EProcessType.Zhiban : Enum.EProcessType.Jiaoban;
|
|
|
+ order.IsPublicity = row["FSH_IsPublic"].ToString() == "1"; //0:不公开 ;1:公开 12345在线传递过来的状态
|
|
|
+
|
|
|
+ #endregion
|
|
|
+ //""WorkflowId"", ""ExpiredTimeConfigId"", ""Longitude"", ""Latitude"",
|
|
|
+
|
|
|
+ var pgOrderSql = $@"INSERT INTO ""public"".""order"" (""Id"", ""CallId"", ""FromPhone"", ""TransferPhone"", ""FromName"", ""FromGender"", ""IdentityType"",
|
|
|
+ ""Contact"", ""ContactMask"", ""AcceptSms"",
|
|
|
+ ""No"", ""AcceptType"", ""Title"", ""HotspotId"", ""HotspotName"", ""HotspotSpliceName"",
|
|
|
+ ""PushTypeCode"", ""Content"", ""Status"", ""StartTime"", ""ExpiredTime"", ""FiledTime"",
|
|
|
+ ""ExpiredStatus"", ""AreaCode"", ""Street"",
|
|
|
+ ""IsDeleted"", ""CreationTime"", ""SmsSended"",
|
|
|
""ProcessType"", ""IsPublicity"", ""IsSecret"", ""ActualHandleOrgName"", ""ActualHandleOrgCode"", ""ActualOpinion"", ""SourceChannel"", ""IsProvince"",
|
|
|
""ActualHandleStepCode"",""ActualHandleStepName"", ""ActualHandleStepCreateTime"", ""ActualHandleTime"", ""ActualHandlerId"", ""ActualHandlerName"", ""OrgLevelOneCode"", ""OrgLevelOneName"",
|
|
|
""AcceptorId"",""AcceptorName"", ""SourceChannelCode"", ""ExpiredTimeProvince"", ""AcceptorStaffNo"", ""FirstVisitResult"", ""FirstVisitResultCode"", ""ActualHandleOrgAreaCode"",
|
|
@@ -66,13 +102,13 @@ namespace DataTransmission.Joint
|
|
|
""FileJson"",""Province"", ""City"", ""County"", ""Town"", ""EventCategoryId"", ""EventCategoryName"", ""EventCategorySpliceName"",
|
|
|
""EventCategoryExternal"",""NearlyExpiredTime"", ""CsActualHandleOrgIds"", ""CsActualHandleUserIds"", ""HandlerUsers"", ""HandlerOrgs"", ""FileDuration"", ""FileDurationWorkday"",
|
|
|
""AllDurationWorkday"") VALUES (
|
|
|
- '{orderId}', NULL, '{row["FSH_FromTel"].ToString()}', '{row["FSH_HotlineNum"]}', '{row["FSH_LinkName"]}', {sex}, {identityType}, NULL,
|
|
|
- NULL, '', NULL, NULL, '{row["FSH_LinkTel"].ToString()}', '{ContactMask}', 'f', NULL,
|
|
|
- '{row["FSH_Code"].ToString().Trim()}', '{row["FSH_PurTypeName"]}', {EmergencyLevel}, '{row["FSH_Title_ys"]}', '{row["FTE_ProvinceCode"]}', '{row["FTE_TypeName"]}', '{row["FTE_TypeNameFull"]}', NULL,
|
|
|
- NULL, '{row["FSH_PushType"]}', NULL, '{row["受理内容"]}', 500, '{row["FSH_AddDate"]}', '{row["FSH_TTime"]}', '{row["FSH_DisposeDate"]}',
|
|
|
- {ExpiredStatus}, NULL, NULL, NULL, NULL, '{row["SA_AreaCode"]}', '{row["FLM_LKAddress"]}', NULL,
|
|
|
- 'f', NULL, '{row["FSH_AddDate"]}', NULL, NULL, NULL, 0, 'f',
|
|
|
- 20, 'f', '{IsSecret}', '{row["FSH_AcceptName"]}', {ActualHandleOrgCode}, '{row["承办意见"]}', '{row["FSH_FromName"]}', '{IsProvince}',
|
|
|
+ '{order.Id}', '{order.CallId}', '{order.FromPhone}', '{order.TransferPhone}', '{order.FromName}', {(int)order.FromGender}, {(int)order.IdentityType},
|
|
|
+ '{order.Contact}', '{order.ContactMask}', '{order.AcceptSms.ToString()}',
|
|
|
+ '{order.No}', '{order.AcceptType}', '{order.Title}', '{order.HotspotId}', '{order.HotspotName}', '{order.HotspotSpliceName}',
|
|
|
+ '{order.PushTypeCode}', '{order.Contact}', {(int)order.Status}, '{order.StartTime}', '{order.ExpiredTime}', '{order.FiledTime}',
|
|
|
+ {(int)order.ExpiredStatus}, '{order.AreaCode}', '{order.Street}',
|
|
|
+ '{order.IsDeleted.ToString()}', '{order.CreationTime}', '{order.SmsSended.ToString()}',
|
|
|
+ {(int)order.ProcessType}, '{order.IsPublicity.ToString()}', '{IsSecret}', '{row["FSH_AcceptName"]}', {ActualHandleOrgCode}, '{row["承办意见"]}', '{row["FSH_FromName"]}', '{IsProvince}',
|
|
|
NULL, NULL, '{row["FSH_AcceptDate"]}', '{row["FSH_AcceptDate"]}',NULL, '{row["FSH_AcceptUserName"]}', NULL, NULL,
|
|
|
NULL, '{row["FSH_UserName"]}', NULL,NULL, '', NULL, NULL, '{row["SA_AreaCode"]}',
|
|
|
'{row["SA_AreaName"]}', '{row["FLM_LKAddress"]}', NULL, 'f', '5个工作日', 5, 2, NULL,
|