| | |
| | | private VExpertfeeExpertMapper vExpertfeeExpertMapper; |
| | | |
| | | @Autowired |
| | | private VExpertfeeDonorMapper vExpertfeeDonorMapper; |
| | | |
| | | @Autowired |
| | | private VExpertfeeTotalMapper vExpertfeeTotalMapper; |
| | | |
| | | |
| | |
| | | serviceFunddetailShareds.get(i).setFundid(serviceFundShared.getId()); |
| | | serviceFunddetailShareds.get(i).setId(null); |
| | | //数据发送给财务 |
| | | uploadOAFileAndUpdateDb(serviceFunddetailShareds.get(i)); |
| | | try { |
| | | uploadOAFileAndUpdateDb(serviceFunddetailShareds.get(i)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("Exception中入参的ID为:{},异常信息为 : {}", id, e.getMessage()); |
| | | if (id != null) { |
| | | Boolean aBoolean = sharedService.delfundsharedInfoById(null, id); |
| | | log.error("fund2分享表里的数据是否删除成功:{}", aBoolean); |
| | | } |
| | | return false; |
| | | } |
| | | } |
| | | boolean result = false; |
| | | for (ServiceFunddetailShared serviceFunddetailShared : serviceFunddetailShareds) { |
| | |
| | | |
| | | @Override |
| | | public List<SpFinancialExpensesFundOut> getExpertfeeList(SpSelectExpertfee spSelectExpertfee) { |
| | | return serviceFundMapper.getExpertfeeList(spSelectExpertfee.getPaApplyType(), spSelectExpertfee.getDonorname(), spSelectExpertfee.getPacheckno(), spSelectExpertfee.getCheckstatus(), spSelectExpertfee.getPadepartno(), spSelectExpertfee.getPausername()); |
| | | log.info("spSelectExpertfee的入参为:{}", spSelectExpertfee); |
| | | return serviceFundMapper.getExpertfeeList(spSelectExpertfee.getPaApplyType(), spSelectExpertfee.getPfundtaxid(), spSelectExpertfee.getDonorname(), spSelectExpertfee.getPadepartid(), spSelectExpertfee.getPausername()); |
| | | } |
| | | |
| | | @Override |
| | |
| | | if (StringUtils.isNotEmpty(serviceFunddetailVO.getIdcardno())) { |
| | | serviceFunddetailVO.setIdcardno(serviceFunddetailVO.getIdcardno().trim()); |
| | | } |
| | | |
| | | log.info("身份证号为:{}", serviceFunddetailVO.getIdcardno()); |
| | | if (StringUtils.isEmpty(serviceFunddetailVO.getBankcardno())) { |
| | | throw new BaseException("请检查银行卡号是否为空,姓名:" + serviceFunddetailVO.getBeneficiaryname()); |
| | | } |
| | |
| | | AjaxResult ajaxResult = util.exportExcel(list, "vExpertfeeTotal"); |
| | | String filePath = RuoYiConfig.getDownloadPath() + ajaxResult.get("msg"); |
| | | |
| | | List<VExpertfeeExpert> list2 = vExpertfeeExpertMapper.selectVExpertfeeExpertListByFaxId(faxId); |
| | | ExcelUtil<VExpertfeeExpert> util2 = new ExcelUtil<VExpertfeeExpert>(VExpertfeeExpert.class); |
| | | AjaxResult ajaxResult1 = util2.exportExcel(list2, "vExpertfeeExpert"); |
| | | List<VExpertfeeDonor> list2 = vExpertfeeDonorMapper.selectVExpertfeeDonorList2(faxId); |
| | | ExcelUtil<VExpertfeeDonor> util2 = new ExcelUtil<VExpertfeeDonor>(VExpertfeeDonor.class); |
| | | AjaxResult ajaxResult2 = util2.exportExcel(list2, "VExpertfeeDonor"); |
| | | |
| | | List<VExpertfeeExpert> list3 = vExpertfeeExpertMapper.selectVExpertfeeExpertListByFaxId(faxId); |
| | | ExcelUtil<VExpertfeeExpert> util3 = new ExcelUtil<VExpertfeeExpert>(VExpertfeeExpert.class); |
| | | AjaxResult ajaxResult3 = util3.exportExcel(list3, "vExpertfeeExpert"); |
| | | |
| | | List<String> list1 = new ArrayList<>(); |
| | | list1.add(ajaxResult.get("msg").toString()); |
| | | list1.add(ajaxResult1.get("msg").toString()); |
| | | list1.add(ajaxResult2.get("msg").toString()); |
| | | list1.add(ajaxResult3.get("msg").toString()); |
| | | |
| | | |
| | | String name = "专家费汇总单" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xlsx"; |
| | |
| | | new File(RuoYiConfig.getDownloadPath() + path).delete(); |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("downloadUrl", "/profile/download/wordtemplate/" + name); |
| | | map.put("downloadUrl", "/profile/download/" + name); |
| | | map.put("downloadName", name); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | int uploadOAFileAndUpdateDb(ServiceFunddetailShared remShare) { |
| | | int uploadOAFileAndUpdateDb(ServiceFunddetailShared remShare) throws Exception { |
| | | //上传OA文件 |
| | | //String strUrl = "http://129.88.242.39:8899/seeyon/rest/token?userName=opo&password=127814f8-84e8-4304-84a5-a71573567efd&loginName=demo3"; |
| | | String strUrl = "http://129.88.242.39:8899/seeyon/rest/token"; |
| | |
| | | } |
| | | |
| | | |
| | | private Integer uploadFile(String filePath, String strFUrl, List<RbDetailFile> parseArray2, List<RbDetailFile> parseArray, ServiceFunddetailShared remShare, String flag) { |
| | | private Integer uploadFile(String filePath, String strFUrl, List<RbDetailFile> parseArray2, List<RbDetailFile> parseArray, ServiceFunddetailShared remShare, String flag) throws Exception { |
| | | if (!CollectionUtils.isEmpty(parseArray)) { |
| | | for (int i = 0; i < parseArray.size(); i++) { |
| | | RbDetailFile rbDetailFile = parseArray.get(i); |
| | |
| | | System.out.println("fund服务的filePath + substring: " + filePath + substring); |
| | | File filetest = new File(filePath + substring); |
| | | |
| | | try { |
| | | String struploadResult = HttpClientKit.sendPostWithFile(filetest, strFUrl); |
| | | log.info("第三方传回的数据: {}", struploadResult); |
| | | if (StringUtils.isEmpty(struploadResult)) { |
| | | log.error("HttpClientKit.sendPostWithFile 请求为空了 filetest:{}, strFUrl:{} ", filetest, strFUrl); |
| | | return 0; |
| | | } |
| | | //获取fileid |
| | | JSONObject jsonR = JSONObject.parseObject(struploadResult); |
| | | JSONArray jsonArr = jsonR.getJSONArray("atts"); |
| | | log.info("第三方传回的数据获取的atts : {}", jsonArr); |
| | | for (int j = 0; j < jsonArr.size(); j++) { |
| | | JSONObject jsonRet = jsonArr.getJSONObject(j); |
| | | rbDetailFile.setFileid(jsonRet.get("fileUrl").toString()); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | String struploadResult = HttpClientKit.sendPostWithFile(filetest, strFUrl); |
| | | log.info("第三方传回的数据: {}", struploadResult); |
| | | if (StringUtils.isEmpty(struploadResult)) { |
| | | log.error("HttpClientKit.sendPostWithFile 请求为空了 filetest:{}, strFUrl:{} ", filetest, strFUrl); |
| | | return 0; |
| | | } |
| | | //获取fileid |
| | | JSONObject jsonR = JSONObject.parseObject(struploadResult); |
| | | JSONArray jsonArr = jsonR.getJSONArray("atts"); |
| | | log.info("第三方传回的数据获取的atts : {}", jsonArr); |
| | | for (int j = 0; j < jsonArr.size(); j++) { |
| | | JSONObject jsonRet = jsonArr.getJSONObject(j); |
| | | if (StringUtils.isEmpty(jsonRet.get("fileUrl").toString())) { |
| | | throw new BaseException("fileID为空,请联系第三方处理"); |
| | | } |
| | | rbDetailFile.setFileid(jsonRet.get("fileUrl").toString()); |
| | | } |
| | | |
| | | parseArray2.add(rbDetailFile); |
| | | } |
| | | if (flag.equals("1")) { |
| | |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Boolean updateFundTaxIdById(Long id, Long fundTaxId) { |
| | | return serviceFundMapper.updateFundTaxIdById(id, fundTaxId); |
| | | //将fund里的算税时间,与详情里的版税时间全清空 |
| | | Boolean aBoolean = serviceFundMapper.updateFundTaxIdById(id, fundTaxId); |
| | | ServiceFunddetail serviceFunddetail = new ServiceFunddetail(); |
| | | serviceFunddetail.setFundid(id); |
| | | serviceFunddetail.setTaxTime(null); |
| | | serviceFunddetail.setXh(null); |
| | | boolean b = serviceFunddetailMapper.updateTaxTime(serviceFunddetail); |
| | | return b; |
| | | } |
| | | } |