From 96fa1feae3bd8888de0b4fdaf9bd2e84866013dd Mon Sep 17 00:00:00 2001 From: YL <YL@LAPTOP-SE03PLUR> Date: 星期四, 16 十二月 2021 17:00:52 +0800 Subject: [PATCH] nothing --- WebAPI/Controllers/BaseSet/Gy_EmployeeController.cs | 44 +++++++++++++++++--------------------------- 1 files changed, 17 insertions(+), 27 deletions(-) diff --git a/WebAPI/Controllers/BaseSet/Gy_EmployeeController.cs b/WebAPI/Controllers/BaseSet/Gy_EmployeeController.cs index 0dca6d2..c17c107 100644 --- a/WebAPI/Controllers/BaseSet/Gy_EmployeeController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_EmployeeController.cs @@ -27,36 +27,26 @@ /// </summary> [Route("Gy_Employee/list")] [HttpGet] - public object list(string sWhere) + public object list(string sWhere,string Organization) { try { + string sql1 = string.Format(@"select * from h_v_IF_EmployeeList where 缁勭粐鍚嶇О='" + Organization + "'"); if (sWhere == null || sWhere.Equals("")) { - ds = oCN.RunProcReturn("select * from h_v_IF_EmployeeList where 绂佺敤鏍囪='' ", "h_v_IF_EmployeeList"); + ds = oCN.RunProcReturn(sql1 + sWhere + "order by HItemID desc", "h_v_IF_EmployeeList"); } else { - string sql1 = "select * from h_v_IF_EmployeeList where 绂佺敤鏍囪='' "; - string sql = sql1 + sWhere; + string sql = sql1 + sWhere + "order by HItemID desc"; ds = oCN.RunProcReturn(sql, "h_v_IF_EmployeeList"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "false锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } catch (Exception e) { @@ -97,7 +87,7 @@ string HHelpCode = list[0].HHelpCode; bool HEndFlag = list[0].HEndFlag; bool HStopflag = list[0].HStopflag; - string HRemark = list[0].HRemark; + string HRemark = list[0].HRemark; string HUseFlag = list[0].HUseFlag; string HSex = list[0].HSex; string HIDCard = list[0].HIDCard; @@ -211,7 +201,7 @@ ",HDimissionDate,HInComDate,HSignDate,HRelDate" + ",HPostID,HDormID,HDutyID,HLeftMoneyRate" + ",HEmpType,HPayType,HOverType,HNoBrushFlag,HShiftFlag,HStopwagesFlag" + - ",HPostalCode,HBank,HBasePay,HExamLevPostMoney,HBSTDeptID" + + ",HPostalCode,HBank,HBasePay,HExamLevPostMoney,HBSTDeptID" + ",HOtherDeduct3,HInsurance,HMedicare,HDrydock" + ",HBankAccount,HGroupID,HDeptID,HWorkTypeID,HCTPrjID,HAddress" + ") " + @@ -220,14 +210,14 @@ "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "'" + ",'" + HHelpCode + "'," + HInsuranceSubsidy.ToString() + "" + ",'" + HBirthDay + "','" + HGradDate + "','" + HInsuranceDate + "','" + HContractBDate + "','" + HContractEDate + "'" + ",'" + HJobCardEDate + "','" + HCheckCardEDate + "','" + HStayCardEDate + "','" + HHealthCardEDate + "'" + - "," + HAge.ToString() + ",'" + HSalaryLev + "'," + HContractYear.ToString() + "," + HInsuranceStatus + "," + Convert.ToString(HSignStatus ? 1 : 0) + + "," + HAge.ToString() + ",'" + HSalaryLev + "'," + HContractYear.ToString() + "," + HInsuranceStatus + "," + Convert.ToString(HSignStatus ? 1 : 0) + ",'" + HSex + "','" + HMarr + "','" + HBlighty + "','" + HNation + "','" + HBlightyType + "'" + ",'" + HGovStatus + "','" + HBloodType + "','" + HStature + "','" + HAvoird + "','" + HKnowLev + "'" + ",'" + HProTitleID + "','" + HGradSchool + "','" + HEngLev + "','" + HCompLev + "','" + HSpec + "'" + ",'" + HEmail + "','" + HNowAdd + "','" + HHomeAdd + "','" + HIDCard + "','" + HLinkPhone + "','" + HMobilePhone + "','" + HFax + "'" + - ",'" + HOldCompany + "','" +HInsuranceNo + "','" +HJobCardNo + "','" +HArchivesNo + "','" + HWorkType + "','" + HDimissionReason + "'" + + ",'" + HOldCompany + "','" + HInsuranceNo + "','" + HJobCardNo + "','" + HArchivesNo + "','" + HWorkType + "','" + HDimissionReason + "'" + ",'" + HDimissionDate + "','" + HInComDate + "','" + HSignDate + "','" + HRelDate + "'" + - "," + HPostID.ToString() + "," +HDormID.ToString() + "," + HDutyID.ToString() + "," + HLeftMoneyRate.ToString() + + "," + HPostID.ToString() + "," + HDormID.ToString() + "," + HDutyID.ToString() + "," + HLeftMoneyRate.ToString() + ",'" + HEmpType + "'" + ",'" + HPayType + "'" + "," + DBUtility.ClsPub.BoolToString(HOverType) + "" + "," + DBUtility.ClsPub.BoolToString(HNoBrushFlag) + "" + "," + DBUtility.ClsPub.BoolToString(HShiftFlag) + "" + "," + DBUtility.ClsPub.BoolToString(HStopwagesFlag) + "" + ",'" + HPostalCode + "','" + HBank + "'," + HBasePay.ToString() + "," + HExamLevPostMoney.ToString() + ",'" + HBSTDeptID + "'" + "," + HOtherDeduct3.ToString() + "" + "," + HInsurance.ToString() + "" + "," + HMedicare.ToString() + "" + "," + HDrydock.ToString() + "" + @@ -235,7 +225,7 @@ ")"); //淇敼涓婄骇涓洪潪鏈骇浠g爜 oCN.RunProc("Update Gy_Employee set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); - + oCN.Commit(); objJsonResult.code = "1"; objJsonResult.count = 1; @@ -584,7 +574,7 @@ // objJsonResult.data = 1; // return objJsonResult; // } - + // //鏌ヨ鏁版嵁涓槸鍚﹀瓨鍦ㄩ噸澶嶄唬鐮� // ds = oCN.RunProcReturn("select * from Gy_Employee where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_Employee"); // if (oItem.HNumber.Trim() == "") -- Gitblit v1.9.1