Merge branch 'master' of http://47.107.61.133:3000/nm-project/aiccs-api
This commit is contained in:
commit
c9d6a1986e
|
|
@ -6,10 +6,10 @@ import com.chinaweal.aiccs.aiccs.expelled.entity.ExpelledBizInfo;
|
|||
import com.chinaweal.aiccs.aiccs.expelled.service.IEntBaseExpelledInfoService;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.service.IExpelledAuditInfoService;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.service.IExpelledBizInfoService;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.service.IExpelledRepairInfoService;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.service.IExpelledApplyInfoService;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.vo.AuditInfoVo;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.vo.BizInfoVo;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.vo.RepairInfoVo;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.vo.RemoveApproveInfo;
|
||||
import com.chinaweal.aiccs.common.base.controller.BaseController;
|
||||
import com.chinaweal.youfool.framework.springboot.base.query.BaseQuery;
|
||||
import com.chinaweal.youfool.framework.springboot.rest.RestResult;
|
||||
|
|
@ -48,7 +48,7 @@ public class EntBaseExpelledInfoController extends BaseController {
|
|||
@Resource
|
||||
private IExpelledAuditInfoService expelledAuditInfoService;
|
||||
@Resource
|
||||
private IExpelledRepairInfoService expelledRepairInfoService;
|
||||
private IExpelledApplyInfoService expelledApplyInfoService;
|
||||
|
||||
@ApiOperation(value = "1.分页查询市场主体拟除名名单信息", position = 1)
|
||||
@PostMapping("/list")
|
||||
|
|
@ -154,18 +154,54 @@ public class EntBaseExpelledInfoController extends BaseController {
|
|||
@ApiOperation(value = "13.启动除名修复业务", position = 13)
|
||||
@PostMapping("/repair/startBiz")
|
||||
public RestResult<?> startRepairBiz(@RequestBody AuditInfoVo query, HttpServletRequest request) {
|
||||
return expelledRepairInfoService.startRepairBiz(query, request);
|
||||
return expelledApplyInfoService.startRepairBiz(query, request);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "14.获取除名修复业务详情", position = 14)
|
||||
@GetMapping("/repair/getBiz")
|
||||
public RestResult<?> getRepairBiz(String bizId) {
|
||||
return expelledRepairInfoService.getRepairBiz(bizId);
|
||||
return expelledApplyInfoService.getRepairBiz(bizId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "15.除名修复业务审批流程", position = 15)
|
||||
@PostMapping("/repair/nextBiz")
|
||||
public RestResult<?> nextRepairBiz(@RequestBody RepairInfoVo repairInfoQuery, HttpServletRequest request) {
|
||||
return expelledRepairInfoService.nextRepairBiz(repairInfoQuery, request);
|
||||
public RestResult<?> nextRepairBiz(@RequestBody RemoveApproveInfo removeApproveInfo, HttpServletRequest request) {
|
||||
return expelledApplyInfoService.nextRepairBiz(removeApproveInfo, request);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "16.启动除名复议业务", position = 16)
|
||||
@PostMapping("/review/startBiz")
|
||||
public RestResult<?> startReviewBiz(@RequestBody AuditInfoVo query, HttpServletRequest request) {
|
||||
return expelledApplyInfoService.startReviewBiz(query, request);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "17.获取除名复议业务详情", position = 17)
|
||||
@GetMapping("/review/getBiz")
|
||||
public RestResult<?> getReviewBiz(String bizId) {
|
||||
return expelledApplyInfoService.getReviewBiz(bizId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "18.除名复议业务审批流程", position = 18)
|
||||
@PostMapping("/review/nextBiz")
|
||||
public RestResult<?> nextReviewBiz(@RequestBody RemoveApproveInfo removeApproveInfo, HttpServletRequest request) {
|
||||
return expelledApplyInfoService.nextReviewBiz(removeApproveInfo, request);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "19.启动除名撤销业务", position = 19)
|
||||
@PostMapping("/revoke/startBiz")
|
||||
public RestResult<?> startRevokeBiz(@RequestBody AuditInfoVo query, HttpServletRequest request) {
|
||||
return expelledApplyInfoService.startRevokeBiz(query, request);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "20.获取除名撤销业务详情", position = 20)
|
||||
@GetMapping("/revoke/getBiz")
|
||||
public RestResult<?> getRevokeBiz(String bizId) {
|
||||
return expelledApplyInfoService.getRevokeBiz(bizId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "21.除名撤销业务审批流程", position = 21)
|
||||
@PostMapping("/revoke/nextBiz")
|
||||
public RestResult<?> nextRevokeBiz(@RequestBody RemoveApproveInfo removeApproveInfo, HttpServletRequest request) {
|
||||
return expelledApplyInfoService.nextRevokeBiz(removeApproveInfo, request);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import java.io.Serializable;
|
|||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* @Description: 市场主体除名修复业务表实体类
|
||||
* @Description: 市场主体除名申请业务表实体类
|
||||
* @Author: TiAmo-cc
|
||||
* @Email: 1049976610@qq.com
|
||||
* @Date: 2026/1/8 10:15
|
||||
|
|
@ -25,9 +25,9 @@ import java.time.LocalDate;
|
|||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName(value = "EXPELLED_REPAIR_INFO")
|
||||
@ApiModel(value = "ExpelledRepairInfo对象", description = "市场主体除名修复业务信息")
|
||||
public class ExpelledRepairInfo extends SuperEntity implements Serializable {
|
||||
@TableName(value = "EXPELLED_APPLY_INFO")
|
||||
@ApiModel(value = "ExpelledApplyInfo对象", description = "市场主体除名申请业务表")
|
||||
public class ExpelledApplyInfo extends SuperEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ public class ExpelledRepairInfo extends SuperEntity implements Serializable {
|
|||
/**
|
||||
* 市场主体拟除名名单结果表主键ID(UUID)
|
||||
*/
|
||||
@ApiModelProperty(value = "市场主体拟除名名单结果表主键ID(UUID)")
|
||||
@ApiModelProperty(value = "市场主体拟除名名单结果表主键ID")
|
||||
@TableField(value = "RESULT_ID")
|
||||
private String resultId;
|
||||
|
||||
|
|
@ -168,11 +168,11 @@ public class ExpelledRepairInfo extends SuperEntity implements Serializable {
|
|||
private LocalDate approveDate;
|
||||
|
||||
/**
|
||||
* 除名修复原因
|
||||
* 申请原因
|
||||
*/
|
||||
@ApiModelProperty(value = "除名修复原因")
|
||||
@TableField(value = "REPAIR_REASON")
|
||||
private String repairReason;
|
||||
@ApiModelProperty(value = "申请原因")
|
||||
@TableField(value = "APPLY_REASON")
|
||||
private String applyReason;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
|
|
@ -180,4 +180,11 @@ public class ExpelledRepairInfo extends SuperEntity implements Serializable {
|
|||
@ApiModelProperty(value = "备注")
|
||||
@TableField(value = "REMARK")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 状态:10-有效,11-修复中,12-复议中,13-撤销中,91-修复完成,92-复议通过被动撤销完成,93-主动撤销完成
|
||||
*/
|
||||
@ApiModelProperty(value = "状态:10-有效,11-修复中,12-复议中,13-撤销中,91-修复完成,92-复议通过被动撤销完成,93-主动撤销完成")
|
||||
@TableField(value = "STATE")
|
||||
private String state;
|
||||
}
|
||||
|
|
@ -78,9 +78,9 @@ public class ExpelledResultInfo extends SuperEntity implements Serializable {
|
|||
private String auditOpinion;
|
||||
|
||||
/**
|
||||
* 状态:10-有效,11-修复中,99-已完成
|
||||
* 状态:10-有效,11-修复中,12-复议中,13-撤销中,91-修复完成,92-复议通过被动撤销完成,93-主动撤销完成
|
||||
*/
|
||||
@ApiModelProperty(value = "状态:10-有效,11-修复中,99-已完成")
|
||||
@ApiModelProperty(value = "状态:10-有效,11-修复中,12-复议中,13-撤销中,91-修复完成,92-复议通过被动撤销完成,93-主动撤销完成")
|
||||
@TableField(value = "STATE")
|
||||
private String state;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
package com.chinaweal.aiccs.aiccs.expelled.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.entity.ExpelledApplyInfo;
|
||||
|
||||
/**
|
||||
* @Description: 市场主体除名申请业务表dao层
|
||||
* @Author: TiAmo-cc
|
||||
* @Email: 1049976610@qq.com
|
||||
* @Date: 2026/1/8 10:23
|
||||
*/
|
||||
public interface ExpelledApplyInfoMapper extends BaseMapper<ExpelledApplyInfo> {
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
package com.chinaweal.aiccs.aiccs.expelled.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.entity.ExpelledRepairInfo;
|
||||
|
||||
/**
|
||||
* @Description: 市场主体除名修复业务表dao层
|
||||
* @Author: TiAmo-cc
|
||||
* @Email: 1049976610@qq.com
|
||||
* @Date: 2026/1/8 10:23
|
||||
*/
|
||||
public interface ExpelledRepairInfoMapper extends BaseMapper<ExpelledRepairInfo> {
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
package com.chinaweal.aiccs.aiccs.expelled.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.chinaweal.aiccs.aiccs.auditing.entity.TSOpinion;
|
||||
import com.chinaweal.aiccs.aiccs.business.entity.TSTaskList;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.entity.ExpelledApplyInfo;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.vo.AuditInfoVo;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.vo.RemoveApproveInfo;
|
||||
import com.chinaweal.aicorg.model.AICUser;
|
||||
import com.chinaweal.youfool.framework.springboot.rest.RestResult;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @Description: 市场主体除名申请业务表接口类
|
||||
* @Author: TiAmo-cc
|
||||
* @Email: 1049976610@qq.com
|
||||
* @Date: 2026/1/8 10:24
|
||||
*/
|
||||
public interface IExpelledApplyInfoService extends IService<ExpelledApplyInfo> {
|
||||
|
||||
/**
|
||||
* 启动除名修复业务
|
||||
*/
|
||||
RestResult<?> startRepairBiz(AuditInfoVo query, HttpServletRequest request);
|
||||
|
||||
/**
|
||||
* 查询除名修复业务
|
||||
*/
|
||||
RestResult<?> getRepairBiz(String bizId);
|
||||
|
||||
/**
|
||||
* 除名修复业务审批流程
|
||||
*/
|
||||
RestResult<?> nextRepairBiz(RemoveApproveInfo removeApproveInfo, HttpServletRequest request);
|
||||
|
||||
/**
|
||||
* 启动除名复议业务
|
||||
*/
|
||||
RestResult<?> startReviewBiz(AuditInfoVo query, HttpServletRequest request);
|
||||
|
||||
/**
|
||||
* 查询除名复议业务
|
||||
*/
|
||||
RestResult<?> getReviewBiz(String bizId);
|
||||
|
||||
/**
|
||||
* 除名复议业务审批流程
|
||||
*/
|
||||
RestResult<?> nextReviewBiz(RemoveApproveInfo removeApproveInfo, HttpServletRequest request);
|
||||
|
||||
/**
|
||||
* 启动除名撤销业务
|
||||
*/
|
||||
RestResult<?> startRevokeBiz(AuditInfoVo query, HttpServletRequest request);
|
||||
|
||||
/**
|
||||
* 查询除名撤销业务
|
||||
*/
|
||||
RestResult<?> getRevokeBiz(String bizId);
|
||||
|
||||
/**
|
||||
* 除名复议撤销审批流程
|
||||
*/
|
||||
RestResult<?> nextRevokeBiz(RemoveApproveInfo removeApproveInfo, HttpServletRequest request);
|
||||
|
||||
/**
|
||||
* 根据业务ID查询除名申请业务信息
|
||||
*/
|
||||
ExpelledApplyInfo getExpelledApplyInfoByBizId(String bizId);
|
||||
|
||||
TSTaskList startApplyBizAccept(AICUser user, TSTaskList tsTaskList, ExpelledApplyInfo applyInfo);
|
||||
|
||||
TSTaskList saveApplyAuditProcess(AICUser user, TSTaskList tsTaskList, ExpelledApplyInfo applyInfo, TSOpinion opinion, String nextNodeId, String[] nextPerformerIds, String[] nextPerformerNames);
|
||||
}
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
package com.chinaweal.aiccs.aiccs.expelled.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.chinaweal.aiccs.aiccs.auditing.entity.TSOpinion;
|
||||
import com.chinaweal.aiccs.aiccs.business.entity.TSTaskList;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.entity.ExpelledRepairInfo;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.vo.AuditInfoVo;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.vo.RepairInfoVo;
|
||||
import com.chinaweal.aicorg.model.AICUser;
|
||||
import com.chinaweal.youfool.framework.springboot.rest.RestResult;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @Description: 市场主体除名修复业务表接口类
|
||||
* @Author: TiAmo-cc
|
||||
* @Email: 1049976610@qq.com
|
||||
* @Date: 2026/1/8 10:24
|
||||
*/
|
||||
public interface IExpelledRepairInfoService extends IService<ExpelledRepairInfo> {
|
||||
|
||||
/**
|
||||
* 启动除名修复业务
|
||||
*/
|
||||
RestResult<?> startRepairBiz(AuditInfoVo query, HttpServletRequest request);
|
||||
|
||||
TSTaskList startRepairBizAccept(AICUser user, TSTaskList tsTaskList, ExpelledRepairInfo repairInfo);
|
||||
|
||||
/**
|
||||
* 启动除名修复业务
|
||||
*/
|
||||
RestResult<?> getRepairBiz(String bizId);
|
||||
|
||||
/**
|
||||
* 除名修复业务审批流程
|
||||
*/
|
||||
RestResult<?> nextRepairBiz(RepairInfoVo repairInfoQuery, HttpServletRequest request);
|
||||
|
||||
TSTaskList saveRepairAuditProcess(AICUser user, TSTaskList tsTaskList, ExpelledRepairInfo repairInfo, TSOpinion opinion, String nextNodeId, String[] nextPerformerIds, String[] nextPerformerNames);
|
||||
|
||||
/**
|
||||
* 根据业务号查询除名修复业务信息
|
||||
*/
|
||||
ExpelledRepairInfo getExpelledRepairInfoByBizId(String bizId);
|
||||
}
|
||||
|
|
@ -0,0 +1,682 @@
|
|||
package com.chinaweal.aiccs.aiccs.expelled.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.chinaweal.aiccs.aiccs.auditing.entity.TSOpinion;
|
||||
import com.chinaweal.aiccs.aiccs.auditing.service.TSOpinionService;
|
||||
import com.chinaweal.aiccs.aiccs.business.entity.TSTaskList;
|
||||
import com.chinaweal.aiccs.aiccs.business.entity.TSTwfProcessNode;
|
||||
import com.chinaweal.aiccs.aiccs.business.rules.model.SequenceFlowModel;
|
||||
import com.chinaweal.aiccs.aiccs.business.service.TSTaskListService;
|
||||
import com.chinaweal.aiccs.aiccs.business.service.WorkFlowService;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.entity.ExpelledApplyInfo;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.entity.ExpelledResultInfo;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.mapper.ExpelledApplyInfoMapper;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.service.IExpelledApplyInfoService;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.service.IExpelledResultInfoService;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.vo.AuditInfoVo;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.vo.RemoveApproveInfo;
|
||||
import com.chinaweal.aiccs.common.base.controller.BaseController;
|
||||
import com.chinaweal.aiccs.common.constant.BaseDataConstant;
|
||||
import com.chinaweal.aiccs.common.constant.Constant;
|
||||
import com.chinaweal.aiccs.common.util.FlowUtil;
|
||||
import com.chinaweal.aiccs.common.util.HandleWorkFlowUtil;
|
||||
import com.chinaweal.aiccs.common.util.WorkFlowUtil;
|
||||
import com.chinaweal.aiccs.utils.BeanUtil;
|
||||
import com.chinaweal.aicorg.model.AICUser;
|
||||
import com.chinaweal.youfool.framework.springboot.exception.custom.BusinessException;
|
||||
import com.chinaweal.youfool.framework.springboot.rest.RestResult;
|
||||
import com.chinaweal.youfool.framework.springboot.rest.ResultCode;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.time.LocalDate;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @Description: 市场主体除名申请业务表实现类
|
||||
* @Author: TiAmo-cc
|
||||
* @Email: 1049976610@qq.com
|
||||
* @Date: 2026/1/8 10:24
|
||||
*/
|
||||
@Service
|
||||
public class ExpelledApplyInfoServiceImpl extends ServiceImpl<ExpelledApplyInfoMapper, ExpelledApplyInfo> implements IExpelledApplyInfoService {
|
||||
|
||||
@Resource
|
||||
private TSTaskListService tsTaskListService;
|
||||
@Resource
|
||||
private WorkFlowService workFlowService;
|
||||
@Resource
|
||||
private TSOpinionService opinionService;
|
||||
@Resource
|
||||
private IExpelledResultInfoService expelledResultInfoService;
|
||||
|
||||
@Override
|
||||
public RestResult<?> startRepairBiz(AuditInfoVo query, HttpServletRequest request) {
|
||||
AICUser user = BaseController.getLoginUser(request);
|
||||
if (user == null) {
|
||||
throw new BusinessException("登录超时,请重新登录");
|
||||
}
|
||||
ExpelledResultInfo resultInfo = expelledResultInfoService.getById(query.getResultId());
|
||||
if (resultInfo == null) {
|
||||
throw new BusinessException("市场主体拟除名结果信息不存在,请联系管理员");
|
||||
}
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
String bizId = UUID.randomUUID().toString();
|
||||
// 添加待办启动流程
|
||||
TSTaskList tsTaskList = new TSTaskList();
|
||||
tsTaskList.setBizseqid(bizId);
|
||||
tsTaskList.setBustype(BaseDataConstant.BUSINESS_TYPE_REMOVE_REPAIR); // 除名修复
|
||||
tsTaskList.setBusname(query.getEntName());
|
||||
// 保存除名修复数据
|
||||
ExpelledApplyInfo applyInfo = new ExpelledApplyInfo();
|
||||
applyInfo.setAuditId(query.getAuditId());
|
||||
applyInfo.setResultId(query.getResultId());
|
||||
applyInfo.setBizId(bizId);
|
||||
applyInfo.setApplyDate(LocalDate.now());
|
||||
applyInfo.setRemoveReason(query.getAuditOpinion());
|
||||
applyInfo.setRemoveDate(query.getRemoveDate());
|
||||
applyInfo.setRemoveOrgNo(query.getRemoveOrgNo());
|
||||
applyInfo.setRemoveOrgName(query.getRemoveOrgName());
|
||||
applyInfo.setEntName(query.getEntName());
|
||||
applyInfo.setUscc(query.getUscc());
|
||||
applyInfo.setLerepName(query.getLerepName());
|
||||
applyInfo.setAddress(query.getAddress());
|
||||
applyInfo.setState("11"); // 修复中
|
||||
// 保存业务待办信息
|
||||
tsTaskList = startApplyBizAccept(user, tsTaskList, applyInfo);
|
||||
List<SequenceFlowModel> nextSequenceFlows = workFlowService.findNextSequenceFlowList(tsTaskList.getWorkflowid());
|
||||
TSTwfProcessNode currentNode = workFlowService.findCurrentNode(tsTaskList.getWorkflowid());
|
||||
String opinionType = BaseDataConstant.getOpinionTypeByWorkFlowNode(currentNode.getCurrentnode());
|
||||
if (opinionType == null) {
|
||||
opinionType = "1";
|
||||
}
|
||||
// 更新除名结果表信息
|
||||
resultInfo.setState("11"); // 修复中
|
||||
expelledResultInfoService.saveOrUpdate(resultInfo);
|
||||
resultMap.put("repairInfo", applyInfo);
|
||||
resultMap.put("taskId", tsTaskList.getTasklistid());
|
||||
resultMap.put("bizId", bizId);
|
||||
resultMap.put("nextSequenceFlows", nextSequenceFlows);
|
||||
resultMap.put("currentNode", currentNode.getCurrentnode());
|
||||
resultMap.put("currentNodeName", WorkFlowUtil.getNodeName(currentNode.getCurrentnode()));
|
||||
resultMap.put("currentLinkTypeID", opinionType);
|
||||
return RestResult.ok(resultMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RestResult<?> getRepairBiz(String bizId) {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
// 除名修复业务表
|
||||
ExpelledApplyInfo applyInfo = getExpelledApplyInfoByBizId(bizId);
|
||||
if (applyInfo == null) {
|
||||
throw new BusinessException("除名修复业务信息不存在,请联系管理员");
|
||||
}
|
||||
resultMap.put("repairInfo", applyInfo);
|
||||
// 除名业务待办
|
||||
TSTaskList tsTaskList = tsTaskListService.searchTaskListByBizId(bizId);
|
||||
if (tsTaskList == null) {
|
||||
throw new BusinessException("除名修复业务待办信息不存在,请联系管理员");
|
||||
}
|
||||
resultMap.put("tsTaskList", new TSTaskList().setTasklistid(tsTaskList.getTasklistid()).setWorkflowid(tsTaskList.getWorkflowid()));
|
||||
// 获取历史审批意见
|
||||
LambdaQueryWrapper<TSOpinion> opinionWrapper = new LambdaQueryWrapper<>();
|
||||
opinionWrapper.eq(TSOpinion::getBizseq, bizId)
|
||||
.ne(TSOpinion::getOpiniontype, "55")
|
||||
.orderByAsc(TSOpinion::getHandledate);
|
||||
List<TSOpinion> tsOpinions = opinionService.list(opinionWrapper);
|
||||
resultMap.put("historyOpinions", tsOpinions);
|
||||
return RestResult.ok(resultMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RestResult<?> nextRepairBiz(RemoveApproveInfo removeApproveInfo, HttpServletRequest request) {
|
||||
AICUser user = BaseController.getLoginUser(request);
|
||||
if (user == null) {
|
||||
throw new BusinessException("登录超时,请重新登录");
|
||||
}
|
||||
String bizId = removeApproveInfo.getBizId();
|
||||
String taskId = removeApproveInfo.getTaskId();
|
||||
String nextNodeId = removeApproveInfo.getNextNodeId();
|
||||
String nextPerformerIds = removeApproveInfo.getNextPerformerIds();
|
||||
String nextPerformerNames = removeApproveInfo.getNextPerformerNames();
|
||||
ExpelledApplyInfo applyInfoQuery = removeApproveInfo.getApplyInfoQuery();
|
||||
if (StringUtils.isBlank(bizId)) {
|
||||
throw new BusinessException("bizId参数缺失");
|
||||
}
|
||||
if (StringUtils.isBlank(taskId)) {
|
||||
throw new BusinessException("taskId参数缺失");
|
||||
}
|
||||
if (StringUtils.isBlank(nextNodeId)) {
|
||||
throw new BusinessException("nextNodeId参数缺失");
|
||||
}
|
||||
// if (!FlowUtil.EXPTLISTWORKFLOW_ENDEXPTLIST.equals(nextNodeId)) {
|
||||
// if (StringUtils.isBlank(nextPerformerIds)) {
|
||||
// throw new BusinessException("nextPerformerIds参数缺失");
|
||||
// }
|
||||
// if (StringUtils.isBlank(nextPerformerNames)) {
|
||||
// throw new BusinessException("nextPerformerNames参数缺失");
|
||||
// }
|
||||
// }
|
||||
if (applyInfoQuery == null) {
|
||||
throw new BusinessException("applyInfoQuery参数缺失");
|
||||
}
|
||||
// if (StringUtils.equals("handleExptlist", nextNodeId)
|
||||
// || StringUtils.equals("overFinish", nextNodeId)) {
|
||||
// if (removeApproveInfo != null
|
||||
// && StringUtils.isNotBlank(removeApproveInfo.getBizId())) {
|
||||
// // TODO
|
||||
// }
|
||||
// }
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
ExpelledApplyInfo applyInfo = getExpelledApplyInfoByBizId(bizId);
|
||||
if (applyInfo == null) {
|
||||
throw new BusinessException("除名修复业务信息不存在,请联系管理员");
|
||||
}
|
||||
// 更新除名修复业务表
|
||||
if (applyInfoQuery != null && StringUtils.isNotBlank(applyInfoQuery.getBizId())) {
|
||||
TSTaskList tsTaskList = tsTaskListService.selectByTasklistID(taskId);
|
||||
TSTwfProcessNode processNode = workFlowService.findCurrentNode(tsTaskList.getWorkflowid());
|
||||
|
||||
// 下一步为审核
|
||||
if (StringUtils.equals(FlowUtil.EXPTLISTWORKFLOW_HANDLEEXPTLIST, nextNodeId)) {
|
||||
if (StringUtils.equals(FlowUtil.EXPTLISTWORKFLOW_EXPTLISTENTER, processNode.getCurrentnode())) {
|
||||
BeanUtil.copyBean(applyInfoQuery, applyInfo);
|
||||
}
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(nextPerformerIds)) {
|
||||
processNode = workFlowService.findCurrentNode(tsTaskList.getWorkflowid());
|
||||
int order = WorkFlowUtil.checkNextOrder(processNode.getCurrentnode(), nextNodeId);
|
||||
// 通过order判断为回退还是前进 >0 前进
|
||||
if (order > 0) {
|
||||
LambdaQueryWrapper<TSOpinion> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(TSOpinion::getWorkflowid, tsTaskList.getWorkflowid())
|
||||
.eq(TSOpinion::getOpiniontype, "0") // 经办为0
|
||||
.orderByDesc(TSOpinion::getLauptime);
|
||||
List<TSOpinion> list = opinionService.list(wrapper);
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return RestResult.error(ResultCode.DATA_NONE, "除名修复审批意见不存在,请联系管理员");
|
||||
}
|
||||
nextPerformerIds = list.get(0).getHandlerid();
|
||||
nextPerformerNames = list.get(0).getHandler();
|
||||
}
|
||||
// 回退时获取经办人
|
||||
if (order < 0) {
|
||||
// 获取经办人
|
||||
LambdaQueryWrapper<TSOpinion> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(TSOpinion::getWorkflowid, tsTaskList.getWorkflowid())
|
||||
.eq(TSOpinion::getOpiniontype, '0')
|
||||
.orderByDesc(TSOpinion::getLauptime);
|
||||
List<TSOpinion> list = opinionService.list(wrapper);
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return RestResult.error(ResultCode.DATA_NONE, "除名修复审批意见不存在,请联系管理员");
|
||||
}
|
||||
nextPerformerIds = list.get(0).getHandlerid();
|
||||
nextPerformerNames = list.get(0).getHandler();
|
||||
}
|
||||
}
|
||||
|
||||
// 发送
|
||||
String[] ids = StringUtils.split(nextPerformerIds, Constant.COMMA);
|
||||
String[] names = StringUtils.split(nextPerformerNames, Constant.COMMA);
|
||||
try {
|
||||
tsTaskList = saveApplyAuditProcess(user, tsTaskList, applyInfo, removeApproveInfo.getOpinionQuery(), nextNodeId, ids, names);
|
||||
if (ids.length == 1 && StringUtils.equals(user.getPrimaryKey(), ids[0])) {
|
||||
resultMap.put("bizId", bizId);
|
||||
resultMap.put("taskId", taskId);
|
||||
resultMap.put("nextNodeId", nextNodeId);
|
||||
resultMap.put("workFlowId", tsTaskList.getWorkflowid());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("除名修复业务审批出错:", e);
|
||||
throw new BusinessException("除名修复业务审批出错");
|
||||
}
|
||||
}
|
||||
return RestResult.ok(resultMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RestResult<?> startReviewBiz(AuditInfoVo query, HttpServletRequest request) {
|
||||
AICUser user = BaseController.getLoginUser(request);
|
||||
if (user == null) {
|
||||
throw new BusinessException("登录超时,请重新登录");
|
||||
}
|
||||
ExpelledResultInfo resultInfo = expelledResultInfoService.getById(query.getResultId());
|
||||
if (resultInfo == null) {
|
||||
throw new BusinessException("市场主体拟除名结果信息不存在,请联系管理员");
|
||||
}
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
String bizId = UUID.randomUUID().toString();
|
||||
// 添加待办启动流程
|
||||
TSTaskList tsTaskList = new TSTaskList();
|
||||
tsTaskList.setBizseqid(bizId);
|
||||
tsTaskList.setBustype(BaseDataConstant.BUSINESS_TYPE_REMOVE_REVIEW); // 除名复议
|
||||
tsTaskList.setBusname(query.getEntName());
|
||||
// 保存除名复议数据
|
||||
ExpelledApplyInfo applyInfo = new ExpelledApplyInfo();
|
||||
applyInfo.setAuditId(query.getAuditId());
|
||||
applyInfo.setResultId(query.getResultId());
|
||||
applyInfo.setBizId(bizId);
|
||||
applyInfo.setApplyDate(LocalDate.now());
|
||||
applyInfo.setRemoveReason(query.getAuditOpinion());
|
||||
applyInfo.setRemoveDate(query.getRemoveDate());
|
||||
applyInfo.setRemoveOrgNo(query.getRemoveOrgNo());
|
||||
applyInfo.setRemoveOrgName(query.getRemoveOrgName());
|
||||
applyInfo.setEntName(query.getEntName());
|
||||
applyInfo.setUscc(query.getUscc());
|
||||
applyInfo.setLerepName(query.getLerepName());
|
||||
applyInfo.setAddress(query.getAddress());
|
||||
applyInfo.setState("12"); // 复议中
|
||||
// 保存业务待办信息
|
||||
tsTaskList = startApplyBizAccept(user, tsTaskList, applyInfo);
|
||||
List<SequenceFlowModel> nextSequenceFlows = workFlowService.findNextSequenceFlowList(tsTaskList.getWorkflowid());
|
||||
TSTwfProcessNode currentNode = workFlowService.findCurrentNode(tsTaskList.getWorkflowid());
|
||||
String opinionType = BaseDataConstant.getOpinionTypeByWorkFlowNode(currentNode.getCurrentnode());
|
||||
if (opinionType == null) {
|
||||
opinionType = "1";
|
||||
}
|
||||
// 更新除名结果表信息
|
||||
resultInfo.setState("12"); // 复议中
|
||||
expelledResultInfoService.saveOrUpdate(resultInfo);
|
||||
resultMap.put("reviewInfo", applyInfo);
|
||||
resultMap.put("taskId", tsTaskList.getTasklistid());
|
||||
resultMap.put("bizId", bizId);
|
||||
resultMap.put("nextSequenceFlows", nextSequenceFlows);
|
||||
resultMap.put("currentNode", currentNode.getCurrentnode());
|
||||
resultMap.put("currentNodeName", WorkFlowUtil.getNodeName(currentNode.getCurrentnode()));
|
||||
resultMap.put("currentLinkTypeID", opinionType);
|
||||
return RestResult.ok(resultMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RestResult<?> getReviewBiz(String bizId) {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
// 除名复议业务表
|
||||
ExpelledApplyInfo applyInfo = getExpelledApplyInfoByBizId(bizId);
|
||||
if (applyInfo == null) {
|
||||
throw new BusinessException("除名复议业务信息不存在,请联系管理员");
|
||||
}
|
||||
resultMap.put("reviewInfo", applyInfo);
|
||||
// 除名业务待办
|
||||
TSTaskList tsTaskList = tsTaskListService.searchTaskListByBizId(bizId);
|
||||
if (tsTaskList == null) {
|
||||
throw new BusinessException("除名复议业务待办信息不存在,请联系管理员");
|
||||
}
|
||||
resultMap.put("tsTaskList", new TSTaskList().setTasklistid(tsTaskList.getTasklistid()).setWorkflowid(tsTaskList.getWorkflowid()));
|
||||
// 获取历史审批意见
|
||||
LambdaQueryWrapper<TSOpinion> opinionWrapper = new LambdaQueryWrapper<>();
|
||||
opinionWrapper.eq(TSOpinion::getBizseq, bizId)
|
||||
.ne(TSOpinion::getOpiniontype, "55")
|
||||
.orderByAsc(TSOpinion::getHandledate);
|
||||
List<TSOpinion> tsOpinions = opinionService.list(opinionWrapper);
|
||||
resultMap.put("historyOpinions", tsOpinions);
|
||||
return RestResult.ok(resultMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RestResult<?> nextReviewBiz(RemoveApproveInfo removeApproveInfo, HttpServletRequest request) {
|
||||
AICUser user = BaseController.getLoginUser(request);
|
||||
if (user == null) {
|
||||
throw new BusinessException("登录超时,请重新登录");
|
||||
}
|
||||
String bizId = removeApproveInfo.getBizId();
|
||||
String taskId = removeApproveInfo.getTaskId();
|
||||
String nextNodeId = removeApproveInfo.getNextNodeId();
|
||||
String nextPerformerIds = removeApproveInfo.getNextPerformerIds();
|
||||
String nextPerformerNames = removeApproveInfo.getNextPerformerNames();
|
||||
ExpelledApplyInfo applyInfoQuery = removeApproveInfo.getApplyInfoQuery();
|
||||
if (StringUtils.isBlank(bizId)) {
|
||||
throw new BusinessException("bizId参数缺失");
|
||||
}
|
||||
if (StringUtils.isBlank(taskId)) {
|
||||
throw new BusinessException("taskId参数缺失");
|
||||
}
|
||||
if (StringUtils.isBlank(nextNodeId)) {
|
||||
throw new BusinessException("nextNodeId参数缺失");
|
||||
}
|
||||
// if (!FlowUtil.EXPTLISTWORKFLOW_ENDEXPTLIST.equals(nextNodeId)) {
|
||||
// if (StringUtils.isBlank(nextPerformerIds)) {
|
||||
// throw new BusinessException("nextPerformerIds参数缺失");
|
||||
// }
|
||||
// if (StringUtils.isBlank(nextPerformerNames)) {
|
||||
// throw new BusinessException("nextPerformerNames参数缺失");
|
||||
// }
|
||||
// }
|
||||
if (applyInfoQuery == null) {
|
||||
throw new BusinessException("applyInfoQuery参数缺失");
|
||||
}
|
||||
// if (StringUtils.equals("handleExptlist", nextNodeId)
|
||||
// || StringUtils.equals("overFinish", nextNodeId)) {
|
||||
// if (removeApproveInfo != null
|
||||
// && StringUtils.isNotBlank(removeApproveInfo.getBizId())) {
|
||||
// // TODO
|
||||
// }
|
||||
// }
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
ExpelledApplyInfo applyInfo = getExpelledApplyInfoByBizId(bizId);
|
||||
if (applyInfo == null) {
|
||||
throw new BusinessException("除名复议业务信息不存在,请联系管理员");
|
||||
}
|
||||
// 更新除名复议业务表
|
||||
if (applyInfoQuery != null && StringUtils.isNotBlank(applyInfoQuery.getBizId())) {
|
||||
TSTaskList tsTaskList = tsTaskListService.selectByTasklistID(taskId);
|
||||
TSTwfProcessNode processNode = workFlowService.findCurrentNode(tsTaskList.getWorkflowid());
|
||||
|
||||
// 下一步为审核
|
||||
if (StringUtils.equals(FlowUtil.EXPTLISTWORKFLOW_HANDLEEXPTLIST, nextNodeId)) {
|
||||
if (StringUtils.equals(FlowUtil.EXPTLISTWORKFLOW_EXPTLISTENTER, processNode.getCurrentnode())) {
|
||||
BeanUtil.copyBean(applyInfoQuery, applyInfo);
|
||||
}
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(nextPerformerIds)) {
|
||||
processNode = workFlowService.findCurrentNode(tsTaskList.getWorkflowid());
|
||||
int order = WorkFlowUtil.checkNextOrder(processNode.getCurrentnode(), nextNodeId);
|
||||
// 通过order判断为回退还是前进 >0 前进
|
||||
if (order > 0) {
|
||||
LambdaQueryWrapper<TSOpinion> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(TSOpinion::getWorkflowid, tsTaskList.getWorkflowid())
|
||||
.eq(TSOpinion::getOpiniontype, "0") // 经办为0
|
||||
.orderByDesc(TSOpinion::getLauptime);
|
||||
List<TSOpinion> list = opinionService.list(wrapper);
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return RestResult.error(ResultCode.DATA_NONE, "除名复议审批意见不存在,请联系管理员");
|
||||
}
|
||||
nextPerformerIds = list.get(0).getHandlerid();
|
||||
nextPerformerNames = list.get(0).getHandler();
|
||||
}
|
||||
// 回退时获取经办人
|
||||
if (order < 0) {
|
||||
// 获取经办人
|
||||
LambdaQueryWrapper<TSOpinion> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(TSOpinion::getWorkflowid, tsTaskList.getWorkflowid())
|
||||
.eq(TSOpinion::getOpiniontype, '0')
|
||||
.orderByDesc(TSOpinion::getLauptime);
|
||||
List<TSOpinion> list = opinionService.list(wrapper);
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return RestResult.error(ResultCode.DATA_NONE, "除名复议审批意见不存在,请联系管理员");
|
||||
}
|
||||
nextPerformerIds = list.get(0).getHandlerid();
|
||||
nextPerformerNames = list.get(0).getHandler();
|
||||
}
|
||||
}
|
||||
|
||||
// 发送
|
||||
String[] ids = StringUtils.split(nextPerformerIds, Constant.COMMA);
|
||||
String[] names = StringUtils.split(nextPerformerNames, Constant.COMMA);
|
||||
try {
|
||||
tsTaskList = saveApplyAuditProcess(user, tsTaskList, applyInfo, removeApproveInfo.getOpinionQuery(), nextNodeId, ids, names);
|
||||
if (ids.length == 1 && StringUtils.equals(user.getPrimaryKey(), ids[0])) {
|
||||
resultMap.put("bizId", bizId);
|
||||
resultMap.put("taskId", taskId);
|
||||
resultMap.put("nextNodeId", nextNodeId);
|
||||
resultMap.put("workFlowId", tsTaskList.getWorkflowid());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("除名复议业务审批出错:", e);
|
||||
throw new BusinessException("除名复议业务审批出错");
|
||||
}
|
||||
}
|
||||
return RestResult.ok(resultMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RestResult<?> startRevokeBiz(AuditInfoVo query, HttpServletRequest request) {
|
||||
AICUser user = BaseController.getLoginUser(request);
|
||||
if (user == null) {
|
||||
throw new BusinessException("登录超时,请重新登录");
|
||||
}
|
||||
ExpelledResultInfo resultInfo = expelledResultInfoService.getById(query.getResultId());
|
||||
if (resultInfo == null) {
|
||||
throw new BusinessException("市场主体拟除名结果信息不存在,请联系管理员");
|
||||
}
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
String bizId = UUID.randomUUID().toString();
|
||||
// 添加待办启动流程
|
||||
TSTaskList tsTaskList = new TSTaskList();
|
||||
tsTaskList.setBizseqid(bizId);
|
||||
tsTaskList.setBustype(BaseDataConstant.BUSINESS_TYPE_REMOVE_REVOKE); // 除名撤销
|
||||
tsTaskList.setBusname(query.getEntName());
|
||||
// 保存除名撤销数据
|
||||
ExpelledApplyInfo applyInfo = new ExpelledApplyInfo();
|
||||
applyInfo.setAuditId(query.getAuditId());
|
||||
applyInfo.setResultId(query.getResultId());
|
||||
applyInfo.setBizId(bizId);
|
||||
applyInfo.setApplyDate(LocalDate.now());
|
||||
applyInfo.setRemoveReason(query.getAuditOpinion());
|
||||
applyInfo.setRemoveDate(query.getRemoveDate());
|
||||
applyInfo.setRemoveOrgNo(query.getRemoveOrgNo());
|
||||
applyInfo.setRemoveOrgName(query.getRemoveOrgName());
|
||||
applyInfo.setEntName(query.getEntName());
|
||||
applyInfo.setUscc(query.getUscc());
|
||||
applyInfo.setLerepName(query.getLerepName());
|
||||
applyInfo.setAddress(query.getAddress());
|
||||
applyInfo.setState("13"); // 撤销中
|
||||
// 保存业务待办信息
|
||||
tsTaskList = startApplyBizAccept(user, tsTaskList, applyInfo);
|
||||
List<SequenceFlowModel> nextSequenceFlows = workFlowService.findNextSequenceFlowList(tsTaskList.getWorkflowid());
|
||||
TSTwfProcessNode currentNode = workFlowService.findCurrentNode(tsTaskList.getWorkflowid());
|
||||
String opinionType = BaseDataConstant.getOpinionTypeByWorkFlowNode(currentNode.getCurrentnode());
|
||||
if (opinionType == null) {
|
||||
opinionType = "1";
|
||||
}
|
||||
// 更新除名结果表信息
|
||||
resultInfo.setState("13"); // 撤销中
|
||||
expelledResultInfoService.saveOrUpdate(resultInfo);
|
||||
resultMap.put("revokeInfo", applyInfo);
|
||||
resultMap.put("taskId", tsTaskList.getTasklistid());
|
||||
resultMap.put("bizId", bizId);
|
||||
resultMap.put("nextSequenceFlows", nextSequenceFlows);
|
||||
resultMap.put("currentNode", currentNode.getCurrentnode());
|
||||
resultMap.put("currentNodeName", WorkFlowUtil.getNodeName(currentNode.getCurrentnode()));
|
||||
resultMap.put("currentLinkTypeID", opinionType);
|
||||
return RestResult.ok(resultMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RestResult<?> getRevokeBiz(String bizId) {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
// 除名撤销业务表
|
||||
ExpelledApplyInfo applyInfo = getExpelledApplyInfoByBizId(bizId);
|
||||
if (applyInfo == null) {
|
||||
throw new BusinessException("除名撤销业务信息不存在,请联系管理员");
|
||||
}
|
||||
resultMap.put("revokeInfo", applyInfo);
|
||||
// 除名业务待办
|
||||
TSTaskList tsTaskList = tsTaskListService.searchTaskListByBizId(bizId);
|
||||
if (tsTaskList == null) {
|
||||
throw new BusinessException("除名撤销业务待办信息不存在,请联系管理员");
|
||||
}
|
||||
resultMap.put("tsTaskList", new TSTaskList().setTasklistid(tsTaskList.getTasklistid()).setWorkflowid(tsTaskList.getWorkflowid()));
|
||||
// 获取历史审批意见
|
||||
LambdaQueryWrapper<TSOpinion> opinionWrapper = new LambdaQueryWrapper<>();
|
||||
opinionWrapper.eq(TSOpinion::getBizseq, bizId)
|
||||
.ne(TSOpinion::getOpiniontype, "55")
|
||||
.orderByAsc(TSOpinion::getHandledate);
|
||||
List<TSOpinion> tsOpinions = opinionService.list(opinionWrapper);
|
||||
resultMap.put("historyOpinions", tsOpinions);
|
||||
return RestResult.ok(resultMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RestResult<?> nextRevokeBiz(RemoveApproveInfo removeApproveInfo, HttpServletRequest request) {
|
||||
AICUser user = BaseController.getLoginUser(request);
|
||||
if (user == null) {
|
||||
throw new BusinessException("登录超时,请重新登录");
|
||||
}
|
||||
String bizId = removeApproveInfo.getBizId();
|
||||
String taskId = removeApproveInfo.getTaskId();
|
||||
String nextNodeId = removeApproveInfo.getNextNodeId();
|
||||
String nextPerformerIds = removeApproveInfo.getNextPerformerIds();
|
||||
String nextPerformerNames = removeApproveInfo.getNextPerformerNames();
|
||||
ExpelledApplyInfo applyInfoQuery = removeApproveInfo.getApplyInfoQuery();
|
||||
if (StringUtils.isBlank(bizId)) {
|
||||
throw new BusinessException("bizId参数缺失");
|
||||
}
|
||||
if (StringUtils.isBlank(taskId)) {
|
||||
throw new BusinessException("taskId参数缺失");
|
||||
}
|
||||
if (StringUtils.isBlank(nextNodeId)) {
|
||||
throw new BusinessException("nextNodeId参数缺失");
|
||||
}
|
||||
// if (!FlowUtil.EXPTLISTWORKFLOW_ENDEXPTLIST.equals(nextNodeId)) {
|
||||
// if (StringUtils.isBlank(nextPerformerIds)) {
|
||||
// throw new BusinessException("nextPerformerIds参数缺失");
|
||||
// }
|
||||
// if (StringUtils.isBlank(nextPerformerNames)) {
|
||||
// throw new BusinessException("nextPerformerNames参数缺失");
|
||||
// }
|
||||
// }
|
||||
if (applyInfoQuery == null) {
|
||||
throw new BusinessException("applyInfoQuery参数缺失");
|
||||
}
|
||||
// if (StringUtils.equals("handleExptlist", nextNodeId)
|
||||
// || StringUtils.equals("overFinish", nextNodeId)) {
|
||||
// if (removeApproveInfo != null
|
||||
// && StringUtils.isNotBlank(removeApproveInfo.getBizId())) {
|
||||
// // TODO
|
||||
// }
|
||||
// }
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
ExpelledApplyInfo applyInfo = getExpelledApplyInfoByBizId(bizId);
|
||||
if (applyInfo == null) {
|
||||
throw new BusinessException("除名撤销业务信息不存在,请联系管理员");
|
||||
}
|
||||
// 更新除名撤销业务表
|
||||
if (applyInfoQuery != null && StringUtils.isNotBlank(applyInfoQuery.getBizId())) {
|
||||
TSTaskList tsTaskList = tsTaskListService.selectByTasklistID(taskId);
|
||||
TSTwfProcessNode processNode = workFlowService.findCurrentNode(tsTaskList.getWorkflowid());
|
||||
|
||||
// 下一步为审核
|
||||
if (StringUtils.equals(FlowUtil.EXPTLISTWORKFLOW_HANDLEEXPTLIST, nextNodeId)) {
|
||||
if (StringUtils.equals(FlowUtil.EXPTLISTWORKFLOW_EXPTLISTENTER, processNode.getCurrentnode())) {
|
||||
BeanUtil.copyBean(applyInfoQuery, applyInfo);
|
||||
}
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(nextPerformerIds)) {
|
||||
processNode = workFlowService.findCurrentNode(tsTaskList.getWorkflowid());
|
||||
int order = WorkFlowUtil.checkNextOrder(processNode.getCurrentnode(), nextNodeId);
|
||||
// 通过order判断为回退还是前进 >0 前进
|
||||
if (order > 0) {
|
||||
LambdaQueryWrapper<TSOpinion> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(TSOpinion::getWorkflowid, tsTaskList.getWorkflowid())
|
||||
.eq(TSOpinion::getOpiniontype, "0") // 经办为0
|
||||
.orderByDesc(TSOpinion::getLauptime);
|
||||
List<TSOpinion> list = opinionService.list(wrapper);
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return RestResult.error(ResultCode.DATA_NONE, "除名撤销审批意见不存在,请联系管理员");
|
||||
}
|
||||
nextPerformerIds = list.get(0).getHandlerid();
|
||||
nextPerformerNames = list.get(0).getHandler();
|
||||
}
|
||||
// 回退时获取经办人
|
||||
if (order < 0) {
|
||||
// 获取经办人
|
||||
LambdaQueryWrapper<TSOpinion> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(TSOpinion::getWorkflowid, tsTaskList.getWorkflowid())
|
||||
.eq(TSOpinion::getOpiniontype, '0')
|
||||
.orderByDesc(TSOpinion::getLauptime);
|
||||
List<TSOpinion> list = opinionService.list(wrapper);
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return RestResult.error(ResultCode.DATA_NONE, "除名撤销审批意见不存在,请联系管理员");
|
||||
}
|
||||
nextPerformerIds = list.get(0).getHandlerid();
|
||||
nextPerformerNames = list.get(0).getHandler();
|
||||
}
|
||||
}
|
||||
|
||||
// 发送
|
||||
String[] ids = StringUtils.split(nextPerformerIds, Constant.COMMA);
|
||||
String[] names = StringUtils.split(nextPerformerNames, Constant.COMMA);
|
||||
try {
|
||||
tsTaskList = saveApplyAuditProcess(user, tsTaskList, applyInfo, removeApproveInfo.getOpinionQuery(), nextNodeId, ids, names);
|
||||
if (ids.length == 1 && StringUtils.equals(user.getPrimaryKey(), ids[0])) {
|
||||
resultMap.put("bizId", bizId);
|
||||
resultMap.put("taskId", taskId);
|
||||
resultMap.put("nextNodeId", nextNodeId);
|
||||
resultMap.put("workFlowId", tsTaskList.getWorkflowid());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("除名撤销业务审批出错:", e);
|
||||
throw new BusinessException("除名撤销业务审批出错");
|
||||
}
|
||||
}
|
||||
return RestResult.ok(resultMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExpelledApplyInfo getExpelledApplyInfoByBizId(String bizId) {
|
||||
return getOne(new LambdaQueryWrapper<ExpelledApplyInfo>().eq(ExpelledApplyInfo::getBizId, bizId));
|
||||
}
|
||||
|
||||
@Override
|
||||
public TSTaskList startApplyBizAccept(AICUser user, TSTaskList tsTaskList, ExpelledApplyInfo applyInfo) {
|
||||
if (StringUtils.isBlank(tsTaskList.getTasklistid())) {
|
||||
applyInfo.setId(UUID.randomUUID().toString());
|
||||
applyInfo.setLinkType("1");
|
||||
saveOrUpdate(applyInfo);
|
||||
String definedname = FlowUtil.EXPTLISTWORKFLOW; // 除名申请(修复、复议、撤销),这类参考使用企业经营异常名录流程模板,应该是可以的吧
|
||||
// 新待办
|
||||
tsTaskList = HandleWorkFlowUtil.createTaskList(tsTaskList, user);
|
||||
// 开始工作流
|
||||
tsTaskListService.startWorkFlow(tsTaskList, user, definedname);
|
||||
}
|
||||
return tsTaskList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TSTaskList saveApplyAuditProcess(AICUser user, TSTaskList tsTaskList, ExpelledApplyInfo applyInfo, TSOpinion opinion, String nextNodeId, String[] nextPerformerIds, String[] nextPerformerNames) {
|
||||
try {
|
||||
if (StringUtils.isNotBlank(tsTaskList.getAcceptgroupid())) {
|
||||
workFlowService.claimGroup(tsTaskList.getWorkflowid(), user.getPrimaryKey());
|
||||
}
|
||||
tsTaskListService.updateWorkFlow(user, opinion, tsTaskList, nextNodeId, nextPerformerIds, nextPerformerNames);
|
||||
if (FlowUtil.EXPTLISTWORKFLOW_HANDLEEXPTLIST.equals(nextNodeId)) { // 审批
|
||||
applyInfo.setLinkType("3"); // 审批流程中把状态设置成"审批中"
|
||||
}
|
||||
LocalDate now = LocalDate.now();
|
||||
ExpelledResultInfo resultInfo = expelledResultInfoService.getById(applyInfo.getResultId());
|
||||
if (FlowUtil.EXPTLISTWORKFLOW_ENDEXPTLIST.equals(nextNodeId)) { // 完结时
|
||||
applyInfo.setApproveDate(now); // 核准时间
|
||||
applyInfo.setLinkType("4"); // 1-受理中,2-审核中,3-审批中,4-通过,5-不通过
|
||||
saveOrUpdate(applyInfo);
|
||||
if (StringUtils.equals(BaseDataConstant.BUSINESS_TYPE_REMOVE_REPAIR, tsTaskList.getBustype())) {
|
||||
applyInfo.setState("91"); // 修复完成
|
||||
resultInfo.setState("91"); // 修复完成
|
||||
} else if (StringUtils.equals(BaseDataConstant.BUSINESS_TYPE_REMOVE_REVIEW, tsTaskList.getBustype())) {
|
||||
applyInfo.setState("92"); // 复议通过被动撤销完成
|
||||
resultInfo.setState("92"); // 复议通过被动撤销完成
|
||||
} else if (StringUtils.equals(BaseDataConstant.BUSINESS_TYPE_REMOVE_REVOKE, tsTaskList.getBustype())) {
|
||||
applyInfo.setState("93"); // 主动撤销完成
|
||||
resultInfo.setState("93"); // 主动撤销完成
|
||||
}
|
||||
}
|
||||
if (FlowUtil.EXPTLISTWORKFLOW_OVEREXPTLIST.equals(nextNodeId)) {
|
||||
applyInfo.setApproveDate(now); // 核准时间
|
||||
applyInfo.setLinkType("5"); // 1-受理中,2-审核中,3-审批中,4-通过,5-不通过
|
||||
saveOrUpdate(applyInfo);
|
||||
resultInfo.setState("10"); // 恢复有效
|
||||
}
|
||||
if (FlowUtil.EXPTLISTWORKFLOW_OVERFINISH.equals(nextNodeId)) {
|
||||
applyInfo.setApproveDate(now); // 核准时间
|
||||
applyInfo.setLinkType("5"); // 1-受理中,2-审核中,3-审批中,4-通过,5-不通过
|
||||
saveOrUpdate(applyInfo);
|
||||
resultInfo.setState("10"); // 恢复有效
|
||||
}
|
||||
expelledResultInfoService.saveOrUpdate(resultInfo);
|
||||
saveOrUpdate(applyInfo);
|
||||
} catch (Exception e) {
|
||||
log.error("除名申请(修复、复议、撤销)流程审核出错", e);
|
||||
throw new BusinessException("除名申请(修复、复议、撤销)流程审核出错");
|
||||
}
|
||||
return tsTaskList;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,303 +0,0 @@
|
|||
package com.chinaweal.aiccs.aiccs.expelled.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.chinaweal.aiccs.aiccs.auditing.entity.TSOpinion;
|
||||
import com.chinaweal.aiccs.aiccs.auditing.service.TSOpinionService;
|
||||
import com.chinaweal.aiccs.aiccs.business.entity.TSTaskList;
|
||||
import com.chinaweal.aiccs.aiccs.business.entity.TSTwfProcessNode;
|
||||
import com.chinaweal.aiccs.aiccs.business.rules.model.SequenceFlowModel;
|
||||
import com.chinaweal.aiccs.aiccs.business.service.TSTaskListService;
|
||||
import com.chinaweal.aiccs.aiccs.business.service.WorkFlowService;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.entity.ExpelledRepairInfo;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.entity.ExpelledResultInfo;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.mapper.ExpelledRepairInfoMapper;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.service.IExpelledRepairInfoService;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.service.IExpelledResultInfoService;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.vo.AuditInfoVo;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.vo.RepairApproveInfo;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.vo.RepairInfoVo;
|
||||
import com.chinaweal.aiccs.common.base.controller.BaseController;
|
||||
import com.chinaweal.aiccs.common.constant.BaseDataConstant;
|
||||
import com.chinaweal.aiccs.common.constant.Constant;
|
||||
import com.chinaweal.aiccs.common.util.FlowUtil;
|
||||
import com.chinaweal.aiccs.common.util.HandleWorkFlowUtil;
|
||||
import com.chinaweal.aiccs.common.util.WorkFlowUtil;
|
||||
import com.chinaweal.aiccs.utils.BeanUtil;
|
||||
import com.chinaweal.aicorg.model.AICUser;
|
||||
import com.chinaweal.youfool.framework.springboot.exception.custom.BusinessException;
|
||||
import com.chinaweal.youfool.framework.springboot.rest.RestResult;
|
||||
import com.chinaweal.youfool.framework.springboot.rest.ResultCode;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.time.LocalDate;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @Description: 市场主体除名修复业务表实现类
|
||||
* @Author: TiAmo-cc
|
||||
* @Email: 1049976610@qq.com
|
||||
* @Date: 2026/1/8 10:24
|
||||
*/
|
||||
@Service
|
||||
public class ExpelledRepairInfoServiceImpl extends ServiceImpl<ExpelledRepairInfoMapper, ExpelledRepairInfo> implements IExpelledRepairInfoService {
|
||||
|
||||
@Resource
|
||||
private TSTaskListService tsTaskListService;
|
||||
@Resource
|
||||
private WorkFlowService workFlowService;
|
||||
@Resource
|
||||
private TSOpinionService opinionService;
|
||||
@Resource
|
||||
private IExpelledResultInfoService expelledResultInfoService;
|
||||
|
||||
@Override
|
||||
public RestResult<?> startRepairBiz(AuditInfoVo query, HttpServletRequest request) {
|
||||
AICUser user = BaseController.getLoginUser(request);
|
||||
if (user == null) {
|
||||
throw new BusinessException("登录超时,请重新登录");
|
||||
}
|
||||
ExpelledResultInfo resultInfo = expelledResultInfoService.getById(query.getResultId());
|
||||
if (resultInfo == null) {
|
||||
throw new BusinessException("市场主体拟除名结果信息不存在,请联系管理员");
|
||||
}
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
String bizId = UUID.randomUUID().toString();
|
||||
// 添加待办启动流程
|
||||
TSTaskList tsTaskList = new TSTaskList();
|
||||
tsTaskList.setBizseqid(bizId);
|
||||
tsTaskList.setBustype(BaseDataConstant.BUSINESS_TYPE_REMOVE_REPAIR); // 除名修复
|
||||
tsTaskList.setBusname(query.getEntName());
|
||||
// 保存除名修复数据
|
||||
ExpelledRepairInfo repairInfo = new ExpelledRepairInfo();
|
||||
repairInfo.setAuditId(query.getAuditId());
|
||||
repairInfo.setResultId(query.getResultId());
|
||||
repairInfo.setBizId(bizId);
|
||||
repairInfo.setApplyDate(LocalDate.now());
|
||||
repairInfo.setRemoveReason(query.getAuditOpinion());
|
||||
repairInfo.setRemoveDate(query.getRemoveDate());
|
||||
repairInfo.setRemoveOrgNo(query.getRemoveOrgNo());
|
||||
repairInfo.setRemoveOrgName(query.getRemoveOrgName());
|
||||
repairInfo.setEntName(query.getEntName());
|
||||
repairInfo.setUscc(query.getUscc());
|
||||
repairInfo.setLerepName(query.getLerepName());
|
||||
repairInfo.setAddress(query.getAddress());
|
||||
// 保存业务待办信息
|
||||
tsTaskList = startRepairBizAccept(user, tsTaskList, repairInfo);
|
||||
List<SequenceFlowModel> nextSequenceFlows = workFlowService.findNextSequenceFlowList(tsTaskList.getWorkflowid());
|
||||
TSTwfProcessNode currentNode = workFlowService.findCurrentNode(tsTaskList.getWorkflowid());
|
||||
String opinionType = BaseDataConstant.getOpinionTypeByWorkFlowNode(currentNode.getCurrentnode());
|
||||
if (opinionType == null) {
|
||||
opinionType = "1";
|
||||
}
|
||||
// 更新除名结果表信息
|
||||
resultInfo.setState("11"); // 修复中
|
||||
expelledResultInfoService.saveOrUpdate(resultInfo);
|
||||
resultMap.put("repairInfo", repairInfo);
|
||||
resultMap.put("taskId", tsTaskList.getTasklistid());
|
||||
resultMap.put("bizId", bizId);
|
||||
resultMap.put("nextSequenceFlows", nextSequenceFlows);
|
||||
resultMap.put("currentNode", currentNode.getCurrentnode());
|
||||
resultMap.put("currentNodeName", WorkFlowUtil.getNodeName(currentNode.getCurrentnode()));
|
||||
resultMap.put("currentLinkTypeID", opinionType);
|
||||
return RestResult.ok(resultMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TSTaskList startRepairBizAccept(AICUser user, TSTaskList tsTaskList, ExpelledRepairInfo repairInfo) {
|
||||
if (StringUtils.isBlank(tsTaskList.getTasklistid())) {
|
||||
repairInfo.setId(UUID.randomUUID().toString());
|
||||
repairInfo.setLinkType("1");
|
||||
saveOrUpdate(repairInfo);
|
||||
String definedname = FlowUtil.EXPTLISTWORKFLOW; // 除名修复,这类参考使用企业经营异常名录流程模板,应该是可以的吧
|
||||
// 新待办
|
||||
tsTaskList = HandleWorkFlowUtil.createTaskList(tsTaskList, user);
|
||||
// 开始工作流
|
||||
tsTaskListService.startWorkFlow(tsTaskList, user, definedname);
|
||||
}
|
||||
return tsTaskList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RestResult<?> getRepairBiz(String bizId) {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
// 除名修复业务表
|
||||
ExpelledRepairInfo repairInfo = getExpelledRepairInfoByBizId(bizId);
|
||||
if (repairInfo == null) {
|
||||
throw new BusinessException("除名修复业务信息不存在,请联系管理员");
|
||||
}
|
||||
resultMap.put("repairInfo", repairInfo);
|
||||
// 除名业务待办
|
||||
TSTaskList tsTaskList = tsTaskListService.searchTaskListByBizId(bizId);
|
||||
if (tsTaskList == null) {
|
||||
throw new BusinessException("除名修复业务待办信息不存在,请联系管理员");
|
||||
}
|
||||
resultMap.put("tsTaskList", new TSTaskList().setTasklistid(tsTaskList.getTasklistid()).setWorkflowid(tsTaskList.getWorkflowid()));
|
||||
// 获取历史审批意见
|
||||
LambdaQueryWrapper<TSOpinion> opinionWrapper = new LambdaQueryWrapper<>();
|
||||
opinionWrapper.eq(TSOpinion::getBizseq, bizId)
|
||||
.ne(TSOpinion::getOpiniontype, "55")
|
||||
.orderByAsc(TSOpinion::getHandledate);
|
||||
List<TSOpinion> tsOpinions = opinionService.list(opinionWrapper);
|
||||
resultMap.put("historyOpinions", tsOpinions);
|
||||
return RestResult.ok(resultMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RestResult<?> nextRepairBiz(RepairInfoVo repairInfoQuery, HttpServletRequest request) {
|
||||
AICUser user = BaseController.getLoginUser(request);
|
||||
if (user == null) {
|
||||
throw new BusinessException("登录超时,请重新登录");
|
||||
}
|
||||
String bizId = repairInfoQuery.getBizId();
|
||||
String taskId = repairInfoQuery.getTaskId();
|
||||
String nextNodeId = repairInfoQuery.getNextNodeId();
|
||||
String nextPerformerIds = repairInfoQuery.getNextPerformerIds();
|
||||
String nextPerformerNames = repairInfoQuery.getNextPerformerNames();
|
||||
RepairApproveInfo repairApproveInfo = repairInfoQuery.getRepairApproveInfo();
|
||||
if (StringUtils.isBlank(bizId)) {
|
||||
throw new BusinessException("bizId参数缺失");
|
||||
}
|
||||
if (StringUtils.isBlank(taskId)) {
|
||||
throw new BusinessException("taskId参数缺失");
|
||||
}
|
||||
if (StringUtils.isBlank(nextNodeId)) {
|
||||
throw new BusinessException("nextNodeId参数缺失");
|
||||
}
|
||||
// if (!FlowUtil.EXPTLISTWORKFLOW_ENDEXPTLIST.equals(nextNodeId)) {
|
||||
// if (StringUtils.isBlank(nextPerformerIds)) {
|
||||
// throw new BusinessException("nextPerformerIds参数缺失");
|
||||
// }
|
||||
// if (StringUtils.isBlank(nextPerformerNames)) {
|
||||
// throw new BusinessException("nextPerformerNames参数缺失");
|
||||
// }
|
||||
// }
|
||||
if (repairApproveInfo == null) {
|
||||
throw new BusinessException("repairApproveInfo参数缺失");
|
||||
}
|
||||
// if (StringUtils.equals("handleExptlist", nextNodeId)
|
||||
// || StringUtils.equals("overFinish", nextNodeId)) {
|
||||
// if (repairInfo != null
|
||||
// && StringUtils.isNotBlank(repairInfo.getBizId())) {
|
||||
// // TODO
|
||||
// }
|
||||
// }
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
ExpelledRepairInfo repairInfo = getExpelledRepairInfoByBizId(bizId);
|
||||
if (repairInfo == null) {
|
||||
throw new BusinessException("除名修复业务信息不存在,请联系管理员");
|
||||
}
|
||||
// 更新除名修复业务表
|
||||
if (repairApproveInfo != null && StringUtils.isNotBlank(repairApproveInfo.getBizId())) {
|
||||
TSTaskList tsTaskList = tsTaskListService.selectByTasklistID(taskId);
|
||||
TSTwfProcessNode processNode = workFlowService.findCurrentNode(tsTaskList.getWorkflowid());
|
||||
|
||||
// 下一步为审核
|
||||
if (StringUtils.equals(FlowUtil.EXPTLISTWORKFLOW_HANDLEEXPTLIST, nextNodeId)) {
|
||||
if (StringUtils.equals(FlowUtil.EXPTLISTWORKFLOW_EXPTLISTENTER, processNode.getCurrentnode())) {
|
||||
BeanUtil.copyBean(repairApproveInfo, repairInfo);
|
||||
}
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(nextPerformerIds)) {
|
||||
processNode = workFlowService.findCurrentNode(tsTaskList.getWorkflowid());
|
||||
int order = WorkFlowUtil.checkNextOrder(processNode.getCurrentnode(), nextNodeId);
|
||||
// 通过order判断为回退还是前进 >0 前进
|
||||
if (order > 0) {
|
||||
LambdaQueryWrapper<TSOpinion> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(TSOpinion::getWorkflowid, tsTaskList.getWorkflowid())
|
||||
.eq(TSOpinion::getOpiniontype, "0") // 经办为0
|
||||
.orderByDesc(TSOpinion::getLauptime);
|
||||
List<TSOpinion> list = opinionService.list(wrapper);
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return RestResult.error(ResultCode.DATA_NONE, "审批意见不存在,请联系管理员");
|
||||
}
|
||||
nextPerformerIds = list.get(0).getHandlerid();
|
||||
nextPerformerNames = list.get(0).getHandler();
|
||||
}
|
||||
// 回退时获取经办人
|
||||
if (order < 0) {
|
||||
// 获取经办人
|
||||
LambdaQueryWrapper<TSOpinion> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(TSOpinion::getWorkflowid, tsTaskList.getWorkflowid())
|
||||
.eq(TSOpinion::getOpiniontype, '0')
|
||||
.orderByDesc(TSOpinion::getLauptime);
|
||||
List<TSOpinion> list = opinionService.list(wrapper);
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return RestResult.error(ResultCode.DATA_NONE, "审批意见不存在,请联系管理员");
|
||||
}
|
||||
nextPerformerIds = list.get(0).getHandlerid();
|
||||
nextPerformerNames = list.get(0).getHandler();
|
||||
}
|
||||
}
|
||||
|
||||
// 发送
|
||||
String[] ids = StringUtils.split(nextPerformerIds, Constant.COMMA);
|
||||
String[] names = StringUtils.split(nextPerformerNames, Constant.COMMA);
|
||||
try {
|
||||
tsTaskList = saveRepairAuditProcess(user, tsTaskList, repairInfo, repairInfoQuery.getOpinionQuery(), nextNodeId, ids, names);
|
||||
if (ids.length == 1 && StringUtils.equals(user.getPrimaryKey(), ids[0])) {
|
||||
resultMap.put("bizId", bizId);
|
||||
resultMap.put("taskId", taskId);
|
||||
resultMap.put("nextNodeId", nextNodeId);
|
||||
resultMap.put("workFlowId", tsTaskList.getWorkflowid());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("除名修复业务审批出错:", e);
|
||||
throw new BusinessException("除名修复业务审批出错");
|
||||
}
|
||||
}
|
||||
return RestResult.ok(resultMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TSTaskList saveRepairAuditProcess(AICUser user, TSTaskList tsTaskList, ExpelledRepairInfo repairInfo, TSOpinion opinion, String nextNodeId, String[] nextPerformerIds, String[] nextPerformerNames) {
|
||||
try {
|
||||
if (StringUtils.isNotBlank(tsTaskList.getAcceptgroupid())) {
|
||||
workFlowService.claimGroup(tsTaskList.getWorkflowid(), user.getPrimaryKey());
|
||||
}
|
||||
tsTaskListService.updateWorkFlow(user, opinion, tsTaskList, nextNodeId, nextPerformerIds, nextPerformerNames);
|
||||
if (FlowUtil.EXPTLISTWORKFLOW_HANDLEEXPTLIST.equals(nextNodeId)) { // 审批
|
||||
repairInfo.setLinkType("3"); // 审批流程中把状态设置成"审批中"
|
||||
saveOrUpdate(repairInfo);
|
||||
}
|
||||
LocalDate now = LocalDate.now();
|
||||
ExpelledResultInfo resultInfo = expelledResultInfoService.getById(repairInfo.getResultId());
|
||||
if (FlowUtil.EXPTLISTWORKFLOW_ENDEXPTLIST.equals(nextNodeId)) { // 完结时
|
||||
repairInfo.setApproveDate(now); // 核准时间
|
||||
repairInfo.setLinkType("4"); // 1-受理中,2-审核中,3-审批中,4-通过,5-不通过
|
||||
saveOrUpdate(repairInfo);
|
||||
resultInfo.setState("99"); // 修复完成
|
||||
}
|
||||
if (FlowUtil.EXPTLISTWORKFLOW_OVEREXPTLIST.equals(nextNodeId)) {
|
||||
repairInfo.setApproveDate(now); // 核准时间
|
||||
repairInfo.setLinkType("5"); // 1-受理中,2-审核中,3-审批中,4-通过,5-不通过
|
||||
saveOrUpdate(repairInfo);
|
||||
resultInfo.setState("10"); // 恢复有效
|
||||
}
|
||||
if (FlowUtil.EXPTLISTWORKFLOW_OVERFINISH.equals(nextNodeId)) {
|
||||
repairInfo.setApproveDate(now); // 核准时间
|
||||
repairInfo.setLinkType("5"); // 1-受理中,2-审核中,3-审批中,4-通过,5-不通过
|
||||
saveOrUpdate(repairInfo);
|
||||
resultInfo.setState("10"); // 恢复有效
|
||||
}
|
||||
expelledResultInfoService.saveOrUpdate(resultInfo);
|
||||
} catch (Exception e) {
|
||||
log.error("除名修复流程审核出错", e);
|
||||
throw new BusinessException("除名修复流程审核出错");
|
||||
}
|
||||
return tsTaskList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExpelledRepairInfo getExpelledRepairInfoByBizId(String bizId) {
|
||||
return getOne(new LambdaQueryWrapper<ExpelledRepairInfo>().eq(ExpelledRepairInfo::getBizId, bizId));
|
||||
}
|
||||
}
|
||||
|
|
@ -149,9 +149,9 @@ public class AuditInfoVo implements Serializable {
|
|||
private LocalDate sendTime;
|
||||
|
||||
/**
|
||||
* 状态:10-有效,11-修复中,99-已完成
|
||||
* 状态:10-有效,11-修复中,12-复议中,13-撤销中,91-修复完成,92-复议通过被动撤销完成,93-主动撤销完成
|
||||
*/
|
||||
@ApiModelProperty(value = "状态:10-有效,11-修复中,99-已完成")
|
||||
@ApiModelProperty(value = "状态:10-有效,11-修复中,12-复议中,13-撤销中,91-修复完成,92-复议通过被动撤销完成,93-主动撤销完成")
|
||||
private String state;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.chinaweal.aiccs.aiccs.expelled.vo;
|
||||
|
||||
import com.chinaweal.aiccs.aiccs.auditing.entity.TSOpinion;
|
||||
import com.chinaweal.aiccs.aiccs.expelled.entity.ExpelledApplyInfo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -13,11 +14,11 @@ import java.io.Serializable;
|
|||
* @Date: 2026/1/8 14:57
|
||||
*/
|
||||
@Data
|
||||
public class RepairInfoVo implements Serializable {
|
||||
public class RemoveApproveInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "除名修复业务主键ID")
|
||||
@ApiModelProperty(value = "除名申请业务主键ID")
|
||||
private String bizId;
|
||||
|
||||
@ApiModelProperty(value = "待办表主键ID")
|
||||
|
|
@ -32,8 +33,8 @@ public class RepairInfoVo implements Serializable {
|
|||
@ApiModelProperty(value = "下一环节操作人姓名")
|
||||
private String nextPerformerNames;
|
||||
|
||||
@ApiModelProperty(value = "除名修复业务信息")
|
||||
private RepairApproveInfo repairApproveInfo;
|
||||
@ApiModelProperty(value = "除名申请业务信息")
|
||||
private ExpelledApplyInfo applyInfoQuery;
|
||||
|
||||
@ApiModelProperty(value = "审批意见")
|
||||
private TSOpinion opinionQuery;
|
||||
|
|
@ -1,153 +0,0 @@
|
|||
package com.chinaweal.aiccs.aiccs.expelled.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.chinaweal.youfool.framework.springboot.json.LocalDateTimeStringSerializer;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Author: TiAmo-cc
|
||||
* @Email: 1049976610@qq.com
|
||||
* @Date: 2026/1/9 10:09
|
||||
*/
|
||||
@Data
|
||||
public class RepairApproveInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID(UUID)
|
||||
*/
|
||||
@ApiModelProperty(value = "主键ID")
|
||||
@TableId(value = "ID", type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 市场主体拟除名名单决定业务表主键ID(UUID)
|
||||
*/
|
||||
@ApiModelProperty(value = "市场主体拟除名名单决定业务表主键ID")
|
||||
private String auditId;
|
||||
|
||||
/**
|
||||
* 市场主体拟除名名单结果表主键ID(UUID)
|
||||
*/
|
||||
@ApiModelProperty(value = "市场主体拟除名名单结果表主键ID(UUID)")
|
||||
private String resultId;
|
||||
|
||||
/**
|
||||
* 待办表主键ID(UUID)
|
||||
*/
|
||||
@ApiModelProperty(value = "待办表主键ID")
|
||||
private String bizId;
|
||||
|
||||
/**
|
||||
* 受理状态:0-不受理,1-受理
|
||||
*/
|
||||
@ApiModelProperty(value = "受理状态:0-不受理,1-受理")
|
||||
private String acceptStatus;
|
||||
|
||||
/**
|
||||
* 当前环节:1-受理中,2-审核中,3-审批中,4-通过,5-不通过
|
||||
*/
|
||||
@ApiModelProperty(value = "当前环节:1-受理中,2-审核中,3-审批中,4-通过,5-不通过")
|
||||
private String linkType;
|
||||
|
||||
/**
|
||||
* 申请时间
|
||||
*/
|
||||
@ApiModelProperty(value = "申请时间")
|
||||
@JsonSerialize(using = LocalDateTimeStringSerializer.class)
|
||||
private LocalDate applyDate;
|
||||
|
||||
/**
|
||||
* 除名原因
|
||||
*/
|
||||
@ApiModelProperty(value = "除名原因")
|
||||
private String removeReason;
|
||||
|
||||
/**
|
||||
* 除名时间
|
||||
*/
|
||||
@ApiModelProperty(value = "除名时间")
|
||||
@JsonSerialize(using = LocalDateTimeStringSerializer.class)
|
||||
private LocalDate removeDate;
|
||||
|
||||
/**
|
||||
* 除名机关编码
|
||||
*/
|
||||
@ApiModelProperty(value = "除名机关编码")
|
||||
private String removeOrgNo;
|
||||
|
||||
/**
|
||||
* 除名机关名称
|
||||
*/
|
||||
@ApiModelProperty(value = "除名机关名称")
|
||||
private String removeOrgName;
|
||||
|
||||
/**
|
||||
* 企业名称
|
||||
*/
|
||||
@ApiModelProperty(value = "企业名称")
|
||||
private String entName;
|
||||
|
||||
/**
|
||||
* 统一社会信用代码
|
||||
*/
|
||||
@ApiModelProperty(value = "统一社会信用代码")
|
||||
private String uscc;
|
||||
|
||||
/**
|
||||
* 法定代表人(负责人、经营者)
|
||||
*/
|
||||
@ApiModelProperty(value = "法定代表人(负责人、经营者)")
|
||||
private String lerepName;
|
||||
|
||||
/**
|
||||
* 住所(经营场所)
|
||||
*/
|
||||
@ApiModelProperty(value = "住所(经营场所)")
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
@ApiModelProperty(value = "联系人")
|
||||
private String contactName;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@ApiModelProperty(value = "联系电话")
|
||||
private String contactPhone;
|
||||
|
||||
/**
|
||||
* 核实情况
|
||||
*/
|
||||
@ApiModelProperty(value = "核实情况")
|
||||
private String situation;
|
||||
|
||||
/**
|
||||
* 核准日期
|
||||
*/
|
||||
@ApiModelProperty(value = "核准日期")
|
||||
@JsonSerialize(using = LocalDateTimeStringSerializer.class)
|
||||
private LocalDate approveDate;
|
||||
|
||||
/**
|
||||
* 除名修复原因
|
||||
*/
|
||||
@ApiModelProperty(value = "除名修复原因")
|
||||
private String repairReason;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
}
|
||||
|
|
@ -94,6 +94,8 @@ public class BaseDataConstant {
|
|||
public static final String BUSINESS_TYPE_FORCE_DEREGISTER = "50";// 拟强制注销
|
||||
|
||||
public static final String BUSINESS_TYPE_REMOVE_REPAIR = "1001"; // 除名修复
|
||||
public static final String BUSINESS_TYPE_REMOVE_REVIEW = "1002"; // 除名复议
|
||||
public static final String BUSINESS_TYPE_REMOVE_REVOKE = "1003"; // 除名撤销
|
||||
|
||||
// 地址批量列异
|
||||
public static final String EXPTLIST_TYPE_ADDRESSBATCH_ENTEREXCP = "71";//企业地址批量列异
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ public class SafetyFilter implements Filter {
|
|||
String contextPath = request.getContextPath();
|
||||
String url = requestUri.substring(contextPath.length());
|
||||
String referer = request.getHeader("Referer");
|
||||
if (environment != null && StringUtils.equals(environment.getProperty("spring.profiles.active"), "prod73")) {
|
||||
if (environment != null && StringUtils.equals(environment.getProperty("spring.profiles.active"), "prod129")) {
|
||||
chain.doFilter(request, response);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +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.chinaweal.aiccs.aiccs.expelled.mapper.ExpelledRepairInfoMapper">
|
||||
<mapper namespace="com.chinaweal.aiccs.aiccs.expelled.mapper.ExpelledApplyInfoMapper">
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue