Ejemplo n.º 1
0
        /// <summary>
        /// 动态保存订单
        /// </summary>
        /// <param name="orderDto"></param>
        public static void DynamicSaveOrder(OrderDto orderDto)
        {
            DataRow drstyle = SQLmtm.GetDataRow("SELECT MAX(SYS_STYLE_ID) SYS_STYLE_ID FROM `s_style_p`");

            orderDto.style_id = (Convert.ToInt32(drstyle["SYS_STYLE_ID"]) + 1).ToString();
            //orderDto.style_id = FunctionHelper.generateBillNo("s_style_p", "SYS_STYLE_ID", "", "0000");
            SQLmtm.DoInsert(
                "s_style_fit_r"
                , new string[] { "STYLE_ID", "PHASE_CD", "ITEM_CD", "ITEM_VALUE", "FIT_VALUE", "FM_VALUE", "DELETE_FLAG", "VERSION", "CREATE_USER", "IN_VALUE", "OUT_VALUE" }
                , new string[] { orderDto.style_id, "AUDIT_PHASE_CD-PHASE_CD_10", orderDto.Dto尺寸.ITEM_CD, orderDto.Dto尺寸.ITEM_VALUE, orderDto.Dto尺寸.FIT_VALUE, orderDto.Dto尺寸.FM_VALUE, "0", "1", "46", orderDto.Dto尺寸.IN_VALUE, orderDto.Dto尺寸.OUT_VALUE }
                );
            SQLmtm.DoInsert(
                "a_customer_fit_value_r"
                , new string[] { "CUSTOMER_ID", "CUSTOMER_NAME", "ITEM_CD", "ITEM_VALUE", "FIT_VALUE", "FM_VALUE", "IN_VALUE", "OUT_VALUE", "STATUS", "DELETE_FLAG", "CUSTOMER_COUNT_ID" }
                , new string[] { orderDto.CUSTOMER_ID, orderDto.CUSTOMER_NAME, orderDto.Dto尺寸.ITEM_CD, orderDto.Dto尺寸.ITEM_VALUE, orderDto.Dto尺寸.FIT_VALUE, orderDto.Dto尺寸.FM_VALUE, orderDto.Dto尺寸.IN_VALUE, orderDto.Dto尺寸.OUT_VALUE, "0", "0", orderDto.CUSTOMER_COUNT_ID }
                );
            SQLmtm.DoInsert(
                "s_style_p"
                , new string[] { "SYS_STYLE_ID", "SHOP_ID", "STYLE_CD", "STYLE_KBN", "STYLE_CATEGORY_CD", "SYTLE_FABRIC_ID", "STYLE_SIZE_GROUP_CD", "STYLE_SIZE_CD", "STYLE_MAKE_TYPE", "ENABLE_FLAG", "DELETE_FLAG", "VERSION", "STYLE_NAME_CN", "REMARKS", "CUSTOMER_COUNT_ID", "STYLE_FIT_CD", "REF_STYLE_ID", "STYLE_DRESS_CATEGORY", "STYLE_DESIGN_TYPE", "STYLE_PUBLISH_CATEGORY_CD", "SYTLE_YEAR", "SYTLE_SEASON" }
                , new string[] { orderDto.style_id, "18", "", "STYLE_SOURCE-STYLE_SOURCE_50", orderDto.STYLE_CATEGORY_CD, orderDto.SYTLE_FABRIC_ID, orderDto.STYLE_SIZE_GROUP_CD, orderDto.STYLE_SIZE_CD, "4SMA-4M", "1", "0", "1", orderDto.STYLE_NAME_CN, "", orderDto.CUSTOMER_COUNT_ID, orderDto.STYLE_FIT_CD, orderDto.REF_STYLE_ID, orderDto.STYLE_DRESS_CATEGORY, orderDto.STYLE_DESIGN_TYPE, orderDto.STYLE_PUBLISH_CATEGORY_CD, orderDto.SYTLE_YEAR, orderDto.SYTLE_SEASON }
                );
            foreach (Dto设计点 dto in orderDto.Dto设计点s)
            {
                SQLmtm.DoInsert("s_style_option_r", new string[] { "SYS_STYLE_ID", "ITEM_CD", "ITEM_VALUE", "OPTION_VALUE", "ENABLE_FLAG", "DELETE_FLAG" }, new string[] { orderDto.style_id, dto.ITEM_CD, dto.ITEM_VALUE, dto.OPTION_VALUE, "1", "0" });
            }
            RestCall.httpGetMethod("https://shirtmtm.com/fragsmart-mtm/customer/update/payment?styleId=" + orderDto.style_id + "&customerId=" + orderDto.CUSTOMER_ID + "&addressId=" + orderDto.ADDRESS_ID + "&number=" + orderDto.ORDER_NUMBER);
            //RestCall.httpGetMethod("http://localhost:8080/customer/update/payment?styleId=" + orderDto.style_id + "&customerId=" + orderDto.CUSTOMER_ID + "&addressId=" + orderDto.ADDRESS_ID + "&number=" + orderDto.ORDER_NUMBER);
            DataRow ORDER_ID = SQLmtm.GetDataRow("SELECT MAX(ORDER_ID) AS ORDER_ID FROM `o_order_p`");
            int     order_id = Convert.ToInt32(ORDER_ID["ORDER_ID"]);

            //order_id++;
            SQLmtm.DoInsert("o_order_brand_r", new string[] { "OGNIZATION_ID", "SHOP_ID", "BRAND_ID", "ORDER_ID" }, new string[] { "95", "18", "", order_id.ToString() });
            SQLmtm.DoInsert("t_order_type", new string[] { "ORDER_ID", "ORDER_TYPE" }, new string[] { order_id.ToString(), "1" });
        }
Ejemplo n.º 2
0
        // 获取分录的token数据
        public static List <TokenDataDto> getEntryTokenData(String billTokenId, String billMetaId, String entryMetaId)
        {
            String resultStr = RestCall.httpGetMethod(XindianAppConfig.businessServiceUri + "/bill/entry/bill-meta-id/bill-token-id/entry-meta-id?entryMetaId="
                                                      + entryMetaId + "&billMetaId=" + billMetaId + "&billTokenId=" + billTokenId);
            Result result = Newtonsoft.Json.JsonConvert.DeserializeObject <Result>(resultStr);;

            if (result.resultCode == 0)
            {
                return(Newtonsoft.Json.JsonConvert.DeserializeObject <List <TokenDataDto> >(result.data.ToString()));
            }
            else
            {
                MessageBox.Show("获取数据失败!");
                return(null);
            }
        }
Ejemplo n.º 3
0
        // 根据metaId和tokenId获取tokenDataDTO
        public static TokenDataDto getTokenDataDTO(String metaId, String tokenId)
        {
            String resultStr = RestCall.httpGetMethod(XindianAppConfig.businessServiceUri + "/bill/bill/meta-id/token-id?metaId="
                                                      + metaId + "&tokenId=" + tokenId);
            Result result = Newtonsoft.Json.JsonConvert.DeserializeObject <Result>(resultStr);;

            if (result.resultCode == 0 && null != result.data)
            {
                return(Newtonsoft.Json.JsonConvert.DeserializeObject <TokenDataDto>(result.data.ToString()));
            }
            else
            {
                MessageBox.Show("获取数据失败!");
                return(null);
            }
        }
        private void stylechangesave_Click(object sender, EventArgs e)
        {
            DialogResult dialogResult = MessageBox.Show("确认保存吗?", "保存", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (dialogResult == DialogResult.Yes)
            {
                if (this.shuliang.Text == "" || this.mianliaoname.Text == "" || this.chicun01.Text == "")
                {
                    MessageBox.Show("请填写完整");
                    return;
                }
                try
                {
                    Frm定制下单修改尺寸.styleid = StyleService.GetNewStyleID();
                    //尺寸保存
                    ImpService.StandardModelsSizeSive(this.chooseStyleSize);
                    //s_style_p写入数据
                    ImpService.insertS_Style_P(styleCard);
                    //设计点保存
                    ImpService.StandardModelsDesignSive();
                    //o_order_p写入数据
                    //RestCall.httpGetMethod("https://shirtmtm.com/fragsmart-mtm/customer/update/payment?styleId=" + styleid.ToString() + "&customerId=" + CreateCustomer.cUSTOMER_ID.ToString() + "&addressId=" + CreateCustomer.aDDRESS_ID.ToString() + "&number=" + this.shuliang.Text);
                    RestCall.httpGetMethod("http://localhost:8080/customer/update/payment?styleId=" + Frm定制下单修改尺寸.styleid.ToString() + "&customerId=" + Frm客户.cUSTOMER_ID.ToString() + "&addressId=" + Frm客户.aDDRESS_ID.ToString() + "&number=" + this.shuliang.Text);
                    DataRow ORDER_ID = SQLmtm.GetDataRow("SELECT MAX(ORDER_ID) AS ORDER_ID FROM `o_order_p`");
                    int     order_id = Convert.ToInt32(ORDER_ID["ORDER_ID"]);
                    //order_id++;
                    SQLmtm.DoInsert("o_order_brand_r", new string[] { "OGNIZATION_ID", "SHOP_ID", "BRAND_ID", "ORDER_ID" }, new string[] { "95", "18", "", order_id.ToString() });
                    SQLmtm.DoInsert("t_order_type", new string[] { "ORDER_ID", "ORDER_TYPE" }, new string[] { order_id.ToString(), "2" });
                    MessageBox.Show("保存成功");
                    this.Close();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
            else
            {
                return;
            }
        }
Ejemplo n.º 5
0
        public static UserInfoDetails GetUserInfoDetails(string userId)
        {
            string url = XindianAppConfig.businessServiceUri + "/user/information?userId=" + userId;
            string rv  = RestCall.httpGetMethod(url);

            if (string.IsNullOrEmpty(rv))
            {
                return(null);
            }
            Result ret = Newtonsoft.Json.JsonConvert.DeserializeObject <Result>(rv);

            if (ret.resultCode == 0 && ret.data != null)
            {
                UserInfoDetails datas = Newtonsoft.Json.JsonConvert.DeserializeObject <UserInfoDetails>(ret.data.ToString());
                return(datas);
            }
            else
            {
                return(null);
            }
            //return null;
        }
Ejemplo n.º 6
0
 // 调用存储过程
 public static void storeProcedure(String metaId, String tokenId)
 {
     String resultStr = RestCall.httpGetMethod(XindianAppConfig.businessServiceUri + "/bill/submit/storeProcedure?metaId="
                                               + metaId + "&tokenId=" + tokenId);
 }