/// <summary>
        /// 新增医院编码对照匹配信息SQL
        /// </summary>
        /// <param name="inRow"></param>
        /// <param name="inUserId"></param>
        /// <param name="MapOrgId"></param>
        /// <returns></returns>
        public string InsertHisEnterpriseMapSQL(DataGridViewRow inRow, string inUserId, string MapOrgId)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("insert into gpo_corp_map( ");
            sb.Append("ID,MAP_ORGTYPE,Map_ORGID,DATA_ORG_ID,CODE,FULL_NAME,EASY_NAME,ADDRESS, POSTCODE,TELPHONE, LINKMAN,");
            sb.Append("ISFACTORY,ISSENDER,ISSALER,");
            sb.Append("Process_Flag,org_id,MODIFY_USERID,MODIFY_DATE,SYNC_STATE,ISMAP) values ");

            sb.Append("('").Append(IdUtil.GetGlobalId()).Append("',");
            sb.Append("'2',");
            sb.Append("'").Append(MapOrgId).Append("',");
            sb.Append("'").Append(inRow.Cells["DATA_ORG_ID"].Value == null ? "" : inRow.Cells["DATA_ORG_ID"].Value.ToString()).Append("',");
            sb.Append("'").Append(inRow.Cells["CODE"].Value == null ? "" : inRow.Cells["CODE"].Value.ToString()).Append("',");
            sb.Append("'").Append(inRow.Cells["FULL_NAME"].Value == null ? "" : inRow.Cells["FULL_NAME"].Value.ToString()).Append("',");
            sb.Append("'").Append(inRow.Cells["EASY_NAME"].Value == null ? "" : inRow.Cells["EASY_NAME"].Value.ToString()).Append("',");
            sb.Append("'").Append(inRow.Cells["ADDRESS"].Value == null ? "" : inRow.Cells["ADDRESS"].Value.ToString()).Append("',");
            sb.Append("'").Append(inRow.Cells["POSTCODE"].Value == null ? "" : inRow.Cells["POSTCODE"].Value.ToString()).Append("',");
            sb.Append("'").Append(inRow.Cells["TELPHONE"].Value == null ? "" : inRow.Cells["TELPHONE"].Value.ToString()).Append("',");
            sb.Append("'").Append(inRow.Cells["LINKMAN"].Value == null ? "" : inRow.Cells["LINKMAN"].Value.ToString()).Append("',");
            sb.Append("'").Append(inRow.Cells["ISFACTORY"].Value == null ? "" : inRow.Cells["ISFACTORY"].Value.ToString()).Append("',");
            sb.Append("'").Append(inRow.Cells["ISSENDER"].Value == null ? "" : inRow.Cells["ISSENDER"].Value.ToString()).Append("',");
            sb.Append("'").Append(inRow.Cells["ISSALER"].Value == null ? "" : inRow.Cells["ISSALER"].Value.ToString()).Append("',");
            sb.Append("0").Append(",");
            sb.Append("'").Append(inRow.Cells["ORG_ID"].Value == null ? "" : inRow.Cells["ORG_ID"].Value.ToString()).Append("',");
            sb.Append("'").Append(inUserId).Append("',");
            sb.Append("'").Append(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")).Append("',");
            sb.Append("0").Append(",");
            sb.Append("'").Append(inRow.Cells["ORG_ID"].Value.ToString().Equals("") ? "0" : "1").Append("')");

            return(sb.ToString());
        }
        /// <summary>
        /// 重载,返回记录ID
        /// </summary>
        /// <param name="input"></param>
        /// <param name="sRecord_ID"></param>
        /// <returns></returns>
        public string InsertHisErpCorpMapSQL(Gpo_Hosptail_MapModel input, out string sRecord_ID)
        {
            StringBuilder sb       = new StringBuilder();
            string        GlobalID = IdUtil.GetGlobalId();

            sRecord_ID = GlobalID;
            sb.Append("insert into gpo_corp_map( \r\n\t\t\t\t\t");
            sb.Append("ID,MAP_ORGTYPE,MAP_ORGID,ORG_ID,CODE,FULL_NAME,EASY_NAME,\r\n");
            sb.Append("MODIFY_USERID,MODIFY_DATE,SYNC_STATE,Process_Flag,ISMAP) values \r\n");
            sb.Append("('").Append(GlobalID).Append("',");
            sb.Append(" '2',");
            sb.Append("'").Append(input.MapOrgId).Append("',");
            sb.Append("'").Append(input.CorpId).Append("',");
            sb.Append("'").Append(input.CorpCode).Append("',");
            sb.Append("'").Append(input.CorpName).Append("',");
            sb.Append("'").Append(input.CorpAbbr).Append("',");
            sb.Append("'").Append(input.ModifyUserId).Append("',");
            sb.Append("'").Append(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")).Append("',");
            sb.Append("'0',");
            sb.Append("'").Append(input.Process).Append("',");
            sb.Append("'").Append(input.IsMap).Append("')");


            return(sb.ToString());
        }
        public string InsertHisErpCorpMapSQL(DataRow inRow, string inUserId, string MapOrgId)
        {
            StringBuilder sb       = new StringBuilder();
            string        GlobalID = IdUtil.GetGlobalId();

            sb.Append("insert into gpo_corp_map( ");
            sb.Append("ID,MAP_ORGTYPE,MAP_ORGID,ORG_ID,CODE,FULL_NAME,EASY_NAME,");
            sb.Append("MODIFY_USERID,MODIFY_DATE,SYNC_STATE,Process_Flag) values ");
            sb.Append("('").Append(GlobalID).Append("',");
            sb.Append(" '2',");
            sb.Append("'").Append(MapOrgId).Append("',");
            sb.Append("'").Append(inRow["org_id"].ToString()).Append("',");
            sb.Append("'").Append(inRow["sender_code"].ToString()).Append("',");
            sb.Append("'").Append(inRow["sender_name"].ToString()).Append("',");
            sb.Append("'").Append(inRow["sender_name"].ToString()).Append("',");
            sb.Append("'").Append(inUserId).Append("',");
            sb.Append("'").Append(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")).Append("',");
            sb.Append("'0',");
            sb.Append("'").Append(inRow["process_flag"].ToString().Equals("true") ? "1" : "0").Append("')");

            return(sb.ToString());
        }