master
wet 2 years ago
parent 12f9ef90f8
commit a0e93ec7e1

@ -59,7 +59,7 @@ namespace djy.IService.Ams
string SaveTemplate(AMS_AddrTemplate dto, User user);
List<AMS_AddrTemplate> GetTemplate(User user, string type,string TemPlateName);
byte[] PDF(string GID);
byte[] PDF(string ids);
}
}

@ -63,5 +63,9 @@ namespace djy.IService.Isf
/// <param name="docType"></param>
/// <returns></returns>
Task<Response> SendDE(string Gid, User user, string msgType);
Response SaveReceipt(string msg );
}
}

@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace djy.Model.IsfDto
{
public class ISFReceipt
{
/// <summary>
///
/// </summary>
public string businessId { get; set; }
/// <summary>
///
/// </summary>
public string AMSBLNumber { get; set; }
/// <summary>
///
/// </summary>
public string status { get; set; }
/// <summary>
///
/// </summary>
public string content { get; set; }
/// <summary>
///
/// </summary>
public string businessDate { get; set; }
}
}

@ -130,8 +130,8 @@ namespace djy.Service.Ams
string guid = "";
List<string> hblist = null;
hblist = dto.HouseDto.Select(x => x.HBLNo).ToList();
var mlist= DbBus.Get(DbList.AMSCenter).Select<AMS_Master>().Where(x => x.IsDel != true && x.MBLNO == dto.MBLNO&&x.GID!=dto.GID).ToOne();
var hlist = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => x.IsDel != true && hblist.Contains(x.HBLNo)).ToOne();
var mlist= DbBus.Get(DbList.AMSCenter).Select<AMS_Master>().Where(x => x.IsDel != true && x.MBLNO == dto.MBLNO && x.GID!=dto.GID).ToOne();
var hlist = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => x.IsDel != true && hblist.Contains(x.HBLNo)&& x.PID!=dto.GID).ToOne();
if (mlist!=null|| hlist!=null)
{
return "-1";
@ -322,7 +322,7 @@ namespace djy.Service.Ams
, 0);
if (!getfinrs.Status)
{
req.Code = 200;
req.Code = 201;
req.Message = getfinrs.Message;
return req;
}
@ -636,12 +636,12 @@ namespace djy.Service.Ams
if (master.NewNotice == "修改发送成功")
{
DbBus.Get(DbList.AMSCenter).Update<AMS_Master>().Set(w => new AMS_Master { MateState = retdto.status, NewNotice = "匹配失败", ReportState = "删单失败" }).Where(w => w.GID == master.GID).ExecuteAffrows();
DbBus.Get(DbList.AMSCenter).Update<AMS_Master>().Set(w => new AMS_Master { MateState = retdto.status, NewNotice = "匹配失败", ReportState = "修改失败" }).Where(w => w.GID == master.GID).ExecuteAffrows();
}
if (master.NewNotice == "重发发送成功" || master.NewNotice == "新增发送成功")
{
DbBus.Get(DbList.AMSCenter).Update<AMS_Master>().Set(w => new AMS_Master { MateState = retdto.status, NewNotice = "匹配失败", ReportState = "删单失败" }).Where(w => w.GID == master.GID).ExecuteAffrows();
DbBus.Get(DbList.AMSCenter).Update<AMS_Master>().Set(w => new AMS_Master { MateState = retdto.status, NewNotice = "匹配失败", ReportState = "接收失败" }).Where(w => w.GID == master.GID).ExecuteAffrows();
}
}
@ -900,8 +900,9 @@ namespace djy.Service.Ams
/// </summary>
/// <param name="GID"></param>
/// <returns></returns>
public byte[] PDF(string GID)
public byte[] PDF(string ids)
{
string[] id = ids.Split(',');
Document document = new Document(PageSize.A4);
//指定字体文件IDENTITY_H支持中文
var path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "msyh.ttc,0");
@ -914,14 +915,13 @@ namespace djy.Service.Ams
PdfWriter writer = PdfWriter.GetInstance(document, baos);
document.Open();
///获取数据源
var houselist = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => x.PID == GID).ToList();
var masterlist = DbBus.Get(DbList.AMSCenter).Select<AMS_Master>().Where(x => x.GID == GID).ToOne();
var houselist = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => id.Contains(x.GID)).ToList();
var cARRIERIDList = DbBus.Get(DbList.Common).Select<MappingCarrier>().Where(map => map.Module == "AMS").ToList();
if (houselist != null && masterlist != null)
if (houselist != null)
{
for (int i = 0; i < houselist.Count(); i++)
{
var masterlist = DbBus.Get(DbList.AMSCenter).Select<AMS_Master>().Where(x => x.GID == houselist[i].PID).ToOne();
string heardText = "NIAV" + houselist[i].HBLNo + " ISF INFORMATION";
Paragraph heardTexts = new Paragraph(heardText, font);
heardTexts.IndentationLeft = 150;

@ -17,9 +17,9 @@ using System.Threading.Tasks;
namespace djy.Service.Isf
{
public class IsfService : ServBase, IIsfService
public class IsfService : ServBase, IIsfService
{
#region 查询接口
public TableData Load(ISFQuery req, User user)
{
@ -32,11 +32,11 @@ namespace djy.Service.Isf
}
var dto = DbBus.Get(DbList.AMSCenter).Select<ISF_Master>().
Where(x => x.IsDel != true && x.CompID == user.CompId).
WhereIf(req.MBLNO != null,x=> x.MBLNO.Contains(req.MBLNO)).
WhereIf(req.InFoType != null, x => x.InFoType==req.InFoType).
WhereIf(req.MBLNO != null, x => x.MBLNO.Contains(req.MBLNO)).
WhereIf(req.InFoType != null, x => x.InFoType == req.InFoType).
WhereIf(req.ReportState != null && req.ReportState != "0" && req.ReportState != "1", x => ReportStates.Contains(x.ReportState)).
WhereIf(req.ReportState == "0", x => x.ReportState == "未申报" || x.ReportState == "删单成功" || x.ReportState == "接收失败").
WhereIf(req.ReportState == "1", x => !(x.ReportState == "未申报" || x.ReportState == "删单成功" || x.ReportState == "接收失败"));
WhereIf(req.ReportState == "1", x => !(x.ReportState == "未申报" || x.ReportState == "删单成功" || x.ReportState == "接收失败"));
result.count = dto.ToList().Count();
var list = dto.Page(req.Page, req.Limit).ToList<ISFDto>();
if (list != null)
@ -60,7 +60,7 @@ namespace djy.Service.Isf
{
string guid = "";
var mlist = DbBus.Get(DbList.AMSCenter).Select<ISF_Master>().Where(x => x.IsDel != true && x.MBLNO == dto.MBLNO && x.GID != dto.GID).ToOne();
if (mlist != null )
if (mlist != null)
{
return "-1";
@ -109,7 +109,7 @@ namespace djy.Service.Isf
}
else
{
DbBus.Get(DbList.AMSCenter).Transaction(() =>
{
@ -124,7 +124,7 @@ namespace djy.Service.Isf
master.ShipmentTypeName = dto.ShipmentTypeName;
master.HstCode = dto.HstCode;
master.BlTypeCode = dto.BlTypeCode;
master.BlTypeName= dto.BlTypeName;
master.BlTypeName = dto.BlTypeName;
master.LastUpdate = DateTime.Now;
DbBus.Get(DbList.AMSCenter).Update<ISF_Master>().SetSource(master).ExecuteAffrows();
DbBus.Get(DbList.AMSCenter).Delete<ISF_Company>().Where(w => w.PID == master.GID).ExecuteAffrows();
@ -168,7 +168,7 @@ namespace djy.Service.Isf
{
if (oid != "")
{
DbBus.Get(DbList.AMSCenter).Transaction(() =>
{
ISF_MasterHistory history = new ISF_MasterHistory();
@ -182,7 +182,7 @@ namespace djy.Service.Isf
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
DbBus.Get(DbList.AMSCenter).Update<ISF_Master>().Set(w => w.IsDel, true).Where(w => w.GID == oid).ExecuteAffrows();
DbBus.Get(DbList.AMSCenter).Update<ISF_Company>().Set(w => w.IsDel, true).Where(w => w.PID == oid).ExecuteAffrows();
});
}
}
@ -192,13 +192,13 @@ namespace djy.Service.Isf
#region 获取模板
public List<ISF_CompanyTemplate> GetTemplate(User user, string CompanyType, string InFoType,string TemPlateName)
public List<ISF_CompanyTemplate> GetTemplate(User user, string CompanyType, string InFoType, string TemPlateName)
{
try
{
var List = DbBus.Get(DbList.AMSCenter).Select<ISF_CompanyTemplate>().
Where(x=> x.IsDel == false || x.IsDel == null).
Where(x => x.UserID== user.GID).
Where(x => x.IsDel == false || x.IsDel == null).
Where(x => x.UserID == user.GID).
WhereIf(CompanyType != null, x => x.CompanyType == CompanyType).
WhereIf(InFoType != null, x => x.InFoType == InFoType).
WhereIf(TemPlateName != null, x => TemPlateName.Contains(x.TemPlateName)).
@ -218,7 +218,7 @@ namespace djy.Service.Isf
public string SaveTemplate(ISF_CompanyTemplate dto, User user)
{
string guid = "";
var list = DbBus.Get(DbList.AMSCenter).Select<ISF_CompanyTemplate>().Where(w => w.UserID == user.GID && w.TemPlateName == dto.TemPlateName && w.CompanyType == dto.CompanyType&& w.InFoType == dto.InFoType&&w.GID!=dto.GID).ToOneAsync();
var list = DbBus.Get(DbList.AMSCenter).Select<ISF_CompanyTemplate>().Where(w => w.UserID == user.GID && w.TemPlateName == dto.TemPlateName && w.CompanyType == dto.CompanyType && w.InFoType == dto.InFoType && w.GID != dto.GID).ToOneAsync();
if (!list.IsNullOrEmpty())
{
return "-1";
@ -238,7 +238,8 @@ namespace djy.Service.Isf
DbBus.Get(DbList.AMSCenter).Insert(template).ExecuteAffrows();
guid = template.GID;
}
else {
else
{
ISF_CompanyTemplate template = dto.MapTo<ISF_CompanyTemplate>();
@ -252,13 +253,13 @@ namespace djy.Service.Isf
#region 第三方接口
public async Task<Response> SendDE(string Gid, User user , string msgType)
public async Task<Response> SendDE(string Gid, User user, string msgType)
{
Response req = new Response();
try
{
string[] id = Gid.Split(',');
foreach (string oid in id)
{
if (oid != "")
@ -269,45 +270,45 @@ namespace djy.Service.Isf
var comlist = DbBus.Get(DbList.AMSCenter).Select<ISF_Company>().Where(x => (x.IsDel == false || x.IsDel == null) && x.PID == oid).ToList();
if (msgType != "3")
{
if (msgType == "4" && !(master.ReportState == "已删除" || master.MateState == "匹配失败"))
{
req.Code = 200;
req.Message = "当前状态不能重发!如有疑问,请联系相关客服!";
return req;
}
//if (msgType == "1" || msgType == "4")
//{
// ///扣费接口
// var getfinrs = fin.Expend(new CustFee
// {
// SENDUSERID = userid,
// LURURENID = userid,
// CtnrCount = 1,
// CtnrInfo = string.Empty,
// BSTYPE = 16,
// SENDTYPE = 0,
// BSNO = oid.ToString(),
// MBLNO = master.MBLNO.ToString(),
// }
// , 0);
// if (!getfinrs.Status)
// {
// req.Code = 200;
// req.Message = getfinrs.Message;
// return req;
// }
//}
if (msgType == "1" || msgType == "4")
{
///扣费接口
var getfinrs = fin.Expend(new CustFee
{
SENDUSERID = user.GID,
LURURENID = user.GID,
CtnrCount = 1,
CtnrInfo = string.Empty,
BSTYPE = 16,
SENDTYPE = 0,
BSNO = oid.ToString(),
MBLNO = master.MBLNO.ToString(),
}
, 0);
if (!getfinrs.Status)
{
req.Code = 201;
req.Message = getfinrs.Message;
return req;
}
}
var portList = DbBus.Get(DbList.Common).Select<CodePort>().ToList();
var CodePortLoadList = DbBus.Get(DbList.Common).Select<CodePortLoad>().ToList();
Info info = new Info();
info.masterBillNo = master.MBLNO;
info.infoType = master.InFoType;
info.dischargeHarbourCode = portList.Where(x => x.Code == master.DischargeHarbourCode).Select(x => x.EdiCode).FirstOrDefault();
info.deliveryHarbourCode = portList.Where(x => x.Code == master.DeliveryHarbourCode).Select(x => x.EdiCode).FirstOrDefault();
info.dischargeHarbourCode = portList.Where(x => x.Code == master.DischargeHarbourCode).Select(x => x.EdiCode).FirstOrDefault();
info.deliveryHarbourCode = portList.Where(x => x.Code == master.DeliveryHarbourCode).Select(x => x.EdiCode).FirstOrDefault();
info.shipmentTypeCode = master.ShipmentTypeCode;
info.hstCode = master.HstCode;
info.blTypeCode = master.BlTypeCode;
info.refId = master.GID;
List<CompanyList> companyList = new List<CompanyList>();
@ -317,24 +318,25 @@ namespace djy.Service.Isf
{
companyType = item.CompanyType,
companyName = item.CompanyName,
idTypeCode=item.IdTypeCode,
address=item.Address,
city=item.City,
province=item.Province,
provinceCode=item.ProvinceCode,
countryCode=item.ProvinceCode,
postcode=item.PostCode,
hstCode=item.HstCode,
idTypeCode = item.IdTypeCode,
address = item.Address,
city = item.City,
province = item.Province,
provinceCode = item.ProvinceCode,
countryCode = item.ProvinceCode,
postcode = item.PostCode,
hstCode = item.HstCode,
});
}
var timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
var AMSAccount = DbBus.Get(DbList.djydb).Select<ParamSet>().Where(x => x.PARAMNAME == "AMSAccount").ToOne();
var method = DbBus.Get(DbList.djydb).Select<ParamSet>().Where(x => x.PARAMNAME == "ISFMethod").ToOne();
var key = DbBus.Get(DbList.djydb).Select<ParamSet>().Where(x => x.PARAMNAME == "AMSKEY").ToOne();
var url = DbBus.Get(DbList.djydb).Select<ParamSet>().Where(x => x.PARAMNAME == "AMSURL").ToOne();
/////MD5加密
string stringSign = string.Format("companyList={0}&format=json&info={1}&method=eportyun.manifest.isf.sendBill&msgType={2}&timestamp={3}&user_id=nbforwarder&version=2.0&key=2dde55e422d2461b913f510e95da73b3",
JsonConvert.SerializeObject(companyList), JsonConvert.SerializeObject(info), Convert.ToInt32(msgType),timestamp);
string stringSign = string.Format("companyList={0}&format=json&info={1}&method={2}&msgType={3}&timestamp={4}&user_id={5}&version=2.0&key={6}",
JsonConvert.SerializeObject(companyList), JsonConvert.SerializeObject(info), method.PARAMVALUE, Convert.ToInt32(msgType), timestamp, AMSAccount.PARAMVALUE, key.PARAMVALUE);
string sign = stringSign.ToMd5().ToUpper();
///post参数
@ -342,7 +344,7 @@ namespace djy.Service.Isf
isfinfo.companyList = companyList;
isfinfo.format = "json";
isfinfo.info = info;
isfinfo.method = "eportyun.manifest.isf.sendBill";
isfinfo.method = method.PARAMVALUE;
isfinfo.msgType = Convert.ToInt32(msgType);
isfinfo.user_id = AMSAccount.PARAMVALUE;
isfinfo.sign = sign;
@ -351,14 +353,18 @@ namespace djy.Service.Isf
isfinfo.format = "json";
string json = JsonConvert.SerializeObject(isfinfo);
_LogsAdd("SendDE", "post", $"ISF接口调用发送{oid}{json}");
string gethtml = await HttpHelp.Post(isfinfo, "http://api.trainer.nbeport.com/router/rest", PsotType.Json);
string gethtml = await HttpHelp.Post(isfinfo, url.PARAMVALUE, PsotType.Json);
_LogsAdd("SendDE", "post", $"ISF接口调用返回{oid}{gethtml}");
if (gethtml != null)
{
JObject rlt = JObject.Parse(gethtml);
var code = rlt.GetValue("code").ToString();
var msg = rlt.GetValue("msg").ToString();
if (code == "F")
var data = rlt.GetValue("data").ToString();
JObject drlt = JObject.Parse(data);
var result = drlt.GetValue("code").ToString();
var errorInfo = drlt.GetValue("msg").ToString();
if (code == "F" || result != "1")
{
ISF_MasterHistory history = new ISF_MasterHistory();
@ -389,11 +395,11 @@ namespace djy.Service.Isf
history.Operator = user.SHOWNAME;
history.Remark = user.SHOWNAME + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "发送单据失败,失败原因:" + msg;
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
req.Code = 200;
req.Message = "操作失败," + msg;
req.Code = 201;
req.Message = "操作失败," + msg + errorInfo;
return req;
}
if (code == "T")
if (code == "T" && result == "1")
{
ISF_MasterHistory history = new ISF_MasterHistory();
history.GID = Guid.NewGuid().ToString("N");
@ -426,34 +432,34 @@ namespace djy.Service.Isf
if (msgType == "1")
{
// var getfinrs = fin.Expend(new CustFee
// {
// SENDUSERID = userid,
// LURURENID = userid,
// CtnrCount = 1,
// CtnrInfo = string.Empty,
// BSTYPE = 16,
// SENDTYPE = 0,
// BSNO = oid.ToString(),
// MBLNO = master.MBLNO.ToString(),
// }
//, 1);
var getfinrs = fin.Expend(new CustFee
{
SENDUSERID = user.GID,
LURURENID = user.GID,
CtnrCount = 1,
CtnrInfo = string.Empty,
BSTYPE = 16,
SENDTYPE = 0,
BSNO = oid.ToString(),
MBLNO = master.MBLNO.ToString(),
}
, 1);
DbBus.Get(DbList.AMSCenter).Update<ISF_Master>().Set(w => new ISF_Master { ReportState = "已提交", NewNotice = "新增发送成功" }).Where(w => w.GID == oid).ExecuteAffrows();
}
else if (msgType == "4")
{
// var getfinrs = fin.Expend(new CustFee
// {
// SENDUSERID = userid,
// LURURENID = userid,
// CtnrCount = 1,
// CtnrInfo = string.Empty,
// BSTYPE = 16,
// SENDTYPE = 0,
// BSNO = oid.ToString(),
// MBLNO = master.MBLNO.ToString(),
// }
//, 1);
var getfinrs = fin.Expend(new CustFee
{
SENDUSERID = user.GID,
LURURENID = user.GID,
CtnrCount = 1,
CtnrInfo = string.Empty,
BSTYPE = 16,
SENDTYPE = 0,
BSNO = oid.ToString(),
MBLNO = master.MBLNO.ToString(),
}
, 1);
DbBus.Get(DbList.AMSCenter).Update<ISF_Master>().Set(w => new ISF_Master { ReportState = "已提交", NewNotice = "重发发送成功" }).Where(w => w.GID == oid).ExecuteAffrows();
}
@ -468,9 +474,6 @@ namespace djy.Service.Isf
}
}
}
}
}
}
@ -486,6 +489,114 @@ namespace djy.Service.Isf
}
}
public Response SaveReceipt(string msg)
{
_LogsAdd("ISFReceipt", "post", $"ISF接口推送{msg}");
Response req = new Response();
try
{
if (msg != null)
{
ISFReceipt retdto = Json.JsonToObject<ISFReceipt>(msg);
var master = DbBus.Get(DbList.AMSCenter).Select<ISF_Master>().Where(x => x.GID == retdto.businessId).ToOne();
if (retdto.status == "SI")
{
ISF_MasterHistory history = new ISF_MasterHistory();
history.GID = Guid.NewGuid().ToString("N");
history.ISF_ID = master.GID;
history.SendTime = DateTime.Now;
history.State = "匹配失败";
history.Type = "匹配失败";
history.Operator = "系统管理员";
history.Remark = "您的明细单据" + retdto.businessId + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "匹配失败";
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
//if (master.NewNotice == "删除发送成功")
//{
// DbBus.Get(DbList.AMSCenter).Update<ISF_Master>().Set(w => new AMS_Master { MateState = retdto.status, NewNotice = "匹配失败", ReportState = "删单失败" }).Where(w => w.GID == master.GID).ExecuteAffrows();
//}
//if (master.NewNotice == "修改发送成功")
//{
// DbBus.Get(DbList.AMSCenter).Update<ISF_Master>().Set(w => new AMS_Master { MateState = retdto.status, NewNotice = "匹配失败", ReportState = "删单失败" }).Where(w => w.GID == master.GID).ExecuteAffrows();
//}
if (master.NewNotice == "重发发送成功" || master.NewNotice == "新增发送成功")
{
DbBus.Get(DbList.AMSCenter).Update<ISF_Master>().Set(w => new AMS_Master { MateState = retdto.status, NewNotice = "匹配失败", ReportState = "接收成功" }).Where(w => w.GID == master.GID).ExecuteAffrows();
}
}
else if (retdto.status == "02")
{
ISF_MasterHistory history = new ISF_MasterHistory();
history.GID = Guid.NewGuid().ToString("N");
history.ISF_ID = master.GID;
history.SendTime = DateTime.Now;
history.State = "删除成功";
history.Type = "删除成功";
history.Operator = "系统管理员";
history.Remark = "您的单据于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "海关删除成功";
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
DbBus.Get(DbList.AMSCenter).Update<ISF_Master>().Set(w => new AMS_Master { MateState = retdto.status, NewNotice = "ISF和AMS匹配成功", ReportState = "删单失败" }).Where(w => w.GID == master.GID).ExecuteAffrows();
}
else if (retdto.status == "01")
{
ISF_MasterHistory history = new ISF_MasterHistory();
history.GID = Guid.NewGuid().ToString("N");
history.ISF_ID = master.GID;
history.SendTime = DateTime.Now;
history.State = "海关拒绝";
history.Type = "删除成功";
history.Operator = "系统管理员";
history.Remark = "您的单据于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "海关拒绝";
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
DbBus.Get(DbList.AMSCenter).Update<ISF_Master>().Set(w => new AMS_Master { MateState = retdto.status, NewNotice = "海关拒绝", ReportState = "删单失败" }).Where(w => w.GID == master.GID).ExecuteAffrows();
}
else if (retdto.status == "SB"|| retdto.status == "S2" || retdto.status == "S3" || retdto.status == "S4" || retdto.status == "S5" || retdto.status == "S6")
{
ISF_MasterHistory history = new ISF_MasterHistory();
history.GID = Guid.NewGuid().ToString("N");
history.ISF_ID = master.GID;
history.SendTime = DateTime.Now;
history.State = "未匹配AMS";
history.Type = "未匹配AMS";
history.Operator = "系统管理员";
history.Remark = "您的单据于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "海关拒绝";
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
DbBus.Get(DbList.AMSCenter).Update<ISF_Master>().Set(w => new AMS_Master { MateState = retdto.status, NewNotice = "未匹配AMS", ReportState = "删单失败" }).Where(w => w.GID == master.GID).ExecuteAffrows();
}
}
else
{
req.Code = 200;
req.Message = "未收到参数";
return req;
}
}
catch (Exception ex)
{
req.Code = 500;
req.Message = ex.InnerException?.Message ?? ex.Message;
_LogsAdd("SendDE", "post", $"AMS_SaveReceipt接口{req.Message }");
return req;
}
req.Code = 200;
req.Message = "请求成功";
return req;
}
#endregion
}
}

@ -42,7 +42,7 @@ namespace djy_AmsApi.Controllers.AMS
#region 新增/编辑
[HttpPost("AddOrUpdate")]
public Response AddOrUpdate(AMSDto Dto)
public Response AddOrUpdate([FromBody] AMSDto Dto)
{
var result = new Response();
var user = GetUserInfo();
@ -68,6 +68,7 @@ namespace djy_AmsApi.Controllers.AMS
return result;
}
#endregion
#region 删除
/// <summary>
/// 删除接口
@ -343,9 +344,9 @@ namespace djy_AmsApi.Controllers.AMS
#region pdf导出
[HttpGet("ExportPDF")]
public IActionResult ExportPDF(String Gid)
public IActionResult ExportPDF(string ids)
{
byte[] bytes = ser.PDF(Gid);
byte[] bytes = ser.PDF(ids);
return File(bytes, "application/octet-stream");
}
#endregion

@ -51,7 +51,6 @@ namespace djy_AmsApi.Controllers
if (rs.Status)
{
return rs.Data;
}
else {
return null;

File diff suppressed because one or more lines are too long

@ -159,10 +159,7 @@ namespace djy_AmsApi
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

@ -67,7 +67,7 @@ namespace djy_Isfpi.Controllers
{
var _suser = IOC.AddServer<IDjyUserService>();
if (UserGid == null)
{ UserGid = GetLoginId; }
{ UserGid = "d85fd590-d9f6-4410-93a1-f6fac77b606e".ToGuid(); }
var rs = _suser.GetUserInfo(UserGid.ToString());
if (rs.Status)
{

@ -173,7 +173,15 @@ namespace djy_Isfpi.Controllers.ISF
req.Message = result.Result.Message;
return req;
}
[AllowAnonymous]
[HttpPost("Receipt")]
public Response SaveReceipt([FromForm] string msg)
{
return ser.SaveReceipt(msg);
}
#endregion
}
}

@ -5,6 +5,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Project>
<PropertyGroup>
<_PublishTargetUrl>F:\DJY.AMS\web\djy_IsfApi\bin\Release\net5.0\publish\</_PublishTargetUrl>
<History>True|2022-06-29T08:34:08.2367476Z;</History>
<History>True|2022-06-30T07:28:48.8212173Z;True|2022-06-30T15:07:27.8048719+08:00;True|2022-06-30T14:23:02.1357807+08:00;True|2022-06-30T14:07:07.8696769+08:00;True|2022-06-30T09:14:19.1360602+08:00;True|2022-06-29T16:34:08.2367476+08:00;</History>
</PropertyGroup>
</Project>
Loading…
Cancel
Save