| | |
| | | package com.ruoyi.web.controller.project; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.annotation.RepeatSubmit; |
| | | import com.ruoyi.common.config.RuoYiConfig; |
| | |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.HttpClientKit; |
| | | import com.ruoyi.common.utils.bean.DtoConversionUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.project.domain.*; |
| | |
| | | import java.math.BigDecimal; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.ruoyi.web.controller.project.ServiceReimbursementController.convert; |
| | | |
| | |
| | | serviceFundService.updateById(sf); |
| | | return success(); |
| | | } else { |
| | | serviceFund.setFlowlevel(sf.getBackflowlevel()); |
| | | boolean bret = serviceFundService.updateById(serviceFund); |
| | | // if (bret) { |
| | | // addReiSharedDatd(serviceFund, 2); |
| | |
| | | Template t = null; |
| | | try { |
| | | //捐献表.ftl为要装载的模板 |
| | | t = configuration.getTemplate("专家劳务费发放申请单.ftl"); |
| | | t = configuration.getTemplate("专家劳务费发放申请单(1).ftl"); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | dataMap.put("BXDFJ", serviceFund.getAttachcount() == 0 ? " " : serviceFund.getAttachcount()); |
| | | dataMap.put("JXZXM", serviceFund.getDonorname() == null ? "" : serviceFund.getDonorname()); |
| | | dataMap.put("JSR", serviceFund.getUsername() == null ? "" : serviceFund.getUsername()); |
| | | dataMap.put("FYXM1", "支付专家费用,其中税前金额" + serviceFund.getPretaxcost() + "元,税后金额" + serviceFund.getTaxedcost() + "元。"); |
| | | // dataMap.put("FYXM1", "支付专家费用,其中税前金额" + serviceFund.getPretaxcost() + "元,税后金额" + serviceFund.getTaxedcost() + "元。"); |
| | | dataMap.put("FYXM1", "人体器官捐献专家劳务费:" + serviceFund.getTaxedcost() + "元 (其中税后费用由中心承担税费)。"); |
| | | dataMap.put("FYXM2", ""); |
| | | dataMap.put("FYXM3", ""); |
| | | dataMap.put("JEXS", serviceFund.getAmountrequested()); |
| | |
| | | for (ServiceFunddetail f : fd) { |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | |
| | | |
| | | map.put("XH", f.getItemcode() == null ? "" : f.getItemcode()); |
| | | String itemName = f.getItemname() == null ? "" : f.getItemname(); |
| | | String servicesscopename = f.getServicesscopename() == null ? "" : "(" + f.getServicesscopename() + ")"; |
| | |
| | | newsList.add(map); |
| | | } |
| | | |
| | | // 专家劳务费统计表 |
| | | List<Map<String, Object>> lists = new ArrayList<Map<String, Object>>(); |
| | | |
| | | List<Double> sqljList = new ArrayList<>(); |
| | | List<Double> ksljList = new ArrayList<>(); |
| | | List<Double> shljList = new ArrayList<>(); |
| | | Map<String, Optional<ServiceFunddetailAssort>> result = fd.stream().collect(Collectors.groupingBy(ServiceFunddetail::getSubjecttypename, Collectors.mapping(obj -> new ServiceFunddetailAssort(obj.getAmount(), obj.getTaxamount(), obj.getTaxedamount()), Collectors.reducing(ServiceFunddetailAssort::add)))); |
| | | result.forEach((FWFL, serviceFunddetailAssort) -> { |
| | | Map<String, Object> map1 = new HashMap<String, Object>(); |
| | | map1.put("FWFL", FWFL); |
| | | map1.put("SQXJ", serviceFunddetailAssort.get().getSQXJ()); |
| | | map1.put("KSXJ", serviceFunddetailAssort.get().getKSXJ()); |
| | | map1.put("SHXJ", serviceFunddetailAssort.get().getSHXJ()); |
| | | sqljList.add(serviceFunddetailAssort.get().getSQXJ()); |
| | | ksljList.add(serviceFunddetailAssort.get().getKSXJ()); |
| | | shljList.add(serviceFunddetailAssort.get().getSHXJ()); |
| | | lists.add(map1); |
| | | }); |
| | | |
| | | double sqxj = 0; |
| | | double kslj = 0; |
| | | double shlj = 0; |
| | | for (Double sqx : sqljList) { |
| | | sqxj += sqx; |
| | | } |
| | | for (Double ksl : ksljList) { |
| | | kslj += ksl; |
| | | } |
| | | for (Double shl : shljList) { |
| | | shlj += shl; |
| | | } |
| | | |
| | | //数据封装 |
| | | dataMap.put("list", newsList); |
| | | for (int i = 0; i < lists.size(); i++) { |
| | | Map<String, Object> map = lists.get(i); |
| | | map.put("XH", i+1); |
| | | } |
| | | |
| | | dataMap.put("item", lists); |
| | | |
| | | dataMap.put("SQHJ", sq); |
| | | dataMap.put("KSHJ", ks); |
| | | dataMap.put("SHHJ", sh); |
| | | |
| | | dataMap.put("SQLJ", sqxj); |
| | | dataMap.put("KSLJ", kslj); |
| | | dataMap.put("SHLJ", shlj); |
| | | |
| | | } |
| | | |
| | | |