20230109-1

DS7_JinGang
ddlucky 2 years ago
parent 544e405828
commit 82410aea01

@ -20,11 +20,11 @@ namespace DSWeb.Service.Output
//配置了舱单数据输出到ds7的公司自动将舱单数据发送到消息队列 //配置了舱单数据输出到ds7的公司自动将舱单数据发送到消息队列
public class JobFanWeiToDS7 : IJob public class JobFanWeiToDS7 : IJob
{ {
private const string ExchangeName = "output"; //private const string ExchangeName = "output";
private const string QueuePrefix = "djy.output.cangdan.ds7."; //private const string QueuePrefix = "djy.output.cangdan.ds7.";
private ILog log = LogManager.GetLogger(typeof(JobFanWeiToDS7)); private ILog log = LogManager.GetLogger(typeof(JobFanWeiToDS7));
private string rabbitUri = ConfigurationManager.AppSettings["OutputDS7MQUri"]; //private string rabbitUri = ConfigurationManager.AppSettings["OutputDS7MQUri"];
string OAconnStr = ConfigurationManager.AppSettings["OAconnStr"]; string OAconnStr = ConfigurationManager.AppSettings["OAconnStr"];
string DS7connStr = ConfigurationManager.AppSettings["DS7connStr"]; string DS7connStr = ConfigurationManager.AppSettings["DS7connStr"];
@ -51,7 +51,7 @@ namespace DSWeb.Service.Output
//从dc1中寻找这些id的业务的审核结果 //从dc1中寻找这些id的业务的审核结果
var List = dc1.view_pjrequestbas.Where(x => x.workflowid == 79 && x.currentnodetype == "3" && idList.Contains(x.requestid.ToString())).ToList(); var List = dc1.view_pjrequestbas.Where(x => x.workflowid == 79 && x.currentnodetype == "3" && idList.Contains(x.requestid.ToString())).ToList();
var AuditGidlistStr = ""; //var AuditGidlistStr = "";
foreach (var item in List) foreach (var item in List)
{ {

@ -218,8 +218,8 @@ namespace DSWeb.Areas.CommMng.Controllers
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
} }
//[System.Web.Mvc.HttpPost] [System.Web.Mvc.HttpPost]
public HttpResponseMessage DingdingCallback(string signature, string timestamp, string nonce) public string DingdingCallback(string signature, string timestamp, string nonce)
{ {
//JeffSoft.Logger.Error("DingdingCallback Success:" + signature + "," + timestamp + ""); //JeffSoft.Logger.Error("DingdingCallback Success:" + signature + "," + timestamp + "");
@ -233,7 +233,7 @@ namespace DSWeb.Areas.CommMng.Controllers
strJson.Append(line); strJson.Append(line);
} }
BasicDataRefDAL.SaveLog("["+signature+"]["+ timestamp+"]["+ nonce+"]"+"["+ strJson + "]", Session["USERID"].ToString(), "钉钉回调", "保存"); //BasicDataRefDAL.SaveLog("["+signature+"]["+ timestamp+"]["+ nonce+"]"+"["+ strJson + "]", "admin", "钉钉回调", "保存");
//反序列化json串拿去加密字符串 //反序列化json串拿去加密字符串
var objRtn = Newtonsoft.Json.JsonConvert.DeserializeAnonymousType(strJson.ToString(), new { encrypt = "" }); var objRtn = Newtonsoft.Json.JsonConvert.DeserializeAnonymousType(strJson.ToString(), new { encrypt = "" });
@ -245,8 +245,13 @@ namespace DSWeb.Areas.CommMng.Controllers
//定义字符串接收解密后的值 //定义字符串接收解密后的值
string text = dingTalkEncryptor.getDecryptMsg(signature, timestamp, nonce, ever); string text = dingTalkEncryptor.getDecryptMsg(signature, timestamp, nonce, ever);
//JeffSoft.Logger.Error("dingTalkEncryptor.getDecryptMsg:" + text + ""); //JeffSoft.Logger.Error("dingTalkEncryptor.getDecryptMsg:" + text + "");
BasicDataRefDAL.SaveLog( text , "admin", "钉钉回调", "保存1");
var objRtn2 = Newtonsoft.Json.JsonConvert.DeserializeAnonymousType(text.ToString(), new { EventType = "" }); var objRtn2 = Newtonsoft.Json.JsonConvert.DeserializeAnonymousType(text.ToString(), new { EventType = "" });
var _jsstr = JsonConvert.Serialize(objRtn2);
BasicDataRefDAL.SaveLog(_jsstr, "admin", "钉钉回调", "保存2");
//取出事件类型字段 //取出事件类型字段
//JeffSoft.Logger.Error("DingdingCallback Success,EventType:" + EventType + ""); //JeffSoft.Logger.Error("DingdingCallback Success,EventType:" + EventType + "");
//第二部分 //第二部分
@ -258,6 +263,10 @@ namespace DSWeb.Areas.CommMng.Controllers
var DDtitle = DingCallBackMsg.title; var DDtitle = DingCallBackMsg.title;
var DDresult = DingCallBackMsg.result; var DDresult = DingCallBackMsg.result;
var mes = string.Format("bpms_instance_change Success,title:{0},result:{1}", DDtitle, DDresult); var mes = string.Format("bpms_instance_change Success,title:{0},result:{1}", DDtitle, DDresult);
var _jsstr3 = JsonConvert.Serialize(objRtn2);
BasicDataRefDAL.SaveLog(_jsstr, "admin", "钉钉回调", "保存3");
//JeffSoft.Logger.Error(mes); //JeffSoft.Logger.Error(mes);
} }
@ -279,11 +288,7 @@ namespace DSWeb.Areas.CommMng.Controllers
// return Json(obj); // return Json(obj);
var data = Newtonsoft.Json.JsonConvert.SerializeObject(v); var data = Newtonsoft.Json.JsonConvert.SerializeObject(v);
//返回json数 return data;
return new HttpResponseMessage()
{
Content = new StringContent(data, Encoding.UTF8, "application/json"),
};
} }
} }

@ -1043,7 +1043,7 @@ namespace DSWeb.Areas.Dispatch.Controllers
#endregion #endregion
[System.Web.Mvc.HttpPost] [System.Web.Mvc.HttpPost]
public HttpResponseMessage DingdingCallback(string signature, string timestamp, string nonce) public JsonResult DingdingCallback(string signature, string timestamp, string nonce)
{ {
//JeffSoft.Logger.Error("DingdingCallback Success:" + signature + "," + timestamp + ""); //JeffSoft.Logger.Error("DingdingCallback Success:" + signature + "," + timestamp + "");
//第一部分 //第一部分

@ -14129,7 +14129,7 @@ namespace DSWeb.MvcShipping.Controllers
{ {
//20221228 增加对船公司的判断 如在select * from code_cust_edi where EDINAME='接口直发VGM'中没有这个船公司 则还走原路径 //20221228 增加对船公司的判断 如在select * from code_cust_edi where EDINAME='接口直发VGM'中没有这个船公司 则还走原路径
var headlist = MsOpSeaeDAL.GetDataList(" BSNO='" + bsno + "'", Convert.ToString(Session["USERID"]), Convert.ToString(Session["CODENAME"]), Convert.ToString(Session["COMPANYID"])); var headlist = MsOpSeaeDAL.GetDataList(" BSNO='" + bsno + "'", Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]));
var _carrier = headlist[0].CARRIER; var _carrier = headlist[0].CARRIER;
var cdc = new CommonDataContext(); var cdc = new CommonDataContext();
var = cdc.code_cust_edi.Where(x => x.EDINAME == "接口直发VGM" && x.CUST == _carrier).ToList(); var = cdc.code_cust_edi.Where(x => x.EDINAME == "接口直发VGM" && x.CUST == _carrier).ToList();

Loading…
Cancel
Save