From c87738a78f57e6f68a0111d68ef3748b29dc1eda Mon Sep 17 00:00:00 2001 From: 李宇 <986321569@qq.com> Date: 星期三, 23 六月 2021 12:21:59 +0800 Subject: [PATCH] 修改试剂排序 --- src/main/java/com/nanometer/smartlab/controller/LaboratoryMngController.java | 24 +++++++++++++++++++----- 1 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/nanometer/smartlab/controller/LaboratoryMngController.java b/src/main/java/com/nanometer/smartlab/controller/LaboratoryMngController.java index 86ff06f..a484ce3 100644 --- a/src/main/java/com/nanometer/smartlab/controller/LaboratoryMngController.java +++ b/src/main/java/com/nanometer/smartlab/controller/LaboratoryMngController.java @@ -9,6 +9,7 @@ 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; @@ -43,6 +44,8 @@ @Resource private SysLaboratoryService sysLaboratoryService; @Resource + private SysLaboratoryContainerService sysLaboratoryContainerService; + @Resource private BaseMetaService baseMetaService; @Resource private SysProjectService sysProjectService; @@ -60,6 +63,7 @@ private List<SysLaboratory> selectedList; private String type; private String name; + private String project; private int action; @@ -84,7 +88,7 @@ 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){ @@ -150,8 +154,9 @@ } valuesList.add(cellInfo); - - + } + if (valuesList.size() != 8){ + break; } System.out.println("value : "+valuesList); SysLaboratory laboratory=new SysLaboratory(); @@ -262,6 +267,7 @@ } this.sysLaboratoryService.deleteSysLaboratory(this.selectedList); + this.sysLaboratoryContainerService.delBySlcIds(this.selectedList); FacesUtils.info("删除成功。"); } catch (Exception e) { @@ -279,10 +285,10 @@ 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); } } catch (Exception e) { logger.error(e); @@ -344,4 +350,12 @@ public void setType(String type) { this.type = type; } + + public String getProject() { + return project; + } + + public void setProject(String project) { + this.project = project; + } } -- Gitblit v1.9.2