master
wet 3 years ago
parent ed3d5b3791
commit 71e075bf6a

@ -1104,6 +1104,11 @@
<param name="DataStr">需要加入到验证拼接的字符串</param>
<returns></returns>
</member>
<member name="P:Common.DJYModel.ParamSet.GID">
<summary>
主键
</summary>
</member>
<member name="T:Common.DJYModel.tb_JobLogs">
<summary>
Job请求日志
@ -5169,12 +5174,12 @@
系统基础配置来于系统json配置文件
</summary>
</member>
<member name="P:Common.sysOptionConfig.YsWeixinConfig">
<member name="P:Common.sysOptionConfig.WeixinConfig">
<summary>
微信配置
</summary>
</member>
<member name="P:Common.sysOptionConfig.YsQiniuconfig">
<member name="P:Common.sysOptionConfig.Qiniuconfig">
<summary>
七牛云存储配置
</summary>

@ -9,7 +9,10 @@
/// 操作消息【当Status不为 200时显示详细的错误信息】
/// </summary>
public string Message { get; set; }
/// <summary>
/// 返回data
/// </summary>
public string data { get; set; }
/// <summary>
/// 操作状态码200为正常
/// </summary>

@ -22,7 +22,7 @@ namespace djy.Paas.IService
/// </summary>
/// <param name="dto"></param>
/// <param name="userid"></param>
void SaveInfo(AMSDto dto,string userid);
string SaveInfo(AMSDto dto,string userid);
/// <summary>
/// 查询
/// </summary>

@ -21,6 +21,7 @@ using System.Security.Cryptography;
using System.Text.Encodings.Web;
using Common.Tools;
using System.Web;
using Newtonsoft.Json.Linq;
namespace djy.Service.Ams
{
@ -89,8 +90,9 @@ namespace djy.Service.Ams
});
}
public void SaveInfo(AMSDto dto, string userid)
public string SaveInfo(AMSDto dto, string userid)
{
string guid="";
var user = DbBus.Get(DbList.djydb).Select<User>().Where(w => w.GID == userid).ToOne();
if (dto.GID.IsNull())
{
@ -141,7 +143,10 @@ namespace djy.Service.Ams
}
}
}
guid = master.GID;
});
return guid;
}
else
{
@ -183,7 +188,9 @@ namespace djy.Service.Ams
}
}
}
guid = master.GID;
});
return guid;
}
}
@ -363,9 +370,36 @@ namespace djy.Service.Ams
jobj.ToString().ToBase64(), method.PARAMVALUE, DateTime.Now.ToString("yyyyMMdd") + GenerateRandomNo(),
AMSAccount.PARAMVALUE, HttpUtility.UrlEncode(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), Encoding.UTF8),
sign, jobj.ToString().Length);
await HttpHelp.Post(json, url.PARAMVALUE, PsotType.Urlencoded);
string gethtml = await HttpHelp.Post(json, url.PARAMVALUE, PsotType.Urlencoded);
if (gethtml!=null)
{
JObject rlt = JObject.Parse(gethtml);
var code= rlt.GetValue("code").ToString();
if (code=="F") {
AMS_MasterHistory history = new AMS_MasterHistory();
history.GID = Guid.NewGuid().ToString("N");
history.AM_ID = oid;
history.SendTime = DateTime.Now;
history.State = "发送失败";
history.Type = "发送";
history.Operator = user.SHOWNAME;
history.Remark = user.SHOWNAME + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "发送了单据";
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
}
if (code == "T")
{
AMS_MasterHistory history = new AMS_MasterHistory();
history.GID = Guid.NewGuid().ToString("N");
history.AM_ID = oid;
history.SendTime = DateTime.Now;
history.State = "发送成功";
history.Type = "发送";
history.Operator = user.SHOWNAME;
history.Remark = user.SHOWNAME + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "发送了单据";
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
}
}
}
}
}
catch (Exception e)

@ -30,7 +30,7 @@ namespace djy_AmsApi.Controllers
result.Code = 500;
result.Message = "无效数据!";
}
ser.SaveInfo(Dto, "d85fd590-d9f6-4410-93a1-f6fac77b606e");
result.data=ser.SaveInfo(Dto, "d85fd590-d9f6-4410-93a1-f6fac77b606e");
return result;
}

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save