|
|
|
@ -2408,7 +2408,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
|
|
|
|
|
if (WorkFlowid == "") WorkFlowid = "no";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var headdata = ChpayapplicationDAL.GetData(" BILLNO='" + bill + "'", USERID, usercode, companyid);
|
|
|
|
|
|
|
|
|
|
Resultmb WorkResult = WorkFlowDAL.WorkFlowStart(WorkFlowName, bill, USERID,bill, bill,"", WorkFlowid);
|
|
|
|
|
|
|
|
|
@ -2445,7 +2445,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (result.Success) {
|
|
|
|
|
var _r = FanWeiOA_Submit(bill, USERID, usercode, companyid);
|
|
|
|
|
var _r = FanWeiOA_Submit(headdata, USERID, usercode, companyid);
|
|
|
|
|
|
|
|
|
|
if (!_r.Success)
|
|
|
|
|
{
|
|
|
|
@ -2455,6 +2455,14 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
var requestid = result.Data.ToString();
|
|
|
|
|
|
|
|
|
|
var cmdupdate = db.GetSqlStringCommand("update ch_fee_payapplication set PAYAPPID='"+ requestid + "' where BILLNO=@BILLNO");
|
|
|
|
|
cmdupdate.Parameters.Clear();
|
|
|
|
|
db.AddInParameter(cmdupdate, "@BILLNO", DbType.String, bill);
|
|
|
|
|
db.ExecuteNonQuery(cmdupdate, tran);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
tran.Commit();
|
|
|
|
|
}
|
|
|
|
@ -2509,11 +2517,11 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
var oacommitList = new List<string>();
|
|
|
|
|
var oacommitList = new List<ChPayapplication>();
|
|
|
|
|
|
|
|
|
|
foreach (var bill in billList)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
var headdata = ChpayapplicationDAL.GetData(" BILLNO='" + bill + "'", USERID, usercode, companyid);
|
|
|
|
|
var isclose = false;
|
|
|
|
|
if (FEECLOSEPAYAUTOAUDIT.PARAMVALUE == "1")
|
|
|
|
|
{
|
|
|
|
@ -2599,7 +2607,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
|
|
|
|
|
result.Success = true;
|
|
|
|
|
result.Message = "提交审核成功";
|
|
|
|
|
|
|
|
|
|
oacommitList.Add(bill);
|
|
|
|
|
oacommitList.Add(headdata);
|
|
|
|
|
//FanWeiOA_Submit(bill, USERID, usercode, companyid);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -2613,8 +2621,8 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var bill in oacommitList) {
|
|
|
|
|
var _r =FanWeiOA_Submit(bill, USERID, usercode, companyid);
|
|
|
|
|
foreach (var headdata in oacommitList) {
|
|
|
|
|
var _r =FanWeiOA_Submit(headdata, USERID, usercode, companyid);
|
|
|
|
|
|
|
|
|
|
if (!_r.Success) {
|
|
|
|
|
tran.Rollback();
|
|
|
|
@ -2623,6 +2631,15 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
var requestid = _r.Data.ToString();
|
|
|
|
|
|
|
|
|
|
var cmdupdate = db.GetSqlStringCommand("update ch_fee_payapplication set PAYAPPID='" + requestid + "' where BILLNO=@BILLNO");
|
|
|
|
|
cmdupdate.Parameters.Clear();
|
|
|
|
|
db.AddInParameter(cmdupdate, "@BILLNO", DbType.String, headdata.BILLNO);
|
|
|
|
|
db.ExecuteNonQuery(cmdupdate, tran);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tran.Commit();
|
|
|
|
@ -2644,11 +2661,34 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 撤回提交
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="WorkFlowName"></param>
|
|
|
|
|
/// <param name="USERID"></param>
|
|
|
|
|
/// <param name="bill"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public static DBResult SubmitAuditBack(string WorkFlowName, String USERID, String bill)
|
|
|
|
|
{
|
|
|
|
|
var result = new DBResult();
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if (ConfigurationManager.AppSettings["FanWeiOAAPI"] == "true")
|
|
|
|
|
{
|
|
|
|
|
result = new DBResult();
|
|
|
|
|
result.Success = false;
|
|
|
|
|
result.Message = "现行逻辑不允许执行撤回提交!";
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
finally { }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Database db = DatabaseFactory.CreateDatabase();
|
|
|
|
|
using (var conn = db.CreateConnection())
|
|
|
|
|
{
|
|
|
|
@ -2932,7 +2972,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static DBResult FanWeiOA_Submit(string bill, string userid, string usercode, string companyid)
|
|
|
|
|
public static DBResult FanWeiOA_Submit(ChPayapplication headdata, string userid, string usercode, string companyid)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
var result = new DBResult();
|
|
|
|
@ -2948,7 +2988,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
|
|
|
|
|
{
|
|
|
|
|
//泛微OAHelper.GetToken();
|
|
|
|
|
|
|
|
|
|
var headdata = ChpayapplicationDAL.GetData(" BILLNO='" + bill + "'", userid, usercode, companyid);
|
|
|
|
|
//var headdata = ChpayapplicationDAL.GetData(" BILLNO='" + bill + "'", userid, usercode, companyid);
|
|
|
|
|
|
|
|
|
|
//var userid = Convert.ToString(Session["USERID"]);
|
|
|
|
|
//var usercode = Convert.ToString(Session["CODENAME"]);
|
|
|
|
|