Browse Source

修改--JPA查询中的数据类型不匹配

buzhanyi 7 months ago
parent
commit
3d14f54c82

+ 1 - 1
application-webadmin/src/main/java/com/ankaibei/workFlow/webadmin/ankaibei/api/TaskInfoApi.java

@@ -24,5 +24,5 @@ public interface TaskInfoApi extends ApiMixin<TaskInfoVo, Integer> {
 
     ResMsg deleteTask(List<TaskInfoVo> taskInfoVos);
 
-    ResMsg findTaskIsFinish(String userId, String flowTaskStatus);
+    ResMsg findTaskIsFinish(String userId, Integer flowTaskStatus);
 }

+ 1 - 1
application-webadmin/src/main/java/com/ankaibei/workFlow/webadmin/ankaibei/api/TaskInfoServiceApi.java

@@ -50,7 +50,7 @@ public class TaskInfoServiceApi implements TaskInfoApi {
     }
 
     @Override
-    public ResMsg findTaskIsFinish(String userId, String flowTaskStatus) {
+    public ResMsg findTaskIsFinish(String userId, Integer flowTaskStatus) {
         return taskInfoService.findTaskIsFinish(userId, flowTaskStatus);
     }
 

+ 1 - 1
application-webadmin/src/main/java/com/ankaibei/workFlow/webadmin/ankaibei/controller/TaskInfoController.java

@@ -96,7 +96,7 @@ public class TaskInfoController {
     @RequestMapping("/findTaskIsFinish")
     public ResMsg findTaskIsFinish() {
         String userId = TokenData.takeFromRequest().getUserId();
-        return taskInfoApi.findTaskIsFinish(userId, FlowTaskStatus.FINISHED + "");
+        return taskInfoApi.findTaskIsFinish(userId, FlowTaskStatus.FINISHED);
     }
 
 

+ 1 - 1
application-webadmin/src/main/java/com/ankaibei/workFlow/webadmin/ankaibei/mapper/TaskInfoMapper.java

@@ -94,5 +94,5 @@ public interface TaskInfoMapper extends JpaRepository<TaskInfoEntity, Integer>,
      * 查询改用户提交的审核已完成的任务
      */
     @Query
-    List<TaskInfoEntity> findAllByTaskParticipantContainsAndFlowTaskStatusEquals(String userId, String flowTaskStatus);
+    List<TaskInfoEntity> findAllByTaskParticipantContainsAndFlowTaskStatusEquals(String userId, Integer flowTaskStatus);
 }

+ 1 - 1
application-webadmin/src/main/java/com/ankaibei/workFlow/webadmin/ankaibei/service/TaskInfoService.java

@@ -61,5 +61,5 @@ public interface TaskInfoService {
      * @param flowTaskStatus
      * @return
      */
-    ResMsg findTaskIsFinish(String userId, String flowTaskStatus);
+    ResMsg findTaskIsFinish(String userId, Integer flowTaskStatus);
 }

+ 1 - 1
application-webadmin/src/main/java/com/ankaibei/workFlow/webadmin/ankaibei/service/impl/ManHourServiceImpl.java

@@ -66,7 +66,7 @@ public class ManHourServiceImpl implements ManHourService {
         Page<Map<String, String>> manHourAll = manHourMapper.findManHourAll(userId, manHourInfoEntity.getFlowTaskStatus(), manHourInfoEntity.getStartDate(), endDate, page);
         //匹配项目信息和任务信息
         List<ProjectInfoEntity> projectInfos = projectInfoMapper.findAll();
-        List<TaskInfoEntity> finishedTasks = taskInfoMapper.findAllByTaskParticipantContainsAndFlowTaskStatusEquals(userId, FlowTaskStatus.FINISHED + "");
+        List<TaskInfoEntity> finishedTasks = taskInfoMapper.findAllByTaskParticipantContainsAndFlowTaskStatusEquals(userId, FlowTaskStatus.FINISHED);
         return new ResMsg(CodeEnum.OK, ResMsg.getMap(manHourAll.map(map -> {
             Map<Object, Object> map1 = new HashMap<>(map);
             for (TaskInfoEntity task : finishedTasks) {

+ 1 - 1
application-webadmin/src/main/java/com/ankaibei/workFlow/webadmin/ankaibei/service/impl/TaskInfoServiceImpl.java

@@ -260,7 +260,7 @@ public class TaskInfoServiceImpl implements TaskInfoService {
     }
 
     @Override
-    public ResMsg findTaskIsFinish(String userId, String flowTaskStatus) {
+    public ResMsg findTaskIsFinish(String userId, Integer flowTaskStatus) {
         List<TaskInfoEntity> contains = taskInfoMapper.findAllByTaskParticipantContainsAndFlowTaskStatusEquals(userId, flowTaskStatus);
         return new ResMsg(CodeEnum.OK, contains);
     }

+ 4 - 4
common/common-flow/src/main/java/com/ankaibei/workFlow/common/flow/constant/FlowTaskStatus.java

@@ -14,19 +14,19 @@ public final class FlowTaskStatus {
     /**
      * 已提交。
      */
-    public static final int SUBMITTED = 0;
+    public static final Integer SUBMITTED = 0;
     /**
      * 审批中。
      */
-    public static final int APPROVING = 1;
+    public static final Integer APPROVING = 1;
     /**
      * 被拒绝。
      */
-    public static final int REFUSED = 2;
+    public static final Integer REFUSED = 2;
     /**
      * 已结束。
      */
-    public static final int FINISHED = 3;
+    public static final Integer FINISHED = 3;
     /**
      * 提前停止。
      */