GetMattressImportDW2Excutor.cs 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Data.SqlClient;
  4. using System.Linq;
  5. using System.Text;
  6. using DirectService.Tools;
  7. using JLHHJSvr.BLL;
  8. using JLHHJSvr.Com;
  9. using JLHHJSvr.Com.Model;
  10. using JLHHJSvr.Helper;
  11. using JLHHJSvr.LJException;
  12. using JLHHJSvr.Tools;
  13. using LJLib.DAL.SQL;
  14. using LJLib.Net.SPI.Server;
  15. namespace JLHHJSvr.Excutor
  16. {
  17. internal sealed class GetMattressImportDW2Excutor : ExcutorBase<GetMattressImportDW2Request, GetMattressImportDW2Response>
  18. {
  19. protected override void ExcuteInternal(GetMattressImportDW2Request request, object state, GetMattressImportDW2Response rslt)
  20. {
  21. var tokendata = BllHelper.GetToken(request.token);
  22. if (tokendata == null)
  23. {
  24. rslt.ErrMsg = "会话已经中断,请重新登录";
  25. return;
  26. }
  27. using (var con = new SqlConnection(GlobalVar.ConnectionString))
  28. using (var cmd = con.CreateCommand())
  29. {
  30. con.Open();
  31. // 初始化属性
  32. //foreach (var mx in request.mattressMx)
  33. //{
  34. // AutoInit.AutoInitS(cmd, mx);
  35. //}
  36. using (cmd.Transaction = con.BeginTransaction())
  37. {
  38. if (request.mattresstypeid == 0)
  39. {
  40. if (request.mattressid == 0)
  41. {
  42. rslt.ErrMsg = "床垫类别不能为0";
  43. return;
  44. }
  45. else
  46. {
  47. // 床垫报价修改时,获取相关数据
  48. var matterss = new u_mattress() { mattressid = request.mattressid };
  49. DbSqlHelper.SelectOne(cmd, matterss, "mattresstypeid");
  50. var mattersstype = new u_mattress_type() { mattresstypeid = matterss.mattresstypeid };
  51. DbSqlHelper.SelectOne(cmd, mattersstype, "biandaiqty, if_top_side, if_button_sdie, if_big_side, if_small_side, if_v_side, if_in_cloth_cover, if_out_cloth_cover, if_small_side2, if_small_side3, if_v_side2, if_v_side3, dianceng_sort, dianceng_area");
  52. rslt.diancengarea = new List<replacement>();
  53. if (!string.IsNullOrEmpty(mattersstype.dianceng_area))
  54. {
  55. rslt.diancengarea = wf_add_dianceng_area_bytype(cmd, mattersstype.dianceng_area);
  56. }
  57. var extraEnum = new List<u_mattress_extra>();
  58. var extraTypeEnum = new List<u_mattress_extra_type>();
  59. getExtraType(cmd, ref extraTypeEnum, ref extraEnum);
  60. rslt.extraEnum = extraEnum;
  61. rslt.extraTypeEnum = extraTypeEnum;
  62. }
  63. }
  64. else
  65. {
  66. var mattersstype = new u_mattress_type() { mattresstypeid = request.mattresstypeid };
  67. DbSqlHelper.SelectOne(cmd, mattersstype, "biandaiqty, if_top_side, if_button_sdie, if_big_side, if_small_side, if_v_side, if_in_cloth_cover, if_out_cloth_cover, if_small_side2, if_small_side3, if_v_side2, if_v_side3, dianceng_sort, dianceng_area");
  68. rslt.biandai_qty = mattersstype.biandaiqty;
  69. AutoInit.AutoInitS(cmd, mattersstype);
  70. var helper = HelperBase.GetHelper<MattressHelper>(cmd, new HelperBase.Context() { tokendata = tokendata });
  71. var selectStr = @"
  72. SELECT formulaid
  73. ,formulakind
  74. ,formulatype
  75. ,sortcode
  76. ,if_mtrl
  77. ,formula
  78. ,usetype
  79. ,if_packtype0
  80. ,if_packtype1
  81. ,if_packtype2
  82. ,default_mtrlid
  83. ,createtime
  84. ,createby
  85. ,useformula
  86. ,gydscrp
  87. ,mtrltype
  88. FROM u_mattress_formula";
  89. var outFields = "formulaid, formulakind, formulatype, sortcode, if_mtrl, formula, usetype, if_packtype0, if_packtype1, if_packtype2, default_mtrlid, createtime, createby, useformula, gydscrp, mtrltype";
  90. var whereList = new List<string>();
  91. whereList.Add("u_mattress_formula.formulatype IN (0, 1, 2, 3, 99, 104)");
  92. whereList.Add("u_mattress_formula.usetype = @usetype");
  93. var param = new Dictionary<string, object>();
  94. // 导入 0-通用类型 的公式
  95. param.Add("@usetype", 0);
  96. var mattressFormulaList0 = new List<u_mattress_formula>();
  97. DbSqlHelper.SelectJoin(cmd, selectStr, ListEx.GetWhereStr(whereList), param, "formulatype, sortcode", outFields, 0, 0, mattressFormulaList0);
  98. var dw_2 = new List<u_mattress_mx_mtrl>();
  99. foreach (var mx in mattressFormulaList0)
  100. {
  101. if (new[] { 11, 12, 32, 33, 13, 14, 29, 999, 1201 }.Contains(mx.formulakind.Value)) continue;
  102. var newDw2 = new u_mattress_mx_mtrl();
  103. AutoInit.AutoInitS(newDw2);
  104. if (mx.if_mtrl > 1)
  105. {
  106. newDw2.addmx = "+";
  107. newDw2.delmx = "-";
  108. }
  109. newDw2.formulatype = mx.formulatype;
  110. newDw2.if_mtrl = mx.if_mtrl;
  111. newDw2.formulaid = mx.formulaid;
  112. newDw2.sortcode = mx.sortcode;
  113. newDw2.formulakind = mx.formulakind;
  114. newDw2.formula = mx.formula;
  115. newDw2.useformula = mx.useformula;
  116. newDw2.gydscrp = mx.gydscrp;
  117. dw_2.Add(newDw2);
  118. }
  119. // 导入 1-按床垫类别 的公式
  120. var mattressFormulaList1 = new List<u_mattress_formula>();
  121. param.Clear();
  122. param.Add("@usetype", 1);
  123. DbSqlHelper.SelectJoin(cmd, selectStr, ListEx.GetWhereStr(whereList), param, "formulatype, sortcode", outFields, 0, 0, mattressFormulaList1);
  124. foreach (var mx in mattressFormulaList1)
  125. {
  126. var ls_chastr = "";
  127. if (request.ifbcptype == 1)
  128. {
  129. if (new[] { 0, 40, 50, 60, 70, 80, 1, 41, 51, 61, 71, 81, 2, 42, 52, 62, 72, 82, 3, 43, 53, 63, 73, 83, 4, 44, 54, 64, 74, 84 }.Contains(mx.formulakind.Value))
  130. {
  131. continue;
  132. }
  133. }
  134. if (new[] { 0, 40, 50, 60, 70, 80 }.Contains(mx.formulakind.Value))
  135. {
  136. ls_chastr = "面裥绵";
  137. if (mattersstype.if_top_side == 0) continue;
  138. }
  139. if (new[] { 1, 41, 51, 61, 71, 81 }.Contains(mx.formulakind.Value))
  140. {
  141. ls_chastr = "底裥绵";
  142. if (mattersstype.if_button_sdie == 0) continue;
  143. }
  144. if (new[] { 2, 42, 52, 62, 72, 82 }.Contains(mx.formulakind.Value))
  145. {
  146. ls_chastr = "普通大侧";
  147. if (mattersstype.if_big_side == 0) continue;
  148. }
  149. if (new[] { 3, 43, 53, 63, 73, 83 }.Contains(mx.formulakind.Value))
  150. {
  151. ls_chastr = "小侧1";
  152. if (mattersstype.if_small_side == 0) continue;
  153. }
  154. if (new[] { 4, 44, 54, 64, 74, 84 }.Contains(mx.formulakind.Value))
  155. {
  156. ls_chastr = "V侧1";
  157. if (mattersstype.if_v_side == 0) continue;
  158. }
  159. if (new[] { 101, 102, 103, 104, 105, 106 }.Contains(mx.formulakind.Value))
  160. {
  161. if (mattersstype.if_in_cloth_cover == 0) continue;
  162. }
  163. if (new[] { 111, 112, 113, 114, 115, 116 }.Contains(mx.formulakind.Value))
  164. {
  165. if (mattersstype.if_out_cloth_cover == 0) continue;
  166. }
  167. var newDw2 = new u_mattress_mx_mtrl();
  168. AutoInit.AutoInitS(newDw2);
  169. if (mx.if_mtrl > 1)
  170. {
  171. newDw2.addmx = "+";
  172. newDw2.delmx = "-";
  173. }
  174. newDw2.formulatype = mx.formulatype;
  175. newDw2.if_mtrl = mx.if_mtrl;
  176. newDw2.formulaid = mx.formulaid;
  177. newDw2.sortcode = mx.sortcode;
  178. newDw2.formulakind = mx.formulakind;
  179. newDw2.formula = mx.formula;
  180. newDw2.chastr = ls_chastr;
  181. newDw2.useformula = mx.useformula;
  182. newDw2.gydscrp = mx.gydscrp;
  183. dw_2.Add(newDw2);
  184. }
  185. // 导入 2-按包装方式 的公式
  186. helper.wf_import_bz(request.packtype, ref dw_2);
  187. //加多一个 小侧2
  188. if (mattersstype.if_small_side2 == 1 && request.ifbcptype == 0)
  189. {
  190. wf_add_side(cmd, new[] { 3, 83, 43, 53, 63, 73 }, "小侧2", ref dw_2);
  191. }
  192. //加多一个 小侧3
  193. if (mattersstype.if_small_side3 == 1 && request.ifbcptype == 0)
  194. {
  195. wf_add_side(cmd, new[] { 3, 83, 43, 53, 63, 73 }, "小侧3", ref dw_2);
  196. }
  197. //加多一个 V侧2
  198. if (mattersstype.if_v_side2 == 1 && request.ifbcptype == 0)
  199. {
  200. wf_add_side(cmd, new[] { 4, 84, 44, 54, 64, 74 }, "V侧2", ref dw_2);
  201. }
  202. //加多一个 V侧3
  203. if (mattersstype.if_v_side3 == 1 && request.ifbcptype == 0)
  204. {
  205. wf_add_side(cmd, new[] { 4, 84, 44, 54, 64, 74 }, "V侧3", ref dw_2);
  206. }
  207. // 在 床垫类型 定义里面 按垫层默认配置 自动带出 垫层配置 和 垫层可选项
  208. if (!string.IsNullOrEmpty(mattersstype.dianceng_sort))
  209. {
  210. wf_add_dianceng_bytype(cmd, mattersstype.dianceng_sort, ref dw_2);
  211. }
  212. rslt.diancengarea = new List<replacement>();
  213. if (!string.IsNullOrEmpty(mattersstype.dianceng_area))
  214. {
  215. rslt.diancengarea = wf_add_dianceng_area_bytype(cmd, mattersstype.dianceng_area);
  216. }
  217. // 明细排序
  218. helper.wf_sort_mx(ref dw_2);
  219. if (request.mattressid == 0)
  220. {
  221. helper.wf_default_mtrlid(request.pricelistid, ref dw_2);
  222. helper.wf_default_mtrlid_notbz(request.pricelistid, ref dw_2);
  223. }
  224. rslt.mattressMx = dw_2;
  225. #region 导入其他额外费用和特殊工艺
  226. var extraEnum = new List<u_mattress_extra>();
  227. var extraTypeEnum = new List<u_mattress_extra_type>();
  228. getExtraType(cmd, ref extraTypeEnum, ref extraEnum);
  229. rslt.extraEnum = extraEnum;
  230. rslt.extraTypeEnum = extraTypeEnum;
  231. rslt.extraProcessesMx = new List<u_mattress_mx_extra>();
  232. var processesMx = extraEnum.Where(item => item.ifinit == 1 && item.typeid == 1).ToArray();
  233. var costsMx = extraEnum.Where(item => item.ifinit == 1 && item.typeid == 2).ToArray();
  234. foreach (var mx in processesMx)
  235. {
  236. u_mattress_mx_extra mxItem = new u_mattress_mx_extra
  237. {
  238. mattressid = 0,
  239. mattressmxid = 0,
  240. extraid = mx.extraid,
  241. extraname = mx.extramxname,
  242. dscrp = mx.dscrp,
  243. price = mx.price,
  244. typeid = mx.typeid
  245. };
  246. rslt.extraProcessesMx.Add(mxItem);
  247. }
  248. foreach (var mx in costsMx)
  249. {
  250. u_mattress_mx_extra mxItem = new u_mattress_mx_extra
  251. {
  252. mattressid = 0,
  253. mattressmxid = 0,
  254. extraid = mx.extraid,
  255. extraname = mx.extramxname,
  256. dscrp = mx.dscrp,
  257. price = mx.price,
  258. typeid = mx.typeid
  259. };
  260. rslt.extraCostsMx.Add(mxItem);
  261. }
  262. #endregion
  263. }
  264. }
  265. }
  266. }
  267. private void getExtraType(SqlCommand cmd, ref List<u_mattress_extra_type> extraTypeEnum, ref List<u_mattress_extra> extraEnum)
  268. {
  269. #region 查询额外费用定义项目
  270. var selectStr = @"
  271. SELECT
  272. u_mattress_extra.extraid
  273. ,extramxid
  274. ,extramxname
  275. ,u_mattress_extra_type.typeid
  276. ,price
  277. ,dscrp
  278. ,u_mattress_extra.inuse
  279. ,inputtype
  280. ,ifinit
  281. From u_mattress_extra
  282. inner join u_mattress_extra_type on u_mattress_extra_type.extraid = u_mattress_extra.extraid
  283. AND u_mattress_extra_type.inuse = 0
  284. ";
  285. var outFields = "extraid,extramxname,typeid,price,dscrp,inuse,inputtype,ifinit";
  286. var whereList = new List<string>();
  287. whereList.Add("u_mattress_extra.inuse = 0");
  288. var param = new Dictionary<string, object>();
  289. var mattressExtra = new List<u_mattress_extra>();
  290. DbSqlHelper.SelectJoin(cmd, selectStr, ListEx.GetWhereStr(whereList), param, "typeid, extraid", outFields, 0, 0, mattressExtra);
  291. extraEnum = mattressExtra;
  292. #endregion
  293. #region 查询额外费用定义类型
  294. selectStr = @"
  295. SELECT
  296. extraid
  297. ,typename
  298. ,typeid
  299. ,inuse
  300. ,createby
  301. ,createtime
  302. From u_mattress_extra_type
  303. ";
  304. outFields = "extraid, typename, typeid, inuse, createby, createtime";
  305. whereList = new List<string>();
  306. whereList.Add("u_mattress_extra_type.inuse = 0");
  307. param = new Dictionary<string, object>();
  308. var mattressExtraType = new List<u_mattress_extra_type>();
  309. DbSqlHelper.SelectJoin(cmd, selectStr, ListEx.GetWhereStr(whereList), param, "typeid, extraid", outFields, 0, 0, mattressExtraType);
  310. extraTypeEnum = mattressExtraType;
  311. #endregion
  312. }
  313. private void wf_add_side(SqlCommand cmd, int[] formulakindList, string arg_name, ref List<u_mattress_mx_mtrl> dw_2)
  314. {
  315. foreach(int ll_formulakind in formulakindList)
  316. {
  317. cmd.CommandText = @"SELECT TOP 1
  318. formulatype,
  319. formulaid,
  320. sortcode,
  321. formula,
  322. if_mtrl,
  323. useformula,
  324. gydscrp
  325. FROM u_mattress_formula
  326. WHERE formulakind = @formulakind
  327. AND u_mattress_formula.formulatype in (0,1,2,3)";
  328. cmd.Parameters.Clear();
  329. cmd.Parameters.AddWithValue("@formulakind", ll_formulakind);
  330. using (var reader = cmd.ExecuteReader())
  331. {
  332. if (reader.Read())
  333. {
  334. var newDw2 = new u_mattress_mx_mtrl();
  335. AutoInit.AutoInitS(newDw2);
  336. if (Convert.ToInt32(reader["if_mtrl"]) > 1)
  337. {
  338. newDw2.addmx = "+";
  339. newDw2.delmx = "-";
  340. }
  341. newDw2.formulatype = Convert.ToInt32(reader["formulatype"]);
  342. newDw2.if_mtrl = Convert.ToInt32(reader["if_mtrl"]);
  343. newDw2.formulaid = Convert.ToInt32(reader["formulaid"]);
  344. newDw2.sortcode = arg_name;
  345. newDw2.formulakind = ll_formulakind;
  346. newDw2.formula = Convert.ToString(reader["formula"]);
  347. newDw2.chastr = arg_name;
  348. newDw2.useformula = Convert.ToString(reader["useformula"]);
  349. newDw2.gydscrp = Convert.ToString(reader["gydscrp"]);
  350. dw_2.Add(newDw2);
  351. }
  352. }
  353. }
  354. }
  355. private void wf_add_dianceng_bytype(SqlCommand cmd, string dianceng_sort, ref List<u_mattress_mx_mtrl> dw_2)
  356. {
  357. var arg_dianceng_sort = dianceng_sort.Replace(",", " , ");
  358. arg_dianceng_sort = arg_dianceng_sort.Replace("~r~n", "");
  359. arg_dianceng_sort = arg_dianceng_sort.Replace("~r", "");
  360. arg_dianceng_sort = arg_dianceng_sort.Replace("~n", "");
  361. //var ls_pzsplitstr_arr = f_pb_split(arg_dianceng_sort, "/");
  362. var ls_pzsplitstr_arr = arg_dianceng_sort.Split('/');
  363. string arg_left_str, arg_right_str;
  364. int ll_formulakind;
  365. int index = 0;
  366. foreach (var ls_pzsplitstr in ls_pzsplitstr_arr)
  367. {
  368. index++;
  369. arg_left_str = "";
  370. arg_right_str = "";
  371. wf_get_str(ls_pzsplitstr, ref arg_left_str, ref arg_right_str);
  372. switch(arg_left_str)
  373. {
  374. case "垫层":
  375. ll_formulakind = 32;
  376. break;
  377. case "床网":
  378. ll_formulakind = 999;
  379. break;
  380. case "顶布":
  381. ll_formulakind = 12;
  382. break;
  383. case "毡类":
  384. ll_formulakind = 13;
  385. break;
  386. case "打底无纺布":
  387. ll_formulakind = 14;
  388. break;
  389. case "网面布料":
  390. ll_formulakind = 29;
  391. break;
  392. default:
  393. ll_formulakind = -1;
  394. break;
  395. }
  396. if (ll_formulakind == -1) continue;
  397. cmd.CommandText = @"SELECT TOP 1
  398. formulatype,
  399. formulaid,
  400. sortcode,
  401. formula,
  402. if_mtrl,
  403. useformula,
  404. gydscrp
  405. FROM u_mattress_formula
  406. WHERE formulakind = @formulakind
  407. AND u_mattress_formula.formulatype in (0,1,2,3)";
  408. cmd.Parameters.Clear();
  409. cmd.Parameters.AddWithValue("@formulakind", ll_formulakind);
  410. using (var reader = cmd.ExecuteReader())
  411. {
  412. if (reader.Read())
  413. {
  414. var newDw2 = new u_mattress_mx_mtrl();
  415. AutoInit.AutoInitS(newDw2);
  416. if (Convert.ToInt32(reader["if_mtrl"]) > 1)
  417. {
  418. newDw2.addmx = "+";
  419. newDw2.delmx = "-";
  420. }
  421. newDw2.formulatype = Convert.ToInt32(reader["formulatype"]);
  422. newDw2.if_mtrl = 2;
  423. newDw2.formulaid = Convert.ToInt32(reader["formulaid"]);
  424. newDw2.sortcode = Convert.ToString(reader["sortcode"]);
  425. newDw2.formulakind = ll_formulakind;
  426. newDw2.formula = Convert.ToString(reader["formula"]);
  427. newDw2.chastr = wf_set_area_text(arg_right_str);
  428. newDw2.qty = 1;
  429. newDw2.xu = index;
  430. newDw2.useformula = Convert.ToString(reader["useformula"]);
  431. newDw2.gydscrp = Convert.ToString(reader["gydscrp"]);
  432. dw_2.Add(newDw2);
  433. }
  434. }
  435. }
  436. }
  437. private void wf_get_str(string arg_source, ref string arg_left_str, ref string arg_right_str)
  438. {
  439. if (string.IsNullOrEmpty(arg_source)) return;
  440. int commaPosition = arg_source.IndexOf(',');
  441. if (commaPosition > 0)
  442. {
  443. arg_left_str = arg_source.Substring(0, commaPosition).Trim();
  444. arg_right_str = arg_source.Substring(commaPosition + 1).Trim();
  445. }
  446. else
  447. {
  448. arg_left_str = arg_source.Trim();
  449. arg_right_str = "";
  450. }
  451. }
  452. private string wf_set_area_text(string arg_str)
  453. {
  454. string ls_rtn = "";
  455. // V侧1
  456. // V侧2
  457. // V侧3
  458. // 小侧1
  459. // 小侧2
  460. // 小侧3
  461. // 大侧
  462. if (arg_str.IndexOf("大侧") >= 0)
  463. {
  464. ls_rtn = "大侧";
  465. }
  466. else if (arg_str.IndexOf("小侧1") >= 0)
  467. {
  468. ls_rtn = "小侧1";
  469. }
  470. else if (arg_str.IndexOf("小侧2") >= 0)
  471. {
  472. ls_rtn = "小侧2";
  473. }
  474. else if (arg_str.IndexOf("小侧3") >= 0)
  475. {
  476. ls_rtn = "小侧3";
  477. }
  478. else if (arg_str.IndexOf("V侧1") >= 0)
  479. {
  480. ls_rtn = "V侧1";
  481. }
  482. else if (arg_str.IndexOf("V侧2") >= 0)
  483. {
  484. ls_rtn = "V侧2";
  485. }
  486. else if (arg_str.IndexOf("V侧3") >= 0)
  487. {
  488. ls_rtn = "V侧3";
  489. }
  490. else
  491. {
  492. ls_rtn = "";
  493. }
  494. return ls_rtn;
  495. }
  496. private List<replacement> wf_add_dianceng_area_bytype(SqlCommand cmd, string dianceng_area)
  497. {
  498. string ls_dianceng_area = dianceng_area;
  499. var diancengarea = new List<replacement>();
  500. // 替换中文逗号和其他特殊字符
  501. ls_dianceng_area = ls_dianceng_area.Replace(',', ',');
  502. ls_dianceng_area = ls_dianceng_area.Replace("\r\n", "");
  503. ls_dianceng_area = ls_dianceng_area.Replace("\r", "");
  504. ls_dianceng_area = ls_dianceng_area.Replace("\n", "");
  505. // 分割字符串
  506. string[] ls_pzsplitstr_arr = ls_dianceng_area.Split(',');
  507. for (int ll_i = 0; ll_i < ls_pzsplitstr_arr.Length; ll_i++)
  508. {
  509. string trimmedStr = ls_pzsplitstr_arr[ll_i].Trim();
  510. if (string.IsNullOrEmpty(trimmedStr)) continue;
  511. var child = new replacement()
  512. {
  513. label = wf_set_area_text(trimmedStr.Trim()),
  514. value = wf_set_area_text(trimmedStr.Trim())
  515. };
  516. diancengarea.Add(child);
  517. }
  518. return diancengarea;
  519. }
  520. }
  521. }