示例#1
0
        /// <summary>
        /// 成衣尺寸数据
        /// </summary>
        /// <param name="styleid"></param>
        /// <returns></returns>
        public static List <成衣尺寸DTO> Get成衣尺寸DTO(String styleid)
        {
            List <成衣尺寸DTO> cycc = new List <成衣尺寸DTO>();
            String         sql  = "SELECT\n" +
                                  "	ITEM_CD AS itemCd,\n" +
                                  "	ITEM_VALUE AS itemValue,\n" +
                                  "	FIT_VALUE AS fitValue,\n" +
                                  "	IN_VALUE AS inValue,\n" +
                                  "	OUT_VALUE AS outValue \n" +
                                  "FROM\n" +
                                  "	s_style_fit_r \n" +
                                  "WHERE\n" +
                                  "	STYLE_ID = '" + styleid + "'";
            DataRow       chengyidr     = SQLmtm.GetDataRow(sql);
            List <String> itemCdList    = new List <String>(chengyidr["itemCd"].ToString().Split(','));
            List <String> itemValueList = new List <String>(chengyidr["itemValue"].ToString().Split(','));
            List <String> fitValueList  = new List <String>(chengyidr["fitValue"].ToString().Split(','));

            List <Tradd> itemCdHoldList    = new List <Tradd>();
            List <Tradd> itemValueHoldList = new List <Tradd>();
            List <Tradd> fitValueHoldList  = new List <Tradd>();
            int          i = 0;

            foreach (String cdvl in itemCdList)
            {
                itemCdHoldList.Add(new Tradd(i, cdvl));
                i++;
            }
            i = 0;
            foreach (String cdvl in itemValueList)
            {
                itemValueHoldList.Add(new Tradd(i, cdvl));
                i++;
            }
            i = 0;
            foreach (String cdvl in fitValueList)
            {
                fitValueHoldList.Add(new Tradd(i, cdvl));
                i++;
            }
            foreach (Tradd tradd1 in itemCdHoldList)
            {
                foreach (Tradd tradd2 in itemValueHoldList)
                {
                    if (tradd1.i == tradd2.i)
                    {
                        foreach (Tradd tradd3 in fitValueHoldList)
                        {
                            if (tradd2.i == tradd3.i)
                            {
                                cycc.Add(new 成衣尺寸DTO(tradd1.str, tradd2.str, tradd3.str));
                                break;
                            }
                        }
                        break;
                    }
                }
            }
            return(cycc);
        }
示例#2
0
        /// <summary>
        /// 使用orderID返回尺寸呈现dto
        /// </summary>
        /// <param name="orderid"></param>
        /// <returns></returns>
        public static List <尺寸呈现dto> getDto尺寸WithOrderId(String orderid)
        {
            String sql = "SELECT\n" +
                         "	o_order_p.ORDER_ID,\n"+
                         "	o_order_p.STYLE_ID,\n"+
                         "	o_order_p.CUSTOMER_ID,\n"+
                         "	s_style_p.STYLE_FIT_CD,\n"+
                         "	s_style_p.STYLE_CATEGORY_CD,\n"+
                         "	s_style_p.STYLE_SIZE_CD,\n"+
                         "	s_style_p.STYLE_SIZE_GROUP_CD \n"+
                         "FROM\n" +
                         "	o_order_p\n"+
                         "	LEFT JOIN s_style_p ON o_order_p.STYLE_ID = s_style_p.SYS_STYLE_ID \n"+
                         "WHERE\n" +
                         "	ORDER_ID = '"+ orderid + "'";
            DataRow        dr   = SQLmtm.GetDataRow(sql);
            List <尺寸呈现dto> dtos = new List <尺寸呈现dto>();

            try
            {
                dtos = getDto尺寸ByOrderId(orderid, dr["STYLE_FIT_CD"].ToString(), dr["STYLE_CATEGORY_CD"].ToString(), dr["STYLE_SIZE_CD"].ToString(), dr["STYLE_SIZE_GROUP_CD"].ToString(), dr["CUSTOMER_ID"].ToString());
            }
            catch
            {
            }
            return(dtos);
        }
示例#3
0
        /// <summary>
        /// 门店验货扫描取barcode方法
        /// </summary>
        /// <param name="LOG_ID"></param>
        /// <returns></returns>
        public static BarCodeInfoDto getStockInBarCodeInfo(String LOG_ID)
        {
            //  读取订单信息
            String sql = "select Id,LOG_ID,ORDER_ID,CUSTOMER_ID,SHOP_ID,SHOP_NAME,STYLE_ID,ORDER_DATE,STYLE_NAME_CN,SYTLE_YEAR,SYTLE_SEASON,REF_STYLE_ID,SYTLE_FABRIC_ID,MATERIAL_NAME_CN,MATERIAL_COLOR,STYLE_PUBLISH_CATEGORY_CD,ORDER_NO from a_product_log_p " +
                         "where Id in (select barcode_id from t_godown_entry) and LOG_ID = '" + LOG_ID + "'";

            DataTable dt = SQLmtm.GetDataTable(sql);

            if (dt.Rows.Count == 0)
            {
                sql = "select Id,LOG_ID,ORDER_ID,CUSTOMER_ID,SHOP_ID,SHOP_NAME,STYLE_ID,ORDER_DATE,STYLE_NAME_CN,SYTLE_YEAR,SYTLE_SEASON,REF_STYLE_ID,SYTLE_FABRIC_ID,MATERIAL_NAME_CN,MATERIAL_COLOR,STYLE_PUBLISH_CATEGORY_CD,ORDER_NO from a_product_log_p " +
                      "where LOG_ID = '" + LOG_ID + "'";
                dt = SQLmtm.GetDataTable(sql);
                if (dt.Rows.Count == 0)
                {
                    throw new Exception("系统中无本产品标签列印信息");
                }
                else
                {
                    throw new Exception("本商品未出库");
                }
            }
            else
            {
                return(new BarCodeInfoDto(dt));
            }
        }
示例#4
0
        private void Frm尺寸修改子页_Load(object sender, EventArgs e)
        {
            String sql1 = "SELECT\n" +
                          "	t_remark.remark_id,\n" +
                          "	t_remark.order_id,\n" +
                          "	t_remark.remark,\n" +
                          "	t_remark.file_name,\n" +
                          "	t_remark.template_id,\n" +
                          "	t_remark.data jsondata,\n" +
                          "	t_template.template_name,\n" +
                          "	t_template_group.template_group_id,\n" +
                          "	t_template_group.template_group_name \n" +
                          "FROM\n" +
                          "	t_remark\n" +
                          "	LEFT JOIN t_template ON t_remark.template_id = t_template.template_id\n" +
                          "	LEFT JOIN t_template_group ON t_template.template_group_id = t_template_group.template_group_id";
            //this.treeList导航.DataSource = SQLmtm.GetDataTable(sql);
            String sql = "SELECT\n" +
                         "	template_id,\n"+
                         "	template_group_id,\n"+
                         "	template_name \n"+
                         "FROM\n" +
                         "	t_template";
            DataTable dt = SQLmtm.GetDataTable(sql);

            foreach (DataRow dr in dt.Rows)
            {
                this.template_choose.Add(dr["template_name"].ToString(), dr["template_id"].ToString());
                ((DevExpress.XtraEditors.Repository.RepositoryItemComboBox)barEditItem模板.Edit).Items.Add(dr["template_name"].ToString());
            }
        }
        /// <summary>
        /// 返回值:K:下线id,V:款式list
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public static Dictionary <String, List <String> > getStyleRelationById(List <String> ids)
        {
            String sql = "SELECT\n" +
                         "	ROLLOFF_ID,\n"+
                         "	STYLE_ID \n"+
                         "FROM\n" +
                         "	r_rolloff_style \n"+
                         "WHERE\n" +
                         "	ROLLOFF_ID IN ( '"+ String.Join("','", ids) + "' )";

            Dictionary <String, List <String> > rtn = new Dictionary <String, List <String> >();
            DataTable dataTable = SQLmtm.GetDataTable(sql);

            foreach (DataRow dataRow in dataTable.Rows)
            {
                if (rtn.ContainsKey(dataRow["ROLLOFF_ID"].ToString()))
                {
                    //  key已经存在
                    if (!rtn[dataRow["ROLLOFF_ID"].ToString()].Contains(dataRow["STYLE_ID"].ToString()))
                    {
                        //  加入新的style
                        rtn[dataRow["ROLLOFF_ID"].ToString()].Add(dataRow["STYLE_ID"].ToString());
                    }
                }
                else
                {
                    //  新增key
                    rtn.Add(dataRow["ROLLOFF_ID"].ToString(), new List <string>()
                    {
                        dataRow["STYLE_ID"].ToString()
                    });
                }
            }
            return(rtn);
        }
示例#6
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" });
        }
示例#7
0
 /// <summary>
 /// 保存订单任务
 /// </summary>
 /// <param name="taskDTo"></param>
 public static void Save订单任务(TaskDTO taskDTo)
 {
     if (taskDTo.remark_id == "" || taskDTo.remark_id == null)
     {
         SQLmtm.DoInsert("t_remark", new string[] { "order_id", "remark", "file_name", "template_id", "data", "style_id", "ref_style_id", "serial_number", "status" }, new string[] { taskDTo.order_id, taskDTo.remark, taskDTo.file_name, taskDTo.template_id, taskDTo.data, taskDTo.style_id, taskDTo.ref_style_id, taskDTo.serial_number, taskDTo.status });
     }
 }
示例#8
0
        /// <summary>
        /// 获取生产模板
        /// </summary>
        /// <returns></returns>
        public static DataTable Get生产模板()
        {
            String sql = "SELECT\n" +
                         "	a_dict_p.ITEM_ID,\n"+
                         "	a_dict_p.PARENT_ITEM_CD,\n"+
                         "	a_dict_p.ITEM_CD,\n"+
                         "	a_dict_p.ITEM_VALUE,\n"+
                         "	a_dict_p.ITEM_SORT,\n"+
                         "	a_dict_p.ITEM_REAL_VALUE,\n"+
                         "	a_dict_p.ITEM_NAME_CN,\n"+
                         "	a_dict_p.ITEM_SHORT_NAME_CN,\n"+
                         "	a_dict_p.ITEM_NAME_EN,\n"+
                         "	a_dict_p.ITEM_SHORT_NAME_EN,\n"+
                         "	a_dict_p.ITEM_NAME_JP,\n"+
                         "	a_dict_p.ITEM_SHORT_NAME_JP,\n"+
                         "	a_dict_p.REMARKS,\n"+
                         "	a_dict_p.ENABLE_FLAG,\n"+
                         "	a_dict_p.DELETE_FLAG,\n"+
                         "	a_dict_p.VERSION,\n"+
                         "	a_dict_p.CREATE_DATE,\n"+
                         "	a_dict_p.UPDATE_DATE,\n"+
                         "	a_dict_p.CREATE_USER,\n"+
                         "	a_dict_p.UPDATE_USER \n"+
                         "FROM\n" +
                         "	a_dict_p \n"+
                         "WHERE\n" +
                         "	a_dict_p.ITEM_CD = 'PRODUCTION_TEMPLATE'";

            return(SQLmtm.GetDataTable(sql));
        }
示例#9
0
        /// <summary>
        /// 取得门店全部库存
        /// </summary>
        /// <returns></returns>
        public static List <ShopStockDto> getStopStockAll()
        {
            String sql = "SELECT\n" +
                         "	amount,\n"+
                         "	STYLE_SIZE_CD,\n"+
                         "	shop_id,\n"+
                         "	shop_name,\n"+
                         "	MATERIAL_ID,\n"+
                         "	MATERIAL_NAME_CN,\n"+
                         "	MATERIAL_COLOR,\n"+
                         "	SYS_STYLE_ID,\n"+
                         "	SYTLE_YEAR,\n"+
                         "	SYTLE_SEASON,\n"+
                         "	SYS_STYLE_SIZE_CD,\n"+
                         "	STYLE_NAME_CN,\n"+
                         "	STYLE_PUBLISH_CATEGORY_CD \n"+
                         "FROM\n" +
                         "	v_stock_inventory \n"+
                         "   where amount<>0";
            DataTable dataTable = SQLmtm.GetDataTable(sql);

            List <ShopStockDto> shopStockDtos = new List <ShopStockDto>();

            foreach (DataRow dataRow in dataTable.Rows)
            {
                shopStockDtos.Add(new ShopStockDto(dataRow));
            }
            return(shopStockDtos);
        }
示例#10
0
        /// <summary>
        /// 获取选择的尺码的尺寸
        /// </summary>
        /// <param name="size"></param>
        /// <param name="styleid"></param>
        /// <returns></returns>
        public static DataTable StyleValue(String size, String styleid, DataTable stylesizedt)
        {
            DataRow   st = SQLmtm.GetDataRow("SELECT * FROM s_style_p WHERE SYS_STYLE_ID = '" + styleid + "'");
            DataTable dt = new DataTable();

            foreach (DataRow dr in stylesizedt.Rows)
            {
                if (dr["尺寸"].ToString() == size)
                {
                    String sql = "SELECT\n" +
                                 "	*,\n"+
                                 "	SUBSTRING_INDEX( SIZE_CD, '-',- 1 ) \n"+
                                 "FROM\n" +
                                 "	`a_size_fit_p` \n"+
                                 "WHERE\n" +
                                 "	FIT_CD = '"+ st["STYLE_FIT_CD"].ToString() + "' \n" +
                                 "	AND STYLE_CATEGORY_CD = '"+ st["STYLE_CATEGORY_CD"].ToString() + "' \n" +
                                 "	AND SIZEGROUP_CD = '"+ st["STYLE_SIZE_GROUP_CD"] + "' \n" +
                                 "	AND SIZE_CD = '"+ dr["SIZE_CD"].ToString() + "';";
                    dt = SQLmtm.GetDataTable(sql);
                    break;
                }
            }
            return(dt);
        }
示例#11
0
        /// <summary>
        /// 取得所有任务模板
        /// </summary>
        /// <returns></returns>
        public static void updateTaskTemplate(String TEMPLATE_ID, String TEMPLATE_XML)
        {
            String sql = "update t_task_template set TEMPLATE_XML='" + TEMPLATE_XML
                         + "' where TEMPLATE_ID = '" + TEMPLATE_ID + "'";

            SQLmtm.ExecuteSql(sql);
        }
示例#12
0
        /// <summary>
        /// 查询订单
        /// </summary>
        /// <param name="orderno"></param>
        /// <returns></returns>
        public static DataTable GetOrder(String orderno, int order_type)
        {
            String sql = "SELECT * FROM v_order_with_type WHERE order_type ='" + order_type + "'" +
                         " and ORDER_NO = '" + orderno + "'";

            return(SQLmtm.GetDataTable(sql));
        }
示例#13
0
        /// <summary>
        /// 获取任务,读取任务
        /// </summary>
        /// <param name="remark_id"></param>
        public static DataRow GetTaskRead(String remark_id)
        {
            String sql = "SELECT\n" +
                         "	tr.remark_id,\n"+
                         "	tr.order_id,\n"+
                         "	tr.remark,\n"+
                         "	tr.file_name,\n"+
                         "	tr.template_id,\n"+
                         "	tr.`data`,\n"+
                         "	tr.style_id,\n"+
                         "	tr.ref_style_id,\n"+
                         "	tr.CREATE_DATE,\n"+
                         "	tr.parent_id,\n"+
                         "	tr.version,\n"+
                         "	tr.principal,\n"+
                         "	tr.serial_number,\n"+
                         "	tr.status,\n"+
                         "   tr.A_jSON,\n" +
                         "   tr.A_FILE,\n" +
                         "	tt.template_name,\n"+
                         "	ttg.template_group_id,\n"+
                         "	ttg.template_group_name\n"+
                         "FROM\n" +
                         "	t_remark AS tr\n"+
                         "	LEFT JOIN t_template AS tt ON tr.template_id = tt.template_id\n"+
                         "	LEFT JOIN t_template_group AS ttg ON tt.template_group_id = ttg.template_group_id \n"+
                         "WHERE\n" +
                         "	tr.remark_id = '"+ remark_id + "'";

            return(SQLmtm.GetDataRow(sql));
        }
示例#14
0
        /// <summary>
        /// 取得所有任务
        /// </summary>
        /// <returns></returns>
        public static List <UserTaskDTO> getUserTasks()
        {
            String sql = "SELECT\n" +
                         "	t_remark.remark_id,\n"+
                         "	t_remark.order_id /*订单号*/\n"+
                         "	,\n"+
                         "	MISSION_TEMPLATE.ITEM_NAME_CN TEMPLATE_NAME,\n"+
                         "	v_order_p.CUSTOMER_ID,\n"+
                         "	v_order_p.CUSTOMER_NAME,\n"+
                         "	v_order_p.SHIPPING_DESTINATION,\n"+
                         "	v_order_p.ORDER_STATUS_CD,\n"+
                         "	v_order_p.ORDER_STATUS_CD_NAME,\n"+
                         "	s_style_p.STYLE_FIT_CD,\n"+
                         "	s_style_p.STYLE_CATEGORY_CD,\n"+
                         "	s_style_p.STYLE_SIZE_CD,\n"+
                         "	s_style_p.STYLE_SIZE_GROUP_CD,\n"+
                         "	t_remark.remark /*备注——文档*/\n"+
                         "	,\n"+
                         "	t_remark.file_name,\n"+
                         "	t_remark.template_id /*模板id*/\n"+
                         "	,\n"+
                         "	t_remark.DATA /*json数据*/\n"+
                         "	,\n"+
                         "	t_remark.style_id,\n"+
                         "	s_style_p.STYLE_NAME_CN,\n"+
                         "	t_remark.ref_style_id,\n"+
                         "	t_remark.CREATE_DATE /*创建时间*/\n"+
                         "	,\n"+
                         "	t_remark.parent_id /*父ID*/\n"+
                         "	,\n"+
                         "	t_remark.version /*版本*/\n"+
                         "	,\n"+
                         "	t_remark.principal /*负责人*/\n"+
                         "	,\n"+
                         "	CONCAT( a_login_user_p.FIRST_NAME, a_login_user_p.LAST_NAME ) AS USER_NAME /*姓名*/\n"+
                         "	,\n"+
                         "	t_remark.serial_number /*流水号*/\n"+
                         "	,\n"+
                         "	t_remark.STATUS,\n"+
                         "	MISSION_STATUS.ITEM_NAME_CN /*状态*/\n"+
                         "	\n"+
                         "FROM\n" +
                         "	t_remark\n"+
                         "	LEFT JOIN v_order_p ON v_order_p.ORDER_ID = t_remark.order_id\n"+
                         "	LEFT JOIN s_style_p ON s_style_p.SYS_STYLE_ID = t_remark.style_id\n"+
                         "	LEFT JOIN a_login_user_p ON a_login_user_p.LOGIN_USER_ID = t_remark.principal\n"+
                         "	LEFT JOIN ( SELECT item_value, ITEM_NAME_CN FROM a_dict_p WHERE ITEM_CD = 'MISSION_STATUS' ) MISSION_STATUS ON MISSION_STATUS.item_value = t_remark.\n"+
                         "	STATUS LEFT JOIN ( SELECT item_value, ITEM_NAME_CN FROM a_dict_p WHERE ITEM_CD = 'MISSION_TEMPLATE' ) MISSION_TEMPLATE ON MISSION_TEMPLATE.item_value = t_remark.template_id";

            DataTable          dt           = SQLmtm.GetDataTable(sql);
            List <UserTaskDTO> userTaskDTOs = new List <UserTaskDTO>();

            foreach (DataRow dataRow in dt.Rows)
            {
                userTaskDTOs.Add(new UserTaskDTO(dataRow));
            }

            return(userTaskDTOs);
        }
示例#15
0
        private void QueryTag_Load(object sender, EventArgs e)
        {
            String sql = "SELECT * FROM v_printed_p";

            this.searchLookUpEdit1.Properties.DataSource = SQLmtm.GetDataTable(sql);
            this.printedView.Dock = DockStyle.Top;
            this.dockPanel1.Controls.Add(printedView);
        }
示例#16
0
        /// <summary>
        /// 指定门店出入库
        /// </summary>
        /// <param name="enum进出库类型"></param>
        /// <param name="barCode"></param>
        /// <param name="shop_id"></param>
        private static void generate门店扫码出入库(Enum进出库类型 enum进出库类型, String barCode, String shop_id)
        {
            String    sql       = "SELECT dispath_type FROM a_noorder_print_p WHERE clothes_log_id = '" + barCode + "'";
            DataTable dataTable = SQLmtm.GetDataTable(sql);

            if (dataTable.Rows.Count == 0)
            {
                throw new Exception("条码" + barCode + "不存在!");
            }
            else
            {
                Enum在库类别 enum在库类别;
                try
                {
                    enum在库类别 = (Enum在库类别)Convert.ToInt32(dataTable.Rows[0]["dispath_type"].ToString());
                }
                catch
                {
                    enum在库类别 = Enum在库类别.成品仓;
                }
                if (enum在库类别.Equals(Enum在库类别.已出库) && enum进出库类型.Equals(Enum进出库类型.出库))
                {
                    throw new Exception("条码" + barCode + "已出库!");
                }
                if (enum在库类别.Equals(Enum在库类别.在库) && enum进出库类型.Equals(Enum进出库类型.入库))
                {
                    throw new Exception("条码" + barCode + "已入库!");
                }
            }

            //  生成库存明细账
            sql = "INSERT INTO t_inventory_sub_ledger ( shop_id, ref_style_id, style_fabric_id, amount, bill_id, STYLE_SIZE_CD, create_date ) SELECT\n" +
                  shop_id + ",\n" +
                  "style_id,\n" +
                  "materials_id,\n";
            if (enum进出库类型.Equals(Enum进出库类型.出库))
            {
                sql += "-1,\n";
            }
            else
            {
                sql += "1,\n";
            }

            sql += "clothes_log_id,\n" +
                   "size_cd,\n" +
                   "now( ) \n" +
                   "FROM\n" +
                   "	a_noorder_print_p \n"+
                   "WHERE\n" +
                   "	clothes_log_id = '"+ barCode + "'";
            SQLmtm.ExecuteSql(sql);
            //  更新库存状态
            sql = "update a_noorder_print_p set dispath_type = '" + (int)getEnum在库类别(enum进出库类型) + "' WHERE clothes_log_id = '" + barCode + "'";
            SQLmtm.ExecuteSql(sql);
        }
示例#17
0
 public static void save设计点(String Style_Id, Dto尺寸 Dto尺寸)
 {
     SQLmtm.DoUpdate(
         "s_style_fit_r"
         , new string[] { "PHASE_CD", "ITEM_CD", "ITEM_VALUE", "FIT_VALUE", "FM_VALUE", "DELETE_FLAG", "VERSION", "CREATE_USER", "IN_VALUE", "OUT_VALUE" }
         , new string[] { "AUDIT_PHASE_CD-PHASE_CD_10", Dto尺寸.ITEM_CD, Dto尺寸.ITEM_VALUE, Dto尺寸.FIT_VALUE, Dto尺寸.FM_VALUE, "0", "1", "46", Dto尺寸.IN_VALUE, Dto尺寸.OUT_VALUE }
         , new string[] { "STYLE_ID" }
         , new string[] { Style_Id }
         );
 }
示例#18
0
        public static List <款式图片Dto> initStyleInfo(String flag, int page)
        {
            DataTable dt = SQLmtm.GetDataTable("SELECT\n" +
                                               " style.SYS_STYLE_ID AS styleId,\n" +
                                               " style.STYLE_CD \"styleEntity.styleCd\",\n" +
                                               " style.STYLE_NAME_CN \"styleEntity.styleNameCn\",\n" +
                                               " style.STYLE_CATEGORY_CD \"styleEntity.styleCategoryCd\",\n" +
                                               " style.STYLE_DRESS_CATEGORY \"styleEntity.styleDressCategory\",\n" +
                                               " style.STYLE_DESIGN_TYPE \"styleEntity.styleDesignType\",\n" +
                                               " style.STYLE_PUBLISH_CATEGORY_CD \"styleEntity.stylePublishCategoryCd\",\n" +
                                               " style.SYTLE_YEAR \"styleEntity.sytleYear\",\n" +
                                               " style.SYTLE_SEASON \"styleEntity.sytleSeason\",\n" +
                                               " style.STYLE_FIT_CD \"styleEntity.styleFitCd\",\n" +
                                               " material.MATERIAL_NAME_CN AS \"materialEntity.materialNameCn\",\n" +
                                               " material.MATERIAL_NAME_EN AS \"materialEntity.materialNameEn\",\n" +
                                               " material.material_id \"materialEntity.id\",\n" +
                                               " GROUP_CONCAT( DISTINCT material.MATERIAL_CODE ) \"materialEntity.materialCode\",\n" +
                                               " style.VERSION,\n" +
                                               " style.CREATE_USER,\n" +
                                               " style.STYLE_MAKE_TYPE \"styleEntity.styleMakeType\",\n" +
                                               " style.STYLE_SIZE_GROUP_CD \"styleEntity.styleSizeGroupCd\",\n" +
                                               " style.STYLE_SIZE_CD \"styleEntity.styleSizeCd\",\n" +
                                               " style.STYLE_FIT_BODY_TYPE \"styleEntity.styleFitBodyType\",\n" +
                                               " CONCAT( login_user.FIRST_NAME, login_user.LAST_NAME ) \"user.loginName\",\n" +
                                               " style.CREATE_DATE,\n" +
                                               " style.STYLE_SHOP_TOTAL_PRICE,\n" +
                                               " style.COVER_PHOTO_PATH \"styleEntity.coverPhotoPath\", \n" +
                                               "SUBSTRING_INDEX(style.COVER_PHOTO_PATH,'/',-1) AS picn," +
                                               " CONCAT('https://sshirtmtmbucket.oss-cn-zhangjiakou.aliyuncs.com/sshirtmtm/',SUBSTRING_INDEX(style.COVER_PHOTO_PATH,'/',-1)) AS picurl \n" +
                                               "FROM\n" +
                                               " s_style_p style\n" +
                                               " LEFT JOIN i_material_p material ON FIND_IN_SET( CAST( material.MATERIAL_ID AS CHAR ), style.SYTLE_FABRIC_ID )\n" +
                                               " LEFT JOIN a_login_user_p login_user ON login_user.LOGIN_USER_ID = style.CREATE_USER \n" +
                                               "WHERE\n" +
                                               " style.DELETE_FLAG = 0 \n" +
                                               " and style.ENABLE_FLAG = 1 \n" +
                                               " AND style.STYLE_NAME_CN IS NOT NULL \n" +
                                               "   AND style.STYLE_KBN != 'STYLE_SOURCE-STYLE_SOURCE_50' \n" +
                                               " AND ( style.SHOP_ID = 18 OR style.SHOP_ID = 0 )\n" +
                                               "AND style.STYLE_NAME_CN LIKE '%" + flag + "%'\n" +
                                               "GROUP BY\n" +
                                               " style.SYS_STYLE_ID \n" +
                                               "ORDER BY\n" +
                                               " style.UPDATE_DATE DESC \n"
                                               //+" LIMIT " + ((page - 1) * 42).ToString() + ",42"
                                               );
            List <款式图片Dto> 款式图片Dtos = new List <款式图片Dto>();

            foreach (DataRow dataRow in dt.Rows)
            {
                款式图片Dtos.Add(new 款式图片Dto(flag, dataRow));
            }

            return(款式图片Dtos);
        }
示例#19
0
 private void Frm打标_Load(object sender, EventArgs e)
 {
     this.searchLookUpEdit1.Properties.DataSource  = FabricService.GetAllMaterial();
     this.searchLookUpEdit款式.Properties.DataSource = StyleService.initStyleInfo("", 1);
     this.shop = SQLmtm.GetDataTable("SELECT * FROM  t_shop");
     foreach (DataRow dr in this.shop.Rows)
     {
         //this.chicun.Items.Add(Convert.ToString(dr["尺寸"]));
         this.shopname.Items.Add(Convert.ToString(dr["shop_name"]));
     }
 }
示例#20
0
        /// <summary>
        /// 面料log信息
        /// </summary>
        /// <returns></returns>
        public static DataTable GetMianLiaoLogDT()
        {
            String sql = "SELECT\n" +
                         "	* \n"+
                         "FROM\n" +
                         "	t_material_log AS ml\n"+
                         "	LEFT JOIN i_material_p AS ip ON ml.material_id = ip.MATERIAL_ID WHERE ml.enable_flag='1';";
            DataTable dt = SQLmtm.GetDataTable(sql);

            return(dt);
        }
示例#21
0
 /// <summary>
 /// 更改订单打印状态
 /// </summary>
 /// <param name="orderid"></param>
 /// <param name="b"></param>
 public static void UpdataOrderPrintFlag(String orderid, bool b)
 {
     if (b == true)
     {
         SQLmtm.DoUpdate("o_order_p", new string[] { "PRINT_FLAG" }, new string[] { "1" }, new string[] { "ORDER_ID" }, new string[] { orderid });
     }
     else
     {
         SQLmtm.DoUpdate("o_order_p", new string[] { "PRINT_FLAG" }, new string[] { "0" }, new string[] { "ORDER_ID" }, new string[] { orderid });
     }
 }
示例#22
0
        /// <summary>
        /// 去设计点信息
        /// </summary>
        /// <param name="itemcd">设计点</param>
        /// <param name="str">模糊查询字段</param>
        /// <returns></returns>
        public static List <设计点图片Dto> GetDesign(String itemcd, String str)
        {
            String sql = "SELECT\n" +
                         " a.DESIGN_ID id,\n" +
                         " a.STYLE_CATEGORY_CD styleCategoryCD,\n" +
                         " a.FILE_ID fileID,\n" +
                         " a.ITEM_CD itemCD,\n" +
                         " a.ITEM_VALUE itemValue,\n" +
                         " a.ITEM_NAME_CN itemNameCN,\n" +
                         " file.UPLOAD_FILE \"picn\",\n" +
                         " CONCAT( 'shirtmtm.com',file.FILE_PATH, file.UPLOAD_FILE ) \"picurl\",\n" +
                         " a.ITEM_NAME_EN itemNameEN,\n" +
                         " a.ITEM_NAME_JP itemNameJP,\n" +
                         " IFNULL( a.ITEM_COST, 0 ) itemCost,\n" +
                         " a.REMARKS remarks,\n" +
                         " a.ENABLE_FLAG enableFlag,\n" +
                         " a.DELETE_FLAG deleteFlag,\n" +
                         " a.HAVETO_FLAG haveToFlag,\n" +
                         " a.VERSION version,\n" +
                         " a.CREATE_DATE createDate,\n" +
                         " a.CREATE_USER \"createBy.id\",\n" +
                         " a.UPDATE_USER \"updateBy.id\",\n" +
                         " a.ITEM_SORT itemSort,\n" +
                         " a.ITEM_CATEGORY_CD itemCategoryCD,\n" +
                         " file.FILE_ID \"uploadFile.fileId\",\n" +
                         " file.FILE_SOURCE \"uploadFile.fileSource\",\n" +
                         " file.MODULE_KBN \"uploadFile.moduleKbn\",\n" +
                         " file.FTP_FILE \"uploadFile.ftpFile\",\n" +
                         " file.FILE_PATH \"uploadFile.filePath\",\n" +
                         " CONCAT( p.FIRST_NAME, p.LAST_NAME ) \"updateBy.firstName\" \n" +
                         "FROM\n" +
                         " a_designoption_p a\n" +
                         " LEFT JOIN a_login_user_p p ON a.UPDATE_USER = p.login_user_id\n" +
                         " LEFT JOIN w_upload_file_p file ON a.FILE_ID = file.FILE_ID \n" +
                         " LEFT JOIN a_ognization_desgin_r adr ON a.DESIGN_ID = adr.DESGIN_ID \n" +
                         "WHERE\n" +
                         " a.STYLE_CATEGORY_CD = 'STYLE_CATEGORY-SHIRT' and a.DESIGN_ID IN ( SELECT DESGIN_ID FROM a_shop_desgin_r WHERE SHOP_ID = 18 ) \n" +
                         " AND a.ITEM_CD='" + itemcd + "'\n" +
                         " AND a.DELETE_FLAG = 0 \n" +
                         " AND adr.OGNIZATION_ID = 95 \n" +
                         " AND (a.ITEM_VALUE LIKE '%" + str + "%' OR a.ITEM_NAME_CN LIKE '%" + str + "%') " +
                         "ORDER BY\n" +
                         " a.item_sort,\n" +
                         " a.UPDATE_DATE DESC";
            DataTable       dt        = SQLmtm.GetDataTable(sql);
            List <设计点图片Dto> 设计点图片dtos = new List <设计点图片Dto>();

            foreach (DataRow dr in dt.Rows)
            {
                设计点图片dtos.Add(new 设计点图片Dto(dr));
            }
            return(设计点图片dtos);
        }
示例#23
0
        /// <summary>
        /// 查询所有模板
        /// </summary>
        /// <returns></returns>
        public static DataTable GetTemplate()
        {
            String sql = "SELECT\n" +
                         "	ITEM_CD,\n"+
                         "	ITEM_VALUE AS template_id,\n"+
                         "	ITEM_NAME_CN AS template_name \n"+
                         "FROM\n" +
                         "	a_dict_p \n"+
                         "WHERE\n" +
                         "	ITEM_CD = 'MISSION_TEMPLATE'";

            return(SQLmtm.GetDataTable(sql));
        }
示例#24
0
        /// <summary>
        /// 根据id取面料信息
        /// </summary>
        /// <param name="SYTLE_FABRIC_ID"></param>
        /// <returns></returns>
        public static DataRow generateMaterialInfo(String SYTLE_FABRIC_ID)
        {
            String sql = "SELECT\n" +
                         "	MATERIAL_ID,\n"+
                         "	MATERIAL_NAME_CN,\n"+
                         "	MATERIAL_COLOR \n"+
                         "FROM\n" +
                         "	i_material_p \n"+
                         "WHERE\n" +
                         "	MATERIAL_ID = '"+ SYTLE_FABRIC_ID + "'";

            return(SQLmtm.GetDataRow(sql));
        }
示例#25
0
        /*
         * public static void uploadTaskFile(String taskId, String empId)
         * {
         *  OpenFileDialog ofd = new OpenFileDialog();
         *  ofd.Title = "请选择文件";
         *  ofd.Filter = "(*xlsx;*.xls;*.docx;*.doc;*.pdf)|*xlsx;*.xls;*.docx;*.doc;*.pdf";
         *  //ofd.ShowDialog();
         *  if (ofd.ShowDialog() == DialogResult.OK)
         *  {
         *      Byte[] byteArray = FileBinaryConvertHelper.File2Bytes(ofd.FileName);
         *      String fileStr = Convert.ToBase64String(byteArray);
         *
         *      String uuid = System.Guid.NewGuid().ToString("N");
         *      string sql = "insert into file (id,filename,file)"
         + " values('" + uuid + "'"
         + "         , '" + ofd.SafeFileName + "'"
         + "         , '" + fileStr + "'); ";
         +      DBUtil.ExecuteSQL(sql);
         +      sql = "update custom_appointment_assignee"
         + " set file_id = '" + uuid + "'"
         + " , status = '" + (int)EnumAssignment.已完成 + "'"
         + " where task_id = '" + taskId + "' and emp_id = '" + empId + "'; ";
         +      int i = DBUtil.ExecuteSQL(sql);
         +      //int i = DocService.UpdataMoBan(str, ofd.SafeFileName, fileName);
         +      if (i != 0)
         +      {
         +          MessageBox.Show("上传成功");
         +      }
         +  }
         + }*/
        /// <summary>
        /// 保存备注文档
        /// </summary>
        /// <param name="file"></param>
        /// <param name="fileName"></param>
        /// <param name="orderid"></param>
        public static void SaveRemarkFile(String file, String fileName, String orderid)
        {
            String sql = "SELECT * FROM t_remark WHERE order_id='" + orderid + "'";

            if (SQLmtm.GetDataRow(sql) == null)
            {
                SQLmtm.DoInsert("t_remark", new string[] { "order_id", "remark", "file_name" }, new string[] { orderid, file, fileName });
            }
            else
            {
                SQLmtm.DoUpdate("t_remark", new string[] { "remark" }, new string[] { file }, new string[] { "order_id" }, new string[] { orderid });
            }
        }
示例#26
0
        /// <summary>
        /// 取得设计点中文名
        /// </summary>
        /// <param name="itemValue"></param>
        /// <returns></returns>
        public static String GetNameCN(String itemValue)
        {
            DataRow dr = SQLmtm.GetDataRow("SELECT PROPERTY_NAME_CN FROM a_fit_property_p WHERE PROPERTY_VALUE='" + itemValue + "'");

            if (dr == null)
            {
                return("");
            }
            else
            {
                return(dr["PROPERTY_NAME_CN"].ToString());
            }
        }
示例#27
0
        /// <summary>
        ///  面料打印log信息写入
        /// </summary>
        /// <param name="id"></param>
        public static void InsertMianLiaoLog(String id)
        {
            DataRow dr = SQLmtm.GetDataRow("SELECT\n" +
                                           "	* \n"+
                                           "FROM\n" +
                                           "	t_material_log \n"+
                                           "WHERE\n" +
                                           "	material_id = "+ id + ";");

            if (dr == null)
            {
                SQLmtm.DoInsert("t_material_log", new string[] { "material_id", "enable_flag" }, new string[] { id, "1" });
            }
        }
示例#28
0
        private static List <尺寸呈现dto> GetThisSize(String STYLE_FIT_CD, String STYLE_CATEGORY_CD, String STYLE_SIZE_CD, String STYLE_SIZE_GROUP_CD, String Style_Id, Boolean isRef)
        {
            List <尺寸呈现dto> 尺寸呈现 = new List <尺寸呈现dto>();
            String         sql;

            if (!isRef)  //  是否标准款
            {
                sql = "SELECT\n" +
                      "	S1.*,\n" +
                      "	S2.* \n" +
                      "FROM\n" +
                      "	( SELECT * FROM a_size_fit_p WHERE FIT_CD = 'FIT_BODY_TYPE-1914F' AND STYLE_CATEGORY_CD = 'STYLE_CATEGORY-SHIRT' AND SIZE_CD = 'EGS_GROUP_SIZE-42' AND SIZEGROUP_CD = 'GROUP_SIZE-EGS_GROUP_SIZE' ) AS s1\n" +
                      "	LEFT JOIN ( SELECT * FROM a_reasonable_p WHERE styleID IN ( SELECT REF_STYLE_ID FROM s_style_p WHERE SYS_STYLE_ID = " + Style_Id + " ) ) AS s2 ON s1.ITEM_VALUE = s2.itemValue;";
            }
            else
            {
                sql = "SELECT\n" +
                      "	S1.*,\n" +
                      "	S2.* \n" +
                      "FROM\n" +
                      "	( SELECT * FROM a_size_fit_p WHERE" +
                      " FIT_CD = '" + STYLE_FIT_CD + "'" +
                      " AND STYLE_CATEGORY_CD = '" + STYLE_CATEGORY_CD + "'" +
                      " AND SIZE_CD = '" + STYLE_SIZE_CD + "'" +
                      " AND SIZEGROUP_CD = '" + STYLE_SIZE_GROUP_CD + "' ) AS s1\n" +
                      "	LEFT JOIN ( SELECT * FROM a_reasonable_p WHERE styleID = " + Style_Id + " ) AS s2 ON s1.ITEM_VALUE = s2.itemValue;";
            }

            DataTable dt = SQLmtm.GetDataTable(sql);

            foreach (DataRow dr in dt.Rows)
            {
                尺寸呈现.Add(
                    new 尺寸呈现dto(
                        dr["ITEM_CD"].ToString()
                        , dr["ITEM_VALUE"].ToString()
                        , ""
                        , ""
                        , Convert.ToDouble(dr["ITEM_FIT_VALUE"].ToString())
                        , 0
                        , 0
                        , dr["ITEM_NAME_CN"].ToString()
                        , Convert.ToDouble(dr["leastReasonable"].ToString() == "" ? "0" : dr["leastReasonable"].ToString())
                        , Convert.ToDouble(dr["maxReasonable"].ToString() == "" ? "0" : dr["maxReasonable"].ToString())
                        )
                    );
            }
            return(尺寸呈现);
        }
示例#29
0
        /// <summary>
        /// 根据条码取得入库信息
        /// </summary>
        /// <param name="LOG_ID"></param>
        /// <returns></returns>
        public static DataTable getStockInInfo(String LOG_ID)
        {
            String sql = "SELECT"
                         + " t_godown_bill.godown_code,"
                         + "	t_shop.shop_id,"
                         + "	t_shop.shop_name,"
                         + " t_godown_bill.godown_date"
                         + " FROM"
                         + "    t_godown_bill "
                         + " left join t_shop on t_godown_bill.shop_id = t_shop.shop_id"
                         + " WHERE"
                         + "    godown_id IN(SELECT godown_id FROM t_godown_entry WHERE barcode_id IN (SELECT id FROM a_product_log_p WHERE LOG_ID = '" + LOG_ID + "') ); ";

            return(SQLmtm.GetDataTable(sql));
        }
示例#30
0
        /// <summary>
        /// 查询未打印订单
        /// </summary>
        /// <param name="orderno"></param>
        /// <returns></returns>
        public static DataTable GetNotPrintedData(String orderno, DateTime startTime, DateTime endTime, int order_type)
        {
            String sql = "SELECT " +
                         "	*  "+
                         "FROM " +
                         "	v_order_with_type "+
                         "WHERE " +
                         "	ORDER_NO NOT IN ( SELECT ORDER_NO FROM a_product_log_p ) "+
                         "	AND ORDER_NO LIKE '%"+ orderno + "%' " +
                         " and ORDER_DATE between '" + startTime.ToString() + "' and '" + endTime.ToString() + "'" +
                         " and order_type ='" + order_type + "'" +
                         "	order by ORDER_DATE";

            return(SQLmtm.GetDataTable(sql));
        }