| | |
| | | for (int j = 0; j < rbDetailList.size(); j++) { |
| | | ServiceReimbursementdetail serviceReimbursementdetail = rbDetailList.get(j); |
| | | String annexfiles = serviceReimbursementdetail.getAnnexfiles(); |
| | | String invoicefiles = serviceReimbursementdetail.getInvoicefiles(); |
| | | ServiceReimbursementdetailVO serviceReimbursementdetailVO = DtoConversionUtils.sourceToTarget(serviceReimbursementdetail, ServiceReimbursementdetailVO.class); |
| | | if (StringUtils.isNotBlank(annexfiles)) { |
| | | try { |
| | |
| | | } catch (Exception e) { |
| | | if (e.getMessage().equals("invalid comment")) { |
| | | log.error("报异常了,老大不让我处理"); |
| | | } |
| | | } |
| | | } |
| | | if (StringUtils.isNotBlank(invoicefiles)) { |
| | | try { |
| | | serviceReimbursementdetailVO.setInvoicefilesList(JSON.parseArray(invoicefiles)); |
| | | } catch (Exception e) { |
| | | if (e.getMessage().equals("invalid comment")) { |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<SpFinancialExpensesReimbursementOut> getListBypower(String PAUSERNO, Integer PAFUNDTYPE, String PAAPPLICANT, String PAAPPLICATIONBEGTIME, String PAAPPLICATIONENDTIME, String PADEPARTMENT, Integer CHECKFLAG, Integer APPLYTYPE,Integer CHECKSTATUS) { |
| | | return serviceReimbursementMapper.getListBypower(PAUSERNO, PAFUNDTYPE, PAAPPLICANT, PAAPPLICATIONBEGTIME, PAAPPLICATIONENDTIME, PADEPARTMENT, CHECKFLAG, APPLYTYPE,CHECKSTATUS); |
| | | public List<SpFinancialExpensesReimbursementOut> getListBypower(String PAUSERNO, Integer PAFUNDTYPE, String PAAPPLICANT, String PAAPPLICATIONBEGTIME, String PAAPPLICATIONENDTIME, String PADEPARTMENT, Integer CHECKFLAG, Integer APPLYTYPE, Integer CHECKSTATUS,String donorname) { |
| | | return serviceReimbursementMapper.getListBypower(PAUSERNO, PAFUNDTYPE, PAAPPLICANT, PAAPPLICATIONBEGTIME, PAAPPLICATIONENDTIME, PADEPARTMENT, CHECKFLAG, APPLYTYPE, CHECKSTATUS,donorname); |
| | | } |
| | | |
| | | @Override |
| | |
| | | String strFUrl = "http://129.88.242.39:8899/seeyon/rest/attachment?token=" + strRes; |
| | | |
| | | List<RbDetailFile> parseArray2 = new ArrayList<>(); |
| | | List<RbDetailFile> invoicefilesList = new ArrayList<>(); |
| | | |
| | | //普通文件上传 |
| | | List<RbDetailFile> parseArray = JSON.parseArray(remShare.getAnnexfiles(), RbDetailFile.class); |
| | | //发票文件上传 |
| | | List<RbDetailFile> invoicefilesArray = JSON.parseArray(remShare.getInvoicefiles(), RbDetailFile.class); |
| | | //普通附件 |
| | | uploadFile(filePath, strFUrl, parseArray2, parseArray, remShare, "1"); |
| | | |
| | | //发票附件 |
| | | uploadFile(filePath, strFUrl, invoicefilesList, invoicefilesArray, remShare, "2"); |
| | | return 0; |
| | | } |
| | | |
| | | private Integer uploadFile(String filePath, String strFUrl, List<RbDetailFile> parseArray2, List<RbDetailFile> parseArray, ServiceReimbursementdetailShared remShare, String flag) { |
| | | if (!CollectionUtils.isEmpty(parseArray)) { |
| | | for (int i = 0; i < parseArray.size(); i++) { |
| | | RbDetailFile rbDetailFile = parseArray.get(i); |
| | |
| | | parseArray2.add(rbDetailFile); |
| | | } |
| | | } |
| | | remShare.setAnnexfiles(JSON.toJSONString(parseArray2)); |
| | | if (flag.equals("1")) { |
| | | //如果flag为1,则是普通 |
| | | remShare.setAnnexfiles(JSON.toJSONString(parseArray2)); |
| | | |
| | | } else if (flag.equals("2")) { |
| | | //如果flag为2,则是发票 |
| | | remShare.setInvoicefiles(JSON.toJSONString(parseArray2)); |
| | | } |
| | | log.info("ServiceReimbursementdetailShared 是否加上了fileid : {}", remShare); |
| | | return 0; |
| | | } |