20211104013549_add-appealDB.cs 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. namespace wispro.sp.api.Migrations
  4. {
  5. public partial class addappealDB : Migration
  6. {
  7. protected override void Up(MigrationBuilder migrationBuilder)
  8. {
  9. migrationBuilder.CreateTable(
  10. name: "AppealType",
  11. columns: table => new
  12. {
  13. Id = table.Column<int>(type: "int", nullable: false)
  14. .Annotation("SqlServer:Identity", "1, 1"),
  15. Name = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
  16. CanDoExpress = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
  17. ReviewerExpress = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true)
  18. },
  19. constraints: table =>
  20. {
  21. table.PrimaryKey("PK_AppealType", x => x.Id);
  22. });
  23. migrationBuilder.CreateTable(
  24. name: "BasePointRule",
  25. columns: table => new
  26. {
  27. Id = table.Column<int>(type: "int", nullable: false)
  28. .Annotation("SqlServer:Identity", "1, 1"),
  29. Rule = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
  30. PointExpress = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
  31. Priority = table.Column<int>(type: "int", nullable: false),
  32. Type = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true)
  33. },
  34. constraints: table =>
  35. {
  36. table.PrimaryKey("PK_BasePointRule", x => x.Id);
  37. });
  38. migrationBuilder.CreateTable(
  39. name: "CalMonth",
  40. columns: table => new
  41. {
  42. Id = table.Column<int>(type: "int", nullable: false)
  43. .Annotation("SqlServer:Identity", "1, 1"),
  44. year = table.Column<int>(type: "int", nullable: false),
  45. month = table.Column<int>(type: "int", nullable: false),
  46. status = table.Column<int>(type: "int", nullable: false)
  47. },
  48. constraints: table =>
  49. {
  50. table.PrimaryKey("PK_CalMonth", x => x.Id);
  51. });
  52. migrationBuilder.CreateTable(
  53. name: "StaffGrade",
  54. columns: table => new
  55. {
  56. Id = table.Column<int>(type: "int", nullable: false)
  57. .Annotation("SqlServer:Identity", "1, 1"),
  58. Grade = table.Column<string>(type: "nchar(5)", fixedLength: true, maxLength: 5, nullable: false),
  59. Coefficient = table.Column<double>(type: "float", nullable: false)
  60. },
  61. constraints: table =>
  62. {
  63. table.PrimaryKey("PK_StaffGrade", x => x.Id);
  64. });
  65. migrationBuilder.CreateTable(
  66. name: "InputField",
  67. columns: table => new
  68. {
  69. Id = table.Column<int>(type: "int", nullable: false)
  70. .Annotation("SqlServer:Identity", "1, 1"),
  71. FieldName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
  72. FieldType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
  73. FieldValue = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
  74. MapObjectField = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
  75. AppealTypeId = table.Column<int>(type: "int", nullable: false),
  76. AppealState = table.Column<int>(type: "int", nullable: false)
  77. },
  78. constraints: table =>
  79. {
  80. table.PrimaryKey("PK_InputField", x => x.Id);
  81. table.ForeignKey(
  82. name: "FK_InputField_AppealType_AppealTypeId",
  83. column: x => x.AppealTypeId,
  84. principalTable: "AppealType",
  85. principalColumn: "Id",
  86. onDelete: ReferentialAction.Cascade);
  87. });
  88. migrationBuilder.CreateTable(
  89. name: "Staff",
  90. columns: table => new
  91. {
  92. Id = table.Column<int>(type: "int", nullable: false)
  93. .Annotation("SqlServer:Identity", "1, 1"),
  94. Account = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
  95. Password = table.Column<string>(type: "nvarchar(max)", nullable: false),
  96. Name = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
  97. Sex = table.Column<string>(type: "nvarchar(max)", nullable: true),
  98. Tel = table.Column<string>(type: "nvarchar(max)", nullable: true),
  99. Mobile = table.Column<string>(type: "nvarchar(max)", nullable: true),
  100. IsOnJob = table.Column<bool>(type: "bit", nullable: false),
  101. Status = table.Column<string>(type: "nvarchar(25)", maxLength: 25, nullable: false),
  102. isCalPerformsnce = table.Column<bool>(type: "bit", nullable: false),
  103. StaffGradeId = table.Column<int>(type: "int", nullable: true),
  104. Department = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
  105. WorkPlace = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
  106. EntyDate = table.Column<DateTime>(type: "date", nullable: true),
  107. Mail = table.Column<string>(type: "nvarchar(max)", nullable: true),
  108. Memo = table.Column<string>(type: "nvarchar(max)", nullable: true)
  109. },
  110. constraints: table =>
  111. {
  112. table.PrimaryKey("PK_Staff", x => x.Id);
  113. table.ForeignKey(
  114. name: "FK_Staff_StaffGrade",
  115. column: x => x.StaffGradeId,
  116. principalTable: "StaffGrade",
  117. principalColumn: "Id",
  118. onDelete: ReferentialAction.Restrict);
  119. });
  120. migrationBuilder.CreateTable(
  121. name: "VerifyCoefficient",
  122. columns: table => new
  123. {
  124. CheckerId = table.Column<int>(type: "int", nullable: false),
  125. DoPersonId = table.Column<int>(type: "int", nullable: false),
  126. Coefficient = table.Column<double>(type: "float", nullable: false)
  127. },
  128. constraints: table =>
  129. {
  130. table.PrimaryKey("PK_VerifyCoefficient", x => new { x.CheckerId, x.DoPersonId });
  131. table.ForeignKey(
  132. name: "FK_VerifyCoefficient_StaffGrade",
  133. column: x => x.CheckerId,
  134. principalTable: "StaffGrade",
  135. principalColumn: "Id",
  136. onDelete: ReferentialAction.Restrict);
  137. table.ForeignKey(
  138. name: "FK_VerifyCoefficient_StaffGrade1",
  139. column: x => x.DoPersonId,
  140. principalTable: "StaffGrade",
  141. principalColumn: "Id",
  142. onDelete: ReferentialAction.Restrict);
  143. });
  144. migrationBuilder.CreateTable(
  145. name: "AppealRecord",
  146. columns: table => new
  147. {
  148. Id = table.Column<int>(type: "int", nullable: false)
  149. .Annotation("SqlServer:Identity", "1, 1"),
  150. CreaterId = table.Column<int>(type: "int", nullable: false),
  151. CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
  152. Reason = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
  153. State = table.Column<int>(type: "int", nullable: false),
  154. ReviewerId = table.Column<int>(type: "int", nullable: false),
  155. ReviewerMemo = table.Column<string>(type: "nvarchar(max)", nullable: true),
  156. ReviewTime = table.Column<DateTime>(type: "datetime2", nullable: true),
  157. TypeId = table.Column<int>(type: "int", nullable: false)
  158. },
  159. constraints: table =>
  160. {
  161. table.PrimaryKey("PK_AppealRecord", x => x.Id);
  162. table.ForeignKey(
  163. name: "FK_AppealRecord_AppealType_TypeId",
  164. column: x => x.TypeId,
  165. principalTable: "AppealType",
  166. principalColumn: "Id");
  167. table.ForeignKey(
  168. name: "FK_AppealRecord_Staff_CreaterId",
  169. column: x => x.CreaterId,
  170. principalTable: "Staff",
  171. principalColumn: "Id",
  172. onDelete: ReferentialAction.Cascade);
  173. table.ForeignKey(
  174. name: "FK_AppealRecord_Staff_ReviewerId",
  175. column: x => x.ReviewerId,
  176. principalTable: "Staff",
  177. principalColumn: "Id");
  178. });
  179. migrationBuilder.CreateTable(
  180. name: "Customer",
  181. columns: table => new
  182. {
  183. Id = table.Column<int>(type: "int", nullable: false)
  184. .Annotation("SqlServer:Identity", "1, 1"),
  185. Name = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
  186. ContactMan = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
  187. Address = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
  188. Phone = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
  189. ResponseManId = table.Column<int>(type: "int", nullable: true)
  190. },
  191. constraints: table =>
  192. {
  193. table.PrimaryKey("PK_Customer", x => x.Id);
  194. table.ForeignKey(
  195. name: "FK_Customer_Staff",
  196. column: x => x.ResponseManId,
  197. principalTable: "Staff",
  198. principalColumn: "Id",
  199. onDelete: ReferentialAction.Restrict);
  200. });
  201. migrationBuilder.CreateTable(
  202. name: "Message",
  203. columns: table => new
  204. {
  205. Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
  206. MessageInfo = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
  207. Type = table.Column<int>(type: "int", nullable: false),
  208. FromId = table.Column<int>(type: "int", nullable: false)
  209. },
  210. constraints: table =>
  211. {
  212. table.PrimaryKey("PK_Message", x => x.Id);
  213. table.ForeignKey(
  214. name: "FK_From_Staff",
  215. column: x => x.FromId,
  216. principalTable: "Staff",
  217. principalColumn: "Id",
  218. onDelete: ReferentialAction.Restrict);
  219. });
  220. migrationBuilder.CreateTable(
  221. name: "AttachFile",
  222. columns: table => new
  223. {
  224. Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
  225. Name = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
  226. SavePath = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
  227. UploadUserId = table.Column<int>(type: "int", nullable: false),
  228. AppealRecordId = table.Column<int>(type: "int", nullable: false),
  229. AppealRecordId1 = table.Column<int>(type: "int", nullable: true)
  230. },
  231. constraints: table =>
  232. {
  233. table.PrimaryKey("PK_AttachFile", x => x.Id);
  234. table.ForeignKey(
  235. name: "FK_AttachFile_AppealRecord",
  236. column: x => x.AppealRecordId,
  237. principalTable: "AppealRecord",
  238. principalColumn: "Id",
  239. onDelete: ReferentialAction.Cascade);
  240. table.ForeignKey(
  241. name: "FK_AttachFile_AppealRecord_AppealRecordId1",
  242. column: x => x.AppealRecordId1,
  243. principalTable: "AppealRecord",
  244. principalColumn: "Id",
  245. onDelete: ReferentialAction.Restrict);
  246. table.ForeignKey(
  247. name: "FK_AttachFile_UpdateUser",
  248. column: x => x.UploadUserId,
  249. principalTable: "Staff",
  250. principalColumn: "Id");
  251. });
  252. migrationBuilder.CreateTable(
  253. name: "InputFieldValue",
  254. columns: table => new
  255. {
  256. Id = table.Column<int>(type: "int", nullable: false)
  257. .Annotation("SqlServer:Identity", "1, 1"),
  258. InputFieldId = table.Column<int>(type: "int", nullable: false),
  259. Value = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
  260. AppealRecordId = table.Column<int>(type: "int", nullable: false)
  261. },
  262. constraints: table =>
  263. {
  264. table.PrimaryKey("PK_InputFieldValue", x => x.Id);
  265. table.ForeignKey(
  266. name: "FK_InputFieldValue_AppealRecord_AppealRecordId",
  267. column: x => x.AppealRecordId,
  268. principalTable: "AppealRecord",
  269. principalColumn: "Id",
  270. onDelete: ReferentialAction.Cascade);
  271. table.ForeignKey(
  272. name: "FK_InputFieldValue_InputField_InputFieldId",
  273. column: x => x.InputFieldId,
  274. principalTable: "InputField",
  275. principalColumn: "Id",
  276. onDelete: ReferentialAction.Cascade);
  277. });
  278. migrationBuilder.CreateTable(
  279. name: "PerformanceItem",
  280. columns: table => new
  281. {
  282. Id = table.Column<int>(type: "int", nullable: false)
  283. .Annotation("SqlServer:Identity", "1, 1"),
  284. CaseNo = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
  285. ApplicationType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
  286. BusinessType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
  287. AgentFeedbackMemo = table.Column<string>(type: "nvarchar(max)", nullable: true),
  288. DoItem = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
  289. CaseStage = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
  290. CaseCoefficient = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: true),
  291. DoItemCoefficient = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
  292. PreOAStaffId = table.Column<int>(type: "int", nullable: true),
  293. ReviewerId = table.Column<int>(type: "int", nullable: true),
  294. CustomerId = table.Column<int>(type: "int", nullable: true),
  295. ApplicationName = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
  296. FinishedDate = table.Column<DateTime>(type: "date", nullable: true),
  297. FinalizationDate = table.Column<DateTime>(type: "date", nullable: true),
  298. ReturnDate = table.Column<DateTime>(type: "date", nullable: true),
  299. CaseType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
  300. CaseState = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
  301. DoItemMemo = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
  302. DoItemState = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
  303. CaseName = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
  304. CustomerLimitDate = table.Column<DateTime>(type: "date", nullable: true),
  305. EntrustingDate = table.Column<DateTime>(type: "date", nullable: true),
  306. InternalDate = table.Column<DateTime>(type: "date", nullable: true),
  307. FirstDraftDate = table.Column<DateTime>(type: "date", nullable: true),
  308. OverDueMemo = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
  309. BasePoint = table.Column<decimal>(type: "numeric(18,2)", nullable: true),
  310. Status = table.Column<int>(type: "int", nullable: true),
  311. CaseMemo = table.Column<string>(type: "nvarchar(max)", nullable: true),
  312. WordCount = table.Column<int>(type: "int", nullable: true),
  313. ReturnCasseNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
  314. Type = table.Column<string>(type: "nvarchar(max)", nullable: true),
  315. CalMonthId = table.Column<int>(type: "int", nullable: false)
  316. },
  317. constraints: table =>
  318. {
  319. table.PrimaryKey("PK_PerformanceItem", x => x.Id);
  320. table.ForeignKey(
  321. name: "FK_PerformanceItem_CalMonth",
  322. column: x => x.CalMonthId,
  323. principalTable: "CalMonth",
  324. principalColumn: "Id",
  325. onDelete: ReferentialAction.Cascade);
  326. table.ForeignKey(
  327. name: "FK_PerformanceItem_Customer",
  328. column: x => x.CustomerId,
  329. principalTable: "Customer",
  330. principalColumn: "Id",
  331. onDelete: ReferentialAction.Restrict);
  332. table.ForeignKey(
  333. name: "FK_PerformanceItem_Reviewer",
  334. column: x => x.ReviewerId,
  335. principalTable: "Staff",
  336. principalColumn: "Id",
  337. onDelete: ReferentialAction.Restrict);
  338. table.ForeignKey(
  339. name: "FK_PerformanceItem_Staff",
  340. column: x => x.PreOAStaffId,
  341. principalTable: "Staff",
  342. principalColumn: "Id",
  343. onDelete: ReferentialAction.Restrict);
  344. });
  345. migrationBuilder.CreateTable(
  346. name: "MessageReadRecord",
  347. columns: table => new
  348. {
  349. MessageId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
  350. StaffId = table.Column<int>(type: "int", nullable: false),
  351. isReaded = table.Column<bool>(type: "bit", nullable: false),
  352. MessageId1 = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
  353. },
  354. constraints: table =>
  355. {
  356. table.PrimaryKey("PK_MessageReadRecord", x => new { x.MessageId, x.StaffId });
  357. table.ForeignKey(
  358. name: "FK_MessageReadRecord_Message",
  359. column: x => x.MessageId,
  360. principalTable: "Message",
  361. principalColumn: "Id",
  362. onDelete: ReferentialAction.Restrict);
  363. table.ForeignKey(
  364. name: "FK_MessageReadRecord_Message_MessageId1",
  365. column: x => x.MessageId1,
  366. principalTable: "Message",
  367. principalColumn: "Id",
  368. onDelete: ReferentialAction.Restrict);
  369. table.ForeignKey(
  370. name: "FK_MessageReadRecord_Staff",
  371. column: x => x.StaffId,
  372. principalTable: "Staff",
  373. principalColumn: "Id",
  374. onDelete: ReferentialAction.Restrict);
  375. });
  376. migrationBuilder.CreateTable(
  377. name: "ItemStaff",
  378. columns: table => new
  379. {
  380. ItemId = table.Column<int>(type: "int", nullable: false),
  381. DoPersonId = table.Column<int>(type: "int", nullable: false),
  382. PerformancePoint = table.Column<double>(type: "float", nullable: true)
  383. },
  384. constraints: table =>
  385. {
  386. table.PrimaryKey("PK_ItemStaff", x => new { x.ItemId, x.DoPersonId });
  387. table.ForeignKey(
  388. name: "FK_ItemStaff_PerformanceItem",
  389. column: x => x.ItemId,
  390. principalTable: "PerformanceItem",
  391. principalColumn: "Id",
  392. onDelete: ReferentialAction.Restrict);
  393. table.ForeignKey(
  394. name: "FK_ItemStaff_Staff",
  395. column: x => x.DoPersonId,
  396. principalTable: "Staff",
  397. principalColumn: "Id",
  398. onDelete: ReferentialAction.Restrict);
  399. });
  400. migrationBuilder.CreateTable(
  401. name: "MessagePerformanceItems",
  402. columns: table => new
  403. {
  404. MessageId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
  405. ItemId = table.Column<int>(type: "int", nullable: false)
  406. },
  407. constraints: table =>
  408. {
  409. table.PrimaryKey("PK_MessagePerformanceItems", x => new { x.ItemId, x.MessageId });
  410. table.ForeignKey(
  411. name: "FK_MessagePerformanceItem_Item",
  412. column: x => x.ItemId,
  413. principalTable: "PerformanceItem",
  414. principalColumn: "Id",
  415. onDelete: ReferentialAction.Cascade);
  416. table.ForeignKey(
  417. name: "FK_MessagePerformanceItem_Message",
  418. column: x => x.MessageId,
  419. principalTable: "Message",
  420. principalColumn: "Id",
  421. onDelete: ReferentialAction.Cascade);
  422. });
  423. migrationBuilder.InsertData(
  424. table: "BasePointRule",
  425. columns: new[] { "Id", "PointExpress", "Priority", "Rule", "Type" },
  426. values: new object[,]
  427. {
  428. { 1, "0.2", 1, "p.ApplicationType==\"外观设计\"", "新申请" },
  429. { 97, "0.3", 97, "p.DoItem==\"翻译校核\" && p.DoItemCoefficient==\"形式\" && p.AgentFeedbackMemo==\"内-外\"", "其它" },
  430. { 96, "0.5", 96, "p.DoItem==\"翻译校核\" && p.DoItemCoefficient==\"实质\" && p.AgentFeedbackMemo==\"外-内\"", "其它" },
  431. { 95, "0.7", 95, "p.DoItem==\"翻译校核\" && p.DoItemCoefficient==\"实质\" && p.AgentFeedbackMemo==\"内-外\"", "其它" },
  432. { 94, "0.2", 94, "p.DoItem==\"发明一次OA授权\" && p.ApplicationType==\"发明\"", "一次OA授权" },
  433. { 93, "0.0", 93, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PCTCN\") && (p.CaseStage==\"三通\" || p.CaseStage==\"四通\" || p.CaseStage==\"五通\")", "OA" },
  434. { 92, "0.0", 92, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\") && (p.CaseStage==\"三通\" || p.CaseStage==\"四通\" || p.CaseStage==\"五通\")", "OA" },
  435. { 91, "0.2", 91, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PCTCN\") && p.CaseStage==\"二通\"", "OA" },
  436. { 90, "0.2", 90, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\") && p.CaseStage==\"二通\"", "OA" },
  437. { 89, "0.2", 89, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PCTCN\") && p.CaseStage==\"一通\"", "OA" },
  438. { 88, "0.5", 88, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PCTCN\") && p.CaseStage==\"一通\"", "OA" },
  439. { 87, "0.3", 87, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.DoItemCoefficient==\"非实质\" && p.CaseNo.StartsWith(\"PCTCN\") && p.CaseStage==\"一通\"", "OA" },
  440. { 86, "0.2", 86, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PACN\") && p.CaseStage==\"一通\"", "OA" },
  441. { 85, "0.5", 85, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PACN\") && p.CaseStage==\"一通\"", "OA" },
  442. { 84, "0.3", 84, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.DoItemCoefficient==\"非实质\" && p.CaseNo.StartsWith(\"PACN\") && p.CaseStage==\"一通\"", "OA" },
  443. { 83, "0.2", 83, "p.DoItem==\"意见陈述\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\") && p.CaseStage==\"复审\"", "OA" },
  444. { 82, "0.5", 82, "p.DoItem==\"请求复审\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\")", "OA" },
  445. { 81, "0.2", 81, "p.DoItem==\"申復\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PATW\")", "OA" },
  446. { 80, "0.5", 80, "p.DoItem==\"申復\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PATW\")", "OA" },
  447. { 79, "0.2", 79, "p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PAIN\")", "OA" },
  448. { 78, "0.2", 78, "p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PAGB\")", "OA" },
  449. { 77, "0.2", 77, "p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PAEPO\")", "OA" },
  450. { 76, "0.3", 76, "p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PADE\")", "OA" },
  451. { 75, "0.2", 75, "p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PAAU\")", "OA" },
  452. { 74, "1.5", 74, "p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PAIN\")", "OA" },
  453. { 72, "1.5", 72, "p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PAEPO\")", "OA" },
  454. { 71, "1.6", 71, "p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PADE\")", "OA" },
  455. { 70, "1.5", 70, "p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PAAU\")", "OA" },
  456. { 69, "0.2", 69, "p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PAUS\")", "OA" },
  457. { 68, "1.5", 68, "p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PAUS\")", "OA" },
  458. { 98, "0.2", 98, "p.DoItem==\"翻译校核\" && p.DoItemCoefficient==\"形式\" && p.AgentFeedbackMemo==\"外-内\"", "其它" },
  459. { 67, "1.5", 67, "p.DoItem==\"口审评估\" && p.DoItemCoefficient==\"实质\"", "OA" },
  460. { 99, "0.1", 99, "p.AgentFeedbackMemo==\"检索结案\"", "其它" },
  461. { 101, "0.2", 101, "p.DoItem.Contains(\"补正\") && p.CaseNo.StartsWith(\"PAAU\")", "其它" },
  462. { 130, "0.0", 130, "p.AgentFeedbackMemo==\"已核算绩效\"", "其它" },
  463. { 129, "p.WordCount/1000*0.18", 129, "p.DoItem==\"翻译\") && p.AgentFeedbackMemo==\"中-德\"", "其它" },
  464. { 128, "p.WordCount/1000*0.16", 128, "p.DoItem==\"翻译\") && p.AgentFeedbackMemo==\"中-英\"", "其它" },
  465. { 127, "p.WordCount/1000*0.1", 127, "p.DoItem==\"翻译\") && p.AgentFeedbackMemo==\"英-中\"", "其它" },
  466. { 126, "0.0", 126, "p.DoItem==\"请求优先审查\"", "其它" },
  467. { 125, "0.0", 125, "p.DoItem==\"提交ids\"", "其它" },
  468. { 124, "0.2", 124, "p.ApplicationType==\"外观设计\"", "其它" },
  469. { 123, "0.0", 123, "p.DoItem==\"专利挖掘与布局\"", "其它" }
  470. });
  471. migrationBuilder.InsertData(
  472. table: "BasePointRule",
  473. columns: new[] { "Id", "PointExpress", "Priority", "Rule", "Type" },
  474. values: new object[,]
  475. {
  476. { 122, "0.0", 122, "p.DoItem==\"知识点总结\"", "其它" },
  477. { 121, "0.0", 121, "p.DoItem==\"询问放弃或复审\"", "其它" },
  478. { 120, "0.1", 120, "p.DoItem==\"提交ids\"", "其它" },
  479. { 119, "0.0", 119, "p.DoItem==\"技术确认\"", "其它" },
  480. { 118, "0.0", 118, "p.DoItem==\"绘图\"", "其它" },
  481. { 117, "0.2", 117, "p.DoItem==\"分案评估+分案\"", "其它" },
  482. { 116, "0.1", 116, "p.DoItem==\"分案评估\"", "其它" },
  483. { 115, "0.2", 115, "p.DoItem==\"电询\" && p.CaseNo.StartsWith(\"PAUS\")", "其它" },
  484. { 114, "0.2", 114, "p.DoItem==\"电询\" && p.CaseNo.StartsWith(\"PAEPO\") ", "其它" },
  485. { 113, "0.0", 113, "p.DoItem==\"电询\" && p.CaseNo.StartsWith(\"PACN\")", "其它" },
  486. { 112, "0.1", 112, "p.DoItem==\"PPH\"", "其它" },
  487. { 111, "0.2", 111, "p.DoItem==\"OA答辩校核\"", "其它" },
  488. { 110, "0.2", 110, "p.DoItem==\"Election Action\"", "其它" },
  489. { 109, "0.2", 109, "p.DoItem.Contains(\"补正\") && p.CaseNo.StartsWith(\"PAUS\")", "其它" },
  490. { 108, "0.2", 108, "p.DoItem.Contains(\"补正\") && p.CaseNo.StartsWith(\"PAIN\")", "其它" },
  491. { 107, "0.2", 107, "p.DoItem.Contains(\"补正\") && p.CaseNo.StartsWith(\"PAGB\")", "其它" },
  492. { 106, "0.2", 106, "p.DoItem.Contains(\"补正\") && p.CaseNo.StartsWith(\"PAEPO\")", "其它" },
  493. { 105, "0.2", 105, "p.DoItem.Contains(\"补正\") && p.CaseNo.StartsWith(\"PADE\")", "其它" },
  494. { 104, "0.0", 104, "p.DoItem.Contains(\"补正\") && p.CaseNo.StartsWith(\"WOCN\")", "其它" },
  495. { 103, "0.0", 103, "p.DoItem.Contains(\"补正\") && p.CaseNo.StartsWith(\"PCTCN\")", "其它" },
  496. { 102, "0.0", 102, "p.DoItem.Contains(\"补正\") && p.CaseNo.StartsWith(\"PACN\")", "其它" },
  497. { 100, "0.0", 100, "p.DoItem==\"内部检索\"", "其它" },
  498. { 66, "0.2", 66, "p.DoItem==\"口审评估\" && p.DoItemCoefficient==\"非实质\"", "OA" },
  499. { 73, "1.5", 73, "p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PAGB\")", "OA" },
  500. { 64, "1.5", 64, "p.DoItem==\"欧洲案答辩\" && p.DoItemCoefficient==\"实质\"", "OA" },
  501. { 30, "0.7", 29, "p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" && p.CaseNo.StartsWith(\"PACN\")", "新申请" },
  502. { 29, "1.0", 30, "p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" && p.CaseNo.StartsWith(\"PACN\") && p.Customer.Name.Contains(\"OPPO\")", "新申请" },
  503. { 28, "1.0", 28, "p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\")", "新申请" },
  504. { 27, "0.1", 27, "p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" && p.CaseNo.StartsWith(\"PACN\") && p.CaseNo.EndsWith(\"-TS\")", "新申请" },
  505. { 65, "0.2", 65, "p.DoItem==\"欧洲案答辩\" && p.DoItemCoefficient==\"形式\"", "OA" },
  506. { 25, "0.5", 25, "p.CaseNo.StartsWith(\"PAUS\") && (p.CaseNo.EndsWith(\"-同套\") || p.CaseNo.EndsWith(\"CA\") || p.CaseNo.EndsWith(\"CIP\") || p.CaseNo.EndsWith(\"分案\")) ", "新申请" },
  507. { 24, "0.3", 24, "p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\") && p.CaseNo.EndsWith(\"-分案\")", "新申请" },
  508. { 23, "1.8", 23, "p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PAEPO\")", "新申请" },
  509. { 22, "0.2", 22, "p.DoItem==\"新申请\" && p.CaseNo.StartsWith(\"PATW\") && p.AgentFeedbackMemo==\"大陆案转台湾案\"", "新申请" },
  510. { 21, "1.0", 21, "p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"同套大陆+台湾\"", "新申请" },
  511. { 20, "0.2", 20, "p.DoItem==\"新申请\" && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"台湾案转大陆案\"", "新申请" },
  512. { 19, "0.1", 19, "p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" && p.CaseNo.StartsWith(\"PATW\") && p.AgentFeedbackMemo==\"同套大陆+台湾\"", "新申请" },
  513. { 18, "0.7", 18, "p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"同套大陆+台湾\"", "新申请" },
  514. { 17, "0.1", 17, "p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PATW\") && p.AgentFeedbackMemo==\"同套大陆+台湾\"", "新申请" },
  515. { 16, "0.1", 16, "p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"转格式\"", "新申请" },
  516. { 15, "1.5", 15, "p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"外-内首次申请\"", "新申请" },
  517. { 14, "1.0", 14, "p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"首次中文案\"", "新申请" }
  518. });
  519. migrationBuilder.InsertData(
  520. table: "BasePointRule",
  521. columns: new[] { "Id", "PointExpress", "Priority", "Rule", "Type" },
  522. values: new object[,]
  523. {
  524. { 13, "0.7", 13, "p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"涉外实质改权\"", "新申请" },
  525. { 12, "0.5", 12, "p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"改权+改说明书\"", "新申请" },
  526. { 11, "0.3", 11, "p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"改权\"", "新申请" },
  527. { 10, "1.8", 10, "p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"PCT首次英文案\"", "新申请" },
  528. { 9, "0.2", 9, "p.AgentFeedbackMemo==\"我方转格式、复核\"", "新申请" },
  529. { 8, "0.0", 8, "p.AgentFeedbackMemo==\"我方代交\"", "新申请" },
  530. { 7, "1.26", 7, "p.CaseNo.StartsWith(\"PAUS\") && p.AgentFeedbackMemo==\"发文后客户原因取消申请,系统结案\"", "新申请" },
  531. { 6, "1.33", 6, "p.CaseNo.StartsWith(\"PADE\") && p.AgentFeedbackMemo==\"发文后客户原因取消申请,系统结案\"", "新申请" },
  532. { 5, "0.7", 5, "p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"发文后客户取消申请\"", "新申请" },
  533. { 4, "0.49", 4, "p.ApplicationType==\"实用新型\" && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"发文后客户取消申请\"", "新申请" },
  534. { 3, "0.0", 3, "p.AgentFeedbackMemo==\"撰写中客户取消申请\"", "新申请" },
  535. { 2, "0.2", 2, "p.AgentFeedbackMemo==\"检索结案\"", "新申请" },
  536. { 31, "1.9", 31, "p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PADE\")", "新申请" },
  537. { 32, "1.9", 32, "p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" && p.CaseNo.StartsWith(\"PADE\")", "新申请" },
  538. { 26, "1.0", 26, "p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\") && p.CaseNo.EndsWith(\"-TS\")", "新申请" },
  539. { 34, "1.8", 34, "p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PAGB\")", "新申请" },
  540. { 63, "0.2", 63, "p.DoItem==\"RCE\" && p.DoItemCoefficient==\"形式\"", "OA" },
  541. { 62, "1.5", 62, "p.DoItem==\"RCE\" && p.DoItemCoefficient==\"实质\"", "OA" },
  542. { 61, "0.2", 61, "p.DoItem==\"Non Final Action\" && p.DoItemCoefficient==\"形式\"", "OA" },
  543. { 60, "1.5", 60, "p.DoItem==\"Non Final Action\" && p.DoItemCoefficient==\"实质\"", "OA" },
  544. { 59, "0.1", 59, "p.DoItem==\"form 3-8(2)\" || p.DoItem==\"Form 3-8(2)\"", "OA" },
  545. { 58, "0.1", 58, "p.DoItem==\"form 3\"", "OA" },
  546. { 33, "0.2", 33, "p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PAEPO\")", "新申请" },
  547. { 56, "1.5", 56, "p.DoItem==\"Final Action\" && p.DoItemCoefficient==\"实质\"", "OA" },
  548. { 55, "0.2", 55, "p.DoItem==\"Advisory Action\" && p.DoItemCoefficient==\"形式\"", "OA" },
  549. { 54, "1.5", 54, "p.DoItem==\"Advisory Action\" && p.DoItemCoefficient==\"实质\"", "OA" },
  550. { 53, "0.8", 53, "p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.AgentFeedbackMemo==\"客户未提供答辩点,撰写英文报导函\"", "OA" },
  551. { 52, "0.5", 52, "p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.AgentFeedbackMemo==\"客户提供答辩点,撰写英文报导函\"", "OA" },
  552. { 51, "0.2", 51, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.DoItemCoefficient==\"形式\" && p.AgentFeedbackMemo==\"外所/他人首次转入OA\"", "OA" },
  553. { 50, "0.5", 50, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.DoItemCoefficient==\"实质\" && p.AgentFeedbackMemo==\"外所/他人首次转入OA\"", "OA" },
  554. { 57, "0.2", 57, "p.DoItem==\"Final Action\" && p.DoItemCoefficient==\"形式\"", "OA" },
  555. { 48, "0.35", 48, "p.DoItem==\"请求复审\" && p.ApplicationType==\"实用新型\" && p.AgentFeedbackMemo==\"请款\"", "OA" },
  556. { 49, "0.3", 49, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.DoItemCoefficient==\"非实质\" && p.AgentFeedbackMemo==\"外所/他人首次转入OA\"", "OA" },
  557. { 35, "1.7", 36, "p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PAUS\") && p.Customer.Name.Contains(\"OPPO\")", "新申请" },
  558. { 36, "1.8", 35, "p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PAUS\")", "新申请" },
  559. { 37, "1.5", 37, "p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PCTCN\")", "新申请" },
  560. { 38, "0.0", 38, "(p.ApplicationType==\"实用新型\" || p.ApplicationType==\"发明\") && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"客户不进行答辩\"", "新申请" },
  561. { 40, "p.WordCount/1000*0.16", 40, "p.DoItem==\"新申请\") && p.AgentFeedbackMemo==\"中-英\" && p.WordCount !=null", "新申请" },
  562. { 39, "p.WordCount/1000*0.1", 39, "p.DoItem==\"新申请\") && p.AgentFeedbackMemo==\"英-中\" && p.WordCount !=null", "新申请" },
  563. { 42, "0.1", 42, "p.AgentFeedbackMemo==\"涉外OA不答辩,发报导函结案\"", "OA" },
  564. { 43, "0.2", 43, "p.ApplicationType==\"外观设计\"", "OA" },
  565. { 44, "0.0", 44, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"实用新型\" && p.AgentFeedbackMemo==\"不请款\"", "OA" }
  566. });
  567. migrationBuilder.InsertData(
  568. table: "BasePointRule",
  569. columns: new[] { "Id", "PointExpress", "Priority", "Rule", "Type" },
  570. values: new object[,]
  571. {
  572. { 45, "0.0", 45, "p.ApplicationType==\"实用新型\" && p.DoItemCoefficient==\"实质\" && (p.CaseStage==\"三通\" || p.CaseStage==\"四通\" || p.CaseStage==\"五通\" || p.CaseStage==\"六通\" || p.CaseStage==\"七通\" || p.CaseStage==\"八通\") ", "OA" },
  573. { 46, "0.14", 46, "p.ApplicationType==\"实用新型\" && p.DoItemCoefficient==\"实质\" && p.CaseStage==\"二通\" && p.AgentFeedbackMemo==\"请款\"", "OA" },
  574. { 47, "0.35", 47, "p.ApplicationType==\"实用新型\" && p.DoItemCoefficient==\"实质\" && p.CaseStage==\"一通\" && p.AgentFeedbackMemo==\"请款\"", "OA" },
  575. { 41, "p.WordCount/1000*0.18", 41, "p.DoItem==\"新申请\") && p.AgentFeedbackMemo==\"中-德\" && p.WordCount !=null", "新申请" }
  576. });
  577. migrationBuilder.InsertData(
  578. table: "StaffGrade",
  579. columns: new[] { "Id", "Coefficient", "Grade" },
  580. values: new object[,]
  581. {
  582. { 14, 1.1000000000000001, "A级" },
  583. { 9, 0.69999999999999996, "C2级" },
  584. { 13, 0.5, "D1级" },
  585. { 12, 0.59999999999999998, "D2级" },
  586. { 11, 0.59999999999999998, "D3级" },
  587. { 10, 0.69999999999999996, "C1级" },
  588. { 8, 0.90000000000000002, "C3级" },
  589. { 1, 1.2, "S级" },
  590. { 6, 1.0, "B2级" },
  591. { 5, 1.0, "B3级" },
  592. { 4, 1.1000000000000001, "A1级" },
  593. { 3, 1.1000000000000001, "A2级" },
  594. { 2, 1.1000000000000001, "A3级" },
  595. { 15, 1.0, "C级" },
  596. { 7, 0.90000000000000002, "B1级" },
  597. { 16, 0.90000000000000002, "D级" }
  598. });
  599. migrationBuilder.InsertData(
  600. table: "VerifyCoefficient",
  601. columns: new[] { "CheckerId", "DoPersonId", "Coefficient" },
  602. values: new object[,]
  603. {
  604. { 1, 5, 0.29999999999999999 },
  605. { 6, 9, 0.29999999999999999 },
  606. { 1, 10, 0.40000000000000002 },
  607. { 2, 10, 0.29999999999999999 },
  608. { 3, 10, 0.29999999999999999 },
  609. { 4, 10, 0.29999999999999999 },
  610. { 5, 10, 0.29999999999999999 },
  611. { 6, 10, 0.29999999999999999 },
  612. { 1, 11, 0.5 },
  613. { 2, 11, 0.40000000000000002 },
  614. { 3, 11, 0.40000000000000002 },
  615. { 4, 11, 0.40000000000000002 },
  616. { 5, 11, 0.40000000000000002 },
  617. { 6, 11, 0.40000000000000002 },
  618. { 1, 12, 0.5 },
  619. { 2, 12, 0.40000000000000002 },
  620. { 3, 12, 0.40000000000000002 },
  621. { 4, 12, 0.40000000000000002 },
  622. { 5, 12, 0.40000000000000002 },
  623. { 6, 12, 0.40000000000000002 },
  624. { 1, 13, 0.59999999999999998 },
  625. { 2, 13, 0.5 },
  626. { 3, 13, 0.5 },
  627. { 4, 13, 0.5 },
  628. { 5, 9, 0.29999999999999999 },
  629. { 4, 9, 0.29999999999999999 },
  630. { 3, 9, 0.29999999999999999 },
  631. { 2, 9, 0.29999999999999999 },
  632. { 2, 5, 0.20000000000000001 },
  633. { 3, 5, 0.20000000000000001 },
  634. { 4, 5, 0.20000000000000001 },
  635. { 5, 5, 0.20000000000000001 },
  636. { 1, 6, 0.29999999999999999 },
  637. { 2, 6, 0.20000000000000001 },
  638. { 3, 6, 0.20000000000000001 },
  639. { 4, 6, 0.20000000000000001 },
  640. { 5, 6, 0.20000000000000001 },
  641. { 6, 5, 0.20000000000000001 },
  642. { 6, 6, 0.20000000000000001 },
  643. { 5, 13, 0.5 },
  644. { 1, 7, 0.29999999999999999 },
  645. { 3, 7, 0.20000000000000001 }
  646. });
  647. migrationBuilder.InsertData(
  648. table: "VerifyCoefficient",
  649. columns: new[] { "CheckerId", "DoPersonId", "Coefficient" },
  650. values: new object[,]
  651. {
  652. { 4, 7, 0.20000000000000001 },
  653. { 5, 7, 0.20000000000000001 },
  654. { 6, 7, 0.20000000000000001 },
  655. { 1, 8, 0.29999999999999999 },
  656. { 2, 8, 0.20000000000000001 },
  657. { 3, 8, 0.20000000000000001 },
  658. { 4, 8, 0.20000000000000001 },
  659. { 5, 8, 0.20000000000000001 },
  660. { 6, 8, 0.20000000000000001 },
  661. { 1, 9, 0.40000000000000002 },
  662. { 2, 7, 0.20000000000000001 },
  663. { 6, 13, 0.5 }
  664. });
  665. migrationBuilder.CreateIndex(
  666. name: "IX_AppealRecord_CreaterId",
  667. table: "AppealRecord",
  668. column: "CreaterId");
  669. migrationBuilder.CreateIndex(
  670. name: "IX_AppealRecord_ReviewerId",
  671. table: "AppealRecord",
  672. column: "ReviewerId");
  673. migrationBuilder.CreateIndex(
  674. name: "IX_AppealRecord_TypeId",
  675. table: "AppealRecord",
  676. column: "TypeId");
  677. migrationBuilder.CreateIndex(
  678. name: "IX_AttachFile_AppealRecordId",
  679. table: "AttachFile",
  680. column: "AppealRecordId");
  681. migrationBuilder.CreateIndex(
  682. name: "IX_AttachFile_AppealRecordId1",
  683. table: "AttachFile",
  684. column: "AppealRecordId1");
  685. migrationBuilder.CreateIndex(
  686. name: "IX_AttachFile_UploadUserId",
  687. table: "AttachFile",
  688. column: "UploadUserId");
  689. migrationBuilder.CreateIndex(
  690. name: "IX_Customer_ResponseManId",
  691. table: "Customer",
  692. column: "ResponseManId");
  693. migrationBuilder.CreateIndex(
  694. name: "IX_InputField_AppealTypeId",
  695. table: "InputField",
  696. column: "AppealTypeId");
  697. migrationBuilder.CreateIndex(
  698. name: "IX_InputFieldValue_AppealRecordId",
  699. table: "InputFieldValue",
  700. column: "AppealRecordId");
  701. migrationBuilder.CreateIndex(
  702. name: "IX_InputFieldValue_InputFieldId",
  703. table: "InputFieldValue",
  704. column: "InputFieldId");
  705. migrationBuilder.CreateIndex(
  706. name: "IX_ItemStaff_DoPersonId",
  707. table: "ItemStaff",
  708. column: "DoPersonId");
  709. migrationBuilder.CreateIndex(
  710. name: "IX_Message_FromId",
  711. table: "Message",
  712. column: "FromId");
  713. migrationBuilder.CreateIndex(
  714. name: "IX_MessagePerformanceItems_MessageId",
  715. table: "MessagePerformanceItems",
  716. column: "MessageId");
  717. migrationBuilder.CreateIndex(
  718. name: "IX_MessageReadRecord_MessageId1",
  719. table: "MessageReadRecord",
  720. column: "MessageId1");
  721. migrationBuilder.CreateIndex(
  722. name: "IX_MessageReadRecord_StaffId",
  723. table: "MessageReadRecord",
  724. column: "StaffId");
  725. migrationBuilder.CreateIndex(
  726. name: "IX_PerformanceItem_CalMonthId",
  727. table: "PerformanceItem",
  728. column: "CalMonthId");
  729. migrationBuilder.CreateIndex(
  730. name: "IX_PerformanceItem_CustomerId",
  731. table: "PerformanceItem",
  732. column: "CustomerId");
  733. migrationBuilder.CreateIndex(
  734. name: "IX_PerformanceItem_PreOAStaffId",
  735. table: "PerformanceItem",
  736. column: "PreOAStaffId");
  737. migrationBuilder.CreateIndex(
  738. name: "IX_PerformanceItem_ReviewerId",
  739. table: "PerformanceItem",
  740. column: "ReviewerId");
  741. migrationBuilder.CreateIndex(
  742. name: "IX_Staff_StaffGradeId",
  743. table: "Staff",
  744. column: "StaffGradeId");
  745. migrationBuilder.CreateIndex(
  746. name: "IX_VerifyCoefficient_DoPersonId",
  747. table: "VerifyCoefficient",
  748. column: "DoPersonId");
  749. }
  750. protected override void Down(MigrationBuilder migrationBuilder)
  751. {
  752. migrationBuilder.DropTable(
  753. name: "AttachFile");
  754. migrationBuilder.DropTable(
  755. name: "BasePointRule");
  756. migrationBuilder.DropTable(
  757. name: "InputFieldValue");
  758. migrationBuilder.DropTable(
  759. name: "ItemStaff");
  760. migrationBuilder.DropTable(
  761. name: "MessagePerformanceItems");
  762. migrationBuilder.DropTable(
  763. name: "MessageReadRecord");
  764. migrationBuilder.DropTable(
  765. name: "VerifyCoefficient");
  766. migrationBuilder.DropTable(
  767. name: "AppealRecord");
  768. migrationBuilder.DropTable(
  769. name: "InputField");
  770. migrationBuilder.DropTable(
  771. name: "PerformanceItem");
  772. migrationBuilder.DropTable(
  773. name: "Message");
  774. migrationBuilder.DropTable(
  775. name: "AppealType");
  776. migrationBuilder.DropTable(
  777. name: "CalMonth");
  778. migrationBuilder.DropTable(
  779. name: "Customer");
  780. migrationBuilder.DropTable(
  781. name: "Staff");
  782. migrationBuilder.DropTable(
  783. name: "StaffGrade");
  784. }
  785. }
  786. }