Browse Source

大更新

jihs 4 years ago
parent
commit
c7408af7f7
19 changed files with 433 additions and 7 deletions
  1. 3 0
      src/main/java/org/jeecg/common/dto/basedata/ArchivesBusinessListReqDTO.java
  2. 29 0
      src/main/java/org/jeecg/common/dto/basedata/ArchivesBusinessListRespDTO.java
  3. 2 0
      src/main/java/org/jeecg/common/dto/basedata/ArchivesCollectionLineReqDTO.java
  4. 2 1
      src/main/java/org/jeecg/common/dto/expense/ExpenseSlipProjectListRespDTO.java
  5. 1 0
      src/main/java/org/jeecg/common/dto/invoice/PurchaseDetailListRespDTO.java
  6. 1 0
      src/main/java/org/jeecg/common/dto/payment/SlipContentRespDTO.java
  7. 1 0
      src/main/java/org/jeecg/common/dto/prowork/ProWorkLogicContentListRespDTO.java
  8. 1 0
      src/main/java/org/jeecg/common/dto/prowork/ProWorkUpdateFileRespDTO.java
  9. 17 0
      src/main/java/org/jeecg/common/dto/report/CostAccountingReqDTO.java
  10. 64 0
      src/main/java/org/jeecg/common/dto/report/CostAccountingRespDTO.java
  11. 24 0
      src/main/java/org/jeecg/common/dto/report/ProStatisticsReqDTO.java
  12. 38 0
      src/main/java/org/jeecg/common/dto/report/ProStatisticsRespDTO.java
  13. 29 3
      src/main/java/org/jeecg/modules/archives/controller/ProjectManageArchivesController.java
  14. 0 3
      src/main/java/org/jeecg/modules/archives/entity/ProjectManageBusinessOther.java
  15. 90 0
      src/main/java/org/jeecg/modules/report/controller/ProReportController.java
  16. 18 0
      src/main/java/org/jeecg/modules/report/mapper/ProReportMapper.java
  17. 44 0
      src/main/java/org/jeecg/modules/report/mapper/xml/ProReportMapper.xml
  18. 20 0
      src/main/java/org/jeecg/modules/report/service/ProReportService.java
  19. 49 0
      src/main/java/org/jeecg/modules/report/service/impl/ProReportServiceImpl.java

+ 3 - 0
src/main/java/org/jeecg/common/dto/basedata/ArchivesBusinessListReqDTO.java

@@ -9,11 +9,14 @@ import lombok.Data;
 public class ArchivesBusinessListReqDTO {
     @ApiModelProperty("项目档案id")
     private String id;
+    @ApiModelProperty("项目档案条线id")
+    private String planId;
     @ApiModelProperty("计划类型 1.收款计划 2.回款情况 3.付款计划 4.付款情况")
     private String planType;
     @ApiModelProperty("组织")
     private String pkOrg;
 
+
     public ArchivesBusinessListReqDTO() {
     }
 }

+ 29 - 0
src/main/java/org/jeecg/common/dto/basedata/ArchivesBusinessListRespDTO.java

@@ -0,0 +1,29 @@
+package org.jeecg.common.dto.basedata;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import java.math.BigDecimal;
+
+@ApiModel("项目档案—商务收款计划请求参数")
+@Data
+public class ArchivesBusinessListRespDTO {
+    @ApiModelProperty("id")
+    private String id;
+    @ApiModelProperty("里程碑id")
+    private String mileId;
+    @ApiModelProperty("里程碑名称")
+    private String mileName;
+    @ApiModelProperty("金额")
+    private BigDecimal price;
+
+    public ArchivesBusinessListRespDTO() {
+    }
+
+    public ArchivesBusinessListRespDTO(String id, String mileId, String mileName, BigDecimal price) {
+        this.id = id;
+        this.mileId = mileId;
+        this.mileName = mileName;
+        this.price = price;
+    }
+}

+ 2 - 0
src/main/java/org/jeecg/common/dto/basedata/ArchivesCollectionLineReqDTO.java

@@ -1,12 +1,14 @@
 package org.jeecg.common.dto.basedata;
 
 import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 
 @ApiModel("收付款条款请求参数")
 @Data
 public class ArchivesCollectionLineReqDTO {
+    @ApiModelProperty("id")
     private String id;
 
     public ArchivesCollectionLineReqDTO() {

+ 2 - 1
src/main/java/org/jeecg/common/dto/expense/ExpenseSlipProjectListRespDTO.java

@@ -24,7 +24,7 @@ public class ExpenseSlipProjectListRespDTO {
     @ApiModelProperty("金额")
     private BigDecimal price;
     @ApiModelProperty("排序")
-    private BigDecimal sort;
+    private Integer sort;
 
     public ExpenseSlipProjectListRespDTO() {
     }
@@ -35,5 +35,6 @@ public class ExpenseSlipProjectListRespDTO {
         this.costId = project.getCostId();
         this.costName = project.getCostName();
         this.price = project.getPrice();
+        this.sort = project.getSort();
     }
 }

+ 1 - 0
src/main/java/org/jeecg/common/dto/invoice/PurchaseDetailListRespDTO.java

@@ -51,5 +51,6 @@ public class PurchaseDetailListRespDTO {
         this.uncoPrice = detail.getUncoPrice();
         this.coPrice = detail.getCoPrice();
         this.pkOrg = detail.getPkOrg();
+        this.sort = detail.getSort();
     }
 }

+ 1 - 0
src/main/java/org/jeecg/common/dto/payment/SlipContentRespDTO.java

@@ -54,5 +54,6 @@ public class SlipContentRespDTO {
         this.invoice = content.getInvoice();
         this.pkOrg = content.getPkOrg();
         this.invoiceId = content.getInvoiceId();
+        this.sort = content.getSort();
     }
 }

+ 1 - 0
src/main/java/org/jeecg/common/dto/prowork/ProWorkLogicContentListRespDTO.java

@@ -40,5 +40,6 @@ public class ProWorkLogicContentListRespDTO {
         this.proArchivesMilestone = proWorkLogicContent.getProArchivesMilestone();
         this.content = proWorkLogicContent.getContent();
         this.duration = proWorkLogicContent.getDuration();
+        this.sort = proWorkLogicContent.getSort();
     }
 }

+ 1 - 0
src/main/java/org/jeecg/common/dto/prowork/ProWorkUpdateFileRespDTO.java

@@ -28,5 +28,6 @@ public class ProWorkUpdateFileRespDTO {
         this.workMileId = updateFilel.getWorkMileId();
         this.fileName = updateFilel.getFileName();
         this.fileUrl = updateFilel.getFileUrl();
+        this.sort = updateFilel.getSort();
     }
 }

+ 17 - 0
src/main/java/org/jeecg/common/dto/report/CostAccountingReqDTO.java

@@ -0,0 +1,17 @@
+package org.jeecg.common.dto.report;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@ApiModel("成本核算请求参数")
+@Data
+public class CostAccountingReqDTO {
+    @ApiModelProperty("id")
+    private String id;
+    @ApiModelProperty("组织")
+    private String pkOrg;
+
+    public CostAccountingReqDTO() {
+    }
+}

+ 64 - 0
src/main/java/org/jeecg/common/dto/report/CostAccountingRespDTO.java

@@ -0,0 +1,64 @@
+package org.jeecg.common.dto.report;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.math.BigDecimal;
+
+/**
+ * @Author jihaosen
+ * @date 2021/3/10
+ */
+@ApiModel("成本核算响应参数")
+@Data
+public class CostAccountingRespDTO {
+    @ApiModelProperty("id")
+    private String id;
+    @ApiModelProperty("项目编码")
+    private String proCode;
+    @ApiModelProperty("项目名称")
+    private String proName;
+    @ApiModelProperty("收入-产品")
+    private BigDecimal proIncome;
+    @ApiModelProperty("收入-实施")
+    private BigDecimal imIncome;
+    @ApiModelProperty("收入-开发")
+    private BigDecimal deIncome;
+    @ApiModelProperty("收入-服务")
+    private BigDecimal seIncome;
+    @ApiModelProperty("收入库-其他")
+    private BigDecimal otherIncome;
+    @ApiModelProperty("付款-产品")
+    private BigDecimal proPayment;
+    @ApiModelProperty("付款-实施")
+    private BigDecimal imPayment;
+    @ApiModelProperty("付款-开发")
+    private BigDecimal dePayment;
+    @ApiModelProperty("付款-服务")
+    private BigDecimal sePayment;
+    @ApiModelProperty("付款-其他")
+    private BigDecimal otherPayment;
+    @ApiModelProperty("应税合计")
+    private BigDecimal totalTax;
+    @ApiModelProperty("税后合计")
+    private BigDecimal totalAfterTax;
+    @ApiModelProperty("预留")
+    private BigDecimal reserve;
+    @ApiModelProperty("工资")
+    private BigDecimal salary;
+    @ApiModelProperty("奖金")
+    private BigDecimal award;
+    @ApiModelProperty("费用")
+    private BigDecimal cost;
+    @ApiModelProperty("销售提成")
+    private BigDecimal comSales;
+    @ApiModelProperty("公摊费用")
+    private BigDecimal exShared;
+    @ApiModelProperty("毛利")
+    private BigDecimal groProfit;
+
+    public CostAccountingRespDTO() {
+    }
+}

+ 24 - 0
src/main/java/org/jeecg/common/dto/report/ProStatisticsReqDTO.java

@@ -0,0 +1,24 @@
+package org.jeecg.common.dto.report;
+
+
+ /**
+   * @Author jihaosen
+   * @date 2021/3/11
+   */
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+@ApiModel("项目情况统计请求参数")
+@Data
+public class ProStatisticsReqDTO {
+    private String id;
+    private String pkOrg;
+
+    public ProStatisticsReqDTO() {
+    }
+
+    public ProStatisticsReqDTO(String id, String pkOrg) {
+        this.id = id;
+        this.pkOrg = pkOrg;
+    }
+}

+ 38 - 0
src/main/java/org/jeecg/common/dto/report/ProStatisticsRespDTO.java

@@ -0,0 +1,38 @@
+package org.jeecg.common.dto.report;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+@ApiModel("项目档案计划列表查询")
+@Data
+public class ProStatisticsRespDTO {
+    private String id;
+//    项目编码	项目名称	项目组成员	收付款条线编码	收付款条线名称	里程碑计划开始时间	里程碑实际开始时间	里程碑计划结束时间	里程碑实际结束时间	里程碑计划工时	里程碑实际工时	里程碑计划收款	里程碑开票金额	里程碑实际收款	里程碑计划付款	里程碑收票	里程碑实际付款
+    @ApiModelProperty("项目名称")
+    private String proName;
+    @ApiModelProperty("项目编码")
+    private String proCode;
+    @ApiModelProperty("项目组成员")
+    private String proMember;
+    @ApiModelProperty("收付款条线编码")
+    private String coArchivesCode;
+    @ApiModelProperty("收付款条线名称")
+    private String coArchivesName;
+    @ApiModelProperty("里程碑计划开始时间")
+    private Date mileStartDate;
+    @ApiModelProperty("里程碑计划实际开始时间")
+    private Date mileRealStartDate;
+    @ApiModelProperty("里程碑计划结束时间")
+    private Date mileEndDate;
+    @ApiModelProperty("里程碑实际计划结束时间")
+    private Date mileRealEndtDate;
+    @ApiModelProperty("里程碑计划工时")
+    private Double mileDduration;
+    @ApiModelProperty("里程碑计划实际工时")
+    private Double mileRealDduration;
+    //里程碑计划收款	里程碑开票金额	里程碑实际收款	里程碑计划付款	里程碑收票	里程碑实际付款
+
+}

+ 29 - 3
src/main/java/org/jeecg/modules/archives/controller/ProjectManageArchivesController.java

@@ -17,6 +17,7 @@ import org.jeecg.common.dto.archives.ProArchivesAddRespDTO;
 import org.jeecg.common.dto.archives.ProPlanListReqDTO;
 import org.jeecg.common.dto.archives.ProPlanListRespDTO;
 import org.jeecg.common.dto.basedata.ArchivesBusinessListReqDTO;
+import org.jeecg.common.dto.basedata.ArchivesBusinessListRespDTO;
 import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.modules.archives.entity.ProjectManageArchives;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -343,8 +344,8 @@ public class ProjectManageArchivesController {
 			@ApiImplicitParam(name="pkOrg", value="组织",required=true, dataType="String")
 	})
 	@GetMapping(value = "/getBusinessList")
-	public Result<List<ProjectManageArchivesAndBusiness>> getBusinessList(@Valid ArchivesBusinessListReqDTO reqDTO, BindingResult bindingResult) {
-		Result<List<ProjectManageArchivesAndBusiness>> result = new Result<List<ProjectManageArchivesAndBusiness>>();
+	public Result<List<ArchivesBusinessListRespDTO>> getBusinessList(@Valid ArchivesBusinessListReqDTO reqDTO, BindingResult bindingResult) {
+		Result<List<ArchivesBusinessListRespDTO>> result = new Result<List<ArchivesBusinessListRespDTO>>();
 		try {
 			StringBuilder sb = new StringBuilder();
 			if(bindingResult.hasErrors()) {
@@ -361,10 +362,35 @@ public class ProjectManageArchivesController {
 			}
 			if(StringUtils.isNotBlank(reqDTO.getPkOrg())){
 				queryWrapper.eq("pkOrg", reqDTO.getPkOrg());
+			}
+			if(StringUtils.isNotBlank(reqDTO.getPlanId())){
+				queryWrapper.eq("plan_id", reqDTO.getPlanId());
 			}
 			    queryWrapper.orderByAsc("sort");
 			    List<ProjectManageArchivesAndBusiness> list = projectManageArchivesAndBusinessService.list(queryWrapper);
-				result.setResult(list);
+			    List<ArchivesBusinessListRespDTO> respDTOS = Lists.newArrayList();
+                if(!CollectionUtils.isEmpty(list)){
+					ProjectManageArchivesAndBusiness business = list.get(0);
+					if(StringUtils.isNotBlank(business.getMileId1())){
+						respDTOS.add(new ArchivesBusinessListRespDTO(business.getId(), business.getMileId1(), business.getMilestone1(), business.getPrice1()));
+					}
+					if(StringUtils.isNotBlank(business.getMileId2())){
+						respDTOS.add(new ArchivesBusinessListRespDTO(business.getId(), business.getMileId2(), business.getMilestone2(), business.getPrice2()));
+					}
+					if(StringUtils.isNotBlank(business.getMileId3())){
+						respDTOS.add(new ArchivesBusinessListRespDTO(business.getId(), business.getMileId3(), business.getMilestone3(), business.getPrice3()));
+					}
+					if(StringUtils.isNotBlank(business.getMileId4())){
+						respDTOS.add(new ArchivesBusinessListRespDTO(business.getId(), business.getMileId4(), business.getMilestone4(), business.getPrice4()));
+
+					}
+					if(StringUtils.isNotBlank(business.getMileId5())){
+						respDTOS.add(new ArchivesBusinessListRespDTO(business.getId(), business.getMileId5(), business.getMilestone5(), business.getPrice5()));
+					}
+				}
+
+
+				result.setResult(respDTOS);
 				result.setSuccess(true);
 		}
 		catch (Exception e) {

+ 0 - 3
src/main/java/org/jeecg/modules/archives/entity/ProjectManageBusinessOther.java

@@ -72,9 +72,6 @@ public class ProjectManageBusinessOther implements Serializable {
 	 public ProjectManageBusinessOther() {
 	 }
 
-	 @ApiModelProperty("排序")
-	 private Integer sort;
-
 	 /**
 	  * @desc 添加用
 	  */

+ 90 - 0
src/main/java/org/jeecg/modules/report/controller/ProReportController.java

@@ -0,0 +1,90 @@
+package org.jeecg.modules.report.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.dto.report.CostAccountingReqDTO;
+import org.jeecg.common.dto.report.CostAccountingRespDTO;
+import org.jeecg.modules.report.service.ProReportService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.io.FileSystemResource;
+import org.springframework.core.io.Resource;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.List;
+
+@Api("报表")
+@RestController
+@RequestMapping("/report")
+@Slf4j
+public class ProReportController {
+    @Autowired
+    private ProReportService proReportService;
+
+
+    @RequestMapping("/export")
+    public void exportExcel() throws IOException {
+        Resource resource=new FileSystemResource("C:/Users/zs/Desktop/翠颠项目/项目/04项目管理软件—报表.xlsx");
+        String fileName = resource.getFilename();
+        String suffix = fileName.substring(fileName.lastIndexOf(".") + 1);
+        InputStream ins = resource.getInputStream();
+        Workbook wb = null;
+        if(suffix.equals("xlsx")) {
+            wb = new XSSFWorkbook(ins);
+        } else {
+            wb = new HSSFWorkbook(ins);
+        }
+
+        File file = new File("D:/", fileName);
+        wb.write(new FileOutputStream(file));
+    }
+
+    @ApiModelProperty("获取成本核算数据")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name="id", value="id",required=true, dataType="String"),
+            @ApiImplicitParam(name="pkOrg", value="组织",required=true, dataType="String")
+    })
+    @GetMapping("/getCostAccountingData")
+    public Result<List<CostAccountingRespDTO> > getCostAccountingData(CostAccountingReqDTO reqDTO) {
+        Result<List<CostAccountingRespDTO>> result = new Result<>();
+        try {
+            List<CostAccountingRespDTO> respDTOS = proReportService.getCostAccountingData(reqDTO);
+            result.setResult(respDTOS);
+            result.setSuccess(true);
+        }catch (Exception e){
+          log.info(e.getMessage());
+          e.printStackTrace();
+          result.error500("警告:" + e.getMessage());
+        }
+        return result;
+    }
+
+
+
+    @ApiModelProperty("项目情况统计表")
+    @GetMapping("/getProStatistics")
+    public Result<List<CostAccountingRespDTO> > getProStatistics(CostAccountingReqDTO reqDTO) {
+        Result<List<CostAccountingRespDTO>> result = new Result<>();
+        try {
+            List<CostAccountingRespDTO> respDTOS = proReportService.getProStatistics(reqDTO);
+            result.setResult(respDTOS);
+            result.setSuccess(true);
+        }catch (Exception e){
+            log.info(e.getMessage());
+            e.printStackTrace();
+            result.error500("警告:" + e.getMessage());
+        }
+        return result;
+    }
+}

+ 18 - 0
src/main/java/org/jeecg/modules/report/mapper/ProReportMapper.java

@@ -0,0 +1,18 @@
+package org.jeecg.modules.report.mapper;
+
+import org.apache.ibatis.annotations.Mapper;
+import org.jeecg.common.dto.report.CostAccountingReqDTO;
+import org.jeecg.common.dto.report.CostAccountingRespDTO;
+import java.util.List;
+
+ /**
+   * @Author jihaosen
+   * @date 2021/3/11
+   */
+@Mapper
+public interface ProReportMapper {
+    /**
+     * @desc 获取成本核算数据
+     */
+    List<CostAccountingRespDTO> getCostAccountingData(CostAccountingReqDTO reqDTO);
+}

+ 44 - 0
src/main/java/org/jeecg/modules/report/mapper/xml/ProReportMapper.xml

@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.report.mapper.ProReportMapper">
+    <resultMap id="cstAccountingMap" type="org.jeecg.common.dto.report.CostAccountingRespDTO">
+        <id column="id" property="id"></id>
+        <result column="proIncome" property="proIncome"></result>
+        <result column="imIncome" property="imIncome"></result>
+        <result column="deIncome" property="deIncome"></result>
+        <result column="seIncome" property="seIncome"></result>
+        <result column="otherIncome" property="otherIncome"></result>
+        <result column="proPayment" property="proPayment"></result>
+        <result column="imPayment" property="imPayment"></result>
+        <result column="dePayment" property="dePayment"></result>
+        <result column="sePayment" property="sePayment"></result>
+        <result column="otherPayment" property="otherPayment"></result>
+    </resultMap>
+    <!--获取成本核算数据-->
+    <select id="getCostAccountingData" resultMap="cstAccountingMap">
+      SELECT
+            a.id,
+            a.pro_code,
+            a.pro_name,
+            t.pro_archives_id,
+            MAX( IF(t.plan_type = '2' , CASE t.plan_id WHEN '1' THEN (t.price1 + t.price2 + t.price3 + t.price4 + t.price5) END , 0 ))as proIncome,
+            MAX( IF(t.plan_type = '2' ,	CASE t.plan_id WHEN '2' THEN (t.price1 + t.price2 + t.price3 + t.price4 + t.price5) END , 0 ))as imIncome,
+            MAX( IF(t.plan_type = '2' , CASE t.plan_id WHEN '3' THEN (t.price1 + t.price2 + t.price3 + t.price4 + t.price5) END , 0 ))as deIncome,
+            MAX( IF(t.plan_type = '2' , CASE t.plan_id WHEN '4' THEN (t.price1 + t.price2 + t.price3 + t.price4 + t.price5) END , 0 ))as seIncome,
+            MAX( IF(t.plan_type = '2' , CASE t.plan_id when '5' THEN (t.price1 + t.price2 + t.price3 + t.price4 + t.price5) END , 0 ))as otherIncome,
+            MAX( IF(t.plan_type = '4' , CASE t.plan_id WHEN '1' THEN (t.price1 + t.price2 + t.price3 + t.price4 + t.price5) END , 0 ))as proPayment,
+            MAX( IF(t.plan_type = '4' , CASE t.plan_id WHEN '2' THEN (t.price1 + t.price2 + t.price3 + t.price4 + t.price5) END , 0 ))as imPayment,
+            MAX( IF(t.plan_type = '4' , CASE t.plan_id WHEN '3' THEN (t.price1 + t.price2 + t.price3 + t.price4 + t.price5) END , 0 ))as dePayment,
+            MAX( IF(t.plan_type = '4' , CASE t.plan_id WHEN '4' THEN (t.price1 + t.price2 + t.price3 + t.price4 + t.price5) END , 0 ))as sePayment,
+            MAX( IF(t.plan_type = '4' , CASE t.plan_id when '5' THEN (t.price1 + t.price2 + t.price3 + t.price4 + t.price5) END , 0 ))as otherPayment
+        FROM project_manage_archives_and_business t
+        JOIN project_manage_archives a
+        ON   t.pro_archives_id = a.id
+        WHERE t.del_flag = '0' AND a.del_flag = '0'  AND plan_type in ('2', '4')
+        <if test="id != null and id != ''">
+            AND pro_archives_id = #{id}
+        </if>
+        GROUP By pro_archives_id
+    </select>
+</mapper>

+ 20 - 0
src/main/java/org/jeecg/modules/report/service/ProReportService.java

@@ -0,0 +1,20 @@
+package org.jeecg.modules.report.service;
+
+import org.jeecg.common.dto.report.CostAccountingReqDTO;
+import org.jeecg.common.dto.report.CostAccountingRespDTO;
+import java.util.List;
+
+/**
+   * @Author jihaosen
+   * @date 2021/3/10
+   */
+public interface ProReportService {
+    /**
+     * @desc 获取成本核算数据
+     */
+    List<CostAccountingRespDTO> getCostAccountingData(CostAccountingReqDTO reqDTO);
+    /**
+     * @desc 项目情况统计表
+     */
+    List<CostAccountingRespDTO> getProStatistics(CostAccountingReqDTO reqDTO);
+}

+ 49 - 0
src/main/java/org/jeecg/modules/report/service/impl/ProReportServiceImpl.java

@@ -0,0 +1,49 @@
+package org.jeecg.modules.report.service.impl;
+
+import org.jeecg.common.dto.report.CostAccountingReqDTO;
+import org.jeecg.common.dto.report.CostAccountingRespDTO;
+import org.jeecg.modules.archives.service.ProjectManageArchivesService;
+import org.jeecg.modules.report.mapper.ProReportMapper;
+import org.jeecg.modules.report.service.ProReportService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import java.math.BigDecimal;
+import java.util.List;
+
+ /**
+   * @Author jihaosen
+   * @date 2021/3/11
+   */
+@Service
+public class ProReportServiceImpl implements ProReportService {
+    @Autowired
+    private ProjectManageArchivesService projectManageArchivesService;
+    @Autowired
+    private ProReportMapper proReportMapper;
+
+    /**
+     * @desc 获取成本核算数据
+     */
+    @Override
+    public List<CostAccountingRespDTO> getCostAccountingData(CostAccountingReqDTO reqDTO) {
+        //获取项目档案
+        List<CostAccountingRespDTO> respDTOS = proReportMapper.getCostAccountingData(reqDTO);
+        for(CostAccountingRespDTO respDTO : respDTOS){
+           BigDecimal totalTax = respDTO.getProIncome().add(respDTO.getImIncome()).add(respDTO.getSeIncome()).add(respDTO.getOtherIncome())
+                   .subtract(respDTO.getProPayment()).add(respDTO.getImPayment()).subtract(respDTO.getDePayment()).subtract(respDTO.getOtherPayment());
+            respDTO.setTotalTax(totalTax);
+
+        }
+        return respDTOS;
+    }
+
+     /**
+      * @desc 项目情况统计表
+      */
+     @Override
+     public List<CostAccountingRespDTO> getProStatistics(CostAccountingReqDTO reqDTO) {
+//         proReportMapper.getProStatistics(reqDTO)
+         return null;
+     }
+ }
+