kimi
2020-03-28 ccb933362251344091a3881a4950dcab33c5008f
src/main/java/com/highdatas/mdm/controller/ActivitiController.java
@@ -90,16 +90,14 @@
    }
    @RequestMapping(value = "/img/{modelId}", method = RequestMethod.GET)
    public void image(@PathVariable String modelId, HttpServletResponse response)  {
        String filePath = basePath   + modelId +"/"+ modelId + ".png";
        File file = new File(filePath);
        FileInputStream fileInputStream = null;
        InputStream is = repositoryService.getModelImg(modelId);
        response.setHeader("Content-Type", "image/png");
        try{
            fileInputStream = new FileInputStream(file);
            OutputStream outputStream = response.getOutputStream();
            byte[] b = new byte[1024];
            int len;
            while ((len = fileInputStream.read(b, 0, 1024)) != -1) {
            while ((len = is.read(b, 0, 1024)) != -1) {
                outputStream.write(b, 0, len);
            }
        }
@@ -107,9 +105,9 @@
            e.printStackTrace();
        }
        finally {
            if (fileInputStream != null) {
            if (is != null) {
                try {
                    fileInputStream.close();
                    is.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
@@ -314,6 +312,7 @@
            return Result.error(CodeMsg.ERROR_PARAMS_NOT_MATHED);
        }
        HttpSession session = request.getSession();
        //todo 判断当前task是否是当前人能审批的
        taskService.setSession(session);
        ActivitiStatus status = flows.getStatus();