cr 1 день тому
батько
коміт
2dfe940fff
16 змінених файлів з 612 додано та 25 видалено
  1. 34 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/TaskProgressDTO.java
  2. 67 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/TaskProgress.java
  3. 21 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/feign/TaskProgressClient.java
  4. 34 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/TaskProgressVO.java
  5. 4 4
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/TaskProgressVO1.java
  6. 137 0
      blade-service/blade-business/src/main/java/org/springblade/business/controller/TaskProgressController.java
  7. 26 0
      blade-service/blade-business/src/main/java/org/springblade/business/feignClient/TaskProgressClientImpl.java
  8. 51 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/TaskProgressMapper.java
  9. 40 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/TaskProgressMapper.xml
  10. 49 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/ITaskProgressService.java
  11. 2 1
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/InformationQueryServiceImpl.java
  12. 129 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TaskProgressServiceImpl.java
  13. 8 8
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TaskServiceImpl.java
  14. 4 11
      blade-service/blade-business/src/main/java/org/springblade/business/sync/TaskSync.java
  15. 4 0
      blade-service/blade-e-visa/src/main/java/org/springblade/evisa/service/impl/EVDataServiceImpl.java
  16. 2 1
      blade-service/blade-e-visa/src/main/java/org/springblade/evisa/service/impl/ScrDataServiceImpl.java

+ 34 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/TaskProgressDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.business.dto;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.business.entity.TaskProgress;
+
+/**
+ * 任务进度表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2025-10-15
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class TaskProgressDTO extends TaskProgress {
+	private static final long serialVersionUID = 1L;
+
+}

+ 67 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/TaskProgress.java

@@ -0,0 +1,67 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.business.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+
+import lombok.AllArgsConstructor;
+import lombok.NoArgsConstructor;
+import org.springblade.core.mp.base.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 任务进度表实体类
+ *
+ * @author BladeX
+ * @since 2025-10-15
+ */
+@Data
+@TableName("m_task_progress")
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+@AllArgsConstructor
+public class TaskProgress extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	private Long projectId;
+	private Long contractId;
+	/**
+	* 1.sava_again 2.re_sign 3.电签检测 4.一键电签
+	*/
+		private Integer type;
+	/**
+	* 任务总数
+	*/
+		private Integer taskTotal;
+	/**
+	* 已完成数
+	*/
+		private Integer finishTatol;
+	/**
+	* 是否已完成 0否 1是
+	*/
+		private Integer isFinish;
+	/**
+	 * 任务ID
+ 	 */
+		private String dataId;
+
+
+}

+ 21 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/feign/TaskProgressClient.java

@@ -0,0 +1,21 @@
+package org.springblade.business.feign;
+
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import static org.springblade.core.launch.constant.AppConstant.APPLICATION_NAME_PREFIX;
+
+@FeignClient(value = APPLICATION_NAME_PREFIX + "business")
+public interface TaskProgressClient {
+    /**
+     * 接口前缀
+     */
+    String API_PREFIX = "/api/business/taskProgress";
+
+    @GetMapping(API_PREFIX + "/addTaskProgress")
+    Boolean addTaskProgress(@RequestParam("projectId") Long projectId, @RequestParam("contractId") Long contractId, @RequestParam("type") Integer type, @RequestParam("size") Integer size, @RequestParam("dataIds") String dataIds);
+
+    @GetMapping(API_PREFIX + "/updateTaskProgress")
+    Boolean updateTaskProgress(@RequestParam("projectId") Long projectId,@RequestParam("contractId") Long contractId,@RequestParam("type") Integer type,@RequestParam("finishTotal") Integer finishTotal,@RequestParam("dataId") String dataId);
+}

+ 34 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/TaskProgressVO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.business.vo;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.business.entity.TaskProgress;
+
+/**
+ * 任务进度表视图实体类
+ *
+ * @author BladeX
+ * @since 2025-10-15
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class TaskProgressVO extends TaskProgress {
+	private static final long serialVersionUID = 1L;
+
+}

+ 4 - 4
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/TaskProgressVO1.java → blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/TaskProgressVO1.java

@@ -1,4 +1,4 @@
-package org.springblade.manager.vo;
+package org.springblade.business.vo;
 
 import lombok.AllArgsConstructor;
 import lombok.Data;
@@ -9,9 +9,9 @@ import lombok.NoArgsConstructor;
 @AllArgsConstructor
 public class TaskProgressVO1 {
 
-    private String finishCount;
+    private Integer finishCount;
 
-    private String totalCount;
+    private Integer totalCount;
 
-    private String pace;
+    private Double pace;
 }

+ 137 - 0
blade-service/blade-business/src/main/java/org/springblade/business/controller/TaskProgressController.java

@@ -0,0 +1,137 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.business.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.business.entity.TaskProgress;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.business.vo.TaskProgressVO1;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.business.vo.TaskProgressVO;
+import org.springblade.business.service.ITaskProgressService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+import java.util.Map;
+
+/**
+ * 任务进度表 控制器
+ *
+ * @author BladeX
+ * @since 2025-10-15
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/taskProgress")
+@Api(value = "任务进度表", tags = "任务进度表接口")
+public class TaskProgressController extends BladeController {
+
+	private final ITaskProgressService taskProgressService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入taskProgress")
+	public R<TaskProgress> detail(TaskProgress taskProgress) {
+		TaskProgress detail = taskProgressService.getOne(Condition.getQueryWrapper(taskProgress));
+		return R.data(detail);
+	}
+
+	@GetMapping("/getTaskProgress")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "获取进度", notes = "传入taskProgress")
+	public R<Map<String, TaskProgressVO1>> getTaskProgress(Long projectId, Long contractId){
+		return R.data(taskProgressService.selectNewTaskProgress(projectId,contractId));
+	}
+
+	/**
+	 * 分页 任务进度表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入taskProgress")
+	public R<IPage<TaskProgress>> list(TaskProgress taskProgress, Query query) {
+		IPage<TaskProgress> pages = taskProgressService.page(Condition.getPage(query), Condition.getQueryWrapper(taskProgress));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 任务进度表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入taskProgress")
+	public R<IPage<TaskProgressVO>> page(TaskProgressVO taskProgress, Query query) {
+		IPage<TaskProgressVO> pages = taskProgressService.selectTaskProgressPage(Condition.getPage(query), taskProgress);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 任务进度表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入taskProgress")
+	public R save(@Valid @RequestBody TaskProgress taskProgress) {
+		return R.status(taskProgressService.save(taskProgress));
+	}
+
+	/**
+	 * 修改 任务进度表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入taskProgress")
+	public R update(@Valid @RequestBody TaskProgress taskProgress) {
+		return R.status(taskProgressService.updateById(taskProgress));
+	}
+
+	/**
+	 * 新增或修改 任务进度表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入taskProgress")
+	public R submit(@Valid @RequestBody TaskProgress taskProgress) {
+		return R.status(taskProgressService.saveOrUpdate(taskProgress));
+	}
+
+	
+	/**
+	 * 删除 任务进度表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(taskProgressService.deleteLogic(Func.toLongList(ids)));
+	}
+
+	
+}

+ 26 - 0
blade-service/blade-business/src/main/java/org/springblade/business/feignClient/TaskProgressClientImpl.java

@@ -0,0 +1,26 @@
+package org.springblade.business.feignClient;
+
+import lombok.AllArgsConstructor;
+
+import org.springblade.business.feign.TaskProgressClient;
+import org.springblade.business.service.ITaskProgressService;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@AllArgsConstructor
+public class TaskProgressClientImpl implements TaskProgressClient {
+
+
+    private final ITaskProgressService taskProgressService;
+
+
+    @Override
+    public Boolean addTaskProgress(Long projectId, Long contractId, Integer type, Integer size,String dataIds) {
+       return taskProgressService.addTaskProgress(projectId, contractId, type, size,dataIds);
+    }
+
+    @Override
+    public Boolean updateTaskProgress(Long projectId, Long contractId, Integer type, Integer finishTotal,String dataId) {
+        return taskProgressService.updateTaskProgress(projectId, contractId, type, finishTotal,dataId);
+    }
+}

+ 51 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/TaskProgressMapper.java

@@ -0,0 +1,51 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.business.mapper;
+
+import org.apache.ibatis.annotations.Param;
+import org.springblade.business.entity.TaskProgress;
+import org.springblade.business.vo.TaskProgressVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.List;
+
+/**
+ * 任务进度表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2025-10-15
+ */
+public interface TaskProgressMapper extends BaseMapper<TaskProgress> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param taskProgress
+	 * @return
+	 */
+	List<TaskProgressVO> selectTaskProgressPage(IPage page, TaskProgressVO taskProgress);
+
+	TaskProgressVO selectNewTaskProgress(@Param("projectId") Long projectId, @Param("contractId") Long contractId,@Param("type") Integer type);
+
+	void addFinishTotalById(@Param("id") Long id, @Param("finishTotal") Integer finishTotal);
+
+	void checkAndUpdateIsFinish(@Param("id") Long id);
+
+	TaskProgressVO selectNewTaskProgress1(@Param("projectId") Long projectId, @Param("contractId") Long contractId, @Param("type") Integer type);
+}

+ 40 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/TaskProgressMapper.xml

@@ -0,0 +1,40 @@
+<?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.springblade.business.mapper.TaskProgressMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="taskProgressResultMap" type="org.springblade.business.entity.TaskProgress">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="project_id" property="projectId"/>
+        <result column="contract_id" property="contractId"/>
+        <result column="type" property="type"/>
+        <result column="task_total" property="taskTotal"/>
+        <result column="finish_tatol" property="finishTatol"/>
+        <result column="is_finish" property="isFinish"/>
+    </resultMap>
+    <update id="addFinishTotalById">
+        update m_task_progress set finish_tatol = finish_tatol + #{finishTotal} where id = #{id}
+    </update>
+    <update id="checkAndUpdateIsFinish">
+        update m_task_progress set is_finish = 1 where id = #{id} and finish_tatol >= task_total
+    </update>
+
+
+    <select id="selectTaskProgressPage" resultMap="taskProgressResultMap">
+        select * from m_task_progress where is_deleted = 0
+    </select>
+    <select id="selectNewTaskProgress" resultType="org.springblade.business.vo.TaskProgressVO">
+        select * from m_task_progress where is_deleted = 0 and project_id = #{projectId} and contract_id = #{contractId} and type = #{type} and is_finish=0 order by create_time desc limit 1
+    </select>
+    <select id="selectNewTaskProgress1" resultType="org.springblade.business.vo.TaskProgressVO">
+        select * from m_task_progress where is_deleted = 0 and project_id = #{projectId} and contract_id = #{contractId} and type = #{type}  order by create_time desc limit 1
+    </select>
+
+</mapper>

+ 49 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/ITaskProgressService.java

@@ -0,0 +1,49 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.business.service;
+
+import org.springblade.business.entity.TaskProgress;
+import org.springblade.business.vo.TaskProgressVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.business.vo.TaskProgressVO1;
+
+import java.util.Map;
+
+/**
+ * 任务进度表 服务类
+ *
+ * @author BladeX
+ * @since 2025-10-15
+ */
+public interface ITaskProgressService extends BaseService<TaskProgress> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param taskProgress
+	 * @return
+	 */
+	IPage<TaskProgressVO> selectTaskProgressPage(IPage<TaskProgressVO> page, TaskProgressVO taskProgress);
+
+	Map<String, TaskProgressVO1> selectNewTaskProgress(Long projectId, Long contractId);
+
+	Boolean updateTaskProgress(Long projectId,Long contractId,Integer type,Integer finishTotal,String dataId);
+
+	Boolean addTaskProgress(Long projectId,Long contractId,Integer type,Integer taskTotal,String dataIds);
+}

+ 2 - 1
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/InformationQueryServiceImpl.java

@@ -35,6 +35,7 @@ import org.springblade.manager.entity.TabBusstimeInfo;
 import org.springblade.manager.entity.WbsTreeContract;
 import org.springblade.manager.feign.ContractClient;
 import org.springblade.manager.feign.WbsTreeContractClient;
+import org.springblade.business.service.ITaskProgressService;
 import org.springblade.manager.vo.WbsTreeContractTreeVOS;
 import org.springblade.resource.feign.NewIOSSClient;
 import org.springblade.system.cache.ParamCache;
@@ -44,7 +45,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.redis.core.StringRedisTemplate;
 import org.springframework.jdbc.core.BeanPropertyRowMapper;
 import org.springframework.jdbc.core.JdbcTemplate;
-import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Service;
 
 import java.io.File;
@@ -83,6 +83,7 @@ public class InformationQueryServiceImpl extends BaseServiceImpl<InformationQuer
 
     private final JdbcTemplate jdbcTemplate;
     private final IOperationLogService operationLogService;
+    private final ITaskProgressService taskProgressService;
 
     @Autowired
     StringRedisTemplate RedisTemplate;

+ 129 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TaskProgressServiceImpl.java

@@ -0,0 +1,129 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.business.service.impl;
+
+import org.apache.commons.lang.StringUtils;
+import org.springblade.common.utils.SnowFlakeUtil;
+import org.springblade.business.entity.TaskProgress;
+import org.springblade.business.vo.TaskProgressVO;
+import org.springblade.business.mapper.TaskProgressMapper;
+import org.springblade.business.service.ITaskProgressService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.business.vo.TaskProgressVO1;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 任务进度表 服务实现类
+ *
+ * @author BladeX
+ * @since 2025-10-15
+ */
+@Service
+public class TaskProgressServiceImpl extends BaseServiceImpl<TaskProgressMapper, TaskProgress> implements ITaskProgressService {
+
+	@Override
+	public IPage<TaskProgressVO> selectTaskProgressPage(IPage<TaskProgressVO> page, TaskProgressVO taskProgress) {
+		return page.setRecords(baseMapper.selectTaskProgressPage(page, taskProgress));
+	}
+
+	@Override
+	public Map<String, TaskProgressVO1> selectNewTaskProgress(Long projectId, Long contractId) {
+		Map<String, TaskProgressVO1> map = new HashMap<>();
+		TaskProgressVO vo1 = baseMapper.selectNewTaskProgress1(projectId, contractId,1);
+		if(vo1!=null){
+			map.put("save-again", new TaskProgressVO1(vo1.getFinishTatol(),vo1.getTaskTotal(),vo1.getTaskTotal() > 0 ?
+					(double) vo1.getFinishTatol() / vo1.getTaskTotal() * 100 :
+					0.00));
+		}
+		TaskProgressVO vo2 = baseMapper.selectNewTaskProgress1(projectId, contractId,2);
+		if(vo2!=null){
+			map.put("re-sign", new TaskProgressVO1(vo2.getFinishTatol(),vo2.getTaskTotal(),vo2.getTaskTotal() > 0 ?
+					(double) vo2.getFinishTatol() / vo2.getTaskTotal() * 100 :
+					0.00));
+		}
+		TaskProgressVO vo3 = baseMapper.selectNewTaskProgress1(projectId, contractId,4);
+		if(vo3!=null){
+			map.put("electronic-sign", new TaskProgressVO1(vo3.getFinishTatol(),vo3.getTaskTotal(),vo3.getTaskTotal() > 0 ?
+					(double) vo3.getFinishTatol() / vo3.getTaskTotal() * 100 :
+					0.00));
+		}
+		return map;
+	}
+
+	/**
+	 * 完成任务后更新进度
+	 * @param projectId
+	 * @param contractId
+	 * @param type 1.sava_again 2.re_sign 3.电签检测 4.一键电签
+	 * @param finishTotal
+	 * @return
+	 */
+	public Boolean updateTaskProgress(Long projectId,Long contractId,Integer type,Integer finishTotal,String dataId) {
+		TaskProgressVO vo = baseMapper.selectNewTaskProgress(projectId, contractId,type);
+		if (vo==null) {
+			return false;
+		} else if (StringUtils.isNotEmpty(dataId)&&StringUtils.isNotEmpty(vo.getDataId())) {
+			if(!vo.getDataId().contains(dataId)){
+				return false;
+			}
+		}
+		if(vo.getIsFinish()!=1){
+			baseMapper.addFinishTotalById(vo.getId(),finishTotal);
+			baseMapper.checkAndUpdateIsFinish(vo.getId());
+		}
+		return true;
+	}
+
+	/**
+	 * 添加任务进度
+	 * @param projectId
+	 * @param contractId
+	 * @param type
+	 * @param taskTotal
+	 * @param dataIds
+	 * @return
+	 */
+	public Boolean addTaskProgress(Long projectId,Long contractId,Integer type,Integer taskTotal,String dataIds) {
+		TaskProgressVO vo = baseMapper.selectNewTaskProgress(projectId, contractId,type);
+		if(vo==null){
+			TaskProgress progress = new TaskProgress();
+			progress.setId(SnowFlakeUtil.getId());
+			progress.setProjectId(projectId);
+			progress.setContractId(contractId);
+			progress.setType(type);
+			progress.setTaskTotal(taskTotal);
+			progress.setFinishTatol(0);
+			progress.setIsFinish(0);
+			if(StringUtils.isNotEmpty(dataIds)){
+				progress.setDataId(dataIds);
+			}
+			baseMapper.insert(progress);
+		}else {
+			vo.setTaskTotal(vo.getTaskTotal()+taskTotal);
+			if(StringUtils.isNotEmpty(dataIds)){
+				vo.setDataId(vo.getDataId()+","+dataIds);
+			}
+			baseMapper.updateById(vo);
+		}
+		return true;
+	}
+}

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

@@ -5,7 +5,6 @@ import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
-import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import lombok.AllArgsConstructor;
@@ -22,7 +21,6 @@ import org.springblade.business.feignClient.WbsTreeContractStatisticsClientImpl;
 import org.springblade.business.mapper.TaskMapper;
 import org.springblade.business.mapper.TrialSelfInspectionRecordMapper;
 import org.springblade.business.service.*;
-import org.springblade.business.sync.TaskSync;
 import org.springblade.business.utils.FileUtils;
 import org.springblade.business.vo.*;
 import org.springblade.common.constant.CommonConstant;
@@ -31,7 +29,6 @@ import org.springblade.common.utils.SnowFlakeUtil;
 import org.springblade.core.log.exception.ServiceException;
 import org.springblade.core.mp.base.BaseServiceImpl;
 import org.springblade.core.oss.model.BladeFile;
-import org.springblade.core.redis.cache.BladeRedis;
 import org.springblade.core.secure.BladeUser;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.secure.utils.SecureUtil;
@@ -46,10 +43,7 @@ import org.springblade.flow.core.feign.IFlowClient;
 import org.springblade.flow.core.feign.NewFlowClient;
 import org.springblade.flow.core.utils.FlowUtil;
 
-import org.springblade.manager.entity.ContractInfo;
-import org.springblade.manager.entity.ProjectInfo;
-import org.springblade.manager.entity.TabBusstimeInfo;
-import org.springblade.manager.entity.WbsTreeContract;
+import org.springblade.manager.entity.*;
 import org.springblade.manager.feign.*;
 import org.springblade.manager.vo.AppWbsTreeContractVO;
 import org.springblade.manager.vo.WbsTreePrivateVO4;
@@ -146,6 +140,8 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
 
     private final ITrialSelfInspectionRecordService iTrialSelfInspectionRecordService;
 
+    private final ITaskProgressService taskProgressService;
+
 
     @Override
     public List<TaskParallel> queryApprovalUser(String formDataIds) {
@@ -1976,6 +1972,7 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
                     .in(InformationQuery::getId, newIds));
             List<InformationQuery> list = informationQueryService.list(new LambdaQueryWrapper<>(InformationQuery.class).in(InformationQuery::getId, newIds));
             recordResignLog("save-again", StringUtils.join(newIds, ","), list, dtos, dtos.get(0).getProjectId()+"", dtos.get(0).getContractId()+"");
+            taskProgressService.addTaskProgress(dtos.get(0).getProjectId(), dtos.get(0).getContractId(), 1,dtos.size(),null);
         }
         return R.success("操作成功");
     }
@@ -2000,6 +1997,7 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
         //查询任务信息
         List<Task> taskList = jdbcTemplate.query("select * from u_task where id in(" + taskIds + ")", new BeanPropertyRowMapper<>(Task.class));
         if (taskList.size() > 0) {
+            taskProgressService.addTaskProgress(Long.parseLong(projectId), Long.parseLong(contractId), 2,taskList.size(),null);
             //获取任务详情信息Map
             Set<String> processInstanceIds = taskList.stream().map(Task::getProcessInstanceId).collect(Collectors.toSet());
             Map<String, List<TaskParallel>> taskParallelGroupMap = new HashMap<>();
@@ -2223,6 +2221,7 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
                                 .set(TaskParallel::getEVisaContent, "重新保存PDF失败")
                                 .eq(TaskParallel::getProcessInstanceId, task.getProcessInstanceId()));
                     }
+                    taskProgressService.updateTaskProgress(Long.parseLong(task.getProjectId()), Long.parseLong(task.getContractId()), 2, 1,null);
                 }
                 //获取当前操作人
                 Long userId = AuthUtil.getUserId(request);
@@ -2345,7 +2344,7 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
             }
             ids2 = ids2.substring(0, ids2.length() - 1);
         }
-        List<InformationQuery> queryList = jdbcTemplate.query("select id, e_visa_pdf_url, status from u_information_query where id in( " + ids + ") and is_deleted=0 and status in (1,2)", new BeanPropertyRowMapper<>(InformationQuery.class));
+        List<InformationQuery> queryList = jdbcTemplate.query("select id, e_visa_pdf_url, status ,project_id,contract_id from u_information_query where id in( " + ids + ") and is_deleted=0 and status in (1,2)", new BeanPropertyRowMapper<>(InformationQuery.class));
         String sqlqu = "update u_information_query set status=2,e_visa_pdf_url='' where id in( " + ids + ") and is_deleted=0 and status in (1,2)";
         String sqlForTask = "update u_task set status=2 where form_data_id in( " + ids2 + ") and status in(1,2) and is_deleted=0 ";
         String sqlForTaskPall = "update u_task_parallel a INNER JOIN u_task b on a.process_instance_id = b.process_instance_id set a.is_resign = 1, a.`status`=2 , a.e_visa_status=1 ,a.e_visa_content='电签成功' where b.form_data_id in( " + ids2 + ") and b.status in(0,1,2) and b.is_deleted = 0 and a.`status` in(0,1)";
@@ -2373,6 +2372,7 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
             requestMap.put("userIds", userIds);
             recordResignLog("一键重签", ids, queryList, requestMap, null, null);
         }
+        taskProgressService.addTaskProgress(queryList.get(0).getProjectId(), queryList.get(0).getContractId(), 4,queryList.size(),ids);
         return R.success("操作成功");
     }
 

+ 4 - 11
blade-service/blade-business/src/main/java/org/springblade/business/sync/TaskSync.java

@@ -1,26 +1,18 @@
 package org.springblade.business.sync;
 
 import cn.hutool.core.date.DateTime;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.google.common.collect.Lists;
 import lombok.AllArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
-import org.springblade.business.dto.reSigningEVisaStatus;
 import org.springblade.business.entity.InformationQuery;
-import org.springblade.business.service.IInformationQueryFileService;
 import org.springblade.business.service.IInformationQueryService;
 import org.springblade.common.utils.SystemUtils;
-import org.springblade.core.log.exception.ServiceException;
-import org.springblade.core.redis.cache.BladeRedis;
 import org.springblade.core.tool.api.R;
-import org.springblade.manager.entity.WbsTreeSynchronousRecord;
 import org.springblade.manager.feign.ExcelTabClient;
+import org.springblade.business.feign.TaskProgressClient;
 import org.springblade.system.user.feign.IUserClient;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
@@ -29,7 +21,6 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.ThreadPoolExecutor;
-import java.util.stream.Collectors;
 
 /**
  * @author LHB
@@ -49,6 +40,8 @@ public class TaskSync {
     @Resource
     private IUserClient userClient;
 
+    private final TaskProgressClient taskProgressClient;
+
 
     public void reSigningEVisaStatusSync(InformationQuery dto, String header) {
         log.info("数据正在重刷,线程名称:{}", Thread.currentThread().getName());
@@ -75,7 +68,7 @@ public class TaskSync {
         }
         lambda.set(InformationQuery::getUpdateTime, DateTime.now());
         lambda.eq(InformationQuery::getId, dto.getId());
-
+        taskProgressClient.updateTaskProgress(dto.getProjectId(), dto.getContractId(), 1, 1,null);
         informationQueryService.update(lambda);
         log.info("数据重刷完毕,线程名称:{}", Thread.currentThread().getName());
     }

+ 4 - 0
blade-service/blade-e-visa/src/main/java/org/springblade/evisa/service/impl/EVDataServiceImpl.java

@@ -15,6 +15,7 @@ import org.springblade.business.entity.InformationQuery;
 import org.springblade.business.entity.TrialSelfInspectionRecord;
 import org.springblade.business.feign.MessageWarningClient;
 import org.springblade.business.feign.TaskClient;
+import org.springblade.business.feign.TaskProgressClient;
 import org.springblade.business.vo.TaskSignInfoVO;
 import org.springblade.business.vo.TrialRawMaterialSelfRecord;
 import org.springblade.common.constant.CommonConstant;
@@ -69,6 +70,8 @@ public class EVDataServiceImpl implements EVDataService {
     @Autowired
      private final MessageWarningClient messageWarningClient;
 
+    private final TaskProgressClient taskProgressClient;
+
     /**
      * 电签主要流程
      *
@@ -381,6 +384,7 @@ public class EVDataServiceImpl implements EVDataService {
                     this.jdbcTemplate.execute("update u_information_query set status=1 where id=" + taskApp.getFormDataId());
                 }
             }
+            taskProgressClient.updateTaskProgress(Long.parseLong(taskApp.getProjectId()), Long.parseLong(taskApp.getContractId()), 4, 1, taskApp.getFormDataId());
             RedisTemplate.delete("sign-" + taskApp.getFormDataId());
             RedisTemplate.opsForList().rightPush("blade:statistics:information_query_statistics_key", taskApp.getFormDataId());
             Thread.sleep(1000);

+ 2 - 1
blade-service/blade-e-visa/src/main/java/org/springblade/evisa/service/impl/ScrDataServiceImpl.java

@@ -10,10 +10,10 @@ import org.springblade.business.vo.ScrSignInfoVO;
 import org.springblade.common.utils.CommonUtil;
 import org.springblade.core.tool.utils.CollectionUtil;
 import org.springblade.core.tool.utils.Func;
-import org.springblade.core.tool.utils.StringUtil;
 import org.springblade.evisa.service.ScrDataService;
 import org.springblade.evisa.utils.PdfAddimgUtil;
 import org.springblade.evisa.vo.SignKeyVO;
+import org.springblade.business.feign.TaskProgressClient;
 import org.springblade.manager.vo.PDFIndexInfo;
 import org.springframework.data.redis.core.StringRedisTemplate;
 import org.springframework.jdbc.core.JdbcTemplate;
@@ -29,6 +29,7 @@ public class ScrDataServiceImpl implements ScrDataService {
 
     private final JdbcTemplate jdbcTemplate;
     private final StringRedisTemplate RedisTemplate;
+
     // 主流程
     @Override
     public void sctTaskBatch(ScrSignInfoVO taskApp) throws Exception {