[dbo].[st_MES_MonitorMachine]

--------------------------------------------

USE [ChiefMESNew]
GO

/****** Object: StoredProcedure [dbo].[st_MES_MonitorMachine] Script Date: 05/15/2015 17:18:49 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

/*************
creator: Wuchun
create date: 2012.12.17
Module Code: 100001
Remark: 按车间显示机器监视
//增加试模工单显示 by Wuchun on 2014/03/17
//增加停机刷卡表,提高性能 on 2014/04/10
//试模不显示未刷卡停机,显示试模中断
//良品数=生产数加上调机时的生产数再减去巡机数 2014.7.22 hz
//添加返回判断维修结果RepairStatus 2014.8.5 hz
//机台根据工作中心查询,把left join 修改为inner join 2015-5-12 hz

exec st_MES_MonitorMachine '','','','', 'zh_cn',100,1
**************/
ALTER proc [dbo].[st_MES_MonitorMachine] (
@in_StaCode varchar(20) = '',
@in_WsCode varchar(20) = '', --车间代码
@in_MachineState varchar(10) = '', --机器状态
@in_MachineNo varchar(20) = '', --机器编号
@in_Lan varchar(10) = 'zh_cn', --多语言
@in_pagesize smallint = -1,
@in_page smallint = 1,
@out_total_rows int = 1 output
)
as
begin

if object_ID('tempdb..#tempTable') is not null drop table #tempTable
set nocount on
CREATE TABLE #tempTable
(
RowSeq int identity(1,1),
MachineNo varchar(50),
DeviceStatus varchar(20),
WSCode varchar(20),
MO varchar(20),
DispatchNO varchar(50),
DispatchPrior float,
LiveCycle decimal(18,2),
GoodQty int,
BadQty int,
ClientIP varchar(20),
BeginCycle datetime,
StopReason varchar(100),
StopTime varchar(1000),
MouldNO varchar(50),
ItemNO varchar(50),
MES_COMQuality int default(0),
CardEmployee varchar(50),
StopBegin datetime,
RepairStatus int
)
DECLARE @MachineNO varchar(50),@WsCode varchar(20),@IPAddr varchar(20),@EndCycle char(22),@DispatchNO varchar(50),
@MO varchar(50), @DispatchPrior float, @MouldNO varchar(50),
@Cycle decimal(18,2), @StandCycle decimal(18,2), @MinInjectionCycle decimal(18,2),
@MaxInjectionCycle decimal(18,2),
@BeginCycle char(19), @ItemNO varchar(50), @ReasonName varchar(50), @Unknown varchar(2000),
@AbNormalProduct varchar(2000),@NotStarted varchar(2000), @RegularProduct varchar(2000),
@StopTime int, @StopTime1 int,@CardEmployee varchar(50), @StopBegin datetime
declare @txt_NOOrder varchar(200), @txt_BrokenNetWork varchar(200), @txt_SM varchar(200),
@MOType int,@proQty int, @DispatchStatus int
if (@in_Lan = 'zh_cn') set @in_Lan = 'zh_cn'

select @AbNormalProduct=case @in_Lan
when 'zh_cn' then Lan_CN
when 'en' then Lan_EN
else ''
end
from Sys_Language
where keyname='txt_AbNormalProduct'

select @NotStarted = case @in_Lan
when 'zh_cn' then Lan_Cn
when 'en' then Lan_En
else ''
end
from Sys_Language
where keyname='txt_NotStarted'

select @RegularProduct=case @in_Lan
when 'zh_cn' then Lan_Cn
when 'en' then Lan_En
else ''
end
from Sys_Language
where keyname='txtRegularProduct'

select @Unknown=case @in_Lan
when 'zh_cn' then Lan_Cn
when 'en' then Lan_En
else ''
end
from Sys_Language
where keyname='txt_Unknown' --未刷卡停机

select @txt_NOOrder=case @in_Lan
when 'zh_cn' then Lan_Cn
when 'en' then Lan_En
else ''
end
from Sys_Language
where keyname='txt_NOOrder'

select @txt_BrokenNetWork=case @in_Lan when 'zh_cn' then Lan_Cn when 'en' then Lan_En else '' end
from Sys_Language
where keyname='txt_BrokenNetWork'

select @txt_SM=case @in_Lan when 'zh_cn' then Lan_CN when 'en' then Lan_EN else '' end
from Sys_Language
where keyname='txt_MonitorSM'
----------------------------------------------------------------------------------------
--获取停机卡
select *
into #t_StopCardDetail
from V_CardDetail a
WHERE a.Flag = 1 and a.EndDate is null

declare @Normal_Count int , @abNormal_Count int, @Stop_Count int, @NoOrder_count int, @NONetWork_Count int
declare @MaxUploadDate datetime , @MES_COMQuality int, @txt_Unknow varchar(200)

declare @TotalNum int, @UploadTime datetime, @lastMociEndCycle datetime, @LastMociTotalnum int
--Black 未开机
--Normal 正常
insert into #tempTable(MachineNO, DeviceStatus, WSCode, MO, DispatchNO
, DispatchPrior, LiveCycle, GoodQty, BadQty, ClientIP,
BeginCycle, StopReason, MES_COMQuality,StopTime,StopBegin,RepairStatus)

select mm.MachineNO,
case when isnull(datediff(minute, mm.COMTime, getdate()),2)>1 then 'NONetWork' else 'Stop' end,
mm.WsCode, '', '', 0.00, 0.00, 0, 0, ci.IPAddr, null,
case when isnull(datediff(minute, mm.COMTime, getdate()),2)>1 then @txt_BrokenNetWork else @Unknown end,
case when isnull(datediff(minute, mm.COMTime, getdate()),2)>1 then 0 else isnull(mm.MES_COMQuality,0) end,
'',
case when isnull(datediff(minute, mm.COMTime, getdate()),2)>1 then mm.COMTime else null end,
mm.RepairStatus
FROM MES_Machine mm
inner join dbo.FN_GetStaCode(@In_StaCode) ws on mm.StaCode = ws.StaCode
left join MES_Communication ci on ci.MachineNo=mm.MachineNo
where --(@in_StaCode = '' or ws.StaCode = @In_StaCode) and
(@in_MachineNO = '' or mm.MachineNO = @in_MachineNO)
order by ci.IPAddr desc --mm.MachineNO asc

DECLARE @Today char(10)
SET @Today=convert(char(10),getdate(),120)
IF EXISTS(select CURSOR_NAME from MASTER.dbo.syscursors where cursor_name='cursor_outer')
BEGIN
DEALLOCATE cursor_outer
END
DECLARE cursor_outer CURSOR FOR
select distinct m.clientIP, MES_COMQuality from #tempTable m
--where MES_COMQuality > 0
--where convert(char(10), m.endcycle,120)=@Today
OPEN cursor_outer
FETCH next FROM cursor_outer INTO @IPAddr,@MES_COMQuality --@DispatchOrder,@IPAddr,@EndCycle
while @@fetch_status=0
BEGIN
select @ReasonName='',@MO='', @DispatchNO='',@CardEmployee = '', @StopBegin = null

select top 1 @MO = MO,
@DispatchNO = DispatchNO,
@DispatchPrior = DispatchPrior,
@EndCycle=EndCycle, @Cycle=isnull(CycleTime,0.00)
, @BeginCycle = convert(char(19),EndCycle,121) , @Totalnum = Totalnum
from MES_DataMain
where clientip = @IPAddr
and convert(char(10),endcycle,120)<=@Today
order by EndCycle desc --最后结束时间 ,生产周期

--select top 1 @StandCycle=isnull(StandCycle,0.00),@proQty=prodqty, @ItemNO=ItemNO,
--良品数=生产数加上调机时的生产数再减去巡机数 2014.7.22 hz
select top 1 @StandCycle=isnull(StandCycle,0.00),
@proQty=prodqty+dbo.FN_GetAdjustMachineQty(Mo,DispatchNo,ItemNO,DispatchPrior, '', '','',ProcCode)-
dbo.FN_GetPatrolMachineOrPolishQty(MO,DispatchNo,ItemNO,ProcCode,DispatchPrior,'', '',1),
@ItemNO=ItemNO,
@MinInjectionCycle=ISNULL(MinCycle,0.00),
@MaxInjectionCycle=ISNULL(MaxCycle,0.00), @MouldNO = MouldNO, @MOType = isnull(MOType,1),
@DispatchStatus = DispatchStatus
from MES_Dispatchorder
where MO = @MO and DispatchNO = @DispatchNO and DispatchPrior = @DispatchPrior
order by ID

set @txt_Unknow = @Unknown
--最后一个单子不是主单则重新获取主单信息
if(@DispatchStatus <> 1)
begin
select @MachineNO = machineno from MES_Communication where IPAddr = @IPAddr
--select top 1 @StandCycle=isnull(StandCycle,0.00),@proQty=prodqty, @ItemNO=ItemNO,
--良品数=生产数加上调机时的生产数再减去巡机数 2014.7.22 hz
select top 1 @StandCycle=isnull(StandCycle,0.00),
@proQty=prodqty+dbo.FN_GetAdjustMachineQty(Mo,DispatchNo,ItemNO,DispatchPrior, '', '','',ProcCode)-
dbo.FN_GetPatrolMachineOrPolishQty(MO,DispatchNo,ItemNO,ProcCode,DispatchPrior,'', '',1), @ItemNO=ItemNO,
@MinInjectionCycle=ISNULL(MinCycle,0.00),
@MaxInjectionCycle=ISNULL(MaxCycle,0.00), @MouldNO = MouldNO, @MOType = isnull(MOType,1),
@DispatchStatus = DispatchStatus
from MES_Dispatchorder
where MachineNO = @MachineNO and DispatchStatus = 1
order by ID
end
if (@MOType = 2) set @txt_Unknow = @txt_SM

---连接中断也显示派工单信息
if @MES_COMQuality = 0
begin
update #tempTable set MO = @MO,DispatchNo = @DispatchNO, DispatchPrior = @DispatchPrior
where ClientIP=@IPAddr
FETCH NEXT FROM cursor_outer INTO @IPAddr, @MES_COMQuality
continue
end

if @DispatchNO not like 'TMP%' and @DispatchNO <> ''
begin --------派工单号为??????号时 ---注塑车间改为固定的100秒
if exists(select top 1 clientIP from MES_DataMain a
join MES_Machine b on a.MachineNo = b.MachineNO
left join MES_Process p on a.ProcCode = p.ProcCode
where datediff(second,case when abs(datediff(year,a.EndCycle,GETDATE()))>1 then GETDATE() else a.EndCycle end,getdate())>
case when isnull(@StandCycle,1)*3<90 then 90 else isnull(@StandCycle,1)*3 end
and a.MO = @MO and a.DispatchNO =@DispatchNO and a.DispatchPrior = @DispatchPrior and a.clientIP=@IPAddr
order by a.EndCycle desc) --系统时间大于最后生产时间+(3模*周期或周期小于90秒,则取90秒) 则停机
begin

select @MaxUploadDate = max(updatetime) from MES_DataMain where ClientIP = @IPAddr

if datediff(minute, isnull(@MaxUploadDate,getdate()), getdate())<2 and @MaxUploadDate is not null
and datediff(minute, @EndCycle, @MaxUploadDate)>2
begin
update #tempTable set DeviceStatus='Normal', MES_COMQuality = 5 , ItemNO = @ItemNO
, StopReason = '补数', MO = @MO, DispatchNo = @DispatchNO, DispatchPrior = @DispatchPrior ,MouldNO = @MouldNO
, GoodQty = @proQty--dbo.FN_GetGoodQty(@MO, @DispatchNO, @ItemNO, '', @DispatchPrior,'','')
where ClientIP=@IPAddr
end
else
begin
select top 1 @ReasonName=case @in_Lan when 'zh_cn' then c.Lan_CN when 'en' then c.Lan_EN else '' end ,
@StopBegin= a.StartDate, @CardEmployee = dbo.FN_GetEmpNameByID(case when isnull(a.StartEmpID,'')<>'' then a.StartEmpID else a.StartCardID end )
from #t_StopCardDetail a
join Sys_PubCode b on b.ModuleCode = 'All' and b.FieldName = 'FuncID' and a.CardType = b.FieldValue
left join Sys_Language c on c.KeyName = b.KeyName
WHERE a.ClientIP = @IPAddr
order by a.ID desc

set @StopTime1 = -1
if @ReasonName <> ''
begin
select top 1 @StopTime=datediff(MINUTE,@StopBegin, GETDATE())
end
else
begin
select top 1 @StopTime=datediff(ss,case when abs(datediff(year,EndCycle,GETDATE()))>1 then GETDATE()
else EndCycle end,getdate())/60.0 , @StopBegin = EndCycle
from MES_DataMain
where Clientip=@IPAddr
order by EndCycle desc

---精确"未刷卡停机"停机时间扣减中间正常停机时间 add by wuchun 0505
--begin

select @StopTime1 = datediff(ss,MAX(EndDate),GETDATE())/60.0
from V_CardDetail a
WHERE a.Flag = 1 and ClientIP = @IPAddr
if(@StopTime>@StopTime1 and @StopTime1>0)
set @StopTime = @StopTime1
--end
end
update #tempTable set DeviceStatus='Stop' ,LiveCycle='0.00',GoodQty='0',BeginCycle=''
, StopReason=case when @ReasonName = '' and StopReason = '' then @txt_Unknow
when @ReasonName <> '' then @ReasonName else @txt_Unknow end
, CardEmployee = @CardEmployee, StopBegin = @StopBegin
, StopTime = dbo.Fn_GetMinuteToDH(isnull(@StopTime,0))
, MO = @MO, DispatchNo = @DispatchNO, DispatchPrior = @DispatchPrior
,MouldNO = @MouldNO
where ClientIP=@IPAddr
end
end
else
begin
if(((@Cycle>@MaxInjectionCycle) or (@Cycle<@MinInjectionCycle)) and @MOType = 1) -----在异常生产的
begin
update #tempTable set DeviceStatus='AbNormal', MO = @MO, DispatchNo=@DispatchNO, DispatchPrior = @DispatchPrior
, LiveCycle=@Cycle, GoodQty = @proQty --dbo.FN_GetGoodQty(@MO, @DispatchNO, @ItemNO, '', @DispatchPrior,'','')
, BadQty = 0--dbo.FN_GetBadQty(@MO, @DispatchNO, @ItemNO,'', @DispatchPrior, '','')
, BeginCycle = @BeginCycle, StopReason=@AbNormalProduct,MES_COMQuality = 5
, MouldNO = @MouldNO , ItemNO = @ItemNO
where ClientIP=@IPAddr
end
else ----在正常生产的
begin
update #tempTable set DeviceStatus='Normal', MO = @MO, DispatchNo = @DispatchNO, DispatchPrior = @DispatchPrior
, LiveCycle=@Cycle, GoodQty = @proQty--dbo.FN_GetGoodQty(@MO, @DispatchNO, @ItemNO, '', @DispatchPrior,'','')
, BadQty = 0--dbo.FN_GetBadQty(@MO, @DispatchNO, @ItemNO,'', @DispatchPrior, '','')
, BeginCycle = @BeginCycle, StopReason= case when @MOType = 2 then @txt_SM else @RegularProduct end, MES_COMQuality = 5
, MouldNO = @MouldNO, ItemNO = @ItemNO
where ClientIP=@IPAddr
end
end
end
else
begin
--print @IPAddr
if exists(select top 1 clientIP from MES_DataMain a
left join MES_Machine b on a.MachineNo = b.MachineNO
left join MES_Process p on a.ProcCode = p.ProcCode
where datediff(second,case when abs(datediff(year,a.EndCycle,GETDATE()))>1 then GETDATE() else a.EndCycle end,getdate())
<=case when isnull(@StandCycle,1)*3<90 then 90 else isnull(@StandCycle,1)*3 end
and a.MO = @MO and a.DispatchNO =@DispatchNO and a.DispatchPrior = @DispatchPrior and a.clientIP=@IPAddr
order by a.EndCycle desc) --(系统时间-最好生产时间)小于(3模*周期或90秒)
begin
update #tempTable set DeviceStatus='NOOrder', DispatchNO = @DispatchNO, LiveCycle=@Cycle,GoodQty='0', BeginCycle=@BeginCycle, MES_COMQuality = 5
, StopReason = @txt_NOOrder
where ClientIP=@IPAddr
end
else
begin
--print @IPAddr
select @MaxUploadDate = max(updatetime) from MES_DataMain where ClientIP = @IPAddr
if datediff(minute, isnull(@MaxUploadDate,getdate()), getdate())<2 and @MaxUploadDate is not null
and datediff(minute, @EndCycle, @MaxUploadDate)>2
begin
update #tempTable set DeviceStatus='Normal', MES_COMQuality = 5 ,MouldNO = @MouldNO, ItemNO = @ItemNO
, StopReason = '补数', MO = @MO, DispatchNo = @DispatchNO, DispatchPrior = @DispatchPrior
, GoodQty = @proQty--dbo.FN_GetGoodQty(@MO, @DispatchNO, @ItemNO, '', @DispatchPrior,'','')
where ClientIP=@IPAddr

end
else
begin
select top 1 @ReasonName=case @in_Lan when 'zh_cn' then c.Lan_CN when 'en' then c.Lan_EN else '' end ,
@StopBegin= a.StartDate,@CardEmployee = isnull((select top 1 EmpNameCn from MES_Employee where ICCardID = a.StartCardID and state = 1),a.StartCardID)
from #t_StopCardDetail a
join Sys_PubCode b on b.ModuleCode = 'All' and b.FieldName = 'FuncID' and a.CardType = b.FieldValue
left join Sys_Language c on c.KeyName = b.KeyName
WHERE a.ClientIP = @IPAddr
order by a.ID desc

set @StopTime =-1
if @ReasonName <> ''
begin
select top 1 @StopTime=datediff(MINUTE,@StopBegin, GETDATE())
end
else
begin
select top 1 @StopTime=datediff(ss,case when abs(datediff(year,EndCycle,GETDATE()))>1 then GETDATE() else EndCycle end,getdate())/60.0 , @StopBegin = EndCycle from MES_DataMain
where Clientip=@IPAddr
order by EndCycle desc

---精确"未刷卡停机"停机时间扣减中间正常停机时间 add by wuchun 0505
--begin
select @StopTime1 = datediff(ss,MAX(EndDate),GETDATE())/60.0
from V_CardDetail a
WHERE a.Flag = 1 and ClientIP = @IPAddr
if(@StopTime>@StopTime1 and @StopTime1>0)
set @StopTime = @StopTime1
--end
end
update #tempTable set DeviceStatus='Stop', DispatchNO = @DispatchNO,
LiveCycle=@Cycle,GoodQty='0', BeginCycle=@BeginCycle, MES_COMQuality = 5
, StopReason = case when @ReasonName = '' and StopReason = '' then @txt_Unknow
when @ReasonName <> '' then @ReasonName
else @txt_Unknow
end
, StopBegin = @StopBegin
, StopTime = dbo.Fn_GetMinuteToDH(isnull(@StopTime,0)), CardEmployee = @CardEmployee
, MO = @MO, DispatchPrior = @DispatchPrior
where ClientIP=@IPAddr
end
end
end
FETCH NEXT FROM cursor_outer INTO @IPAddr, @MES_COMQuality -- @DispatchOrder,@IPAddr,@EndCycle
END
CLOSE cursor_outer
DEALLOCATE cursor_outer
declare @row_from int, @row_to int

--输入停机原因需重新分页
declare @MachineTotal int
if(@in_MachineState <> '' and @in_MachineState <> 'All')
begin
update #tempTable set BadQty =b.BadQty from (select isnull(sum(d.BadQty),0) BadQty,t.MachineNo from #tempTable t
left join MES_QC q on t.DispatchNO=q.DispatchNO and t.DispatchPrior=q.DispatchPrior and q.ItemNO=t.ItemNO
left join mes_qcdetail d on q.qcbillno=d.qcbillno
left join Sys_PubCode sp on d.badreasonid=sp.FieldValue and fieldname='ddl_BadReason'
where IsBad=1 and
(@in_MachineState = '' or @in_MachineState = 'All' or DeviceStatus =@in_MachineState)
and RowSeq between @row_from and @row_to
group by RowSeq,t.MachineNo,t.DeviceStatus,t.WSCode,t.MO,t.DispatchNO,t.DispatchPrior,t.LiveCycle,t.GoodQty,t.ClientIP
,t.BeginCycle,StopReason,StopTime,t.MouldNO,t.ItemNO,MES_COMQuality,CardEmployee,StopBegin) b join #tempTable t on t.machineno=b.machineno

select RowSeq = identity(int), MachineNo, DeviceStatus, WSCode, MO, DispatchNO, MouldNO
,DispatchPrior, LiveCycle
--只更新当前页良品数 :优化性能add by wuchun on 2014/01/02
, GoodQty = case when DeviceStatus = 'Normal' or deviceStatus = 'abNormal' then GoodQty-BadQty else 0 end
, BadQty, ClientIP, BeginCycle, StopReason , StopTime,ItemNO, CardEmployee, StopBegin
, MES_COMQuality,RepairStatus
into #Result
from #tempTable
where DeviceStatus =@in_MachineState
order by RowSeq

execute st_MES_RS_Pages @out_total_rows, @in_pagesize, @in_page, @row_from output, @row_to output
select *
from #Result
where RowSeq between @row_from and @row_to
order by RowSeq
select @out_total_rows = count(*) from #Result
select @MachineTotal = count(*) from #tempTable
end
else
begin

/* pages */
select @out_total_rows = count(*) from #tempTable
set @MachineTotal = @out_total_rows
if(@in_MachineState = '' or @in_MachineState = 'All')
execute st_MES_RS_Pages @out_total_rows, @in_pagesize, @in_page, @row_from output, @row_to output
else
select @row_from = 0, @row_to = @out_total_rows

update #tempTable set BadQty =b.BadQty from (select isnull(sum(d.BadQty),0) BadQty,t.MachineNo from #tempTable t
left join MES_QC q on t.DispatchNO=q.DispatchNO and t.DispatchPrior=q.DispatchPrior and q.ItemNO=t.ItemNO
left join mes_qcdetail d on q.qcbillno=d.qcbillno
left join Sys_PubCode sp on d.badreasonid=sp.FieldValue and fieldname='ddl_BadReason'
where IsBad=1 and
(@in_MachineState = '' or @in_MachineState = 'All' or DeviceStatus =@in_MachineState)
and RowSeq between @row_from and @row_to
group by RowSeq,t.MachineNo,t.DeviceStatus,t.WSCode,t.MO,t.DispatchNO,t.DispatchPrior,
t.LiveCycle,t.GoodQty,t.ClientIP
,t.BeginCycle,StopReason,StopTime,t.MouldNO,t.ItemNO,MES_COMQuality,CardEmployee,StopBegin) b join #tempTable t on t.machineno=b.machineno
--只更新当前页良品数 :优化性能add by wuchun on 2014/01/02
update #tempTable set GoodQty = case when DeviceStatus = 'Normal' or deviceStatus = 'abNormal' then GoodQty-BadQty else 0 end
where (@in_MachineState = '' or @in_MachineState = 'All' or DeviceStatus =@in_MachineState)
and RowSeq between @row_from and @row_to
select * from #tempTable
where (@in_MachineState = '' or @in_MachineState = 'All' or DeviceStatus =@in_MachineState)
and RowSeq between @row_from and @row_to
order by RowSeq
end
select @Normal_Count =0, @abNormal_Count = 0, @Stop_Count = 0, @NONetWork_Count = 0, @NoOrder_count = 0
select @Normal_Count = case when DeviceStatus = 'Normal' then @Normal_Count + 1 else @Normal_Count end
, @abNormal_Count = case when DeviceStatus = 'abNormal' then @abNormal_Count + 1 else @abNormal_Count end
, @Stop_Count = case when DeviceStatus = 'Stop' then @Stop_Count + 1 else @Stop_Count end
, @NoOrder_count = case when DeviceStatus = 'NoOrder' then @NoOrder_count + 1 else @NoOrder_count end
, @NONetWork_Count = case when DeviceStatus = 'NONetWork' then @NONetWork_Count + 1 else @NONetWork_Count end
from #tempTable

select TotalCount = isnull(@out_total_rows,0), NormalCount = @Normal_Count, abNormal_Count = @abNormal_Count,
Stop_Count = @Stop_Count, NoOrder_count = @NoOrder_count, NONetWork_Count = @NONetWork_Count, MachineTotal = @MachineTotal
drop table #tempTable
set nocount off
end
GO

ERP存储过程的更多相关文章

  1. ERP存储过程的调用和树形菜单的加载(四)

    引用:DAL:System.Data.SqlClient;System.Data; namespace CommTool { public class SqlComm { /// <summar ...

  2. ERP通用存储过程封装(三)

    一:解释      SQL Server提供了一种方法:可以将一些预先编译的SQL语句集中起来由SQL Server数据库服务器来完成以实现某个任务,这就是存储过程.存储过程常驻在SQL Server ...

  3. 解析大型.NET ERP系统 多国语言实现

    实现多国语言有许多种实现方案,无外乎是一种字符串替换技术,将界面控件的文本标签替换成相应语言的文字..NET Windows Forms实现多国语言的方法有以下几种: 1 .NET的方案,使用资源文件 ...

  4. 解析大型.NET ERP系统核心组件 查询设计器 报表设计器 窗体设计器 工作流设计器 任务计划设计器

    企业管理软件包含一些公共的组件,这些基础的组件在每个新项目立项阶段就必须考虑.核心的稳定不变功能,方便系统开发与维护,也为系统二次开发提供了诸多便利.比如通用权限管理系统,通用附件管理,通用查询等组件 ...

  5. 解析大型.NET ERP系统架构设计 Framework+ Application 设计模式

    我对大型系统的理解,从数量上面来讲,源代码超过百万行以上,系统有超过300个以上的功能,从质量上来讲系统应该具备良好的可扩展性和可维护性,系统中的功能紧密关联.除去业务上的复杂性,如何设计这样的一个协 ...

  6. 为什么我会认为SAP是世界上最好用最牛逼的ERP系统,没有之一?

    为什么我认为SAP是世界上最好用最牛逼的ERP系统,没有之一?玩过QAD.Tiptop.用友等产品,深深觉得SAP是贵的有道理! 一套好的ERP系统,不仅能够最大程度承接适配企业的管理和业务流程,在技 ...

  7. [C#对Oracle操作]C#操作调用Orcale存储过程有参数

    /// <summary> /// 获取ERP固定资产计提数据 /// </summary> /// <param name="strCompanyCode&q ...

  8. 20150825 C# 调用带参数的存储过程 模板

    ////// exec proceudre2                        //System.Data.SqlClient.SqlConnection sqlcon = new Sys ...

  9. ERP权限设置和CRM分析 (十二)

    个人信息管理: 需求描述: 1.在权限信息表添加一条个人信息修改权限. 2.在TreeMenu表添加一条数据作为个"人信息修改"菜单. 3. 人事登记人员在登记员工信息的时候,自动 ...

随机推荐

  1. BZOJ2337: [HNOI2011]XOR和路径

    题解: 异或操作是每一位独立的,所以我们可以考虑每一位分开做. 假设当前正在处理第k位 那令f[i]表示从i到n 为1的概率.因为不是有向无环图(绿豆蛙的归宿),所以我们要用到高斯消元. 若有边i-& ...

  2. C# 编写的串口通信程序

    如果,翻看我之前的博客,会找到一篇用I/O模拟IIC通信的程序文章.好吧,如果找不到可以点击这里,这里就不在赘述了,系统也已经完全调试通过了. 今天的任务是,把测试得到的数据在上位机的界面上显示出来, ...

  3. [转] Asp.net Report Viewer 简单实例

    原文链接:http://www.aspsnippets.com/Green/Articles/ASPNet-Report-Viewer-control-Tutorial-with-example.as ...

  4. 【转】零基础写Java知乎爬虫之进阶篇

    转自:脚本之家 说到爬虫,使用Java本身自带的URLConnection可以实现一些基本的抓取页面的功能,但是对于一些比较高级的功能,比如重定向的处理,HTML标记的去除,仅仅使用URLConnec ...

  5. UVa 11300 Spreading the Wealth 分金币

    圆桌旁坐着 n 个人,每个人都有一定数量的金币,金币总数能够被 n 整除.每个人可以给他左右相邻的人一些金币,最终使得每个人的金币数目相等.你的任务是求出被转手的金币数量的最小值,比如 n = 4, ...

  6. [译]LINT TO SQL 介绍(数据库查询) - Part.3

    出处:Linq To Sql (Part.3 – Querying our database) 术语表 Built-in:内置的 Clause:子句 Debugger:调试器 Object Relat ...

  7. [Papers]NSE, $\n u_3$, Lebesgue space, [Pokorny, EJDE, 2003; Zhou, MAA, 2002]

    $$\bex \n u_3\in L^p(0,T;L^q(\bbR^3)),\quad \frac{2}{p}+\frac{3}{q}=\frac{3}{2},\quad 2\leq q\leq \i ...

  8. asp调用.net xml web services

    来源:http://www.cnblogs.com/notus/archive/2006/08/10/473000.html#2662503 (是不是实际上可以用这个办法调用任何xml web ser ...

  9. codeforces 682D Alyona and Strings

    #include <cstdio> #include <iostream> #include <ctime> #include <vector> #in ...

  10. HDU-4035 Maze

    http://acm.hdu.edu.cn/showproblem.php?pid=4035 树上的概率dp.   Maze Time Limit: 2000/1000 MS (Java/Others ...