| | |
| | | websLsmain.HExplanation = lsmain[0].HExplanation; |
| | | websLsmain.HGroupID = lsmain[0].HGroupID; |
| | | websLsmain.HJiaYe = lsmain[0].HJiaYe; |
| | | |
| | | string sSourceBillType = "1103"; |
| | | //保存人员 |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | string saveGroupEmpsql = $"exec h_p_saveGroupEmp '{lsmain[0].HMaker}','{lsmain[0].HGroupID}',{lsmain[0].HJiaYe.Split(',')[0]},{lsmain[0].HJiaYe.Split(',')[1]},'{lsmain[0].HJiaYe}'"; |
| | | oCn.RunProc(saveGroupEmpsql); |
| | | |
| | | if (webserver.set_SaveEntrustInBill_New(websLsmain, sSourceBillType, ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | try |
| | | { |
| | | oCN.BeginTran(); |
| | | List<LookingForBill> lsmain = new List<LookingForBill>(); |
| | | ListModels oListModels = new ListModels(); |
| | | List<LookingForBill> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<LookingForBill>>(oMainData); |
| | | //保存人员 |
| | | string saveGroupEmpsql = $"exec h_p_saveGroupEmp '{list[0].HMaker}','{list[0].HGroupID}',{HJiaYe.Split(',')[0]},{HJiaYe.Split(',')[1]},'{HJiaYe}'"; |
| | | oCN.RunProc(saveGroupEmpsql); |
| | | oCN.BeginTran(); |
| | | //var mainSql1 = "Insert Into Kf_LookingForReturnBillMain " + |
| | | // "(HInterID,HBillNo,HSourceInterID,HSourceBillNo,HCreateBy)" + |
| | | // " values" + |
| | |
| | | //public string sSourceType = "3710"; |
| | | public WebServer webserver = new WebServer(); |
| | | public DataSet ds = new DataSet(); |
| | | |
| | | public ClsGy_BarCodeBill_WMS_Model_View oView = new ClsGy_BarCodeBill_WMS_Model_View(); |
| | | public ClsKF_PonderationBillMain_Temp model = new ClsKF_PonderationBillMain_Temp(); |
| | | public ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS(); |
| | |
| | | websLsmain.HGroupID = lsmain[0].HGroupID; |
| | | websLsmain.HJiaYe = lsmain[0].HJiaYe; |
| | | |
| | | //public Int64 HGroupID;// |
| | | //public string HJiaYe;// |
| | | //保存人员 |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | string saveGroupEmpsql = $"exec h_p_saveGroupEmp '{lsmain[0].HMaker}','{lsmain[0].HGroupID}',{lsmain[0].HJiaYe.Split(',')[0]},{lsmain[0].HJiaYe.Split(',')[1]},'{lsmain[0].HJiaYe}'"; |
| | | |
| | | oCn.RunProc(saveGroupEmpsql); |
| | | |
| | | if (webserver.set_SaveProductInBill_New(websLsmain, sSourceBillType, ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | |
| | | return objjson; ; |
| | | } |
| | | } |
| | | |
| | | //根据登录人员返回 班组 和 职员1,2 |
| | | [Route("Web/getGroupEmp")] |
| | | [HttpGet] |
| | | public object getGroupEmp(string HUserName) |
| | | { |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | string sql = string.Format(@" |
| | | select t1.*,isnull(t2.HName,'') as HGroupName,isnull(t3.HName,'') as HEmpName1,isnull(t4.HName,'') as HEmpName2 from pay_scan_GroupEmp t1 |
| | | left join Gy_Group t2 on t1.HGROUPID =t2.HItemID |
| | | left join Gy_Employee t3 on t1.HEMPID1 =t3.HItemID |
| | | left join Gy_Employee t4 on t1.HEMPID2 =t4.HItemID |
| | | where t1.HMAKER ='{0}' |
| | | ", HUserName); |
| | | ds = oCn.RunProcReturn(sql, "pay_scan_GroupEmp"); |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |