| | |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |