| | |
| | | try { |
| | | if(allOpeOrder != null && allOpeOrder.size() > 0) |
| | | { |
| | | int count = allOpeOrder.size(); |
| | | this.setRowCount(count); |
| | | //list = queryByPage(); |
| | | list = supplierOpeOrderService.getSupplierOpeOrderList(orderCode,applyCode,status,orderTime,orderEndTime,first,pageSize); |
| | | for(int i=0;i<list.size();i++){ |
| | | System.out.println(list.get(i)); |
| | | /*if(list.get(i).getSecondUserName()!=null&&!list.get(i).getSecondUserName().equals("")){ |
| | | String name=list.get(i).getApproveUserName(); |
| | | list.get(i).setApproveUserName(list.get(i).getSecondUserName()); |
| | | list.get(i).setSecondUserName(name); |
| | | }*/ |
| | | if(list.get(i).getBeforeApproveUserId()!=null&&!list.get(i).getBeforeApproveUserId().equals("")){ |
| | | String name=list.get(i).getApproveUserName(); |
| | | list.get(i).setFirst(list.get(i).getFirName()); |
| | | list.get(i).setSecond(name); |
| | | }else { |
| | | list.get(i).setFirst(list.get(i).getApproveUserName()); |
| | | list.get(i).setSecond(list.get(i).getSecondUserName()); |
| | | } |
| | | int count = allOpeOrder.size(); |
| | | this.setRowCount(count); |
| | | |
| | | list = supplierOpeOrderService.getSupplierOpeOrderList(orderCode,applyCode,status,orderTime,orderEndTime,first,pageSize); |
| | | for (int i=0;i<list.size();i++) { |
| | | if (list.get(i).getBeforeApproveUserId() != null && !list.get(i).getBeforeApproveUserId().equals("")) { |
| | | String name = list.get(i).getApproveUserName(); |
| | | list.get(i).setFirst(list.get(i).getFirName()); |
| | | list.get(i).setSecond(name); |
| | | } else { |
| | | list.get(i).setFirst(list.get(i).getApproveUserName()); |
| | | list.get(i).setSecond(list.get(i).getSecondUserName()); |
| | | } |
| | | for (SupplierOrder supplierOrder:list |
| | | ) { |
| | | } |
| | | for (SupplierOrder supplierOrder:list) { |
| | | if(supplierOrder.getIds()!=null&&!supplierOrder.getIds().equals("")){ |
| | | List ids = Arrays.asList(supplierOrder.getIds().split(",")); |
| | | supplierOrder.setApplyIds(ids); |
| | |
| | | } |
| | | } |
| | | } |
| | | selectedList = new ArrayList<> (); |
| | | } catch (Exception e) { |
| | | logger.error(e); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public SupplierOrder getRowData(String rowKey) { |
| | | Iterator<SupplierOrder> iterator = this.iterator(); |
| | | if (iterator != null) { |
| | | SupplierOrder ss = null; |
| | | while (iterator.hasNext()) { |
| | | ss = iterator.next(); |
| | | if (rowKey.equals(ss.getId())) { |
| | | return ss; |
| | | } |
| | | } |
| | | } |
| | | return null; |
| | | SupplierOrder supplierOrder = supplierOpeOrderService.selectById(rowKey); |
| | | if (supplierOrder.getBeforeApproveUserId() != null && !supplierOrder.getBeforeApproveUserId().equals("")) { |
| | | String name = supplierOrder.getApproveUserName(); |
| | | supplierOrder.setFirst(supplierOrder.getFirName()); |
| | | supplierOrder.setSecond(name); |
| | | } else { |
| | | supplierOrder.setFirst(supplierOrder.getApproveUserName()); |
| | | supplierOrder.setSecond(supplierOrder.getSecondUserName()); |
| | | } |
| | | |
| | | if(supplierOrder.getIds()!=null&&!supplierOrder.getIds().equals("")){ |
| | | List ids = Arrays.asList(supplierOrder.getIds().split(",")); |
| | | supplierOrder.setApplyIds(ids); |
| | | Double a=0.00; |
| | | BigDecimal total=BigDecimal.valueOf(a); |
| | | for (int j=0;j<ids.size();j++) { |
| | | OpeApply app=opeApplyService.getOpeApply(ids.get(j).toString()); |
| | | if(app.getStockFlag()!=0){//判断申购试剂是否缺货 |
| | | if(app.getApplyPrice()!=null){//判断试剂是否有实际售价 |
| | | BigDecimal b=app.getApplyPrice().multiply(BigDecimal.valueOf(app.getNum())); |
| | | total=b.add(total); |
| | | }else{ |
| | | BigDecimal c=app.getReagent().getPrice().multiply(BigDecimal.valueOf(app.getNum())); |
| | | total=c.add(total); |
| | | } |
| | | } |
| | | } |
| | | supplierOrder.setTotalPrice(total.doubleValue()); |
| | | } |
| | | return supplierOrder; |
| | | } |
| | | }; |
| | | } |
| | |
| | | headerList.add("试剂类型"); |
| | | headerList.add("课题负责人(一级审批者)"); |
| | | headerList.add("课题编号"); |
| | | headerList.add("课题名称"); |
| | | headerList.add("课题组"); |
| | | headerList.add("申购人"); |
| | | headerList.add("部门"); |
| | | headerList.add("单位"); |