| | |
| | | @Component |
| | | public class monitor { |
| | | |
| | | @Scheduled(cron = "*/30 * * * * ?") |
| | | //@Scheduled(cron = "*/30 * * * * ?") |
| | | public static boolean isFTPFileExist() { |
| | | |
| | | FTPClient ftp = new FTPClient(); |
| | |
| | | ) H |
| | | LEFT JOIN |
| | | ( SELECT COUNT(*) AS num, u.dept_id FROM blade_user u WHERE (u.examination_type = 0 or |
| | | u.examination_type is null) and role_id = |
| | | u.examination_type is null OR u.examination_type = "") and role_id = |
| | | '1412226235153731586' AND `status` = 1 AND is_deleted = 0 GROUP BY u.dept_id |
| | | ) A |
| | | ON H.departmentid = A.dept_id |
| | |
| | | public R update(@Valid @RequestBody Permit permit) { |
| | | //审核通过 |
| | | if (permit.getType().equals("0")) { |
| | | //新增组织机构和单位信息 |
| | | Information information = new Information(); |
| | | information.setCreditcode(permit.getCreditcode()); |
| | | information.setEnterprisename(permit.getEnterprisename()); |
| | | information.setRepresentative(permit.getRepresentative()); |
| | | information.setEstablishtime(permit.getEstablishtime()); |
| | | information.setRegisteredcapital(permit.getRegisteredcapital()); |
| | | information.setOrganizationcode(permit.getOrganizationcode()); |
| | | information.setRegistrationnumber(permit.getRegistrationnumber()); |
| | | information.setEnterprises(permit.getEnterprises()); |
| | | information.setAddress(permit.getAddress()); |
| | | information.setBusiness(permit.getBusiness()); |
| | | information.setRegion(permit.getRegion()); |
| | | information.setRegistration(permit.getRegistration()); |
| | | information.setIndustry(permit.getIndustry()); |
| | | information.setRepresentativecell(permit.getRepresentativecell()); |
| | | information.setContacts(permit.getContacts()); |
| | | information.setContactscell(permit.getContactscell()); |
| | | Dept dept = new Dept(); |
| | | //本市公司 |
| | | if (permit.getPtype().equals("0")) { |
| | | Long i = 1413470343230877697L; |
| | | dept.setParentId(i); |
| | | dept.setAncestors("0,1413470343230877697"); |
| | | } |
| | | //培训公司 |
| | | else if (permit.getPtype().equals("1")) { |
| | | Long i = 1418458374477549569L; |
| | | dept.setParentId(i); |
| | | dept.setAncestors("0,1418458374477549569"); |
| | | } else { |
| | | Long i = 1420222961377357825L; |
| | | dept.setParentId(i); |
| | | dept.setAncestors("0,1420222961377357825"); |
| | | } |
| | | dept.setTenantId("000000"); |
| | | dept.setDeptName(information.getEnterprisename()); |
| | | dept.setDeptCategory(1); |
| | | if (iDeptService.submit(dept)) { |
| | | CacheUtil.clear(SYS_CACHE); |
| | | // 返回懒加载树更新节点所需字段 |
| | | Kv kv = Kv.create().set("id", String.valueOf(dept.getId())).set("tenantId", dept.getTenantId()) |
| | | .set("deptCategoryName", DictCache.getValue(DictEnum.ORG_CATEGORY, dept.getDeptCategory())); |
| | | String id = kv.get("id").toString(); |
| | | information.setDepartmentid(id); |
| | | } |
| | | informationService.save(information); |
| | | //注册用户 |
| | | User user = new User(); |
| | | user.setAccount(permit.getEnterprisename()); |
| | | String initPassword = ParamCache.getValue(DEFAULT_PARAM_PASSWORD); |
| | | user.setPassword(initPassword); |
| | | userService.saveOrUpdate(user); |
| | | // //新增组织机构和单位信息 |
| | | // Information information = new Information(); |
| | | // information.setCreditcode(permit.getCreditcode()); |
| | | // information.setEnterprisename(permit.getEnterprisename()); |
| | | // information.setRepresentative(permit.getRepresentative()); |
| | | // information.setEstablishtime(permit.getEstablishtime()); |
| | | // information.setRegisteredcapital(permit.getRegisteredcapital()); |
| | | // information.setOrganizationcode(permit.getOrganizationcode()); |
| | | // information.setRegistrationnumber(permit.getRegistrationnumber()); |
| | | // information.setEnterprises(permit.getEnterprises()); |
| | | // information.setAddress(permit.getAddress()); |
| | | // information.setBusiness(permit.getBusiness()); |
| | | // information.setRegion(permit.getRegion()); |
| | | // information.setRegistration(permit.getRegistration()); |
| | | // information.setIndustry(permit.getIndustry()); |
| | | // information.setRepresentativecell(permit.getRepresentativecell()); |
| | | // information.setContacts(permit.getContacts()); |
| | | // information.setContactscell(permit.getContactscell()); |
| | | // Dept dept = new Dept(); |
| | | // //本市公司 |
| | | // if (permit.getPtype().equals("0")) { |
| | | // Long i = 1413470343230877697L; |
| | | // dept.setParentId(i); |
| | | // dept.setAncestors("0,1413470343230877697"); |
| | | // } |
| | | // //培训公司 |
| | | // else if (permit.getPtype().equals("1")) { |
| | | // Long i = 1418458374477549569L; |
| | | // dept.setParentId(i); |
| | | // dept.setAncestors("0,1418458374477549569"); |
| | | // } else { |
| | | // Long i = 1420222961377357825L; |
| | | // dept.setParentId(i); |
| | | // dept.setAncestors("0,1420222961377357825"); |
| | | // } |
| | | // dept.setTenantId("000000"); |
| | | // dept.setDeptName(information.getEnterprisename()); |
| | | // dept.setDeptCategory(1); |
| | | // if (iDeptService.submit(dept)) { |
| | | // CacheUtil.clear(SYS_CACHE); |
| | | // // 返回懒加载树更新节点所需字段 |
| | | // Kv kv = Kv.create().set("id", String.valueOf(dept.getId())).set("tenantId", dept.getTenantId()) |
| | | // .set("deptCategoryName", DictCache.getValue(DictEnum.ORG_CATEGORY, dept.getDeptCategory())); |
| | | // String id = kv.get("id").toString(); |
| | | // information.setDepartmentid(id); |
| | | // } |
| | | // informationService.save(information); |
| | | // //注册用户 |
| | | // User user = new User(); |
| | | // user.setAccount(permit.getEnterprisename()); |
| | | // String initPassword = ParamCache.getValue(DEFAULT_PARAM_PASSWORD); |
| | | // 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() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | // attachService.updat(information.getDepartmentid(), permit.getCardid()); |
| | | // String s1 = "update sys_permit set type = " + "'" + permit.getType() + "'" + |
| | | // ",papprove = " + "'" + permit.getPapprove() + "'"+ |
| | | // ",xapprove = " + "'" + permit.getXapprove() + "'"+ |
| | | // ",sapprove = " + "'" + permit.getSapprove() + "'"+ |
| | | // ",popinion = " + "'" + permit.getPopinion() + "'"+ |
| | | // ",sopinion = " + "'" + permit.getSopinion() + "'"+ |
| | | // ",xopinion = " + "'" + permit.getXopinion() + "'"+ |
| | | // " " +"where id = " + "'" + permit.getId() + "'"; |
| | | // FtpUtil.sqlFileUpload(s1); |
| | | } else { |
| | | String s1 = "update sys_permit set type = " + "'" + 1 + "'" + ",approve = " + "'" + permit.getApprove() + "'" + |
| | | " " + "where id = " + "'" + permit.getId() + "'"; |
| | | String s1 = "update sys_permit set type = " + "'" + permit.getType() + "'" + |
| | | ",papprove = " + "'" + permit.getPapprove() + "'"+ |
| | | ",xapprove = " + "'" + permit.getXapprove() + "'"+ |
| | | ",sapprove = " + "'" + permit.getSapprove() + "'"+ |
| | | ",popinion = " + "'" + permit.getPopinion() + "'"+ |
| | | ",sopinion = " + "'" + permit.getSopinion() + "'"+ |
| | | ",xopinion = " + "'" + permit.getXopinion() + "'"+ |
| | | " " +"where id = " + "'" + permit.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | } |
| | | return R.status(permitService.updateById(permit)); |
| | |
| | | private String contactscell; |
| | | private String approve; |
| | | private String jurisdiction; |
| | | //派出所审批 |
| | | private String papprove; |
| | | //县审批 |
| | | private String xapprove; |
| | | //市审批 |
| | | private String sapprove; |
| | | //派出意见 |
| | | private String popinion; |
| | | //县意见 |
| | | private String xopinion; |
| | | //市意见 |
| | | private String sopinion; |
| | | |
| | | |
| | | } |
| | |
| | | <result column="contactscell" property="contactscell"/> |
| | | <result column="approve" property="approve"/> |
| | | <result column="jurisdiction" property="jurisdiction"/> |
| | | <result column="papprove" property="papprove"/> |
| | | <result column="xapprove" property="xapprove"/> |
| | | <result column="sapprove" property="sapprove"/> |
| | | <result column="popinion" property="popinion"/> |
| | | <result column="xopinion" property="xopinion"/> |
| | | <result column="sopinion" property="sopinion"/> |
| | | <result column="overtime" property="overtime"/> |
| | | </resultMap> |
| | | |
| | |
| | | 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,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,cardid)" + |
| | | "values(" + "'" + record.getId() + "'" + "," + "'" + record.getCreditcode() + "'" + "," + "'" + record.getEnterprisename() + "'" + "," + "'"+ record.getRepresentative() + "'" + "," + "'" + record.getRegisteredcapital() + "'" + "," + "'" |
| | | + record.getOrganizationcode() + "'" + "," + "'" + record.getRegistrationnumber() + "'" + "," + |
| | | "'" + record.getIdentificationnumber() + "'" + "," + "'" + record.getEnterprises() + "'" + "," + "'" + |
| | | record.getAddress() + "'" + "," + "'" + record.getBusiness() + "'" + "," + "'" + |
| | | record.getRegion() + "'" + "," + "'" + record.getRegistration() + "'" + "," + "'" + record.getIndustry() + "'" + "," + "'" + record.getType() + "'" + "," + "'" + pertime + "'" + "," + "'" + record.getDeptid() + "'" + "," + "'" + record.getPtype() + "'" + "," + |
| | | 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() + "'"+ ")"; |
| | | "'" + offtime + "'" + "," + "'" + record.getJurisdiction() + "'" + |
| | | "," + "'" + record.getCardid() + "'"+ |
| | | "," + "'" + record.getStorage() + "'"+ |
| | | "," + "'" + new SimpleDateFormat("yyyy-MM-dd").format(record.getOvertime()) + "'" |
| | | + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | return R.success("成功"); |
| | | } |
| | |
| | | userService.saveOrUpdate(user); |
| | | //把附件添加单位id |
| | | attachService.updat(information.getDepartmentid(),record.getCardid()); |
| | | String s1 = "update sys_permit set type = " + "'" + 0 + "'" +",approve = " + "'" + record.getApprove() + "'"+ |
| | | 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); |
| | | } |
| | | else { |
| | | String s1 = "update sys_permit set type = " + "'" + 1 + "'" +",approve = " + "'" + record.getApprove() + "'"+ |
| | | 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.updateById(record)); |
| | | return R.status(recordService.saveOrUpdate(record)); |
| | | } |
| | | |
| | | /** |
| | |
| | | private String contactscell; |
| | | private String storage; |
| | | private String jurisdiction; |
| | | //派出所审批 |
| | | private String papprove; |
| | | //县审批 |
| | | private String xapprove; |
| | | //市审批 |
| | | private String sapprove; |
| | | //派出意见 |
| | | private String popinion; |
| | | //县意见 |
| | | private String xopinion; |
| | | //市意见 |
| | | private String sopinion; |
| | | |
| | | @ApiModelProperty(value = "审批时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | |
| | | <result column="contactscell" property="contactscell"/> |
| | | <result column="storage" property="storage"/> |
| | | <result column="jurisdiction" property="jurisdiction"/> |
| | | <result column="papprove" property="papprove"/> |
| | | <result column="xapprove" property="xapprove"/> |
| | | <result column="sapprove" property="sapprove"/> |
| | | <result column="popinion" property="popinion"/> |
| | | <result column="xopinion" property="xopinion"/> |
| | | <result column="sopinion" property="sopinion"/> |
| | | <result column="overtime" property="overtime"/> |
| | | </resultMap> |
| | | |
| | |
| | | recordkService.save(recordk); |
| | | String offtime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(recordk.getOfficetime()); |
| | | String pertime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(recordk.getPermitime()); |
| | | String s = "insert into sys_record(id,creditCode,enterpriseName,representative," + |
| | | String s = "insert into sys_recordk(id,creditCode,enterpriseName,representative," + |
| | | "registeredCapital,organizationCode,registrationNumber,identificationNumber,enterprises," + |
| | | "address,business,region,registration,industry,type,permitime,deptid,ptype,representativecell,contacts,contactscell,perid,offices,officetime,cardid)" + |
| | | "address,business,region,registration,industry,type,permitime,deptid,ptype,representativecell,contacts,contactscell,perid,offices,officetime,cardid,overtime)" + |
| | | "values(" + "'" + recordk.getId() + "'" + "," + "'" + recordk.getCreditcode() + "'" + "," + "'" + recordk.getEnterprisename() + "'" + "," + "'" |
| | | + recordk.getRepresentative() + "'" + "," +"'" + recordk.getRegisteredcapital() + "'" + "," + "'" |
| | | + recordk.getOrganizationcode() + "'" + "," + "'" + recordk.getRegistrationnumber() + "'" + "," + |
| | |
| | | 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.getCardid() + "'"+")"; |
| | | "'" + recordk.getPerid() + "'" + "," + "'" + recordk.getOffices() + "'" + "," + "'" + offtime + "'"+ "," + "'" + recordk.getCardid() + "'"+"," + "'" + new SimpleDateFormat("yyyy-MM-dd").format(recordk.getOvertime()) + "'"+")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | return R.success("成功"); |
| | | } |
| | |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入recordk") |
| | | public R update(@Valid @RequestBody Recordk recordk) { |
| | | String s1 = "update sys_recordk set type = " + "'" + recordk.getType() + "'" + |
| | | ",papprove = " + "'" + recordk.getPapprove() + "'"+ |
| | | ",xapprove = " + "'" + recordk.getXapprove() + "'"+ |
| | | ",sapprove = " + "'" + recordk.getSapprove() + "'"+ |
| | | ",popinion = " + "'" + recordk.getPopinion() + "'"+ |
| | | ",sopinion = " + "'" + recordk.getSopinion() + "'"+ |
| | | ",xopinion = " + "'" + recordk.getXopinion() + "'"+ |
| | | " " +"where id = " + "'" + recordk.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | return R.status(recordkService.updateById(recordk)); |
| | | } |
| | | |
| | |
| | | private String contactscell; |
| | | private String storage; |
| | | private String approve; |
| | | //派出所审批 |
| | | private String papprove; |
| | | //县审批 |
| | | private String xapprove; |
| | | //市审批 |
| | | private String sapprove; |
| | | //派出意见 |
| | | private String popinion; |
| | | //县意见 |
| | | private String xopinion; |
| | | //市意见 |
| | | private String sopinion; |
| | | |
| | | @ApiModelProperty(value = "审批时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | |
| | | <result column="contactscell" property="contactscell"/> |
| | | <result column="storage" property="storage"/> |
| | | <result column="approve" property="approve"/> |
| | | <result column="papprove" property="papprove"/> |
| | | <result column="xapprove" property="xapprove"/> |
| | | <result column="sapprove" property="sapprove"/> |
| | | <result column="popinion" property="popinion"/> |
| | | <result column="xopinion" property="xopinion"/> |
| | | <result column="sopinion" property="sopinion"/> |
| | | <result column="overtime" property="overtime"/> |
| | | </resultMap> |
| | | |