上传的图像用于项目: 'CST技术支持'
  1. CST技术支持
  2. SLAL2-1370

【AtlasCopco】ESS卡通邮箱报表优化

XMLWord打印

    • Icon: 技术问题 技术问题
    • 解决结果: 完成
    • Icon: High High
    • 202011
    • Y-易路产品-
    • AtlasCopco
    • 人力资源等
    • 隐藏

      SELECT pp.name as x_payroll_month, pg.name as x_payrollgroup,he.employee_number as x_employee_number,
      he.x_english_name as x_english_name,he.name as x_name,he.hiredate as x_hiredate,he.identification_id as x_identification_id,
      le.name as x_legal_entity,he. department_id as x_ou_code,hf.name as x_function_name,het.name as x_type_name,
      (CASE he.work_activity
      WHEN 'in_service' THEN '在职'
      WHEN 'turn_over' THEN '离职'
      WHEN 'on_boarding' THEN '预入职'
      WHEN 'declined' THEN '放弃入职'
      END) as x_work_activity,
      he.work_email as x_work_email, he.personal_email as x_personal_email,he.x_ess_mail_new,
      pp.payoff_day-INTERVAL'1 month' as x_last_month_payoff_day,
      pp.payoff_day as x_payoff_day,
      pgab.name as x_period_rule,
      py.name as x_payroll_year,
      '' as x_email1,
      '' as x_email2,
      '' as x_email3,
      '' as x_email4,
      '' as x_email5,
      '' as x_email6
      from hr_payroll_group pg
      left join hr_employee_payroll_group_relation hepgr on pg.id=hepgr.payroll_group_id
      left join hr_employee he on he.id = hepgr.employee_id
      left join legal_entity le on le.id=he.legal_entity
      left join hr_function hf on hf.id=he.function_id
      left join hr_employee_type het on het.id=he.employee_type_rep
      left join period_group_account_book pgab on pgab.id=pg.account_book_id
      left join payroll_year py on py.account_book_id = pgab.id
      left join payroll_period pp on pp.payroll_year_id = py.id
      where (to_char(pp.date_start,'yyyy-mm') >= hepgr.current_tax_month)
      and (to_char(pp.date_start,'yyyy-mm') >= to_char(he.hiredate,'yyyy-mm')) or hepgr.payroll_valid_to isnull

      显示
      SELECT pp.name as x_payroll_month, pg.name as x_payrollgroup,he.employee_number as x_employee_number, he.x_english_name as x_english_name,he.name as x_name,he.hiredate as x_hiredate,he.identification_id as x_identification_id, le.name as x_legal_entity,he. department_id as x_ou_code,hf.name as x_function_name,het.name as x_type_name, (CASE he.work_activity WHEN 'in_service' THEN '在职' WHEN 'turn_over' THEN '离职' WHEN 'on_boarding' THEN '预入职' WHEN 'declined' THEN '放弃入职' END) as x_work_activity, he.work_email as x_work_email, he.personal_email as x_personal_email,he.x_ess_mail_new, pp.payoff_day-INTERVAL'1 month' as x_last_month_payoff_day, pp.payoff_day as x_payoff_day, pgab.name as x_period_rule, py.name as x_payroll_year, '' as x_email1, '' as x_email2, '' as x_email3, '' as x_email4, '' as x_email5, '' as x_email6 from hr_payroll_group pg left join hr_employee_payroll_group_relation hepgr on pg.id=hepgr.payroll_group_id left join hr_employee he on he.id = hepgr.employee_id left join legal_entity le on le.id=he.legal_entity left join hr_function hf on hf.id=he.function_id left join hr_employee_type het on het.id=he.employee_type_rep left join period_group_account_book pgab on pgab.id=pg.account_book_id left join payroll_year py on py.account_book_id = pgab.id left join payroll_period pp on pp.payroll_year_id = py.id where (to_char(pp.date_start,'yyyy-mm') >= hepgr.current_tax_month) and (to_char(pp.date_start,'yyyy-mm') >= to_char(he.hiredate,'yyyy-mm')) or hepgr.payroll_valid_to isnull

      正式站:
      https://atlascopco.peoplus.cn
      Company Code:ATLASCOPCO

      优化内容如下:
      1-剔除 薪资所属月份 < 入职月份 的记录
      2-剔除 薪资组生效结束期间(不为空的前提)< 当前期间 的记录

            wenqiang.liu 刘文强
            jason.zhou 周子深
            表决:
            0 为这个问题表决

              创建日期:
              已更新:
              已解决: