zzr99
2022-06-07 cdc0ee4c7019f8466327e713153a1cd147a152c0
Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
9个文件已修改
129 ■■■■■ 已修改文件
BLL/公用模块/FrmLogin.cs 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/车间管理/ClsSc_ProcessExchangeBill.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/车间管理/ClsSc_ProcessExchangeBillMain.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pub_Class/CustomerCls/ClsXt_SystemParameter.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/条码打印/Gy_BarCodeBill.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/条码打印/Sc_ICMOToBarCode.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/Sc_ComplementGoodBillController.cs 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/WebAPIController.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BLL/¹«ÓÃÄ£¿é/FrmLogin.cs
@@ -22,7 +22,7 @@
        private void SetCmbAccount(string sServer)//cmb中设置帐套  //Lock
        {
            ClsCNmaster oCn = new ClsCNmaster();
            DataSet DS ;
            DataSet DS;
            try
            {
                DS = oCn.RunProcReturn("select * from HDSystem_DataBases where YNuse=1 ", "HDSystem_DataBases", ref ClsPub.sExeReturnInfo);
@@ -40,7 +40,7 @@
                {
                    cmbAccount.SelectedIndex = 0;
                    ClsIni oIni = new ClsIni();
                    string sNumber = ClsIni.ReadIni("Erp", "DataBaseNumber",DBUtility.ClsPub.AppPath + @"/HXErp.ini");
                    string sNumber = ClsIni.ReadIni("Erp", "DataBaseNumber", DBUtility.ClsPub.AppPath + @"/HXErp.ini");
                    for (int j = 0; j < cmbAccount.Items.Count; j++)
                    {
                        if (sNumber.Trim() == cmbAccount.Items[j].ToString().Trim())
@@ -56,7 +56,7 @@
        private bool CheckServer()//检查服务器名正确性  //Lock
        {
            ClsCN oCn=new ClsCN();
            ClsCN oCn = new ClsCN();
            if (oCn.CheckOpen())
            {
                lblStatus.Text = "服务器连接成功";
@@ -109,19 +109,19 @@
            string sDataBase_K3 = "";
            string sDataBase_K32 = "";
            string sDataBase_K33 = "";
            sDataBase = oCn.GetDataBase(cmbAccount.Text.Trim(),ref sDataBase_K3);
            sDataBase = oCn.GetDataBase(cmbAccount.Text.Trim(), ref sDataBase_K3);
            ClsIni oIni = new ClsIni();
            ClsIni.WriteIni("Erp", "DataBase", sDataBase.Trim(), DBUtility.ClsPub.AppPath + @"/HXERP.ini");
            ClsIni.WriteIni("K3Erp", "DataBase", sDataBase_K3.Trim(), DBUtility.ClsPub.AppPath + @"/HXERP.ini");
            DAL.ClsUser oUser = new DAL.ClsUser();
            ds = oUser.CheckCzymc(cmbUser.Text.Trim(),ClsPub.StrToPsd( txtPsd.Text.Trim()));
            if (ds ==null)
            ds = oUser.CheckCzymc(cmbUser.Text.Trim(), ClsPub.StrToPsd(txtPsd.Text.Trim()));
            if (ds == null)
            {
                MessageBox.Show("选择的帐套不存在!", "提示");
                return;
            }
            if (ds.Tables[0].Rows.Count >0)
            if (ds.Tables[0].Rows.Count > 0)
            {
                ClsPub.CurUserID = ds.Tables[0].Rows[0]["Czybm"].ToString();
                this.Close();
@@ -135,7 +135,7 @@
            //得到当前会计期间
            int sYear = 0;
            int sPeriod = 0;
            if (!ClsPub.Sub_GetCurPeriod(ref sYear,ref sPeriod))
            if (!ClsPub.Sub_GetCurPeriod(ref sYear, ref sPeriod))
            {
                MessageBox.Show("得到当前会计期间失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                isOk = false;
@@ -162,18 +162,18 @@
            }
            foreach (string eachStr in listStr)
            {
                UserName = UserName+eachStr + ",";
                UserName = UserName + eachStr + ",";
            }
            UserName = UserName.Remove(UserName.LastIndexOf(","), 1);
            //
            ClsIni.WriteIni("UserInfo", "UserName", UserName, DBUtility.ClsPub.AppPath + @"/HXERP.ini");
            ClsIni.WriteIni("UserInfo", "UserName", UserName, DBUtility.ClsPub.AppPath + @"/HXERP.ini");
            ClsIni.WriteIni("UserInfo", "HOrgName", cmbHOrg.Text.ToString(), DBUtility.ClsPub.AppPath + @"/HXERP.ini");
            ClsPub.CurUserName = cmbUser.Text.Trim();
            ClsPub.AppPath = System.Environment.CurrentDirectory;
            ClsPub.HOrgID = ClsPub.get_ORGANIZATIONSIDByName(ClsPub.isStrNull(cmbHOrg.Text));
            ClsPub.HOrgNumber = ClsPub.get_ORGANIZATIONSNOByName(ClsPub.isStrNull(cmbHOrg.Text));
            ClsPub.HOrgName = ClsPub.isStrNull(cmbHOrg.Text);
            if(chkRemember.Checked==true  )
            if (chkRemember.Checked == true)
            {
                ClsIni.WriteIni("UserInfo", "UserPsd", "", DBUtility.ClsPub.AppPath + @"/HXERP.ini");
                ClsIni.WriteIni("UserInfo", "Remember", "1", DBUtility.ClsPub.AppPath + @"/HXERP.ini");
@@ -183,7 +183,7 @@
                ClsIni.WriteIni("UserInfo", "UserPsd", "", DBUtility.ClsPub.AppPath + @"/HXERP.ini");
                ClsIni.WriteIni("UserInfo", "Remember", "0", DBUtility.ClsPub.AppPath + @"/HXERP.ini");
            }
        }
        private void txtUser_KeyUp(object sender, KeyEventArgs e)
@@ -194,8 +194,8 @@
        private void txtPsd_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyValue == 13)
            this.btnOK_Click(sender,e);
            if (e.KeyValue == 13)
                this.btnOK_Click(sender, e);
        }
        private void timer1_Tick(object sender, EventArgs e)
@@ -207,7 +207,7 @@
            }
            ClsIni oIni = new ClsIni();
            //
            UserName = ClsIni.ReadIni("UserInfo", "UserName",DBUtility.ClsPub.AppPath +  @"/HXERP.ini");
            UserName = ClsIni.ReadIni("UserInfo", "UserName", DBUtility.ClsPub.AppPath + @"/HXERP.ini");
            string[] strArr = UserName.Split(',');
            foreach (string str in strArr)
@@ -216,7 +216,7 @@
            }
            cmbUser.SelectedIndex = 0;
            //
            txtUser.Text = ClsIni.ReadIni("UserInfo", "UserName", DBUtility.ClsPub.AppPath +  @"/HXERP.ini");
            txtUser.Text = ClsIni.ReadIni("UserInfo", "UserName", DBUtility.ClsPub.AppPath + @"/HXERP.ini");
            if (ClsIni.ReadIni("UserInfo", "Remember", DBUtility.ClsPub.AppPath + @"/HXERP.ini") == "1")
            {
                txtPsd.Text = ClsIni.ReadIni("UserInfo", "UserPsd", DBUtility.ClsPub.AppPath + @"/HXERP.ini");
@@ -224,8 +224,8 @@
            }
            else
            {
                txtPsd.Text ="";
                chkRemember.Checked = false ;
                txtPsd.Text = "";
                chkRemember.Checked = false;
            }
        }
@@ -319,8 +319,8 @@
        public DataSet get_ORGANIZATIONSList()
        {
            try
            {
                return  ClsPub.get_ORGANIZATIONSList();
            {
                return ClsPub.get_ORGANIZATIONSList();
            }
            catch (Exception e)
            {
@@ -335,7 +335,7 @@
        private void label4_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("确定要手动更新程序吗?本程序将自动关闭!","提示",MessageBoxButtons.OKCancel)==DialogResult.OK)
            if (MessageBox.Show("确定要手动更新程序吗?本程序将自动关闭!", "提示", MessageBoxButtons.OKCancel) == DialogResult.OK)
            {
                string strFileName = ClsPub.AppPath + @"/HX_Update.exe";
                System.Diagnostics.Process.Start(strFileName);
@@ -347,6 +347,11 @@
        {
            //textBox1.Focus();
            string HPassWord = textBox1.Text.Trim().ToString();
            if (HPassWord == null || HPassWord == "")
            {
                MessageBox.Show("请刷卡");
                return;
            }
            //MessageBox.Show(HPassWord);
            SQLHelper.ClsCN oCn1 = new SQLHelper.ClsCN();
            //1.查找数据库操作员管理表里面是否有对应这个加密字符串对应的记录
DAL/³µ¼ä¹ÜÀí/ClsSc_ProcessExchangeBill.cs
@@ -117,6 +117,7 @@
                ",HMaterTexture='" + omodel.HMaterTexture + "'" +
                ",HProductNum='" + omodel.HProductNum + "'" +
                ",HVerNum='" + omodel.HVerNum + "'" +
                ",WorkBillSortNo='" + omodel.WorkBillSortNo + "'" +
                //加入生产类型
                ",HWorkTypeNum='" + omodel.HWorkTypeNum + "'" +
                " where HInterID=" + lngBillKey.ToString());
@@ -291,7 +292,7 @@
                ",HProdMaterName,HCusName,HWorkRemark,HImportNote,HMaterNumber_A" +
                ",HMaterNumber_B,HMaterNumber_C,HMaterNumber_D,HProdType,HMaterShortName" +
                ",HMaterIDA,HMaterIDB,HMaterIDC,HMaterIDD,HICMOEntryID" +
                ",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HVerNum,HPRDORGID,HBLFlag" +
                ",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HVerNum,HPRDORGID,HBLFlag,WorkBillSortNo" +
                ") " +
                " 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 + "'" +
@@ -303,8 +304,8 @@
                ",'" + omodel.HProdMaterName + "','" + omodel.HCusName + "','" + omodel.HWorkRemark + "','" + omodel.HImportNote + "','" + omodel.HMaterNumber_A + "'" +
                ",'" + omodel.HMaterNumber_B + "','" + omodel.HMaterNumber_C + "','" + omodel.HMaterNumber_D + "','" + omodel.HProdType + "','" + omodel.HMaterShortName + "'" +
                ",'" + omodel.HMaterIDA + "','" + omodel.HMaterIDB + "','" + omodel.HMaterIDC + "','" + omodel.HMaterIDD + "'," + omodel.HICMOEntryID +
                ",'" + omodel.HPicNumVer + "','" + omodel.HPicNumAssemble + "','" + omodel.HMaterTexture + "','" + omodel.HProductNum + "','" + omodel.HVerNum + "','"+ omodel.HPRDORGID+ "','"+omodel.HBLFlag+"'" +
                ") ");
                ",'" + omodel.HPicNumVer + "','" + omodel.HPicNumAssemble + "','" + omodel.HMaterTexture + "','" + omodel.HProductNum + "','" + omodel.HVerNum + "','"+ omodel.HPRDORGID+ "','"+omodel.HBLFlag+"','" + omodel.WorkBillSortNo +
                "') ");
                //插入子表
                foreach (Model.ClsSc_ProcessExchangeBillSub oSub in DetailColl)
                {
Model/³µ¼ä¹ÜÀí/ClsSc_ProcessExchangeBillMain.cs
@@ -66,5 +66,6 @@
        public string HVerNum;//版本
        public string HSeOrderEntryID;
        public string HSeOrderInterID;
        public string WorkBillSortNo;
    }
}
Pub_Class/CustomerCls/ClsXt_SystemParameter.cs
@@ -406,6 +406,10 @@
                    {
                        omodel.Kf_OtherInBill_BillTypeOneScan = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
                    }
                    if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_OtherInBillCheck_MustQtyCtl")
                    {
                        omodel.Kf_OtherInBillCheck_MustQtyCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
                    }
                    //其他出库单
                    if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_OtherOutBill_AutoCheck")
                    {
@@ -423,6 +427,10 @@
                    {
                        omodel.Kf_OtherOutBill_BillTypeOneScan = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
                    }
                    if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_OtherOutBillCheck_MustQtyCtl")
                    {
                        omodel.Kf_OtherOutBillCheck_MustQtyCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
                    }
                    //调拨单
                    if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_MoveStockBill_AutoCheck")
                    {
Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs
@@ -98,12 +98,14 @@
        public string Kf_OtherInBill_MustQtyCtl;
        public string Kf_OtherInBill_BarCodeMustSameSourceBill;   // æ¡ç å¿…须同源单一致
        public string Kf_OtherInBill_BillTypeOneScan;//本单据类型内只允许一次扫码(唯一码,含缓存列表)
        public string Kf_OtherInBillCheck_MustQtyCtl;   //校验数量控制
        //其他出库
        public string Kf_OtherOutBill_AutoCheck;
        public string Kf_OtherOutBill_ERPMode;
        public string Kf_OtherOutBill_MustQtyCtl;
        public string Kf_OtherOutBill_BarCodeMustSameSourceBill;   // æ¡ç å¿…须同源单一致
        public string Kf_OtherOutBill_BillTypeOneScan;//本单据类型内只允许一次扫码(唯一码,含缓存列表)
        public string Kf_OtherOutBillCheck_MustQtyCtl;   //校验数量控制
        //调拨
        public string Kf_MoveStockBill_AutoCheck;
        public string Kf_MoveStockBill_ERPMode;
WarM/ÌõÂë´òÓ¡/Gy_BarCodeBill.cs
@@ -1073,7 +1073,7 @@
                                    ",HBarcodeQtys,HBarcodeNo,HDeptID,HWhID,HSPID,HRemark " +
                                    ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate " +
                                    ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HEntryID " +
                                    ",HGiveAwayFlag,HSeOrderSEQ " +
                                    ",HGiveAwayFlag,HSeOrderSEQ,HInitSourceEntryID " +
                                    ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo " +
                                    ") values ("
                                    + "'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HQty2.ToString()
@@ -1082,7 +1082,7 @@
                                    + ", " + HBarcodeQtys.ToString() + "," + HBarcodeNo.ToString() + "," + HDeptID.ToString() + "," + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HRemark + "'"
                                    + ", " + HCusID.ToString() + ",'" + HCusType + "','" + HEndDate.ToShortDateString() + "','" + HWorkLineName + "','" + sDate + "'"
                                    + ", " + HOrgID.ToString() + "," + HOrgID.ToString() + ",'" + HSeOrderBillNo + "'," + HInterID.ToString() + "," + HEntryID.ToString() + ""
                                    + ", " + DBUtility.ClsPub.BoolToString(HGiveAwayFlag) + "," + HSeOrderSEQ.ToString()
                                    + ", " + DBUtility.ClsPub.BoolToString(HGiveAwayFlag) + "," + HSeOrderSEQ.ToString() + "," + HSourceEntryID.ToString()
                                    + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + HInnerBillNo + "')");
WarM/ÌõÂë´òÓ¡/Sc_ICMOToBarCode.cs
@@ -228,7 +228,7 @@
            DataSet DSet;
            DSet = oCn.RunProcReturn("Select * from gy_czygl Where czymc='" + HUserName + "'", "gy_czygl", ref DBUtility.ClsPub.sExeReturnInfo);
            DSet = oCn.RunProcReturn("Select HEmpID from gy_czygl Where czymc='" + HUserName + "'", "gy_czygl", ref DBUtility.ClsPub.sExeReturnInfo);
            
            if (DSet == null)
            //if (DSet == null|| DSet.Tables[0].Rows.Count == 0)
@@ -244,7 +244,7 @@
                {
                    txtHEmpID.Tag = DBUtility.ClsPub.isInt(DSet.Tables[0].Rows[0]["HEmpID"]);
                    txtHEmpID.Tag = DBUtility.ClsPub.isStrNull(DSet.Tables[0].Rows[0]["HEmpID"]);
                }
                else
                {
@@ -1022,18 +1022,19 @@
                {
                    if (HZXQty > DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["生产订单数量"].Value))
                    {
                        //HZXQty = HZXQty - DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["生产订单数量"].Value);
                        //grdMain.Rows[i].Cells["本次数量"].Value = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["生产订单数量"].Value);
                        MessageBox.Show("请点击超额生产按钮生成条码!");
                        return;
                        HZXQty = HZXQty - DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["生产订单数量"].Value);
                        grdMain.Rows[i].Cells["本次数量"].Value = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["生产订单数量"].Value);
                        //MessageBox.Show("请点击超额生产按钮生成条码!");
                        //return;
                    }
                    else
                    {
                        //grdMain.Rows[i].Cells["本次数量"].Value = HZXQty;
                        grdMain.Rows[i].Cells["本次数量"].Value = HZXQty;
                        //
                        HZXQty = HZXQty - DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["生产订单数量"].Value);
                        grdMain.Rows[i].Cells["本次数量"].Value = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["生产订单数量"].Value);
                        //HZXQty = HZXQty - DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["生产订单数量"].Value);
                        //grdMain.Rows[i].Cells["本次数量"].Value = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["生产订单数量"].Value);
                    }
                }
                else
@@ -1700,14 +1701,17 @@
        private void cmdHSourceID_Click(object sender, EventArgs e)
        {
            Int64 HEmpID = 0;
            HEmpID = ClsPub.isLong(txtHEmpID.Tag);
            HEmpID = Convert.ToInt64(txtHEmpID.Tag);
            //MessageBox.Show(ClsPub.isStrNull(HEmpID));
            //string HEmpName = "";
            //HEmpName = ClsPub.isStrNull(txtHEmpID.Text);
            DAL.ClsGy_Source_View oSource = new DAL.ClsGy_Source_View();
            if (HEmpID != 0)
            {
                if (oSource.GetInfoByID(HEmpID))
                if (oSource.GetInfoByID_AoBang(HEmpID))
                {
                    this.txtHSourceID.Text = oSource.oModel.HName;
                    this.txtHSourceID.Tag = oSource.oModel.HItemID.ToString();
@@ -1925,6 +1929,7 @@
            grdList.DataSource = null;
            grdSub.DataSource = null;
            grdMain.DataSource = null;
            txtHEmpID.Tag = 0;
        }
        private void button2_Click(object sender, EventArgs e)
WebAPI/Controllers/SCGL/Sc_ComplementGoodBillController.cs
@@ -394,14 +394,14 @@
                            return objJsonResult;
                        }
                        ds = oCN.RunProcReturn("select sum(HQty) from JIT_CallGoodsBackRequestBillSub " +
                   $"where HSourceInterID={listCa[i].HSouceInterID} and HSourceEntryID ={listCa[i].HSourceEntryID} and HSourceBillNo = '{listCa[i].HSourceBillNo}' and HMaterID={listCa[i].HMaterialID}", "JIT_CallGoodsBackRequestBillSub");
                        ds = oCN.RunProcReturn("select sum(d.HQty) HQty from JIT_CallGoodsBackRequestBillSub c inner join JIT_CallGoodsBackBillSub d on c.HInterID = d.HSourceInterID and c.HEntryID = d.HSourceEntryID and c.HMaterID = d.HMaterID " +
                   $"where c.HSourceInterID={listCa[i].HSouceInterID} and c.HSourceEntryID ={listCa[i].HSourceEntryID} and c.HSourceBillNo = '{listCa[i].HSourceBillNo}' and c.HMaterID={listCa[i].HMaterialID}", "JIT_CallGoodsBackRequestBillSub");
                        if ((double.Parse(ds.Tables[0].Rows[0][0].ToString()==""?"0": ds.Tables[0].Rows[0][0].ToString()) +listCa[i].退料数量) > listCa[i].已叫料数量)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = $"已经退料申请数量:{double.Parse(ds.Tables[0].Rows[0][0].ToString())},可退料数量为:{(listCa[i].已叫料数量 - double.Parse(ds.Tables[0].Rows[0][0].ToString()))}!";
                            objJsonResult.Message = $"已经退料数量:{double.Parse(ds.Tables[0].Rows[0][0].ToString())},可退料数量为:{(listCa[i].已叫料数量 - double.Parse(ds.Tables[0].Rows[0][0].ToString()))}!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
@@ -531,14 +531,14 @@
                            return objJsonResult;
                        }
                        ds = oCN.RunProcReturn("select sum(HQty) from JIT_CallGoodsBackRequestBillSub " +
                $"where HSourceInterID={listCa[i].HSouceInterID} and HSourceEntryID ={listCa[i].HSourceEntryID} and HSourceBillNo = '{listCa[i].HSourceBillNo}' and HMaterID={listCa[i].HMaterialID}", "JIT_CallGoodsBackRequestBillSub");
                        ds = oCN.RunProcReturn("select sum(d.HQty) HQty from JIT_CallGoodsBackRequestBillSub c inner join JIT_CallGoodsBackBillSub d on c.HInterID = d.HSourceInterID and c.HEntryID = d.HSourceEntryID and c.HMaterID = d.HMaterID " +
                   $"where c.HSourceInterID={listCa[i].HSouceInterID} and c.HSourceEntryID ={listCa[i].HSourceEntryID} and c.HSourceBillNo = '{listCa[i].HSourceBillNo}' and c.HMaterID={listCa[i].HMaterialID}", "JIT_CallGoodsBackRequestBillSub");
                        if ((double.Parse(ds.Tables[0].Rows[0][0].ToString() == "" ? "0" : ds.Tables[0].Rows[0][0].ToString()) + listCa[i].退料数量) > listCa[i].已叫料数量)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = $"已经退料申请数量:{double.Parse(ds.Tables[0].Rows[0][0].ToString())},可退料数量为:{(listCa[i].已叫料数量 - double.Parse(ds.Tables[0].Rows[0][0].ToString()))}!";
                            objJsonResult.Message = $"已经退料数量:{double.Parse(ds.Tables[0].Rows[0][0].ToString())},可退料数量为:{(listCa[i].已叫料数量 - double.Parse(ds.Tables[0].Rows[0][0].ToString()))}!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
@@ -628,14 +628,14 @@
                            return objJsonResult;
                        }
                        ds = oCN.RunProcReturn("select sum(HQty) from JIT_CallGoodsBackRequestBillSub " +
               $"where HSourceInterID={listCa[i].HSouceInterID} and HSourceEntryID ={listCa[i].HSourceEntryID} and HSourceBillNo = '{listCa[i].HSourceBillNo}' and HMaterID={listCa[i].HMaterialID}", "JIT_CallGoodsBackRequestBillSub");
                        ds = oCN.RunProcReturn("select sum(d.HQty) HQty from JIT_CallGoodsBackRequestBillSub c inner join JIT_CallGoodsBackBillSub d on c.HInterID = d.HSourceInterID and c.HEntryID = d.HSourceEntryID and c.HMaterID = d.HMaterID " +
                   $"where c.HSourceInterID={listCa[i].HSouceInterID} and c.HSourceEntryID ={listCa[i].HSourceEntryID} and c.HSourceBillNo = '{listCa[i].HSourceBillNo}' and c.HMaterID={listCa[i].HMaterialID}", "JIT_CallGoodsBackRequestBillSub");
                        if ((double.Parse(ds.Tables[0].Rows[0][0].ToString() == "" ? "0" : ds.Tables[0].Rows[0][0].ToString()) + listCa[i].退料数量) > listCa[i].已叫料数量)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = $"已经退料申请数量:{double.Parse(ds.Tables[0].Rows[0][0].ToString())},可退料数量为:{(listCa[i].已叫料数量 - double.Parse(ds.Tables[0].Rows[0][0].ToString()))}!";
                            objJsonResult.Message = $"已经退料数量:{double.Parse(ds.Tables[0].Rows[0][0].ToString())},可退料数量为:{(listCa[i].已叫料数量 - double.Parse(ds.Tables[0].Rows[0][0].ToString()))}!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
WebAPI/Controllers/WebAPIController.cs
@@ -832,23 +832,26 @@
            }
        }
        /// <summary>
        /// èŽ·å–ä¾›åº”å•†åˆ—è¡¨
        /// </summary>
        /// <returns></returns>
        [Route("Web/GetSupplierList_Json")]
        [HttpGet]
        public object GetSupplierList_Json(string Supplier)
        public object GetSupplierList_Json(string Supplier, Int64 HOrgID)
        {
            sWhere = " Where HStopFlag=0  and HEndFlag=1";
            sWhere = " Where HStopFlag=0  and HEndFlag=1 and HUSEORGID =" + HOrgID + "";
            //sWhere = " Where HStopFlag=0  and HEndFlag=1  and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString();
            if (Supplier != "")
            {
                sWhere = sWhere + " and ( HNumber like '%" + Supplier + "%' or HName like '%" + Supplier + "%' ) ";
                sWhere = sWhere + " and ( HNumber like '%" + Supplier + "%' or HName like '%" + Supplier + "%' or HUSEORGID like '%" + Supplier + "%' ) ";
            }
            try
            {
                ds = webserver.GetSupplierList(sWhere, ref DBUtility.ClsPub.sErrInfo);
                WebS.WebService1 oWeb = new WebS.WebService1();
                ds = oWeb.GetSupplierList(sWhere, ref DBUtility.ClsPub.sErrInfo);
                //ds = webserver.GetSupplierList(sWhere, ref DBUtility.ClsPub.sErrInfo);
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
                    objjson.code = "0";
@@ -1231,7 +1234,7 @@
            //sWhere = " Where HStopFlag=0  and HEndFlag=1  and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString();
            if (sWhere != "")
            {
                sWhere = sWhere + " and ( HNumber like '%" + sWhere + "%' or HName like '%" + sWhere + "%' ) ";
                sWhere = " and ( HNumber like '%" + sWhere + "%' or HName like '%" + sWhere + "%' ) ";
            }
            try
            {