GetMattressImportDW2Excutor.cs 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592
  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.Where(item => item.ifinit.Value == 0).ToList();
  230. rslt.extraTypeEnum = extraTypeEnum;
  231. rslt.extraProcessesMx = new List<u_mattress_mx_extra>();
  232. rslt.extraCostsMx = new List<u_mattress_mx_extra>();
  233. var processesMx = extraEnum.Where(item => item.ifinit == 1 && item.typeid == 1).ToArray();
  234. var costsMx = extraEnum.Where(item => item.ifinit == 1 && item.typeid == 2).ToArray();
  235. foreach (var mx in processesMx)
  236. {
  237. u_mattress_mx_extra mxItem = new u_mattress_mx_extra
  238. {
  239. mattressid = 0,
  240. mattressmxid = 0,
  241. extraid = mx.extraid,
  242. extraname = mx.extramxname,
  243. dscrp = mx.dscrp,
  244. price = mx.price,
  245. qty = mx.qty,
  246. typeid = mx.typeid,
  247. inputtype = mx.inputtype
  248. };
  249. rslt.extraProcessesMx.Add(mxItem);
  250. }
  251. foreach (var mx in costsMx)
  252. {
  253. u_mattress_mx_extra mxItem = new u_mattress_mx_extra
  254. {
  255. mattressid = 0,
  256. mattressmxid = 0,
  257. extraid = mx.extraid,
  258. extraname = mx.extramxname,
  259. dscrp = mx.dscrp,
  260. price = mx.price,
  261. qty = mx.qty,
  262. typeid = mx.typeid,
  263. inputtype = mx.inputtype
  264. };
  265. rslt.extraCostsMx.Add(mxItem);
  266. }
  267. #endregion
  268. }
  269. }
  270. }
  271. }
  272. private void getExtraType(SqlCommand cmd, ref List<u_mattress_extra_type> extraTypeEnum, ref List<u_mattress_extra> extraEnum)
  273. {
  274. #region 查询额外费用定义项目
  275. var selectStr = @"
  276. SELECT
  277. u_mattress_extra.extraid
  278. ,extramxid
  279. ,extramxname
  280. ,u_mattress_extra_type.typeid
  281. ,price
  282. ,dscrp
  283. ,qty
  284. ,u_mattress_extra.inuse
  285. ,inputtype
  286. ,ifinit
  287. From u_mattress_extra
  288. inner join u_mattress_extra_type on u_mattress_extra_type.extraid = u_mattress_extra.extraid
  289. AND u_mattress_extra_type.inuse = 0
  290. ";
  291. var outFields = "extraid,extramxid,extramxname,typeid,price,dscrp,qty,inuse,inputtype,ifinit";
  292. var whereList = new List<string>();
  293. whereList.Add("u_mattress_extra.inuse = 0");
  294. var param = new Dictionary<string, object>();
  295. var mattressExtra = new List<u_mattress_extra>();
  296. DbSqlHelper.SelectJoin(cmd, selectStr, ListEx.GetWhereStr(whereList), param, "typeid, extraid", outFields, 0, 0, mattressExtra);
  297. extraEnum = mattressExtra;
  298. #endregion
  299. #region 查询额外费用定义类型
  300. selectStr = @"
  301. SELECT
  302. extraid
  303. ,typename
  304. ,typeid
  305. ,inuse
  306. ,createby
  307. ,createtime
  308. From u_mattress_extra_type
  309. ";
  310. outFields = "extraid, typename, typeid, inuse, createby, createtime";
  311. whereList = new List<string>();
  312. whereList.Add("u_mattress_extra_type.inuse = 0");
  313. param = new Dictionary<string, object>();
  314. var mattressExtraType = new List<u_mattress_extra_type>();
  315. DbSqlHelper.SelectJoin(cmd, selectStr, ListEx.GetWhereStr(whereList), param, "typeid, extraid", outFields, 0, 0, mattressExtraType);
  316. extraTypeEnum = mattressExtraType;
  317. #endregion
  318. }
  319. private void wf_add_side(SqlCommand cmd, int[] formulakindList, string arg_name, ref List<u_mattress_mx_mtrl> dw_2)
  320. {
  321. foreach(int ll_formulakind in formulakindList)
  322. {
  323. cmd.CommandText = @"SELECT TOP 1
  324. formulatype,
  325. formulaid,
  326. sortcode,
  327. formula,
  328. if_mtrl,
  329. useformula,
  330. gydscrp
  331. FROM u_mattress_formula
  332. WHERE formulakind = @formulakind
  333. AND u_mattress_formula.formulatype in (0,1,2,3)";
  334. cmd.Parameters.Clear();
  335. cmd.Parameters.AddWithValue("@formulakind", ll_formulakind);
  336. using (var reader = cmd.ExecuteReader())
  337. {
  338. if (reader.Read())
  339. {
  340. var newDw2 = new u_mattress_mx_mtrl();
  341. AutoInit.AutoInitS(newDw2);
  342. if (Convert.ToInt32(reader["if_mtrl"]) > 1)
  343. {
  344. newDw2.addmx = "+";
  345. newDw2.delmx = "-";
  346. }
  347. newDw2.formulatype = Convert.ToInt32(reader["formulatype"]);
  348. newDw2.if_mtrl = Convert.ToInt32(reader["if_mtrl"]);
  349. newDw2.formulaid = Convert.ToInt32(reader["formulaid"]);
  350. newDw2.sortcode = arg_name;
  351. newDw2.formulakind = ll_formulakind;
  352. newDw2.formula = Convert.ToString(reader["formula"]);
  353. newDw2.chastr = arg_name;
  354. newDw2.useformula = Convert.ToString(reader["useformula"]);
  355. newDw2.gydscrp = Convert.ToString(reader["gydscrp"]);
  356. dw_2.Add(newDw2);
  357. }
  358. }
  359. }
  360. }
  361. private void wf_add_dianceng_bytype(SqlCommand cmd, string dianceng_sort, ref List<u_mattress_mx_mtrl> dw_2)
  362. {
  363. var arg_dianceng_sort = dianceng_sort.Replace(",", " , ");
  364. arg_dianceng_sort = arg_dianceng_sort.Replace("~r~n", "");
  365. arg_dianceng_sort = arg_dianceng_sort.Replace("~r", "");
  366. arg_dianceng_sort = arg_dianceng_sort.Replace("~n", "");
  367. //var ls_pzsplitstr_arr = f_pb_split(arg_dianceng_sort, "/");
  368. var ls_pzsplitstr_arr = arg_dianceng_sort.Split('/');
  369. string arg_left_str, arg_right_str;
  370. int ll_formulakind;
  371. int index = 0;
  372. foreach (var ls_pzsplitstr in ls_pzsplitstr_arr)
  373. {
  374. index++;
  375. arg_left_str = "";
  376. arg_right_str = "";
  377. wf_get_str(ls_pzsplitstr, ref arg_left_str, ref arg_right_str);
  378. switch(arg_left_str)
  379. {
  380. case "垫层":
  381. ll_formulakind = 32;
  382. break;
  383. case "床网":
  384. ll_formulakind = 999;
  385. break;
  386. case "顶布":
  387. ll_formulakind = 12;
  388. break;
  389. case "毡类":
  390. ll_formulakind = 13;
  391. break;
  392. case "打底无纺布":
  393. ll_formulakind = 14;
  394. break;
  395. case "网面布料":
  396. ll_formulakind = 29;
  397. break;
  398. default:
  399. ll_formulakind = -1;
  400. break;
  401. }
  402. if (ll_formulakind == -1) continue;
  403. cmd.CommandText = @"SELECT TOP 1
  404. formulatype,
  405. formulaid,
  406. sortcode,
  407. formula,
  408. if_mtrl,
  409. useformula,
  410. gydscrp
  411. FROM u_mattress_formula
  412. WHERE formulakind = @formulakind
  413. AND u_mattress_formula.formulatype in (0,1,2,3)";
  414. cmd.Parameters.Clear();
  415. cmd.Parameters.AddWithValue("@formulakind", ll_formulakind);
  416. using (var reader = cmd.ExecuteReader())
  417. {
  418. if (reader.Read())
  419. {
  420. var newDw2 = new u_mattress_mx_mtrl();
  421. AutoInit.AutoInitS(newDw2);
  422. if (Convert.ToInt32(reader["if_mtrl"]) > 1)
  423. {
  424. newDw2.addmx = "+";
  425. newDw2.delmx = "-";
  426. }
  427. newDw2.formulatype = Convert.ToInt32(reader["formulatype"]);
  428. newDw2.if_mtrl = 2;
  429. newDw2.formulaid = Convert.ToInt32(reader["formulaid"]);
  430. newDw2.sortcode = Convert.ToString(reader["sortcode"]);
  431. newDw2.formulakind = ll_formulakind;
  432. newDw2.formula = Convert.ToString(reader["formula"]);
  433. newDw2.chastr = wf_set_area_text(arg_right_str);
  434. newDw2.qty = 1;
  435. newDw2.xu = index;
  436. newDw2.useformula = Convert.ToString(reader["useformula"]);
  437. newDw2.gydscrp = Convert.ToString(reader["gydscrp"]);
  438. dw_2.Add(newDw2);
  439. }
  440. }
  441. }
  442. }
  443. private void wf_get_str(string arg_source, ref string arg_left_str, ref string arg_right_str)
  444. {
  445. if (string.IsNullOrEmpty(arg_source)) return;
  446. int commaPosition = arg_source.IndexOf(',');
  447. if (commaPosition > 0)
  448. {
  449. arg_left_str = arg_source.Substring(0, commaPosition).Trim();
  450. arg_right_str = arg_source.Substring(commaPosition + 1).Trim();
  451. }
  452. else
  453. {
  454. arg_left_str = arg_source.Trim();
  455. arg_right_str = "";
  456. }
  457. }
  458. private string wf_set_area_text(string arg_str)
  459. {
  460. string ls_rtn = "";
  461. // V侧1
  462. // V侧2
  463. // V侧3
  464. // 小侧1
  465. // 小侧2
  466. // 小侧3
  467. // 大侧
  468. if (arg_str.IndexOf("大侧") >= 0)
  469. {
  470. ls_rtn = "大侧";
  471. }
  472. else if (arg_str.IndexOf("小侧1") >= 0)
  473. {
  474. ls_rtn = "小侧1";
  475. }
  476. else if (arg_str.IndexOf("小侧2") >= 0)
  477. {
  478. ls_rtn = "小侧2";
  479. }
  480. else if (arg_str.IndexOf("小侧3") >= 0)
  481. {
  482. ls_rtn = "小侧3";
  483. }
  484. else if (arg_str.IndexOf("V侧1") >= 0)
  485. {
  486. ls_rtn = "V侧1";
  487. }
  488. else if (arg_str.IndexOf("V侧2") >= 0)
  489. {
  490. ls_rtn = "V侧2";
  491. }
  492. else if (arg_str.IndexOf("V侧3") >= 0)
  493. {
  494. ls_rtn = "V侧3";
  495. }
  496. else
  497. {
  498. ls_rtn = "";
  499. }
  500. return ls_rtn;
  501. }
  502. private List<replacement> wf_add_dianceng_area_bytype(SqlCommand cmd, string dianceng_area)
  503. {
  504. string ls_dianceng_area = dianceng_area;
  505. var diancengarea = new List<replacement>();
  506. // 替换中文逗号和其他特殊字符
  507. ls_dianceng_area = ls_dianceng_area.Replace(',', ',');
  508. ls_dianceng_area = ls_dianceng_area.Replace("\r\n", "");
  509. ls_dianceng_area = ls_dianceng_area.Replace("\r", "");
  510. ls_dianceng_area = ls_dianceng_area.Replace("\n", "");
  511. // 分割字符串
  512. string[] ls_pzsplitstr_arr = ls_dianceng_area.Split(',');
  513. for (int ll_i = 0; ll_i < ls_pzsplitstr_arr.Length; ll_i++)
  514. {
  515. string trimmedStr = ls_pzsplitstr_arr[ll_i].Trim();
  516. if (string.IsNullOrEmpty(trimmedStr)) continue;
  517. var child = new replacement()
  518. {
  519. label = wf_set_area_text(trimmedStr.Trim()),
  520. value = wf_set_area_text(trimmedStr.Trim())
  521. };
  522. diancengarea.Add(child);
  523. }
  524. return diancengarea;
  525. }
  526. }
  527. }