行政处罚修复插入意见表

This commit is contained in:
zhouxy 2026-02-09 16:21:15 +08:00
parent c2579c6b45
commit 4f758d50ae
1 changed files with 35 additions and 3 deletions

View File

@ -6,6 +6,7 @@ import com.chinaweal.aiccs.aiccs.abnormal.entity.TSWrit;
import com.chinaweal.aiccs.aiccs.abnormal.service.CreatePdfService; import com.chinaweal.aiccs.aiccs.abnormal.service.CreatePdfService;
import com.chinaweal.aiccs.aiccs.abnormal.service.EBaseinfoService; import com.chinaweal.aiccs.aiccs.abnormal.service.EBaseinfoService;
import com.chinaweal.aiccs.aiccs.abnormal.service.TSWritService; import com.chinaweal.aiccs.aiccs.abnormal.service.TSWritService;
import com.chinaweal.aiccs.aiccs.auditing.entity.TSOpinion;
import com.chinaweal.aiccs.aiccs.business.entity.TSTaskList; import com.chinaweal.aiccs.aiccs.business.entity.TSTaskList;
import com.chinaweal.aiccs.aiccs.business.service.TSTaskListService; import com.chinaweal.aiccs.aiccs.business.service.TSTaskListService;
import com.chinaweal.aiccs.aiccs.inspect.service.TSWorkNoService; import com.chinaweal.aiccs.aiccs.inspect.service.TSWorkNoService;
@ -133,10 +134,14 @@ public class TBizRemPunishmentServiceImpl extends BaseServiceImpl<TBizRemPunishm
String isAgreeRepair = tBizRemPunishment.getIsAgreeRepair(); String isAgreeRepair = tBizRemPunishment.getIsAgreeRepair();
String nextNodeID = tBizRemPunishment.getNextNodeId(); String nextNodeID = tBizRemPunishment.getNextNodeId();
//封装意见表
String opinionContent = tBizRemPunishment.getOpinion();
TSOpinion opinion = createOpinion(opinionContent, tsTaskList, loginUser);
//外网申请的且不受理的情况下,意见值给到回退建议 //外网申请的且不受理的情况下,意见值给到回退建议
if(StringUtils.equals(tsTaskList.getOrigin(),"1") if(StringUtils.equals(tsTaskList.getOrigin(),"1")
&& StringUtils.equals(isAccept,"0")){ && StringUtils.equals(isAccept,"0")){
tBizRemPunishment.setBackProposal(tBizRemPunishment.getOpinion()); tBizRemPunishment.setBackProposal(opinionContent);
} }
//不予受理的情况直接可以结束流程 //不予受理的情况直接可以结束流程
@ -144,31 +149,43 @@ public class TBizRemPunishmentServiceImpl extends BaseServiceImpl<TBizRemPunishm
tBizRemPunishment.setStatus("3"); tBizRemPunishment.setStatus("3");
nextNodeID = "disagreeRemPunish"; nextNodeID = "disagreeRemPunish";
tBizRemPunishment.setLinkType("3"); //设置下一环节 tBizRemPunishment.setLinkType("3"); //设置下一环节
opinion.setOpiniontype("0")
.setIsagree("2");
} else { //予以受理的情况下再看下一节点 } else { //予以受理的情况下再看下一节点
//根据当前下一步节点判断 //根据当前下一步节点判断
if("handleRemPunish".equals(nextNodeID)){ //下一步是审核 if("handleRemPunish".equals(nextNodeID)){ //下一步是审核
tBizRemPunishment.setLinkType("0"); //设置下一环节 tBizRemPunishment.setLinkType("0"); //设置下一环节
opinion.setOpiniontype("0")
.setIsagree("1");
} else if("approveRemPunish".equals(nextNodeID)){ //下一步是审批 } else if("approveRemPunish".equals(nextNodeID)){ //下一步是审批
tBizRemPunishment.setLinkType("2"); //设置下一环节 tBizRemPunishment.setLinkType("2"); //设置下一环节
opinion.setOpiniontype("1")
.setIsagree("1");
} else if("endRemPunish".equals(nextNodeID)){ //下一步是结束流程 } else if("endRemPunish".equals(nextNodeID)){ //下一步是结束流程
opinion.setOpiniontype("2");
//最后一步才设置业务状态为通过或者不通过 //最后一步才设置业务状态为通过或者不通过
if(StringUtils.equals(isAgreeRepair,"0")){ //不予修复 if(StringUtils.equals(isAgreeRepair,"0")){ //不予修复
//文书模板数据转为文书正式数据 //文书模板数据转为文书正式数据
this.handleTsWrit(tBizRemPunishment, tswrittemplate); this.handleTsWrit(tBizRemPunishment, tswrittemplate);
tBizRemPunishment.setStatus("3"); //设置业务状态为不通过 tBizRemPunishment.setStatus("3"); //设置业务状态为不通过
opinion.setIsagree("0");
} else { //准予修复 } else { //准予修复
//文书模板数据转为文书正式数据 //文书模板数据转为文书正式数据
this.handleTsWrit(tBizRemPunishment, tswrittemplate); this.handleTsWrit(tBizRemPunishment, tswrittemplate);
//行政处罚信用修复信息插入数据 //行政处罚信用修复信息插入数据
insertCaseCreInformation(tBizRemPunishment); insertCaseCreInformation(tBizRemPunishment);
tBizRemPunishment.setStatus("2"); //设置业务状态为通过 tBizRemPunishment.setStatus("2"); //设置业务状态为通过
opinion.setIsagree("1");
} }
tBizRemPunishment.setLinkType("3"); //设置下一环节为结束 tBizRemPunishment.setLinkType("3"); //设置下一环节为结束
} else if("returnRemPunish".equals(nextNodeID)){ //下一步是回退上一步 } else if("returnRemPunish".equals(nextNodeID)){ //下一步是回退上一步
opinion.setIsagree("2");
if(StringUtils.equals(linkType,"0")){ //审核回退到受理 if(StringUtils.equals(linkType,"0")){ //审核回退到受理
tBizRemPunishment.setLinkType("1"); //设置下一环节 tBizRemPunishment.setLinkType("1"); //设置下一环节
} else if(StringUtils.equals(linkType,"2")){ //审批回退到审批 opinion.setOpiniontype("1");
} else if(StringUtils.equals(linkType,"2")){ //审批回退到审核
tBizRemPunishment.setLinkType("0"); //设置下一环节 tBizRemPunishment.setLinkType("0"); //设置下一环节
opinion.setOpiniontype("2");
} else { //无法回退 } else { //无法回退
throw new RuntimeException("无法回退到上一步"); throw new RuntimeException("无法回退到上一步");
} }
@ -180,7 +197,7 @@ public class TBizRemPunishmentServiceImpl extends BaseServiceImpl<TBizRemPunishm
this.updateById(tBizRemPunishment); this.updateById(tBizRemPunishment);
// 流程推进 // 流程推进
taskListService.updateWorkFlow(loginUser, null, tsTaskList, taskListService.updateWorkFlow(loginUser, opinion, tsTaskList,
nextNodeID, new String[]{ loginUser.getPrimaryKey() }, new String[]{ loginUser.getName() }); nextNodeID, new String[]{ loginUser.getPrimaryKey() }, new String[]{ loginUser.getName() });
} }
@ -288,4 +305,19 @@ public class TBizRemPunishmentServiceImpl extends BaseServiceImpl<TBizRemPunishm
return tBizRemPunishment; return tBizRemPunishment;
} }
private TSOpinion createOpinion(String opinioncontent,TSTaskList taskListModel, AICUser aicUser) {
TSOpinion tsOpinion = new TSOpinion();
// 初始化意见对象的属性
tsOpinion.setOpinionid(IdUtil.simpleUUID());
tsOpinion.setBizseq(taskListModel.getBizseqid());
tsOpinion.setWorkflowid(taskListModel.getTasklistid());
tsOpinion.setHandlerid(aicUser.getPrimaryKey());
tsOpinion.setHandler(aicUser.getName());
tsOpinion.setOpinioncontent(opinioncontent);
tsOpinion.setHandledate(LocalDateTime.now());
tsOpinion.setAreaCode(aicUser.getRegionID().substring(0, 6));
tsOpinion.setLauptime(LocalDateTime.now());
return tsOpinion;
}
} }