SELECT MAIN182.FLOW_NUM AS 流程编号, HR.LASTNAME AS 申请人, MAIN182.CREATE_DATE AS 创建日期, DEP.DEPARTMENTNAME AS 部门名称, MAIN182.COOP_NAME AS 表彰方, MAIN182.COOP_TEL AS 联系方式, MAIN182.REWARD_DESC_MAIN AS 表彰奖项内容, SW_1.SELECTNAME AS 奖励对象, DT1182.REWARD_DESC_DT AS 对象描述, DT1182.REWARD_GOODS AS 奖励物品, SW_2.SELECTNAME AS 奖励证明, DT1182.REWARD_AMOUNTS AS 奖励金额, DT1182.RETURN_AMOUNTS AS 公司返还金额, DT1182.REMARK AS 备注, WREQ.STATUS AS 流程状态 FROM FORMTABLE_MAIN_182 MAIN182 INNER JOIN FORMTABLE_MAIN_182_DT1 DT1182 ON MAIN182.ID = DT1182.MAINID INNER JOIN HRMRESOURCE HR ON MAIN182.APPLICANT = HR.ID INNER JOIN HRMDEPARTMENT DEP ON MAIN182.DEPARTMENT = DEP.ID INNER JOIN ( SELECT WORKFLOW_SELECTITEM.SELECTVALUE, WORKFLOW_SELECTITEM.SELECTNAME FROM WORKFLOW_SELECTITEM WHERE WORKFLOW_SELECTITEM.FIELDID = 16914 ) SW_1 ON SW_1.SELECTVALUE = DT1182.REWARD_TYPE INNER JOIN ( SELECT WORKFLOW_SELECTITEM.SELECTVALUE, WORKFLOW_SELECTITEM.SELECTNAME FROM WORKFLOW_SELECTITEM WHERE WORKFLOW_SELECTITEM.FIELDID = 16916 ) SW_2 ON SW_2.SELECTVALUE = DT1182.REWARD_TYPE INNER JOIN WORKFLOW_REQUESTBASE WREQ ON MAIN182.REQUESTID = WREQ.REQUESTID WHERE 1 = 1 AND MAIN182.CREATE_DATE >='${GET_CALDAY}' --创建时间1 AND MAIN182.CREATE_DATE <='${GET_CALDAY_TO}' --创建时间2 ${GET_ZICZS0000}--创建部门 ${GET_BZF} --表彰方 ${GET_JLDX} --奖励对象 ${GET_JLZM} --奖励证明 |