| | |
| | | record.setType("2"); |
| | | record.setPermitime(new Date()); |
| | | recordService.save(record); |
| | | String offtime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(record.getOfficetime()); |
| | | String pertime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(record.getPermitime()); |
| | | String s = "insert into sys_record(id,enterpriseName,representative," + |
| | | "address,business,registration,industry,type,permitime,ptype,representativecell,contacts,contactscell,perid,offices,officetime,jurisdiction,cardid,storage,overtime)" + |
| | | "values(" + "'" + record.getId() + "'"+ "," + "'" + record.getEnterprisename() + "'" + "," + |
| | | "'" + record.getRepresentative() + "'"+ "," + "'" + |
| | | record.getAddress() + "'" + "," + "'" + record.getBusiness() + "'" + "," + "'" + record.getRegistration() + "'" + "," + "'" + record.getIndustry() + "'" + "," + "'" + record.getType() + "'" + "," + "'" + pertime + "'" + "," + "'" + record.getPtype() + "'" + "," + |
| | | "'" + record.getRepresentativecell() + "'" + "," + "'" + record.getContacts() + "'" + "," + "'" + record.getContactscell() + "'" + "," +"'" + record.getPerid() + "'" + "," + "'" + record.getOffices() + "'" + "," + |
| | | "'" + offtime + "'" + "," + "'" + record.getJurisdiction() + "'" + |
| | | "," + "'" + record.getCardid() + "'"+ |
| | | "," + "'" + record.getStorage() + "'"+ |
| | | "," + "'" + new SimpleDateFormat("yyyy-MM-dd").format(record.getOvertime()) + "'" |
| | | + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | // String offtime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(record.getOfficetime()); |
| | | // String pertime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(record.getPermitime()); |
| | | // String s = "insert into sys_record(id,enterpriseName,representative," + |
| | | // "address,business,registration,industry,type,permitime,ptype,representativecell,contacts,contactscell,perid,offices,officetime,jurisdiction,cardid,storage,overtime)" + |
| | | // "values(" + "'" + record.getId() + "'"+ "," + "'" + record.getEnterprisename() + "'" + "," + |
| | | // "'" + record.getRepresentative() + "'"+ "," + "'" + |
| | | // record.getAddress() + "'" + "," + "'" + record.getBusiness() + "'" + "," + "'" + record.getRegistration() + "'" + "," + "'" + record.getIndustry() + "'" + "," + "'" + record.getType() + "'" + "," + "'" + pertime + "'" + "," + "'" + record.getPtype() + "'" + "," + |
| | | // "'" + record.getRepresentativecell() + "'" + "," + "'" + record.getContacts() + "'" + "," + "'" + record.getContactscell() + "'" + "," +"'" + record.getPerid() + "'" + "," + "'" + record.getOffices() + "'" + "," + |
| | | // "'" + offtime + "'" + "," + "'" + record.getJurisdiction() + "'" + |
| | | // "," + "'" + record.getCardid() + "'"+ |
| | | // "," + "'" + record.getStorage() + "'"+ |
| | | // "," + "'" + new SimpleDateFormat("yyyy-MM-dd").format(record.getOvertime()) + "'" |
| | | // + ")"; |
| | | // FtpUtil.sqlFileUpload(s); |
| | | return R.success("成功"); |
| | | } |
| | | |
| | |
| | | public R update(@Valid @RequestBody Record record) { |
| | | //审核通过 |
| | | if (record.getType().equals("0")) { |
| | | //新增组织机构和单位信息 |
| | | /* //新增组织机构和单位信息 |
| | | Information information =new Information(); |
| | | information.setCreditcode(record.getCreditcode()); |
| | | information.setEnterprisename(record.getEnterprisename()); |
| | |
| | | ",sopinion = " + "'" + record.getSopinion() + "'"+ |
| | | ",xopinion = " + "'" + record.getXopinion() + "'"+ |
| | | " " +"where id = " + "'" + record.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | FtpUtil.sqlFileUpload(s1);*/ |
| | | } |
| | | else { |
| | | String s1 = "update sys_record set type = " + "'" + record.getType() + "'" + |
| | | ",papprove = " + "'" + record.getPapprove() + "'"+ |
| | | ",xapprove = " + "'" + record.getXapprove() + "'"+ |
| | | ",sapprove = " + "'" + record.getSapprove() + "'"+ |
| | | ",popinion = " + "'" + record.getPopinion() + "'"+ |
| | | ",sopinion = " + "'" + record.getSopinion() + "'"+ |
| | | ",xopinion = " + "'" + record.getXopinion() + "'"+ |
| | | " " +"where id = " + "'" + record.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | // String s1 = "update sys_record set type = " + "'" + record.getType() + "'" + |
| | | // ",papprove = " + "'" + record.getPapprove() + "'"+ |
| | | // ",xapprove = " + "'" + record.getXapprove() + "'"+ |
| | | // ",sapprove = " + "'" + record.getSapprove() + "'"+ |
| | | // ",popinion = " + "'" + record.getPopinion() + "'"+ |
| | | // ",sopinion = " + "'" + record.getSopinion() + "'"+ |
| | | // ",xopinion = " + "'" + record.getXopinion() + "'"+ |
| | | // " " +"where id = " + "'" + record.getId() + "'"; |
| | | // FtpUtil.sqlFileUpload(s1); |
| | | } |
| | | return R.status(recordService.saveOrUpdate(record)); |
| | | } |