|
|
@@ -27,6 +27,7 @@ using System.Linq;
|
|
|
using NHibernate.Mapping;
|
|
|
using System.Reflection.Emit;
|
|
|
using NPOI.SS.Formula.Functions;
|
|
|
+using System.Security.Cryptography;
|
|
|
|
|
|
namespace SiteCore
|
|
|
{
|
|
|
@@ -1845,20 +1846,20 @@ namespace SiteCore
|
|
|
}
|
|
|
if (!string.IsNullOrEmpty(ctid))
|
|
|
{
|
|
|
-
|
|
|
- CeErpTradeCellExtend ceErpTradeCellExtend = CeErpTradeCellExtend.getByTid(ctid);
|
|
|
- if (ceErpTradeCellExtend != null && !string.IsNullOrEmpty(ceErpTradeCellExtend.spu_id))
|
|
|
- {
|
|
|
- string result = designHelper.API_CheckOrderTo(ctid, ceErpTradeCellExtend.spu_id);
|
|
|
- /* if ("外协".Equals(result))
|
|
|
- {
|
|
|
- return new designApiResponseVo(200, "");
|
|
|
- }
|
|
|
- else if ("内部".Equals(result))
|
|
|
- {
|
|
|
- return new designApiResponseVo(-1, "内部设计!");
|
|
|
- }*/
|
|
|
- }
|
|
|
+
|
|
|
+ /* CeErpTradeCellExtend ceErpTradeCellExtend = CeErpTradeCellExtend.getByTid(ctid);
|
|
|
+ if (ceErpTradeCellExtend != null && !string.IsNullOrEmpty(ceErpTradeCellExtend.spu_id))
|
|
|
+ {
|
|
|
+ string result = designHelper.API_CheckOrderTo(ctid, ceErpTradeCellExtend.spu_id);
|
|
|
+ if ("外协".Equals(result))
|
|
|
+ {
|
|
|
+ return new designApiResponseVo(200, "");
|
|
|
+ }
|
|
|
+ else if ("内部".Equals(result))
|
|
|
+ {
|
|
|
+ return new designApiResponseVo(-1, "内部设计!");
|
|
|
+ }
|
|
|
+ }*/
|
|
|
}
|
|
|
string info_sql = string.Format("SELECT ctid,ProductId,seller_memo FROM [dbo].[CE_ErpTradeCell] WHERE tid ='{0}'", tid);
|
|
|
DataTable data = DbHelper.DbConn.ExecuteDataset(info_sql).Tables[0];
|
|
|
@@ -1892,6 +1893,8 @@ namespace SiteCore
|
|
|
|
|
|
if (need_send && !has_design)
|
|
|
{
|
|
|
+ string sql_pay = "update CE_ErpTradeCell with(rowlock) set DispatchSort=2 where tid='" + tid + "';";
|
|
|
+ CeErpTradeCell.ExecuteNonQuery(sql_pay.ToString());
|
|
|
return new designApiResponseVo(200, "");
|
|
|
}
|
|
|
}
|
|
|
@@ -2709,6 +2712,13 @@ namespace SiteCore
|
|
|
ceErpTradeCellExtend.ctid = row["ctid"].ToString();
|
|
|
}
|
|
|
ceErpTradeCellExtend.spu_id = spu_id;
|
|
|
+
|
|
|
+ if (!string.IsNullOrEmpty(spu_id))
|
|
|
+ {
|
|
|
+ string result = designHelper.API_CheckOrderTo(ceErpTradeCellExtend.ctid, ceErpTradeCellExtend.spu_id);
|
|
|
+ ceErpTradeCellExtend.ToType = result;
|
|
|
+ }
|
|
|
+
|
|
|
if (ceErpTradeCellExtend.ID == 0)
|
|
|
{
|
|
|
ceErpTradeCellExtend.Create();
|
|
|
@@ -2719,6 +2729,11 @@ namespace SiteCore
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if (string.IsNullOrEmpty(spu_id))
|
|
|
+ {
|
|
|
+ string sql_pay = "update CE_ErpTradeCell with(rowlock) set orderstate=-1 where tid='" + father.tid + "';";
|
|
|
+ CeErpTradeCell.ExecuteNonQuery(sql_pay.ToString());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|