1
duhe
昨天 78549fbacdf433bb0026a2c2f41351e9638cb3d4
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -2709,6 +2709,8 @@
                string HGaugeDesignSize = mainList[0].HGaugeDesignSize;  // 检具设计尺寸
                int HProductQTY = mainList[0].HProductQTY;  // 产品数量
                int HManagerID = mainList[0].HManagerID;  // 负责人
                double HPackV = mainList[0].HPackV;     //托体积
                double HStandardQtyForMouldInPack = mainList[0].HStandardQtyForMouldInPack; //托标准容器数量
                //保存前控制=========================================
                string HBillNote = "";
@@ -2746,7 +2748,7 @@
                ",HUseLife,HLeaveLife,HProdQty,HProdWeight,HMouldOWNER,HSaveLife,HMouldDotCheckRuleInterID,HMouldMaintainRuleInterID,HBarCode,HMadeSupID" +
                ",HMouldClass,HNowWHID,HNowSPID,HInitLife,HMouldUseStatus,HCREATEORGID,HUSEORGID " +
                 ",HMouldLength,HMouldWidth,HMouldHeight,HMouldFoldHeight,HTransPackFlag,HSendPackFlag," +
                 "HUserID,HBrand,HCalibrationType,HLocation,HCalibrationDate,HCalibrationCycle,HProductDesignSize,HGaugeDesignSize,HProductQTY,HManagerID) " +
                 "HUserID,HBrand,HCalibrationType,HLocation,HCalibrationDate,HCalibrationCycle,HProductDesignSize,HGaugeDesignSize,HProductQTY,HManagerID,HPackV,HStandardQtyForMouldInPack) " +
               " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
                "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()" +
@@ -2759,7 +2761,7 @@
                ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "','" + HSaveLife + "','" + HMouldDotCheckRuleInterID + "','" + HMouldMaintainRuleInterID + "','" + HBarCode + "'," + HMadeSupID +
                ",'" + HMouldClass + "'," + HNowWHID + "," + HNowSPID + ",'" + HInitLife + "','" + HMouldUseStatus + "'," + HCREATEORGID + "," + HUSEORGID +
                "," + HMouldLength + "," + HMouldWidth + "," + HMouldHeight + "," + HMouldFoldHeight + "," + Convert.ToString(HTransPackFlag ? 1 : 0) + "," + Convert.ToString(HSendPackFlag ? 1 : 0) + "," +
                "'" + HUserID + "','" + HBrand + "','" + HCalibrationType + "','" + HLocation + "','" + HCalibrationDate + "','" + HCalibrationCycle + "','" + HProductDesignSize + "','" + HGaugeDesignSize + "','" + HProductQTY + "','" + HManagerID + "') ");
                "'" + HUserID + "','" + HBrand + "','" + HCalibrationType + "','" + HLocation + "','" + HCalibrationDate + "','" + HCalibrationCycle + "','" + HProductDesignSize + "','" + HGaugeDesignSize + "','" + HProductQTY + "','" + HManagerID + "','" + HPackV + "','" + HStandardQtyForMouldInPack + "') ");
                //子表
                oCN.RunProc("Insert into Gy_MouldFileSub " +
@@ -2918,12 +2920,14 @@
                string HBrand = mainList[0].HBrand;  // 品牌
                string HCalibrationType = mainList[0].HCalibrationType;  // 校准类型 (内/外校)
                string HLocation = mainList[0].HLocation;  // 位置
                DateTime HCalibrationDate = mainList[0].HCalibrationDate;  // 校准日期
                DateTime HCalibrationDate = mainList[0].HCalibrationDate != null ? mainList[0].HCalibrationDate: DateTime.Now; // 校准日期
                string HCalibrationCycle = mainList[0].HCalibrationCycle;  // 校准周期
                string HProductDesignSize = mainList[0].HProductDesignSize;  // 产品设计尺寸
                string HGaugeDesignSize = mainList[0].HGaugeDesignSize;  // 检具设计尺寸
                int HProductQTY = mainList[0].HProductQTY;  // 产品数量
                int HManagerID = mainList[0].HManagerID;  // 负责人
                double HPackV = mainList[0].HPackV;     //托体积
                double HStandardQtyForMouldInPack = mainList[0].HStandardQtyForMouldInPack; //托标准容器数量
                //若MAINDI重复则重新获取
                oCN.BeginTran();
@@ -2949,6 +2953,82 @@
                    return objJsonResult;
                }
                //=========================================================
                string sql= "UpDate Gy_MouldFileMain set  " +
                 " HBillNo='" + HBillNo + "'" +  //固定赋值===============
                 ",HDate='" + HDate + "'" +
                 ",HYear='" + HYear.ToString() + "'" +
                 ",HPeriod='" + HPeriod.ToString() + "'" +
                 ",HRemark='" + HRemark + "'" +
                 ",HUpDater='" + HUpDater + "'" +
                 ",HUpDateDate=getdate()" +
                 //========================================
                 ",HMouldNo='" + HMouldNo + "'" +
                 ",HName='" + HName + "'" +
                 ",HModel='" + HModel + "'" +
                 ",HModel2='" + HModel2 + "'" +
                 ",HDiameter='" + HDiameter + "'" +
                 ",HSubjoin='" + HSubjoin + "'" +
                 ",HSubjoin2='" + HSubjoin2 + "'" +
                 ",HPICNo='" + HPICNo + "'" +
                 ",HWorkMaterModel='" + HWorkMaterModel + "'" +
                 ",HMaterID=" + HMaterID.ToString() +
                 ",HUSEORGID=" + HUSEORGID.ToString() +
                 ",HMaterNumber='" + HMaterNumber + "'" +
                 ",HMouldClass='" + HMouldClass + "'" +
                 ",HMouldType=" + HMouleTypeID.ToString() +
                 ",HUnitID=" + HUnitID.ToString() +
                 ",HOutComDate='" + HOutComDate + "'" +
                 ",HOutComNo='" + HOutComNo + "'" +
                 ",HDeptID=" + HDeptID.ToString() +
                 ",HSupID=" + HSupID.ToString() +
                 ",HSupNumber='" + HSupNumber + "'" +
                 ",HMouldStatus='" + HMouldStatus + "'" +
                 ",HSaveLife='" + HSaveLife + "'" +
                 ",HWhID=" + HWHID.ToString() +
                 ",HRoutingID=" + HRoutingID.ToString() +
                 ",HBomID=" + HBOMID.ToString() +
                 ",HVersion='" + HVersion + "'" +
                 ",HSPGroupID=" + HSPGroupID.ToString() +
                 ",HSPID=" + HSPID.ToString() +
                 ",HDesignLife=" + HDesignLife.ToString() +
                 ",HCaveQty=" + HCaveQty.ToString() +
                 ",HUseLife=" + HUseLife.ToString() +
                 ",HLeaveLife=" + HLeaveLife.ToString() +
                 ",HProdQty=" + HProdQty.ToString() +
                 ",HMouldDotCheckRuleInterID=" + HMouldDotCheckRuleInterID.ToString() +
                 ",HMouldMaintainRuleInterID=" + HMouldMaintainRuleInterID.ToString() +
                 ",HMouldOWNER='" + HMouldOWNER + "'" +
                 ",HNowSupID=" + HNowSupID.ToString() +
                 ",HNowSupTypeID=" + HNowSupTypeID.ToString() +
                 ",HProdWeight=" + HProdWeight.ToString() +
                 ",HBarCode='" + HBarCode.ToString() + "'" +
                 ",HMadeSupID=" + HMadeSupID +
                 ",HNowWHID=" + HNowWHID +
                 ",HNowSPID=" + HNowSPID +
                 ",HTransPackFlag=" + Convert.ToString(HTransPackFlag ? 1 : 0) +
                 ",HSendPackFlag=" + Convert.ToString(HSendPackFlag ? 1 : 0) +
                 ",HMouldLength=" + HMouldLength +
                 ",HMouldWidth=" + HMouldWidth +
                 ",HMouldHeight=" + HMouldHeight +
                 ",HMouldFoldHeight=" + HMouldFoldHeight +
                 ",HInitLife='" + HInitLife +
                 "',HNextMainDate='" + HNextMainDate +
                 "',HMouldUseStatus='" + HMouldUseStatus +
                 "',HUserID='" + HUserID +
                 "',HBrand='" + HBrand +
                 "',HCalibrationType='" + HCalibrationType +
                 "',HLocation='" + HLocation +
                 "',HCalibrationDate='" + HCalibrationDate +
                 "',HCalibrationCycle='" + HCalibrationCycle +
                 "',HProductDesignSize='" + HProductDesignSize +
                 "',HGaugeDesignSize='" + HGaugeDesignSize +
                 "',HProductQTY='" + HProductQTY +
                 "',HManagerID='" + HManagerID +
                 "',HPackV='" + HPackV +
                 "',HStandardQtyForMouldInPack='" + HStandardQtyForMouldInPack +
                 "' where HInterID=" + HInterID.ToString();
                LogService.Write(sql);
                //主表
                oCN.RunProc("UpDate Gy_MouldFileMain set  " +
@@ -3022,6 +3102,8 @@
                 "',HGaugeDesignSize='" + HGaugeDesignSize +
                 "',HProductQTY='" + HProductQTY +
                 "',HManagerID='" + HManagerID +
                 "',HPackV='" + HPackV +
                 "',HStandardQtyForMouldInPack='" + HStandardQtyForMouldInPack +
                 "' where HInterID=" + HInterID.ToString());             
                oCN.RunProc("delete from Gy_MouldFileSub_SubMater where HInterID='" + HInterID + "'");