1、企业基础信息填报中新增是否涉及危化证字段

2、企业基础信息中新增工作流监听类
This commit is contained in:
Wayne 2024-05-08 09:58:51 +08:00
parent 1da6173304
commit c3ece5270f
8 changed files with 76 additions and 2 deletions

View File

@ -34,6 +34,9 @@ public class EnterpriseInformationPageReqVO extends PageParam {
@Schema(description = "经营状态")
private Integer operateState;
@Schema(description = "是否涉及危化证")
private Integer isSecure;
@Schema(description = "成立日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDate[] establishDate;

View File

@ -58,6 +58,11 @@ public class EnterpriseInformationRespVO {
@DictFormat("enterprise_operate_state") // TODO 代码优化建议设置到对应的 DictTypeConstants 枚举类中
private Integer operateState;
@Schema(description = "是否涉及危化证", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty(value = "是否涉及危化证", converter = DictConvert.class)
@DictFormat("enterprise_is_secure") // TODO 代码优化建议设置到对应的 DictTypeConstants 枚举类中
private Integer isSecure;
@Schema(description = "成立日期", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("成立日期")
private LocalDate establishDate;
@ -71,6 +76,10 @@ public class EnterpriseInformationRespVO {
@ExcelProperty("企业所属行业")
private String enterpriseBelongingToIndustry;
@Schema(description = "企业所属地区", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("企业所属地区")
private String enterpriseBelongingToRegion;
@Schema(description = "登记机关", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("登记机关")
private String registerOffice;

View File

@ -46,6 +46,10 @@ public class EnterpriseInformationSaveReqVO {
@NotNull(message = "经营状态不能为空")
private Integer operateState;
@Schema(description = "是否涉及危化证", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "是否涉及危化证不能为空")
private Integer isSecure;
@Schema(description = "成立日期", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "成立日期不能为空")
private LocalDate establishDate;

View File

@ -64,6 +64,12 @@ public class EnterpriseInformationDO extends BaseDO {
* 枚举
*/
private Integer operateState;
/**
* 是否涉及危化证
*
* 枚举
*/
private Integer isSecure;
/**
* 成立日期
*/

View File

@ -24,6 +24,7 @@ public interface EnterpriseInformationMapper extends BaseMapperX<EnterpriseInfor
.likeIfPresent(EnterpriseInformationDO::getLegalPerson, reqVO.getLegalPerson())
.likeIfPresent(EnterpriseInformationDO::getUnifiedCreditCode, reqVO.getUnifiedCreditCode())
.eqIfPresent(EnterpriseInformationDO::getOperateState, reqVO.getOperateState())
.eqIfPresent(EnterpriseInformationDO::getIsSecure, reqVO.getIsSecure())
.betweenIfPresent(EnterpriseInformationDO::getEstablishDate, reqVO.getEstablishDate())
.eqIfPresent(EnterpriseInformationDO::getEnterpriseType, reqVO.getEnterpriseType())
.likeIfPresent(EnterpriseInformationDO::getEnterpriseBelongingToIndustry, reqVO.getEnterpriseBelongingToIndustry())

View File

@ -52,4 +52,11 @@ public interface EnterpriseInformationService {
*/
PageResult<EnterpriseInformationDO> getEnterpriseInformationPage(EnterpriseInformationPageReqVO pageReqVO);
/**
* 更新企业基本信息申请的状态
*
* @param id 编号
* @param status 结果
*/
void updateEnterpriseInformationStatus(long id, Integer status);
}

View File

@ -19,6 +19,7 @@ import cn.iocoder.yudao.module.fta.dal.mysql.enterpriseinformation.EnterpriseInf
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.OA_LEAVE_NOT_EXISTS;
import static cn.iocoder.yudao.module.fta.enums.ErrorCodeConstants.*;
/**
@ -95,4 +96,16 @@ public class EnterpriseInformationServiceImpl implements EnterpriseInformationSe
return enterpriseInformationMapper.selectPage(pageReqVO);
}
@Override
public void updateEnterpriseInformationStatus(long id, Integer status) {
validateLeaveExists(id);
enterpriseInformationMapper.updateById(new EnterpriseInformationDO().setId(id).setStatus(status));
}
private void validateLeaveExists(Long id) {
if (enterpriseInformationMapper.selectById(id) == null) {
throw exception(ENTERPRISE_INFORMATION_NOT_EXISTS);
}
}
}

View File

@ -0,0 +1,31 @@
package cn.iocoder.yudao.module.fta.service.oa.listener;
import cn.iocoder.yudao.module.bpm.event.BpmProcessInstanceStatusEvent;
import cn.iocoder.yudao.module.bpm.event.BpmProcessInstanceStatusEventListener;
import cn.iocoder.yudao.module.fta.service.enterpriseinformation.EnterpriseInformationService;
import cn.iocoder.yudao.module.fta.service.enterpriseinformation.EnterpriseInformationServiceImpl;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
/**
* FTA 企业基本信息流程的结果的监听器实现类
*
* @author 王长久
*/
@Component
public class FtaEnterpriseInformationStatusListener extends BpmProcessInstanceStatusEventListener {
@Resource
private EnterpriseInformationService enterpriseInformationService;
@Override
protected String getProcessDefinitionKey() {
return EnterpriseInformationServiceImpl.PROCESS_KEY;
}
@Override
protected void onEvent(BpmProcessInstanceStatusEvent event) {
enterpriseInformationService.updateEnterpriseInformationStatus(Long.parseLong(event.getBusinessKey()), event.getStatus());
}
}