
62 changed files with 1719 additions and 19 deletions
@ -0,0 +1,24 @@ |
|||||
|
package com.yxt.supervise.flowable.api.flow2; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/29 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class FlowDelegateQuery { |
||||
|
|
||||
|
@ApiModelProperty |
||||
|
private String userSid; |
||||
|
@ApiModelProperty("流程实例id") |
||||
|
private String instanceId; |
||||
|
@ApiModelProperty("任务Id") |
||||
|
private String taskId; |
||||
|
@ApiModelProperty("审批人sid") |
||||
|
private String assignee; |
||||
|
@ApiModelProperty("填写意见") |
||||
|
private String views; |
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.yxt.supervise.flowable.api.flow2; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/30 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class MessageFlowVo { |
||||
|
|
||||
|
private String sid; |
||||
|
private String procDefId; |
||||
|
private String nodeState; |
||||
|
private String procInsId; |
||||
|
private String taskDefKey; |
||||
|
private String taskId; |
||||
|
private String nextNodeUserSids; |
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
package com.yxt.supervise.flowable.api.flowtask; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/29 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class DelegateQuery { |
||||
|
|
||||
|
@ApiModelProperty("任务Id") |
||||
|
private String taskId; |
||||
|
|
||||
|
@ApiModelProperty("审批人") |
||||
|
private String assignee; |
||||
|
} |
@ -0,0 +1,28 @@ |
|||||
|
package com.yxt.supervise.message.message; |
||||
|
|
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/30 |
||||
|
**/ |
||||
|
@FeignClient( |
||||
|
contextId = "supervise-message-Message", |
||||
|
name = "supervise-message", |
||||
|
path = "v1/Message", |
||||
|
fallback = MessageFeignFallBack.class) |
||||
|
public interface MessageFeign { |
||||
|
|
||||
|
@ApiOperation("流程审批推送消息 抄送") |
||||
|
@PostMapping("/pushMessageCC") |
||||
|
public ResultBean<String> pushMessageCC(MessageFlowableQuery query); |
||||
|
|
||||
|
@ApiOperation("分享") |
||||
|
@PostMapping("/pushMessageShare") |
||||
|
ResultBean<String> pushMessageShare(@RequestBody MessageFlowableQuery query); |
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
package com.yxt.supervise.message.message; |
||||
|
|
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/30 |
||||
|
**/ |
||||
|
@Component |
||||
|
public class MessageFeignFallBack { |
||||
|
} |
@ -0,0 +1,31 @@ |
|||||
|
package com.yxt.supervise.message.message; |
||||
|
|
||||
|
import com.yxt.supervise.flowable.api.flow2.MessageFlowVo; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/30 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class MessageFlowableQuery { |
||||
|
|
||||
|
@ApiModelProperty("业务sid") |
||||
|
private String businessSid; |
||||
|
@ApiModelProperty("模块名称") |
||||
|
private String moduleName; |
||||
|
@ApiModelProperty("消息内容") |
||||
|
private String msgContent; |
||||
|
@ApiModelProperty("消息标题") |
||||
|
private String msgTitle; |
||||
|
@ApiModelProperty("流程相关参数") |
||||
|
private MessageFlowVo ufVo; |
||||
|
@ApiModelProperty("申请人") |
||||
|
private String applicationName; |
||||
|
@ApiModelProperty("抄送的用户sid") |
||||
|
private String userSids; |
||||
|
@ApiModelProperty("当前所登陆账号的sid") |
||||
|
private String userSid; |
||||
|
} |
@ -0,0 +1,25 @@ |
|||||
|
package com.yxt.supervise.system.sysflowcc; |
||||
|
|
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.supervise.system.sysorganization.SysOrganizationFeignFallback; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||
|
import org.springframework.web.bind.annotation.PathVariable; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/30 |
||||
|
**/ |
||||
|
@FeignClient( |
||||
|
contextId = "supervise-system-SysFlowcc", |
||||
|
name = "supervise-system", |
||||
|
path = "v1/sysflowcc", |
||||
|
fallback = SysFlowccFeignFallback.class) |
||||
|
public interface SysFlowccFeign { |
||||
|
|
||||
|
@ApiOperation("根据流程的id查询抄送的角色") |
||||
|
@PostMapping("/getRoleSidByModelId/{modelId}") |
||||
|
public ResultBean<SysFlowccVo> getRoleSidByModelId(@PathVariable("modelId") String modelId); |
||||
|
} |
@ -0,0 +1,9 @@ |
|||||
|
package com.yxt.supervise.system.sysflowcc; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/30 |
||||
|
**/ |
||||
|
public class SysFlowccFeignFallback { |
||||
|
} |
@ -0,0 +1,24 @@ |
|||||
|
package com.yxt.supervise.system.sysflowcc; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/30 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class SysFlowccVo { |
||||
|
|
||||
|
private String sid; // sid
|
||||
|
|
||||
|
@ApiModelProperty("流程key") |
||||
|
private String flowKey; // 流程key
|
||||
|
@ApiModelProperty("流程名称") |
||||
|
private String flowName; // 流程名称
|
||||
|
@ApiModelProperty("角色sid") |
||||
|
private String roleSid; // 角色sid
|
||||
|
@ApiModelProperty("角色名称") |
||||
|
private String roleName; // 角色名称
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.yxt.supervise.system.sysuser; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/30 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class UserByRolesAndProQuery { |
||||
|
|
||||
|
@ApiModelProperty(value = "角色sid必传项") |
||||
|
private List<String> roleSids; |
||||
|
@ApiModelProperty(value = "项目sid") |
||||
|
private String projectSid; |
||||
|
} |
@ -0,0 +1,72 @@ |
|||||
|
package com.yxt.supervise.message.api.message; |
||||
|
|
||||
|
import com.yxt.common.core.dto.Dto; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/29 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class MessageDto implements Dto { |
||||
|
|
||||
|
private static final long serialVersionUID = -4643392187155889939L; |
||||
|
@ApiModelProperty("消息体sid") |
||||
|
private String sid; |
||||
|
|
||||
|
@ApiModelProperty("消息类别sid") |
||||
|
private String msgTypeSid; |
||||
|
|
||||
|
@ApiModelProperty("消息类别名称") |
||||
|
private String msgType; |
||||
|
|
||||
|
@ApiModelProperty("消息标题") |
||||
|
private String msgTitle; |
||||
|
|
||||
|
@ApiModelProperty("消息内容") |
||||
|
private String msgContent; |
||||
|
|
||||
|
@ApiModelProperty("来源(资源名称)") |
||||
|
private String msgSource; |
||||
|
|
||||
|
@ApiModelProperty("发送人sid") |
||||
|
private String senderSid; |
||||
|
|
||||
|
@ApiModelProperty("发起人姓名") |
||||
|
private String senderName; |
||||
|
|
||||
|
@ApiModelProperty("发送人部门Id") |
||||
|
private String senderDeptSid; |
||||
|
|
||||
|
@ApiModelProperty("发起人部门名称") |
||||
|
private String senderDeptName; |
||||
|
|
||||
|
@ApiModelProperty("业务Id(扩展字段,与工作相关)") |
||||
|
private String businessSid; |
||||
|
|
||||
|
@ApiModelProperty("插件Sid") |
||||
|
private String moduleSid; |
||||
|
|
||||
|
@ApiModelProperty("具体页面action") |
||||
|
private String moduleAction; |
||||
|
|
||||
|
@ApiModelProperty("0.内置Activity 1.内置WebView 2.RePlugin插件") |
||||
|
private String app_type; |
||||
|
|
||||
|
@ApiModelProperty("参数(规则),json类型的传参(必须为 string、string)") |
||||
|
private String args_json; |
||||
|
|
||||
|
@ApiModelProperty("目标网页地址") |
||||
|
private String h5_url; |
||||
|
|
||||
|
@ApiModelProperty("小程序页面地址") |
||||
|
private String xcx_url; |
||||
|
|
||||
|
@ApiModelProperty("推送的消息打开的action(APP),推送参数对应class_name") |
||||
|
private String msgTargetUri; |
||||
|
|
||||
|
@ApiModelProperty("推送taskId") |
||||
|
private String taskId; |
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.yxt.supervise.message.api.message; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/29 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class MessageFlowVo { |
||||
|
|
||||
|
private String sid; |
||||
|
private String procDefId; |
||||
|
private String nodeState; |
||||
|
private String procInsId; |
||||
|
private String taskDefKey; |
||||
|
private String taskId; |
||||
|
private String nextNodeUserSids; |
||||
|
} |
@ -0,0 +1,56 @@ |
|||||
|
package com.yxt.supervise.message.api.message; |
||||
|
|
||||
|
import com.yxt.common.core.dto.Dto; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/29 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class MessageFlowableDto implements Dto { |
||||
|
|
||||
|
private static final long serialVersionUID = 3316247196699190882L; |
||||
|
@ApiModelProperty("接收人的sid集合") |
||||
|
private List<String> list = new ArrayList<>(); |
||||
|
@ApiModelProperty("消息标题") |
||||
|
private String msgTitle; |
||||
|
@ApiModelProperty("消息内容") |
||||
|
private String msgContent; |
||||
|
|
||||
|
@ApiModelProperty("json组装") |
||||
|
private MessageJsonDto json; |
||||
|
@ApiModelProperty("创建人名称") |
||||
|
private String createName; |
||||
|
@ApiModelProperty("接收人的id集合") |
||||
|
private List<String> receiveIdList; |
||||
|
|
||||
|
@ApiModelProperty("模块名称") |
||||
|
private String moduleName; |
||||
|
|
||||
|
@ApiModelProperty("具体页面的url") |
||||
|
private String moduleAction; |
||||
|
|
||||
|
@ApiModelProperty("PC具体页面的url") |
||||
|
private String moduleAction2; |
||||
|
|
||||
|
@ApiModelProperty("业务sid") |
||||
|
private String businessSid; |
||||
|
|
||||
|
@ApiModelProperty("0.内置Activity 1.内置WebView 2.RePlugin插件") |
||||
|
private String app_type; |
||||
|
|
||||
|
@ApiModelProperty("插件sid") |
||||
|
private String moduleSid; |
||||
|
|
||||
|
@ApiModelProperty("任务id") |
||||
|
private String taskId; |
||||
|
|
||||
|
private String userSid; |
||||
|
|
||||
|
} |
@ -0,0 +1,33 @@ |
|||||
|
package com.yxt.supervise.message.api.message; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/29 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class MessageFlowableQueryForCC { |
||||
|
|
||||
|
@ApiModelProperty("业务sid") |
||||
|
private String businessSid; |
||||
|
@ApiModelProperty("模块名称") |
||||
|
private String moduleName; |
||||
|
@ApiModelProperty("消息内容") |
||||
|
private String msgContent; |
||||
|
@ApiModelProperty("消息标题") |
||||
|
private String msgTitle; |
||||
|
@ApiModelProperty("流程相关参数") |
||||
|
private MessageFlowVo ufVo; |
||||
|
@ApiModelProperty("申请人") |
||||
|
private String applicationName; |
||||
|
@ApiModelProperty("抄送的用户sid") |
||||
|
private String userSids; |
||||
|
@ApiModelProperty("当前所登陆账号的sid") |
||||
|
private String userSid; |
||||
|
|
||||
|
} |
@ -0,0 +1,29 @@ |
|||||
|
package com.yxt.supervise.message.api.message; |
||||
|
|
||||
|
import com.yxt.common.core.dto.Dto; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/29 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class MessageJsonDto implements Dto { |
||||
|
|
||||
|
private static final long serialVersionUID = -4851888900240321450L; |
||||
|
@ApiModelProperty("任务id") |
||||
|
private String taskId; |
||||
|
@ApiModelProperty("节点名称") |
||||
|
private String taskName; |
||||
|
@ApiModelProperty("流程实例id") |
||||
|
private String procInsId; |
||||
|
@ApiModelProperty("节点id") |
||||
|
private String taskDefKey; |
||||
|
@ApiModelProperty("流程定义id") |
||||
|
private String deployId; |
||||
|
|
||||
|
@ApiModelProperty("流程定义id") |
||||
|
private String procDefId; |
||||
|
} |
@ -0,0 +1,39 @@ |
|||||
|
package com.yxt.supervise.message.api.messagelist; |
||||
|
|
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/30 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class MessageList extends BaseEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 2636101214854588182L; |
||||
|
@ApiModelProperty("消息sid") |
||||
|
private String msgSid; |
||||
|
|
||||
|
@ApiModelProperty("接收人sid") |
||||
|
private String receiverSid; |
||||
|
|
||||
|
@ApiModelProperty("接收人姓名") |
||||
|
private String receiverName; |
||||
|
|
||||
|
@ApiModelProperty("接收人部门sid") |
||||
|
private String receiverDeptSid; |
||||
|
|
||||
|
@ApiModelProperty("接收人部门名称") |
||||
|
private String receiverDeptName; |
||||
|
|
||||
|
@ApiModelProperty("接收人删除状态") |
||||
|
private Integer rDelStatus; |
||||
|
|
||||
|
@ApiModelProperty("发送人删除状态") |
||||
|
private Integer sDelStatus; |
||||
|
|
||||
|
@ApiModelProperty("状态(阅读状态,0未阅,1已阅)") |
||||
|
private Integer state = 0; |
||||
|
} |
@ -0,0 +1,39 @@ |
|||||
|
package com.yxt.supervise.message.api.messagelist; |
||||
|
|
||||
|
import com.yxt.common.core.dto.Dto; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/30 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class MessageListDto implements Dto { |
||||
|
private static final long serialVersionUID = 8092414395907587688L; |
||||
|
|
||||
|
@ApiModelProperty("消息sid") |
||||
|
private String msgSid; |
||||
|
|
||||
|
@ApiModelProperty("接收人sid") |
||||
|
private String receiverSid; |
||||
|
|
||||
|
@ApiModelProperty("接收人姓名") |
||||
|
private String receiverName; |
||||
|
|
||||
|
@ApiModelProperty("接收人部门sid") |
||||
|
private String receiverDeptSid; |
||||
|
|
||||
|
@ApiModelProperty("接收人部门名称") |
||||
|
private String receiverDeptName; |
||||
|
|
||||
|
@ApiModelProperty("接收人删除状态") |
||||
|
private Integer rDelStatus; |
||||
|
|
||||
|
@ApiModelProperty("发送人删除状态") |
||||
|
private Integer sDelStatus; |
||||
|
|
||||
|
@ApiModelProperty("状态(阅读状态,0未阅,1已阅)") |
||||
|
private Integer state = 0; |
||||
|
} |
@ -0,0 +1,30 @@ |
|||||
|
package com.yxt.supervise.message.api.messagetype; |
||||
|
|
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/30 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class MessageType extends BaseEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = -8661966988081336951L; |
||||
|
@ApiModelProperty("消息类别名称") |
||||
|
private String msgType; |
||||
|
|
||||
|
@ApiModelProperty("横排消息类别图标") |
||||
|
private String crossIconUrl; |
||||
|
|
||||
|
@ApiModelProperty("纵排消息类别图标") |
||||
|
private String longIconUrl; |
||||
|
|
||||
|
@ApiModelProperty("排序") |
||||
|
private Integer sort; |
||||
|
|
||||
|
@ApiModelProperty("消息标识:0001为小程序、0002为app") |
||||
|
private String identifier; |
||||
|
} |
@ -0,0 +1,26 @@ |
|||||
|
package com.yxt.supervise.message.api.messagetype; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/29 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class MessageTypeVo { |
||||
|
|
||||
|
@ApiModelProperty(value = "消息类别sid") |
||||
|
private String msgTypeSid; |
||||
|
@ApiModelProperty(value = "消息类别名称") |
||||
|
private String msgType; |
||||
|
@ApiModelProperty(value = "横排消息类别图标") |
||||
|
private String crossIconUrl; |
||||
|
@ApiModelProperty(value = "纵排消息类别图标") |
||||
|
private String longIconUrl; |
||||
|
@ApiModelProperty(value = "排序") |
||||
|
private Integer sort; |
||||
|
@ApiModelProperty(value = "是否有未读") |
||||
|
private Boolean isHave; |
||||
|
} |
@ -0,0 +1,15 @@ |
|||||
|
package com.yxt.supervise.message.biz.messagelist; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.yxt.supervise.message.api.messagelist.MessageList; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/30 |
||||
|
**/ |
||||
|
@Mapper |
||||
|
public interface MessageListMapper extends BaseMapper<MessageList> { |
||||
|
int selectListCount(String msgTypeSid); |
||||
|
} |
@ -0,0 +1,11 @@ |
|||||
|
<?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.yxt.supervise.message.biz.messagelist.MessageListMapper"> |
||||
|
<select id="selectListCount" resultType="int"> |
||||
|
SELECT count(*) |
||||
|
FROM message_list ml |
||||
|
left join message m ON m.sid = ml.msgSid |
||||
|
WHERE M.msgTypeSid = #{msgTypeSid} |
||||
|
AND ML.state = 0 |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,25 @@ |
|||||
|
package com.yxt.supervise.message.biz.messagelist; |
||||
|
|
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import com.yxt.supervise.message.api.messagelist.MessageList; |
||||
|
import com.yxt.supervise.message.api.messagelist.MessageListDto; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/30 |
||||
|
**/ |
||||
|
@Service |
||||
|
public class MessageListService extends MybatisBaseService<MessageListMapper, MessageList> { |
||||
|
|
||||
|
public void saveOrUpdateDto(MessageListDto dto) { |
||||
|
MessageList entity = new MessageList(); |
||||
|
dto.fillEntity(entity); |
||||
|
this.saveOrUpdate(entity); |
||||
|
} |
||||
|
|
||||
|
public int selectListCount(String msgTypeSid) { |
||||
|
return baseMapper.selectListCount(msgTypeSid); |
||||
|
} |
||||
|
} |
@ -0,0 +1,18 @@ |
|||||
|
package com.yxt.supervise.message.biz.messagetype; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.yxt.supervise.message.api.messagetype.MessageType; |
||||
|
import com.yxt.supervise.message.api.messagetype.MessageTypeVo; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/30 |
||||
|
**/ |
||||
|
@Mapper |
||||
|
public interface MessageTypeMapper extends BaseMapper<MessageType> { |
||||
|
List<MessageTypeVo> selectMsgTypeList(String identifier); |
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
<?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.yxt.supervise.message.biz.messagetype.MessageTypeMapper"> |
||||
|
<select id="selectMsgTypeList" resultType="com.yxt.supervise.message.api.messagetype.MessageTypeVo"> |
||||
|
SELECT mt.sid msgTypeSid,<!--消息类别sid--> |
||||
|
mt.msgType, |
||||
|
mt.crossIconUrl,<!--横排图标地址--> |
||||
|
mt.longIconUrl,<!--纵排图标地址--> |
||||
|
mt.sort<!--排序--> |
||||
|
FROM message_type mt |
||||
|
<where> |
||||
|
<if test="identifier != null and identifier != ''"> |
||||
|
identifier = #{identifier} |
||||
|
</if> |
||||
|
</where> |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,39 @@ |
|||||
|
package com.yxt.supervise.message.biz.messagetype; |
||||
|
|
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import com.yxt.supervise.message.api.messagetype.MessageType; |
||||
|
import com.yxt.supervise.message.api.messagetype.MessageTypeVo; |
||||
|
import com.yxt.supervise.message.biz.messagelist.MessageListService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/30 |
||||
|
**/ |
||||
|
@Service |
||||
|
public class MessageTypeService extends MybatisBaseService<MessageTypeMapper, MessageType> { |
||||
|
|
||||
|
@Autowired |
||||
|
private MessageListService messageListService; |
||||
|
|
||||
|
public List<MessageTypeVo> selectMsgTypeList(String identifier) { |
||||
|
List<MessageTypeVo> messageWxTypeVoList = baseMapper.selectMsgTypeList(identifier); |
||||
|
for (MessageTypeVo msgType : messageWxTypeVoList) { |
||||
|
boolean isHave = false; |
||||
|
String msgTypeSid = msgType.getMsgTypeSid(); |
||||
|
//查询该消息类别下是否包含未读的消息
|
||||
|
int count = messageListService.selectListCount(msgTypeSid); |
||||
|
if (count > 0) { |
||||
|
isHave = true; |
||||
|
msgType.setIsHave(isHave); |
||||
|
} else { |
||||
|
msgType.setIsHave(isHave); |
||||
|
} |
||||
|
} |
||||
|
return messageWxTypeVoList; |
||||
|
} |
||||
|
} |
@ -0,0 +1,28 @@ |
|||||
|
package com.yxt.supervise.message.feign.flowable; |
||||
|
|
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestParam; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/30 |
||||
|
**/ |
||||
|
@FeignClient( |
||||
|
contextId = "supervise-flowable-SysProUrlFeign", |
||||
|
name = "supervise-flowable", |
||||
|
path = "v1/flowable/proUrl", |
||||
|
fallback = SysProUrlFeignFallBack.class) |
||||
|
public interface SysProUrlFeign { |
||||
|
|
||||
|
@ApiOperation("查询流程与业务表单的url") |
||||
|
@GetMapping("/selectUrlByKeyWithTerminal") |
||||
|
ResultBean<SysProUrlVo> selectUrlByKey(@ApiParam(value = "流程定义id") @RequestParam(value = "procDefId") String procDefId, |
||||
|
@ApiParam(value = "节点id") @RequestParam(value = "taskDefKey") String taskDefKey, |
||||
|
@ApiParam(value = "类型:1办理,2详情") @RequestParam(value = "type") String type |
||||
|
, @ApiParam(value = "终端:1pc,2移动") @RequestParam(value = "terminal") String terminal); |
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
package com.yxt.supervise.message.feign.flowable; |
||||
|
|
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/30 |
||||
|
**/ |
||||
|
@Component |
||||
|
public class SysProUrlFeignFallBack { |
||||
|
} |
@ -0,0 +1,52 @@ |
|||||
|
package com.yxt.supervise.message.feign.flowable; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/30 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class SysProUrlVo { |
||||
|
|
||||
|
/** |
||||
|
* 表单主键 |
||||
|
*/ |
||||
|
private String url; |
||||
|
|
||||
|
/** |
||||
|
* 类型办理或者详情 |
||||
|
*/ |
||||
|
private String type; |
||||
|
|
||||
|
/** |
||||
|
* 终端:pc/mobile |
||||
|
*/ |
||||
|
private String terminal; |
||||
|
/** |
||||
|
* 表单id |
||||
|
*/ |
||||
|
private String formId; |
||||
|
/** |
||||
|
* 名称 |
||||
|
*/ |
||||
|
private String title; |
||||
|
|
||||
|
/** |
||||
|
* 流程定义id |
||||
|
*/ |
||||
|
private String proc_def_id; |
||||
|
|
||||
|
/** |
||||
|
* 节点id |
||||
|
*/ |
||||
|
private String taskDefKey; |
||||
|
|
||||
|
/** |
||||
|
* app插件名称(模块名称) |
||||
|
*/ |
||||
|
private String modulePluginName; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,25 @@ |
|||||
|
package com.yxt.supervise.system.sysflowcc; |
||||
|
|
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/30 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class SysFlowcc extends BaseEntity { |
||||
|
|
||||
|
|
||||
|
private static final long serialVersionUID = -1073201441501781817L; |
||||
|
@ApiModelProperty("流程key") |
||||
|
private String flowKey; // 流程key
|
||||
|
@ApiModelProperty("流程名称") |
||||
|
private String flowName; // 流程名称
|
||||
|
@ApiModelProperty("角色sid") |
||||
|
private String roleSid; // 角色sid
|
||||
|
@ApiModelProperty("角色名称") |
||||
|
private String roleName; // 角色名称
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.yxt.supervise.system.sysflowcc; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Select; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/30 |
||||
|
**/ |
||||
|
@Mapper |
||||
|
public interface SysFlowccMapper extends BaseMapper<SysFlowcc> { |
||||
|
@Select("select * from sys_flowcc where flowKey = #{flowKey}") |
||||
|
SysFlowccVo selectByFlowKey(String modelId); |
||||
|
} |
@ -0,0 +1,4 @@ |
|||||
|
<?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.yxt.supervise.system.sysflowcc.SysFlowccMapper"> |
||||
|
</mapper> |
@ -0,0 +1,26 @@ |
|||||
|
package com.yxt.supervise.system.sysflowcc; |
||||
|
|
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/30 |
||||
|
**/ |
||||
|
@RestController |
||||
|
@RequestMapping("v1/sysflowcc") |
||||
|
public class SysFlowccRest { |
||||
|
|
||||
|
@Autowired |
||||
|
private SysFlowccService sysFlowccService; |
||||
|
@ApiOperation("根据流程的id查询抄送的角色") |
||||
|
@PostMapping("/getRoleSidByModelId/{modelId}") |
||||
|
public ResultBean<SysFlowccVo> getRoleSidByModelId(@PathVariable("modelId") String modelId){ |
||||
|
return sysFlowccService.getRoleSidByModelId(modelId); |
||||
|
} |
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
package com.yxt.supervise.system.sysflowcc; |
||||
|
|
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/30 |
||||
|
**/ |
||||
|
@Service |
||||
|
public class SysFlowccService extends MybatisBaseService<SysFlowccMapper,SysFlowcc> { |
||||
|
public ResultBean<SysFlowccVo> getRoleSidByModelId(String modelId) { |
||||
|
ResultBean<SysFlowccVo> rb = ResultBean.fireFail(); |
||||
|
SysFlowccVo sysFlowccVo = baseMapper.selectByFlowKey(modelId); |
||||
|
return rb.success().setData(sysFlowccVo); |
||||
|
} |
||||
|
} |
@ -0,0 +1,24 @@ |
|||||
|
package com.yxt.supervise.system.sysflowcc; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/30 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class SysFlowccVo { |
||||
|
|
||||
|
private String sid; // sid
|
||||
|
|
||||
|
@ApiModelProperty("流程key") |
||||
|
private String flowKey; // 流程key
|
||||
|
@ApiModelProperty("流程名称") |
||||
|
private String flowName; // 流程名称
|
||||
|
@ApiModelProperty("角色sid") |
||||
|
private String roleSid; // 角色sid
|
||||
|
@ApiModelProperty("角色名称") |
||||
|
private String roleName; // 角色名称
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.yxt.supervise.system.sysuser; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/30 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class SysUserStaffVo implements Vo { |
||||
|
private static final long serialVersionUID = 8585964732292394355L; |
||||
|
|
||||
|
@ApiModelProperty("用户sid") |
||||
|
private String userSid; |
||||
|
@ApiModelProperty("人员") |
||||
|
private String staffName; |
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.yxt.supervise.system.sysuser; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/30 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class UserByRolesAndProQuery { |
||||
|
|
||||
|
@ApiModelProperty(value = "角色sid必传项") |
||||
|
private List<String> roleSids; |
||||
|
@ApiModelProperty(value = "项目sid") |
||||
|
private String projectSid; |
||||
|
} |
@ -0,0 +1,24 @@ |
|||||
|
package com.yxt.supervise.enterprisecentre.api.flowable; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/30 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class FlowDelegateQuery { |
||||
|
|
||||
|
@ApiModelProperty |
||||
|
private String userSid; |
||||
|
@ApiModelProperty("流程实例id") |
||||
|
private String instanceId; |
||||
|
@ApiModelProperty("任务Id") |
||||
|
private String taskId; |
||||
|
@ApiModelProperty("审批人sid") |
||||
|
private String assignee; |
||||
|
@ApiModelProperty("填写意见") |
||||
|
private String views; |
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
package com.yxt.supervise.enterprisecentre.biz.feign; |
||||
|
|
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.supervise.enterprisecentre.api.flowable.BusinessVariables; |
||||
|
import com.yxt.supervise.enterprisecentre.api.flowable.FlowDelegateQuery; |
||||
|
import com.yxt.supervise.enterprisecentre.api.flowable.UpdateFlowFieldVo; |
||||
|
import com.yxt.supervise.enterprisecentre.biz.feign.fallback.FlowFallback; |
||||
|
import com.yxt.supervise.enterprisecentre.biz.feign.fallback.FlowableFallback; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/30 |
||||
|
**/ |
||||
|
|
||||
|
@FeignClient( |
||||
|
contextId = "supervise-flowable-Flow", |
||||
|
name = "supervise-flowable", |
||||
|
path = "v2/flow", |
||||
|
fallback = FlowFallback.class) |
||||
|
public interface FlowFeign { |
||||
|
|
||||
|
@ApiOperation(value = "启动流程") |
||||
|
@PostMapping(value = "/startProcess") |
||||
|
public ResultBean<UpdateFlowFieldVo> startProcess(BusinessVariables bv); |
||||
|
|
||||
|
@ApiOperation(value = "办理") |
||||
|
@PostMapping(value = "/handleProsess") |
||||
|
public ResultBean<UpdateFlowFieldVo> handleProsess(BusinessVariables bv); |
||||
|
|
||||
|
@ApiOperation(value = "加签") |
||||
|
@PostMapping(value = "/delegate") |
||||
|
public ResultBean delegate(FlowDelegateQuery flowDelegateQuery); |
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
package com.yxt.supervise.enterprisecentre.biz.feign.fallback; |
||||
|
|
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/30 |
||||
|
**/ |
||||
|
@Component |
||||
|
public class FlowFallback { |
||||
|
} |
Loading…
Reference in new issue