GetMattressImportDW2Excutor.cs 26 KB

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