4个文件已添加
4个文件已修改
1个文件已删除
2 文件已重命名
| | |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | /// <summary> |
| | | /// æ°å¢åæ®-ä¿åæé® |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("Pay_GroupBalBill/AddBill")] |
| | | [HttpPost] |
| | | public object AddBill([FromBody] JObject sMainSub) |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | oCN.BeginTran(); |
| | | //ä¿å主表 |
| | | objJsonResult = AddBillMain(msg1); |
| | | if (objJsonResult.code == "0") |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = objJsonResult.Message; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | oCN.Commit(); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æ°å¢åæ®æåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | public json AddBillMain(string msg1) |
| | | { |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | try |
| | | { |
| | | msg2 = "[" + msg2.ToString() + "]"; |
| | | List<Pay_GroupBalBill> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Pay_GroupBalBill>>(msg2); |
| | | string HBillType = "2202"; |
| | | long HInterID = mainList[0].HInterID;//éå
¥typeå¾å°çåæ®ID |
| | | string HBillNo = mainList[0].HBillNo;//éå
¥typeå¾å°çåæ®å· |
| | | DateTime HDate = mainList[0].HDate;//æ¥æ |
| | | int HYear = 2021; |
| | | double HPeriod = 1; |
| | | string HRemark = mainList[0].HRemark;//夿³¨ |
| | | string HBillSubType = "2202"; |
| | | string HMaker = mainList[0].HMaker; |
| | | string HExplanation = "0"; |
| | | string HInnerBillNo = "0"; |
| | | long HMaterID = mainList[0].HMaterID;//产åID |
| | | long HGroupID = mainList[0].HGroupID; |
| | | long HDeptID = mainList[0].HDeptID; |
| | | long HProcID = mainList[0].HProcID; |
| | | decimal HOtherSubsidy = mainList[0].HOtherSubsidy; |
| | | decimal HOtherDeduct = mainList[0].HOtherDeduct; |
| | | decimal HSumMoney = mainList[0].HSumMoney; |
| | | decimal HPayMoney = mainList[0].HPayMoney; |
| | | long HEmpID = mainList[0].HEmpID; |
| | | long HPayType = mainList[0].HPayType; |
| | | //long HMaterTypeID = 0; |
| | | int HPRDORGID = mainList[0].HPRDORGID; //ç»ç» |
| | | |
| | | //主表 |
| | | oCN.RunProc("Insert Into Pay_GroupBalBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | ",HGroupID,HDeptID,HPayType,HOtherSubsidy" + |
| | | ",HOtherDeduct,HSumMoney,HPayMoney" + |
| | | ",HExplanation,HInnerBillNo" + |
| | | ") " + |
| | | " values('" + HBillType + "','" + HBillSubType + "'," + HInterID.ToString() + ",'" + HBillNo + "','" + HDate + "'" + |
| | | ", " + HYear.ToString() + "," + HPeriod.ToString() + ",'" + HRemark + "','" + HMaker + "',getdate()" + |
| | | ", " + HGroupID.ToString() + "," + HDeptID.ToString() + "," + HPayType.ToString() + "," + HOtherSubsidy.ToString() + |
| | | "," + HOtherDeduct.ToString() + "," + HSumMoney.ToString() + "," + HPayMoney.ToString() + |
| | | ",'" + HExplanation + "','" + HInnerBillNo + "'" + |
| | | ") "); |
| | | |
| | | //ä¿åå表 |
| | | objJsonResult = AddBillSub(msg3, HInterID); |
| | | if (objJsonResult.code == "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = objJsonResult.Message; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = null; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | public json AddBillSub(string msg3, long HInterID) |
| | | { |
| | | List<Pay_GroupBalBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Pay_GroupBalBillSub>>(msg3); |
| | | for (int i = 0; i < subList.ToArray().Length; i++) |
| | | { |
| | | long HEntryID = subList[0].HEntryID;//工段ID |
| | | string HRemark = subList[0].HRemark; |
| | | long HSourceInterID = subList[0].HSourceInterID; |
| | | long HSourceEntryID = subList[0].HSourceEntryID; |
| | | string HSourceBillNo = subList[0].HSourceBillNo; |
| | | string HSourceBillType = subList[0].HSourceBillType; |
| | | decimal HRelationQty = subList[0].HRelationQty; |
| | | decimal HRelationMoney = subList[0].HRelationMoney; |
| | | long HSourceID = subList[0].HSourceID; |
| | | long HSqty = subList[0].HSqty; |
| | | long HMaterID = subList[0].HMaterID; |
| | | long HProcID = subList[0].HProcID; |
| | | long HUnitID = subList[0].HUnitID; |
| | | decimal HTimes = subList[0].HTimes; |
| | | decimal HQty = subList[0].HQty; |
| | | decimal HPrice = subList[0].HPrice; |
| | | decimal HMoney = subList[0].HMoney; |
| | | long HICMOInterID = subList[0].HICMOInterID; |
| | | string HICMOBillNo = subList[0].HICMOBillNo; |
| | | long HProcReportInterID = subList[0].HProcReportInterID; |
| | | long HProcReportEntryID = subList[0].HProcReportEntryID; |
| | | long HProcPlanInterID = subList[0].HProcPlanInterID; |
| | | long HProcPlanEntryID = subList[0].HProcPlanEntryID; |
| | | string HProcReportBillNo = subList[0].HProcReportBillNo; |
| | | string HProcPlanBillNo = subList[0].HProcPlanBillNo; |
| | | |
| | | string sql = "Insert into Pay_GroupBalBillSub " + |
| | | " (HInterID,HEntryID,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HMaterID,HUnitID,HProcID,HTimes,HQty,HPrice,HSourceID" + |
| | | ",HMoney,HICMOInterID,HICMOBillNo,HProcReportInterID,HProcReportEntryID,HProcReportBillNo" + |
| | | ",HProcPlanInterID,HProcPlanEntryID,HProcPlanBillNo,HSqty" + |
| | | ") values(" |
| | | + HInterID.ToString() + "," + HEntryID.ToString() + ",'" + HRemark + "'" + |
| | | "," + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "'," + HRelationQty.ToString() + "," + HRelationMoney.ToString() + |
| | | "," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HProcID.ToString() + "," + HTimes.ToString() + "," + HQty.ToString() + "," + HPrice.ToString() + "," + HSourceID.ToString() + |
| | | "," + HMoney.ToString() + "," + HICMOInterID.ToString() + ",'" + HICMOBillNo + "'," + HProcReportInterID.ToString() + "," + HProcReportEntryID.ToString() + ",'" + HProcReportBillNo + "'" + |
| | | "," + HProcPlanInterID.ToString() + "," + HProcPlanEntryID.ToString() + ",'" + HProcPlanBillNo + "'," + HSqty.ToString() + |
| | | ") "; |
| | | oCN.RunProc(sql); |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = null; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | /// <summary> |
| | | ///å·¥èµç»ç®ä¸ªäººåå é¤åè½ |
| | | /// </summary> |
New file |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Data.SqlClient; |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | |
| | | namespace WebAPI.Controllers |
| | | { |
| | | |
| | | public class Pay_OtherBalBillController : ApiController |
| | | { |
| | | public DBUtility.ClsPub.Enum_BillStatus BillStatus; |
| | | |
| | | private json objJsonResult = new json(); |
| | | public DataSet ds = new DataSet(); |
| | | public WebServer webserver = new WebServer(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | //DataSet ds; |
| | | public DLL.ClsPay_OtherBalBill BillNew0 = new DLL.ClsPay_OtherBalBill(); // |
| | | public DLL.ClsPay_OtherBalBill BillOld0 = new DLL.ClsPay_OtherBalBill(); // |
| | | |
| | | /// <summary> |
| | | /// è¿åå·¥èµç»ç®ä¸ªäººå表 |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("Pay_OtherBalBill/GetOtherBalBill")] |
| | | [HttpGet] |
| | | public object GetOtherBalBill(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | |
| | | ds = Sc_GetOtherBalBill(sWhere); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è¿åè®°å½æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼" + ex.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | public static DataSet Sc_GetOtherBalBill(string sWhere) |
| | | { |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Pay_OtherBalBillList order by æ¥æ desc", "h_v_Pay_OtherBalBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_Pay_OtherBalBillList where 1 = 1 "; |
| | | string sql = sql1 + sWhere + "order by æ¥æ desc"; |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Pay_OtherBalBillList"); |
| | | } |
| | | |
| | | } |
| | | |
| | | #region[å·¥èµç»ç®ä¸ªäººåç¼è¾æ¶è·åè¡¨å¤´æ°æ®] |
| | | [Route("Pay_OtherBalBill/Pay_OtherBalBillListCheckDetail")] |
| | | [HttpGet] |
| | | public ApiResult<DataSet> Pay_OtherBalBillListCheckDetail(string HID) |
| | | { |
| | | if (string.IsNullOrEmpty(HID)) |
| | | return new ApiResult<DataSet> { code = -1, msg = "IDä¸è½ä¸ºç©º" }; |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | |
| | | var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Pay_OtherBalBillList where hmainid= " + HID + " ", "h_v_Pay_OtherBalBillList"); |
| | | if (dataSet == null || dataSet.Tables[0].Rows.Count == 0) |
| | | return new ApiResult<DataSet> { code = -1, msg = "ä¸åå¨ç»ç®åå·" }; |
| | | |
| | | return new ApiResult<DataSet> { code = 1, msg = "æ¥è¯¢æå", data = dataSet }; |
| | | } |
| | | #endregion |
| | | |
| | | #region[å·¥èµç»ç®ä¸ªäººåç¼è¾æ¶è·åè¡¨ä½æ°æ®] |
| | | [Route("Pay_OtherBalBill/Pay_OtherBalBillListProjectDetai")] |
| | | [HttpGet] |
| | | public object Pay_OtherBalBillListProjectDetai(string sqlWhere) |
| | | { |
| | | DataSet ds; |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | string sql1 = "SELECT HMaterID,HMaterCode,HMaterName, HDeptID,é¨é¨ä»£ç ,é¨é¨" + |
| | | ",HGroupID,çç»ä»£ç ,çç»,å·¥èµç±»å,æè¦,å
é¨åæ®å·,è¡¨å¤´å¤æ³¨,å¶å人,å¶åæ¥æ" + |
| | | ",å®¡æ ¸äºº,å®¡æ ¸æ¥æ,ä¿®æ¹äºº,ä¿®æ¹æ¥æ,å
³é人, å
³éæ¥æ,HProcID,HProcNumber,HProcName" + |
| | | ",HEmpID,HEmpNumber,HEmpName,å·¥æ¶ HTimes ,æ°é HQty,工价 HPrice,éé¢ HMoney ,表ä½å¤æ³¨ as HRemark FROM h_v_Pay_OtherBalBillList where 1 = 1 "; |
| | | string sql = sql1 + sqlWhere; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Pay_OtherBalBillList"); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åä¿¡æ¯æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | [Route("Pay_OtherBalBill/SaveGetOtherBalBillList")] |
| | | [HttpPost] |
| | | /// <summary> |
| | | /// æ°å¢åæ®-ä¿åæé® |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | public object SaveGetOtherBalBillList([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 msg3 = sArray[1].ToString(); |
| | | string refSav = sArray[2].ToString(); |
| | | //string msg4 = sArray[3].ToString(); |
| | | |
| | | string UserName = ""; |
| | | string s = ""; |
| | | long mouldid; |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | ////ç¼è¾æé |
| | | //if (!DBUtility.ClsPub.Security_Log_second("Pay_SingleBalBill_Edit", 1, true, msg4)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ ä¿åæéï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | DLL.ClsPay_OtherBalBill oBill = new DLL.ClsPay_OtherBalBill(); |
| | | List<Models.ClsPay_OtherBalBillMain> lsmain = new List<Models.ClsPay_OtherBalBillMain>(); |
| | | msg2 = msg2.Replace("\\", ""); |
| | | msg2 = msg2.Replace("\n", ""); //\n |
| | | lsmain = oListModels.getObjectByJson_Pay_OtherBalBillMain(msg2); |
| | | foreach (Models.ClsPay_OtherBalBillMain oItem in lsmain) |
| | | { |
| | | if (refSav == "Add") |
| | | { |
| | | //忮巿¯å¦éå¤ |
| | | if (BillNew0.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld0.omodel.HInterID)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å·éå¤ï¼ä¸å
许ä¿åï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | if (refSav == "Update") |
| | | { |
| | | if (BillOld0.ShowBill(oItem.HInterID, ref s) == false) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¤åæ®æè¯¯ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | //夿æ¯å¦å¯ç¼è¾ |
| | | if (BillOld0.omodel.HChecker != "" && BillOld0.omodel.HChecker != null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¤åæ®å·²ç»è¢«å®¡æ ¸ï¼ä¸å
许修æ¹ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | if (BillOld0.omodel.HBillStatus > 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¤åæ®å¤äºä¸å¯ç¼è¾ç¶æï¼ä¸å
许修æ¹ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | if (!DBUtility.Xt_BaseBillFun.Fun_AllowEditBill(BillOld0, ref s)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = s + "ï¼ä¸å
许修æ¹"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | //oItem.HMaker = ""; |
| | | UserName = oItem.HMaker; //å¶å人 |
| | | oItem.HBillType = "2206"; |
| | | oItem.HBillSubType = "2206"; |
| | | //oItem.HBillNo = ""; //åæ®å· |
| | | //oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));// --æ¥æ |
| | | //oItem.HInnerBillNo = ""; // --å
é¨åæ®å· |
| | | 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")); |
| | | //oItem.HEquipID = 0; //设å¤ID(Gy_EquipMent) |
| | | //oItem.HPeriod = 0; |
| | | //oItem.HCheckBeginDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")); // --ç»´ä¿®æ¥æ |
| | | //oItem.HCheckResult = ""; //éªæ¶ç»è®º--(æ£å¸¸ï¼å¼å¸¸) |
| | | //oItem.HEmpID = 0; //éªæ¶äºº(Gy_Employee) |
| | | //oItem.HManagerID = 0; //è´è´£äºº(Gy_Employee) |
| | | //oItem.HDeptID = 0; //éªæ¶é¨é¨(Gy_Department) |
| | | //oItem.HExplanation = ""; //æè¦(æ
éæè¿°) |
| | | //oItem.HRemark = ""; //夿³¨ |
| | | |
| | | //oItem.HMainSourceInterID = oItem.HInterID; |
| | | |
| | | //oItem.HInterID = DBUtility.ClsPub.CreateBillID_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿åå¤±è´¥ï¼æ²¡æåæ®æ¥æï¼æ æ³ä¿åï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | oBill.omodel = oItem; |
| | | } |
| | | //è¡¨ä½æ°æ® |
| | | //æ },{æ¥æåæ°ç» //廿ãåã |
| | | msg3 = msg3.Substring(1, msg3.Length - 2); |
| | | msg3 = msg3.Replace("\\", ""); |
| | | msg3 = msg3.Replace("\n", ""); //\n |
| | | //msg2 = msg2.Replace("'", "â"); |
| | | List<Models.ClsPay_OtherBalBillSub> ls = new List<Models.ClsPay_OtherBalBillSub>(); |
| | | ls = oListModels.getObjectByJson_Pay_OtherBalBillSub(msg3); |
| | | int i = 0; |
| | | foreach (Models.ClsPay_OtherBalBillSub oItemSub in ls) |
| | | { |
| | | |
| | | i++; |
| | | oItemSub.HEntryID = i; |
| | | mouldid = oItemSub.HMaterID; |
| | | //oItemSub.HRepairCheckID = 0; //éªæ¶é¡¹ç®ID |
| | | //oItemSub.HRepairCheckContent = ""; //éªæ¶å
容 |
| | | //oItemSub.HManagerID = 0; //è´è´£äººID |
| | | //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; //å
³èéé¢ |
| | | //oItemSub.HRepairID = 0; //ç»´ä¿®é¡¹ç® |
| | | //oItemSub.HRepairExplanation =""; //ç»´ä¿®è¦æ± |
| | | //oItemSub.HMoney = 0; //ç»´ä¿®è´¹ç¨ |
| | | oBill.DetailColl.Add(oItemSub); |
| | | |
| | | } |
| | | //ä¿å |
| | | //ä¿å宿¯åå¤ç |
| | | bool bResult; |
| | | if (oBill.omodel.HInterID == 0) |
| | | { |
| | | // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | 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 = "ä¿åæåï¼"; |
| | | //WebAPIController.Add_Log("éè´§å䏿¨", UserName, "çæéè´§å"); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + e.ToString(); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | ///å·¥èµç»ç®å
¶ä»åå é¤åè½ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Pay_OtherBalBill/DeltetOtherBalBill")] |
| | | [HttpGet] |
| | | public object Pay_OtherBalBill(string HInterID) |
| | | { |
| | | try |
| | | { |
| | | oCN.BeginTran(); |
| | | oCN.RunProc("Delete From Pay_OtherBalBillMain where HInterID = " + HInterID); |
| | | oCN.RunProc("Delete From Pay_OtherBalBillSub where HInterID = " + HInterID); |
| | | oCN.Commit(); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å 餿åï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | [Route("Pay_OtherBalBill/getOtherBalBillPrice")] |
| | | [HttpGet] |
| | | public object getOtherBalBillPrice(string HMaterID, string HProcID) |
| | | { |
| | | try |
| | | { |
| | | DataSet ds = oCN.RunProcReturn("select åä»· from h_v_Gy_ProcPriceList where HMaterID='" + HMaterID + "' and HProcID='" + HProcID + "'", "h_v_Gy_ProcPriceList"); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æ¥è¯¢æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | // |
| | | } |
| | | } |
| | |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | [Route("Pay_SingleBalBill/SaveGetSingleBalBillList")] |
| | | [HttpPost] |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// æ°å¢åæ®-ä¿åæé® |
| | | ///åæ°ï¼string sqlã |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using System.Data; |
| | | |
| | | namespace WebAPI.DLL |
| | | { |
| | | public class ClsPay_GroupBalBill : DBUtility.ClsXt_BaseBill |
| | | { |
| | | public Model.ClsPay_GroupBalBillMain omodel = new Model.ClsPay_GroupBalBillMain(); |
| | | public List<Model.ClsPay_GroupBalBillSub> DetailColl = new List<Model.ClsPay_GroupBalBillSub>(); |
| | | public List<Model.ClsPay_GroupBalBillEmp> DetailEmpColl = new List<Model.ClsPay_GroupBalBillEmp>(); |
| | | |
| | | public ClsPay_GroupBalBill() |
| | | { |
| | | base.MvarItemKeySub = "Pay_GroupBalBillSub"; |
| | | base.MvarItemKeySub2 = "Pay_GroupBalBillEmp"; |
| | | base.MvarItemKeySub3 = ""; |
| | | base.MvarItemKeySub4 = ""; |
| | | base.MvarItemKey = "Pay_GroupBalBillMain"; |
| | | base.MvarReportTitle = "å·¥èµç»ç®åï¼çç»ï¼"; |
| | | base.BillType = "2202"; |
| | | base.HBillSubType = "2202"; |
| | | |
| | | } |
| | | |
| | | #region åºå®ä»£ç |
| | | |
| | | ~ClsPay_GroupBalBill() |
| | | { |
| | | DetailColl = null; |
| | | } |
| | | |
| | | #endregion èªå®ä¹æ¹æ³ |
| | | //ä¿®æ¹åæ® |
| | | public override bool ModifyBill(Int64 lngBillKey, ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | // |
| | | oCn.BeginTran(); |
| | | //æ´æ°ä¸»è¡¨ |
| | | oCn.RunProc("UpDate Pay_GroupBalBillMain set " + |
| | | " HBillNo='" + omodel.HBillNo + "'" + //åºå®èµå¼=============== |
| | | ",HDate='" + omodel.HDate + "'" + |
| | | ",HYear='" + omodel.HYear.ToString() + "'" + |
| | | ",HPeriod='" + omodel.HPeriod.ToString() + "'" + |
| | | ",HRemark='" + omodel.HRemark + "'" + |
| | | ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" + |
| | | ",HUpDateDate=getdate()" + |
| | | //======================================== |
| | | ",HGroupID=" + omodel.HGroupID.ToString() + |
| | | ",HDeptID=" + omodel.HDeptID.ToString() + |
| | | ",HOtherSubsidy=" + omodel.HOtherSubsidy.ToString() + |
| | | ",HOtherDeduct=" + omodel.HOtherDeduct.ToString() + |
| | | ",HSumMoney=" + omodel.HSumMoney.ToString() + |
| | | ",HPayMoney=" + omodel.HPayMoney.ToString() + |
| | | ",HPayType=" + omodel.HPayType.ToString() + |
| | | ",HExplanation='" + omodel.HExplanation + "'" + |
| | | ",HInnerBillNo='" + omodel.HInnerBillNo + "'" + |
| | | " where HInterID=" + lngBillKey.ToString()); |
| | | //å é¤å
³è |
| | | DeleteRelation(ref sReturn, lngBillKey); |
| | | //å é¤å表 |
| | | DeleteBillSub(lngBillKey); |
| | | DeleteBillSub2(lngBillKey); |
| | | //æå
¥å表 |
| | | omodel.HInterID = lngBillKey; |
| | | foreach (Model.ClsPay_GroupBalBillSub oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Pay_GroupBalBillSub " + |
| | | " (HInterID,HEntryID,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HMaterID,HUnitID,HProcID,HTimes,HQty,HPrice,HSourceID" + |
| | | ",HMoney,HICMOInterID,HICMOBillNo,HProcReportInterID,HProcReportEntryID,HProcReportBillNo" + |
| | | ",HProcPlanInterID,HProcPlanEntryID,HProcPlanBillNo,HSqty" + |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HRemark + "'" + |
| | | "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + |
| | | "," + oSub.HMaterID.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HProcID.ToString() + "," + oSub.HTimes.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HSourceID.ToString() + |
| | | "," + oSub.HMoney.ToString() + "," + oSub.HICMOInterID.ToString() + ",'" + oSub.HICMOBillNo + "'," + oSub.HProcReportInterID.ToString() + "," + oSub.HProcReportEntryID.ToString() + ",'" + oSub.HProcReportBillNo + "'" + |
| | | "," + oSub.HProcPlanInterID.ToString() + "," + oSub.HProcPlanEntryID.ToString() + ",'" + oSub.HProcPlanBillNo + "'," + oSub.HSqty.ToString() + |
| | | ") "); |
| | | } |
| | | // |
| | | //æå
¥å表2 |
| | | foreach (Model.ClsPay_GroupBalBillEmp oSubSec in DetailEmpColl) |
| | | { |
| | | oCn.RunProc("Insert into Pay_GroupBalBillEmp " + |
| | | " (HInterID,HEntryID,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HEmpID,HEmpRate" + |
| | | ",HBaseTimes,HOverTimes,HLeaveTimes,HCTPrjID" + |
| | | ",HBaseDays,HOverDays,HLeaveDays,HYf" + |
| | | ",HMoney,HOtherSubsidy,HOtherDeduct,HIsPay,HAvgFlag" + |
| | | ")" + |
| | | " values(" |
| | | + omodel.HInterID.ToString() + "," + oSubSec.HEntryID.ToString() + ",'" + oSubSec.HRemark + "'" + |
| | | "," + oSubSec.HSourceInterID.ToString() + "," + oSubSec.HSourceEntryID.ToString() + ",'" + oSubSec.HSourceBillNo + "','" + oSubSec.HSourceBillType + "'," + oSubSec.HRelationQty.ToString() + "," + oSubSec.HRelationMoney.ToString() + |
| | | "," + oSubSec.HEmpID.ToString() + "," + oSubSec.HEmpRate.ToString() + |
| | | "," + oSubSec.HBaseTimes.ToString() + "," + oSubSec.HOverTimes.ToString() + "," + oSubSec.HLeaveTimes.ToString() + "," + oSubSec.HCTPrjID.ToString() + |
| | | "," + oSubSec.HBaseDays.ToString() + "," + oSubSec.HOverDays.ToString() + "," + oSubSec.HLeaveDays.ToString() + "," + oSubSec.HYf.ToString() + |
| | | "," + oSubSec.HMoney.ToString() + "," + oSubSec.HOtherSubsidy.ToString() + "," + oSubSec.HOtherDeduct.ToString() + "," + Convert.ToString(oSubSec.HIsPay ? 1 : 0) + "," + Convert.ToString(oSubSec.HAvgFlag ? 1 : 0) + ") "); |
| | | } |
| | | //foreach (Model.ClsPay_GroupBalBillSub oSub in DetailColl) |
| | | //{ |
| | | // Ds = oCn.RunProcReturn("exec h_p_Pay_GroupBalBill_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 = "ä¿®æ¹åæ®æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | } |
| | | } |
| | | //æ°å¢åæ® |
| | | public override bool AddBill(ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | //å¾å°mainid |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | oCn.BeginTran(); |
| | | //主表 |
| | | oCn.RunProc("Insert Into Pay_GroupBalBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | ",HGroupID,HDeptID,HPayType,HOtherSubsidy" + |
| | | ",HOtherDeduct,HSumMoney,HPayMoney" + |
| | | ",HExplanation,HInnerBillNo" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" + |
| | | ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" + |
| | | ", " + omodel.HGroupID.ToString() + "," + omodel.HDeptID.ToString() + "," + omodel.HPayType.ToString() + "," + omodel.HOtherSubsidy.ToString() + |
| | | "," + omodel.HOtherDeduct.ToString() + "," + omodel.HSumMoney.ToString() + "," + omodel.HPayMoney.ToString() + |
| | | ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'" + |
| | | ") "); |
| | | // |
| | | //æå
¥å表 |
| | | foreach (Model.ClsPay_GroupBalBillSub oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Pay_GroupBalBillSub " + |
| | | " (HInterID,HEntryID,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HMaterID,HUnitID,HProcID,HTimes,HQty,HPrice,HSourceID" + |
| | | ",HMoney,HICMOInterID,HICMOBillNo,HProcReportInterID,HProcReportEntryID,HProcReportBillNo" + |
| | | ",HProcPlanInterID,HProcPlanEntryID,HProcPlanBillNo,HSqty" + |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HRemark + "'" + |
| | | "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + |
| | | "," + oSub.HMaterID.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HProcID.ToString() + "," + oSub.HTimes.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HSourceID.ToString() + |
| | | "," + oSub.HMoney.ToString() + "," + oSub.HICMOInterID.ToString() + ",'" + oSub.HICMOBillNo + "'," + oSub.HProcReportInterID.ToString() + "," + oSub.HProcReportEntryID.ToString() + ",'" + oSub.HProcReportBillNo + "'" + |
| | | "," + oSub.HProcPlanInterID.ToString() + "," + oSub.HProcPlanEntryID.ToString() + ",'" + oSub.HProcPlanBillNo + "'," + oSub.HSqty.ToString() + |
| | | ") "); |
| | | } |
| | | // |
| | | //æå
¥å表2 |
| | | foreach (Model.ClsPay_GroupBalBillEmp oSubSec in DetailEmpColl) |
| | | { |
| | | oCn.RunProc("Insert into Pay_GroupBalBillEmp " + |
| | | " (HInterID,HEntryID,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HEmpID,HEmpRate" + |
| | | ",HBaseTimes,HOverTimes,HLeaveTimes,HCTPrjID" + |
| | | ",HBaseDays,HOverDays,HLeaveDays,HYf" + |
| | | ",HMoney,HOtherSubsidy,HOtherDeduct,HIsPay,HAvgFlag" + |
| | | ")" + |
| | | " values(" |
| | | + omodel.HInterID.ToString() + "," + oSubSec.HEntryID.ToString() + ",'" + oSubSec.HRemark + "'" + |
| | | "," + oSubSec.HSourceInterID.ToString() + "," + oSubSec.HSourceEntryID.ToString() + ",'" + oSubSec.HSourceBillNo + "','" + oSubSec.HSourceBillType + "'," + oSubSec.HRelationQty.ToString() + "," + oSubSec.HRelationMoney.ToString() + |
| | | "," + oSubSec.HEmpID.ToString() + "," + oSubSec.HEmpRate.ToString() + |
| | | "," + oSubSec.HBaseTimes.ToString() + "," + oSubSec.HOverTimes.ToString() + "," + oSubSec.HLeaveTimes.ToString() + "," + oSubSec.HCTPrjID.ToString() + |
| | | "," + oSubSec.HBaseDays.ToString() + "," + oSubSec.HOverDays.ToString() + "," + oSubSec.HLeaveDays.ToString() + "," + oSubSec.HYf.ToString() + |
| | | "," + oSubSec.HMoney.ToString() + "," + oSubSec.HOtherSubsidy.ToString() + "," + oSubSec.HOtherDeduct.ToString() + "," + Convert.ToString(oSubSec.HIsPay ? 1 : 0) + "," + Convert.ToString(oSubSec.HAvgFlag ? 1 : 0) + ") "); |
| | | } |
| | | // |
| | | //foreach (Model.ClsPay_GroupBalBillSub oSub in DetailColl) |
| | | //{ |
| | | // Ds = oCn.RunProcReturn("exec h_p_Pay_GroupBalBill_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 = "æ°å¢åæ®æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | } |
| | | } |
| | | //æ¾ç¤ºåæ® |
| | | public override bool ShowBill(Int64 lngBillKey, ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | //æ¥è¯¢ä¸»è¡¨ |
| | | DataSet Ds; |
| | | Ds = oCn.RunProcReturn("Select * from Pay_GroupBalBillMain Where HInterID=" + lngBillKey.ToString(), "Pay_GroupBalBillMain"); |
| | | if (Ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sReturn = "åæ®æªæ¾å°ï¼"; |
| | | return false; |
| | | } |
| | | //åºå®èµå¼=========================================== |
| | | omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]); |
| | | omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]); |
| | | omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]); |
| | | omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]); |
| | | omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]); |
| | | omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]); |
| | | omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim(); |
| | | omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]); |
| | | omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]); |
| | | omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]); |
| | | omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]); |
| | | omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim(); |
| | | omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim(); |
| | | omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim(); |
| | | omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim(); |
| | | omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim(); |
| | | omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim(); |
| | | omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim(); |
| | | omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim(); |
| | | omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim(); |
| | | omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim(); |
| | | omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim(); |
| | | omodel.HCloseType = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HCloseType"]); |
| | | omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim(); |
| | | omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim(); |
| | | //======================================================== |
| | | omodel.HGroupID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HGroupID"]); |
| | | omodel.HDeptID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HDeptID"]); |
| | | omodel.HPayType = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPayType"]); |
| | | omodel.HOtherSubsidy = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HOtherSubsidy"]); |
| | | omodel.HOtherDeduct = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HOtherDeduct"]); |
| | | omodel.HSumMoney = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HSumMoney"]); |
| | | omodel.HPayMoney = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HPayMoney"]); |
| | | omodel.HExplanation = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HExplanation"]); |
| | | omodel.HInnerBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HInnerBillNo"]); |
| | | // |
| | | |
| | | //å¾ªç¯ |
| | | DataSet DsSub; |
| | | DsSub = oCn.RunProcReturn("Select * from Pay_GroupBalBillSub Where HInterID=" + lngBillKey.ToString() + " order by HEntryID ", "Pay_GroupBalBillSub"); |
| | | DetailColl.Clear();//æ¸
空 |
| | | for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++) |
| | | { |
| | | Model.ClsPay_GroupBalBillSub oSub = new Model.ClsPay_GroupBalBillSub(); |
| | | // åºå®èµå¼=============================================== |
| | | oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]); |
| | | oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]); |
| | | oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]); |
| | | oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]); |
| | | oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim(); |
| | | oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim(); |
| | | oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]); |
| | | oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]); |
| | | oSub.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]); |
| | | oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]); |
| | | oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]); |
| | | oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim(); |
| | | //=================================================== |
| | | oSub.HMaterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HMaterID"]); |
| | | oSub.HUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HUnitID"]); |
| | | oSub.HProcID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProcID"]); |
| | | oSub.HSourceID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceID"]); |
| | | oSub.HTimes = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HTimes"]); |
| | | oSub.HQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HQty"]); |
| | | oSub.HPrice = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HPrice"]); |
| | | oSub.HMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HMoney"]); |
| | | oSub.HICMOInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HICMOInterID"]); |
| | | oSub.HICMOBillNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HICMOBillNo"]); |
| | | oSub.HProcReportInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProcReportInterID"]); |
| | | oSub.HProcReportEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProcReportEntryID"]); |
| | | oSub.HProcReportBillNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HProcReportBillNo"]); |
| | | oSub.HProcPlanInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProcPlanInterID"]); |
| | | oSub.HProcPlanEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProcPlanEntryID"]); |
| | | oSub.HProcPlanBillNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HProcPlanBillNo"]); |
| | | oSub.HSqty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HSqty"]); |
| | | DetailColl.Add(oSub); |
| | | } |
| | | //循ç¯å表2 |
| | | DataSet DsSubSec = new DataSet(); |
| | | DsSubSec = oCn.RunProcReturn("Select * from Pay_GroupBalBillEmp Where HInterID=" + lngBillKey.ToString() + " order by HEntryID ", "Pay_GroupBalBillMain"); |
| | | DetailEmpColl.Clear();//æ¸
空 |
| | | for (int i = 0; i < DsSubSec.Tables[0].Rows.Count; i++) |
| | | { |
| | | Model.ClsPay_GroupBalBillEmp oSubSec = new Model.ClsPay_GroupBalBillEmp(); |
| | | // åºå®èµå¼=============================================== |
| | | oSubSec.HInterID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HInterID"]); |
| | | oSubSec.HEntryID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HEntryID"]); |
| | | oSubSec.HSourceInterID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HSourceInterID"]); |
| | | oSubSec.HSourceEntryID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HSourceEntryID"]); |
| | | oSubSec.HSourceBillType = DsSubSec.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim(); |
| | | oSubSec.HSourceBillNo = DsSubSec.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim(); |
| | | oSubSec.HRelationQty = DBUtility.ClsPub.isDoule(DsSubSec.Tables[0].Rows[i]["HRelationQty"]); |
| | | oSubSec.HRelationMoney = DBUtility.ClsPub.isDoule(DsSubSec.Tables[0].Rows[i]["HRelationMoney"]); |
| | | oSubSec.HCloseMan = DBUtility.ClsPub.isStrNull(DsSubSec.Tables[0].Rows[i]["HCloseMan"]); |
| | | oSubSec.HCloseType = DBUtility.ClsPub.isBool(DsSubSec.Tables[0].Rows[i]["HCloseType"]); |
| | | oSubSec.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSubSec.Tables[0].Rows[i]["HEntryCloseDate"]); |
| | | oSubSec.HRemark = DsSubSec.Tables[0].Rows[i]["HRemark"].ToString().Trim(); |
| | | //=================================================== |
| | | oSubSec.HEmpID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HEmpID"]); |
| | | oSubSec.HCTPrjID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HCTPrjID"]); |
| | | oSubSec.HEmpRate = DBUtility.ClsPub.isDoule(DsSubSec.Tables[0].Rows[i]["HEmpRate"]); |
| | | oSubSec.HBaseTimes = DBUtility.ClsPub.isDoule(DsSubSec.Tables[0].Rows[i]["HBaseTimes"]); |
| | | oSubSec.HOverTimes = DBUtility.ClsPub.isDoule(DsSubSec.Tables[0].Rows[i]["HOverTimes"]); |
| | | oSubSec.HLeaveTimes = DBUtility.ClsPub.isDoule(DsSubSec.Tables[0].Rows[i]["HLeaveTimes"]); |
| | | oSubSec.HBaseDays = DBUtility.ClsPub.isDoule(DsSubSec.Tables[0].Rows[i]["HBaseDays"]); |
| | | oSubSec.HOverDays = DBUtility.ClsPub.isDoule(DsSubSec.Tables[0].Rows[i]["HOverDays"]); |
| | | oSubSec.HLeaveDays = DBUtility.ClsPub.isDoule(DsSubSec.Tables[0].Rows[i]["HLeaveDays"]); |
| | | oSubSec.HMoney = DBUtility.ClsPub.isDoule(DsSubSec.Tables[0].Rows[i]["HMoney"]); |
| | | oSubSec.HOtherSubsidy = DBUtility.ClsPub.isDoule(DsSubSec.Tables[0].Rows[i]["HOtherSubsidy"]); |
| | | oSubSec.HOtherDeduct = DBUtility.ClsPub.isDoule(DsSubSec.Tables[0].Rows[i]["HOtherDeduct"]); |
| | | oSubSec.HYf = DBUtility.ClsPub.isDoule(DsSubSec.Tables[0].Rows[i]["HYf"]); |
| | | oSubSec.HIsPay = DBUtility.ClsPub.isBool(DsSubSec.Tables[0].Rows[i]["HIsPay"]); |
| | | oSubSec.HAvgFlag = DBUtility.ClsPub.isBool(DsSubSec.Tables[0].Rows[i]["HAvgFlag"]); |
| | | |
| | | // |
| | | DetailEmpColl.Add(oSubSec); |
| | | } |
| | | sReturn = "æ¾ç¤ºåæ®æåï¼"; |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | } |
File was renamed from WebAPI/DLL/ClsPay_OtherBalBill.cs |
| | |
| | | using System.Text; |
| | | using System.Data; |
| | | |
| | | namespace DAL |
| | | namespace WebAPI.DLL |
| | | { |
| | | public class ClsPay_OtherBalBill : DBUtility.ClsXt_BaseBill |
| | | { |
| | | public Model.ClsPay_OtherBalBillMain omodel = new Model.ClsPay_OtherBalBillMain(); |
| | | public List<Model.ClsPay_OtherBalBillSub> DetailColl = new List<Model.ClsPay_OtherBalBillSub>(); |
| | | public Models.ClsPay_OtherBalBillMain omodel = new Models.ClsPay_OtherBalBillMain(); |
| | | public List<Models.ClsPay_OtherBalBillSub> DetailColl = new List<Models.ClsPay_OtherBalBillSub>(); |
| | | |
| | | public ClsPay_OtherBalBill() |
| | | { |
| | |
| | | DeleteBillSub(lngBillKey); |
| | | //æå
¥å表 |
| | | omodel.HInterID = lngBillKey; |
| | | foreach (Model.ClsPay_OtherBalBillSub oSub in DetailColl) |
| | | foreach (Models.ClsPay_OtherBalBillSub oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Pay_OtherBalBillSub " + |
| | | " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | |
| | | ") "); |
| | | } |
| | | // |
| | | //foreach (Model.ClsPay_SingleBalBillSub oSub in DetailColl) |
| | | //foreach (Models.ClsPay_SingleBalBillSub oSub in DetailColl) |
| | | //{ |
| | | // Ds = oCn.RunProcReturn("exec h_p_Pay_SingleBalBill_Qty " + oSub.HICMOInterID, ""); |
| | | // if (Ds.Tables[0].Rows.Count == 0) |
| | |
| | | //主表 |
| | | oCn.RunProc("Insert Into Pay_OtherBalBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate,HSaveFlag" + |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | ",HGroupID,HDeptID,HEmpID,HPayType,HExplanation,HInnerBillNo" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" + |
| | | ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()," + |
| | | ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" + |
| | | ", " + omodel.HGroupID.ToString() + "," + omodel.HDeptID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HPayType.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'" + |
| | | ") "); |
| | | //æå
¥å表 |
| | | foreach (Model.ClsPay_OtherBalBillSub oSub in DetailColl) |
| | | foreach (Models.ClsPay_OtherBalBillSub oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Pay_OtherBalBillSub " + |
| | | " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | |
| | | ") "); |
| | | } |
| | | // |
| | | //foreach (Model.ClsPay_SingleBalBillSub oSub in DetailColl) |
| | | //foreach (Models.ClsPay_SingleBalBillSub oSub in DetailColl) |
| | | //{ |
| | | // Ds = oCn.RunProcReturn("exec h_p_Pay_SingleBalBill_Qty " + oSub.HICMOInterID, ""); |
| | | // if (Ds.Tables[0].Rows.Count == 0) |
| | |
| | | DetailColl.Clear();//æ¸
空 |
| | | for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++) |
| | | { |
| | | Model.ClsPay_OtherBalBillSub oSub = new Model.ClsPay_OtherBalBillSub(); |
| | | Models.ClsPay_OtherBalBillSub oSub = new Models.ClsPay_OtherBalBillSub(); |
| | | // åºå®èµå¼=============================================== |
| | | oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]); |
| | | oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]); |
| | |
| | | return list; |
| | | } |
| | | |
| | | //å·¥èµç®¡ç å·¥èµç»ç®å |
| | | //å·¥èµç®¡ç å·¥èµç»ç®å(个人) |
| | | public List<Models.ClsPay_SingleBalBillMain> getObjectByJson_Pay_SingleBalBillMain(string jsonString) |
| | | { |
| | | jsonString = "[" + jsonString.ToString() + "]"; |
| | |
| | | List<Models.ClsPay_SingleBalBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsPay_SingleBalBillSub>>(jsonString); |
| | | return list; |
| | | } |
| | | |
| | | //å·¥èµç®¡ç å·¥èµç»ç®å(å
¶å®) |
| | | public List<Models.ClsPay_OtherBalBillMain> getObjectByJson_Pay_OtherBalBillMain(string jsonString) |
| | | { |
| | | jsonString = "[" + jsonString.ToString() + "]"; |
| | | List<Models.ClsPay_OtherBalBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsPay_OtherBalBillMain>>(jsonString); |
| | | return list; |
| | | } |
| | | public List<Models.ClsPay_OtherBalBillSub> getObjectByJson_Pay_OtherBalBillSub(string jsonString) |
| | | { |
| | | jsonString = "[" + jsonString.ToString() + "]"; |
| | | List<Models.ClsPay_OtherBalBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsPay_OtherBalBillSub>>(jsonString); |
| | | return list; |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | |
| | | namespace WebAPI.Models |
| | | { |
| | | public class ClsPay_OtherBalBillMain:DBUtility.ClsXt_BaseBillMain |
| | | { |
| | | public Int64 HGroupID;// int //çç»ID |
| | | public Int64 HDeptID;// int // |
| | | public Int64 HEmpID;// int |
| | | public Int64 HPayType;// int //å·¥èµç±»å |
| | | public string HExplanation;// varchar(200) --ÕªÒª |
| | | public string HInnerBillNo;// varchar(50) --å
é¨åæ®å· |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | |
| | | namespace WebAPI.Models |
| | | { |
| | | public class ClsPay_OtherBalBillSub:DBUtility.ClsXt_BaseBillSub |
| | | { |
| | | public DateTime HEntryCloseDate;// datetime --è¡å
³é (é»è®¤ä¸º'') new |
| | | public string HRemark;// varchar(200) --夿³¨ |
| | | public Int64 HMaterID;// int --ç©æID |
| | | public Int64 HProcID;// int --å·¥åºID |
| | | public Int64 HEmpID;// int --Ö°Ô±ID |
| | | public double HTimes;// decimal(18,8) --å·¥æ¶ |
| | | public double HQty;// decimal(18,8) --æ°é |
| | | public double HPrice;// decimal(18,8) --工价 |
| | | public double HMoney;// decimal(18,8) --éé¢ |
| | | public Single HPriceRate;// money -- å®é¢æµ®å¨æ¯ç |
| | | public Single HSubsidyTotal;// money -- 补贴å计 |
| | | public Single HDeuctTotal;// money -- æ£æ¬¾å°è®¡ |
| | | public Int64 HICMOInterID;// int --ç产任å¡åID |
| | | public string HICMOBillNo;// varchar(50) --ç产任å¡åå· |
| | | public Int64 HProcReportInterID;// int --å·¥åºæ±æ¥åID |
| | | public Int64 HProcReportEntryID;// int --å·¥åºæ±æ¥ååID |
| | | public string HProcReportBillNo;// varchar(50) --å·¥åºæ±æ¥åå· |
| | | public Int64 HProcPlanInterID;// int --å·¥åºè®¡ååID |
| | | public Int64 HProcPlanEntryID;// int --å·¥åºè®¡åååID |
| | | public string HProcPlanBillNo;// varchar(50) --å·¥åºè®¡ååå· |
| | | public Int64 HSourceID; |
| | | public long HSubsidyID;// money -- 补贴å计 |
| | | public long HDeuctID;// money -- æ£æ¬¾å°è®¡ |
| | | public double HPackQty;// dec(18,8) --å
è£
æ°é --addnew |
| | | public double HPackPrice;// dec(18,8) --å
è£
åä»· --addnew |
| | | public double HPackMoney;// dec(18,8) --å
è£
éé¢ --addnew |
| | | public Int64 HPackMaterID;// int --å
è£
ç±»å --addnew |
| | | public double HSubsidyQty; |
| | | public double HSubsidyMoney; |
| | | public double HSqty; |
| | | } |
| | | } |
| | |
| | | <Compile Include="Controllers\MJJY\Mj_PDA_MoudlCheckController.cs" /> |
| | | <Compile Include="Controllers\MoveStockBillController.cs" /> |
| | | <Compile Include="Controllers\Open_PrintTemController.cs" /> |
| | | <Compile Include="Controllers\Pay_OtherBalBillController.cs" /> |
| | | <Compile Include="Controllers\å·¥èµç®¡ç\Pay_OtherBalBillController.cs" /> |
| | | <Compile Include="Controllers\Pay_GroupBalBillController.cs" /> |
| | | <Compile Include="Controllers\PurchaseOrderController.cs" /> |
| | | <Compile Include="Controllers\QC_POStockInCheckBillController.cs" /> |
| | |
| | | <Compile Include="DLL\ClsSc_MouldOtherOutBill.cs" /> |
| | | <Compile Include="DLL\ClsSc_MouldOtherInBill.cs" /> |
| | | <Compile Include="DLL\ClsSc_MouldMoveStockStepOutBill.cs" /> |
| | | <Compile Include="DLL\ClsPay_SingleBalBill.cs" /> |
| | | <Compile Include="DLL\å·¥èµç®¡ç\ClsPay_GroupBalBill.cs" /> |
| | | <Compile Include="DLL\å·¥èµç®¡ç\ClsPay_SingleBalBill.cs" /> |
| | | <Compile Include="DLL\ClsSc_MouldProdBackBill.cs" /> |
| | | <Compile Include="DLL\ClsPay_OtherBalBill.cs" /> |
| | | <Compile Include="DLL\å·¥èµç®¡ç\ClsPay_OtherBalBill.cs" /> |
| | | <Compile Include="DLL\ClsSc_MouldProdInBill.cs" /> |
| | | <Compile Include="DLL\ClsSc_MouldMoveStockStepInBill.cs" /> |
| | | <Compile Include="DLL\ClsSc_MouldProdMoveBill.cs" /> |
| | |
| | | <Compile Include="Models\ClsKf_MateOutBillSub.cs" /> |
| | | <Compile Include="Models\ClsOA_InformBillMain.cs" /> |
| | | <Compile Include="Models\ClsOA_InformBillSub.cs" /> |
| | | <Compile Include="Models\å·¥èµç®¡ç\ClsPay_OtherBalBillMain.cs" /> |
| | | <Compile Include="Models\å·¥èµç®¡ç\ClsPay_OtherBalBillSub.cs" /> |
| | | <Compile Include="Models\å·¥èµç®¡ç\ClsPay_SingleBalBillMain.cs" /> |
| | | <Compile Include="Models\å·¥èµç®¡ç\ClsPay_SingleBalBillSub.cs" /> |
| | | <Compile Include="Models\ClsSb_EquipDotCheckRuleBillMain.cs" /> |