Browse Source

电签相关

huangjn 3 years ago
parent
commit
9d3c39143a
24 changed files with 729 additions and 137 deletions
  1. 34 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/AssessmentUserDTO.java
  2. 57 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/AssessmentUser.java
  3. 50 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/feign/OpinionUserClient.java
  4. 34 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/AssessmentUserVO.java
  5. 57 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/AssessmentUserVOS.java
  6. 48 0
      blade-service/blade-business/src/main/java/org/springblade/business/feignClient/OpinionUserClientImpl.java
  7. 42 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/AssessmentUserMapper.java
  8. 25 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/AssessmentUserMapper.xml
  9. 5 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/UserOpinionFlowMapper.java
  10. 84 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/UserOpinionFlowMapper.xml
  11. 41 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/IAssessmentUserService.java
  12. 5 6
      blade-service/blade-business/src/main/java/org/springblade/business/service/IUserOpinionFlowService.java
  13. 41 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/AssessmentUserServiceImpl.java
  14. 21 10
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/UserOpinionFlowServiceImpl.java
  15. 116 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/AssessmentUserController.java
  16. 1 93
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/SignPfxDeputyController.java
  17. 0 27
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ProjectInfoMapper.xml
  18. 3 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/SaveUserInfoByProjectMapper.java
  19. 22 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/SaveUserInfoByProjectMapper.xml
  20. 2 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/SignPfxFileMapper.java
  21. 19 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/SignPfxFileMapper.xml
  22. 3 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/SaveUserInfoByProjectService.java
  23. 13 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ProjectInfoServiceImpl.java
  24. 6 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/SaveUserInfoByProjectServiceImpl.java

+ 34 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/AssessmentUserDTO.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 org.springblade.business.entity.AssessmentUser;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2022-06-29
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class AssessmentUserDTO extends AssessmentUser {
+	private static final long serialVersionUID = 1L;
+
+}

+ 57 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/AssessmentUser.java

@@ -0,0 +1,57 @@
+/*
+ *      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 io.swagger.annotations.ApiModelProperty;
+import org.springblade.core.mp.base.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 实体类
+ *
+ * @author BladeX
+ * @since 2022-06-29
+ */
+@Data
+@TableName("u_assessment_user")
+@EqualsAndHashCode(callSuper = true)
+public class AssessmentUser extends BaseEntity {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * user_opinion_flow表id
+     */
+    @ApiModelProperty("分页上的uoFlowId")
+    private Long userOpinionFlowId;
+    /**
+     * 考核金额(元)
+     */
+    @ApiModelProperty("考核金额(元)")
+    private String assessmentMoney;
+    /**
+     * 考核原因
+     */
+    @ApiModelProperty("考核原因")
+    private String assessmentContent;
+
+}

+ 50 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/feign/OpinionUserClient.java

@@ -0,0 +1,50 @@
+package org.springblade.business.feign;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.business.entity.AssessmentUser;
+import org.springblade.business.vo.AssessmentUserVOS;
+import org.springblade.common.constant.BusinessConstant;
+import org.springblade.core.tool.api.R;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springblade.core.mp.support.Query;
+
+@FeignClient(value = BusinessConstant.APPLICATION_WEATHER_NAME)
+public interface OpinionUserClient {
+
+    /**
+     * 接口前缀
+     */
+    String API_PREFIX = "/api/business/opinionUser";
+
+    @PostMapping(API_PREFIX + "/cancelAssessment")
+    Boolean cancelAssessment(@RequestParam Long id);
+
+    /**
+     * 新增考核
+     */
+    @PostMapping(API_PREFIX + "/getById")
+    AssessmentUser getById(@RequestParam Long id);
+
+    /**
+     * 新增考核
+     */
+    @PostMapping(API_PREFIX + "/updateUserAssessment")
+    Boolean updateUserAssessment(@RequestBody AssessmentUser assessmentUser);
+
+    /**
+     * 新增考核
+     */
+    @PostMapping(API_PREFIX + "/saveUserAssessment")
+    Boolean saveUserAssessment(@RequestBody AssessmentUser assessmentUser);
+
+    /**
+     * 获取考核区列表
+     */
+    @GetMapping(API_PREFIX + "/queryUserAssessmentPage")
+    R<IPage<AssessmentUserVOS>> queryUserAssessmentPage(@RequestParam Query query, @RequestParam AssessmentUserVOS vo);
+
+}

+ 34 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/AssessmentUserVO.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 org.springblade.business.entity.AssessmentUser;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 视图实体类
+ *
+ * @author BladeX
+ * @since 2022-06-29
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class AssessmentUserVO extends AssessmentUser {
+	private static final long serialVersionUID = 1L;
+
+}

+ 57 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/AssessmentUserVOS.java

@@ -0,0 +1,57 @@
+package org.springblade.business.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Data
+public class AssessmentUserVOS {
+
+    @ApiModelProperty("当前页")
+    private Integer current;
+
+    @ApiModelProperty("每页数量")
+    private Integer size;
+
+    @ApiModelProperty("处理流程ID")
+    private Long uoFlowId;
+
+    @ApiModelProperty("考核记录ID")
+    private Long assessmentId;
+
+    @ApiModelProperty("考核时间")
+    private String createTime;
+
+    @ApiModelProperty("考核金额")
+    private String assessmentMoney;
+
+    @ApiModelProperty("考核原因")
+    private String assessmentContent;
+
+    @ApiModelProperty("项目名称")
+    private String projectName;
+
+    @ApiModelProperty("合同段名称")
+    private String contractName;
+
+    @ApiModelProperty("消息ID")
+    private Long userOpinionId;
+
+    @ApiModelProperty("问题描述")
+    private String opinionContent;
+
+    @ApiModelProperty("用户ID,查询条件,为空则查询所有,有值则查询具体人员")
+    private Long userId;
+
+    @ApiModelProperty("图片路径")
+    private List<String> fileUrlList = new ArrayList<>();
+
+    @ApiModelProperty("考核开始时间,查询条件,传 yyyy-MM-dd hh:mm")
+    private String startTime;
+
+    @ApiModelProperty("考核结束时间,查询条件,传 yyyy-MM-dd hh:mm")
+    private String endTime;
+
+}

+ 48 - 0
blade-service/blade-business/src/main/java/org/springblade/business/feignClient/OpinionUserClientImpl.java

@@ -0,0 +1,48 @@
+package org.springblade.business.feignClient;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import lombok.AllArgsConstructor;
+import org.springblade.business.entity.AssessmentUser;
+import org.springblade.business.feign.OpinionUserClient;
+import org.springblade.business.service.IAssessmentUserService;
+import org.springblade.business.service.IUserOpinionFlowService;
+import org.springblade.business.vo.AssessmentUserVOS;
+import org.springblade.core.tool.api.R;
+import org.springframework.web.bind.annotation.RestController;
+
+import org.springblade.core.mp.support.Query;
+
+@RestController
+@AllArgsConstructor
+public class OpinionUserClientImpl implements OpinionUserClient {
+
+    private final IUserOpinionFlowService userOpinionFlowService;
+
+    private final IAssessmentUserService assessmentUserService;
+
+    @Override
+    public Boolean cancelAssessment(Long id) {
+        return this.assessmentUserService.update(Wrappers.<AssessmentUser>lambdaUpdate().set(AssessmentUser::getIsDeleted, 1).eq(AssessmentUser::getId, id));
+    }
+
+    @Override
+    public AssessmentUser getById(Long id) {
+        return this.assessmentUserService.getById(id);
+    }
+
+    @Override
+    public Boolean updateUserAssessment(AssessmentUser assessmentUser) {
+        return this.assessmentUserService.update(Wrappers.<AssessmentUser>lambdaUpdate().set(AssessmentUser::getAssessmentContent, assessmentUser.getAssessmentContent()).set(AssessmentUser::getAssessmentMoney, assessmentUser.getAssessmentMoney()).eq(AssessmentUser::getId, assessmentUser.getId()));
+    }
+
+    @Override
+    public Boolean saveUserAssessment(AssessmentUser assessmentUser) {
+        return this.assessmentUserService.save(assessmentUser);
+    }
+
+    @Override
+    public R<IPage<AssessmentUserVOS>> queryUserAssessmentPage(Query query, AssessmentUserVOS vo) {
+        return this.userOpinionFlowService.queryUserAssessmentPage(query, vo);
+    }
+}

+ 42 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/AssessmentUserMapper.java

@@ -0,0 +1,42 @@
+/*
+ *      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.springblade.business.entity.AssessmentUser;
+import org.springblade.business.vo.AssessmentUserVOS;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ *  Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-06-29
+ */
+public interface AssessmentUserMapper extends BaseMapper<AssessmentUser> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param assessmentUser
+	 * @return
+	 */
+	List<AssessmentUserVOS> selectAssessmentUserPage(IPage page, AssessmentUserVOS assessmentUser);
+
+}

+ 25 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/AssessmentUserMapper.xml

@@ -0,0 +1,25 @@
+<?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.AssessmentUserMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="assessmentUserResultMap" type="org.springblade.business.entity.AssessmentUser">
+        <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="user_opinion_flow_id" property="userOpinionFlowId"/>
+        <result column="assessment_money" property="assessmentMoney"/>
+        <result column="assessment_content" property="assessmentContent"/>
+    </resultMap>
+
+
+    <select id="selectAssessmentUserPage" resultMap="assessmentUserResultMap">
+        select * from u_assessment_user where is_deleted = 0
+    </select>
+
+</mapper>

+ 5 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/UserOpinionFlowMapper.java

@@ -18,6 +18,7 @@ package org.springblade.business.mapper;
 
 import org.apache.ibatis.annotations.Param;
 import org.springblade.business.entity.UserOpinionFlow;
+import org.springblade.business.vo.AssessmentUserVOS;
 import org.springblade.business.vo.UserOpinionFlowVO;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -31,6 +32,10 @@ import java.util.List;
  */
 public interface UserOpinionFlowMapper extends BaseMapper<UserOpinionFlow> {
 
+	Integer countUserAssessmentPage(@Param("vo") AssessmentUserVOS vo);
+
+	List<AssessmentUserVOS> queryUserAssessmentPage(@Param("current")Long current, @Param("size")Long size, @Param("vo") AssessmentUserVOS vo);
+
 	UserOpinionFlow queryLeftFlowManageUser(@Param("number")Integer number, @Param("userOpinionId")String userOpinionId);
 
 	List<UserOpinionFlow> queryCurrentUserOpinionFlowByUserOpinionId(@Param("key")String userOpinionId, @Param("number")Integer number);

+ 84 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/UserOpinionFlowMapper.xml

@@ -25,6 +25,90 @@
         <result column="manage_time" property="manageTime"/>
     </resultMap>
 
+    <resultMap id="AssessmentUserVOMap" type="org.springblade.business.vo.AssessmentUserVOS">
+        <result column="uoFlowId" property="uoFlowId"/>
+        <result column="assessmentId" property="assessmentId"/>
+        <result column="createTime" property="createTime"/>
+        <result column="assessmentMoney" property="assessmentMoney"/>
+        <result column="assessmentContent" property="assessmentContent"/>
+        <result column="projectName" property="projectName"/>
+        <result column="contractName" property="contractName"/>
+        <result column="userOpinionId" property="userOpinionId"/>
+        <result column="opinionContent" property="opinionContent"/>
+    </resultMap>
+
+    <select id="countUserAssessmentPage" resultType="java.lang.Integer">
+        select
+          count(result.id)
+        from
+        (
+            select id,date_format(create_time,'%Y-%m-%d %H:%i') as createTime from u_user_opinion_flow where
+                is_deleted = 0
+                /*查最后环节*/
+                and sort = 4
+                /*最后环节已经结束*/
+                and is_current = 2
+                /*属于不满意并投诉*/
+                and evaluation = 3
+            <if test="vo.userId != null">
+                and manage_user = #{vo.userId}
+            </if>
+        ) AS result
+        where
+        1 = 1
+        <if test="vo.startTime != null and vo.startTime != '' and vo.endTime != null and vo.endTime != ''">
+            and result.createTime between #{vo.startTime} and #{vo.endTime}
+        </if>
+    </select>
+
+    <select id="queryUserAssessmentPage" resultMap="AssessmentUserVOMap">
+        select
+          result.uoFlowId,
+          result.assessmentId,
+          result.createTime,
+          result.assessmentMoney,
+          result.assessmentContent,
+          result.projectName,
+          result.contractName,
+          result.userOpinionId,
+          result.opinionContent
+        from (
+            select
+                uof.id AS uoFlowId,
+                au.id AS assessmentId,
+                date_format(au.create_time,'%Y-%m-%d %H:%i') as createTime
+                au.assessment_money AS assessmentMoney
+                au.assessment_content AS assessmentContent,
+                pi.project_name AS projectName,
+                ci.contract_name AS contractName,
+                uo.id AS userOpinionId,
+                uo.opinion_content AS opinionContent
+            from
+              u_user_opinion_flow AS uof
+            left join u_assessment_user AS au on uof.id = au.user_opinion_flow_id
+            right join u_user_opinion AS uo on uof.user_opinion_id = uo.id
+            left join m_project_info AS pi on uo.project_id = pi.id
+            left join m_contract_info AS ci on uo.contract_id = ci.id
+            where
+              uof.is_deleted = 0 and au.is_deleted = 0 and uo.is_deleted = 0
+            /*查最后环节*/
+            and uof.sort = 4
+            /*最后环节已经结束*/
+            and uof.is_current = 2
+            /*属于不满意并投诉*/
+            and uof.evaluation = 3
+            <if test="vo.userId != null">
+                and uof.manage_user = #{vo.userId}
+            </if>
+        ) AS result
+        where
+          1 = 1
+        <if test="vo.startTime != null and vo.startTime != '' and vo.endTime != null and vo.endTime != ''">
+            and result.createTime between #{vo.startTime} and #{vo.endTime}
+        </if>
+        limit #{current},#{size}
+    </select>
+
     <select id="queryLeftFlowManageUser" resultMap="userOpinionFlowResultMap">
         select id,manage_user,manage_user_name,manage_user_phone from u_user_opinion_flow where is_deleted = 0 and number = #{number} and sort = 2 and user_opinion_id = #{userOpinionId}
     </select>

+ 41 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/IAssessmentUserService.java

@@ -0,0 +1,41 @@
+/*
+ *      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.AssessmentUser;
+import org.springblade.business.vo.AssessmentUserVOS;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ *  服务类
+ *
+ * @author BladeX
+ * @since 2022-06-29
+ */
+public interface IAssessmentUserService extends BaseService<AssessmentUser> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param assessmentUser
+	 * @return
+	 */
+	IPage<AssessmentUserVOS> selectAssessmentUserPage(IPage<AssessmentUserVOS> page, AssessmentUserVOS assessmentUser);
+
+}

+ 5 - 6
blade-service/blade-business/src/main/java/org/springblade/business/service/IUserOpinionFlowService.java

@@ -17,10 +17,12 @@
 package org.springblade.business.service;
 
 import org.springblade.business.entity.UserOpinionFlow;
+import org.springblade.business.vo.AssessmentUserVOS;
 import org.springblade.business.vo.UserOpinionFlowVO;
 import org.springblade.core.mp.base.BaseService;
 import com.baomidou.mybatisplus.core.metadata.IPage;
-
+import org.springblade.core.tool.api.R;
+import org.springblade.core.mp.support.Query;
 import java.util.List;
 
 /**
@@ -31,6 +33,8 @@ import java.util.List;
  */
 public interface IUserOpinionFlowService extends BaseService<UserOpinionFlow> {
 
+	R<IPage<AssessmentUserVOS>> queryUserAssessmentPage(Query query, AssessmentUserVOS vo);
+
 	/**
 	 * 获取前一个流程的维护人员
 	 * @param number 流程次数
@@ -48,9 +52,4 @@ public interface IUserOpinionFlowService extends BaseService<UserOpinionFlow> {
 
 	Integer selectIsSolveByUserOpinionKey(Long userOpinionKey);
 
-	/**
-	 * 自定义分页
-	 */
-	IPage<UserOpinionFlowVO> selectUserOpinionFlowPage(IPage<UserOpinionFlowVO> page, UserOpinionFlowVO userOpinionFlow);
-
 }

+ 41 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/AssessmentUserServiceImpl.java

@@ -0,0 +1,41 @@
+/*
+ *      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.springblade.business.entity.AssessmentUser;
+import org.springblade.business.vo.AssessmentUserVOS;
+import org.springblade.business.mapper.AssessmentUserMapper;
+import org.springblade.business.service.IAssessmentUserService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ *  服务实现类
+ *
+ * @author BladeX
+ * @since 2022-06-29
+ */
+@Service
+public class AssessmentUserServiceImpl extends BaseServiceImpl<AssessmentUserMapper, AssessmentUser> implements IAssessmentUserService {
+
+	@Override
+	public IPage<AssessmentUserVOS> selectAssessmentUserPage(IPage<AssessmentUserVOS> page, AssessmentUserVOS assessmentUser) {
+		return page.setRecords(baseMapper.selectAssessmentUserPage(page, assessmentUser));
+	}
+
+}

+ 21 - 10
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/UserOpinionFlowServiceImpl.java

@@ -19,15 +19,17 @@ package org.springblade.business.service.impl;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import org.springblade.business.entity.UserOpinionFlow;
+import org.springblade.business.vo.AssessmentUserVOS;
 import org.springblade.business.vo.UserOpinionFlowVO;
 import org.springblade.business.mapper.UserOpinionFlowMapper;
 import org.springblade.business.service.IUserOpinionFlowService;
 import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springframework.beans.BeanUtils;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.tool.api.R;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.core.metadata.IPage;
-
 import java.util.List;
+import org.springblade.core.mp.support.Query;
 
 /**
  * 用户意见处理流程表 服务实现类
@@ -38,6 +40,22 @@ import java.util.List;
 @Service
 public class UserOpinionFlowServiceImpl extends BaseServiceImpl<UserOpinionFlowMapper, UserOpinionFlow> implements IUserOpinionFlowService {
 
+	@Override
+	public R<IPage<AssessmentUserVOS>> queryUserAssessmentPage(Query query, AssessmentUserVOS vo) {
+		//设置分页信息
+		IPage<AssessmentUserVOS> page = Condition.getPage(query);
+		long current = (page.getCurrent() - 1L) * page.getSize();
+		//查询总量
+		Integer count = this.baseMapper.countUserAssessmentPage(vo);
+		//获取分页
+		List<AssessmentUserVOS> result = this.baseMapper.queryUserAssessmentPage(current, page.getSize(), vo);
+
+		page.setTotal(count);
+		page.setRecords(result);
+
+		return R.data(page);
+	}
+
 	@Override
 	public UserOpinionFlow queryLeftFlowManageUser(Integer number, String userOpinionId) {
 		return this.baseMapper.queryLeftFlowManageUser(number, userOpinionId);
@@ -47,9 +65,7 @@ public class UserOpinionFlowServiceImpl extends BaseServiceImpl<UserOpinionFlowM
 	public List<UserOpinionFlowVO> queryCurrentUserOpinionFlowByUserOpinionId(String userOpinionId, Integer number) {
 		List<UserOpinionFlow> result = this.baseMapper.queryCurrentUserOpinionFlowByUserOpinionId(userOpinionId, number);
 		List<UserOpinionFlowVO> resultVo = JSONArray.parseArray(JSONObject.toJSONString(result), UserOpinionFlowVO.class);
-		resultVo.forEach(vo -> {
-			vo.setCurrentBol(new Integer("2").equals(vo.getIsCurrent()));
-		});
+		resultVo.forEach(vo -> vo.setCurrentBol(new Integer("2").equals(vo.getIsCurrent())));
 		return resultVo;
 	}
 
@@ -58,9 +74,4 @@ public class UserOpinionFlowServiceImpl extends BaseServiceImpl<UserOpinionFlowM
 		return this.baseMapper.selectIsSolveByUserOpinionKey(userOpinionKey);
 	}
 
-	@Override
-	public IPage<UserOpinionFlowVO> selectUserOpinionFlowPage(IPage<UserOpinionFlowVO> page, UserOpinionFlowVO userOpinionFlow) {
-		return page.setRecords(this.baseMapper.selectUserOpinionFlowPage(page, userOpinionFlow));
-	}
-
 }

+ 116 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/AssessmentUserController.java

@@ -0,0 +1,116 @@
+package org.springblade.manager.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import org.springblade.business.entity.AssessmentUser;
+import org.springblade.business.feign.OpinionUserClient;
+import org.springblade.business.vo.AssessmentUserVOS;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.BladeUser;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.manager.service.SaveUserInfoByProjectService;
+import org.springblade.system.user.entity.User;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 考核区接口
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/assessmentUser")
+@Api(value = "考核区接口")
+public class AssessmentUserController extends BladeController {
+
+    private final OpinionUserClient opinionUserClient;
+
+    private final SaveUserInfoByProjectService saveUserInfoByProjectService;
+
+    /**
+     * 获取当前系统下所有维护人员
+     * @return 结果
+     */
+    @GetMapping("/findMaintenanceUser")
+    @ApiOperationSupport(order = 6)
+    @ApiOperation(value = "获取当前系统下所有维护人员")
+    public R<List<User>> findMaintenanceUser(){
+        return R.data(this.saveUserInfoByProjectService.findMaintenanceUser());
+    }
+
+    /**
+     * 取消考核
+     */
+    @PostMapping("/cancelAssessment")
+    @ApiOperationSupport(order = 5)
+    @ApiOperation(value = "取消考核")
+    @ApiImplicitParam(value = "id", name = "分页中的assessmentId", required = true)
+    public R<Boolean> cancelAssessment(@RequestParam Long id){
+        if(id == -1){
+            return R.data(-1, false, "缺少id或id不能为-1");
+        }
+        return R.data(this.opinionUserClient.cancelAssessment(id));
+    }
+
+    /**
+     * 详情查看
+     */
+    @PostMapping("/getById")
+    @ApiOperationSupport(order = 4)
+    @ApiOperation(value = "详情查看")
+    @ApiImplicitParam(value = "id", name = "分页中的assessmentId", required = true)
+    public R<AssessmentUser> getById(@RequestParam Long id){
+        return R.data(this.opinionUserClient.getById(id));
+    }
+
+    /**
+     * 修改考核
+     */
+    @PostMapping("/updateUserAssessment")
+    @ApiOperationSupport(order = 3)
+    @ApiOperation(value = "修改考核")
+    public R<Boolean> updateUserAssessment(@RequestBody AssessmentUser assessmentUser){
+        BladeUser user = AuthUtil.getUser();
+        assessmentUser.setUpdateUser(user.getUserId());
+        assessmentUser.setUpdateTime(new Date());
+
+        return R.data(this.opinionUserClient.updateUserAssessment(assessmentUser));
+    }
+
+    /**
+     * 新增考核
+     */
+    @PostMapping("/saveUserAssessment")
+    @ApiOperationSupport(order = 2)
+    @ApiOperation(value = "新增考核")
+    public R<Boolean> saveUserAssessment(@RequestBody AssessmentUser assessmentUser){
+        BladeUser user = AuthUtil.getUser();
+        //设置创建人
+        assessmentUser.setCreateUser(user.getUserId());
+        assessmentUser.setCreateDept(user.getDeptId().contains(",") ? Long.parseLong(user.getDeptId().split(",")[0]) : Long.parseLong(user.getDeptId()));
+        assessmentUser.setCreateTime(new Date());
+        return R.data(this.opinionUserClient.saveUserAssessment(assessmentUser));
+    }
+
+    /**
+     * 考核区分页
+     */
+    @GetMapping("/queryUserAssessmentPage")
+    @ApiOperationSupport(order = 1)
+    @ApiOperation(value = "考核区分页")
+    public R<IPage<AssessmentUserVOS>> queryUserAssessmentPage(@RequestBody AssessmentUserVOS vo){
+        Query query = new Query();
+        query.setSize(vo.getSize());
+        query.setCurrent(vo.getCurrent());
+
+        return this.opinionUserClient.queryUserAssessmentPage(query, vo);
+    }
+
+}

+ 1 - 93
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/SignPfxDeputyController.java

@@ -16,23 +16,8 @@
  */
 package org.springblade.manager.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.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.springframework.web.bind.annotation.*;
-import org.springframework.web.bind.annotation.RequestParam;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.manager.entity.SignPfxDeputy;
-import org.springblade.manager.vo.SignPfxDeputyVO;
-import org.springblade.manager.service.ISignPfxDeputyService;
 import org.springblade.core.boot.ctrl.BladeController;
 
 /**
@@ -43,85 +28,8 @@ import org.springblade.core.boot.ctrl.BladeController;
  */
 @RestController
 @AllArgsConstructor
-@RequestMapping("/signpfxdeputy")
-@Api(value = "", tags = "接口")
+@RequestMapping("/signPfxDeputy")
 public class SignPfxDeputyController extends BladeController {
 
-	private final ISignPfxDeputyService signPfxDeputyService;
-
-	/**
-	 * 详情
-	 */
-	@GetMapping("/detail")
-	@ApiOperationSupport(order = 1)
-	@ApiOperation(value = "详情", notes = "传入signPfxDeputy")
-	public R<SignPfxDeputy> detail(SignPfxDeputy signPfxDeputy) {
-		SignPfxDeputy detail = signPfxDeputyService.getOne(Condition.getQueryWrapper(signPfxDeputy));
-		return R.data(detail);
-	}
-
-	/**
-	 * 分页 
-	 */
-	@GetMapping("/list")
-	@ApiOperationSupport(order = 2)
-	@ApiOperation(value = "分页", notes = "传入signPfxDeputy")
-	public R<IPage<SignPfxDeputy>> list(SignPfxDeputy signPfxDeputy, Query query) {
-		IPage<SignPfxDeputy> pages = signPfxDeputyService.page(Condition.getPage(query), Condition.getQueryWrapper(signPfxDeputy));
-		return R.data(pages);
-	}
-
-	/**
-	 * 自定义分页 
-	 */
-	@GetMapping("/page")
-	@ApiOperationSupport(order = 3)
-	@ApiOperation(value = "分页", notes = "传入signPfxDeputy")
-	public R<IPage<SignPfxDeputyVO>> page(SignPfxDeputyVO signPfxDeputy, Query query) {
-		IPage<SignPfxDeputyVO> pages = signPfxDeputyService.selectSignPfxDeputyPage(Condition.getPage(query), signPfxDeputy);
-		return R.data(pages);
-	}
-
-	/**
-	 * 新增 
-	 */
-	@PostMapping("/save")
-	@ApiOperationSupport(order = 4)
-	@ApiOperation(value = "新增", notes = "传入signPfxDeputy")
-	public R save(@Valid @RequestBody SignPfxDeputy signPfxDeputy) {
-		return R.status(signPfxDeputyService.save(signPfxDeputy));
-	}
-
-	/**
-	 * 修改 
-	 */
-	@PostMapping("/update")
-	@ApiOperationSupport(order = 5)
-	@ApiOperation(value = "修改", notes = "传入signPfxDeputy")
-	public R update(@Valid @RequestBody SignPfxDeputy signPfxDeputy) {
-		return R.status(signPfxDeputyService.updateById(signPfxDeputy));
-	}
-
-	/**
-	 * 新增或修改 
-	 */
-	@PostMapping("/submit")
-	@ApiOperationSupport(order = 6)
-	@ApiOperation(value = "新增或修改", notes = "传入signPfxDeputy")
-	public R submit(@Valid @RequestBody SignPfxDeputy signPfxDeputy) {
-		return R.status(signPfxDeputyService.saveOrUpdate(signPfxDeputy));
-	}
-
-	
-	/**
-	 * 删除 
-	 */
-	@PostMapping("/remove")
-	@ApiOperationSupport(order = 7)
-	@ApiOperation(value = "逻辑删除", notes = "传入ids")
-	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
-		return R.status(signPfxDeputyService.deleteLogic(Func.toLongList(ids)));
-	}
-
 	
 }

+ 0 - 27
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ProjectInfoMapper.xml

@@ -45,33 +45,6 @@
         select
             pi.id,
             pi.project_name,
-            count(
-              (
-                select
-                  spf.id
-                from
-                  m_sign_pfx_file AS spf
-                left join m_project_assignment_user AS pau on spf.certificate_user_id = pau.user_id
-                where
-                  spf.is_deleted = 0
-                and pau.is_deleted = 0
-                and pau.project_id = pi.id
-                and spf.certificate_type = 1
-              )
-            ) AS personalCount,
-            count(
-              (
-                select
-                  spf.id
-                from m_sign_pfx_file AS spf
-                left join m_sign_pfx_deputy AS spd ON spf.id = spd.sign_pfx_file_id
-                where
-                  spf.is_deleted = 0
-                and spd.is_deleted = 0
-                and spd.project_id = pi.id
-                and spf.certificate_type = 2
-              )
-            ) AS enterpriseCount,
             (select id from m_contract_info where is_deleted = 0 and p_id = pi.id limit 1) AS contractId
         from m_project_info AS pi where pi.is_deleted = 0
         <if test="vo.projectId != null">

+ 3 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/SaveUserInfoByProjectMapper.java

@@ -3,11 +3,14 @@ package org.springblade.manager.mapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import io.lettuce.core.dynamic.annotation.Param;
 import org.springblade.manager.dto.SaveUserInfoByProjectDTO;
+import org.springblade.system.user.entity.User;
 
 import java.util.List;
 
 public interface SaveUserInfoByProjectMapper extends BaseMapper<SaveUserInfoByProjectDTO> {
 
+    List<User> findMaintenanceUser();
+
     List<SaveUserInfoByProjectDTO> queryCurrentUserDownAllContractAndProjectId(@Param("userid") Long userId);
 
     List<SaveUserInfoByProjectDTO> queryProjectBusinessUser(@Param("projectId") Long projectId,@Param("contractId") Long contractId);

+ 22 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/SaveUserInfoByProjectMapper.xml

@@ -20,6 +20,28 @@
         <result column="is_deleted" property="isDeleted"/>
     </resultMap>
 
+    <resultMap id="queryUserMap" type="org.springblade.system.user.entity.User">
+        <result column="id" property="id"/>
+        <result column="name" property="name"/>
+        <result column="real_name" property="realName"/>
+    </resultMap>
+
+    <select id="findMaintenanceUser" resultMap="queryUserMap">
+        select
+          bu.id,
+          bu.name,
+          bu.real_name
+        from blade_user AS bu
+        left join (
+            select
+              pau.user_id
+            from m_project_assignment_user AS pau
+            left join blade_role AS br on pau.role_id = br.id
+            where
+              pau.is_deleted = 0
+            and br.id is null
+        ) as pau on bu.id = pau.user_id
+    </select>
 
     <select id="queryCurrentUserDownAllContractAndProjectId" resultMap="contractInfoResultMap">
         select project_id, contract_id from m_project_assignment_user where is_deleted = 0 and user_id = #{userId}

+ 2 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/SignPfxFileMapper.java

@@ -31,6 +31,8 @@ import java.util.List;
  */
 public interface SignPfxFileMapper extends BaseMapper<SignPfxFile> {
 
+	Integer queryPersonalOrEnterpriseCount(@Param("projectId")Long projectId, @Param("type")Integer type);
+
 	Integer countSignPfxFile(@Param("vo") SignPfxFileVO vo);
 
 	/**

+ 19 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/SignPfxFileMapper.xml

@@ -25,6 +25,25 @@
         <result column="project_contract_role" property="projectContractRole"/>
     </resultMap>
 
+    <select id="queryPersonalOrEnterpriseCount" resultType="java.lang.Integer">
+        select
+          count(result.id)
+        from
+        (
+            select
+              spf.id
+            from
+              m_sign_pfx_file AS spf
+            left join m_project_assignment_user AS pau on spf.certificate_user_id = pau.user_id
+            where
+              spf.is_deleted = 0
+            and pau.is_deleted = 0
+            and pau.project_id = #{projectId}
+            and spf.certificate_type = #{type}
+            group by spf.id
+        ) AS result
+    </select>
+
     <select id="countSignPfxFile" resultType="java.lang.Integer">
         select count(id) from m_sign_pfx_file where is_deleted = 0
     </select>

+ 3 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/SaveUserInfoByProjectService.java

@@ -2,12 +2,15 @@ package org.springblade.manager.service;
 
 import org.springblade.core.mp.base.BaseService;
 import org.springblade.manager.dto.SaveUserInfoByProjectDTO;
+import org.springblade.system.user.entity.User;
 
 import java.util.List;
 
 
 public interface SaveUserInfoByProjectService extends BaseService<SaveUserInfoByProjectDTO> {
 
+    List<User> findMaintenanceUser();
+
     List<SaveUserInfoByProjectDTO> queryCurrentUserDownAllContractAndProjectId(Long userId);
 
     List<SaveUserInfoByProjectDTO> queryProjectBusinessUser(Long projectId, Long contractId);

+ 13 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ProjectInfoServiceImpl.java

@@ -48,10 +48,22 @@ public class ProjectInfoServiceImpl extends BaseServiceImpl<ProjectInfoMapper, P
     @Resource
     private WbsTreePrivateMapper wbsTreePrivateMapper;
 
+    @Resource
+    private SignPfxFileMapper signPfxFileMapper;
+
     @Override
     public List<SingPfxManagementVO> singPfxManagementPage(SingPfxManagementVO vo) {
         long current = (vo.getCurrent() - 1L) * vo.getSize();
-        return this.baseMapper.singPfxManagementPage(current, vo.getSize(), vo);
+        List<SingPfxManagementVO> result = this.baseMapper.singPfxManagementPage(current, vo.getSize(), vo);
+
+        result.forEach(vos -> {
+            //查询个人签章
+            vos.setPersonalCount(this.signPfxFileMapper.queryPersonalOrEnterpriseCount(vos.getProjectId(), 1).toString());
+            //查询企业章
+            vos.setEnterpriseCount(this.signPfxFileMapper.queryPersonalOrEnterpriseCount(vos.getProjectId(), 2).toString());
+        });
+
+        return result;
     }
 
     @Override

+ 6 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/SaveUserInfoByProjectServiceImpl.java

@@ -5,6 +5,7 @@ import org.springblade.core.mp.base.BaseServiceImpl;
 import org.springblade.manager.dto.SaveUserInfoByProjectDTO;
 import org.springblade.manager.mapper.SaveUserInfoByProjectMapper;
 import org.springblade.manager.service.SaveUserInfoByProjectService;
+import org.springblade.system.user.entity.User;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
@@ -20,6 +21,11 @@ public class SaveUserInfoByProjectServiceImpl
         extends BaseServiceImpl<SaveUserInfoByProjectMapper, SaveUserInfoByProjectDTO>
         implements SaveUserInfoByProjectService {
 
+    @Override
+    public List<User> findMaintenanceUser() {
+        return this.baseMapper.findMaintenanceUser();
+    }
+
     @Override
     public List<SaveUserInfoByProjectDTO> queryCurrentUserDownAllContractAndProjectId(Long userId) {
         return this.baseMapper.queryCurrentUserDownAllContractAndProjectId(userId);