| | |
| | | import com.nanometer.smartlab.entity.BaseMeta; |
| | | import com.nanometer.smartlab.entity.SysLaboratory; |
| | | import com.nanometer.smartlab.service.SysLaboratoryService; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.apache.log4j.Logger; |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.apache.poi.ss.usermodel.Row; |
| | |
| | | |
| | | public void onSaveBtnClick() { |
| | | try { |
| | | |
| | | // 新建 |
| | | if (this.action == Constants.ACTION_ADD) { |
| | | if (this.sysLaboratoryContainer == null) { |
| | |
| | | return; |
| | | } |
| | | System.out.println(sysLaboratoryContainer.getContainerCode()); |
| | | |
| | | this.sysLaboratoryContainerService.insertSysLaboratoryContainer(sysLaboratoryContainer); |
| | | |
| | | FacesUtils.info("新建成功。"); |
| | |
| | | return; |
| | | } |
| | | |
| | | sysLaboratoryContainer.setProject(null); |
| | | sysLaboratoryContainer.getProject(); |
| | | |
| | | this.sysLaboratoryContainerService.updateSysLaboratoryContainer(sysLaboratoryContainer); |
| | | |
| | | FacesUtils.info("修改成功。"); |
| | |
| | | } |
| | | } |
| | | |
| | | public void export2Excel(){ |
| | | |
| | | try { |
| | | List<Map> list = sysLaboratoryContainerService.exportExcelList(laboratoryType, laboratoryName); |
| | | sysLaboratoryContainerService.export2Excel(list); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | FacesUtils.warn("导出失败"); |
| | | } |
| | | } |
| | | |
| | | public void uploadFile(FileUploadEvent event) { |
| | | System.out.println("=========导入开始====="); |
| | | List<BaseMeta> typeList=baseMetaService.getBaseMetaList("container_type"); |