| | |
| | | |
| | | public void exportLab2Excel(){ |
| | | try { |
| | | List<Map> list = sysLaboratoryService.exportLabList(type, name); |
| | | List<Map> list = sysLaboratoryService.exportLabList(type, name,project); |
| | | sysLaboratoryService.exportLab2Excel(list); |
| | | FacesUtils.info("导出成功"); |
| | | }catch (Exception e){ |
| | |
| | | CONCAT(location1,'-',location2) |
| | | END |
| | | location, |
| | | bm2.meta_value department |
| | | bm2.meta_value department, |
| | | sl.project |
| | | from sys_laboratory as sl |
| | | LEFT JOIN base_meta bm1 on bm1.id = sl.type |
| | | left JOIN base_meta bm2 on bm2.id = sl.department |
| | |
| | | <if test="type != null and type != ''"> |
| | | and sl.type = #{type}; |
| | | </if> |
| | | <if test="project != null and project != ''"> |
| | | and sl.project like concat("%",#{project},"%") |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getSysLaboratoryTotalCount" parameterType="java.util.Map" resultType="int"> |
| | |
| | | |
| | | void exportLab2Excel(List<Map> list) throws Exception; |
| | | |
| | | List<Map> exportLabList(String type, String name); |
| | | List<Map> exportLabList(String type, String name,String project); |
| | | |
| | | List<LaboratoryVo.Laboratory> getLaboratoryByProject(String project); |
| | | |
| | |
| | | map.put("barCode", "地址码"); |
| | | map.put("location", "地址"); |
| | | map.put("department", "部门"); |
| | | map.put("project", "课题组"); |
| | | ExcelUtils.export2Excel(list,"实验室信息",map); |
| | | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public List<Map> exportLabList(String type, String name) { |
| | | public List<Map> exportLabList(String type, String name,String project) { |
| | | Map<String,String> params = new HashMap<>(); |
| | | params.put("type", type); |
| | | params.put("name", name); |
| | | params.put("project", project); |
| | | return sysLaboratoryDao.exportLabList(params); |
| | | } |
| | | |