zzr99
2022-06-07 cdc0ee4c7019f8466327e713153a1cd147a152c0
Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
9个文件已修改
85 ■■■■■ 已修改文件
BLL/公用模块/FrmLogin.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | 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
@@ -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
            {