ch
2022-09-22 8a536f8137bda55c91f8c972b367138c95d8ebc9
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -383,12 +383,12 @@
                }
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_Gy_MouldFileList " + sWhere + "order by hmainid desc", "h_v_Gy_MouldFileList");
                    ds = oCN.RunProcReturn("select * from h_v_Gy_MouldFileList " + sWhere + "order by 日期 desc", "h_v_Gy_MouldFileList");
                }
                else
                {
                    string sql1 = "select * from h_v_Gy_MouldFileList where 1 = 1 ";
                    string sql = sql1 + sWhere + "order by hmainid desc";
                    string sql = sql1 + sWhere + "order by 日期 desc";
                    ds = oCN.RunProcReturn(sql, "h_v_Gy_MouldFileList");
                }
@@ -803,6 +803,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;
@@ -883,16 +884,17 @@
                ",HSPGroupID=" + HSPGroupID.ToString() +
                ",HSPID=" + HSPID.ToString() +
                ",HDesignLife=" + HDesignLife.ToString() +
                ",HCaveQty="+ HCaveQty.ToString()+
                ",HCaveQty=" + HCaveQty.ToString() +
                ",HUseLife=" + HUseLife.ToString() +
                ",HLeaveLife=" + HLeaveLife.ToString() +
                ",HProdQty=" + HProdQty.ToString() +
                ",HMouldDotCheckRuleInterID="+ HMouldDotCheckRuleInterID.ToString()+
                ",HMouldDotCheckRuleInterID=" + HMouldDotCheckRuleInterID.ToString() +
                ",HMouldMaintainRuleInterID=" + HMouldMaintainRuleInterID.ToString() +
                ",HMouldOWNER='" + HMouldOWNER + "'" +
                ",HNowSupID="+HNowSupID.ToString()+
                ",HNowSupTypeID="+HNowSupTypeID.ToString()+
                ",HNowSupID=" + HNowSupID.ToString() +
                ",HNowSupTypeID=" + HNowSupTypeID.ToString() +
                ",HProdWeight=" + HProdWeight.ToString() +
                ",HBarCode="+ HBarCode.ToString()+
                " where HInterID=" + HInterID.ToString());
                //修改子项目代码
@@ -1215,7 +1217,7 @@
                DataSet ds = new DataSet();
                ds = oCN.RunProcReturn("select * from Gy_MouldFileMain where HInterID=" + HInterID, "Gy_MouldFileMain");
                DataRow dr = ds.Tables[0].Rows[0];
                string Num = dr["HBillNo"].ToString();
                string Num = dr["HBarCode"].ToString();
                string Num1 = Num.Substring(0,(Num.Length)-5);
                oCN.BeginTran();
                for (int i = StarNum1; i <= EndNum1; i++)
@@ -1244,6 +1246,7 @@
                    if (ds1.Tables[0].Rows.Count == 0 || ds1 == null)
                    {
                        long HItemID = DBUtility.ClsPub.CreateBillID("3899", ref DBUtility.ClsPub.sExeReturnInfo);
                        //string HBillNo = DBUtility.ClsPub.CreateBillCode("3899", ref DBUtility.ClsPub.sExeReturnInfo, true);
                        string sql = string.Format(@"Insert Into Gy_MouldFileMain   " +
                        "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
                        ",HYear,HPeriod,HRemark,HMaker,HMakeDate,HBarCode" +