| | |
| | | @ApiImplicitParam(name = "expert", value = "审查专家", required = false), |
| | | @ApiImplicitParam(name = "contact", value = "联系人", required = false), |
| | | @ApiImplicitParam(name = "telephone", value = "联系电话", required = false), |
| | | @ApiImplicitParam(name = "company", value = "企业名称", required = false) }) |
| | | @ApiImplicitParam(name = "company", value = "企业名称", required = false), |
| | | @ApiImplicitParam(name = "acceptpdf", value = "受理通知书PDF", required = false) }) |
| | | public Msg add(@RequestBody SafetyFacilityInspection param) { |
| | | String genId = LocalDateTime.now().toInstant(ZoneOffset.of("+8")).toEpochMilli() + "" + (int) (Math.random() * 900 + 100); |
| | | param.setId(Long.valueOf(genId)); |
| | |
| | | flow.setCheckTime(date); |
| | | flow.setProgressName("资料提交"); |
| | | flow.setResult("资料提交"); |
| | | flow.setResolution("开始"); |
| | | flow.setResolution(param.getAcceptpdf()); |
| | | flow.setLinkInspectionId(Long.valueOf(genId)); |
| | | flow.setProcessBy(this.getUser().getRealname()); |
| | | safetyFacilityProcessflowService.addOne(flow, this.getUser()); |
| | |
| | | |
| | | } |
| | | |
| | | @ApiOperation("企业上传受理通知书") |
| | | @PostMapping("/uploadAcceptpdf") |
| | | @ApiImplicitParams({ @ApiImplicitParam(name = "file", value = "企业上传受理通知书(PDF/图片)") }) |
| | | public Msg uploadAcceptpdf(HttpServletRequest request, @RequestParam("file") MultipartFile file) { |
| | | if (file.getSize() > 1024 * 1024 * 10) { |
| | | return failed("文件超过10M无法上传"); |
| | | } |
| | | |
| | | String path = filePathConfig.getModule().get("correctPDF"); |
| | | String dcPath = filePathConfig.getDcPath(); |
| | | String originalFilename = file.getOriginalFilename(); |
| | | LocalDateTime now = LocalDateTime.now(); |
| | | File newFile = null; |
| | | |
| | | try { |
| | | String key = UUID.randomUUID().toString().replace("-", ""); |
| | | String suffix = originalFilename.substring(originalFilename.lastIndexOf(".")).toLowerCase(); |
| | | path = path.replace("/", File.separator); |
| | | String modulePath = now.getYear() + path + now.format(DateTimeFormatter.ofPattern("MMdd")); |
| | | String newFilePath = modulePath + File.separator + key + suffix; |
| | | String localPath = dcPath + newFilePath; |
| | | newFile = new File(localPath); |
| | | if (!newFile.exists() && !newFile.mkdirs()) { |
| | | return failed("文件上传路径不存在!"); |
| | | } |
| | | file.transferTo(newFile); |
| | | return success(newFilePath); |
| | | } catch (IOException e) { |
| | | if (newFile != null && newFile.exists()) { |
| | | newFile.delete(); |
| | | } |
| | | return failed("文件上传异常!"); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("查看企业受理通知书") |
| | | @PostMapping("/downAcceptpdf") |
| | | @ApiImplicitParams({ @ApiImplicitParam(name = "filename", value = "企业受理通知书文件名", required = true)}) |
| | | public void downAcceptpdf(@RequestBody FilterObject filterObject, HttpServletResponse response) throws Exception { |
| | | if (filterObject.getFilter().get("filename") == null) |
| | | return; |
| | | String filepath = filterObject.getFilter().get("filename").toString(); |
| | | String suffix = filepath.substring(filepath.lastIndexOf(".")).toLowerCase(); |
| | | response.reset(); |
| | | response.addHeader("Access-Control-Allow-Origin", "*"); |
| | | response.addHeader("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE"); |
| | | response.setContentType("application/octet-stream; charset=UTF-8"); |
| | | response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + URLEncoder.encode("企业受理通知书" + suffix, StandardCharsets.UTF_8.name())); |
| | | response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE); |
| | | String dcPath = filePathConfig.getDcPath(); |
| | | File file = new File(dcPath + filepath); |
| | | if (!file.exists()) { |
| | | throw new BusinessException(ResultCodes.FILE_NOT_EXISIST); |
| | | } |
| | | response.addHeader("Content-Length", "" + file.length()); |
| | | FileInputStream inputStream = new FileInputStream(file); |
| | | byte[] b = new byte[inputStream.available()]; |
| | | inputStream.read(b); |
| | | ServletOutputStream outputStream = response.getOutputStream(); |
| | | outputStream.write(b); |
| | | outputStream.flush(); |
| | | inputStream.close(); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("专家审查上传补正告知书") |
| | | @PostMapping("/uploadCorrectPDF") |
| | | @ApiImplicitParams({ @ApiImplicitParam(name = "file", value = "上传补正告知书(PDF)文件") }) |
| | |
| | | /** 企业名称 company **/ |
| | | private String company; |
| | | |
| | | /** 企业受理通知书 acceptpdf **/ |
| | | private String acceptpdf; |
| | | |
| | | |
| | | /** 受理时间 accept_ time **/ |
| | | private Date acceptTime; |
| | |
| | | public void setExamineTaketime(String examineTaketime) { |
| | | this.examineTaketime = examineTaketime == null ? null : examineTaketime.trim(); |
| | | } |
| | | |
| | | /** 受理通知书 acceptpdf **/ |
| | | public String getAcceptpdf() { |
| | | return acceptpdf; |
| | | } |
| | | |
| | | /** 受理通知书 acceptpdf **/ |
| | | public void setAcceptpdf(String acceptpdf) { |
| | | this.acceptpdf = acceptpdf == null ? null : acceptpdf.trim(); |
| | | } |
| | | } |
| | |
| | | <result column="correctpdf" property="correctpdf" jdbcType="VARCHAR" /> |
| | | <result column="examine_pageno" property="examinePageno" jdbcType="VARCHAR" /> |
| | | <result column="examine_taketime" property="examineTaketime" jdbcType="VARCHAR" /> |
| | | <result column="acceptpdf" jdbcType="VARCHAR" property="acceptpdf" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List" > |
| | | <!-- --> |
| | | id, valid_flag, create_time, create_by, update_time, submit_date, type, project_name, |
| | | progress, expert, contact, telephone, company, accept_time, review_time, examine_time, |
| | | correctpdf, examine_pageno, examine_taketime |
| | | correctpdf, examine_pageno, examine_taketime, acceptpdf |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" > |
| | | <!-- --> |
| | |
| | | expert, contact, telephone, |
| | | company, accept_time, review_time, |
| | | examine_time, correctpdf, examine_pageno, |
| | | examine_taketime) |
| | | examine_taketime, acceptpdf) |
| | | values (#{id,jdbcType=BIGINT}, #{validFlag,jdbcType=TINYINT}, #{createTime,jdbcType=TIMESTAMP}, |
| | | #{createBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{submitDate,jdbcType=DATE}, |
| | | #{type,jdbcType=INTEGER}, #{projectName,jdbcType=VARCHAR}, #{progress,jdbcType=INTEGER}, |
| | | #{expert,jdbcType=VARCHAR}, #{contact,jdbcType=VARCHAR}, #{telephone,jdbcType=VARCHAR}, |
| | | #{company,jdbcType=VARCHAR}, #{acceptTime,jdbcType=TIMESTAMP}, #{reviewTime,jdbcType=TIMESTAMP}, |
| | | #{examineTime,jdbcType=TIMESTAMP}, #{correctpdf,jdbcType=VARCHAR}, #{examinePageno,jdbcType=VARCHAR}, |
| | | #{examineTaketime,jdbcType=VARCHAR}) |
| | | #{examineTaketime,jdbcType=VARCHAR}, #{acceptpdf,jdbcType=VARCHAR}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.gk.hotwork.Domain.SafetyFacilityInspection" > |
| | | <!-- --> |
| | |
| | | <if test="examineTaketime != null" > |
| | | examine_taketime, |
| | | </if> |
| | | <if test="acceptpdf != null"> |
| | | acceptpdf, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides="," > |
| | | <if test="id != null" > |
| | |
| | | </if> |
| | | <if test="examineTaketime != null" > |
| | | #{examineTaketime,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="acceptpdf != null"> |
| | | #{acceptpdf,jdbcType=VARCHAR}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | |
| | | <if test="examineTaketime != null" > |
| | | examine_taketime = #{examineTaketime,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="acceptpdf != null"> |
| | | acceptpdf = #{acceptpdf,jdbcType=VARCHAR}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | |
| | | correctpdf = #{correctpdf,jdbcType=VARCHAR}, |
| | | examine_pageno = #{examinePageno,jdbcType=VARCHAR}, |
| | | examine_taketime = #{examineTaketime,jdbcType=VARCHAR} |
| | | acceptpdf = #{acceptpdf,jdbcType=VARCHAR} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | |
| | | tomcat: |
| | | uri-encoding: UTF-8 |
| | | basedir: / |
| | | port: 8016 |
| | | port: 8006 |
| | | servlet: |
| | | context-path: / |
| | | # mysql |
| | |
| | | username: root |
| | | password: gkhymysql |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | |
| | | freemarker: |
| | | templateLoaderPath: classpath:/docxTemplate/ |
| | | #redis |
| | | redis: |
| | | database: 14 |
| | | host: 127.0.0.1 |
| | | host: 114.116.227.52 |
| | | port: 6379 |
| | | password: akj78avauba789a |
| | | password: 123456 |
| | | jedis: |
| | | pool: |
| | | max-idle: 8 |
| | |
| | | |
| | | |
| | | |
| | | host: http://localhost:8016 |
| | | host: http://localhost:8006 |
| | | |
| | | filePath: d:/uploads/ |
| | | fileurl: http://localhost:8016/upload/ |
| | | fileurl: http://localhost:8006/upload/ |
| | | socketport: 504 |
| | | |
| | | sqlPath: /home/dbback/ |
| | | sqlurl: http://nmy.sinanoaq.cn:8016/dbback/ |
| | | sqlurl: http://nmy.sinanoaq.cn:8006/dbback/ |
| | | |
| | | enterprisePath: /home/uploads/enterprise/ |
| | | enterpriseUrl: http://nmy.sinanoaq.cn:8016/upload/enterprise/ |
| | | enterpriseUrl: http://nmy.sinanoaq.cn:8006/upload/enterprise/ |
| | | enterprise: enterprise/ |
| | | |
| | | transportCertificatePath: /home/uploads/transportCertificate/ |
| | | transportCertificateUrl: http://nmy.sinanoaq.cn:8016/upload/transportCertificate/ |
| | | transportCertificateUrl: http://nmy.sinanoaq.cn:8006/upload/transportCertificate/ |
| | | transportCertificate: transportCertificate/ |
| | | |
| | | hiddenDangerPath: /home/uploads/hiddenDanger/ |
| | | hiddenDangerUrl: http://nmy.sinanoaq.cn:8016/upload/hiddenDanger/ |
| | | hiddenDangerUrl: http://nmy.sinanoaq.cn:8006/upload/hiddenDanger/ |
| | | hiddenDanger: hiddenDanger/ |
| | | |
| | | standardPath: /home/uploads/standard/ |
| | | standardUrl: http://nmy.sinanoaq.cn:8016/upload/standard/ |
| | | standardUrl: http://nmy.sinanoaq.cn:8006/upload/standard/ |
| | | standard: standard/ |
| | | |
| | | contractPath: /home/uploads/contract/ |
| | | contractUrl: http://nmy.sinanoaq.cn:8016/upload/contract/ |
| | | contractUrl: http://nmy.sinanoaq.cn:8006/upload/contract/ |
| | | contract: contract/ |
| | | |
| | | patrolPath: /home/uploads/patrol/ |
| | | patrolUrl: http://nmy.sinanoaq.cn:8016/upload/patrol/ |
| | | patrolUrl: http://nmy.sinanoaq.cn:8006/upload/patrol/ |
| | | |
| | | appPath: /home/uploads/app/ |
| | | app: app/ |
| | | appUrl: http://nmy.sinanoaq.cn:8016/upload/app/ |
| | | appUrl: http://nmy.sinanoaq.cn:8006/upload/app/ |
| | | |
| | | productPath: /home/uploads/product/ |
| | | productUrl: http://nmy.sinanoaq.cn:8016/upload/product/ |
| | | productUrl: http://nmy.sinanoaq.cn:8006/upload/product/ |
| | | |
| | | assessApplyPath: /home/uploads/assessApply/ |
| | | assessApplytUrl: http://nmy.sinanoaq.cn:8016/upload/assessApply/ |
| | | assessApplytUrl: http://nmy.sinanoaq.cn:8006/upload/assessApply/ |
| | | assessApply: assessApply/ |
| | | |
| | | workCertPath: /home/uploads/workCert/ |
| | | workCertUrl: http://nmy.sinanoaq.cn:8016/upload/workCert/ |
| | | workCertUrl: http://nmy.sinanoaq.cn:8006/upload/workCert/ |
| | | workCert: workCert/ |
| | | |
| | | nanowebUrl: http://nmy.sinanoaq.cn:8016/nanoweb/api/register |
| | | nanowebUrl: http://nmy.sinanoaq.cn:8006/nanoweb/api/register |
| | | nanowebEnable: true |
| | | |
| | | taskPath: d:/uploads/task/ |
| | | taskPathPrefix: d:/uploads/ |
| | | taskUrl: http://localhost:8016/upload/task/ |
| | | taskUrl: http://localhost:8006/upload/task/ |
| | | task: task/ |
| | | |
| | | emergencyPlanPath: /home/uploads/emergencyPlan/ |
| | | emergencyPlanUrl: http://localhost:8016/upload/emergencyPlan/ |
| | | emergencyPlanUrl: http://localhost:8006/upload/emergencyPlan/ |
| | | emergencyPlan : emergencyPlan/ |
| | | |
| | | safecheckExecImagePath : /home/uploads/safecheck/ |
| | |
| | | file: |
| | | path: |
| | | #基础路径 |
| | | dcPath: E:\file\gkhy\test\ |
| | | dcPath: F:\file\gkhy\test\ |
| | | urlRootPath: /uploadfile/ |
| | | module: |
| | | #用户模块 |
| | |
| | | correctPDF: /correctPDF/ |
| | | |
| | | # swagger生产环境中禁止显示 |
| | | swagger: |
| | | swagger: |
| | | show: true |