|
|
@@ -101,7 +101,7 @@ namespace SiteCore.Handler
|
|
|
}
|
|
|
ceErpTradeSpu.Update();
|
|
|
}*/
|
|
|
-
|
|
|
+ //string result = designHelper.API_CheckOrderTo("12123123123132", "456456465465");
|
|
|
List<string> lw = new List<string>();
|
|
|
string tid = GetPostString("ctid");
|
|
|
string date1 = GetPostString("date1");
|
|
|
@@ -2428,7 +2428,12 @@ namespace SiteCore.Handler
|
|
|
}
|
|
|
if (userid == 3542 && entity.seller_memo != "")
|
|
|
{
|
|
|
- designApiResponseVo response = designHelper.API_GetPrintData_CreateOrder(entity, CurrentUser.UserPost.Post.Code);
|
|
|
+ string userPost = CurrentUser.UserPost.Post.Code;
|
|
|
+ if (CurrentUser.UserID == 73)
|
|
|
+ {
|
|
|
+ userPost = "SysAdmin";
|
|
|
+ }
|
|
|
+ designApiResponseVo response = designHelper.API_GetPrintData_CreateOrder(entity, userPost);
|
|
|
LogHelper.addLog(entity.ctid, 3542, "手动派单:" + response.msg, entity.OrderState);
|
|
|
if (response.msg != "设计共创:成功")
|
|
|
{
|
|
|
@@ -2492,6 +2497,25 @@ namespace SiteCore.Handler
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
+ public List<string> getReceiverIdByCtidLike(List<string> tids)
|
|
|
+ {
|
|
|
+ string sql = string.Format("select receiverId from CE_ErpTrade where tid in ({0})", string.Join(",", tids));
|
|
|
+ DataTable dataTable = DbHelper.DbConn.ExecuteDataset(sql).Tables[0];
|
|
|
+ List<string> list = new List<string>();
|
|
|
+ if (dataTable != null && dataTable.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ foreach (DataRow item in dataTable.Rows)
|
|
|
+ {
|
|
|
+ if (string.IsNullOrEmpty(item["receiverId"].ToString()))
|
|
|
+ {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ list.Add("'" + item["receiverId"].ToString() + "'");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
public void get_erp_myorderlist()
|
|
|
{
|
|
|
DataStruct dStruct = GetPostStruct();
|
|
|
@@ -4289,6 +4313,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));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -4450,6 +4479,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));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -8340,6 +8374,12 @@ namespace SiteCore.Handler
|
|
|
{
|
|
|
if (UrlPostParmsCheck("id"))
|
|
|
{
|
|
|
+ //林小连
|
|
|
+ if (CurrentUser.UserID == 36 || CurrentUser.UserID == 1760 || CurrentUser.UserID == 33)
|
|
|
+ {
|
|
|
+ upd_erp_masteraftersale();
|
|
|
+ return;
|
|
|
+ }
|
|
|
string id = GetPostString("id");
|
|
|
int st = GetPostInt("afterstate");
|
|
|
string afmemo = GetPostString("supmemo");
|
|
|
@@ -8391,6 +8431,7 @@ namespace SiteCore.Handler
|
|
|
apiVo.actionName = "afterOver";
|
|
|
designHelper.API_WorkCore(apiVo); //afterOver
|
|
|
}
|
|
|
+
|
|
|
entity.UpdateTime = DateTime.Now;
|
|
|
entity.Update();
|
|
|
returnSuccessMsg("操作成功!");
|
|
|
@@ -10806,7 +10847,8 @@ namespace SiteCore.Handler
|
|
|
if (entity.OrderState == -1)
|
|
|
{
|
|
|
CeErpTradeCellExtend ceErpTradeCellExtend = CeErpTradeCellExtend.getByTid(entity.ctid);
|
|
|
- if (string.IsNullOrEmpty(ceErpTradeCellExtend.spu_id))
|
|
|
+
|
|
|
+ if (string.IsNullOrEmpty(ceErpTradeCellExtend.spu_id) && !entity.ctid.Contains("N_") && !entity.ctid.Contains("S_"))
|
|
|
{
|
|
|
returnErrorMsg("订单spu没有确认无法通过审核!");
|
|
|
return;
|