|
@@ -67,13 +67,15 @@ public class MaterialProgressController extends BladeController {
|
|
|
@PostMapping("/queryContractTreeMaterialProgress")
|
|
|
@ApiOperationSupport(order = 4)
|
|
|
@ApiOperation(value = "资料进度")
|
|
|
- public R<MaterialProgressVO> queryContractTreeMaterialProgress(@RequestParam String contractId, @RequestParam String parentId){
|
|
|
+ public R<MaterialProgressVO> queryContractTreeMaterialProgress(@RequestParam String contractId, @RequestParam String parentId, String classifyType){
|
|
|
+ classifyType = StringUtils.isEmpty(classifyType) ? "1" : classifyType;
|
|
|
+
|
|
|
//设置返回对象
|
|
|
MaterialProgressVO reVO = new MaterialProgressVO();
|
|
|
|
|
|
//获取合同段信息
|
|
|
ContractInfo contract = this.contractClient.getContractById(Long.parseLong(contractId));
|
|
|
- if(new Integer("2").equals(contract.getContractType())){
|
|
|
+ if("2".equals(classifyType) && contract != null && (new Integer("2").equals(contract.getContractType()) || new Integer("3").equals(contract.getContractType()))){
|
|
|
//监理合同段,获取其关联的施工合同段ID
|
|
|
List<String> sgContractIds = this.contractClient.getProcessContractByJLContractId(contractId);
|
|
|
for(String sgContractId : sgContractIds){
|
|
@@ -81,7 +83,7 @@ public class MaterialProgressController extends BladeController {
|
|
|
List<WbsTreeContractTreeVOS> nodeResult = this.wbsTreeContractClient.queryContractWbsTreeByContractIdAndType(sgContractId, 1, StringUtils.isNotEmpty(parentId) ? parentId : "0");
|
|
|
if(nodeResult != null && nodeResult.size() > 0){
|
|
|
//找到当前节点下的所有填报节点
|
|
|
- List<QueryProcessDataVO> queryDataResult = this.informationQueryService.queryProcessDataByParentIdAndContractId(nodeResult.get(0).getId().toString(), 1, sgContractId);
|
|
|
+ List<QueryProcessDataVO> queryDataResult = this.informationQueryService.queryProcessDataByParentIdAndContractId(nodeResult.get(0).getId().toString(), new Integer(classifyType), sgContractId);
|
|
|
|
|
|
//统计
|
|
|
this.countAmount(nodeResult, queryDataResult, sgContractId, reVO);
|
|
@@ -94,7 +96,7 @@ public class MaterialProgressController extends BladeController {
|
|
|
if(nodeResult != null && nodeResult.size() > 0){
|
|
|
|
|
|
//找到当前节点下的所有填报节点
|
|
|
- List<QueryProcessDataVO> queryDataResult = this.informationQueryService.queryProcessDataByParentIdAndContractId(parentId, 1, contractId);
|
|
|
+ List<QueryProcessDataVO> queryDataResult = this.informationQueryService.queryProcessDataByParentIdAndContractId(parentId, new Integer(classifyType), contractId);
|
|
|
//统计
|
|
|
this.countAmount(nodeResult, queryDataResult, contractId, reVO);
|
|
|
|
|
@@ -192,13 +194,15 @@ public class MaterialProgressController extends BladeController {
|
|
|
@PostMapping("/queryImageClassification")
|
|
|
@ApiOperationSupport(order = 3)
|
|
|
@ApiOperation(value = "声像媒体资料统计")
|
|
|
- public R<MaterialProgressVO> queryImageClassification(@RequestParam String contractId){
|
|
|
+ public R<MaterialProgressVO> queryImageClassification(@RequestParam String contractId, String classifyType){
|
|
|
+ classifyType = StringUtils.isEmpty(classifyType) ? "1" : classifyType;
|
|
|
+
|
|
|
//设置返回参数
|
|
|
MaterialProgressVO reVO = new MaterialProgressVO();
|
|
|
|
|
|
//获取合同段信息
|
|
|
ContractInfo contract = this.contractClient.getContractById(Long.parseLong(contractId));
|
|
|
- if(contract != null && new Integer("2").equals(contract.getContractType())){
|
|
|
+ if("2".equals(classifyType) && contract != null && (new Integer("2").equals(contract.getContractType()) || new Integer("3").equals(contract.getContractType()))){
|
|
|
//监理合同段
|
|
|
List<String> sgContractIds = this.contractClient.getProcessContractByJLContractId(contractId);
|
|
|
if(sgContractIds != null && sgContractIds.size() > 0){
|
|
@@ -251,13 +255,13 @@ public class MaterialProgressController extends BladeController {
|
|
|
@PostMapping("/queryMaterialProgressStatus")
|
|
|
@ApiOperationSupport(order = 2)
|
|
|
@ApiOperation(value = "报表资料审批统计")
|
|
|
- public R<MaterialProgressVO> queryMaterialProgressStatus(@RequestParam String contractId){
|
|
|
+ public R<MaterialProgressVO> queryMaterialProgressStatus(@RequestParam String contractId, String classifyType){
|
|
|
//设置参数返回
|
|
|
MaterialProgressVO reVO = new MaterialProgressVO();
|
|
|
|
|
|
//获取合同段信息
|
|
|
ContractInfo contract = this.contractClient.getContractById(Long.parseLong(contractId));
|
|
|
- if(contract != null && new Integer("2").equals(contract.getContractType())){
|
|
|
+ if(contract != null && (new Integer("2").equals(contract.getContractType()) || new Integer("3").equals(contract.getContractType()))){
|
|
|
//监理合同段
|
|
|
List<String> sgContractIds = this.contractClient.getProcessContractByJLContractId(contractId);
|
|
|
if(sgContractIds != null && sgContractIds.size() > 0){
|
|
@@ -272,7 +276,7 @@ public class MaterialProgressController extends BladeController {
|
|
|
}
|
|
|
if(countList.size() > 0){
|
|
|
//设置参数
|
|
|
- this.setTaskParameter(reVO, countList);
|
|
|
+ this.setTaskParameter(reVO, countList, classifyType);
|
|
|
return R.data(reVO);
|
|
|
}
|
|
|
}
|
|
@@ -280,7 +284,7 @@ public class MaterialProgressController extends BladeController {
|
|
|
//找到可填写的
|
|
|
List<WbsTreeContract> submitNodeList = this.wbsTreeContractClient.queryContractSubmitWbsTreeByContractId(contractId);
|
|
|
if(submitNodeList != null && submitNodeList.size() > 0){
|
|
|
- this.setTaskParameter(reVO, submitNodeList);
|
|
|
+ this.setTaskParameter(reVO, submitNodeList, classifyType);
|
|
|
return R.data(reVO);
|
|
|
}
|
|
|
}
|
|
@@ -288,7 +292,9 @@ public class MaterialProgressController extends BladeController {
|
|
|
return R.data(200, null, "未找到数据");
|
|
|
}
|
|
|
|
|
|
- private void setTaskParameter(MaterialProgressVO reVO, List<WbsTreeContract> submitNodeList){
|
|
|
+ private void setTaskParameter(MaterialProgressVO reVO, List<WbsTreeContract> submitNodeList, String classifyType){
|
|
|
+ classifyType = StringUtils.isEmpty(classifyType) ? "1" : classifyType;
|
|
|
+
|
|
|
//汇总四个填报类型的总数
|
|
|
List<String> process = new ArrayList<>(), workStartReports = new ArrayList<>(), evaluation = new ArrayList<>(), completion = new ArrayList<>();
|
|
|
//类型分组
|
|
@@ -297,22 +303,22 @@ public class MaterialProgressController extends BladeController {
|
|
|
//工序资料
|
|
|
List<InformationQuery> processSubmitList = null;
|
|
|
if(process.size() > 0){
|
|
|
- processSubmitList = this.informationQueryService.list(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getWbsId, process));
|
|
|
+ processSubmitList = this.informationQueryService.list(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getWbsId, process).eq(InformationQuery::getClassify, classifyType));
|
|
|
}
|
|
|
//开工报告
|
|
|
List<InformationQuery> workStartReportsSubmitList = null;
|
|
|
if(workStartReports.size() > 0){
|
|
|
- workStartReportsSubmitList = this.informationQueryService.list(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getWbsId, workStartReports));
|
|
|
+ workStartReportsSubmitList = this.informationQueryService.list(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getWbsId, workStartReports).eq(InformationQuery::getClassify, classifyType));
|
|
|
}
|
|
|
//质量评定
|
|
|
List<InformationQuery> evaluationSubmitList = null;
|
|
|
if(evaluation.size() > 0){
|
|
|
- evaluationSubmitList = this.informationQueryService.list(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getWbsId, evaluation));
|
|
|
+ evaluationSubmitList = this.informationQueryService.list(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getWbsId, evaluation).eq(InformationQuery::getClassify, classifyType));
|
|
|
}
|
|
|
//中间交工
|
|
|
List<InformationQuery> completionSubmitList = null;
|
|
|
if(completion.size() > 0){
|
|
|
- completionSubmitList = this.informationQueryService.list(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getWbsId, completion));
|
|
|
+ completionSubmitList = this.informationQueryService.list(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getWbsId, completion).eq(InformationQuery::getClassify, classifyType));
|
|
|
}
|
|
|
|
|
|
//处理工序资料
|
|
@@ -350,13 +356,13 @@ public class MaterialProgressController extends BladeController {
|
|
|
@PostMapping("/queryMaterialProgress")
|
|
|
@ApiOperationSupport(order = 1)
|
|
|
@ApiOperation(value = "查询内业资料进度")
|
|
|
- public R<MaterialProgressVO> queryMaterialProgress(@RequestParam String contractId){
|
|
|
+ public R<MaterialProgressVO> queryMaterialProgress(@RequestParam String contractId, String classifyType){
|
|
|
//设置返回
|
|
|
MaterialProgressVO reVO = new MaterialProgressVO();
|
|
|
|
|
|
//获取合同段信息
|
|
|
ContractInfo contract = this.contractClient.getContractById(Long.parseLong(contractId));
|
|
|
- if(contract != null && new Integer("2").equals(contract.getContractType())){
|
|
|
+ if(contract != null && (new Integer("2").equals(contract.getContractType()) || new Integer("3").equals(contract.getContractType()))){
|
|
|
//监理合同段
|
|
|
List<String> sgContractIds = this.contractClient.getProcessContractByJLContractId(contractId);
|
|
|
if(sgContractIds != null && sgContractIds.size() > 0){
|
|
@@ -371,7 +377,7 @@ public class MaterialProgressController extends BladeController {
|
|
|
}
|
|
|
if(countList.size() > 0){
|
|
|
//设置参数
|
|
|
- this.setParameter(countList, reVO);
|
|
|
+ this.setParameter(countList, reVO, classifyType);
|
|
|
}
|
|
|
return R.data(reVO);
|
|
|
}
|
|
@@ -381,7 +387,7 @@ public class MaterialProgressController extends BladeController {
|
|
|
List<WbsTreeContract> submitNodeList = this.wbsTreeContractClient.queryContractSubmitWbsTreeByContractId(contractId);
|
|
|
if(submitNodeList != null && submitNodeList.size() > 0){
|
|
|
//设置参数
|
|
|
- this.setParameter(submitNodeList, reVO);
|
|
|
+ this.setParameter(submitNodeList, reVO, classifyType);
|
|
|
return R.data(reVO);
|
|
|
}
|
|
|
}
|
|
@@ -392,7 +398,8 @@ public class MaterialProgressController extends BladeController {
|
|
|
/**
|
|
|
* 设置参数
|
|
|
*/
|
|
|
- private void setParameter(List<WbsTreeContract> submitNodeList, MaterialProgressVO reVO){
|
|
|
+ private void setParameter(List<WbsTreeContract> submitNodeList, MaterialProgressVO reVO, String classifyType){
|
|
|
+ classifyType = StringUtils.isEmpty(classifyType) ? "1" : classifyType;
|
|
|
//汇总四个填报类型的总数
|
|
|
List<String> process = new ArrayList<>(), workStartReports = new ArrayList<>(), evaluation = new ArrayList<>(), completion = new ArrayList<>();
|
|
|
//类型分组
|
|
@@ -402,22 +409,22 @@ public class MaterialProgressController extends BladeController {
|
|
|
//工序资料
|
|
|
long processAmount = 0L;
|
|
|
if(process.size() > 0){
|
|
|
- processAmount = this.informationQueryService.count(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getWbsId, process));
|
|
|
+ processAmount = this.informationQueryService.count(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getWbsId, process).eq(InformationQuery::getClassify, classifyType));
|
|
|
}
|
|
|
//开工报告
|
|
|
long workStartReportsAmount = 0L;
|
|
|
if(workStartReports.size() > 0){
|
|
|
- workStartReportsAmount = this.informationQueryService.count(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getWbsId, workStartReports));
|
|
|
+ workStartReportsAmount = this.informationQueryService.count(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getWbsId, workStartReports).eq(InformationQuery::getClassify, classifyType));
|
|
|
}
|
|
|
//质量评定
|
|
|
long evaluationAmount = 0L;
|
|
|
if(evaluation.size() > 0){
|
|
|
- evaluationAmount = this.informationQueryService.count(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getWbsId, evaluation));
|
|
|
+ evaluationAmount = this.informationQueryService.count(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getWbsId, evaluation).eq(InformationQuery::getClassify, classifyType));
|
|
|
}
|
|
|
//中间交工
|
|
|
long completionAmount = 0L;
|
|
|
if(completion.size() > 0){
|
|
|
- completionAmount = this.informationQueryService.count(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getWbsId, completion));
|
|
|
+ completionAmount = this.informationQueryService.count(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getWbsId, completion).eq(InformationQuery::getClassify, classifyType));
|
|
|
}
|
|
|
|
|
|
reVO.setProcessMaterialList("开工报告", workStartReports.size(), workStartReportsAmount);
|