
16 changed files with 926 additions and 0 deletions
@ -0,0 +1,98 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.terminal.api.as.standrecordapply; |
|||
|
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui-scm(合作二级站备案申请) <br/> |
|||
* File: ScmStandRecordApplyVo.java <br/> |
|||
* Class: com.yxt.anrui.scm.api.scmstandrecordapply.ScmStandRecordApplyVo <br/> |
|||
* Description: 合作二级站备案申请 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-10-22 16:05:59 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "合作二级站备案申请 视图数据详情", description = "合作二级站备案申请 视图数据详情") |
|||
public class AppStandRecordApplyDetailsVo implements Vo { |
|||
|
|||
private String sid; // sid
|
|||
|
|||
@ApiModelProperty("流程实例的sid") |
|||
private String procInsId; |
|||
@ApiModelProperty("taskId") |
|||
private String taskId; |
|||
@ApiModelProperty("申请部门名称") |
|||
private String deptName; |
|||
@ApiModelProperty("创建人姓名") |
|||
private String createByName; |
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
@ApiModelProperty("申请日期") |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
private Date createTime; |
|||
@ApiModelProperty("二级站名称") |
|||
private String siteName; // 二级站名称
|
|||
@ApiModelProperty("法人") |
|||
private String legalPerson; // 法人
|
|||
@ApiModelProperty("法人电话") |
|||
private String phone; // 法人电话
|
|||
@ApiModelProperty("负责人") |
|||
private String directorName; // 负责人
|
|||
@ApiModelProperty("负责人电话") |
|||
private String directorPhone; // 负责人电话
|
|||
@ApiModelProperty("社会统一信用代码") |
|||
private String unifiedCreditCode; // 社会统一信用代码
|
|||
@ApiModelProperty("证件有效期") |
|||
private String termValidity; // 证件有效期
|
|||
@ApiModelProperty("地址") |
|||
private String address; // 地址
|
|||
@ApiModelProperty("合作有效期") |
|||
private String limitedTerm; // 合作有效期
|
|||
@ApiModelProperty("授信金额") |
|||
private BigDecimal creditGranting; // 授信金额
|
|||
@ApiModelProperty("营业执照") |
|||
private List<String> appBusinessLicenseFile = new ArrayList<>(); |
|||
@ApiModelProperty("合作协议") |
|||
private List<String> appAgreementFile = new ArrayList<>(); |
|||
@ApiModelProperty("其他资料") |
|||
private List<String> appOtherFile = new ArrayList<>(); |
|||
} |
@ -0,0 +1,64 @@ |
|||
package com.yxt.anrui.terminal.api.as.standrecordapply; |
|||
|
|||
import com.yxt.anrui.terminal.api.as.standrecordapply.flowable.AppDelegateQuery; |
|||
import com.yxt.anrui.terminal.api.as.standrecordapply.flowable.AppFlowDto; |
|||
import com.yxt.anrui.terminal.api.as.standrecordapply.flowable.AppFlowQuery; |
|||
import com.yxt.anrui.terminal.api.as.standrecordapply.flowable.AppFlowTaskQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.cloud.openfeign.SpringQueryMap; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
/** |
|||
* @Author |
|||
* @Date |
|||
* @Description |
|||
*/ |
|||
@FeignClient( |
|||
contextId = "terminal-AppStandRecordApply", |
|||
name = "anrui-terminal", |
|||
path = "v1/secondaryCooperativeStation") |
|||
public interface AppStandRecordApplyFeign { |
|||
|
|||
@ApiOperation("详情") |
|||
@GetMapping("/fetchDetailsBySid/{sid}") |
|||
public ResultBean<AppStandRecordApplyDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid); |
|||
|
|||
/**********************************************流程********************************************/ |
|||
|
|||
@ApiOperation("办理") |
|||
@PutMapping("/agreeCreditInfo") |
|||
@ResponseBody |
|||
ResultBean agreeCreditInfo(@RequestBody AppFlowDto dto); |
|||
|
|||
@ApiOperation("驳回") |
|||
@PutMapping("/rejectCreditInfo") |
|||
@ResponseBody |
|||
ResultBean rejectCreditInfo(@RequestBody AppFlowTaskQuery query); |
|||
|
|||
@ApiOperation("撤回") |
|||
@PutMapping("/recallCreditInfo") |
|||
@ResponseBody |
|||
ResultBean recallCreditInfo(@RequestBody AppFlowTaskQuery query); |
|||
|
|||
@ApiOperation("终止") |
|||
@PutMapping("/stopCreditInfo") |
|||
@ResponseBody |
|||
ResultBean stopCreditInfo(@RequestBody AppFlowTaskQuery query); |
|||
|
|||
@ApiOperation("获取流程操作标题") |
|||
@GetMapping("/getFlowOperateTitle") |
|||
@ResponseBody |
|||
ResultBean<String> getFlowOperateTitle(@SpringQueryMap AppFlowQuery query); |
|||
|
|||
@ApiOperation(value = "加签") |
|||
@PutMapping(value = "/delegate") |
|||
@ResponseBody |
|||
public ResultBean delegate(@RequestBody AppDelegateQuery delegateQuery); |
|||
|
|||
@ApiOperation(value = "转办") |
|||
@PutMapping(value = "/assignTask") |
|||
@ResponseBody |
|||
public ResultBean assignTask(@RequestBody AppDelegateQuery delegateQuery); |
|||
} |
@ -0,0 +1,25 @@ |
|||
package com.yxt.anrui.terminal.api.as.standrecordapply.flowable; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonProperty; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/9/28 10:16 |
|||
*/ |
|||
@Data |
|||
public class AppDelegateQuery { |
|||
@ApiModelProperty |
|||
private String userSid; |
|||
@ApiModelProperty("流程实例id") |
|||
@JsonProperty("procInsId") |
|||
private String instanceId; |
|||
@ApiModelProperty("任务Id") |
|||
private String taskId; |
|||
@ApiModelProperty("审批人sid") |
|||
private String assignee; |
|||
@ApiModelProperty("填写意见") |
|||
private String views; |
|||
} |
@ -0,0 +1,37 @@ |
|||
package com.yxt.anrui.terminal.api.as.standrecordapply.flowable; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonProperty; |
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/8/9 14:09 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class AppFlowDto implements Dto { |
|||
private static final long serialVersionUID = 3626473483180150495L; |
|||
|
|||
@ApiModelProperty(value = "任务id") |
|||
@NotBlank(message = "参数错误:taskId") |
|||
private String taskId; |
|||
@ApiModelProperty(value = "流程id") |
|||
@NotBlank(message = "参数错误:procInsId") |
|||
@JsonProperty("procInsId") |
|||
private String instanceId; |
|||
@ApiModelProperty(value = "意见") |
|||
private String comment; |
|||
@ApiModelProperty(value = "业务sid") |
|||
@NotBlank(message = "参数错误:businessSid") |
|||
private String businessSid; |
|||
@ApiModelProperty(value = "用户sid") |
|||
@NotBlank(message = "参数错误:userSid") |
|||
private String userSid; |
|||
@ApiModelProperty(value = "节点id") |
|||
@NotBlank(message = "参数错误:taskDefKey") |
|||
private String taskDefKey; |
|||
} |
@ -0,0 +1,28 @@ |
|||
package com.yxt.anrui.terminal.api.as.standrecordapply.flowable; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/8/9 14:15 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class AppFlowQuery implements Query { |
|||
private static final long serialVersionUID = 5514095179438249641L; |
|||
|
|||
@ApiModelProperty(value = "节点key") |
|||
private String taskDefKey; |
|||
@ApiModelProperty(value = "业务sid") |
|||
private String businessSid; |
|||
@ApiModelProperty(value = "0 上一环节 1下一环节") |
|||
@NotNull(message = "参数错误:next") |
|||
private Integer next; |
|||
|
|||
@ApiModelProperty("组织机构全路径") |
|||
private String orgPath; |
|||
} |
@ -0,0 +1,47 @@ |
|||
package com.yxt.anrui.terminal.api.as.standrecordapply.flowable; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonProperty; |
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/8/9 14:11 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class AppFlowTaskQuery implements Query { |
|||
private static final long serialVersionUID = -7082170710942810289L; |
|||
|
|||
/** |
|||
* 终止、驳回、撤回 |
|||
*/ |
|||
@ApiModelProperty("任务Id") |
|||
@NotBlank(message = "参数错误:taskId") |
|||
private String taskId; |
|||
/** |
|||
* 终止、驳回、撤回 |
|||
*/ |
|||
@ApiModelProperty("业务sid") |
|||
@NotBlank(message = "参数错误:businessSid") |
|||
private String businessSid; |
|||
/** |
|||
* 终止、驳回 |
|||
*/ |
|||
@ApiModelProperty("任务意见") |
|||
private String comment; |
|||
/** |
|||
* 终止、撤回、驳回 |
|||
*/ |
|||
@ApiModelProperty("用户Sid") |
|||
private String userSid; |
|||
/** |
|||
* 终止 |
|||
*/ |
|||
@ApiModelProperty("流程实例Id") |
|||
@JsonProperty("procInsId") |
|||
private String instanceId; |
|||
} |
@ -0,0 +1,85 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.terminal.biz.as.standrecordapply; |
|||
|
|||
import com.yxt.anrui.terminal.api.as.standrecordapply.flowable.AppDelegateQuery; |
|||
import com.yxt.anrui.terminal.api.as.standrecordapply.flowable.AppFlowDto; |
|||
import com.yxt.anrui.terminal.api.as.standrecordapply.flowable.AppFlowQuery; |
|||
import com.yxt.anrui.terminal.api.as.standrecordapply.flowable.AppFlowTaskQuery; |
|||
import com.yxt.anrui.terminal.api.as.standrecordapply.AppStandRecordApplyDetailsVo; |
|||
import com.yxt.anrui.terminal.api.as.standrecordapply.AppStandRecordApplyFeign; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
@RestController |
|||
@RequestMapping("v1/secondaryCooperativeStation") |
|||
public class AppStandRecordApplyRest implements AppStandRecordApplyFeign { |
|||
|
|||
@Autowired |
|||
private AppStandRecordApplyService appStandRecordApplyService; |
|||
|
|||
@Override |
|||
public ResultBean<AppStandRecordApplyDetailsVo> fetchDetailsBySid(String sid) { |
|||
return appStandRecordApplyService.fetchDetailsBySid(sid); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean agreeCreditInfo(AppFlowDto dto) { |
|||
return appStandRecordApplyService.agreeCreditInfo(dto); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean rejectCreditInfo(AppFlowTaskQuery query) { |
|||
return appStandRecordApplyService.rejectCreditInfo(query); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean recallCreditInfo(AppFlowTaskQuery query) { |
|||
return appStandRecordApplyService.recallCreditInfo(query); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean stopCreditInfo(AppFlowTaskQuery query) { |
|||
return appStandRecordApplyService.stopCreditInfo(query); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<String> getFlowOperateTitle(AppFlowQuery query) { |
|||
return appStandRecordApplyService.getFlowOperateTitle(query); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean delegate(AppDelegateQuery delegateQuery) { |
|||
return appStandRecordApplyService.delegate(delegateQuery); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean assignTask(AppDelegateQuery delegateQuery) { |
|||
return appStandRecordApplyService.assignTask(delegateQuery); |
|||
} |
|||
} |
@ -0,0 +1,191 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.terminal.biz.as.standrecordapply; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrg; |
|||
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; |
|||
import com.yxt.anrui.portal.api.sysuser.SysUserFeign; |
|||
import com.yxt.anrui.portal.api.sysuser.SysUserVo; |
|||
import com.yxt.anrui.terminal.api.as.standrecordapply.AppStandRecordApplyDetailsVo; |
|||
import com.yxt.anrui.terminal.api.as.standrecordapply.flowable.AppDelegateQuery; |
|||
import com.yxt.anrui.terminal.api.as.standrecordapply.flowable.AppFlowDto; |
|||
import com.yxt.anrui.terminal.api.as.standrecordapply.flowable.AppFlowQuery; |
|||
import com.yxt.anrui.terminal.api.as.standrecordapply.flowable.AppFlowTaskQuery; |
|||
import com.yxt.anrui.terminal.fegin.asstandrecordapply.AsStandRecordApplyDetailsVo; |
|||
import com.yxt.anrui.terminal.fegin.asstandrecordapply.AsStandRecordApplyFegin; |
|||
import com.yxt.anrui.terminal.fegin.asstandrecordapply.AsStandRecordApplyUrl; |
|||
import com.yxt.anrui.terminal.fegin.asstandrecordapply.flowable.*; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import javax.annotation.Resource; |
|||
import java.util.ArrayList; |
|||
import java.util.Collections; |
|||
import java.util.List; |
|||
|
|||
@Service |
|||
public class AppStandRecordApplyService { |
|||
|
|||
@Resource |
|||
private AsStandRecordApplyFegin asStandRecordApplyFegin; |
|||
@Autowired |
|||
private SysStaffOrgFeign sysStaffOrgFeign; |
|||
@Autowired |
|||
private SysUserFeign sysUserFeign; |
|||
|
|||
public ResultBean<AppStandRecordApplyDetailsVo> fetchDetailsBySid(String sid) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
AsStandRecordApplyDetailsVo data = asStandRecordApplyFegin.fetchDetailsBySid(sid).getData(); |
|||
AppStandRecordApplyDetailsVo appStandRecordApplyDetailsVo = new AppStandRecordApplyDetailsVo(); |
|||
BeanUtil.copyProperties(data,appStandRecordApplyDetailsVo); |
|||
appStandRecordApplyDetailsVo.setProcInsId(data.getProcInstId()); |
|||
List<AsStandRecordApplyUrl> businessLicenseFile = data.getBusinessLicenseFile(); |
|||
List<AsStandRecordApplyUrl> agreementFile = data.getAgreementFile(); |
|||
List<AsStandRecordApplyUrl> otherFile = data.getOtherFile(); |
|||
ArrayList<String> appBusinessLicenseFile = new ArrayList<>(); |
|||
ArrayList<String> appAgreementFile = new ArrayList<>(); |
|||
ArrayList<String> appOtherFile = new ArrayList<>(); |
|||
for (AsStandRecordApplyUrl asStandRecordApplyUrl : businessLicenseFile) { |
|||
appBusinessLicenseFile.add(asStandRecordApplyUrl.getUrl()); |
|||
} |
|||
for (AsStandRecordApplyUrl asStandRecordApplyUrl : agreementFile) { |
|||
appAgreementFile.add(asStandRecordApplyUrl.getUrl()); |
|||
} |
|||
for (AsStandRecordApplyUrl asStandRecordApplyUrl : otherFile) { |
|||
appOtherFile.add(asStandRecordApplyUrl.getUrl()); |
|||
} |
|||
appStandRecordApplyDetailsVo.setAppBusinessLicenseFile(appBusinessLicenseFile); |
|||
appStandRecordApplyDetailsVo.setAppAgreementFile(appAgreementFile); |
|||
appStandRecordApplyDetailsVo.setAppOtherFile(appOtherFile); |
|||
return rb.success().setData(appStandRecordApplyDetailsVo); |
|||
} |
|||
|
|||
public ResultBean agreeCreditInfo(AppFlowDto dto) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
//根据用户sid获取staffSid
|
|||
ResultBean<SysUserVo> userVoResultBean = sysUserFeign.fetchBySid(dto.getUserSid()); |
|||
if (!userVoResultBean.getSuccess()) { |
|||
return rb.setMsg(userVoResultBean.getMsg()); |
|||
} |
|||
//根据staffSid获取用户的组织全路径
|
|||
ResultBean<SysStaffOrg> staffOrgResultBean = sysStaffOrgFeign.getOrgByStaffSid(userVoResultBean.getData().getStaffSid()); |
|||
if (!staffOrgResultBean.getSuccess()) { |
|||
return rb.setMsg(staffOrgResultBean.getMsg()); |
|||
} |
|||
//用户的组织全路径
|
|||
String orgSidPath = staffOrgResultBean.getData().getOrgSidPath(); |
|||
CompleteStandRecordApplyDto completeStandRecordApplyDto = new CompleteStandRecordApplyDto(); |
|||
BeanUtil.copyProperties(dto, completeStandRecordApplyDto); |
|||
completeStandRecordApplyDto.setOrgSidPath(orgSidPath); |
|||
ResultBean resultBean = asStandRecordApplyFegin.complete(completeStandRecordApplyDto); |
|||
if (!resultBean.getSuccess()) { |
|||
return rb.setMsg(resultBean.getMsg()); |
|||
} |
|||
return rb.success().setData(resultBean.getData()); |
|||
} |
|||
|
|||
public ResultBean rejectCreditInfo(AppFlowTaskQuery query) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
StandRecordApplyTaskQuery standRecordApplyTaskQuery = new StandRecordApplyTaskQuery(); |
|||
BeanUtil.copyProperties(query, standRecordApplyTaskQuery); |
|||
ResultBean resultBean = asStandRecordApplyFegin.taskReject(standRecordApplyTaskQuery); |
|||
if (!resultBean.getSuccess()) { |
|||
return rb.setMsg(resultBean.getMsg()); |
|||
} |
|||
return rb.success().setData(resultBean.getData()); |
|||
} |
|||
|
|||
public ResultBean recallCreditInfo(AppFlowTaskQuery query) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
StandRecordApplyTaskQuery standRecordApplyTaskQuery = new StandRecordApplyTaskQuery(); |
|||
BeanUtil.copyProperties(query, standRecordApplyTaskQuery); |
|||
ResultBean resultBean = asStandRecordApplyFegin.revokeProcess(standRecordApplyTaskQuery); |
|||
if (!resultBean.getSuccess()) { |
|||
return rb.setMsg(resultBean.getMsg()); |
|||
} |
|||
return rb.success().setData(resultBean.getData()); |
|||
} |
|||
|
|||
public ResultBean stopCreditInfo(AppFlowTaskQuery query) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
StandRecordApplyTaskQuery standRecordApplyTaskQuery = new StandRecordApplyTaskQuery(); |
|||
BeanUtil.copyProperties(query, standRecordApplyTaskQuery); |
|||
ResultBean resultBean = asStandRecordApplyFegin.breakProcess(standRecordApplyTaskQuery); |
|||
if (!resultBean.getSuccess()) { |
|||
return rb.setMsg(resultBean.getMsg()); |
|||
} |
|||
return rb.success().setData(resultBean.getData()); |
|||
} |
|||
|
|||
public ResultBean<String> getFlowOperateTitle(AppFlowQuery query) { |
|||
ResultBean<String> rb = ResultBean.fireFail(); |
|||
//0 上一环节 1下一环节
|
|||
int next = query.getNext(); |
|||
StandRecordApplyNodeQuery getNodeQuery = new StandRecordApplyNodeQuery(); |
|||
BeanUtil.copyProperties(query, getNodeQuery); |
|||
String data = ""; |
|||
if (next == 0) { |
|||
ResultBean<List<StandRecordApplyNodeVo>> getPreviousNodesForReject = asStandRecordApplyFegin.getPreviousNodesForReject(getNodeQuery); |
|||
if (getPreviousNodesForReject.getSuccess()) { |
|||
getPreviousNodesForReject.getData().removeAll(Collections.singleton(null)); |
|||
data = getPreviousNodesForReject.getData().get(0).getName(); |
|||
} else { |
|||
return rb.setMsg(getPreviousNodesForReject.getMsg()); |
|||
} |
|||
} else if (next == 1) { |
|||
ResultBean<List<StandRecordApplyNodeVo>> getNextNodesForSubmit = asStandRecordApplyFegin.getNextNodesForSubmit(getNodeQuery); |
|||
if (getNextNodesForSubmit.getSuccess()) { |
|||
getNextNodesForSubmit.getData().removeAll(Collections.singleton(null)); |
|||
data = getNextNodesForSubmit.getData().get(0).getName(); |
|||
} else { |
|||
return rb.setMsg(getNextNodesForSubmit.getMsg()); |
|||
} |
|||
} else { |
|||
return rb.setMsg("参数错误:next"); |
|||
} |
|||
return rb.success().setData(data); |
|||
} |
|||
|
|||
public ResultBean delegate(AppDelegateQuery delegateQuery) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
StandRecordApplyDelegateQuery delegateQuery1 = new |
|||
StandRecordApplyDelegateQuery(); |
|||
BeanUtil.copyProperties(delegateQuery, delegateQuery1); |
|||
asStandRecordApplyFegin.delegate(delegateQuery1); |
|||
return rb.success(); |
|||
} |
|||
|
|||
public ResultBean assignTask(AppDelegateQuery delegateQuery) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
StandRecordApplyDelegateQuery delegateQuery1 = new |
|||
StandRecordApplyDelegateQuery(); |
|||
BeanUtil.copyProperties(delegateQuery, delegateQuery1); |
|||
asStandRecordApplyFegin.assignTask(delegateQuery1); |
|||
return rb.success(); |
|||
} |
|||
} |
@ -0,0 +1,114 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.terminal.fegin.asstandrecordapply; |
|||
|
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui-scm(合作二级站备案申请) <br/> |
|||
* File: ScmStandRecordApplyVo.java <br/> |
|||
* Class: com.yxt.anrui.scm.api.scmstandrecordapply.ScmStandRecordApplyVo <br/> |
|||
* Description: 合作二级站备案申请 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-10-22 16:05:59 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "合作二级站备案申请 视图数据详情", description = "合作二级站备案申请 视图数据详情") |
|||
public class AsStandRecordApplyDetailsVo implements Vo { |
|||
|
|||
private String sid; // sid
|
|||
|
|||
@ApiModelProperty("创建人sid") |
|||
private String createBySid; |
|||
@ApiModelProperty("备注") |
|||
private String remarks; // 备注
|
|||
@ApiModelProperty("申请日期") |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
private Date createTime; |
|||
@ApiModelProperty("创建人姓名") |
|||
private String createByName; // 创建人姓名
|
|||
@ApiModelProperty("申请编号") |
|||
private String billNo; |
|||
@ApiModelProperty("申请部门sid") |
|||
private String deptSid; // 申请部门sid
|
|||
@ApiModelProperty("申请部门名称") |
|||
private String deptName; // 申请部门名称
|
|||
@ApiModelProperty("二级站名称") |
|||
private String siteName; // 二级站名称
|
|||
@ApiModelProperty("法人") |
|||
private String legalPerson; // 法人
|
|||
@ApiModelProperty("法人电话") |
|||
private String phone; // 法人电话
|
|||
@ApiModelProperty("负责人") |
|||
private String directorName; // 负责人
|
|||
@ApiModelProperty("负责人电话") |
|||
private String directorPhone; // 负责人电话
|
|||
@ApiModelProperty("社会统一信用代码") |
|||
private String unifiedCreditCode; // 社会统一信用代码
|
|||
@ApiModelProperty("证件有效期") |
|||
private String termValidity; // 证件有效期
|
|||
@ApiModelProperty("地址") |
|||
private String address; // 地址
|
|||
@ApiModelProperty("合作有效期") |
|||
private String limitedTerm; // 合作有效期
|
|||
@ApiModelProperty("授信金额") |
|||
private BigDecimal creditGranting; // 授信金额
|
|||
@ApiModelProperty("分公司sid") |
|||
private String useOrgSid; // 分公司sid
|
|||
@ApiModelProperty("分公司名称") |
|||
private String useOrgName; // 分公司名称
|
|||
@ApiModelProperty("流程状态") |
|||
private String nodeState; // 流程状态
|
|||
@ApiModelProperty("流程定义的id") |
|||
private String procDefId; // 流程定义的id
|
|||
@ApiModelProperty("环节定义的sid") |
|||
private String nodeSid; // 环节定义的sid
|
|||
@ApiModelProperty("流程实例的sid") |
|||
private String procInstId; // 流程实例的sid
|
|||
@ApiModelProperty("taskId") |
|||
private String taskId; // taskId
|
|||
@ApiModelProperty("营业执照") |
|||
private List<AsStandRecordApplyUrl> businessLicenseFile = new ArrayList<>(); |
|||
@ApiModelProperty("合作协议") |
|||
private List<AsStandRecordApplyUrl> agreementFile = new ArrayList<>(); |
|||
@ApiModelProperty("其他资料") |
|||
private List<AsStandRecordApplyUrl> otherFile = new ArrayList<>(); |
|||
} |
@ -0,0 +1,59 @@ |
|||
package com.yxt.anrui.terminal.fegin.asstandrecordapply; |
|||
|
|||
import com.yxt.anrui.terminal.fegin.asstandrecordapply.flowable.*; |
|||
import com.yxt.anrui.terminal.fegin.astechtitleapply.flowable.*; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.cloud.openfeign.SpringQueryMap; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.validation.Valid; |
|||
import java.util.List; |
|||
|
|||
@FeignClient( |
|||
contextId = "yxt-as-AsStandRecordApply", |
|||
name = "yxt-as", |
|||
path = "v1/secondaryCooperativeStation" |
|||
) |
|||
public interface AsStandRecordApplyFegin { |
|||
|
|||
@ApiOperation("根据SID获取一条记录") |
|||
@GetMapping("/fetchDetailsBySid/{sid}") |
|||
@ResponseBody |
|||
public ResultBean<AsStandRecordApplyDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid); |
|||
|
|||
@ApiOperation(value = "办理(同意)") |
|||
@PostMapping("/complete") |
|||
public ResultBean complete(@Valid @RequestBody CompleteStandRecordApplyDto query); |
|||
|
|||
@ApiOperation(value = "获取上一个环节") |
|||
@GetMapping(value = "/getPreviousNodesForReject") |
|||
ResultBean<List<StandRecordApplyNodeVo>> getPreviousNodesForReject(@Valid @SpringQueryMap StandRecordApplyNodeQuery query); |
|||
|
|||
@ApiOperation(value = "获取下一个环节") |
|||
@GetMapping(value = "/getNextNodesForSubmit") |
|||
ResultBean<List<StandRecordApplyNodeVo>> getNextNodesForSubmit(@Valid @SpringQueryMap StandRecordApplyNodeQuery query); |
|||
|
|||
@ApiOperation(value = "驳回任务") |
|||
@PostMapping(value = "/reject") |
|||
public ResultBean taskReject(@Valid @RequestBody StandRecordApplyTaskQuery query); |
|||
|
|||
@ApiOperation(value = "撤回流程") |
|||
@PostMapping(value = "/revokeProcess") |
|||
public ResultBean revokeProcess(@Valid @RequestBody StandRecordApplyTaskQuery query); |
|||
|
|||
@ApiOperation(value = "终止任务") |
|||
@PostMapping(value = "/breakProcess") |
|||
public ResultBean breakProcess(@Valid @RequestBody StandRecordApplyTaskQuery query); |
|||
|
|||
@ApiOperation(value = "加签") |
|||
@PostMapping(value = "/delegate") |
|||
@ResponseBody |
|||
public ResultBean delegate(@RequestBody StandRecordApplyDelegateQuery query); |
|||
|
|||
@ApiOperation(value = "转办") |
|||
@PutMapping(value = "/assignTask") |
|||
@ResponseBody |
|||
public ResultBean assignTask(@RequestBody StandRecordApplyDelegateQuery query); |
|||
} |
@ -0,0 +1,35 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.terminal.fegin.asstandrecordapply; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class AsStandRecordApplyUrl implements Vo { |
|||
|
|||
private String url; |
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.yxt.anrui.terminal.fegin.asstandrecordapply.flowable; |
|||
|
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2024/5/11 |
|||
**/ |
|||
@Data |
|||
public class CompleteStandRecordApplyDto { |
|||
|
|||
@ApiModelProperty(value = "用户sid") |
|||
@NotBlank(message = "参数错误:userSid") |
|||
private String userSid; |
|||
@ApiModelProperty(value = "用户全路径sid") |
|||
private String orgSidPath; |
|||
@ApiModelProperty(value = "节点id") |
|||
@NotBlank(message = "参数错误:taskDefKey") |
|||
private String taskDefKey; |
|||
@ApiModelProperty(value = "任务id") |
|||
@NotBlank(message = "参数错误:taskId") |
|||
private String taskId; |
|||
@ApiModelProperty(value = "流程id") |
|||
@NotBlank(message = "参数错误:instanceId") |
|||
private String instanceId; |
|||
@ApiModelProperty(value = "意见") |
|||
private String comment; |
|||
@ApiModelProperty(value = "业务sid") |
|||
@NotBlank(message = "参数错误:businessSid") |
|||
private String businessSid; |
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.yxt.anrui.terminal.fegin.asstandrecordapply.flowable; |
|||
|
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2024/5/11 |
|||
**/ |
|||
@Data |
|||
public class StandRecordApplyDelegateQuery { |
|||
|
|||
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,18 @@ |
|||
package com.yxt.anrui.terminal.fegin.asstandrecordapply.flowable; |
|||
|
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2024/5/11 |
|||
**/ |
|||
@Data |
|||
public class StandRecordApplyNodeQuery { |
|||
|
|||
@ApiModelProperty(value = "环节定义id") |
|||
private String taskDefKey; |
|||
@ApiModelProperty(value = "业务sid") |
|||
private String businessSid; |
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.yxt.anrui.terminal.fegin.asstandrecordapply.flowable; |
|||
|
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2024/5/11 |
|||
**/ |
|||
@Data |
|||
public class StandRecordApplyNodeVo { |
|||
|
|||
@ApiModelProperty(value = "节点名称") |
|||
private String name; |
|||
@ApiModelProperty(value = "节点id") |
|||
private String id; |
|||
@ApiModelProperty(value = "审批组") |
|||
private List<String> candidateGroups; |
|||
@ApiModelProperty(value = "是否是最后环节") |
|||
private String endTask; |
|||
} |
@ -0,0 +1,43 @@ |
|||
package com.yxt.anrui.terminal.fegin.asstandrecordapply.flowable; |
|||
|
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2024/5/11 |
|||
**/ |
|||
@Data |
|||
public class StandRecordApplyTaskQuery { |
|||
|
|||
/** |
|||
* 终止、驳回、撤回 |
|||
*/ |
|||
@ApiModelProperty("任务Id") |
|||
@NotBlank(message = "参数错误:taskId") |
|||
private String taskId; |
|||
/** |
|||
* 终止、驳回、撤回 |
|||
*/ |
|||
@ApiModelProperty("业务sid") |
|||
@NotBlank(message = "参数错误:businessSid") |
|||
private String businessSid; |
|||
/** |
|||
* 终止、驳回 |
|||
*/ |
|||
@ApiModelProperty("任务意见") |
|||
private String comment; |
|||
/** |
|||
* 终止、撤回、驳回 |
|||
*/ |
|||
@ApiModelProperty("用户Sid") |
|||
private String userSid; |
|||
/** |
|||
* 终止 |
|||
*/ |
|||
@ApiModelProperty("流程实例Id") |
|||
private String instanceId; |
|||
} |
Loading…
Reference in new issue