| | |
| | | private List<SysLaboratoryContainer> laboratoryContainers; |
| | | |
| | | private String reagentCode; |
| | | private String labName; |
| | | |
| | | /** |
| | | * 数据模型 |
| | |
| | | System.out.println(reagentId); |
| | | try { |
| | | int count = opeReagentStatusService.getOpeReagentStatusTotalCountForLab(reagentId, null, |
| | | ArrivalStatus.LABORATORY.getKey(), reagentCode, getUserId()); |
| | | ArrivalStatus.LABORATORY.getKey(), reagentCode, getUserId(),labName); |
| | | this.setRowCount(count); |
| | | if (count > 0) { |
| | | list = opeReagentStatusService.getOpeReagentStatusListForLab(reagentId, null, |
| | | ArrivalStatus.LABORATORY.getKey(), reagentCode, getUserId(), first, pageSize); |
| | | ArrivalStatus.LABORATORY.getKey(), reagentCode, getUserId(),labName, first, pageSize); |
| | | } |
| | | } catch (Exception e) { |
| | | logger.error(e); |
| | |
| | | public void exportLabStock() { |
| | | try { |
| | | List<Map> list = opeReagentStatusService.selectExportList(reagentId, null, |
| | | ArrivalStatus.LABORATORY.getKey(), reagentCode, getUserId()); |
| | | ArrivalStatus.LABORATORY.getKey(), reagentCode, getUserId(),labName); |
| | | opeReagentStatusService.exportLabStock2Excel(list); |
| | | FacesUtils.info("导出成功"); |
| | | }catch (Exception e){ |
| | |
| | | this.laboratoryContainers = laboratoryContainers; |
| | | } |
| | | |
| | | public String getLabName() { |
| | | return labName; |
| | | } |
| | | |
| | | public void setLabName(String labName) { |
| | | this.labName = labName; |
| | | } |
| | | } |
| | |
| | | <when test="status == 2 and project != null and project != ''"> |
| | | and sw.project like concat("%",#{project},"%") |
| | | </when> |
| | | <when test="status == 2 and labName != null and labName != ''"> |
| | | and sw.name like concat("%",#{labName},"%") |
| | | </when> |
| | | </choose> |
| | | order by oa.reagent_code asc |
| | | <if test="first != null and pageSize != null"> |
| | |
| | | <choose> |
| | | <when test="status == 2 and project != null and project != ''"> |
| | | and sw.project like concat("%",#{project},"%") |
| | | </when> |
| | | <when test="status == 2 and labName != null and labName != ''"> |
| | | and sw.name like concat("%",#{labName},"%") |
| | | </when> |
| | | </choose> |
| | | </select> |
| | |
| | | <when test="status == 2 and project != null and project != ''"> |
| | | and sw.project like concat("%",#{project},"%") |
| | | </when> |
| | | <when test="status == 2 and labName != null and labName != ''"> |
| | | and sw.name like concat("%",#{labName},"%") |
| | | </when> |
| | | </choose> |
| | | order by oa.reagent_code asc |
| | | </select> |
| | |
| | | String userId); |
| | | |
| | | public List<OpeReagentStatus> getOpeReagentStatusListForLab(String name, String articleNumber, Integer status, |
| | | String reagentCode, String userId, Integer first, Integer pageSize); |
| | | String reagentCode, String userId, String labName, Integer first, Integer pageSize); |
| | | public int getOpeReagentStatusTotalCountForLab(String name, String articleNumber, Integer status, String reagentCode, |
| | | String userId); |
| | | String userId,String labName); |
| | | List<OpeReagentStatus> getOpeReagentStatusListByName(String reagentId, String articleNumber, Integer status, |
| | | String reagentCode, String userId, Integer first, Integer pageSize); |
| | | |
| | |
| | | int getReagentNumInWarehouse(String id, String articleNumber, String warehouseId); |
| | | |
| | | List<Map> selectExportList(String name, String articleNumber, Integer status, |
| | | String reagentCode, String userId); |
| | | String reagentCode, String userId,String labName); |
| | | |
| | | void exportLabStock2Excel(List<Map> list) throws Exception; |
| | | } |
| | |
| | | |
| | | @Transactional(propagation = Propagation.REQUIRED) |
| | | public List<OpeReagentStatus> getOpeReagentStatusListForLab(String name, String articleNumber, Integer status, |
| | | String reagentCode, String userId, Integer first, Integer pageSize) { |
| | | String reagentCode, String userId,String labName, Integer first, Integer pageSize) { |
| | | try { |
| | | Map<String, Object> params = new HashMap<String, Object>(); |
| | | |
| | | params.put("name", "%" + name + "%"); |
| | | params.put("articleNumber", articleNumber); |
| | | params.put("status", status); |
| | | params.put("labName", labName); |
| | | // addParamByUserId(userId, params); |
| | | if (StringUtils.isNotBlank(userId)) { |
| | | SysUser sysUser = sysUserService.getSysUser(userId); |
| | |
| | | |
| | | @Transactional(propagation = Propagation.REQUIRED) |
| | | public int getOpeReagentStatusTotalCountForLab(String name, String articleNumber, Integer status, String reagentCode, |
| | | String userId) { |
| | | String userId,String labName) { |
| | | try { |
| | | Map<String, Object> params = new HashMap<String, Object>(); |
| | | params.put("name", "%" + name + "%"); |
| | |
| | | params.put("reagentCode", "%" + reagentCode + "%"); |
| | | } |
| | | params.put("status", status); |
| | | params.put("labName", labName); |
| | | return this.opeReagentStatusDao.getOpeReagentStatusTotalCountForLab(params); |
| | | } catch (DataAccessException e) { |
| | | logger.error(e.getMessage(), e); |
| | |
| | | * @date 2021/4/22 10:33 |
| | | */ |
| | | @Override |
| | | public List<Map> selectExportList(String name, String articleNumber, Integer status, String reagentCode, String userId) { |
| | | public List<Map> selectExportList(String name, String articleNumber, Integer status, String reagentCode, String userId,String labName) { |
| | | |
| | | Map<String, Object> params = new HashMap<>(); |
| | | params.put("name", name); |
| | | params.put("articleNumber", articleNumber); |
| | | params.put("status", status); |
| | | params.put("labName", labName); |
| | | if (StringUtils.isNotBlank(userId)) { |
| | | SysUser sysUser = sysUserService.getSysUser(userId); |
| | | BaseRole baseRole = baseRoleService.getBaseRole(sysUser.getRoleId()); |
| | |
| | | <p:panel styleClass="center-header"> |
| | | <p:outputLabel styleClass="title" value="实验室库存管理"></p:outputLabel> |
| | | <p:panel styleClass="center-header"> |
| | | <p:panelGrid styleClass="filter" columns="8"> |
| | | <p:panelGrid styleClass="filter" columns="10"> |
| | | |
| | | <p:outputLabel value="试剂名称:"></p:outputLabel> |
| | | <p:inputText value="#{laboratoryStockMngController.reagentId}"></p:inputText> |
| | |
| | | <p:outputLabel value="条形码:"></p:outputLabel> |
| | | <p:inputText value="#{laboratoryStockMngController.reagentCode}"></p:inputText> |
| | | |
| | | <p:outputLabel value="实验室:"></p:outputLabel> |
| | | <p:inputText value="#{laboratoryStockMngController.labName}"></p:inputText> |
| | | |
| | | <p:commandLink styleClass="search" process="@form" update="@form"></p:commandLink> |
| | | |
| | | <p:commandButton value="导出" styleClass="store-btn" ajax="false" actionListener="#{laboratoryStockMngController.exportLabStock}" |