| | |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入information") |
| | | public R update(@Valid @RequestBody Information information) throws Exception { |
| | | Information information1 = Objects.requireNonNull(BeanUtil.copy(information, Information.class));; |
| | | Information information1 = Objects.requireNonNull(BeanUtil.copy(information, Information.class)); |
| | | StringBuilder builder = new StringBuilder(); |
| | | //敏感数据处理 |
| | | if (null!=information1.getRepresentativecell() && !information1.getRepresentativecell().equals("")) { |
| | | information1.setRepresentativecell(DesensitizedUtil.desensitizedPhoneNumber(information1.getRepresentativecell())); |
| | | //如果带 * 则不修改 |
| | | if (!information.getRepresentativecell().contains("*")){ |
| | | builder.append(",representativecell = " + "'" + information.getRepresentativecell() + "'"); |
| | | } |
| | | } |
| | | if (null!=information1.getContacts() && !information1.getContacts().equals("")) { |
| | | information1.setContacts(DesensitizedUtil.desensitizedName(information1.getContacts())); |
| | | //如果带 * 则不修改 |
| | | if (!information.getContacts().contains("*")){ |
| | | builder.append(",contacts = " + "'" + information.getContacts() + "'"); |
| | | } |
| | | } |
| | | if (null!=information1.getContactscell() && !information1.getContactscell().equals("")) { |
| | | information1.setContactscell(DesensitizedUtil.desensitizedPhoneNumber(information1.getContactscell())); |
| | | //如果带 * 则不修改 |
| | | if (!information.getContactscell().contains("*")){ |
| | | builder.append(",contactscell = " + "'" + information.getContactscell() + "'"); |
| | | } |
| | | } |
| | | boolean b = informationService.updateById(information1); |
| | | if (b) { |
| | |
| | | } else { |
| | | licences = ""; |
| | | } |
| | | |
| | | if (information.getEstablishtime() != null && !"".equals(information.getEstablishtime())) { |
| | | format = new SimpleDateFormat("yyyy-MM-dd").format(information.getEstablishtime()); |
| | | builder.append(",establishTime = " + "'" + format + "'"); |
| | | |
| | | //内网同步 |
| | | String s1 = "update sys_information set creditCode = " + "'" + information.getCreditcode() + "'" + |
| | | ",enterpriseName = " + "'" + information.getEnterprisename() + "'" + |
| | | ",representative = " + "'" + information.getRepresentative() + "'" + |
| | | ",registeredCapital = " + "'" + information.getRegisteredcapital() + "'" + |
| | | ",jurisdiction = " + "'" + information.getJurisdiction() + "'" + |
| | | ",enterprises = " + "'" + information.getEnterprises() + "'" + |
| | | ",address = " + "'" + information.getAddress() + "'" + |
| | | ",business = " + "'" + information.getBusiness() + "'" + |
| | | ",region = " + "'" + information.getRegion() + "'" + |
| | | ",registration = " + "'" + information.getRegistration() + "'" + |
| | | ",industry = " + "'" + information.getIndustry() + "'" + |
| | | ",departmentid = " + "'" + information.getDepartmentid() + "'" + |
| | | ",stats = " + "'" + information.getStats() + "'" + |
| | | builder.toString() + |
| | | ",business_License = " + "'" + businessLicenses + "'" + |
| | | ",licence = " + "'" + licences + "'" + |
| | | " " + "where id = " + "'" + information.getId() + "'"; |
| | | //同步内网 |
| | | myAsyncService.FTP(s1); |
| | | }else { |
| | | //内网同步 |
| | | String s1 = "update sys_information set creditCode = " + "'" + information.getCreditcode() + "'" + |
| | | ",enterpriseName = " + "'" + information.getEnterprisename() + "'" + |
| | | ",representative = " + "'" + information.getRepresentative() + "'" + |
| | | ",registeredCapital = " + "'" + information.getRegisteredcapital() + "'" + |
| | | ",jurisdiction = " + "'" + information.getJurisdiction() + "'" + |
| | | ",enterprises = " + "'" + information.getEnterprises() + "'" + |
| | | ",address = " + "'" + information.getAddress() + "'" + |
| | | ",business = " + "'" + information.getBusiness() + "'" + |
| | | ",region = " + "'" + information.getRegion() + "'" + |
| | | ",registration = " + "'" + information.getRegistration() + "'" + |
| | | ",industry = " + "'" + information.getIndustry() + "'" + |
| | | ",departmentid = " + "'" + information.getDepartmentid() + "'" + |
| | | ",stats = " + "'" + information.getStats() + "'" + |
| | | builder.toString() + |
| | | ",business_License = " + "'" + businessLicenses + "'" + |
| | | ",licence = " + "'" + licences + "'" + |
| | | " " + "where id = " + "'" + information.getId() + "'"; |
| | | //同步内网 |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | |
| | | |
| | | //内网同步 |
| | | String s1 = "update sys_information set creditCode = " + "'" + information.getCreditcode() + "'" + |
| | | ",enterpriseName = " + "'" + information.getEnterprisename() + "'" + |
| | | ",representative = " + "'" + information.getRepresentative() + "'" + |
| | | ",establishTime = " + "'" + format + "'" + |
| | | ",registeredCapital = " + "'" + information.getRegisteredcapital() + "'" + |
| | | ",jurisdiction = " + "'" + information.getJurisdiction() + "'" + |
| | | ",enterprises = " + "'" + information.getEnterprises() + "'" + |
| | | ",address = " + "'" + information.getAddress() + "'" + |
| | | ",business = " + "'" + information.getBusiness() + "'" + |
| | | ",region = " + "'" + information.getRegion() + "'" + |
| | | ",registration = " + "'" + information.getRegistration() + "'" + |
| | | ",industry = " + "'" + information.getIndustry() + "'" + |
| | | ",departmentid = " + "'" + information.getDepartmentid() + "'" + |
| | | ",stats = " + "'" + information.getStats() + "'" + |
| | | ",representativecell = " + "'" + information.getRepresentativecell() + "'" + |
| | | ",contacts = " + "'" + information.getContacts() + "'" + |
| | | ",contactscell = " + "'" + information.getContactscell() + "'" + |
| | | ",business_License = " + "'" + businessLicenses + "'" + |
| | | ",licence = " + "'" + licences + "'" + |
| | | " " + "where id = " + "'" + information.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | return R.success("修改成功"); |
| | | } |