Bläddra i källkod

后管和客户端bug

huangjn 3 år sedan
förälder
incheckning
e0238f8844
23 ändrade filer med 479 tillägg och 31 borttagningar
  1. 10 11
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/DefaultConfigDTO.java
  2. 71 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/DefaultConfig.java
  3. 3 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/AssessmentUserVOS.java
  4. 6 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/BusinessUserOpinionVO.java
  5. 34 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/DefaultConfigVO.java
  6. 3 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/UserOpinionFlowVO.java
  7. 13 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/SignPfxFile.java
  8. 13 3
      blade-service/blade-business/src/main/java/org/springblade/business/controller/BusinessUserOpinionController.java
  9. 76 0
      blade-service/blade-business/src/main/java/org/springblade/business/controller/DefaultConfigController.java
  10. 59 1
      blade-service/blade-business/src/main/java/org/springblade/business/controller/TaskController.java
  11. 1 1
      blade-service/blade-business/src/main/java/org/springblade/business/controller/UserOpinionController.java
  12. 1 1
      blade-service/blade-business/src/main/java/org/springblade/business/controller/UserOpinionFlowController.java
  13. 33 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/DefaultConfigMapper.java
  14. 23 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/DefaultConfigMapper.xml
  15. 32 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/IDefaultConfigService.java
  16. 1 5
      blade-service/blade-business/src/main/java/org/springblade/business/service/IUserOpinionFlowService.java
  17. 36 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/DefaultConfigServiceImpl.java
  18. 4 1
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/UserOpinionFlowServiceImpl.java
  19. 9 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/UserOpinionServiceImpl.java
  20. 10 0
      blade-service/blade-business/src/main/java/sql/defaultconfig.menu.sql
  21. 2 2
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/AssessmentUserController.java
  22. 29 5
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/SignPfxFileController.java
  23. 10 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/SignPfxFileMapper.xml

+ 10 - 11
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/SignPfxDeputyController.java → blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/DefaultConfigDTO.java

@@ -14,22 +14,21 @@
  *  this software without specific prior written permission.
  *  Author: Chill 庄骞 (smallchill@163.com)
  */
-package org.springblade.manager.controller;
+package org.springblade.business.dto;
 
-import lombok.AllArgsConstructor;
-import org.springframework.web.bind.annotation.*;
-import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.business.entity.DefaultConfig;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
 
 /**
- *  控制器
+ * 数据传输对象实体类
  *
  * @author BladeX
- * @since 2022-06-28
+ * @since 2022-07-15
  */
-@RestController
-@AllArgsConstructor
-@RequestMapping("/signPfxDeputy")
-public class SignPfxDeputyController extends BladeController {
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class DefaultConfigDTO extends DefaultConfig {
+	private static final long serialVersionUID = 1L;
 
-	
 }

+ 71 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/DefaultConfig.java

@@ -0,0 +1,71 @@
+/*
+ *      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-07-15
+ */
+@Data
+@TableName("u_default_config")
+@EqualsAndHashCode(callSuper = true)
+public class DefaultConfig extends BaseEntity {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主题
+     */
+    @ApiModelProperty("主题")
+    private String theme;
+    /**
+     * 颜色
+     */
+	@ApiModelProperty("颜色")
+    private String color;
+    /**
+     * 首页主题
+     */
+	@ApiModelProperty("首页主题")
+    private String homeTheme;
+    /**
+     * 是否弹出工单提交感谢
+     */
+	@ApiModelProperty("是否弹出工单提交感谢")
+    private Integer opinionView;
+	/**
+	 * 电签短信验证
+	 */
+	@ApiModelProperty("电签短信验证")
+	private String smsCode;
+    /**
+     * 电签短信验证超时时间
+     */
+    @ApiModelProperty("电签短信验证超时时间")
+    private String smsTimeOut;
+}

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

@@ -54,4 +54,7 @@ public class AssessmentUserVOS {
     @ApiModelProperty("考核结束时间,查询条件,传 yyyy-MM-dd hh:mm")
     private String endTime;
 
+    @ApiModelProperty("是否有操作权限")
+    private Boolean operation;
+
 }

+ 6 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/BusinessUserOpinionVO.java

@@ -111,4 +111,10 @@ public class BusinessUserOpinionVO {
     @ApiModelProperty(value = "当前环节")
     private Integer currentLink;
 
+    @ApiModelProperty(value = "提交用户")
+    private String submitUserName;
+
+    @ApiModelProperty(value = "提交用户联系方式")
+    private String submitPhone;
+
 }

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

+ 3 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/UserOpinionFlowVO.java

@@ -35,4 +35,7 @@ public class UserOpinionFlowVO extends UserOpinionFlow {
 	@ApiModelProperty(value = "是否执行到当前环节,false(0未执行,1正在执行),true(2环节结束)")
 	private Boolean currentBol;
 
+	@ApiModelProperty("正在执行")
+	private Boolean current;
+
 }

+ 13 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/SignPfxFile.java

@@ -68,11 +68,21 @@ public class SignPfxFile extends BaseEntity {
      */
     @ApiModelProperty("证书文件路径")
     private String certificateFileUrl;
+    /**
+     * 证书文件名称
+     */
+    @ApiModelProperty("证书文件名称")
+    private String certificateFileName;
     /**
      * 签名文件路径
      */
     @ApiModelProperty("签名文件路径")
     private String signatureFileUrl;
+    /**
+     * 签名文件名称
+     */
+    @ApiModelProperty("签名文件名称")
+    private String signatureFileName;
     /**
      * 证书类型,1个人、2企业
      */
@@ -90,4 +100,7 @@ public class SignPfxFile extends BaseEntity {
     @ApiModelProperty("规则:项目ID-合同段ID-角色ID,项目ID-合同段ID-角色ID")
     private String projectContractRole;
 
+    @ApiModelProperty("企业章类型")
+    private String pfxType;
+
 }

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

@@ -9,6 +9,7 @@ import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
 import org.apache.commons.lang.StringUtils;
+import org.apache.http.client.utils.DateUtils;
 import org.springblade.business.entity.UserOpinionFile;
 import org.springblade.business.entity.UserOpinionFlow;
 import org.springblade.business.service.IUserOpinionFileService;
@@ -67,6 +68,7 @@ public class BusinessUserOpinionController {
             if(files != null && files.size() > 0){
                 vos.setFileUrlList(files.stream().map(UserOpinionFile::getFileUrl).distinct().collect(Collectors.toList()));
             }
+            vos.setOperation("qufq".equals(AuthUtil.getUserName()));
         });
 
         iPage.setTotal(count);
@@ -102,7 +104,7 @@ public class BusinessUserOpinionController {
             @ApiImplicitParam(name = "newNumber", value = "当前流程次数", required = true),
             @ApiImplicitParam(name = "currentLinkId", value = "当前环节ID", required = true)
     })
-    public R<Boolean> manageUserOperationStatus(@RequestParam String userOpinionId, @RequestParam Integer currentLink, @RequestParam Integer newNumber, @RequestParam String currentLinkId){
+    public R<Boolean> manageUserOperationStatus(@RequestParam String userOpinionId, @RequestParam Integer currentLink, @RequestParam Integer newNumber, @RequestParam String currentLinkId, @RequestParam String manageTime){
 
         if(StringUtils.isEmpty(currentLinkId)){
             return R.data(-1, false, "缺少currentLinkId参数");
@@ -114,7 +116,7 @@ public class BusinessUserOpinionController {
 
         //找到当前环节的下一环节
         Long nextLink = null, nextLinkEnd = null;
-        if(new Integer("3").equals(currentLink)){
+        if(StringUtils.isEmpty(manageTime) && new Integer("3").equals(currentLink)){
             //直接提交完结
             nextLink = flowVOS.get(2).getId();
             nextLinkEnd = flowVOS.get(3).getId();
@@ -142,9 +144,17 @@ public class BusinessUserOpinionController {
         //将当前环节更改为已完成
         boolean result = this.userOpinionFlowService.update(Wrappers.<UserOpinionFlow>lambdaUpdate().set(UserOpinionFlow::getIsCurrent, 2).set(UserOpinionFlow::getUpdateUser, user.getUserId()).set(UserOpinionFlow::getUpdateTime, new Date()).eq(UserOpinionFlow::getId, currentLinkId));
         if(result){
+            if(StringUtils.isEmpty(manageTime)){
+                manageTime = DateUtils.formatDate(new Date(), "yyyy-MM-dd");
+            } else {
+                //更新预计时间
+                List<Long> ids = flowVOS.stream().map(UserOpinionFlowVO::getId).distinct().collect(Collectors.toList());
+                this.userOpinionFlowService.update(Wrappers.<UserOpinionFlow>lambdaUpdate().set(UserOpinionFlow::getManageTime, manageTime).in(UserOpinionFlow::getId, ids));
+            }
+
             if(nextLink != null && StringUtils.isNotEmpty(String.valueOf(nextLink))){
                 //提交"进入人工处理环节"操作
-                result = this.userOpinionFlowService.update(Wrappers.<UserOpinionFlow>lambdaUpdate().set(UserOpinionFlow::getUpdateTime, new Date()).set(UserOpinionFlow::getIsCurrent, new Integer("3").equals(currentLink) ? 2 : 1).eq(UserOpinionFlow::getId, nextLink));
+                result = this.userOpinionFlowService.update(Wrappers.<UserOpinionFlow>lambdaUpdate().set(UserOpinionFlow::getReplyContent, "预计" + manageTime + "之前完成").set(UserOpinionFlow::getUpdateTime, new Date()).set(UserOpinionFlow::getIsCurrent, new Integer("3").equals(currentLink) ? 2 : 1).eq(UserOpinionFlow::getId, nextLink));
             }
             if(nextLinkEnd != null && StringUtils.isNotEmpty(String.valueOf(nextLinkEnd))){
                 //提交"已解决"操作

+ 76 - 0
blade-service/blade-business/src/main/java/org/springblade/business/controller/DefaultConfigController.java

@@ -0,0 +1,76 @@
+package org.springblade.business.controller;
+
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.apache.commons.lang.StringUtils;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.api.R;
+import org.springframework.web.bind.annotation.*;
+import org.springblade.business.entity.DefaultConfig;
+import org.springblade.business.service.IDefaultConfigService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+import java.util.Date;
+
+/**
+ *  控制器
+ *
+ * @author BladeX
+ * @since 2022-07-15
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/defaultConfig")
+@Api(value = "用户客户端配置信息", tags = "用户客户端配置信息")
+public class DefaultConfigController extends BladeController {
+
+	private final IDefaultConfigService defaultConfigService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "详情", notes = "传入defaultConfig")
+	public R<DefaultConfig> detail() {
+		return R.data(this.defaultConfigService.getOne(Wrappers.<DefaultConfig>lambdaQuery().eq(DefaultConfig::getCreateUser, AuthUtil.getUserId())));
+	}
+
+	/**
+	 * 新增或修改
+	 */
+	@PostMapping("/saveOrUpdate")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "新增或修改")
+	public R<Boolean> saveOrUpdate(@Valid @RequestBody DefaultConfig newConfig) {
+		//查询是否存在配置信息
+		DefaultConfig oldConfig = this.defaultConfigService.getOne(Wrappers.<DefaultConfig>lambdaQuery().eq(DefaultConfig::getCreateUser, AuthUtil.getUserId()));
+		if(oldConfig != null){
+			//修改
+			if(StringUtils.isNotEmpty(newConfig.getColor())){
+				oldConfig.setColor(newConfig.getColor());
+			}
+			if(StringUtils.isNotEmpty(newConfig.getHomeTheme())){
+				oldConfig.setHomeTheme(newConfig.getHomeTheme());
+			}
+			if(StringUtils.isNotEmpty(newConfig.getTheme())){
+				oldConfig.setTheme(newConfig.getTheme());
+			}
+			newConfig.setOpinionView(newConfig.getOpinionView());
+			return R.data(this.defaultConfigService.updateById(oldConfig));
+		}
+
+		//设置用户ID
+		newConfig.setCreateUser(AuthUtil.getUserId());
+		newConfig.setCreateTime(new Date());
+
+		return R.status(defaultConfigService.save(newConfig));
+	}
+
+	
+}

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

@@ -13,8 +13,10 @@ import lombok.AllArgsConstructor;
 import org.apache.commons.lang.StringUtils;
 import org.jetbrains.annotations.NotNull;
 import org.springblade.business.entity.ArchiveFile;
+import org.springblade.business.entity.DefaultConfig;
 import org.springblade.business.entity.TaskParallel;
 import org.springblade.business.service.IArchiveFileService;
+import org.springblade.business.service.IDefaultConfigService;
 import org.springblade.business.service.ITaskParallelService;
 import org.springblade.business.utils.FileUtils;
 import org.springblade.business.vo.BatchTaskVO;
@@ -29,6 +31,7 @@ import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.sms.model.SmsResponse;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.jackson.JsonUtil;
+import org.springblade.core.tool.utils.DateUtil;
 import org.springblade.flow.core.entity.BladeFlow;
 import org.springblade.flow.core.feign.NewFlowClient;
 import org.springblade.resource.feign.NewIOSSClient;
@@ -42,6 +45,8 @@ import org.springblade.business.entity.Task;
 import org.springblade.business.vo.TaskVO;
 import org.springblade.business.service.ITaskService;
 import org.springblade.core.boot.ctrl.BladeController;
+
+import java.time.Duration;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -71,10 +76,39 @@ public class TaskController extends BladeController {
 
 	private final NewIOSSClient newIOSSClient;
 
+	private final IDefaultConfigService defaultConfigService;
+
+	/**
+	 * 校验电签短信验证码
+	 */
+	@PostMapping("/check-sms-code")
+	@ApiOperationSupport(order = 12)
+	@ApiOperation(value = "校验电签短信验证码")
+	public R<String> checkSmsCode(){
+		//获取账户验证码
+		DefaultConfig config = this.defaultConfigService.getOne(Wrappers.<DefaultConfig>lambdaQuery().eq(DefaultConfig::getCreateUser, AuthUtil.getUserId()));
+
+		if(config != null){
+			if(StringUtils.isNotEmpty(config.getSmsTimeOut())){
+				//获取当前时间
+				Date now = DateUtil.now();
+				//先自行校验是否超时
+				Duration duration = DateUtil.between(DateUtil.parse(config.getSmsTimeOut(), "yyyy-MM-dd HH:mm:ss"), now);
+				if(duration.getSeconds() > 0){
+					//说明已经超时,清空短信验证记录
+					this.defaultConfigService.update(Wrappers.<DefaultConfig>lambdaUpdate().set(DefaultConfig::getSmsTimeOut, null).set(DefaultConfig::getSmsCode, null).eq(DefaultConfig::getId, config.getId()));
+				}
+			}
+			return R.data(config.getSmsTimeOut());
+		}
+
+		return R.data(null);
+	}
+
 	/**
 	 * 批量审批详情
 	 */
-	@GetMapping
+	@GetMapping("/batch-approval-parameter")
 	@ApiOperationSupport(order = 11)
 	@ApiOperation(value = "批量页详情")
 	@ApiImplicitParams({
@@ -116,6 +150,30 @@ public class TaskController extends BladeController {
 		Map<String, String> params = new HashMap<>(3);
 		params.put("code", code);
 		R<SmsResponse> result = this.newSmsClient.sendMessage("test_code", JsonUtil.toJson(params), phone);
+		if(result.getData().isSuccess()){
+			//记录当前验证码
+			DefaultConfig config = this.defaultConfigService.getOne(Wrappers.<DefaultConfig>lambdaQuery().eq(DefaultConfig::getCreateUser, AuthUtil.getUserId()));
+
+			//获取当前时间
+			Date now = DateUtil.now();
+			//默认16小时后超时
+			now = DateUtil.plusHours(now, 16);
+
+			if(config != null){
+				//修改
+				config.setSmsCode(code);
+				config.setSmsTimeOut(DateUtil.format(now, "yyyy-MM-dd HH:mm:ss"));
+				this.defaultConfigService.updateById(config);
+			} else {
+				//新增
+				config = new DefaultConfig();
+				config.setSmsCode(code);
+				config.setSmsTimeOut(DateUtil.format(now, "yyyy-MM-dd HH:mm:ss"));
+				config.setCreateUser(AuthUtil.getUserId());
+				config.setCreateTime(new Date());
+				this.defaultConfigService.save(config);
+			}
+		}
 		return result.getData().isSuccess() ? R.data(200, true, code) : R.data(499, false, String.valueOf(JSONObject.parseObject(result.getData().getMsg(), Map.class).get("Message")));
 	}
 

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

@@ -271,7 +271,7 @@ public class UserOpinionController extends BladeController {
 		//分配维护人员环节
 		saveFlowList.add(setUserData(new UserOpinionFlow(idKey, 1, 1, 2, "已分配专属客服", "客服:" + manageUserName + "<br>电话:" + manegeUserPhone, manageTime, manageUser, manageUserName, manegeUserPhone)));
 		//进入人工预处理环节
-		saveFlowList.add(setUserData(new UserOpinionFlow(idKey, 0, 1, 3, "进入人工预处理环节", "预计" + manageTime + "之前完成", manageTime, manageUser, manageUserName, manegeUserPhone)));
+		saveFlowList.add(setUserData(new UserOpinionFlow(idKey, 0, 1, 3, "进入人工预处理环节", null, manageTime, manageUser, manageUserName, manegeUserPhone)));
 		//问题已解决
 		saveFlowList.add(setUserData(new UserOpinionFlow(idKey, 0, 1, 4, "问题已解决", null, manageTime, manageUser, manageUserName, manegeUserPhone)));
 		//新增处理环节

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

@@ -149,7 +149,7 @@ public class UserOpinionFlowController extends BladeController {
 			//分配维护人员环节
 			saveFlowList.add(this.setUserData(new UserOpinionFlow(Long.parseLong(userOpinionId), 1, newNumber, 2, "已分配专属客服", "客服:"+manageUserName+"<br>电话:" + manegeUserPhone, manageTime, manageUser, manageUserName, manegeUserPhone), true));
 			//进入人工预处理环节
-			saveFlowList.add(this.setUserData(new UserOpinionFlow(Long.parseLong(userOpinionId), 0, newNumber, 3, "进入人工预处理环节", "预计" + manageTime + "之前完成", manageTime, manageUser, manageUserName, manegeUserPhone), true));
+			saveFlowList.add(this.setUserData(new UserOpinionFlow(Long.parseLong(userOpinionId), 0, newNumber, 3, "进入人工预处理环节", null, manageTime, manageUser, manageUserName, manegeUserPhone), true));
 			//问题已解决
 			saveFlowList.add(this.setUserData(new UserOpinionFlow(Long.parseLong(userOpinionId), 0, newNumber, 4, "问题已解决", null, manageTime, manageUser, manageUserName, manegeUserPhone), true));
 

+ 33 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/DefaultConfigMapper.java

@@ -0,0 +1,33 @@
+/*
+ *      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.DefaultConfig;
+import org.springblade.business.vo.DefaultConfigVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ *  Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-07-15
+ */
+public interface DefaultConfigMapper extends BaseMapper<DefaultConfig> {
+
+}

+ 23 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/DefaultConfigMapper.xml

@@ -0,0 +1,23 @@
+<?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.DefaultConfigMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="defaultConfigResultMap" type="org.springblade.business.entity.DefaultConfig">
+        <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="theme" property="theme"/>
+        <result column="color" property="color"/>
+        <result column="home_theme" property="homeTheme"/>
+        <result column="opinion_view" property="opinionView"/>
+        <result column="sms_code" property="smsCode"/>
+        <result column="sms_time_out" property="smsTimeOut"/>
+    </resultMap>
+
+</mapper>

+ 32 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/IDefaultConfigService.java

@@ -0,0 +1,32 @@
+/*
+ *      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.DefaultConfig;
+import org.springblade.business.vo.DefaultConfigVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ *  服务类
+ *
+ * @author BladeX
+ * @since 2022-07-15
+ */
+public interface IDefaultConfigService extends BaseService<DefaultConfig> {
+
+}

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

@@ -20,9 +20,6 @@ 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;
 
 /**
@@ -40,8 +37,7 @@ public interface IUserOpinionFlowService extends BaseService<UserOpinionFlow> {
 	/**
 	 * 获取前一个流程的维护人员
 	 * @param number 流程次数
-	 * @param userOpinionId
-	 * @return
+	 * @param userOpinionId 工单ID
 	 */
 	UserOpinionFlow queryLeftFlowManageUser(Integer number, String userOpinionId);
 

+ 36 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/DefaultConfigServiceImpl.java

@@ -0,0 +1,36 @@
+/*
+ *      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.DefaultConfig;
+import org.springblade.business.vo.DefaultConfigVO;
+import org.springblade.business.mapper.DefaultConfigMapper;
+import org.springblade.business.service.IDefaultConfigService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ *  服务实现类
+ *
+ * @author BladeX
+ * @since 2022-07-15
+ */
+@Service
+public class DefaultConfigServiceImpl extends BaseServiceImpl<DefaultConfigMapper, DefaultConfig> implements IDefaultConfigService {
+
+}

+ 4 - 1
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/UserOpinionFlowServiceImpl.java

@@ -56,7 +56,10 @@ 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.setCurrent(new Integer("1").equals(vo.getIsCurrent()));
+			vo.setCurrentBol(new Integer("2").equals(vo.getIsCurrent()));
+		});
 		return resultVo;
 	}
 

+ 9 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/UserOpinionServiceImpl.java

@@ -138,6 +138,15 @@ public class UserOpinionServiceImpl extends BaseServiceImpl<UserOpinionMapper, U
 					e.printStackTrace();
 				}
 
+				//获取提交人
+				UserOpinion opinion = this.getById(vo.getUserOpinionId());
+				if(opinion != null){
+					vo.setSubmitUserName(opinion.getCreateUserName());
+					User user = this.userClient.userInfoById(opinion.getCreateUser()).getData();
+					if(user != null){
+						vo.setSubmitPhone(user.getPhone());
+					}
+				}
 			});
 
 			//设置分页信息及结果数据

+ 10 - 0
blade-service/blade-business/src/main/java/sql/defaultconfig.menu.sql

@@ -0,0 +1,10 @@
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1547757456397627394', 1123598815738675201, 'defaultconfig', '默认配置', 'menu', '/DefaultConfig/defaultconfig', NULL, 1, 1, 0, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1547757456397627395', '1547757456397627394', 'defaultconfig_add', '新增', 'add', '/DefaultConfig/defaultconfig/add', 'plus', 1, 2, 1, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1547757456397627396', '1547757456397627394', 'defaultconfig_edit', '修改', 'edit', '/DefaultConfig/defaultconfig/edit', 'form', 2, 2, 2, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1547757456397627397', '1547757456397627394', 'defaultconfig_delete', '删除', 'delete', '/api/DefaultConfig/defaultconfig/remove', 'delete', 3, 2, 3, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1547757456397627398', '1547757456397627394', 'defaultconfig_view', '查看', 'view', '/DefaultConfig/defaultconfig/view', 'file-text', 4, 2, 2, 1, NULL, 0);

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

@@ -48,7 +48,7 @@ public class AssessmentUserController extends BladeController {
     public R<List<AssessmentUserContentVO>> queryAllUserAssessmentContent(){
         List<AssessmentUserContentVO> result = new ArrayList<>();
         //获取考核分类
-        List<DictBiz> dictBizs = this.dictBizClient.getList("assessment_type", "notRoot").getData();
+        List<DictBiz> dictBizList = this.dictBizClient.getList("assessment_type", "notRoot").getData();
         //获取当前系统下所有维护人员
         List<User> assessmentUserList = this.saveUserInfoByProjectService.findMaintenanceUser();
         assessmentUserList.forEach(user -> {
@@ -58,7 +58,7 @@ public class AssessmentUserController extends BladeController {
             //查询当前用户的考核记录
             List<AssessmentUser> assessmentUsers = this.opinionUserClient.queryUserAssessmentByUserId(user.getId().toString());
             if(assessmentUsers != null && assessmentUsers.size() > 0){
-                for(DictBiz dictBiz : dictBizs){
+                for(DictBiz dictBiz : dictBizList){
                     //考核金额
                     BigDecimal assessmentMoney = new BigDecimal("0.00");
                     int count = 0;

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

@@ -28,6 +28,7 @@ import javax.validation.Valid;
 import org.springblade.common.utils.SnowFlakeUtil;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.Func;
 import org.springblade.manager.dto.SaveUserInfoByProjectDTO;
@@ -36,7 +37,9 @@ import org.springblade.manager.entity.ProjectInfo;
 import org.springblade.manager.entity.SignPfxDeputy;
 import org.springblade.manager.service.*;
 import org.springblade.manager.vo.*;
+import org.springblade.system.entity.DictBiz;
 import org.springblade.system.entity.Role;
+import org.springblade.system.feign.IDictBizClient;
 import org.springblade.system.feign.ISysClient;
 import org.springblade.system.user.entity.User;
 import org.springblade.system.vo.RoleVO;
@@ -47,6 +50,7 @@ import org.springblade.manager.entity.SignPfxFile;
 import org.springblade.core.boot.ctrl.BladeController;
 
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.Iterator;
 import java.util.List;
 import java.util.stream.Collectors;
@@ -75,6 +79,8 @@ public class SignPfxFileController extends BladeController {
 
 	private final ISignPfxDeputyService signPfxDeputyService;
 
+	private final IDictBizClient dictBizClient;
+
 	/**
 	 * 根据合同段ID获取项目下的所有合同段
 	 * @return 结果
@@ -158,6 +164,9 @@ public class SignPfxFileController extends BladeController {
 	@ApiOperationSupport(order = 9)
 	@ApiOperation(value = "获取系统所有角色划分")
 	public R<List<RoleSignPfxUserVO>> queryAllRoleList(@RequestParam String contractId){
+		//获取字典
+		List<DictBiz> dictBizList = this.dictBizClient.getList("pfx_type", "notRoot").getData();
+
 		//获取当前系统配置的角色划分
 		List<RoleVO> roleVOS = this.sysClient.search().getData();
 		//获取项目人员
@@ -172,6 +181,21 @@ public class SignPfxFileController extends BladeController {
 		pfxUnitVo.setRoleName("单位证书");
 		List<SignPfxFile> unitPfxList = this.signPfxFileService.list(Wrappers.<SignPfxFile>lambdaQuery().like(SignPfxFile::getProjectContractRole, contractId));
 		if(unitPfxList != null && unitPfxList.size() > 0){
+
+			unitPfxList.forEach(userSignPfx -> {
+				//存在证书则设置进结果对象的证书集合中
+				if(StringUtils.isNotEmpty(userSignPfx.getPfxType()) && dictBizList != null && dictBizList.size() > 0){
+					for(DictBiz biz : dictBizList){
+						if(userSignPfx.getPfxType().equals(biz.getDictKey())){
+							userSignPfx.setPfxType(biz.getDictValue());
+							break;
+						}
+					}
+				} else {
+					userSignPfx.setPfxType("-1");
+				}
+			} );
+
 			RoleSignPfxUserVO pfxChildUnitVo = new RoleSignPfxUserVO();
 			pfxChildUnitVo.setRoleId(2L);
 			pfxChildUnitVo.setRoleName("单位证书");
@@ -222,7 +246,6 @@ public class SignPfxFileController extends BladeController {
 								iterator.remove();
 								continue;
 							}
-							//存在证书则设置进结果对象的证书集合中
 							childPfxUserVo.getSignPfxFileList().add(userSignPfx);
 						}
 					}
@@ -359,12 +382,13 @@ public class SignPfxFileController extends BladeController {
 	@PostMapping("/save")
 	@ApiOperationSupport(order = 2)
 	@ApiOperation(value = "新增", notes = "传入signPfxFile")
-	public R save(@Valid @RequestBody SignPfxFileVO vo) {
+	public R<Boolean> save(@Valid @RequestBody SignPfxFileVO vo) {
 
 		if(new Integer("2").equals(vo.getCertificateType())){
 			this.saveSignPfxDeputy(vo, true);
 		}
-
+		vo.setCreateUser(AuthUtil.getUserId());
+		vo.setCreateTime(new Date());
 		return R.status(this.signPfxFileService.save(vo));
 	}
 
@@ -374,7 +398,7 @@ public class SignPfxFileController extends BladeController {
 	@PostMapping("/update")
 	@ApiOperationSupport(order = 3)
 	@ApiOperation(value = "修改", notes = "传入signPfxFile")
-	public R update(@Valid @RequestBody SignPfxFileVO vo) {
+	public R<Boolean> update(@Valid @RequestBody SignPfxFileVO vo) {
 		if(new Integer("2").equals(vo.getCertificateType())){
 			//查询旧数据
 			SignPfxFile oldData = this.signPfxFileService.getById(vo.getId());
@@ -428,7 +452,7 @@ public class SignPfxFileController extends BladeController {
 	@PostMapping("/remove")
 	@ApiOperationSupport(order = 4)
 	@ApiOperation(value = "逻辑删除", notes = "传入ids")
-	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+	public R<Boolean> remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
 		return R.status(this.signPfxFileService.deleteLogic(Func.toLongList(ids)));
 	}
 

+ 10 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/SignPfxFileMapper.xml

@@ -18,11 +18,14 @@
         <result column="certificate_number" property="certificateNumber"/>
         <result column="certificate_password" property="certificatePassword"/>
         <result column="certificate_file_url" property="certificateFileUrl"/>
+        <result column="certificate_file_name" property="certificateFileName"/>
         <result column="enterprise_unified_code" property="enterpriseUnifiedCode"/>
         <result column="signature_file_url" property="signatureFileUrl"/>
+        <result column="signature_file_name" property="signatureFileName"/>
         <result column="certificate_type" property="certificateType"/>
         <result column="is_register" property="isRegister"/>
         <result column="project_contract_role" property="projectContractRole"/>
+        <result column="pfx_type" property="pfxType"/>
     </resultMap>
 
     <select id="queryPersonalOrEnterpriseCount" resultType="java.lang.Integer">
@@ -75,7 +78,13 @@
     </select>
 
     <select id="selectSignPfxFilePage" resultMap="signPfxFileResultMap">
-        select * from m_sign_pfx_file where is_deleted = 0
+        select
+            id,
+            certificate_user_name,
+            IFNULL(enterprise_unified_code,certificate_id) AS certificate_id,
+            is_register,
+            certificate_type
+        from m_sign_pfx_file where is_deleted = 0
         <if test="vo.userIds != null">
             and certificate_user_id in
             <foreach collection="vo.userIds" item="userId" open="(" separator="," close=")">