|
|
@@ -45,6 +45,7 @@ using static SiteCore.taoObj.Api_waybill_code_response_Obj;
|
|
|
using static SiteCore.taoObj.work_core_vo;
|
|
|
using static System.Net.Mime.MediaTypeNames;
|
|
|
using System.Runtime.Remoting.Metadata.W3cXsd2001;
|
|
|
+using NPOI.Util;
|
|
|
|
|
|
namespace SiteCore.Handler
|
|
|
{
|
|
|
@@ -3755,10 +3756,17 @@ namespace SiteCore.Handler
|
|
|
dStruct.PageSize = 200;
|
|
|
}
|
|
|
DataTable dt = WebCache.GetData("view_Waitorderlist", dStruct);
|
|
|
+ List<string> tids = new List<string>();
|
|
|
if (dt != null)
|
|
|
{
|
|
|
+ dt.Columns.Add("compenPrice", typeof(double));
|
|
|
foreach (DataRow dr in dt.Rows)
|
|
|
{
|
|
|
+ if (Convert.IsDBNull(dr["compenPrice"]))
|
|
|
+ {
|
|
|
+ dr["compenPrice"] = 0;
|
|
|
+ }
|
|
|
+ tids.Add("'" + dr["tid"].ToString() + "'");
|
|
|
dr["receiver_address"] = dr["receiver_name"].ToString() + " " + dr["receiver_mobile"].ToString() + " " + dr["receiver_state"].ToString() + dr["receiver_city"].ToString() + dr["receiver_district"].ToString() + dr["receiver_address"].ToString();
|
|
|
if (Convert.IsDBNull(dr["SupplierId"]) || Convert.ToInt32(dr["SupplierId"]) == 0)
|
|
|
{
|
|
|
@@ -3771,6 +3779,24 @@ namespace SiteCore.Handler
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ string sql = string.Format("select ptid,payment from CE_ErpTradeCell where ptid in (" + string.Join(",", tids) + ") and IsSample = 2");
|
|
|
+ DataTable dt_price = DbHelper.DbConn.ExecuteDataset(sql).Tables[0];
|
|
|
+ if (dt_price != null && dt_price.Rows.Count > 0)
|
|
|
+ {
|
|
|
+
|
|
|
+ foreach (DataRow dr in dt_price.Rows)
|
|
|
+ {
|
|
|
+ foreach (DataRow row in dt.Rows)
|
|
|
+ {
|
|
|
+
|
|
|
+ if (row["tid"].Equals(dr["ptid"]))
|
|
|
+ {
|
|
|
+ row["compenPrice"] = Convert.ToDouble(row["compenPrice"]) + Convert.ToDouble(dr["payment"]);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
writeGridDataTableJson(dStruct.TotalCount, dt);
|
|
|
}
|
|
|
|
|
|
@@ -4400,11 +4426,11 @@ namespace SiteCore.Handler
|
|
|
if (tids.Count > 0 && tids.Count < 10)
|
|
|
{
|
|
|
tid_sql = string.Format("tid in ({0}) ", string.Join(",", tids));
|
|
|
- List<string> receiverIds = getReceiverIdByCtidLike(tids);
|
|
|
- if (receiverIds.Count > 0 && receiverIds.Count < 10)
|
|
|
- {
|
|
|
- tid_sql = string.Format("(tid in ({0}) or receiverId in ({1})) ", string.Join(",", tids), string.Join(",", receiverIds));
|
|
|
- }
|
|
|
+ /* List<string> receiverIds = getReceiverIdByCtidLike(tids);
|
|
|
+ if (receiverIds.Count > 0 && receiverIds.Count < 10)
|
|
|
+ {
|
|
|
+ tid_sql = string.Format("(tid in ({0}) or receiverId in ({1})) ", string.Join(",", tids), string.Join(",", receiverIds));
|
|
|
+ }*/
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -4566,11 +4592,11 @@ namespace SiteCore.Handler
|
|
|
if (tids.Count > 0 && tids.Count < 10)
|
|
|
{
|
|
|
tid_sql = string.Format("tid in ({0}) ", string.Join(",", tids));
|
|
|
- List<string> receiverIds = getReceiverIdByCtidLike(tids);
|
|
|
- if (receiverIds.Count > 0 && receiverIds.Count < 10)
|
|
|
- {
|
|
|
- tid_sql = string.Format("(tid in ({0}) or receiverId in ({1})) ", string.Join(",", tids), string.Join(",", receiverIds));
|
|
|
- }
|
|
|
+ /* List<string> receiverIds = getReceiverIdByCtidLike(tids);
|
|
|
+ if (receiverIds.Count > 0 && receiverIds.Count < 10)
|
|
|
+ {
|
|
|
+ tid_sql = string.Format("(tid in ({0}) or receiverId in ({1})) ", string.Join(",", tids), string.Join(",", receiverIds));
|
|
|
+ }*/
|
|
|
}
|
|
|
}
|
|
|
|