|
|
|
@ -12,6 +12,7 @@ using java.util;
|
|
|
|
|
using log4net;
|
|
|
|
|
using Microsoft.Office.Interop.Excel;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using NPOI.OpenXmlFormats.Wordprocessing;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Configuration;
|
|
|
|
@ -25,6 +26,10 @@ using System.Web;
|
|
|
|
|
using Tea;
|
|
|
|
|
using static DSWeb.Areas.CommMng.Controllers.WorkFlowController;
|
|
|
|
|
using static DSWeb.Areas.MvcShipping.Helper.DingTalk_SendAuditWork;
|
|
|
|
|
using Newtonsoft.Json.Linq;
|
|
|
|
|
using sun.tools.jar.resources;
|
|
|
|
|
using System.Data.Entity.Migrations;
|
|
|
|
|
using AlibabaCloud.SDK.Dingtalkworkflow_1_0.Models;
|
|
|
|
|
|
|
|
|
|
namespace DSWeb.Areas.MvcShipping.Helper
|
|
|
|
|
{
|
|
|
|
@ -145,6 +150,15 @@ namespace DSWeb.Areas.MvcShipping.Helper
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
result = dh.DoSend();
|
|
|
|
|
|
|
|
|
|
if (result.Success) {
|
|
|
|
|
//将wms锁定状态改为是
|
|
|
|
|
var cdc = new CommonDataContext();
|
|
|
|
|
var _wmsno= wmsno.Replace("'", "");
|
|
|
|
|
var wms = cdc.wms.First(x => x.WMSNO == _wmsno);
|
|
|
|
|
wms.ISLOCK2= true;
|
|
|
|
|
cdc.SaveChanges();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
result.SetErrorInfo("该业务已发送");
|
|
|
|
@ -372,7 +386,9 @@ namespace DSWeb.Areas.MvcShipping.Helper
|
|
|
|
|
|
|
|
|
|
DingTalk_OAAuditBody body = new DingTalk_OAAuditBody();
|
|
|
|
|
|
|
|
|
|
var dp = DingTalkProcess.GetDingTalkProcess("诚锐入货通知");
|
|
|
|
|
var 诚锐app = DingTalkApp.GetDingTalkApp("诚锐东胜对接");
|
|
|
|
|
|
|
|
|
|
var dp = 诚锐app.GetProcess("诚锐入货通知");
|
|
|
|
|
|
|
|
|
|
body.deptId = dp.deptid;//
|
|
|
|
|
//获取用户的钉钉id
|
|
|
|
@ -406,7 +422,7 @@ namespace DSWeb.Areas.MvcShipping.Helper
|
|
|
|
|
new DingTalkFormField("重量", item.GOODSRKSL.ToString()),
|
|
|
|
|
new DingTalkFormField("件数", item.GOODSPACK.ToString()),
|
|
|
|
|
new DingTalkFormField("尺码", item.CHIMA1.ToString()),
|
|
|
|
|
new DingTalkFormField("库位", item.CHIMA1.ToString())
|
|
|
|
|
new DingTalkFormField("库位", item.AREANAME.ToString())
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
入库信息list.Add(newrk);
|
|
|
|
@ -555,8 +571,199 @@ namespace DSWeb.Areas.MvcShipping.Helper
|
|
|
|
|
type = callbackinfo.type;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
public DBResult ReadDingtalkInstanceinfo()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
var result = new DBResult();
|
|
|
|
|
|
|
|
|
|
//var userid=
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
//如果是费用入账动作 且配置了钉钉审批入库 则调用
|
|
|
|
|
result = DingTalkHelper.DingTalk_Instanceinfo(processInstanceId);
|
|
|
|
|
|
|
|
|
|
DingTalkInstanceinfo di = DSWeb.MvcShipping.Helper.JsonConvert.Deserialize<DingTalkInstanceinfo>(result.Data.ToString());
|
|
|
|
|
|
|
|
|
|
//根据内容修改wms和wmsin值
|
|
|
|
|
var cdc = new CommonDataContext();
|
|
|
|
|
var lv = BasicDataRefDAL.GetLogicHaveValue("钉钉审批", "instanceId", "Wnr2YHcmSD-PjBWkTDkqIg05361673511300");
|
|
|
|
|
if (lv != null && lv.ContainsKey("instanceId"))
|
|
|
|
|
{
|
|
|
|
|
var wmsno = lv["BSNO"];
|
|
|
|
|
|
|
|
|
|
var wmsold = new DSWeb.MvcShipping.Models.WMS.WMS_IN_OLD(wmsno);
|
|
|
|
|
var wms = wmsold.wms;
|
|
|
|
|
var wmslist = wmsold.wms_in;
|
|
|
|
|
//var wms = cdc.wms.FirstOrDefault(x => x.WMSNO == wmsno);
|
|
|
|
|
//var wmslist = new List<wms_in_md>();
|
|
|
|
|
//if (wms != null) {
|
|
|
|
|
// wmslist = cdc.wms_in.Where(x => x.ASSOCIATEDNO == wms.GID).ToList();
|
|
|
|
|
//}
|
|
|
|
|
var updwmsinlist = new List<wms_in_md>();
|
|
|
|
|
var newwmsinlist = new List<wms_in_md>();
|
|
|
|
|
var 车辆信息 = new wms_in_md();
|
|
|
|
|
foreach (var item in di.result.formComponentValues)
|
|
|
|
|
{
|
|
|
|
|
//从其中查找货物信息 并更新至当前
|
|
|
|
|
if (item.name == "客户名称")
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
//var cust=cdc.info_client.Where(x=>x.SHORTNAME==item.value || x.DESCRIPTION==item.value)
|
|
|
|
|
}
|
|
|
|
|
if (item.name == "入库日期")
|
|
|
|
|
{
|
|
|
|
|
wms.WMSDATE = Convert.ToDateTime(item.value);
|
|
|
|
|
}
|
|
|
|
|
if (item.name == "入库信息")
|
|
|
|
|
{
|
|
|
|
|
var 入库信息list = FormComponentValues.GetRowValues(item.value);
|
|
|
|
|
if (入库信息list != null)
|
|
|
|
|
{
|
|
|
|
|
foreach (var DingWmsin in 入库信息list)
|
|
|
|
|
{
|
|
|
|
|
var 提单号 = DingWmsin.getValue("提单号");
|
|
|
|
|
var 箱号 = DingWmsin.getValue("箱号");
|
|
|
|
|
if (wmslist.Exists(x => x.BLNO == 提单号 && x.CNTRNO == 箱号))
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
var updrec = wmslist.First(x => x.BLNO == 提单号 && x.CNTRNO == 箱号);
|
|
|
|
|
|
|
|
|
|
//new DingTalkFormField("提单号", item.BLNO),
|
|
|
|
|
//new DingTalkFormField("箱号", item.CNTRNO),
|
|
|
|
|
//new DingTalkFormField("品名", item.GOODSNAME),
|
|
|
|
|
//new DingTalkFormField("重量", item.GOODSRKSL.ToString()),
|
|
|
|
|
//new DingTalkFormField("件数", item.GOODSPACK.ToString()),
|
|
|
|
|
//new DingTalkFormField("尺码", item.CHIMA1.ToString()),
|
|
|
|
|
//new DingTalkFormField("库位", item.CHIMA1.ToString())
|
|
|
|
|
updrec.GOODSNAME = DingWmsin.getValue("品名");
|
|
|
|
|
|
|
|
|
|
if (wms.CHARGEUNIT == "吨" || wms.CHARGEUNIT == "千克")
|
|
|
|
|
{
|
|
|
|
|
updrec.GOODSRKSL = Convert.ToDecimal(DingWmsin.getValue("重量"));
|
|
|
|
|
updrec.GOODSSTOCK = Convert.ToDecimal(DingWmsin.getValue("重量"));
|
|
|
|
|
|
|
|
|
|
updrec.GOODSKGS = Convert.ToDecimal(DingWmsin.getValue("重量"));
|
|
|
|
|
updrec.SHIJIZHONGLIANG = Convert.ToDouble(DingWmsin.getValue("重量"));
|
|
|
|
|
|
|
|
|
|
updrec.CHIMA1 = Convert.ToDouble(DingWmsin.getValue("尺码"));
|
|
|
|
|
updrec.SHIJICHIMA = Convert.ToDouble(DingWmsin.getValue("尺码"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (wms.CHARGEUNIT == "CBM")
|
|
|
|
|
{
|
|
|
|
|
updrec.GOODSRKSL = Convert.ToDecimal(DingWmsin.getValue("尺码"));
|
|
|
|
|
updrec.GOODSSTOCK = Convert.ToDecimal(DingWmsin.getValue("重量"));
|
|
|
|
|
|
|
|
|
|
updrec.GOODSKGS = Convert.ToDecimal(DingWmsin.getValue("重量"));
|
|
|
|
|
updrec.SHIJIZHONGLIANG = Convert.ToDouble(DingWmsin.getValue("重量"));
|
|
|
|
|
|
|
|
|
|
updrec.CHIMA1 = Convert.ToDouble(DingWmsin.getValue("尺码"));
|
|
|
|
|
updrec.SHIJICHIMA = Convert.ToDouble(DingWmsin.getValue("尺码"));
|
|
|
|
|
}
|
|
|
|
|
updrec.GOODSPACK = Convert.ToDecimal(DingWmsin.getValue("件数"));
|
|
|
|
|
|
|
|
|
|
updrec.AREANAME = DingWmsin.getValue("库位");
|
|
|
|
|
updrec.DODATE = wms.WMSDATE;
|
|
|
|
|
updwmsinlist.Add(updrec);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
var newrec = new wms_in_md();
|
|
|
|
|
newrec.ASSOCIATEDNO = wms.GID;
|
|
|
|
|
newrec.GID = Guid.NewGuid().ToString();
|
|
|
|
|
newrec.BLNO = DingWmsin.getValue("提单号");
|
|
|
|
|
newrec.CNTRNO = DingWmsin.getValue("箱号");
|
|
|
|
|
newrec.CLIENTNAME = wms.CUSTOMERNAME;
|
|
|
|
|
newrec.DODATE = wms.WMSDATE;
|
|
|
|
|
newrec.GOODSNAME = DingWmsin.getValue("品名");
|
|
|
|
|
|
|
|
|
|
if (wms.CHARGEUNIT == "吨" || wms.CHARGEUNIT == "千克")
|
|
|
|
|
{
|
|
|
|
|
newrec.GOODSRKSL = Convert.ToDecimal(DingWmsin.getValue("重量"));
|
|
|
|
|
newrec.GOODSSTOCK = Convert.ToDecimal(DingWmsin.getValue("重量"));
|
|
|
|
|
|
|
|
|
|
newrec.GOODSKGS = Convert.ToDecimal(DingWmsin.getValue("重量"));
|
|
|
|
|
newrec.SHIJIZHONGLIANG = Convert.ToDouble(DingWmsin.getValue("重量"));
|
|
|
|
|
|
|
|
|
|
newrec.CHIMA1 = Convert.ToDouble(DingWmsin.getValue("尺码"));
|
|
|
|
|
newrec.SHIJICHIMA = Convert.ToDouble(DingWmsin.getValue("尺码"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (wms.CHARGEUNIT == "CBM")
|
|
|
|
|
{
|
|
|
|
|
newrec.GOODSRKSL = Convert.ToDecimal(DingWmsin.getValue("尺码"));
|
|
|
|
|
newrec.GOODSSTOCK = Convert.ToDecimal(DingWmsin.getValue("重量"));
|
|
|
|
|
|
|
|
|
|
newrec.GOODSKGS = Convert.ToDecimal(DingWmsin.getValue("重量"));
|
|
|
|
|
newrec.SHIJIZHONGLIANG = Convert.ToDouble(DingWmsin.getValue("重量"));
|
|
|
|
|
|
|
|
|
|
newrec.CHIMA1 = Convert.ToDouble(DingWmsin.getValue("尺码"));
|
|
|
|
|
newrec.SHIJICHIMA = Convert.ToDouble(DingWmsin.getValue("尺码"));
|
|
|
|
|
}
|
|
|
|
|
newrec.GOODSPACK = Convert.ToDecimal(DingWmsin.getValue("件数"));
|
|
|
|
|
newrec.AREANAME = DingWmsin.getValue("库位");
|
|
|
|
|
newrec.CREATETIME = DateTime.Now;
|
|
|
|
|
newrec.CHARGEUNIT = wms.CHARGEUNIT;
|
|
|
|
|
newrec.CORPID = wms.CORPID;
|
|
|
|
|
newwmsinlist.Add(newrec);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (item.name == "车队信息")
|
|
|
|
|
{
|
|
|
|
|
var 车队信息list = FormComponentValues.GetRowValues(item.value);
|
|
|
|
|
if (车队信息list != null && 车队信息list.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
var 车队name = 车队信息list[0].getValue("车队");
|
|
|
|
|
var 车队 = cdc.info_client.FirstOrDefault(x => x.SHORTNAME == 车队name);
|
|
|
|
|
if (车队 != null && 车队.SHORTNAME != null && 车队.SHORTNAME != "")
|
|
|
|
|
{
|
|
|
|
|
车辆信息.CHEDUIID = 车队.GID;
|
|
|
|
|
车辆信息.TRUCKNO = 车队信息list[0].getValue("车牌号");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
cdc.wms.AddOrUpdate(wms);
|
|
|
|
|
if (updwmsinlist != null && updwmsinlist.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
foreach (var item in updwmsinlist)
|
|
|
|
|
{
|
|
|
|
|
item.CHEDUIID = 车辆信息.CHEDUIID;
|
|
|
|
|
item.TRUCKNO = 车辆信息.TRUCKNO;
|
|
|
|
|
cdc.wms_in.AddOrUpdate(item);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (newwmsinlist != null && newwmsinlist.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
foreach (var item in newwmsinlist)
|
|
|
|
|
{
|
|
|
|
|
item.CHEDUIID = 车辆信息.CHEDUIID;
|
|
|
|
|
item.TRUCKNO = 车辆信息.TRUCKNO;
|
|
|
|
|
cdc.wms_in.AddOrUpdate(item);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
wms.ISLOCK2 = false;
|
|
|
|
|
cdc.wms.AddOrUpdate(wms);
|
|
|
|
|
|
|
|
|
|
cdc.SaveChanges();
|
|
|
|
|
|
|
|
|
|
//然后执行入库的费用入账原逻辑
|
|
|
|
|
DSWeb.MvcShipping.DAL.WMSNewDAL.WMSNewDAL.DoWMSLOCK(wmsno);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
{
|
|
|
|
|
result.SetErrorInfo(e.Message);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class OperationRecords
|
|
|
|
|
{
|
|
|
|
@ -601,20 +808,25 @@ namespace DSWeb.Areas.MvcShipping.Helper
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string value { get; set; }
|
|
|
|
|
|
|
|
|
|
public 行信息 GetRowValues() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static List<row> GetRowValues(string value)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
//用value值文本来解析成 行信息
|
|
|
|
|
var result = new 行信息();
|
|
|
|
|
var result = new List<row>();
|
|
|
|
|
|
|
|
|
|
if (value.Contains("\\\"rowValue\\\""))
|
|
|
|
|
if (value.Contains("\"rowValue\""))
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
var _value = value.Replace("\\", "");
|
|
|
|
|
var hxx = JsonConvert.DeserializeObject<行信息>(_value);
|
|
|
|
|
result = hxx;
|
|
|
|
|
var jarr = JArray.Parse(value);
|
|
|
|
|
foreach (var item in jarr)
|
|
|
|
|
{
|
|
|
|
|
var obj = item as JObject;
|
|
|
|
|
|
|
|
|
|
var row =JsonConvert.DeserializeObject<row>(obj.ToString());
|
|
|
|
|
result.Add(row);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{ }
|
|
|
|
@ -636,6 +848,10 @@ namespace DSWeb.Areas.MvcShipping.Helper
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string finishTime { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string pcUrl { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
@ -652,7 +868,7 @@ namespace DSWeb.Areas.MvcShipping.Helper
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int taskId { get; set; }
|
|
|
|
|
public long? taskId { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
@ -661,6 +877,10 @@ namespace DSWeb.Areas.MvcShipping.Helper
|
|
|
|
|
|
|
|
|
|
public class Result
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string finishTime { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
@ -728,13 +948,19 @@ namespace DSWeb.Areas.MvcShipping.Helper
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class 行信息
|
|
|
|
|
{
|
|
|
|
|
public List<row> row { get; set; }
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
public class row
|
|
|
|
|
{
|
|
|
|
|
public List<rowValue> rowValue { get; set; }
|
|
|
|
|
public string rowNumber { get; set; }
|
|
|
|
|
|
|
|
|
|
public string getValue(string fieldname) {
|
|
|
|
|
public string getValue(string fieldname)
|
|
|
|
|
{
|
|
|
|
|
var result = "";
|
|
|
|
|
if (rowValue.Exists(x => x.label == fieldname)) {
|
|
|
|
|
if (rowValue.Exists(x => x.label == fieldname))
|
|
|
|
|
{
|
|
|
|
|
result = rowValue.First(x => x.label == fieldname).value;
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
@ -747,42 +973,99 @@ namespace DSWeb.Areas.MvcShipping.Helper
|
|
|
|
|
public string value { get; set; }
|
|
|
|
|
public string key { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 钉钉业务类
|
|
|
|
|
|
|
|
|
|
public class DingTalkProcess {
|
|
|
|
|
|
|
|
|
|
public string processname { get; set; }
|
|
|
|
|
public string processCode { get; set; }
|
|
|
|
|
public class DingTalkApp {
|
|
|
|
|
public string token { get; set; }
|
|
|
|
|
public string aes_key { get; set; }
|
|
|
|
|
public string appkey { get; set; }
|
|
|
|
|
public long agentid { get; set; }
|
|
|
|
|
public long deptid { get; set; }
|
|
|
|
|
//public string callbackstr { get; set; }
|
|
|
|
|
public static DingTalkApp GetDingTalkApp(string appname)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public DingTalkCallbackDealHelper callbackinfo { get; set; }
|
|
|
|
|
var result = new DingTalkApp();
|
|
|
|
|
if (appname == "ddlucky测试应用")
|
|
|
|
|
{
|
|
|
|
|
result = new DingTalkApp_ddlucky测试应用();
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
|
|
public void SaveCallBack(CallBackInfo _callbackinfo) {
|
|
|
|
|
callbackinfo = new DingTalkCallbackDealHelper(_callbackinfo);
|
|
|
|
|
}
|
|
|
|
|
if (appname == "诚锐东胜对接")
|
|
|
|
|
{
|
|
|
|
|
result = new DingTalkApp_诚锐东胜对接();
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public DingTalkProcess() { }
|
|
|
|
|
public DingTalkProcess(string processname) { this.processname = processname; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 这些数值来自于钉钉中某个组织的某个应用。一个应用可以监听多个实际业务的返回值
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="processname"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public static DingTalkProcess GetDingTalkProcess(string processname) {
|
|
|
|
|
public virtual DingTalkProcess GetProcess(string processname) {
|
|
|
|
|
return new DingTalkProcess();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public virtual DingTalkProcess GetDingTalkProcessByProcessCode(string processcode)
|
|
|
|
|
{
|
|
|
|
|
return new DingTalkProcess();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class DingTalkApp_ddlucky测试应用 : DingTalkApp
|
|
|
|
|
{
|
|
|
|
|
public DingTalkApp_ddlucky测试应用() {
|
|
|
|
|
token = "zbGFOwrH6zCvq3VE3izLmWRTNUC1YcX";
|
|
|
|
|
aes_key = "sb6GkCKsUwNQo3RKbX1MzHKea1ZsE221n3xQ9hwJBMK";
|
|
|
|
|
appkey = "dingsaofiohmsrcbxyef";
|
|
|
|
|
agentid = 2298782307;
|
|
|
|
|
deptid = 809181118;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static DingTalkProcess GetDingTalkProcess(string processname)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
var result = new DingTalkProcess();
|
|
|
|
|
if (processname == "测试入货通知") {
|
|
|
|
|
if (processname == "测试入货通知")
|
|
|
|
|
{
|
|
|
|
|
result = new DingTalkProcess_测试入货通知(processname);
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static DingTalkProcess GetDingTalkProcessByProcessCode(string processCode)
|
|
|
|
|
{
|
|
|
|
|
var processdic = new Dictionary<string, string> {
|
|
|
|
|
{ "PROC-0DC40EA2-E9D2-4917-A597-AD77EC055C49","测试入货通知"}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
if (processdic.ContainsKey(processCode))
|
|
|
|
|
{
|
|
|
|
|
return GetDingTalkProcess(processdic[processCode]);
|
|
|
|
|
}
|
|
|
|
|
else { return new DingTalkProcess(); }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class DingTalkApp_诚锐东胜对接 : DingTalkApp
|
|
|
|
|
{
|
|
|
|
|
public DingTalkApp_诚锐东胜对接()
|
|
|
|
|
{
|
|
|
|
|
token = "CWhvNvfyuNf9D8halMs5PyHV70CrFx3E";
|
|
|
|
|
aes_key = "O5u6L8YnUaucnC8FyFNMeMeGE5uoYSAGFGdg3rOHftt";
|
|
|
|
|
appkey = "dingkt5caipnn4fbuqsf";
|
|
|
|
|
agentid = 2365401074;
|
|
|
|
|
deptid = 432400353;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static DingTalkProcess GetDingTalkProcess(string processname)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
var result = new DingTalkProcess();
|
|
|
|
|
if (processname == "诚锐入货通知")
|
|
|
|
|
{
|
|
|
|
|
result = new DingTalkProcess_诚锐入库(processname);
|
|
|
|
@ -791,6 +1074,45 @@ namespace DSWeb.Areas.MvcShipping.Helper
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
new public static DingTalkProcess GetDingTalkProcessByProcessCode(string processCode)
|
|
|
|
|
{
|
|
|
|
|
var processdic = new Dictionary<string, string> {
|
|
|
|
|
{ "PROC-0888A19C-0562-42AC-A9C6-24E4C4398410","诚锐入货通知"}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
if (processdic.ContainsKey(processCode))
|
|
|
|
|
{
|
|
|
|
|
return GetDingTalkProcess(processdic[processCode]);
|
|
|
|
|
}
|
|
|
|
|
else { return new DingTalkProcess(); }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class DingTalkProcess: DingTalkApp
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public string processname { get; set; }
|
|
|
|
|
public string processCode { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//public string callbackstr { get; set; }
|
|
|
|
|
|
|
|
|
|
public DingTalkCallbackDealHelper callbackinfo { get; set; }
|
|
|
|
|
|
|
|
|
|
public void SaveCallBack(CallBackInfo _callbackinfo) {
|
|
|
|
|
callbackinfo = new DingTalkCallbackDealHelper(_callbackinfo);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public DingTalkProcess() { }
|
|
|
|
|
public DingTalkProcess(string processname) { this.processname = processname; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 这些数值来自于钉钉中某个组织的某个应用。一个应用可以监听多个实际业务的返回值
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="processname"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public virtual DBResult DoDeal() { return new DBResult(); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -799,12 +1121,14 @@ namespace DSWeb.Areas.MvcShipping.Helper
|
|
|
|
|
public DingTalkProcess_测试入货通知(string processname)
|
|
|
|
|
{
|
|
|
|
|
this.processname = processname;
|
|
|
|
|
|
|
|
|
|
//token = "zbGFOwrH6zCvq3VE3izLmWRTNUC1YcX";
|
|
|
|
|
//aes_key = "sb6GkCKsUwNQo3RKbX1MzHKea1ZsE221n3xQ9hwJBMK";
|
|
|
|
|
//appkey = "dingsaofiohmsrcbxyef";
|
|
|
|
|
//agentid = 2298782307;
|
|
|
|
|
|
|
|
|
|
processCode = "PROC-0DC40EA2-E9D2-4917-A597-AD77EC055C49";
|
|
|
|
|
token = "zbGFOwrH6zCvq3VE3izLmWRTNUC1YcX";
|
|
|
|
|
aes_key = "sb6GkCKsUwNQo3RKbX1MzHKea1ZsE221n3xQ9hwJBMK";
|
|
|
|
|
appkey = "dingsaofiohmsrcbxyef";
|
|
|
|
|
agentid = 2298782307;
|
|
|
|
|
agentid = 809181118;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -823,17 +1147,20 @@ namespace DSWeb.Areas.MvcShipping.Helper
|
|
|
|
|
{
|
|
|
|
|
public DingTalkProcess_诚锐入库(string processname) {
|
|
|
|
|
this.processname = processname;
|
|
|
|
|
|
|
|
|
|
//token = "CWhvNvfyuNf9D8halMs5PyHV70CrFx3E";
|
|
|
|
|
//aes_key = "O5u6L8YnUaucnC8FyFNMeMeGE5uoYSAGFGdg3rOHftt";
|
|
|
|
|
//appkey = "dingkt5caipnn4fbuqsf";
|
|
|
|
|
//agentid = 2365401074;
|
|
|
|
|
|
|
|
|
|
processCode = "PROC-0888A19C-0562-42AC-A9C6-24E4C4398410";
|
|
|
|
|
token = "CWhvNvfyuNf9D8halMs5PyHV70CrFx3E";
|
|
|
|
|
aes_key = "O5u6L8YnUaucnC8FyFNMeMeGE5uoYSAGFGdg3rOHftt";
|
|
|
|
|
appkey = "dingkt5caipnn4fbuqsf";
|
|
|
|
|
agentid = 2365401074;
|
|
|
|
|
deptid = 432400353;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override DBResult DoDeal()
|
|
|
|
|
{
|
|
|
|
|
return new DBResult();
|
|
|
|
|
//return new DBResult();
|
|
|
|
|
return callbackinfo.ReadDingtalkInstanceinfo();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|