Beispiel #1
0
        /// <summary>
        /// 把HIS中药品字典传到SCM系统所用到的方法
        /// </summary>
        /// <param name="DrugItem">药品字典对象</param>
        /// <param name="ActFlag">增加删除操作字符</param>
        /// <param name="Suc_Flag">成功与否标识</param>
        /// <param name="err_Flag">默认传true</param>
        public static void HisPushDrugItemToSCM(List <SCMHisDrugItem> DrugItem, string ActFlag, out bool Suc_Flag, out bool err_Flag)
        {
            Suc_Flag = false;
            err_Flag = false;
            if (DrugItem.Count > 0)
            {
                try
                {
                    WebReference.SAPtoSCM ScmSer = new WebReference.SAPtoSCM();
                    List <ts_SCM_HIS.WebReference.HIS_DRUG> HISDrugAll = new List <ts_SCM_HIS.WebReference.HIS_DRUG>();

                    foreach (SCMHisDrugItem druginfo in DrugItem)
                    {
                        /*    药品名称	NAME	string
                         *    药品编码	CODE	string
                         *    药品规格	SPEC	string
                         *    生产厂家	FACTORY	string
                         *    药品进价	MRJJ	Decimal(14,4) */
                        ts_SCM_HIS.WebReference.HIS_DRUG ScmDrug = new ts_SCM_HIS.WebReference.HIS_DRUG();
                        ScmDrug.NAME    = druginfo.NAME;
                        ScmDrug.CODE    = druginfo.CODE;
                        ScmDrug.SPEC    = druginfo.SPEC;
                        ScmDrug.FACTORY = druginfo.FACTORY;
                        ScmDrug.MRJJ    = druginfo.MRJJ.ToString();
                        HISDrugAll.Add(ScmDrug);
                    }
                    ScmSer.GetDrugFromHIS(HISDrugAll.ToArray(), ActFlag, out Suc_Flag, out err_Flag);
                }
                catch (System.Exception err)
                {
                    throw new System.Exception(err.ToString());
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// 把HIS中采购计划信息送到SCM系统所调用SCM接口中方法
        /// </summary>
        /// <param name="CheasePlan">采购计划对象</param>
        /// <param name="ActionFlag">增加删除操作字符</param>
        /// <param name="Suc_Flag">成功与否标识</param>
        /// <param name="err_Flag">默认传true</param>
        public static void HisPushChasePlanToSCM(List <SCMPurchasePlan> CheasePlan, string ActionFlag, out bool Suc_Flag, out bool err_Flag)
        {
            Suc_Flag = false;
            err_Flag = false;

            if (CheasePlan.Count > 0)
            {
                try
                {
                    /*采购凭证号	        EBELN	string
                     * 项目编号	        EBELP	string
                     * 供应商账户	        LIFNR	string
                     * 库存地点	        NAME	string
                     * 药品编号	        MATNR	string
                     * 药品名称	        TXZ01	string
                     * 院区ID	            WERKS	string
                     * 院区描述	        WERKST	string
                     * 库存(送货)地点	LGORT	string
                     * 送货数量	        MENGE	Decimal(17,4)
                     * 计量单位ID	        MEINS	string
                     * 计量单位描述	    MSEHT	string
                     * 单价(进货价)	    NETPR	Decimal(14,4)
                     * 交货日期	        EINDT	string
                     * 采购订单日期	    BEDAT	string
                     * 备注	            COMMENTS	string
                     * 预留字段	        FREEUSE	    string  */

                    WebReference.SAPtoSCM ScmSer = new WebReference.SAPtoSCM();
                    List <ts_SCM_HIS.WebReference.Sap_PurchasePlan> ScmHisinfoAll = new List <ts_SCM_HIS.WebReference.Sap_PurchasePlan>();

                    foreach (SCMPurchasePlan infomx in CheasePlan)
                    {
                        ts_SCM_HIS.WebReference.Sap_PurchasePlan SCMinfo = new ts_SCM_HIS.WebReference.Sap_PurchasePlan();
                        SCMinfo.EBELN    = infomx.EBELN;
                        SCMinfo.EBELP    = infomx.EBELP;
                        SCMinfo.LIFNR    = infomx.LIFNR;
                        SCMinfo.NAME     = infomx.NAME;
                        SCMinfo.MATNR    = infomx.MATNR;
                        SCMinfo.TXZ01    = infomx.TXZ01;
                        SCMinfo.WERKS    = infomx.WERKS;
                        SCMinfo.WERKST   = infomx.WERKST;
                        SCMinfo.LGORT    = infomx.LGORT;
                        SCMinfo.MENGE    = infomx.MENGE.ToString();
                        SCMinfo.MEINS    = infomx.MEINS;
                        SCMinfo.MSEHT    = infomx.MSEHT.ToString();
                        SCMinfo.NETPR    = infomx.NETPR.ToString();
                        SCMinfo.EINDT    = infomx.EINDT;
                        SCMinfo.BEDAT    = infomx.BEDAT;
                        SCMinfo.COMMENTS = infomx.COMMENTS;
                        SCMinfo.FREEUSE  = infomx.FREEUSE;

                        ScmHisinfoAll.Add(SCMinfo);
                    }

                    ScmSer.GetPucharseFromSap(ScmHisinfoAll.ToArray(), ActionFlag, out Suc_Flag, out err_Flag);
                }
                catch (System.Exception err)
                {
                    throw new System.Exception(err.ToString());
                }
            }
        }