3. 修改照片路径
输入以下代码
begin if
fileexists('E:\\EastMoney\\photo\\'+[trim([DM2DM.V_Employeecard.\"Empno\"])]+'.jpg') then
picture2.loadfromfile('E:\\EastMoney\\photo\\'+[trim([DM2DM.V_Employeecard.\"Empno\"])]+'.jpg') end
4. 将其中的照存放路径改为 系统中存放照片的路径
5. 选择 picture2 修改其中的DataField值,将原有的删除,设置新的为空。
部分代码:
select distinct v.empno,empname,:月份 as YYMMA,dutyname,partname,y.夜班,z.时数和,z.平时和,z.双休和,z.节假和,z.旷职,z.休假, :开始日期 AS BEGINdate ,:结束日期 AS ENDdate from V_employeedaycarddata v left join (select empno ,count(isnull(isnightshift,0)) as 夜班 from employeedaycarddata where yymmdd>=:开始日期 AND YYMMDD<=:结束日期 and isnightshift=1 group by empno ) y on v.empno=y.empno left join (select empno ,sum (isnull(WorkTime,0)) as 时数和,sum(case when addworktime>0 then addworktime4 end) as 平时和,sum(case when addworktime1>0 then addworktime4 end) as 双休和,sum(case when addworktime2>0 then addworktime4 end) as 节假和 ,sum(round(truancy,2)) as 旷职,sum(kmoney) as 休假 from employeedaycarddata where yymmdd>=:开始日期 AND YYMMDD<=:结束日期 group by empno ) z on v.empno=z.empno where yymmdd>=:开始日期 AND YYMMDD<=:结束日期 and (partname=:部门名称 or partname2=:组别名称 ) or v.empno=:工号 order by partname,v.empno
月报中的自定义字段的数据统计
------请假时数
--病假 旷工 事假
-- CustomItem1 ---- CustomItem4
declare @c1 float,@c2 float,@c3 float,@c4 float set @c1 = 0 set @c2 = 0 set @c3 = 0 set @c4 = 0
update EmployeeMonthCount set CustomItem1= (IsNull(( select sum(IsNull(A.Times,0)) from PleaseIll_Detail A Left Join PleaseIll_Master B on A.Id=B.Id where A.Times>0
and B.LeaveType='病假' and A.EMPNO=@EMPNO and A.YYMMDD>=@YYMMDD1 and A.YYMMDD<=@YYMMDD2 ), 0))
where EmpNo=@EMPNO and YYMM=@YYMM
update EmployeeMonthCount set CustomItem2=( (IsNull(( select sum(IsNull(A.Times,0))
from PleaseIll_Detail A Left Join PleaseIll_Master B on A.Id=B.Id where A.Times>0 and B.LeaveType='旷工'
and A.EMPNO=@EMPNO and A.YYMMDD>=@YYMMDD1 and A.YYMMDD<=@YYMMDD2 ), 0)) ) where EmpNo=@EMPNO and YYMM=@YYMM and IsOK=0
update EmployeeMonthCount set CustomItem3 = ((IsNull(( select sum(IsNull(A.Times,0)) from PleaseIll_Detail A Left Join PleaseIll_Master B on A.Id=B.Id
where A.Times>0 and B.LeaveType='事假' and A.EMPNO=@EMPNO and
A.YYMMDD>=@YYMMDD1 and A.YYMMDD<=@YYMMDD2 ), 0)) ) where EmpNo=@EMPNO and YYMM=@YYMM and IsOK=0
select @c1 = sum(isnull(WorkTimes,0)) from PleaseIllReq a
where a.BD >= @YYMMDD1 and a.ED <= @YYMMDD2 and ISNULL(A.LeaveType,'FF') = '病假' and a.empno = @empno and isnull(WorkTimes,0) > 0
select @c2 = sum(isnull(WorkTimes,0)) from PleaseIllReq a
where a.BD >= @YYMMDD1 and a.ED <= @YYMMDD2 and ISNULL(A.LeaveType,'FF') = '旷工' and a.empno = @empno and isnull(WorkTimes,0) > 0
select @c3 = sum(isnull(WorkTimes,0)) from PleaseIllReq a
where a.BD >= @YYMMDD1 and a.ED <= @YYMMDD2 and ISNULL(A.LeaveType,'FF') = '事假'
and a.empno = @empno
update EmployeeMonthCount SET CustomItem1 = ISNULL(CustomItem1,0) + isnull(@C1,0),CustomItem2 = ISNULL(CustomItem2,0) + isnull(@C2,0),CustomItem3 = ISNULL(CustomItem3,0) + isnull(@C3,0) where YYMM = @YYMM AND EMPNO = @EMPNO and IsOK=0
因篇幅问题不能全部显示,请点此查看更多更全内容