zzr99
2021-12-25 9385f2a2e4e2b6578f4b9e1cc139db977c2467ee
Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
9个文件已修改
226 ■■■■ 已修改文件
DAL/WMS/ClsKF_PonderationBillMain_Temp_View.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/MoveStockBillController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/ProductInController.cs 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/WebAPIController.cs 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/工资管理/Gy_ClassTimePrjSubController.cs 80 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Models/基础资料/Gy_ClassTimePrjSub.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebServer.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WorkM/流转卡管理/MES_StationOutBill.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/WMS/ClsKF_PonderationBillMain_Temp_View.cs
@@ -75,6 +75,21 @@
        #endregion
        //缓存列表界面,返回缓存列表信息
        public DataSet GetKf_PonderationBillMain_TempList_New(string sHBillType, string sHMaker, Int64 sHOWNERID)
        {
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            DataSet Ds = oCn.RunProcReturn("exec h_p_KF_GetPonderationBillMain_TempList_New '" + sHBillType + "','" + sHMaker + "'," + sHOWNERID.ToString(), "h_p_KF_GetPonderationBillMain_TempList_New");
            if (Ds == null || Ds.Tables[0].Rows.Count == 0)
            {
                return null;
            }
            else
            {
                return Ds;
            }
        }
        public DataSet GetKf_ICStockBillList(string sHBillType, string sHMaker, Int64 sHOWNERID)
        {
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
WebAPI/Controllers/MoveStockBillController.cs
@@ -440,7 +440,7 @@
                websLsmain.HSupID = 0;
                //websLsmain.HGroupID = lsmain[0].HGroupID;
                if (webserver.set_SaveMoveStockBill(websLsmain, "-1", ref DBUtility.ClsPub.sErrInfo))
                if (webserver.set_SaveMoveStockBill(websLsmain, sSourceBillType, ref DBUtility.ClsPub.sErrInfo))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
WebAPI/Controllers/ProductInController.cs
@@ -59,6 +59,37 @@
                return "";
            }
        }
        /// <summary>
        /// äº§å“å…¥åº“缓存列表编辑前判断单据是否已上传  ç›´æŽ¥è°ƒWebService
        /// </summary>
        /// <returns></returns>
        //[Route("ProductIn/ProductInTempList_Modify")]
        //[HttpGet]
        //public Object ProductInTempList_Modify(Int64 sInterID,string sBillNo, string sBillType)
        //{
        //    //oBar = webserver.get_CheckTypeByBarCode(sCode, sInterID, sBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, ref DBUtility.ClsPub.sErrInfo);
        //    WebS.WebService1 oWebs = new WebS.WebService1();
        //    if (oWebs.TempList_Modify(sInterID, sBillNo, sBillType, ref sErrMsg))
        //    {
        //        objJsonResult.code = "0";
        //        objJsonResult.count = 0;
        //        objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
        //        objJsonResult.data = null;
        //        return objJsonResult;
        //    }
        //    else
        //    {
        //        objJsonResult.code = "0";
        //        objJsonResult.count = 1;
        //        objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
        //        objJsonResult.data = null;
        //        return objJsonResult;
        //    }
        //}
        /// <summary>
        /// äº§å“å…¥åº“/扫条码/直接调用webservice
        /// </summary>
@@ -165,6 +196,46 @@
            }
        }
        ///// <summary>
        ///// äº§å“å…¥åº“缓存列表刷新信息
        ///// </summary>
        ///// <returns></returns>
        //[Route("ProductIn/DisBillEntryList_Json1")]
        //[HttpGet]
        //public object DisBillEntryList_Json1(string HBillType,string sHMaker, Int64 HOrgID)
        //{
        //    try
        //    {
        //        ds = webserver.GetKf_PonderationBillMain_TempList_New(HBillType, sHMaker, HOrgID);
        //        if (ds == null || ds.Tables[0].Rows.Count <= 0)
        //        {
        //            objJsonResult.code = "0";
        //            objJsonResult.count = 0;
        //            objJsonResult.Message = "没有返回任何记录!";
        //            objJsonResult.data = null;
        //            return objJsonResult;
        //            //DBUtility.ClsPub.MessageBeep((int)DBUtility.ClsPub.BeepType.Warning);
        //        }
        //        else
        //        {
        //            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;
        //    }
        //}
        /// <summary>
WebAPI/Controllers/WebAPIController.cs
@@ -2497,6 +2497,48 @@
        }
        #endregion
        /// <summary>
        /// äº§å“å…¥åº“缓存列表刷新信息
        /// </summary>
        /// <returns></returns>
        [Route("Web/chanpinruk")]
        [HttpGet]
        public object chanpinruk(string HBillType, string sHMaker, Int64 HOrgID)
        {
            try
            {
                ds = webserver.GetKf_PonderationBillMain_TempList_New(HBillType, sHMaker, HOrgID);
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回任何记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                    //DBUtility.ClsPub.MessageBeep((int)DBUtility.ClsPub.BeepType.Warning);
                }
                else
                {
                    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;
            }
        }
    }
}
WebAPI/Controllers/¹¤×ʹÜÀí/Gy_ClassTimePrjSubController.cs
@@ -77,7 +77,7 @@
            try
            {
                ds = oCN.RunProcReturn("select * from h_v_Gy_ClassTimePrjSubList where HitemID=" + HInterID, "h_v_Gy_ClassTimePrjSubList");
                ds = oCN.RunProcReturn("select * from h_v_Gy_ClassTimePrjSubList where HInterID=" + HInterID, "h_v_Gy_ClassTimePrjSubList");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
@@ -131,31 +131,31 @@
                List<Gy_ClassTimePrjSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Gy_ClassTimePrjSub>>(msg2);
                long HInterID = list[0].HInterID;
                long HItemID = list[0].HItemID;
                long HEntryID = list[0].HEntryID;
                string HYear = list[0].HYear;
                decimal HPeriod = list[0].HPeriod;
                string HSumWorkTimes = list[0].HSumWorkTimes;
                decimal HSumMoney = list[0].HSumMoney;
                string HRate = list[0].HRate;
                decimal HOldRate = list[0].HOldRate;
                string HNumber = list[0].HNumber;
                string HName = list[0].HName;
                long hparentid = list[0].hparentid;
                string HMaker = list[0].HMaker;
                string HSumWorkTimes = list[0].HSumWorkTimes;
                string HRate = list[0].HRate;
                decimal HSumMoney = list[0].HSumMoney;
                string HYear = list[0].HYear;
                decimal HPeriod = list[0].HSumMoney;
                decimal HOldRate = list[0].HOldRate;
                //保存
                //保存完毕后处理
                if (HItemID == 0)
                if (HInterID == 0)
                {
                    oCN.BeginTran();
                    oCN.RunProc("Insert into Gy_ClassTimePrjSub" +
                    " (HInterID,HMaker,HMakeDate,HSumWorkTimes" +
                    " (HEntryID,HMaker,HMakeDate,HSumWorkTimes" +
                    ",HRate,HSumMoney,HYear,HPeriod" +
                    ",HOldRate) " +
                    " Values(" + HInterID + ",'" + HMaker + "','" + DBUtility.ClsPub.GetServerDate(-1) + "'," + HSumWorkTimes.ToString() +
                    " Values(" + HEntryID + ",'" + HMaker + "','" + DBUtility.ClsPub.GetServerDate(-1) + "'," + HSumWorkTimes.ToString() +
                    "," + HRate + "," + HSumMoney.ToString() + "," + HYear.ToString() + "," + HPeriod.ToString() +
                    "," + HOldRate.ToString() + ")", ref DBUtility.ClsPub.sExeReturnInfo);
                    //修改上级为非末级代码
                    oCN.RunProc("Update Gy_ClassTimePrjSub set HStopflag=0 where HInterID=" + hparentid, ref DBUtility.ClsPub.sExeReturnInfo);
                    oCN.Commit();
                }
                else { 
@@ -163,21 +163,17 @@
                    oCN.BeginTran();
                    //主表
                    oCN.RunProc("Update Gy_ClassTimePrjSub set " +
                        " HNumber='" + HNumber + "'" +
                        ",HName='" + HName + "'" +
                        ",HMaker='" + HMaker + "'" +
                        ",hparentid=" + hparentid.ToString() +
                        "HMaker='" + HMaker + "'" +
                        ",HSumWorkTimes=" + HSumWorkTimes.ToString() +
                        ",HSumMoney=" + HSumMoney.ToString() +
                        ",HYear=" + HYear.ToString() +
                        ",HPeriod=" + HPeriod.ToString() +
                        ",HOldRate=" + HOldRate.ToString() +
                        ",HRate= '" + HRate + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo);
                        ",HEntryID=" + HEntryID.ToString() +
                        ",HRate= '" + HRate + "' Where HInterID=" + HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
                    //修改子项目代码
                    //oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_Warehouse,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
                    //将上级 ä¸ºéžæœ«çº§
                    oCN.RunProc("Update Gy_ClassTimePrjSub set HStopflag=0 where HInterID=" + hparentid, ref DBUtility.ClsPub.sExeReturnInfo);
                    //
                    oCN.Commit();
                }
                objJsonResult.code = "0";
@@ -215,54 +211,16 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HItemID为空!";
                    objJsonResult.Message = "HInterID为空!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.BeginTran();//开始事务
                ds = oCN.RunProcReturn("select * from Gy_ClassTimePrjSub where HItemID=" + HItemID, "Gy_ClassTimePrjSub");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有数据,无法删除!";
                    objJsonResult.data = null;
                    return objJsonResult; ;
                }
                //var HStopflag = Convert.ToBoolean(ds.Tables[0].Rows[0]["HStopflag"]);
                //if (HStopflag)
                //{
                //    oCN.RollBack();//回滚事务
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = "数据已删除无法再次删除!";
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                ds1 = oCN.RunProcReturn("Select HItemID from Gy_ClassTimePrjSub  Where HParentID='" + HItemID + "'", "Gy_ClassTimePrjSub");
                if (ds1.Tables[0].Rows.Count != 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "此项目存在子项目,不能删除!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                string HUseFlag = Convert.ToString(ds.Tables[0].Rows[0]["HUseFlag"]);
                if (HUseFlag == "已使用")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "此项目已使用,不能删除!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.RunProc("delete from Gy_ClassTimePrjSub where HItemID=" + HItemID);
                oCN.RunProc("delete from Gy_ClassTimePrjSub where HInterID=" + HItemID);
                oCN.Commit();//提交事务
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "* æ•°æ®åˆ é™¤æˆåŠŸï¼";
                objJsonResult.Message = "数据删除成功!";
                objJsonResult.data = null;
                return objJsonResult; ;
WebAPI/Models/»ù´¡×ÊÁÏ/Gy_ClassTimePrjSub.cs
@@ -8,11 +8,10 @@
    public class Gy_ClassTimePrjSub
    {
        public long HInterID { get; set; }
        public long HItemID { get; set; }
        public long HEntryID { get; set; }
       
        public string HName { get; set; }
        public string HNumber { get; set; }
        public long hparentid { get; set; }
        public string  HYear { get; set; }
        public decimal HPeriod { get; set; }
        public decimal HSumMoney { get; set; }
WebAPI/WebAPI.csproj
@@ -32,7 +32,7 @@
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <Prefer32Bit>false</Prefer32Bit>
    <PlatformTarget>x86</PlatformTarget>
    <PlatformTarget>AnyCPU</PlatformTarget>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
WebAPI/WebServer.cs
@@ -4429,6 +4429,14 @@
        //返回缓存列表信息  åŒæ­¥èµ„æ–™
        public DataSet GetKf_PonderationBillMain_TempList_New(string sHBillType, string sHMaker, Int64 sHOWNERID)
        {
            DAL.ClsKF_PonderationBillMain_Temp_View dal = new DAL.ClsKF_PonderationBillMain_Temp_View();
            return dal.GetKf_PonderationBillMain_TempList_New(sHBillType, sHMaker, sHOWNERID);
        }
        //返回缓存列表信息  åŒæ­¥èµ„æ–™
        public DataSet GetKf_PonderationBillMain_TempList(string sHBillType, string sWhere)
        {
            DAL.ClsKF_PonderationBillMain_Temp_View dal = new DAL.ClsKF_PonderationBillMain_Temp_View();
@@ -4437,6 +4445,7 @@
        /// <summary>
        /// ç”Ÿæˆå¤–购入库单
        /// </summary>
WorkM/Á÷ת¿¨¹ÜÀí/MES_StationOutBill.cs
@@ -591,7 +591,7 @@
                MessageBox.Show("工作中心没有选择!", "提示");
                return false;
            }
            if (DBUtility.ClsPub.isDoule(txtHQty.Text) + DBUtility.ClsPub.isDoule(txtHWasterQty.Text) <= 0)
            if (DBUtility.ClsPub.isDoule(txtHQty.Text) + DBUtility.ClsPub.isDoule(txtHWasterQty.Text) + DBUtility.ClsPub.isDoule(txtHBadCount.Text)  <= 0)
            {
                MessageBox.Show("数量不能为0!", "提示");
                return false;