diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/controller/EntBaseExpelledInfoController.java b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/controller/EntBaseExpelledInfoController.java index fa56877..dcb2f06 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/controller/EntBaseExpelledInfoController.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/controller/EntBaseExpelledInfoController.java @@ -5,9 +5,9 @@ import com.chinaweal.aiccs.aiccs.expelled.entity.EntBaseExpelledInfo; import com.chinaweal.aiccs.aiccs.expelled.entity.ExpelledApplyInfo; import com.chinaweal.aiccs.aiccs.expelled.entity.ExpelledBizInfo; import com.chinaweal.aiccs.aiccs.expelled.service.IEntBaseExpelledInfoService; +import com.chinaweal.aiccs.aiccs.expelled.service.IExpelledApplyInfoService; import com.chinaweal.aiccs.aiccs.expelled.service.IExpelledAuditInfoService; import com.chinaweal.aiccs.aiccs.expelled.service.IExpelledBizInfoService; -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.RemoveApproveInfo; @@ -19,7 +19,6 @@ import com.github.xiaoymin.knife4j.annotations.ApiSort; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; @@ -87,136 +86,153 @@ public class EntBaseExpelledInfoController extends BaseController { return RestResult.ok(); } - @ApiOperation(value = "5.分页查询除名告知通知书管理", position = 5) - @PostMapping("/notice/list") - public RestResult> listNotice(@RequestBody BaseQuery query) { - IPage data = expelledBizInfoService.listExpelledNoticeInfo(query); - return RestResult.ok(data); + @ApiOperation(value = "5.启动除名告知业务", position = 5) + @PostMapping("/notice/startBiz") + public RestResult startNoticeBiz(@RequestBody ExpelledBizInfo query, HttpServletRequest request) { + return expelledBizInfoService.startNoticeBiz(query, request); } - @ApiOperation(value = "6.新增、更新、删除除名告知通知书管理", position = 6) - @PostMapping("/notice/save") - public RestResult saveNotice(@RequestBody ExpelledBizInfo query) { - if (CollectionUtils.isEmpty(query.getExpelledIds())) { - return RestResult.error(ResultCode.PARAM_IS_BLANK, "请至少勾选一个拟除名市场主体"); - } - expelledBizInfoService.saveExpelledNoticeInfo(query); - return RestResult.ok(); + @ApiOperation(value = "6.获取除名告知业务详情", position = 6) + @GetMapping("/notice/getBiz") + public RestResult getNoticeBiz(String bizId) { + return expelledBizInfoService.getNoticeBiz(bizId); } - @ApiOperation(value = "7.分页查询可引用的市场主体拟除名告知业务信息", position = 7) + @ApiOperation(value = "7.除名告知业务审批流程", position = 7) + @PostMapping("/notice/nextBiz") + public RestResult nextNoticeBiz(@RequestBody RemoveApproveInfo removeApproveInfo, HttpServletRequest request) { + return expelledBizInfoService.nextNoticeBiz(removeApproveInfo, request); + } + + @ApiOperation(value = "8.分页查询可引用的市场主体拟除名告知业务信息", position = 8) @PostMapping("/notice/toDo") public RestResult> listTodoNoticeInfo(@RequestBody BaseQuery query) { IPage data = expelledBizInfoService.listTodoNoticeInfo(query); return RestResult.ok(data); } - @ApiOperation(value = "8.分页查询除名异议管理", position = 8) - @PostMapping("/objection/list") - public RestResult> listObjection(@RequestBody BaseQuery query) { - IPage data = expelledAuditInfoService.listHavedoAuditInfo(query); - return RestResult.ok(data); + @ApiOperation(value = "9.启动除名异议业务", position = 9) + @PostMapping("/objection/startBiz") + public RestResult startObjectionBiz(@RequestBody AuditInfoVo query, HttpServletRequest request) { + return expelledAuditInfoService.startObjectionBiz(query, request); } - @ApiOperation(value = "9.新增、更新、删除除名异议管理", position = 9) - @PostMapping("/objection/save") - public RestResult saveObjection(@RequestBody AuditInfoVo query) { - if (CollectionUtils.isEmpty(query.getBizInfos())) { - return RestResult.error(ResultCode.PARAM_IS_BLANK, "请至少勾选一个拟除名市场主体"); - } - expelledAuditInfoService.saveObjection(query); - return RestResult.ok(); + @ApiOperation(value = "10.获取除名异议业务详情", position = 10) + @GetMapping("/objection/getBiz") + public RestResult getObjectionBiz(String bizId) { + return expelledAuditInfoService.getObjectionBiz(bizId); } - @ApiOperation(value = "10.分页查询除名决定管理", position = 10) - @PostMapping("/audit/list") - public RestResult> listAudit(@RequestBody BaseQuery query) { - IPage data = expelledAuditInfoService.listHavedoAuditInfo(query); - return RestResult.ok(data); + @ApiOperation(value = "11.除名异议业务审批流程", position = 11) + @PostMapping("/objection/nextBiz") + public RestResult nextObjectionBiz(@RequestBody RemoveApproveInfo removeApproveInfo, HttpServletRequest request) { + return expelledAuditInfoService.nextObjectionBiz(removeApproveInfo, request); } - @ApiOperation(value = "11.新增、更新、删除除名决定管理", position = 11) - @PostMapping("/audit/save") - public RestResult saveAudit(@RequestBody AuditInfoVo query, HttpServletRequest request) { - if (CollectionUtils.isEmpty(query.getBizInfos())) { - return RestResult.error(ResultCode.PARAM_IS_BLANK, "请至少勾选一个拟除名市场主体"); - } - expelledAuditInfoService.saveAudit(query, request); - return RestResult.ok(); + @ApiOperation(value = "12.启动除名决定业务", position = 12) + @PostMapping("/audit/startBiz") + public RestResult startAuditBiz(@RequestBody AuditInfoVo query, HttpServletRequest request) { + return expelledAuditInfoService.startAuditBiz(query, request); } - @ApiOperation(value = "12.分页查询除名公告管理", position = 12) + @ApiOperation(value = "13.获取除名决定业务详情", position = 13) + @GetMapping("/audit/getBiz") + public RestResult getAuditBiz(String bizId) { + return expelledAuditInfoService.getAuditBiz(bizId); + } + + @ApiOperation(value = "14.除名决定业务审批流程", position = 14) + @PostMapping("/audit/nextBiz") + public RestResult nextAuditBiz(@RequestBody RemoveApproveInfo removeApproveInfo, HttpServletRequest request) { + return expelledAuditInfoService.nextAuditBiz(removeApproveInfo, request); + } + + @ApiOperation(value = "15.分页查询除名公告管理", position = 15) @PostMapping("/announcement/list") public RestResult> listAnnouncement(@RequestBody BaseQuery query) { IPage data = expelledAuditInfoService.listHavedoAuditInfo(query); return RestResult.ok(data); } - @ApiOperation(value = "13.启动除名修复业务", position = 13) + @ApiOperation(value = "16.启动除名修复业务", position = 16) @PostMapping("/repair/startBiz") public RestResult startRepairBiz(@RequestBody AuditInfoVo query, HttpServletRequest request) { return expelledApplyInfoService.startRepairBiz(query, request); } - @ApiOperation(value = "14.获取除名修复业务详情", position = 14) + @ApiOperation(value = "17.获取除名修复业务详情", position = 17) @GetMapping("/repair/getBiz") public RestResult getRepairBiz(String bizId) { return expelledApplyInfoService.getRepairBiz(bizId); } - @ApiOperation(value = "15.除名修复业务审批流程", position = 15) + @ApiOperation(value = "18.除名修复业务审批流程", position = 18) @PostMapping("/repair/nextBiz") public RestResult nextRepairBiz(@RequestBody RemoveApproveInfo removeApproveInfo, HttpServletRequest request) { return expelledApplyInfoService.nextRepairBiz(removeApproveInfo, request); } - @ApiOperation(value = "16.启动除名复议业务", position = 16) + @ApiOperation(value = "19.启动除名复议业务", position = 19) @PostMapping("/review/startBiz") public RestResult startReviewBiz(@RequestBody AuditInfoVo query, HttpServletRequest request) { return expelledApplyInfoService.startReviewBiz(query, request); } - @ApiOperation(value = "17.获取除名复议业务详情", position = 17) + @ApiOperation(value = "20.获取除名复议业务详情", position = 20) @GetMapping("/review/getBiz") public RestResult getReviewBiz(String bizId) { return expelledApplyInfoService.getReviewBiz(bizId); } - @ApiOperation(value = "18.除名复议业务审批流程", position = 18) + @ApiOperation(value = "21.除名复议业务审批流程", position = 21) @PostMapping("/review/nextBiz") public RestResult nextReviewBiz(@RequestBody RemoveApproveInfo removeApproveInfo, HttpServletRequest request) { return expelledApplyInfoService.nextReviewBiz(removeApproveInfo, request); } - @ApiOperation(value = "19.启动除名撤销业务", position = 19) + @ApiOperation(value = "22.启动除名撤销业务", position = 22) @PostMapping("/revoke/startBiz") public RestResult startRevokeBiz(@RequestBody AuditInfoVo query, HttpServletRequest request) { return expelledApplyInfoService.startRevokeBiz(query, request); } - @ApiOperation(value = "20.获取除名撤销业务详情", position = 20) + @ApiOperation(value = "23.获取除名撤销业务详情", position = 23) @GetMapping("/revoke/getBiz") public RestResult getRevokeBiz(String bizId) { return expelledApplyInfoService.getRevokeBiz(bizId); } - @ApiOperation(value = "21.除名撤销业务审批流程", position = 21) + @ApiOperation(value = "24.除名撤销业务审批流程", position = 24) @PostMapping("/revoke/nextBiz") public RestResult nextRevokeBiz(@RequestBody RemoveApproveInfo removeApproveInfo, HttpServletRequest request) { return expelledApplyInfoService.nextRevokeBiz(removeApproveInfo, request); } - @ApiOperation(value = "22.分页查询撤销除名公告管理", position = 22) + @ApiOperation(value = "25.分页查询撤销除名公告管理", position = 25) @PostMapping("/revoke/listAnnouncement") public RestResult> listRevokeAnnouncement(@RequestBody BaseQuery query) { IPage data = expelledApplyInfoService.listRevokeAnnouncement(query); return RestResult.ok(data); } - @ApiOperation(value = "23.下载文书", position = 23) + @ApiOperation(value = "26.下载除名告知书", position = 26) + @GetMapping("/downloadNoticeDoc") + @ResponseBody + public void downloadNoticeDoc(HttpServletResponse response, String noticeNo) { + expelledBizInfoService.downloadNoticeDoc(response, noticeNo); + } + + @ApiOperation(value = "27.下载除名决定书", position = 27) + @GetMapping("/downloadAuditDoc") + @ResponseBody + public void downloadAuditDoc(HttpServletResponse response, String resultId, String noticeNo) { + expelledAuditInfoService.downloadAuditDoc(response, resultId, noticeNo); + } + + @ApiOperation(value = "27.下载文书", position = 27) @GetMapping("/downloadDoc") @ResponseBody public void downloadDoc(HttpServletResponse response, String bizId, String attachType) { - expelledApplyInfoService.downloadDoc(response, bizId, attachType); + expelledApplyInfoService.downloadApproveDoc(response, bizId, attachType); } } diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/entity/EntBaseExpelledInfo.java b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/entity/EntBaseExpelledInfo.java index 1a24ba2..c7c77d6 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/entity/EntBaseExpelledInfo.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/entity/EntBaseExpelledInfo.java @@ -63,6 +63,13 @@ public class EntBaseExpelledInfo extends SuperEntity implements Serializable { @TableField(value = "ADDRESS") private String address; + /** + * 拟除名状态:0-拟除名中,1-已除名,2-有效 + */ + @ApiModelProperty(value = "拟除名状态:0-拟除名中,1-已除名,2-有效") + @TableField(value = "STATE") + private String state; + /** * 逻辑删除标识:0-未删除,1-已删除,2-已除名 */ diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/entity/ExpelledApplyInfo.java b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/entity/ExpelledApplyInfo.java index 78a06de..734a5d0 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/entity/ExpelledApplyInfo.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/entity/ExpelledApplyInfo.java @@ -182,9 +182,9 @@ public class ExpelledApplyInfo extends SuperEntity implements Serializable { private String remark; /** - * 状态:10-有效,11-修复中,12-复议中,13-撤销中,91-修复完成,92-复议通过被动撤销完成,93-主动撤销完成 + * 状态:10-有效,11-修复中,12-复议中,13-撤销中,61-修复不通过,62-复议不通过,63-撤销不通过,91-修复完成,92-复议通过被动撤销完成,93-主动撤销完成 */ - @ApiModelProperty(value = "状态:10-有效,11-修复中,12-复议中,13-撤销中,91-修复完成,92-复议通过被动撤销完成,93-主动撤销完成") + @ApiModelProperty(value = "状态:10-有效,11-修复中,12-复议中,13-撤销中,61-修复不通过,62-复议不通过,63-撤销不通过,91-修复完成,92-复议通过被动撤销完成,93-主动撤销完成") @TableField(value = "STATE") private String state; } diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/entity/ExpelledAuditInfo.java b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/entity/ExpelledAuditInfo.java index 0095f58..7646a05 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/entity/ExpelledAuditInfo.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/entity/ExpelledAuditInfo.java @@ -77,4 +77,18 @@ public class ExpelledAuditInfo extends SuperEntity implements Serializable { @ApiModelProperty(value = "逻辑删除标识:0-未删除,1-已删除") @TableField(value = "IS_DELETE") private String isDelete; + + /** + * 拟除名市场主体提出的陈述、申辩意见 + */ + @ApiModelProperty(value = "拟除名市场主体提出的陈述、申辩意见") + @TableField(exist = false) + private String opinion; + + /** + * 异议/决定意见 + */ + @ApiModelProperty(value = "异议/决定意见") + @TableField(exist = false) + private String auditOpinion; } diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/entity/ExpelledBizInfo.java b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/entity/ExpelledBizInfo.java index c1847cc..23382b5 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/entity/ExpelledBizInfo.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/entity/ExpelledBizInfo.java @@ -79,6 +79,20 @@ public class ExpelledBizInfo extends SuperEntity implements Serializable { @TableField(value = "REMOVE_TIME") private LocalDate removeTime; + /** + * 除名机关编码 + */ + @ApiModelProperty(value = "除名机关编码") + @TableField(value = "REMOVE_ORG_NO") + private String removeOrgNo; + + /** + * 除名机关名称 + */ + @ApiModelProperty(value = "除名机关名称") + @TableField(value = "REMOVE_ORG_NAME") + private String removeOrgName; + /** * 逻辑删除标识:0-未删除,1-已删除 */ @@ -92,4 +106,11 @@ public class ExpelledBizInfo extends SuperEntity implements Serializable { @ApiModelProperty(value = "拟除名市场主体ID") @TableField(exist = false) private List expelledIds; + + /** + * 业务名称 + */ + @ApiModelProperty(value = "业务名称") + @TableField(exist = false) + private String busName; } \ No newline at end of file diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/entity/ExpelledEntInfo.java b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/entity/ExpelledEntInfo.java index d5d6d48..6116b63 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/entity/ExpelledEntInfo.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/entity/ExpelledEntInfo.java @@ -72,9 +72,9 @@ public class ExpelledEntInfo extends SuperEntity implements Serializable { private LocalDate sendTime; /** - * 当前状态:0-可用,1-已异议,2-已决定 + * 当前状态:0-有效,1-异议中,2-决定中,3-已异议,4-已决定,5-异议不通过,6-决定不通过 */ - @ApiModelProperty(value = "当前状态:0-可用,1-已异议,2-已决定") + @ApiModelProperty(value = "当前状态:0-有效,1-异议中,2-决定中,3-已异议,4-已决定,5-异议不通过,6-决定不通过") @TableField(value = "STATUS") private String status; } diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/mapper/ExpelledAuditInfoMapper.java b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/mapper/ExpelledAuditInfoMapper.java index 35ac0bb..ea02f90 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/mapper/ExpelledAuditInfoMapper.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/mapper/ExpelledAuditInfoMapper.java @@ -7,6 +7,8 @@ import com.chinaweal.aiccs.aiccs.expelled.entity.ExpelledAuditInfo; import com.chinaweal.aiccs.aiccs.expelled.vo.AuditInfoVo; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** * @Description: 市场主体拟除名名单决定业务表dao层 * @Author: TiAmo-cc @@ -16,4 +18,6 @@ import org.apache.ibatis.annotations.Param; public interface ExpelledAuditInfoMapper extends BaseMapper { IPage listHavedoAuditInfo(Page page, @Param("map") AuditInfoVo query); + + List listAuditEntBaseInfo(@Param("map") AuditInfoVo query); } diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/mapper/ExpelledBizInfoMapper.java b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/mapper/ExpelledBizInfoMapper.java index c45dc18..8ce25e4 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/mapper/ExpelledBizInfoMapper.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/mapper/ExpelledBizInfoMapper.java @@ -7,6 +7,8 @@ import com.chinaweal.aiccs.aiccs.expelled.entity.ExpelledBizInfo; import com.chinaweal.aiccs.aiccs.expelled.vo.BizInfoVo; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** * @Description: 市场主体拟除名名单业务表dao类 * @Author: TiAmo-cc @@ -16,4 +18,6 @@ import org.apache.ibatis.annotations.Param; public interface ExpelledBizInfoMapper extends BaseMapper { IPage listTodoNoticeInfo(Page page, @Param("map") BizInfoVo query); + + List listNoticeEntBaseInfo(@Param("map") BizInfoVo query); } diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/IEntBaseExpelledInfoService.java b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/IEntBaseExpelledInfoService.java index 06c7cca..d930825 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/IEntBaseExpelledInfoService.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/IEntBaseExpelledInfoService.java @@ -41,4 +41,9 @@ public interface IEntBaseExpelledInfoService extends IService { /** * 生成审批表 */ - void createDoc(ExpelledApplyInfo applyInfo, TSTaskList tsTaskList); + void createApproveDoc(ExpelledApplyInfo applyInfo, TSTaskList tsTaskList); /** * 下载审批表 */ - void downloadDoc(HttpServletResponse response, String bizId, String attachType); + void downloadApproveDoc(HttpServletResponse response, String bizId, String attachType); } diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/IExpelledAuditInfoService.java b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/IExpelledAuditInfoService.java index 7fdedf0..8062f94 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/IExpelledAuditInfoService.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/IExpelledAuditInfoService.java @@ -2,11 +2,19 @@ package com.chinaweal.aiccs.aiccs.expelled.service; import com.baomidou.mybatisplus.core.metadata.IPage; 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.ExpelledAuditInfo; +import com.chinaweal.aiccs.aiccs.expelled.entity.ExpelledEntInfo; +import com.chinaweal.aiccs.aiccs.expelled.entity.ExpelledResultInfo; 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.base.query.BaseQuery; +import com.chinaweal.youfool.framework.springboot.rest.RestResult; import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; /** * @Description: 市场主体拟除名名单决定业务表接口类 @@ -22,14 +30,38 @@ public interface IExpelledAuditInfoService extends IService { IPage listHavedoAuditInfo(BaseQuery query); /** - * 保存市场主体拟除名名单异议业务信息 + * 启动除名异议业务 */ - void saveObjection(AuditInfoVo query); + RestResult startObjectionBiz(AuditInfoVo query, HttpServletRequest request); /** - * 保存市场主体拟除名名单决定业务信息 + * 查询除名异议业务 */ - void saveAudit(AuditInfoVo query, HttpServletRequest request); + RestResult getObjectionBiz(String bizId); + + /** + * 除名异议业务审批流程 + */ + RestResult nextObjectionBiz(RemoveApproveInfo removeApproveInfo, HttpServletRequest request); + + /** + * 启动除名决定业务 + */ + RestResult startAuditBiz(AuditInfoVo query, HttpServletRequest request); + + /** + * 查询除名决定业务 + */ + RestResult getAuditBiz(String bizId); + + /** + * 除名决定业务审批流程 + */ + RestResult nextAuditBiz(RemoveApproveInfo removeApproveInfo, HttpServletRequest request); + + TSTaskList startBizAccept(AICUser user, TSTaskList tsTaskList, ExpelledAuditInfo auditInfo); + + TSTaskList saveAuditProcess(AICUser user, TSTaskList tsTaskList, ExpelledAuditInfo auditInfo, TSOpinion opinion, String nextNodeId, String[] nextPerformerIds, String[] nextPerformerNames); /** * 根据业务号查询市场主体拟除名名单异议/决定业务信息 @@ -40,4 +72,19 @@ public interface IExpelledAuditInfoService extends IService { * 生成业务号 */ String generateAuditNo(); + + /** + * 生成审批表 + */ + void createApproveDoc(ExpelledAuditInfo auditInfo, TSTaskList tsTaskList); + + /** + * 生成除名决定书 + */ + void createAuditDoc(ExpelledResultInfo resultInfo, ExpelledEntInfo entInfo); + + /** + * 下载除名决定书 + */ + void downloadAuditDoc(HttpServletResponse response, String resultId, String noticeNo); } diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/IExpelledBizInfoService.java b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/IExpelledBizInfoService.java index 5f18750..2a92fd7 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/IExpelledBizInfoService.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/IExpelledBizInfoService.java @@ -2,9 +2,18 @@ package com.chinaweal.aiccs.aiccs.expelled.service; import com.baomidou.mybatisplus.core.metadata.IPage; 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.ExpelledBizInfo; +import com.chinaweal.aiccs.aiccs.expelled.entity.ExpelledEntInfo; import com.chinaweal.aiccs.aiccs.expelled.vo.BizInfoVo; +import com.chinaweal.aiccs.aiccs.expelled.vo.RemoveApproveInfo; +import com.chinaweal.aicorg.model.AICUser; import com.chinaweal.youfool.framework.springboot.base.query.BaseQuery; +import com.chinaweal.youfool.framework.springboot.rest.RestResult; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; /** * @Description: 市场主体拟除名名单业务表接口类 @@ -15,19 +24,23 @@ import com.chinaweal.youfool.framework.springboot.base.query.BaseQuery; public interface IExpelledBizInfoService extends IService { /** - * 分页查询市场主体拟除名告知业务信息 + * 启动除名告知业务 */ - IPage listExpelledNoticeInfo(BaseQuery query); + RestResult startNoticeBiz(ExpelledBizInfo query, HttpServletRequest request); /** - * 保存更新市场主体拟除名告知业务信息 + * 查询除名告知业务 */ - void saveExpelledNoticeInfo(ExpelledBizInfo query); + RestResult getNoticeBiz(String bizId); /** - * 分页查询可引用的市场主体拟除名告知业务信息 + * 除名告知业务审批流程 */ - IPage listTodoNoticeInfo(BaseQuery query); + RestResult nextNoticeBiz(RemoveApproveInfo removeApproveInfo, HttpServletRequest request); + + TSTaskList startNoticeBizAccept(AICUser user, TSTaskList tsTaskList, ExpelledBizInfo noticeInfo); + + TSTaskList saveNoticeAuditProcess(AICUser user, TSTaskList tsTaskList, ExpelledBizInfo noticeInfo, TSOpinion opinion, String nextNodeId, String[] nextPerformerIds, String[] nextPerformerNames); /** * 根据业务号查询市场主体拟除名名单业务信息 @@ -38,4 +51,24 @@ public interface IExpelledBizInfoService extends IService { * 生成业务号 */ String generateBizNo(); + + /** + * 分页查询可引用的市场主体拟除名告知业务信息 + */ + IPage listTodoNoticeInfo(BaseQuery query); + + /** + * 生成审批表 + */ + void createApproveDoc(ExpelledBizInfo noticeInfo, TSTaskList tsTaskList); + + /** + * 生成除名告知书 + */ + void createNoticeDoc(ExpelledEntInfo entInfo); + + /** + * 下载除名告知书 + */ + void downloadNoticeDoc(HttpServletResponse response, String noticeNo); } diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/IExpelledEntInfoService.java b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/IExpelledEntInfoService.java index edd1a6f..e4eff1a 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/IExpelledEntInfoService.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/IExpelledEntInfoService.java @@ -3,6 +3,8 @@ package com.chinaweal.aiccs.aiccs.expelled.service; import com.baomidou.mybatisplus.extension.service.IService; import com.chinaweal.aiccs.aiccs.expelled.entity.ExpelledEntInfo; +import java.util.List; + /** * @Description: 市场主体拟除名名单企业信息表接口类 * @Author: TiAmo-cc @@ -30,4 +32,9 @@ public interface IExpelledEntInfoService extends IService { * 生成告知书编号 */ String generateNoticeNo(); + + /** + * 查询告知业务的拟除名企业信息 + */ + List searchEntInfoByBizId(String bizId); } diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/IExpelledResultInfoService.java b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/IExpelledResultInfoService.java index ef7f0e6..7737757 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/IExpelledResultInfoService.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/IExpelledResultInfoService.java @@ -3,6 +3,8 @@ package com.chinaweal.aiccs.aiccs.expelled.service; import com.baomidou.mybatisplus.extension.service.IService; import com.chinaweal.aiccs.aiccs.expelled.entity.ExpelledResultInfo; +import java.util.List; + /** * @Description: 市场主体拟除名名单结果表接口类 * @Author: TiAmo-cc @@ -20,4 +22,9 @@ public interface IExpelledResultInfoService extends IService * 查询市场主体拟除名名单结果信息 */ ExpelledResultInfo getExpelledResultInfo(String auditId, String entId); + + /** + * 查询异议/决定业务的拟除名企业结果信息 + */ + List searchResultInfoByAudit(String auditId); } diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/impl/EntBaseExpelledInfoServiceImpl.java b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/impl/EntBaseExpelledInfoServiceImpl.java index 0d388d7..280e7a4 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/impl/EntBaseExpelledInfoServiceImpl.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/impl/EntBaseExpelledInfoServiceImpl.java @@ -6,8 +6,12 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.chinaweal.aiccs.aiccs.expelled.entity.EntBaseExpelledInfo; +import com.chinaweal.aiccs.aiccs.expelled.entity.ExpelledEntInfo; +import com.chinaweal.aiccs.aiccs.expelled.entity.ExpelledResultInfo; import com.chinaweal.aiccs.aiccs.expelled.mapper.EntBaseExpelledInfoMapper; import com.chinaweal.aiccs.aiccs.expelled.service.IEntBaseExpelledInfoService; +import com.chinaweal.aiccs.aiccs.expelled.service.IExpelledEntInfoService; +import com.chinaweal.aiccs.aiccs.expelled.service.IExpelledResultInfoService; import com.chinaweal.aiccs.aiccs.expelled.vo.EntBaseExpelledInfoExcelVo; import com.chinaweal.aiccs.aiccs.punishment.util.ExcelIePortUtils; import com.chinaweal.aiccs.aiccs.punishment.util.ExcelListener; @@ -21,6 +25,7 @@ import org.springframework.core.io.ClassPathResource; import org.springframework.stereotype.Service; import org.springframework.web.multipart.MultipartFile; +import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; import java.io.*; import java.nio.charset.StandardCharsets; @@ -41,6 +46,11 @@ public class EntBaseExpelledInfoServiceImpl extends ServiceImpl listEntBaseExpelledInfo(BaseQuery query) { EntBaseExpelledInfo entity = query.getEntity(EntBaseExpelledInfo.class); @@ -48,6 +58,7 @@ public class EntBaseExpelledInfoServiceImpl extends ServiceImpl wrapper = Wrappers.lambdaQuery() .like(StringUtils.isNotBlank(entity.getSearchEntName()), EntBaseExpelledInfo::getEntName, entity.getSearchEntName()) .eq(StringUtils.isNotBlank(entity.getSearchUscc()), EntBaseExpelledInfo::getUscc, entity.getSearchUscc()) + .eq(EntBaseExpelledInfo::getState, "2") .eq(EntBaseExpelledInfo::getIsDelete, "0"); return page(page, wrapper); } @@ -58,6 +69,7 @@ public class EntBaseExpelledInfoServiceImpl extends ServiceImpl startRepairBiz(AuditInfoVo query, HttpServletRequest request) { @@ -666,9 +669,10 @@ public class ExpelledApplyInfoServiceImpl extends ServiceImpl map = new HashMap<>(); map.put("orgName", applyInfo.getRemoveOrgName()); map.put("entName", applyInfo.getEntName()); @@ -748,38 +764,45 @@ public class ExpelledApplyInfoServiceImpl extends ServiceImpl listHavedoAuditInfo(BaseQuery query) { @@ -51,76 +84,444 @@ public class ExpelledAuditInfoServiceImpl extends ServiceImpl startObjectionBiz(AuditInfoVo query, HttpServletRequest request) { AICUser user = BaseController.getLoginUser(request); if (user == null) { throw new BusinessException("登录超时,请重新登录"); } - ExpelledAuditInfo objectionInfo = getById(query.getAuditId()); - if (objectionInfo == null) { - objectionInfo = new ExpelledAuditInfo(); - objectionInfo.setId(UUID.randomUUID().toString()); - objectionInfo.setBizType("2"); // 决定管理 - objectionInfo.setAuditNo(generateAuditNo()); - objectionInfo.setRemoveDate(LocalDate.now()); - objectionInfo.setRemoveOrgNo(user.getRegionID()); - objectionInfo.setRemoveOrgName(user.getOrgName()); - objectionInfo.setIsDelete("0"); + if (CollectionUtils.isEmpty(query.getBizInfos())) { + return RestResult.error(ResultCode.PARAM_IS_BLANK, "请至少勾选一个拟除名市场主体"); } - saveOrUpdate(objectionInfo); + Map resultMap = new HashMap<>(); + String bizId = UUID.randomUUID().toString(); + // 添加待办启动流程 + TSTaskList tsTaskList = new TSTaskList(); + tsTaskList.setBizseqid(bizId); + tsTaskList.setBustype(BaseDataConstant.BUSINESS_TYPE_REMOVE_OBJECTION); // 除名异议 + tsTaskList.setBusname(query.getBusName()); + // 保存除名异议数据 + ExpelledAuditInfo objectionInfo = new ExpelledAuditInfo(); + objectionInfo.setId(bizId); + objectionInfo.setBizType("1"); + objectionInfo.setAuditNo(generateAuditNo()); // 初始化市场主体除名异议信息 for (BizInfoVo bizInfo : query.getBizInfos()) { ExpelledResultInfo resultInfo = new ExpelledResultInfo(); resultInfo.setAuditId(objectionInfo.getId()); resultInfo.setEntId(bizInfo.getEntId()); - resultInfo.setIsRemove("1"); - resultInfo.setState("10"); - resultInfo.setAuditOpinion(query.getAuditOpinion()); expelledResultInfoService.saveExpelledResultInfo(resultInfo); - // 同步更新除名告知业务申请中的市场主体企业信息的已决定状态 + // 同步更新除名告知业务申请中的市场主体企业信息的异议中状态 ExpelledEntInfo entInfo = expelledEntInfoService.getById(bizInfo.getEntId()); if (entInfo == null) { continue; } - entInfo.setStatus("2"); // 已决定 + entInfo.setStatus("1"); // 异议中 expelledEntInfoService.saveOrUpdate(entInfo); - // 同步更新市场主体拟除名名单库中的市场主体除名状态 - EntBaseExpelledInfo expelledInfo = entBaseExpelledInfoService.getById(entInfo.getExpelledId()); - if (expelledInfo == null) { + } + // 保存业务待办信息 + tsTaskList = startBizAccept(user, tsTaskList, objectionInfo); + List nextSequenceFlows = workFlowService.findNextSequenceFlowList(tsTaskList.getWorkflowid()); + TSTwfProcessNode currentNode = workFlowService.findCurrentNode(tsTaskList.getWorkflowid()); + String opinionType = BaseDataConstant.getOpinionTypeByWorkFlowNode(currentNode.getCurrentnode()); + if (opinionType == null) { + opinionType = "1"; + } + resultMap.put("objectionInfo", objectionInfo); + 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 getObjectionBiz(String bizId) { + Map resultMap = new HashMap<>(); + // 除名异议业务表 + ExpelledAuditInfo objectionInfo = getById(bizId); + if (objectionInfo == null) { + throw new BusinessException("除名异议业务信息不存在,请联系管理员"); + } + List resultInfos = expelledResultInfoService.searchResultInfoByAudit(bizId); + if (CollectionUtils.isNotEmpty(resultInfos)) { + objectionInfo.setOpinion(resultInfos.get(0).getOpinion()); + objectionInfo.setAuditOpinion(resultInfos.get(0).getAuditOpinion()); + } + resultMap.put("objectionInfo", objectionInfo); + // 拟除名异议企业信息 + AuditInfoVo query = new AuditInfoVo(); + query.setAuditId(bizId); + query.setBizType("1"); + List entInfos = baseMapper.listAuditEntBaseInfo(query); + resultMap.put("entInfos", entInfos); + // 除名业务待办 + TSTaskList tsTaskList = tsTaskListService.searchTaskListByBizId(bizId); + if (tsTaskList == null) { + throw new BusinessException("除名异议业务待办信息不存在,请联系管理员"); + } + resultMap.put("tsTaskList", new TSTaskList().setTasklistid(tsTaskList.getTasklistid()).setWorkflowid(tsTaskList.getWorkflowid())); + // 获取历史审批意见 + LambdaQueryWrapper opinionWrapper = new LambdaQueryWrapper<>(); + opinionWrapper.eq(TSOpinion::getBizseq, bizId) + .ne(TSOpinion::getOpiniontype, "55") + .orderByAsc(TSOpinion::getHandledate); + List tsOpinions = opinionService.list(opinionWrapper); + resultMap.put("historyOpinions", tsOpinions); + return RestResult.ok(resultMap); + } + + @Override + public RestResult nextObjectionBiz(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(); + ExpelledAuditInfo objectionInfoQuery = removeApproveInfo.getObjectionInfo(); + 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 (objectionInfoQuery == null) { + throw new BusinessException("objectionInfoQuery参数缺失"); + } + Map resultMap = new HashMap<>(); + ExpelledAuditInfo objectionInfo = getById(bizId); + if (objectionInfo == null) { + throw new BusinessException("除名异议业务信息不存在,请联系管理员"); + } + // 更新除名异议业务表 + if (objectionInfoQuery != null && StringUtils.isNotBlank(objectionInfoQuery.getId())) { + 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(objectionInfoQuery, objectionInfo); + } + } + + if (StringUtils.isBlank(nextPerformerIds)) { + processNode = workFlowService.findCurrentNode(tsTaskList.getWorkflowid()); + int order = WorkFlowUtil.checkNextOrder(processNode.getCurrentnode(), nextNodeId); + // 通过order判断为回退还是前进 >0 前进 + if (order > 0) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(TSOpinion::getWorkflowid, tsTaskList.getWorkflowid()) + .eq(TSOpinion::getOpiniontype, "0") // 经办为0 + .orderByDesc(TSOpinion::getLauptime); + List list = opinionService.list(wrapper); + if (org.apache.commons.collections.CollectionUtils.isEmpty(list)) { + return RestResult.error(ResultCode.DATA_NONE, "除名异议审批意见不存在,请联系管理员"); + } + nextPerformerIds = list.get(0).getHandlerid(); + nextPerformerNames = list.get(0).getHandler(); + } + // 回退时获取经办人 + if (order < 0) { + // 获取经办人 + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(TSOpinion::getWorkflowid, tsTaskList.getWorkflowid()) + .eq(TSOpinion::getOpiniontype, '0') + .orderByDesc(TSOpinion::getLauptime); + List list = opinionService.list(wrapper); + if (org.apache.commons.collections.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 = saveAuditProcess(user, tsTaskList, objectionInfo, 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 startAuditBiz(AuditInfoVo query, HttpServletRequest request) { + AICUser user = BaseController.getLoginUser(request); + if (user == null) { + throw new BusinessException("登录超时,请重新登录"); + } + if (CollectionUtils.isEmpty(query.getBizInfos())) { + return RestResult.error(ResultCode.PARAM_IS_BLANK, "请至少勾选一个拟除名市场主体"); + } + Map resultMap = new HashMap<>(); + String bizId = UUID.randomUUID().toString(); + // 添加待办启动流程 + TSTaskList tsTaskList = new TSTaskList(); + tsTaskList.setBizseqid(bizId); + tsTaskList.setBustype(BaseDataConstant.BUSINESS_TYPE_REMOVE_AUDIT); // 除名决定 + tsTaskList.setBusname(query.getBusName()); + // 保存除名决定数据 + ExpelledAuditInfo auditInfo = new ExpelledAuditInfo(); + auditInfo.setId(bizId); + auditInfo.setBizType("2"); + auditInfo.setAuditNo(generateAuditNo()); + // 初始化市场主体除名决定信息 + for (BizInfoVo bizInfo : query.getBizInfos()) { + ExpelledResultInfo resultInfo = new ExpelledResultInfo(); + resultInfo.setAuditId(auditInfo.getId()); + resultInfo.setEntId(bizInfo.getEntId()); + expelledResultInfoService.saveExpelledResultInfo(resultInfo); + // 同步更新除名告知业务申请中的市场主体企业信息的决定中状态 + ExpelledEntInfo entInfo = expelledEntInfoService.getById(bizInfo.getEntId()); + if (entInfo == null) { continue; } - expelledInfo.setIsDelete("2"); // 已除名 - entBaseExpelledInfoService.saveOrUpdate(expelledInfo); + entInfo.setStatus("2"); // 决定中 + expelledEntInfoService.saveOrUpdate(entInfo); } + // 保存业务待办信息 + tsTaskList = startBizAccept(user, tsTaskList, auditInfo); + List nextSequenceFlows = workFlowService.findNextSequenceFlowList(tsTaskList.getWorkflowid()); + TSTwfProcessNode currentNode = workFlowService.findCurrentNode(tsTaskList.getWorkflowid()); + String opinionType = BaseDataConstant.getOpinionTypeByWorkFlowNode(currentNode.getCurrentnode()); + if (opinionType == null) { + opinionType = "1"; + } + resultMap.put("auditInfo", auditInfo); + 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 getAuditBiz(String bizId) { + Map resultMap = new HashMap<>(); + // 除名决定业务表 + ExpelledAuditInfo auditInfo = getById(bizId); + if (auditInfo == null) { + throw new BusinessException("除名决定业务信息不存在,请联系管理员"); + } + List resultInfos = expelledResultInfoService.searchResultInfoByAudit(bizId); + if (CollectionUtils.isNotEmpty(resultInfos)) { + auditInfo.setAuditOpinion(resultInfos.get(0).getAuditOpinion()); + } + resultMap.put("auditInfo", auditInfo); + // 拟除名决定企业信息 + AuditInfoVo query = new AuditInfoVo(); + query.setAuditId(bizId); + query.setBizType("2"); + List entInfos = baseMapper.listAuditEntBaseInfo(query); + resultMap.put("entInfos", entInfos); + // 除名业务待办 + TSTaskList tsTaskList = tsTaskListService.searchTaskListByBizId(bizId); + if (tsTaskList == null) { + throw new BusinessException("除名决定业务待办信息不存在,请联系管理员"); + } + resultMap.put("tsTaskList", new TSTaskList().setTasklistid(tsTaskList.getTasklistid()).setWorkflowid(tsTaskList.getWorkflowid())); + // 获取历史审批意见 + LambdaQueryWrapper opinionWrapper = new LambdaQueryWrapper<>(); + opinionWrapper.eq(TSOpinion::getBizseq, bizId) + .ne(TSOpinion::getOpiniontype, "55") + .orderByAsc(TSOpinion::getHandledate); + List tsOpinions = opinionService.list(opinionWrapper); + resultMap.put("historyOpinions", tsOpinions); + return RestResult.ok(resultMap); + } + + @Override + public RestResult nextAuditBiz(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(); + ExpelledAuditInfo auditInfoQuery = removeApproveInfo.getAuditInfo(); + 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 (auditInfoQuery == null) { + throw new BusinessException("auditInfoQuery参数缺失"); + } + Map resultMap = new HashMap<>(); + ExpelledAuditInfo auditInfo = getById(bizId); + if (auditInfo == null) { + throw new BusinessException("除名决定业务信息不存在,请联系管理员"); + } + // 更新除名决定业务表 + if (auditInfoQuery != null && StringUtils.isNotBlank(auditInfoQuery.getId())) { + 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(auditInfoQuery, auditInfo); + } + } + + if (StringUtils.isBlank(nextPerformerIds)) { + processNode = workFlowService.findCurrentNode(tsTaskList.getWorkflowid()); + int order = WorkFlowUtil.checkNextOrder(processNode.getCurrentnode(), nextNodeId); + // 通过order判断为回退还是前进 >0 前进 + if (order > 0) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(TSOpinion::getWorkflowid, tsTaskList.getWorkflowid()) + .eq(TSOpinion::getOpiniontype, "0") // 经办为0 + .orderByDesc(TSOpinion::getLauptime); + List list = opinionService.list(wrapper); + if (org.apache.commons.collections.CollectionUtils.isEmpty(list)) { + return RestResult.error(ResultCode.DATA_NONE, "除名决定审批意见不存在,请联系管理员"); + } + nextPerformerIds = list.get(0).getHandlerid(); + nextPerformerNames = list.get(0).getHandler(); + } + // 回退时获取经办人 + if (order < 0) { + // 获取经办人 + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(TSOpinion::getWorkflowid, tsTaskList.getWorkflowid()) + .eq(TSOpinion::getOpiniontype, '0') + .orderByDesc(TSOpinion::getLauptime); + List list = opinionService.list(wrapper); + if (org.apache.commons.collections.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 = saveAuditProcess(user, tsTaskList, auditInfo, 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 TSTaskList startBizAccept(AICUser user, TSTaskList tsTaskList, ExpelledAuditInfo auditInfo) { + if (StringUtils.isBlank(tsTaskList.getTasklistid())) { + auditInfo.setIsDelete("0"); + saveOrUpdate(auditInfo); + String definedname = FlowUtil.EXPTLISTWORKFLOW; // 除名异议/决定,这类参考使用企业经营异常名录流程模板,应该是可以的吧 + // 新待办 + tsTaskList = HandleWorkFlowUtil.createTaskList(tsTaskList, user); + // 开始工作流 + tsTaskListService.startWorkFlow(tsTaskList, user, definedname); + } + return tsTaskList; + } + + @Override + public TSTaskList saveAuditProcess(AICUser user, TSTaskList tsTaskList, ExpelledAuditInfo auditInfo, 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); + auditInfo.setRemoveDate(LocalDate.now()); + auditInfo.setRemoveOrgNo(user.getRegionID()); + auditInfo.setRemoveOrgName(user.getOrgName()); + saveOrUpdate(auditInfo); + List resultInfos = expelledResultInfoService.searchResultInfoByAudit(auditInfo.getId()); + if (!CollectionUtils.isEmpty(resultInfos)) { + for (ExpelledResultInfo resultInfo : resultInfos) { + resultInfo.setOpinion(auditInfo.getOpinion()); + resultInfo.setAuditOpinion(auditInfo.getAuditOpinion()); + // 同步更新拟除名名单企业信息表状态 + ExpelledEntInfo entInfo = expelledEntInfoService.getById(resultInfo.getEntId()); + if (entInfo == null) { + continue; + } + // 同步更新拟除名名单库状态 + EntBaseExpelledInfo expelledInfo = entBaseExpelledInfoService.getById(entInfo.getExpelledId()); + if (expelledInfo == null) { + continue; + } + if (FlowUtil.EXPTLISTWORKFLOW_ENDEXPTLIST.equals(nextNodeId)) { // 完结时 + resultInfo.setState("10"); + if (StringUtils.equals(BaseDataConstant.BUSINESS_TYPE_REMOVE_OBJECTION, tsTaskList.getBustype())) { + resultInfo.setIsObjection("1"); // 有异议 + entInfo.setStatus("3"); // 已异议 + expelledInfo.setState("2"); // 有效 + } else if (StringUtils.equals(BaseDataConstant.BUSINESS_TYPE_REMOVE_AUDIT, tsTaskList.getBustype())) { + resultInfo.setIsRemove("1"); // 同意除名 + entInfo.setStatus("4"); // 已决定 + expelledInfo.setState("1"); // 已除名 + } + } + if (FlowUtil.EXPTLISTWORKFLOW_OVEREXPTLIST.equals(nextNodeId) || FlowUtil.EXPTLISTWORKFLOW_OVERFINISH.equals(nextNodeId)) { + if (StringUtils.equals(BaseDataConstant.BUSINESS_TYPE_REMOVE_OBJECTION, tsTaskList.getBustype())) { + resultInfo.setIsObjection("0"); // 无异议 + resultInfo.setState("-1"); // 除名异议不通过 + entInfo.setStatus("5"); // 异议不通过 + } else if (StringUtils.equals(BaseDataConstant.BUSINESS_TYPE_REMOVE_AUDIT, tsTaskList.getBustype())) { + resultInfo.setIsRemove("0"); // 不同意除名 + resultInfo.setState("-2"); // 除名决定不通过 + entInfo.setStatus("6"); // 决定不通过 + } + expelledInfo.setState("2"); // 有效 + } + expelledEntInfoService.saveOrUpdate(entInfo); + entBaseExpelledInfoService.saveOrUpdate(expelledInfo); + expelledResultInfoService.saveOrUpdate(resultInfo); + } + } + // 生成文书 + if (StringUtils.equals(BaseDataConstant.BUSINESS_TYPE_REMOVE_AUDIT, tsTaskList.getBustype())) { + createApproveDoc(auditInfo, tsTaskList); + } + } catch (Exception e) { + log.error("除名申请(异议、决定)流程审核出错", e); + throw new BusinessException("除名申请(异议、决定)流程审核出错"); + } + return tsTaskList; } @Override @@ -137,4 +538,188 @@ public class ExpelledAuditInfoServiceImpl extends ServiceImpl map = new HashMap<>(); + map.put("orgName", auditInfo.getRemoveOrgName()); + // 拟除名企业信息 + AuditInfoVo query = new AuditInfoVo(); + query.setAuditId(auditInfo.getId()); + query.setBizType("2"); + List entInfos = baseMapper.listAuditEntBaseInfo(query); + String entNames = ""; + String auditOpinion = ""; + if (!CollectionUtils.isEmpty(entInfos)) { + auditOpinion = entInfos.get(0).getAuditOpinion(); + for (int i = 0; i < entInfos.size(); i++) { + if (i >= 3) { + continue; + } + entNames += entInfos.get(i).getEntName() + '、'; + } + entNames = entNames.substring(0, entNames.length() - 1) + "等" + entInfos.size() + "户企业/个体户"; + } + map.put("entNames", entNames); + map.put("auditOpinion", auditOpinion); + // 获取历史审批意见 + LambdaQueryWrapper opinionWrapper = new LambdaQueryWrapper<>(); + opinionWrapper.eq(TSOpinion::getBizseq, auditInfo.getId()) + .in(TSOpinion::getOpiniontype,"0", "1", "2") + .orderByAsc(TSOpinion::getHandledate); + List tsOpinions = opinionService.list(opinionWrapper); + for (TSOpinion item : tsOpinions) { + int index = Integer.parseInt(item.getOpiniontype()) + 1; + map.put("opinion" + index, item.getOpinioncontent()); + map.put("handler" + index, item.getHandler()); + map.put("year" + index, item.getHandledate().getYear()); + map.put("month" + index, item.getHandledate().getMonthValue()); + map.put("day" + index, item.getHandledate().getDayOfMonth()); + } + try { + // 文书模板路径 + String wordTemplatePath = "static" + File.separator + "template" + File.separator + "expelled" + File.separator + "auditDoc.docx"; + String resource = this.getClass().getClassLoader().getResource(wordTemplatePath).getPath(); + // URL解码 + resource = URLDecoder.decode(resource, "UTF-8"); + String realPath = CommonConfig.getUploadPath(); // 存储路径 + String docName = UUID.randomUUID().toString(); // 文件名 + TSAttachment tsAttachment = attachmentService.getByBizseqAndType(auditInfo.getId(), "1"); + if (tsAttachment == null) { + tsAttachment = new TSAttachment(); + tsAttachment.setAttachmentid(UUID.randomUUID().toString()); + tsAttachment.setUploaddate(LocalDate.now()); + } else { + realPath = CommonConfig.getUploadPathByDate(tsAttachment.getUploaddate()); + docName = tsAttachment.getFilename().substring(0, tsAttachment.getFilename().lastIndexOf(".")); + } + realPath += File.separator + auditInfo.getId(); + File dir = new File(realPath); + if (!dir.exists()) { + dir.mkdirs(); + } + // 生成 + XWPFTemplate.compile(resource).render(map).writeToFile(realPath + File.separator + docName + ".docx"); + // 保存记录 + String ext = ".docx"; + String fileName = docName + ext; + String tempPath = auditInfo.getId() + File.separator + fileName; + tsAttachment.setCreatetype("1"); // 文件为系统生成 + tsAttachment.setBizseq(auditInfo.getId()); + tsAttachment.setFileext(ext); + tsAttachment.setFilename(fileName); + tsAttachment.setTemppath(tempPath); + tsAttachment.setAttachtype("1"); // 审批表 + attachmentService.saveOrUpdate(tsAttachment); + } catch (Exception e) { + e.printStackTrace(); + } + } + + @Override + public void createAuditDoc(ExpelledResultInfo resultInfo, ExpelledEntInfo entInfo) { + Map map = new HashMap<>(); + ExpelledAuditInfo auditInfo = getById(resultInfo.getAuditId()); + if (auditInfo == null) { + throw new BusinessException("除名决定业务信息不存在,请联系管理员"); + } + map.put("orgName", auditInfo.getRemoveOrgName()); + map.put("noticeNo", entInfo.getNoticeNo()); + EntBaseExpelledInfo expelledInfo = entBaseExpelledInfoService.getById(entInfo.getExpelledId()); + if (expelledInfo == null) { + throw new BusinessException("拟除名企业信息不存在,请联系管理员"); + } + map.put("entName", expelledInfo.getEntName()); + map.put("uscc", expelledInfo.getUscc()); + map.put("lerepName", expelledInfo.getLerepName()); + map.put("year", auditInfo.getRemoveDate().getYear()); + map.put("month", auditInfo.getRemoveDate().getMonthValue()); + map.put("day", auditInfo.getRemoveDate().getDayOfMonth()); + try { + // 文书模板路径 + String wordTemplatePath = "static" + File.separator + "template" + File.separator + "expelled" + File.separator + "auditEntDoc.docx"; + String resource = this.getClass().getClassLoader().getResource(wordTemplatePath).getPath(); + // URL解码 + resource = URLDecoder.decode(resource, "UTF-8"); + String realPath = CommonConfig.getUploadPath(); // 存储路径 + String docName = UUID.randomUUID().toString(); // 文件名 + TSAttachment tsAttachment = attachmentService.getByBizseqAndType(resultInfo.getId(), "1"); + if (tsAttachment == null) { + tsAttachment = new TSAttachment(); + tsAttachment.setAttachmentid(UUID.randomUUID().toString()); + tsAttachment.setUploaddate(LocalDate.now()); + } else { + realPath = CommonConfig.getUploadPathByDate(tsAttachment.getUploaddate()); + docName = tsAttachment.getFilename().substring(0, tsAttachment.getFilename().lastIndexOf(".")); + } + realPath += File.separator + resultInfo.getId(); + File dir = new File(realPath); + if (!dir.exists()) { + dir.mkdirs(); + } + // 生成 + XWPFTemplate.compile(resource).render(map).writeToFile(realPath + File.separator + docName + ".docx"); + // 保存记录 + String ext = ".docx"; + String fileName = docName + ext; + String tempPath = resultInfo.getId() + File.separator + fileName; + tsAttachment.setCreatetype("1"); // 文件为系统生成 + tsAttachment.setBizseq(resultInfo.getId()); + tsAttachment.setFileext(ext); + tsAttachment.setFilename(fileName); + tsAttachment.setTemppath(tempPath); + tsAttachment.setAttachtype("3"); // 除名决定书 + attachmentService.saveOrUpdate(tsAttachment); + } catch (Exception e) { + e.printStackTrace(); + } + } + + @Override + public void downloadAuditDoc(HttpServletResponse response, String resultId, String noticeNo) { + ExpelledResultInfo resultInfo = expelledResultInfoService.getById(resultId); + if (resultInfo == null) { + return; + } + ExpelledEntInfo entInfo = expelledEntInfoService.getExpelledEntInfo(noticeNo); + if (entInfo == null) { + return; + } + TSAttachment tsAttachment = attachmentService.getByBizseqAndType(resultInfo.getId(), "3"); + if (tsAttachment == null) { + createAuditDoc(resultInfo, entInfo); + tsAttachment = attachmentService.getByBizseqAndType(resultInfo.getId(), "3"); + if (tsAttachment == null) { + return; + } + } + // 获取流 + InputStream is = null; + OutputStream os = null; + try { + // 获取文件 + String realPath = CommonConfig.getUploadPathByDate(tsAttachment.getUploaddate()) + File.separator + tsAttachment.getTemppath(); + is = new FileInputStream(realPath); + os = response.getOutputStream(); + String fileName = new String(tsAttachment.getFilename().getBytes(StandardCharsets.UTF_8), StandardCharsets.ISO_8859_1); + // 设置:当浏览器收到这份资源的时候,以下载的方式提醒用户,而不是直接显示 + response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\""); + byte[] buffer = new byte[4096]; + int len; + while ((len = is.read(buffer)) != -1) { + os.write(buffer, 0, len); + } + } catch (Exception e) { + e.printStackTrace(); + log.error("下载文书时发生异常:{}=", e); + return; + } finally { + try { + os.close(); + is.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } + } } diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/impl/ExpelledBizInfoServiceImpl.java b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/impl/ExpelledBizInfoServiceImpl.java index 1793356..afc9ecd 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/impl/ExpelledBizInfoServiceImpl.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/impl/ExpelledBizInfoServiceImpl.java @@ -2,9 +2,17 @@ package com.chinaweal.aiccs.aiccs.expelled.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.chinaweal.aiccs.aiccs.abnormal.entity.TSAttachment; +import com.chinaweal.aiccs.aiccs.abnormal.service.TSAttachmentService; +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.EntBaseExpelledInfo; import com.chinaweal.aiccs.aiccs.expelled.entity.ExpelledBizInfo; import com.chinaweal.aiccs.aiccs.expelled.entity.ExpelledEntInfo; @@ -13,13 +21,39 @@ import com.chinaweal.aiccs.aiccs.expelled.service.IEntBaseExpelledInfoService; import com.chinaweal.aiccs.aiccs.expelled.service.IExpelledBizInfoService; import com.chinaweal.aiccs.aiccs.expelled.service.IExpelledEntInfoService; import com.chinaweal.aiccs.aiccs.expelled.vo.BizInfoVo; +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.config.CommonConfig; import com.chinaweal.aiccs.utils.BeanUtil; import com.chinaweal.aiccs.utils.DocumentNoGenerator; +import com.chinaweal.aicorg.model.AICUser; import com.chinaweal.youfool.framework.springboot.base.query.BaseQuery; +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 com.deepoove.poi.XWPFTemplate; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.File; +import java.io.FileInputStream; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.URLDecoder; +import java.nio.charset.StandardCharsets; +import java.time.LocalDate; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import java.util.UUID; /** @@ -35,28 +69,35 @@ public class ExpelledBizInfoServiceImpl extends ServiceImpl listExpelledNoticeInfo(BaseQuery query) { - ExpelledBizInfo entity = query.getEntity(ExpelledBizInfo.class); - Page page = query.getPage(); - LambdaQueryWrapper wrapper = Wrappers.lambdaQuery() - .eq(StringUtils.isNotBlank(entity.getBizNo()), ExpelledBizInfo::getBizNo, entity.getBizNo()) - .eq(ExpelledBizInfo::getIsDelete, "0"); - return page(page, wrapper); - } - - @Override - public void saveExpelledNoticeInfo(ExpelledBizInfo query) { - ExpelledBizInfo bizInfo = getById(query.getId()); - if (bizInfo == null) { - bizInfo = new ExpelledBizInfo(); - bizInfo.setId(UUID.randomUUID().toString()); - bizInfo.setBizNo(generateBizNo()); - bizInfo.setIsDelete("0"); + public RestResult startNoticeBiz(ExpelledBizInfo query, HttpServletRequest request) { + AICUser user = BaseController.getLoginUser(request); + if (user == null) { + throw new BusinessException("登录超时,请重新登录"); } - BeanUtil.copyBean(query, bizInfo); - saveOrUpdate(bizInfo); + if (CollectionUtils.isEmpty(query.getExpelledIds())) { + return RestResult.error(ResultCode.PARAM_IS_BLANK, "请至少勾选一个拟除名市场主体"); + } + Map resultMap = new HashMap<>(); + String bizId = UUID.randomUUID().toString(); + // 添加待办启动流程 + TSTaskList tsTaskList = new TSTaskList(); + tsTaskList.setBizseqid(bizId); + tsTaskList.setBustype(BaseDataConstant.BUSINESS_TYPE_REMOVE_NOTICE); // 除名告知 + tsTaskList.setBusname(query.getBusName()); + // 保存除名告知数据 + ExpelledBizInfo noticeInfo = new ExpelledBizInfo(); + noticeInfo.setId(bizId); + noticeInfo.setBizNo(generateBizNo()); // 初始化市场主体除名结果信息 for (String expelledId : query.getExpelledIds()) { EntBaseExpelledInfo expelledInfo = entBaseExpelledInfoService.getById(expelledId); @@ -64,17 +105,203 @@ public class ExpelledBizInfoServiceImpl extends ServiceImpl nextSequenceFlows = workFlowService.findNextSequenceFlowList(tsTaskList.getWorkflowid()); + TSTwfProcessNode currentNode = workFlowService.findCurrentNode(tsTaskList.getWorkflowid()); + String opinionType = BaseDataConstant.getOpinionTypeByWorkFlowNode(currentNode.getCurrentnode()); + if (opinionType == null) { + opinionType = "1"; + } + resultMap.put("noticeInfo", noticeInfo); + 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 IPage listTodoNoticeInfo(BaseQuery query) { - BizInfoVo entity = query.getEntity(BizInfoVo.class); - Page page = query.getPage(); - return baseMapper.listTodoNoticeInfo(page, entity); + public RestResult getNoticeBiz(String bizId) { + Map resultMap = new HashMap<>(); + // 除名告知业务表 + ExpelledBizInfo noticeInfo = getById(bizId); + if (noticeInfo == null) { + throw new BusinessException("除名告知业务信息不存在,请联系管理员"); + } + resultMap.put("noticeInfo", noticeInfo); + // 拟除名企业信息 + BizInfoVo query = new BizInfoVo(); + query.setId(bizId); + List entInfos = baseMapper.listNoticeEntBaseInfo(query); + resultMap.put("entInfos", entInfos); + // 除名业务待办 + TSTaskList tsTaskList = tsTaskListService.searchTaskListByBizId(bizId); + if (tsTaskList == null) { + throw new BusinessException("除名告知业务待办信息不存在,请联系管理员"); + } + resultMap.put("tsTaskList", new TSTaskList().setTasklistid(tsTaskList.getTasklistid()).setWorkflowid(tsTaskList.getWorkflowid())); + // 获取历史审批意见 + LambdaQueryWrapper opinionWrapper = new LambdaQueryWrapper<>(); + opinionWrapper.eq(TSOpinion::getBizseq, bizId) + .ne(TSOpinion::getOpiniontype, "55") + .orderByAsc(TSOpinion::getHandledate); + List tsOpinions = opinionService.list(opinionWrapper); + resultMap.put("historyOpinions", tsOpinions); + return RestResult.ok(resultMap); + } + + @Override + public RestResult nextNoticeBiz(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(); + ExpelledBizInfo noticeInfoQuery = removeApproveInfo.getNoticeInfo(); + 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 (noticeInfoQuery == null) { + throw new BusinessException("noticeInfoQuery参数缺失"); + } + Map resultMap = new HashMap<>(); + ExpelledBizInfo noticeInfo = getById(bizId); + if (noticeInfo == null) { + throw new BusinessException("除名告知业务信息不存在,请联系管理员"); + } + // 更新除名告知业务表 + if (noticeInfoQuery != null && StringUtils.isNotBlank(noticeInfoQuery.getId())) { + 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(noticeInfoQuery, noticeInfo); + } + } + + if (StringUtils.isBlank(nextPerformerIds)) { + processNode = workFlowService.findCurrentNode(tsTaskList.getWorkflowid()); + int order = WorkFlowUtil.checkNextOrder(processNode.getCurrentnode(), nextNodeId); + // 通过order判断为回退还是前进 >0 前进 + if (order > 0) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(TSOpinion::getWorkflowid, tsTaskList.getWorkflowid()) + .eq(TSOpinion::getOpiniontype, "0") // 经办为0 + .orderByDesc(TSOpinion::getLauptime); + List 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 wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(TSOpinion::getWorkflowid, tsTaskList.getWorkflowid()) + .eq(TSOpinion::getOpiniontype, '0') + .orderByDesc(TSOpinion::getLauptime); + List list = opinionService.list(wrapper); + if (org.apache.commons.collections.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 = saveNoticeAuditProcess(user, tsTaskList, noticeInfo, 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 TSTaskList startNoticeBizAccept(AICUser user, TSTaskList tsTaskList, ExpelledBizInfo noticeInfo) { + if (StringUtils.isBlank(tsTaskList.getTasklistid())) { + noticeInfo.setIsDelete("0"); + saveOrUpdate(noticeInfo); + String definedname = FlowUtil.EXPTLISTWORKFLOW; // 除名告知,这类参考使用企业经营异常名录流程模板,应该是可以的吧 + // 新待办 + tsTaskList = HandleWorkFlowUtil.createTaskList(tsTaskList, user); + // 开始工作流 + tsTaskListService.startWorkFlow(tsTaskList, user, definedname); + } + return tsTaskList; + } + + @Override + public TSTaskList saveNoticeAuditProcess(AICUser user, TSTaskList tsTaskList, ExpelledBizInfo noticeInfo, 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); + noticeInfo.setRemoveTime(LocalDate.now()); // 核准时间 + noticeInfo.setRemoveOrgNo(user.getRegionID()); + noticeInfo.setRemoveOrgName(user.getOrgName()); + saveOrUpdate(noticeInfo); + List entInfos = expelledEntInfoService.searchEntInfoByBizId(noticeInfo.getId()); + if (!CollectionUtils.isEmpty(entInfos)) { + for (ExpelledEntInfo entInfo : entInfos) { + if (FlowUtil.EXPTLISTWORKFLOW_ENDEXPTLIST.equals(nextNodeId)) { // 完结时 + entInfo.setStatus("0"); + } + if (FlowUtil.EXPTLISTWORKFLOW_OVEREXPTLIST.equals(nextNodeId) || FlowUtil.EXPTLISTWORKFLOW_OVERFINISH.equals(nextNodeId)) { + entInfo.setStatus("-1"); // 除名告知不通过,即是不建议 + // 更新拟除名名单库状态为有效 + EntBaseExpelledInfo expelledInfo = entBaseExpelledInfoService.getById(entInfo.getExpelledId()); + if (expelledInfo != null) { + expelledInfo.setState("2"); // 有效 + entBaseExpelledInfoService.saveOrUpdate(expelledInfo); + } + } + expelledEntInfoService.saveOrUpdate(entInfo); + } + } + // 生成文书 + createApproveDoc(noticeInfo, tsTaskList); + } catch (Exception e) { + log.error("除名告知流程审核出错", e); + throw new BusinessException("除名告知流程审核出错"); + } + return tsTaskList; } @Override @@ -91,4 +318,186 @@ public class ExpelledBizInfoServiceImpl extends ServiceImpl listTodoNoticeInfo(BaseQuery query) { + BizInfoVo entity = query.getEntity(BizInfoVo.class); + Page page = query.getPage(); + return baseMapper.listTodoNoticeInfo(page, entity); + } + + @Override + public void createApproveDoc(ExpelledBizInfo noticeInfo, TSTaskList tsTaskList) { + Map map = new HashMap<>(); + map.put("orgName", noticeInfo.getRemoveOrgName()); + // 拟除名企业信息 + BizInfoVo query = new BizInfoVo(); + query.setId(noticeInfo.getId()); + List entInfos = baseMapper.listNoticeEntBaseInfo(query); + String entNames = ""; + if (!CollectionUtils.isEmpty(entInfos)) { + for (int i = 0; i < entInfos.size(); i++) { + if (i >= 3) { + continue; + } + entNames += entInfos.get(i).getEntName() + '、'; + } + entNames = entNames.substring(0, entNames.length() - 1) + "等" + entInfos.size() + "户企业/个体户"; + } + map.put("entNames", entNames); + map.put("removeReason", new StringBuilder(noticeInfo.getTruth()).append(System.lineSeparator()).append(noticeInfo.getReason()).append(System.lineSeparator()).append(noticeInfo.getLaw()).toString()); + // 获取历史审批意见 + LambdaQueryWrapper opinionWrapper = new LambdaQueryWrapper<>(); + opinionWrapper.eq(TSOpinion::getBizseq, noticeInfo.getId()) + .in(TSOpinion::getOpiniontype,"0", "1", "2") + .orderByAsc(TSOpinion::getHandledate); + List tsOpinions = opinionService.list(opinionWrapper); + for (TSOpinion item : tsOpinions) { + int index = Integer.parseInt(item.getOpiniontype()) + 1; + map.put("opinion" + index, item.getOpinioncontent()); + map.put("handler" + index, item.getHandler()); + map.put("year" + index, item.getHandledate().getYear()); + map.put("month" + index, item.getHandledate().getMonthValue()); + map.put("day" + index, item.getHandledate().getDayOfMonth()); + } + try { + // 文书模板路径 + String wordTemplatePath = "static" + File.separator + "template" + File.separator + "expelled" + File.separator + "noticeDoc.docx"; + String resource = this.getClass().getClassLoader().getResource(wordTemplatePath).getPath(); + // URL解码 + resource = URLDecoder.decode(resource, "UTF-8"); + String realPath = CommonConfig.getUploadPath(); // 存储路径 + String docName = UUID.randomUUID().toString(); // 文件名 + TSAttachment tsAttachment = attachmentService.getByBizseqAndType(noticeInfo.getId(), "1"); + if (tsAttachment == null) { + tsAttachment = new TSAttachment(); + tsAttachment.setAttachmentid(UUID.randomUUID().toString()); + tsAttachment.setUploaddate(LocalDate.now()); + } else { + realPath = CommonConfig.getUploadPathByDate(tsAttachment.getUploaddate()); + docName = tsAttachment.getFilename().substring(0, tsAttachment.getFilename().lastIndexOf(".")); + } + realPath += File.separator + noticeInfo.getId(); + File dir = new File(realPath); + if (!dir.exists()) { + dir.mkdirs(); + } + // 生成 + XWPFTemplate.compile(resource).render(map).writeToFile(realPath + File.separator + docName + ".docx"); + // 保存记录 + String ext = ".docx"; + String fileName = docName + ext; + String tempPath = noticeInfo.getId() + File.separator + fileName; + tsAttachment.setCreatetype("1"); // 文件为系统生成 + tsAttachment.setBizseq(noticeInfo.getId()); + tsAttachment.setFileext(ext); + tsAttachment.setFilename(fileName); + tsAttachment.setTemppath(tempPath); + tsAttachment.setAttachtype("1"); // 审批表 + attachmentService.saveOrUpdate(tsAttachment); + } catch (Exception e) { + e.printStackTrace(); + } + } + + @Override + public void createNoticeDoc(ExpelledEntInfo entInfo) { + Map map = new HashMap<>(); + ExpelledBizInfo noticeInfo = getById(entInfo.getBizId()); + if (noticeInfo == null) { + throw new BusinessException("除名告知业务信息不存在,请联系管理员"); + } + map.put("orgName", noticeInfo.getRemoveOrgName()); + map.put("noticeNo", entInfo.getNoticeNo()); + EntBaseExpelledInfo expelledInfo = entBaseExpelledInfoService.getById(entInfo.getExpelledId()); + if (expelledInfo == null) { + throw new BusinessException("拟除名企业信息不存在,请联系管理员"); + } + map.put("entName", expelledInfo.getEntName()); + map.put("year", noticeInfo.getRemoveTime().getYear()); + map.put("month", noticeInfo.getRemoveTime().getMonthValue()); + map.put("day", noticeInfo.getRemoveTime().getDayOfMonth()); + try { + // 文书模板路径 + String wordTemplatePath = "static" + File.separator + "template" + File.separator + "expelled" + File.separator + "noticeEntDoc.docx"; + String resource = this.getClass().getClassLoader().getResource(wordTemplatePath).getPath(); + // URL解码 + resource = URLDecoder.decode(resource, "UTF-8"); + String realPath = CommonConfig.getUploadPath(); // 存储路径 + String docName = UUID.randomUUID().toString(); // 文件名 + TSAttachment tsAttachment = attachmentService.getByBizseqAndType(entInfo.getId(), "1"); + if (tsAttachment == null) { + tsAttachment = new TSAttachment(); + tsAttachment.setAttachmentid(UUID.randomUUID().toString()); + tsAttachment.setUploaddate(LocalDate.now()); + } else { + realPath = CommonConfig.getUploadPathByDate(tsAttachment.getUploaddate()); + docName = tsAttachment.getFilename().substring(0, tsAttachment.getFilename().lastIndexOf(".")); + } + realPath += File.separator + entInfo.getId(); + File dir = new File(realPath); + if (!dir.exists()) { + dir.mkdirs(); + } + // 生成 + XWPFTemplate.compile(resource).render(map).writeToFile(realPath + File.separator + docName + ".docx"); + // 保存记录 + String ext = ".docx"; + String fileName = docName + ext; + String tempPath = entInfo.getId() + File.separator + fileName; + tsAttachment.setCreatetype("1"); // 文件为系统生成 + tsAttachment.setBizseq(entInfo.getId()); + tsAttachment.setFileext(ext); + tsAttachment.setFilename(fileName); + tsAttachment.setTemppath(tempPath); + tsAttachment.setAttachtype("2"); // 除名告知书 + attachmentService.saveOrUpdate(tsAttachment); + } catch (Exception e) { + e.printStackTrace(); + } + } + + @Override + public void downloadNoticeDoc(HttpServletResponse response, String noticeNo) { + ExpelledEntInfo entInfo = expelledEntInfoService.getExpelledEntInfo(noticeNo); + if (entInfo == null) { + return; + } + TSAttachment tsAttachment = attachmentService.getByBizseqAndType(entInfo.getId(), "2"); + if (tsAttachment == null) { + createNoticeDoc(entInfo); + tsAttachment = attachmentService.getByBizseqAndType(entInfo.getId(), "2"); + if (tsAttachment == null) { + return; + } + } + // 获取流 + InputStream is = null; + OutputStream os = null; + try { + // 获取文件 + String realPath = CommonConfig.getUploadPathByDate(tsAttachment.getUploaddate()) + File.separator + tsAttachment.getTemppath(); + is = new FileInputStream(realPath); + os = response.getOutputStream(); + String fileName = new String(tsAttachment.getFilename().getBytes(StandardCharsets.UTF_8), StandardCharsets.ISO_8859_1); + // 设置:当浏览器收到这份资源的时候,以下载的方式提醒用户,而不是直接显示 + response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\""); + byte[] buffer = new byte[4096]; + int len; + while ((len = is.read(buffer)) != -1) { + os.write(buffer, 0, len); + } + } catch (Exception e) { + e.printStackTrace(); + log.error("下载文书时发生异常:{}=", e); + return; + } finally { + try { + os.close(); + is.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } + } } diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/impl/ExpelledEntInfoServiceImpl.java b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/impl/ExpelledEntInfoServiceImpl.java index 108f855..4f00a06 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/impl/ExpelledEntInfoServiceImpl.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/impl/ExpelledEntInfoServiceImpl.java @@ -9,6 +9,7 @@ import com.chinaweal.aiccs.utils.BeanUtil; import com.chinaweal.aiccs.utils.DocumentNoGenerator; import org.springframework.stereotype.Service; +import java.util.List; import java.util.UUID; /** @@ -28,7 +29,6 @@ public class ExpelledEntInfoServiceImpl extends ServiceImpl searchEntInfoByBizId(String bizId) { + return list(new LambdaQueryWrapper().eq(ExpelledEntInfo::getBizId, bizId)); + } } diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/impl/ExpelledResultInfoServiceImpl.java b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/impl/ExpelledResultInfoServiceImpl.java index 798633d..2c7e0d7 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/impl/ExpelledResultInfoServiceImpl.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/service/impl/ExpelledResultInfoServiceImpl.java @@ -8,6 +8,7 @@ import com.chinaweal.aiccs.aiccs.expelled.service.IExpelledResultInfoService; import com.chinaweal.aiccs.utils.BeanUtil; import org.springframework.stereotype.Service; +import java.util.List; import java.util.UUID; /** @@ -34,4 +35,9 @@ public class ExpelledResultInfoServiceImpl extends ServiceImpl().eq(ExpelledResultInfo::getAuditId, auditId).eq(ExpelledResultInfo::getEntId, entId)); } + + @Override + public List searchResultInfoByAudit(String auditId) { + return list(new LambdaQueryWrapper().eq(ExpelledResultInfo::getAuditId, auditId)); + } } diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/vo/AuditInfoVo.java b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/vo/AuditInfoVo.java index 4bd3de5..3a19123 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/vo/AuditInfoVo.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/vo/AuditInfoVo.java @@ -1,5 +1,6 @@ package com.chinaweal.aiccs.aiccs.expelled.vo; +import com.baomidou.mybatisplus.annotation.TableField; import com.chinaweal.youfool.framework.springboot.json.LocalDateTimeStringSerializer; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import io.swagger.annotations.ApiModelProperty; @@ -159,4 +160,11 @@ public class AuditInfoVo implements Serializable { */ @ApiModelProperty(value = "拟除名异议告知业务信息") private List bizInfos; + + /** + * 业务名称 + */ + @ApiModelProperty(value = "业务名称") + @TableField(exist = false) + private String busName; } diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/vo/RemoveApproveInfo.java b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/vo/RemoveApproveInfo.java index 40c7bda..5c736f0 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/expelled/vo/RemoveApproveInfo.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/expelled/vo/RemoveApproveInfo.java @@ -2,6 +2,8 @@ package com.chinaweal.aiccs.aiccs.expelled.vo; import com.chinaweal.aiccs.aiccs.auditing.entity.TSOpinion; import com.chinaweal.aiccs.aiccs.expelled.entity.ExpelledApplyInfo; +import com.chinaweal.aiccs.aiccs.expelled.entity.ExpelledAuditInfo; +import com.chinaweal.aiccs.aiccs.expelled.entity.ExpelledBizInfo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -33,7 +35,16 @@ public class RemoveApproveInfo implements Serializable { @ApiModelProperty(value = "下一环节操作人姓名") private String nextPerformerNames; - @ApiModelProperty(value = "除名申请业务信息") + @ApiModelProperty(value = "除名告知业务信息") + private ExpelledBizInfo noticeInfo; + + @ApiModelProperty(value = "除名异议业务信息") + private ExpelledAuditInfo objectionInfo; + + @ApiModelProperty(value = "除名决定业务信息") + private ExpelledAuditInfo auditInfo; + + @ApiModelProperty(value = "除名申请(修复、复议、撤销)业务信息") private ExpelledApplyInfo applyInfoQuery; @ApiModelProperty(value = "审批意见") diff --git a/src/main/java/com/chinaweal/aiccs/common/constant/BaseDataConstant.java b/src/main/java/com/chinaweal/aiccs/common/constant/BaseDataConstant.java index 42ab05a..a184152 100644 --- a/src/main/java/com/chinaweal/aiccs/common/constant/BaseDataConstant.java +++ b/src/main/java/com/chinaweal/aiccs/common/constant/BaseDataConstant.java @@ -93,9 +93,12 @@ public class BaseDataConstant { public static final String BUSTNESS_TYPE_REM_ABN_OBJECTION = "20"; // 移出异常名录异议 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 BUSINESS_TYPE_REMOVE_NOTICE = "1001"; // 除名告知 + public static final String BUSINESS_TYPE_REMOVE_OBJECTION = "1002"; // 除名异议 + public static final String BUSINESS_TYPE_REMOVE_AUDIT = "1003"; // 除名决定 + public static final String BUSINESS_TYPE_REMOVE_REPAIR = "1004"; // 除名修复 + public static final String BUSINESS_TYPE_REMOVE_REVIEW = "1005"; // 除名复议 + public static final String BUSINESS_TYPE_REMOVE_REVOKE = "1006"; // 除名撤销 // 地址批量列异 public static final String EXPTLIST_TYPE_ADDRESSBATCH_ENTEREXCP = "71";//企业地址批量列异 diff --git a/src/main/resources/mybatis/mapper/aiccs/expelled/ExpelledAuditInfoMapper.xml b/src/main/resources/mybatis/mapper/aiccs/expelled/ExpelledAuditInfoMapper.xml index ae731ea..65ac3ae 100644 --- a/src/main/resources/mybatis/mapper/aiccs/expelled/ExpelledAuditInfoMapper.xml +++ b/src/main/resources/mybatis/mapper/aiccs/expelled/ExpelledAuditInfoMapper.xml @@ -47,4 +47,40 @@ + + diff --git a/src/main/resources/mybatis/mapper/aiccs/expelled/ExpelledBizInfoMapper.xml b/src/main/resources/mybatis/mapper/aiccs/expelled/ExpelledBizInfoMapper.xml index ba5111c..640f7c8 100644 --- a/src/main/resources/mybatis/mapper/aiccs/expelled/ExpelledBizInfoMapper.xml +++ b/src/main/resources/mybatis/mapper/aiccs/expelled/ExpelledBizInfoMapper.xml @@ -36,4 +36,28 @@ + + diff --git a/src/main/resources/static/template/expelled/auditDoc.docx b/src/main/resources/static/template/expelled/auditDoc.docx new file mode 100644 index 0000000..1a83b89 --- /dev/null +++ b/src/main/resources/static/template/expelled/auditDoc.docx @@ -0,0 +1,27 @@ + {{orgName}}除名决定审批表 + + 当事人 +{{entNames}} + 当事人陈述、申辩或者听证中提出的主要意见 +{{auditOpinion}} + 经办人意见 +{{opinion1}} + + + + 签名: {{handler1}} + {{year1}}年 {{month1}}月 {{day1}}日 + 经办机构 + 负责人意见 +{{opinion2}} + + + 签名: {{handler2}} + {{year2}}年 {{month2}}月 {{day2}}日 + 分管负责人意见 +{{opinion3}} + + + 签名:{{handler3}} + {{year3}}年 {{month3}}月 {{day3}}日 + diff --git a/src/main/resources/static/template/expelled/auditEntDoc.docx b/src/main/resources/static/template/expelled/auditEntDoc.docx new file mode 100644 index 0000000..c23905c --- /dev/null +++ b/src/main/resources/static/template/expelled/auditEntDoc.docx @@ -0,0 +1,25 @@ + {{orgName}}除名决定书 + {{noticeNo}} + 当事人:{{entName}} + 统一社会信用代码:{{uscc}} + 法定代表人(负责人):{{lerepName}} + + 当事人被列入经营异常名录(被标记为经营异常状态)已满两年,且近两年未申报纳税。该情况符合《通辽市市场主体除名试点工作暂行办法》关于除名情形的规定。上述事实,主要有以下证据证明: + 1.经营异常名录决定书 + 2.近两年未纳税证明 + 根据以上查明事实,本局于{{year}}年{{month}}月{{day}}日通过X方式告知拟除名决定,同时告知当事人有陈述、申辩和要求举行听证的权利。当事人在法定期间未提出陈述、申辩、听证意见或提出的理由未能成立。 + 根据《通辽市市场主体除名试点工作暂行办法》的规定,本局决定对当事人作出除名决定。除名后市场主体应当依法完成清算、办理注销登记,且不得从事与清算和注销无关的活动。 + 自除名决定作出之日起三年内,当事人经税务部门确认已缴纳罚款并补办纳税申报,同时已纠正被列入经营异常名录或被标记为经营异常状态违法行为的,可向我局申请除名修复。 + 当事人如不服本决定,可以在收到本决定书之日起六十日内向{{orgName}}申请行政复议;也可以在六个月内依法向{{orgName}}提起行政诉讼。 + + + + + + + + + + + {{orgName}} + {{year}}年 {{month}}月 {{day}}日 diff --git a/src/main/resources/static/template/expelled/noticeDoc.docx b/src/main/resources/static/template/expelled/noticeDoc.docx new file mode 100644 index 0000000..dc23e48 --- /dev/null +++ b/src/main/resources/static/template/expelled/noticeDoc.docx @@ -0,0 +1,29 @@ + {{orgName}}除名建议审批表 + + 当事人 +{{entNames}} + 拟作出除名决定 + 的事由、依据 +{{removeReason}} + 经办机构 + 负责人意见 +{{opinion1}} + + + + 签名: {{handler1}} + {{year1}}年 {{month1}}月 {{day1}}日 + 法制机构 + 审核意见 +{{opinion2}} + + + 签名: {{handler2}} + {{year2}}年 {{month2}}月 {{day2}}日 + 分管负责人意见 +{{opinion3}} + + + 签名:{{handler3}} + {{year3}}年 {{month3}}月 {{day3}}日 + diff --git a/src/main/resources/static/template/expelled/noticeEntDoc.docx b/src/main/resources/static/template/expelled/noticeEntDoc.docx new file mode 100644 index 0000000..b86f628 --- /dev/null +++ b/src/main/resources/static/template/expelled/noticeEntDoc.docx @@ -0,0 +1,19 @@ + {{orgName}}除名告知书 + {{noticeNo}} + +{{entName}}: + 你单位被列入经营异常名录(被标记为经营异常状态)已满两年,且近两年未申报纳税。根据《通辽市市场主体除名试点工作暂行办法》的规定,本局拟作出除名决定。除名后市场主体应当依法完成清算、办理注销登记,且不得从事与清算和注销无关的活动。 + 对以上决定,你单位自收到本告知书之日起5个工作日内,未行使陈述、申辩权,未要求举行听证的,视为放弃此权利。 + 联系人:{{contactName}} 联系电话:{{contactPhone}} + + + + + + + + + + + {{orgName}} + {{year}}年 {{month}}月 {{day}}日