duhe
2023-09-01 1739eb7838984e9a55fbbb5d4705f55908749375
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -1009,7 +1009,7 @@
                int HMouldMaintainRuleInterID = mainList[0].HMouldMaintainRuleInterID;
                int HNowSupID = mainList[0].HNowSupID;
                int HNowSupTypeID = mainList[0].HNowSupTypeID;
                int HMadeSupID = mainList[0].HMadeSupID;
                //主表
@@ -1022,7 +1022,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,HBarCode" +
                ",HUseLife,HLeaveLife,HProdQty,HProdWeight,HMouldOWNER,HSaveLife,HMouldDotCheckRuleInterID,HMouldMaintainRuleInterID,HBarCode,HMadeSupID" +
                ") " +
                " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
                "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()" +
@@ -1032,7 +1032,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 + "','" + HBarCode + "'" +
                ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "','" + HSaveLife + "','" + HMouldDotCheckRuleInterID + "','" + HMouldMaintainRuleInterID + "','" + HBarCode + "'," + HMadeSupID +
                ") ");
@@ -1150,6 +1150,7 @@
                int HMouldMaintainRuleInterID = mainList[0].HMouldMaintainRuleInterID;
                int HNowSupID = mainList[0].HNowSupID;
                int HNowSupTypeID = mainList[0].HNowSupTypeID;
                int HMadeSupID = mainList[0].HMadeSupID;
                //若MAINDI重复则重新获取
                oCN.BeginTran();
@@ -1202,6 +1203,7 @@
                ",HNowSupTypeID=" + HNowSupTypeID.ToString() +
                ",HProdWeight=" + HProdWeight.ToString() +
                ",HBarCode='" + HBarCode.ToString() + "'" +
                ",HMadeSupID=" + HMadeSupID +
                " where HInterID=" + HInterID.ToString());
                //修改子项目代码
@@ -1228,6 +1230,40 @@
        }
        /// <summary>
        /// 磨具档案修改按钮方法-计算下次保养/校正日期-获取档案最近一次的保养记录
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Gy_Mould_Edit/calculateHNextMainDate")]
        [HttpGet]
        public object calculateHNextMainDate(long HInterID)
        {
            try
            {
                string sql = @"select top(1) a.HInterID, b.HEndDate 保养记录结束日期
                            from Gy_MouldFileMain AS a LEFT OUTER JOIN
                            Sc_MouldMaintainBillMain AS b on a.HInterID = b.HMouldID
                            where a.HInterID = " + HInterID +
                            " order by b.HEndDate desc";
                ds = oCN.RunProcReturn(sql, "Sc_MouldMaintainBillMain");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "";
                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;
            }
        }
        /// <summary>
        /// 磨具档案修改按钮方法