Bladeren bron

客户端BUG及后管主页接口

huangjn 3 jaren geleden
bovenliggende
commit
a502fb2887

+ 1 - 1
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/ManagerHomePageVO.java

@@ -27,7 +27,7 @@ public class ManagerHomePageVO {
     private List<SingPfx> pfxList = new ArrayList<>();
 
     @ApiModelProperty("证书总数")
-    private Integer pfxAmount;
+    private Long pfxAmount;
 
     /**
      * 当前用户待办工单

+ 1 - 1
blade-service/blade-business/src/main/java/org/springblade/business/controller/InformationWriteQueryController.java

@@ -215,7 +215,7 @@ public class InformationWriteQueryController extends BladeController {
 						this.taskClient.abolishTask(task);
 					} else if(new Integer("2").equals(task.getStatus())) {
 						//已审批的任务,修改业务数据的审批状态为未上报并撤签即可
-						this.informationQueryService.update(Wrappers.<InformationQuery>lambdaUpdate().set(InformationQuery::getStatus, 3).in(InformationQuery::getId, Arrays.asList(task.getFormDataId().split(","))));
+						this.informationQueryService.update(Wrappers.<InformationQuery>lambdaUpdate().set(InformationQuery::getStatus, 0).in(InformationQuery::getId, Arrays.asList(task.getFormDataId().split(","))));
 						// todo ================== 调用撤签
 						// todo ================== 调用撤签
 					}

+ 3 - 2
blade-service/blade-business/src/main/java/org/springblade/business/controller/OperationLogController.java

@@ -23,6 +23,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import lombok.AllArgsConstructor;
 
 import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang.time.DateUtils;
 import org.jetbrains.annotations.NotNull;
 import org.springblade.business.wrapper.OperationLogWrapper;
 import org.springblade.core.mp.support.Condition;
@@ -124,7 +125,7 @@ public class OperationLogController extends BladeController {
 		QueryWrapper<OperationLog> wrapper = Condition.getQueryWrapper(operationLog);
 		if(StringUtils.isNotEmpty(operationLog.getStartTime()) && StringUtils.isNotEmpty(operationLog.getEndTime())){
 			String endTime = operationLog.getEndTime();
-			endTime = DateUtil.format(org.apache.commons.lang.time.DateUtils.addDays(DateUtil.parse(endTime, "yyyy-MM-dd"), 1), "yyyy-MM-dd");
+			endTime = DateUtil.format(DateUtils.addDays(DateUtil.parse(endTime, "yyyy-MM-dd"), 1), "yyyy-MM-dd");
 			try{
 				wrapper.lambda().between(OperationLog::getOperationTime, operationLog.getStartTime(), endTime);
 			}catch (Exception e){
@@ -135,7 +136,7 @@ public class OperationLogController extends BladeController {
 			wrapper.lambda().like(OperationLog::getOperationContent, operationLog.getQueryValue());
 		}
 
-		IPage<OperationLog> pages = operationLogService.page(Condition.getPage(query), wrapper);
+		IPage<OperationLog> pages = operationLogService.page(Condition.getPage(query), wrapper.lambda().orderBy(true, false, OperationLog::getCreateTime));
 
 		//获取业务字典
 		List<DictBiz> dictBizList = this.dictBizClient.getList("operation_type", "notRoot").getData();

+ 1 - 1
blade-service/blade-business/src/main/java/org/springblade/business/mapper/TaskMapper.xml

@@ -31,7 +31,7 @@
     </resultMap>
 
     <select id="queryTaskListByFormDataId" resultMap="taskResultMap">
-        select id,form_data_id,process_instance_id,approval_type,status from u_task where form_data_id like #{formDataId} and status in(1,2) and is_deleted = 0
+        select id,form_data_id,process_instance_id,approval_type,status from u_task where form_data_id like #{formDataId} and status in(1,2) and is_deleted = 0 limit 1
     </select>
 
     <select id="queryBatchList" resultMap="taskResultMap">

+ 4 - 6
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/InformationQueryServiceImpl.java

@@ -49,10 +49,10 @@ public class InformationQueryServiceImpl extends BaseServiceImpl<InformationQuer
 
 		//首先根据wbsId获取合同段ID和项目ID
 		WbsTreeContract contractTree = this.wbsTreeContractClient.getContractWbsTreeByPrimaryKeyId(Long.parseLong(primaryKeyId));
-		if(new Integer("2").equals(contractTree.getWbsType()) || new Integer("2").equals(contractTree.getType())){
-			//说明是表单,需要获取其父级
-			contractTree = this.wbsTreeContractClient.getContractWbsTreeByContractIdAndId(contractTree.getParentId(), Long.parseLong(contractTree.getContractId()));
-		}
+//		if(new Integer("2").equals(contractTree.getWbsType()) || new Integer("2").equals(contractTree.getType())){
+//			//说明是表单,需要获取其父级
+//			contractTree = this.wbsTreeContractClient.getContractWbsTreeByContractIdAndId(contractTree.getParentId(), Long.parseLong(contractTree.getContractId()));
+//		}
 
 		//判断当前填报节点下是否已经存在相应数据
 		InformationQuery oldData = this.baseMapper.getInformationQueryByWbsId(contractTree.getPKeyId(), classify);
@@ -79,8 +79,6 @@ public class InformationQueryServiceImpl extends BaseServiceImpl<InformationQuer
 			//修改数据
 			this.baseMapper.updateById(oldData);
 		} else {
-
-
 			//新增基础数据
 			InformationQuery newData = new InformationQuery();
 			//设置文件题名

+ 15 - 12
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TaskServiceImpl.java

@@ -111,15 +111,18 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
         InformationQuery query = this.informationQueryService.getById(formDataId);
         if(query != null){
             //查询对应的数据
-            List<WbsTreeContract> tableData = this.wbsTreeContractClient.queryProcessSubmitBusinessDataByPrimaKeyIdAndClassify(query.getWbsId().toString(), query.getClassify().toString());
-            if(tableData != null && tableData.size() > 0){
-                //转换数据
-                TaskApprovalVO vo = new TaskApprovalVO();
-                for(WbsTreeContract node : tableData){
-                    vo.setApprovalFileList(node.getDeptName(), node.getPdfUrl());
-                }
-                return vo;
-            }
+            TaskApprovalVO vo = new TaskApprovalVO();
+            vo.setApprovalFileList(query.getName(), StringUtils.isNotEmpty(query.getEVisaPdfUrl()) ? query.getEVisaPdfUrl() : query.getPdfUrl());
+
+//            List<WbsTreeContract> tableData = this.wbsTreeContractClient.queryProcessSubmitBusinessDataByPrimaKeyIdAndClassify(query.getWbsId().toString(), query.getClassify().toString());
+//            if(tableData != null && tableData.size() > 0){
+//                //转换数据
+//                TaskApprovalVO vo = new TaskApprovalVO();
+//                for(WbsTreeContract node : tableData){
+//                    vo.setApprovalFileList(node.getDeptName(), node.getPdfUrl());
+//                }
+//                return vo;
+//            }
         }
         return null;
     }
@@ -392,7 +395,7 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
         switch (task.getApprovalType()){
             case 1:
                 //资料填报
-                this.updateWriteBusinessDataStatus(task.getFormDataId(), status);
+                this.updateWriteBusinessDataStatus(task.getFormDataId(), status, newFileUrl);
                 break;
             case 2:
                 //工程文件
@@ -417,8 +420,8 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
     /**
      * 资料填报
      */
-    private void updateWriteBusinessDataStatus(String formDataId, Integer status){
-        this.informationQueryService.update(Wrappers.<InformationQuery>lambdaUpdate().set(InformationQuery::getStatus, status).in(InformationQuery::getId, Arrays.asList(formDataId.split(","))));
+    private void updateWriteBusinessDataStatus(String formDataId, Integer status, String newFileUrl){
+        this.informationQueryService.update(Wrappers.<InformationQuery>lambdaUpdate().set(InformationQuery::getStatus, status).eq(InformationQuery::getEVisaPdfUrl, newFileUrl).in(InformationQuery::getId, Arrays.asList(formDataId.split(","))));
     }
 
     /**

+ 2 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ManagerHomePageController.java

@@ -75,7 +75,8 @@ public class ManagerHomePageController extends BladeController {
             //设置参数
             result.forEach(vo -> reVO.setPfxList(vo.getProjectName(), vo.getEnterpriseCount(), vo.getPersonalCount()));
 
-
+            //统计证书
+            reVO.setPfxAmount(this.signPfxFileService.count());
 
         }
         return R.data(reVO);