Browse Source

合同档案 项目档案

chenc 3 năm trước cách đây
mục cha
commit
9022530858

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

@@ -71,6 +71,8 @@ public class ProArchivesAddReqDTO {
     private String milestoneType;
     @ApiModelProperty("组织")
     private String pkOrg;
+    @ApiModelProperty("合同档案id")
+    private String contractFileId;
 
     @ApiModelProperty("项目档案—商务")
     private BsInfo bsInfo;

+ 4 - 0
src/main/java/org/jeecg/modules/archives/entity/ProjectManageArchives.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.archives.entity;
 
 import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
@@ -91,6 +92,8 @@ public class ProjectManageArchives implements Serializable {
     private String delFlag;
     @ApiModelProperty("组织")
     private String pkOrg;
+    //合同档案id
+    private String contractFileId;
 
     public ProjectManageArchives() {
     }
@@ -124,5 +127,6 @@ public class ProjectManageArchives implements Serializable {
         this.milestoneType = reqDTO.getMilestoneType();
         this.delFlag = "0";
         this.pkOrg = reqDTO.getPkOrg();
+        this.contractFileId=reqDTO.getContractFileId();
     }
 }

+ 3 - 1
src/main/java/org/jeecg/modules/contract/file/controller/ContractFileController.java

@@ -474,8 +474,10 @@ public class ContractFileController {
 		  result.error500("未找到对应实体");
 	  }else {
 
-		  //获取所有子表数据
+		  //查询主表详情数据
 		  contractFile=contractFileService.getContractFileById(id);
+		  //获取所有子表数据
+		  contractFileService.queryMainAndChildById(contractFile);
 		  result.setResult(contractFile);
 		  result.setSuccess(true);
 	  }

+ 10 - 0
src/main/java/org/jeecg/modules/contract/file/entity/ContractFile.java

@@ -128,6 +128,9 @@ public class ContractFile implements Serializable {
 	/**汇款金额*/
 	private java.math.BigDecimal received;
 
+	/**客户编码*/
+	@TableField(exist = false)
+	private String fdCustomerCode;
 	/**客户名称*/
 	@TableField(exist = false)
 	private String fdCustomerName;
@@ -140,12 +143,19 @@ public class ContractFile implements Serializable {
 	/**客户地址*/
 	@TableField(exist = false)
 	private String fdCustomeraddress;
+
+	/**项目立项编码*/
+	@TableField(exist = false)
+	private String proCode;
 	/**项目立项名称*/
 	@TableField(exist = false)
 	private String proName;
 	/**里程碑类型名称*/
 	@TableField(exist = false)
 	private String milestoneName;
+	/**业务类型名称*/
+	@TableField(exist = false)
+	private String businessTypeDictName;
 
 	/**合同产品子表*/
 	@TableField(exist = false)

+ 2 - 0
src/main/java/org/jeecg/modules/contract/file/mapper/xml/ContractFileMapper.xml

@@ -17,7 +17,9 @@
         SELECT
             cf.*,
             bapa.name as proName,
+            bapa.code as proCode,
             (select item_text from sys_dict_item where item_value=cf.milestone_id and dict_id=(select id from sys_dict where dict_code='base_archives_milestone_type')) as milestoneName,
+            fc.code as fdCustomerCode,
             fc.name as fdCustomerName,
             fc.address as fdCustomerAddress,
             fcc.contact_psn as fdCustomerPersonnelId,

+ 18 - 4
src/main/java/org/jeecg/modules/contract/file/service/impl/ContractFileServiceImpl.java

@@ -116,10 +116,6 @@ public class ContractFileServiceImpl extends ServiceImpl<ContractFileMapper, Con
         }
     }
 
-    @Override
-    public ContractFile getContractFileById(String id) {
-        return contractFileMapper.getContractFileById(id);
-    }
 
     /**新增所有子表*/
     public void saveChildAll(ContractFile contractFile){
@@ -193,4 +189,22 @@ public class ContractFileServiceImpl extends ServiceImpl<ContractFileMapper, Con
         contractFileAndBusiness.setDelFlag("1");
         iContractFileAndBusinessService.update(contractFileAndBusiness,contractFileAndBusinessQueryWrapper);
     }
+
+
+    @Override
+    public ContractFile getContractFileById(String id) {
+        ContractFile contractFile=contractFileMapper.getContractFileById(id);
+        if(contractFile!=null){
+            //获取产品
+            QueryWrapper<ContractFileProduct> productQueryWrapper=new QueryWrapper<>();
+            productQueryWrapper.lambda().eq(ContractFileProduct::getDelFlag,"0");
+            productQueryWrapper.lambda().eq(ContractFileProduct::getContractFileId,contractFile.getId());
+            productQueryWrapper.lambda().orderByAsc(ContractFileProduct::getSort);
+            List<ContractFileProduct> productList=iContractFileProductService.list(productQueryWrapper);
+            //获取模块
+//            QueryWrapper<ContractFileModular>
+        }
+        return contractFileMapper.getContractFileById(id);
+    }
+
 }