示例#1
0
  /** @param 从业人员信息(t_cyryxx) 修改 公用服务 */
  public boolean updateQyryxxCommon(Qyryxx qyryxx) throws Exception {
    // TODO Auto-generated method stub
    boolean isSuccess = false;
    Date currentDate = new Date();
    // 保存人员历史信息
    Qyryxx_lsxx qyryxx_lsxx = new Qyryxx_lsxx();
    Qyryxx qyryxx_bak = new Qyryxx();
    Wgcyryxx wgcyryxx_bak = new Wgcyryxx();
    qyryxx_bak.setRyid(qyryxx.getRyid());
    wgcyryxx_bak.setRyid(qyryxx.getRyid());
    qyryxx_bak = qyryxxDao.getQyryxx(qyryxx_bak);
    wgcyryxx_bak = wgcyryxxDao.getWgcyryxx(wgcyryxx_bak);
    if (qyryxx_bak != null) BeanUtils.copyProperties(qyryxx_lsxx, qyryxx_bak);
    if (wgcyryxx_bak != null) BeanUtils.copyProperties(qyryxx_lsxx, wgcyryxx_bak);
    qyryxx_lsxx.setCzlx(qyryxx.getCzlx());
    qyryxx_lsxxDao.insertQyryxx_lsxx(qyryxx_lsxx);
    // 修改从业人员信息
    qyryxxDao.updateQyryxx(qyryxx);
    // 更新账号
    String errCode = "0";
    errCode = updateUser(qyryxx, qyryxx_bak);
    if (errCode.equals("1")) return false;

    // 人员信息操作日志
    Qyjbxx qyjbxx = new Qyjbxx();
    Qyryxx qyryxxTemp = new Qyryxx();
    qyryxxTemp.setRyid(qyryxx.getRyid());
    qyryxxTemp = qyryxxDao.getQyryxx(qyryxxTemp);
    qyjbxx.setQyid(qyryxxTemp.getQyid());
    qyjbxx = qyjbxxDao.getQyjbxx(qyjbxx);
    Ryxxczrz ryxxczrz = new Ryxxczrz();
    ryxxczrz.setCzsj(currentDate);
    ryxxczrz.setCzlx(qyryxx.getCzlx());
    ryxxczrz.setCzr(qyryxx.getCzr());
    ryxxczrz.setQybm(qyjbxx.getQybm());
    ryxxczrz.setCyrybh(qyryxxTemp.getCyrybh());
    ryxxczrzDao.insertRyxxczrz(ryxxczrz);

    isSuccess = true;
    return isSuccess;
  }
示例#2
0
  /**
   * @author mds 其他人请不要修改此方法,或在修改之前通知我!! 公用方法 修改主表 不包含修改所属企业,不能修改人员姓名
   * @throws InvocationTargetException
   * @throws IllegalAccessException
   */
  public boolean updateQyryxxOnly(Qyryxx qyryxx) throws Exception {
    boolean isSuccess = false;
    Date currentDate = new Date();
    // 保存人员历史信息
    Qyryxx_lsxx qyryxx_lsxx = new Qyryxx_lsxx();
    Qyryxx qyryxx_bak = new Qyryxx();
    Wgcyryxx wgcyryxx_bak = new Wgcyryxx();
    qyryxx_bak.setRyid(qyryxx.getRyid());
    wgcyryxx_bak.setRyid(qyryxx.getRyid());
    qyryxx_bak = qyryxxDao.getQyryxx(qyryxx_bak);
    wgcyryxx_bak = wgcyryxxDao.getWgcyryxx(wgcyryxx_bak);
    if (qyryxx_bak != null) BeanUtils.copyProperties(qyryxx_lsxx, qyryxx_bak);
    if (wgcyryxx_bak != null) BeanUtils.copyProperties(qyryxx_lsxx, wgcyryxx_bak);
    qyryxx_lsxx.setCzlx(qyryxx.getCzlx());
    qyryxx_lsxxDao.insertQyryxx_lsxx(qyryxx_lsxx);
    // 修改从业人员信息
    qyryxx.setBcsj(currentDate);
    qyryxxDao.updateQyryxx(qyryxx);

    // 人员信息操作日志
    Qyjbxx qyjbxx = new Qyjbxx();
    Qyryxx qyryxxTemp = new Qyryxx();
    qyryxxTemp.setRyid(qyryxx.getRyid());
    qyryxxTemp = qyryxxDao.getQyryxx(qyryxxTemp);
    qyjbxx.setQyid(qyryxxTemp.getQyid());
    qyjbxx = qyjbxxDao.getQyjbxx(qyjbxx);
    Ryxxczrz ryxxczrz = new Ryxxczrz();
    ryxxczrz.setCzsj(currentDate);
    ryxxczrz.setCzlx(qyryxx.getCzlx());
    ryxxczrz.setCzr(qyryxx.getCzr());
    ryxxczrz.setQybm(qyjbxx.getQybm());
    ryxxczrz.setCyrybh(qyryxxTemp.getCyrybh());
    ryxxczrzDao.insertRyxxczrz(ryxxczrz);

    isSuccess = true;
    return isSuccess;
  }