1
yxj
2023-04-13 e4647b3bc4aca9690261df83f9055abdf8c17406
1
17个文件已修改
659 ■■■■ 已修改文件
DAL/车间管理/ClsSc_ProcessExchangeBill.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/车间管理/ClsSc_ProcessExchangeBillMain.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pub_Class/CustomerCls/ClsXt_SystemParameter.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/条码打印/Sc_ICMOToBarCode.cs 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/BaseSet/Gy_CustomerController.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CJGL/Cj_StationInBillController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CJGL/Sc_ProcExchRecordBackBillController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CJGL/Sc_ProcExchWorkBackBillController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs 322 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/POStockInBackBillController.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/WebAPIController.cs 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/仓存管理/条码生成/Sc_BarCodeController.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/基础资料/基础资料/Gy_MaterTypeBillController.cs 95 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/生产管理/生产任务单/Sc_ICMOBillController.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Web.config 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/³µ¼ä¹ÜÀí/ClsSc_ProcessExchangeBill.cs
@@ -87,6 +87,8 @@
                ",HExplanation='" + omodel.HExplanation + "'" +
                ",HInnerBillNo='" + omodel.HInnerBillNo + "'" +
                ",HSupID=" + omodel.HSupID.ToString() +
                ",HEmpID=" + omodel.HEmpID.ToString() +
                ",HCusID=" + omodel.HCusID.ToString() +
                ",HMainMaterID=" + omodel.HMainMaterID.ToString() +
                ",HKeyMaterID=" + omodel.HKeyMaterID.ToString() +
                ",HWorkShopID=" + omodel.HWorkShopID.ToString() +
@@ -96,6 +98,8 @@
                ",HBLFlag='" + (omodel.HBLFlag ? 1 : 0) + "'" +
                ",HXTNumber='" + omodel.HXTNumber  + "'" +
                ",HXTModel='" + omodel.HXTModel + "'" +
                ",HRemark2='" + omodel.HRemark2 + "'" +
                ",HRemark3='" + omodel.HRemark3 + "'" +
                ",HCusNumber='" + omodel.HCusNumber + "'" +
                ",HMaterModel='" + omodel.HMaterModel + "'" +
                ",HWidth='" + omodel.HWidth + "'" +
@@ -314,7 +318,8 @@
                ",HMaterIDA,HMaterIDB,HMaterIDC,HMaterIDD,HICMOEntryID" +       
",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HVerNum,HPRDORGID,HBLFlag,HCusNumber,HPickLabel,HPickLabelNumber,HXTNumber,HXTModel,HWorkBillSortNo" +
               ", HRoutingBillID,HMaterModel,HWidth,HWeight,HAuxQty,HAuxUnit,HSplitNo" +
               ",HHeight,HInches,HAl1Long,HDensity,HTela,HUnderTela,HSizing,HSellDate) " +
               ",HHeight,HInches,HAl1Long,HDensity,HTela,HUnderTela,HSizing,HSellDate" +
               ",HRemark2,HRemark3,HEmpID,HCusID) " +
                " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()," + "" + (omodel.HPrevMainSourceInterID == 0 ? omodel.HInterID : omodel.HPrevMainSourceInterID) +
                "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HBatchNo + "'," + omodel.HMainMaterID.ToString() + "," + omodel.HKeyMaterID.ToString() + "," + omodel.HNo.ToString() + ",'" + omodel.HOrderProcNO + "'" +
                "," + omodel.HWWOrderInterID.ToString() + "," + omodel.HWWOrderEntryID.ToString() + ",'" + omodel.HWWOrderBillNo + "'," + omodel.HICMOInterID.ToString() + "," + omodel.HEquipMentID.ToString() +
@@ -327,7 +332,8 @@
                ",'" + omodel.HMaterIDA + "','" + omodel.HMaterIDB + "','" + omodel.HMaterIDC + "','" + omodel.HMaterIDD + "'," + omodel.HICMOEntryID +
                ",'" + omodel.HPicNumVer + "','" + omodel.HPicNumAssemble + "','" + omodel.HMaterTexture + "','" + omodel.HProductNum + "','" + omodel.HVerNum + "','"+ omodel.HPRDORGID+ "','" + (omodel.HBLFlag ? 1 : 0) + "','" + omodel.HCusNumber + "','" + omodel.HPickLabel + "','" + omodel.HPickLabelNumber + "','" + omodel.HXTNumber + "','" + omodel.HXTModel + "','" + omodel.HWorkBillSortNo + 
                "',"+ omodel.HRoutingBillID + ",'"+ omodel.HMaterModel + "',"+ omodel.HWidth + ","+ omodel.HWeight + ","+ omodel.HAuxQty + ","+ omodel.HAuxUnit +","+ omodel.HSplitNo +"" +
                ",'" + omodel.HHeight + "','" + omodel.HInches + "','" + omodel.HAl1Long + "','" + omodel.HDensity + "','" + omodel.HTela + "','" + omodel.HUnderTela + "','" + omodel.HSizing + "','" + omodel.HSellDate + "')");
                ",'" + omodel.HHeight + "','" + omodel.HInches + "','" + omodel.HAl1Long + "','" + omodel.HDensity + "','" + omodel.HTela + "','" + omodel.HUnderTela + "','" + omodel.HSizing + "','" + omodel.HSellDate + "'" +
                ",'"+ omodel.HRemark2 + "','"+ omodel.HRemark3 + "',"+ omodel.HEmpID + "," + omodel.HCusID + ")");
                sErr = sErr + "1;";
                //插入子表
                foreach (Model.ClsSc_ProcessExchangeBillSub oSub in DetailColl)
@@ -543,6 +549,18 @@
                omodel.HAuxQty = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HAuxQty"]);
                omodel.HAuxUnit = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HAuxUnit"]);
                omodel.HSplitNo = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HSplitNo"]);
                omodel.HRemark2 = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark2"]);
                omodel.HRemark3 = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark3"]);
                omodel.HEmpID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HEmpID"].ToString());
                omodel.HHeight = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HHeight"]);
                omodel.HInches = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HInches"]);
                omodel.HAl1Long = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HAl1Long"]);
                omodel.HDensity = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HDensity"]);
                omodel.HTela = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HTela"]);
                omodel.HUnderTela = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HUnderTela"]);
                omodel.HSizing = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HSizing"]);
                omodel.HSellDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HSellDate"]);
                omodel.HCusID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCusID"].ToString());
                //
                //循环
                DataSet DsSub;
Model/³µ¼ä¹ÜÀí/ClsSc_ProcessExchangeBillMain.cs
@@ -40,6 +40,7 @@
        public Int64 HEquipMentID;//设备模具
        public string HProjectNum;//项目号
        public Int64 HEmpID;//Ö°Ô±
        public Int64 HCusID;//客户
        public string HProdMaterCode;
        public string HSeOrderBillNo;
        public string HCusShortName;
@@ -89,5 +90,8 @@
        public double HAuxQty;//辅数量
        public int HAuxUnit;//辅助单位
        public int HSplitNo;//拆分号
        public string HRemark2;//备注2
        public string HRemark3;//底部备注
    }
}
Pub_Class/CustomerCls/ClsXt_SystemParameter.cs
@@ -2857,6 +2857,13 @@
                    {
                        omodel.MES_StationInBill_DeleteRelationCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
                    }
                    //本道进站数量不能大于上道出站合格数量
                    if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "MES_StationInBill_PreQtyCtl")
                    {
                        omodel.MES_StationInBill_PreQtyCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
                    }
                    //===============工序出站汇报单
                    //自动新增
@@ -2899,6 +2906,11 @@
                    {
                        omodel.MES_StationOutBill_InStockType = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
                    }
                    //本道出站数量不允许小于下道进站数量
                    if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "MES_StationOutBill_NextQtyCtl")
                    {
                        omodel.MES_StationOutBill_NextQtyCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
                    }
                    //=====不良评审单
Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs
@@ -375,6 +375,8 @@
        public string MES_StationInBill_ShowUSERProcess;         //进站接收单只显示用户对应工序
        public string MES_StationInBill_SaveAutoAddnew;         //保存后变为新增状态
        public string MES_StationInBill_DeleteRelationCtl;              //进站接收单删除时是否进行关联控制
        public string MES_StationInBill_PreQtyCtl;              //本道进站数量不能大于上道出站合格数量
        //工序出站汇报单
        public string MES_StationOutBill_QtyCtl;                //出站数量不能大于本道进站汇总数
        public string MES_StationOutBill_QtyPreQtyCtl;                //出站数量(合格数量或总数量)汇总不能大于上道合格汇总数
@@ -390,6 +392,7 @@
        public string MES_StationOutBill_ShowUSERProcess;         //出站汇报单只显示用户对应工序
        public string MES_StationOutBill_SaveAutoAddnew;            //保存后变为新增状态
        public string MES_StationOutBill_DeleteRelationCtl;              //出站汇报单删除时是否进行关联控制
        public string MES_StationOutBill_NextQtyCtl;                //本道出站数量不允许小于下道进站数量
        //不良品评审单
        public string QC_NoPassProdCheckBill_QtyCtl;            //不良品数不能大于出站单报废数量
WarM/ÌõÂë´òÓ¡/Sc_ICMOToBarCode.cs
@@ -119,7 +119,7 @@
                //把当前单据ID å­˜åˆ°ä¸€ä¸ªæŒ‰é’®é‡Œé¢   åˆ·æ–°æ—¶æ¯æ¬¡å­˜ä¸€é
                if (DSet.Tables[0].Rows.Count > 0)
                {
                    txtHMaterID.Tag = DBUtility.ClsPub.isInt(grdMain.Rows[0].Cells["HInterID"].Value);
                    txtHMaterID.Tag = DBUtility.ClsPub.isLong(grdMain.Rows[0].Cells["HInterID"].Value);
                    txtHMiniQty.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["标准装箱"].Value);
                    //txtHMaterID.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["物料编码"].Value);
                    txtHMaterModel.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["规格型号"].Value);
@@ -143,7 +143,7 @@
            //    }
            //}
            //冻结
            //int FrCol = DBUtility.ClsPub.isInt(frmCondition.txtFrozenCol.Text);
            //int FrCol = DBUtility.ClsPub.isLong(frmCondition.txtFrozenCol.Text);
            //string s = frmCondition.cmbHComplete.Text;
            //DBUtility.Xt_BaseBillFun.DisplayGrid(grdMain, this.Name, s,FrCol);
            //画线
@@ -229,7 +229,7 @@
            string HUserName = "";
            HUserName = ClsPub.isStrNull(DBUtility.ClsPub.CurUserName);
            Int64 HUserID = 0;
            HUserID = ClsPub.isInt(DBUtility.ClsPub.CurUserID);
            HUserID = ClsPub.isLong(DBUtility.ClsPub.CurUserID);
            DataSet DSet;
@@ -781,7 +781,7 @@
                string HTMNumber = "";
                string HOrgNumber = "";
                DataSet Ds;
                int LSH = 0;                //流水号
                Int64 LSH = 0;                //流水号
                string LSH2 = "";           //流水号转换成字符
@@ -802,7 +802,7 @@
                //箱号
                string HXH = "";
                //箱号流水号
                int LSH3 = 0;                //流水号
                Int64 LSH3 = 0;                //流水号
                string LSH4 = "";           //流水号转换成字符
                //机台
                string HJT = "";
@@ -888,7 +888,7 @@
                    a = a + 1;
                }
                DataSet DsTM = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sPackStr + "'", "h_p_WMS_GetMaxNo");    //获取最大流水号                                                                                          //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'");
                Int64 TTM_LSH = ClsPub.isInt(DsTM.Tables[0].Rows[0][0]) + 1;
                Int64 TTM_LSH = ClsPub.isLong(DsTM.Tables[0].Rows[0][0]) + 1;
                sPackBarCode = sPackStr + TTM_LSH.ToString();
@@ -923,7 +923,7 @@
                //        HTMaterID = ClsPub.isLong(grdMain.Rows[0].Cells[Fun_GetCol("HMaterID")].Value);
                //        string sPackStr = "ZXM" + HYear + HPeriod + HDay + HTMaterID; //外箱码 å‰ç¼€
                //        DataSet DsTM = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sPackStr + "'", "h_p_WMS_GetMaxNo");    //获取最大流水号                                                                                          //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'");
                //        Int64 TTM_LSH = ClsPub.isInt(DsTM.Tables[0].Rows[0][0]) + 1;
                //        Int64 TTM_LSH = ClsPub.isLong(DsTM.Tables[0].Rows[0][0]) + 1;
                //        sPackBarCode = sPackStr + TTM_LSH.ToString();
                //        oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sPackStr + "'");
                //    }
@@ -943,7 +943,7 @@
                //        HTMaterID = ClsPub.isLong(grdMain.Rows[0].Cells[Fun_GetCol("HMaterID")].Value);
                //        string sPackStr = "ZXM" + HYear + HPeriod + HDay + HTMaterID; //外箱码 å‰ç¼€
                //        DataSet DsTM = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sPackStr + "'", "h_p_WMS_GetMaxNo");    //获取最大流水号                                                                                          //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'");
                //        Int64 TTM_LSH = ClsPub.isInt(DsTM.Tables[0].Rows[0][0]) + 1;
                //        Int64 TTM_LSH = ClsPub.isLong(DsTM.Tables[0].Rows[0][0]) + 1;
                //        sPackBarCode = sPackStr + TTM_LSH.ToString() + "+" ;
                //        oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sPackStr + "'");
                //    }
@@ -964,7 +964,7 @@
                //HTMaterID = ClsPub.isLong(grdMain.Rows[0].Cells[Fun_GetCol("HMaterID")].Value);
                //string sPackStr = "ZXM" + HYear + HPeriod + HDay + HTMaterID; //外箱码 å‰ç¼€
                //DataSet  DsTM = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sPackStr + "'", "h_p_WMS_GetMaxNo");    //获取最大流水号                                                                                          //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'");
                //Int64 TTM_LSH = ClsPub.isInt(DsTM.Tables[0].Rows[0][0]) + 1;
                //Int64 TTM_LSH = ClsPub.isLong(DsTM.Tables[0].Rows[0][0]) + 1;
                //string sPackBarCode = sPackStr + TTM_LSH.ToString();
                //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sPackStr + "'");
@@ -995,19 +995,19 @@
                        HJT = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[Fun_GetCol("设备")].Value);
                        HXH = HYear + HPeriod + HDay + HBC + HJT + HMaterNumber;
                        Ds99 = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + HXH + "'", "h_p_WMS_GetMaxNo");    //获取最大流水号
                        LSH3 = ClsPub.isInt(Ds99.Tables[0].Rows[0][0]) + 1;
                        LSH3 = ClsPub.isLong(Ds99.Tables[0].Rows[0][0]) + 1;
                        LSH4 = LSH3.ToString();
                        //HBQty = HBQty + ClsPub.isInt(txtHBQty.Text);
                        //HBQty = HBQty + ClsPub.isLong(txtHBQty.Text);
                        HZXQty = DBUtility.ClsPub.isDoule(grdMain.Rows[j].Cells[Fun_GetCol("本次数量")].Value);
                        HDDQty = DBUtility.ClsPub.isDoule(grdMain.Rows[j].Cells[Fun_GetCol("生产订单数量")].Value);
                        HICMOBillNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[Fun_GetCol("生产订单号")].Value);
                        HTMNumber = HOrgNumber + HMaterNumber + HYear + HPeriod + HDay;
                        Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + HTMNumber + "'", "h_p_WMS_GetMaxNo");    //获取最大流水号
                        LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]);
                        LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]);
                        n = 0;
                        LSH2 = LSH.ToString();
                        while (LSH2.Length < LSHlen)  //如果流水号小于6位数前面补0
@@ -1086,7 +1086,7 @@
                        HWorkLineName = "";
                        HSeOrderBillNo = "";
                        HInnerBillNo = sPackBarCode;
                        HSourceID = ClsPub.isInt(txtHSourceID.Tag);
                        HSourceID = ClsPub.isLong(txtHSourceID.Tag);
                        oCn.RunProc("insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HMaterialMQty" +
                                            ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" +
                                            ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty " +
@@ -1327,7 +1327,7 @@
            string HTMNumber = "";
            string HOrgNumber = "";
            DataSet Ds;
            int LSH = 0;                //流水号
            Int64 LSH = 0;                //流水号
            string LSH2 = "";           //流水号转换成字符
            double HZXQty = 0;         //装箱数量
            double HDDQty = 0;         //订单数量
@@ -1350,7 +1350,7 @@
                HOrgNumber = ClsPub.HOrgNumber;
                //HBQty = HBQty + ClsPub.isInt(txtHBQty.Text);
                //HBQty = HBQty + ClsPub.isLong(txtHBQty.Text);
                HZXQty = ClsPub.isDoule(txtHZXQty.Text);
                HDDQty = DBUtility.ClsPub.isDoule(grdMain.Rows[j].Cells[Fun_GetCol("订单数量")].Value);
@@ -1359,7 +1359,7 @@
                {
                    HTMNumber = HOrgNumber + HMaterNumber + HYear + HPeriod + HDay;
                    Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + HTMNumber + "'", "h_p_WMS_GetMaxNo");    //获取最大流水号
                    LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]);
                    LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]);
                }
                else if (cmbHBarCodeType.Text == "批次条码")
                {
@@ -1490,7 +1490,7 @@
            string HTMNumber = "";
            string HOrgNumber = "";
            DataSet Ds;
            int LSH = 0;                //流水号
            Int64 LSH = 0;                //流水号
            string LSH2 = "";           //流水号转换成字符
            double HZXQty = 0;         //装箱数量
            double HDDQty = 0;         //订单数量
@@ -1513,7 +1513,7 @@
                HOrgNumber = ClsPub.HOrgNumber;
                //HBQty = HBQty + ClsPub.isInt(txtHBQty.Text);
                //HBQty = HBQty + ClsPub.isLong(txtHBQty.Text);
                HZXQty = ClsPub.isDoule(txtHZXQty.Text);
                HDDQty = DBUtility.ClsPub.isDoule(grdMain.Rows[j].Cells[Fun_GetCol("订单数量")].Value);
                HICMOBillNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[Fun_GetCol("生产订单号")].Value);
@@ -1522,7 +1522,7 @@
                {
                    HTMNumber = HOrgNumber + HMaterNumber + HYear + HPeriod + HDay;
                    Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + HTMNumber + "'", "h_p_WMS_GetMaxNo");    //获取最大流水号
                    LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]);
                    LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]);
                }
                else if (cmbHBarCodeType.Text == "批次条码")
                {
@@ -1552,7 +1552,7 @@
                        HDay = HDay.Substring(HDay.Length - 2, 2);
                        HTMNumber = HOrgNumber + HMaterNumber + HYear + HPeriod + HDay;
                        Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + HTMNumber + "'", "h_p_WMS_GetMaxNo");    //获取最大流水号
                        LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]);
                        LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]);
                        TM = HTMNumber + LSH2;
                    }
                    else
@@ -1565,7 +1565,7 @@
                        HDay = HDay.Substring(HDay.Length - 2, 2);
                        HTMNumber = HOrgNumber + HMaterNumber + HYear + HPeriod + HDay;
                        Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + HTMNumber + "'", "h_p_WMS_GetMaxNo");    //获取最大流水号
                        LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]);
                        LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]);
                        TM = HTMNumber + LSH2 + "+"; 
                    }
                    //HYear = ClsPub.isDate(HDate).Year.ToString().Substring(2, 2);
@@ -1575,7 +1575,7 @@
                    //HDay = HDay.Substring(HDay.Length - 2, 2);
                    //HTMNumber = HOrgNumber + HMaterNumber + HYear + HPeriod + HDay;
                    //Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + HTMNumber + "'", "h_p_WMS_GetMaxNo");    //获取最大流水号
                    //LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]);
                    //LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]);
                }
                //if (cmbHBarCodeType.Text == "唯一条码")
                //{
@@ -1701,7 +1701,7 @@
        private void DisplayTM()
        {
            //HInterID = DBUtility.ClsPub.isInt(txtHMaterID.Tag);
            //HInterID = DBUtility.ClsPub.isLong(txtHMaterID.Tag);
            DataSet DSet = oCn.RunProcReturn("select * from h_v_IF_BarCodeBillList_test Where HinterID=" + HInterID.ToString() + " and æ¡ç ç±»åž‹ = '托盘条码' order by HItemID", "h_v_IF_BarCodeBillList_test", ref DBUtility.ClsPub.sExeReturnInfo);
            //生成首行标题
            if (DSet == null)
@@ -1861,7 +1861,7 @@
            //
            grdSub.DataSource = DSet.Tables[0].DefaultView;
            //冻结
            //int FrCol = DBUtility.ClsPub.isInt(frmCondition.txtFrozenCol.Text);
            //int FrCol = DBUtility.ClsPub.isLong(frmCondition.txtFrozenCol.Text);
            //string s = frmCondition.cmbHComplete.Text;
            //DBUtility.Xt_BaseBillFun.DisplayGrid(grdSub, this.Name, s, FrCol);
            //画线
@@ -2109,13 +2109,13 @@
        {
            //获取网格第一行HInterID的值
            Int64 HInterID = 0;
            HInterID = DBUtility.ClsPub.isInt(txtHMaterID.Tag);
            HInterID = DBUtility.ClsPub.isLong(txtHMaterID.Tag);
            DataSet DSBefore;
            DSBefore =  SubCn.RunProcReturn("exec h_p_PreviousMater "+ HInterID, "h_p_PreviousMater", ref DBUtility.ClsPub.sExeReturnInfo);
            grdMain.DataSource = DSBefore.Tables[0].DefaultView;
            //if (DSBefore.Tables[0].Rows.Count > 0)
            //{
            //    txtHMaterID.Tag = DBUtility.ClsPub.isInt(grdMain.Rows[0].Cells["HInterID"].Value);
            //    txtHMaterID.Tag = DBUtility.ClsPub.isLong(grdMain.Rows[0].Cells["HInterID"].Value);
            //}
            //else
            //{
@@ -2130,7 +2130,7 @@
            else
            {
                grdMain.DataSource = DSBefore.Tables[0].DefaultView;
                txtHMaterID.Tag = DBUtility.ClsPub.isInt(grdMain.Rows[0].Cells["HInterID"].Value);
                txtHMaterID.Tag = DBUtility.ClsPub.isLong(grdMain.Rows[0].Cells["HInterID"].Value);
                txtHMiniQty.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["标准装箱"].Value);
                txtHMaterModel.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["规格型号"].Value);
                txtHMaterName.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["物料名称"].Value);
@@ -2144,8 +2144,8 @@
        {
            //根据
            Int64 HInterID = 0;
            //HInterID = DBUtility.ClsPub.isInt(grdMain.Rows[0].Cells[Fun_GetCol("HInterID")].Value);
            HInterID = DBUtility.ClsPub.isInt(txtHMaterID.Tag);
            //HInterID = DBUtility.ClsPub.isLong(grdMain.Rows[0].Cells[Fun_GetCol("HInterID")].Value);
            HInterID = DBUtility.ClsPub.isLong(txtHMaterID.Tag);
            DataSet DSBefore;
            DSBefore = SubCn.RunProcReturn("exec h_p_NextMater " + HInterID, "h_p_NextMater", ref DBUtility.ClsPub.sExeReturnInfo);
            if (DSBefore == null || DSBefore.Tables[0].Rows.Count == 0)
@@ -2157,7 +2157,7 @@
            else
            {
                grdMain.DataSource = DSBefore.Tables[0].DefaultView;
                txtHMaterID.Tag = DBUtility.ClsPub.isInt(grdMain.Rows[0].Cells["HInterID"].Value);
                txtHMaterID.Tag = DBUtility.ClsPub.isLong(grdMain.Rows[0].Cells["HInterID"].Value);
                txtHMiniQty.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["标准装箱"].Value);
                txtHMaterModel.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["规格型号"].Value);
                txtHMaterName.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["物料名称"].Value);
WebAPI/Controllers/BaseSet/Gy_CustomerController.cs
@@ -300,7 +300,7 @@
                    ",HEmpID,HCreditDate,HCreditRatingDate,HMaxCreditRatingDate" +
                    ",HMonthUseQty,HForecastCreditRating,HCreditLevelID,HCountAccrualRating" +
                    ",HSubsidyAccrualRating,HCreditRating,HMaxCreditRating" +
                    ",HCusTypeID) " +
                    ",HCusTypeID,HCREATEORGID,HUSEORGID) " +
                    " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + HParentID +
                    ", " + HLevel + ",0,'" + HStopflag + "','" + HRemark + "'" +
                    ",'" + HShortName + "','" + HAddress + "','" + HLinkMan + "','" + HLinkPhone + "','" + HMobilePhone + "'" +
@@ -310,7 +310,7 @@
                    "," + HEmpID + "," + HCreditDate + "," + HCreditRatingDate + "," + HMaxCredRatingDate +
                    "," + HMonthUseQty + "," + HForecastCreditRating + "," + HCreditLevelID + "," + HCountAccrualRating +
                    "," + HSubsidyAccrualRating + "," + HCreditRating + "," + HMaxCreditRating +
                    ", " + HCusTypeID + ")");
                    ", " + HCusTypeID + ","+ HCreateOrgID + ","+ HUseOrgID + ")");
                //修改上级为非末级代码
                oCN.RunProc("Update Gy_Customer set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
                oCN.Commit();
WebAPI/Controllers/CJGL/Cj_StationInBillController.cs
@@ -396,7 +396,7 @@
                }
                //得到信息(委外标记为0时,流转标记为1时)
                ds = oCN.RunProcReturn("select top 2 * from h_v_Sc_ProcessExchangeBillList  where å•据号= '" + sBillNo + "' and ä¸‹é“流转工序<>'转' and å§”外标记=0 and æµè½¬æ ‡è®°=1  and å·¥åºå·<='" + sProcNo + "' order by cast(工序号 as int) desc", "h_v_Sc_ProcessExchangeBillList");
                ds = oCN.RunProcReturn("select top 2 * from h_v_Sc_ProcessExchangeBillList  where å•据号= '" + sBillNo + "' and ä¸‹é“流转工序<>'转' and å§”外标记=0 and æµè½¬æ ‡è®°=1  and cast(工序号 as int)<='" + sProcNo + "' order by cast(工序号 as int) desc", "h_v_Sc_ProcessExchangeBillList");
                //Ds = oCn.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillList  where å•据号= '" + sBillNo + "' and å·¥åºå·='" + sProcNo + "' and å§”外标记=0 and æµè½¬æ ‡è®°=1 ", "h_v_Sc_ProcessExchangeBillList");
                //写入信息
                if (ds == null || ds.Tables[0].Rows.Count == 0)
WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
@@ -176,14 +176,14 @@
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (HEmpID == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "操作员没有选择!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //if (HEmpID == 0)
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = "操作员没有选择!";
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                //if (HQCCheckID == 0)
                //{
                //    objJsonResult.code = "0";
@@ -192,14 +192,14 @@
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                //if (HSourceID == 0)
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = "生产资源没有选择!";
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                if (HSourceID == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "生产资源没有选择!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //if (HCenterID == 0)
                //{
                //    objJsonResult.code = "0";
WebAPI/Controllers/CJGL/Sc_ProcExchRecordBackBillController.cs
@@ -77,7 +77,7 @@
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                string sql = string.Format(@"select top 2 * from h_v_Sc_ProcessExchangeBillQuerySub");
                ds = oCN.RunProcReturn(sql + sWhere+ " order by æµæ°´å· ", "h_v_Sc_ProcessExchangeBillQuerySub");
                ds = oCN.RunProcReturn(sql + sWhere+ " order by cast(流水号 as int) ", "h_v_Sc_ProcessExchangeBillQuerySub");
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "获取信息成功!";
WebAPI/Controllers/CJGL/Sc_ProcExchWorkBackBillController.cs
@@ -77,7 +77,7 @@
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                string sql = string.Format(@"select top 2 * from h_v_Sc_ProcessExchangeBillQuerySub");
                ds = oCN.RunProcReturn(sql + sWhere + " order by æµæ°´å· ", "h_v_Sc_ProcessExchangeBillQuerySub");
                ds = oCN.RunProcReturn(sql + sWhere + " order by cast(流水号 as int) ", "h_v_Sc_ProcessExchangeBillQuerySub");
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "获取信息成功!";
WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
@@ -238,12 +238,34 @@
                    {
                        if (oSystemParameter.omodel.Gy_RoutingBill_SaveAutoLastProc == "Y" && OperationType == 1)
                        {
                            ds = oCN.RunProcReturn("select * from Gy_Process Where HTProcessFlag = 1 and HNumber='9999' ", "Gy_Process");
                            if (ds.Tables[0].Rows.Count == 0)
                            {
                                objJsonResult.code = "0";
                                objJsonResult.count = 0;
                                objJsonResult.Message = "未设置转工序!";
                                objJsonResult.data = null;
                                return objJsonResult;
                            }
                            //设置转工序
                            oCN.RunProc("exec Gy_RoutingBill_LastProNo " + HInterID);
                        }
                    }
                    else if (IsProNo == 1 && OperationType == 1)
                    {
                        ds = oCN.RunProcReturn("select * from Gy_Process Where HTProcessFlag = 1 and HNumber='9999' ", "Gy_Process");
                        if (ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "未设置转工序!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //设置转工序
                        oCN.RunProc("exec Gy_RoutingBill_LastProNo " + HInterID);
                    }
@@ -886,5 +908,305 @@
            }
        }
        #endregion
        #region  å·¥è‰ºè·¯çº¿ å®¡æ ¸ã€åå®¡æ ¸
        /// <summary>
        ///
        /// </summary>
        /// <param name="HInterID">单据ID</param>
        /// <param name="IsAudit">审核(0),反审核(1)</param>
        /// <param name="CurUserName">审核人</param>
        /// <returns></returns>
        [Route("Gy_RoutingBill/AuditGy_RoutingBill")]
        [HttpGet]
        public object AuditGy_RoutingBill(string HInterID, int IsAudit, string CurUserName)
        {
            try
            {
                //审核权限
                if (!DBUtility.ClsPub.Security_Log_second("Gy_RoutingBill_Check", 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "审核失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                var ds = oCN.RunProcReturn("select * from Gy_RoutingBillMain where HInterID=" + HInterID, "Gy_RoutingBillMain");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (IsAudit == 0)  //审核判断
                    {
                        if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已审核!不能再次审核!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (IsAudit == 1) //反审核判断
                    {
                        if (ds.Tables[0].Rows[0]["HChecker"].ToString() == "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据未审核!不需要反审核!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.BeginTran();
                if (IsAudit == 0)  //审核判断
                {
                    oCN.RunProc("update Gy_RoutingBillMain set HChecker='" + CurUserName + "',HCheckDate=getdate() where HInterID=" + HInterID);
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "审核成功";
                    objJsonResult.data = null;
                }
                if (IsAudit == 1) //反审核判断
                {
                    oCN.RunProc("update Gy_RoutingBillMain set HChecker='',HCheckDate=null where HInterID=" + HInterID);
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "反审核成功";
                    objJsonResult.data = null;
                }
                oCN.Commit();
                return objJsonResult;
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "审核失败或者反审核失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region  å·¥è‰ºè·¯çº¿ å…³é—­ã€åå…³é—­
        /// <summary>
        ///
        /// </summary>
        /// <param name="HInterID">单据ID</param>
        /// <param name="IsAudit">审核(0),反审核(1)</param>
        /// <param name="CurUserName">审核人</param>
        /// <returns></returns>
        [Route("Gy_RoutingBill/CloseGy_RoutingBill")]
        [HttpGet]
        public object CloseGy_RoutingBill(string HInterID, int IsAudit, string CurUserName)
        {
            try
            {
                //审核权限
                if (!DBUtility.ClsPub.Security_Log_second("Gy_RoutingBill_Close", 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "审核失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                var ds = oCN.RunProcReturn("select * from Gy_RoutingBillMain where HInterID=" + HInterID, "Gy_RoutingBillMain");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (IsAudit == 0)  //关闭判断
                    {
                        if (ds.Tables[0].Rows[0]["HCloseMan"].ToString() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已关闭!不能再次关闭!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (IsAudit == 1) //反关闭判断
                    {
                        if (ds.Tables[0].Rows[0]["HCloseMan"].ToString() == "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据未关闭!不需要反关闭!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.BeginTran();
                if (IsAudit == 0)  //关闭判断
                {
                    oCN.RunProc("update Gy_RoutingBillMain set HCloseMan='" + CurUserName + "',HCloseDate=getdate() where HInterID=" + HInterID);
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "关闭成功";
                    objJsonResult.data = null;
                }
                if (IsAudit == 1) //反关闭判断
                {
                    oCN.RunProc("update Gy_RoutingBillMain set HCloseMan='',HCloseDate=null where HInterID=" + HInterID);
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "反关闭成功";
                    objJsonResult.data = null;
                }
                oCN.Commit();
                return objJsonResult;
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "关闭失败或者反关闭失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å·¥è‰ºè·¯çº¿åˆ—表 ä¸»è¡¨
        /// <summary>
        /// è¿”回工艺路线列表
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Gy_RoutingBill/Gy_RoutingBillQuery")]
        [HttpGet]
        public object Gy_RoutingBillQuery(string sWhere, string user)
        {
            DataSet ds;
            try
            {
                //判断是否有查询权限
                //if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Query", 1, false, user))
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = "无权限查询!";
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                string sql1 = "select  top 1000 * from h_v_Gy_RoutingBillQuery where 1 = 1 ";
                string sql = sql1 + sWhere + " order by hmainid desc";
                ds = oCN.RunProcReturn(sql, "h_v_Gy_RoutingBillQuery");
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
            return GetObjectJson(ds);
        }
        #endregion
        #region å·¥è‰ºè·¯çº¿åˆ—表 å­è¡¨
        /// <summary>
        /// è¿”回工艺路线列表
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Gy_RoutingBill/Gy_RoutingBillQuerySub")]
        [HttpGet]
        public object Gy_RoutingBillQuerySub(string sWhere)
        {
            DataSet ds;
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                string sql1 = "select  top 1000 * from h_v_Gy_RoutingBillQuerySub where 1 = 1 and hmainid=" + sWhere;
                string sql = sql1  + " order by hmainid desc,cast(工序号 as int)";
                ds = oCN.RunProcReturn(sql, "h_v_Gy_RoutingBillQuerySub");
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
            return GetObjectJson(ds);
        }
        #endregion
        ///<summary>
        ///封装状态码及返回信息的公用方法。
        ///参数:DataSet。
        ///返回值:json。
        ///</summary>
        public object GetObjectJson(DataSet ds)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //添加列名
                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列对象的列名
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.list = columnNameList;
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
    }
}
WebAPI/Controllers/POStockInBackBillController.cs
@@ -490,6 +490,7 @@
                websLsmain.HEmpID = lsmain[0].HEmpID;
                websLsmain.HRemark = lsmain[0].HRemark;
                websLsmain.HMaker = lsmain[0].HMaker;
                websLsmain.HBillType = "1239";
                if (webserver.set_SavePOStockInBackBill_New(websLsmain, sSourceBillType, ref DBUtility.ClsPub.sErrInfo))
                {
WebAPI/Controllers/WebAPIController.cs
@@ -1632,12 +1632,12 @@
            //sWhere = " Where HStopFlag=0  and HEndFlag=1  and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString();
            if (sWhere != "")
            {
                sWhere = " and ( HNumber like '%" + sWhere + "%' or HName like '%" + sWhere + "%' ) ";
                sWhere = " and ( p.HNumber like '%" + sWhere + "%' or p.HName like '%" + sWhere + "%' ) ";
            }
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                ds = oCN.RunProcReturn("Select HItemID,HNumber å·¥åºä»£ç ,HName å·¥åº from Gy_Process where HStopflag=0 " + sWhere + " Order by HItemID ", "Gy_Process");
                ds = oCN.RunProcReturn("Select p.HItemID,p.HNumber å·¥åºä»£ç ,p.HName å·¥åº,w.HItemID å·¥ä½œä¸­å¿ƒID,w.HNumber å·¥ä½œä¸­å¿ƒä»£ç ,w.HName å·¥ä½œä¸­å¿ƒ,d.HItemID éƒ¨é—¨ID,d.HNumber éƒ¨é—¨ä»£ç ,d.HName éƒ¨é—¨ from Gy_Process p left join Gy_WorkCenter w on p.HWorkCenterID = w.HItemID left join Gy_Department d on p.HDeptID = d.HItemID where p.HStopflag = 0 " + sWhere + " Order by HItemID ", "Gy_Process");
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
                    objjson.code = "0";
@@ -3984,6 +3984,67 @@
            }
        }
        /// <summary>
        /// äº§å“å…¥åº“缓存列表刷新信息
        /// </summary>
        /// <returns></returns>
        [Route("Web/chanpinruk1")]
        [HttpGet]
        public object chanpinruk1(string HBillType, string sHMaker, Int64 HOrgID)
        {
            WebS.WebService1 oWebs = new WebS.WebService1();
            try
            {
                ds = oWebs.GetKf_PonderationBillMain_TempList_New(HBillType, sHMaker, HOrgID);
                if (ds == null)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回任何记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                List<object> columnNameList = new List<object>();
                //添加列名
                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 == null || ds.Tables[0].Rows.Count <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回任何记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                    //DBUtility.ClsPub.MessageBeep((int)DBUtility.ClsPub.BeepType.Warning);
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "获取信息成功!";
                    objJsonResult.data = ds.Tables[0];
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #region PDA其他入库列表模块
        /// <summary>
WebAPI/Controllers/²Ö´æ¹ÜÀí/ÌõÂëÉú³É/Sc_BarCodeController.cs
@@ -415,6 +415,7 @@
                ordrlist.HPinfan = dt.Rows[i]["HPinfan"].ToString();
                ordrlist.HSourceName = dt.Rows[i]["生产线"].ToString();
                ordrlist.HEndDate = dt.Rows[i]["计划完工日期"].ToString();//博日 ç”Ÿäº§è®¢å• å¤±æ•ˆæ—¥æœŸ
                ordrlist.HMinQty = dt.Rows[i]["最小包装数"].ToString();
                if (HBarCodeType == "仪器外购件条码容器规则")
                {
                    ordrlist.HMinQty = dt.Rows[i]["未生成条码数量"].ToString();
@@ -457,9 +458,12 @@
                ordrlist.HRemark = dt.Rows[i]["备注"].ToString();
                ordrlist.HMTONo = dt.Rows[i]["计划跟踪号"].ToString();
                ordrlist.HFurnaceNO = dt.Rows[i]["炉号"].ToString();
                ordrlist.HCoilNO = dt.Rows[i]["钢卷捆包号"].ToString();
                ordrlist.HheatNO = dt.Rows[i]["热处理"].ToString();
                if(HSourceBillType == "收料通知单")
                {
                    ordrlist.HFurnaceNO = dt.Rows[i]["炉号"].ToString();
                    ordrlist.HCoilNO = dt.Rows[i]["钢卷捆包号"].ToString();
                    ordrlist.HheatNO = dt.Rows[i]["热处理"].ToString();
                }
                if (HBarCodeType == "仪器外购件条码容器规则")
                {
WebAPI/Controllers/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/Gy_MaterTypeBillController.cs
@@ -357,6 +357,101 @@
        }
        #endregion
        #region ç‰©æ–™åˆ†ç±»ç¦ç”¨ã€åç¦ç”¨
        /// <summary>
        ///
        /// </summary>
        /// <param name="HInterID">单据ID</param>
        /// <param name="IsAudit">禁用(0),反禁用(1)</param>
        /// <param name="CurUserName">审核人</param>
        /// <returns></returns>
        [Route("Gy_MaterType/StopGy_MaterType")]
        [HttpGet]
        public object StopGy_MaterType(int HInterID, int IsAudit, string CurUserName)
        {
            try
            {
                //审核权限
                if (!DBUtility.ClsPub.Security_Log_second("Gy_MaterType_Check", 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "审核失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                var ds = oCN.RunProcReturn("select * from Gy_MaterType where HItemID=" + HInterID, "Gy_MaterType");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (IsAudit == 0)  //禁用判断
                    {
                        if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已禁用!不能再次禁用!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (IsAudit == 1) //反禁用判断
                    {
                        if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() == "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据未禁用!不需要反禁用!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.BeginTran();
                if (IsAudit == 0)  //禁用判断
                {
                    oCN.RunProc("update Gy_MaterType set HStopEmp='" + CurUserName + "',HStopTime=getdate(),HStopflag=1 where HItemID=" + HInterID);
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "禁用成功";
                    objJsonResult.data = null;
                }
                if (IsAudit == 1) //反禁用判断
                {
                    oCN.RunProc("update Gy_MaterType set HStopEmp='',HStopTime=null,HStopflag=0 where HItemID=" + HInterID);
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "反禁用成功";
                    objJsonResult.data = null;
                }
                oCN.Commit();
                return objJsonResult;
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "禁用失败或者反禁用失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region ç‰©æ–™åˆ†ç±» æ ‘形图
        public class TreeModel
        {
WebAPI/Controllers/Éú²ú¹ÜÀí/Éú²úÈÎÎñµ¥/Sc_ICMOBillController.cs
@@ -508,26 +508,6 @@
        {
            ClsSc_ICMOBillSub oSub = Newtonsoft.Json.JsonConvert.DeserializeObject<ClsSc_ICMOBillSub>(msg3);
            //客户制定
            string sErr = "";
            if (oSystemParameter.ShowBill(ref sErr))
            {
                if (oSystemParameter.omodel.WMS_CampanyName == "乔一")
                {
                }
                else
                {
                    if (oSub.HDeptID == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "生产车间不能为空";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
            }
            if (oSub.HQty <= 0 || oSub.HQty == null)
            {
WebAPI/Web.config
@@ -20,7 +20,7 @@
    <appSettings>
        <!--服务器文件IP地址-->
        <!--<add key="FileIP" value="http://localhost:8082/LuBaoAPI"/>-->
        <add key="FileIP" value="http://localhost:8080/" />
        <!--<add key="FileIP" value="http://localhost:8080/" />-->
        <!--<add key="sUrl" value="http://183.129.128.86:9090/WEBS-WMSTest/WebService1.asmx"/>    -->
        <add key="sUrl" value="http://192.168.63.3/WEBS-WMS/WebService1.asmx"/>    <!--颜台式机-->
        <!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> å¤å®-->
@@ -33,6 +33,7 @@
        <!--<add key="sUrl" value="http://122.227.133.186:8090/WEBS/WebService1.asmx"/>    -->
        <!--<add key="sUrl" value="http://192.168.80.90:9090/WEBS-WMS/WebService1.asmx"/>     å®‰ç‘žæœåС噍-->
        <!--<add key="sUrl" value="http://47.96.97.237/WEBS-WMS/WebService1.asmx"/>    æµ‹è¯•服务器-->
        <add key="sUrl" value="http://localhost:8082/WEBS/WebService1.asmx"/>    <!--本地-->
        <add key="webpages:Version" value="3.0.0.0" />
        <add key="webpages:Enabled" value="false" />
        <add key="ClientValidationEnabled" value="true" />