@@ -23,13 +23,7 @@ public enum ProjectProcessType { | |||
/** | |||
* 项目流程配置 阶段枚举 | |||
*/ | |||
ORG_INTERNAL_APPROVAL_PROCESS(1, "单位内部审批流程"), | |||
PROJECT_PREQUALIFICATION_APPROVAL_PROCESS(2, "项目预审审批流程"), | |||
DEPARTMENT_JOINT_APPROVAL_PROCESS(3, "部门联合审批流程"), | |||
CONSTRUCTION_PROJECT_APPROVAL_PROCESS(4, "建设方案审批流程"), | |||
ACCEPTANCE_DECLARATION_APPROVAL_PROCESS(5, "验收申报审批流程"), | |||
APPLY_DELAY(6, "申请延期审批流程"), | |||
APPLY_BORROW(7, "申请借阅审批流程"), | |||
PROJECT_RECORD_APPROVAL_PROCESS(8, "立项备案审批流程"), | |||
XC_APPROVAL_PROCESS(9, "信创审批流程"), | |||
SELF_TEST(10, "系统自测审批流程"), | |||
@@ -42,14 +42,6 @@ public class ProjectFileController { | |||
return projectFileManage.file(projectId); | |||
} | |||
@PostMapping("/want-read/{projectId}") | |||
@ApiOperation(value = "申请借阅", notes = "申请借阅") | |||
@WebLog("档案管理-项目档案-申请借阅") | |||
public String wantRead(@PathVariable Long projectId){ | |||
String instanceId = projectFileManage.startApplyBorrowProcess(projectId); | |||
return "启动申请借阅流程实例 【" + instanceId + "】 成功"; | |||
} | |||
@GetMapping("/wantRead-detail/{instanceId}") | |||
@ApiOperation(value = "借阅详情", notes = "借阅详情") | |||
public ProjectApplyBorrowVO wantReadDetail(@PathVariable String instanceId){ | |||
@@ -166,27 +166,6 @@ public class ProjectFileManage { | |||
vo.setCanApplyBorrow(Boolean.FALSE); | |||
return vo; | |||
} | |||
ProjectInst projectInst = projectInstService.getOne(Wrappers.lambdaQuery(ProjectInst.class) | |||
.eq(ProjectInst::getInstCode, instCode)); | |||
// 推送省局联审的项目流程实例为EMPTY | |||
if (Objects.nonNull(projectInst)) { | |||
Integer instType = projectInst.getInstType(); | |||
// 从申请借阅信息表中查询当前项目是否有当前登录用户发起的申请借阅审批流程 | |||
ProjectApplyBorrow applyBorrow = projectApplyBorrowService.getOne(Wrappers | |||
.lambdaQuery(ProjectApplyBorrow.class) | |||
.eq(ProjectApplyBorrow::getApplyBorrowUserId, user.getUserIdStr()) | |||
.eq(ProjectApplyBorrow::getProjectId, p.getId()) | |||
.eq(ProjectApplyBorrow::getInstanceId, instCode)); | |||
// 延期申请流程还未审核结束 | |||
if (Objects.nonNull(applyBorrow) && InstTypeEnum.APPLY_BORROW.eq(instType) | |||
&& Objects.isNull(newInstance.getEndActivityId())) { | |||
vo.setCanApplyBorrow(Boolean.FALSE); | |||
} else if (InstTypeEnum.APPLY_BORROW.eq(instType) && | |||
HisProInsEndActId.REJECT.equals(newInstance.getEndActivityId())) { | |||
// 如果是延期申请审核被驳回,设置项目可以申请延期申报 | |||
vo.setCanApplyBorrow(Boolean.TRUE); | |||
} | |||
} | |||
} | |||
return vo; | |||
}).collect(Collectors.toList()); | |||
@@ -242,41 +221,6 @@ public class ProjectFileManage { | |||
return projectFileVo; | |||
} | |||
@Transactional(rollbackFor = Exception.class) | |||
public synchronized String startApplyBorrowProcess(Long projectId) { | |||
Project project = projectService.getNewestNoNull(projectId); | |||
// 首先要判断 项目当前状态 是不是 已归档 | |||
if (!ProjectStatus.ACCEPTED.eq(project.getStatus())) { | |||
throw BizException.wrap("提交失败 该项目不是 已归档"); | |||
} | |||
UserInfoDetails user = LoginUserUtil.loginUserDetail(); | |||
WflowModels model = processModelManage.getWflowModelsNoNull(ProjectProcessType.APPLY_BORROW, | |||
user.getMhUnitId()); | |||
ProcessStartParamsVo params = new ProcessStartParamsVo(); | |||
params.setUser(declaredProjectHelper.buildUser(user)); | |||
params.setProcessUsers(Collections.emptyMap()); | |||
// 放入条件判断的项目字段 | |||
// 把条件值给放入工作流 | |||
declaredProjectHelper.buildCondition(params, project); | |||
// 获取发起单位、发起单位主管单位、发起单位上级条线主管单位信息 | |||
Map<String, OrgInfoDTO> orgModelMap = declaredProjectHelper.buildOrgModelMapUserOrgCode(project); | |||
String instanceId = | |||
processInstanceService.newStartProcess(model.getProcessDefId(), model.getFormId(), params, orgModelMap); | |||
log.info("申请借阅申报成功 【{}】", instanceId); | |||
// 保存项目借阅实例相关 | |||
projectLibManage.saveProjectByApplyBorrow(project, user, instanceId); | |||
// 发送给第一个审批人消息 | |||
noticeManage.sendFirstUser(project, model.getFormName(), instanceId, WorkNoticeConst.PASS_MSG_TEMPLATE, | |||
MsgTypeEnum.PROJECT_REVIEW); | |||
return instanceId; | |||
} | |||
public void downloadFile(Long projectId, HttpServletResponse response) { | |||
Project project = projectService.getById(projectId); | |||
// 获取项目各阶段上传文件ID | |||
@@ -58,11 +58,4 @@ public class DelayedApplyController { | |||
ExcelDownUtil.downXls(response,req,delayedApplyManage::exportList); | |||
} | |||
@ApiOperation(value = "延期申报", notes = "延期申报") | |||
@WebLog("延期申报") | |||
@PostMapping("/apply") | |||
public String delayedApply(@Validated @RequestBody DelayedApplyDTO dto) { | |||
String instanceId = delayedApplyManage.startDelayedApplyProcess(dto); | |||
return "启动延期申请流程实例 【" + instanceId + "】 成功"; | |||
} | |||
} |
@@ -133,31 +133,6 @@ public class DelayedApplyManage { | |||
item.setBuildCycle(StringUtils.isNotBlank(w.getBuildCycle()) ? | |||
Integer.valueOf(w.getBuildCycle()) : null); | |||
item.setPlanAcceptanceTime(w.getPlanAcceptanceTime()); | |||
// 判断当前项目是否已经开启了延期申请并且没有审批完成 | |||
ProjectDelayApply delayApply = projectDelayApplyService.getOne(Wrappers.lambdaQuery(ProjectDelayApply.class) | |||
.eq(ProjectDelayApply::getProjectId, w.getId()) | |||
.orderByDesc(ProjectDelayApply::getCreateOn) | |||
.last("limit 1")); | |||
if (Objects.nonNull(delayApply)) { | |||
String instCode = delayApply.getInstanceId(); | |||
// 获取流程实例 | |||
HistoricProcessInstance newInstance = historyService.createHistoricProcessInstanceQuery() | |||
.processInstanceId(instCode) | |||
.singleResult(); | |||
ProjectInst projectInst = projectInstService.getOne(Wrappers.lambdaQuery(ProjectInst.class) | |||
.eq(ProjectInst::getInstCode, instCode)); | |||
Integer instType = projectInst.getInstType(); | |||
// 延期申请流程还未审核结束 | |||
if (InstTypeEnum.APPLY_DELAY.eq(instType) && | |||
Objects.isNull(newInstance.getEndActivityId())) { | |||
item.setCanDelayApply(Boolean.FALSE); | |||
} | |||
// 如果是延期申请审核被驳回,设置项目可以申请延期申报 | |||
else if (InstTypeEnum.APPLY_DELAY.eq(instType) && | |||
HisProInsEndActId.REJECT.equals(newInstance.getEndActivityId())) { | |||
item.setCanDelayApply(Boolean.TRUE); | |||
} | |||
} | |||
return item; | |||
}); | |||
return PageVo.of(records, total); | |||
@@ -211,51 +186,6 @@ public class DelayedApplyManage { | |||
} | |||
/** | |||
* 开启延期申请审批流程 | |||
* | |||
* @param dto \ | |||
* @return \ | |||
*/ | |||
@Transactional(rollbackFor = Exception.class) | |||
public synchronized String startDelayedApplyProcess(DelayedApplyDTO dto) { | |||
UserInfoDetails user = LoginUserUtil.loginUserDetail(); | |||
Long projectId = dto.getProjectId(); | |||
Project project = projectService.getNewestNoNull(projectId); | |||
//首先要判断 项目当前状态 是不是 以终验 | |||
VUtils.isTrue(!ProjectStatus.ON_PILOT_RUNNING.eq(project.getStatus()) || | |||
!ProjectStatus.PROJECT_APPROVED.eq(project.getStage())) | |||
.throwMessage("提交失败 该项目不是 已立项|待终验"); | |||
VUtils.isTrue(Objects.isNull(project.getPlanAcceptanceTime()) | |||
|| project.getPlanAcceptanceTime().isAfter(LocalDateTime.now())) | |||
.throwMessage("当前项目还未过期验收"); | |||
WflowModels model = processModelManage.getWflowModelsNoNull(ProjectProcessType.APPLY_DELAY, | |||
user.getMhUnitId()); | |||
ProcessStartParamsVo params = new ProcessStartParamsVo(); | |||
params.setUser(declaredProjectHelper.buildUser(user)); | |||
params.setProcessUsers(Collections.emptyMap()); | |||
//放入条件判断的项目字段 | |||
//把条件值给放入工作流 | |||
declaredProjectHelper.buildCondition(params, project); | |||
// 获取发起单位、发起单位主管单位、发起单位上级条线主管单位信息 | |||
Map<String, OrgInfoDTO> orgModelMap = declaredProjectHelper.buildOrgModelMapUserOrgCode(project); | |||
String instanceId = processInstanceService.newStartProcess(model.getProcessDefId(), model.getFormId(), params, orgModelMap); | |||
log.info("延期申请申报成功 【{}】", instanceId); | |||
// 保存项目延期实例相关 | |||
projectLibManage.saveProjectByApplyDelay(dto, project, instanceId); | |||
//发送给第一个审批人消息 | |||
noticeManage.sendFirstUser(project, model.getFormName(), instanceId, | |||
WorkNoticeConst.PASS_MSG_TEMPLATE, MsgTypeEnum.PROJECT_REVIEW); | |||
return instanceId; | |||
} | |||
/** | |||
* 查询延期 详情 | |||
* | |||
* @param projectId | |||
@@ -1298,7 +1298,6 @@ public class ProjectLibManage { | |||
ProjectInst projectInst = new ProjectInst(); | |||
projectInst.setProjectId(project.getId()); | |||
projectInst.setInstCode(instanceId); | |||
projectInst.setInstType(InstTypeEnum.APPLY_DELAY); | |||
projectInstService.save(projectInst); | |||
} | |||
@@ -1326,7 +1325,6 @@ public class ProjectLibManage { | |||
ProjectInst projectInst = new ProjectInst(); | |||
projectInst.setProjectId(project.getId()); | |||
projectInst.setInstCode(instanceId); | |||
projectInst.setInstType(InstTypeEnum.APPLY_BORROW); | |||
projectInstService.save(projectInst); | |||
} | |||
@@ -23,17 +23,11 @@ public enum InstTypeEnum { | |||
/** | |||
* 流程实例类型 | |||
*/ | |||
UNIT_INNER_AUDIT(1, "单位内部审批流程"), | |||
PRELIMINARY_PREVIEW(2, "项目预审审批流程"), | |||
DEPT_UNITED_REVIEW(3, "部门联合审批流程"), | |||
CONSTRUCTION_PLAN_REVIEW(4, "建设方案审批流程"), | |||
PROJECT_FINAL_INSPECTION(5, "验收申报审批流程"), | |||
APPLY_DELAY(6, "申请延期审批流程"), | |||
DECLARED_RECORD(8, "立项备案审批流程"), | |||
XCFHX_APPLY(9, "信创审查审批流程"), | |||
APPLY_BORROW(7, "申请借阅审批流程"), | |||
SELF_TEST(10, "系统自测审批流程"), | |||
ADAPTION(11, "开工文件审批流程"), | |||
TEST_VALID(12, "监理核实验证审批流程"), | |||
@@ -6,14 +6,11 @@ import com.google.common.collect.Sets; | |||
import com.hz.pm.api.projectlib.model.entity.Project; | |||
import com.hz.pm.api.projectlib.model.entity.ProjectInst; | |||
import com.hz.pm.api.projectlib.model.enumeration.InstTypeEnum; | |||
import com.hz.pm.api.projectlib.model.enumeration.status.ProjectStatus; | |||
import com.hz.pm.api.projectlib.service.IProjectInstService; | |||
import com.hz.pm.api.projectlib.service.IProjectService; | |||
import com.hz.pm.api.staging.enums.MsgTypeEnum; | |||
import com.hz.pm.api.staging.service.IProjectStagingService; | |||
import com.hz.pm.api.sys.manage.NoticeManage; | |||
import com.hz.pm.api.todocenter.manage.HandlerManage; | |||
import com.ningdatech.basic.exception.BizException; | |||
import com.wflow.contants.HisProInsEndActId; | |||
import com.wflow.workflow.bean.process.ProgressNode; | |||
import com.wflow.workflow.bean.process.enums.NodeTypeEnum; | |||
@@ -148,32 +145,6 @@ public class ProcessEndListener { | |||
// 若当前登录用户是最后一个审批人,需更新流程状态为审核完成,项目状态到下个状态 | |||
// 并向流程发起人发送浙政钉工作通知:【项目名称】已通过【流程名称】,请及时开始下一步操作。 | |||
if (HisProInsEndActId.END.equals(newInstance.getEndActivityId())) { | |||
// 如果是申请延期和申请借阅审批流程,不走状态机 | |||
if (InstTypeEnum.APPLY_DELAY.eq(instType) || InstTypeEnum.APPLY_BORROW.eq(instType)) { | |||
switch (instTypeEnum) { | |||
case APPLY_DELAY: | |||
// 保存延期申请记录,更新项目建设周期和计划验收时间 | |||
handlerManage.updateProjectDelayApplyInfo(project, instanceId); | |||
break; | |||
case APPLY_BORROW: | |||
// 更新申请借阅状态为成功 | |||
handlerManage.updateProjectApplyBorrowInfo(project, instanceId); | |||
break; | |||
default: | |||
throw BizException.wrap("传入实例类型错误:%s ", instTypeEnum); | |||
} | |||
} else { | |||
/*switch (ProjectStatus.getNoNull(project.getStatus())) { | |||
// 当前项目状态是单位内部审核中 | |||
case UNDER_INTERNAL_AUDIT: | |||
// 当前项目状态是部门联审中 | |||
case DEPARTMENT_JOINT_REVIEW: | |||
handlerManage.updatePassProjectStatus(0L, project); | |||
break; | |||
default: | |||
throw BizException.wrap("传入项目状态错误:%s", project.getStatus()); | |||
}*/ | |||
} | |||
//发送消息 | |||
noticeManage.sendNotice(Long.parseLong(instance.getStartUserId()), project, instance.getProcessDefinitionName(), | |||
PASS_MSG_TEMPLATE2, MsgTypeEnum.PROJECT_REVIEW_PASS); | |||
@@ -325,9 +325,6 @@ public class WithDrawHandle { | |||
ProjectInst projectInst = projectInstService.getOne(piQuery); | |||
Integer instType = projectInst.getInstType(); | |||
if (InstTypeEnum.APPLY_DELAY.eq(instType) || InstTypeEnum.APPLY_BORROW.eq(instType)) { | |||
return Boolean.FALSE; | |||
} | |||
//如果流程发起人 不是 当前登录人 直接返回false | |||
if (StrUtils.hasBlank(userId, startUserId) || !userId.equals(startUserId)) { | |||
return Boolean.FALSE; | |||
@@ -351,13 +348,12 @@ public class WithDrawHandle { | |||
.select(XinchuangInst::getInstType) | |||
.eq(XinchuangInst::getInstCode, instance.getId()); | |||
XinchuangInst xinchuangInst = xinchuangInstService.getOne(piQuery); | |||
if(Objects.isNull(xinchuangInst)) { | |||
if (Objects.isNull(xinchuangInst)) { | |||
return Boolean.FALSE; | |||
} | |||
Integer instType = xinchuangInst.getInstType(); | |||
if (InstTypeEnum.APPLY_DELAY.eq(instType) || InstTypeEnum.APPLY_BORROW.eq(instType) || | |||
InstTypeEnum.XCFHX_APPLY.eq(instType)) { | |||
if (InstTypeEnum.XCFHX_APPLY.eq(instType)) { | |||
return Boolean.FALSE; | |||
} | |||
//如果流程发起人 不是 当前登录人 直接返回false | |||
@@ -166,21 +166,11 @@ public class HandlerManage { | |||
// 并向流程发起人发送浙政钉工作通知:【项目名称】已通过【流程名称】,请及时开始下一步操作。 | |||
if (HisProInsEndActId.END.equals(newInstance.getEndActivityId())) { | |||
// 如果是申请延期和申请借阅审批流程,不走状态机 | |||
if (InstTypeEnum.APPLY_DELAY.eq(instType) | |||
|| InstTypeEnum.APPLY_BORROW.eq(instType) | |||
|| InstTypeEnum.TEST_VALID.eq(instType) | |||
if (InstTypeEnum.TEST_VALID.eq(instType) | |||
|| InstTypeEnum.SELF_TEST.eq(instType) | |||
|| InstTypeEnum.ADAPTION.eq(instType) | |||
|| InstTypeEnum.XCFHX_APPLY.eq(instType)) { | |||
switch (instTypeEnum) { | |||
case APPLY_DELAY: | |||
// 保存延期申请记录,更新项目建设周期和计划验收时间 | |||
updateProjectDelayApplyInfo(project, instanceId); | |||
break; | |||
case APPLY_BORROW: | |||
// 更新申请借阅状态为成功 | |||
updateProjectApplyBorrowInfo(project, instanceId); | |||
break; | |||
case ADAPTION: | |||
case SELF_TEST: | |||
case TEST_VALID: | |||
@@ -442,9 +432,6 @@ public class HandlerManage { | |||
// 审批流程不是申请延期和申请借阅,需调用状态机 | |||
InstTypeEnum instTypeEnum = InstTypeEnum.getNoNull(instType); | |||
switch (instTypeEnum) { | |||
case APPLY_BORROW: | |||
case APPLY_DELAY: | |||
break; | |||
case PROJECT_FINAL_INSPECTION: | |||
purchaseRejectedCallback(project, instanceId); | |||
break; | |||
@@ -564,25 +551,6 @@ public class HandlerManage { | |||
*/ | |||
public void afterBackTodo(Project project, HistoricProcessInstance instance) { | |||
Long userId = LoginUserUtil.getUserId(); | |||
// 获取当前流程实例类型 | |||
String instCode = project.getInstCode(); | |||
ProjectInst projectInst = projectInstService.getByInstCode(instCode); | |||
Integer instType = projectInst.getInstType(); | |||
LambdaUpdateWrapper<Project> updateWrapper = Wrappers.lambdaUpdate(); | |||
// 如果是预审审批或建设方案退回,需要重新盖章,原来盖过章的文件要清空 | |||
if (InstTypeEnum.PRELIMINARY_PREVIEW.eq(instType)) { | |||
updateWrapper.set(Project::getPretrialFileId, null) | |||
.set(Project::getPretrialFileName, null) | |||
.eq(Project::getId, project.getId()); | |||
projectService.update(updateWrapper); | |||
} else if (InstTypeEnum.CONSTRUCTION_PLAN_REVIEW.eq(instType)) { | |||
updateWrapper.set(Project::getConstructFileId, null) | |||
.set(Project::getConstructFileName, null) | |||
.eq(Project::getId, project.getId()); | |||
projectService.update(updateWrapper); | |||
} | |||
// 给项目创建人、流程发起人发送浙政钉工作通知:【项目名称】的【流程名称】被退回,请及时处理。 | |||
//发送消息 | |||
noticeManage.sendNotice(userId, project, instance.getProcessDefinitionName(), | |||
BACK_MSG_TEMPLATE, MsgTypeEnum.PROJECT_REVIEW_BACK); | |||
} | |||
@@ -621,22 +589,6 @@ public class HandlerManage { | |||
project.setUpdateOn(LocalDateTime.now()); | |||
project.setUpdateBy(userId); | |||
projectService.updateById(project); | |||
// 如果是预审审批驳回,需要重新盖章,原来盖过章的文件要清空 | |||
LambdaUpdateWrapper<Project> updateWrapper; | |||
if (InstTypeEnum.PRELIMINARY_PREVIEW.eq(instType)) { | |||
updateWrapper = Wrappers.lambdaUpdate(Project.class) | |||
.set(Project::getPretrialFileId, null) | |||
.set(Project::getPretrialFileName, null) | |||
.eq(Project::getId, project.getId()); | |||
} else if (InstTypeEnum.CONSTRUCTION_PLAN_REVIEW.eq(instType)) { | |||
updateWrapper = Wrappers.lambdaUpdate(Project.class) | |||
.set(Project::getConstructFileId, null) | |||
.set(Project::getConstructFileName, null) | |||
.eq(Project::getId, project.getId()); | |||
} else { | |||
return; | |||
} | |||
projectService.update(updateWrapper); | |||
} | |||
/** | |||
@@ -1616,11 +1616,7 @@ public class TodoCenterManage { | |||
projectApplication.setProjectId(project.getId()); | |||
projectApplication.setProjectCode(project.getProjectCode()); | |||
projectApplication.setProjectVersion(project.getVersion()); | |||
if (!InstTypeEnum.UNIT_INNER_AUDIT.getCode().equals(instType) && | |||
!InstTypeEnum.PRELIMINARY_PREVIEW.getCode().equals(instType) && | |||
!InstTypeEnum.DEPT_UNITED_REVIEW.getCode().equals(instType)) { | |||
projectApplication.setIsConstruct(Boolean.TRUE); | |||
} | |||
projectApplication.setIsConstruct(Boolean.TRUE); | |||
projectApplication.setProjectVersion(project.getVersion()); | |||
} | |||
} | |||
@@ -1628,47 +1624,6 @@ public class TodoCenterManage { | |||
} | |||
public Long getSealedPdf(SealInfoDTO req) { | |||
Long projectId = req.getProjectId(); | |||
Long notSealedFileId = req.getNotSealedFileId(); | |||
Project declaredProject = projectService.getById(projectId); | |||
String instanceId = declaredProject.getInstCode(); | |||
ProjectInst projectInst = projectInstService.getOne(Wrappers.lambdaQuery(ProjectInst.class) | |||
.eq(ProjectInst::getInstCode, instanceId)); | |||
Integer instType = projectInst.getInstType(); | |||
// 如果为预审申报审批 | |||
if (InstTypeEnum.PRELIMINARY_PREVIEW.getCode().equals(instType)) { | |||
// 再根据项目所属区域判断是市级预审还是区县预审 | |||
String areaCode = declaredProject.getAreaCode(); | |||
String areaName = declaredProject.getArea(); | |||
Region region = regionService.getOne(Wrappers.lambdaQuery(Region.class) | |||
.eq(Region::getRegionCode, areaCode) | |||
.eq(Region::getRegionName, areaName)); | |||
if (Objects.isNull(region)) { | |||
throw new BizException("项目所属区域不存在!"); | |||
} | |||
Integer regionLevel = region.getRegionLevel(); | |||
if (CommonEnum.LS_SBJ.getDesc().equals(areaName)) { | |||
regionLevel = RegionConst.RL_CITY; | |||
} | |||
switch (regionLevel) { | |||
// 市级预审(市本级) | |||
case RegionConst.RL_CITY: | |||
String cityTemplateName = SealTemplate.CITY_TEMPLATE; | |||
return generateSealedPdf(req, declaredProject, cityTemplateName, notSealedFileId); | |||
// 区县预审 | |||
case RegionConst.RL_COUNTY: | |||
String countryTemplateName = SealTemplate.COUNTRY_TEMPLATE; | |||
return generateSealedPdf(req, declaredProject, countryTemplateName, notSealedFileId); | |||
default: | |||
throw new IllegalStateException("Unexpected value: " + regionLevel); | |||
} | |||
} | |||
// 如果为建设方案申报审批 | |||
else if (InstTypeEnum.CONSTRUCTION_PLAN_REVIEW.getCode().equals(instType)) { | |||
// 设置pdf模板参数 | |||
String constructTemplateName = SealTemplate.CONSTRUCT_TEMPLATE; | |||
return generateSealedPdf(req, declaredProject, constructTemplateName, notSealedFileId); | |||
} | |||
return null; | |||
} | |||
@@ -4,6 +4,7 @@ import com.hz.pm.api.external.MhAuthClient; | |||
import com.hz.pm.api.external.model.dto.MhRetDTO; | |||
import com.hz.pm.api.user.security.model.WebRequestDetails; | |||
import com.ningdatech.basic.exception.BizException; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.apache.commons.lang3.StringUtils; | |||
import org.springframework.http.HttpMethod; | |||
import org.springframework.security.authentication.AuthenticationServiceException; | |||
@@ -25,6 +26,7 @@ import javax.servlet.http.HttpServletResponse; | |||
* @author WendyYang | |||
* @since 11:20 2023/12/26 | |||
*/ | |||
@Slf4j | |||
public class MhAuthFilter extends AbstractAuthenticationProcessingFilter { | |||
private static final String AUTH_CODE = "code"; | |||
@@ -54,6 +56,7 @@ public class MhAuthFilter extends AbstractAuthenticationProcessingFilter { | |||
// 获取临时授权码对应的mhUserId或者openId | |||
MhRetDTO<String> mhRet = authClient.getMhUserIdByAuthCode(authCode); | |||
if (!mhRet.isOk()) { | |||
log.warn("授权码登录失败:{}", mhRet); | |||
throw BizException.wrap("登录失败,授权码无效"); | |||
} | |||
String mhUserIdOrOpenId = mhRet.getData(); | |||