王 垚
2022-09-26 e4e1d2b2c1f13cd89514e59eb42fc50f1332262e
优化
4个文件已修改
55 ■■■■ 已修改文件
WebAPI/Controllers/Kf_EntrustInBillController.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/LookingForBillController.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/ProductInController.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/WebAPIController.cs 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/Kf_EntrustInBillController.cs
@@ -291,8 +291,11 @@
                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))
                {
WebAPI/Controllers/LookingForBillController.cs
@@ -183,10 +183,12 @@
            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" +
WebAPI/Controllers/ProductInController.cs
@@ -39,6 +39,7 @@
        //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();
@@ -479,10 +480,12 @@
                websLsmain.HExplanation = lsmain[0].HExplanation;
                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))
                {
WebAPI/Controllers/WebAPIController.cs
@@ -811,6 +811,39 @@
                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;
            }
        }
    }
}