找回密码
 注册账号

QQ登录

只需一步,快速开始

手机号码,快捷登录

手机号码,快捷登录

初学者课程:T3自学|T6自学|U8自学软件下载课件下载工具下载资料:通资料|U8资料|NC|培训|年结积分规则 | 使用常见问题Q&A
知识库:U8 | | NC | U9 | OA | 政务U8|U9|NCC|NC65|NC65客开|NCC客开新手必读 | 任务 | 快速增金币用友QQ群[微信群]
查看: 5271|回复: 7

[求助] U8 10.1升级U8 13.0 提示对象名 'vwNEfitemss' 无效。,怎么办?求助

[复制链接]
发表于 2019-4-29 16:04:48 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册账号

×
U8 10.1升级U8 13.0 提示对象名 'vwNEfitemss' 无效。
D:\U8SOFT\Admin\SQLFILE11000\Main\Ufdata\Structure\data_prv_ne_u1100patch1_nl.sql
错误信息:
-2147217865
对象名 'vwNEfitemss' 无效。

执行如下语句时出错:

create view NE_ReceiptPayVouch_View
as
        select  distinct   
        ReceiptPayVouch.ID,
        ReceiptPayVouch.Code,ReceiptPayVouch.Name,  
        ReceiptPayVouch.OperationTypeCode,NE_OperationType.Name as OperationTypeName,NE_OperationType.TypeID,  
        convert(nvarchar(20),ReceiptPayVouch.VoucherDate,23)as VoucherDate,  
        DeptID,department.cdepname as DeptName,PersonCode,personOperate.cpersonname as PersonName,  
        ReceiptPayVouch.Currency,ReceiptPayVouch.VoucherMoney,   
        ReceiptPayVouch.Used,ReceiptPayVouch.AgentID,  
        ReceiptPayVouch.MakerID,ReceiptPayVouch.PayState,ReceiptPayVouch.PayFinishDate,ReceiptPayVouch.IsNetPay,
        case isnull(ReceiptPayVouch.AuditorID,N'') when N'' then cuser_id else ReceiptPayVouch.AuditorID end as Auditor,  
        case isnull(ReceiptPayVouch.AuditInfo,N'')  when N''
                then (N'(' + (case [action] when 1 then N'同意' when 2 then N'不同意' end) +N')'+ opinion )   
                else ReceiptPayVouch.AuditInfo   
        end as AuditInfo,  
        convert(nvarchar(20),
                case isnull(OperationDate,N'') when N''
                        then ReceiptPayVouch.AuditDate   
                        else   
                                case [action] when 1 then OperationDate else ReceiptPayVouch.Auditdate
                        end   
                end,23)as AuditDate,  
        case when isnull(ReceiptPayVouch.MakerID,'')='' then 0 else 1 end as IsMakeVouch,  
        fitem.citem_name as ItemClassName,ItemClassID,ItemID,fitems.citemname as ItemName,
        bg_v_ctrlitem.cItemName as BudgetItemName,ReceiptPayVouch.BudgetItemID,
        ReceiptPayVouch.CusCode,ReceiptPayVouch.VenCode,cus.cCusName as CusName,ven.cVenName as VenName,
        ReceiptPayVouch.Port1,ReceiptPayVouch.Port1Value,ReceiptPayVouch.Port2,ReceiptPayVouch.Port2Value,
        ReceiptPayVouch.Port3,ReceiptPayVouch.Port3Value,ReceiptPayVouch.Port4,ReceiptPayVouch.Port4Value,
        ReceiptPayVouch.Port5,ReceiptPayVouch.Port5Value,ReceiptPayVouch.Port6,ReceiptPayVouch.Port6Value,  
        ReceiptPayVouch.cDefine1,ReceiptPayVouch.cDefine2,ReceiptPayVouch.cDefine3,ReceiptPayVouch.cDefine4,ReceiptPayVouch.cDefine5,  
        ReceiptPayVouch.cDefine6,ReceiptPayVouch.cDefine7,  
        ReceiptPayVouch.cDefine8,ReceiptPayVouch.cDefine9,ReceiptPayVouch.cDefine10,ReceiptPayVouch.cDefine11,ReceiptPayVouch.cDefine12,  
        ReceiptPayVouch.cDefine13,ReceiptPayVouch.cDefine14,ReceiptPayVouch.cDefine15,ReceiptPayVouch.cDefine16,
        Cast(ReceiptPayVouch.ts As bigint) as ts,ReceiptPayVouch.IsRedVouch   
        from   
        (   
                --借款单
                select  distinct
                        vouch.ID,vouch.Code,vouch.Name,  
                        vouch.OperationTypeCode,vouch.LoanDate as VoucherDate,  
                        vouch.DeptID,vouch.LoanPersonID as PersonCode,  
                        vouch.Currency,vouch.LoanMoney as VoucherMoney,  
                        vouch.MakerID,vouch.AgentID,vouch.Used,
                        vouch.AuditorID,vouch.AuditDate,vouch.AuditInfo,  
                        vouch.IsFinalAudit as IsAudit,vouch.AuditState,  
                        vouch.IsSettle,vouch.IsNetPay,vouch.PayState,vouch.PayFinishDate,
                        vouch.ItemClassID,vouch.ItemID,vouch.BudgetItemID,vouch.CusCode,vouch.VenCode,
                        vouch.Port1,vouch.Port1Value,vouch.Port2,vouch.Port2Value,
                        vouch.Port3,vouch.Port3Value,vouch.Port4,vouch.Port4Value,
                        vouch.Port5,vouch.Port5Value,vouch.Port6,vouch.Port6Value,
                        vouch.cDefine1,vouch.cDefine2,vouch.cDefine3,vouch.cDefine4,vouch.cDefine5,  
                        vouch.cDefine6,vouch.cDefine7,  
                        vouch.cDefine8,vouch.cDefine9,vouch.cDefine10,vouch.cDefine11,vouch.cDefine12,  
                        vouch.cDefine13,vouch.cDefine14,vouch.cDefine15,vouch.cDefine16,vouch.ts,0 as IsRedVouch
                from ne_loanvouch as vouch
                        inner join NE_LoanVouch_Sub as subVouch  
                                on vouch.ID = subVouch.LoanVouchID  
                where isnull(vouch.AuditorID,'')<>''
                        --IsNull(vouch.IsBegin ,0)= 0 And isnull(vouch.AuditorID,'')<>''
                union  
                ---报销单 付款(冲借款且有退还或补领信息)
                select distinct  
                        vouch.ID,vouch.Code,vouch.Name,  
                        vouch.OperationTypeCode,vouch.ExpenseDate as VoucherDate,  
                        vouch.DeptID,vouch.ExpenserID as PersonCode,  
                        vouch.Currency,vouch.ExpenseMoney as VoucherMoney,
                        vouch.MakerID,vouch.AgentID,vouch.Used,  
                        vouch.AuditorID,vouch.AuditDate,vouch.AuditInfo,  
                        vouch.IsFinalAudit as IsAudit,vouch.AuditState,
                        vouch.IsSettle,vouch.IsNetPay,vouch.PayState,vouch.PayFinishDate,
                        vouch.ItemClassID,vouch.ItemID,vouch.BudgetItemID,vouch.CusCode,vouch.VenCode,
                        vouch.Port1,vouch.Port1Value,vouch.Port2,vouch.Port2Value,
                        vouch.Port3,vouch.Port3Value,vouch.Port4,vouch.Port4Value,
                        vouch.Port5,vouch.Port5Value,vouch.Port6,vouch.Port6Value,  
                        vouch.cDefine1,vouch.cDefine2,vouch.cDefine3,vouch.cDefine4,vouch.cDefine5,  
                        vouch.cDefine6,vouch.cDefine7,  
                        vouch.cDefine8,vouch.cDefine9,vouch.cDefine10,vouch.cDefine11,vouch.cDefine12,  
                        vouch.cDefine13,vouch.cDefine14,vouch.cDefine15,vouch.cDefine16,
                        vouch.ts,vouch.IsRedVouch
                from ne_expenvouch as vouch
                        inner join NE_ExpenseVouch_Sub as subVouch
                                on vouch.ID=subVouch.ExpenseVouchID
                        inner join NE_ExpenseLoanInfo as expenseLoan
                                on vouch.ID=expenseLoan.ExpenseVouchID and isnull(expenseLoan.IsUsed,0)=0
                        inner join (
                                        select distinct expenseBalance.ExpenseVouchID from NE_ExpenseBalanceInfo as expenseBalance
                                        inner join NE_BalanceInfo as balance
                                                on expenseBalance.MainBalanceID=balance.ID and balance.IsVerify=1
                                                ) as expenseBalance
                                on vouch.ID=expenseBalance.ExpenseVouchID
                where  isnull(vouch.AuditorID,'')<>''
                union all
                select  distinct
                        vouch.ID,vouch.Code,vouch.Name,  
                        vouch.OperationTypeCode,vouch.ExpenseDate as VoucherDate,  
                        vouch.DeptID,vouch.ExpenserID as PersonCode,  
                        vouch.Currency,vouch.ExpenseMoney as VoucherMoney,
                        vouch.MakerID,vouch.AgentID,vouch.Used,  
                        vouch.AuditorID,vouch.AuditDate,vouch.AuditInfo,  
                        vouch.IsFinalAudit as IsAudit,vouch.AuditState,
                        vouch.IsSettle,vouch.IsNetPay,vouch.PayState,vouch.PayFinishDate,
                        vouch.ItemClassID,vouch.ItemID,vouch.BudgetItemID,vouch.CusCode,vouch.VenCode,
                        vouch.Port1,vouch.Port1Value,vouch.Port2,vouch.Port2Value,
                        vouch.Port3,vouch.Port3Value,vouch.Port4,vouch.Port4Value,
                        vouch.Port5,vouch.Port5Value,vouch.Port6,vouch.Port6Value,  
                        vouch.cDefine1,vouch.cDefine2,vouch.cDefine3,vouch.cDefine4,vouch.cDefine5,  
                        vouch.cDefine6,vouch.cDefine7,  
                        vouch.cDefine8,vouch.cDefine9,vouch.cDefine10,vouch.cDefine11,vouch.cDefine12,  
                        vouch.cDefine13,vouch.cDefine14,vouch.cDefine15,vouch.cDefine16,
                        vouch.ts,vouch.IsRedVouch
                from ne_expenvouch as vouch
                        inner join NE_ExpenseVouch_Sub as subVouch
                                on vouch.ID=subVouch.ExpenseVouchID
                where  isnull(vouch.AuditorID,'')<>''
                        and vouch.ID not in(select distinct ExpenseVouchID from NE_ExpenseLoanInfo where isnull(IsUsed,0)=0)
) as ReceiptPayVouch  
        left join NE_OperationType
                on ReceiptPayVouch.OperationTypeCode=NE_OperationType.Code   
        left join department
                on ReceiptPayVouch.DeptID=department.cdepcode   
        left join person personOperate
                on ReceiptPayVouch.PersonCode=personOperate.cpersoncode
        left join bg_v_ctrlitem
                on ReceiptPayVouch.BudgetItemID=bg_v_ctrlitem.cItemCode  
        left join fitem
                on ReceiptPayVouch.ItemClassID=fitem.citem_class   
        left join vwNEfitemss as fitems   
                on fitem.citem_class=fitems.citem_class and ReceiptPayVouch.ItemID=fitems.citemcode   
        LEFT JOIN Customer cus
                on cus.cCusCode = ReceiptPayVouch.CusCode   
        LEFT JOIN Vendor ven
                on ven.cVenCode = ReceiptPayVouch.VenCode  
        --Left join WFAudit
        --        on VoucherId = CONVERT(varchar(40), ReceiptPayVouch.ID)   
        --                and operationdate = (
        --                        select max(operationdate) from WFAudit with(nolock)
        --                        where VoucherId = CONVERT(varchar(40), ReceiptPayVouch.ID))   
        --***********************************************
        --万伟星优化效率  提高三倍
        Left join  (
                        select a.VoucherID,a.operatorid,a.[action],a.opinion,a.OperationDate from WFAudit a  with(nolock) inner join (
                                        select VoucherID,max(operationdate) as operationdate from WFAudit with(nolock) where VoucherID in
                                        (
                                            --借款单
                                                select   
                                                        CONVERT(varchar(40), ID)
                                                from ne_loanvouch  with(nolock)
                                                where IsNull(IsBegin ,0)= 0
                                                        And isnull(AuditorID,'')<>''
                                                union  
                                                --报销单 付款   
                                                select   
                                                        CONVERT(varchar(40), ID)
                                                from ne_expenvouch with(nolock)
                                                where  isnull(AuditorID,'')<>''  
                                        ) group by VoucherID ) b
                                on a.VoucherID=b.VoucherID and a.operationdate=b.operationdate
        ) WFAudit on VoucherId = CONVERT(varchar(40), ReceiptPayVouch.ID)   
        --***********************************************
        left join UserHrPersonContro
                on cPsn_num = operatorid   


 楼主| 发表于 2019-4-29 20:40:17 | 显示全部楼层
问题已搞定,就是fiftem里面没有数据造成的
回复 点赞 拍砖

使用道具 举报

发表于 2019-7-26 23:59:20 | 显示全部楼层
有点专业精神好么,别人搜到了你就写个已经搞定,到底怎么解决的,贴一下啊
回复 点赞 拍砖

使用道具 举报

发表于 2019-7-27 02:42:11 | 显示全部楼层
准确说就是把没问题的账套库fiftem表里的数据全部复制到有问题的账套库该表里就行了,补充完毕。
回复 点赞 拍砖

使用道具 举报

发表于 2019-7-27 02:43:29 | 显示全部楼层
有效的年度账数据库FITEM表里

的内容复制到问题年度账数据库里那张表里即可
回复 点赞 拍砖

使用道具 举报

发表于 2019-7-27 02:43:55 | 显示全部楼层
有效的年度账数据库里那个表里

的内容复制到问题年度账数据库里那张表里即可
回复 点赞 拍砖

使用道具 举报

  • 打卡等级:无名新人
  • 打卡总天数:1
  • 打卡月天数:0
  • 打卡总奖励:3
  • 最近打卡:2024-10-07 18:11:01
发表于 2019-7-28 16:37:55 | 显示全部楼层
好好学习,天天向上!
回复 点赞 拍砖

使用道具 举报

  • 打卡等级:无名新人
  • 打卡总天数:3
  • 打卡月天数:3
  • 打卡总奖励:5
  • 最近打卡:2024-11-20 15:33:44
发表于 2019-10-22 15:45:58 | 显示全部楼层
好好学习,天天向上。。。。。。。。。。。。
回复 点赞 拍砖

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号

本版积分规则

QQ|站长微信|Archiver|手机版|小黑屋|用友之家 ( 蜀ICP备07505338号|51072502110008 )

GMT+8, 2024-11-25 05:44 , Processed in 0.052587 second(s), 10 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表