| | |
| | | import com.nanometer.smartlab.exception.AlarmException; |
| | | import com.nanometer.smartlab.exception.BusinessException; |
| | | import com.nanometer.smartlab.exception.ExceptionEnumCode; |
| | | import com.nanometer.smartlab.util.ExcelUtils; |
| | | import com.nanometer.smartlab.util.IDUtils; |
| | | import com.nanometer.smartlab.util.MessageUtil; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.apache.log4j.Logger; |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.springframework.dao.DataAccessException; |
| | | import org.springframework.dao.DataIntegrityViolationException; |
| | | import org.springframework.dao.DuplicateKeyException; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import javax.faces.context.FacesContext; |
| | | import javax.servlet.ServletOutputStream; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * Created by cmower on 17/11/20. |
| | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void exportLab2Excel(List<Map> list) throws Exception { |
| | | |
| | | Map<String, String> map = new LinkedHashMap<>(); |
| | | map.put("type", "类型"); |
| | | map.put("name", "名称"); |
| | | map.put("infoCode", "状态码"); |
| | | map.put("barCode", "地址码"); |
| | | map.put("location", "地址"); |
| | | map.put("department", "部门"); |
| | | ExcelUtils.export2Excel(list,"实验室信息",map); |
| | | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public List<Map> exportLabList(String type, String name) { |
| | | Map<String,String> params = new HashMap<>(); |
| | | params.put("type", type); |
| | | params.put("name", name); |
| | | return sysLaboratoryDao.exportLabList(params); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(propagation = Propagation.REQUIRED) |
| | | public List<SysLaboratory> getSysLaboratoryListByDep(String depId) { |