码迷,mamicode.com
首页 > 其他好文 > 详细

小房子配置开发实例-IT资产管理(资产类管理)--开发设计过程

时间:2019-11-01 09:23:40      阅读:65      评论:0      收藏:0      [点我收藏+]

标签:sub   运维管理   菜单   拷贝   点击   执行   date   idt   统计分析   

 小房子(Houselet)作为一个集开发和应用为一体的管理软件平台,通过数据库配置开发的方式来开发管理系统;目的在于辅助企业低成本快速建设管理系统。且系统为开放的,随时可以维护升级的,随企业管理的需要而改变、进化的管理系统,使之真正成为企业发展的生产力,在以下的几个章节中,我们用几个实例系统来展示。

     IT资产管理 通过对企业内部计算机,网络设备的,入库,出库,维修,维护,报废等 生命周期的数据管理,及耗材的使用管理,来达到企业IT资产成本控制的管理目的,

  此案例模版适应于所有 以固定管理对象为中心的管理系统,如员工管理(档案),车间设备运维,医疗设备运维,车辆运维管理,项目管理,合同管理等...

6.1.系统准备

 1).HouseletLive(小房子系统客户端)

 2).xfzAppserver(小房子应用服务器).

 3).firebird(火鸟数据库)

说明: 小房子支持数据库包括

(Access,Mssql,Mysql,Oracle,postgreSQL,firebird,DB2,ASE,SQLite,InterBase)

系统功能划分:

A.设备管理

B.耗材管理

C.统计查询

D.成本分析

E.基础项目维护

F.系统开发

技术图片

6.2.基础项目开发

   本模块主要维护系统应用的基础数据和设置,包括工作人员信息,部门信息,基础项目信息,外部单位信息,耗材信息.

这一部分功能对所有管理系统基本是通用的,可以根据需求不同在配置中更改对应的含义.

1).相关单位信息维护

  字典配置

 字典配置中 在编辑区域显示为可编辑的字段列 在配置 启用和显示 1 后 标识0 属性 也要配置为1

技术图片

树对应的视图:

 

 CREATE OR ALTER VIEW V_YW_ITEM_06(
    XM_CODE,
    XM_NAME,
    XM_PY,
    XM_ZFCODE,
    XM_ZFNAME,
    XM_XFCODE,
    XM_XFNAME)
AS
select yw_03 as Xm_code,yw_04 as Xm_name,yw_05 as Xm_py,yw_31 as Xm_zfcode,yw_32 as Xm_zfname,
yw_33 as Xm_xfcode,yw_34 as Xm_xfname from tb_yw_item_06 order by yw_id
;

 

b.保存按钮 执行后 执行的存储 生成分类编码 (这个功能类似 数据库中提交后的 触发器)

这是一个 tb_yw_item_01 -- tb_yw_item_06 的通用编码存储,可以根据需要扩展,方便系统改造和快速升级.

create or alter procedure PRO_YW_ITEM_CREATECODE (
    IN_SPARIN0 varchar(10),
    IN_SPARIN1 varchar(50),
    IN_SPARIN2 varchar(50),
    IN_SPARIN3 varchar(50),
    IN_SPARIN4 varchar(50),
    IN_SPARIN5 varchar(50),
    IN_SPARIN6 varchar(50),
    IN_SPARIN7 varchar(50),
    IN_SPARIN8 varchar(50),
    IN_SPARIN9 varchar(50),
    IN_IPARIN0 integer,
    IN_IPARIN1 integer,
    IN_IPARIN2 integer,
    IN_IPARIN3 integer,
    IN_IPARIN4 integer)
returns (
    OUTINT integer,
    OUTSTR varchar(200),
    OUTMESSAGE varchar(200))
as
declare variable P_LBCODE varchar(20);
declare variable P_TMPLBCODE varchar(20);
declare variable P_LBNAME varchar(50);
declare variable P_MXLBNAME varchar(50);
declare variable P_TMPNUM integer;
declare variable P_ID integer;
begin
  /* 创建项目编码的 */
  /*in_sparin1,
    in_sparin8 usercode 
    in_sparin9 clientcode
    in_iparin0 类别参数*/
p_tmplbcode =‘‘;
if (in_iparin1 =1) then --TB_yw_item_01
Begin
  for 
     select yw_32 from TB_yw_item_01 where ((yw_31 = ‘‘)or (yw_31 is null))
     and (yw_32 is not null) and (yw_32 <>‘‘) group by yw_32 into :p_lbname
  do
  begin
        select max(yw_31) from TB_yw_item_01 where yw_32 =:p_lbname into :p_tmplbcode ;
        if ((p_tmplbcode = ‘‘) or (p_tmplbcode is null)) then
        begin
          select max(yw_31) from TB_yw_item_01 into :p_tmplbcode;
          if ((p_tmplbcode =‘‘) or (p_tmplbcode is null)) then 
          begin 
             p_tmplbcode = 101 ;
          end 
          else 
          begin
            p_tmpnum = cast(p_tmplbcode as integer);
            p_tmpnum = p_tmpnum +1;
            p_tmplbcode = cast(p_tmpnum as varchar(20));
          end
        end
       if (p_tmplbcode <>‘‘) then
          update TB_yw_item_01 set yw_31 =: p_tmplbcode where yw_32 =:p_lbname;
  end
  p_tmplbcode =‘‘;  --计算细项分类的编码
  p_lbcode=‘‘;
  for 
     select yw_31,yw_34 from TB_yw_item_01 where ((yw_33 =‘‘) or (yw_33 is null)) and (yw_34 is not null)
      and (yw_31 is not null) and (yw_31 <>‘‘)
     group by yw_31,yw_34 into :p_lbcode,:p_mxlbname
  do
  begin
    select max(yw_33) from TB_yw_item_01 where (yw_34 =:p_mxlbname) and (yw_31=:p_lbcode)  into :p_tmplbcode;
    if ((p_tmplbcode =‘‘) or (p_tmplbcode is null)) then 
      begin 
         select max(yw_33) from TB_yw_item_01 where yw_31 =:p_lbcode into :p_tmplbcode;
         if ((p_tmplbcode =‘‘) or (p_tmplbcode is null)) then 
         begin
           p_tmplbcode =p_lbcode||101 ;
         end
         else
         begin
            p_tmpnum = cast(p_tmplbcode as integer);
            p_tmpnum = p_tmpnum +1;
            p_tmplbcode = cast(p_tmpnum as varchar(20));
         end
      end 
      if (p_tmplbcode <> ‘‘) then
      update TB_yw_item_01 set yw_33 =:p_tmplbcode where (yw_34 =:p_mxlbname) and ((yw_33 is null) or (yw_33 =‘‘))  and (yw_31 =:p_lbcode) ;
  end
  p_tmplbcode =‘‘;  --计算项目的编码
 for 
     select yw_id,yw_33 from TB_yw_item_01 where (yw_33 <>‘‘) and (yw_33 is not null) and (yw_04 is not null) and (yw_04 <>‘‘)
     and ((yw_03 is null) or (yw_03=‘‘))
     order by yw_33,yw_id into :p_id,:p_lbcode
  do
  begin
    select max(yw_03) from TB_yw_item_01 where yw_33 =:p_lbcode  into :p_tmplbcode;
    if ((p_tmplbcode =‘‘) or (p_tmplbcode is null)) then 
      begin 
           p_tmplbcode = p_lbcode||1001;
      end
      else
      begin
            p_tmpnum = cast(substring(p_tmplbcode from 7 for 4) as integer);
            p_tmpnum = p_tmpnum +1;
            p_tmplbcode = p_lbcode||cast(p_tmpnum as varchar(20));
      end
      if (p_tmplbcode <> ‘‘) then
      update TB_yw_item_01 set yw_03 =:p_tmplbcode where yw_id =:p_id  ;
  end
  Outstr=TB_yw_item_01  ;
End
if (in_iparin1 =2) then --TB_yw_item_02
Begin
  for 
     select yw_32 from TB_yw_item_02 where ((yw_31 = ‘‘)or (yw_31 is null))
     and (yw_32 is not null) and (yw_32 <>‘‘) group by yw_32 into :p_lbname
  do
  begin
        select max(yw_31) from TB_yw_item_02 where yw_32 =:p_lbname into :p_tmplbcode ;
        if ((p_tmplbcode = ‘‘) or (p_tmplbcode is null)) then
        begin
          select max(yw_31) from TB_yw_item_02 into :p_tmplbcode;
          if ((p_tmplbcode =‘‘) or (p_tmplbcode is null)) then 
          begin 
             p_tmplbcode = 101 ;
          end 
          else 
          begin
            p_tmpnum = cast(p_tmplbcode as integer);
            p_tmpnum = p_tmpnum +1;
            p_tmplbcode = cast(p_tmpnum as varchar(20));
          end
        end
       if (p_tmplbcode <>‘‘) then
          update TB_yw_item_02 set yw_31 =: p_tmplbcode where yw_32 =:p_lbname;
  end
  p_tmplbcode =‘‘;  --计算细项分类的编码
  p_lbcode=‘‘;
  for 
     select yw_31,yw_34 from TB_yw_item_02 where ((yw_33 =‘‘) or (yw_33 is null)) and (yw_34 is not null)
      and (yw_31 is not null) and (yw_31 <>‘‘)
     group by yw_31,yw_34 into :p_lbcode,:p_mxlbname
  do
  begin
    select max(yw_33) from TB_yw_item_02 where (yw_34 =:p_mxlbname) and (yw_31=:p_lbcode)  into :p_tmplbcode;
    if ((p_tmplbcode =‘‘) or (p_tmplbcode is null)) then 
      begin 
         select max(yw_33) from TB_yw_item_02 where yw_31 =:p_lbcode into :p_tmplbcode;
         if ((p_tmplbcode =‘‘) or (p_tmplbcode is null)) then 
         begin
           p_tmplbcode =p_lbcode||101 ;
         end
         else
         begin
            p_tmpnum = cast(p_tmplbcode as integer);
            p_tmpnum = p_tmpnum +1;
            p_tmplbcode = cast(p_tmpnum as varchar(20));
         end
      end 
      if (p_tmplbcode <> ‘‘) then
      update TB_yw_item_02 set yw_33 =:p_tmplbcode where (yw_34 =:p_mxlbname) and ((yw_33 is null) or (yw_33 =‘‘))  and (yw_31 =:p_lbcode) ;
  end
  p_tmplbcode =‘‘;  --计算项目的编码
 for 
     select yw_id,yw_33 from TB_yw_item_02 where (yw_33 <>‘‘) and (yw_33 is not null) and (yw_04 is not null) and (yw_04 <>‘‘)
     and ((yw_03 is null) or (yw_03=‘‘))
     order by yw_33,yw_id into :p_id,:p_lbcode
  do
  begin
    select max(yw_03) from TB_yw_item_02 where yw_33 =:p_lbcode  into :p_tmplbcode;
    if ((p_tmplbcode =‘‘) or (p_tmplbcode is null)) then 
      begin 
           p_tmplbcode = p_lbcode||1001;
      end
      else
      begin
            p_tmpnum = cast(substring(p_tmplbcode from 7 for 4) as integer);
            p_tmpnum = p_tmpnum +1;
            p_tmplbcode = p_lbcode||cast(p_tmpnum as varchar(20));
      end
      if (p_tmplbcode <> ‘‘) then
      update TB_yw_item_02 set yw_03 =:p_tmplbcode where yw_id =:p_id  ;
  end
  Outstr=TB_yw_item_02 ;
End
if (in_iparin1 =3) then --TB_yw_item_03
Begin
  for 
     select yw_32 from TB_yw_item_03 where ((yw_31 = ‘‘)or (yw_31 is null))
     and (yw_32 is not null) and (yw_32 <>‘‘) group by yw_32 into :p_lbname
  do
  begin
        select max(yw_31) from TB_yw_item_03 where yw_32 =:p_lbname into :p_tmplbcode ;
        if ((p_tmplbcode = ‘‘) or (p_tmplbcode is null)) then
        begin
          select max(yw_31) from TB_yw_item_03 into :p_tmplbcode;
          if ((p_tmplbcode =‘‘) or (p_tmplbcode is null)) then 
          begin 
             p_tmplbcode = 101 ;
          end 
          else 
          begin
            p_tmpnum = cast(p_tmplbcode as integer);
            p_tmpnum = p_tmpnum +1;
            p_tmplbcode = cast(p_tmpnum as varchar(20));
          end
        end
       if (p_tmplbcode <>‘‘) then
          update TB_yw_item_03 set yw_31 =: p_tmplbcode where yw_32 =:p_lbname;
  end
  p_tmplbcode =‘‘;  --计算细项分类的编码
  p_lbcode=‘‘;
  for 
     select yw_31,yw_34 from TB_yw_item_03 where ((yw_33 =‘‘) or (yw_33 is null)) and (yw_34 is not null)
      and (yw_31 is not null) and (yw_31 <>‘‘)
     group by yw_31,yw_34 into :p_lbcode,:p_mxlbname
  do
  begin
    select max(yw_33) from TB_yw_item_03 where (yw_34 =:p_mxlbname) and (yw_31=:p_lbcode)  into :p_tmplbcode;
    if ((p_tmplbcode =‘‘) or (p_tmplbcode is null)) then 
      begin 
         select max(yw_33) from TB_yw_item_03 where yw_31 =:p_lbcode into :p_tmplbcode;
         if ((p_tmplbcode =‘‘) or (p_tmplbcode is null)) then 
         begin
           p_tmplbcode =p_lbcode||101 ;
         end
         else
         begin
            p_tmpnum = cast(p_tmplbcode as integer);
            p_tmpnum = p_tmpnum +1;
            p_tmplbcode = cast(p_tmpnum as varchar(20));
         end
      end 
      if (p_tmplbcode <> ‘‘) then
      update TB_yw_item_03 set yw_33 =:p_tmplbcode where (yw_34 =:p_mxlbname) and ((yw_33 is null) or (yw_33 =‘‘))  and (yw_31 =:p_lbcode) ;
  end
  p_tmplbcode =‘‘;  --计算项目的编码
 for 
     select yw_id,yw_33 from TB_yw_item_03 where (yw_33 <>‘‘) and (yw_33 is not null) and (yw_04 is not null) and (yw_04 <>‘‘)
     and ((yw_03 is null) or (yw_03=‘‘))
     order by yw_33,yw_id into :p_id,:p_lbcode
  do
  begin
    select max(yw_03) from TB_yw_item_03 where yw_33 =:p_lbcode  into :p_tmplbcode;
    if ((p_tmplbcode =‘‘) or (p_tmplbcode is null)) then 
      begin 
           p_tmplbcode = p_lbcode||1001;
      end
      else
      begin
            p_tmpnum = cast(substring(p_tmplbcode from 7 for 4) as integer);
            p_tmpnum = p_tmpnum +1;
            p_tmplbcode = p_lbcode||cast(p_tmpnum as varchar(20));
      end
      if (p_tmplbcode <> ‘‘) then
      update TB_yw_item_03 set yw_03 =:p_tmplbcode where yw_id =:p_id  ;
  end
  Outstr=TB_yw_item_03 ;
End
if (in_iparin1 =4) then --TB_yw_item_04
Begin
  for 
     select yw_32 from TB_yw_item_04 where ((yw_31 = ‘‘)or (yw_31 is null))
     and (yw_32 is not null) and (yw_32 <>‘‘) group by yw_32 into :p_lbname
  do
  begin
        select max(yw_31) from TB_yw_item_04 where yw_32 =:p_lbname into :p_tmplbcode ;
        if ((p_tmplbcode = ‘‘) or (p_tmplbcode is null)) then
        begin
          select max(yw_31) from TB_yw_item_04 into :p_tmplbcode;
          if ((p_tmplbcode =‘‘) or (p_tmplbcode is null)) then 
          begin 
             p_tmplbcode = 101 ;
          end 
          else 
          begin
            p_tmpnum = cast(p_tmplbcode as integer);
            p_tmpnum = p_tmpnum +1;
            p_tmplbcode = cast(p_tmpnum as varchar(20));
          end
        end
       if (p_tmplbcode <>‘‘) then
          update TB_yw_item_04 set yw_31 =: p_tmplbcode where yw_32 =:p_lbname;
  end
  p_tmplbcode =‘‘;  --计算细项分类的编码
  p_lbcode=‘‘;
  for 
     select yw_31,yw_34 from TB_yw_item_04 where ((yw_33 =‘‘) or (yw_33 is null)) and (yw_34 is not null)
      and (yw_31 is not null) and (yw_31 <>‘‘)
     group by yw_31,yw_34 into :p_lbcode,:p_mxlbname
  do
  begin
    select max(yw_33) from TB_yw_item_04 where (yw_34 =:p_mxlbname) and (yw_31=:p_lbcode)  into :p_tmplbcode;
    if ((p_tmplbcode =‘‘) or (p_tmplbcode is null)) then 
      begin 
         select max(yw_33) from TB_yw_item_04 where yw_31 =:p_lbcode into :p_tmplbcode;
         if ((p_tmplbcode =‘‘) or (p_tmplbcode is null)) then 
         begin
           p_tmplbcode =p_lbcode||101 ;
         end
         else
         begin
            p_tmpnum = cast(p_tmplbcode as integer);
            p_tmpnum = p_tmpnum +1;
            p_tmplbcode = cast(p_tmpnum as varchar(20));
         end
      end 
      if (p_tmplbcode <> ‘‘) then
      update TB_yw_item_04 set yw_33 =:p_tmplbcode where (yw_34 =:p_mxlbname) and ((yw_33 is null) or (yw_33 =‘‘))  and (yw_31 =:p_lbcode) ;
  end
  p_tmplbcode =‘‘;  --计算项目的编码
 for 
     select yw_id,yw_33 from TB_yw_item_04 where (yw_33 <>‘‘) and (yw_33 is not null) and (yw_04 is not null) and (yw_04 <>‘‘)
     and ((yw_03 is null) or (yw_03=‘‘))
     order by yw_33,yw_id into :p_id,:p_lbcode
  do
  begin
    select max(yw_03) from TB_yw_item_04 where yw_33 =:p_lbcode  into :p_tmplbcode;
    if ((p_tmplbcode =‘‘) or (p_tmplbcode is null)) then 
      begin 
           p_tmplbcode = p_lbcode||1001;
      end
      else
      begin
            p_tmpnum = cast(substring(p_tmplbcode from 7 for 4) as integer);
            p_tmpnum = p_tmpnum +1;
            p_tmplbcode = p_lbcode||cast(p_tmpnum as varchar(20));
      end
      if (p_tmplbcode <> ‘‘) then
      update TB_yw_item_04 set yw_03 =:p_tmplbcode where yw_id =:p_id  ;
  end
  Outstr=TB_yw_item_04;
End
if (in_iparin1 =5) then --TB_yw_item_05
Begin
  for 
     select yw_32 from TB_yw_item_05 where ((yw_31 = ‘‘)or (yw_31 is null))
     and (yw_32 is not null) and (yw_32 <>‘‘) group by yw_32 into :p_lbname
  do
  begin
        select max(yw_31) from TB_yw_item_05 where yw_32 =:p_lbname into :p_tmplbcode ;
        if ((p_tmplbcode = ‘‘) or (p_tmplbcode is null)) then
        begin
          select max(yw_31) from TB_yw_item_05 into :p_tmplbcode;
          if ((p_tmplbcode =‘‘) or (p_tmplbcode is null)) then 
          begin 
             p_tmplbcode = 101 ;
          end 
          else 
          begin
            p_tmpnum = cast(p_tmplbcode as integer);
            p_tmpnum = p_tmpnum +1;
            p_tmplbcode = cast(p_tmpnum as varchar(20));
          end
        end
       if (p_tmplbcode <>‘‘) then
          update TB_yw_item_05 set yw_31 =: p_tmplbcode where yw_32 =:p_lbname;
  end
  p_tmplbcode =‘‘;  --计算细项分类的编码
  p_lbcode=‘‘;
  for 
     select yw_31,yw_34 from TB_yw_item_05 where ((yw_33 =‘‘) or (yw_33 is null)) and (yw_34 is not null)
      and (yw_31 is not null) and (yw_31 <>‘‘)
     group by yw_31,yw_34 into :p_lbcode,:p_mxlbname
  do
  begin
    select max(yw_33) from TB_yw_item_05 where (yw_34 =:p_mxlbname) and (yw_31=:p_lbcode)  into :p_tmplbcode;
    if ((p_tmplbcode =‘‘) or (p_tmplbcode is null)) then 
      begin 
         select max(yw_33) from TB_yw_item_05 where yw_31 =:p_lbcode into :p_tmplbcode;
         if ((p_tmplbcode =‘‘) or (p_tmplbcode is null)) then 
         begin
           p_tmplbcode =p_lbcode||101 ;
         end
         else
         begin
            p_tmpnum = cast(p_tmplbcode as integer);
            p_tmpnum = p_tmpnum +1;
            p_tmplbcode = cast(p_tmpnum as varchar(20));
         end
      end 
      if (p_tmplbcode <> ‘‘) then
      update TB_yw_item_05 set yw_33 =:p_tmplbcode where (yw_34 =:p_mxlbname) and ((yw_33 is null) or (yw_33 =‘‘))  and (yw_31 =:p_lbcode) ;
  end
  p_tmplbcode =‘‘;  --计算项目的编码
 for 
     select yw_id,yw_33 from TB_yw_item_05 where (yw_33 <>‘‘) and (yw_33 is not null) and (yw_04 is not null) and (yw_04 <>‘‘)
     and ((yw_03 is null) or (yw_03=‘‘))
     order by yw_33,yw_id into :p_id,:p_lbcode
  do
  begin
    select max(yw_03) from TB_yw_item_05 where yw_33 =:p_lbcode  into :p_tmplbcode;
    if ((p_tmplbcode =‘‘) or (p_tmplbcode is null)) then 
      begin 
           p_tmplbcode = p_lbcode||1001;
      end
      else
      begin
            p_tmpnum = cast(substring(p_tmplbcode from 7 for 4) as integer);
            p_tmpnum = p_tmpnum +1;
            p_tmplbcode = p_lbcode||cast(p_tmpnum as varchar(20));
      end
      if (p_tmplbcode <> ‘‘) then
      update TB_yw_item_05 set yw_03 =:p_tmplbcode where yw_id =:p_id  ;
  end
  Outstr=TB_yw_item_05;
End
if (in_iparin1 =6) then --TB_yw_item_06
Begin
  for 
     select yw_32 from TB_yw_item_06 where ((yw_31 = ‘‘)or (yw_31 is null))
     and (yw_32 is not null) and (yw_32 <>‘‘) group by yw_32 into :p_lbname
  do
  begin
        select max(yw_31) from TB_yw_item_06 where yw_32 =:p_lbname into :p_tmplbcode ;
        if ((p_tmplbcode = ‘‘) or (p_tmplbcode is null)) then
        begin
          select max(yw_31) from TB_yw_item_06 into :p_tmplbcode;
          if ((p_tmplbcode =‘‘) or (p_tmplbcode is null)) then 
          begin 
             p_tmplbcode = 101 ;
          end 
          else 
          begin
            p_tmpnum = cast(p_tmplbcode as integer);
            p_tmpnum = p_tmpnum +1;
            p_tmplbcode = cast(p_tmpnum as varchar(20));
          end
        end
       if (p_tmplbcode <>‘‘) then
          update TB_yw_item_06 set yw_31 =: p_tmplbcode where yw_32 =:p_lbname;
  end
  p_tmplbcode =‘‘;  --计算细项分类的编码
  p_lbcode=‘‘;
  for 
     select yw_31,yw_34 from TB_yw_item_06 where ((yw_33 =‘‘) or (yw_33 is null)) and (yw_34 is not null)
      and (yw_31 is not null) and (yw_31 <>‘‘)
     group by yw_31,yw_34 into :p_lbcode,:p_mxlbname
  do
  begin
    select max(yw_33) from TB_yw_item_06 where (yw_34 =:p_mxlbname) and (yw_31=:p_lbcode)  into :p_tmplbcode;
    if ((p_tmplbcode =‘‘) or (p_tmplbcode is null)) then 
      begin 
         select max(yw_33) from TB_yw_item_06 where yw_31 =:p_lbcode into :p_tmplbcode;
         if ((p_tmplbcode =‘‘) or (p_tmplbcode is null)) then 
         begin
           p_tmplbcode =p_lbcode||101 ;
         end
         else
         begin
            p_tmpnum = cast(p_tmplbcode as integer);
            p_tmpnum = p_tmpnum +1;
            p_tmplbcode = cast(p_tmpnum as varchar(20));
         end
      end 
      if (p_tmplbcode <> ‘‘) then
      update TB_yw_item_06 set yw_33 =:p_tmplbcode where (yw_34 =:p_mxlbname) and ((yw_33 is null) or (yw_33 =‘‘))  and (yw_31 =:p_lbcode) ;
  end
  p_tmplbcode =‘‘;  --计算项目的编码
 for 
     select yw_id,yw_33 from TB_yw_item_06 where (yw_33 <>‘‘) and (yw_33 is not null) and (yw_04 is not null) and (yw_04 <>‘‘)
     and ((yw_03 is null) or (yw_03=‘‘))
     order by yw_33,yw_id into :p_id,:p_lbcode
  do
  begin
    select max(yw_03) from TB_yw_item_06 where yw_33 =:p_lbcode  into :p_tmplbcode;
    if ((p_tmplbcode =‘‘) or (p_tmplbcode is null)) then 
      begin 
           p_tmplbcode = p_lbcode||1001;
      end
      else
      begin
            p_tmpnum = cast(substring(p_tmplbcode from 7 for 4) as integer);
            p_tmpnum = p_tmpnum +1;
            p_tmplbcode = p_lbcode||cast(p_tmpnum as varchar(20));
      end
      if (p_tmplbcode <> ‘‘) then
      update TB_yw_item_06 set yw_03 =:p_tmplbcode where yw_id =:p_id  ;
  end
  Outstr=TB_yw_item_06 ;
End
  OutInt =1;
 -- OutStr = in_iparin1;
  OutMessage =这是存储返回消息;
  suspend;
  
End

基础项目中其他菜单功能 相关单位信息维护 功能一样

 

 

 

工作人员信息

TB_yw_item_02

BASE

部门信息维护

TB_yw_item_03

BASE

耗材信息维护

TB_yw_item_04

BASE

基础项目维护 

TB_yw_item_05

BASE

 

 

6.3.设备管理

1).设备入库(采购)

  设备采购入库功能 业务表 设备管理中心表设计为一个表,记录设备信息和 设备动态变化信息,所以这个表设计预留字段长一些,初步设计为170个字段

A.字典设置:

技术图片

.菜单配置

技术图片

 

C.设备入库功能覆盖两个功能: 新设备的入库维护,老设备或初始入库,

 企业设备信息在初始盘点的时候一般在Excel文档中或者盘点人员把数据整理到Excel文件中,小房子系统每个页面均支持Excel数据粘贴导入 和 复制导出功能,这样有利于快速初始化数据.

技术图片

 

1).设备管理中心

设备管理中心围绕设备信息 实现对设备的 维护,维修,调配,报废 的动态管理

A.菜单配置

技术图片

B.字典功能配置

 此页面的 维护,维修,调配,报废功能在数据字典中配置,主要展示数据表格内调用菜单的功能

调配功能实现说明:在设备管理中心页面数据编辑区域点击 调配 button 弹出设备调配信息维护菜单页面,录入调配信息 并保存,保存记录该设备调配流水记录 并且在保存后执行存储 更新设备信息中该设备 关于调配的记录

技术图片

 

C.调配 调出功能菜单 设备调配  的配置 在设备调配保存后更新 设备信息表中调配信息为最新状态,方便设备管理中心实时展现设备调配状态.

技术图片

 

 

1).设备使用情况查询

 设备使用情况查询 以设备当前状态为主数据加上其他变动信息明细的主从数据查询 页面采用FCL

A.主表 数据字典配置如下:

技术图片

 

 菜单功能配置

技术图片

重点 主表和明细表 数据的关联关系配置

技术图片

 

 

 

 

 

 

4).报废设备查询

 报废设备查询配置过程完全拷贝 设备使用情况查询 菜单功能,所不同的是在主表数据 查询中加入了 作废的条件

技术图片

 

 

 

6.4.耗材管理

 耗材管理 实现IT设备耗材的 入,出库 管理. 主要分为两类功能:入,出 库 信息采集(登记), 入,出 库信息 查询修改.

1)..耗材入库(采购)

菜单功能实现 入库信息的快速录入(采集) 菜单中页面类型采用Fyw5 类型,此菜单灵活采集数据的功能主要在字典中配置,菜单配置比较简单 我们先配置

  1. 菜单配置

 

 

技术图片

  1. 字典配置

 技术图片

 

技术图片

 

 

采购人、库管人、耗材名称 弹出检索信息配置 和供应商 的配置属性一直,对应的数据源表和条件不同.

2) .耗材入库流水查询(带修改 和 删除 功能)

 功能性能:实现耗材入库记录信息的流水查询功能 和修改删除功能

  1. 菜单配置

技术图片

 

 

  1. 字典配置

技术图片

 

 技术图片

 

修改 button 打开的菜单可以配置为 不启用.

 耗材出库管理

耗材出库功能从配置开发角度看 耗材入库功能一致,把入库功能 改变一个数据存储表

即可实现,字典内容可根据出库业务需求做适当调整.

此功能配置仿照 入库配置 不在赘述

4..统计分析

统计分析几个菜单的功能 主要演示 Fcxcl 页面 视图查询功能,存储查询功能,交叉表统计功能

1).设备分类使用统计

实现 按部门 设备类型分类的 综合统计 配置视图实现此功能

  1. 视图
    CREATE OR ALTER VIEW V_YW_SBFB_SY_HZ(
        YW_01,
        YW_02,
        YW_03,
        YW_04,
        YW_05,
        YW_06,
        YW_08,
        YW_10,
        YW_11,
        YW_12,
        YW_13,
        YW_14,
        YW_15,
        YW_16,
        YW_19)
    AS
    select max(yw_031) as yw_01,max(yw_032) as yw_02,yw_033 as yw_03,yw_034 as yw_04,yw_057 as yw_05,
    yw_058 as yw_06,count(yw_003) as yw_08,max(substring(cast(yw_020 as varchar(30)) from 1 for 10)) as yw_10,
    max(yw_014) as yw_11,max(substring(cast(yw_019 as varchar(30)) from 1 for 10)) as yw_12,
    max(EXTRACT(year from current_date) - Extract(year from yw_020) )as yw_13,
    sum(case when (yw_099 is null) then 0 else 1 end ) as yw_14,sum(yw_097) as yw_15,sum(yw_016) as yw_16,
    sum(yw_096) as yw_19  from tb_yw_long_01 group by
    yw_033,yw_034,yw_057,yw_058 order by yw_033
    ;

    B.字典配置

    字典配置列要和 视图输出字段

 技术图片

菜单配置

技术图片

2) .耗材出入库统计

  执行一个存储统计一段期间内耗材的采购入库,出库,库存等情况.

  1. 菜单配置

 技术图片

 

 字典配置,此处字典中配置的表可以为实表也可以为虚表,因为数据是从执行存储中返回的

 技术图片

2) .分部门耗材消耗统计

  执行交叉表存储,统计按部门领用的耗材数据

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

小房子配置开发实例-IT资产管理(资产类管理)--开发设计过程

标签:sub   运维管理   菜单   拷贝   点击   执行   date   idt   统计分析   

原文地址:https://www.cnblogs.com/esap/p/11774899.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!