本文共 1098 字,大约阅读时间需要 3 分钟。
@RequestMapping("/searchSjgl.htm") @ResponseBody public List searchSjgl(HttpServletRequest request)throws UnsupportedEncodingException{ List list=sjglService.findAllSjgl();//查询所有数据 String stdate=request.getParameter("stdate").trim();//获取前端传来的ID值 for(IdSjgl sjgl:list){ Map map1 = new HashMap (); map1.put("tableName", sjgl.getSjkb());// List shList=sjglService.findSjTest(map1,map2); List shList=sjglService.findSj(map1); //List shList=sjglService.findSj(sjgl.getSjkb()); if(shList.size()==0||shList.equals(null)){ sjgl.setSfwk("无数据"); sjgl.setSfsh("未审核"); sjglService.update(sjgl);// for(IdId_ id:shList){// if(id.getSh()==0){// }// } }else{ for(IdId_ id:shList){ if(id.getStdate().equals(stdate)){ sjgl.setSfwk("有数据"); if(id.getSh()==1){ sjgl.setSfsh("已审核"); } }else{ sjgl.setSfwk("无数据"); sjgl.setSfsh("未审核"); } sjglService.update(sjgl); } } } return sjglService.findAllSjgl(); }
转载于:https://blog.51cto.com/liucongcong/1921570