kongzy
2023-11-28 59d9ea33f503e363f2e2941c7c00cc9dd9d9d1c7
src/main/java/com/nanometer/smartlab/controller/WarehouseStockMngController.java
@@ -22,6 +22,7 @@
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;
@@ -176,6 +177,8 @@
   private boolean isExpired;
   private Hashtable printTable;
   @Autowired
   private AccountInAndOutService accountInAndOutService;
   public Hashtable getPrintTable() {
      return printTable;
@@ -398,7 +401,7 @@
         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());
@@ -417,7 +420,7 @@
         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));
      }
@@ -1132,6 +1135,7 @@
         checkReserve(list2);
         //1.2判断提交的条码是否重复(只有补贴条码需要判断)
         checkReagentCode(list2);
         String receiptNum = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date());
         //库中领取
         if(list.size()>0&&list!=null){
            //扣库存 对象中的reagentCode存的是id
@@ -1149,7 +1153,7 @@
               }
            }
            this.opeWarehouseReserveService.claimForPerson(list, userId,projectNum,laboratoryId,laboratoryContainerId);
            this.opeWarehouseReserveService.claimForPerson(list, userId,projectNum,laboratoryId,laboratoryContainerId,receiptNum);
         }
         //补贴条码
@@ -1230,7 +1234,7 @@
         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());
@@ -1490,6 +1494,8 @@
      }
   }
   public  void  onSaveBtnClick() {
      try {
         if (this.selectedTmpList == null || this.selectedTmpList.size() == 0) {
@@ -1521,7 +1527,7 @@
         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());
@@ -1612,7 +1618,7 @@
            //FacesUtils.warn("未选择一个条形码。");
            //return;
            //}
            this.opeWarehouseReserveService.claim(list, userId,projectNum);
            this.opeWarehouseReserveService.claim(list, userId,projectNum,receiptNumber);
         }
         if(list2.size()>0&&list2!=null){
@@ -2111,6 +2117,15 @@
      }
   }
   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) {
      HSSFWorkbook hssfWorkbook = new HSSFWorkbook();
      Integer total = null;
@@ -2573,7 +2588,6 @@
    }
   public void handleEvent2(){
      System.out.println("===============================");
         if(useNum!=null && useNum>0){
            if(startReagentCode!=null && !startReagentCode.equals("")){
            if (startReagentCode.matches(".*\\D+.*")) {