Browse Source

Merge branch 'master' of http://47.110.251.215:3000/java_org/bladex

liuyc 3 years ago
parent
commit
a1e28191be
34 changed files with 893 additions and 158 deletions
  1. 34 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/AssessmentUserDTO.java
  2. 19 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/MileagePartDTO.java
  3. 1 1
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/MileagePartDto.java
  4. 63 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/AssessmentUser.java
  5. 2 2
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/Mileagexy.java
  6. 58 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/feign/OpinionUserClient.java
  7. 36 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/AssessmentUserContentVO.java
  8. 34 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/AssessmentUserVO.java
  9. 57 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/AssessmentUserVOS.java
  10. 0 2
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/dto/FormData.java
  11. 3 2
      blade-service/blade-business/src/main/java/org/springblade/business/controller/BusinessUserOpinionController.java
  12. 6 7
      blade-service/blade-business/src/main/java/org/springblade/business/controller/DatumPointController.java
  13. 3 0
      blade-service/blade-business/src/main/java/org/springblade/business/controller/MileageController.java
  14. 55 0
      blade-service/blade-business/src/main/java/org/springblade/business/feignClient/OpinionUserClientImpl.java
  15. 42 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/AssessmentUserMapper.java
  16. 27 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/AssessmentUserMapper.xml
  17. 5 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/UserOpinionFlowMapper.java
  18. 84 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/UserOpinionFlowMapper.xml
  19. 41 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/IAssessmentUserService.java
  20. 5 6
      blade-service/blade-business/src/main/java/org/springblade/business/service/IUserOpinionFlowService.java
  21. 41 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/AssessmentUserServiceImpl.java
  22. 21 10
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/UserOpinionFlowServiceImpl.java
  23. 177 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/AssessmentUserController.java
  24. 1 93
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/SignPfxDeputyController.java
  25. 1 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/SignPfxFileController.java
  26. 0 27
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ProjectInfoMapper.xml
  27. 3 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/SaveUserInfoByProjectMapper.java
  28. 23 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/SaveUserInfoByProjectMapper.xml
  29. 2 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/SignPfxFileMapper.java
  30. 19 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/SignPfxFileMapper.xml
  31. 3 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/SaveUserInfoByProjectService.java
  32. 8 6
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/FormulaServiceImpl.java
  33. 13 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ProjectInfoServiceImpl.java
  34. 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;
+
+}

+ 19 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/MileagePartDTO.java

@@ -0,0 +1,19 @@
+package org.springblade.business.dto;
+
+import lombok.Data;
+
+/**
+ * @author yangyj
+ * @Date 2022/6/10 16:28
+ * @description TODO
+ */
+@Data
+public class MileagePartDto {
+    private String id;
+    private String name;
+    private String prefix;
+    private String remark;
+    private String contractId;
+    private String projectId;
+    private Integer sort;
+}

+ 1 - 1
blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/MileagePartDto.java

@@ -8,7 +8,7 @@ import lombok.Data;
  * @description TODO
  */
 @Data
-public class MileagePartDto {
+public class MileagePartDTO {
     private String id;
     private String name;
     private String prefix;

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

@@ -0,0 +1,63 @@
+/*
+ *      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;
+
+    @ApiModelProperty("被考核人ID")
+    private String assessmentUser;
+
+    @ApiModelProperty("考核类型,类型的ID")
+    private String assessmentType;
+
+}

+ 2 - 2
blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/Mileagexy.java

@@ -49,12 +49,12 @@ public class Mileagexy   extends TenantEntity {
 
 
 	public String getValueStr() {
-		return MileageUtill.convertToMileage(value);
+		return partNo+MileageUtill.convertToMileage(value);
 	}
 
 
 	public String getValueEndStr() {
-		return MileageUtill.convertToMileage(valueEnd);
+		return partNo+MileageUtill.convertToMileage(valueEnd);
 	}
 
 	public String getXxStr() {

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

@@ -0,0 +1,58 @@
+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;
+
+import java.util.List;
+
+@FeignClient(value = BusinessConstant.APPLICATION_WEATHER_NAME)
+public interface OpinionUserClient {
+
+    /**
+     * 接口前缀
+     */
+    String API_PREFIX = "/api/business/opinionUser";
+
+    @PostMapping(API_PREFIX + "/cancelAssessment")
+    Boolean cancelAssessment(@RequestParam Long id);
+
+    /**
+     * 获取用户的被考核记录
+     */
+    @GetMapping("/queryUserAssessmentByUserId")
+    List<AssessmentUser> queryUserAssessmentByUserId(@RequestParam Long userId);
+
+    /**
+     * 新增考核
+     */
+    @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);
+
+}

+ 36 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/AssessmentUserContentVO.java

@@ -0,0 +1,36 @@
+package org.springblade.business.vo;
+
+import lombok.Data;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Data
+public class AssessmentUserContentVO {
+
+    private String userName;
+
+    private List<Assessment> assessmentList = new ArrayList<>();
+
+    public void setAssessmentList(String assessmentContent, String assessmentMoney, Integer assessmentNumber){
+        assessmentList.add(new Assessment(assessmentContent, assessmentMoney, assessmentNumber));
+    }
+
+    @Data
+    private class Assessment{
+
+        private String assessmentContent;
+
+        private String assessmentMoney;
+
+        private Integer assessmentNumber;
+
+        private Assessment(String assessmentContent, String assessmentMoney, Integer assessmentNumber){
+            this.assessmentContent = assessmentContent;
+            this.assessmentMoney = assessmentMoney;
+            this.assessmentNumber = assessmentNumber;
+        }
+
+    }
+
+}

+ 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;
+
+}

+ 0 - 2
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/dto/FormData.java

@@ -1,7 +1,5 @@
 package org.springblade.manager.dto;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
-import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import org.springblade.manager.entity.Formula;
 

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

@@ -19,6 +19,8 @@ import org.springblade.core.secure.BladeUser;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
 import java.util.Date;
 import java.util.List;
 
@@ -43,7 +45,7 @@ public class BusinessUserOpinionController {
     @ApiImplicitParams({
             @ApiImplicitParam(name = "query", value = "分页信息", required = true)
     })
-    public R<IPage<BusinessUserOpinionVO>> queryBusinessUserOpinionListAll(@RequestBody Query query){
+    public R<IPage<BusinessUserOpinionVO>> queryBusinessUserOpinionListAll(Query query){
         return R.data(this.userOpinionService.queryBusinessUserOpinionListAll(query));
     }
 
@@ -100,7 +102,6 @@ public class BusinessUserOpinionController {
             }
             return R.data(result);
         }
-
         return R.data(false);
     }
 

+ 6 - 7
blade-service/blade-business/src/main/java/org/springblade/business/controller/DatumPointController.java

@@ -46,18 +46,17 @@ public class DatumPointController {
 
     @GetMapping("/list")
     public R<IPage<DatumPoint>>  list( String contractId, Query page, String type, String name){
-        Map<String, Object> param = new HashMap<>(10);
+        LambdaQueryWrapper<DatumPoint> queryWrapper=Wrappers.<DatumPoint>lambdaQuery();
         if(StringUtil.isNotBlank(contractId)){
-            param.put("contractId",contractId);
+            queryWrapper.eq(DatumPoint::getContractId,contractId);
         }
         if(StringUtil.isNotBlank(type)){
-            param.put("type",type);
+            queryWrapper.eq(DatumPoint::getType,type);
         }
-        if(StringUtil.isNotBlank(contractId)){
-            param.put("name",name);
-            param.put("remark",name);
+        if(StringUtil.isNotBlank(name)){
+            queryWrapper.and(e->e.like(DatumPoint::getName,name).or().like(DatumPoint::getRemark,name));
         }
-        return R.data(service.page(Condition.getPage(page),Condition.getQueryWrapper(param,DatumPoint.class)));
+        return R.data(service.page(Condition.getPage(page),queryWrapper));
     }
 
     @PostMapping("/add")

+ 3 - 0
blade-service/blade-business/src/main/java/org/springblade/business/controller/MileageController.java

@@ -97,6 +97,9 @@ public class MileageController {
         if(StringUtil.isBlank(ids)){
             return R.fail("对象不存在");
         }
+        if(this.service.count(Wrappers.<Mileagexy>lambdaQuery().in(Mileagexy::getPartId,Func.toLongList(ids)))>0){
+             return  R.fail("已经存关联线元信息,无法删除");
+        }
         return R.status(partService.removeByIds(Func.toLongList(ids)));
     }
 

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

@@ -0,0 +1,55 @@
+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;
+
+import java.util.List;
+
+@RestController
+@AllArgsConstructor
+public class OpinionUserClientImpl implements OpinionUserClient {
+
+    private final IUserOpinionFlowService userOpinionFlowService;
+
+    private final IAssessmentUserService assessmentUserService;
+
+    @Override
+    public List<AssessmentUser> queryUserAssessmentByUserId(Long userId) {
+        return this.assessmentUserService.list(Wrappers.<AssessmentUser>lambdaQuery().eq(AssessmentUser::getIsDeleted, 0).eq(AssessmentUser::getAssessmentUser, userId));
+    }
+
+    @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);
+
+}

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

@@ -0,0 +1,27 @@
+<?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"/>
+        <result column="assessment_user" property="assessmentUser"/>
+        <result column="assessment_type" property="assessmentType"/>
+    </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));
-	}
-
 }

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

@@ -0,0 +1,177 @@
+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.AssessmentUserContentVO;
+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.entity.DictBiz;
+import org.springblade.system.feign.IDictBizClient;
+import org.springblade.system.user.entity.User;
+import org.springframework.web.bind.annotation.*;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * 考核区接口
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/assessmentUser")
+@Api(value = "考核区接口")
+public class AssessmentUserController extends BladeController {
+
+    private final OpinionUserClient opinionUserClient;
+
+    private final SaveUserInfoByProjectService saveUserInfoByProjectService;
+
+    private final IDictBizClient dictBizClient;
+
+    /**
+     * 查询所有考核人员的考核记录
+     */
+    @GetMapping("/queryAllUserAssessmentContent")
+    @ApiOperationSupport(order = 8)
+    @ApiOperation(value = "查询所有考核人员的考核记录")
+    public R<List<AssessmentUserContentVO>> queryAllUserAssessmentContent(){
+        List<AssessmentUserContentVO> result = new ArrayList<>();
+        //获取考核分类
+        List<DictBiz> dictBizs = this.dictBizClient.getList("assessment_type", "notRoot").getData();
+        //获取当前系统下所有维护人员
+        List<User> assessmentUserList = this.saveUserInfoByProjectService.findMaintenanceUser();
+        assessmentUserList.forEach(user -> {
+            AssessmentUserContentVO vo = new AssessmentUserContentVO();
+            vo.setUserName(user.getRealName());
+
+            //查询当前用户的考核记录
+            List<AssessmentUser> assessmentUsers = this.opinionUserClient.queryUserAssessmentByUserId(user.getId());
+            if(assessmentUsers != null && assessmentUsers.size() > 0){
+                for(DictBiz dictBiz : dictBizs){
+                    //考核金额
+                    BigDecimal assessmentMoney = new BigDecimal("0.00");
+                    int count = 0;
+                    Iterator<AssessmentUser> iterator = assessmentUsers.iterator();
+                    while (iterator.hasNext()){
+                        AssessmentUser assessmentUser = iterator.next();
+                        if(dictBiz.getId().toString().equals(assessmentUser.getAssessmentType())){
+                            //同类型,统计
+                            assessmentMoney = assessmentMoney.add(new BigDecimal(assessmentUser.getAssessmentMoney()));
+                            count++;
+                            iterator.remove();
+                        }
+                    }
+                    //设置参数
+                    vo.setAssessmentList(dictBiz.getDictKey(), assessmentMoney.toString(), count);
+                }
+            }
+            //设置返回结果
+            result.add(vo);
+        });
+
+        return R.data(result);
+    }
+
+    /**
+     * 查询考核类型字典
+     */
+    @GetMapping("/queryAssessmentType")
+    @ApiOperationSupport(order = 7)
+    @ApiOperation(value = "查询考核类型字典")
+    public R<List<DictBiz>> queryAssessmentType(){
+        return this.dictBizClient.getList("assessment_type", "notRoot");
+    }
+
+    /**
+     * 获取当前系统下所有维护人员
+     */
+    @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)));
-	}
-
 	
 }

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

@@ -243,7 +243,7 @@ public class SignPfxFileController extends BladeController {
 	@ApiOperationSupport(order = 6)
 	@ApiOperation(value = "获取详情数据")
 	@ApiImplicitParam(name = "id", value = "列表数据主键ID", required = true)
-	public R<SignPfxFileVO> getById(Long id){
+	public R<SignPfxFileVO> getById(String id){
 		//查询数据
 		SignPfxFile data = this.signPfxFileService.getById(id);
 		//实体转换

+ 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);

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

@@ -20,6 +20,29 @@
         <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
+            group by pau.user_id
+        ) 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);

+ 8 - 6
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/FormulaServiceImpl.java

@@ -132,8 +132,9 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
     }
 
 
-    public static void slice(Map<String,Object> variables,String formula){
-            int min =0;
+    public static List<Object> slice(Map<String,Object> variables,String formula){
+        int min =0;
+        List<Object> result = new ArrayList<>();
         Map<String,Object> currentMap = new HashMap<>();
         Map<String,List<Object>> massMap = new HashMap<>();
         for(Map.Entry<String,Object> entry:variables.entrySet()){
@@ -150,12 +151,13 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
                 }
         }
         for(int i=0;i<min;i++){
-                for(Map.Entry<String,List<Object>> e:massMap.entrySet()){
-                    currentMap.put(e.getKey(),e.getValue().get(i));
-                }
+            for(Map.Entry<String,List<Object>> e:massMap.entrySet()){
+                currentMap.put(e.getKey(),e.getValue().get(i));
+            }
             Object data  = Expression.parse(formula).calculate(currentMap);
-
+            result.add(data);
         }
+        return  result;
     }
 
     public static final String WP_REG= "(?<=P\\[)[^]]+(?=\\])";

+ 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);