DS7_JinGang
hanxuntao 1 year ago
commit 8afbc696e0

@ -25,8 +25,10 @@ namespace DSWeb.Common.DB
/// <summary> /// <summary>
/// 泛微OA 审核结果 /// 泛微OA 审核结果
/// 20230531 修改表名为view_workflowbase
/// 原为view_pjrequestbas
/// </summary> /// </summary>
[Table("view_pjrequestbas")] [Table("view_workflowbase")]
public class view_pjrequestbas_md public class view_pjrequestbas_md
{ {

File diff suppressed because one or more lines are too long

@ -1826,13 +1826,8 @@ namespace DSWeb.Areas.Account.Controllers
if (head.INVITERFACE == "诺诺全电发票") if (head.INVITERFACE == "诺诺全电发票")
{ {
//redhead仅用于向诺诺全电红字申请单接口发送用
//redhead = AutoMapperHelper.MapTo<ChInvoice_HangXin, ChInvoice_HangXin>(head);
redhead.GID = System.Guid.NewGuid().ToString(); redhead.GID = System.Guid.NewGuid().ToString();
redhead.BILLNO = PubSysDAL.GetBillNo("0308"); //redhead.BILLNO = PubSysDAL.GetBillNo("0308");
redhead.PTORRED = "2"; // 开票类型 红票 redhead.PTORRED = "2"; // 开票类型 红票
redhead.redReason = redReason; redhead.redReason = redReason;
@ -1854,10 +1849,8 @@ namespace DSWeb.Areas.Account.Controllers
redhead.REMARK = REDREMARK_Quandian(redhead); redhead.REMARK = REDREMARK_Quandian(redhead);
//红字申请单申请编号 即为发票业务编号 到时候红票的订单编号也是这个
//
//head.billUuid = redhead.BILLNO;
} }
} }
var modb = new ModelObjectDB(); var modb = new ModelObjectDB();
@ -1949,9 +1942,12 @@ namespace DSWeb.Areas.Account.Controllers
//如非成功和15 则返回错误 并清空billuuid //如非成功和15 则返回错误 并清空billuuid
//2 如果ch_fee_invoice.billuuid无值 则重新产生值并发出红字确认单 //2 如果ch_fee_invoice.billuuid无值 则重新产生值并发出红字确认单
//此时head.billUuid如果不为空 代表是第一次冲红 //此时head.billUuid如果不为空 代表已有红字申请单
if (!string.IsNullOrWhiteSpace(head.billUuid))//&& if (!string.IsNullOrWhiteSpace(head.billUuid))//&&
{ {
redhead.BILLNO = redhead.billUuid;
var _r = hx.ReadRedConfirm(ref redhead, detailList); var _r = hx.ReadRedConfirm(ref redhead, detailList);
if (!_r.Success) if (!_r.Success)
@ -1960,6 +1956,8 @@ namespace DSWeb.Areas.Account.Controllers
} }
else else
{ {
//var hx = 诺诺全电发票.getHelper(head.TAXCODE); //var hx = 诺诺全电发票.getHelper(head.TAXCODE);
if (!hx.CanUse) if (!hx.CanUse)
{ {
@ -1973,7 +1971,7 @@ namespace DSWeb.Areas.Account.Controllers
// var _r = TokenPage(); // var _r = TokenPage();
// return _r; // return _r;
//} //}
result = hx.ReadInvoice(head); result = hx.ReadInvoice(redhead);
if (!result.Success) if (!result.Success)
{ {
@ -1990,9 +1988,9 @@ namespace DSWeb.Areas.Account.Controllers
returndate = ChinvoiceDAL.GetData(" BILLNO='" + head.BILLNO + "'"); returndate = ChinvoiceDAL.GetData(" BILLNO='" + head.BILLNO + "'");
if (head.PTORRED == "2") if (redhead.PTORRED == "2")
{ {
ChinvoiceDAL.SetRed(head); ChinvoiceDAL.SetRed(redhead);
//将原票内的申请和费用恢复原状 //将原票内的申请和费用恢复原状
//var BlueInvoice = ChinvoiceDAL.GetData(" cm.INVOICECODE='" + head.REDCODE + "' and cm.INVOICENO='" + head.REDNUM + "'"); //var BlueInvoice = ChinvoiceDAL.GetData(" cm.INVOICECODE='" + head.REDCODE + "' and cm.INVOICENO='" + head.REDNUM + "'");
@ -2023,7 +2021,13 @@ namespace DSWeb.Areas.Account.Controllers
} }
else else
{ {
//head.billUuid如果不为空 代表还没发红字申请单
//获取红票信息并发出
redhead.BILLNO = PubSysDAL.GetBillNo("0308");
head.billUuid = redhead.BILLNO; head.billUuid = redhead.BILLNO;
result = hx.PostRedConfirm(redhead, ref head, detailList); result = hx.PostRedConfirm(redhead, ref head, detailList);
} }
//诺诺全电票根据红字申请单的结果读取确认单 //诺诺全电票根据红字申请单的结果读取确认单

@ -3282,10 +3282,10 @@ string swcn = "2020030084935", string swpw = "8a5889ea8e53b257e2a3ba053979ee64"
} }
MBLNO = opapplyhead.MBLNO; MBLNO = opapplyhead.MBLNO;
var updateseai = false; var updateseai = false;
var opseaiheadList = MsOpSeaiDAL.GetDataAll(" ((isnull(MBLNO,'')<>'' and MBLNO='" + MBLNO + "' ) or ((isnull(CUSTOMNO,'')<>'' and CUSTOMNO='" + CUSTOMNO + "')) "); var opseaiheadList = MsOpSeaiDAL.GetDataAll(" ((isnull(MBLNO,'')<>'' and MBLNO='" + MBLNO + "' ) or (isnull(CUSTOMNO,'')<>'' and CUSTOMNO='" + CUSTOMNO + "') )");
//if (!string.IsNullOrEmpty(opseaihead.CUSTNO) && !opseaihead.BSSTATUS) updateseai = true; //if (!string.IsNullOrEmpty(opseaihead.CUSTNO) && !opseaihead.BSSTATUS) updateseai = true;
var opseaihead = new MsOpSeai(); var opseaihead = new MsOpSeai();
if (opseaiheadList == null || (opseaiheadList != null && opseaiheadList.Count > 1)) if (opseaiheadList == null || opseaiheadList.Count==0 ||(opseaiheadList != null && opseaiheadList.Count > 1))
{ {
updateseai = false; updateseai = false;
} }

Loading…
Cancel
Save