1
ch
2023-03-30 b7ede349929b44bd664d059728919f6c8eede66a
DAL/³µ¼ä¹ÜÀí/ClsSc_ProcessExchangeBill.cs
@@ -9,6 +9,7 @@
    {
        public Model.ClsSc_ProcessExchangeBillMain omodel = new Model.ClsSc_ProcessExchangeBillMain();
        public List<Model.ClsSc_ProcessExchangeBillSub> DetailColl = new List<Model.ClsSc_ProcessExchangeBillSub>();
        Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
        public ClsSc_ProcessExchangeBill()
        {
@@ -92,7 +93,16 @@
                ",HEquipMentID=" + omodel.HEquipMentID.ToString() +
                ",HProjectNum='" + omodel.HProjectNum.ToString() + "'" +
                ",HMateOutBatchNo='" + omodel.HMateOutBatchNo + "'" +
                ",HBLFlag='" + (omodel.HBLFlag ? 1 : 0) + "'" +
                ",HXTNumber='" + omodel.HXTNumber  + "'" +
                ",HXTModel='" + omodel.HXTModel + "'" +
                ",HCusNumber='" + omodel.HCusNumber + "'" +
                ",HMaterModel='" + omodel.HMaterModel + "'" +
                ",HWidth='" + omodel.HWidth + "'" +
                ",HWeight='" + omodel.HWeight + "'" +
                ",HAuxQty='" + omodel.HAuxQty + "'" +
                ",HAuxUnit='" + omodel.HAuxUnit + "'" +
                ",HSplitNo='" + omodel.HSplitNo + "'" +
                ",HProdMaterCode='" + omodel.HProdMaterCode + "'" +
                ",HSeOrderBillNo='" + omodel.HSeOrderBillNo + "'" +
                ",HCusShortName='" + omodel.HCusShortName + "'" +
@@ -306,8 +316,8 @@
                ",'" + omodel.HProdMaterName + "','" + omodel.HCusName + "','" + omodel.HWorkRemark + "','" + omodel.HImportNote + "','" + omodel.HMaterNumber_A + "'" +
                ",'" + omodel.HMaterNumber_B + "','" + omodel.HMaterNumber_C + "','" + omodel.HMaterNumber_D + "','" + omodel.HProdType + "','" + omodel.HMaterShortName + "'" +
                ",'" + omodel.HMaterIDA + "','" + omodel.HMaterIDB + "','" + omodel.HMaterIDC + "','" + omodel.HMaterIDD + "'," + omodel.HICMOEntryID +
                ",'" + omodel.HPicNumVer + "','" + omodel.HPicNumAssemble + "','" + omodel.HMaterTexture + "','" + omodel.HProductNum + "','" + omodel.HVerNum + "','"+ omodel.HPRDORGID+ "','"+omodel.HBLFlag+ "','" + omodel.HCusNumber + "','" + omodel.HPickLabel + "','" + omodel.HPickLabelNumber + "','" + omodel.HXTNumber + "','" + omodel.HXTModel + "','" + omodel.HWorkBillSortNo +
                "',"+ omodel.HRoutingBillID + ") ");
                ",'" + omodel.HPicNumVer + "','" + omodel.HPicNumAssemble + "','" + omodel.HMaterTexture + "','" + omodel.HProductNum + "','" + omodel.HVerNum + "','"+ omodel.HPRDORGID+ "','" + (omodel.HBLFlag ? 1 : 0) + "','" + omodel.HCusNumber + "','" + omodel.HPickLabel + "','" + omodel.HPickLabelNumber + "','" + omodel.HXTNumber + "','" + omodel.HXTModel + "','" + omodel.HWorkBillSortNo +
                "',"+ omodel.HRoutingBillID + ",'"+ omodel.HMaterModel + "',"+ omodel.HWidth + ","+ omodel.HWeight + ","+ omodel.HAuxQty + ","+ omodel.HAuxUnit +","+ omodel.HSplitNo +")" );
                sErr = sErr + "1;";
                //插入子表
                foreach (Model.ClsSc_ProcessExchangeBillSub oSub in DetailColl)
@@ -397,6 +407,37 @@
                sErr = sErr + "7;";
                //工序流转卡保存时自动同步条码信息至条码档案(Y è‡ªåŠ¨åŒæ­¥)
                //获取系统参数
                string sErrMsg = "";
                if (oSystemParameter.ShowBillByOrgID(omodel.HPRDORGID, ref sErrMsg) == true)
                {
                    if (oSystemParameter.omodel.Sc_ProcessExchangeBill_AutoBarCode == "Y") //系统参数  å·¥åºæµè½¬å¡ä¿å­˜æ—¶è‡ªåŠ¨åŒæ­¥æ¡ç ä¿¡æ¯è‡³æ¡ç æ¡£æ¡ˆ
                    {
                        oCn.RunProc("insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" +
                            ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" +
                            ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty" +
                            ",HBarcodeQtys,HBarcodeNo,HDeptID,HWhID,HSPID,HRemark" +
                            ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate" +
                            ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HGiveAwayFlag" +
                            ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo" +
                            ") values ("
                            + "'" + omodel.HBillNo + "','唯一条码'," + omodel.HMaterID.ToString() + "," + omodel.HUnitID.ToString() + "," + omodel.HQty.ToString()
                            + ",'" + omodel.HBatchNo + "'," + omodel.HSupID.ToString() + ",0,'" + omodel.HMaker + "',getdate(),0," + omodel.HQty.ToString()
                            + ", " + omodel.HInterID.ToString() + ",1,'" + omodel.HBillNo + "','3772',''"
                            + ",1,1,0,0,0,'工序流转卡保存自动同步'"
                            + ",0,'',getdate(),'',getdate()"
                            + ", " + omodel.HPRDORGID + "," + omodel.HPRDORGID + ",'',0,0"
                            + ",'','','',0,'','')");
                    }
                }
                else
                {
                    sReturn = "获取系统参数失败! " + sErrMsg;
                    oCn.RollBack();
                    return false;
                }
                //
                sReturn = "新增单据成功!";
                oCn.Commit();
@@ -484,6 +525,14 @@
                omodel.HMaterTexture = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HMaterTexture"]);
                omodel.HProductNum = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HProductNum"]);
                omodel.HVerNum = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HVerNum"]);
                omodel.HRoutingBillID = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRoutingBillID"]);
                omodel.HPRDORGID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPRDORGID"]);
                omodel.HMaterModel = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HMaterModel"]);
                omodel.HWidth = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HWidth"]);
                omodel.HWeight = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HWeight"]);
                omodel.HAuxQty = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HAuxQty"]);
                omodel.HAuxUnit = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HAuxUnit"]);
                omodel.HSplitNo = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HSplitNo"]);
                //
                //循环
                DataSet DsSub;