zzr99
2022-04-25 e5e8b23083cd7f09ebe3c110e84cfad7747eba49
nothing
5个文件已修改
138 ■■■■ 已修改文件
BaseSet/公用资料/其他基础资料/Gy_StdWorkTimes.cs 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BaseSet/公用资料/其他基础资料/Gy_StdWorkTimesList.cs 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/公用/frmBillQueryCondition_New.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
PlanM/数据导入/Gy_StdWorkTimes_RoutingBill.cs 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BaseSet/¹«ÓÃ×ÊÁÏ/ÆäËû»ù´¡×ÊÁÏ/Gy_StdWorkTimes.cs
@@ -466,16 +466,6 @@
        //单据完整性判断          æœªå®Œæˆ
        private bool Sub_AllowSave()
        {
            //必输项目是否为空
            //ClsK3_DepartmentHlp oDept = new ClsK3_DepartmentHlp();
            //if(!oDept.GetInfoByID(ClsPub.isLong(txtHDeptID.Tag)))
            //{
            //    MessageBox.Show("部门不存在!");
            //    return false;
            //}
            //明细表是否为零行
            if (!IsNullRow(0))
            {
                MessageBox.Show("表体明细行不存在!请录入!", "提示");
@@ -483,8 +473,18 @@
            }
            else
            {
                return true;
            }
        }
        //是否是空行
        private bool IsNullRow(int Row)
        {
            if (ClsPub.isInt(grdMain1.Rows[Row].Cells[HMaterIDCol].Value) == 0&& ClsPub.isInt(grdMain1.Rows[Row].Cells[HProcIDCol].Value) == 0&& ClsPub.isDoule( grdMain1.Rows[Row].Cells[HStdWorkTimes].Value )== 0&& ClsPub.isDoule(grdMain1.Rows[Row].Cells[HUpperlimit].Value) == 0&& ClsPub.isDoule(grdMain1.Rows[Row].Cells[HLowerlimit].Value) == 0&& ClsPub.isStrNull(grdMain1.Rows[Row].Cells[HRemarkCol].Value) == ""&& ClsPub.isDoule(grdMain1.Rows[Row].Cells[HStdPiece].Value) == 0&& ClsPub.isDoule(grdMain1.Rows[Row].Cells[HStdPiece].Value) == 0)
            {
                return true;
            }
            return false;
        }
        //保存单据
        private bool Sub_SaveBill()
@@ -493,11 +493,7 @@
            Int32 i;
            bool bResult;
            BillNew = new DAL.ClsGy_StdWorkTimes_Ctl();
            //编辑权限
            //if (!ClsPub.Security_Log(ModRightNameEdit, 1, true, DBUtility.ClsPub.CurUserName))
            //{
            //    return false;
            //}
            //失去焦点
            lblCaption.Focus();
            //
@@ -509,9 +505,13 @@
            BillNew.DetailColl = new List<Model.ClsGy_StdWorkTimes_Model>();
            for (i = 0; i <= grdMain1.RowCount - 1; i++)
            {
                if (DBUtility.ClsPub.isLong(grdMain1.Rows[i].Cells[HMaterIDCol].Value) != 0 && DBUtility.ClsPub.isLong(grdMain1.Rows[i].Cells[HProcIDCol].Value) != 0)
                if (IsNullRow(i))
                {
                    if (DBUtility.ClsPub.isLong(grdMain1.Rows[i].Cells[HStdWorkTimes].Value)>0&& DBUtility.ClsPub.isLong(grdMain1.Rows[i].Cells[HUpperlimit].Value) > 0&& DBUtility.ClsPub.isLong(grdMain1.Rows[i].Cells[HLowerlimit].Value) > 0 && DBUtility.ClsPub.isLong(grdMain1.Rows[i].Cells[HStdPiece].Value) > 0 && DBUtility.ClsPub.isLong(grdMain1.Rows[i].Cells[HStdPric].Value) > 0)
                    break;
                }
                if (DBUtility.ClsPub.isStrNull(grdMain1.Rows[i].Cells[HMaterIDCol].Value) != "" && DBUtility.ClsPub.isStrNull(grdMain1.Rows[i].Cells[HProcIDCol].Value) != "" && DBUtility.ClsPub.isStrNull(grdMain1.Rows[i].Cells[HStdWorkTimes].Value) != "")
                {
                    if (DBUtility.ClsPub.isDoule(grdMain1.Rows[i].Cells[HStdWorkTimes].Value) > 0 && DBUtility.ClsPub.isDoule(grdMain1.Rows[i].Cells[HUpperlimit].Value) > 0 && DBUtility.ClsPub.isDoule(grdMain1.Rows[i].Cells[HLowerlimit].Value) > 0 && DBUtility.ClsPub.isDoule(grdMain1.Rows[i].Cells[HStdPiece].Value) > 0 && DBUtility.ClsPub.isDoule(grdMain1.Rows[i].Cells[HStdPric].Value) > 0)
                    {
                        Model.ClsGy_StdWorkTimes_Model oSub = new Model.ClsGy_StdWorkTimes_Model();
                        oSub.HMaterID = ClsPub.isLong(grdMain1.Rows[i].Cells[HMaterIDCol].Value);
@@ -530,9 +530,14 @@
                    }
                    else
                    {
                        MessageBox.Show("第" + (i+1) + "行,标准工时,上限比例,下限比例,标准计件和标准计价都应大于0", "提示");
                        MessageBox.Show("第" + (i + 1) + "行,标准工时,上限比例,下限比例,标准计件和标准计价都应大于0", "提示");
                        return false;
                    }
                }
                else
                {
                    MessageBox.Show("第" + (i + 1) + "行,物料、工序和标准工时不能为空", "提示");
                    return false;
                }
            }
            //保存完毕后处理
@@ -684,15 +689,6 @@
            //  
            oSumGrid.EditStatus = false;
            return true;
        }
        //是否是空行
        private bool IsNullRow(int Row)
        {
            if (ClsPub.isInt(grdMain1.Rows[Row].Cells[HMaterIDCol].Value) == 0)
            {
                return true;
            }
            return false;
        }
        //'判断网格行的录入是否正确
        private bool CheckGridRow(int Row)
BaseSet/¹«ÓÃ×ÊÁÏ/ÆäËû»ù´¡×ÊÁÏ/Gy_StdWorkTimesList.cs
@@ -263,23 +263,31 @@
                sr = CurNode.Text.Split(c);
                HParentID = sr[0].ToString();
            }
            //过滤条件
            if (HParentID == "" || HParentID == "物料资料" || HParentID == "工序资料")
            if (frmCondition==null)
            {
                sSql = "Select top 10000 * from " + ViewName + " order by  HItemID Desc";
            }
            else
            {
                if (wl.Checked == false)
                //过滤条件
                if (HParentID == "" || HParentID == "物料资料" || HParentID == "工序资料")
                {
                    sSql = "Select top 10000 * from " + ViewName + " where å·¥åºä»£ç  like '%" + HParentID.ToString() + "%' order by HItemID Desc";
                    sSql = "Select top 10000 * from " + ViewName + " order by  HItemID Desc";
                }
                else
                {
                    sSql = "Select top 10000 * from " + ViewName + " where ç‰©æ–™ä»£ç  like '%" + HParentID.ToString() + "%' order by HItemID Desc ";
                }
                    if (wl.Checked == false)
                    {
                        sSql = "Select top 10000 * from " + ViewName + " where å·¥åºä»£ç  like '%" + HParentID.ToString() + "%' order by HItemID Desc";
                    }
                    else
                    {
                        sSql = "Select top 10000 * from " + ViewName + " where ç‰©æ–™ä»£ç  like '%" + HParentID.ToString() + "%' order by HItemID Desc ";
                    }
                }
            }
            else
            {
                sSql = frmCondition.SqlStr + sWhere + " order by " + ModName;
            }
            //执行SQL
            DSet = SubCn.RunProcReturn(sSql, ViewName);
@@ -395,18 +403,15 @@
                else
                {
                    //审核
                    if (oItem.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        MessageBox.Show("审核成功!", "提示");
                    }
                    else
                    if (oItem.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) != true)
                    {
                        MessageBox.Show("审核失败!", "提示");
                        return;
                    }
                }
            }
            MessageBox.Show("审核成功,请刷新!", "提示");
            MessageBox.Show("审核成功!", "提示");
            Display();
            return;
        }
        //反审核
@@ -435,18 +440,15 @@
                else
                {
                    //审核
                    if (oItem.AbandonCheck(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        MessageBox.Show("反审核成功!", "提示");
                    }
                    else
                    if (oItem.AbandonCheck(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) != true)
                    {
                        MessageBox.Show("反审核失败!", "提示");
                        return;
                    }
                }
            }
            MessageBox.Show("审核成功,请刷新!", "提示");
            MessageBox.Show("反审核成功!", "提示");
            Display();
            return;
        }
@@ -481,9 +483,11 @@
                else
                {
                    oCn.RunProc(" Update Gy_StdWorkTimes set HStopflag=1 Where HItemID=" + lngBillKey.ToString());
                }
            }
            MessageBox.Show("禁用成功,请刷新!", "提示");
            MessageBox.Show("禁用成功!", "提示");
            Display();
            return;
        }
@@ -512,9 +516,11 @@
                else
                {
                    oCn.RunProc(" Update Gy_StdWorkTimes set HStopflag=0 Where HItemID=" + lngBillKey.ToString());
                }
            }
            MessageBox.Show("反禁用成功,请刷新!", "提示");
            MessageBox.Show("反禁用成功!", "提示");
            Display();
            return;
        }
    }
DAL/¹«ÓÃ/frmBillQueryCondition_New.cs
@@ -28,7 +28,7 @@
            DAL.ClsIF_Group_View oGroup = new DAL.ClsIF_Group_View();
            DAL.ClsIF_Process_View oProc = new DAL.ClsIF_Process_View();
            DAL.ClsIF_Supplier_View oSup = new DAL.ClsIF_Supplier_View();
            DAL.ClsIF_Warehouse_View oWare = new DAL.ClsIF_Warehouse_View();
            DAL.ClsIF_Warehouse_View oWare = new DAL.ClsIF_Warehouse_View();
            int FieldNameCol = 2;
            int ConditionCol = 4;
            if (sCol != ConditionCol)
PlanM/Êý¾Ýµ¼Èë/Gy_StdWorkTimes_RoutingBill.cs
@@ -91,22 +91,30 @@
            for (int i = 0; i <= grdMain.Rows.Count - 1; i++)
            {
                if (DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[sHMaterNumCol].Value) != "" && DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[sHProcNumCol].Value) != "")
                if (DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[sHMaterNumCol].Value) != "" && DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[sHProcNumCol].Value) != ""&& DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[sHStdWorkTimesCol].Value) != "")
                {
                    //写入类
                    if (WriteClass(i))
                    if (DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells[sHStdWorkTimesCol].Value)>0&& DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells[sHUpperlimitCol].Value) > 0&& DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells[sHLowerlimitCol].Value) > 0)
                    {
                        //保存记录
                        if (!BillNew.AddNew())
                        //写入类
                        if (WriteClass(i))
                        {
                            MessageBox.Show("导入失败!原因:" + DBUtility.ClsPub.sExeReturnInfo, "提示");
                            return;
                            //保存记录
                            if (!BillNew.AddNew())
                            {
                                MessageBox.Show("导入失败!原因:" + DBUtility.ClsPub.sExeReturnInfo, "提示");
                                return;
                            }
                        }
                    }
                    else
                    {
                        MessageBox.Show("第" + (i + 1) + "行,标准工时、上限比例和下限比例不能小于0", "提示");
                        return;
                    }
                }
                else
                {
                    MessageBox.Show("工序代码或物料代码为空!原因:" + DBUtility.ClsPub.sExeReturnInfo, "提示");
                    MessageBox.Show("第"+(i+1)+"行,工序代码、物料代码和标准工时不能为空!原因:" + DBUtility.ClsPub.sExeReturnInfo, "提示");
                    return;
                }
            }
@@ -158,6 +166,7 @@
            //sHMaker = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[sHMakerCol].Value);
            //判断是否允许 ä¿å­˜
            //审核代码是否合理
            if (!DBUtility.ClsPub.AllowNumber(sMaterNumber))
            {
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -662,6 +662,7 @@
                int HYear = DBUtility.ClsPub.isInt(DateTime.Now.Year);
                double HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
                string HMouldNo = mainList[0].HMouldNo;
                string HBarCode = mainList[0].HBarCode;
                string HName = mainList[0].HName;
                string HModel = mainList[0].HModel;
                string HModel2 = mainList[0].HModel2;
@@ -714,7 +715,7 @@
                ",HOutComDate,HOutComNo,HDeptID,HSupID,HSupNumber" +
                ",HPrintQty,HMouldStatus,HWhID,HRoutingID,HCaveQty" +
                ",HBomID,HVersion,HSPGroupID,HSPID,HDesignLife,HNowSupID,HNowSupTypeID" +
                ",HUseLife,HLeaveLife,HProdQty,HProdWeight,HMouldOWNER,HSaveLife,HMouldDotCheckRuleInterID,HMouldMaintainRuleInterID" +
                ",HUseLife,HLeaveLife,HProdQty,HProdWeight,HMouldOWNER,HSaveLife,HMouldDotCheckRuleInterID,HMouldMaintainRuleInterID,HBarCode" +
                ") " +
                " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
                "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()" +
@@ -724,7 +725,7 @@
                ",'" + HOutComDate + "','" + HOutComNo + "'," + HDeptID + "," + HSupID + ",'" + HSupNumber + "'" +
                "," + HPrintQty + ",'" + HMouldStatus + "'," + HWHID + "," + HRoutingID +","+ HCaveQty+
                "," + HBOMID + ",'" + HVersion + "'," + HSPGroupID + "," + HSPID + ",'" + HDesignLife + "','" + HNowSupID+"','"+ HNowSupTypeID+"'"+
                ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "','" + HSaveLife + "','" + HMouldDotCheckRuleInterID+"','"+ HMouldMaintainRuleInterID+"'"+
                ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "','" + HSaveLife + "','" + HMouldDotCheckRuleInterID+"','"+ HMouldMaintainRuleInterID+"','"+ HBarCode+"'"+
                ") ");
@@ -1255,7 +1256,7 @@
                        ",HUseLife,HLeaveLife,HProdQty,HProdWeight,HMouldOWNER,HSaveLife,HMouldDotCheckRuleInterID,HMouldMaintainRuleInterID" +
                        ") " +
                        " values('3899','3899'," + HItemID + ",'" + Num1 + j + "',getdate()" +
                        "," + dr["HYear"] + "," + dr["HPeriod"] + ",'" + dr["HRemark"] + "','" + dr["HMaker"] + "',getdate(),'" + dr["HBarCode"] +
                        "," + dr["HYear"] + "," + dr["HPeriod"] + ",'" + dr["HRemark"] + "','" + dr["HMaker"] + "',getdate(),'" + Num1 + j +
                        "','" + Num1 + j + "','" + dr["HName"] + "','" + dr["HModel"] + "','" + dr["HModel2"] + "','" + dr["HDiameter"] + "'" +
                        ",'" + dr["HSubjoin"] + "','" + dr["HSubjoin2"] + "','" + dr["HPICNo"] + "','" + dr["HWorkMaterModel"] + "'" +
                        "," + dr["HMaterID"] + ",'" + dr["HMaterNumber"] + "',0,"  + dr["HUnitID"] +