Description of the database structure eshop5

Table Name Explanation
loginlogs Login log, time, IP, state
mess_t_sys_system SMS settings
mess_t_vip_message SMS, membership, time, content, status
pbcatcol Column Name
RptBranchSaleRank Sales Monthly Report
RptCommen Operation inquiries, sales, sales targets, sales completion rate
RptItemSaleRankTop10 Sales of the top 10?
t_au_project_master Business code, name, table name (eg: PI, Purchase Receipt, t_pm_sheet_master)
t_bd_branch_area Region Table
t_bd_branch_info  Institutions (warehouse) table
t_bd_branch_info_weixin Institutions (warehouse) micro-channel user list?
t_bd_basecode_type Base code - custom attributes (the reason to adjust inventory, inventory reason for the difference, color size, etc.)
t_bd_base_code Base code - custom attributes (the reason to adjust inventory, inventory reason for the difference, color, etc. size) breakdown of
t_bd_item_brand List
t_bd_item_cls Category Table
t_bd_item_cls_weixin Category Table micro-channel mall?
t_bd_item_combsplit Split combination product table (trade component set), bar code, number of components
t_bd_item_info  Product Profile
base_sn_flag: 1 to check the serial number management, is canceled 0
measure_flag: 0 Normal, 1 weight, count 2
sale_flag: Goods state only for Headquarters (store is t_pc_branch_price)
t_bd_item_info_weixin Product Profile micro-channel?
t_bd_item_place Shelf cargo space
t_bd_item_update_flow Barcode update the water table (business did not happen goods must not be modified)
t_bd_payment_info Payment (accounting codes)
t_bd_supcust_cls Regional suppliers and customers area
t_bd_supcust_info Supplier and customer lists
t_bd_supcust_item  Barcode and supplier or customer correspondence
t_bd_vip_tag Member tags
t_da_branch_daysum Daily sales agencies (including return), such as the headquarters of the actual wholesale, stores the actual sales
t_da_jxc_daysum  Invoicing Daily Report
t_da_jxc_month  Invoicing month Table
t_da_jxc_month _anal  Invoicing analysis of the lunar surface
t_da_jxc_week  Invoicing Week Table
t_da_sale_target sales target
t_fm_cash_detail Branch Fee Details
t_fm_cash_master The total cost of store documents details
t_fm_charge_detail Details of stores and pre-payment of fees
t_fm_charge_master Franchise fees and pre-payment of primary documents
t_fm_internal_flow Franchise fees flowing water (pre-payment, the initial fee, direct transfer to join the library to store)
t_fm_recpay_detail Customer billing and settlement franchise table (amount actually paid)
t_fm_recpay_fl_detail Franchise potential buyers rebate details (how much to buy how much rebate)
t_fm_recpay_fl_master Franchise potential buyers rebate documents (which corresponds to the franchise, start and end dates, etc.)
t_fm_recpay_flow Supplier current accounts, buckle up single, wholesale sales, wholesale returns and water
t_fm_recpay_master Customer billing and settlement franchise master table
t_im_branch_stock Agency correspondence goods inventory table
t_im_check_detail Stocktaking single number that corresponds to this single number, price, inventory number, line number, etc.
t_im_check_init Lot inventory (inventory numbers apply)
t_im_check_master Corresponding to a single physical inventory count Lot No.
t_im_check_sum Inventory batch counterpart, number, price, inventory quantity, number of inventory
t_im_checkrecord_detail Pre disc corresponding to the document number price NO
t_im_checkrecord_master Pre-master disc a single number
t_im_comb_split_detail NO homography detail split combination, quantity, price
t_im_comb_split_master Split composition homography combined product, quantity, unit
t_im_flow 库存流水表(所有库存变动的各类单据,基本涉及所有业务流水)
t_im_sheet_master  配送等单据主表(直调出库、入库、库存调整、店间直调申请单等)
t_im_sheet_detail 配送等单据明细表
t_im_stock_target 商品存量指标(库存上限下限与库位名称)
t_kb_sheet_master 扣补单主表
t_kb_sheet_detail 扣补单明细表
t_order_bill_weixin 微信订单表?
t_pc_branch_price 机构档案价格明细表(数量=商品档案*多少个机构部门)
saleflag:0正常、1停售、2淘汰、3停购
t_pc_price_flow_detail 成本调价单与调价单(零售价等)的明细表
t_pc_price_flow_master 成本调价单与调价单(零售价等)的主表
t_pm_sheet_detail 采购收货(PI)、采购退货(RO)、采购订单(PO)、要货单(DY)明细单
t_pm_sheet_master 采购收货(PI)、采购退货(RO)、采购订单(PO)、要货单(DY)主表
t_rm_daysum 前台商品销售日结表
t_rm_function 前台快捷键设置
t_rm_gzcustomer 挂账客户的详情流水表(客户资料、挂账金额、回款标识和付款金额)
t_rm_gzcustomer_temp 挂账客户的资料表
t_rm_payflow 收银付款流水
t_rm_payflow_ws 会员的收银付款流水
t_rm_payin_detail 缴款单明细
t_rm_payin_master 缴款单主表
t_rm_plan_branch 促销方案(对应门店)
t_rm_plan_detail 促销方案规则
t_rm_plan_flow 促销方案明细
t_rm_plan_master 促销方案主表
t_rm_plan_rule 促销规则(系统自带)
t_rm_saleflow 销售流水明细(销售、退货、赠送)
t_rm_tend_luggage_info 寄存查询明细表(寄存,取货)A寄存、B提货、C完结
t_rm_vip_acclist 会员积分流水明细
t_rm_vip_discount 积分折扣(多少积分打几折)
t_rm_vip_good 会员礼品管理明细,多少积分换什么礼品
t_rm_vip_info 会员的明细表
t_rm_vip_info_tag 会员标签,对应的是tag_id,标签对应会员卡号
t_rm_vip_operlist 换卡操作
t_rm_vip_savelist 会员的积分转储值、储值卡充值、换卡转入转出金额等流水
t_rm_vip_saveset 储值卡的设置
t_rm_vip_type 会员等级(类型)
t_rm_vipcumalativefullgift_branch 会员累计买满赠对应门店号
t_rm_vipcumalativefullgift_detail 会员累计买满赠的商品明细
t_rm_vipcumalativefullgift_master 会员累计买满赠主表(操作时间与结束时间等)
t_rm_vipcumalativefullgift_info 会员与买满赠商品明细
t_rm_vipscoregift_branch 积分赠送单对应门店号
t_rm_vipscoregift_detail 积分赠送单号对应赠送类别
t_rm_vipscoregift_master 积分赠送单主表
t_rm_vipscorerule_branch 积分规则单对应门店号
t_rm_vipscorerule_detail 积分规则单的类别和对应几倍积分
t_rm_vipscorerule_master 积分规则单主表
t_rm_vipscorerule_saleflow 积分规则单下销售流水明细
t_sys_code_desc 系统的一些项(表名-列名等操作代码)
t_sys_menu 系统所有菜单(菜单ID和名称)以及对应的网址和角色权限
t_sys_oper_roles 用户对应着的角色ID
t_sys_operator 用户管理表(用户基本信息、POS权限、价格权限、数据权限),比如修改价格权限:
UPDATE t_sys_operator SET price_grant='111111' WHERE  oper_id in(SELECT oper_id FROM t_sys_oper_roles where role_id='06')
t_sys_operator_log 用户操作日志
t_sys_pos_status POS机登记
t_sys_role 角色对应门店号表
t_sys_role_grant 角色对应菜单权限表
t_sys_sheet_no 单据代码相关信息
t_sys_sheetno_flow 单据代码门店号流水
t_sys_system 系统,POS前台等相关功能的增加设置
t_sys_system_branch POS收银机上传上来的加密配置,branch_no、pos_id、filebody、memo
t_sys_zjm 助记码表
t_tool_operator_log eshop系统监控中心的日志
t_vip_birthday_plan_master 会员生日促销单主表
t_vip_birthday_plan_detail 会员生日促销的明细类别
t_vip_birthday_plan_branch 会员生日促销对应门店号
t_vip_mk_plan_master 精准营销方案表
t_vip_mk_plan_item 精确营销方案赠品条码与数量
t_vip_mk_plan_vip 精准营销方案单据对应会员
t_wm_sheet_detail 批发销售和退货的单据对应商品明细
t_wm_sheet_master 批发销售和退货的单据表
t_wx_vip_bindflow 微会员绑定的流水表
wxf 微信支付流水
wxsf_vip_info 微会员的相关信息

代码单据t_sys_sheet_no    
AO    分店费用单
AP    店间直调申请单
CP    供应商结算单
CS    组合拆分单
DI    直调入库单
DO    直调出库单
DP    供应商对账单
DX    扣率代销账款单
DY    要货单
FC    客户费用单
FG    供应商费用单
FL    加盟店买货返利
HB    加盟店预收款单
IO    转仓单
JK    缴款单
JO    报损单
KB    扣补单
LY    联营帐款单
MK    精准营销方案单
MM    派奶单
NG    加盟店费用
OO    库存调整单
PB    供应商预付款
PC    成本调价单
PD    盘点差异处理单
PF    促销进价单
PI    采购收货单
PO    采购订单
PS    促销活动,特价单
PX    零售调价单
RC    客户预收款
RI    批发退货单
RO    采购退货单
RP    客户结算单
RV    会员结算单
SO    批发销售单
SS    批发订单
ZP    加盟店结算
GZ    挂账的客户档案 

杂项SQL

前台开启内存缓存
insert into t_sys_system (sys_var_id,sys_var_name,sys_var_value)
values( 'pos_memory_cache','前台开启内存缓存','1' )

insert into t_sys_system (sys_var_id,sys_var_name,sys_var_value) 
values( 'add_salebaseprice','库存查询添加售价和批发价','1' ) 

insert into t_sys_menu(menu_id,branch_flag,menu_name,menu_code,menu_type,open_parameter,normal_flag)
 values('F150','110000','销售及进货情况分析','ProCode/SalePurQuery.htm','REPT','查询商品销售和采购情况','F1')

insert into t_sys_menu(menu_id,branch_flag,menu_name,menu_code,menu_type,open_parameter,normal_flag,menu_order) 
values('D250','110000',' 销售及进货情况分析 ','~/WebPages/Rpt/RptSalePur.aspx','REPT',NULL,'D2',85)


insert into t_sys_system(sys_var_id,sys_var_name,sys_var_value) 
values('add_do_supname','开启直调出库单增加供应商','1')

按单退货按原单金额比例扣除积分 
insert into t_sys_system(sys_var_id,sys_var_value) 
values('vipacc_rebyrate','1')

分组查询出重复收银流水(流水单和流水单里的流水id一起分组)

SELECT  flow_no,flow_id,count(1) as cnt FROM t_rm_payflow 
group by flow_no,flow_id having count(1)>=2

SQL存储过程的执行效率

SELECT TOP 100 name, last_execution_time, execution_count, total_elapsed_time, last_worker_time, D.total_elapsed_time/D.execution_count, *
FROM SYS.procedures S JOIN SYS.dm_exec_procedure_stats D
ON S.object_id=D.object_id
--where name like 'pr_t_im_flow_pt%'
--where execution_count >= 100
ORDER BY D.total_elapsed_time/D.execution_count DESC

正常的item拷贝到新的收银机里面时,会出现重新下载的情况,如何避免?

将sale数据库里的t_sys_cm_ts表里的t_bd_item_info字段bk_ts的值替换到新的收银机里面的这个值

发布了46 篇原创文章 · 获赞 9 · 访问量 3667

Guess you like

Origin blog.csdn.net/weixin_41896770/article/details/100338289