ch
2022-01-10 eb38ca9a6cd3fab7e857b0cc654f01a26d24f725
Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
16个文件已修改
11个文件已添加
1176 ■■■■■ 已修改文件
DAL/生产管理/模具管理/ClsSc_MouldMaintainBill.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/生产管理/设备管理/ClsSb_EquipDotCheckBill.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/生产管理/设备管理/ClsSb_EquipMaintainBill.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/生产管理/模具管理/ClsSc_MouldMaintainBillMain.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/生产管理/设备管理/ClsSb_EquipDotCheckBillMain.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/生产管理/设备管理/ClsSb_EquipMaintainBillMain.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pub_Class/CustomerCls/ClsPub.cs 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/条码打印/Gy_BarCodeBill.cs 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/条码打印/Gy_BarCodeBill.designer.cs 59 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/条码打印/Gy_BarCodeBill.resx 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/BaseSet/Gy_RoutingGroupController.cs 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/WebAPIController.cs 161 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/仓存管理/委外用料/WW_PPBomBillController.cs 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/仓存管理/扫码异常记录/KF_PonderationBillController.cs 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/仓存管理/条码出入库记录/Kf_ICStockInOutBillController.cs 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/仓存管理/条码库存/KF_ICInventoryList_WMSBillController.cs 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/仓存管理/调拨盘点/Kf_MoveStockRequestBillController.cs 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/仓存管理/领料发货/Kf_StepFoldOutBillController.cs 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/仓存管理/领料发货/apiController.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/仓存管理/验收入库/Kf_StepFoldinBillController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/DLL/ClsWW_PPBomBill.cs 139 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Models/ClsWW_PPBomBillMain.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Models/ClsWW_PPBomBillSub.cs 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj.user 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/Éú²ú¹ÜÀí/Ä£¾ß¹ÜÀí/ClsSc_MouldMaintainBill.cs
@@ -57,7 +57,7 @@
                ",HEndDate='" + omodel.HEndDate + "'" +
                ",HExplanation='" + omodel.HExplanation + "'" +
                ",HInnerBillNo='" + omodel.HInnerBillNo + "'" +
                ",HMouldMaintainRuleInterID="+omodel.HMouldMaintainRuleInterID.ToString()+
                //",HDeptID=" + omodel.HDeptID.ToString() +
                //",HDeptNumber='" + omodel.HDeptNumber +"'"+
                //",HEmpID=" + omodel.HEmpID.ToString() +
@@ -146,13 +146,13 @@
                ",HYear,HPeriod,HRemark" +
                ",HPlanNo,HPlanInterID,HMouldID,HBeginDate"+
                ",HEndDate"+
                ",HInnerBillNo,HExplanation" +
                ",HInnerBillNo,HExplanation,HMouldMaintainRuleInterID" +
                ") " +
                " values('" + this.BillType + "','"  + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
                "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'"+
                ",'" + omodel.HPlanNo + "'," + omodel.HPlanInterID.ToString() + "," + omodel.HMouldID.ToString() + ",'" + omodel.HBeginDate + "'" +
                ",'" + omodel.HEndDate + "'"+
                ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation + "'" +
                ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation + "'," +omodel.HMouldMaintainRuleInterID.ToString()+
                ") ");
                if (DetailCol.Count > 0)
DAL/Éú²ú¹ÜÀí/É豸¹ÜÀí/ClsSb_EquipDotCheckBill.cs
@@ -54,6 +54,7 @@
                ",HPlanNo='" + omodel.HPlanNo + "'" +
                ",HExplanation='" + omodel.HExplanation+"'" +
                ",HInnerBillNo='" + omodel.HInnerBillNo+"'" +
                ",HEquipDotCheckRuleInterID="+omodel.HEquipDotCheckRuleInterID+
                " where HInterID=" + lngBillKey.ToString());
                //删除关联
                DeleteRelation(ref sReturn, lngBillKey);
@@ -113,11 +114,11 @@
                oCn.RunProc("Insert Into Sb_EquipDotCheckBillMain   " +
                "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" +
                ",HYear,HPeriod,HRemark,HEquipID" +
                ",HBeginDate,HEndDate,HPlanNo,HExplanation,HInnerBillNo" +
                ",HBeginDate,HEndDate,HPlanNo,HExplanation,HInnerBillNo,HEquipDotCheckRuleInterID" +
                ") "+
                " values('" + this.BillType + "','"  + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" +
                "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'," + omodel.HEquipID.ToString() +
                ",'" + omodel.HBeginDate + "','" + omodel.HEndDate + "','" + omodel.HPlanNo + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'" +
                ",'" + omodel.HBeginDate + "','" + omodel.HEndDate + "','" + omodel.HPlanNo + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," +omodel.HEquipDotCheckRuleInterID.ToString()+
                ") ");
                //插入子表
                foreach (Model.ClsSb_EquipDotCheckBillSub oSub in DetailColl)
DAL/Éú²ú¹ÜÀí/É豸¹ÜÀí/ClsSb_EquipMaintainBill.cs
@@ -53,6 +53,7 @@
                ",HPlanNo='" + omodel.HPlanNo + "'" +
                ",HExplanation='" + omodel.HExplanation+"'" +
                ",HInnerBillNo='" + omodel.HInnerBillNo+"'" +
                ",HEquipMaintainRuleInterID="+omodel.HEquipMaintainRuleInterID.ToString()+
                " where HInterID=" + lngBillKey.ToString());
                //删除关联
                DeleteRelation(ref sReturn, lngBillKey);
@@ -118,11 +119,11 @@
                oCn.RunProc("Insert Into Sb_EquipMaintainBillMain   " +
                "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" +
                ",HYear,HPeriod,HRemark,HEquipID" +
                ",HBeginDate,HEndDate,HPlanNo,HExplanation,HInnerBillNo" +
                ",HBeginDate,HEndDate,HPlanNo,HExplanation,HInnerBillNo,HEquipMaintainRuleInterID" +
                ") "+
                " values('" + this.BillType + "','"  + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
                "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'," + omodel.HEquipID.ToString() +
                ",'" + omodel.HBeginDate + "','" + omodel.HEndDate + "','" + omodel.HPlanNo + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'" +
                ",'" + omodel.HBeginDate + "','" + omodel.HEndDate + "','" + omodel.HPlanNo + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," +omodel.HEquipMaintainRuleInterID.ToString()+
                ") ");
                //插入配件子表
                foreach (Model.ClsSb_EquipMaintainBillSub oSub in DetailColl)
Model/Éú²ú¹ÜÀí/Ä£¾ß¹ÜÀí/ClsSc_MouldMaintainBillMain.cs
@@ -14,5 +14,6 @@
        public string HEndDate;//             --保养结束日期
        public string HExplanation;//       --ÕªÒª
        public string HInnerBillNo;//       --内部单据号
        public int HMouldMaintainRuleInterID;
    }
}
Model/Éú²ú¹ÜÀí/É豸¹ÜÀí/ClsSb_EquipDotCheckBillMain.cs
@@ -13,6 +13,10 @@
        public string HExplanation;
        public string HInnerBillNo;
        public Int64 HDeptID;
        public int HEquipMaintainRuleInterID;
        public int HEquipDotCheckRuleInterID;
    }
}
Model/Éú²ú¹ÜÀí/É豸¹ÜÀí/ClsSb_EquipMaintainBillMain.cs
@@ -13,7 +13,8 @@
        public string HExplanation;
        public string HInnerBillNo;
        public Int64 HDeptID;
        public int HEquipMaintainRuleInterID;
    }
}
Pub_Class/CustomerCls/ClsPub.cs
@@ -399,7 +399,7 @@
                case 0:
                    switch (Glida)
                    {
                        case 0:
                        case 0://纯流水号
                            Ds = oCn.RunProcReturn("Select * from Gy_MaxNum where BillCode='" + BillCode.Trim() + "'", "Gy_MaxNum");
                            if (Ds.Tables[0].Rows.Count != 0)
                            {
@@ -418,11 +418,31 @@
                            }
                            return sBillNo;
                        case 1:
                        case 1://根据 YYå¹´+MM月 + æµæ°´å·  ç”Ÿæˆå•据号
                            sKjYear = sKjYear.Substring(2, 2);
                            sPeriod = "0" + sPeriod;
                            sPeriod = sPeriod.Substring(sPeriod.Length - 2, 2);
                            sDay = "";
                            Ds = oCn.RunProcReturn("Select * from Gy_MaxNum where BillCode='" + BillCode.Trim() + "' and KjYear='" + sKjYear + "' and Period='" + sPeriod + "' and whcode='" + sDay + "'", "Gy_MaxNum");
                            if (Ds.Tables[0].Rows.Count != 0)
                            {
                                sStr = new string(c, CodeLen - (Ds.Tables[0].Rows[0]["NowNumBer"].ToString()).Length);
                                sBillNo = Profix.Trim() + sKjYear +  sPeriod  +  sDay  + sStr + Ds.Tables[0].Rows[0]["NowNumBer"].ToString().Trim();
                            }
                            else //插入新记录
                            {
                                sStr = new string(c, CodeLen - 1);
                                oCn.RunProc("insert into Gy_Maxnum(BillCode,Kjyear,Period,whcode,NowNumber)  values('" + BillCode.Trim() + "','" + sKjYear + "','" + sPeriod + "','" + sDay + "',1)");
                                sBillNo = Profix.Trim() + sKjYear +  sPeriod +  sDay + sStr + "1";
                            }
                            if (Add == true)
                            {
                                oCn.RunProc("update Gy_Maxnum set NowNumBer=NowNumBer+1 where BillCode='" + BillCode.Trim() + "' and KjYear='" + sKjYear + "' and Period='" + sPeriod + "' and whcode='" + sDay + "'");
                            }
                            return sBillNo;
                        case 2:      //当前年当前期间 ç”Ÿæˆå•据号
                            Ds = oCn.RunProcReturn("Select * from Gy_MaxNum where BillCode='" + BillCode.Trim() + "' and KjYear=" + sKjYear + " and Period=" + sPeriod + " and Day=" + sDay, "Gy_MaxNum");
                        case 2:      //根据年+月+日  ç”Ÿæˆå•据号
                            Ds = oCn.RunProcReturn("Select * from Gy_MaxNum where BillCode='" + BillCode.Trim() + "' and KjYear='" + sKjYear + "' and Period='" + sPeriod + "' and whcode='" + sDay + "'", "Gy_MaxNum");
                            if (Ds.Tables[0].Rows.Count != 0)
                            {
                                sStr = new string(c, CodeLen - (Ds.Tables[0].Rows[0]["NowNumBer"].ToString()).Length);
@@ -431,12 +451,12 @@
                            else //插入新记录
                            {
                                sStr = new string(c, CodeLen - 1);
                                oCn.RunProc("insert into Gy_Maxnum(BillCode,Kjyear,Period,Day,NowNumber)  values('" + BillCode.Trim() + "'," + sKjYear + "," + sPeriod + "," + sDay + ",1)");
                                oCn.RunProc("insert into Gy_Maxnum(BillCode,Kjyear,Period,whcode,NowNumber)  values('" + BillCode.Trim() + "','" + sKjYear + "','" + sPeriod + "','" + sDay + "',1)");
                                sBillNo = Profix.Trim() + sKjYear + ClsPub.isStrNull(("0" + sPeriod)).Substring(ClsPub.isStrNull(("0" + sPeriod)).Length - 2, 2) + ClsPub.isStrNull(("0" + sDay)).Substring(ClsPub.isStrNull(("0" + sDay)).Length - 2, 2) + sStr + 1;
                            }
                            if (Add == true)
                            {
                                oCn.RunProc("update Gy_Maxnum set NowNumBer=NowNumBer+1 where BillCode='" + BillCode.Trim() + "' and KjYear=" + sKjYear + " and Period=" + sPeriod + " and Day=" + sDay);
                                oCn.RunProc("update Gy_Maxnum set NowNumBer=NowNumBer+1 where BillCode='" + BillCode.Trim() + "' and KjYear='" + sKjYear + "' and Period='" + sPeriod + "' and whcode='" + sDay + "'");
                            }
                            return sBillNo;
                        default:
WarM/ÌõÂë´òÓ¡/Gy_BarCodeBill.cs
@@ -266,6 +266,7 @@
        {
            this.Sub_SaveBill();
            Display();
        }
        //重置按纽
@@ -797,8 +798,8 @@
                    }
                    else if (cmbHBarCodeType.Text == "试剂成品条码规则")
                    {
                        //物料编码+生产批号+失效日期(YYMMDD)+流水号6位-
                        sTMNumber = HMaterNumber + HBatchNo + sYear + sPeriod + sDay;
                        //物料编码+生产批号+流水号6位-
                        sTMNumber = HMaterNumber + HBatchNo ;
                        Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo");    //获取最大流水号
                                                                                                                    //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'");
                        LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]);
@@ -812,7 +813,7 @@
                        Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo");    //获取最大流水号
                                                                                                                    //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'");
                        LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]);
                        LSHlen = 4;
                        LSHlen = 5;
                        if (sTMNumber.Length != 16)
                        {
                            MessageBox.Show("条码长度不够16位,是否数据不全!制造本部1位:[0] + æœºåž‹ä»£ç 5位:[" + HModelName + "] + å¹´æœˆæ—¥5位:["+ HBarCodeDate + "] + æ‰¹æ¬¡å·2位:[" + HBarCodeBatchNo  + "]+ åŽ‹ç¼©æœº1位:["+ HYasuoji + "]+00 ; ");
@@ -827,7 +828,7 @@
                        Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo");    //获取最大流水号
                                                                                                                    //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'");
                        LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]);
                        LSHlen = 4;
                        LSHlen = 5;
                        if (sTMNumber.Length != 18)
                        {
                            MessageBox.Show("条码长度不够18位,是否数据不全!物料代码11位:["+ HMaterNumber.Replace(".", "") + "]+年月日5位:["+ HBarCodeDate + "]+批次号2位:[" + HBarCodeBatchNo  + "];");
@@ -841,7 +842,7 @@
                        Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo");    //获取最大流水号
                                                                                                                    //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'");
                        LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]);
                        LSHlen = 4;
                        LSHlen = 5;
                    }
                    //else if (cmbHBarCodeType.Text == "托盘条码")
                    //{
@@ -3208,5 +3209,34 @@
                Thread.Sleep(1000);
            }
        }
        //生成外箱码
        private void wxm_Click(object sender, EventArgs e)
        {
            //必须条码生成按钮是灰度才可以生成箱条码
            if(bc.Enabled != false)
            {
                MessageBox.Show("请先生成条形码,再生成箱条码");
                return;
            }
            //-------------------根据HINTERID生成箱条码
            //生成前判断,循环物料网格,判断 æ˜¯å¦è®¾ç½®äº†åˆç†çš„ å¤–箱数量。 å¤–箱数量 å¿…须是 æœ€å°åŒ…装数的 å€æ•° å¹¶å¿…须大于0和大于等于最小包装数量。
            //从0行进行循环 ç‰©æ–™ç½‘格,获取外箱数量
            //子循环 æ¡ç ç½‘æ ¼
            //根据外箱数量 æ‰£å‡ï¼Œç›´åˆ° å¤–箱数量扣减完,生成 å¤–箱条码和组托单
            //结束循环
            //刷新打印页签(-S çš„ è™šæ‹Ÿæ¡ç ä¸æ˜¾ç¤º ï¼‰
        }
    }
}
WarM/ÌõÂë´òÓ¡/Gy_BarCodeBill.designer.cs
@@ -32,6 +32,7 @@
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Gy_BarCodeBill));
            this.Tool = new System.Windows.Forms.ToolStrip();
            this.dy = new System.Windows.Forms.ToolStripButton();
            this.sdy = new System.Windows.Forms.ToolStripButton();
            this.yl = new System.Windows.Forms.ToolStripButton();
            this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
            this.AddRow = new System.Windows.Forms.ToolStripButton();
@@ -106,7 +107,9 @@
            this.grdSub = new System.Windows.Forms.DataGridView();
            this.tabPage3 = new System.Windows.Forms.TabPage();
            this.grdList = new System.Windows.Forms.DataGridView();
            this.sdy = new System.Windows.Forms.ToolStripButton();
            this.wxm = new System.Windows.Forms.ToolStripButton();
            this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
            this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
            this.Tool.SuspendLayout();
            this.P1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pic1)).BeginInit();
@@ -139,6 +142,9 @@
            this.DelRow,
            this.toolStripSeparator4,
            this.bc,
            this.toolStripSeparator8,
            this.wxm,
            this.toolStripSeparator9,
            this.cz,
            this.toolStripSeparator5,
            this.kc,
@@ -176,6 +182,20 @@
            this.dy.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.dy.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
            this.dy.Click += new System.EventHandler(this.dy_Click);
            //
            // sdy
            //
            this.sdy.AutoSize = false;
            this.sdy.Image = ((System.Drawing.Image)(resources.GetObject("sdy.Image")));
            this.sdy.ImageAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.sdy.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.sdy.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.sdy.Name = "sdy";
            this.sdy.Size = new System.Drawing.Size(35, 47);
            this.sdy.Text = "浏览";
            this.sdy.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.sdy.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
            this.sdy.Click += new System.EventHandler(this.sdy_Click);
            // 
            // yl
            // 
@@ -1037,19 +1057,29 @@
            this.grdList.Size = new System.Drawing.Size(1241, 347);
            this.grdList.TabIndex = 46;
            // 
            // sdy
            // wxm
            // 
            this.sdy.AutoSize = false;
            this.sdy.Image = ((System.Drawing.Image)(resources.GetObject("sdy.Image")));
            this.sdy.ImageAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.sdy.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.sdy.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.sdy.Name = "sdy";
            this.sdy.Size = new System.Drawing.Size(35, 47);
            this.sdy.Text = "浏览";
            this.sdy.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.sdy.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
            this.sdy.Click += new System.EventHandler(this.sdy_Click);
            this.wxm.AutoSize = false;
            this.wxm.Image = ((System.Drawing.Image)(resources.GetObject("wxm.Image")));
            this.wxm.ImageAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.wxm.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.wxm.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.wxm.Name = "wxm";
            this.wxm.Size = new System.Drawing.Size(50, 47);
            this.wxm.Text = "外箱码";
            this.wxm.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.wxm.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
            this.wxm.Click += new System.EventHandler(this.wxm_Click);
            //
            // toolStripSeparator8
            //
            this.toolStripSeparator8.Name = "toolStripSeparator8";
            this.toolStripSeparator8.Size = new System.Drawing.Size(6, 62);
            //
            // toolStripSeparator9
            //
            this.toolStripSeparator9.Name = "toolStripSeparator9";
            this.toolStripSeparator9.Size = new System.Drawing.Size(6, 62);
            // 
            // Gy_BarCodeBill
            // 
@@ -1176,5 +1206,8 @@
        private System.Windows.Forms.ToolStripSeparator toolStripSeparator7;
        private System.Windows.Forms.ToolStripButton BatchNo;
        private System.Windows.Forms.ToolStripButton sdy;
        private System.Windows.Forms.ToolStripSeparator toolStripSeparator8;
        private System.Windows.Forms.ToolStripButton wxm;
        private System.Windows.Forms.ToolStripSeparator toolStripSeparator9;
    }
}
WarM/ÌõÂë´òÓ¡/Gy_BarCodeBill.resx
@@ -440,6 +440,21 @@
        SUVORK5CYII=
</value>
  </data>
  <data name="wxm.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
    <value>
        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
        YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAH1SURBVDhPjZPNSxRxGMcfI+jQLTxYIKLoQQsjvEadEoRO
        /gO+awReIiGty97sRQtbPSmoB8FFMSwKDx3VXdvcfGErt9YlpWUJF/dFV2d0v36fHc0XdPALX2bmme/z
        mec38xuRBi+kahqRVmD5yfmsWe3J9ErtDD6tAQkAv85pzWqP9oo0foVcbWcJMEwDpmnaWjMqyWlHplfq
        ZlD2IVPD5CTgnra3ZlTN3oMJaj24NWYVk6kUNrbsrRlV+QQBNZ7jgKkpPsVtb82oCl06wQnAv1gCa/Gk
        rTWjutBHQN0+oOxgCbE4NuIJW2tGJc4jgNvvgUu9LLzYhHRuQ96Yp1vvdWwjt2UR0mVA6vdf4h1+hSv9
        BDxfh1R+huS/ghR0Hnd+Bxu+QKrdcEwkmY2dAAwQ8DScGe8sSRUbqj0Y+c5zR+QUwOOQFbz2EtKyij+/
        rTc/69tFKLjzH+DyM9O2wq3MiXSsux8JGGSx+YcFKHpNQBD+b8Dc/C78Pw2E/3L9RwGPAhYg654LeY4l
        ZA+x2DiH9CaPeZygaQEBBrU5sJxCNJo6BOgSHi4wrz8TdbF8GJefBUn0IRYBQktAmKtZXeExsoPouoF0
        eosbh3u/3ot3QQKafJAHsxZAlVUxCinthlx3QkreHrqY1+oS+maP5Rs8L6Xvj2MPx8IASe80O9sAAAAA
        SUVORK5CYII=
</value>
  </data>
  <data name="cz.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
    <value>
        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
@@ -573,6 +588,6 @@
    <value>93, 17</value>
  </metadata>
  <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>42</value>
    <value>25</value>
  </metadata>
</root>
WebAPI/Controllers/BaseSet/Gy_RoutingGroupController.cs
New file
@@ -0,0 +1,64 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Http;
using WebAPI.Models;
namespace WebAPI.Controllers.BaseSet
{
    public class Gy_RoutingGroupController : ApiController
    {
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
        private json objJsonResult = new json();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        DataSet ds;
        #region å·¥è‰ºè·¯çº¿å¤§ç±»åˆ—表查询
        [Route("Gy_RoutingGroup/list")]
        [HttpGet]
        public object list(string sWhere)
        {
            try
            {
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from Gy_RoutingGroup where 1=1", "Gy_RoutingGroup");
                }
                else
                {
                    string sql = "select * from Gy_RoutingGroup where 1 = 1 " + sWhere;
                    ds = oCN.RunProcReturn(sql, "Gy_RoutingGroup");
                }
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    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;
            }
        }
        #endregion
    }
}
WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
@@ -104,6 +104,9 @@
            string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
            string msg2 = sArray[0].ToString();
            string msg3 = sArray[1].ToString();
            int hentryid = int.Parse(sArray[2].ToString());//子表的顺序id
            int OperationType = int.Parse(sArray[3].ToString());//数据类型 1添加 3修改
            try
            {
                msg2 = "[" + msg2.ToString() + "]";
@@ -112,7 +115,7 @@
                long HInterID = mainList[0].HInterID;//递入type得到的单据ID
                string HBillNo = mainList[0].HBillNo;//递入type得到的单据号
                DateTime HDate = mainList[0].HDate;//日期
                int HYear = 2021;
                int HYear = DateTime.Now.Year;
                double HPeriod = 1;
                string HRemark = mainList[0].HRemark;//备注
                string HMaker = mainList[0].HMaker;//制单人
@@ -136,23 +139,39 @@
                double HDelSourceRate = mainList[0].HDelSourceRate;//减资源减量
                int HPRDORGID = mainList[0].HPRDORGID;  //组织
                //主表
                oCN.RunProc("Insert Into Gy_RoutingBillMain   " +
                "(HBillType,HInterID,HBillNo,HDate" +
                ",HYear,HPeriod,HRemark,HMaker,Hmakedate,HMaterID,HName,HMaterTypeID" +
                ",HRoutingGroupID,HUnitID,HMaterNumber,HUnitNumber,HStandard" +
                ",HMainGroupID,HMainProcID,HMainCenterID,HMainTimeUnit,HMainUnitTime,HMainWorkQty" +
                ",HMainPrice,HStdSourceQty,HAddSourceRate,HPRDORGID,HDelSourceRate" +
                ") " +
                " values('" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
                "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()," + HMaterID + ",'" + HName + "'," + HMaterTypeID +
                "," + HRoutingGroupID + "," + HUnitID + ",'" + HMaterNumber + "','" + HUnitNumber + "'," + Convert.ToString(HStandard ? 1 : 0) +
                "," + HMainGroupID + "," + HMainProcID + "," + HMainCenterID + ",'" + HMainTimeUnit + "'," + HMainUnitTime + "," + HMainWorkQty +
                "," + HMainPrice + "," + HStdSourceQty + "," + HAddSourceRate + "," + HPRDORGID + "," + HDelSourceRate +
                ") ");
                if (OperationType == 1)//新增
                {
                    //主表
                    oCN.RunProc("Insert Into Gy_RoutingBillMain   " +
                    "(HBillType,HInterID,HBillNo,HDate" +
                    ",HYear,HPeriod,HRemark,HMaker,Hmakedate,HMaterID,HName,HMaterTypeID" +
                    ",HRoutingGroupID,HUnitID,HMaterNumber,HUnitNumber,HStandard" +
                    ",HMainGroupID,HMainProcID,HMainCenterID,HMainTimeUnit,HMainUnitTime,HMainWorkQty" +
                    ",HMainPrice,HStdSourceQty,HAddSourceRate,HPRDORGID,HDelSourceRate" +
                    ") " + " values('" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
                    "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()," + HMaterID + ",'" + HName + "'," + HMaterTypeID +
                    "," + HRoutingGroupID + "," + HUnitID + ",'" + HMaterNumber + "','" + HUnitNumber + "'," + Convert.ToString(HStandard ? 1 : 0) +
                    "," + HMainGroupID + "," + HMainProcID + "," + HMainCenterID + ",'" + HMainTimeUnit + "'," + HMainUnitTime + "," + HMainWorkQty +
                    "," + HMainPrice + "," + HStdSourceQty + "," + HAddSourceRate + "," + HPRDORGID + "," + HDelSourceRate +
                    ") ");
                }
                else if (OperationType == 3)
                { //修改
                    oCN.RunProc("update Gy_RoutingBillMain  set " +
                       "HDate='" + HDate +
                       "',HYear='" + HYear + "',HPeriod='" + HPeriod + "',HRemark='" + HRemark + "',HMaker='" + HMaker +
                       "',Hmakedate=getdate(),HMaterID='" + HMaterID + "',HName='" + HName + "',HMaterTypeID='" + HMaterTypeID +
                       "',HRoutingGroupID='" + HRoutingGroupID + "',HUnitID='" + HUnitID + "',HMaterNumber='" + HMaterNumber + "',HUnitNumber='" + HUnitNumber +
                       "',HStandard='" + Convert.ToString(HStandard ? 1 : 0) + "',HMainGroupID='" + HMainGroupID + "',HMainProcID='" + HMainProcID + "',HMainCenterID='" + HMainCenterID +
                       "',HMainTimeUnit='" + HMainTimeUnit + "',HMainUnitTime='" + HMainUnitTime + "',HMainWorkQty='" + HMainWorkQty + "',HMainPrice='" + HMainPrice +
                       "',HStdSourceQty='" + HStdSourceQty + "',HAddSourceRate='" + HAddSourceRate + "',HDelSourceRate='" + HDelSourceRate +
                        "' where HInterID='" + HInterID + "'");
                    //删除子表
                    oCN.RunProc("delete from Gy_RoutingBillSub where HInterID='" + HInterID + "' and HEntryID='" + hentryid + "'");
                }
                //保存子表
                objJsonResult = AddBillSub(msg3, HInterID);
                objJsonResult = AddBillSub(msg3, HInterID, hentryid);
                if (objJsonResult.code == "0")
                {
                    objJsonResult.code = "0";
@@ -164,23 +183,28 @@
                oCN.RunProc("exec h_p_Gy_RoutingBillCheck " + HInterID);  //设置默认工艺路线
                //判断是否重复工序号
                ds = oCN.RunProcReturn("exec h_p_Gy_RoutingCtrl " + HInterID, "h_p_Gy_RoutingCtrl");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                if (OperationType == 1)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "判断重复工序号失败!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    if (ClsPub.isStrNull(ds.Tables[0].Rows[0][0]) == "2")
                    if (ds == null || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = ClsPub.isStrNull(ds.Tables[0].Rows[0][1]);
                        objJsonResult.Message = "判断重复工序号失败!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        if (ClsPub.isStrNull(ds.Tables[0].Rows[0][0]) == "2")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = ClsPub.isStrNull(ds.Tables[0].Rows[0][1]);
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                objJsonResult.code = "1";
@@ -199,9 +223,10 @@
            }
        }
        public json AddBillSub(string msg3,long HInterID) {
        public json AddBillSub(string msg3, long HInterID, int hentryid)
        {
            List<Gy_RoutingBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Gy_RoutingBillSub>>(msg3);
            for (int i=0;i< subList.ToArray().Length;i++)
            for (int i = 0; i < subList.ToArray().Length; i++)
            {
                if (subList[i].HWorkQty <= 0)
                {
@@ -265,7 +290,7 @@
                      ",HProcID_S,HCenterID_S,HWorkQty_S,HSubStdEmpQty_S,HMouldNo,HChangeMould" +
                      ",HPackStd,HPack,HPutArea,HMyWorkDays,HMyFixWorkDays,HPassRate" +
                      ") values("
                      + HInterID + "," + i + "," + subList[i].HProcID + "," + subList[i].HProcNo + "," + subList[i].HSupID + "," + Convert.ToString(subList[i].HSupFlag ? 1 : 0) + "" +
                      + HInterID + "," + (hentryid == -1 ? i : hentryid) + "," + subList[i].HProcID + ",'" + subList[i].HProcNo + "'," + subList[i].HSupID + "," + Convert.ToString(subList[i].HSupFlag ? 1 : 0) + "" +
                      "," + subList[i].HWorkQty + "," + HCenterID + ",'" + HTimeUnit + "'," + HUnitTime +
                      "," + HReadyTime + "," + HQueueTime + "," + HMoveTime +
                      ",'" + HCloseMan + "'," + Convert.ToString(HCloseType ? 1 : 0) + ",'" + subList[i].HRemark + "','" + HProcType + "'," + Convert.ToString(HNextProcFlag ? 1 : 0) + "," + Convert.ToString(HFlowProc ? 1 : 0) +
@@ -276,7 +301,7 @@
                     ",'" + HPackStd + "','" + HPack + "','" + HPutArea + "'," + HMyWorkDays + "," + HMyFixWorkDays + "," + subList[i].HPassRate +
                      ") ");
            }
            objJsonResult.code = "1";
            objJsonResult.count = 1;
            objJsonResult.Message = null;
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -755,8 +755,15 @@
        {
            try
            {
                ds = Sc_GetMoveStockBillList(sWhere);
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_IF_MoveStockBillList order by æ—¥æœŸ desc", "h_v_IF_MoveStockBillList");
                }
                else
                {
                    string sql = "select * from h_v_IF_MoveStockBillList where 1=1 " + sWhere+ "order by æ—¥æœŸ desc";
                    ds = oCN.RunProcReturn(sql, "h_v_IF_MoveStockBillList");
                }
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
                    objJsonResult.code = "0";
@@ -784,14 +791,6 @@
            }
        }
        #region sql语句
        public static DataSet Sc_GetMoveStockBillList(string sWhere)
        {
            return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_MoveStockBillList order by æ—¥æœŸ desc", "h_v_IF_MoveStockBillList");
        }
        #endregion
        /// <summary>
        /// é”€å”®å‡ºåº“单列表
        /// </summary>
WebAPI/Controllers/WebAPIController.cs
@@ -2337,6 +2337,59 @@
                return objjson;
            }
        }
        /// <summary>
        /// æ ¹æ®å™¨å…·ä¸»å†…码获取器具保养检验项目
        /// </summary>
        /// <returns></returns>
        [Route("Web/GetMouldMaintainItemtemByMaintainRuleID")]
        [HttpGet]
        public object GetMouldMaintainItemtemByMaintainRuleID(int MouldMaintainRuleID)
        {
            if (MouldMaintainRuleID <= 0)
            {
                objjson.code = "0";
                objjson.count = 0;
                objjson.Message = "器具保养规程未选择";
                objjson.data = null;
                return objjson;
            }
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                List<object> list = new List<object>();
                DataSet ds2;
                DataSet ds1;
                string sql1 = string.Format(@"select t.HMaintainItemID ,m.HNumber HMaintainItemNumber,t.HMaintainItem,t.HMaintainPart,t.HClaim,t.HManagerID,e.HNumber HManagerNumber,e.HName HManagerName,a.HRemark
                                                from Sc_MouldMaintainRuleBillMain a left join Sc_MouldMaintainRuleBillSub_Item t on a.HInterID=t.HInterID
                                                left join Gy_Maintain m on m.HItemID=t.HMaintainItemID
                                                left join Gy_Employee e on e.HItemID=t.HManagerID
                                                where a.HInterID=" + MouldMaintainRuleID);
                string sql2 = string.Format(@"select b.HMaterID,m.HNumber HMaterNumber,m.HName HMaterName, m.HModel HMaterSpec,b.HUnitID,u.HNumber HUnitNumber,u.HName HUnitName,b.HQty,b.HQtyMust,b.HRemark from Sc_MouldMaintainRuleBillMain a
                                                left join Sc_MouldMaintainRuleBillSub b on a.HInterID=b.HInterID
                                                left join h_v_IF_Material m on b.HMaterID=m.HItemID
                                                left join h_v_IF_Unit u on b.HUnitID=u.HItemID
                                                where a.HInterID=" + MouldMaintainRuleID);
                ds1 = oCN.RunProcReturn(sql1, "Sc_MouldMaintainRuleBillMain");//保养
                ds2 = oCN.RunProcReturn(sql2, "Sc_MouldMaintainRuleBillMain");//配件
                list.Add(ds1.Tables[0]);
                list.Add(ds2.Tables[0]);
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "获取信息成功!";
                objJsonResult.list = list;
                return objJsonResult;
            }
            catch (Exception ex)
            {
                objjson.code = "0";
                objjson.count = 0;
                objjson.Message = "获取失败" + ex.ToString();
                objjson.data = null;
                return objjson;
            }
        }
        /// <summary>
@@ -2431,6 +2484,59 @@
                return objjson;
            }
        }
        /// <summary>
        /// æ ¹æ®è®¾å¤‡ä¿å…»è§„程显示设备保养规程项目
        /// </summary>
        /// <returns></returns>
        [Route("Web/GetMaintainItemtemByMaintainRuleID")]
        [HttpGet]
        public object GetMaintainItemtemByMaintainRuleID(int EquipProjectID)
        {
            if (EquipProjectID <= 0)
            {
                objjson.code = "0";
                objjson.count = 0;
                objjson.Message = "设备保养规程未选择";
                objjson.data = null;
                return objjson;
            }
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                List<object> list = new List<object>();
                DataSet ds2;
                DataSet ds1;
                string sql1 = string.Format(@"select t.HMaintainItemID HMaintainItemID,m.HNumber HMaintainItemNumber,t.HMaintainItem HMaintainItem,t.HMaintainPart HMaintainPart,t.HClaim HClaim,t.HManagerID HManagerID,e.HNumber HManagerNumber,e.HName HManagerName,a.HRemark
                                                from Sb_EquipMaintainRuleBillMain a left join Sb_EquipMaintainRuleBillSub_Item t on a.HInterID=t.HInterID
                                                left join Gy_Maintain m on m.HItemID=t.HMaintainItemID
                                                left join Gy_Employee e on e.HItemID=t.HManagerID
                                                where a.HInterID=" + EquipProjectID );
                string sql2 = string.Format(@"select b.HMaterID,m.HNumber HMaterNumber,m.HName HMaterName,b.HUnitID,u.HNumber HUnitNumber,u.HName HUnitName,b.HQty,b.HRemark from Sb_EquipMaintainRuleBillMain a
                                                left join Sb_EquipMaintainRuleBillSub b on a.HInterID=b.HInterID
                                                left join h_v_IF_Material m on b.HMaterID=m.HItemID
                                                left join h_v_IF_Unit u on b.HUnitID=u.HItemID
                                                where a.HInterID=" + EquipProjectID);
                ds1 = oCN.RunProcReturn(sql1, "Sb_EquipMaintainRuleBillMain");//保养
                ds2 = oCN.RunProcReturn(sql2, "Sc_MouldMaintainRuleBillMain");//配件
                list.Add(ds1.Tables[0]);
                list.Add(ds2.Tables[0]);
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "获取信息成功!";
                objJsonResult.list = list;
                return objJsonResult;
            }
            catch (Exception ex)
            {
                objjson.code = "0";
                objjson.count = 0;
                objjson.Message = "获取失败" + ex.ToString();
                objjson.data = null;
                return objjson;
            }
        }
        /// <summary>
        /// æ ¹æ®è®¾å¤‡æ˜¾ç¤ºè®¾å¤‡ç‚¹æ£€ç¨‹é¡¹ç›®
@@ -2484,7 +2590,60 @@
                return objjson;
            }
        }
        /// <summary>
        /// æ ¹æ®è®¾å¤‡ç‚¹æ£€è§„程显示设备点检程项目
        /// </summary>
        /// <returns></returns>
        [Route("Web/GetDotCheckRuleItemByDotCheckRuleID")]
        [HttpGet]
        public object GetDotCheckRuleItemByDotCheckRuleID(int HDotCheckRuleInterID)
        {
            if (HDotCheckRuleInterID <= 0)
            {
                objjson.code = "0";
                objjson.count = 0;
                objjson.Message = "设备点检规程未选择";
                objjson.data = null;
                return objjson;
            }
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                string sql = string.Format(@"select b.HDotCheckItemID HDotCheckItemID,c.HNumber HDotCheckCode,b.HDotCheckItem,b.HDotCheckPart,b.HClaim,
                                    b.HManagerID,e.HNumber HManagerCode,e.HName HManagerName,b.HRemark from Sb_EquipDotCheckRuleBillMain  a
                                    left join Sb_EquipDotCheckRuleBillSub b on a.HInterID=b.HInterID
                                    left join Gy_QCCheckItem c on c.HItemID=b.HDotCheckItemID
                                     left join Gy_Employee e on e.HItemID=b.HManagerID
                                    where a.HInterID=" + HDotCheckRuleInterID);
                ds = oCN.RunProcReturn(sql, "Sb_EquipDotCheckRuleBillMain");
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
                    objjson.code = "0";
                    objjson.count = 0;
                    objjson.Message = "获取失败" + DBUtility.ClsPub.sErrInfo;
                    objjson.data = null;
                    return objjson;
                }
                else
                {
                    objjson.code = "1";
                    objjson.count = 1;
                    objjson.Message = "获取成功!";
                    objjson.data = ds.Tables[0];
                    return objjson;
                }
            }
            catch (Exception ex)
            {
                objjson.code = "0";
                objjson.count = 0;
                objjson.Message = "获取失败" + ex.ToString();
                objjson.data = null;
                return objjson;
            }
        }
        /// <summary>
        /// èŽ·å–ç»´ä¿®é¡¹ç›®åˆ—è¡¨
        /// </summary>
WebAPI/Controllers/²Ö´æ¹ÜÀí/ίÍâÓÃÁÏ/WW_PPBomBillController.cs
New file
@@ -0,0 +1,73 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using WebAPI.Models;
namespace WebAPI.Controllers.仓存管理.委外用料
{
    public class WW_PPBomBillController : ApiController
    {
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;//单据状态(新增,修改,浏览,更新单价,变更)
        private json objJsonResult = new json();
        public DataSet ds = new DataSet();
        public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
        public DLL.ClsWW_PPBomBill BillNew0 = new DLL.ClsWW_PPBomBill();
        public DLL.ClsWW_PPBomBill BillOld0 = new DLL.ClsWW_PPBomBill();
        #region æ¨¡å…·é‡‡è´­å…¥åº“单列表
        [Route("WW_PPBomBillController/Get_WW_PPBomBillList")]
        [HttpGet]
        public object Get_WW_PPBomBillList(string sWhere)
        {
            try
            {
                ds = WW_PPBomBillList(sWhere);
                if (ds == null)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "查询数据异常,请与管理员联系!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "返回记录成功!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
            }
            catch (Exception ex)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "查询数据异常,请与管理员联系!" + ex.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        public static DataSet WW_PPBomBillList(string sWhere)
        {
            string sql1 = string.Format(@"select * from h_v_WW_PPBomBillList");
            if (sWhere == null || sWhere.Equals(""))
            {
                return new SQLHelper.ClsCN().RunProcReturn(sql1 + sWhere + "order by æ—¥æœŸ desc", "h_v_WW_PPBomBillList");
            }
            else
            {
                string sql = sql1 + sWhere + "order by æ—¥æœŸ desc";
                return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_WW_PPBomBillList");
            }
        }
        #endregion
    }
}
WebAPI/Controllers/²Ö´æ¹ÜÀí/ɨÂëÒì³£¼Ç¼/KF_PonderationBillController.cs
New file
@@ -0,0 +1,70 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Http;
using WebAPI.Models;
namespace WebAPI.Controllers.仓存管理.扫码异常记录
{
    public class KF_PonderationBillController : ApiController
    {
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;//单据状态(新增,修改,浏览,更新单价,变更)
        private json objJsonResult = new json();
        public DataSet ds = new DataSet();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        #region æ‰«ç å¼‚常记录查询
        [Route("KF_PonderationBill/PonderationBillList")]
        [HttpGet]
        public object PonderationBillList(string HbarCode)
        {
            List<object> columnNameList = new List<object>();
            try
            {
                ds = oCN.RunProcReturn("exec h_p_WMS_BarCodeStatusQuery '" + HbarCode + "'", "h_p_WMS_BarCodeStatusQuery");
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
                    Type dataType = col.DataType;
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                 if (ds.Tables[0].Rows.Count > 0)
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = ds.Tables[0].Rows.Count;
                    objJsonResult.Message = "获取资源绑定数据成功!";
                    objJsonResult.data = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(ds.Tables[0], new IsoDateTimeConverter { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" }));  //序列化DataSet中的时间格式,然后再反序列化回来
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "暂无资源绑定!";
                    objJsonResult.data = null;
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = e.Message.ToString();
                objJsonResult.data = null;
                objJsonResult.list = columnNameList;
            }
            return objJsonResult;
        }
        #endregion
    }
}
WebAPI/Controllers/²Ö´æ¹ÜÀí/ÌõÂë³öÈë¿â¼Ç¼/Kf_ICStockInOutBillController.cs
New file
@@ -0,0 +1,96 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Http;
using WebAPI.Models;
namespace WebAPI.Controllers.仓存管理.条码出入库记录
{
    public class Kf_ICStockInOutBillController : ApiController
    {
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;//单据状态(新增,修改,浏览,更新单价,变更)
        private json objJsonResult = new json();
        public DataSet ds = new DataSet();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        //存储过程 æ•°æ® ç±»
        public class Data
        {
            public Data()
            {
                HStartDate = DateTime.Now.AddMonths(-1);
                HEndDate = DateTime.Now;
                BillType = "全部";
            }
            public DateTime HStartDate;//开始日期
            public DateTime HEndDate;//结束日期
            public string MaterialName;//物料
            public string sWH;//仓库
            public string sSP;//仓位
            public string sBatchNo;//批号
            public string HBarCode;//条形码
            public string BillType;//单据类型
            public string BillNo;//单据号
            public string SeOrderBillNo;//(销售订单号)
        }
        #region å‡ºå…¥åº“记录查询
        [Route("Kf_ICStockInOutBill/StockInOutBillList")]
        [HttpGet]
        public object StockInOutBillList(string sWhere)
        {
            List<object> columnNameList = new List<object>();
            try
            {
                var data = JsonConvert.DeserializeObject<Data>(sWhere);
                ds = oCN.RunProcReturn("exec h_p_Kf_BarCodeOutInReport '" +
                    data.HStartDate + "','" + data.HEndDate + "','" + data.MaterialName + "','" + data.sWH + "','" + data.sSP + "','" + data.sBatchNo + "','" + data.HBarCode + "','" + data.BillType + "','" + data.BillNo + "','" + data.SeOrderBillNo
                    + "'", "h_p_Kf_BarCodeOutInReport");
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
                    Type dataType = col.DataType;
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                if (ds.Tables[0].Rows.Count > 0)
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = ds.Tables[0].Rows.Count;
                    objJsonResult.Message = "获取资源绑定数据成功!";
                    objJsonResult.data = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(ds.Tables[0], new IsoDateTimeConverter { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" }));  //序列化DataSet中的时间格式,然后再反序列化回来
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "暂无资源绑定!";
                    objJsonResult.data = null;
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = e.Message.ToString();
                objJsonResult.data = null;
                objJsonResult.list = columnNameList;
            }
            return objJsonResult;
        }
        #endregion
    }
}
WebAPI/Controllers/²Ö´æ¹ÜÀí/ÌõÂë¿â´æ/KF_ICInventoryList_WMSBillController.cs
New file
@@ -0,0 +1,86 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Http;
using WebAPI.Models;
namespace WebAPI.Controllers.仓存管理.条码库存
{
    public class KF_ICInventoryList_WMSBillController : ApiController
    {
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;//单据状态(新增,修改,浏览,更新单价,变更)
        private json objJsonResult = new json();
        public DataSet ds = new DataSet();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        #region æ¡ç åº“存查询列表
        [Route("KF_ICInventoryList_WMSBill/GetWMSBillList")]
        [HttpGet]
        public object GetWMSBillList(int page, int limit,string sWhere)
        {
            //page é¡µæ•°
            //limit é¡µé¢æ˜¾ç¤ºçš„行数
            //sWhere模糊查询 æ¡ä»¶
            List<object> columnNameList = new List<object>();
            try
            {
                //分页SQL语句
                string sql = "select top "+limit+ " (select count(*) from h_v_KF_ICInventoryList_WMS) æ€»æ•°, * from (select row_number() over(order by HMaterID asc)" +
                    " as rownumber, * from h_v_KF_ICInventoryList_WMS) temp_row where rownumber >"+((page-1)*limit)+" ";
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn(sql, "h_v_KF_ICInventoryList_WMS");
                }
                else
                {
                    ds = oCN.RunProcReturn(sql + sWhere, "h_v_KF_ICInventoryList_WMS");
                }
                //获取表头字段名称
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
                    Type dataType = col.DataType;
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                if (ds.Tables[0].Rows.Count > 0)
                {
                    objJsonResult.code = "1";
                    objJsonResult.count =int.Parse(ds.Tables[0].Rows[0]["总数"].ToString());
                    objJsonResult.Message = "获取资源绑定数据成功!";
                    objJsonResult.data = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(ds.Tables[0], new IsoDateTimeConverter { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" }));  //序列化DataSet中的时间格式,然后再反序列化回来
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "暂无资源绑定!";
                    objJsonResult.data = null;
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = e.Message.ToString();
                objJsonResult.data = null;
                objJsonResult.list = columnNameList;
            }
            return objJsonResult;
        }
        #endregion
    }
}
WebAPI/Controllers/²Ö´æ¹ÜÀí/µ÷²¦Å̵ã/Kf_MoveStockRequestBillController.cs
New file
@@ -0,0 +1,65 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Http;
using WebAPI.Models;
namespace WebAPI.Controllers.仓存管理.调拨盘点
{
    public class Kf_MoveStockRequestBillController : ApiController
    {
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;//单据状态(新增,修改,浏览,更新单价,变更)
        private json objJsonResult = new json();
        public DataSet ds = new DataSet();
        public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
        #region è°ƒæ‹¨å•列表
        [Route("Kf_MoveStockRequestBill/GetMoveStockRequestBillList")]
        [HttpGet]
        public object GetMoveStockRequestBillList(string sWhere)
        {
            try
            {
                //判断权限(略)
                string sql1 = string.Format("select * from h_v_IF_MoveStockRequestBillList_Litee where 1=1 ");
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCn.RunProcReturn(sql1 + " order by æ—¥æœŸ desc", "h_v_IF_MoveStockRequestBillList_Litee");
                }
                else
                {
                    string sql = sql1 + sWhere ;
                    ds = oCn.RunProcReturn(sql, "h_v_IF_MoveStockRequestBillList_Litee");
                }
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回任何记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
            }
            catch (Exception ex)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + ex.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}
WebAPI/Controllers/²Ö´æ¹ÜÀí/ÁìÁÏ·¢»õ/Kf_StepFoldOutBillController.cs
New file
@@ -0,0 +1,67 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Http;
using WebAPI.Models;
namespace WebAPI.Controllers.仓存管理.领料发货
{
    public class Kf_StepFoldOutBillController : ApiController
    {
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;//单据状态(新增,修改,浏览,更新单价,变更)
        private json objJsonResult = new json();
        public DataSet ds = new DataSet();
        public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
        #region åˆ†æ­¥å¼è°ƒå‡ºå• æŸ¥è¯¢
        [Route("Kf_StepFoldOutBill/GetStepFoldOutBillList")]
        [HttpGet]
        public object GetStepFoldOutBillList(string sWhere, string user, string Organization)
        {
            try
            {
                //判断权限(略)
                string sql1 = string.Format("select * from h_v_Kf_MoveStockStepOutBillList where (调入组织='" + Organization + "')");
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCn.RunProcReturn(sql1 + " order by æ—¥æœŸ desc", "h_v_Kf_MoveStockStepOutBillList");
                }
                else
                {
                    string sql = sql1 + sWhere + " order by æ—¥æœŸ desc";
                    ds = oCn.RunProcReturn(sql, "h_v_Kf_MoveStockStepOutBillList");
                }
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回任何记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
            }
            catch (Exception ex)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + ex.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}
WebAPI/Controllers/²Ö´æ¹ÜÀí/ÁìÁÏ·¢»õ/apiController.cs
New file
@@ -0,0 +1,6 @@
namespace WebAPI.Controllers.仓存管理.领料发货
{
    public class apiController
    {
    }
}
WebAPI/Controllers/²Ö´æ¹ÜÀí/ÑéÊÕÈë¿â/Kf_StepFoldinBillController.cs
@@ -15,7 +15,7 @@
        public DataSet ds = new DataSet();
        public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
        #region å§”外加工出库单
        #region åˆ†æ­¥å¼è°ƒå…¥å• æŸ¥è¯¢
        [Route("Kf_StepFoldinBill/GetStepFoldinBillList")]
        [HttpGet]
WebAPI/DLL/ClsWW_PPBomBill.cs
New file
@@ -0,0 +1,139 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
namespace WebAPI.DLL
{
    public class ClsWW_PPBomBill : DBUtility.ClsXt_BaseBill
    {
        public Models.ClsWW_PPBomBillMain omodel = new Models.ClsWW_PPBomBillMain();
        public List<Models.ClsWW_PPBomBillSub> DetailColl = new List<Models.ClsWW_PPBomBillSub>();
        public ClsWW_PPBomBill()
        {
            base.MvarItemKeySub = "WW_PPBomBillSub";
            base.MvarItemKeySub2 = "";
            base.MvarItemKeySub3 = "";
            base.MvarItemKeySub4 = "";
            base.MvarItemKey = "WW_PPBomBillMain";
            base.MvarReportTitle = "委外用料单";
            base.BillType = "1604";
            base.HBillSubType = "1604";
        }
        #region å›ºå®šä»£ç 
        ~ClsWW_PPBomBill()
        {
            DetailColl = null;
        }
        #endregion   è‡ªå®šä¹‰æ–¹æ³•
        //新增单据
        public override bool AddBill(ref string sReturn)
        {
            try
            {
                //得到mainid
                omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                //若MAINDI重复则重新获取
                oCn.BeginTran();
                string sql = "Insert Into WW_PPBomBillMain   " +
                "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
                ",HRemark,HMaker,HMakeDate" + /*"HYear, HPeriod,"*/
                ",HDeptID,HMaterID,HUnitID,HQty,HType" +
                ") " +
                " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
                ", '" + omodel.HRemark.ToString() + "','" + omodel.HMaker + "',getdate()" + /*omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" +*/
                ","+ omodel.HDeptID.ToString() +","+ omodel.HMaterID.ToString() + ","+ omodel.HUnitID.ToString() +","+ omodel.HQty.ToString()+",'"+ omodel.HQty+
                "') ";
                //主表
                oCn.RunProc(sql);
                //插入子表
                foreach (Models.ClsWW_PPBomBillSub oSub in DetailColl)
                {
                    oCn.RunProc("Insert into WW_PPBomBillSub " +
                          " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
                          ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                          ",HMaterID,HMaterNumber,HUnitID,HUnitNumber,HQtyMust,HQty" +
                          ",HWHID,HQtyScrap,HSendDate,HSPID" +
                          ") values("
                          + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
                          "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                          "," + oSub.HMaterID.ToString() + ",'" + oSub.HMaterNumber+ "'," + oSub.HUnitID.ToString() + ",'" + oSub.HUnitNumber + "',"  + oSub.HQtyMust.ToString() +
                          "," + oSub.HQty.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HQtyScrap.ToString() + ",'" + oSub.HSendDate + "'," + oSub.HSPID.ToString() +
                          ") ");
                }
                sReturn = "新增单据成功!";
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                oCn.RollBack();
                throw (e);
            }
        }
        //修改单据
        public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
        {
            try
            {
                //
                oCn.BeginTran();
                //更新主表
                oCn.RunProc("UpDate WW_PPBomBillMain set  " +
                " HBillNo='" + omodel.HBillNo + "'" +  //固定赋值===============
                ",HDate='" + omodel.HDate + "'" +
                ",HYear='" + omodel.HYear.ToString() + "'" +
                ",HPeriod='" + omodel.HPeriod.ToString() + "'" +
                ",HRemark='" + omodel.HRemark + "'" +
                ",HUpDater='" + omodel.HMaker + "'" +
                ",HUpDateDate=getdate()" +
                //========================================
                ",HDeptID=" + omodel.HDeptID.ToString() +
                ",HMaterID=" + omodel.HMaterID.ToString() +
                ",HUnitID=" + omodel.HUnitID.ToString() +
                ",HQty=" + omodel.HQty.ToString() +
                ",HType=" + omodel.HType.ToString() +
                " where HInterID=" + lngBillKey.ToString());
                //删除关联
                DeleteRelation(ref sReturn, lngBillKey);
                //删除子表
                DeleteBillSub(lngBillKey);
                //插入子表
                foreach (Models.ClsWW_PPBomBillSub oSub in DetailColl)
                {
                    oCn.RunProc("Insert into WW_PPBomBillSub " +
                          " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
                          ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                          ",HMaterID,HMaterNumber,HUnitID,HUnitNumber,HQtyMust,HQty" +
                          ",HWHID,HQtyScrap,HSendDate,HSPID" +
                          ") values("
                          + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
                          "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                          "," + oSub.HMaterID.ToString() + ",'" + oSub.HMaterNumber + "'," + oSub.HUnitID.ToString() + ",'" + oSub.HUnitNumber + "'," + oSub.HQtyMust.ToString() +
                          "," + oSub.HQty.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HQtyScrap.ToString() + ",'" + oSub.HSendDate + "'," + oSub.HSPID.ToString() +
                          ") ");
                }
                sReturn = "修改单据成功!";
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                oCn.RollBack();
                throw (e);
            }
        }
    }
}
WebAPI/Models/ClsWW_PPBomBillMain.cs
New file
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace WebAPI.Models
{
    public class ClsWW_PPBomBillMain : DBUtility.ClsXt_BaseBillMain
    {
        public int HDeptID;// int      --部门
        public int HICMOInterI;// D    int
        public int HSeOrderInterID;// int
        public int HSeOrderEntryID;// int
        public string HSeOrderBillNo;//  varchar(50)
        public int HMaterID;// int
        public int HUnitID;//     int
        public int HQty;//        dec(18,8)
        public string HType;// varchar(10) ç±»åž‹(可能是 å§”外和生产)
    }
}
WebAPI/Models/ClsWW_PPBomBillSub.cs
New file
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace WebAPI.Models
{
    public class ClsWW_PPBomBillSub : DBUtility.ClsXt_BaseBillSub
    {
        public int HMaterID;// int        //物料ID
        public string HMaterNumber;//
        public int HUnitID;// int         //单位ID
        public string HUnitNumber;//
        public float HQtyMust;//
        public float HQty;//    dec(18,8)   --数量
        public int HWHID;//   int        --仓库
        public float HQtyScrap;//   dec(18,8)   --损耗率
        public DateTime HSendDate;//   datetime    --发料日期
        public int HSPID;//       int        --仓位
        public int HBomInterID;// int        --BOM
        public int HICMOInterID;//     int ä»»åŠ¡å•ID
        public string HICMOBillNo;// varchar(100)  ä»»åŠ¡å•å·
        public string HSeOrderBillNo;//  varchar(50)   //(销售订单号)
        public int HSeOrderInterID;// int   //(销售订单主内码)
        public int HSeOrderEntryID;//   int  //(销售订单子内码)
        public int HChangeTimes;//    int     //变更次数
    }
}
WebAPI/WebAPI.csproj
@@ -279,6 +279,7 @@
    <Compile Include="App_Start\SwaggerConfig.cs" />
    <Compile Include="App_Start\WebApiConfig.cs" />
    <Compile Include="Controllers\BaseSet\Gy_BarCodeBillController.cs" />
    <Compile Include="Controllers\BaseSet\Gy_RoutingGroupController.cs" />
    <Compile Include="Controllers\BaseSet\Pay_PeriodInfoSetController.cs" />
    <Compile Include="Controllers\BaseSet\Gy_OrderBackInfoController.cs" />
    <Compile Include="Controllers\BaseSet\Gy_OrderLevController.cs" />
@@ -351,6 +352,12 @@
    <Compile Include="Controllers\SCGL\Sc_ProductionReturnBillController.cs" />
    <Compile Include="Controllers\SCGL\Sc_PackUnionBillController.cs" />
    <Compile Include="Controllers\Sc_ProcessMangementController.cs" />
    <Compile Include="Controllers\仓存管理\扫码异常记录\KF_PonderationBillController.cs" />
    <Compile Include="Controllers\仓存管理\条码出入库记录\Kf_ICStockInOutBillController.cs" />
    <Compile Include="Controllers\仓存管理\条码库存\KF_ICInventoryList_WMSBillController.cs" />
    <Compile Include="Controllers\仓存管理\调拨盘点\Kf_MoveStockRequestBillController.cs" />
    <Compile Include="Controllers\仓存管理\领料发货\apiController.cs" />
    <Compile Include="Controllers\仓存管理\领料发货\Kf_StepFoldOutBillController.cs" />
    <Compile Include="Controllers\仓存管理\验收入库\Kf_StepFoldinBillController.cs" />
    <Compile Include="Controllers\博日自动扫码线\ScanlineAPIController.cs" />
    <Compile Include="Controllers\基础资料\基础资料\Gy_StockCheckItemBillController.cs" />
@@ -718,8 +725,14 @@
    <Folder Include="App_Data\" />
    <Folder Include="Views\Cg_PurchaseReturn\" />
    <Folder Include="Views\Gy_EquipType\" />
    <Folder Include="Views\Gy_RoutingGroup\" />
    <Folder Include="Views\KF_ICInventoryList_WMSBill\" />
    <Folder Include="Views\Kf_ICStockBillMain\" />
    <Folder Include="Views\Kf_ICStockInOutBill\" />
    <Folder Include="Views\Kf_MoveStockRequestBill\" />
    <Folder Include="Views\KF_PonderationBill\" />
    <Folder Include="Views\kf_StepFoldinBill\" />
    <Folder Include="Views\Kf_StepFoldOutBill\" />
    <Folder Include="Views\MoveStockBill\" />
    <Folder Include="Views\ProductionReturnBill\" />
    <Folder Include="Views\QC_Management\" />
WebAPI/WebAPI.csproj.user
@@ -19,8 +19,8 @@
    <IISExpressUseClassicPipelineMode />
    <UseGlobalApplicationHostFile />
    <ProjectView>ProjectFiles</ProjectView>
    <Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
    <Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath>
    <Controller_SelectedScaffolderID>ApiControllerEmptyScaffolder</Controller_SelectedScaffolderID>
    <Controller_SelectedScaffolderCategoryPath>root/Common/Web API</Controller_SelectedScaffolderCategoryPath>
  </PropertyGroup>
  <ProjectExtensions>
    <VisualStudio>