java 导入图片时忘了导入诊断报告,查询报告并将缺失的报告插入对应分类图片中

public void import2(){

         TagImgFilter filterTg = new TagImgFilter();
         //ImgCaseFilter filterC = new ImgCaseFilter();
         //ImgCenterFilter filterImc = new ImgCenterFilter();
         
         filterTg.setEq_typeId("cddec2677acf4e77b341a20850d94e00");//数据源tag_json
         filterTg.setEq_setId("49356c8c800643d1b339cbe7b6ab418b");
         filterTg.setEq_orgId("81dae004980145ffbd261717b49f35b6");
         filterTg.setEq_delFlag(1);
         filterTg.setEq_tagFlag(1);
         
         //filterC.setEq_sourceId("3f8b081edd0c4060805bf6a077f30679"); 
         //filterTg.setNull_tagJson(false);                                  
        List<TagImg> originList = tagImgService.selectAll(filterTg);        

        //List<Map<String,Object>> list=jdbcTemplate.queryForList("");
        int i = 0;
        for (TagImg tagImg : originList) {
            i++;
            System.out.println(i);
            String imgMd5 = tagImg.getImgMd5();
            
            TagImgFilter filterTg1 = new TagImgFilter();
            filterTg1.setEq_typeId("53c9da5aeac148e0829df7b2f2550c2e");
            filterTg1.setEq_setId("5e113a545dc24bc08b0f980cbc48cdc1");
            filterTg1.setEq_orgId("81dae004980145ffbd261717b49f35b6");
            filterTg1.setEq_imgMd5(imgMd5);
            TagImg tagImg1 = tagImgService.selectAll(filterTg1).get(0);
            //System.out.println(tagImg1.getTagJson().toString());
            //System.out.println(tagImg.getTagJson().toString());                     
            
            //JSONArray array=JSONArray.parseArray(tagImg1.getTagJson());
            //array.addAll(JSONArray.parseArray(tagImg.getTagJson()));
            //tagImg1.setTagJson(array.toString());
            tagImg1.setTagJson(tagImg.getTagJson());

            //System.out.println(array.toString());
            //System.out.println("=============================================");
            tagImgService.save(tagImg1);
            
        }    
    }

 

posted @ 2019-02-12 11:50  yangly  阅读(126)  评论(0编辑  收藏  举报