| | |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入information") |
| | | public R update(@Valid @RequestBody Information information) throws Exception { |
| | | return R.status(informationService.updateById(information)); |
| | | informationService.updateById(information); |
| | | String ip = "http://192.168.0.108"; |
| | | String businessLicense = information.getBusinessLicense().substring(26, information.getBusinessLicense().length()); |
| | | String licence = information.getLicence().substring(26, information.getLicence().length()); |
| | | //内网同步 |
| | | String s1 = "update sys_information set creditcode = " + "'" + information.getCreditcode() + "'" + |
| | | ",enterprisename = " + "'" + information.getEnterprisename() + "'" + |
| | | ",representative = " + "'" + information.getRepresentative() + "'" + |
| | | ",establishtime = " + "'" + new SimpleDateFormat("yyyy-MM-dd").format(information.getEstablishtime()) + "'" + |
| | | ",registeredcapital = " + "'" + information.getRegisteredcapital() + "'" + |
| | | ",organizationcode = " + "'" + information.getOrganizationcode() + "'" + |
| | | ",registrationnumber = " + "'" + information.getRegistrationnumber() + "'" + |
| | | ",enterprises = " + "'" + information.getEnterprises() + "'" + |
| | | ",address = " + "'" + information.getAddress() + "'" + |
| | | ",business = " + "'" + information.getBusiness() + "'" + |
| | | ",region = " + "'" + information.getRegion() + "'" + |
| | | ",registration = " + "'" + information.getRegistration() + "'" + |
| | | ",industry = " + "'" + information.getIndustry() + "'" + |
| | | ",departmentid = " + "'" + information.getDepartmentid() + "'" + |
| | | ",stats = " + "'" + information.getStats() + "'" + |
| | | ",jurisdiction = " + "'" + information.getJurisdiction() + "'" + |
| | | ",representativecell = " + "'" + information.getRepresentativecell() + "'" + |
| | | ",contacts = " + "'" + information.getContacts() + "'" + |
| | | ",contactscell = " + "'" + information.getContactscell() + "'" + |
| | | ",business_License = " + "'" + ip + businessLicense + "'" + |
| | | ",licence = " + "'" + ip + licence + "'" + |
| | | " " + "where id = " + "'" + information.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | return R.success("修改成功"); |
| | | } |
| | | |
| | | /** |
| | |
| | | String pertime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(recordk.getPermitime()); |
| | | String s = "insert into sys_record(id,creditCode,enterpriseName,representative,establishtime," + |
| | | "registeredCapital,organizationCode,registrationNumber,identificationNumber,enterprises," + |
| | | "address,business,region,registration,industry,type,permitime,deptid,ptype,representativecell,contacts,contactscell,perid,offices,officetime,jurisdiction)" + |
| | | "address,business,region,registration,industry,type,permitime,deptid,ptype,representativecell,contacts,contactscell,perid,offices,officetime,cardid)" + |
| | | "values(" + "'" + recordk.getId() + "'" + "," + "'" + recordk.getCreditcode() + "'" + "," + "'" + recordk.getEnterprisename() + "'" + "," + "'" |
| | | + recordk.getRepresentative() + "'" + "," + |
| | | "'" + formatStr + "'" + "," + "'" + recordk.getRegisteredcapital() + "'" + "," + "'" |
| | |
| | | recordk.getAddress() + "'" + "," + "'" + recordk.getBusiness() + "'" + "," + "'" + |
| | | recordk.getRegion() + "'" + "," + "'" + recordk.getRegistration() + "'" + "," + "'" + recordk.getIndustry() + "'" + "," + "'" + recordk.getType() + "'" + "," + "'" + pertime + "'" + "," + "'" + recordk.getDeptid() + "'" + "," + "'" + recordk.getPtype() + "'" + "," + |
| | | "'" + recordk.getRepresentativecell() + "'" + "," + "'" + recordk.getContacts() + "'" + "," + "'" + recordk.getContactscell() + "'" + "," + |
| | | "'" + recordk.getPerid() + "'" + "," + "'" + recordk.getOffices() + "'" + "," + "'" + offtime + "'" + "," + "'"+ ")"; |
| | | "'" + recordk.getPerid() + "'" + "," + "'" + recordk.getOffices() + "'" + "," + "'" + offtime + "'"+ "," + "'" + recordk.getCardid() + "'"+")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | return R.success("成功"); |
| | | } |
| | |
| | | String newName = "upload/picture/" + UUID.randomUUID().toString().replaceAll("-", "") |
| | | + fileName.substring(fileName.lastIndexOf(".")); |
| | | InputStream in = file.getInputStream(); |
| | | String[] split = newName.split("/"); |
| | | //创建头部信息 |
| | | Map<String, String> headers = new HashMap<>(1 << 2); |
| | | //添加自定义内容类型 |
| | |
| | | in, in.available(), -1) |
| | | .headers(headers) |
| | | .build()); |
| | | FtpUtil.uploadFile(ftpHost_dev, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", split[2], in); |
| | | in.close(); |
| | | String urls = "http://223.82.109.183:2081/zhba/" + newName; |
| | | //数据封装 |
| | |
| | | } else { |
| | | s1 += ") " + |
| | | "values(" + "'" + attach.getId() + "'" + "," + |
| | | "'" + 000000 + "'" + "," + |
| | | "'" + attach.getTenantId() + "'" + "," + |
| | | "'" + imgurl + "'" + "," + |
| | | "'" + ip + "'" + "," + |
| | | "'" + split[2] + "'" + "," + |
| | |
| | | String pertime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(revoke.getPermitime()); |
| | | String s = "insert into sys_revoke(id,creditCode,enterpriseName,representative,establishTime," + |
| | | "registeredCapital,organizationCode,registrationNumber,identificationNumber,enterprises," + |
| | | "address,business,region,registration,industry,type,permitime,deptid,ptype,representativecell,contacts,contactscell,reason,jurisdiction)" + |
| | | "address,business,region,registration,industry,type,permitime,deptid,ptype,representativecell,contacts,contactscell,reason,jurisdiction,cardid)" + |
| | | "values(" + "'" + revoke.getId() + "'" + "," + "'" + revoke.getCreditcode() + "'" + "," + "'" + revoke.getEnterprisename() + "'" + "," + "'" |
| | | + revoke.getRepresentative() + "'" + "," + |
| | | "'" + formatStr + "'" + "," + "'" + revoke.getRegisteredcapital() + "'" + "," + "'" |
| | |
| | | + revoke.getType() + "'" + "," + |
| | | "'" + pertime + "'" + "," + "'" + revoke.getDeptid() + "'" + "," + "'" + revoke.getPtype() + "'" + "," + |
| | | "'" + revoke.getRepresentativecell() + "'" + "," + "'" + revoke.getContacts() + "'" + "," + "'" + revoke.getContactscell() + "'" + "," + |
| | | "'" + revoke.getReason() + "'" + "," + "'" + revoke.getJurisdiction() + "'" + ")"; |
| | | "'" + revoke.getReason() + "'" + "," + "'" + revoke.getJurisdiction() + "'" +"," + "'" + revoke.getCardid() + "'"+ ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | return R.success("成功"); |
| | | } |