| | |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IDeptService; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import sun.net.www.http.HttpClient; |
| | | |
| | |
| | | private final IInformationService informationService; |
| | | private final IUserService userService; |
| | | private final IAttachService attachService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 详情 |
| | |
| | | "'" + permit.getRepresentativecell() + "'" + "," + "'" + permit.getContacts() + "'" + "," + "'" |
| | | + permit.getContactscell() + "'" + "," + "'" + permit.getJurisdiction() + "'" + |
| | | "," + "'" + permit.getCardid() + "'" + "," + "'" + overtime + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | return R.success("许可提交成功"); |
| | | } |
| | | |
| | |
| | | permit.setType("2"); |
| | | permit.setStorage("1"); |
| | | permit.setPermitime(new Date()); |
| | | permitService.save(permit); |
| | | boolean save = permitService.save(permit); |
| | | //String pertime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(permit.getPermitime()); |
| | | String overtime = new SimpleDateFormat("yyyy-MM-dd").format(permit.getOvertime()); |
| | | if (save) { |
| | | String s = "insert into sys_permit(id,creditCode,enterpriseName,representative," + |
| | | "registeredCapital,organizationCode,registrationNumber,identificationNumber,enterprises," + |
| | | "address,business,region,registration,industry,type,deptid,ptype,representativecell,contacts,contactscell,jurisdiction,cardid,overtime)" + |
| | |
| | | "'" + permit.getRepresentativecell() + "'" + "," + "'" + permit.getContacts() + "'" + "," + "'" |
| | | + permit.getContactscell() + "'" + "," + "'" + permit.getJurisdiction() + "'" + |
| | | "," + "'" + permit.getCardid() + "'" + "," + "'" + overtime + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | //返回 |
| | | return R.data(permit); |
| | | } |
| | |
| | | user.setRoleId("1414575196264300546"); |
| | | user.setStatus(1); |
| | | user.setIsDeleted(0); |
| | | userService.save(user); |
| | | boolean save = userService.save(user); |
| | | if (save) { |
| | | String roleid = "1415563428727328770"; |
| | | String s = "insert into sys_information(id,creditCode,enterpriseName,representative" + |
| | | ",registeredCapital,organizationCode,registrationNumber, enterprises, address," + |
| | |
| | | "," + "'" + information.getContacts() + "'" + |
| | | "," + "'" + information.getContactscell() + "'" + |
| | | "," + "'" + information.getCreateUserId() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | String ss = "insert into blade_dept(id,parent_id,tenant_id,dept_name,ancestors,dept_category,is_deleted) values(" + "'" + dept.getId() + "'" + "," + "'" + dept.getParentId() + "'" + "," |
| | | + "'" + dept.getTenantId() + "'" + |
| | | "," + "'" + information.getEnterprisename() + "'" + |
| | | "," + "'" + dept.getAncestors() + "'" + |
| | | "," + "'" + dept.getDeptCategory() + "'" + |
| | | "," + "'" + isDeleted + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(ss); |
| | | myAsyncService.FTP(ss); |
| | | String rtime; |
| | | String paperTime; |
| | | if (user.getRtime() == null) { |
| | |
| | | "," + "'" + user.getStatus() + "'" + |
| | | "," + "'" + user.getIsDeleted() + "'" + |
| | | "," + "'" + user.getDispatch() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(sss); |
| | | //// //注册用户 |
| | | //// User user = new User(); |
| | | //// user.setAccount(permit.getEnterprisename()); |
| | | //// String initPassword = ParamCache.getValue(DEFAULT_PARAM_PASSWORD); |
| | | //// user.setPassword(initPassword); |
| | | //// user.setRoleId("1414575196264300546"); |
| | | //// user.setDeptId(information.getDepartmentid()); |
| | | //// userService.saveOrUpdate(user); |
| | | // //把附件添加单位id |
| | | // attachService.updat(information.getDepartmentid(), permit.getCardid()); |
| | | myAsyncService.FTP(sss); |
| | | //把附件添加单位id |
| | | String s1 = "update sys_permit set type = " + "'" + 0 + "'" + ",approve = " + "'" + permit.getApprove() + "'" + |
| | | " " + "where id = " + "'" + permit.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } else { |
| | | String s1 = "update sys_permit set type = " + "'" + 1 + "'" + ",approve = " + "'" + permit.getApprove() + "'" + |
| | | " " + "where id = " + "'" + permit.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | return R.success("成功"); |
| | | } |
| | |
| | | |
| | | /** |
| | | * 保安公司/培训学校许可设立详情(基本信息和附件列表信息) |
| | | * |
| | | * @param record |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 许可备案集合信息 |
| | | * |
| | | * @param record |
| | | * @return |
| | | */ |