/** 检查税务证修改情况 */
  private void checkTaxNo(
      Map<String, String> changedInfo, PaperworkDto updatedPaperwork, PaperworkDto oldPaperwork) {

    if (!Objects.equal(updatedPaperwork.getTaxNo(), oldPaperwork.getTaxNo())) {
      changedInfo.put(ChangedInfoKeys.companyTaxNo(), updatedPaperwork.getTaxNo());
    }
    if (!Objects.equal(updatedPaperwork.getTaxNoId(), oldPaperwork.getTaxNoId())) {
      changedInfo.put(ChangedInfoKeys.companyTaxNoId(), updatedPaperwork.getTaxNoId());
    }
  }
  @Override
  public SupplierUpdatedInfoDto<PaperworkDto> getNewPaperwork(Long userId, Company oldPaperwork) {
    SupplierUpdatedInfoDto<PaperworkDto> supplierUpdatedInfoDto =
        new SupplierUpdatedInfoDto<PaperworkDto>();
    PaperworkDto paperworkDto = new PaperworkDto();
    Map<String, Object> oldValues = Maps.newHashMap();

    BeanMapper.copy(oldPaperwork, paperworkDto);

    boolean paperworkChanged =
        supplierChangedInfoRedisDao.tabInfoChanged(userId, ChangedInfoKeys.paperworkTab());
    if (!paperworkChanged) {
      supplierUpdatedInfoDto.setSupplierInfo(paperworkDto);
      supplierUpdatedInfoDto.setOldValues(oldValues);
      return supplierUpdatedInfoDto;
    }

    Map<String, String> changedInfo = supplierChangedInfoRedisDao.getChangedInfos(userId);

    if (changedInfo.containsKey(ChangedInfoKeys.companyBusinessLicense())) {
      paperworkDto.setBusinessLicense(changedInfo.get(ChangedInfoKeys.companyBusinessLicense()));
      oldValues.put(ChangedInfoKeys.companyBusinessLicense(), oldPaperwork.getBusinessLicense());
    }
    if (changedInfo.containsKey(ChangedInfoKeys.companyBusinessLicenseId())) {
      paperworkDto.setBusinessLicenseId(
          changedInfo.get(ChangedInfoKeys.companyBusinessLicenseId()));
      oldValues.put(
          ChangedInfoKeys.companyBusinessLicenseId(), oldPaperwork.getBusinessLicenseId());
    }
    if (changedInfo.containsKey(ChangedInfoKeys.companyBusinessLicenseDate())) {
      String blDate = changedInfo.get(ChangedInfoKeys.companyBusinessLicenseDate());
      paperworkDto.setBlDate(DateTime.parse(blDate, FORMATTER).toDate());
      oldValues.put(ChangedInfoKeys.companyBusinessLicenseDate(), oldPaperwork.getBlDate());
    }

    if (changedInfo.containsKey(ChangedInfoKeys.companyTaxNo())) {
      paperworkDto.setTaxNo(changedInfo.get(ChangedInfoKeys.companyTaxNo()));
      oldValues.put(ChangedInfoKeys.companyTaxNo(), oldPaperwork.getTaxNo());
    }
    if (changedInfo.containsKey(ChangedInfoKeys.companyTaxNoId())) {
      paperworkDto.setTaxNoId(changedInfo.get(ChangedInfoKeys.companyTaxNoId()));
      oldValues.put(ChangedInfoKeys.companyTaxNoId(), oldPaperwork.getTaxNoId());
    }

    if (changedInfo.containsKey(ChangedInfoKeys.companyOrgCert())) {
      paperworkDto.setOrgCert(changedInfo.get(ChangedInfoKeys.companyOrgCert()));
      oldValues.put(ChangedInfoKeys.companyOrgCert(), oldPaperwork.getOrgCert());
    }
    if (changedInfo.containsKey(ChangedInfoKeys.companyOrgCertId())) {
      paperworkDto.setOrgCertId(changedInfo.get(ChangedInfoKeys.companyOrgCertId()));
      oldValues.put(ChangedInfoKeys.companyOrgCertId(), oldPaperwork.getOrgCertId());
    }
    if (changedInfo.containsKey(ChangedInfoKeys.companyOrgCertDate())) {
      String ocDate = changedInfo.get(ChangedInfoKeys.companyOrgCertDate());
      paperworkDto.setOcDate(DateTime.parse(ocDate, FORMATTER).toDate());
      oldValues.put(ChangedInfoKeys.companyOrgCertDate(), oldPaperwork.getOcDate());
    }

    supplierUpdatedInfoDto.setSupplierInfo(paperworkDto);
    supplierUpdatedInfoDto.setOldValues(oldValues);
    return supplierUpdatedInfoDto;
  }