| | |
| | | |
| | | LIMIT 1; |
| | | </select> |
| | | <select id="getdata" resultType="com.example.server.progressTrack.Dto.Level3ExportCloum"> |
| | | select c.NAME,b.PROCESS_NAME,b.CURRENT_STATUS,b.REQUIRED_COMPLETION_TIME,b.ACTUAL_COMPLETION,c.dept_id,c.teamgroup_id |
| | | FROM dj_jdgz_track_record a |
| | | LEFT JOIN dj_jdgz_network_level3_list b on b.ID = a.LEVEL3_NODE_ID |
| | | LEFT JOIN dj_jdgz_network_level3 c on c.ID = b.NETWORK_ID |
| | | LEFT JOIN dj_jdgz_network_level1 d on d.ID = c.LEVEL1_NETWORK_ID |
| | | where a.IS_DELETE = 0 |
| | | and c.LEVEL1_NETWORK_ID = ${level1NetworkId} |
| | | and c.LEVEL1_NETWORK_ID = d.id |
| | | and b.IS_DELETE = 0 |
| | | and b.NETWORK_ID = c.id |
| | | and c.IS_DELETE = 0 |
| | | and d.IS_DELETE = 0 |
| | | <if test="deptId!=null"> |
| | | and c.DEPT_ID = ${deptId} |
| | | </if> |
| | | <if test="teamGroupId!=null"> |
| | | and c.TEAMGROUP_ID = ${teamGroupId} |
| | | </if> |
| | | <if test="status!=null and status=='进行中'"> |
| | | and (b.CURRENT_STATUS = 0 or b.CURRENT_STATUS is null) |
| | | and b.REQUIRED_COMPLETION_TIME >= ( SELECT date( 'now', '-' || d.advent_day || ' days' ) ) |
| | | </if> |
| | | <if test="status!=null and status=='临期'"> |
| | | and (b.CURRENT_STATUS = 0 or b.CURRENT_STATUS is null) |
| | | and b.REQUIRED_COMPLETION_TIME < ( SELECT date( 'now', '-' || d.advent_day || ' days' ) ) |
| | | </if> |
| | | <if test="status!=null and status=='逾期'"> |
| | | and (b.CURRENT_STATUS = 0 or b.CURRENT_STATUS is null) |
| | | and b.REQUIRED_COMPLETION_TIME < ( SELECT datetime( 'now' ) ) |
| | | </if> |
| | | <if test="status!=null and status=='正常完成'"> |
| | | and b.CURRENT_STATUS = 1 |
| | | AND b.REQUIRED_COMPLETION_TIME >= b.ACTUAL_COMPLETION |
| | | </if> |
| | | <if test="status!=null and status=='超期完成'"> |
| | | and b.CURRENT_STATUS = 1 |
| | | AND b.REQUIRED_COMPLETION_TIME < b.ACTUAL_COMPLETION |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | </mapper> |