| | |
| | | import com.nanometer.smartlab.entity.BaseMeta; |
| | | import com.nanometer.smartlab.entity.SysReagent; |
| | | import com.nanometer.smartlab.service.BaseMetaService; |
| | | import com.nanometer.smartlab.service.SysLaboratoryContainerService; |
| | | import com.nanometer.smartlab.service.SysProjectService; |
| | | import org.apache.log4j.Logger; |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | |
| | | @Resource |
| | | private SysLaboratoryService sysLaboratoryService; |
| | | @Resource |
| | | private SysLaboratoryContainerService sysLaboratoryContainerService; |
| | | @Resource |
| | | private BaseMetaService baseMetaService; |
| | | @Resource |
| | | private SysProjectService sysProjectService; |
| | |
| | | private List<SysLaboratory> selectedList; |
| | | private String type; |
| | | private String name; |
| | | private String project; |
| | | |
| | | private int action; |
| | | |
| | |
| | | |
| | | 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){ |
| | |
| | | |
| | | } |
| | | valuesList.add(cellInfo); |
| | | |
| | | |
| | | } |
| | | if (valuesList.size() != 8){ |
| | | break; |
| | | } |
| | | System.out.println("value : "+valuesList); |
| | | SysLaboratory laboratory=new SysLaboratory(); |
| | |
| | | } |
| | | |
| | | this.sysLaboratoryService.deleteSysLaboratory(this.selectedList); |
| | | this.sysLaboratoryContainerService.delBySlcIds(this.selectedList); |
| | | |
| | | FacesUtils.info("删除成功。"); |
| | | } catch (Exception e) { |
| | |
| | | Map<String, Object> filters) { |
| | | List<SysLaboratory> list = null; |
| | | try { |
| | | int count = sysLaboratoryService.getSysLaboratoryTotalCount(type, name); |
| | | int count = sysLaboratoryService.getSysLaboratoryTotalCount(type, name,project); |
| | | this.setRowCount(count); |
| | | if (count > 0) { |
| | | list = sysLaboratoryService.getSysLaboratoryList(type, name, first, pageSize); |
| | | list = sysLaboratoryService.getSysLaboratoryList(type, name,project, first, pageSize); |
| | | } |
| | | selectedList = new ArrayList<> (); |
| | | } catch (Exception e) { |
| | | logger.error(e); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public SysLaboratory getRowData(String rowKey) { |
| | | Iterator<SysLaboratory> iterator = this.iterator(); |
| | | if (iterator != null) { |
| | | SysLaboratory su = null; |
| | | while (iterator.hasNext()) { |
| | | su = iterator.next(); |
| | | if (rowKey.equals(su.getId())) { |
| | | return su; |
| | | } |
| | | } |
| | | } |
| | | return null; |
| | | // Iterator<SysLaboratory> iterator = this.iterator(); |
| | | // if (iterator != null) { |
| | | // SysLaboratory su = null; |
| | | // while (iterator.hasNext()) { |
| | | // su = iterator.next(); |
| | | // if (rowKey.equals(su.getId())) { |
| | | // return su; |
| | | // } |
| | | // } |
| | | // } |
| | | return sysLaboratoryService.getSysLaboratory(rowKey); |
| | | } |
| | | }; |
| | | } |
| | |
| | | public void setType(String type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public String getProject() { |
| | | return project; |
| | | } |
| | | |
| | | public void setProject(String project) { |
| | | this.project = project; |
| | | } |
| | | } |