| | |
| | | /** |
| | | * sql connect |
| | | */ |
| | | String sql_connect_dev = "jdbc:mysql://223.82.109.183:2083/zhbaw?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true"; |
| | | //String sql_connect_dev = "jdbc:mysql://223.82.109.183:2083/zhbaw?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true"; |
| | | |
| | | /** |
| | | * sql connect |
| | | */ |
| | | //String sql_connect_dev = "jdbc:mysql://localhost:2083/zhbaw?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true"; |
| | | String sql_connect_dev = "jdbc:mysql://localhost:2083/zhbaw?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true"; |
| | | |
| | | /** |
| | | * ftp服务器IP地址 |
| | | */ |
| | | String ftpHost_dev = "192.168.0.110"; |
| | | //String ftpHost_dev = "192.168.0.112"; |
| | | |
| | | /** |
| | | * ftp服务器IP地址 |
| | | */ |
| | | //String ftpHost_dev = "172.19.1.30"; |
| | | String ftpHost_dev = "172.19.1.30"; |
| | | |
| | | /** |
| | | * ftp服务器端口 |
| | |
| | | /** |
| | | * ftp服务器用户名 |
| | | */ |
| | | //String ftpUserName = "yly"; |
| | | String ftpUserName = "anonymous"; |
| | | String ftpUserName = "yly"; |
| | | //String ftpUserName = "anonymous"; |
| | | |
| | | /** |
| | | * ftp服务器密码 |
| | | */ |
| | | //String ftpPassword = "Yly@123"; |
| | | String ftpPassword = ""; |
| | | String ftpPassword = "Yly@123"; |
| | | //String ftpPassword = ""; |
| | | |
| | | |
| | | /** |
| | | * ftp服务器路径 |
| | | */ |
| | | //String ftpPath = "yly/anbao/"; |
| | | String ftpPath = "anbao/"; |
| | | String ftpPath = "yly/anbao/"; |
| | | //String ftpPath = "anbao/"; |
| | | |
| | | /** |
| | | * 本地路径 |
| | | */ |
| | | //String localPath = "/home/zhongsong/anbao/"; |
| | | String localPath = "D:\\anbao\\"; |
| | | String localPath = "/home/zhongsong/anbao/"; |
| | | //String localPath = "D:\\anbao\\"; |
| | | |
| | | |
| | | //minio内网ip |
| | | //String ip = "http://47.49.21.216:9000"; |
| | | String ip = "http://223.82.109.183:2081"; |
| | | String ip = "http://47.49.21.216:9000"; |
| | | //String ip = "http://223.82.109.183:2081"; |
| | | |
| | | //String jsonUrl = "/home/zhongsong/anbao/"; |
| | | String jsonUrl = "D:\\anbao\\"; |
| | | String jsonUrl = "/home/zhongsong/anbao/"; |
| | | //String jsonUrl = "D:\\anbao\\"; |
| | | } |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | FtpUtil.uploadFile(ftpHost_dev, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", "w"+response1+".json", in1); |
| | | MysqlCenlint.deletess("w"+response1+".json"); |
| | | } |
| | | |
| | | } |
| | |
| | | informationService.save(information); |
| | | String formatStr = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(information.getEstablishtime()); |
| | | //Integer id = information.getId(); |
| | | String s = "insert into sys_information(id,creditcode,enterprisename,representative,establishtime," + |
| | | "registeredcapital,organizationcode,registrationnumber, enterprises, address," + |
| | | String s = "insert into sys_information(id,creditCode,enterpriseName,representative,establishTime," + |
| | | "registeredCapital,organizationCode,registrationNumber, enterprises, address," + |
| | | " business,region,registration,industry,departmentid,stats,jurisdiction,representativecell,contacts,contactscell) " + |
| | | "values(" + "'" + information.getId() + "'" + "," + "'" + information.getCreditcode() + "'" + "," + "'" + information.getEnterprisename() + "'" + "," + "'" + information.getRepresentative() + "'" + "," + |
| | | "'" + formatStr + "'" + "," + "'" + information.getRegisteredcapital() + "'" + "," + "'" + information.getOrganizationcode() + "'" + "," + "'" + information.getRegistrationnumber() + "'" + "," + "'" + information.getEnterprises() + "'" + "," + "'" + |
| | |
| | | format = new SimpleDateFormat("yyyy-MM-dd").format(information.getEstablishtime()); |
| | | } |
| | | //内网同步 |
| | | String s1 = "update sys_information set creditcode = " + "'" + information.getCreditcode() + "'" + |
| | | ",enterprisename = " + "'" + information.getEnterprisename() + "'" + |
| | | String s1 = "update sys_information set creditCode = " + "'" + information.getCreditcode() + "'" + |
| | | ",enterpriseName = " + "'" + information.getEnterprisename() + "'" + |
| | | ",representative = " + "'" + information.getRepresentative() + "'" + |
| | | ",establishtime = " + "'" + format + "'" + |
| | | ",registeredcapital = " + "'" + information.getRegisteredcapital() + "'" + |
| | | ",organizationcode = " + "'" + information.getOrganizationcode() + "'" + |
| | | ",registrationnumber = " + "'" + information.getRegistrationnumber() + "'" + |
| | | ",establishTime = " + "'" + format + "'" + |
| | | ",registeredCapital = " + "'" + information.getRegisteredcapital() + "'" + |
| | | ",jurisdiction = " + "'" + information.getJurisdiction() + "'" + |
| | | ",enterprises = " + "'" + information.getEnterprises() + "'" + |
| | | ",address = " + "'" + information.getAddress() + "'" + |
| | | ",business = " + "'" + information.getBusiness() + "'" + |
| | |
| | | ",industry = " + "'" + information.getIndustry() + "'" + |
| | | ",departmentid = " + "'" + information.getDepartmentid() + "'" + |
| | | ",stats = " + "'" + information.getStats() + "'" + |
| | | ",jurisdiction = " + "'" + information.getJurisdiction() + "'" + |
| | | ",representativecell = " + "'" + information.getRepresentativecell() + "'" + |
| | | ",contacts = " + "'" + information.getContacts() + "'" + |
| | | ",contactscell = " + "'" + information.getContactscell() + "'" + |
| | |
| | | public R save(@Valid @RequestBody Permit permit) throws FileNotFoundException { |
| | | String cardid = permit.getCardid(); |
| | | String type = permit.getPtype(); |
| | | Map map = permitService.selectIn(cardid,type); |
| | | Map map = permitService.selectIn(cardid, type); |
| | | if (map != null) { |
| | | String id = map.get("id").toString(); |
| | | permitService.removeByIds(Func.toLongList(id)); |
| | |
| | | "registeredCapital,organizationCode,registrationNumber,identificationNumber,enterprises," + |
| | | "address,business,region,registration,industry,type,permitime,deptid,ptype,representativecell,contacts,contactscell,jurisdiction,cardid)" + |
| | | "values(" + "'" + permit.getId() + "'" + "," + "'" + permit.getCreditcode() + "'" + "," + "'" + permit.getEnterprisename() + "'" + "," + "'" |
| | | + permit.getRepresentative() + "'" + "," +"'" + permit.getRegisteredcapital() + "'" + "," + "'" |
| | | + permit.getRepresentative() + "'" + "," + "'" + permit.getRegisteredcapital() + "'" + "," + "'" |
| | | + permit.getOrganizationcode() + "'" + "," + "'" + permit.getRegistrationnumber() + "'" + "," + |
| | | "'" + permit.getIdentificationnumber() + "'" + "," + "'" + permit.getEnterprises() + "'" + "," + "'" + |
| | | permit.getAddress() + "'" + "," + "'" + permit.getBusiness() + "'" + "," + "'" + |
| | | permit.getRegion() + "'" + "," + "'" + permit.getRegistration() + "'" + "," + "'" + permit.getIndustry()+ "'" + "," + "'" |
| | | permit.getRegion() + "'" + "," + "'" + permit.getRegistration() + "'" + "," + "'" + permit.getIndustry() + "'" + "," + "'" |
| | | + permit.getType() + "'" + "," + |
| | | "'" + pertime + "'" + "," + "'" + permit.getDeptid() + "'" + "," + "'" + permit.getPtype() + "'" + "," + |
| | | "'" + permit.getRepresentativecell() + "'" + "," + "'" + permit.getContacts() + "'" + "," + "'" |
| | | + permit.getContactscell() + "'"+"," + "'" + permit.getJurisdiction() + "'"+ |
| | | "," + "'" + permit.getCardid() + "'"+")" ; |
| | | + permit.getContactscell() + "'" + "," + "'" + permit.getJurisdiction() + "'" + |
| | | "," + "'" + permit.getCardid() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | return R.success("新增成功"); |
| | | return R.success("许可提交成功"); |
| | | } |
| | | |
| | | /** |
| | |
| | | public R storage(@Valid @RequestBody Permit permit) { |
| | | String cardid = permit.getCardid(); |
| | | String type = permit.getPtype(); |
| | | Map map = permitService.selectIn(cardid,type); |
| | | Map map = permitService.selectIn(cardid, type); |
| | | if (map != null) { |
| | | permit.setStorage("0"); |
| | | permitService.updateById(permit); |
| | |
| | | |
| | | |
| | | @PostMapping("/selectIn") |
| | | public R selectIn(String cardid ,String type) { |
| | | Map map = permitService.selectIn(cardid,type); |
| | | public R selectIn(String cardid, String type) { |
| | | Map map = permitService.selectIn(cardid, type); |
| | | return R.data(map); |
| | | } |
| | | |
| | |
| | | //审核通过 |
| | | if (permit.getType().equals("0")) { |
| | | //新增组织机构和单位信息 |
| | | Information information =new Information(); |
| | | Information information = new Information(); |
| | | information.setCreditcode(permit.getCreditcode()); |
| | | information.setEnterprisename(permit.getEnterprisename()); |
| | | information.setRepresentative(permit.getRepresentative()); |
| | |
| | | information.setContactscell(permit.getContactscell()); |
| | | Dept dept = new Dept(); |
| | | //本市公司 |
| | | if (permit.getPtype().equals("0")){ |
| | | if (permit.getPtype().equals("0")) { |
| | | Long i = 1413470343230877697L; |
| | | dept.setParentId(i); |
| | | dept.setAncestors("0,1413470343230877697"); |
| | | } |
| | | //培训公司 |
| | | else if (permit.getPtype().equals("1")){ |
| | | else if (permit.getPtype().equals("1")) { |
| | | Long i = 1418458374477549569L; |
| | | dept.setParentId(i); |
| | | dept.setAncestors("0,1418458374477549569"); |
| | | } |
| | | else{ |
| | | } else { |
| | | Long i = 1420222961377357825L; |
| | | dept.setParentId(i); |
| | | dept.setAncestors("0,1420222961377357825"); |
| | |
| | | user.setPassword(initPassword); |
| | | userService.saveOrUpdate(user); |
| | | //把附件添加单位id |
| | | attachService.updat(information.getDepartmentid(),permit.getCardid()); |
| | | String s1 = "update sys_permit set type = " + "'" + 0 + "'" +",approve = " + "'" + permit.getApprove() + "'"+ |
| | | " " +"where id = " + "'" + permit.getId() + "'"; |
| | | attachService.updat(information.getDepartmentid(), permit.getCardid()); |
| | | String s1 = "update sys_permit set type = " + "'" + 0 + "'" + ",approve = " + "'" + permit.getApprove() + "'" + |
| | | " " + "where id = " + "'" + permit.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | } |
| | | else { |
| | | String s1 = "update sys_permit set type = " + "'" + 1 + "'" +",approve = " + "'" + permit.getApprove() + "'"+ |
| | | " " +"where id = " + "'" + permit.getId() + "'"; |
| | | } else { |
| | | String s1 = "update sys_permit set type = " + "'" + 1 + "'" + ",approve = " + "'" + permit.getApprove() + "'" + |
| | | " " + "where id = " + "'" + permit.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | } |
| | | return R.status(permitService.updateById(permit)); |