| | |
| | | } |
| | | if (userDto.getCertificateType() != null) { |
| | | if (!StringUtils.isEmpty(userDto.getCertificateNo())) { |
| | | if (!userDto.getCertificateNo().equals(user.getCertificateNo())) { |
| | | String name = "未知"; |
| | | switch (userDto.getCertificateType()) { |
| | | case User.CERTIFICATE_TYPE_TAIWAN: |
| | | name = "台胞证"; |
| | | break; |
| | | case User.CERTIFICATE_TYPE_INSURANCE: |
| | | name = "保险卡号"; |
| | | break; |
| | | case User.CERTIFICATE_TYPE_PASSPORT: |
| | | name = "护照"; |
| | | break; |
| | | case User.CERTIFICATE_TYPE_ID: |
| | | name = "身份证"; |
| | | break; |
| | | case User.CERTIFICATE_TYPE_FILE: |
| | | name = "档案号"; |
| | | break; |
| | | case User.CERTIFICATE_TYPE_INSURANCE_NO: |
| | | name = "保险公司"; |
| | | break; |
| | | } |
| | | // 修改证件或者证件编号 |
| | | if (!userDto.getCertificateType().equals(user.getCertificateType()) || !userDto.getCertificateNo().equals(user.getCertificateNo())) { |
| | | // 构建日志 |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("key", String.format("修改%s编号", name)); |
| | | jsonObject.put("before", user.getCertificateNo()); |
| | | jsonObject.put("after", userDto.getCertificateNo()); |
| | | jsonObject.put("key", "修改证件信息"); |
| | | jsonObject.put("before", String.format("修改证件类型:%s,证件编号:%s", User.getCertificateTypeName(user.getCertificateType()), user.getCertificateNo())); |
| | | jsonObject.put("after", String.format("修改证件类型:%s,证件编号:%s", User.getCertificateTypeName(userDto.getCertificateType()), userDto.getCertificateNo())); |
| | | logArray.add(jsonObject); |
| | | // 修改数据 |
| | | user.setCertificateType(userDto.getCertificateType()); |