jihs il y a 4 ans
Parent
commit
5f959d0359
24 fichiers modifiés avec 695 ajouts et 158 suppressions
  1. 0 2
      src/main/java/org/jeecg/common/dto/archives/ProArchivesAndBusinessAddReqDTO.java
  2. 0 1
      src/main/java/org/jeecg/common/dto/archives/ProPlanListRespDTO.java
  3. 0 1
      src/main/java/org/jeecg/common/dto/basedata/ArchivesMilestoneListRespDTO.java
  4. 3 1
      src/main/java/org/jeecg/common/dto/basedata/ArchivesPostReqDTO.java
  5. 1 2
      src/main/java/org/jeecg/common/dto/expense/ExpenseSlipRespDTO.java
  6. 74 52
      src/main/java/org/jeecg/common/dto/report/ProStatisticsRespDTO.java
  7. 193 0
      src/main/java/org/jeecg/common/dto/report/ProStatisticsThreeRespDTO.java
  8. 120 0
      src/main/java/org/jeecg/common/dto/report/ProStatisticsTwoRespDTO.java
  9. 0 3
      src/main/java/org/jeecg/modules/archives/controller/ProjectManageArchivesController.java
  10. 0 1
      src/main/java/org/jeecg/modules/archives/entity/ProjectManageArchivesAndBusiness.java
  11. 5 0
      src/main/java/org/jeecg/modules/archives/entity/ProjectManageBusinessOther.java
  12. 0 4
      src/main/java/org/jeecg/modules/archives/mapper/ProjectManageArchivesMapper.java
  13. 0 56
      src/main/java/org/jeecg/modules/archives/mapper/xml/ProjectManageArchivesMapper.xml
  14. 0 4
      src/main/java/org/jeecg/modules/archives/service/ProjectManageArchivesService.java
  15. 6 0
      src/main/java/org/jeecg/modules/archives/service/ProjectManageBusinessOtherService.java
  16. 1 7
      src/main/java/org/jeecg/modules/archives/service/impl/ProjectManageArchivesServiceImpl.java
  17. 16 0
      src/main/java/org/jeecg/modules/archives/service/impl/projectManageBusinessOtherServiceImpl.java
  18. 0 3
      src/main/java/org/jeecg/modules/basedata/controller/BaseArchivesProjectApprovalController.java
  19. 0 4
      src/main/java/org/jeecg/modules/basedata/controller/FdContractClassController.java
  20. 6 1
      src/main/java/org/jeecg/modules/basedata/service/IBaseArchivesCollectionLineService.java
  21. 16 0
      src/main/java/org/jeecg/modules/basedata/service/impl/BaseArchivesCollectionLineServiceImpl.java
  22. 36 0
      src/main/java/org/jeecg/modules/report/entity/MeberDepartEnum.java
  23. 218 12
      src/main/java/org/jeecg/modules/report/service/impl/ProReportServiceImpl.java
  24. 0 4
      src/main/java/org/jeecg/modules/system/controller/SysDataLogController.java

+ 0 - 2
src/main/java/org/jeecg/common/dto/archives/ProArchivesAndBusinessAddReqDTO.java

@@ -1,11 +1,9 @@
 package org.jeecg.common.dto.archives;
 
-import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import org.jeecg.modules.archives.entity.ProjectManageArchivesAndBusiness;
-
 import java.math.BigDecimal;
 
 /**

+ 0 - 1
src/main/java/org/jeecg/common/dto/archives/ProPlanListRespDTO.java

@@ -6,7 +6,6 @@ import lombok.Data;
 import lombok.Getter;
 import lombok.Setter;
 import org.jeecg.modules.archives.entity.ProjectManageBusinessOther;
-
 import java.util.List;
 
 /**

+ 0 - 1
src/main/java/org/jeecg/common/dto/basedata/ArchivesMilestoneListRespDTO.java

@@ -5,7 +5,6 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Getter;
 import lombok.Setter;
 import org.jeecg.modules.basedata.entity.BaseArchivesMilestone;
-
 import java.util.List;
 
 /**

+ 3 - 1
src/main/java/org/jeecg/common/dto/basedata/ArchivesPostReqDTO.java

@@ -1,12 +1,14 @@
 package org.jeecg.common.dto.basedata;
 
+import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+
 /**
  * @Author jihaosen
  * @date 2021/2/23
- * @desc 职务档案请求参数
  */
+@ApiModel("职务档案请求参数")
 @Data
 public class ArchivesPostReqDTO {
     @ApiModelProperty("id")

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

@@ -1,5 +1,4 @@
-package org.jeecg.common.dto.expense; /**
- */
+package org.jeecg.common.dto.expense;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;

+ 74 - 52
src/main/java/org/jeecg/common/dto/report/ProStatisticsRespDTO.java

@@ -3,10 +3,8 @@ package org.jeecg.common.dto.report;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
-import org.jeecg.modules.archives.entity.ProjectManageArchivesAndBusiness;
 
-import java.math.BigDecimal;
-import java.util.Date;
+import java.util.List;
 
 @ApiModel("项目档案计划列表查询")
 @Data
@@ -16,58 +14,82 @@ public class ProStatisticsRespDTO {
     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;
-    @ApiModelProperty("里程碑计划收款")
-    private BigDecimal mileCoPlan;
-    @ApiModelProperty("里程碑开票金额")
-    private BigDecimal mileInvoice;
-    @ApiModelProperty("里程碑实际收款")
-    private BigDecimal mileRealCollecion;
-    @ApiModelProperty("里程碑计划付款")
-    private BigDecimal milePayPlan;
-    @ApiModelProperty("里程碑收票金额")
-    private String mileTicket;
-    @ApiModelProperty("里程碑实际付款")
-    private BigDecimal mileRealPayment;
+    @ApiModelProperty("title")
+    private String title;
+    @ApiModelProperty("parentId")
+    private String parentId;
+
+    private Boolean isLeaf;
+
+
+    private List<ProStatisticsTwoRespDTO> children;
 
     public ProStatisticsRespDTO() {
     }
 
-    public ProStatisticsRespDTO(ProjectManageArchivesAndBusiness business) {
-        this.id = business.getId();
-        this.proName = business.getPlanName();
-        this.proCode =  proCode;
-        this.proMember = proMember;
-        this.coArchivesCode = coArchivesCode;
-        this.coArchivesName = business.getPlanName();
-        this.mileStartDate = mileStartDate;
-        this.mileRealStartDate = mileRealStartDate;
-        this.mileEndDate = mileEndDate;
-        this.mileRealEndtDate = mileRealEndtDate;
-        this.mileDduration = mileDduration;
-        this.mileRealDduration = mileRealDduration;
-        this.mileCoPlan = mileCoPlan;
-        this.mileInvoice = mileInvoice;
-        this.mileRealCollecion = mileRealCollecion;
-        this.milePayPlan = milePayPlan;
-        this.mileTicket = mileTicket;
-        this.mileRealPayment = mileRealPayment;
+    public ProStatisticsRespDTO(String id, String proName, String proCode, String title,
+        String parentId) {
+        this.id = id;
+        this.proName = proName;
+        this.proCode = proCode;
+        this.title = title;
+        this.parentId = parentId;
+        this.isLeaf = false;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getProName() {
+        return proName;
+    }
+
+    public void setProName(String proName) {
+        this.proName = proName;
+    }
+
+    public String getProCode() {
+        return proCode;
+    }
+
+    public void setProCode(String proCode) {
+        this.proCode = proCode;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getParentId() {
+        return parentId;
+    }
+
+    public void setParentId(String parentId) {
+        this.parentId = parentId;
+    }
+
+    public Boolean getIsLeaf() {
+        return isLeaf;
+    }
+
+    public void setIsLeaf(Boolean leaf) {
+        isLeaf = leaf;
+    }
+
+    public List<ProStatisticsTwoRespDTO> getChildren() {
+        return children;
+    }
+
+    public void setChildren(List<ProStatisticsTwoRespDTO> children) {
+        this.children = children;
     }
 }

+ 193 - 0
src/main/java/org/jeecg/common/dto/report/ProStatisticsThreeRespDTO.java

@@ -0,0 +1,193 @@
+package org.jeecg.common.dto.report;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.apache.commons.lang.StringUtils;
+import org.jeecg.modules.archives.entity.ProjectManageBusinessOther;
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+@ApiModel("项目情况统计表--里程碑响应数据")
+public class ProStatisticsThreeRespDTO {
+    @ApiModelProperty("里程碑名称")
+    private String milesName;
+    @ApiModelProperty("里程碑计划开始时间")
+    private Date mileStartDate;
+    @ApiModelProperty("里程碑计划实际开始时间")
+    private Date mileRealStartDate;
+    @ApiModelProperty("里程碑计划结束时间")
+    private Date mileEndDate;
+    @ApiModelProperty("里程碑实际计划结束时间")
+    private Date mileRealEndtDate;
+    @ApiModelProperty("里程碑计划工时")
+    private Double mileDuration;
+    @ApiModelProperty("里程碑计划实际工时")
+    private Double mileRealDuration;
+    @ApiModelProperty("里程碑计划收款")
+    private BigDecimal mileCoPlan;
+    @ApiModelProperty("里程碑开票金额")
+    private BigDecimal mileInvoice;
+    @ApiModelProperty("里程碑实际收款")
+    private BigDecimal mileRealCollecion;
+    @ApiModelProperty("里程碑计划付款")
+    private BigDecimal milePayPlan;
+    @ApiModelProperty("里程碑收票金额")
+    private String mileTicket;
+    @ApiModelProperty("里程碑实际付款")
+    private BigDecimal mileRealPayment;
+    @ApiModelProperty("title")
+    private String title;
+    @ApiModelProperty("parentId")
+    private String parentId;
+    @ApiModelProperty("isLeaf")
+    private Boolean isLeaf;
+    @JsonInclude(JsonInclude.Include.NON_NULL)
+    private List<ProStatisticsThreeRespDTO> childeren;
+
+    public ProStatisticsThreeRespDTO() {
+    }
+
+    public ProStatisticsThreeRespDTO(ProjectManageBusinessOther other, ProStatisticsTwoRespDTO twoRespDTO) {
+        this.milesName = other.getMuilesName();
+        this.mileStartDate = other.getStartDate();
+        this.mileEndDate = other.getEndDate();
+        this.mileDuration = StringUtils.isNotBlank(other.getPlanTime()) ? Double.parseDouble(other.getPlanTime()) : null;
+        this.mileRealDuration = StringUtils.isNotBlank(other.getRealTime()) ? Double.parseDouble(other.getRealTime()) : null;
+        this.mileCoPlan = twoRespDTO.getMilePrice();
+        this.milePayPlan = twoRespDTO.getMileCoPrice();
+        this.title = other.getMuilesName();
+        this.parentId = twoRespDTO.getId();
+        this.isLeaf = true;
+        this.childeren = null;
+    }
+
+    public Date getMileStartDate() {
+        return mileStartDate;
+    }
+
+    public void setMileStartDate(Date mileStartDate) {
+        this.mileStartDate = mileStartDate;
+    }
+
+    public Date getMileRealStartDate() {
+        return mileRealStartDate;
+    }
+
+    public void setMileRealStartDate(Date mileRealStartDate) {
+        this.mileRealStartDate = mileRealStartDate;
+    }
+
+    public Date getMileEndDate() {
+        return mileEndDate;
+    }
+
+    public void setMileEndDate(Date mileEndDate) {
+        this.mileEndDate = mileEndDate;
+    }
+
+    public Date getMileRealEndtDate() {
+        return mileRealEndtDate;
+    }
+
+    public void setMileRealEndtDate(Date mileRealEndtDate) {
+        this.mileRealEndtDate = mileRealEndtDate;
+    }
+
+    public Double getMileDuration() {
+        return mileDuration;
+    }
+
+    public void setMileDuration(Double mileDuration) {
+        this.mileDuration = mileDuration;
+    }
+
+    public Double getMileRealDuration() {
+        return mileRealDuration;
+    }
+
+    public void setMileRealDuration(Double mileRealDuration) {
+        this.mileRealDuration = mileRealDuration;
+    }
+
+    public BigDecimal getMileCoPlan() {
+        return mileCoPlan;
+    }
+
+    public void setMileCoPlan(BigDecimal mileCoPlan) {
+        this.mileCoPlan = mileCoPlan;
+    }
+
+    public BigDecimal getMileInvoice() {
+        return mileInvoice;
+    }
+
+    public void setMileInvoice(BigDecimal mileInvoice) {
+        this.mileInvoice = mileInvoice;
+    }
+
+    public BigDecimal getMileRealCollecion() {
+        return mileRealCollecion;
+    }
+
+    public void setMileRealCollecion(BigDecimal mileRealCollecion) {
+        this.mileRealCollecion = mileRealCollecion;
+    }
+
+    public BigDecimal getMilePayPlan() {
+        return milePayPlan;
+    }
+
+    public void setMilePayPlan(BigDecimal milePayPlan) {
+        this.milePayPlan = milePayPlan;
+    }
+
+    public String getMileTicket() {
+        return mileTicket;
+    }
+
+    public void setMileTicket(String mileTicket) {
+        this.mileTicket = mileTicket;
+    }
+
+    public BigDecimal getMileRealPayment() {
+        return mileRealPayment;
+    }
+
+    public void setMileRealPayment(BigDecimal mileRealPayment) {
+        this.mileRealPayment = mileRealPayment;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public void setParentId(String parentId) {
+        this.parentId = parentId;
+    }
+
+    public String getParentId() {
+        return parentId;
+    }
+
+    public Boolean getIsLeaf() {
+        return isLeaf;
+    }
+
+    public void setIsLeaf(Boolean leaf) {
+        isLeaf = leaf;
+    }
+
+    public List<ProStatisticsThreeRespDTO> getChilderen() {
+        return childeren;
+    }
+
+    public void setChilderen(List<ProStatisticsThreeRespDTO> childeren) {
+        this.childeren = childeren;
+    }
+}

+ 120 - 0
src/main/java/org/jeecg/common/dto/report/ProStatisticsTwoRespDTO.java

@@ -0,0 +1,120 @@
+package org.jeecg.common.dto.report;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+import org.jeecg.modules.archives.entity.ProjectManageArchivesAndBusiness;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+@ApiModel("项目情况统计表--收付款线条响应数据")
+public class ProStatisticsTwoRespDTO {
+    @ApiModelProperty("id")
+    private String id;
+    @ApiModelProperty("项目组成员")
+    private String proMember;
+    @ApiModelProperty("收付款条线编码")
+    private String coArchivesCode;
+    @ApiModelProperty("收付款条线名称")
+    private String coArchivesName;
+    @ApiModelProperty("title")
+    private String title;
+    @ApiModelProperty("parentId")
+    private String parentId;
+    @ApiModelProperty("isLeaf")
+    private Boolean isLeaf;
+    /**
+     * @desc 里程碑id
+     */
+    @JsonIgnore
+    @Setter
+    @Getter
+    private String mileId;
+    /**
+     * @desc 里程碑金额
+     */
+    @JsonIgnore
+    @Setter
+    @Getter
+    private BigDecimal milePrice;
+    /**
+     * @desc 里程碑计划回款
+     */
+    @JsonIgnore
+    @Setter
+    @Getter
+    private BigDecimal mileCoPrice;
+
+    private List<ProStatisticsThreeRespDTO> children;
+
+    public ProStatisticsTwoRespDTO() {
+    }
+
+    public ProStatisticsTwoRespDTO(ProjectManageArchivesAndBusiness business, String proMember, String parentId) {
+        this.id = business.getId();
+        this.coArchivesName = business.getPlanName();
+        this.title = business.getPlanName();
+        this.parentId = parentId;
+        this.proMember = proMember;
+        this.isLeaf = false;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getCoArchivesCode() {
+        return coArchivesCode;
+    }
+
+    public void setCoArchivesCode(String coArchivesCode) {
+        this.coArchivesCode = coArchivesCode;
+    }
+
+    public String getCoArchivesName() {
+        return coArchivesName;
+    }
+
+    public void setCoArchivesName(String coArchivesName) {
+        this.coArchivesName = coArchivesName;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getParentId() {
+        return parentId;
+    }
+
+    public void setParentId(String parentId) {
+        this.parentId = parentId;
+    }
+
+    public Boolean getLeaf() {
+        return isLeaf;
+    }
+
+    public void setLeaf(Boolean leaf) {
+        isLeaf = leaf;
+    }
+
+    public List<ProStatisticsThreeRespDTO> getChildren() {
+        return children;
+    }
+
+    public void setChildren(List<ProStatisticsThreeRespDTO> children) {
+        this.children = children;
+    }
+}

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

@@ -31,7 +31,6 @@ import org.jeecg.modules.archives.entity.ProjectManageBusinessOther;
 import org.jeecg.modules.archives.service.ProjectManageArchivesAndBusinessService;
 import org.jeecg.modules.archives.service.ProjectManageArchivesService;
 import org.jeecg.modules.archives.service.ProjectManageBusinessOtherService;
-import org.jeecg.modules.invoice.entity.InvoiceManagePurchaseDetail;
 import org.jeecg.modules.invoice.service.InvoiceManagePurchaseDetailService;
 import org.jeecg.modules.payment.service.ManagerPaymentAndReceiptSlipService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -43,8 +42,6 @@ import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
-
-import java.math.BigDecimal;
 import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;

+ 0 - 1
src/main/java/org/jeecg/modules/archives/entity/ProjectManageArchivesAndBusiness.java

@@ -2,7 +2,6 @@ package org.jeecg.modules.archives.entity;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
-import java.util.Date;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;

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

@@ -108,4 +108,9 @@ public class ProjectManageBusinessOther implements Serializable {
 	 	this.logicId = logicId;
 	 	this.realTime = realTime;
 	 }
+
+
+	 public ProjectManageBusinessOther(String proArchivesId){
+		 this.proArchivesId = proArchivesId;
+	 }
  }

+ 0 - 4
src/main/java/org/jeecg/modules/archives/mapper/ProjectManageArchivesMapper.java

@@ -10,8 +10,4 @@ import java.util.List;
 
 @Mapper
 public interface ProjectManageArchivesMapper extends BaseMapper<ProjectManageArchives> {
-    /**
-     * @desc 获取项目档案主表与里程碑数据
-     */
-    List<ProStatisticsRespDTO> getBusinessData(QueryWrapper<ProjectManageArchivesAndBusiness> queryWrapper);
 }

+ 0 - 56
src/main/java/org/jeecg/modules/archives/mapper/xml/ProjectManageArchivesMapper.xml

@@ -33,60 +33,4 @@
     <result column="del_flag"  property="delFlag" />
     <result column="pk_org"  property="pkOrg" />
   </resultMap>
-  <resultMap id="respDTOMap" type="org.jeecg.common.dto.report.ProStatisticsRespDTO">
-    <id column="id"  property="id" />
-    <result column="pro_code"  property="proCode" />
-    <result column="pro_name"  property="proName" />
-    <!--<result column="price1"  property="cusId" />-->
-    <!--<result column="price2"  property="cusCode" />-->
-    <!--<result column="price3"  property="cusName" />-->
-    <!--<result column="price4" jdbcType="DECIMAL" property="totalPrice" />-->
-    <!--<result column="price5"  property="saleManagerId" />-->
-    <!--<result column="milestone1"  property="saleManager" />-->
-    <!--<result column="mile_id1"  property="saleManId" />-->
-    <!--<result column="desc1"  property="saleMan" />-->
-    <!--<result column="milestone2"  property="impManagerId" />-->
-    <!--<result column="mile_id2"  property="impManager" />-->
-    <!--<result column="desc2"  property="impConsultantId" />-->
-    <!--<result column="mile_id3"  property="impConsultant" />-->
-    <!--<result column="desc3"  property="deManagerId" />-->
-    <!--<result column="milestone4"  property="deManager" />-->
-    <!--<result column="mile_id4"  property="deEngineerId" />-->
-    <!--<result column="desc4"  property="deEngineer" />-->
-    <!--<result column="milestone5"  property="seManagerId" />-->
-    <!--<result column="mile_id5"  property="seManager" />-->
-    <!--<result column="desc5"  property="seEngineerId" />-->
-  </resultMap>
-  <select id="getBusinessData" resultMap="respDTOMap">
-    SELECT
-          a.pro_id,
-          a.pro_name,
-          a.pro_code,
-          b.price1,
-          b.price2,
-          b.price3,
-          b.price4,
-          b.price5,
-          b.milestone1,
-          b.mile_id1,
-          b.desc1,
-          b.milestone2,
-          b.mile_id2,
-          b.desc2,
-          b.milestone3,
-          b.mile_id3,
-          b.desc3,
-          b.milestone4,
-          b.mile_id4,
-          b.desc4,
-          b.milestone5,
-          b.mile_id5,
-          b.desc5
-    FROM project_manage_archives a
-    JOIN project_manage_archives_and_business b
-    ON a.id = b.pro_archives_id
-  </select>
-
-
-
 </mapper>

+ 0 - 4
src/main/java/org/jeecg/modules/archives/service/ProjectManageArchivesService.java

@@ -34,8 +34,4 @@ public interface ProjectManageArchivesService extends IService<ProjectManageArch
      * @desc 通过id删除项目档案
      */
     boolean deleteById(ProjectManageArchives projectManageArchives);
-    /**
-     * @desc 获取项目档案主表与里程碑数据
-     */
-    List<ProStatisticsRespDTO> getBusinessData(QueryWrapper<ProjectManageArchivesAndBusiness> queryWrapper);
 }

+ 6 - 0
src/main/java/org/jeecg/modules/archives/service/ProjectManageBusinessOtherService.java

@@ -3,6 +3,8 @@ package org.jeecg.modules.archives.service;
 import org.apache.ibatis.annotations.Mapper;
 import org.jeecg.modules.archives.entity.ProjectManageBusinessOther;
 import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.awt.dnd.DropTargetListener;
 import java.util.List;
 
 /**
@@ -17,4 +19,8 @@ public interface ProjectManageBusinessOtherService extends IService<ProjectManag
      * @desc 批量删除(逻辑删除)
      */
     void deleteBatch(List<ProjectManageBusinessOther> businessOtherList);
+    /**
+     * @desc 获取列表数据
+     */
+    List<ProjectManageBusinessOther> getAll(ProjectManageBusinessOther other);
 }

+ 1 - 7
src/main/java/org/jeecg/modules/archives/service/impl/ProjectManageArchivesServiceImpl.java

@@ -121,13 +121,7 @@ public class ProjectManageArchivesServiceImpl extends ServiceImpl<ProjectManageA
         return true;
     }
 
-     /**
-      * @desc 获取项目档案主表与里程碑数据
-      */
-     @Override
-     public List<ProStatisticsRespDTO> getBusinessData(QueryWrapper<ProjectManageArchivesAndBusiness> queryWrapper) {
-         return projectManageArchivesMapper.getBusinessData(queryWrapper);
-     }
+
 
      /**
      * @desc 设置里程碑数据

+ 16 - 0
src/main/java/org/jeecg/modules/archives/service/impl/projectManageBusinessOtherServiceImpl.java

@@ -1,5 +1,7 @@
 package org.jeecg.modules.archives.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import org.apache.commons.lang3.StringUtils;
 import org.jeecg.modules.archives.entity.ProjectManageBusinessOther;
 import org.jeecg.modules.archives.mapper.ProjectManageBusinessOtherMapper;
 import org.jeecg.modules.archives.service.ProjectManageBusinessOtherService;
@@ -8,6 +10,7 @@ import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.transaction.annotation.Transactional;
 
+import javax.management.Query;
 import java.util.List;
 
 /**
@@ -29,4 +32,17 @@ public class projectManageBusinessOtherServiceImpl extends ServiceImpl<ProjectMa
     public void deleteBatch(List<ProjectManageBusinessOther> businessOtherList) {
         projectManageBusinessOtherMapper.deleteBatch(businessOtherList);
     }
+
+    /**
+     * @desc 获取列表数据
+     */
+    @Override
+    public List<ProjectManageBusinessOther> getAll(ProjectManageBusinessOther other) {
+        LambdaQueryWrapper<ProjectManageBusinessOther> lambdaQueryWrapper = new LambdaQueryWrapper<ProjectManageBusinessOther>()
+                .eq(ProjectManageBusinessOther::getDelFlag, "0");
+        if(StringUtils.isNotBlank(other.getId())){
+            lambdaQueryWrapper.eq(ProjectManageBusinessOther::getId, other.getId());
+        }
+        return list();
+    }
 }

+ 0 - 3
src/main/java/org/jeecg/modules/basedata/controller/BaseArchivesProjectApprovalController.java

@@ -14,10 +14,7 @@ import org.jeecg.common.constant.CommonConstant;
 import org.jeecg.common.dto.basedata.BaseArchivesProjectApprovalReqDTO;
 import org.jeecg.common.dto.basedata.BaseArchivesProjectApprovalRespDTO;
 import org.jeecg.modules.archives.entity.ProjectManageArchives;
-import org.jeecg.modules.archives.entity.ProjectManageArchivesAndBusiness;
-import org.jeecg.modules.archives.entity.ProjectManageBusinessOther;
 import org.jeecg.modules.archives.service.ProjectManageArchivesService;
-import org.jeecg.modules.archives.service.ProjectManageBusinessOtherService;
 import org.jeecg.modules.basedata.entity.BaseArchivesProjectApproval;
 import org.jeecg.modules.basedata.service.BaseArchivesProjectApprovalService;
 import org.jeecg.modules.system.service.ISysSerialPatternService;

+ 0 - 4
src/main/java/org/jeecg/modules/basedata/controller/FdContractClassController.java

@@ -7,7 +7,6 @@ import java.net.URLDecoder;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
-
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import org.apache.shiro.authz.annotation.Logical;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
@@ -18,18 +17,15 @@ import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.basedata.entity.FdContractClass;
 import org.jeecg.modules.basedata.service.IFdContractClassService;
-
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.extern.slf4j.Slf4j;
-
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
 import org.jeecgframework.poi.excel.entity.ExportParams;
 import org.jeecgframework.poi.excel.entity.ImportParams;
 import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
-
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.BindingResult;
 import org.springframework.web.bind.annotation.*;

+ 6 - 1
src/main/java/org/jeecg/modules/basedata/service/IBaseArchivesCollectionLineService.java

@@ -3,6 +3,8 @@ package org.jeecg.modules.basedata.service;
 import org.jeecg.modules.basedata.entity.BaseArchivesCollectionLine;
 import com.baomidou.mybatisplus.extension.service.IService;
 
+import java.util.Map;
+
 /**
  * @Description: 收付款条线档案
  * @author: jeecg-boot
@@ -10,5 +12,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
  * @version: V1.0
  */
 public interface IBaseArchivesCollectionLineService extends IService<BaseArchivesCollectionLine> {
-
+    /**
+     * @desc 收付款条线所有数据 (key: id, value: name)
+     */
+    Map<String, String> getDataMap();
 }

+ 16 - 0
src/main/java/org/jeecg/modules/basedata/service/impl/BaseArchivesCollectionLineServiceImpl.java

@@ -1,11 +1,19 @@
 package org.jeecg.modules.basedata.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import org.jeecg.modules.basedata.entity.BaseArchivesCollectionLine;
 import org.jeecg.modules.basedata.mapper.BaseArchivesCollectionLineMapper;
 import org.jeecg.modules.basedata.service.IBaseArchivesCollectionLineService;
 import org.springframework.stereotype.Service;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.util.CollectionUtils;
+
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collector;
+import java.util.stream.Collectors;
 
 /**
  * @Description: 收付款条线档案
@@ -16,4 +24,12 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 @Service
 public class BaseArchivesCollectionLineServiceImpl extends ServiceImpl<BaseArchivesCollectionLineMapper, BaseArchivesCollectionLine> implements IBaseArchivesCollectionLineService {
 
+    /**
+     * @desc 收付款条线所有数据 (key: id, value: name)
+     */
+    @Override
+    public Map<String, String> getDataMap() {
+        List<BaseArchivesCollectionLine> list = list(new LambdaQueryWrapper<BaseArchivesCollectionLine>().eq(BaseArchivesCollectionLine :: getDelFlag, "0"));
+        return list.stream().collect(Collectors.toMap(BaseArchivesCollectionLine::getId, BaseArchivesCollectionLine::getName));
+    }
 }

+ 36 - 0
src/main/java/org/jeecg/modules/report/entity/MeberDepartEnum.java

@@ -0,0 +1,36 @@
+package org.jeecg.modules.report.entity;
+
+import lombok.Getter;
+
+/**
+ * @desc 收付款条线对应成员组名
+ */
+public enum MeberDepartEnum {
+    IMP_DEPART(1, "实施部门"),
+    DE_DEPART(2, "开发部门"),
+    SE_DEPART(3, "服务部门");
+
+    @Getter
+    private int key;
+    @Getter
+    private String name;
+
+    MeberDepartEnum() {
+    }
+
+    MeberDepartEnum(int key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static MeberDepartEnum match(int key) {
+        MeberDepartEnum meberDepartEnum = null;
+        for(MeberDepartEnum value : values()){
+            if(value.getKey() == key){
+                meberDepartEnum = value;
+                break;
+            }
+        }
+        return meberDepartEnum;
+    }
+}

+ 218 - 12
src/main/java/org/jeecg/modules/report/service/impl/ProReportServiceImpl.java

@@ -6,18 +6,31 @@ import org.apache.commons.lang.StringUtils;
 import org.jeecg.common.dto.report.CostAccountingReqDTO;
 import org.jeecg.common.dto.report.CostAccountingRespDTO;
 import org.jeecg.common.dto.report.ProStatisticsRespDTO;
+import org.jeecg.common.dto.report.ProStatisticsThreeRespDTO;
+import org.jeecg.common.dto.report.ProStatisticsTwoRespDTO;
 import org.jeecg.modules.archives.entity.ProjectManageArchives;
 import org.jeecg.modules.archives.entity.ProjectManageArchivesAndBusiness;
+import org.jeecg.modules.archives.entity.ProjectManageBusinessOther;
 import org.jeecg.modules.archives.service.ProjectManageArchivesAndBusinessService;
 import org.jeecg.modules.archives.service.ProjectManageArchivesService;
+import org.jeecg.modules.archives.service.ProjectManageBusinessOtherService;
+import org.jeecg.modules.basedata.service.IBaseArchivesCollectionLineService;
+import org.jeecg.modules.prowork.entity.ProWorkLogic;
+import org.jeecg.modules.prowork.entity.ProWorkMilestone;
+import org.jeecg.modules.prowork.service.ProWorkLogicService;
+import org.jeecg.modules.prowork.service.ProWorkMilestoneService;
+import org.jeecg.modules.report.entity.MeberDepartEnum;
 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 org.springframework.util.CollectionUtils;
 import java.math.BigDecimal;
 import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
 
- /**
+/**
    * @Author jihaosen
    * @date 2021/3/11
    */
@@ -29,7 +42,14 @@ public class ProReportServiceImpl implements ProReportService {
     private ProjectManageArchivesAndBusinessService projectManageArchivesAndBusinessService;
     @Autowired
     private ProReportMapper proReportMapper;
-
+    @Autowired
+    private IBaseArchivesCollectionLineService baseArchivesCollectionLineService;
+    @Autowired
+    private ProjectManageBusinessOtherService projectManageBusinessOtherService;
+    @Autowired
+    private ProWorkLogicService proWorkLogicService;
+    @Autowired
+    private ProWorkMilestoneService proWorkMilestoneService;
     /**
      * @desc 获取成本核算数据
      */
@@ -56,21 +76,207 @@ public class ProReportServiceImpl implements ProReportService {
          if(StringUtils.isNotBlank(reqDTO.getPkOrg())){
              queryWrapper.eq("pk_org", reqDTO.getPkOrg());
          }
+         List<ProjectManageArchives> archives = projectManageArchivesService.list(queryWrapper);
+         //获取树形数据
+         return getProStatisticsDatas(archives, reqDTO.getId());
+     }
 
-         ProjectManageArchives projectManageArchives = projectManageArchivesService.getOne(queryWrapper);
+     /**
+      * @desc 获取树形数据
+      */
+     private List<ProStatisticsRespDTO> getProStatisticsDatas( List<ProjectManageArchives> archives, String id) {
+         //获取项目档案里程碑信息表数据
+         List<ProjectManageArchivesAndBusiness> businesses = getBusinessData(id);
+         //项目档案计划信息表Map
+         Map<String, List<ProjectManageArchivesAndBusiness>> businessMap = businesses.stream().collect(Collectors.groupingBy(t -> t.getPlanType()+"&"+t.getPlanId()));
+         //获取收付款条线
+         Map<String, String> CoLineMap = baseArchivesCollectionLineService.getDataMap();
+        //获取项目档案计划信息表数据
+         List<ProjectManageBusinessOther> otherList = projectManageBusinessOtherService.getAll(new ProjectManageBusinessOther(id));
+
+         //项目日志
+         Map<String, List<ProWorkLogic>>  logicMap = getProLogic(id);
 
-         List<ProStatisticsRespDTO> respDTOS = getProStatisticsData(projectManageArchives);
-         return respDTOS;
+         List<ProStatisticsRespDTO> list = Lists.newArrayList();
+         for(ProjectManageArchives projectManageArchives : archives){
+             ProStatisticsRespDTO respDTO =  new ProStatisticsRespDTO(projectManageArchives.getId(), projectManageArchives.getProName(),
+             projectManageArchives.getProCode(), projectManageArchives.getProName(), "0");
+             //配置收付款条线数据
+             setSecondChildren(businesses, respDTO, CoLineMap, otherList, businessMap, logicMap);
+                 list.add(respDTO);
+         }
+
+         return list;
      }
 
-     private List<ProStatisticsRespDTO> getProStatisticsData(ProjectManageArchives projectManageArchives) {
-         QueryWrapper<ProjectManageArchivesAndBusiness> queryWrapper = new QueryWrapper<>();
-         queryWrapper.eq("del_flag", "0")
-                 .eq("pro_archives_id", projectManageArchives.getId());
-         List<ProStatisticsRespDTO> respDTOS = projectManageArchivesService.getBusinessData(queryWrapper);
+    /**
+     * @desc 日志map
+     */
+    private Map<String, List<ProWorkLogic>> getProLogic(String id) {
+         QueryWrapper<ProWorkLogic> queryWrapper = new QueryWrapper<>();
+         queryWrapper.eq("del_flag", "0");
+         queryWrapper.eq("pro_id", id);
+         queryWrapper.orderByAsc("create_time");
+         List<ProWorkLogic>  list = proWorkLogicService.list(queryWrapper);
+         //1.开发 2.实施 3.服务
+         return list.stream().collect(Collectors.groupingBy(t -> t.getType()));
+    }
+
+    /**
+     * @desc 配置收付款线条数据
+     */
+    private void setSecondChildren(List<ProjectManageArchivesAndBusiness> businesses, ProStatisticsRespDTO respDTO, Map<String, String> CoLineMap,
+        List<ProjectManageBusinessOther> otherList, Map<String, List<ProjectManageArchivesAndBusiness>> otherMap, Map<String, List<ProWorkLogic>> logicMap) {
+        List<ProStatisticsTwoRespDTO> list = Lists.newArrayList();
+        //i: 1代表实施, 2代表开发, 3代表服务
+        for(int i = 1; i <=4 ; i++) {
+            if(!CollectionUtils.isEmpty(businesses)){
+                List<ProjectManageArchivesAndBusiness> businesseses = selectSecondChildren(i, businesses);
+
+                for(ProjectManageArchivesAndBusiness business : businesseses){
+                    //只处理收款计划
+                    if(business.getPlanType() == 3){
+                        break;
+                    }
+
+                    if(StringUtils.isNotBlank(business.getMileId1())){
+                        ProStatisticsTwoRespDTO twoRespDTO = new ProStatisticsTwoRespDTO(business, MeberDepartEnum.match(i).getName(), respDTO.getId());
+                        twoRespDTO.setCoArchivesCode(CoLineMap.get(business.getPlanId()));
+                        twoRespDTO.setMileId(business.getMileId1());
+                        List<ProjectManageArchivesAndBusiness> others = otherMap.get("3&"+business.getPlanId());
+                        if(!CollectionUtils.isEmpty(others)){
+                            twoRespDTO.setMileCoPrice(others.get(0).getPrice1());
+                        }
+
+                        twoRespDTO.setMilePrice(business.getPrice1());
+
+                        setThreeChildren(twoRespDTO, otherList, i, logicMap);
+                        list.add(twoRespDTO);
+                    }
+                    if(StringUtils.isNotBlank(business.getMileId2())){
+                        ProStatisticsTwoRespDTO twoRespDTO = new ProStatisticsTwoRespDTO(business, MeberDepartEnum.match(i).getName(), respDTO.getId());
+                        twoRespDTO.setCoArchivesCode(CoLineMap.get(business.getPlanId()));
+                        twoRespDTO.setMileId(business.getMileId2());
+                        List<ProjectManageArchivesAndBusiness> others = otherMap.get("3&"+business.getPlanId());
+                        if(!CollectionUtils.isEmpty(others)){
+                            twoRespDTO.setMileCoPrice(others.get(0).getPrice2());
+                        }
+                        setThreeChildren(twoRespDTO, otherList, i, logicMap);
+                        list.add(twoRespDTO);
+                    }
+                    if(StringUtils.isNotBlank(business.getMileId3())){
+                        ProStatisticsTwoRespDTO twoRespDTO = new ProStatisticsTwoRespDTO(business, MeberDepartEnum.match(i).getName(), respDTO.getId());
+                        twoRespDTO.setCoArchivesCode(CoLineMap.get(business.getPlanId()));
+                        twoRespDTO.setMileId(business.getMileId3());
+                        twoRespDTO.setMilePrice(business.getPrice3());
+                        List<ProjectManageArchivesAndBusiness> others = otherMap.get("3&"+business.getPlanId());
+                        if(!CollectionUtils.isEmpty(others)){
+                            twoRespDTO.setMileCoPrice(others.get(0).getPrice3());
+                        }
+                        setThreeChildren(twoRespDTO, otherList, i, logicMap);
+                        list.add(twoRespDTO);
+                    }
+                    if(StringUtils.isNotBlank(business.getMileId4())){
+                        ProStatisticsTwoRespDTO twoRespDTO = new ProStatisticsTwoRespDTO(business, MeberDepartEnum.match(i).getName(), respDTO.getId());
+                        twoRespDTO.setCoArchivesCode(CoLineMap.get(business.getPlanId()));
+                        twoRespDTO.setMileId(business.getMileId4());
+                        List<ProjectManageArchivesAndBusiness> others = otherMap.get("3&"+business.getPlanId());
+                        if(!CollectionUtils.isEmpty(others)) {
+                            twoRespDTO.setMileCoPrice(others.get(0).getPrice4());
+                        }
+                        setThreeChildren(twoRespDTO, otherList, i, logicMap);
+                        list.add(twoRespDTO);
+                    }
+                    if(StringUtils.isNotBlank(business.getMileId5())){
+                        ProStatisticsTwoRespDTO twoRespDTO = new ProStatisticsTwoRespDTO(business, MeberDepartEnum.match(i).getName(), respDTO.getId());
+                        twoRespDTO.setCoArchivesCode(CoLineMap.get(business.getPlanId()));
+                        twoRespDTO.setMileId(business.getMileId5());
+                        twoRespDTO.setMilePrice(business.getPrice5());
+                        List<ProjectManageArchivesAndBusiness> others = otherMap.get("3&"+business.getPlanId());
+                        if(!CollectionUtils.isEmpty(others)) {
+
+                            twoRespDTO.setMileCoPrice(others.get(0).getPrice5());
+                        }
+                        setThreeChildren(twoRespDTO, otherList, i, logicMap);
+                        list.add(twoRespDTO);
+                    }
+
+                }
 
-         //TODO 待定
-         return respDTOS;
+            } else {
+              respDTO.setChildren(null);
+              respDTO.setIsLeaf(true);
+            }
+        }
+        respDTO.setChildren(list);
+    }
+
+
+
+    //配置计划信息表的数据
+
+    private void setThreeChildren(ProStatisticsTwoRespDTO twoRespDTO, List<ProjectManageBusinessOther> otherList, int i,
+         Map<String, List<ProWorkLogic>> logicMap) {
+        //计划类型 1.商务 2.实施 3.开发 4.服务
+         ++i;
+         for(ProjectManageBusinessOther other : otherList){
+             if(other.getPlanType() == i && other.getMuilesId().equals(twoRespDTO.getMileId())){
+                 ProStatisticsThreeRespDTO threeRespDTO = new ProStatisticsThreeRespDTO(other, twoRespDTO);
+                 //获取实际开始时间
+                 String planType = choosePlanType(i);
+                 List<ProWorkLogic> logics = logicMap.get(planType);
+                 if(!CollectionUtils.isEmpty(logics)){
+                     threeRespDTO.setMileRealStartDate(logics.get(0).getStartDate());
+                 }
+                 //TODO 确认单 , 销售发票等
+             } else {
+                 twoRespDTO.setLeaf(true);
+                 twoRespDTO.setChildren(null);
+             }
+         }
+
+    }
+
+    /**
+     * @desc 选择计划类型 1.开发 2.实施 3.服务
+     */
+    private String choosePlanType(int i) {
+        switch(i){
+            //代表实施
+            case 1:
+                return "2";
+            case 2:
+                return "1";
+            case 3:
+                return  "3";
+        }
+
+    }
+
+    //根据首付款条线获取指定的数据
+    private List<ProjectManageArchivesAndBusiness> selectSecondChildren(int i, List<ProjectManageArchivesAndBusiness> businesses) {
+        switch(i){
+            //代表实施
+            case 1:
+                return businesses.stream().filter(t -> t.getPlanName().indexOf("实施") == -1).collect(Collectors.toList());
+            case 2:
+                return businesses.stream().filter(t -> t.getPlanName().indexOf("开发") == -1).collect(Collectors.toList());
+            case 3:
+                return businesses.stream().filter(t -> t.getPlanName().indexOf("服务") == -1).collect(Collectors.toList());
+        }
+
+           return null;
+    }
+
+    /**
+      * @desc 获取项目档案里程碑信息表数据
+      */
+     private List<ProjectManageArchivesAndBusiness> getBusinessData(String id) {
+         QueryWrapper<ProjectManageArchivesAndBusiness> queryWrapper = new QueryWrapper<>();
+         Integer[] planTypeArr = {1, 2};
+         queryWrapper.eq("del_flag", "0").eq("pro_archives_id", id).in("plan_type", planTypeArr);
+         List<ProjectManageArchivesAndBusiness> list = projectManageArchivesAndBusinessService.list(queryWrapper);
+         return list;
      }
  }
 

+ 0 - 4
src/main/java/org/jeecg/modules/system/controller/SysDataLogController.java

@@ -2,12 +2,9 @@ package org.jeecg.modules.system.controller;
 
 import java.util.ArrayList;
 import java.util.List;
-
 import javax.servlet.http.HttpServletRequest;
-
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.system.query.QueryGenerator;
-import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.system.entity.SysDataLog;
 import org.jeecg.modules.system.service.ISysDataLogService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -15,7 +12,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
-
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;