| | |
| | | import org.primefaces.model.LazyDataModel; |
| | | import org.primefaces.model.SortOrder; |
| | | import org.primefaces.model.StreamedContent; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.context.annotation.PropertySource; |
| | | import org.springframework.context.annotation.Scope; |
| | |
| | | private boolean isExpired; |
| | | |
| | | private Hashtable printTable; |
| | | @Autowired |
| | | private AccountInAndOutService accountInAndOutService; |
| | | |
| | | public Hashtable getPrintTable() { |
| | | return printTable; |
| | |
| | | //private boolean flag = false; |
| | | //领用单号 |
| | | private String receiptNumber; |
| | | //备注 |
| | | private String note; |
| | | // 试剂库 |
| | | private LazyDataModel<SysReagent> reagentDataModel; |
| | | // 直接入库试剂List |
| | |
| | | String reagentId = selectedOpeWarehouseReserve.getReagentId(); |
| | | String articleNumber = selectedOpeWarehouseReserve.getArticleNumber(); |
| | | |
| | | this.setReagentStatusSelectList(opeReagentStatusService.getOpeReagentStatusList(reagentId, articleNumber, |
| | | this.setReagentStatusSelectList(opeReagentStatusService.getOpeReagentStatusList22(reagentId, articleNumber, |
| | | ArrivalStatus.WAREHOUSE.getKey(), reagentCode, null, null, null)); |
| | | |
| | | // System.out.print("this.getReagentStatusSelectList().size(): " + this.reagentStatusSelectList.size()); |
| | |
| | | System.out.println(reagentId); |
| | | System.out.println(articleNumber); |
| | | System.out.println(reagentCode); |
| | | this.setReagentStatusSelectListForPerson(opeReagentStatusService.getOpeReagentStatusList(reagentId, articleNumber, |
| | | this.setReagentStatusSelectListForPerson(opeReagentStatusService.getOpeReagentStatusList22(reagentId, articleNumber, |
| | | ArrivalStatus.WAREHOUSE.getKey(), reagentCode, null, null, null)); |
| | | |
| | | } |
| | |
| | | checkTable = null; |
| | | // |
| | | this.userId = selectedTmpOrderList.get(0).getApplyUser(); |
| | | |
| | | SysUser sysUser = sysUserService.getSysUser(this.userId); |
| | | if (sysUser == null){ |
| | | FacesUtils.info("申领人不存在"); |
| | | return; |
| | | } |
| | | this.menuController.goToPage(Constants.PAGE_WAREHOUSE_REAGENT_USE_NEW_PERSON, Constants.PAGE_WAREHOUSE_STOCK_MNG); |
| | | } |
| | | |
| | |
| | | checkReserve(list2); |
| | | //1.2判断提交的条码是否重复(只有补贴条码需要判断) |
| | | checkReagentCode(list2); |
| | | String receiptNum = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date()); |
| | | //库中领取 |
| | | if(list.size()>0&&list!=null){ |
| | | //扣库存 对象中的reagentCode存的是id |
| | |
| | | } |
| | | } |
| | | |
| | | this.opeWarehouseReserveService.claimForPerson(list, userId,projectNum,laboratoryId,laboratoryContainerId); |
| | | this.opeWarehouseReserveService.claimForPerson(list, userId,projectNum,laboratoryId,laboratoryContainerId,receiptNum); |
| | | } |
| | | |
| | | //补贴条码 |
| | |
| | | printTable.put("applyPerson", applyPersonInfo.getName()); |
| | | printTable.put("department", applyPersonInfo.getDepartment()); |
| | | printTable.put("date", Utils.now("yyyy-MM-dd")); |
| | | String receiptNum = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date()); |
| | | |
| | | printTable.put("receiptNumber", receiptNum); |
| | | if (StringUtils.isNotBlank(applyPersonInfo.getPhone())){ |
| | | printTable.put("phone", applyPersonInfo.getPhone()); |
| | |
| | | */ |
| | | public void associatedFlowReceiptNumber() { |
| | | try { |
| | | opeUseFlowService.updateReceiptNumberByCode(selectedTmpOrderList, receiptNumber); |
| | | opeUseFlowService.updateReceiptNumberByCode(selectedTmpOrderList, receiptNumber, note); |
| | | //弹出打印窗口 |
| | | RequestContext.getCurrentInstance().execute("document.getElementById('indirectPrint').click()"); |
| | | } catch (Exception e) { |
| | |
| | | |
| | | public void associatedFlowReceiptNumber2() { |
| | | try { |
| | | opeUseFlowService.updateReceiptNumberByCode2(selectedTmpList, receiptNumber); |
| | | opeUseFlowService.updateReceiptNumberByCode2(selectedTmpList, receiptNumber,note); |
| | | //弹出打印窗口 |
| | | RequestContext.getCurrentInstance().execute("document.getElementById('indirectPrint').click()"); |
| | | } catch (Exception e) { |
| | |
| | | |
| | | public void closeDialog() { |
| | | try { |
| | | opeUseFlowService.updateReceiptNumberByCode(selectedTmpOrderList, receiptNumber); |
| | | opeUseFlowService.updateReceiptNumberByCode(selectedTmpOrderList, receiptNumber,note); |
| | | onCancelBtnClick(); |
| | | } catch (Exception e) { |
| | | logger.info(e.getMessage()); |
| | |
| | | |
| | | public void closeDialog2() { |
| | | try { |
| | | opeUseFlowService.updateReceiptNumberByCode2(selectedTmpList, receiptNumber); |
| | | opeUseFlowService.updateReceiptNumberByCode2(selectedTmpList, receiptNumber,note); |
| | | onCancelBtnClick(); |
| | | } catch (Exception e) { |
| | | logger.info(e.getMessage()); |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | public void onSaveBtnClick() { |
| | | try { |
| | | if (this.selectedTmpList == null || this.selectedTmpList.size() == 0) { |
| | |
| | | if (StringUtils.isNotBlank(applyPersonInfo.getProject())){ |
| | | printTable.put("project", applyPersonInfo.getProject()); |
| | | } |
| | | SysLaboratory lab = sysLaboratoryService.getSysLaboratory(laboratoryId); |
| | | SysLaboratory lab = sysLaboratoryService.getSysLaboratorySimpleInfo(laboratoryId); |
| | | String receiptNum = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date()); |
| | | printTable.put("receiptNumber", receiptNum); |
| | | printTable.put("lab", lab.getName()); |
| | |
| | | //FacesUtils.warn("未选择一个条形码。"); |
| | | //return; |
| | | //} |
| | | this.opeWarehouseReserveService.claim(list, userId,projectNum); |
| | | this.opeWarehouseReserveService.claim(list, userId,projectNum,receiptNumber); |
| | | } |
| | | |
| | | if(list2.size()>0&&list2!=null){ |
| | |
| | | |
| | | sum += list2.get(i).getSelectNum(); |
| | | } |
| | | this.opeWarehouseReserveService.reagentDStore4(opeList,userId); |
| | | this.opeWarehouseReserveService.reagentDStore4(opeList,userId,receiptNum); |
| | | for(int i=0;i<list2.size();i++){ |
| | | |
| | | List<String> reagentCodes = opeReagentStatusService |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | public void onExportOutAndIn(){ |
| | | FacesContext currentInstance = FacesContext.getCurrentInstance(); |
| | | currentInstance.responseComplete(); |
| | | ExternalContext etx = currentInstance.getExternalContext(); |
| | | HttpServletResponse resp = (HttpServletResponse) etx.getResponse(); |
| | | accountInAndOutService.exportExcel(resp); |
| | | } |
| | | |
| | | public HSSFWorkbook exportExcelNew(List<String> headerList, List<OpeWarehouseReserve> dataList) { |
| | |
| | | } |
| | | |
| | | public void handleEvent2(){ |
| | | System.out.println("==============================="); |
| | | if(useNum!=null && useNum>0){ |
| | | if(startReagentCode!=null && !startReagentCode.equals("")){ |
| | | if (startReagentCode.matches(".*\\D+.*")) { |
| | |
| | | }else { |
| | | FacesUtils.info("请输入领用数量"); |
| | | } |
| | | } |
| | | |
| | | public void clearStartAndEndCode(){ |
| | | endReagentCode = ""; |
| | | } |
| | | |
| | | public void handleEventForPerson(){ |
| | |
| | | opeApplyService.updateOpeApplyStatus(ApplyStatus.SUPPLIER_CONFIRM, null, ids); |
| | | FacesUtils.warn("操作成功。"); |
| | | } |
| | | |
| | | public String getNote() { |
| | | return note; |
| | | } |
| | | |
| | | public void setNote(String note) { |
| | | this.note = note; |
| | | } |
| | | } |