新增网页工资结算单(个人)新增模块、生产入库单列表模块相关调用方法
| | |
| | | { |
| | | DetailColl = null; |
| | | } |
| | | |
| | | |
| | | #endregion èªå®ä¹æ¹æ³ |
| | | |
| | | //ä¿ååæ§å¶ |
| | | public bool BeforeSave(Int64 HInterID, string HBillNo, Int64 OperationType, ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | DataSet Ds = oCn.RunProcReturn("Exec h_p_Pay_SingleBalBill_BeforeSaveCtrl " + HInterID.ToString() + ",'" + HBillNo + "'," + OperationType.ToString(), "h_p_Pay_SingleBalBill_BeforeSaveCtrl"); |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sReturn = "ä¿ååå¤æå¤±è´¥ï¼"; |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HBack"]) == 1) |
| | | { |
| | | sReturn = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]); |
| | | return false; |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | //ä¿ååæ§å¶ |
| | | public bool AfterSave(Int64 HInterID, string HBillNo, Int64 OperationType, ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | DataSet Ds = oCn.RunProcReturn("Exec h_p_Pay_SingleBalBill_AfterSaveCtrl " + HInterID.ToString() + ",'" + HBillNo + "'," + OperationType.ToString(), "h_p_Pay_SingleBalBill_AfterSaveCtrl"); |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sReturn = "ä¿ååå¤æå¤±è´¥ï¼"; |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HBack"]) == 1) |
| | | { |
| | | sReturn = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]); |
| | | return false; |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | //ä¿®æ¹åæ® |
| | | public override bool ModifyBill(Int64 lngBillKey, ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | // |
| | | oCn.BeginTran(); |
| | | //ä¿ååæ§å¶ |
| | | if (!BeforeSave(lngBillKey, omodel.HBillNo, 2, ref sReturn)) |
| | | { |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | //æ´æ°ä¸»è¡¨ |
| | | oCn.RunProc("UpDate Pay_SingleBalBillMain set " + |
| | | " HBillNo='" + omodel.HBillNo + "'" + //åºå®èµå¼=============== |
| | |
| | | ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" + |
| | | ",HUpDateDate=getdate()" + |
| | | //======================================== |
| | | ",HGroupID=" + omodel.HGroupID.ToString() + |
| | | ",HDeptID=" + omodel.HDeptID.ToString() + |
| | | ",HGroupID=" + omodel.HGroupID.ToString() + |
| | | ",HEmpID=" + omodel.HEmpID.ToString() + |
| | | ",HPayType=" + omodel.HPayType.ToString() + |
| | | ",HPayType='" + omodel.HPayType + "'" + |
| | | ",HExplanation='" + omodel.HExplanation + "'" + |
| | | ",HInnerBillNo='" + omodel.HInnerBillNo + "'" + |
| | | ",HStockOrgID=" + omodel.HSTOCKORGID.ToString() + |
| | | " where HInterID=" + lngBillKey.ToString()); |
| | | //å é¤å
³è |
| | | DeleteRelation(ref sReturn, lngBillKey); |
| | |
| | | foreach (Model.ClsPay_SingleBalBillSub oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Pay_SingleBalBillSub " + |
| | | " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HMaterID,HProcID,HEmpID,HSourceID,HTimes,HQty,HPrice,HSqty" + |
| | | ",HMoney,HICMOInterID,HICMOBillNo,HProcReportInterID,HProcReportEntryID,HProcReportBillNo" + |
| | | " (HInterID,HEntryID,HRemark,HRelationQty,HRelationMoney" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" + |
| | | ",HMaterID,HProcID,HSourceID,HEmpID,HTimes,HQty" + |
| | | ",HPrice,HPackQty,HPackPrice,HPackMoney,HPackMaterID,HPriceRate" + |
| | | ",HSubsidyID,HSubsidyTotal,HDeuctID,HDeuctTotal,HSubsidyQty,HSubsidyMoney,HMoney" + |
| | | ",HICMOInterID,HICMOEntryID,HICMOBillNo,HProcReportInterID,HProcReportEntryID,HProcReportBillNo" + |
| | | ",HProcPlanInterID,HProcPlanEntryID,HProcPlanBillNo" + |
| | | ",HPriceRate,HSubsidyTotal,HDeuctTotal,HSubsidyID,HDeuctID" + |
| | | ",HPackQty,HPackPrice,HPackMoney,HPackMaterID,HSubsidyQty,HSubsidyMoney" + |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" + |
| | | "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + |
| | | "," + oSub.HMaterID.ToString() + "," + oSub.HProcID.ToString() + "," + oSub.HEmpID.ToString() + "," + oSub.HSourceID.ToString() |
| | | + "," + oSub.HTimes.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HSqty.ToString() + |
| | | "," + oSub.HMoney.ToString() + "," + oSub.HICMOInterID.ToString() + ",'" + oSub.HICMOBillNo + "'," + oSub.HProcReportInterID.ToString() + "," + oSub.HProcReportEntryID.ToString() + ",'" + oSub.HProcReportBillNo + "'" + |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HRemark + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + |
| | | "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'" + |
| | | "," + oSub.HMaterID.ToString() + "," + oSub.HProcID.ToString() + "," + oSub.HSourceID.ToString() + "," + oSub.HEmpID.ToString() + "," + oSub.HTimes.ToString() + "," + oSub.HQty.ToString() + |
| | | "," + oSub.HPrice.ToString() + "," + oSub.HPackQty.ToString() + "," + oSub.HPackPrice.ToString() + "," + oSub.HPackMoney.ToString() + "," + oSub.HPackMaterID.ToString() + "," + oSub.HPriceRate.ToString() + |
| | | "," + oSub.HSubsidyID.ToString() + "," + oSub.HSubsidyTotal.ToString() + "," + oSub.HDeuctID.ToString() + "," + oSub.HDeuctTotal.ToString() + "," + oSub.HSubsidyQty.ToString() + "," + oSub.HSubsidyMoney.ToString() + "," + oSub.HMoney.ToString() + |
| | | "," + oSub.HICMOInterID.ToString() + "," + oSub.HICMOEntryID.ToString() + ",'" + oSub.HICMOBillNo + "'," + oSub.HProcReportInterID.ToString() + "," + oSub.HProcReportEntryID.ToString() + ",'" + oSub.HProcReportBillNo + "'" + |
| | | "," + oSub.HProcPlanInterID.ToString() + "," + oSub.HProcPlanEntryID.ToString() + ",'" + oSub.HProcPlanBillNo + "'" + |
| | | "," + oSub.HPriceRate.ToString() + "," + oSub.HSubsidyTotal.ToString() + "," + oSub.HDeuctTotal.ToString() + "," + oSub.HSubsidyID.ToString() + "," + oSub.HDeuctID.ToString() + |
| | | "," + oSub.HPackQty.ToString() + "," + oSub.HPackPrice.ToString() + "," + oSub.HPackMoney.ToString() + "," + oSub.HPackMaterID.ToString() + "," + oSub.HSubsidyQty.ToString() + "," + oSub.HSubsidyMoney.ToString() + |
| | | ") "); |
| | | } |
| | | // |
| | | //foreach (Model.ClsPay_SingleBalBillSub oSub in DetailColl) |
| | | //{ |
| | | // Ds = oCn.RunProcReturn("exec h_p_Pay_SingleBalBill_Qty " + oSub.HICMOInterID, ""); |
| | | // if (Ds.Tables[0].Rows.Count == 0) |
| | | // return; |
| | | // if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y") |
| | | // { |
| | | // sReturn = "æ±æ¥æ°éè¶
è¿è®¡åæ°éï¼ä¸å
许ä¿å"; |
| | | // return false; |
| | | // } |
| | | //} |
| | | sReturn = "ä¿®æ¹åæ®æåï¼"; |
| | | //ä¿ååæ§å¶ |
| | | if (!AfterSave(lngBillKey, omodel.HBillNo, 2, ref sReturn)) |
| | | { |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | sReturn = "åæ®å·ï¼" + omodel.HBillNo + " ä¿®æ¹æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | oCn.BeginTran(); |
| | | //ä¿ååæ§å¶ |
| | | if (!BeforeSave(omodel.HInterID, omodel.HBillNo, 1, ref sReturn)) |
| | | { |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | //主表 |
| | | oCn.RunProc("Insert Into Pay_SingleBalBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate,HSaveFlag" + |
| | | ",HGroupID,HDeptID,HEmpID,HPayType,HExplanation,HInnerBillNo" + |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType" + |
| | | ",HDeptID,HGroupID,HEmpID,HPayType,HExplanation" + |
| | | ",HSaveFlag,HInnerBillNo,HStockOrgID" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" + |
| | | ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()," + Convert.ToString(omodel.HSaveFlag ? 1 : 0) + |
| | | ", " + omodel.HGroupID.ToString() + "," + omodel.HDeptID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HPayType.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'" + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate.ToShortDateString() + "'" + |
| | | ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" + |
| | | ", " + omodel.HMainSourceInterID.ToString() + "," + omodel.HMainSourceEntryID.ToString() + ",'" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType + "'" + |
| | | ", " + omodel.HDeptID.ToString() + "," + omodel.HGroupID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HPayType.ToString() + ",'" + omodel.HExplanation + "'" + |
| | | ", " + Convert.ToString(omodel.HSaveFlag ? 1 : 0) + ",'" + omodel.HInnerBillNo + "'," + omodel.HSTOCKORGID.ToString() + |
| | | ") "); |
| | | //æå
¥å表 |
| | | foreach (Model.ClsPay_SingleBalBillSub oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Pay_SingleBalBillSub " + |
| | | " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HMaterID,HProcID,HEmpID,HSourceID,HTimes,HQty,HPrice,HSqty" + |
| | | ",HMoney,HICMOInterID,HICMOBillNo,HProcReportInterID,HProcReportEntryID,HProcReportBillNo" + |
| | | " (HInterID,HEntryID,HRemark,HRelationQty,HRelationMoney" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" + |
| | | ",HMaterID,HProcID,HSourceID,HEmpID,HTimes,HQty" + |
| | | ",HPrice,HPackQty,HPackPrice,HPackMoney,HPackMaterID,HPriceRate" + |
| | | ",HSubsidyID,HSubsidyTotal,HDeuctID,HDeuctTotal,HSubsidyQty,HSubsidyMoney,HMoney" + |
| | | ",HICMOInterID,HICMOEntryID,HICMOBillNo,HProcReportInterID,HProcReportEntryID,HProcReportBillNo" + |
| | | ",HProcPlanInterID,HProcPlanEntryID,HProcPlanBillNo" + |
| | | ",HPriceRate,HSubsidyTotal,HDeuctTotal,HSubsidyID,HDeuctID" + |
| | | ",HPackQty,HPackPrice,HPackMoney,HPackMaterID,HSubsidyQty,HSubsidyMoney" + |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" + |
| | | "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + |
| | | "," + oSub.HMaterID.ToString() + "," + oSub.HProcID.ToString() + "," + oSub.HEmpID.ToString() + "," + oSub.HSourceID.ToString() |
| | | + "," + oSub.HTimes.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HSqty.ToString() + |
| | | "," + oSub.HMoney.ToString() + "," + oSub.HICMOInterID.ToString() + ",'" + oSub.HICMOBillNo + "'," + oSub.HProcReportInterID.ToString() + "," + oSub.HProcReportEntryID.ToString() + ",'" + oSub.HProcReportBillNo + "'" + |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HRemark + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + |
| | | "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'" + |
| | | "," + oSub.HMaterID.ToString() + "," + oSub.HProcID.ToString() + "," + oSub.HSourceID.ToString() + "," + oSub.HEmpID.ToString() + "," + oSub.HTimes.ToString() + "," + oSub.HQty.ToString() + |
| | | "," + oSub.HPrice.ToString() + "," + oSub.HPackQty.ToString() + "," + oSub.HPackPrice.ToString() + "," + oSub.HPackMoney.ToString() + "," + oSub.HPackMaterID.ToString() + "," + oSub.HPriceRate.ToString() + |
| | | "," + oSub.HSubsidyID.ToString() + "," + oSub.HSubsidyTotal.ToString() + "," + oSub.HDeuctID.ToString() + "," + oSub.HDeuctTotal.ToString() + "," + oSub.HSubsidyQty.ToString() + "," + oSub.HSubsidyMoney.ToString() + "," + oSub.HMoney.ToString() + |
| | | "," + oSub.HICMOInterID.ToString() + "," + oSub.HICMOEntryID.ToString() + ",'" + oSub.HICMOBillNo + "'," + oSub.HProcReportInterID.ToString() + "," + oSub.HProcReportEntryID.ToString() + ",'" + oSub.HProcReportBillNo + "'" + |
| | | "," + oSub.HProcPlanInterID.ToString() + "," + oSub.HProcPlanEntryID.ToString() + ",'" + oSub.HProcPlanBillNo + "'" + |
| | | "," + oSub.HPriceRate.ToString() + "," + oSub.HSubsidyTotal.ToString() + "," + oSub.HDeuctTotal.ToString() + "," + oSub.HSubsidyID.ToString() + "," + oSub.HDeuctID.ToString() + |
| | | "," + oSub.HPackQty.ToString() + "," + oSub.HPackPrice.ToString() + "," + oSub.HPackMoney.ToString() + "," + oSub.HPackMaterID.ToString() + "," + oSub.HSubsidyQty.ToString() + "," + oSub.HSubsidyMoney.ToString() + |
| | | ") "); |
| | | } |
| | | // |
| | | //foreach (Model.ClsPay_SingleBalBillSub oSub in DetailColl) |
| | | //{ |
| | | // Ds = oCn.RunProcReturn("exec h_p_Pay_SingleBalBill_Qty " + oSub.HICMOInterID, ""); |
| | | // if (Ds.Tables[0].Rows.Count == 0) |
| | | // return; |
| | | // if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y") |
| | | // { |
| | | // sReturn = "æ±æ¥æ°éè¶
è¿è®¡åæ°éï¼ä¸å
许ä¿å"; |
| | | // return false; |
| | | // } |
| | | //} |
| | | // |
| | | sReturn = "æ°å¢åæ®æåï¼"; |
| | | //ä¿ååæ§å¶ |
| | | if (!AfterSave(omodel.HInterID, omodel.HBillNo, 1, ref sReturn)) |
| | | { |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | sReturn = "åæ®å·ï¼" + omodel.HBillNo + " æ°å¢æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | |
| | | |
| | | public double HMoney;// decimal(18,8) --éé¢ |
| | | public Int64 HICMOInterID;// int --ç产任å¡åID |
| | | public Int64 HICMOEntryID;// int --ç产任å¡ååID |
| | | public string HICMOBillNo;// varchar(50) --ç产任å¡åå· |
| | | public Int64 HProcReportInterID;// int --å·¥åºæ±æ¥åID |
| | | public Int64 HProcReportEntryID;// int --å·¥åºæ±æ¥ååID |
| | |
| | | |
| | | namespace WebAPI.Controllers |
| | | { |
| | | //ç产å
¥åºåController |
| | | public class Kf_ProductInBillController : ApiController |
| | | { |
| | | //è·åç³»ç»åæ° |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | |
| | | public DBUtility.ClsPub.Enum_BillStatus BillStatus; |
| | | public DAL.ClsKf_ProductInBill BillOld = new DAL.ClsKf_ProductInBill(); |
| | | public const string ModName = "1202"; //åæ®ç±»å |
| | | public const string ModCaption = "ç产å
¥åºå"; //åæ®åç§° |
| | | public const string ModRightName = "Kf_ProductInBill"; |
| | | public const string ModRightNameList = ModRightName + "List"; //å表 |
| | | public const string ModRightNameEdit = ModRightName + "_Edit"; //ç¼è¾ |
| | | public const string ModRightNameCheck = ModRightName + "_Check"; //å®¡æ ¸ |
| | | public const string ModRightNameClose = ModRightName + "_Close"; //å
³é |
| | | public const string ModRightNameDelete = ModRightName + "_Delete"; //ä½åº |
| | | public const string ModRightNameDrop = ModRightName + "_Drop"; //å é¤ |
| | | public const string ModRightNameMoney = ModRightName + "_Money"; //éé¢ |
| | | public const string ModRightNameQty = ModRightName + "_Qty"; //æ°é |
| | | public DataSet ds = new DataSet(); |
| | | private json objJsonResult = new json(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds; |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | public DAL.ClsKf_ProductInBill oBill = new DAL.ClsKf_ProductInBill(); |
| | | public DAL.ClsKf_ProductInBill BillOld = new DAL.ClsKf_ProductInBill(); |
| | | |
| | | |
| | | #region ç产å
¥åºåå表 |
| | | /// <summary> |
| | | /// è·åç产å
¥åºååè¡¨ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Kf_ProductInBillController/GetKf_ProductInBillList_Json")] |
| | | [HttpGet] |
| | | public object GetKf_ProductInBillList_Json(string sWhere, string HMaker, string OperationType, string ViewName) |
| | | { |
| | | try |
| | | { |
| | | //夿æé |
| | | if (OperationType == "1") |
| | | { |
| | | //夿æé |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightNameList, 3, false, HMaker)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¨æ²¡æè¯¥æ¨¡åæé,请ä¸ç®¡çåèç³»ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | //è¿ååè¡¨ä¿¡æ¯ |
| | | ds = oCn.RunProcReturn("select * from " + ViewName + " where 1=1 " + sWhere + " order by hmainid desc", ViewName); |
| | | List<object> columnNameList = new List<object>(); |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //è·åå°DataColumnå对象çåå |
| | | } |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥è¯¢å表信æ¯å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ç产å
¥åºå å é¤ |
| | | /// <summary> |
| | | /// å é¤ç产å
¥åºå |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Kf_ProductInBillController/GetKf_ProductInBill_Delete_Json")] |
| | | [HttpGet] |
| | | public object GetKf_ProductInBill_Delete_Json(Int64 HInterID, string HMaker) |
| | | { |
| | | try |
| | | { |
| | | //夿æé |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightNameDrop, 3, false, HMaker)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¨æ²¡æè¯¥æ¨¡åå é¤åè½æé,请ä¸ç®¡çåèç³»ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //夿å卿§ |
| | | if (oBill.ShowBill(HInterID, ref DBUtility.ClsPub.sExeReturnInfo)) |
| | | { |
| | | //å é¤åæ§å¶ |
| | | DataSet BeforeDs = oCn.RunProcReturn("Exec h_p_Kf_ProductInBill_BeforeDelCtrl " + HInterID.ToString() + ",'" + HMaker + "'", "h_p_Kf_ProductInBill_BeforeDelCtrl"); |
| | | if (BeforeDs == null || BeforeDs.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å é¤åå¤æå¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(BeforeDs.Tables[0].Rows[0]["HBack"]) == 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å é¤å¤±è´¥ï¼" + DBUtility.ClsPub.isStrNull(BeforeDs.Tables[0].Rows[0]["HRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | //å é¤åæ®ï¼å
å«å é¤åæ§å¶ãåå
¥æ¥å¿ï¼ |
| | | if (!oBill.DeleteBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Kf_ProductInBill_AfterDelCtrl", HMaker, ref ClsPub.sExeReturnInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å é¤å¤±è´¥!åå :" + ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å é¤ç产å
¥åºåæåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æªæ¥è¯¢å°è¯¥ç产å
¥åºåï¼è¯·å·æ°æ°æ®åéæ°éæ©ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å é¤ç产å
¥åºå失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ç产å
¥åºå å®¡æ ¸/åå®¡æ ¸ |
| | | /// <summary> |
| | | /// å®¡æ ¸/åå®¡æ ¸ç产å
¥åºå |
| | | /// </summary> |
| | | /// <param name="HInterID">忮ID</param> |
| | | /// <param name="Type">å®¡æ ¸(1),åå®¡æ ¸(2)</param> |
| | | /// <param name="HMaker">å®¡æ ¸äºº</param> |
| | | /// <returns></returns> |
| | | [Route("Kf_ProductInBillController/GetKf_ProductInBill_Check_Json")] |
| | | [HttpGet] |
| | | public object GetKf_ProductInBill_Check_Json(Int64 HInterID, int Type, string HMaker) |
| | | { |
| | | try |
| | | { |
| | | //夿æé |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 3, false, HMaker)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¨æ²¡æè¯¥æ¨¡åå®¡æ ¸/åå®¡æ ¸åè½æé,请ä¸ç®¡çåèç³»ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //夿å卿§ |
| | | if (oBill.ShowBill(HInterID, ref DBUtility.ClsPub.sExeReturnInfo)) |
| | | { |
| | | //Type 1 å®¡æ ¸ 2 åå®¡æ ¸ |
| | | if (Type == 1) |
| | | { |
| | | if (oBill.omodel.HChecker.Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å·²å®¡æ ¸ï¼ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (oBill.omodel.HCloseMan.Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已å
³éï¼ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (oBill.omodel.HDeleteMan.Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已ä½åºï¼ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //å®¡æ ¸åæ§å¶ |
| | | DataSet BeforeDs = oCn.RunProcReturn("Exec h_p_Kf_ProductInBill_BeforeCheckCtrl " + HInterID.ToString() + ",'" + HMaker + "'", "h_p_Kf_ProductInBill_BeforeCheckCtrl"); |
| | | if (BeforeDs == null || BeforeDs.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å®¡æ ¸åå¤æå¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(BeforeDs.Tables[0].Rows[0]["HBack"]) == 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼" + DBUtility.ClsPub.isStrNull(BeforeDs.Tables[0].Rows[0]["HRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | //å®¡æ ¸åæ® |
| | | if (!oBill.CheckBill(HInterID, oBill.omodel.HBillNo, "h_p_Kf_ProductInBill_AfterCheckCtrl", HMaker, ref ClsPub.sExeReturnInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥!åå :" + ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åæ®å·ï¼" + oBill.omodel.HBillNo + " å®¡æ ¸æåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (oBill.omodel.HChecker.Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®æªå®¡æ ¸ï¼ä¸éè¦åå®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //åå®¡æ ¸åæ§å¶ |
| | | DataSet BeforeDs = oCn.RunProcReturn("Exec h_p_Kf_ProductInBill_BeforeUnCheckCtrl " + HInterID.ToString() + ",'" + HMaker + "'", "h_p_Kf_ProductInBill_BeforeUnCheckCtrl"); |
| | | if (BeforeDs == null || BeforeDs.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åå®¡æ ¸åå¤æå¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(BeforeDs.Tables[0].Rows[0]["HBack"]) == 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åå®¡æ ¸å¤±è´¥ï¼" + DBUtility.ClsPub.isStrNull(BeforeDs.Tables[0].Rows[0]["HRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | //åå®¡æ ¸åæ® |
| | | if (!oBill.AbandonCheck(HInterID, oBill.omodel.HBillNo, "h_p_Kf_ProductInBill_AfterUnCheckCtrl", HMaker, ref ClsPub.sExeReturnInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åå®¡æ ¸å¤±è´¥!åå :" + ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åæ®å·ï¼" + oBill.omodel.HBillNo + " åå®¡æ ¸æåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æªæ¥è¯¢å°è¯¥ç产å
¥åºåï¼è¯·å·æ°æ°æ®åéæ°éæ©ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å®¡æ ¸æåå®¡æ ¸ç产å
¥åºå失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ç产å
¥åºå å
³é/åå
³é |
| | | /// <summary> |
| | | /// å
³é/åå
³éç产å
¥åºå |
| | | /// </summary> |
| | | /// <param name="HInterID">忮ID</param> |
| | | /// <param name="Type">å
³é(1),åå
³é(2)</param> |
| | | /// <param name="HMaker">å
³é人</param> |
| | | /// <returns></returns> |
| | | [Route("Kf_ProductInBillController/GetKf_ProductInBill_Close_Json")] |
| | | [HttpGet] |
| | | public object GetKf_ProductInBill_Close_Json(Int64 HInterID, int Type, string HMaker) |
| | | { |
| | | try |
| | | { |
| | | //夿æé |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightNameClose, 3, false, HMaker)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¨æ²¡æè¯¥æ¨¡åå
³é/åå
³éåè½æé,请ä¸ç®¡çåèç³»ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //夿å卿§ |
| | | if (oBill.ShowBill(HInterID, ref DBUtility.ClsPub.sExeReturnInfo)) |
| | | { |
| | | //Type 1 å
³é 2 åå
³é |
| | | if (Type == 1) |
| | | { |
| | | if (oBill.omodel.HCloseMan.Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已å
³éï¼ä¸è½å次å
³éï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //å
³éåæ® |
| | | if (!oBill.CloseBill(HInterID, oBill.omodel.HBillNo, HMaker, ref ClsPub.sExeReturnInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å
³é失败!åå :" + ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åæ®å·ï¼" + oBill.omodel.HBillNo + " å
³éæåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (oBill.omodel.HCloseMan.Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®æªå
³éï¼ä¸éè¦åå
³éï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //åå
³éåæ® |
| | | if (!oBill.CancelClose(HInterID, oBill.omodel.HBillNo, HMaker, ref ClsPub.sExeReturnInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åå
³é失败!åå :" + ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åæ®å·ï¼" + oBill.omodel.HBillNo + " åå
³éæåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æªæ¥è¯¢å°è¯¥ç产å
¥åºåï¼è¯·å·æ°æ°æ®åéæ°éæ©ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å
³éæåå
³éç产å
¥åºå失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ç产å
¥åºå ä½åº/åä½åº |
| | | /// <summary> |
| | | /// ä½åº/åä½åºç产å
¥åºå |
| | | /// </summary> |
| | | /// <param name="HInterID">忮ID</param> |
| | | /// <param name="Type">ä½åº(1),åä½åº(2)</param> |
| | | /// <param name="HMaker">ä½åºäºº</param> |
| | | /// <returns></returns> |
| | | [Route("Kf_ProductInBillController/GetKf_ProductInBill_Cancelltion_Json")] |
| | | [HttpGet] |
| | | public object GetKf_ProductInBill_Cancelltion_Json(Int64 HInterID, int Type, string HMaker) |
| | | { |
| | | try |
| | | { |
| | | //夿æé |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightNameDelete, 3, false, HMaker)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¨æ²¡æè¯¥æ¨¡åä½åº/åä½åºåè½æé,请ä¸ç®¡çåèç³»ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //夿å卿§ |
| | | if (oBill.ShowBill(HInterID, ref DBUtility.ClsPub.sExeReturnInfo)) |
| | | { |
| | | //Type 1 ä½åº 2 åä½åº |
| | | if (Type == 1) |
| | | { |
| | | if (oBill.omodel.HDeleteMan.Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已ä½åºï¼ä¸è½å次ä½åºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //ä½åºåæ® |
| | | if (!oBill.Cancelltion(HInterID, oBill.omodel.HBillNo, HMaker, ref ClsPub.sExeReturnInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä½åºå¤±è´¥!åå :" + ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åæ®å·ï¼" + oBill.omodel.HBillNo + " ä½åºæåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (oBill.omodel.HDeleteMan.Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®æªä½åºï¼ä¸éè¦åä½åºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //åä½åºåæ® |
| | | if (!oBill.AbandonCancelltion(HInterID, oBill.omodel.HBillNo, HMaker, ref ClsPub.sExeReturnInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åä½åºå¤±è´¥!åå :" + ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åæ®å·ï¼" + oBill.omodel.HBillNo + " åä½åºæåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æªæ¥è¯¢å°è¯¥ç产å
¥åºåï¼è¯·å·æ°æ°æ®åéæ°éæ©ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä½åºæåä½åºç产å
¥åºå失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | |
| | | //---------------------------------------------------------------------------------------------æ§æ¹æ³20240422å |
| | | |
| | | #region ç产å
¥åºå æ¥æ¾è®°å½åè½ |
| | | /// <summary> |
| | |
| | | try |
| | | { |
| | | |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_ProductInBillList where hmainid=" + HInterID, "h_v_IF_ProductInBillList"); |
| | | ds = oCn.RunProcReturn("select * from h_v_IF_ProductInBillList where hmainid=" + HInterID, "h_v_IF_ProductInBillList"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_ProductInBillList where 1=1 order by hmainid desc", "h_v_IF_ProductInBillList"); |
| | | ds = oCn.RunProcReturn("select * from h_v_IF_ProductInBillList where 1=1 order by hmainid desc", "h_v_IF_ProductInBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = "select * from h_v_IF_ProductInBillList where 1 = 1 " + sWhere + " order by hmainid desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_ProductInBillList"); |
| | | ds = oCn.RunProcReturn(sql, "h_v_IF_ProductInBillList"); |
| | | } |
| | | |
| | | |
| | |
| | | string HBillNo = ""; |
| | | //å é¤åæ§å¶========================================= |
| | | string sql1 = "exec h_p_Kf_ProductInBill_BeforeDelCtrl " + HInterID + ",'" + HBillNo + "','" + user + "'"; |
| | | ds = oCN.RunProcReturn(sql1, "h_p_Kf_ProductInBill_BeforeDelCtrl"); |
| | | ds = oCn.RunProcReturn(sql1, "h_p_Kf_ProductInBill_BeforeDelCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | //================================================================================== |
| | | |
| | | string sReturn = ""; |
| | | oCN.BeginTran(); |
| | | oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID); |
| | | oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID); |
| | | oCN.Commit(); |
| | | oCn.BeginTran(); |
| | | oCn.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID); |
| | | oCn.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID); |
| | | oCn.Commit(); |
| | | |
| | | //å é¤åæ§å¶================================================================================== |
| | | string sql2 = "exec h_p_Kf_ProductInBill_AfterDelCtrl " + HInterID + ",'" + HBillNo + "','" + user + "'"; |
| | | ds = oCN.RunProcReturn(sql2, "h_p_Kf_ProductInBill_AfterDelCtrl"); |
| | | ds = oCn.RunProcReturn(sql2, "h_p_Kf_ProductInBill_AfterDelCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sReturn = "å é¤åå¤æå¤±è´¥ï¼è¯·ä¸ç½ç»ç®¡ç人åèç³»"; |
| | |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å é¤å¤±è´¥!åå :" + sReturn; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | oCn.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å é¤å¤±è´¥!åå :" + sReturn; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | oCn.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //============================================================================================== |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | oCn.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | oCN.BeginTran(); |
| | | oCn.BeginTran(); |
| | | //ä¿å主表 |
| | | objJsonResult = AddBillMain(msg1); |
| | | if (objJsonResult.code == "0") |
| | | { |
| | | oCN.RollBack(); |
| | | oCn.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = objJsonResult.Message; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | oCN.Commit(); |
| | | oCn.Commit(); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åæ®ä¿åæåï¼"; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | oCn.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + e.ToString(); |
| | |
| | | string HSUPPLYADDRESS = mainList2[0].HSUPPLYADDRESS == null ? "''" : mainList2[0].HSUPPLYADDRESS; |
| | | long HPROVIDERCONTACTID = mainList2[0].HPROVIDERCONTACTID == null ? 0 : mainList2[0].HPROVIDERCONTACTID; |
| | | |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_ProductInBillList where hmainid=" + HInterID + " and åæ®å·='" + HBillNo + "'", "h_v_IF_ProductInBillList"); |
| | | ds = oCn.RunProcReturn("select * from h_v_IF_ProductInBillList where hmainid=" + HInterID + " and åæ®å·='" + HBillNo + "'", "h_v_IF_ProductInBillList"); |
| | | if ((OperationType == 1 || OperationType == 2 || OperationType == 4) && ds.Tables[0].Rows.Count == 0)//æ°å¢ |
| | | { |
| | | |
| | | //ä¿ååæ§å¶========================================= |
| | | ds = oCN.RunProcReturn("exec h_p_Kf_ProductInBill_BeforeSaveCtrl " + HInterID, "h_p_Kf_ProductInBill_BeforeSaveCtrl"); |
| | | ds = oCn.RunProcReturn("exec h_p_Kf_ProductInBill_BeforeSaveCtrl " + HInterID, "h_p_Kf_ProductInBill_BeforeSaveCtrl"); |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | |
| | | "," + HManagerID + "," + HEmpID + "," + HDeptID + "," + HSecManagerID + "," + HKeeperID + ",'" + HRemark + "','" + HMaker + |
| | | "',getdate()" + "," + HCurID + "," + HExRate + "," + HWHID + ",'" + HInnerBillNo + "','" + HExplanation + "')"; |
| | | |
| | | oCN.RunProc(sql); |
| | | oCn.RunProc(sql); |
| | | |
| | | } |
| | | else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0) |
| | |
| | | + ",HExRate=" + HExRate + ",HEmpID=" + HEmpID + ",HManagerID=" + HManagerID + ",HDeptID=" + HDeptID |
| | | + ",HInnerBillNo='" + HInnerBillNo + "' where HInterID=" + HInterID; |
| | | |
| | | oCN.RunProc(sql); |
| | | oCn.RunProc(sql); |
| | | |
| | | |
| | | //å é¤å表 |
| | | oCN.RunProc("delete from Kf_ICStockBillSub where HInterID='" + HInterID + "'"); |
| | | oCn.RunProc("delete from Kf_ICStockBillSub where HInterID='" + HInterID + "'"); |
| | | } |
| | | //ä¿åå表 |
| | | objJsonResult = AddBillSub(msg3, HInterID, OperationType, user); |
| | | |
| | | //ç产å
¥åºåæ°å¢åå¡«ç产订åå
³èæ°é |
| | | oCN.RunProc("exec h_p_Kf_UpDateRelation_ProductInToICMO_Add " + HInterID); |
| | | oCn.RunProc("exec h_p_Kf_UpDateRelation_ProductInToICMO_Add " + HInterID); |
| | | |
| | | //ç产å
¥åºåæ°å¢åå¡«çäº§æ±æ¥åå
³èæ°é |
| | | oCN.RunProc("exec h_p_Kf_UpDateRelation_ProductInToICMOReport_Add " + HInterID); |
| | | oCn.RunProc("exec h_p_Kf_UpDateRelation_ProductInToICMOReport_Add " + HInterID); |
| | | |
| | | if (objJsonResult.code == "0") |
| | | { |
| | |
| | | |
| | | DataSet Cs; |
| | | Int64 NewHEntryID = 1; |
| | | Cs = oCN.RunProcReturn("select MAX(HEntryID)HEntryID from Kf_ICStockBillSub", "Kf_ICStockBillSub"); |
| | | Cs = oCn.RunProcReturn("select MAX(HEntryID)HEntryID from Kf_ICStockBillSub", "Kf_ICStockBillSub"); |
| | | if (Cs.Tables[0].Rows.Count != 0 && ClsPub.isLong(Cs.Tables[0].Rows[0]["HEntryID"].ToString()) != 0) |
| | | { |
| | | NewHEntryID = ClsPub.isLong(Cs.Tables[0].Rows[0]["HEntryID"].ToString()); |
| | |
| | | } |
| | | |
| | | |
| | | oCN.RunProc($@"Insert into Kf_ICStockBillSub |
| | | oCn.RunProc($@"Insert into Kf_ICStockBillSub |
| | | (HInterID,HEntryID,HMaterID,HUnitID,HQtyMust,HQty,HPrice |
| | | ,HMoney,HWHID,HSPID,HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HPOOrderInterID |
| | | ,HPOOrderEntryID,HPOORderBillNo,HSecUnitID,HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo,HRelationQty,HSecUnitRate,HPropertyID) |
| | |
| | | |
| | | } |
| | | //ä¿ååæ§å¶========================================= |
| | | ds = oCN.RunProcReturn("exec h_p_Kf_ProductInBill_AfterSaveCtrl " + HInterID, "h_p_Kf_ProductInBill_AfterSaveCtrl"); |
| | | ds = oCn.RunProcReturn("exec h_p_Kf_ProductInBill_AfterSaveCtrl " + HInterID, "h_p_Kf_ProductInBill_AfterSaveCtrl"); |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | |
| | | [HttpGet] |
| | | public ApiResult<DataTable> getMaterialByMaterID(Int64 HMaterID) |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | |
| | | string sql = "select a.HItemID HMaterID,a.HNumber HMaterNumber,a.HName HMaterName,a.HMaterRuleType,a.HModel HMaterModel,a.HUnitID, b.HNumber HUnitNumber, b.HName HUnitName" + |
| | | " from Gy_Material AS a " + |
| | | " LEFT OUTER JOIN Gy_Unit AS b on a.HUnitID = b.HItemID " + |
| | | " where a.HItemID =" + HMaterID; |
| | | |
| | | var dataSet = oCN.RunProcReturn(sql, "Gy_Material"); |
| | | var dataSet = oCn.RunProcReturn(sql, "Gy_Material"); |
| | | |
| | | |
| | | if (dataSet == null || dataSet.Tables[0].Rows.Count == 0) |
| | |
| | | |
| | | ClsPub.CurUserName = user; |
| | | BillOld.MvarItemKey = "Kf_ICStockBillMain"; |
| | | oCN.BeginTran();//å¼å§äºå¡ |
| | | oCn.BeginTran();//å¼å§äºå¡ |
| | | |
| | | //Type 1 å®¡æ ¸ 2 åå®¡æ ¸ |
| | | if (Type == 1) |
| | |
| | | //夿忮æ¯å¦å·²ç»å®¡æ ¸ |
| | | DataSet ds; |
| | | string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID; |
| | | ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey); |
| | | ds = oCn.RunProcReturn(sql, BillOld.MvarItemKey); |
| | | if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "") |
| | |
| | | //夿忮æ¯å¦å·²ç»åå®¡æ ¸ |
| | | DataSet ds; |
| | | string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID; |
| | | ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey); |
| | | ds = oCn.RunProcReturn(sql, BillOld.MvarItemKey); |
| | | if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HChecker"] == null || ds.Tables[0].Rows[0]["HChecker"].ToString() == "") |
| | |
| | | } |
| | | } |
| | | |
| | | oCN.Commit();//æäº¤äºå¡ |
| | | oCn.Commit();//æäº¤äºå¡ |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | |
| | | |
| | | //å®¡æ ¸åæ§å¶========================================= |
| | | string sql1 = "exec h_p_Kf_ProductInBill_BeforeCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'"; |
| | | ds = oCN.RunProcReturn(sql1, "h_p_Kf_ProductInBill_BeforeCheckCtrl"); |
| | | ds = oCn.RunProcReturn(sql1, "h_p_Kf_ProductInBill_BeforeCheckCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | if (IsAudit == 1) //åå®¡æ ¸æäº¤ |
| | | { |
| | | //åå®¡æ ¸åæ§å¶========================================= |
| | | DataSet ds = oCN.RunProcReturn("Exec h_p_Kf_ProductInBill_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'", "h_p_Kf_ProductInBill_BeforeUnCheckCtrl"); |
| | | DataSet ds = oCn.RunProcReturn("Exec h_p_Kf_ProductInBill_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'", "h_p_Kf_ProductInBill_BeforeUnCheckCtrl"); |
| | | if (ds == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | |
| | | ClsPub.CurUserName = user; |
| | | BillOld.MvarItemKey = "Kf_ICStockBillMain"; |
| | | oCN.BeginTran();//å¼å§äºå¡ |
| | | oCn.BeginTran();//å¼å§äºå¡ |
| | | |
| | | //Type 1 å
³é 2 åå
³é |
| | | if (Type == 1) |
| | |
| | | //夿忮æ¯å¦å·²ç»å
³é |
| | | DataSet ds; |
| | | string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID; |
| | | ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey); |
| | | ds = oCn.RunProcReturn(sql, BillOld.MvarItemKey); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | //夿忮æ¯å¦å·²ç»åå
³é |
| | | DataSet ds; |
| | | string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID; |
| | | ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey); |
| | | ds = oCn.RunProcReturn(sql, BillOld.MvarItemKey); |
| | | if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "") |
| | |
| | | } |
| | | } |
| | | |
| | | oCN.Commit();//æäº¤äºå¡ |
| | | oCn.Commit();//æäº¤äºå¡ |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | |
| | | |
| | | ClsPub.CurUserName = user; |
| | | BillOld.MvarItemKey = "Kf_ICStockBillMain"; |
| | | oCN.BeginTran();//å¼å§äºå¡ |
| | | oCn.BeginTran();//å¼å§äºå¡ |
| | | |
| | | //Type 1 ä½åº 2 åä½åº |
| | | if (Type == 1) |
| | |
| | | //夿忮æ¯å¦å·²ç»ä½åº |
| | | DataSet ds; |
| | | string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID; |
| | | ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey); |
| | | ds = oCn.RunProcReturn(sql, BillOld.MvarItemKey); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | //夿忮æ¯å¦å·²ç»åä½åº |
| | | DataSet ds; |
| | | string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID; |
| | | ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey); |
| | | ds = oCn.RunProcReturn(sql, BillOld.MvarItemKey); |
| | | if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "") |
| | |
| | | } |
| | | } |
| | | |
| | | oCN.Commit();//æäº¤äºå¡ |
| | | oCn.Commit();//æäº¤äºå¡ |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | |
| | | { |
| | | try |
| | | { |
| | | //夿æé |
| | | //夿æé 1ä¸ºç´æ¥å表模åæå¼ 2为ä»å
¶ä»æ¨¡å跳转æå¼å表 |
| | | if (OperationType == "1") |
| | | { |
| | | //夿æé |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥èµç»ç®å(个人)模å ä»å表é䏿å¼åæ®ï¼è¿ååæ®ä¿¡æ¯æ¶è°ç¨ |
| | | /// <summary> |
| | | /// å·¥èµç»ç®å(个人)ç¼è¾æ¶ï¼æ ¹æ®åæ®IDè·ååæ®ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Pay_SingleBalBillController/GetPay_SingleBalBill_Json")] |
| | | [HttpGet] |
| | | public object GetPay_SingleBalBill_Json(Int64 HInterID, string HMaker) |
| | | { |
| | | try |
| | | { |
| | | //夿æé |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightNameEdit, 3, false, HMaker)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¨æ²¡æè¯¥æ¨¡åç¼è¾æé,请ä¸ç®¡çåèç³»ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //è¿ååè¡¨ä¿¡æ¯ |
| | | ds = oCn.RunProcReturn("exec h_p_Pay_SingleBalBill_EditInit " + HInterID, "h_p_Pay_SingleBalBill_EditInit"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æªæ¥è¯¢å°è¯¥å·¥èµç»ç®å(个人)ï¼è¯·å·æ°æ°æ®åéæ°éæ©ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è¿åå·¥èµç»ç®å(个人)ä¿¡æ¯å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥èµç»ç®å(个人)ä¿å |
| | | /// <summary> |
| | | /// å·¥èµç»ç®å(个人)ä¿å |
| | | /// </summary> |
| | | [Route("Pay_SingleBalBillController/GetPay_SingleBalBill_Save_Json")] |
| | | [HttpPost] |
| | | public object GetPay_SingleBalBill_Save_Json([FromBody] JObject sMainSub) |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string sMainStr = sArray[0].ToString(); //ä¸»è¡¨æ°æ® |
| | | string sSubStr = sArray[1].ToString(); //åè¡¨æ°æ® |
| | | string OperationType = sArray[2].ToString(); //æä½ç±»åï¼1æ°å¢ã2ç¼è¾ï¼ |
| | | string HMaker = sArray[3].ToString(); //å¶å人 |
| | | try |
| | | { |
| | | //夿æé |
| | | if (OperationType == "1") |
| | | { |
| | | BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew; |
| | | //夿æ°å¢æé |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightName, 1, false, HMaker)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¨æ²¡æè¯¥æ¨¡åæ°å¢æé,请ä¸ç®¡çåèç³»ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_Modify; |
| | | //夿ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightNameEdit, 1, false, HMaker)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¨æ²¡æè¯¥æ¨¡åç¼è¾æé,请ä¸ç®¡çåèç³»ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | //表头èµå¼ |
| | | sMainStr = sMainStr.Replace("\\", ""); |
| | | sMainStr = sMainStr.Replace("\n", ""); |
| | | sMainStr = "[" + sMainStr.ToString() + "]"; |
| | | List<Model.ClsPay_SingleBalBillMain> lsmain = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsPay_SingleBalBillMain>>(sMainStr); |
| | | foreach (Model.ClsPay_SingleBalBillMain oItem in lsmain) |
| | | { |
| | | //忮巿¯å¦éå¤ |
| | | if (oBill.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, oItem.HInterID)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å·éå¤ï¼ä¸å
许ä¿åï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //夿ä¼è®¡ææ¯å¦åç |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod_Pay(oItem.HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = s; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oItem.HYear = sYear; |
| | | oItem.HPeriod = sPeriod; |
| | | DBUtility.ClsPub.CurUserName = oItem.HMaker; |
| | | oBill.omodel = oItem; |
| | | } |
| | | //表ä½èµå¼ |
| | | //æ },{æ¥æåæ°ç» //廿ãåã |
| | | sSubStr = sSubStr.Substring(1, sSubStr.Length - 2); |
| | | sSubStr = sSubStr.Replace("\\", ""); |
| | | sSubStr = sSubStr.Replace("\n", ""); |
| | | sSubStr = "[" + sSubStr.ToString() + "]"; |
| | | List<Model.ClsPay_SingleBalBillSub> ls = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsPay_SingleBalBillSub>>(sSubStr); |
| | | int i = 0; |
| | | foreach (Model.ClsPay_SingleBalBillSub oItemSub in ls) |
| | | { |
| | | i++; |
| | | oItemSub.HEntryID = i; |
| | | oBill.DetailColl.Add(oItemSub); |
| | | } |
| | | |
| | | //ä¿å |
| | | bool bResult; |
| | | if (OperationType == "1") //æ°å¢ä¿å |
| | | { |
| | | bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | else //ç¼è¾ä¿å |
| | | { |
| | | bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | |
| | | if (bResult) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo; //æåï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + e.Message; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region æ ¹æ®ç©æIDãå·¥åºIDãèµæºIDè·å工价 |
| | | [Route("Pay_SingleBalBill/get_HPrice_BaseMaterHProcHSource")] |
| | | [HttpGet] |
| | | public object get_HPrice_BaseMaterHProcHSource(Int64 HMaterID, Int64 HProcID, Int64 HSourceID) |
| | | { |
| | | try |
| | | { |
| | | DAL.ClsGy_ProcPrice_Ctl oProcPrice = new DAL.ClsGy_ProcPrice_Ctl(); |
| | | double HPrice = oProcPrice.LoadProcPrice(HMaterID, HProcID, HSourceID, true); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = HPrice; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | //---------------------------------------------------------------------------------------------æ§æ¹æ³ |
| | | |
| | | #region å·¥èµç»ç®å个人-æ¥è¯¢ |
| | | /// <summary> |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region æ ¹æ®ç©æIDãå·¥åºIDãèµæºIDè·å工价 |
| | | [Route("Pay_SingleBalBill/get_HPrice_BaseMaterHProcHSource")] |
| | | [HttpGet] |
| | | public object get_HPrice_BaseMaterHProcHSource(Int64 HMaterID, Int64 HProcID, Int64 HSourceID) |
| | | { |
| | | try |
| | | { |
| | | DAL.ClsGy_ProcPrice_Ctl oProcPrice = new DAL.ClsGy_ProcPrice_Ctl(); |
| | | double HPrice = oProcPrice.LoadProcPrice(HMaterID, HProcID, HSourceID, true); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = HPrice; |
| | | return objJsonResult; |
| | | } |
| | | catch(Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | |
| | | <!--<add key="FileIP" value="http://localhost:8082/LuBaoAPI"/>--> |
| | | <!--<add key="FileIP" value="http://localhost:8080/" />--> |
| | | <!--<add key="sUrl" value="http://183.129.128.86:9090/WEBS-WMSTest/WebService1.asmx"/> --> |
| | | <!--add key="sUrl" value="http://192.168.63.53/WEBS-WMS/WebService1.asmx"/> é¢å°å¼æº--> |
| | | <add key="sUrl" value="http://192.168.63.53/WEBS-WMS/WebService1.asmx"/> <!--é¢å°å¼æº--> |
| | | <!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> å¤å®--> |
| | | <!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> --> |
| | | <!--<add key="sUrl" value="http://10.10.130.181/WEBS-WMS/WebService1.asmx"/> åæ¥ç§æ--> |
| | |
| | | <!--<add key="sUrl" value="http://192.168.80.90:9090/WEBS-WMS/WebService1.asmx"/> å®çæå¡å¨--> |
| | | <!--<add key="sUrl" value="http://47.96.97.237/WEBS-WMS/WebService1.asmx"/> --> <!--æµè¯æå¡å¨--> |
| | | <!--<add key="sUrl" value="http://localhost:8082/WEBS/WebService1.asmx"/> æ¬å°--> |
| | | <add key="sUrl" value="http://192.168.110.57:81/WEBS/WebService1.asmx"/> <!--éé¯éæ¬å°é
ç½®--> |
| | | <!--<add key="sUrl" value="http://192.168.110.57:81/WEBS/WebService1.asmx"/> éé¯éæ¬å°é
ç½®--> |
| | | <!--<add key="sUrl" value="http://192.168.1.57:8082/WEBS-WMS/WebService1.asmx"/>ä¹è±--> |
| | | |
| | | <add key="webpages:Version" value="3.0.0.0" /> |