yusijie
2024-05-07 a04a1d45c9390547ab9cce332c9aa663dbe715f3
Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
31个文件已修改
551 ■■■■ 已修改文件
DAL/销售管理/ClsXs_SeOrderBill.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LMES/bin/x86/Debug.zip 补丁 | 查看 | 原始文档 | blame | 历史
Model/销售管理/ClsXs_SeOrderBillSub.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/BLL.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/BLL.pdb 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/DAL.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/DAL.pdb 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/DBUtility.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/DBUtility.pdb 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/Model.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/Model.pdb 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/PayM.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/PayM.pdb 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/Pub_Class.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/Pub_Class.pdb 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/Pub_Control.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/Pub_Control.pdb 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/SQLHelper.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/SQLHelper.pdb 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/x86/Debug/PayM.csproj.AssemblyReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/x86/Debug/PayM.csproj.GenerateResource.cache 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/x86/Debug/PayM.csproj.ResolveComReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/x86/Debug/PayM.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/x86/Debug/PayM.pdb 补丁 | 查看 | 原始文档 | blame | 历史
WarM/条码打印/Gy_BarCodeBill_automaticallyByPLC_New.cs 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/条码打印/Gy_BarCodeBill_automaticallyByPLC_New.designer.cs 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/条码打印/Gy_PackBarCodeBill_automaticallyByPLC.Designer.cs 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/条码打印/Gy_PackBarCodeBill_automaticallyByPLC.cs 363 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/项目管理/工作任务/PM_WorkTaskBillController.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/项目管理/工程项目/PM_ProjectBillController.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/ÏúÊÛ¹ÜÀí/ClsXs_SeOrderBill.cs
@@ -134,7 +134,7 @@
                    string subSql = "Insert into Xs_SeOrderBillSub" +
                        "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationQty_SellOutCheck,HRelationMoney_SellOutCheck,HRelationQty_ICMO,HRelationQty_SellBack,HRelationQty_SellBackCheck,HRelationMoney,HMaterID,HUnitID,HQty,HPrice,HTaxPrice,HMoney" +
                        ",HDiscountRate,HRelTaxPrice,HTaxRate,HTaxMoney,HlineTotal,HlineTotalBB,HDate,HOutStockQty,HInvoiceQty,HRemark,HOrderLevID" +
                        ",HCusMaterNumber,HCusModel,HCusMaterName,HisStockGoods,HWHID) " +
                        ",HCusMaterNumber,HCusModel,HCusMaterName,HisStockGoods,HWHID,HRemark_TL,HRemark_SJG) " +
                        "values(" +
                        "" + omodel.HInterID +
                        "," + oSub.HEntryID +
@@ -170,8 +170,10 @@
                        "','" + oSub.HCusModel +
                        "','" + oSub.HCusMaterName +
                        "'," + (oSub.HisStockGoods?1:0) +
                         ",'" + oSub.HWhID +
                        "')";
                         ",'" + oSub.HWhID + "'" +
                         ",'" + oSub.HRemark_TL + "'" +
                         ",'" + oSub.HRemark_SJG + "'" +
                        ")";
                    oCn.RunProc(subSql);
                }
@@ -350,7 +352,7 @@
                    string subSql = "Insert into Xs_SeOrderBillSub" +
                        "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationQty_SellOutCheck,HRelationMoney_SellOutCheck,HRelationQty_ICMO,HRelationQty_SellBack,HRelationQty_SellBackCheck,HRelationMoney,HMaterID,HUnitID,HQty,HPrice,HTaxPrice,HMoney" +
                        ",HDiscountRate,HRelTaxPrice,HTaxRate,HTaxMoney,HlineTotal,HlineTotalBB,HDate,HOutStockQty,HInvoiceQty,HRemark,HOrderLevID" +
                        ",HCusMaterNumber,HCusModel,HCusMaterName,HisStockGoods,HWHID) " +
                        ",HCusMaterNumber,HCusModel,HCusMaterName,HisStockGoods,HWHID,HRemark_TL,HRemark_SJG) " +
                        "values(" +
                        "" + omodel.HInterID +
                        "," + oSub.HEntryID +
@@ -386,8 +388,10 @@
                        "','" + oSub.HCusModel +
                        "','" + oSub.HCusMaterName +
                        "'," + (oSub.HisStockGoods?1:0) +
                        ",'" + oSub.HWhID +
                        "')";
                        ",'" + oSub.HWhID + "'" +
                        ",'" + oSub.HRemark_TL + "'" +
                        ",'" + oSub.HRemark_SJG + "'" +
                        ")";
                    oCn.RunProc(subSql);
                }
@@ -538,6 +542,9 @@
                    oSub.HInvoiceQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HInvoiceQty"]);
                    oSub.HisStockGoods = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HisStockGoods"]) == 1 ? true : false;
                    oSub.HRemark_TL = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[0]["HRemark_TL"]);
                    oSub.HRemark_SJG = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[0]["HRemark_SJG"]);
                    DetailColl.Add(oSub);
                }
                sReturn = "显示单据成功!";
LMES/bin/x86/Debug.zip
Binary files differ
Model/ÏúÊÛ¹ÜÀí/ClsXs_SeOrderBillSub.cs
@@ -93,5 +93,8 @@
        public double HRelationQty_ICMO;
        public double HRelationQty_SellBack;
        public double HRelationQty_SellBackCheck;
        public string HRemark_TL;           //投料
        public string HRemark_SJG;          //深加工
    }
}
PayM/bin/x86/Debug/BLL.dll
Binary files differ
PayM/bin/x86/Debug/BLL.pdb
Binary files differ
PayM/bin/x86/Debug/DAL.dll
Binary files differ
PayM/bin/x86/Debug/DAL.pdb
Binary files differ
PayM/bin/x86/Debug/DBUtility.dll
Binary files differ
PayM/bin/x86/Debug/DBUtility.pdb
Binary files differ
PayM/bin/x86/Debug/Model.dll
Binary files differ
PayM/bin/x86/Debug/Model.pdb
Binary files differ
PayM/bin/x86/Debug/PayM.dll
Binary files differ
PayM/bin/x86/Debug/PayM.pdb
Binary files differ
PayM/bin/x86/Debug/Pub_Class.dll
Binary files differ
PayM/bin/x86/Debug/Pub_Class.pdb
Binary files differ
PayM/bin/x86/Debug/Pub_Control.dll
Binary files differ
PayM/bin/x86/Debug/Pub_Control.pdb
Binary files differ
PayM/bin/x86/Debug/SQLHelper.dll
Binary files differ
PayM/bin/x86/Debug/SQLHelper.pdb
Binary files differ
PayM/obj/x86/Debug/PayM.csproj.AssemblyReference.cache
Binary files differ
PayM/obj/x86/Debug/PayM.csproj.GenerateResource.cache
Binary files differ
PayM/obj/x86/Debug/PayM.csproj.ResolveComReference.cache
Binary files differ
PayM/obj/x86/Debug/PayM.dll
Binary files differ
PayM/obj/x86/Debug/PayM.pdb
Binary files differ
WarM/ÌõÂë´òÓ¡/Gy_BarCodeBill_automaticallyByPLC_New.cs
@@ -850,6 +850,8 @@
                            HBatchNo2 = getBatchNo();
                        }
                        HBarCode = ClsPub.isStrNull(grdSub.Rows[i].Cells[HMaterModel2Col].Value) + getHBarCode_MaxNo();
                        long HSourceID = 0;
                        string sql = "select * from Gy_Source where HName = '" + comboBox_SourceNameParams.Text + "' ";
                        DataSet ds = oCn.RunProcReturn(sql, "Gy_Source");
@@ -917,7 +919,7 @@
                string LIU = "";
                int LEN = 4;
                DataSet ds;
                string sql = "select * from h_v_IF_BarCodeBillList Where æºå•单号 ='" + grdMain.Rows[0].Cells[HSourceBillNoCol].Value + "' and HMaterID = " + grdMain.Rows[0].Cells[HMaterIDCol].Value + " and HSTOCKORGID = " + HOrgID + " and CONVERT(varchar(100),条码日期, 23) = '" + HDate + "' order by æ‰¹å· desc";
                string sql = "select * from h_v_IF_BarCodeBillList Where HMaterID = " + grdMain.Rows[0].Cells[HMaterIDCol].Value + " and HSTOCKORGID = " + HOrgID + " and CONVERT(varchar(100),条码日期, 23) = '" + HDate + "' order by æ‰¹å· desc";
                ds = oCn.RunProcReturn(sql, "h_v_IF_BarCodeBillList");
                if (ds != null)
                {
@@ -944,6 +946,69 @@
            return HBatchNo;
        }
        //生成当天产品条码的流水号
        private string getHBarCode_MaxNo()
        {
            string HBarCode_MaxNo = "";
            //日期获取方式
            string sDate = dtpHDate.Value.ToShortDateString();                                                                                   //
            string sYear = ClsPub.isDate(sDate).Year.ToString().Substring(2, 2);
            string sPeriod = "0" + ClsPub.isDate(sDate).Month.ToString();
            sPeriod = sPeriod.Substring(sPeriod.Length - 2, 2);
            string sDay = "0" + ClsPub.isDate(sDate).Day.ToString();
            sDay = sDay.Substring(sDay.Length - 2, 2);
            string HDate = "20" + sYear + "-" + sPeriod + "-" + sDay;
            //获取流水号:四位,该物料当天生成的条码数
            string LIU = "";
            int LEN = 4;
            //获取产品条码备份表中当日本产品条码编号最大的记录
            long HMaxNo_Bak = 0;                //记录产品条码备份表中当日本产品条码编号最大的记录的条码编号的流水号
            DataSet ds1;
            string sql1 = "select * from Gy_BarCodeBill_SWELL_SubBarCodeBill Where HMaterID = " + grdMain.Rows[0].Cells[HMaterIDCol].Value + " and HSTOCKORGID = " + HOrgID + " and CONVERT(varchar(100),HBarCodeDate, 23) = '" + HDate + "' and HInterID <>0 order by HBarCode desc";
            ds1 = oCn.RunProcReturn(sql1, "Gy_BarCodeBill_SWELL_SubBarCodeBill");
            if (ds1 != null && ds1.Tables[0].Rows.Count>0)
            {
                string HBarCodeMaxNo = ds1.Tables[0].Rows[0]["HBarCode"].ToString();
                HBarCodeMaxNo = HBarCodeMaxNo.Substring(HBarCodeMaxNo.Length - LEN, LEN);
                HMaxNo_Bak = ClsPub.isLong(HBarCodeMaxNo);
            }
            ////获取条码档案中当日本产品条码编号最大的记录
            long HMaxNo = 0;                //记录条码档案中当日本产品条码编号最大的记录的条码编号的流水号
            DataSet ds;
            string sql = "select * from h_v_IF_BarCodeBillList Where HMaterID = " + grdMain.Rows[0].Cells[HMaterIDCol].Value + " and HSTOCKORGID = " + HOrgID + " and CONVERT(varchar(100),条码日期, 23) = '" + HDate + "' and HInterID <> 0 order by æ¡ç ç¼–号 desc";
            ds = oCn.RunProcReturn(sql, "h_v_IF_BarCodeBillList");
            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                string HBarCodeMaxNo = ds.Tables[0].Rows[0]["条码编号"].ToString();
                HBarCodeMaxNo = HBarCodeMaxNo.Substring(HBarCodeMaxNo.Length - LEN, LEN);
                HMaxNo = ClsPub.isLong(HBarCodeMaxNo);
            }
            //获取当日本产品 åœ¨æ¡ç æ¡£æ¡ˆå’Œäº§å“æ¡ç å¤‡ä»½è¡¨ä¸­ æœ€å¤§çš„æµæ°´å·
            long count = 0;
            count = HMaxNo >= HMaxNo_Bak ? HMaxNo : HMaxNo_Bak;
            //为流水号前面补零
            LIU += count + 1;
            while (LIU.Length < LEN)  //如果流水号小于6位数前面补0
            {
                LIU = "0" + LIU;
            }
            //拼接批号
            HBarCode_MaxNo = sYear + sPeriod + sDay + LIU;
            return HBarCode_MaxNo;
        }
        #endregion
        #endregion
        #region ç›‘听通讯
@@ -1712,7 +1777,6 @@
        {
            return DBUtility.Xt_BaseBillFun.Fun_GetCol(sCol, grdList);
        }
        #endregion
        #endregion
WarM/ÌõÂë´òÓ¡/Gy_BarCodeBill_automaticallyByPLC_New.designer.cs
@@ -296,7 +296,7 @@
            this.bc.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.bc.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.bc.Name = "bc";
            this.bc.Size = new System.Drawing.Size(35, 47);
            this.bc.Size = new System.Drawing.Size(60, 60);
            this.bc.Text = "生成";
            this.bc.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.bc.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
@@ -498,8 +498,9 @@
            this.tc.ImageAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.tc.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.tc.ImageTransparentColor = System.Drawing.Color.White;
            this.tc.Margin = new System.Windows.Forms.Padding(100, 2, 0, 3);
            this.tc.Name = "tc";
            this.tc.Size = new System.Drawing.Size(35, 47);
            this.tc.Size = new System.Drawing.Size(60, 60);
            this.tc.Text = "退出";
            this.tc.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.tc.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
@@ -593,11 +594,10 @@
            // cmdSourceBillNo
            // 
            this.cmdSourceBillNo.Image = ((System.Drawing.Image)(resources.GetObject("cmdSourceBillNo.Image")));
            this.cmdSourceBillNo.ImageAlign = System.Drawing.ContentAlignment.TopRight;
            this.cmdSourceBillNo.Location = new System.Drawing.Point(1214, 11);
            this.cmdSourceBillNo.Location = new System.Drawing.Point(1214, -4);
            this.cmdSourceBillNo.Margin = new System.Windows.Forms.Padding(4);
            this.cmdSourceBillNo.Name = "cmdSourceBillNo";
            this.cmdSourceBillNo.Size = new System.Drawing.Size(33, 33);
            this.cmdSourceBillNo.Size = new System.Drawing.Size(60, 60);
            this.cmdSourceBillNo.TabIndex = 99;
            this.cmdSourceBillNo.UseVisualStyleBackColor = true;
            this.cmdSourceBillNo.Click += new System.EventHandler(this.cmdSourceBillNo_Click_1);
@@ -638,6 +638,7 @@
            // radioButton_HIsUsingBatchNo
            // 
            this.radioButton_HIsUsingBatchNo.AutoSize = true;
            this.radioButton_HIsUsingBatchNo.Enabled = false;
            this.radioButton_HIsUsingBatchNo.Location = new System.Drawing.Point(874, 190);
            this.radioButton_HIsUsingBatchNo.Name = "radioButton_HIsUsingBatchNo";
            this.radioButton_HIsUsingBatchNo.Size = new System.Drawing.Size(141, 22);
@@ -657,9 +658,9 @@
            // 
            // button_stopListen
            // 
            this.button_stopListen.Location = new System.Drawing.Point(404, 250);
            this.button_stopListen.Location = new System.Drawing.Point(404, 223);
            this.button_stopListen.Name = "button_stopListen";
            this.button_stopListen.Size = new System.Drawing.Size(151, 35);
            this.button_stopListen.Size = new System.Drawing.Size(192, 62);
            this.button_stopListen.TabIndex = 97;
            this.button_stopListen.Text = "停止监听";
            this.button_stopListen.UseVisualStyleBackColor = true;
@@ -711,9 +712,9 @@
            // 
            // button_startListen
            // 
            this.button_startListen.Location = new System.Drawing.Point(214, 250);
            this.button_startListen.Location = new System.Drawing.Point(187, 223);
            this.button_startListen.Name = "button_startListen";
            this.button_startListen.Size = new System.Drawing.Size(133, 35);
            this.button_startListen.Size = new System.Drawing.Size(160, 62);
            this.button_startListen.TabIndex = 96;
            this.button_startListen.Text = "开始监听";
            this.button_startListen.UseVisualStyleBackColor = true;
@@ -906,7 +907,7 @@
            // 
            this.button_resetParams.Location = new System.Drawing.Point(590, 173);
            this.button_resetParams.Name = "button_resetParams";
            this.button_resetParams.Size = new System.Drawing.Size(89, 40);
            this.button_resetParams.Size = new System.Drawing.Size(153, 75);
            this.button_resetParams.TabIndex = 105;
            this.button_resetParams.Text = "重  ç½®";
            this.button_resetParams.UseVisualStyleBackColor = true;
@@ -914,9 +915,9 @@
            // 
            // button_saveParams
            // 
            this.button_saveParams.Location = new System.Drawing.Point(377, 173);
            this.button_saveParams.Location = new System.Drawing.Point(311, 173);
            this.button_saveParams.Name = "button_saveParams";
            this.button_saveParams.Size = new System.Drawing.Size(89, 40);
            this.button_saveParams.Size = new System.Drawing.Size(155, 75);
            this.button_saveParams.TabIndex = 104;
            this.button_saveParams.Text = "保  å­˜";
            this.button_saveParams.UseVisualStyleBackColor = true;
WarM/ÌõÂë´òÓ¡/Gy_PackBarCodeBill_automaticallyByPLC.Designer.cs
@@ -34,6 +34,7 @@
            this.tabControl_MainInfo = new System.Windows.Forms.TabControl();
            this.tabPage_BillInfo = new System.Windows.Forms.TabPage();
            this.gbUp = new System.Windows.Forms.GroupBox();
            this.button_produceTemp = new System.Windows.Forms.Button();
            this.label_sBillNo = new System.Windows.Forms.Label();
            this.textBox_sBillNo = new System.Windows.Forms.TextBox();
            this.label_sBillID = new System.Windows.Forms.Label();
@@ -121,6 +122,7 @@
            // gbUp
            // 
            this.gbUp.BackColor = System.Drawing.Color.Transparent;
            this.gbUp.Controls.Add(this.button_produceTemp);
            this.gbUp.Controls.Add(this.label_sBillNo);
            this.gbUp.Controls.Add(this.textBox_sBillNo);
            this.gbUp.Controls.Add(this.label_sBillID);
@@ -149,6 +151,16 @@
            this.gbUp.Size = new System.Drawing.Size(1374, 310);
            this.gbUp.TabIndex = 33;
            this.gbUp.TabStop = false;
            //
            // button_produceTemp
            //
            this.button_produceTemp.Location = new System.Drawing.Point(829, 215);
            this.button_produceTemp.Name = "button_produceTemp";
            this.button_produceTemp.Size = new System.Drawing.Size(158, 70);
            this.button_produceTemp.TabIndex = 123;
            this.button_produceTemp.Text = "临时组托";
            this.button_produceTemp.UseVisualStyleBackColor = true;
            this.button_produceTemp.Click += new System.EventHandler(this.button_produceTemp_Click);
            // 
            // label_sBillNo
            // 
@@ -193,9 +205,9 @@
            // 
            // button_produceByHand
            // 
            this.button_produceByHand.Location = new System.Drawing.Point(591, 250);
            this.button_produceByHand.Location = new System.Drawing.Point(591, 215);
            this.button_produceByHand.Name = "button_produceByHand";
            this.button_produceByHand.Size = new System.Drawing.Size(151, 35);
            this.button_produceByHand.Size = new System.Drawing.Size(186, 70);
            this.button_produceByHand.TabIndex = 118;
            this.button_produceByHand.Text = "未满托生成";
            this.button_produceByHand.UseVisualStyleBackColor = true;
@@ -276,9 +288,9 @@
            // 
            // button_stopListen
            // 
            this.button_stopListen.Location = new System.Drawing.Point(404, 250);
            this.button_stopListen.Location = new System.Drawing.Point(379, 215);
            this.button_stopListen.Name = "button_stopListen";
            this.button_stopListen.Size = new System.Drawing.Size(151, 35);
            this.button_stopListen.Size = new System.Drawing.Size(176, 70);
            this.button_stopListen.TabIndex = 97;
            this.button_stopListen.Text = "停止组托";
            this.button_stopListen.UseVisualStyleBackColor = true;
@@ -287,11 +299,11 @@
            // textBox_HPackBarCode
            // 
            this.textBox_HPackBarCode.BackColor = System.Drawing.SystemColors.ScrollBar;
            this.textBox_HPackBarCode.Enabled = false;
            this.textBox_HPackBarCode.Location = new System.Drawing.Point(122, 81);
            this.textBox_HPackBarCode.Name = "textBox_HPackBarCode";
            this.textBox_HPackBarCode.Size = new System.Drawing.Size(280, 28);
            this.textBox_HPackBarCode.TabIndex = 43;
            this.textBox_HPackBarCode.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_HPackBarCode__KeyPress);
            // 
            // dtpHDate
            // 
@@ -312,9 +324,9 @@
            // 
            // button_startListen
            // 
            this.button_startListen.Location = new System.Drawing.Point(214, 250);
            this.button_startListen.Location = new System.Drawing.Point(147, 215);
            this.button_startListen.Name = "button_startListen";
            this.button_startListen.Size = new System.Drawing.Size(133, 35);
            this.button_startListen.Size = new System.Drawing.Size(200, 70);
            this.button_startListen.TabIndex = 96;
            this.button_startListen.Text = "自动组托";
            this.button_startListen.UseVisualStyleBackColor = true;
@@ -387,16 +399,16 @@
            // 
            this.button_resetParams.Location = new System.Drawing.Point(590, 173);
            this.button_resetParams.Name = "button_resetParams";
            this.button_resetParams.Size = new System.Drawing.Size(89, 40);
            this.button_resetParams.Size = new System.Drawing.Size(134, 81);
            this.button_resetParams.TabIndex = 105;
            this.button_resetParams.Text = "重  ç½®";
            this.button_resetParams.UseVisualStyleBackColor = true;
            // 
            // button_saveParams
            // 
            this.button_saveParams.Location = new System.Drawing.Point(377, 173);
            this.button_saveParams.Location = new System.Drawing.Point(311, 173);
            this.button_saveParams.Name = "button_saveParams";
            this.button_saveParams.Size = new System.Drawing.Size(89, 40);
            this.button_saveParams.Size = new System.Drawing.Size(155, 81);
            this.button_saveParams.TabIndex = 104;
            this.button_saveParams.Text = "保  å­˜";
            this.button_saveParams.UseVisualStyleBackColor = true;
@@ -638,7 +650,7 @@
            this.toolStripButton_Delete.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.toolStripButton_Delete.ImageTransparentColor = System.Drawing.Color.White;
            this.toolStripButton_Delete.Name = "toolStripButton_Delete";
            this.toolStripButton_Delete.Size = new System.Drawing.Size(35, 47);
            this.toolStripButton_Delete.Size = new System.Drawing.Size(60, 60);
            this.toolStripButton_Delete.Text = "删除";
            this.toolStripButton_Delete.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.toolStripButton_Delete.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
@@ -651,8 +663,9 @@
            this.tc.ImageAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.tc.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.tc.ImageTransparentColor = System.Drawing.Color.White;
            this.tc.Margin = new System.Windows.Forms.Padding(100, 2, 0, 3);
            this.tc.Name = "tc";
            this.tc.Size = new System.Drawing.Size(35, 47);
            this.tc.Size = new System.Drawing.Size(60, 60);
            this.tc.Text = "退出";
            this.tc.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.tc.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
@@ -743,5 +756,6 @@
        private System.Windows.Forms.ToolStripSeparator toolStripSeparator10;
        private System.Windows.Forms.ToolStripButton tc;
        private System.Windows.Forms.ToolStripButton toolStripButton_Delete;
        private System.Windows.Forms.Button button_produceTemp;
    }
}
WarM/ÌõÂë´òÓ¡/Gy_PackBarCodeBill_automaticallyByPLC.cs
@@ -347,12 +347,18 @@
        //未满托生成 æŒ‰é’® ç‚¹å‡»äº‹ä»¶
        private void button_produceByHand_Click(object sender, EventArgs e)
        {
            if (HQty == 0)
            try
            {
                MessageBox.Show("请扫码子条码!");
                return;
                if (HQty == 0)
                {
                    MessageBox.Show("请扫码子条码!");
                    return;
                }
                this.Sub_SaveBill();
            }catch(Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            this.Sub_SaveBill();
        }
        //自动组托 
@@ -379,6 +385,8 @@
            comboBox_SourceNameParams.Enabled = false;
            button_saveParams.Enabled = false;
            textBox_HBarCode.Focus();
        }
        //停止组托
@@ -406,22 +414,28 @@
        {
            if(isStartListen == 1)
            {
                if(HQty == DBUtility.ClsPub.isDoule(textBox_PackQty.Text))
                try
                {
                    this.Sub_SaveBill();
                    //设置打印模板,打印
                    grdSub.Rows[0].Cells[0].Value = "*";
                    Report = new GridppReport();
                    Report.LoadFromFile(DBUtility.ClsPub.AppPath + @"\" + textBox_PrintModelParams.Text + ".grf");  //here .
                    Report.BeforePostRecord += new _IGridppReportEvents_BeforePostRecordEventHandler(ReportBeforePostRecord);
                    Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReportFetchRecordByDataTable);
                    Report.PrintEnd += new _IGridppReportEvents_PrintEndEventHandler(ReportPrintEnd);
                    if (comboBox_PrinterParams.Text != "")
                    if (HQty == DBUtility.ClsPub.isDoule(textBox_PackQty.Text))
                    {
                        Report.Printer.PrinterName = comboBox_PrinterParams.Text.Replace("(默认)", "");
                        this.Sub_SaveBill();
                        //设置打印模板,打印
                        grdSub.Rows[0].Cells[0].Value = "*";
                        Report = new GridppReport();
                        Report.LoadFromFile(DBUtility.ClsPub.AppPath + @"\" + textBox_PrintModelParams.Text + ".grf");  //here .
                        Report.BeforePostRecord += new _IGridppReportEvents_BeforePostRecordEventHandler(ReportBeforePostRecord);
                        Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReportFetchRecordByDataTable);
                        Report.PrintEnd += new _IGridppReportEvents_PrintEndEventHandler(ReportPrintEnd);
                        if (comboBox_PrinterParams.Text != "")
                        {
                            Report.Printer.PrinterName = comboBox_PrinterParams.Text.Replace("(默认)", "");
                        }
                        Report.Print(false);
                    }
                    Report.Print(false);
                }catch(Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }
@@ -430,25 +444,29 @@
        //生成托盘条码
        private bool Sub_SaveBill()
        {
            //获取组织信息
            HOrgID = get_ORGANIZATIONSIDByName(cmbHOrgID.Text);
            HOrgNumber = get_ORGANIZATIONSNOByName(cmbHOrgID.Text);
            if (HOrgID == -1)
            try
            {
                MessageBox.Show("选择组织有错误!");
                return false;
            }
                //获取组织信息
                HOrgID = get_ORGANIZATIONSIDByName(cmbHOrgID.Text);
                HOrgNumber = get_ORGANIZATIONSNOByName(cmbHOrgID.Text);
                if (HOrgID == -1)
                {
                    throw new Exception("选择组织有错误!");
                }
            if (!Sub_AllowSave())//单据完整性判断
                if (!Sub_AllowSave())//单据完整性判断
                {
                    throw new Exception("单据完整性判断失败!");
                }
                SaveBarCode();
                return true;
            }catch(Exception ex)
            {
                return false;
                throw new Exception(ex.Message);
            }
            SaveBarCode();
            return true;
        }
        //单据完整性判断          æœªå®Œæˆ
@@ -506,6 +524,15 @@
                sSQLMul[1] = " exec h_p_WMS_SetMaxNo_QTY '" + sTMNumber + "'," + HQty.ToString() + " ";
                //判断当前托盘条码是否已经通过临时组托在条码档案中生成了,若已经生成了则不需要在插入
                ds = oCn.RunProcReturn("select * from Gy_BarCodeBill where HBarCode = '" + textBox_HPackBarCode.Text + "' and HSTOCKORGID = " + HOrgID, "Gy_BarCodeBill");
                if (ds != null && ds.Tables[0].Rows.Count > 0)
                {
                    sSQLMul[0] = "";
                }
                oCn.BeginTran();
                if (getRunProcByMul_Back(sSQLMul, ref DBUtility.ClsPub.sExeReturnInfo))
                {
                    //MessageBox.Show("条码生成完毕!");
@@ -517,15 +544,21 @@
                    setPackBarCodeBillData();
                    getDisplay_GrdMain();
                    oCn.Commit();
                }
                else
                {
                    //MessageBox.Show("条码生成失败!" + DBUtility.ClsPub.sExeReturnInfo);
                    oCn.RollBack();
                }
                //oCn.Commit();
            }
            catch (Exception e)
            {
                //MessageBox.Show("条码生成失败!" + e.Message);
                oCn.RollBack();
                throw new Exception(e.Message);
            }
        }
@@ -540,27 +573,30 @@
                {
                    for (int i = 0; i < 1; i++)
                    {
                        oCn.RunProc(sSQL[i]);
                        if (sSQL[i].Length > 0)
                        {
                            oCn.RunProc(sSQL[i]);
                        }
                    }
                    //上传组托信息到服务器
                    send();
                    oCn.Commit();
                }
                else
                {
                    sErrMsg = "没有数据!";
                    oCn.Commit();
                    return false;
                    sErrMsg = "没有数据!";
                    throw new Exception(sErrMsg);
                }
                oCn.Commit();
                //oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                sErrMsg = e.Message;
                oCn.RollBack();
                return false;
                sErrMsg = e.Message;
                throw new Exception(sErrMsg);
            }
        }
        #endregion
@@ -570,16 +606,22 @@
        private void send()
        {
            string err = "";
            if (!CheckModRight(ModRightNamePackUnion, DBUtility.ClsPub.CurUserName, ref err))
            {
                MessageBox.Show(err);
                return;
            }
            //if (!CheckModRight(ModRightNamePackUnion, DBUtility.ClsPub.CurUserName, ref err))
            //{
            //    MessageBox.Show(err);
            //    return;
            //}
            //if (MessageBox.Show("确定要上传?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Cancel)
            //{
            //    return;
            //}
            LoadData();
            try
            {
                LoadData();
            }catch(Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
        //判断用户权限
@@ -608,7 +650,7 @@
            //判断是否数据完整 
            if (AllowLoadData() == false)
            {
                return;
                throw new Exception("数据完整性判断失败!");
            }
            try
            {
@@ -626,14 +668,14 @@
                }
                else
                {
                    MessageBox.Show("生成失败!原因:" + err);
                    return;
                    string error = "生成失败!原因:" + err;
                    throw new Exception(error);
                }
            }
            catch (Exception e)
            {
                MessageBox.Show("单据号:" + textBox_sBillID.Text + ",单据ID:" + textBox_sBillID.Text + ";上传失败!" + e.Message);
                return;
                string error = "单据号:" + textBox_sBillID.Text + ",单据ID:" + textBox_sBillID.Text + ";上传失败!" + e.Message;
                throw new Exception(error);
            }
        }
@@ -657,37 +699,37 @@
        public bool set_SavePackUnionBill_Add(Int64 HInterID, string HBillType, string HBillNo, string HBarCode_Pack, string HMaker, Int64 HStockOrgID, ref string sErrMsg)
        {
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            oCn.BeginTran();
            try
            {
                oCn.BeginTran();
                DataSet ds = oCn.RunProcReturn("exec h_p_Sc_PackUnionBill_Insert_New " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode_Pack + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_Sc_PackUnionBill_Insert_New");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";上传失败!";
                    oCn.RollBack();
                    return false;
                    sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";上传失败!";
                    throw new Exception(sErrMsg);
                }
                else
                {
                    if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 1)
                    {
                        sErrMsg = "上传失败,单据号:" + HBillNo + ",单据ID:" + HInterID + ";" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
                        oCn.RollBack();
                        return false;
                        sErrMsg = "上传失败,单据号:" + HBillNo + ",单据ID:" + HInterID + ";" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
                        throw new Exception(sErrMsg);
                    }
                    else
                    {
                        //sErrMsg = "生成生产组托单成功!单据号为:" + HBillNo;
                        oCn.Commit();
                        //sErrMsg = "生成生产组托单成功!单据号为:" + HBillNo;
                        return true;
                    }
                }
            }
            catch (Exception e)
            {
                sErrMsg = "生成生产组托单失败!" + e.Message;
                oCn.RollBack();
                return false;
                sErrMsg = "生成生产组托单失败!" + e.Message;
                throw new Exception(sErrMsg);
            }
        }
@@ -713,11 +755,9 @@
            }
            catch (Exception e2)
            {
                //if (DBUtility.ClsPub.bSound)
                //{
                //    DBUtility.ClsPub.MessageBeep((int)DBUtility.ClsPub.BeepType.Warning);
                //}
                MessageBox.Show("发生网络异常,请稍后再试!");
                textBox_HBarCode.Text = "";
                textBox_HBarCode.Focus();
                MessageBox.Show(e2.Message);
            }
        }
        //将条码信息写入条码出入库临时表
@@ -741,13 +781,13 @@
                }
                else
                {
                    MessageBox.Show(err);
                    return;
                    throw new Exception(err);
                }
            }
            catch (Exception e)
            {
                MessageBox.Show("扫描子条码,写入临时表信息失败!" + e.Message + err);
                string sError = "扫描子条码,写入临时表信息失败!" + e.Message + err;
                throw new Exception(sError);
            }
        }
@@ -1161,9 +1201,196 @@
            }
        }
        #endregion
        #region ä¸´æ—¶ç»„托
        #region ä¸´æ—¶ç»„托 æŒ‰é’®ç‚¹å‡»äº‹ä»¶
        private void button_produceTemp_Click(object sender, EventArgs e)
        {
            if (HQty == 0)
            {
                MessageBox.Show("请扫码子条码!");
                return;
            }
            this.produceTemp();
            //设置打印模板,打印
            grdSub.Rows[0].Cells[0].Value = "*";
            Report = new GridppReport();
            Report.LoadFromFile(DBUtility.ClsPub.AppPath + @"\" + textBox_PrintModelParams.Text + "_Temp" + ".grf");  //here .
            Report.BeforePostRecord += new _IGridppReportEvents_BeforePostRecordEventHandler(ReportBeforePostRecord);
            Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReportFetchRecordByDataTable);
            Report.PrintEnd += new _IGridppReportEvents_PrintEndEventHandler(ReportPrintEnd);
            if (comboBox_PrinterParams.Text != "")
            {
                Report.Printer.PrinterName = comboBox_PrinterParams.Text.Replace("(默认)", "");
            }
            Report.Print(false);
        }
        #endregion
        #region ä¸´æ—¶ç»„托
        private void produceTemp()
        {
            //判断条码档案中是否已经存在该托条码,若存在,则不需要再创建。重新加载界面即可。
            DataSet ds_getPackBarCode;
            string sql_getPackBarCode = "select * from Gy_BarCodeBill where HBarCode = '" + textBox_HPackBarCode.Text + "'";
            ds_getPackBarCode = oCn.RunProcReturn(sql_getPackBarCode, "Gy_BarCodeBill");
            if (ds_getPackBarCode != null && ds_getPackBarCode.Tables[0].Rows.Count > 0)
            {
                //重新加载界面
                getDisplay_grdSub();
                setPackBarCodeBillData();
                getDisplay_GrdMain();
                return;
            }
            //获取组织信息
            HOrgID = get_ORGANIZATIONSIDByName(cmbHOrgID.Text);
            HOrgNumber = get_ORGANIZATIONSNOByName(cmbHOrgID.Text);
            //验证组织
            if (HOrgID == -1)
            {
                MessageBox.Show("选择组织有错误!");
                return;
            }
            //单据完整性判断
            if (!Sub_AllowSave())
            {
                return;
            }
            //获取当前产线及产线内码
            long HSourceID = 0;
            string sql = "select * from Gy_Source where HName = '" + comboBox_SourceNameParams.Text + "' ";
            DataSet ds = oCn.RunProcReturn(sql, "Gy_Source");
            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                HSourceID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HItemID"].ToString());
            }
            //拼接临时组托时,托条码的生成语句
            sSQLMul = new string[2];
            sSQLMul[0] = "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,HJiaYe " +
                            ",HPressModel,HCusModel,HMaterialModel,HColor,HBarCodeDate " +
                            ",HLogo,HPackageSize,HMaterialJQty,HMaterialMQty,HCustomBatchNo " +
                            ",HSTOCKORGID,HOWNERID,HBeginDate,HSeOrderBillNo,HGBBarCode " +
                            ",POOrderBillNo,HInterID,HInitSourceEntryID,HBarCode_Pack " +
                            ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo " +
                            ",HCustomQty1,HLayerNumber,HCusBarCode,HBarCodeStatus,HSourceID " +
                            ") values ("
                            + "'" + textBox_HPackBarCode.Text + "','" + HBarCodeType + "',0,0,1"
                            + ",'',0,0,'" + ClsPub.CurUserName + "',getdate(),0,1"
                            + ",0,0,'','',''"
                            + "," + HQty.ToString() + ",1,0,0,0,''"
                            + ",0,'','','',''"
                            + ",'','','','','" + sDate + "'"
                            + ",'','',0,0,''"
                            + "," + HOrgID.ToString() + "," + HOrgID.ToString() + ",'','',''"
                            + ",''," + HInterID.ToString() + ",0,'" + textBox_HPackBarCode.Text + "'"
                            + ",'','','',0,''"
                            + ",0,0,'',''," + HSourceID +
                            ")";
            //拼接 æ›´æ–° æ‰˜æ¡ç æµæ°´å· çš„sql语句
            sSQLMul[1] = " exec h_p_WMS_SetMaxNo_QTY '" + sTMNumber + "'," + HQty.ToString() + " ";
            if (sSQLMul.Length > 0)
            {
                //执行托条码的生成语句与托条码流水号的更新语句
                for (int i = 0; i < 1; i++)
                {
                    oCn.RunProc(sSQLMul[i]);
                }
                //重新加载界面
                getDisplay_grdSub();
                setPackBarCodeBillData();
                getDisplay_GrdMain();
            }
            else
            {
                MessageBox.Show("没有数据!");
                return;
            }
        }
        #endregion
        #region æ‰˜æ¡ç  æ‰«ç 
        private void textBox_HPackBarCode__KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == (char)Keys.Return)
            {
                //获取扫描的托条码
                string HPackBarCode = textBox_HPackBarCode.Text;
                //条码类型
                HBarCodeType = ClsPub.isStrNull(cmbHBarCodeType.Text);
                //获取组织信息
                HOrgID = get_ORGANIZATIONSIDByName(cmbHOrgID.Text);
                HOrgNumber = get_ORGANIZATIONSNOByName(cmbHOrgID.Text);
                //声明用于数据库查询的变量
                string sql = "";
                DataSet ds;
                //判断 æ‰˜æ¡ç æ˜¯å¦å·²ç»ç”Ÿæˆç»„托单
                sql = "select * from Sc_PackUnionBillMain where HBarCode_Pack = '" + HPackBarCode + "'";
                ds = oCn.RunProcReturn(sql, "Sc_PackUnionBillMain");
                if (ds != null && ds.Tables[0].Rows.Count > 0)
                {
                    MessageBox.Show("托条码[" + HPackBarCode + "]已经组托!");
                    return;
                }
                //获取当前产线
                long HSourceID = 0;
                sql = "select * from Gy_Source where HName = '" + comboBox_SourceNameParams.Text + "'";
                ds = oCn.RunProcReturn(sql, "Gy_Source");
                if (ds != null && ds.Tables[0].Rows.Count > 0)
                {
                    HSourceID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HItemID"].ToString());
                }
                //获取缓存列表中 æ‰˜æ¡ç  å¯¹åº”çš„ ç»„托记录
                sql = "select top(1) a.* from Sc_PackUnionBill_Temp as a inner join Gy_BarCodeBill as b on a.HBarCode = b.HBarCode where a.HBarCode_Pack = '" + HPackBarCode + "' and b.HSourceID = " + HSourceID + " and a.HStockorgID = " + HOrgID;
                ds = oCn.RunProcReturn(sql, "Sc_PackUnionBill_Temp");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    MessageBox.Show("缓存列表中未查询到该托条码与子条码的组托记录!");
                    return;
                }
                else
                {
                    string HBarCode_Pack = ds.Tables[0].Rows[0]["HBarCode_Pack"].ToString();
                    long HBillID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HInterID"].ToString());
                    string HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString();
                    textBox_HPackBarCode.Text = HBarCode_Pack;
                    textBox_sBillID.Text = HBillID.ToString();
                    textBox_sBillNo.Text = HBillNo;
                    getDisplay_GrdMain();
                }
            }
        }
        #endregion
        #endregion
    }
}
WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
@@ -87,12 +87,12 @@
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_IF_SeOrderBillList order by hmainid desc", "h_v_IF_SeOrderBillList");
                    ds = oCN.RunProcReturn("select * from h_v_IF_SeOrderBillList order by hmainid desc,hsubid asc", "h_v_IF_SeOrderBillList");
                }
                else
                {
                    string sql1 = "select * from h_v_IF_SeOrderBillList where 1 = 1 ";
                    string sql = sql1 + sWhere+ " order by hmainid desc";
                    string sql = sql1 + sWhere+ " order by hmainid desc,hsubid asc";
                    ds = oCN.RunProcReturn(sql, "h_v_IF_SeOrderBillList");
                }
@@ -1268,7 +1268,7 @@
            try
            {
                ds = oCN.RunProcReturn("select * from h_v_IF_SeOrderBillList where hmainid =" + HInterID, "h_v_IF_SeOrderBillList");
                ds = oCN.RunProcReturn("select * from h_v_IF_SeOrderBillList where hmainid =" + HInterID + " order by hsubid asc", "h_v_IF_SeOrderBillList");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
WebAPI/Controllers/ÏîÄ¿¹ÜÀí/¹¤×÷ÈÎÎñ/PM_WorkTaskBillController.cs
@@ -66,6 +66,7 @@
            public string HMainSourceBillNo;
            public string HMainSourceBillType;
            public int HOrderLevID;
            public int HTaskClassID;
        }
        #endregion
@@ -184,7 +185,7 @@
                string HMainSourceBillNo = mainList[0].HMainSourceBillNo;
                string HMainSourceBillType = mainList[0].HMainSourceBillType;
                int HOrderLevID = mainList[0].HOrderLevID;
                int HTaskClassID = mainList[0].HTaskClassID;
                if (OperationType == 2)
@@ -206,7 +207,7 @@
                {
                    string sql = "insert into PM_WorkTaskBillMain" +
                        "(HYear,HPeriod,HBillType,HBillSubType,HInterID,HBillNo,HProjectID,HProNumber,HProjectStageID,HName,HDate,HTaskNote,HPlanTimes" +
                        ",HSelfTimes,HLastDate,HSendEmp,HReceiveEmp,HType,HCopyEmp,HRemark,HOrgID,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HOrderLevID)" +
                        ",HSelfTimes,HLastDate,HSendEmp,HReceiveEmp,HType,HCopyEmp,HRemark,HOrgID,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HOrderLevID,HTaskClassID)" +
                        "values(" +
                        "" + HYear +
                        "," + HPeriod +
@@ -236,6 +237,7 @@
                        ",'" + HMainSourceBillNo +
                        "','" + HMainSourceBillType +
                        "','" + HOrderLevID  +
                        "','"+ HTaskClassID+
                        "')";
                    //主表
@@ -273,6 +275,7 @@
                        ",HMainSourceBillNo = '" + HMainSourceBillNo +
                        "',HMainSourceBillType = '" + HMainSourceBillType +
                        "',HOrderLevID  = '" + HOrderLevID  +
                        "',HTaskClassID  = '" + HTaskClassID +
                        "' where HInterID = " + HInterID;
                    oCN.RunProc(sql);
WebAPI/Controllers/ÏîÄ¿¹ÜÀí/¹¤³ÌÏîÄ¿/PM_ProjectBillController.cs
@@ -34,6 +34,12 @@
        public DAL.ClsPM_ProjectMoneyBillMain BillNew4 = new DAL.ClsPM_ProjectMoneyBillMain();   //项目费用单对应单据类
        public DAL.ClsPM_ProjectMoneyBillMain BillOld4 = new DAL.ClsPM_ProjectMoneyBillMain();
        public DAL.ClsPM_ProjectBeginBillMain BillNew5 = new DAL.ClsPM_ProjectBeginBillMain();   //项目启动单对应单据类
        public DAL.ClsPM_ProjectBeginBillMain BillOld5 = new DAL.ClsPM_ProjectBeginBillMain();
        public DAL.ClsPM_ProjectEndBillMain BillNew6 = new DAL.ClsPM_ProjectEndBillMain();   //项目验收单对应单据类
        public DAL.ClsPM_ProjectEndBillMain BillOld6 = new DAL.ClsPM_ProjectEndBillMain();
        #region å·¥ç¨‹é¡¹ç›® æ–°å¢ž/编辑
        #region å·¥ç¨‹é¡¹ç›® è¡¨å¤´æ•°æ®
        public class PM_ProjectBill_Main
@@ -3255,7 +3261,7 @@
                    if (refSav == "Add")
                    {
                        //单据号是否重复
                        if (BillNew1.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID))
                        if (BillNew5.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
@@ -3266,7 +3272,7 @@
                    }
                    if (refSav == "Update")
                    {
                        if (BillOld1.ShowBill(oItem.HInterID, ref s) == false)
                        if (BillOld5.ShowBill(oItem.HInterID, ref s) == false)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
@@ -3275,7 +3281,7 @@
                            return objJsonResult;
                        }
                        //判断是否可编辑
                        if (BillOld1.omodel.HChecker != "" && BillOld1.omodel.HChecker != null)
                        if (BillOld5.omodel.HChecker != "" && BillOld5.omodel.HChecker != null)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
@@ -3283,7 +3289,7 @@
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        if (BillOld1.omodel.HBillStatus > 1)
                        if (BillOld5.omodel.HBillStatus > 1)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
@@ -3893,7 +3899,7 @@
                    if (refSav == "Add")
                    {
                        //单据号是否重复
                        if (BillNew1.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID))
                        if (BillNew6.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
@@ -3904,7 +3910,7 @@
                    }
                    if (refSav == "Update")
                    {
                        if (BillOld1.ShowBill(oItem.HInterID, ref s) == false)
                        if (BillOld6.ShowBill(oItem.HInterID, ref s) == false)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
@@ -3913,7 +3919,7 @@
                            return objJsonResult;
                        }
                        //判断是否可编辑
                        if (BillOld1.omodel.HChecker != "" && BillOld1.omodel.HChecker != null)
                        if (BillOld6.omodel.HChecker != "" && BillOld6.omodel.HChecker != null)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
@@ -3921,7 +3927,7 @@
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        if (BillOld1.omodel.HBillStatus > 1)
                        if (BillOld6.omodel.HBillStatus > 1)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;