yangle
2024-05-15 95f65190334bd1baaebe0e6a7312a06b660cd4d1
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -1632,7 +1632,7 @@
                oCN.BeginTran();
                //分布式调入单新增回填分布式调出单关联数量
                //直接调拨单 删除  撤销 回填  调拨申请单  关联数量
                oCN.RunProc("exec h_p_Kf_UpDateRelation_MoveStockRequestToPOStockIn_Del " + HInterID);
                oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID);
@@ -1673,6 +1673,43 @@
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region 直接调拨单  根据主内码与子内码获取调拨申请单数据
        [Route("Kf_MoveStockBill/loadKf_MoveStockBillMain_Push")]
        [HttpGet]
        public object loadKf_MoveStockBillMain_Push(long HInterID, long HSubID)
        {
            try
            {
                ds = oCN.RunProcReturn("select * from h_v_IF_MoveStockRequestBillList_Litee where hmainid =" + HInterID + " and hsubid = " + HSubID, "h_v_IF_MoveStockRequestBillList_Litee");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "未查询到源单信息!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
@@ -1799,7 +1836,11 @@
                oCN.BeginTran();
                //销售出库删除回填销售订单关联数量
                //oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToSellOut_Delete " + HInterID);
                oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToSellOut_Delete " + HInterID);
                //销售出库删除回填收货通知单关联数量
                oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOutStockToPOStockIn_Delete " + HInterID);
                //oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID);
                //oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID);
@@ -5757,7 +5798,7 @@
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                //获取点检项目编辑数据
                ds = oCN.RunProcReturn("select HDotCheckItem, HDotCheckPart , HClaim, a.HRemark,a.HManagerID,e.HNumber HManagerCode,e.HName HManagerName from Sc_MouldDotCheckBillSub a left join Gy_Employee e on a.HManagerID=e.HItemID where 1=1 " + sqlWhere, "Sc_MouldDotCheckBillSub");
                ds = oCN.RunProcReturn("select * from h_v_Sc_MouldDotCheckBill_Edit where 1=1 " + sqlWhere, "h_v_Sc_MouldDotCheckBill_Edit");
                //获取配件项目编辑数据
                ds1 = oCN.RunProcReturn(@"select b.HMaterID,  mt.Hnumber HMaterNumber ,mt.HName HMaterName, b.HUnitID
                    ,u2.hnumber HUnitNumber,u2.HName HUnitName,b.HQty,b.HQtyMust,b.HRemark 
@@ -5770,7 +5811,7 @@
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "获取信息成功!";
                objJsonResult.data = null;
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = list;
            }
@@ -6092,8 +6133,7 @@
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                //获取点检项目编辑数据
                ds = oCN.RunProcReturn(@"select a.HDotCheckItemID,HDotCheckItem, HDotCheckPart , HClaim, a.HRemark,a.HManagerID,e.HNumber HManagerCode,e.HName HManagerName from Sc_MouldDotCheckPlanBillSub a
                  left join Gy_Employee e on a.HManagerID=e.HItemID
                ds = oCN.RunProcReturn(@"select * from h_v_Sc_MouldDotCheckPlanBill_Edit
                        where 1=1 " + sqlWhere, "Sc_MouldDotCheckPlanBillSub");
                ////获取配件项目编辑数据
                //ds1 = oCN.RunProcReturn(@"select b.HMaterID,  mt.Hnumber HMaterNumber ,mt.HName HMaterName, b.HUnitID
@@ -6106,7 +6146,7 @@
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "获取信息成功!";
                objJsonResult.data = null;
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = list;
            }
            catch (Exception e)
@@ -6204,7 +6244,48 @@
        #endregion
        #region 根据器具条码查找器具档案信息PDA
        [Route("QJ_PDA_MouldDotCheckBill/txtHBarCode_KeyDown")]
        [HttpGet]
        public object txtHBarCode_KeyDown(string HBarCode)
        {
            try
            {
                if (HBarCode == null || HBarCode.Equals(""))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "条形码不能为空!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //得到信息
                ds = oCN.RunProcReturn("select top 1 * from Gy_MouldFileMain  where HNumber= '" + HBarCode + "'", "Gy_MouldFileMain");
                //写入信息
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "未查询到器具信息!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region 模具报废入库单