| | |
| | | FROM t_work_order w |
| | | LEFT JOIN t_yw_point p ON w.serial_number = p.serial_number AND p.deleted = 0 |
| | | WHERE w.deleted = 0 |
| | | <if test="dataScope == 1"> AND p.province_tag = 'province' </if> |
| | | <if test="dataScope == 1"> AND p.province_tag = 1 </if> |
| | | <if test="dataScope == 3"> AND p.important_tag = 1 </if> |
| | | <if test="deptId != null"> AND p.dept_id = #{deptId} </if> |
| | | </select> |
| | | |
| | |
| | | LEFT JOIN t_yw_point p ON p.dept_id = d.dept_id AND p.deleted = 0 |
| | | LEFT JOIN t_work_order w ON w.serial_number = p.serial_number AND w.deleted = 0 |
| | | WHERE d.del_flag = 0 AND d.area IS NOT NULL |
| | | <if test="dataScope == 1"> AND p.province_tag = 'province' </if> |
| | | <if test="dataScope == 1"> AND p.province_tag = 1 </if> |
| | | <if test="dataScope == 3"> AND p.important_tag = 1 </if> |
| | | <!-- <if test="deptId != null"> AND p.dept_id = #{deptId} </if> --> |
| | | GROUP BY d.area, d.dept_id |
| | | ORDER BY d.dept_id |
| | |
| | | LEFT JOIN t_work_order_error_type woet ON woet.work_order_no = wo.work_order_no |
| | | LEFT JOIN t_work_order_auditing_record woar ON woar.work_order_id = wo.id |
| | | WHERE wo.deleted = 0 AND wo.status = #{status} AND woar.result = #{auditStatus} |
| | | AND wo.deduct = 0 AND woar.create_time between #{startTime} and #{endTime} |
| | | AND wo.deduct = 0 AND woar.create_time between #{startTime} and #{endTime} |
| | | </select> |
| | | </mapper> |