|
@@ -26,6 +26,8 @@ namespace DataTransmission.Joint
|
|
|
var num = 0;
|
|
|
var pgVisitSql = string.Empty;
|
|
|
var pgVisitDetail = string.Empty;
|
|
|
+
|
|
|
+ Entity.OrderVisit visit = new Entity.OrderVisit();
|
|
|
foreach (DataRow item in data.Rows)
|
|
|
{
|
|
|
DataRow ogrRow = org.AsEnumerable().First(x => x.Field<int?>("oldBmid").ToString() == item["FALT_AppBMID"].ToString());
|
|
@@ -42,30 +44,71 @@ namespace DataTransmission.Joint
|
|
|
{
|
|
|
tool.SaveLog(" VisitMessage :" + e.Message + ";" + row["FALT_UserID"].ToString() + " ;", 1);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ var creator = user.AsEnumerable().FirstOrDefault(x => x.Field<int?>("oldUserId").ToString() == item["FALT_InsertUserID"].ToString());
|
|
|
+ var creatorOrg = org.AsEnumerable().FirstOrDefault(x => x.Field<int?>("oldBmid").ToString() == creator["OrgId"].ToString());
|
|
|
+
|
|
|
+ visit.Id = VisitId;
|
|
|
+ visit.No = row["FSH_Code"].ToString().Trim();
|
|
|
+ visit.OrderId = orderId;
|
|
|
+ visit.PublishTime = DateTime.Parse(item["FPLT_PubDate"].ToString());
|
|
|
+ visit.EmployeeId = EmployeeId;
|
|
|
+ visit.VisitTime = DateTime.Parse(item["FALT_CallDate"].ToString());
|
|
|
+ visit.CreationTime = DateTime.Parse(item["FALT_InsertDate"].ToString());
|
|
|
+ visit.CreatorId = row["FALT_InsertUserID"].ToString();
|
|
|
+ if (creator != null)
|
|
|
+ {
|
|
|
+ visit.CreatorId = creator["Id"].ToString();
|
|
|
+ visit.CreatorName = creator["Name"].ToString();
|
|
|
+ }
|
|
|
+ if (creatorOrg != null)
|
|
|
+ {
|
|
|
+ visit.CreatorOrgId = creatorOrg["Id"].ToString();
|
|
|
+ visit.CreatorOrgName = creatorOrg["Name"].ToString();
|
|
|
+ visit.CreatorOrgLevel = int.Parse(creatorOrg["Level"].ToString());
|
|
|
+ visit.AreaId = creatorOrg["AreaId"].ToString();
|
|
|
+ //model.AssignerOrgIsCenter = bool.Parse(creatorOrg["IsCenter"].ToString());
|
|
|
+ }
|
|
|
//主表
|
|
|
pgVisitSql = $@"INSERT INTO ""public"".""order_visit"" (""Id"", ""No"", ""OrderId"", ""VisitState"", ""VisitType"", ""PublishTime"", ""EmployeeId"", ""IsPutThrough"", ""VisitTime"", ""CreationTime"", ""CreatorOrgId"",
|
|
|
- ""CreatorId"", ""AreaId"", ""NowEvaluate"", ""AgainState"", ""CreatorOrgName"", ""CreatorName"", ""CreatorOrgLevel"", ""IsCanHandle"", ""CallId"", ""IsCanAiVisit"", ""FirstVisitTime"", ""LastVisitTime"",
|
|
|
- ""AiVisitCount"") VALUES ('{VisitId}', '{row["FSH_Code"].ToString().Trim()}', '{orderId}', 30, 10, '{item["FPLT_PubDate"]}', '{EmployeeId}', 't', '{item["FALT_CallDate"]}', '{item["FALT_InsertDate"]}', '', '', '', '{{""Key"":""{GetSatisfaction(item["FALT_AppTypeName"].ToString())}"",""Value"":""{item["FALT_AppTypeName"]}""}}',
|
|
|
- 0, '市民热线服务系统', '', 0, 'f', NULL, 'f', NULL, NULL, 0);
|
|
|
- ";
|
|
|
- var seatsDetailId = SequentialGuidGenerator.Instance.Create().ToString("D");
|
|
|
+ ""CreatorId"", ""AreaId"", ""NowEvaluate"", ""AgainState"", ""CreatorOrgName"", ""CreatorName"",
|
|
|
+ ""CreatorOrgLevel"", ""IsCanHandle"", ""CallId"", ""IsCanAiVisit"", ""FirstVisitTime"", ""LastVisitTime"",""AiVisitCount"") VALUES (
|
|
|
+ '{visit.Id}', '{visit.No}', '{visit.OrderId}', 30, 10, '{visit.PublishTime.ToString()}', '{visit.EmployeeId}', 't', '{visit.VisitTime}', '{visit.CreationTime}', '{visit.CreatorOrgId}',
|
|
|
+ '{visit.CreatorId}', '{visit.AreaId}', '{{""Key"":""{GetSatisfaction(item["FALT_AppTypeName"].ToString())}"",""Value"":""{item["FALT_AppTypeName"]}""}}',0, '{visit.CreatorOrgName}', '{visit.CreatorName}',
|
|
|
+ {visit.CreatorOrgLevel}, 'f', NULL, 'f', NULL, NULL, 0);";
|
|
|
+ //var seatsDetailId = SequentialGuidGenerator.Instance.Create().ToString("D");
|
|
|
|
|
|
+ Entity.OrderVisitDetail seatDetail = new Entity.OrderVisitDetail();
|
|
|
+
|
|
|
+ //var creatorDetail = user.AsEnumerable().FirstOrDefault(x => x.Field<int?>("oldUserId").ToString() == item["FALT_InsertUserID"].ToString());
|
|
|
+ //var creatorDetailOrg = org.AsEnumerable().FirstOrDefault(x => x.Field<int?>("oldBmid").ToString() == creator["OrgId"].ToString());
|
|
|
+
|
|
|
+ seatDetail.InitId();
|
|
|
+ seatDetail.VisitId = visit.Id;
|
|
|
+ seatDetail.CreationTime = DateTime.Parse(item["FALT_InsertDate"].ToString());
|
|
|
+
|
|
|
+
|
|
|
//明细表
|
|
|
- pgVisitDetail = $@"INSERT INTO ""public"".""order_visit_detail"" (""Id"", ""VisitId"", ""VoiceEvaluate"", ""SeatEvaluate"", ""OrgProcessingResults"", ""OrgNoSatisfiedReason"", ""OrgHandledAttitude"", ""VisitContent"", ""VisitOrgCode"",
|
|
|
- ""VisitOrgName"", ""CreationTime"", ""CreatorOrgId"", ""CreatorId"", ""AreaId"", ""VisitTarget"", ""CreatorOrgName"", ""CreatorName"", ""CreatorOrgLevel"") VALUES
|
|
|
- ('{seatsDetailId}', '{VisitId}', {GetSatisfaction(item["FALT_SeatsTypeName"].ToString())}, {GetSatisfaction(item["FALT_SeatsTypeName"].ToString())}, NULL, NULL,NULL,
|
|
|
- '{item["FALT_ZxRemark"]}', NULL,NULL, '{item["FALT_InsertDate"]}', '', '', '', 10, '市民热线服务系统', '', 1)";
|
|
|
+ pgVisitDetail = $@"INSERT INTO ""public"".""order_visit_detail"" (""Id"", ""VisitId"", ""VoiceEvaluate"", ""SeatEvaluate"", ""OrgProcessingResults"", ""OrgNoSatisfiedReason"", ""OrgHandledAttitude"", ""VisitContent"",
|
|
|
+ ""VisitOrgCode"",""VisitOrgName"", ""CreationTime"", ""CreatorOrgId"", ""CreatorId"", ""AreaId"", ""VisitTarget"", ""CreatorOrgName"", ""CreatorName"", ""CreatorOrgLevel"") VALUES
|
|
|
+ ('{seatDetail.VisitId}', '{VisitId}', {GetSatisfaction(item["FALT_SeatsTypeName"].ToString())}, {GetSatisfaction(item["FALT_SeatsTypeName"].ToString())}, NULL, NULL,NULL,'{item["FALT_ZxRemark"]}',
|
|
|
+ NULL,NULL, '{seatDetail.CreationTime.ToString()}', '{visit.CreatorOrgId}', '{visit.CreatorId}', '{visit.AreaId}', 10, '{visit.CreatorOrgName}', '{visit.CreatorName}', {visit.CreatorOrgLevel})";
|
|
|
}
|
|
|
//部门
|
|
|
- var bmDetailId = SequentialGuidGenerator.Instance.Create().ToString("D");
|
|
|
+ //var bmDetailId = SequentialGuidGenerator.Instance.Create().ToString("D");
|
|
|
+ Entity.OrderVisitDetail bmDetail = new Entity.OrderVisitDetail();
|
|
|
+ bmDetail.InitId();
|
|
|
+ bmDetail.VisitId = visit.Id;
|
|
|
+ bmDetail.CreationTime = DateTime.Parse(item["FALT_InsertDate"].ToString());
|
|
|
+
|
|
|
var OrgNoSatisfiedReason = "NULL";
|
|
|
- if ((item["FALT_AppTypeName"].ToString() == "非常不满意" || item["FALT_AppTypeName"].ToString() == "非常不满意") && !string.IsNullOrEmpty(item["SDICT_Name"].ToString()))
|
|
|
+ if ((item["FALT_AppTypeName"].ToString() == "非常不满意" || item["FALT_AppTypeName"].ToString() == "不满意") && !string.IsNullOrEmpty(item["SDICT_Name"].ToString()))
|
|
|
{
|
|
|
OrgNoSatisfiedReason = $@" '[{{""Key"":""{GetDissatisfiedReason(item["SDICT_Name"].ToString())}"",""Value"":""{item["SDICT_Name"].ToString()}""}}]'";
|
|
|
}
|
|
|
- pgVisitDetail += $@",('{bmDetailId}', '{VisitId}', NULL, NULL, '{{""Key"":""{GetSatisfaction(item["FALT_AppTypeName"].ToString())}"",""Value"":""{item["FALT_AppTypeName"]}""}}',{OrgNoSatisfiedReason},
|
|
|
- '{{""Key"":""{GetSatisfaction(item["FALT_AppTypeBName"].ToString())}"",""Value"":""{item["FALT_AppTypeBName"]}""}}', '{item["FALT_ZxRemark"]}', '{VisitOrgCode}', '{item["SBM_Name"]}', '{item["FALT_InsertDate"]}', '', '', '', 20, '市民热线服务系统', '', 1)";
|
|
|
+ pgVisitDetail += $@",('{bmDetail.Id}', '{VisitId}', NULL, NULL, '{{""Key"":""{GetSatisfaction(item["FALT_AppTypeName"].ToString())}"",""Value"":""{item["FALT_AppTypeName"]}""}}',{OrgNoSatisfiedReason},
|
|
|
+ '{{""Key"":""{GetSatisfaction(item["FALT_AppTypeBName"].ToString())}"",""Value"":""{item["FALT_AppTypeBName"]}""}}', '{item["FALT_ZxRemark"]}', '{VisitOrgCode}', '{item["SBM_Name"]}',
|
|
|
+ '{bmDetail.CreationTime.ToString()}', '{visit.CreatorOrgId}', '{visit.CreatorId}', '{visit.AreaId}', 20, '{visit.CreatorOrgName}', '{visit.CreatorName}', {visit.CreatorOrgLevel})";
|
|
|
num++;
|
|
|
}
|
|
|
pgVisitDetail += ";";
|
|
@@ -110,7 +153,20 @@ namespace DataTransmission.Joint
|
|
|
}
|
|
|
return satisfaction;
|
|
|
}
|
|
|
- private string GetDissatisfiedReason(string name)
|
|
|
+ private string GetDissatisfiedReason(string name) {
|
|
|
+ switch (Form1.Name)
|
|
|
+ {
|
|
|
+ case "宜宾":
|
|
|
+ return GetDissatisfiedReason_YB(name);
|
|
|
+ case "自贡":
|
|
|
+ return GetDissatisfiedReason_ZG(name);
|
|
|
+ case "泸州":
|
|
|
+ return GetDissatisfiedReason_LZ(name);
|
|
|
+ default:
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ private string GetDissatisfiedReason_YB(string name)
|
|
|
{
|
|
|
var dissatisfiedReason = string.Empty;
|
|
|
switch (name)
|
|
@@ -136,9 +192,93 @@ namespace DataTransmission.Joint
|
|
|
case "未回复":
|
|
|
dissatisfiedReason = "7";
|
|
|
break;
|
|
|
+ case "对部门工作人员态度不满意":
|
|
|
+ dissatisfiedReason = "8";
|
|
|
+ break;
|
|
|
default:
|
|
|
+ dissatisfiedReason = "";
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ return dissatisfiedReason;
|
|
|
+ }
|
|
|
+
|
|
|
+ private string GetDissatisfiedReason_ZG(string name)
|
|
|
+ {
|
|
|
+ var dissatisfiedReason = string.Empty;
|
|
|
+ switch (name)
|
|
|
+ {
|
|
|
+ case "回复敷衍":
|
|
|
+ dissatisfiedReason = "1";
|
|
|
+ break;
|
|
|
+ case "办件推诿":
|
|
|
+ dissatisfiedReason = "2";
|
|
|
+ break;
|
|
|
+ case "未有效处理工单问题":
|
|
|
+ dissatisfiedReason = "3";
|
|
|
+ break;
|
|
|
+ case "处理案件力度不够,重视程度不高":
|
|
|
+ dissatisfiedReason = "4";
|
|
|
+ break;
|
|
|
+ case "部门回复与市民诉求不一致":
|
|
|
+ dissatisfiedReason = "5";
|
|
|
+ break;
|
|
|
+ case "个人诉求未满足":
|
|
|
+ dissatisfiedReason = "6";
|
|
|
+ break;
|
|
|
+ case "未与市民联系":
|
|
|
+ dissatisfiedReason = "7";
|
|
|
+ break;
|
|
|
+ case "对部门工作人员态度不满意":
|
|
|
+ dissatisfiedReason = "8";
|
|
|
+ break;
|
|
|
+ case "办件时间长":
|
|
|
+ dissatisfiedReason = "9";
|
|
|
+ break;
|
|
|
+ case "阶段性回复":
|
|
|
+ dissatisfiedReason = "10";
|
|
|
+ break;
|
|
|
+ case "其他":
|
|
|
+ dissatisfiedReason = "11";
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ dissatisfiedReason = "";
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ return dissatisfiedReason;
|
|
|
+ }
|
|
|
+
|
|
|
+ private string GetDissatisfiedReason_LZ(string name)
|
|
|
+ {
|
|
|
+ var dissatisfiedReason = string.Empty;
|
|
|
+ switch (name)
|
|
|
+ {
|
|
|
+ case "回复敷衍":
|
|
|
+ dissatisfiedReason = "1";
|
|
|
+ break;
|
|
|
+ case "办件推诿":
|
|
|
+ dissatisfiedReason = "2";
|
|
|
+ break;
|
|
|
+ case "未有效处理工单问题":
|
|
|
+ dissatisfiedReason = "3";
|
|
|
+ break;
|
|
|
+ case "处理案件力度不够":
|
|
|
+ dissatisfiedReason = "4";
|
|
|
+ break;
|
|
|
+ case "未与市民联系":
|
|
|
+ dissatisfiedReason = "5";
|
|
|
+ break;
|
|
|
+ case "阶段性回复":
|
|
|
+ dissatisfiedReason = "6";
|
|
|
+ break;
|
|
|
+ case "未回复":
|
|
|
+ dissatisfiedReason = "7";
|
|
|
+ break;
|
|
|
+ case "对部门工作人员态度不满意":
|
|
|
dissatisfiedReason = "8";
|
|
|
break;
|
|
|
+ default:
|
|
|
+ dissatisfiedReason = "";
|
|
|
+ break;
|
|
|
}
|
|
|
return dissatisfiedReason;
|
|
|
}
|