| | |
| | | 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 = ""; |
| | |
| | | ",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()" + |
| | |
| | | ",'" + 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 " + |
| | |
| | | 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(); |
| | |
| | | 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 " + |
| | |
| | | "',HGaugeDesignSize='" + HGaugeDesignSize + |
| | | "',HProductQTY='" + HProductQTY + |
| | | "',HManagerID='" + HManagerID + |
| | | "',HPackV='" + HPackV + |
| | | "',HStandardQtyForMouldInPack='" + HStandardQtyForMouldInPack + |
| | | "' where HInterID=" + HInterID.ToString()); |
| | | |
| | | oCN.RunProc("delete from Gy_MouldFileSub_SubMater where HInterID='" + HInterID + "'"); |