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

UR正式站员工个人信息修改数据关联

XMLWord打印

    • Icon: Change Change
    • 解决结果: 完成
    • Icon: Medium Medium
    • 202010
    • Y-易路产品-
    • UR正式环境
    • 基础通用功能
    • 隐藏

      个人信息修改回写数据:
      record = current_approve_instance
      value_dict =

      { 'identification_id': record.x_fd_2020_0140 if record.x_fd_2020_0140 else current_instance_emp.identification_id, # 'social_work_start_date': record.x_fd_2020_0135 if record.x_fd_2020_0135 else current_instance_emp.social_work_start_date, 'bank_name': record.x_fd_2020_0142 if record.x_fd_2020_0142 else current_instance_emp.bank_name, 'bank_account': record.x_fd_2020_0143 if record.x_fd_2020_0143 else current_instance_emp.bank_account, 'permanent_residence': record.x_fd_2020_0144 if record.x_fd_2020_0144 else current_instance_emp.permanent_residence, 'registered_permanent_residence': record.x_fd_2020_0145 if record.x_fd_2020_0145 else current_instance_emp.registered_permanent_residence, 'id_address': record.x_fd_2020_0146 if record.x_fd_2020_0146 else current_instance_emp.id_address, 'home_address': record.x_fd_2020_0147 if record.x_fd_2020_0147 else current_instance_emp.home_address, }
      1. for item in record.x_fd_2020_0161:
      2. if not value_dict.get('worked_ids'):
      3. value_dict['worked_ids'] = [
      4. [0,False, {'worked_start':item.x_fd_2020_0143, # 'worked_end':item.x_fd_2019_0074, # 'worked_unit':item.x_fd_2020_0167, # 'worked_department':item.x_fd_2020_0168, # 'worked_job':item.x_fd_2020_0169}

        ]]

      5. else:
      6. value_dict['worked_ids'].append(
      7. [0,False, {'worked_start':item.x_fd_2020_0143, # 'worked_end':item.x_fd_2019_0074, # 'worked_unit':item.x_fd_2020_0167, # 'worked_department':item.x_fd_2020_0168, # 'worked_job':item.x_fd_2020_0169}

        ])
        for item in record.x_fd_2020_0161:
        ins = env['hr.family.member'].search([('employee_id','=',current_instance_emp.id),('relationship','=',item.x_fd_2020_0162.id)])
        if ins:
        ins_dict =

        {'relationship': item.x_fd_2020_0162.id, 'name': item.x_fd_2020_0159, 'telephone':item.x_fd_2020_0160, 'emergency_contact': True if item.x_fd_2020_0158 == 'x_fd_2020_01581' else False }

        ins.write(ins_dict)
        else:
        if not value_dict.get('contact_ids'):
        value_dict['contact_ids'] = [
        [0,False,

        {'relationship': item.x_fd_2020_0162.id, 'name': item.x_fd_2020_0159, 'telephone':item.x_fd_2020_0160, 'emergency_contact': True if item.x_fd_2020_0158 == 'x_fd_2020_01581' else False }

        ]]
        else:
        value_dict['contact_ids'].append(
        [0,False,

        {'relationship': item.x_fd_2020_0162.id, 'name': item.x_fd_2020_0159, 'telephone':item.x_fd_2020_0160, 'emergency_contact': True if item.x_fd_2020_0158 == 'x_fd_2020_01581' else False }

        ])
        if current_instance_emp:
        current_instance_emp.write(value_dict)
        审批流控制:result = True
        if record.x_fd_2020_0161:
        for item in record.x_fd_2020_0161:
        if not item.x_fd_2020_0159:
        raise ValidationError('家庭成员姓名不能为空')

      社会工作经历回写:
      record = current_approve_instance
      value_dict =

      { 'social_work_start_date': record.x_fd_2020_0141 if record.x_fd_2020_0141 else current_instance_emp.social_work_start_date, }

      for item in record.x_fd_2020_0155:
      if not value_dict.get('worked_ids'):
      value_dict['worked_ids'] = [
      [0,False,

      {'worked_start':item.x_fd_2020_0148, 'worked_end':item.x_fd_2019_0151, 'worked_unit':item.x_fd_2020_0152, 'worked_department':item.x_fd_2020_0153, 'worked_job':item.x_fd_2020_0154}

      ]]
      else:
      value_dict['worked_ids'].append(
      [0,False,

      {'worked_start':item.x_fd_2020_0148, 'worked_end':item.x_fd_2019_0151, 'worked_unit':item.x_fd_2020_0152, 'worked_department':item.x_fd_2020_0153, 'worked_job':item.x_fd_2020_0154}

      ])

      if current_instance_emp:
      current_instance_emp.write(value_dict)
      审批流控制:
      result = True
      if record.x_fd_2020_0141 and not record.x_fd_2020_0155:
      raise ValidationError('填写社会工作开始日期,必须要有工作经历')
      if record.x_fd_2020_0141 and record.x_fd_2020_0155:
      flag = False
      for item in record.x_fd_2020_0155:
      if item.x_fd_2020_0148 == record.x_fd_2020_0141:
      flag = True
      if not flag:
      raise ValidationError('社会工作开始时间与第一段工作经历开始时间要一致')

      显示
      个人信息修改回写数据: record = current_approve_instance value_dict = { 'identification_id': record.x_fd_2020_0140 if record.x_fd_2020_0140 else current_instance_emp.identification_id, # 'social_work_start_date': record.x_fd_2020_0135 if record.x_fd_2020_0135 else current_instance_emp.social_work_start_date, 'bank_name': record.x_fd_2020_0142 if record.x_fd_2020_0142 else current_instance_emp.bank_name, 'bank_account': record.x_fd_2020_0143 if record.x_fd_2020_0143 else current_instance_emp.bank_account, 'permanent_residence': record.x_fd_2020_0144 if record.x_fd_2020_0144 else current_instance_emp.permanent_residence, 'registered_permanent_residence': record.x_fd_2020_0145 if record.x_fd_2020_0145 else current_instance_emp.registered_permanent_residence, 'id_address': record.x_fd_2020_0146 if record.x_fd_2020_0146 else current_instance_emp.id_address, 'home_address': record.x_fd_2020_0147 if record.x_fd_2020_0147 else current_instance_emp.home_address, } for item in record.x_fd_2020_0161: if not value_dict.get('worked_ids'): value_dict ['worked_ids'] = [ [0,False, {'worked_start':item.x_fd_2020_0143, # 'worked_end':item.x_fd_2019_0074, # 'worked_unit':item.x_fd_2020_0167, # 'worked_department':item.x_fd_2020_0168, # 'worked_job':item.x_fd_2020_0169} ]] else: value_dict ['worked_ids'] .append( [0,False, {'worked_start':item.x_fd_2020_0143, # 'worked_end':item.x_fd_2019_0074, # 'worked_unit':item.x_fd_2020_0167, # 'worked_department':item.x_fd_2020_0168, # 'worked_job':item.x_fd_2020_0169} ]) for item in record.x_fd_2020_0161: ins = env ['hr.family.member'] .search( [('employee_id','=',current_instance_emp.id),('relationship','=',item.x_fd_2020_0162.id)] ) if ins: ins_dict = {'relationship': item.x_fd_2020_0162.id, 'name': item.x_fd_2020_0159, 'telephone':item.x_fd_2020_0160, 'emergency_contact': True if item.x_fd_2020_0158 == 'x_fd_2020_01581' else False } ins.write(ins_dict) else: if not value_dict.get('contact_ids'): value_dict ['contact_ids'] = [ [0,False, {'relationship': item.x_fd_2020_0162.id, 'name': item.x_fd_2020_0159, 'telephone':item.x_fd_2020_0160, 'emergency_contact': True if item.x_fd_2020_0158 == 'x_fd_2020_01581' else False } ]] else: value_dict ['contact_ids'] .append( [0,False, {'relationship': item.x_fd_2020_0162.id, 'name': item.x_fd_2020_0159, 'telephone':item.x_fd_2020_0160, 'emergency_contact': True if item.x_fd_2020_0158 == 'x_fd_2020_01581' else False } ]) if current_instance_emp: current_instance_emp.write(value_dict) 审批流控制:result = True if record.x_fd_2020_0161: for item in record.x_fd_2020_0161: if not item.x_fd_2020_0159: raise ValidationError('家庭成员姓名不能为空') 社会工作经历回写: record = current_approve_instance value_dict = { 'social_work_start_date': record.x_fd_2020_0141 if record.x_fd_2020_0141 else current_instance_emp.social_work_start_date, } for item in record.x_fd_2020_0155: if not value_dict.get('worked_ids'): value_dict ['worked_ids'] = [ [0,False, {'worked_start':item.x_fd_2020_0148, 'worked_end':item.x_fd_2019_0151, 'worked_unit':item.x_fd_2020_0152, 'worked_department':item.x_fd_2020_0153, 'worked_job':item.x_fd_2020_0154} ]] else: value_dict ['worked_ids'] .append( [0,False, {'worked_start':item.x_fd_2020_0148, 'worked_end':item.x_fd_2019_0151, 'worked_unit':item.x_fd_2020_0152, 'worked_department':item.x_fd_2020_0153, 'worked_job':item.x_fd_2020_0154} ]) if current_instance_emp: current_instance_emp.write(value_dict) 审批流控制: result = True if record.x_fd_2020_0141 and not record.x_fd_2020_0155: raise ValidationError('填写社会工作开始日期,必须要有工作经历') if record.x_fd_2020_0141 and record.x_fd_2020_0155: flag = False for item in record.x_fd_2020_0155: if item.x_fd_2020_0148 == record.x_fd_2020_0141: flag = True if not flag: raise ValidationError('社会工作开始时间与第一段工作经历开始时间要一致')

      员工个人信息修改流程
      1、员工信息修改e表单上的,户籍地址关联证件地址,通讯地址关联家庭地址。
      2、紧急联系人字段的覆盖与新增。
      比如我修改是父亲的信息(系统员工父亲信息已存在)那就覆盖成新信息,
      增加父亲的信息(系统员工父亲信息不存在)
      社会工作开始日期修改
      1、如果填了“社会工作开始日期”一定 要填 工作经历
      社会工作开始时间 与 第一段工作经历开始时间要一致,如果不一致需要提醒员工填到一致

      两个表单共同的内容
      1、人员分类,岗位自动关联现在主数据的人员分类,岗位。
      2、回写主数据

      测试站过往案例
      https://pm.ersoft.cn/browse/SLAL2-1093
      https://pm.ersoft.cn/browse/SLAL2-1073

            wenqiang.liu 刘文强
            allen.xu 许鹏威
            表决:
            0 为这个问题表决

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