Merge remote-tracking branch 'origin/master'

master
shijie 4 years ago
commit 95e51e6a0d
  1. 86
      dq-financial-crms/src/main/resources/bootstrap.properties
  2. 18
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgCopyForController.java
  3. 43
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgCopyUserController.java
  4. 13
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java
  5. 48
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgFormDesignController.java
  6. 25
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgProcessUserController.java
  7. 5
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgCopyUserMapper.java
  8. 26
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgFormDesignMapper.java
  9. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgProcessManageMapper.java
  10. 32
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/CopyForMeRequest.java
  11. 18
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/CopySendRequest.java
  12. 18
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/CopySendUserRequest.java
  13. 34
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/DgFormDesignRequest.java
  14. 61
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/CopyForMeResponse.java
  15. 40
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgFormDesignListResponse.java
  16. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/NumResponse.java
  17. 9
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgCopyUserService.java
  18. 19
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgFormDesignService.java
  19. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgProcessUserService.java
  20. 42
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgCopyForServiceImpl.java
  21. 114
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgCopyUserServiceImpl.java
  22. 54
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java
  23. 82
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgFormDesignServiceImpl.java
  24. 35
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgProcessUserServiceImpl.java
  25. 87
      dq-financial-guarantee/src/main/resources/bootstrap.properties
  26. 39
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgCopyUserMapper.xml
  27. 22
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgFormerDesignMapper.xml
  28. 3
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgProcessManageMapper.xml
  29. 84
      dq-financial-hrms-auth/src/main/resources/bootstrap.properties
  30. 21
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/RoleController.java
  31. 2
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/RoleDao.java
  32. 2
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/RoleService.java
  33. 7
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/RoleServiceImpl.java
  34. 86
      dq-financial-hrms/src/main/resources/bootstrap.properties
  35. 2
      dq-financial-hrms/src/main/resources/mapper/hrms/RoleDao.xml
  36. 42
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgCopyFor.java
  37. 67
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgFormDesign.java
  38. 2
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgProcessUser.java
  39. 5
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/GuaranteeCode.java
  40. 49
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/DgFormDesignPO.java
  41. 66
      dq-govern-gateway/src/main/resources/bootstrap.properties

@ -1,20 +1,20 @@
##服务名称
#spring.application.name=dq-financial-crms
##配置中心地址
#spring.cloud.nacos.config.server-addr=127.0.0.1:8848
#spring.cloud.nacos.config.file-extension=yml
##redis配置
#spring.redis.host=127.0.0.1
#spring.redis.port=6379
#spring.redis.password=
#spring.redis.database=0
#spring.redis.timeout=30000
#spring.redis.jedis.pool.max-active=8
#spring.redis.jedis.pool.max-wait=-1
#spring.redis.jedis.pool.max-idle=8
#spring.redis.jedis.pool.min-idle=0
#服务名称
spring.application.name=dq-financial-crms
#配置中心地址
spring.cloud.nacos.config.server-addr=192.168.31.140:8848
spring.cloud.nacos.config.file-extension=yml
#redis配置
spring.redis.host=127.0.0.1
spring.redis.port=6379
spring.redis.password=
spring.redis.database=0
spring.redis.timeout=30000
spring.redis.jedis.pool.max-active=8
spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0
#本地测试环境
#spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
#线上测试环境
#spring.cloud.nacos.config.namespace=5698e60a-9d0b-433f-a69f-12b0a2d23128
@ -29,30 +29,30 @@ ribbon.ConnectTimeout: 120000
# 正式环境(prod)
#服务名称
spring.application.name=dq-financial-crms
##配置中心地址
spring.cloud.nacos.config.server-addr=120.78.127.12:8848
spring.cloud.nacos.config.namespace=25ce05e2-a0eb-4842-92e4-d8b550a489dd
#spring.cloud.nacos.config.group=prod
spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml
spring.cloud.nacos.config.ext-config[0].group=prod
spring.cloud.nacos.config.ext-config[0].refresh=true
spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml
spring.cloud.nacos.config.ext-config[1].group=prod
spring.cloud.nacos.config.ext-config[1].refresh=true
spring.cloud.nacos.config.ext-config[2].data-id=other.yml
spring.cloud.nacos.config.ext-config[2].group=prod
spring.cloud.nacos.config.ext-config[2].refresh=true
spring.redis.host=127.0.0.1
spring.redis.port=6379
spring.redis.password=dq123456
spring.redis.database=0
spring.redis.timeout=30000
spring.redis.jedis.pool.max-active=8
spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0
#spring.application.name=dq-financial-crms
###配置中心地址
#spring.cloud.nacos.config.server-addr=120.78.127.12:8848
#spring.cloud.nacos.config.namespace=25ce05e2-a0eb-4842-92e4-d8b550a489dd
##spring.cloud.nacos.config.group=prod
#
#spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml
#spring.cloud.nacos.config.ext-config[0].group=prod
#spring.cloud.nacos.config.ext-config[0].refresh=true
#
#spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml
#spring.cloud.nacos.config.ext-config[1].group=prod
#spring.cloud.nacos.config.ext-config[1].refresh=true
#
#spring.cloud.nacos.config.ext-config[2].data-id=other.yml
#spring.cloud.nacos.config.ext-config[2].group=prod
#spring.cloud.nacos.config.ext-config[2].refresh=true
#
#spring.redis.host=127.0.0.1
#spring.redis.port=6379
#spring.redis.password=dq123456
#spring.redis.database=0
#spring.redis.timeout=30000
#spring.redis.jedis.pool.max-active=8
#spring.redis.jedis.pool.max-wait=-1
#spring.redis.jedis.pool.max-idle=8
#spring.redis.jedis.pool.min-idle=0

@ -1,14 +1,14 @@
package com.daqing.financial.guarantee.controller;
import com.daqing.financial.guarantee.model.request.CopySendRequest;
import com.daqing.financial.guarantee.service.IDgCopyForService;
import com.daqing.financial.guarantee.util.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
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.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.io.IOException;
@ -30,13 +30,11 @@ public class DgCopyForController {
private IDgCopyForService copyForService;
@ApiOperation("抄送任务")
@GetMapping("/copySend")
public R copySend(@ApiParam(name = "businessId", value = "业务id")
@RequestParam Integer businessId,
@ApiParam(name = "processId", value = "进程id")
@RequestParam Integer processId,
@ApiParam(name = "imgData", value = "base64图片编码")
@RequestParam String imgData){
@PostMapping("/copySend")
public R copySend(@RequestBody CopySendRequest copySendRequest){
Integer businessId = copySendRequest.getBusinessId();
Integer processId = copySendRequest.getProcessId();
String imgData = copySendRequest.getImgData();
try {
boolean ok = copyForService.copySendUser(businessId,processId,imgData);
return ok ? R.ok() : R.error();

@ -1,11 +1,22 @@
package com.daqing.financial.guarantee.controller;
import com.daqing.financial.guarantee.model.request.CopyForMeRequest;
import com.daqing.financial.guarantee.model.response.CopyForMeResponse;
import com.daqing.financial.guarantee.service.IDgCopyUserService;
import com.daqing.financial.guarantee.util.R;
import com.daqing.financial.guarantee.util.TaskNodeUtil;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
/**
* <p>
@ -20,4 +31,32 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping("/dg-copy-user")
public class DgCopyUserController {
@Autowired
private IDgCopyUserService copyUserService;
@ApiOperation("查询抄送我的")
@PostMapping("/queryCopyForMe")
public R queryCopyForMe(@RequestBody CopyForMeRequest copyForMeRequest){
List<CopyForMeResponse> copyForMeList = copyUserService.queryCopyForMe(copyForMeRequest);
//转换任务节点
copyForMeList.forEach(copyForMeResponse -> {
String taskNode = copyForMeResponse.getTaskNode();
if (taskNode != null) {
String converter = TaskNodeUtil.converter(taskNode);
copyForMeResponse.setTaskNode(converter);
}
});
return R.ok().data("copyForMeList",copyForMeList);
}
@ApiOperation(value = "导出抄送我的列表")
@GetMapping("/exportCopyForMe")
public void queryCopyForMe(HttpServletResponse response){
try {
copyUserService.exportCopyForMe(response);
} catch (IOException e) {
e.printStackTrace();
}
}
}

@ -2,10 +2,13 @@ package com.daqing.financial.guarantee.controller;
import com.alibaba.fastjson.JSONObject;
import com.daqing.financial.guarantee.feign.HrmsFeignService;
import com.daqing.financial.guarantee.model.request.CopyForMeRequest;
import com.daqing.financial.guarantee.model.request.DgEfficiencyTeamRequest;
import com.daqing.financial.guarantee.model.request.PersonalEfficiencyListRequest;
import com.daqing.financial.guarantee.model.response.CopyForMeResponse;
import com.daqing.financial.guarantee.model.response.NumResponse;
import com.daqing.financial.guarantee.model.response.PersonalEfficiencyListResponse;
import com.daqing.financial.guarantee.service.IDgCopyUserService;
import com.daqing.financial.guarantee.service.IDgEfficiencyService;
import com.daqing.financial.guarantee.util.DateUtils;
import com.daqing.financial.guarantee.util.R;
@ -45,6 +48,9 @@ public class DgEfficiencyController {
@Autowired
private HrmsFeignService hrmsFeignService;
@Autowired
private IDgCopyUserService copyUserService;
/**
* 团队效率
*/
@ -132,8 +138,13 @@ public class DgEfficiencyController {
}
}
}
String userId = DgApplyAmountInfoController.getUserId();
CopyForMeRequest copyForMeRequest = new CopyForMeRequest();
copyForMeRequest.setUserId(Integer.parseInt(userId));
List<CopyForMeResponse> copyForMeList = copyUserService.queryCopyForMe(copyForMeRequest);
int size = copyForMeList.size();
NumResponse numResponse = new NumResponse();
numResponse.setCopySendNum(size);
//转换任务节点,并统计操作状态个数
responseList.forEach(personalEfficiencyListResponse -> {
String taskNode = personalEfficiencyListResponse.getTaskNode();

@ -0,0 +1,48 @@
package com.daqing.financial.guarantee.controller;
import com.daqing.financial.guarantee.model.request.DgFormDesignRequest;
import com.daqing.financial.guarantee.model.response.DgFormDesignListResponse;
import com.daqing.financial.guarantee.service.IDgFormDesignService;
import com.daqing.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* 表单设计控制层
*
* @auther River
* @date 2021/1/15 10:38
*/
@RestController
@RequestMapping("/form/design")
@Api(value = "表单设计", tags = "后台表单设计")
public class DgFormDesignController {
@Autowired
private IDgFormDesignService dgFormDesignService;
/**
* 列表
*/
@GetMapping("/list")
@ApiOperation(value = "根据节点id返回当前节点的表单字段", response = DgFormDesignListResponse.class)
public ResponseResult list(@RequestParam("processId") Integer processId) {
return ResponseResult.SUCCESS(dgFormDesignService.list(processId));
}
/**
* 修改
*/
@PostMapping("/update")
@ApiOperation(value = "修改操作")
public ResponseResult update(@RequestBody DgFormDesignRequest dgFormDesignRequest) {
Boolean result = dgFormDesignService.update(dgFormDesignRequest);
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
}
}

@ -1,26 +1,24 @@
package com.daqing.financial.guarantee.controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.daqing.financial.guarantee.feign.HrmsFeignService;
import com.daqing.financial.guarantee.model.response.PersonalEfficiencyListResponse;
import com.daqing.financial.guarantee.model.request.CopySendUserRequest;
import com.daqing.financial.guarantee.service.IDgProcessManageService;
import com.daqing.financial.guarantee.service.IDgProcessUserService;
import com.daqing.financial.guarantee.util.R;
import com.daqing.framework.domain.guarantee.DgProcessManage;
import com.daqing.framework.domain.guarantee.DgProcessUser;
import com.daqing.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.List;
@ -43,15 +41,15 @@ public class DgProcessUserController {
@Autowired
private HrmsFeignService hrmsFeignService;
@ApiOperation("根据进程id查询抄送用户")
@GetMapping("/queryCopySendUser")
public R queryCopySendUser(
@ApiParam(name = "processId", value = "进程id")
@RequestParam Integer processId){
QueryWrapper<DgProcessUser> wrapper = new QueryWrapper<>();
wrapper.eq("process_id",processId).select("user_id");
wrapper.eq("process_id",processId);
List<DgProcessUser> list = processUserService.list(wrapper);
List<Integer> arr = new ArrayList<>();
for (DgProcessUser res : list) {
arr.add(res.getUserId());
@ -72,6 +70,11 @@ public class DgProcessUserController {
return R.ok().data("userList",list);
}
@ApiOperation("更新流程的抄送用户")
@PostMapping("/updateCopySendUser")
public R updateCopySendUser(@RequestBody CopySendUserRequest copySendUserRequest){
boolean save = processUserService.saveCopySendUser(copySendUserRequest);
return save ? R.ok() : R.error();
}
}

@ -2,9 +2,13 @@ package com.daqing.financial.guarantee.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.daqing.financial.guarantee.model.request.CopyForMeRequest;
import com.daqing.financial.guarantee.model.response.CopyForMeResponse;
import com.daqing.framework.domain.guarantee.DgCopyUser;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* <p>
* 抄送用户表 Mapper 接口
@ -16,4 +20,5 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface DgCopyUserMapper extends BaseMapper<DgCopyUser> {
List<CopyForMeResponse> selectCopyForMe(CopyForMeRequest copyForMeRequest);
}

@ -0,0 +1,26 @@
package com.daqing.financial.guarantee.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.daqing.financial.guarantee.model.request.DgFormDesignRequest;
import com.daqing.framework.domain.guarantee.DgFormDesign;
import com.daqing.framework.domain.guarantee.po.DgFormDesignPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 表单设计持久层接口
*
* @auther River
* @date 2021/1/15 10:57
*/
@Mapper
public interface DgFormDesignMapper extends BaseMapper<DgFormDesign> {
List<DgFormDesignPO> list(Integer processId);
Boolean update(@Param("fd") DgFormDesignRequest dgFormDesignRequest);
Integer getOperationProcessIdById(Integer id);
}

@ -6,6 +6,7 @@ import com.daqing.framework.domain.guarantee.DgProcessManage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
/**
@ -20,4 +21,6 @@ import java.util.List;
public interface DgProcessManageMapper extends BaseMapper<DgProcessManage> {
List<DgProcessManage> processManageList(@Param("usrId") int usrId);
Boolean updateTimeByModelId(@Param("modelId") Integer modelId, @Param("date") Date date);
}

@ -0,0 +1,32 @@
package com.daqing.financial.guarantee.model.request;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author chen
* @DATE 2021/1/18 9:57
* @Version 1.0
*/
@Data
public class CopyForMeRequest {
@ApiModelProperty("申请时间,固定类型,0:今天,1:昨天,2:本周,3:本月,4:本年")
private Integer createFixedTime;
@ApiModelProperty("客户名称")
private String clientName;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty("起始时间")
private String startTime;
@ApiModelProperty("用户id")
private Integer userId;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty("结束时间")
private String endTime;
}

@ -0,0 +1,18 @@
package com.daqing.financial.guarantee.model.request;
import lombok.Data;
/**
* @Author chen
* @DATE 2021/1/18 16:15
* @Version 1.0
*/
@Data
public class CopySendRequest {
private Integer businessId;
private Integer processId;
private String imgData;
}

@ -0,0 +1,18 @@
package com.daqing.financial.guarantee.model.request;
import lombok.Data;
import java.util.List;
/**
* @Author chen
* @DATE 2021/1/18 9:33
* @Version 1.0
*/
@Data
public class CopySendUserRequest {
private Integer processId;
private List<Integer> userIds;
}

@ -0,0 +1,34 @@
package com.daqing.financial.guarantee.model.request;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
/**
* 表单设计请求类
*
* @auther River
* @date 2021/1/15 15:28
*/
@Data
@ToString
public class DgFormDesignRequest implements Serializable {
@ApiModelProperty("id")
private Integer id;
@ApiModelProperty("名称")
private String name;
@ApiModelProperty("是否可以隐藏,0:可以但没隐藏,1:不可以,2:可以并已隐藏")
private Integer ifConceal;
@ApiModelProperty("是否必填,0:是,1:否")
private Integer ifRequired;
@ApiModelProperty("提示信息")
private String prompt;
}

@ -0,0 +1,61 @@
package com.daqing.financial.guarantee.model.response;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.daqing.framework.utils.excel.BusinessStatusConverter;
import com.daqing.framework.utils.excel.TaskNodeConverter;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author chen
* @DATE 2021/1/18 9:56
* @Version 1.0
*/
@Data
public class CopyForMeResponse {
@ExcelIgnore
@ApiModelProperty(value = "提单人id")
private Integer applicantId;
@ExcelIgnore
@ApiModelProperty(value = "审批人id")
private Integer approveId;
@ApiModelProperty(value = "提单人")
@ExcelProperty(value = "提单人",index = 0)
private String applicant;
@ApiModelProperty("客户名称")
@ExcelProperty(value = "客户名称",index = 1)
private String clientName;
@ApiModelProperty("申请日期")
@ExcelProperty(value = "申请日期",index = 2)
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private String applicationDate;
@ApiModelProperty("任务节点")
@ExcelProperty(value = "任务节点",index = 3,converter = TaskNodeConverter.class)
private String taskNode;
@ApiModelProperty("审批人")
@ExcelProperty(value = "审批人",index = 4)
private String approve;
@ApiModelProperty("审批时间")
@ExcelProperty(value = "审批时间",index = 5)
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private String approveDate;
@ApiModelProperty("业务状态")
@ExcelProperty(value = "业务状态",index = 6,converter = BusinessStatusConverter.class)
private Integer businessStatus;
@ExcelIgnore
@ApiModelProperty("截图路径")
private String picUrl;
}

@ -0,0 +1,40 @@
package com.daqing.financial.guarantee.model.response;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
/**
* 表单设计返回列表实体类
*
* @auther River
* @date 2021/1/15 14:32
*/
@Data
@ToString
public class DgFormDesignListResponse implements Serializable {
@ApiModelProperty("id")
private Integer id;
@ApiModelProperty("名称")
private String name;
@ApiModelProperty("是否可以隐藏,0:可以但没隐藏,1:不可以,2:可以并已隐藏")
private Integer ifConceal;
@ApiModelProperty("是否必填,0:是,1:否")
private Integer ifRequired;
@ApiModelProperty("是否可以操作,0:是,1:否")
private Integer ifOperation;
@ApiModelProperty("原本名称")
private String formerName;
@ApiModelProperty("提示信息")
private String prompt;
}

@ -19,4 +19,7 @@ public class NumResponse {
@ApiModelProperty("已处理数 ")
private Integer processedNum = 0;
@ApiModelProperty("已发起数 ")
private Integer copySendNum = 0;
}

@ -2,8 +2,14 @@ package com.daqing.financial.guarantee.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.financial.guarantee.model.request.CopyForMeRequest;
import com.daqing.financial.guarantee.model.response.CopyForMeResponse;
import com.daqing.framework.domain.guarantee.DgCopyUser;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
/**
* <p>
* 抄送用户表 服务类
@ -14,4 +20,7 @@ import com.daqing.framework.domain.guarantee.DgCopyUser;
*/
public interface IDgCopyUserService extends IService<DgCopyUser> {
List<CopyForMeResponse> queryCopyForMe(CopyForMeRequest copyForMeRequest);
void exportCopyForMe(HttpServletResponse response) throws IOException;
}

@ -0,0 +1,19 @@
package com.daqing.financial.guarantee.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.financial.guarantee.model.request.DgFormDesignRequest;
import com.daqing.financial.guarantee.model.response.DgFormDesignListResponse;
import com.daqing.framework.domain.guarantee.DgFormDesign;
import java.util.List;
/**
* @auther River
* @date 2021/1/15 10:39
*/
public interface IDgFormDesignService extends IService<DgFormDesign> {
List<DgFormDesignListResponse> list(Integer processId);
Boolean update(DgFormDesignRequest dgFormDesignRequest);
}

@ -2,6 +2,7 @@ package com.daqing.financial.guarantee.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.financial.guarantee.model.request.CopySendUserRequest;
import com.daqing.framework.domain.guarantee.DgProcessUser;
/**
@ -14,4 +15,5 @@ import com.daqing.framework.domain.guarantee.DgProcessUser;
*/
public interface IDgProcessUserService extends IService<DgProcessUser> {
boolean saveCopySendUser(CopySendUserRequest copySendUserRequest);
}

@ -1,7 +1,9 @@
package com.daqing.financial.guarantee.service.impl;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.daqing.financial.guarantee.mapper.DgCopyForMapper;
import com.daqing.financial.guarantee.mapper.DgCopyUserMapper;
import com.daqing.financial.guarantee.mapper.DgProcessUserMapper;
@ -47,33 +49,59 @@ public class DgCopyForServiceImpl extends ServiceImpl<DgCopyForMapper, DgCopyFor
String newName = snowflakeId + ext;
//指定存放目录
String directory = PromptSuccess.UPLOAD_FILE_PATH;
// String directory = "D:/img/";
//图片完整路径
String imgPath = directory + newName;
ImgUtil.generateImage(imgData, imgPath);
//拼接图片地址
//访问路径前缀
String serverPrefix = PromptSuccess.IMAGE_URL_PATH;
//访问路径
String accessPath = serverPrefix + newName;
DgCopyFor copyFor = new DgCopyFor();
copyFor.setBusinessId(businessId);
copyFor.setProcessId(processId);
copyFor.setPicUrl(accessPath);
//取出抄送详情id
Integer copyForId = 0;
//添加之前判断是否抄送详情存在,如果存在则更新这条数据
QueryWrapper<DgCopyFor> wrapperOne = new QueryWrapper<>();
wrapperOne.eq("business_id",businessId).eq("process_id",processId);
DgCopyFor copyFor = baseMapper.selectOne(wrapperOne);
if (ObjectUtil.isNotNull(copyFor)){
//更新数据
DgCopyFor copyForUpdate = new DgCopyFor();
copyForUpdate.setPicUrl(accessPath);
UpdateWrapper<DgCopyFor> updateWrapper = new UpdateWrapper<>();
updateWrapper.eq("business_id",businessId).eq("process_id",processId);
baseMapper.update(copyForUpdate, updateWrapper);
copyForId = copyFor.getId();
}else {
DgCopyFor copyForAdd = new DgCopyFor();
copyForAdd.setBusinessId(businessId);
copyForAdd.setProcessId(processId);
copyForAdd.setPicUrl(accessPath);
//添加抄送详情
baseMapper.insert(copyFor);
Integer copyForId = copyFor.getId();
baseMapper.insert(copyForAdd);
copyForId = copyForAdd.getId();
}
//查询该模块下需要抄送的用户id
QueryWrapper<DgProcessUser> wrapper = new QueryWrapper<>();
wrapper.eq("process_id", processId).select("user_id");
List<DgProcessUser> list = processUserMapper.selectList(wrapper);
if (list != null && list.size() != 0) {
Integer finalCopyForId = copyForId;
list.forEach(dgProcessUser -> {
Integer userId = dgProcessUser.getUserId();
//已经抄送的用户无需再次抄送
QueryWrapper<DgCopyUser> wrapperCopyUser = new QueryWrapper<>();
wrapperCopyUser.eq("user_id",userId).eq("copy_id", finalCopyForId);
DgCopyUser dgCopyUser = copyUserMapper.selectOne(wrapperCopyUser);
if (ObjectUtil.isNull(dgCopyUser)){
DgCopyUser copyUser = new DgCopyUser();
copyUser.setCopyId(copyForId);
copyUser.setCopyId(finalCopyForId);
copyUser.setUserId(userId);
//添加抄送关系
copyUserMapper.insert(copyUser);
}
});
}
return true;

@ -1,10 +1,30 @@
package com.daqing.financial.guarantee.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.guarantee.feign.HrmsFeignService;
import com.daqing.financial.guarantee.mapper.DgCopyUserMapper;
import com.daqing.financial.guarantee.model.request.CopyForMeRequest;
import com.daqing.financial.guarantee.model.response.CopyForMeResponse;
import com.daqing.financial.guarantee.service.IDgCopyUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.guarantee.util.DateUtils;
import com.daqing.framework.domain.guarantee.DgCopyUser;
import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.util.RedisUtil;
import com.daqing.framework.utils.excel.EasyExcelUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.stream.Collectors;
/**
* <p>
@ -17,4 +37,96 @@ import org.springframework.stereotype.Service;
@Service
public class DgCopyUserServiceImpl extends ServiceImpl<DgCopyUserMapper, DgCopyUser> implements IDgCopyUserService {
@Autowired
private HrmsFeignService hrmsFeignService;
@Override
public List<CopyForMeResponse> queryCopyForMe(CopyForMeRequest copyForMeRequest) {
// 时间筛选(固定时间)
if (copyForMeRequest.getCreateFixedTime() != null && (copyForMeRequest.getStartTime() == null ||
copyForMeRequest.getStartTime().length() == 0) && (copyForMeRequest.getEndTime() == null ||
copyForMeRequest.getEndTime().length() == 0)) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
switch (copyForMeRequest.getCreateFixedTime()) {
case 0:
copyForMeRequest.setStartTime(dateFormat.format(DateUtils.getDayBegin()));
copyForMeRequest.setEndTime(dateFormat.format(DateUtils.getDayEnd()));// 今天
break;
case 1:
copyForMeRequest.setStartTime(dateFormat.format(DateUtils.getBeginDayOfYesterday()));
copyForMeRequest.setEndTime(dateFormat.format(DateUtils.getEndDayOfYesterDay()));// 昨天
break;
case 2:
copyForMeRequest.setStartTime(dateFormat.format(DateUtils.getBeginDayOfWeek()));
copyForMeRequest.setEndTime(dateFormat.format(DateUtils.getEndDayOfWeek()));// 本周
break;
case 3:
copyForMeRequest.setStartTime(dateFormat.format(DateUtils.getBeginDayOfMonth()));
copyForMeRequest.setEndTime(dateFormat.format(DateUtils.getEndDayOfMonth()));// 本月
break;
case 4:
copyForMeRequest.setStartTime(dateFormat.format(DateUtils.getBeginDayOfYear()));
copyForMeRequest.setEndTime(dateFormat.format(DateUtils.getEndDayOfYear()));// 本年
break;
default:
copyForMeRequest.setStartTime(null);
copyForMeRequest.setEndTime(null);
}
}
String userId = this.getUserId();
copyForMeRequest.setUserId(Integer.parseInt(userId));
List<CopyForMeResponse> copyForMeResponseList = baseMapper.selectCopyForMe(copyForMeRequest);
if (copyForMeResponseList.size() > 0) {
List<Integer> arr = new ArrayList<>();
for (CopyForMeResponse res : copyForMeResponseList) {
Integer approveId = res.getApproveId();
if (approveId!=null){
arr.add(res.getApproveId());
}
arr.add(res.getApplicantId());
}
//去重
List<Integer> collect = arr.stream().distinct().collect(Collectors.toList());
//根据提单人id查询其部门名称
ResponseResult responseResult = hrmsFeignService.getAccountAndDeptNameById(collect);
List<LinkedHashMap> employeeMessage = null;
if (responseResult.getData() != null) {
employeeMessage = (List<LinkedHashMap>) responseResult.getData();
}
for (CopyForMeResponse response : copyForMeResponseList) {
for (LinkedHashMap res : employeeMessage) {
if (response.getApplicantId().equals(res.get("id"))) {//如果提单人id相同情况下,就往对象里面赋值
response.setApplicant(JSONObject.toJSONString(res.get("account")).replace("\"", ""));
}
if (response.getApproveId()!=null){
if (response.getApproveId().equals(res.get("id"))) {//如果审批人id相同情况下,就往对象里面赋值
response.setApprove(JSONObject.toJSONString(res.get("account")).replace("\"", ""));
}
}
}
}
}
return copyForMeResponseList;
}
/**
* 获取当前登录用户信息
*/
private String getUserId() {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String token = request.getHeader("token");
return RedisUtil.get("dq:token:" + token);
}
@Override
public void exportCopyForMe(HttpServletResponse response) throws IOException {
CopyForMeRequest copyForMeRequest = new CopyForMeRequest();
String userId = this.getUserId();
copyForMeRequest.setUserId(Integer.parseInt(userId));
List<CopyForMeResponse> copyForMeList = this.queryCopyForMe(copyForMeRequest);
EasyExcelUtil.download(response,CopyForMeResponse.class,copyForMeList,"我的抄送列表","第一页");
}
}

@ -335,12 +335,6 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
statusPO.setProcessId(2);
statusPO.setName(name);
statusPO.setStatus(status);
//相同业务中,如果已经是待处理则数据不覆盖
// StatusPO po = (StatusPO) hashMap.get(businessId);
// if (po!=null){
// if (!po.getOperatingStatus().equals(StatusCode.CZ_ON_HAND)) {
// }
// }
hashMap.put(businessId, statusPO);
});
}
@ -363,12 +357,6 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
statusPO.setProcessId(3);
statusPO.setName(name);
statusPO.setStatus(status);
//相同业务中,如果已经是待处理则数据不覆盖
// StatusPO po = (StatusPO) hashMap.get(businessId);
// if (po!=null){
// if (!po.getOperatingStatus().equals(StatusCode.CZ_ON_HAND)) {
// }
// }
hashMap.put(businessId, statusPO);
});
}
@ -391,12 +379,6 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
statusPO.setProcessId(4);
statusPO.setName(name);
statusPO.setStatus(status);
//相同业务中,如果已经是待处理则数据不覆盖
// StatusPO po = (StatusPO) hashMap.get(businessId);
// if (po!=null){
// if (!po.getOperatingStatus().equals(StatusCode.CZ_ON_HAND)) {
// }
// }
hashMap.put(businessId, statusPO);
});
}
@ -420,12 +402,6 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
statusPO.setProcessId(5);
statusPO.setName(name);
statusPO.setStatus(status);
//相同业务中,如果已经是待处理则数据不覆盖
// StatusPO po = (StatusPO) hashMap.get(businessId);
// if (po!=null){
// if (!po.getOperatingStatus().equals(StatusCode.CZ_ON_HAND)) {
// }
// }
hashMap.put(businessId, statusPO);
});
}
@ -447,12 +423,6 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
statusPO.setProcessId(6);
statusPO.setName(name);
statusPO.setStatus(status);
//相同业务中,如果已经是待处理则数据不覆盖
// StatusPO po = (StatusPO) hashMap.get(businessId);
// if (po!=null){
// if (!po.getOperatingStatus().equals(StatusCode.CZ_ON_HAND)) {
// }
// }
hashMap.put(businessId, statusPO);
});
}
@ -474,12 +444,6 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
statusPO.setProcessId(7);
statusPO.setName(name);
statusPO.setStatus(status);
//相同业务中,如果已经是待处理则数据不覆盖
// StatusPO po = (StatusPO) hashMap.get(businessId);
// if (po!=null){
// if (!po.getOperatingStatus().equals(StatusCode.CZ_ON_HAND)) {
// }
// }
hashMap.put(businessId, statusPO);
});
}
@ -502,12 +466,6 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
statusPO.setProcessId(8);
statusPO.setName(name);
statusPO.setStatus(status);
//相同业务中,如果已经是待处理则数据不覆盖
// StatusPO po = (StatusPO) hashMap.get(businessId);
// if (po!=null){
// if (!po.getOperatingStatus().equals(StatusCode.CZ_ON_HAND)) {
// }
// }
hashMap.put(businessId, statusPO);
});
}
@ -530,12 +488,6 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
statusPO.setProcessId(9);
statusPO.setName(name);
statusPO.setStatus(status);
//相同业务中,如果已经是待处理则数据不覆盖
// StatusPO po = (StatusPO) hashMap.get(businessId);
// if (po!=null){
// if (!po.getOperatingStatus().equals(StatusCode.CZ_ON_HAND)) {
// }
// }
hashMap.put(businessId, statusPO);
});
}
@ -558,12 +510,6 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
statusPO.setProcessId(10);
statusPO.setName(name);
statusPO.setStatus(status);
//相同业务中,如果已经是待处理则数据不覆盖
// StatusPO po = (StatusPO) hashMap.get(businessId);
// if (po!=null){
// if (!po.getOperatingStatus().equals(StatusCode.CZ_ON_HAND)) {
// }
// }
hashMap.put(businessId, statusPO);
});
}

@ -0,0 +1,82 @@
package com.daqing.financial.guarantee.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.guarantee.mapper.DgFormDesignMapper;
import com.daqing.financial.guarantee.mapper.DgProcessManageMapper;
import com.daqing.financial.guarantee.model.request.DgFormDesignRequest;
import com.daqing.financial.guarantee.model.response.DgFormDesignListResponse;
import com.daqing.financial.guarantee.service.IDgFormDesignService;
import com.daqing.framework.domain.guarantee.DgFormDesign;
import com.daqing.framework.domain.guarantee.GuaranteeCode;
import com.daqing.framework.domain.guarantee.po.DgFormDesignPO;
import com.daqing.framework.exception.ExceptionCast;
import com.daqing.framework.model.response.CommonCode;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* 表单设计业务层实现类
*
* @auther River
* @date 2021/1/15 10:40
*/
@Service
public class DgFormDesignServiceImpl extends ServiceImpl<DgFormDesignMapper, DgFormDesign> implements IDgFormDesignService {
@Autowired
private DgProcessManageMapper dgProcessManageMapper;
/**
* 列表
*/
@Override
public List<DgFormDesignListResponse> list(Integer processId) {
if (processId == null) {
ExceptionCast.cast(GuaranteeCode.FROM_DESIGN_PROCESS_ERROR);
}
List<DgFormDesignListResponse> responseList = new ArrayList<>();
List<DgFormDesignPO> list = this.getBaseMapper().list(processId);
for (DgFormDesignPO dgFormDesignPO : list) {
DgFormDesignListResponse dgFormDesignListResponse = new DgFormDesignListResponse();
// 当可操作节点与当前节点相同时表示可以操作
if (processId.equals(dgFormDesignPO.getOperationProcessId())) {
dgFormDesignListResponse.setIfOperation(0);
} else {
dgFormDesignListResponse.setIfOperation(1);
}
BeanUtils.copyProperties(dgFormDesignPO, dgFormDesignListResponse);
responseList.add(dgFormDesignListResponse);
}
return responseList;
}
/**
* 修改
*/
@Transactional
@Override
public Boolean update(DgFormDesignRequest dgFormDesignRequest) {
if (dgFormDesignRequest.getId() == null || dgFormDesignRequest.getIfConceal() == null
|| dgFormDesignRequest.getIfRequired() == null) {
ExceptionCast.cast(CommonCode.INVALID_PARAM);
}
if (dgFormDesignRequest.getName() == null || dgFormDesignRequest.getName().length() == 0) {
ExceptionCast.cast(GuaranteeCode.FROM_DESIGN_NAME_NOT_NULL);
}
// 获取当前字段的操作节点id
Integer operationProcessId = this.getBaseMapper().getOperationProcessIdById(dgFormDesignRequest.getId());
if (operationProcessId != null) {
Boolean result = dgProcessManageMapper.updateTimeByModelId(operationProcessId, new Date());
if (result) {
return this.getBaseMapper().update(dgFormDesignRequest);
}
}
return false;
}
}

@ -1,11 +1,20 @@
package com.daqing.financial.guarantee.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.daqing.financial.guarantee.mapper.DgProcessManageMapper;
import com.daqing.financial.guarantee.mapper.DgProcessUserMapper;
import com.daqing.financial.guarantee.model.request.CopySendUserRequest;
import com.daqing.financial.guarantee.service.IDgProcessUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.framework.domain.guarantee.DgProcessManage;
import com.daqing.framework.domain.guarantee.DgProcessUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/**
* <p>
* 业务模块选择抄送用户表 服务实现类
@ -17,4 +26,30 @@ import org.springframework.stereotype.Service;
@Service
public class DgProcessUserServiceImpl extends ServiceImpl<DgProcessUserMapper, DgProcessUser> implements IDgProcessUserService {
@Autowired
private DgProcessManageMapper processManageMapper;
@Override
public boolean saveCopySendUser(CopySendUserRequest copySendUserRequest) {
Integer processId = copySendUserRequest.getProcessId();
QueryWrapper<DgProcessUser> wrapper = new QueryWrapper<>();
wrapper.eq("process_id",processId);
baseMapper.delete(wrapper);
List<Integer> userIds = copySendUserRequest.getUserIds();
userIds.forEach(userId -> {
DgProcessUser processUser = new DgProcessUser();
processUser.setProcessId(processId);
processUser.setUserId(userId);
baseMapper.insert(processUser);
});
//更新流程管理的更新时间
UpdateWrapper<DgProcessManage> updateWrapper = new UpdateWrapper<>();
updateWrapper.eq("id",processId);
DgProcessManage processManage = new DgProcessManage();
processManage.setUpdateTime(new Date());
processManageMapper.update(processManage,updateWrapper);
return true;
}
}

@ -1,21 +1,26 @@
#服务名称
#spring.application.name=dq-financial-guarantee
##配置中心地址
#spring.cloud.nacos.config.server-addr=127.0.0.1:8848
#spring.cloud.nacos.config.file-extension=yml
##redis配置
#spring.redis.host=127.0.0.1
#spring.redis.port=6379
#spring.redis.password=
#spring.redis.database=0
#spring.redis.timeout=30000
#spring.redis.jedis.pool.max-active=8
#spring.redis.jedis.pool.max-wait=-1
#spring.redis.jedis.pool.max-idle=8
#spring.redis.jedis.pool.min-idle=0
spring.application.name=dq-financial-guarantee
#配置中心地址
spring.cloud.nacos.config.server-addr=127.0.0.1:8848
spring.cloud.nacos.config.file-extension=yml
#redis配置
spring.redis.host=127.0.0.1
spring.redis.port=6379
spring.redis.password=
spring.redis.database=0
spring.redis.timeout=30000
spring.redis.jedis.pool.max-active=8
spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0
#设置请求头大小
server.max-http-header-size=102400
server.tomcat.max-http-post-size=10MB
#本地测试环境
#spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
#线上测试环境
#spring.cloud.nacos.config.namespace=5698e60a-9d0b-433f-a69f-12b0a2d23128
@ -36,29 +41,29 @@ ribbon.ConnectTimeout: 120000
#
##正式环境(prod)
##服务名称
spring.application.name=dq-financial-guarantee
#配置中心地址
spring.cloud.nacos.config.server-addr=120.78.127.12:8848
spring.cloud.nacos.config.namespace=502bfc93-6e2f-44aa-93ad-f074664c6826
spring.cloud.nacos.config.ext-config[0].data-id=dq-financial-guarantee.yml
spring.cloud.nacos.config.ext-config[0].group=prod
spring.cloud.nacos.config.ext-config[0].refresh=true
spring.cloud.nacos.config.ext-config[1].data-id=datasource.yml
spring.cloud.nacos.config.ext-config[1].group=prod
spring.cloud.nacos.config.ext-config[1].refresh=true
spring.cloud.nacos.config.ext-config[2].data-id=mybatis.yml
spring.cloud.nacos.config.ext-config[2].group=prod
spring.cloud.nacos.config.ext-config[2].refresh=true
spring.redis.host=127.0.0.1
spring.redis.port=6379
spring.redis.password=dq123456
spring.redis.database=0
spring.redis.timeout=30000
spring.redis.jedis.pool.max-active=8
spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0
#spring.application.name=dq-financial-guarantee
##配置中心地址
#spring.cloud.nacos.config.server-addr=120.78.127.12:8848
#spring.cloud.nacos.config.namespace=502bfc93-6e2f-44aa-93ad-f074664c6826
#
#spring.cloud.nacos.config.ext-config[0].data-id=dq-financial-guarantee.yml
#spring.cloud.nacos.config.ext-config[0].group=prod
#spring.cloud.nacos.config.ext-config[0].refresh=true
#
#spring.cloud.nacos.config.ext-config[1].data-id=datasource.yml
#spring.cloud.nacos.config.ext-config[1].group=prod
#spring.cloud.nacos.config.ext-config[1].refresh=true
#
#spring.cloud.nacos.config.ext-config[2].data-id=mybatis.yml
#spring.cloud.nacos.config.ext-config[2].group=prod
#spring.cloud.nacos.config.ext-config[2].refresh=true
#
#spring.redis.host=127.0.0.1
#spring.redis.port=6379
#spring.redis.password=dq123456
#spring.redis.database=0
#spring.redis.timeout=30000
#spring.redis.jedis.pool.max-active=8
#spring.redis.jedis.pool.max-wait=-1
#spring.redis.jedis.pool.max-idle=8
#spring.redis.jedis.pool.min-idle=0

@ -9,4 +9,43 @@
<result column="user_id" property="userId" />
</resultMap>
<resultMap id="CopyForMeMap" type="com.daqing.financial.guarantee.model.response.CopyForMeResponse">
<result column="presenter_id" property="applicantId" />
<result column="name" property="clientName" />
<result column="create_time" property="applicationDate" />
<result column="process_id" property="taskNode" />
<result column="approval_id" property="approveId" />
<result column="business_status" property="businessStatus" />
<result column="approve_date" property="approveDate" />
<result column="pic_url" property="picUrl" />
</resultMap>
<select id="selectCopyForMe" parameterType="com.daqing.financial.guarantee.model.request.CopyForMeRequest"
resultMap="CopyForMeMap">
SELECT
aai.presenter_id,
cc.name,
aai.create_time,
cf.process_id,
aai.approval_id,
aai.status,
bps.business_status,
cf.update_time as approve_date,
cf.pic_url
FROM
dg_copy_user cu
LEFT JOIN dg_copy_for cf ON cu.copy_id = cf.id
LEFT JOIN dg_apply_amount_info aai ON cf.business_id = aai.id
LEFT JOIN crms_company_customer ccc ON aai.company_id = ccc.id
LEFT JOIN crms_customer cc ON ccc.customer_id = cc.id
LEFT JOIN dg_business_process_status bps ON bps.business_id = aai.id
WHERE cu.user_id = #{userId}
<if test="startTime != null and endTime != ''">
AND cf.update_time BETWEEN #{startTime} and #{endTime}
</if>
<if test="clientName != null and clientName != ''">
AND cc.name LIKE '%' #{clientName} '%'
</if>
</select>
</mapper>

@ -0,0 +1,22 @@
<?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="com.daqing.financial.guarantee.mapper.DgFormDesignMapper">
<!-- 根据节点id查询对应的表单字段 -->
<select id="list" parameterType="integer" resultType="com.daqing.framework.domain.guarantee.po.DgFormDesignPO">
SELECT id,name,if_conceal,operation_process_id,if_required,former_name,prompt
FROM dg_form_design
WHERE FIND_IN_SET(#{processId},process_id)
</select>
<update id="update" parameterType="com.daqing.financial.guarantee.model.request.DgFormDesignRequest">
UPDATE dg_form_design SET name = #{fd.name},if_conceal = #{fd.ifConceal},if_required = #{fd.ifRequired},prompt = #{fd.prompt}
WHERE id = #{fd.id}
</update>
<!-- 根据节点id获取当前操作节点id -->
<select id="getOperationProcessIdById" parameterType="integer" resultType="integer">
SELECT operation_process_id FROM dg_form_design WHERE id = #{id}
</select>
</mapper>

@ -23,4 +23,7 @@
</where>
</select>
<update id="updateTimeByModelId">
UPDATE dg_process_manage SET update_time = #{date} WHERE model_id = #{modelId}
</update>
</mapper>

@ -1,21 +1,21 @@
#服务名称
#spring.application.name=dq-financial-hrms-auth
##配置中心地址
#spring.cloud.nacos.config.server-addr=127.0.0.1:8848
#spring.cloud.nacos.config.file-extension=yml
##redis配置
#spring.redis.host=127.0.0.1
#spring.redis.port=6379
#spring.redis.password=
#spring.redis.database=0
#spring.redis.timeout=30000
#spring.redis.jedis.pool.max-active=8
#spring.redis.jedis.pool.max-wait=-1
#spring.redis.jedis.pool.max-idle=8
#spring.redis.jedis.pool.min-idle=0
spring.application.name=dq-financial-hrms-auth
#配置中心地址
spring.cloud.nacos.config.server-addr=192.168.31.140:8848
spring.cloud.nacos.config.file-extension=yml
#redis配置
spring.redis.host=127.0.0.1
spring.redis.port=6379
spring.redis.password=
spring.redis.database=0
spring.redis.timeout=30000
spring.redis.jedis.pool.max-active=8
spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0
#本地测试环境
#spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
#线上测试环境
#spring.cloud.nacos.config.namespace=5698e60a-9d0b-433f-a69f-12b0a2d23128
@ -30,30 +30,30 @@ ribbon.ConnectTimeout: 30000
#正式环境(prod)
spring.application.name=dq-financial-hrms-auth
spring.cloud.nacos.config.server-addr=120.78.127.12:8848
spring.cloud.nacos.config.namespace=b590c830-7ada-44b7-968f-e8d0c81990c4
#spring.cloud.nacos.config.group=prod
spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml
spring.cloud.nacos.config.ext-config[0].group=prod
spring.cloud.nacos.config.ext-config[0].refresh=true
spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml
spring.cloud.nacos.config.ext-config[1].group=prod
spring.cloud.nacos.config.ext-config[1].refresh=true
spring.cloud.nacos.config.ext-config[2].data-id=other.yml
spring.cloud.nacos.config.ext-config[2].group=prod
spring.cloud.nacos.config.ext-config[2].refresh=true
spring.redis.host=127.0.0.1
spring.redis.port=6379
spring.redis.password=dq123456
spring.redis.database=0
spring.redis.timeout=30000
spring.redis.jedis.pool.max-active=8
spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0
#spring.application.name=dq-financial-hrms-auth
#
#spring.cloud.nacos.config.server-addr=120.78.127.12:8848
#spring.cloud.nacos.config.namespace=b590c830-7ada-44b7-968f-e8d0c81990c4
##spring.cloud.nacos.config.group=prod
#
#spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml
#spring.cloud.nacos.config.ext-config[0].group=prod
#spring.cloud.nacos.config.ext-config[0].refresh=true
#
#spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml
#spring.cloud.nacos.config.ext-config[1].group=prod
#spring.cloud.nacos.config.ext-config[1].refresh=true
#
#spring.cloud.nacos.config.ext-config[2].data-id=other.yml
#spring.cloud.nacos.config.ext-config[2].group=prod
#spring.cloud.nacos.config.ext-config[2].refresh=true
#
#spring.redis.host=127.0.0.1
#spring.redis.port=6379
#spring.redis.password=dq123456
#spring.redis.database=0
#spring.redis.timeout=30000
#spring.redis.jedis.pool.max-active=8
#spring.redis.jedis.pool.max-wait=-1
#spring.redis.jedis.pool.max-idle=8
#spring.redis.jedis.pool.min-idle=0

@ -102,22 +102,15 @@ public class RoleController {
return ResponseResult.SUCCESS(employees);
}
@ApiOperation(value = "保存用户角色")
@PostMapping("saveUserRole")
public ResponseResult saveUserRole(@RequestBody UserRoleVO userRoleVO){
@ApiOperation(value = "更新用户角色")
@PostMapping("updateUserRole")
public ResponseResult updateUserRole(@RequestBody UserRoleVO userRoleVO){
List<String> userIds = userRoleVO.getUserIds();
if (userIds.size()==0){
return ResponseResult.FAIL(20000,"不能不选择用户");
}
boolean save = roleService.saveUserRole(userRoleVO);
return ResponseResult.SUCCESS(save);
}
@ApiOperation(value = "删除用户角色")
@PostMapping("removeUserRole")
public ResponseResult removeUserRole(
@ApiParam(name = "roleId", value = "角色id", required = true)
@RequestParam("roleId") String roleId,
@ApiParam(name = "userId", value = "用户id", required = true)
@RequestParam("userId") String userId){
boolean remove = roleService.removeUserRole(roleId,userId);
return ResponseResult.SUCCESS(remove);
}
}

@ -25,5 +25,5 @@ public interface RoleDao extends BaseMapper<RoleEntity> {
void saveUserRole(@Param("roleId") String roleId,@Param("userId") String userId);
int removeUserRole(@Param("roleId") String roleId,@Param("userId") String userId);
int removeUserRole(@Param("roleId") String roleId);
}

@ -24,7 +24,5 @@ public interface RoleService extends IService<RoleEntity> {
boolean saveUserRole(UserRoleVO userRoleVO);
boolean removeUserRole(String roleId, String userId);
}

@ -38,6 +38,8 @@ public class RoleServiceImpl extends ServiceImpl<RoleDao, RoleEntity> implements
@Override
public boolean saveUserRole(UserRoleVO userRoleVO) {
String roleId = userRoleVO.getRoleId();
baseMapper.removeUserRole(roleId);
List<String> userIds = userRoleVO.getUserIds();
userIds.forEach(userId -> {
baseMapper.saveUserRole(roleId,userId);
@ -45,9 +47,4 @@ public class RoleServiceImpl extends ServiceImpl<RoleDao, RoleEntity> implements
return true;
}
@Override
public boolean removeUserRole(String roleId, String userId) {
int remove = baseMapper.removeUserRole(roleId,userId);
return remove>0;
}
}

@ -1,21 +1,21 @@
##服务名称
#spring.application.name=dq-financial-hrms
##配置中心地址
#spring.cloud.nacos.config.server-addr=127.0.0.1:8848
#spring.cloud.nacos.config.file-extension=yml
##redis配置
#spring.redis.host=127.0.0.1
#spring.redis.port=6379
#spring.redis.password=
#spring.redis.database=0
#spring.redis.timeout=30000
#spring.redis.jedis.pool.max-active=8
#spring.redis.jedis.pool.max-wait=-1
#spring.redis.jedis.pool.max-idle=8
#spring.redis.jedis.pool.min-idle=0
#服务名称
spring.application.name=dq-financial-hrms
#配置中心地址
spring.cloud.nacos.config.server-addr=192.168.31.140:8848
spring.cloud.nacos.config.file-extension=yml
#redis配置
spring.redis.host=127.0.0.1
spring.redis.port=6379
spring.redis.password=
spring.redis.database=0
spring.redis.timeout=30000
spring.redis.jedis.pool.max-active=8
spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0
#本地测试环境
#spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
#线上测试环境
#spring.cloud.nacos.config.namespace=5698e60a-9d0b-433f-a69f-12b0a2d23128
@ -33,30 +33,30 @@ spring.servlet.multipart.max-request-size=10MB
# 正式环境(prod)
#服务名称
spring.application.name=dq-financial-hrms
#配置中心地址
spring.cloud.nacos.config.server-addr=120.78.127.12:8848
spring.cloud.nacos.config.namespace=69614b55-1521-421c-ac58-dbe4a5b01b43
#spring.cloud.nacos.config.group=prod
spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml
spring.cloud.nacos.config.ext-config[0].group=prod
spring.cloud.nacos.config.ext-config[0].refresh=true
spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml
spring.cloud.nacos.config.ext-config[1].group=prod
spring.cloud.nacos.config.ext-config[1].refresh=true
spring.cloud.nacos.config.ext-config[2].data-id=other.yml
spring.cloud.nacos.config.ext-config[2].group=prod
spring.cloud.nacos.config.ext-config[2].refresh=true
spring.redis.host=127.0.0.1
spring.redis.port=6379
spring.redis.password=dq123456
spring.redis.database=0
spring.redis.timeout=30000
spring.redis.jedis.pool.max-active=8
spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0
#spring.application.name=dq-financial-hrms
##配置中心地址
#spring.cloud.nacos.config.server-addr=120.78.127.12:8848
#spring.cloud.nacos.config.namespace=69614b55-1521-421c-ac58-dbe4a5b01b43
##spring.cloud.nacos.config.group=prod
#
#spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml
#spring.cloud.nacos.config.ext-config[0].group=prod
#spring.cloud.nacos.config.ext-config[0].refresh=true
#
#spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml
#spring.cloud.nacos.config.ext-config[1].group=prod
#spring.cloud.nacos.config.ext-config[1].refresh=true
#
#spring.cloud.nacos.config.ext-config[2].data-id=other.yml
#spring.cloud.nacos.config.ext-config[2].group=prod
#spring.cloud.nacos.config.ext-config[2].refresh=true
#
#spring.redis.host=127.0.0.1
#spring.redis.port=6379
#spring.redis.password=dq123456
#spring.redis.database=0
#spring.redis.timeout=30000
#spring.redis.jedis.pool.max-active=8
#spring.redis.jedis.pool.max-wait=-1
#spring.redis.jedis.pool.max-idle=8
#spring.redis.jedis.pool.min-idle=0

@ -17,7 +17,7 @@
</insert>
<delete id="removeUserRole">
DELETE FROM hrms_employee_role WHERE user_id = #{userId} and role_id = #{roleId}
DELETE FROM hrms_employee_role WHERE role_id = #{roleId}
</delete>
<select id="listRoleIdAndName" resultType="com.daqing.framework.domain.hrms.ext.RoleVO">

@ -2,6 +2,7 @@ package com.daqing.framework.domain.guarantee;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@ -14,6 +15,7 @@ import java.util.Date;
* @author Qyq
* @since 2021-01-15
*/
@Data
@TableName("dg_copy_for")
public class DgCopyFor implements Serializable {
@ -44,42 +46,8 @@ public class DgCopyFor implements Serializable {
@TableField(fill = FieldFill.INSERT)
private Date createTime;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getBusinessId() {
return businessId;
}
public void setBusinessId(Integer businessId) {
this.businessId = businessId;
}
public Integer getProcessId() {
return processId;
}
@ApiModelProperty(value = "更新时间")
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateTime;
public void setProcessId(Integer processId) {
this.processId = processId;
}
public String getPicUrl() {
return picUrl;
}
public void setPicUrl(String picUrl) {
this.picUrl = picUrl;
}
@Override
public String toString() {
return "DgCopyFor{" +
"id=" + id +
", businessId=" + businessId +
", processId=" + processId +
", picUrl=" + picUrl +
"}";
}
}

@ -0,0 +1,67 @@
package com.daqing.framework.domain.guarantee;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.util.Date;
/**
* 表单设计实体类
*
* @auther River
* @date 2021/1/15 10:47
*/
@Data
@ToString
@TableName("dg_form_design")
public class DgFormDesign implements Serializable {
private Integer id;
/**
* 姓名
*/
private String name;
/**
* 属于节点
*/
private String processId;
/**
* 是否可以隐藏
*/
private Integer ifConceal;
/**
* 可操作节点
*/
private Integer operationProcessId;
/**
* 是否必填
*/
private Integer ifRequired;
/**
* 原本名称
*/
private String formerName;
/**
* 提示信息
*/
private String prompt;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
}

@ -1,6 +1,7 @@
package com.daqing.framework.domain.guarantee;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -39,6 +40,7 @@ public class DgProcessUser implements Serializable {
@ApiModelProperty(value = "创建时间")
@TableField(fill = FieldFill.INSERT)
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date createTime;
@TableField(exist = false)

@ -29,7 +29,10 @@ public enum GuaranteeCode implements ResultCode {
EXCEL_ID_NOT_NULL(false, 120001, "导出的数据不能为空,请选择要导出的数据!"),
EFFICIENCY_TIME_ERROR(false, 130001,"时间格式错误!");
EFFICIENCY_TIME_ERROR(false, 130001,"时间格式错误!"),
FROM_DESIGN_PROCESS_ERROR(false,140001,"当前节点数据不存在!"),
FROM_DESIGN_NAME_NOT_NULL(false,140002,"字段名称不能为空!");
/**
* 操作是否成功
*/

@ -0,0 +1,49 @@
package com.daqing.framework.domain.guarantee.po;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
/**
* 表单设计
*
* @auther River
* @date 2021/1/15 14:12
*/
@Data
@ToString
public class DgFormDesignPO implements Serializable {
private Integer id;
/**
* 名称
*/
private String name;
/**
* 是否隐藏
*/
private Integer ifConceal;
/**
* 是否必填
*/
private Integer ifRequired;
/**
* 可操作节点
*/
private Integer operationProcessId;
/**
* 原本名称
*/
private String formerName;
/**
* 提示信息
*/
private String prompt;
}

@ -1,21 +1,21 @@
#服务名称
#spring.application.name=dq-govern-gateway
##配置中心地址
#spring.cloud.nacos.config.server-addr=127.0.0.1:8848
#spring.cloud.nacos.config.file-extension=yml
##redis配置
#spring.redis.host=127.0.0.1
#spring.redis.port=6379
#spring.redis.password=
#spring.redis.database=0
#spring.redis.timeout=30000
#spring.redis.jedis.pool.max-active=8
#spring.redis.jedis.pool.max-wait=-1
#spring.redis.jedis.pool.max-idle=8
#spring.redis.jedis.pool.min-idle=0
spring.application.name=dq-govern-gateway
#配置中心地址
spring.cloud.nacos.config.server-addr=192.168.31.140:8848
spring.cloud.nacos.config.file-extension=yml
#redis配置
spring.redis.host=127.0.0.1
spring.redis.port=6379
spring.redis.password=
spring.redis.database=0
spring.redis.timeout=30000
spring.redis.jedis.pool.max-active=8
spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0
#本地测试环境
#spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
#线上测试环境
#spring.cloud.nacos.config.namespace=5698e60a-9d0b-433f-a69f-12b0a2d23128
@ -28,21 +28,21 @@ spring.servlet.multipart.max-request-size=10MB
# 正式环境(prod)
#服务名称
spring.application.name=dq-govern-gateway
#配置中心地址
spring.cloud.nacos.config.server-addr=120.78.127.12:8848
spring.cloud.nacos.config.namespace=68738215-903f-426c-8658-2dcd99b20009
spring.cloud.nacos.config.ext-config[0].data-id=dq-govern-gateway.yml
spring.cloud.nacos.config.ext-config[0].group=prod
spring.cloud.nacos.config.ext-config[0].refresh=true
spring.redis.host=127.0.0.1
spring.redis.port=6379
spring.redis.password=dq123456
spring.redis.database=0
spring.redis.timeout=30000
spring.redis.jedis.pool.max-active=8
spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0
#spring.application.name=dq-govern-gateway
##配置中心地址
#spring.cloud.nacos.config.server-addr=120.78.127.12:8848
#spring.cloud.nacos.config.namespace=68738215-903f-426c-8658-2dcd99b20009
#
#spring.cloud.nacos.config.ext-config[0].data-id=dq-govern-gateway.yml
#spring.cloud.nacos.config.ext-config[0].group=prod
#spring.cloud.nacos.config.ext-config[0].refresh=true
#
#spring.redis.host=127.0.0.1
#spring.redis.port=6379
#spring.redis.password=dq123456
#spring.redis.database=0
#spring.redis.timeout=30000
#spring.redis.jedis.pool.max-active=8
#spring.redis.jedis.pool.max-wait=-1
#spring.redis.jedis.pool.max-idle=8
#spring.redis.jedis.pool.min-idle=0
Loading…
Cancel
Save