纽威
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

463 lines
24 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. using ICSSoft.Common;
  2. using ICSSoft.Entity;
  3. using Newtonsoft.Json;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Data;
  7. using System.Data.SqlClient;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Threading.Tasks;
  11. namespace ICSSoft.DataProject
  12. {
  13. /// <summary>
  14. /// 销售发货
  15. /// </summary>
  16. public class SalesDeliveryNotice
  17. {
  18. private static log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
  19. private static string connString = System.Configuration.ConfigurationManager.AppSettings["ERPConnStr"];
  20. private static string ERPDB = System.Configuration.ConfigurationManager.AppSettings["ERPDB"];
  21. private static string Type = System.Configuration.ConfigurationManager.AppSettings["Type"];
  22. string bustype = string.Empty;
  23. /// <summary>
  24. /// 获取销售发货
  25. /// </summary>
  26. /// <param name="infos"></param>
  27. /// <returns></returns>
  28. public string Get(List<ICSSalesDeliveryNotice> infos)
  29. {
  30. List<ICSSalesDeliveryNotice> szJson = new List<ICSSalesDeliveryNotice>();
  31. DataTable dt = null;
  32. DataTable dtNew = null;
  33. string connS = "";
  34. string json = "";
  35. if (infos.Count <= 0)
  36. {
  37. throw new Exception("传送数据为空!");
  38. }
  39. string res = string.Empty;
  40. SqlConnection conn = new SqlConnection();
  41. SqlCommand cmd = new SqlCommand();
  42. string sql = string.Empty;
  43. foreach (ICSSalesDeliveryNotice info in infos)
  44. {
  45. try
  46. {
  47. connS = string.Format(connString, info.WorkPoint);
  48. conn = new System.Data.SqlClient.SqlConnection(connS);
  49. conn.Open();
  50. SqlTransaction sqlTran = conn.BeginTransaction();
  51. cmd = new SqlCommand();
  52. cmd.Transaction = sqlTran;
  53. cmd.Connection = conn;
  54. if (info.MTime < new DateTime(2000, 01, 01))
  55. throw new Exception("请输入正确的操作时间:" + info.MTime);
  56. sql = @" select a.DLID ,a.cDLCode ,a.cCusCode,c.cCusName,a.cDepCode ,
  57. d.cDepName,b.cordercode ,a.cMaker ,a.dcreatesystime ,
  58. b.AutoID ,b.irowno,b.cInvCode ,b.iQuantity ,b.iNum ,b.iSOsID
  59. FROM dbo.DispatchList a
  60. INNER JOIN dbo.DispatchLists b ON a.DLID = b.DLID
  61. LEFT JOIN dbo.Customer c ON a.cCusCode = c.cCusCode
  62. left join Department d on a.cDepCode=d.cDepCode ";
  63. if (!string.IsNullOrWhiteSpace(info.SDNCode))
  64. {
  65. sql += " and a.cDLCode='{0}'";
  66. }
  67. if (!string.IsNullOrWhiteSpace(info.MTime.ToString()))
  68. {
  69. sql += " and ISNULL(a.dnmodifytime ,ISNULL(a.dverifydate , ISNULL(a.dnmodifytime , a.dcreatesystime )))>='{1}'";
  70. }
  71. if (!string.IsNullOrWhiteSpace(info.User))
  72. {
  73. sql += "and a.CMAKER='{2}'";
  74. }
  75. sql = string.Format(sql, info.SOCode, info.MTime, info.User);
  76. dt = DBHelper.SQlReturnData(sql, cmd);
  77. if (dt.Rows.Count <= 0 || dt == null)
  78. throw new Exception("销售发货单号:" + info.SOCode + ",无信息!");
  79. dtNew.Merge(dt);
  80. cmd.Transaction.Commit();
  81. }
  82. catch (Exception ex)
  83. {
  84. cmd.Transaction.Rollback();
  85. log.Error(ex.Message);
  86. throw new Exception(ex.Message);
  87. }
  88. finally
  89. {
  90. if (conn.State == ConnectionState.Open)
  91. {
  92. conn.Close();
  93. }
  94. conn.Dispose();
  95. }
  96. }
  97. json = JsonConvert.SerializeObject(dtNew);
  98. return json;
  99. }
  100. /// <summary>
  101. /// 创建销售发货
  102. /// </summary>
  103. /// <param name="Bills"></param>
  104. /// <returns></returns>
  105. public string CerateSalesDeliveryNotice(List<ICSSalesDeliveryNotice> Bills)
  106. {
  107. string msg = "";
  108. DataTable dt = null;
  109. DataTable dtNew = null;
  110. string connS = "";
  111. //bool ResultFlag = false;
  112. SqlConnection conn = new SqlConnection();
  113. SqlCommand cmd = new SqlCommand();
  114. VouchKey key = new VouchKey();
  115. if (Bills.Count <= 0)
  116. {
  117. throw new Exception("传送数据为空!");
  118. }
  119. LogInfo(Bills);
  120. foreach (ICSSalesDeliveryNotice head in Bills)
  121. {
  122. try
  123. {
  124. string sql = "";
  125. connS = string.Format(connString, head.WorkPoint);
  126. conn = new System.Data.SqlClient.SqlConnection(connS);
  127. conn.Open();
  128. SqlTransaction sqlTran = conn.BeginTransaction();
  129. cmd = new SqlCommand();
  130. cmd.Transaction = sqlTran;
  131. cmd.Connection = conn;
  132. string[] ss = head.WorkPoint.Split('_');
  133. ERPDB = ss[1];
  134. #region 销售发货单表头
  135. int num = 0;
  136. foreach (ICSSalesDeliveryNotice heads in Bills)
  137. {
  138. num = heads.details.Count();
  139. }
  140. string SO_SOMain_VT_ID = DBHelper.GetDefaultTemplate("05", cmd);//目标账套销售订单VT_ID模板
  141. DateTime time = DateTime.Now;
  142. Dictionary<string, int> dic = DBHelper.GetAllCode("" + ERPDB + "", "DelNote", "" + num + "");
  143. int iFatherId = Convert.ToInt32(dic["iFatherId"].ToString());
  144. int iChildId = Convert.ToInt32(dic["iChildId"].ToString());
  145. DateTime date = DateTime.Now;
  146. string iBaseCodeLen = DBHelper.GetAllRDCode("05", "" + time + "", "admin");
  147. sql = string.Format(@"INSERT INTO dbo.DispatchList
  148. (@DLID , @cDLCode , @cVouchType , cSTCode ,CONVERT(NVARCHAR(50),GETDATE(),23)
  149. , @cDepCode ,SBVID , @cSOCode , @cCusCode , cPayCode
  150. , cSCCode, cCusOAddress , cexch_name , iExchRate , iTaxRate , 0 , bReturnFlag
  151. , bFirst , cMemo , cVerifier , cMaker , iSale, (select cCusName from {0}.dbo.Customer where cCusCode='@cCusCode')
  152. , iVTid , ufts , cBusType , cCloser , cAccounter , cCreChpName
  153. , bIAFirst , ioutgolden , cgatheringplan , dCreditStart , dGatheringDate , icreditdays , bCredit
  154. , caddcode , iverifystate , ireturncount , iswfcontrolled , icreditstate , bARFirst
  155. , cmodifier , dmoddate , dverifydate , ccusperson , dcreatesystime , dverifysystime , dmodifysystime
  156. , csvouchtype , iflowid , bsigncreate , bcashsale , cgathingcode , cChanger , cChangeMemo
  157. , outid , bmustbook , cBookDepcode , cBookType , bSaUsed , bneedbill , baccswitchflag
  158. , iPrintCount , ccuspersoncode , cSourceCode , bsaleoutcreatebill , cSysBarCode , cCurrentAuditor
  159. , csscode , cinvoicecompany , fEBweight , cEBweightUnit , cEBExpressCode , iEBExpressCoID
  160. , SeparateID , bNotToGoldTax , cEBTrnumber , cEBBuyer , cEBBuyerNote , ccontactname , cEBprovince
  161. , cEBcity , cEBdistrict , cmobilephone , cInvoiceCusName , cweighter , dweighttime , cPickVouchCode
  162. , cGCRouteCode)
  163. SELECT
  164. @DLID , @cDLCode , @cVouchType , cSTCode ,CONVERT(NVARCHAR(50),GETDATE(),23)
  165. , @cDepCode , 0 , @cSOCode , @cCusCode , cPayCode
  166. , cSCCode, cCusOAddress , cexch_name , iExchRate , iTaxRate , 0 , bReturnFlag
  167. , 0 , cMemo , cVerifier , cMaker , 0 , (select cCusName from dbo.Customer where cCusCode='@cCusCode')
  168. , @iVTid , ufts , cBusType , cCloser , NULL , NULL
  169. , 0 , null , cgatheringplan , CONVERT(NVARCHAR(50),GETDATE(),23) ,NULL , NULL , 0
  170. , caddcode , iverifystate , ireturncount , iswfcontrolled , icreditstate , 0
  171. , NULL , NULL , NULL , ccusperson , CONVERT(NVARCHAR(50),GETDATE(),23) , dverifysystime , dmodifysystime
  172. , csvouchtype , iflowid , 0 , 0 , cgathingcode , NULL , NULL
  173. , outid , bmustbook , NULL , NULL , NULL , 0 , 0
  174. , 0 , ccuspersoncode , NULL , 0 , cSysBarCode , cCurrentAuditor
  175. , csscode , cinvoicecompany , NULL , NULL , NULL , NULL
  176. , NULL , 0 , NULL , NULL , NULL , NULL , NULL
  177. , NULL , NULL , NULL , NULL , NULL , NULL , NULL
  178. , NULL FROM SO_SOMain a
  179. where a.cSOCode ='" + head.SOCode + "'");
  180. cmd.Parameters.Clear();
  181. cmd.Parameters.Add(new SqlParameter("@DLID", iFatherId));
  182. cmd.Parameters.Add(new SqlParameter("@cDLCode", iBaseCodeLen));
  183. cmd.Parameters.Add(new SqlParameter("@cVouchType", "05"));
  184. cmd.Parameters.Add(new SqlParameter("@cDepCode", head.DepCode));
  185. cmd.Parameters.Add(new SqlParameter("@cSOCode", head.SOCode));
  186. cmd.Parameters.Add(new SqlParameter("@cCusCode", head.CusCode));
  187. cmd.Parameters.Add(new SqlParameter("@iVTid", SO_SOMain_VT_ID));
  188. //cmd.Parameters.Add(new SqlParameter("@dDate", data.dMate));
  189. cmd.CommandText = sql;
  190. try
  191. {
  192. int count = cmd.ExecuteNonQuery();
  193. if (count <= 0)
  194. {
  195. log.Error("生成销售出库单表头失败,受影响行数<=0;");
  196. throw new Exception("生成销售出库单表头失败,受影响行数<=0;");
  197. }
  198. }
  199. catch (Exception ex)
  200. {
  201. log.Error("生成销售出库单表头失败!销售订单号:" + head.SDNCode + ";异常:" + ex.Message + ";SQL:\r\n" + sql, ex);
  202. throw new Exception("生成销售出库单表头失败!销售订单号:" + head.SDNCode + ";异常:" + ex.Message + ";SQL:\r\n" + sql, ex);
  203. }
  204. #endregion
  205. #region 销售出库单表体
  206. foreach (ICSSalesDeliveryNotices body in head.details)
  207. {
  208. #region 销售顶订单表体
  209. sql = string.Format(@"INSERT INTO dbo.DispatchLists
  210. (AutoID , DLID , iCorID , cWhCode , cInvCode , iQuantity , iNum
  211. , iQuotedPrice , iUnitPrice , iTaxUnitPrice , iMoney , iTax , iSum , iDisCount , iNatUnitPrice
  212. , iNatMoney , iNatTax , iNatSum , iNatDisCount , iSettleNum , iSettleQuantity , iBatch , cBatch
  213. , bSettleAll , cMemo , iTB , dvDate , TBQuantity , TBNum , iSOsID , iDLsID
  214. , KL , KL2 , cInvName , iTaxRate
  215. , fOutQuantity , fOutNum , cItemCode , cItem_class , fSaleCost , fSalePrice , cVenAbbName
  216. , cItemName , cItem_CName
  217. , bIsSTQc , iInvExchRate , cUnitID , cCode , iRetQuantity , fEnSettleQuan , fEnSettleSum , iSettlePrice , dMDate , bGsp
  218. , cGspState , cSoCode , cCorCode , iPPartSeqID , iPPartID , iPPartQty , cContractID , cContractTagCode , cContractRowGuid
  219. , iMassDate , cMassUnit , bQANeedCheck , bQAUrgency , bQAChecking , bQAChecked , iQAQuantity , iQANum
  220. , cCusInvCode , cCusInvName , fsumsignquantity , fsumsignnum , cbaccounter , bcosting , cordercode
  221. , iorderrowno , fcusminprice , icostquantity , icostsum , ispecialtype , cvmivencode , iexchsum
  222. , imoneysum , irowno , frettbquantity , fretsum , iExpiratDateCalcu , dblPreExchMomey , dblPreMomey , idemandtype
  223. , cdemandcode , cdemandmemo , cdemandid , idemandseq , cvencode , cReasonCode , cInvSN , iInvSNCount , bneedsign
  224. , bsignover , bneedloss , flossrate , frlossqty , fulossqty , isettletype , crelacuscode , cLossMaker
  225. , dLossDate , dLossTime , icoridlsid , fretoutqty , body_outid , fVeriBillQty
  226. , fVeriBillSum , fVeriRetQty , fVeriRetSum , fLastSettleQty
  227. , fLastSettleSum , cBookWhcode , cInVouchType , cPosition , fretqtywkp , fretqtyykp , frettbqtyykp
  228. , fretsumykp , dkeepdate , cSCloser , isaleoutid , bsaleprice , bgift , bmpforderclosed
  229. , cbSysBarCode , fxjquantity , fxjnum
  230. , bIAcreatebill , cParentCode , cChildCode , fchildqty , fchildrate , iCalcType , fappretwkpqty , fappretwkpsum
  231. , fappretykpqty , fappretykpsum , fappretwkptbqty , fappretykptbqty , irtnappid , crtnappcode , fretailrealamount
  232. , fretailsettleamount , cFactoryCode , GCSourceId , GCSourceIds , cConfirmer , dConfirmDate )
  233. SELECT
  234. @AutoID , @DLID , @cWhCode , @cInvCode , @iQuantity , @iNum
  235. , iQuotedPrice , iUnitPrice , iTaxUnitPrice , iMoney , iTax , iSum , iDisCount , iNatUnitPrice
  236. , iNatMoney , iNatTax , iNatSum , iNatDisCount , NULL , NULL
  237. , 0 , cMemo , 0 , NULL , 0 , NULL , iSOsID , NULL
  238. , KL , KL2 , cInvName , iTaxRate
  239. , fOutQuantity , fOutNum , cItemCode , cItem_class , fSaleCost , fSalePrice ,NUll
  240. , cItemName , cItem_CName
  241. , 0 , iInvExchRate , cUnitID , NULL , 0 , 0 , 0 , 0 , NULL , 0
  242. , NULL , @cSoCode , NULL , iPPartSeqID , iPPartID , iPPartQty , cContractID , cContractTagCode , cContractRowGuid
  243. , NULL , NULL , 0 , 0 , 0 , 0 , 0 , 0
  244. , cCusInvCode , cCusInvName , 0 , 0 , NULL , 0 , @cordercode
  245. , NULL , fcusminprice , icostquantity , icostsum , NULL , NULL , iexchsum
  246. , imoneysum , @irowno , 0 , 0 , NULL , 0 , 0 , NULL
  247. , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL
  248. , NULL , NULL , NULL , 0 , 0 , NULL , NULL , NULL
  249. , NULL , NULL , NULL , NULL , NULL , NULL
  250. , NULL , NULL , NULL , NULL
  251. , NULL , NULL , NULL , NULL , NULL , NULL , NULL
  252. , NULL , NULL , NULL , isaleoutid , 1 , 0 , 0
  253. , cbSysBarCode , NULL , NULL
  254. , 1 , NULL , NULL , NULL , NULL , NULL , NULL , NULL
  255. , NULL , NULL , NULL , NULL , NULL , NULL , NULL
  256. , NULL , NULL , NULL , NULL , NULL , NULL FROM SO_SODetails a
  257. where a.AutoID ='" + body.SODetailID + "'");
  258. cmd.Parameters.Clear();
  259. cmd.Parameters.Add(new SqlParameter("@AutoID", iChildId));
  260. cmd.Parameters.Add(new SqlParameter("@DLID", iFatherId));
  261. cmd.Parameters.Add(new SqlParameter("@cInvCode", body.InvCode));
  262. cmd.Parameters.Add(new SqlParameter("@iQuantity", body.Quantity));
  263. cmd.Parameters.Add(new SqlParameter("@iNum", body.Amount));
  264. cmd.Parameters.Add(new SqlParameter("@cSoCode", head.SOCode));
  265. cmd.Parameters.Add(new SqlParameter("@cordercode", head.SOCode));
  266. cmd.Parameters.Add(new SqlParameter("@irowno", body.Sequence));
  267. //cmd.Parameters.Add(new SqlParameter("@dDate", data.dMate));
  268. cmd.CommandText = sql;
  269. try
  270. {
  271. int count = cmd.ExecuteNonQuery();
  272. if (count <= 0)
  273. {
  274. log.Error("生成销售出库单表体失败,受影响行数<=0;");
  275. throw new Exception("生成销售出库单表体失败,受影响行数<=0;");
  276. }
  277. }
  278. catch (Exception ex)
  279. {
  280. log.Error("生成销售出库单表体失败!销售订单号:" + head.SOCode + ";异常:" + ex.Message + ";SQL:\r\n" + sql, ex);
  281. throw new Exception("生成销售出库单表体失败!销售订单号:" + head.SOCode + ";异常:" + ex.Message + ";SQL:\r\n" + sql, ex);
  282. }
  283. #endregion
  284. iChildId--;
  285. }
  286. #endregion
  287. sql = @"
  288. select a.DLID ,a.cDLCode ,a.cCusCode,c.cCusName,a.cDepCode ,
  289. d.cDepName,b.cordercode ,a.cMaker ,a.dcreatesystime ,
  290. b.AutoID ,b.irowno,b.cInvCode ,b.iQuantity ,b.iNum ,b.iSOsID
  291. FROM dbo.DispatchList a
  292. INNER JOIN dbo.DispatchLists b ON a.DLID = b.DLID
  293. LEFT JOIN dbo.Customer c ON a.cCusCode = c.cCusCode
  294. left join Department d on a.cDepCode=d.cDepCode WHERE a.DLID = '{0}' ";
  295. sql = string.Format(sql, iFatherId);
  296. dt = DBHelper.SQlReturnData(sql, cmd);
  297. dtNew.Merge(dt);
  298. cmd.Transaction.Commit();
  299. }
  300. catch (Exception ex)
  301. {
  302. cmd.Transaction.Rollback();
  303. log.Error(ex.Message);
  304. throw new Exception(ex.Message);
  305. }
  306. finally
  307. {
  308. if (conn.State == ConnectionState.Open)
  309. {
  310. conn.Close();
  311. }
  312. conn.Dispose();
  313. }
  314. }
  315. msg = JsonConvert.SerializeObject(dtNew);
  316. cmd.Transaction.Commit();
  317. return msg;
  318. }
  319. /// <summary>
  320. /// 审核销售发货
  321. /// </summary>
  322. /// <param name="infos"></param>
  323. /// <returns></returns>
  324. public string Approve(List<ICSSalesDeliveryNotice> infos)
  325. {
  326. List<ICSSalesDeliveryNotice> szJson = new List<ICSSalesDeliveryNotice>();
  327. string connS = "";
  328. string json = "";
  329. if (infos.Count <= 0)
  330. {
  331. throw new Exception("传送数据为空!");
  332. }
  333. string res = string.Empty;
  334. SqlConnection conn = new SqlConnection();
  335. SqlCommand cmd = new SqlCommand();
  336. string sql = string.Empty;
  337. foreach (ICSSalesDeliveryNotice info in infos)
  338. {
  339. try
  340. {
  341. connS = string.Format(connString, info.WorkPoint);
  342. conn = new System.Data.SqlClient.SqlConnection(connS);
  343. conn.Open();
  344. SqlTransaction sqlTran = conn.BeginTransaction();
  345. cmd = new SqlCommand();
  346. cmd.Transaction = sqlTran;
  347. cmd.Connection = conn;
  348. if (info.MTime < new DateTime(2000, 01, 01))
  349. throw new Exception("请输入正确的操作时间:" + info.MTime);
  350. sql = @"UPDATE DispatchList SET cMaker ='" + info.User + @"' ,
  351. dverifysystime =CONVERT(VARCHAR(50),GETDATE(),112),dverifydate =GETDATE() WHERE DLID='{0}'";
  352. sql = string.Format(sql, info.ID);
  353. DBHelper.CmdExecuteNonQuery(sql, cmd, "未查询到对应数据!");
  354. cmd.Transaction.Commit();
  355. }
  356. catch (Exception ex)
  357. {
  358. cmd.Transaction.Rollback();
  359. log.Error(ex.Message);
  360. throw new Exception(ex.Message);
  361. }
  362. finally
  363. {
  364. if (conn.State == ConnectionState.Open)
  365. {
  366. conn.Close();
  367. }
  368. conn.Dispose();
  369. }
  370. }
  371. return json;
  372. }
  373. /// <summary>
  374. /// 删除销售发货
  375. /// </summary>
  376. /// <param name="infos"></param>
  377. /// <returns></returns>
  378. public string Delete(List<ICSSalesDeliveryNotice> infos)
  379. {
  380. List<ICSSalesDeliveryNotice> szJson = new List<ICSSalesDeliveryNotice>();
  381. if (infos.Count <= 0)
  382. {
  383. throw new Exception("传送数据为空!");
  384. }
  385. string res = string.Empty;
  386. string connS = "";
  387. SqlConnection conn = new SqlConnection();
  388. SqlCommand cmd = new SqlCommand();
  389. string sql = string.Empty;
  390. foreach (ICSSalesDeliveryNotice info in infos)
  391. {
  392. try
  393. {
  394. connS = string.Format(connString, info.WorkPoint);
  395. conn = new System.Data.SqlClient.SqlConnection(connS);
  396. conn.Open();
  397. SqlTransaction sqlTran = conn.BeginTransaction();
  398. cmd = new SqlCommand();
  399. cmd.Transaction = sqlTran;
  400. cmd.Connection = conn;
  401. if (info.MTime < new DateTime(2000, 01, 01))
  402. throw new Exception("请输入正确的操作时间:" + info.MTime);
  403. sql = @" DELETE DispatchList WHERE DLID={0}";
  404. sql = string.Format(sql, info.ID);
  405. DBHelper.CmdExecuteNonQuery(sql, cmd, "未查询到对应数据!");
  406. cmd.Transaction.Commit();
  407. }
  408. catch (Exception ex)
  409. {
  410. cmd.Transaction.Rollback();
  411. log.Error(ex.Message);
  412. throw new Exception(ex.Message);
  413. }
  414. finally
  415. {
  416. if (conn.State == ConnectionState.Open)
  417. {
  418. conn.Close();
  419. }
  420. conn.Dispose();
  421. }
  422. }
  423. return res;
  424. }
  425. /// <summary>
  426. ///
  427. /// 记录日志
  428. /// </summary>
  429. /// <param name="Bills"></param>
  430. private void LogInfo(List<ICSSalesDeliveryNotice> Bills)
  431. {
  432. string HeadList = string.Empty;
  433. string BodyList = string.Empty;
  434. foreach (ICSSalesDeliveryNotice head in Bills)
  435. {
  436. HeadList += "\r\n 表头主键ID:" + head.ID + ",用户:" + head.User + ",站点:" + head.WorkPoint;
  437. foreach (ICSSalesDeliveryNotices body in head.details)
  438. {
  439. BodyList += "\r\n 表体主键ID:数量:" + body.Quantity;
  440. }
  441. }
  442. log.Info(HeadList);
  443. log.Info(BodyList);
  444. }
  445. }
  446. }