网站首页 关于我们 新闻中心 产品体系 客户服务 人力资源 在线咨询 联系我们
本月特价促销用友T3财务通普及版2500元,数量有限,先到先得。

T6知识库 当前位置:洛阳用友软件总代理|用友软件洛阳授权服务中心|洛阳用友软件代理商|洛阳凡客软件公司 - 新闻中心 - T6知识库
洛阳用友软件代理--用友餐饮通标准版  收银员报表查询提示截断字符串
发布:admin | 添加时间:2012/1/24 | 点击次数:1217
知识编号: 20035 问题版本: 61-用友餐饮通标准版
问题模块: 32-客户端管理 所属行业: 0-通用
解决方案: 2-最终解决方案 关 键 字: 7
适用产品: T6系列 补 丁 号:
开放状态: 原问题号:
标题: 收银员报表查询提示截断字符串
问题现象: 12月14日,收银员报表不能全部查询,单独查询可以但操作员5555刘江海不能查询。提示为:信息,其他信息。点击详细,提示为:将截断字符串或二进制数据同样的问题还出现于11月29日
原因分析:

操作员名称超长导致不能查询,实际名称为:刘江海(餐饮)

问题答案:

解决方法:

方法一:将操作员名称控制在6个字符以内。

方法二:在查询分析器中执行如下脚本

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

ALTER  PROCEDURE [sprecordcash]
(@begindate datetime ='2008-11-29',@enddate    datetime='2008-11-29',
 @pk_record_cash varchar(16)='',@bizcode  varchar(32)='01',@corp  varchar(32)='1001')
as
declare
  @kssj datetime,
  @jssj datetime,
  @paySql  varchar(1000),
  @restype varchar(1000),
  @Sql  varchar(8000),
  @begin varchar(20),
  @end varchar(20)
create table #Datas(
  pk                varchar(40) null,
  pk_record_cash    varchar(40) null,
  begintime         varchar(20) null,
  endtime           varchar(20) null,
  consname          varchar(120) null,
  conscode          varchar(60) null,
  金额              float null,
  笔数              int   null,
  discount          float null,
  premoney          float null,
  dismant           float null,
  accmoney          float null,
  serfeemoney       float null,
  othmoney          float null,
  invaddmoney       float null,
  resmoney          float null,
  invmoney          float null

)

  if (@corp is null) or (@corp='')  set @corp='%'
  else
  set  @corp=@corp+'%'
  if (@bizcode is null) or (@bizcode='')  set @bizcode='%'
  else set @bizcode=@bizcode+'%'
  if @bizcode='%'
  begin
    set @kssj=' 9:00:01'
    set @jssj=' 9:00:00'
  end
  else
  begin
    set @kssj=(select  top 1 min(Convert(char(10),fromtime,108)) from bd_biztype where bizcode like @bizcode  and pk_corp like @corp)
    set @jssj=(select  top 1 max(Convert(char(10),totime,108)) from bd_biztype where bizcode like @bizcode  and pk_corp   like @corp and fromtime>totime)
    if  @jssj is null
    set @jssj=(select  top 1 max(Convert(char(10),totime,108)) from bd_biztype where bizcode like @bizcode  and pk_corp   like @corp and fromtime<totime) 
  end
  if  @kssj<@jssj
  begin
    set @begin=Convert(char(10),@begindate,112)+@kssj
    set @end=Convert(char(10),@enddate,112)+@jssj
  end
  else
  begin
    set @begin=Convert(char(10),@begindate,112)+@kssj
    set @end=Convert(char(10),@enddate+1,112)+@jssj
  end
  if (@begin is null) or (@begin='')  set @begin=Convert(char(10),@begindate,112)+' 00:00:00'
  if (@end is null) or (@end='')  set @end=Convert(char(10),@enddate,112)+' 23:59:59'
  if (@pk_record_cash is null) or (@pk_record_cash='')  set @pk_record_cash='%'


  insert #Datas(pk,pk_record_cash,consname,conscode,金额,笔数)
  select a.pk_record_cash,isnull(b.name,'未知'),isnull(d.paymentname,'未知'),isnull(c.paymentcode,'zz'),sum(isnull(c.money,0)),count(a.pk_cash)  from so_shopping a
  left join SYSTEM_EIP..pub_operator b on b.operatorid=a.pk_record_cash
  left join so_shopping_b c            on c.pk_cash=a.pk_cash
  left join bd_payment    d            on d.paymentcode=c.paymentcode   and d.pk_corp=a.pk_corp
  where  isnull(a.bizcode,'') like @bizcode and a.cashtime between
  @begin and @end and isnull(a.pk_corp,'') like @corp  and a.pk_record_cash like @pk_record_cash
  group by a.pk_record_cash,isnull(b.name,'未知'),d.paymentname,c.paymentcode

  insert #Datas(pk,pk_record_cash,consname,conscode,金额,笔数)
  select pk,isnull(pk_record_cash,'未知'),'合计','zzzzzz',sum(isnull(金额,0)),sum(isnull(笔数,0)) from #Datas
  group by  pk,isnull(pk_record_cash,'未知')

  update #Datas set discount=(
  select sum(isnull(discount,0)) from so_shopping a
  where  isnull(a.bizcode,'') like @bizcode and a.cashtime between
  @begin and @end and isnull(a.pk_corp,'') like @corp  and  pk_record_cash=#Datas.pk
  )
 
  update #Datas set premoney=(
  select sum(isnull(premoney,0)) from so_shopping a
  where  isnull(a.bizcode,'') like @bizcode and a.cashtime between
  @begin and @end and isnull(a.pk_corp,'') like @corp  and  pk_record_cash=#Datas.pk
  )
 
  update #Datas set dismant=(
  select sum(isnull(dismant,0)) from so_shopping a
  where  isnull(a.bizcode,'') like @bizcode and a.cashtime between
  @begin and @end and isnull(a.pk_corp,'') like @corp  and  pk_record_cash=#Datas.pk
  )
 
  update #Datas set accmoney=(
  select sum(isnull(accmoney,0)) from so_shopping a
  where  isnull(a.bizcode,'') like @bizcode and a.cashtime between
  @begin and @end and isnull(a.pk_corp,'') like @corp  and  pk_record_cash=#Datas.pk
  )
 
  update #Datas set serfeemoney=(
  select sum(isnull(serfeemoney,0)) from so_shopping a
  where  isnull(a.bizcode,'') like @bizcode and a.cashtime between
  @begin and @end and isnull(a.pk_corp,'') like @corp  and  pk_record_cash=#Datas.pk
  )
 
  update #Datas set othmoney=(
  select sum(isnull(othmoney,0)) from so_shopping a
  where  isnull(a.bizcode,'') like @bizcode and a.cashtime between
  @begin and @end and isnull(a.pk_corp,'') like @corp  and  pk_record_cash=#Datas.pk
  )
 
  update #Datas set invaddmoney=(
  select sum(isnull(invaddmoney,0)) from so_shopping a
  where  isnull(a.bizcode,'') like @bizcode and a.cashtime between
  @begin and @end and isnull(a.pk_corp,'') like @corp  and  pk_record_cash=#Datas.pk
  )
 
  update #Datas set resmoney=(
  select sum(isnull(resmoney,0)) from so_shopping a
  where  isnull(a.bizcode,'') like @bizcode and a.cashtime between
  @begin and @end and isnull(a.pk_corp,'') like @corp  and  pk_record_cash=#Datas.pk
  )

  update #Datas set invmoney=(
  select sum(isnull(invmoney,0)) from so_shopping a
  where  isnull(a.bizcode,'') like @bizcode and a.cashtime between
  @begin and @end and isnull(a.pk_corp,'') like @corp  and  pk_record_cash=#Datas.pk
  )


 
  if convert(char(10),@begindate,112)=convert(char(10),@enddate,112)
  begin
  update #Datas set  begintime=(select top 1 convert(char(8),cashtime,108) from so_shopping a where  isnull(a.bizcode,'') like @bizcode and a.cashtime between
  @begin and @end and isnull(a.pk_corp,'') like @corp  and  pk_record_cash=#Datas.pk order by cashtime)
  update #Datas set  endtime=(select top 1 convert(char(8),cashtime,108) from so_shopping a where  isnull(a.bizcode,'') like @bizcode and a.cashtime between
  @begin and @end and isnull(a.pk_corp,'') like @corp  and  pk_record_cash=#Datas.pk order by cashtime desc)
  end
  else
  begin
  update #Datas set  begintime=(select top 1 convert(char(10),cashtime,111) from so_shopping a where  isnull(a.bizcode,'') like @bizcode and a.cashtime between
  @begin and @end and isnull(a.pk_corp,'') like @corp  and  pk_record_cash=#Datas.pk order by cashtime)
  update #Datas set  endtime=(select top 1 convert(char(10),cashtime,111) from so_shopping  a where  isnull(a.bizcode,'') like @bizcode and a.cashtime between
  @begin and @end and isnull(a.pk_corp,'') like @corp  and  pk_record_cash=#Datas.pk order by cashtime desc)
  end
  if @@rowcount>0
 begin
  print'0'
  exec AnalyData '#Datas','pk,pk_record_cash,begintime,endtime,
  discount,premoney,dismant,accmoney,serfeemoney,othmoney,invaddmoney,resmoney,invmoney',
  'consname','金额,笔数','conscode','pk_record_cash',1,'desc','sum'
  end
  else
  begin
  select * from #Datas
  print '1'
  end
  drop table #Datas

GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

 

打印本页 | 关闭窗口
上一篇:洛阳用友软件代理--用友餐饮通标...    下一篇:洛阳用友软件代理--用友餐饮通标...
 
新闻中心
公司新闻
常见问题
合作伙伴
T6知识库
软件新闻

关于我们
公司简介
公司环境
荣誉资质

联系方式

联系人:闫经理
销  售:13323795723
售  后:15036956099
网  址:ufida.3399china.com


我们做什么
用友软件

在线客服系统