diff --git a/src/main/resources/mapper/FxfxdxMapper.xml b/src/main/resources/mapper/FxfxdxMapper.xml index 3604f2b..06bc7e7 100644 --- a/src/main/resources/mapper/FxfxdxMapper.xml +++ b/src/main/resources/mapper/FxfxdxMapper.xml @@ -488,14 +488,6 @@ a.FDANGERDESC AS yinhuanmiaoshu, a.fdangerreason AS yuanyinfenxi, a.fremark AS kongzhicuoshi, - -- 资金万元计算(当前代码被注释,如需启用请确保逻辑正确) - /*(CASE - WHEN a.fcost IS NULL OR a.fcost = '' THEN NULL - WHEN a.fcost = '0' THEN '0' - ELSE - -- 将字符串转换为数值,除以10000 ,再转换回字符串并保留两位小数 - CAST(ROUND(TRY_CONVERT(DECIMAL(18, 2), a.fcost) / 10000, 2) AS VARCHAR(20)) - END) AS zijinwanyuan,*/ a.fcost AS zijinwanyuan, -- 根据状态代码判断隐患状态 (CASE @@ -546,22 +538,13 @@ LEFT JOIN PF_ACCOUNT k ON a.CREATOR = k.ID outer apply ( - -- 对每个c.ID,只取e表中匹配的第一条记录(可按实际需求调整排序) - select top 1 * - from ISM_RISKEVENT e - where e.RISKUNITID = c.ID - order by e.id -- 按id排序,取第一条;可改为e.create_time等 + select top 1 * + from ISM_RISKEVENT e + where e.RISKUNITID = c.ID + order by e.id ) e - /*WHERE - a.ISDELETE = 'N' - AND e.ISDELETE = 'N' - and a.CREASTAMP >= '2025-01-01 00:00:00.000' - --and a.fmeasure='e8211360c0204428bc247c5c7d5cfd8e' - order by - chuangjianshijian desc*/ WHERE - --a.ORGANID = '309_ORG' - and a.ISDELETE = 'N' + a.ISDELETE = 'N' and a.fstate = '9' and len(b.code)= 12 and i.EMPNAME is not null @@ -571,6 +554,7 @@ else a.fstate end )='9' and LEFT(a.fcheckpertime, 19) is not null + --and a.ORGANID = '309_ORG' AND isnull(LEFT(a.MODISTAMP, 19), LEFT(a.CREASTAMP, 19)) between DATEADD(day, -1, GETDATE()) AND DATEADD(day, -0, GETDATE())