copy from WebAPI/Controllers/XSGL/YF_PayMentOtherBillController.cs
copy to WebAPI/Controllers/XSGL/Xs_SellOutChangeBillController.cs
File was copied from WebAPI/Controllers/XSGL/YF_PayMentOtherBillController.cs |
| | |
| | | |
| | | namespace WebAPI.Controllers |
| | | { |
| | | //其他应付单Controller |
| | | public class YF_PayMentOtherBillController : ApiController |
| | | //销售调价单Controller |
| | | public class Xs_SellOutChangeBillController : ApiController |
| | | { |
| | | //其他应付单 |
| | | //获取系统参数 YF_PayMentOtherBillMain YF_PayMentOtherBill |
| | | //获取系统参数 |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | public DBUtility.ClsPub.Enum_BillStatus BillStatus; |
| | | public DAL.ClsYF_PayMentOtherBill BillOld = new DAL.ClsYF_PayMentOtherBill(); |
| | | public DAL.ClsYF_PayMentOtherBill BillNew0 = new DAL.ClsYF_PayMentOtherBill(); |
| | | public DAL.ClsXs_SellOutChangeBill BillOld = new DAL.ClsXs_SellOutChangeBill(); |
| | | public DAL.ClsXs_SellOutChangeBill BillNew0 = new DAL.ClsXs_SellOutChangeBill(); |
| | | |
| | | private json objJsonResult = new json(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds; |
| | | |
| | | #region 其他应付单列表 查询 |
| | | #region 销售调价单列表 查询 |
| | | /// <summary> |
| | | /// 返回项目阶段列表 |
| | | ///参数:string sql。 |
| | | ///返回值:object。 |
| | | /// </summary> |
| | | [Route("YF_PayMentOtherBill/YF_PayMentOtherBillMainList")] |
| | | [Route("Xs_SellOutChangeBill/list")] |
| | | [HttpGet] |
| | | public object YF_PayMentOtherBillMainList(string sWhere, string user) |
| | | public object getXs_SellOutChangeBill(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //查看权限 |
| | | if (!DBUtility.ClsPub.Security_Log("YF_PayMentOtherBill_Qty", 1, false, user)) |
| | | if (!DBUtility.ClsPub.Security_Log("Xs_SellOutChangeBill_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_YF_PayMentOtherBillMainList order by 单据号 desc", "h_v_YF_PayMentOtherBillMainList"); |
| | | ds = oCN.RunProcReturn("select * from h_v_Xs_SellOutChangeBillList_Query order by 单据号 desc", "h_v_Xs_SellOutChangeBillList_Query"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_YF_PayMentOtherBillMainList where 1 = 1 "; |
| | | string sql1 = "select * from h_v_Xs_SellOutChangeBillList_Query where 1 = 1 "; |
| | | string sql = sql1 + sWhere + " order by 单据号 desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_YF_PayMentOtherBillMainList"); |
| | | ds = oCN.RunProcReturn(sql, "h_v_Xs_SellOutChangeBillList_Query"); |
| | | } |
| | | |
| | | //添加列名 |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 其他应付单保存 新增/编辑 |
| | | [Route("YF_PayMentOtherBill/SaveYF_PayMentOtherBillMain")] |
| | | #region 销售调价单保存 新增/编辑 |
| | | [Route("Xs_SellOutChangeBill/SaveXs_SellOutChangeBill")] |
| | | [HttpPost] |
| | | public object SaveYF_PayMentOtherBillMain([FromBody] JObject msg) |
| | | public object SaveXs_SellOutChangeBill([FromBody] JObject msg) |
| | | { |
| | | var _value = msg["msg"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); //表头数据 |
| | | string refSav = sArray[1].ToString(); //操作方式 |
| | | string msg4 = sArray[2].ToString(); //用户 |
| | | string msg3 = sArray[1].ToString(); //子表1数据 |
| | | string refSav = sArray[2].ToString(); //操作方式 |
| | | string msg4 = sArray[3].ToString(); //用户 |
| | | |
| | | DBUtility.ClsPub.CurUserName = msg4; |
| | | |
| | |
| | | try |
| | | { |
| | | //编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log_second("YF_PayMentOtherBill_Edit", 1, false, msg4)) |
| | | if (!DBUtility.ClsPub.Security_Log_second("Xs_SellOutChangeBill_Edit", 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | DAL.ClsYF_PayMentOtherBill oBill = new DAL.ClsYF_PayMentOtherBill(); |
| | | List<Model.ClsYF_PayMentOtherBillMain> lsmain = new List<Model.ClsYF_PayMentOtherBillMain>(); |
| | | DAL.ClsXs_SellOutChangeBill oBill = new DAL.ClsXs_SellOutChangeBill(); |
| | | List<Model.ClsXs_SellOutChangeBillMain> lsmain = new List<Model.ClsXs_SellOutChangeBillMain>(); |
| | | msg2 = msg2.Replace("\\", ""); |
| | | msg2 = msg2.Replace("\n", ""); //\n |
| | | lsmain = oListModels.getObjectByJson_YF_PayMentOtherBillMain(msg2); |
| | | foreach (Model.ClsYF_PayMentOtherBillMain oItem in lsmain) |
| | | lsmain = oListModels.getObjectByJson_Xs_SellOutChangeBillMain(msg2); |
| | | foreach (Model.ClsXs_SellOutChangeBillMain oItem in lsmain) |
| | | { |
| | | if (refSav == "Add") |
| | | { |
| | |
| | | } |
| | | } |
| | | UserName = oItem.HMaker; //制单人 |
| | | oItem.HBillType = "2102"; |
| | | oItem.HBillSubType = "2102"; |
| | | |
| | | oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); |
| | | oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month); |
| | | oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd")); |
| | | |
| | | if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "") |
| | | { |
| | |
| | | oBill.omodel = oItem; |
| | | } |
| | | |
| | | |
| | | //表体数据 |
| | | //按 },{来拆分数组 //去掉【和】 |
| | | msg3 = msg3.Substring(1, msg3.Length - 2); |
| | | msg3 = msg3.Replace("\\", ""); |
| | | msg3 = msg3.Replace("\n", ""); //\n |
| | | //msg2 = msg2.Replace("'", "’"); |
| | | List<Model.ClsXs_SellOutChangeBillSub> ls = new List<Model.ClsXs_SellOutChangeBillSub>(); |
| | | ls = oListModels.getObjectByJson_Xs_SellOutChangeBillSub(msg3); |
| | | int i = 0; |
| | | foreach (Model.ClsXs_SellOutChangeBillSub oItemSub in ls) |
| | | { |
| | | i++; |
| | | oItemSub.HEntryID = i; |
| | | |
| | | //oItemSub.HCloseMan = ""; //行关闭 |
| | | //oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); |
| | | //oItemSub.HCloseType = false; //关闭类型 |
| | | //oItemSub.HRemark = ""; //备注 |
| | | |
| | | //oItemSub.HSourceInterID = 0; // 源单主内码 |
| | | //oItemSub.HSourceEntryID = 0; //源单子内码 |
| | | //oItemSub.HSourceBillNo = ""; //源单单号 |
| | | //oItemSub.HSourceBillType = ""; //源单类型 |
| | | //oItemSub.HRelationQty = 0; //关联数量 |
| | | //oItemSub.HRelationMoney = 0; //关联金额 |
| | | oBill.DetailColl.Add(oItemSub); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | //保存 |
| | | //保存完毕后处理 |
| | | bool bResult; |
| | | if (refSav == "Add") |
| | | { |
| | | |
| | | // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | else if (refSav == "Update") |
| | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "保存成功!"; |
| | | //WebAPIController.Add_Log("送货单下推", UserName, "生成送货单"); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 其他应付单 编辑页面初始化 |
| | | [Route("YF_PayMentOtherBill/YF_PayMentOtherBillMainEditList")] |
| | | #region 销售调价单 编辑页面初始化 |
| | | [Route("Xs_SellOutChangeBill/cx")] |
| | | [HttpGet] |
| | | public object YF_PayMentOtherBillMainEditList(long HInterID) |
| | | public object cx(long HInterID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_YF_PayMentOtherBillMainList where hmainid=" + HInterID, "h_v_YF_PayMentOtherBillMainList"); |
| | | ds = oCN.RunProcReturn("select * from h_v_Xs_SellOutChangeBillList where hmainid=" + HInterID, "h_v_Xs_SellOutChangeBillList"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 其他应付单 删除 |
| | | #region 销售调价单 删除 |
| | | /// <summary> |
| | | ///参数:string HInterID。 |
| | | ///返回值:object。 |
| | | /// </summary> |
| | | [Route("YF_PayMentOtherBill/DeleteYF_PayMentOtherBillMain")] |
| | | [Route("Xs_SellOutChangeBill/delete")] |
| | | [HttpGet] |
| | | public object DeleteYF_PayMentOtherBillMain(string HInterID, string user) |
| | | public object deleteXs_SellOutChangeBill(string HInterID, string user) |
| | | { |
| | | try |
| | | { |
| | | string s = ""; |
| | | |
| | | //查看权限 |
| | | if (!DBUtility.ClsPub.Security_Log("YF_PayMentOtherBill_Drop", 1, false, user)) |
| | | if (!DBUtility.ClsPub.Security_Log("Xs_SellOutChangeBill_Drop", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | } |
| | | |
| | | //删除前控制========================================= |
| | | string sql1 = "exec h_p_YF_PayMentOtherBill_BeforeDelCtrl " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'"; |
| | | ds = oCN.RunProcReturn(sql1, "h_p_YF_PayMentOtherBill_BeforeDelCtrl"); |
| | | string sql1 = "exec h_p_Xs_SellOutChangeBill_BeforeDelCtrl " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'"; |
| | | ds = oCN.RunProcReturn(sql1, "h_p_Xs_SellOutChangeBill_BeforeDelCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | } |
| | | //================================================================================== |
| | | |
| | | |
| | | |
| | | oCN.BeginTran(); |
| | | |
| | | oCN.RunProc("delete from YF_PayMentOtherBillMain where HInterID = " + HInterID); |
| | | oCN.RunProc("delete from YF_PayMentOtherBillSub where HInterID= " + HInterID); |
| | | oCN.RunProc("delete from Xs_SellOutChangeBillMain where HInterID = " + HInterID); |
| | | oCN.RunProc("delete from Xs_SellOutChangeBillSub where HInterID= " + HInterID); |
| | | |
| | | //删除后控制================================================================================== |
| | | string sql2 = "exec h_p_YF_PayMentOtherBill_AfterDelCtrl " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'"; |
| | | ds = oCN.RunProcReturn(sql2, "h_p_YF_PayMentOtherBill_AfterDelCtrl"); |
| | | string sql2 = "exec h_p_Xs_SellOutChangeBill_AfterDelCtrl " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'"; |
| | | ds = oCN.RunProcReturn(sql2, "h_p_Xs_SellOutChangeBill_AfterDelCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | s = "删除后判断失败,请与网络管理人员联系"; |
| | |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除成功"; |
| | | objJsonResult.Message = "删除成功!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 其他应付单 审核/反审核 |
| | | #region 销售调价单 审核/反审核 |
| | | /// <summary> |
| | | /// </summary> |
| | | /// <param name="HInterID">单据ID</param> |
| | | /// <param name="IsAudit">审核(0),反审核(1)</param> |
| | | /// <param name="CurUserName">审核人</param> |
| | | /// <returns></returns> |
| | | [Route("YF_PayMentOtherBill/AuditYF_PayMentOtherBillMain")] |
| | | [Route("Xs_SellOutChangeBill/AuditXs_SellOutChangeBill")] |
| | | [HttpGet] |
| | | public object AuditYF_PayMentOtherBillMain(int HInterID, int IsAudit, string CurUserName) |
| | | public object AuditXs_SellOutChangeBill(int HInterID, int IsAudit, string CurUserName) |
| | | { |
| | | string ModRightNameCheck = "YF_PayMentOtherBill_Check"; |
| | | string ModRightNameCheck = "Xs_SellOutChangeBill_Check"; |
| | | DBUtility.ClsPub.CurUserName = CurUserName; |
| | | try |
| | | { |
| | |
| | | |
| | | Int64 lngBillKey = 0; |
| | | lngBillKey = DBUtility.ClsPub.isLong(HInterID); //对HInterID进行类型的转换 |
| | | DAL.ClsYF_PayMentOtherBill oBill = new DAL.ClsYF_PayMentOtherBill(); //实例化单据操作类,用于进行相关操作 |
| | | DAL.ClsXs_SellOutChangeBill oBill = new DAL.ClsXs_SellOutChangeBill(); //实例化单据操作类,用于进行相关操作 |
| | | |
| | | //针对需要进行的操作,检验当前单据的状态是否支持需要进行的操作 |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //根据HInterID获取该单据的数据 |
| | |
| | | //进行需要进行的审核/反审核操作 |
| | | if (IsAudit == 0) //审核提交 |
| | | { |
| | | oCN.BeginTran(); |
| | | //检验子表数据 |
| | | string errorMessage = ""; |
| | | foreach (Model.ClsXs_SellOutChangeBillSub oSub in oBill.DetailColl) |
| | | { |
| | | ////判断新数量是否小于单据关联数量 |
| | | //if (oSub.HQty_New < oSub.HRelationQty) |
| | | //{ |
| | | // errorMessage += "物料新数量小于单据被关联数量!"; |
| | | //} |
| | | } |
| | | if (errorMessage != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "审核失败!原因:" + errorMessage; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //记录返回信息 |
| | | string msg = ""; |
| | | |
| | | |
| | | //检查源单是否存在 |
| | | string sql = "select * from Kf_ICStockBillMain where HInterID = " + oBill.omodel.HMainSourceInterID; |
| | | ds = oCN.RunProcReturn(sql, "Kf_ICStockBillMain"); |
| | | if(ds==null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "审核失败!原因:源单数据不存在!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else if (ds.Tables[0].Rows[0]["HBillStatus"].ToString() != "2") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "审核失败!原因:源单未处于审核状态!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //审核前控制========================================= |
| | | string sql1 = "exec h_p_YF_PayMentOtherBill_BeforeCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'"; |
| | | ds = oCN.RunProcReturn(sql1, "h_p_YF_PayMentOtherBill_BeforeCheckCtrl"); |
| | | string sql1 = "exec h_p_Xs_SellOutChangeBill_BeforeCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'"; |
| | | ds = oCN.RunProcReturn(sql1, "h_p_Xs_SellOutChangeBill_BeforeCheckCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "审核失败!原因:审核前判断失败,请与网络管理人员联系"; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | //================================================================================== |
| | | |
| | | oCN.BeginTran(); |
| | | ////反写源单数据 |
| | | sql = "exec h_p_Xs_SellOutChangeBill_ReWriteBySellOutChangeBill " + oBill.omodel.HInterID; |
| | | oCN.RunProc(sql); |
| | | |
| | | //信用控制 |
| | | ds = oCN.RunProcReturn("exec h_p_Kf_CheckSellOutBill_CrediControl " + oBill.omodel.HMainSourceInterID, "h_p_Kf_CheckSellOutBill_CrediControl"); |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() == "1") |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //审核提交 |
| | | if (oBill.CheckBill(oBill.omodel.HInterID,oBill.omodel.HBillNo, "h_p_YF_PayMentOtherBill_AfterCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | if (oBill.CheckBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Xs_SellOutChangeBill_AfterCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | oCN.Commit(); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "审核成功!" + msg; |
| | | objJsonResult.Message = "审核成功"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | } |
| | | if (IsAudit == 1) //反审核提交 |
| | | { |
| | | |
| | | //反审核前控制========================================= |
| | | string sql1 = "exec h_p_YF_PayMentOtherBill_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'"; |
| | | ds = oCN.RunProcReturn(sql1, "h_p_YF_PayMentOtherBill_BeforeUnCheckCtrl"); |
| | | string sql1 = "exec h_p_Xs_SellOutChangeBill_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'"; |
| | | ds = oCN.RunProcReturn(sql1, "h_p_Xs_SellOutChangeBill_BeforeUnCheckCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //=========================================================== |
| | | //=========================================================== |
| | | |
| | | |
| | | //反审核提交AbandonCheck |
| | | if (oBill.AbandonCheck(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_YF_PayMentOtherBill_AfterUnCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | if (oBill.AbandonCheck(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Xs_SellOutChangeBill_AfterUnCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 其他应付单 关闭/反关闭 |
| | | #region 销售调价单 关闭/反关闭 |
| | | /// <summary> |
| | | /// </summary> |
| | | /// <param name="HInterID">单据ID</param> |
| | | /// <param name="IsAudit">关闭(0),反关闭(1)</param> |
| | | /// <param name="CurUserName">关闭人</param> |
| | | /// <returns></returns> |
| | | [Route("YF_PayMentOtherBill/CloseYF_PayMentOtherBill")] |
| | | [Route("Xs_SellOutChangeBill/CloseXs_SellOutChangeBill")] |
| | | [HttpGet] |
| | | public object CloseYF_PayMentOtherBill(int HInterID, int IsAudit, string CurUserName) |
| | | public object CloseSc_ICMOChangeBill(int HInterID, int IsAudit, string CurUserName) |
| | | { |
| | | string ModRightNameCheck = "YF_PayMentOtherBill_Close"; |
| | | string ModRightNameCheck = "Xs_SellOutChangeBill_Close"; |
| | | DBUtility.ClsPub.CurUserName = CurUserName; |
| | | try |
| | | { |
| | |
| | | |
| | | Int64 lngBillKey = 0; |
| | | lngBillKey = DBUtility.ClsPub.isLong(HInterID); //对HInterID进行类型的转换 |
| | | DAL.ClsYF_PayMentOtherBill oBill = new DAL.ClsYF_PayMentOtherBill(); //实例化单据操作类,用于进行相关操作 |
| | | DAL.ClsXs_SellOutChangeBill oBill = new DAL.ClsXs_SellOutChangeBill(); //实例化单据操作类,用于进行相关操作 |
| | | |
| | | //针对需要进行的操作,检验当前单据的状态是否支持需要进行的操作 |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //根据HInterID获取该单据的数据 |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 其他应付单 作废/反作废 |
| | | #region 销售调价单 作废/反作废 |
| | | /// <summary> |
| | | /// </summary> |
| | | /// <param name="HInterID">单据ID</param> |
| | | /// <param name="IsAudit">作废(0),反作废(1)</param> |
| | | /// <param name="CurUserName">作废人</param> |
| | | /// <returns></returns> |
| | | [Route("YF_PayMentOtherBill/DeleteYF_PayMentOtherBill")] |
| | | [Route("Xs_SellOutChangeBill/DeleteXs_SellOutChangeBill")] |
| | | [HttpGet] |
| | | public object DeleteYF_PayMentOtherBill(int HInterID, int IsAudit, string CurUserName) |
| | | public object DeleteSc_ICMOChangeBill(int HInterID, int IsAudit, string CurUserName) |
| | | { |
| | | string ModRightNameCheck = "YF_PayMentOtherBill_Delete"; |
| | | string ModRightNameCheck = "Xs_SellOutChangeBill_Delete"; |
| | | DBUtility.ClsPub.CurUserName = CurUserName; |
| | | try |
| | | { |
| | |
| | | |
| | | Int64 lngBillKey = 0; |
| | | lngBillKey = DBUtility.ClsPub.isLong(HInterID); //对HInterID进行类型的转换 |
| | | DAL.ClsYF_PayMentOtherBill oBill = new DAL.ClsYF_PayMentOtherBill(); //实例化单据操作类,用于进行相关操作 |
| | | DAL.ClsXs_SellOutChangeBill oBill = new DAL.ClsXs_SellOutChangeBill(); //实例化单据操作类,用于进行相关操作 |
| | | |
| | | //针对需要进行的操作,检验当前单据的状态是否支持需要进行的操作 |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //根据HInterID获取该单据的数据 |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | } |
| | | } |