diff --git a/src/main/java/cn/palmte/work/bean/CashFlowStatisticsBean.java b/src/main/java/cn/palmte/work/bean/CashFlowStatisticsBean.java new file mode 100644 index 0000000..2cd7f4b --- /dev/null +++ b/src/main/java/cn/palmte/work/bean/CashFlowStatisticsBean.java @@ -0,0 +1,71 @@ +package cn.palmte.work.bean; + +import lombok.Data; + +import java.math.BigDecimal; + +@Data +public class CashFlowStatisticsBean { + + private String title; + + /** + * a销售商品、提供劳务收到的现金 + * */ + private BigDecimal saleIncomeCash; + /** + * b收到的税费返还 + * */ + private BigDecimal taxReturn; + /** + * c其他与经营活动有关的现金【保证金收入】 + */ + private BigDecimal earnestMoneyIncome; + /** + * d购买商品、接受劳务支付的现金【设备支出+工程支出】 + */ + private BigDecimal purchaseCost; + /** + * e支付的各项税费 + */ + private BigDecimal taxCost; + /** + *f支付其他与经营活动有关的现金 + */ + private BigDecimal earnestMoneyCost; + /** + * g经营活动产生的现金流量净额 + * g=a+c+b-d-f-e + */ + private BigDecimal netCashFlow; + /** + * h投资活动现金流入 + */ + private BigDecimal cashInflowFromInvestingActivities; + /** + * i投资活动现金流出 + */ + private BigDecimal cashOutflowFromInvestingActivities; + /** + * j投资活动产生的现金流量净额 + */ + private BigDecimal netCashFromInvestingActivities; + /** + * k融资资金流入【垫资计划】 + */ + private BigDecimal financingCapitalInflow; + /** + * l融资资金流出【还款计划】 + */ + private BigDecimal financingCapitalOutflow; + /** + *m筹资活动产生的现金流量净额 + * m=k-l + */ + private BigDecimal financingCapitalCashflow; + /** + * n货币资金净增加额 + * n=g+j+m + */ + private BigDecimal netIncreaseMonetaryFunds; +} diff --git a/src/main/java/cn/palmte/work/bean/ZtreeNode.java b/src/main/java/cn/palmte/work/bean/ZtreeNode.java new file mode 100644 index 0000000..51cc067 --- /dev/null +++ b/src/main/java/cn/palmte/work/bean/ZtreeNode.java @@ -0,0 +1,61 @@ +package cn.palmte.work.bean; + +/** + * { id:2, pId:0, name:"随意勾选 2", checked:true, open:true}, + * @author xiongshiyan at 2021/11/18 , contact me with email yanshixiong@126.com or phone 15208384257 + */ +public class ZtreeNode { + private String id; + private String pId; + private String name; + private boolean checked; + private boolean open = true; + + public ZtreeNode(String id, String pId, String name, boolean checked, boolean open) { + this.id = id; + this.pId = pId; + this.name = name; + this.checked = checked; + this.open = open; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getpId() { + return pId; + } + + public void setpId(String pId) { + this.pId = pId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public boolean isChecked() { + return checked; + } + + public void setChecked(boolean checked) { + this.checked = checked; + } + + public boolean isOpen() { + return open; + } + + public void setOpen(boolean open) { + this.open = open; + } +} diff --git a/src/main/java/cn/palmte/work/controller/backend/ActProcInsController.java b/src/main/java/cn/palmte/work/controller/backend/ActProcInsController.java index 3cb6a07..043046d 100644 --- a/src/main/java/cn/palmte/work/controller/backend/ActProcInsController.java +++ b/src/main/java/cn/palmte/work/controller/backend/ActProcInsController.java @@ -94,7 +94,7 @@ public class ActProcInsController extends BaseController { variables.put(ActConstant.START_PROCESS_USERID, InterfaceUtil.getAdminId()); String procInsId = null; try { - procInsId = actProcInsService.startProcessInstance(procDefKey, "", variables); + procInsId = actProcInsService.startProcessInstance(procDefKey, "0", variables); } catch (Exception e) { logger.error("", e); return ResponseMsg.buildFailedMsg("流程启动失败:" + e.getMessage()); diff --git a/src/main/java/cn/palmte/work/controller/backend/ProjectController.java b/src/main/java/cn/palmte/work/controller/backend/ProjectController.java index bbf3348..1eb61b2 100644 --- a/src/main/java/cn/palmte/work/controller/backend/ProjectController.java +++ b/src/main/java/cn/palmte/work/controller/backend/ProjectController.java @@ -456,6 +456,29 @@ public class ProjectController extends BaseController { actProcInsService.createProcInsPng(response, relationList.get(0).getProcessInsId()); } + + + @RequestMapping("/roleUsers") + @ResponseBody + public ResponseMsg roleUsers(@RequestParam int projectId) { + /*{ id:1, pId:0, name:"随意勾选 1", open:true}, + { id:11, pId:1, name:"随意勾选 1-1", open:true}, + { id:12, pId:1, name:"随意勾选 1-2", open:true}, + { id:2, pId:0, name:"随意勾选 2", checked:true, open:true}, + { id:21, pId:2, name:"随意勾选 2-1"}, + { id:22, pId:2, name:"随意勾选 2-2", open:true}, + { id:23, pId:2, name:"随意勾选 2-3"}*/ + List ztreeNodes = new ArrayList<>(); + ztreeNodes.add(new ZtreeNode("1","0","随意勾选 1",false,true)); + ztreeNodes.add(new ZtreeNode("11","1","随意勾选 1-1",false,true)); + ztreeNodes.add(new ZtreeNode("12","1","随意勾选 1-2",false,true)); + ztreeNodes.add(new ZtreeNode("2","0","随意勾选 2",false,true)); + ztreeNodes.add(new ZtreeNode("21","2","随意勾选 2-1",false,true)); + ztreeNodes.add(new ZtreeNode("22","2","随意勾选 2-2",false,true)); + ztreeNodes.add(new ZtreeNode("23","2","随意勾选 2-3",false,true)); + return ResponseMsg.buildSuccessData(ztreeNodes); + } + @InitBinder public void initBinder(WebDataBinder webDataBinder) { webDataBinder.addCustomFormatter(new DateFormatter("yyyy-MM-dd")); diff --git a/src/main/java/cn/palmte/work/controller/backend/StatisticsController.java b/src/main/java/cn/palmte/work/controller/backend/StatisticsController.java index e944b78..e479455 100644 --- a/src/main/java/cn/palmte/work/controller/backend/StatisticsController.java +++ b/src/main/java/cn/palmte/work/controller/backend/StatisticsController.java @@ -1,5 +1,6 @@ package cn.palmte.work.controller.backend; +import cn.palmte.work.bean.CashFlowStatisticsBean; import cn.palmte.work.bean.PrimaryIndicatorBean; import cn.palmte.work.service.StatisticsService; import org.springframework.beans.factory.annotation.Autowired; @@ -19,7 +20,9 @@ public class StatisticsController extends BaseController{ @RequestMapping("/month") public String month(Map model){ List primaryIndicatorList = statisticsService.getPrimaryIndicator(); + List cashFlowList = statisticsService.getCashFlow(); model.put("primaryIndicatorList",primaryIndicatorList); + model.put("cashFlowList",cashFlowList); return "admin/month_statistics"; } diff --git a/src/main/java/cn/palmte/work/model/ProjectSettleCashFlowRepository.java b/src/main/java/cn/palmte/work/model/ProjectSettleCashFlowRepository.java index b889ce3..5b163d3 100644 --- a/src/main/java/cn/palmte/work/model/ProjectSettleCashFlowRepository.java +++ b/src/main/java/cn/palmte/work/model/ProjectSettleCashFlowRepository.java @@ -26,4 +26,7 @@ public interface ProjectSettleCashFlowRepository extends JpaRepository findAllByProjectsAndTime(List ids, String time); + + @Query(value = "SELECT time FROM project_settle_cash_flow GROUP BY time ORDER BY time", nativeQuery = true) + List getProjectTime(); } diff --git a/src/main/java/cn/palmte/work/model/ProjectSettleCostManageRepository.java b/src/main/java/cn/palmte/work/model/ProjectSettleCostManageRepository.java index 76dc3d3..74e1afb 100644 --- a/src/main/java/cn/palmte/work/model/ProjectSettleCostManageRepository.java +++ b/src/main/java/cn/palmte/work/model/ProjectSettleCostManageRepository.java @@ -26,4 +26,10 @@ public interface ProjectSettleCostManageRepository extends JpaRepository findAllByProjectsAndTime(List ids, String time); + + @Query(value = "select sum(cost_tax_exclude) from project_settle_cost_manage where time = ? and type = ?", nativeQuery = true) + BigDecimal costManageTaxExcludeSumByTime(String time, int type); + + @Query(value = "select sum(cost_tax_exclude) from project_settle_cost_manage where type = ?", nativeQuery = true) + BigDecimal costManageTaxExcludeSumByType(int type); } diff --git a/src/main/java/cn/palmte/work/model/ProjectSettleCostRepository.java b/src/main/java/cn/palmte/work/model/ProjectSettleCostRepository.java index c67afa6..9191bca 100644 --- a/src/main/java/cn/palmte/work/model/ProjectSettleCostRepository.java +++ b/src/main/java/cn/palmte/work/model/ProjectSettleCostRepository.java @@ -26,4 +26,10 @@ public interface ProjectSettleCostRepository extends JpaRepository findAllByProjectsAndTime(List ids, String time); + + @Query(value = "select sum(cost_tax_exclude) from project_settle_cost where time = ? and type = ?", nativeQuery = true) + BigDecimal costTaxExcludeSumByTime(String time, int type); + + @Query(value = "select sum(cost_tax_exclude) from project_settle_cost where type = ?", nativeQuery = true) + BigDecimal costTaxExcludeSumByType(int type); } diff --git a/src/main/java/cn/palmte/work/model/ProjectSettleIncomeRepository.java b/src/main/java/cn/palmte/work/model/ProjectSettleIncomeRepository.java index fc31747..4a2dc73 100644 --- a/src/main/java/cn/palmte/work/model/ProjectSettleIncomeRepository.java +++ b/src/main/java/cn/palmte/work/model/ProjectSettleIncomeRepository.java @@ -29,4 +29,13 @@ public interface ProjectSettleIncomeRepository extends JpaRepository findAllByProjectsAndTime(List ids, String time); + + @Query(value = "SELECT time FROM project_settle_income GROUP BY time ORDER BY time", nativeQuery = true) + List getProjectTime(); + + @Query(value = "select sum(income_tax_exclude) from project_settle_income where time = ? and type = ?", nativeQuery = true) + BigDecimal incomeTaxExcludeSumByTime(String time, int type); + + @Query(value = "select sum(income_tax_exclude) from project_settle_income where type = ?", nativeQuery = true) + BigDecimal incomeTaxExcludeSumByType(int type); } diff --git a/src/main/java/cn/palmte/work/service/ActListenerService.java b/src/main/java/cn/palmte/work/service/ActListenerService.java index 529f63d..98be86e 100644 --- a/src/main/java/cn/palmte/work/service/ActListenerService.java +++ b/src/main/java/cn/palmte/work/service/ActListenerService.java @@ -1,6 +1,8 @@ package cn.palmte.work.service; +import cn.palmte.work.model.Admin; +import cn.palmte.work.model.AdminRepository; import cn.palmte.work.utils.ActUtil; import org.activiti.engine.RuntimeService; import org.activiti.engine.delegate.DelegateExecution; @@ -34,6 +36,9 @@ public class ActListenerService { @Autowired private ActUtil actUtil; + @Autowired + private AdminRepository adminRepository; + /** * 任务节点创建后监听 动态设置审批人 * @@ -89,7 +94,14 @@ public class ActListenerService { try { int adminId = 0; if (!candidateUsers.isEmpty()) { - adminId = Integer.parseInt(candidateUsers.get(0)); + for (String id : candidateUsers) { + Admin one = adminRepository.findOne(Integer.parseInt(id)); + if (!one.isDeleted() && one.getEnabled() == 1) { + //找到有效账号 发送任务 + adminId = one.getId(); + break; + } + } } projectInstanceService.updateApprover(Integer.parseInt(businessKey), adminId); } catch (Exception e) { diff --git a/src/main/java/cn/palmte/work/service/StatisticsService.java b/src/main/java/cn/palmte/work/service/StatisticsService.java index b26568c..589980e 100644 --- a/src/main/java/cn/palmte/work/service/StatisticsService.java +++ b/src/main/java/cn/palmte/work/service/StatisticsService.java @@ -1,9 +1,13 @@ package cn.palmte.work.service; +import cn.palmte.work.bean.CashFlowBean; +import cn.palmte.work.bean.CashFlowStatisticsBean; import cn.palmte.work.bean.PrimaryIndicatorBean; import cn.palmte.work.model.*; +import lombok.Data; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import top.jfunc.common.utils.CollectionUtil; import java.math.BigDecimal; import java.util.ArrayList; @@ -21,6 +25,21 @@ public class StatisticsService { @Autowired private ProjectBudgetCostManageRepository projectBudgetCostManageRepository; + @Autowired + private ProjectSettleCostRepository projectSettleCostRepository; + + @Autowired + private ProjectSettleIncomeRepository projectSettleIncomeRepository; + + @Autowired + private ProjectSettleCostManageRepository projectSettleCostManageRepository; + + @Autowired + private ProjectBudgetPlanDetailRepository projectBudgetPlanDetailRepository; + + @Autowired + private ProjectSettleCashFlowRepository projectSettleCashFlowRepository; + /** * 分月项目统计 获取主要指标数据 * @@ -29,70 +48,157 @@ public class StatisticsService { public List getPrimaryIndicator() { List list = new ArrayList<>(); PrimaryIndicatorBean include = new PrimaryIndicatorBean(); - include.setTitle("预算金额(含税)"); - //收入数据 - BigDecimal deviceIncomeTaxIncludeSum = projectBudgetIncomeRepository.incomeTaxIncludeSum(ProjectBudgetIncome.TYPE_DEVICE); - BigDecimal engineerIncomeTaxIncludeSum = projectBudgetIncomeRepository.incomeTaxIncludeSum(ProjectBudgetIncome.TYPE_ENGINEER); - BigDecimal serviceIncomeTaxIncludeSum = projectBudgetIncomeRepository.incomeTaxIncludeSum(ProjectBudgetIncome.TYPE_SERVICE); - - include.setIncomeDevice(deviceIncomeTaxIncludeSum); - include.setIncomeEngineer(engineerIncomeTaxIncludeSum); - include.setIncomeService(serviceIncomeTaxIncludeSum); - - //成本 - BigDecimal deviceCostTaxIncludeSum = projectBudgetCostRepository.costTaxIncludeSum(ProjectBudgetCost.TYPE_DEVICE); - BigDecimal buildingCostTaxIncludeSum = projectBudgetCostRepository.costTaxIncludeSum(ProjectBudgetCost.TYPE_BUILDING); - BigDecimal serviceCostTaxIncludeSum = projectBudgetCostRepository.costTaxIncludeSum(ProjectBudgetCost.TYPE_SERVICE); - BigDecimal otherCostTaxIncludeSum = projectBudgetCostRepository.costTaxIncludeSum(ProjectBudgetCost.TYPE_OTHER); - BigDecimal projectManageCostTaxIncludeSum = projectBudgetCostRepository.costTaxIncludeSum(ProjectBudgetCost.TYPE_PROJECT_MANAGE); - BigDecimal otherOtherCostTaxIncludeSum = projectBudgetCostRepository.costTaxIncludeSum(ProjectBudgetCost.TYPE_OTHER_OTHER); - - include.setCostPurchaseDevice(deviceCostTaxIncludeSum); - include.setCostPurchaseBuild(buildingCostTaxIncludeSum); - include.setCostPurchaseService(serviceCostTaxIncludeSum); - include.setCostPurchaseOther(otherCostTaxIncludeSum); - include.setCostProjectManage(projectManageCostTaxIncludeSum); - include.setCostOtherOther(otherOtherCostTaxIncludeSum); - - list.add(include); - PrimaryIndicatorBean exclude = new PrimaryIndicatorBean(); + include.setTitle("预算金额(含税)"); exclude.setTitle("预算金额(不含税)"); //收入数据 - BigDecimal deviceIncomeTaxExcludeSum = projectBudgetIncomeRepository.incomeTaxExcludeSum(ProjectBudgetIncome.TYPE_DEVICE); - BigDecimal engineerIncomeTaxExcludeSum = projectBudgetIncomeRepository.incomeTaxExcludeSum(ProjectBudgetIncome.TYPE_ENGINEER); - BigDecimal serviceIncomeTaxExcludeSum = projectBudgetIncomeRepository.incomeTaxExcludeSum(ProjectBudgetIncome.TYPE_SERVICE); + List allIncome = projectBudgetIncomeRepository.findAll(); + if (CollectionUtil.isNotEmpty(allIncome)) { + BigDecimal deviceIncomeTaxIncludeSum = allIncome.stream().filter(d -> d.getType() == ProjectBudgetIncome.TYPE_DEVICE).map(ProjectBudgetIncome::getIncomeTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal engineerIncomeTaxIncludeSum = allIncome.stream().filter(d -> d.getType() == ProjectBudgetIncome.TYPE_ENGINEER).map(ProjectBudgetIncome::getIncomeTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal serviceIncomeTaxIncludeSum = allIncome.stream().filter(d -> d.getType() == ProjectBudgetIncome.TYPE_SERVICE).map(ProjectBudgetIncome::getIncomeTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add); - exclude.setIncomeDevice(deviceIncomeTaxExcludeSum); - exclude.setIncomeEngineer(engineerIncomeTaxExcludeSum); - exclude.setIncomeService(serviceIncomeTaxExcludeSum); + include.setIncomeDevice(deviceIncomeTaxIncludeSum); + include.setIncomeEngineer(engineerIncomeTaxIncludeSum); + include.setIncomeService(serviceIncomeTaxIncludeSum); - //成本 - BigDecimal deviceCostTaxExcludeSum = projectBudgetCostRepository.costTaxExcludeSum(ProjectBudgetCost.TYPE_DEVICE); - BigDecimal buildingCostTaxExcludeSum = projectBudgetCostRepository.costTaxExcludeSum(ProjectBudgetCost.TYPE_BUILDING); - BigDecimal serviceCostTaxExcludeSum = projectBudgetCostRepository.costTaxExcludeSum(ProjectBudgetCost.TYPE_SERVICE); - BigDecimal otherCostTaxExcludeSum = projectBudgetCostRepository.costTaxExcludeSum(ProjectBudgetCost.TYPE_OTHER); - BigDecimal projectManageCostTaxExcludeSum = projectBudgetCostRepository.costTaxExcludeSum(ProjectBudgetCost.TYPE_PROJECT_MANAGE); - BigDecimal otherOtherCostTaxExcludeSum = projectBudgetCostRepository.costTaxExcludeSum(ProjectBudgetCost.TYPE_OTHER_OTHER); + BigDecimal deviceIncomeTaxExcludeSum = allIncome.stream().filter(d -> d.getType() == ProjectBudgetIncome.TYPE_DEVICE).map(ProjectBudgetIncome::getIncomeTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal engineerIncomeTaxExcludeSum = allIncome.stream().filter(d -> d.getType() == ProjectBudgetIncome.TYPE_ENGINEER).map(ProjectBudgetIncome::getIncomeTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal serviceIncomeTaxExcludeSum = allIncome.stream().filter(d -> d.getType() == ProjectBudgetIncome.TYPE_SERVICE).map(ProjectBudgetIncome::getIncomeTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); - exclude.setCostPurchaseDevice(deviceCostTaxExcludeSum); - exclude.setCostPurchaseBuild(buildingCostTaxExcludeSum); - exclude.setCostPurchaseService(serviceCostTaxExcludeSum); - exclude.setCostPurchaseOther(otherCostTaxExcludeSum); - exclude.setCostProjectManage(projectManageCostTaxExcludeSum); - exclude.setCostOtherOther(otherOtherCostTaxExcludeSum); + exclude.setIncomeDevice(deviceIncomeTaxExcludeSum); + exclude.setIncomeEngineer(engineerIncomeTaxExcludeSum); + exclude.setIncomeService(serviceIncomeTaxExcludeSum); - //管理 - BigDecimal expropriationSum = projectBudgetCostManageRepository.costTaxExcludeSum(ProjectBudgetCostManage.TYPE_EXPROPRIATION); - BigDecimal companyManageSum = projectBudgetCostManageRepository.costTaxExcludeSum(ProjectBudgetCostManage.TYPE_COMPANY_MANAGE); + } - exclude.setCostExpropriation(expropriationSum); - exclude.setCostCompanyManage(companyManageSum); + //成本数据 + List allCost = projectBudgetCostRepository.findAll(); + if (CollectionUtil.isNotEmpty(allCost)) { + BigDecimal deviceCostTaxIncludeSum = allCost.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_DEVICE).map(ProjectBudgetCost::getCostTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal buildingCostTaxIncludeSum = allCost.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_BUILDING).map(ProjectBudgetCost::getCostTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal serviceCostTaxIncludeSum = allCost.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_SERVICE).map(ProjectBudgetCost::getCostTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal otherCostTaxIncludeSum = allCost.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_OTHER).map(ProjectBudgetCost::getCostTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal projectManageCostTaxIncludeSum = allCost.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_PROJECT_MANAGE).map(ProjectBudgetCost::getCostTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal otherOtherCostTaxIncludeSum = allCost.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_OTHER_OTHER).map(ProjectBudgetCost::getCostTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add); + include.setCostPurchaseDevice(deviceCostTaxIncludeSum); + include.setCostPurchaseBuild(buildingCostTaxIncludeSum); + include.setCostPurchaseService(serviceCostTaxIncludeSum); + include.setCostPurchaseOther(otherCostTaxIncludeSum); + include.setCostProjectManage(projectManageCostTaxIncludeSum); + include.setCostOtherOther(otherOtherCostTaxIncludeSum); + BigDecimal deviceCostTaxExcludeSum = allCost.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_DEVICE).map(ProjectBudgetCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal buildingCostTaxExcludeSum = allCost.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_BUILDING).map(ProjectBudgetCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal serviceCostTaxExcludeSum = allCost.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_SERVICE).map(ProjectBudgetCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal otherCostTaxExcludeSum = allCost.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_OTHER).map(ProjectBudgetCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal projectManageCostTaxExcludeSum = allCost.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_PROJECT_MANAGE).map(ProjectBudgetCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal otherOtherCostTaxExcludeSum = allCost.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_OTHER_OTHER).map(ProjectBudgetCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + + exclude.setCostPurchaseDevice(deviceCostTaxExcludeSum); + exclude.setCostPurchaseBuild(buildingCostTaxExcludeSum); + exclude.setCostPurchaseService(serviceCostTaxExcludeSum); + exclude.setCostPurchaseOther(otherCostTaxExcludeSum); + exclude.setCostProjectManage(projectManageCostTaxExcludeSum); + exclude.setCostOtherOther(otherOtherCostTaxExcludeSum); + } + + //管理成本数据 + List allCostManage = projectBudgetCostManageRepository.findAll(); + if (CollectionUtil.isNotEmpty(allCostManage)) { + BigDecimal expropriationSum = allCostManage.stream().filter(d -> d.getType() == ProjectBudgetCostManage.TYPE_EXPROPRIATION).map(ProjectBudgetCostManage::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal companyManageSum = allCostManage.stream().filter(d -> d.getType() == ProjectBudgetCostManage.TYPE_COMPANY_MANAGE).map(ProjectBudgetCostManage::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + + exclude.setCostExpropriation(expropriationSum); + exclude.setCostCompanyManage(companyManageSum); + } + + list.add(include); list.add(exclude); + PrimaryIndicatorBean allSettle = new PrimaryIndicatorBean(); + allSettle.setTitle("实际累计(不含税)"); + + List allSettleIncome = projectSettleIncomeRepository.findAll(); + if (CollectionUtil.isNotEmpty(allSettleIncome)) { + BigDecimal incomeDeviceAll = allSettleIncome.stream().filter(d -> d.getType() == ProjectSettleIncome.TYPE_DEVICE).map(ProjectSettleIncome::getIncomeTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal incomeEngineerAll = allSettleIncome.stream().filter(d -> d.getType() == ProjectSettleIncome.TYPE_ENGINEER).map(ProjectSettleIncome::getIncomeTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal incomeServiceAll = allSettleIncome.stream().filter(d -> d.getType() == ProjectSettleIncome.TYPE_SERVICE).map(ProjectSettleIncome::getIncomeTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + + allSettle.setIncomeDevice(incomeDeviceAll); + allSettle.setIncomeEngineer(incomeEngineerAll); + allSettle.setIncomeService(incomeServiceAll); + } + + List allSettleCost = projectSettleCostRepository.findAll(); + if (CollectionUtil.isNotEmpty(allSettleCost)) { + BigDecimal costDeviceAll = allSettleCost.stream().filter(d -> d.getType() == ProjectSettleCost.TYPE_DEVICE).map(ProjectSettleCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal costBuildingAll = allSettleCost.stream().filter(d -> d.getType() == ProjectSettleCost.TYPE_BUILDING).map(ProjectSettleCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal costServiceAll = allSettleCost.stream().filter(d -> d.getType() == ProjectSettleCost.TYPE_SERVICE).map(ProjectSettleCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal costOtherAll = allSettleCost.stream().filter(d -> d.getType() == ProjectSettleCost.TYPE_OTHER).map(ProjectSettleCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal costProjectManageAll = allSettleCost.stream().filter(d -> d.getType() == ProjectSettleCost.TYPE_PROJECT_MANAGE).map(ProjectSettleCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal costOtherOtherAll = allSettleCost.stream().filter(d -> d.getType() == ProjectSettleCost.TYPE_OTHER_OTHER).map(ProjectSettleCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + + allSettle.setCostPurchaseDevice(costDeviceAll); + allSettle.setCostPurchaseBuild(costBuildingAll); + allSettle.setCostPurchaseService(costServiceAll); + allSettle.setCostPurchaseOther(costOtherAll); + allSettle.setCostProjectManage(costProjectManageAll); + allSettle.setCostOtherOther(costOtherOtherAll); + } + + List allSettleCostManage = projectSettleCostManageRepository.findAll(); + if (CollectionUtil.isNotEmpty(allSettleCostManage)) { + BigDecimal expropriationAll = allSettleCostManage.stream().filter(d -> d.getType() == ProjectSettleCostManage.TYPE_EXPROPRIATION).map(ProjectSettleCostManage::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal companyManageAll = allSettleCostManage.stream().filter(d -> d.getType() == ProjectSettleCostManage.TYPE_COMPANY_MANAGE).map(ProjectSettleCostManage::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + + allSettle.setCostExpropriation(expropriationAll); + allSettle.setCostCompanyManage(companyManageAll); + } + list.add(allSettle); + + List projectTime = projectSettleIncomeRepository.getProjectTime(); + if (CollectionUtil.isNotEmpty(projectTime)) { + for (String time : projectTime) { + + PrimaryIndicatorBean primaryIndicatorBean = new PrimaryIndicatorBean(); + primaryIndicatorBean.setTitle(time); + + BigDecimal incomeDevice = allSettleIncome.stream().filter(d -> d.getTime().equals(time) && d.getType() == ProjectSettleIncome.TYPE_DEVICE).map(ProjectSettleIncome::getIncomeTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal incomeEngineer = allSettleIncome.stream().filter(d -> d.getTime().equals(time) && d.getType() == ProjectSettleIncome.TYPE_ENGINEER).map(ProjectSettleIncome::getIncomeTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal incomeService = allSettleIncome.stream().filter(d -> d.getTime().equals(time) && d.getType() == ProjectSettleIncome.TYPE_SERVICE).map(ProjectSettleIncome::getIncomeTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + + primaryIndicatorBean.setIncomeDevice(incomeDevice); + primaryIndicatorBean.setIncomeEngineer(incomeEngineer); + primaryIndicatorBean.setIncomeService(incomeService); + + BigDecimal costDevice = allSettleCost.stream().filter(d -> d.getTime().equals(time) && d.getType() == ProjectSettleCost.TYPE_DEVICE).map(ProjectSettleCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal costBuilding = allSettleCost.stream().filter(d -> d.getTime().equals(time) && d.getType() == ProjectSettleCost.TYPE_BUILDING).map(ProjectSettleCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal costService = allSettleCost.stream().filter(d -> d.getTime().equals(time) && d.getType() == ProjectSettleCost.TYPE_SERVICE).map(ProjectSettleCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal costOther = allSettleCost.stream().filter(d -> d.getTime().equals(time) && d.getType() == ProjectSettleCost.TYPE_OTHER).map(ProjectSettleCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal costProjectManage = allSettleCost.stream().filter(d -> d.getTime().equals(time) && d.getType() == ProjectSettleCost.TYPE_PROJECT_MANAGE).map(ProjectSettleCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal costOtherOther = allSettleCost.stream().filter(d -> d.getTime().equals(time) && d.getType() == ProjectSettleCost.TYPE_OTHER_OTHER).map(ProjectSettleCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + + + primaryIndicatorBean.setCostPurchaseDevice(costDevice); + primaryIndicatorBean.setCostPurchaseBuild(costBuilding); + primaryIndicatorBean.setCostPurchaseService(costService); + primaryIndicatorBean.setCostPurchaseOther(costOther); + primaryIndicatorBean.setCostProjectManage(costProjectManage); + primaryIndicatorBean.setCostOtherOther(costOtherOther); + + BigDecimal expropriation = allSettleCostManage.stream().filter(d -> d.getTime().equals(time) && d.getType() == ProjectSettleCostManage.TYPE_EXPROPRIATION).map(ProjectSettleCostManage::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal companyManage = allSettleCostManage.stream().filter(d -> d.getTime().equals(time) && d.getType() == ProjectSettleCostManage.TYPE_COMPANY_MANAGE).map(ProjectSettleCostManage::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + + primaryIndicatorBean.setCostExpropriation(expropriation); + primaryIndicatorBean.setCostCompanyManage(companyManage); + + list.add(primaryIndicatorBean); + } + } + return list; } @@ -112,10 +218,117 @@ public class StatisticsService { * * @return */ - public List getCashFlow() { + public List getCashFlow() { + List list = new ArrayList<>(); + CashFlowStatisticsBean cashFlowStatisticsBean = new CashFlowStatisticsBean(); + cashFlowStatisticsBean.setTitle("预算金额"); + List cashFlows = projectBudgetPlanDetailRepository.findAll(); - return null; + BigDecimal saleIncome = cashFlows.stream().map(ProjectBudgetPlanDetail::getSaleIncome).reduce(BigDecimal.ZERO, BigDecimal::add); + cashFlowStatisticsBean.setSaleIncomeCash(saleIncome); + + BigDecimal earnestMoneyIncome = cashFlows.stream().map(ProjectBudgetPlanDetail::getEarnestMoneyIncome).reduce(BigDecimal.ZERO, BigDecimal::add); + cashFlowStatisticsBean.setEarnestMoneyIncome(earnestMoneyIncome); + + BigDecimal deviceCost = cashFlows.stream().map(ProjectBudgetPlanDetail::getDeviceCost).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal engineerCost = cashFlows.stream().map(ProjectBudgetPlanDetail::getEngineerCost).reduce(BigDecimal.ZERO, BigDecimal::add); + cashFlowStatisticsBean.setPurchaseCost(deviceCost.add(engineerCost)); + + BigDecimal projectManageCost = cashFlows.stream().map(ProjectBudgetPlanDetail::getProjectManageCost).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal earnestMoneyCost = cashFlows.stream().map(ProjectBudgetPlanDetail::getEarnestMoneyCost).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal capitalInterest = cashFlows.stream().map(ProjectBudgetPlanDetail::getCapitalInterest).reduce(BigDecimal.ZERO, BigDecimal::add); + cashFlowStatisticsBean.setEarnestMoneyCost(projectManageCost.add(earnestMoneyCost).add(capitalInterest)); + + BigDecimal underWritten = cashFlows.stream().map(ProjectBudgetPlanDetail::getUnderwrittenPlan).reduce(BigDecimal.ZERO, BigDecimal::add); + cashFlowStatisticsBean.setFinancingCapitalInflow(underWritten); + + BigDecimal repaymentPlan = cashFlows.stream().map(ProjectBudgetPlanDetail::getRepaymentPlan).reduce(BigDecimal.ZERO, BigDecimal::add); + cashFlowStatisticsBean.setFinancingCapitalOutflow(repaymentPlan); + + cashFlowStatisticsBean.setNetCashFlow(saleIncome.add(earnestMoneyIncome).subtract(cashFlowStatisticsBean.getEarnestMoneyCost())); + cashFlowStatisticsBean.setFinancingCapitalCashflow(underWritten.subtract(repaymentPlan)); + cashFlowStatisticsBean.setNetIncreaseMonetaryFunds(cashFlowStatisticsBean.getNetCashFlow().add(cashFlowStatisticsBean.getFinancingCapitalCashflow())); + + list.add(cashFlowStatisticsBean); + + List projectTime = projectSettleCashFlowRepository.getProjectTime(); + List all = projectSettleCashFlowRepository.findAll(); + + CashFlowStatisticsBean cashFlowStatisticsAll = new CashFlowStatisticsBean(); + cashFlowStatisticsAll.setTitle("实际累计"); + + BigDecimal saleIncomeCashAll = all.stream().filter(d -> d.getType() == ProjectSettleCashFlow.SALE_INCOME_CASH).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal taxReturnAll = all.stream().filter(d -> d.getType() == ProjectSettleCashFlow.TAX_RETURN).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal earnestMoneyIncomeTimeAll = all.stream().filter(d -> d.getType() == ProjectSettleCashFlow.EARNEST_MONEY_INCOME).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal purchaseCostAll = all.stream().filter(d -> d.getType() == ProjectSettleCashFlow.PURCHASE_COST).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal taxCostAll = all.stream().filter(d -> d.getType() == ProjectSettleCashFlow.TAX_COST).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal earnestMoneyCostTimeAll = all.stream().filter(d -> d.getType() == ProjectSettleCashFlow.EARNEST_MONEY_COST).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal netCashFlowAll = all.stream().filter(d -> d.getType() == ProjectSettleCashFlow.NET_CASH_FLOW).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal cashInflowFromInvestingActivitiesAll = all.stream().filter(d -> d.getType() == ProjectSettleCashFlow.CASH_INFLOW_FROM_INVESTING_ACTIVITIES).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal cashOutflowFromInvestingActivitiesAll = all.stream().filter(d -> d.getType() == ProjectSettleCashFlow.CASH_OUTFLOW_FROM_INVESTING_ACTIVITIES).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal netCashFromInvestingActivitiesAll = all.stream().filter(d -> d.getType() == ProjectSettleCashFlow.NET_CASH_FROM_INVESTING_ACTIVITIES).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal financingCapitalInflowAll = all.stream().filter(d -> d.getType() == ProjectSettleCashFlow.FINANCING_CAPITAL_INFLOW).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal financingCapitalOutflowAll = all.stream().filter(d -> d.getType() == ProjectSettleCashFlow.FINANCING_CAPITAL_OUTFLOW).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal financingCapitalCashFlowAll = all.stream().filter(d -> d.getType() == ProjectSettleCashFlow.FINANCING_CAPITAL_CASHFLOW).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal netIncreaseMonetaryFundsAll = all.stream().filter(d -> d.getType() == ProjectSettleCashFlow.NET_INCREASE_MONETARY_FUNDS).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + + cashFlowStatisticsAll.setSaleIncomeCash(saleIncomeCashAll); + cashFlowStatisticsAll.setTaxReturn(taxReturnAll); + cashFlowStatisticsAll.setEarnestMoneyIncome(earnestMoneyIncomeTimeAll); + cashFlowStatisticsAll.setPurchaseCost(purchaseCostAll); + cashFlowStatisticsAll.setTaxCost(taxCostAll); + cashFlowStatisticsAll.setEarnestMoneyCost(earnestMoneyCostTimeAll); + cashFlowStatisticsAll.setNetCashFlow(netCashFlowAll); + cashFlowStatisticsAll.setCashInflowFromInvestingActivities(cashInflowFromInvestingActivitiesAll); + cashFlowStatisticsAll.setCashOutflowFromInvestingActivities(cashOutflowFromInvestingActivitiesAll); + cashFlowStatisticsAll.setNetCashFromInvestingActivities(netCashFromInvestingActivitiesAll); + cashFlowStatisticsAll.setFinancingCapitalInflow(financingCapitalInflowAll); + cashFlowStatisticsAll.setFinancingCapitalOutflow(financingCapitalOutflowAll); + cashFlowStatisticsAll.setFinancingCapitalCashflow(financingCapitalCashFlowAll); + cashFlowStatisticsAll.setNetIncreaseMonetaryFunds(netIncreaseMonetaryFundsAll); + + list.add(cashFlowStatisticsAll); + + if (CollectionUtil.isNotEmpty(projectTime)) { + for (String time : projectTime) { + CashFlowStatisticsBean cashFlowStatistics = new CashFlowStatisticsBean(); + cashFlowStatistics.setTitle(time); + + BigDecimal saleIncomeCash = all.stream().filter(d -> d.getTime().equals(time) && d.getType() == ProjectSettleCashFlow.SALE_INCOME_CASH).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal taxReturn = all.stream().filter(d -> d.getTime().equals(time) && d.getType() == ProjectSettleCashFlow.TAX_RETURN).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal earnestMoneyIncomeTime = all.stream().filter(d -> d.getTime().equals(time) && d.getType() == ProjectSettleCashFlow.EARNEST_MONEY_INCOME).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal purchaseCost = all.stream().filter(d -> d.getTime().equals(time) && d.getType() == ProjectSettleCashFlow.PURCHASE_COST).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal taxCost = all.stream().filter(d -> d.getTime().equals(time) && d.getType() == ProjectSettleCashFlow.TAX_COST).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal earnestMoneyCostTime = all.stream().filter(d -> d.getTime().equals(time) && d.getType() == ProjectSettleCashFlow.EARNEST_MONEY_COST).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal netCashFlow = all.stream().filter(d -> d.getTime().equals(time) && d.getType() == ProjectSettleCashFlow.NET_CASH_FLOW).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal cashInflowFromInvestingActivities = all.stream().filter(d -> d.getTime().equals(time) && d.getType() == ProjectSettleCashFlow.CASH_INFLOW_FROM_INVESTING_ACTIVITIES).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal cashOutflowFromInvestingActivities = all.stream().filter(d -> d.getTime().equals(time) && d.getType() == ProjectSettleCashFlow.CASH_OUTFLOW_FROM_INVESTING_ACTIVITIES).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal netCashFromInvestingActivities = all.stream().filter(d -> d.getTime().equals(time) && d.getType() == ProjectSettleCashFlow.NET_CASH_FROM_INVESTING_ACTIVITIES).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal financingCapitalInflow = all.stream().filter(d -> d.getTime().equals(time) && d.getType() == ProjectSettleCashFlow.FINANCING_CAPITAL_INFLOW).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal financingCapitalOutflow = all.stream().filter(d -> d.getTime().equals(time) && d.getType() == ProjectSettleCashFlow.FINANCING_CAPITAL_OUTFLOW).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal financingCapitalCashFlow = all.stream().filter(d -> d.getTime().equals(time) && d.getType() == ProjectSettleCashFlow.FINANCING_CAPITAL_CASHFLOW).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal netIncreaseMonetaryFunds = all.stream().filter(d -> d.getTime().equals(time) && d.getType() == ProjectSettleCashFlow.NET_INCREASE_MONETARY_FUNDS).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + + cashFlowStatistics.setSaleIncomeCash(saleIncomeCash); + cashFlowStatistics.setTaxReturn(taxReturn); + cashFlowStatistics.setEarnestMoneyIncome(earnestMoneyIncomeTime); + cashFlowStatistics.setPurchaseCost(purchaseCost); + cashFlowStatistics.setTaxCost(taxCost); + cashFlowStatistics.setEarnestMoneyCost(earnestMoneyCostTime); + cashFlowStatistics.setNetCashFlow(netCashFlow); + cashFlowStatistics.setCashInflowFromInvestingActivities(cashInflowFromInvestingActivities); + cashFlowStatistics.setCashOutflowFromInvestingActivities(cashOutflowFromInvestingActivities); + cashFlowStatistics.setNetCashFromInvestingActivities(netCashFromInvestingActivities); + cashFlowStatistics.setFinancingCapitalInflow(financingCapitalInflow); + cashFlowStatistics.setFinancingCapitalOutflow(financingCapitalOutflow); + cashFlowStatistics.setFinancingCapitalCashflow(financingCapitalCashFlow); + cashFlowStatistics.setNetIncreaseMonetaryFunds(netIncreaseMonetaryFunds); + + list.add(cashFlowStatistics); + } + } + return list; } } diff --git a/src/main/resources/static/assets/js/project_common.js b/src/main/resources/static/assets/js/project_common.js index a8572f9..e6bb101 100644 --- a/src/main/resources/static/assets/js/project_common.js +++ b/src/main/resources/static/assets/js/project_common.js @@ -76,7 +76,25 @@ function postAjax(url, data, callback) { async: false, success: function (d) { console.log(d); - callback(data, d); + if(callback) { + callback(data, d); + } + } + }); +} +function getAjax(url, params, callback) { + $.ajax({ + url: url, + data: params, + type: "get", + dataType: "json", + /*contentType:"application/json",*/ + async: false, + success: function (d) { + console.log(d); + if(callback) { + callback(params, d); + } } }); } diff --git a/src/main/resources/templates/admin/act_his_task_list.ftl b/src/main/resources/templates/admin/act_his_task_list.ftl index d723d59..5a7af7b 100644 --- a/src/main/resources/templates/admin/act_his_task_list.ftl +++ b/src/main/resources/templates/admin/act_his_task_list.ftl @@ -32,6 +32,7 @@ 结束时间 用时 意见 + 操作 @@ -47,6 +48,25 @@ ${list.duration!} ${list.comments!} + + + <#if !list.endTime??> + + + + + + diff --git a/src/main/resources/templates/admin/act_proc_def_list.ftl b/src/main/resources/templates/admin/act_proc_def_list.ftl index 38a084b..45c85aa 100644 --- a/src/main/resources/templates/admin/act_proc_def_list.ftl +++ b/src/main/resources/templates/admin/act_proc_def_list.ftl @@ -254,7 +254,6 @@ var startProcIns = function (procDefKey) { var params = { - projectId: 1, projectType: 3 }; $.ajax({ diff --git a/src/main/resources/templates/admin/month_statistics.ftl b/src/main/resources/templates/admin/month_statistics.ftl index af19732..3cd292e 100644 --- a/src/main/resources/templates/admin/month_statistics.ftl +++ b/src/main/resources/templates/admin/month_statistics.ftl @@ -64,7 +64,7 @@
- + @@ -81,6 +81,30 @@ + + + + <#if (cashFlowList)?exists && (cashFlowList?size>0)> + <#list cashFlowList as list> + + + + + + + + + + + + + + + + + + +
/ 营业收入项目净利润 项目净利润率
${list.title!}${list.saleIncomeCash!}${list.taxReturn!}${list.earnestMoneyIncome!}${list.purchaseCost!}${list.taxCost!}${list.earnestMoneyCost!}${list.netCashFlow!}${list.cashInflowFromInvestingActivities!}${list.cashOutflowFromInvestingActivities!}${list.netCashFromInvestingActivities!}${list.financingCapitalInflow!}${list.financingCapitalOutflow!}${list.financingCapitalCashflow!}${list.netIncreaseMonetaryFunds!}
@@ -89,7 +113,7 @@
- + @@ -107,6 +131,29 @@ + + + <#if (cashFlowList)?exists && (cashFlowList?size>0)> + <#list cashFlowList as list> + + + + + + + + + + + + + + + + + + +
/ 销售商品、提供劳务收到的现金筹资活动产生的现金流量净额 货币资金净增加额
${list.title!}${list.saleIncomeCash!}${list.taxReturn!}${list.earnestMoneyIncome!}${list.purchaseCost!}${list.taxCost!}${list.earnestMoneyCost!}${list.netCashFlow!}${list.cashInflowFromInvestingActivities!}${list.cashOutflowFromInvestingActivities!}${list.netCashFromInvestingActivities!}${list.financingCapitalInflow!}${list.financingCapitalOutflow!}${list.financingCapitalCashflow!}${list.netIncreaseMonetaryFunds!}
diff --git a/src/main/resources/templates/admin/project_list.ftl b/src/main/resources/templates/admin/project_list.ftl index 51c8c44..70565b2 100644 --- a/src/main/resources/templates/admin/project_list.ftl +++ b/src/main/resources/templates/admin/project_list.ftl @@ -1,7 +1,20 @@ <#assign base=request.contextPath /> <#import "../common/defaultLayout.ftl" as defaultLayout> + <@defaultLayout.layout> + +
@@ -199,6 +212,10 @@
+ <#--<@shiro.hasPermission name="PROJECT_EDIT">--> <#--概算状态 并且概算审批状态为草稿和不通过--> <#if list.status==1 && (list.approveStatusEstimate==0 || list.approveStatusEstimate==3)> @@ -304,12 +321,33 @@
+ + + +
+
+
请选择项目可见性
+
+ 请勾选能够看到该项目的人员或角色 +
    +
    + +
    +
    +

    + + + + diff --git a/src/main/resources/templates/common/common_pager.ftl b/src/main/resources/templates/common/common_pager.ftl index 112fe86..58da72b 100644 --- a/src/main/resources/templates/common/common_pager.ftl +++ b/src/main/resources/templates/common/common_pager.ftl @@ -3,7 +3,7 @@
      - +<#---->