[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. socket编程---一个简单例子

    服务器端代码(单线程): import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamRe ...

  2. 如何在Android应用中加入广告

    转载自:http://mobile.51cto.com/aprogram-387527.htm 目前我自己的一款小程序中正进行到加入广告阶段,BAIDU了一下,找到如下好文章,非常有必要共享一下,故转 ...

  3. Java [Leetcode 122]Best Time to Buy and Sell Stock II

    题目描述: Say you have an array for which the ith element is the price of a given stock on day i. Design ...

  4. (转)c & c++内存分配

    一.预备知识—程序的内存分配 一个由c/C++编译的程序占用的内存分为以下几个部分1.栈区(stack)— 由编译器自动分配释放 ,存放函数的参数值,局部变量的值等.其操作方式类似于 数据结构中的栈. ...

  5. poj 3260 The Fewest Coins

    // 转载自http://blog.163.com/benz_/blog/static/18684203020115721917109/算法不难看出,就是一个无限背包+多重背包.问题在于背包的范围.设 ...

  6. memcachedd基础

    系列文章导航: memcached完全剖析–1. memcached的基础 memcached全面剖析–2. 理解memcached的内存存储 memcached全面剖析–3. memcached的删 ...

  7. 《C++ Primer 4th》读书笔记 第7章-函数

    原创文章,转载请注明出处:http://www.cnblogs.com/DayByDay/p/3912413.html

  8. FFmpeg在Android使用3

    android 移植ffmpeg后so库的使用   只需要将我们编译好的ffmpeg的so包(在/obj/local/armeabi/libffmpeg.so)copy到所在ndk下的\platfor ...

  9. [Everyday Mathematics]20150204

    设 $k_0>0$, $\phi:[k_0,\infty)\to[0,\infty)$ 是有界递减函数, 并且 $$\bex \phi(k)\leq \frac{A}{(k-h)^\al}\ph ...

  10. <转>Python 参数知识(变量前加星号的意义)

    csdn上的牛人就是多,加油 —————————————————————————— 过量的参数 在运行时知道一个函数有什么参数,通常是不可能的.另一个情况是一个函数能操作很多对象.更有甚者,调用自身的 ...