| | |
| | | import com.nanometer.smartlab.service.SysLaboratoryService; |
| | | import com.nanometer.smartlab.util.FacesUtils; |
| | | import com.nanometer.smartlab.util.Utils; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.apache.log4j.Logger; |
| | | import org.primefaces.context.RequestContext; |
| | | import org.primefaces.model.LazyDataModel; |
| | |
| | | * 数据源 |
| | | */ |
| | | private LazyDataModel<OpeReagentStatus> dataModel; |
| | | private String reagentId; |
| | | private Long reagentId; |
| | | private String reagentName; |
| | | private String reagentCode; |
| | | private String applyPerson; |
| | |
| | | //判断单子下的试剂是否全部 为 领用待入库-1,不是就不能取消领用 |
| | | List<PersonUseDetail> applyList = opeUseFlowService.getApplyInfo(selectOne.getReceiptNumber()); |
| | | boolean flag = applyList.stream().allMatch(pu -> |
| | | opeReagentStatusService.getOpeReagentStatusByReagentCode(pu.getReagentCode() ).getStatus()== ArrivalStatus.NOREGISTER); |
| | | opeReagentStatusService.getOpeReagentStatusByReagentCode(pu.getReagentCode() ).getStatus()== ArrivalStatus.NOREGISTER.getKey()); |
| | | if (!flag) { |
| | | FacesUtils.warn("试剂当前状态不可以取消领用"); |
| | | return; |
| | |
| | | printTable.put("department", selectOne.getDepartment()); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
| | | printTable.put("date", dateFormat.format(selectOne.getCreateTime())); |
| | | printTable.put("phone", selectOne.getPhone()); |
| | | printTable.put("phone", StringUtils.isBlank(selectOne.getPhone())?"":selectOne.getPhone()); |
| | | printTable.put("receiptNumber", selectOne.getReceiptNumber()); |
| | | printTable.put("project", selectOne.getProject()); |
| | | SysLaboratory sysLaboratory = sysLaboratoryService.getSysLaboratory(selectOne.getHouseId()); |
| | | printTable.put("project", selectOne.getProjectName()); |
| | | |
| | | SysLaboratory sysLaboratory = sysLaboratoryService.getSysLaboratorySimpleInfo(selectOne.getHouseId()); |
| | | printTable.put("lab", sysLaboratory.getName()); |
| | | printTable.put("note",selectOne.getNote() == null?"":selectOne.getNote()); |
| | | //整理数据 |
| | |
| | | return dataModel2; |
| | | } |
| | | |
| | | public String getReagentId() { |
| | | public Long getReagentId() { |
| | | return reagentId; |
| | | } |
| | | |
| | | public void setReagentId(String reagentId) { |
| | | public void setReagentId(Long reagentId) { |
| | | this.reagentId = reagentId; |
| | | } |
| | | |