/compliance-check 合规检查
parent
bb099324c8
commit
32108939dc
|
|
@ -41,7 +41,7 @@ WHERE `apply_type_code` IN (1, 2, 3);
|
|||
-- 2. qual_filing_change 变更头表
|
||||
-- ---------------------------------------------
|
||||
ALTER TABLE `qual_filing_change`
|
||||
ADD COLUMN `change_filing_id` bigint DEFAULT NULL COMMENT '关联变更草稿qual_filing.id' AFTER `origin_filing_id`,
|
||||
ADD COLUMN `change_filing_id` bigint DEFAULT NULL COMMENT '关联变更草稿qual_filing.id' AFTER `filing_id`,
|
||||
ADD COLUMN `reject_reason` varchar(500) DEFAULT NULL COMMENT '打回原因' AFTER `change_filing_id`,
|
||||
ADD COLUMN `submit_time` datetime DEFAULT NULL COMMENT '提交时间' AFTER `reject_reason`;
|
||||
|
||||
|
|
|
|||
|
|
@ -571,7 +571,7 @@ DROP TABLE IF EXISTS `qual_filing_change`;
|
|||
CREATE TABLE `qual_filing_change` (
|
||||
`id` bigint NOT NULL COMMENT '主键',
|
||||
`org_id` bigint NOT NULL COMMENT '机构id',
|
||||
`origin_filing_id` bigint NOT NULL COMMENT '原备案申请id',
|
||||
`filing_id` bigint NOT NULL COMMENT '备案申请id',
|
||||
`change_filing_id` bigint DEFAULT NULL COMMENT '关联变更草稿qual_filing.id',
|
||||
`reject_reason` varchar(500) DEFAULT NULL COMMENT '打回原因',
|
||||
`submit_time` datetime DEFAULT NULL COMMENT '提交时间',
|
||||
|
|
@ -611,7 +611,7 @@ CREATE TABLE `qual_filing_change` (
|
|||
`env` varchar(50) DEFAULT NULL COMMENT '环境',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_qual_filing_change_org_id` (`org_id`),
|
||||
KEY `idx_qual_filing_change_origin_id` (`origin_filing_id`)
|
||||
KEY `idx_qual_filing_change_filing_id` (`filing_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='备案变更表';
|
||||
|
||||
-- ----------------------------
|
||||
|
|
|
|||
|
|
@ -222,9 +222,9 @@ qual_filing (1) ── (N) qual_filing_change ── (N) qual_filing_change_deta
|
|||
|
||||
### 4.16 qual_filing_change — 备案变更表
|
||||
|
||||
**作用:** 每次变更提交的快照头记录;`origin_filing_id` 关联原备案,`change_filing_id` 关联变更草稿 qual_filing。
|
||||
**作用:** 每次变更提交的快照头记录;`filing_id` 关联原备案,`change_filing_id` 关联变更草稿 qual_filing。
|
||||
|
||||
**关联:** `origin_filing_id` → qual_filing.id
|
||||
**关联:** `filing_id` → qual_filing.id
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -58,8 +58,8 @@ public class QualFilingChangeController {
|
|||
|
||||
@ApiOperation("发起备案变更(克隆草稿)")
|
||||
@PostMapping("/start")
|
||||
public SingleResponse<Long> start(@ApiParam("原备案申请id") @RequestParam Long originFilingId) {
|
||||
return qualFilingChangeApi.start(originFilingId);
|
||||
public SingleResponse<Long> start(@ApiParam("备案申请id") @RequestParam Long filingId) {
|
||||
return qualFilingChangeApi.start(filingId);
|
||||
}
|
||||
|
||||
@ApiOperation("提交备案变更")
|
||||
|
|
@ -71,8 +71,8 @@ public class QualFilingChangeController {
|
|||
@ApiOperation("备案变更历史")
|
||||
@GetMapping("/history")
|
||||
public SingleResponse<org.qinan.safetyeval.client.co.QualFilingChangeHistoryCO> history(
|
||||
@ApiParam("原备案申请id") @RequestParam Long originFilingId) {
|
||||
return qualFilingChangeApi.history(originFilingId);
|
||||
@ApiParam("备案申请id") @RequestParam Long filingId) {
|
||||
return qualFilingChangeApi.history(filingId);
|
||||
}
|
||||
|
||||
@ApiOperation("变更审核通过")
|
||||
|
|
@ -87,6 +87,12 @@ public class QualFilingChangeController {
|
|||
return qualFilingChangeApi.reject(cmd);
|
||||
}
|
||||
|
||||
@ApiOperation("聚合新增or编辑资质备案变更申请")
|
||||
@PostMapping("/aggregationSaveOrEdit")
|
||||
public SingleResponse<QualFilingChangeCO> aggregationSaveOrEdit(@RequestBody AggregationSaveOrEditQualFilingChangeCmd cmd) {
|
||||
return qualFilingChangeApi.aggregationSaveOrEdit(cmd);
|
||||
}
|
||||
|
||||
@ApiOperation("合规检查")
|
||||
@GetMapping("/compliance-check")
|
||||
public SingleResponse<List<QualFilingChangeComplianceCheckResultCO>> complianceCheck(@ApiParam("主键ID") @RequestParam Long id) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
package org.qinan.safetyeval.app.change.convertor;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.qinan.safetyeval.client.dto.QualFilingChangeAddCmd;
|
||||
import org.qinan.safetyeval.domain.entity.QualFilingChangeEntity;
|
||||
|
||||
/**
|
||||
* 备案变更基本信息命令转换
|
||||
*
|
||||
* @author safety-eval
|
||||
*/
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface QualFilingChangeCmdConvertor {
|
||||
|
||||
/**
|
||||
* cmd_add转领域模型
|
||||
*
|
||||
* @param qualFilingChangeAddCmd
|
||||
* @return
|
||||
*/
|
||||
QualFilingChangeEntity convertCmdToE(QualFilingChangeAddCmd qualFilingChangeAddCmd);
|
||||
}
|
||||
|
|
@ -1,28 +1,30 @@
|
|||
package org.qinan.safetyeval.app.executor;
|
||||
|
||||
import org.qinan.safetyeval.app.change.convertor.*;
|
||||
import org.qinan.safetyeval.app.orchestrator.QualFilingOrchestrator;
|
||||
import org.qinan.safetyeval.client.api.QualFilingChangeApi;
|
||||
import org.qinan.safetyeval.client.co.QualFilingChangeCO;
|
||||
import org.qinan.safetyeval.client.co.QualFilingChangeComplianceCheckResultCO;
|
||||
import org.qinan.safetyeval.client.co.QualFilingChangeHistoryCO;
|
||||
import org.qinan.safetyeval.client.dto.PageResponse;
|
||||
import org.qinan.safetyeval.client.dto.SingleResponse;
|
||||
import org.qinan.safetyeval.client.dto.QualFilingChangeAddCmd;
|
||||
import org.qinan.safetyeval.client.dto.QualFilingChangeModifyCmd;
|
||||
import org.qinan.safetyeval.client.dto.QualFilingChangePageQuery;
|
||||
import org.qinan.safetyeval.client.dto.QualFilingChangeSubmitCmd;
|
||||
import org.qinan.safetyeval.client.dto.QualFilingRejectCmd;
|
||||
import org.qinan.safetyeval.client.dto.*;
|
||||
import org.qinan.safetyeval.domain.change.model.*;
|
||||
import org.qinan.safetyeval.domain.constant.QualFilingStatusEnum;
|
||||
import org.qinan.safetyeval.domain.entity.QualFilingChangeEntity;
|
||||
import org.qinan.safetyeval.domain.query.QualFilingChangeQuery;
|
||||
import org.qinan.safetyeval.domain.exception.BizException;
|
||||
import org.qinan.safetyeval.domain.exception.ErrorCode;
|
||||
import org.qinan.safetyeval.domain.query.PageResult;
|
||||
import org.qinan.safetyeval.domain.query.QualFilingChangeQuery;
|
||||
import org.qinan.safetyeval.domain.service.QualFilingChangeDomainService;
|
||||
import org.qinan.safetyeval.infrastructure.adapter.auth.AuthUserContextAdapter;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 备案变更执行器(App层)
|
||||
|
|
@ -36,11 +38,23 @@ public class QualFilingChangeExecutor implements QualFilingChangeApi {
|
|||
|
||||
@Resource
|
||||
private QualFilingOrchestrator qualFilingOrchestrator;
|
||||
@Resource
|
||||
private QualFilingChangeCmdConvertor qualFilingChangeCmdConvertor;
|
||||
@Resource
|
||||
private QualFilingCommitmentChangeCmdConvertor qualFilingCommitmentChangeCmdConvertor;
|
||||
@Resource
|
||||
private QualFilingEquipmentChangeCmdConvertor qualFilingEquipmentChangeCmdConvertor;
|
||||
@Resource
|
||||
private QualFilingMaterialChangeCmdConvertor qualFilingMaterialChangeCmdConvertor;
|
||||
@Resource
|
||||
private QualFilingPersonnelChangeCmdConvertor qualFilingPersonnelChangeCmdConvertor;
|
||||
@Resource
|
||||
private QualFilingPersonnelCertChangeCmdConvertor qualFilingPersonnelCertChangeCmdConvertor;
|
||||
|
||||
@Override
|
||||
public SingleResponse<QualFilingChangeCO> add(QualFilingChangeAddCmd cmd) {
|
||||
QualFilingChangeEntity entity = new QualFilingChangeEntity();
|
||||
entity.setOriginFilingId(cmd.getOriginFilingId());
|
||||
entity.setFilingId(cmd.getFilingId());
|
||||
entity.setFilingTerritoryCode(cmd.getFilingTerritoryCode());
|
||||
entity.setFilingTerritoryName(cmd.getFilingTerritoryName());
|
||||
entity.setFilingUnitName(cmd.getFilingUnitName());
|
||||
|
|
@ -78,7 +92,7 @@ public class QualFilingChangeExecutor implements QualFilingChangeApi {
|
|||
public SingleResponse<QualFilingChangeCO> modify(QualFilingChangeModifyCmd cmd) {
|
||||
QualFilingChangeEntity entity = new QualFilingChangeEntity();
|
||||
entity.setId(cmd.getId());
|
||||
entity.setOriginFilingId(cmd.getOriginFilingId());
|
||||
entity.setFilingId(cmd.getFilingId());
|
||||
entity.setFilingTerritoryCode(cmd.getFilingTerritoryCode());
|
||||
entity.setFilingTerritoryName(cmd.getFilingTerritoryName());
|
||||
entity.setFilingUnitName(cmd.getFilingUnitName());
|
||||
|
|
@ -119,7 +133,7 @@ public class QualFilingChangeExecutor implements QualFilingChangeApi {
|
|||
domainQuery.setPageSize(query.getSize());
|
||||
domainQuery.setTenantId(AuthUserContextAdapter.getCurrentTenantId());
|
||||
domainQuery.setOrgId(query.getOrgId());
|
||||
domainQuery.setOriginFilingId(query.getOriginFilingId());
|
||||
domainQuery.setFilingId(query.getFilingId());
|
||||
domainQuery.setFilingNo(query.getFilingNo());
|
||||
domainQuery.setFilingStatusCode(query.getFilingStatusCode());
|
||||
PageResult<QualFilingChangeEntity> pageResult = qualFilingChangeDomainService.page(domainQuery);
|
||||
|
|
@ -129,8 +143,8 @@ public class QualFilingChangeExecutor implements QualFilingChangeApi {
|
|||
}
|
||||
|
||||
@Override
|
||||
public SingleResponse<Long> start(Long originFilingId) {
|
||||
return SingleResponse.success(qualFilingOrchestrator.startChange(originFilingId));
|
||||
public SingleResponse<Long> start(Long filingId) {
|
||||
return SingleResponse.success(qualFilingOrchestrator.startChange(filingId));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -140,8 +154,8 @@ public class QualFilingChangeExecutor implements QualFilingChangeApi {
|
|||
}
|
||||
|
||||
@Override
|
||||
public SingleResponse<QualFilingChangeHistoryCO> history(Long originFilingId) {
|
||||
return SingleResponse.success(qualFilingOrchestrator.getChangeHistory(originFilingId));
|
||||
public SingleResponse<QualFilingChangeHistoryCO> history(Long filingId) {
|
||||
return SingleResponse.success(qualFilingOrchestrator.getChangeHistory(filingId));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -161,13 +175,83 @@ public class QualFilingChangeExecutor implements QualFilingChangeApi {
|
|||
return SingleResponse.success(qualFilingOrchestrator.complianceCheckChange(id));
|
||||
}
|
||||
|
||||
@Override
|
||||
public SingleResponse<QualFilingChangeCO> aggregationSaveOrEdit(AggregationSaveOrEditQualFilingChangeCmd cmd) {
|
||||
validateBeforeSaveOrEdit(cmd);
|
||||
|
||||
QualFilingChangeCO co = new QualFilingChangeCO();
|
||||
|
||||
// 变更基本信息
|
||||
QualFilingChangeEntity entity = qualFilingChangeCmdConvertor.convertCmdToE(cmd.getQualFilingChangeAddCmd());
|
||||
|
||||
// 变更承诺书
|
||||
QualFilingCommitmentChangeE commitmentEntity = qualFilingCommitmentChangeCmdConvertor.convertCmdToE(cmd.getQualFilingCommitmentChangeAddCmd());
|
||||
|
||||
// 变更装备
|
||||
List<QualFilingEquipmentChangeE> equipmentEntities = cmd.getQualFilingEquipmentChangeAddCmds().stream()
|
||||
.map(item -> qualFilingEquipmentChangeCmdConvertor.convertCmdToE(item))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 变更材料
|
||||
List<QualFilingMaterialChangeE> materialEntities = cmd.getQualFilingMaterialChangeAddCmds().stream()
|
||||
.map(item -> qualFilingMaterialChangeCmdConvertor.convertCmdToE(item))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 变更人员
|
||||
List<QualFilingPersonnelChangeE> personnelEntities = cmd.getQualFilingPersonnelChangeAddCmds().stream()
|
||||
.map(item -> qualFilingPersonnelChangeCmdConvertor.convertCmdToE(item))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 变更人员证书
|
||||
List<QualFilingPersonnelCertChangeE> personnelCertEntities = Collections.emptyList();
|
||||
if (!CollectionUtils.isEmpty(cmd.getQualFilingPersonnelCertChangeAddCmds())) {
|
||||
personnelCertEntities = cmd.getQualFilingPersonnelCertChangeAddCmds().stream()
|
||||
.map(item -> qualFilingPersonnelCertChangeCmdConvertor.convertCmdToE(item))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
Long id = qualFilingChangeDomainService.aggregationSaveOrEdit(entity, commitmentEntity, equipmentEntities, materialEntities, personnelEntities, personnelCertEntities);
|
||||
co.setId(id);
|
||||
return SingleResponse.success(co);
|
||||
}
|
||||
|
||||
/**
|
||||
* 聚合保存或编辑前的状态校验
|
||||
* <ul>
|
||||
* <li>新增:根据filingId统计qualFilingChange表中filingStatusCode != 1(已备案)的记录数,有则不允许新增</li>
|
||||
* <li>修改:根据id查询变更记录,filingStatusCode = 1(已备案) 则不允许修改</li>
|
||||
* </ul>
|
||||
*/
|
||||
private void validateBeforeSaveOrEdit(AggregationSaveOrEditQualFilingChangeCmd cmd) {
|
||||
QualFilingChangeAddCmd addCmd = cmd.getQualFilingChangeAddCmd();
|
||||
if (addCmd.getId() == null) {
|
||||
cmd.setAdd(true);
|
||||
// 新增:根据filingId统计qualFilingChange表中filingStatusCode != 1的记录数,有则不允许新增
|
||||
int count = qualFilingChangeDomainService.countByFilingIdAndStatusNot(
|
||||
addCmd.getFilingId(), QualFilingStatusEnum.FILED.getCode());
|
||||
if (count > 0) {
|
||||
throw new BizException(ErrorCode.QUAL_FILING_STATUS_INVALID, "存在进行中的备案变更,不允许新增");
|
||||
}
|
||||
} else {
|
||||
cmd.setAdd(false);
|
||||
// 修改:根据id查询变更记录,filing_status_code = 1 则不允许修改
|
||||
QualFilingChangeEntity existing = qualFilingChangeDomainService.get(addCmd.getId());
|
||||
if (existing == null) {
|
||||
throw new BizException(ErrorCode.QUAL_FILING_CHANGE_NOT_FOUND);
|
||||
}
|
||||
if (QualFilingStatusEnum.isFiled(existing.getFilingStatusCode())) {
|
||||
throw new BizException(ErrorCode.QUAL_FILING_STATUS_INVALID, "已备案的变更记录不允许修改");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private QualFilingChangeCO toCO(QualFilingChangeEntity entity) {
|
||||
if (entity == null) {
|
||||
return null;
|
||||
}
|
||||
QualFilingChangeCO co = new QualFilingChangeCO();
|
||||
co.setId(entity.getId());
|
||||
co.setOriginFilingId(entity.getOriginFilingId());
|
||||
co.setFilingId(entity.getFilingId());
|
||||
co.setChangeFilingId(entity.getChangeFilingId());
|
||||
co.setFilingTerritoryCode(entity.getFilingTerritoryCode());
|
||||
co.setFilingTerritoryName(entity.getFilingTerritoryName());
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ public class QualFilingOrchestrator {
|
|||
&& entity.getApplyTypeCode() == QualFilingApplyTypeEnum.CHANGE_DRAFT.getCode()
|
||||
&& entity.getOriginFilingId() != null
|
||||
? entity.getOriginFilingId() : entity.getId();
|
||||
co.setChangeCount(qualFilingChangeDetailGateway.countByOriginFilingId(originId));
|
||||
co.setChangeCount(qualFilingChangeDetailGateway.countByFilingId(originId));
|
||||
return co;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
|
|
@ -340,7 +340,7 @@ public class QualFilingOrchestrator {
|
|||
throw new BizException(ErrorCode.QUAL_FILING_CHANGE_NOT_FOUND);
|
||||
}
|
||||
QualFilingEntity draft = qualFilingGateway.get(change.getChangeFilingId());
|
||||
QualFilingEntity origin = qualFilingGateway.get(change.getOriginFilingId());
|
||||
QualFilingEntity origin = qualFilingGateway.get(change.getFilingId());
|
||||
applyDraftToOrigin(origin, draft);
|
||||
replaceChildrenFromDraft(origin.getId(), draft.getId());
|
||||
origin.setFilingStatusCode(QualFilingStatusEnum.FILED.getCode());
|
||||
|
|
@ -359,7 +359,7 @@ public class QualFilingOrchestrator {
|
|||
if (change == null) {
|
||||
throw new BizException(ErrorCode.QUAL_FILING_CHANGE_NOT_FOUND);
|
||||
}
|
||||
QualFilingEntity origin = qualFilingGateway.get(change.getOriginFilingId());
|
||||
QualFilingEntity origin = qualFilingGateway.get(change.getFilingId());
|
||||
origin.setFilingStatusCode(QualFilingStatusEnum.REJECTED.getCode());
|
||||
origin.setFilingStatusName(QualFilingStatusEnum.REJECTED.getName());
|
||||
origin.setRejectReason(rejectReason);
|
||||
|
|
@ -371,11 +371,11 @@ public class QualFilingOrchestrator {
|
|||
qualFilingChangeGateway.modify(change);
|
||||
}
|
||||
|
||||
public QualFilingChangeHistoryCO getChangeHistory(Long originFilingId) {
|
||||
public QualFilingChangeHistoryCO getChangeHistory(Long filingId) {
|
||||
QualFilingChangeHistoryCO history = new QualFilingChangeHistoryCO();
|
||||
int count = qualFilingChangeDetailGateway.countByOriginFilingId(originFilingId);
|
||||
int count = qualFilingChangeDetailGateway.countByFilingId(filingId);
|
||||
history.setChangeCount(count);
|
||||
history.setRecords(qualFilingChangeDetailGateway.listByOriginFilingId(originFilingId).stream()
|
||||
history.setRecords(qualFilingChangeDetailGateway.listByFilingId(filingId).stream()
|
||||
.map(this::toHistoryItem)
|
||||
.collect(Collectors.toList()));
|
||||
return history;
|
||||
|
|
@ -523,7 +523,7 @@ public class QualFilingOrchestrator {
|
|||
private QualFilingChangeEntity copyToChangeHeader(QualFilingEntity origin, QualFilingEntity draft) {
|
||||
QualFilingChangeEntity change = new QualFilingChangeEntity();
|
||||
change.setOrgId(origin.getOrgId());
|
||||
change.setOriginFilingId(origin.getId());
|
||||
change.setFilingId(origin.getId());
|
||||
change.setFilingTerritoryCode(draft.getFilingTerritoryCode());
|
||||
change.setFilingTerritoryName(draft.getFilingTerritoryName());
|
||||
change.setFilingUnitName(draft.getFilingUnitName());
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package org.qinan.safetyeval.client.api;
|
|||
import org.qinan.safetyeval.client.co.QualFilingChangeComplianceCheckResultCO;
|
||||
import org.qinan.safetyeval.client.co.QualFilingChangeHistoryCO;
|
||||
import org.qinan.safetyeval.client.co.QualFilingChangeCO;
|
||||
import org.qinan.safetyeval.client.dto.AggregationSaveOrEditQualFilingChangeCmd;
|
||||
import org.qinan.safetyeval.client.dto.PageResponse;
|
||||
import org.qinan.safetyeval.client.dto.SingleResponse;
|
||||
import org.qinan.safetyeval.client.dto.QualFilingChangeAddCmd;
|
||||
|
|
@ -28,15 +29,17 @@ public interface QualFilingChangeApi {
|
|||
|
||||
PageResponse<QualFilingChangeCO> page(QualFilingChangePageQuery query);
|
||||
|
||||
SingleResponse<Long> start(Long originFilingId);
|
||||
SingleResponse<Long> start(Long filingId);
|
||||
|
||||
SingleResponse<Void> submit(QualFilingChangeSubmitCmd cmd);
|
||||
|
||||
SingleResponse<QualFilingChangeHistoryCO> history(Long originFilingId);
|
||||
SingleResponse<QualFilingChangeHistoryCO> history(Long filingId);
|
||||
|
||||
SingleResponse<Void> approve(Long changeId);
|
||||
|
||||
SingleResponse<Void> reject(QualFilingRejectCmd cmd);
|
||||
|
||||
SingleResponse<List<QualFilingChangeComplianceCheckResultCO>> complianceCheck(Long id);
|
||||
|
||||
SingleResponse<QualFilingChangeCO> aggregationSaveOrEdit(AggregationSaveOrEditQualFilingChangeCmd cmd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,11 +18,11 @@ public class QualFilingCommitmentChangeAddCmd implements Serializable {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 备案申请id
|
||||
* 备案变更id
|
||||
*/
|
||||
@ApiModelProperty(value = "备案申请id", required = true)
|
||||
@NotNull(message = "备案申请id不能为空")
|
||||
private Long filingId;
|
||||
@ApiModelProperty(value = "备案变更id", required = true)
|
||||
@NotNull(message = "备案变更id不能为空")
|
||||
private Long filingChangeId;
|
||||
/**
|
||||
* 承诺内容
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@ public class QualFilingCommitmentChangePageQry extends PageQuery {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 备案申请id
|
||||
* 备案变更id
|
||||
*/
|
||||
@ApiModelProperty(value = "备案申请id")
|
||||
private Long filingId;
|
||||
@ApiModelProperty(value = "备案变更id")
|
||||
private Long filingChangeId;
|
||||
/**
|
||||
* 承诺内容
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -20,11 +20,11 @@ public class QualFilingCommitmentChangeUpdateCmd implements Serializable {
|
|||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long id;
|
||||
/**
|
||||
* 备案申请id
|
||||
* 备案变更id
|
||||
*/
|
||||
@ApiModelProperty(value = "备案申请id", required = true)
|
||||
@NotNull(message = "备案申请id不能为空")
|
||||
private Long filingId;
|
||||
@ApiModelProperty(value = "备案变更id", required = true)
|
||||
@NotNull(message = "备案变更id不能为空")
|
||||
private Long filingChangeId;
|
||||
/**
|
||||
* 承诺内容
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -19,11 +19,11 @@ public class QualFilingEquipmentChangeAddCmd implements Serializable {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 备案申请id
|
||||
* 备案变更id
|
||||
*/
|
||||
@ApiModelProperty(value = "备案申请id", required = true)
|
||||
@NotNull(message = "备案申请id不能为空")
|
||||
private Long filingId;
|
||||
@ApiModelProperty(value = "备案变更id", required = true)
|
||||
@NotNull(message = "备案变更id不能为空")
|
||||
private Long filingChangeId;
|
||||
/**
|
||||
* 来源装备id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@ public class QualFilingEquipmentChangePageQry extends PageQuery {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 备案申请id
|
||||
* 备案变更id
|
||||
*/
|
||||
@ApiModelProperty(value = "备案申请id")
|
||||
private Long filingId;
|
||||
@ApiModelProperty(value = "备案变更id")
|
||||
private Long filingChangeId;
|
||||
/**
|
||||
* 来源装备id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -21,11 +21,11 @@ public class QualFilingEquipmentChangeUpdateCmd implements Serializable {
|
|||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long id;
|
||||
/**
|
||||
* 备案申请id
|
||||
* 备案变更id
|
||||
*/
|
||||
@ApiModelProperty(value = "备案申请id", required = true)
|
||||
@NotNull(message = "备案申请id不能为空")
|
||||
private Long filingId;
|
||||
@ApiModelProperty(value = "备案变更id", required = true)
|
||||
@NotNull(message = "备案变更id不能为空")
|
||||
private Long filingChangeId;
|
||||
/**
|
||||
* 来源装备id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -18,11 +18,11 @@ public class QualFilingMaterialChangeAddCmd implements Serializable {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 备案申请id
|
||||
* 备案变更id
|
||||
*/
|
||||
@ApiModelProperty(value = "备案申请id", required = true)
|
||||
@NotNull(message = "备案申请id不能为空")
|
||||
private Long filingId;
|
||||
@ApiModelProperty(value = "备案变更id", required = true)
|
||||
@NotNull(message = "备案变更id不能为空")
|
||||
private Long filingChangeId;
|
||||
/**
|
||||
* 材料类型1,申请材料目录(原件),2,申请书(原件),3,法人证明(复印件),4,三年内无重大违法失信记录查询证明,5,法定代表人承诺书(原件),6,固定资产法定证明材料,7,工作场所及档案室面积证明,8,安全评价师专业能力证明,9,相关负责人证明材料,10,机构内部管理制度
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@ public class QualFilingMaterialChangePageQry extends PageQuery {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 备案申请id
|
||||
* 备案变更id
|
||||
*/
|
||||
@ApiModelProperty(value = "备案申请id")
|
||||
private Long filingId;
|
||||
@ApiModelProperty(value = "备案变更id")
|
||||
private Long filingChangeId;
|
||||
/**
|
||||
* 材料类型1,申请材料目录(原件),2,申请书(原件),3,法人证明(复印件),4,三年内无重大违法失信记录查询证明,5,法定代表人承诺书(原件),6,固定资产法定证明材料,7,工作场所及档案室面积证明,8,安全评价师专业能力证明,9,相关负责人证明材料,10,机构内部管理制度
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -20,11 +20,11 @@ public class QualFilingMaterialChangeUpdateCmd implements Serializable {
|
|||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long id;
|
||||
/**
|
||||
* 备案申请id
|
||||
* 备案变更id
|
||||
*/
|
||||
@ApiModelProperty(value = "备案申请id", required = true)
|
||||
@NotNull(message = "备案申请id不能为空")
|
||||
private Long filingId;
|
||||
@ApiModelProperty(value = "备案变更id", required = true)
|
||||
@NotNull(message = "备案变更id不能为空")
|
||||
private Long filingChangeId;
|
||||
/**
|
||||
* 材料类型1,申请材料目录(原件),2,申请书(原件),3,法人证明(复印件),4,三年内无重大违法失信记录查询证明,5,法定代表人承诺书(原件),6,固定资产法定证明材料,7,工作场所及档案室面积证明,8,安全评价师专业能力证明,9,相关负责人证明材料,10,机构内部管理制度
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -18,11 +18,11 @@ public class QualFilingPersonnelCertChangeAddCmd implements Serializable {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 备案申请id
|
||||
* 备案变更id
|
||||
*/
|
||||
@ApiModelProperty(value = "备案申请id", required = true)
|
||||
@NotNull(message = "备案申请id不能为空")
|
||||
private Long filingId;
|
||||
@ApiModelProperty(value = "备案变更id", required = true)
|
||||
@NotNull(message = "备案变更id不能为空")
|
||||
private Long filingChangeId;
|
||||
/**
|
||||
* 备案人员id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@ public class QualFilingPersonnelCertChangePageQry extends PageQuery {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 备案申请id
|
||||
* 备案变更id
|
||||
*/
|
||||
@ApiModelProperty(value = "备案申请id")
|
||||
private Long filingId;
|
||||
@ApiModelProperty(value = "备案变更id")
|
||||
private Long filingChangeId;
|
||||
/**
|
||||
* 备案人员id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -20,11 +20,11 @@ public class QualFilingPersonnelCertChangeUpdateCmd implements Serializable {
|
|||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long id;
|
||||
/**
|
||||
* 备案申请id
|
||||
* 备案变更id
|
||||
*/
|
||||
@ApiModelProperty(value = "备案申请id", required = true)
|
||||
@NotNull(message = "备案申请id不能为空")
|
||||
private Long filingId;
|
||||
@ApiModelProperty(value = "备案变更id", required = true)
|
||||
@NotNull(message = "备案变更id不能为空")
|
||||
private Long filingChangeId;
|
||||
/**
|
||||
* 备案人员id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -19,11 +19,11 @@ public class QualFilingPersonnelChangeAddCmd implements Serializable {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 备案申请id
|
||||
* 备案变更id
|
||||
*/
|
||||
@ApiModelProperty(value = "备案申请id", required = true)
|
||||
@NotNull(message = "备案申请id不能为空")
|
||||
private Long filingId;
|
||||
@ApiModelProperty(value = "备案变更id", required = true)
|
||||
@NotNull(message = "备案变更id不能为空")
|
||||
private Long filingChangeId;
|
||||
/**
|
||||
* 来源人员id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@ public class QualFilingPersonnelChangePageQry extends PageQuery {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 备案申请id
|
||||
* 备案变更id
|
||||
*/
|
||||
@ApiModelProperty(value = "备案申请id")
|
||||
private Long filingId;
|
||||
@ApiModelProperty(value = "备案变更id")
|
||||
private Long filingChangeId;
|
||||
/**
|
||||
* 来源人员id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -21,11 +21,11 @@ public class QualFilingPersonnelChangeUpdateCmd implements Serializable {
|
|||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long id;
|
||||
/**
|
||||
* 备案申请id
|
||||
* 备案变更id
|
||||
*/
|
||||
@ApiModelProperty(value = "备案申请id", required = true)
|
||||
@NotNull(message = "备案申请id不能为空")
|
||||
private Long filingId;
|
||||
@ApiModelProperty(value = "备案变更id", required = true)
|
||||
@NotNull(message = "备案变更id不能为空")
|
||||
private Long filingChangeId;
|
||||
/**
|
||||
* 来源人员id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ public class QualFilingCommitmentChangeCo extends ClientObject {
|
|||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long id;
|
||||
/**
|
||||
* 备案申请id
|
||||
* 备案变更id
|
||||
*/
|
||||
@ApiModelProperty(value = "备案申请id")
|
||||
private Long filingId;
|
||||
@ApiModelProperty(value = "备案变更id")
|
||||
private Long filingChangeId;
|
||||
/**
|
||||
* 承诺内容
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ public class QualFilingEquipmentChangeCo extends ClientObject {
|
|||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long id;
|
||||
/**
|
||||
* 备案申请id
|
||||
* 备案变更id
|
||||
*/
|
||||
@ApiModelProperty(value = "备案申请id")
|
||||
private Long filingId;
|
||||
@ApiModelProperty(value = "备案变更id")
|
||||
private Long filingChangeId;
|
||||
/**
|
||||
* 来源装备id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@ public class QualFilingMaterialChangeCo extends ClientObject {
|
|||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long id;
|
||||
/**
|
||||
* 备案申请id
|
||||
* 备案变更id
|
||||
*/
|
||||
@ApiModelProperty(value = "备案申请id")
|
||||
private Long filingId;
|
||||
@ApiModelProperty(value = "备案变更id")
|
||||
private Long filingChangeId;
|
||||
/**
|
||||
* 材料类型1,申请材料目录(原件),2,申请书(原件),3,法人证明(复印件),4,三年内无重大违法失信记录查询证明,5,法定代表人承诺书(原件),6,固定资产法定证明材料,7,工作场所及档案室面积证明,8,安全评价师专业能力证明,9,相关负责人证明材料,10,机构内部管理制度
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ public class QualFilingPersonnelCertChangeCo extends ClientObject {
|
|||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long id;
|
||||
/**
|
||||
* 备案申请id
|
||||
* 备案变更id
|
||||
*/
|
||||
@ApiModelProperty(value = "备案申请id")
|
||||
private Long filingId;
|
||||
@ApiModelProperty(value = "备案变更id")
|
||||
private Long filingChangeId;
|
||||
/**
|
||||
* 备案人员id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ public class QualFilingPersonnelChangeCo extends ClientObject {
|
|||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long id;
|
||||
/**
|
||||
* 备案申请id
|
||||
* 备案变更id
|
||||
*/
|
||||
@ApiModelProperty(value = "备案申请id")
|
||||
private Long filingId;
|
||||
@ApiModelProperty(value = "备案变更id")
|
||||
private Long filingChangeId;
|
||||
/**
|
||||
* 来源人员id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ public class QualFilingChangeCO {
|
|||
@ApiModelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "原始备案ID")
|
||||
private Long originFilingId;
|
||||
@ApiModelProperty(value = "备案申请ID")
|
||||
private Long filingId;
|
||||
|
||||
@ApiModelProperty(value = "变更备案ID")
|
||||
private Long changeFilingId;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
package org.qinan.safetyeval.client.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.qinan.safetyeval.client.change.request.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class AggregationSaveOrEditQualFilingChangeCmd {
|
||||
|
||||
@ApiModelProperty(hidden = true, value = "是否变更新增")
|
||||
private boolean add;
|
||||
|
||||
@ApiModelProperty(value = "基本信息")
|
||||
private QualFilingChangeAddCmd qualFilingChangeAddCmd;
|
||||
|
||||
@ApiModelProperty(value = "备案承诺书")
|
||||
private QualFilingCommitmentChangeAddCmd qualFilingCommitmentChangeAddCmd;
|
||||
|
||||
@ApiModelProperty(value = "备案装备")
|
||||
private List<QualFilingEquipmentChangeAddCmd> qualFilingEquipmentChangeAddCmds;
|
||||
|
||||
@ApiModelProperty(value = "备案材料清单")
|
||||
private List<QualFilingMaterialChangeAddCmd> qualFilingMaterialChangeAddCmds;
|
||||
|
||||
@ApiModelProperty(value = "备案人员")
|
||||
private List<QualFilingPersonnelChangeAddCmd> qualFilingPersonnelChangeAddCmds;
|
||||
|
||||
@ApiModelProperty(value = "备案人员证书列表")
|
||||
private List<QualFilingPersonnelCertChangeAddCmd> qualFilingPersonnelCertChangeAddCmds;
|
||||
}
|
||||
|
|
@ -12,8 +12,14 @@ import lombok.Data;
|
|||
@Data
|
||||
public class QualFilingChangeAddCmd {
|
||||
|
||||
@ApiModelProperty(value = "原备案申请id")
|
||||
private Long originFilingId;
|
||||
@ApiModelProperty(value = "id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "备案申请id")
|
||||
private Long filingId;
|
||||
|
||||
@ApiModelProperty(value = "关联变更的id")
|
||||
private Long changeFilingId;
|
||||
|
||||
@ApiModelProperty(value = "备案属地编码")
|
||||
private String filingTerritoryCode;
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ public class QualFilingChangeModifyCmd {
|
|||
@ApiModelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "原备案申请id")
|
||||
private Long originFilingId;
|
||||
@ApiModelProperty(value = "备案申请id")
|
||||
private Long filingId;
|
||||
|
||||
@ApiModelProperty(value = "备案属地编码")
|
||||
private String filingTerritoryCode;
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ public class QualFilingChangePageQuery extends BasePageQuery {
|
|||
@ApiModelProperty(value = "单位id")
|
||||
private Long orgId;
|
||||
|
||||
@ApiModelProperty(value = "原备案申请id")
|
||||
private Long originFilingId;
|
||||
@ApiModelProperty(value = "备案申请id")
|
||||
private Long filingId;
|
||||
|
||||
@ApiModelProperty(value = "备案编号")
|
||||
private String filingNo;
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ public class QualFilingCommitmentChangeE extends BaseE {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 备案申请id
|
||||
* 备案变更id
|
||||
*/
|
||||
private Long filingId;
|
||||
private Long filingChangeId;
|
||||
/**
|
||||
* 承诺内容
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ public class QualFilingEquipmentChangeE extends BaseE {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 备案申请id
|
||||
* 备案变更id
|
||||
*/
|
||||
private Long filingId;
|
||||
private Long filingChangeId;
|
||||
/**
|
||||
* 来源装备id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ public class QualFilingMaterialChangeE extends BaseE {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 备案申请id
|
||||
* 备案变更id
|
||||
*/
|
||||
private Long filingId;
|
||||
private Long filingChangeId;
|
||||
/**
|
||||
* 材料类型1,申请材料目录(原件),2,申请书(原件),3,法人证明(复印件),4,三年内无重大违法失信记录查询证明,5,法定代表人承诺书(原件),6,固定资产法定证明材料,7,工作场所及档案室面积证明,8,安全评价师专业能力证明,9,相关负责人证明材料,10,机构内部管理制度
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ public class QualFilingPersonnelCertChangeE extends BaseE {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 备案申请id
|
||||
* 备案变更id
|
||||
*/
|
||||
private Long filingId;
|
||||
private Long filingChangeId;
|
||||
/**
|
||||
* 备案人员id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ public class QualFilingPersonnelChangeE extends BaseE {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 备案申请id
|
||||
* 备案变更id
|
||||
*/
|
||||
private Long filingId;
|
||||
private Long filingChangeId;
|
||||
/**
|
||||
* 来源人员id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ public class QualFilingChangeEntity {
|
|||
/** 机构ID */
|
||||
private Long orgId;
|
||||
|
||||
/** 原备案申请ID */
|
||||
private Long originFilingId;
|
||||
/** 备案申请ID */
|
||||
private Long filingId;
|
||||
|
||||
/** 关联变更草稿ID */
|
||||
private Long changeFilingId;
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ public interface QualFilingChangeDetailGateway {
|
|||
|
||||
List<QualFilingChangeDetailEntity> listByChangeId(Long changeId);
|
||||
|
||||
List<QualFilingChangeDetailEntity> listByOriginFilingId(Long originFilingId);
|
||||
List<QualFilingChangeDetailEntity> listByFilingId(Long filingId);
|
||||
|
||||
int countByOriginFilingId(Long originFilingId);
|
||||
int countByFilingId(Long filingId);
|
||||
|
||||
QualFilingChangeDetailEntity modify(QualFilingChangeDetailEntity entity);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
package org.qinan.safetyeval.domain.gateway;
|
||||
|
||||
import org.qinan.safetyeval.domain.change.model.QualFilingCommitmentChangeE;
|
||||
import org.qinan.safetyeval.domain.change.model.QualFilingEquipmentChangeE;
|
||||
import org.qinan.safetyeval.domain.change.model.QualFilingMaterialChangeE;
|
||||
import org.qinan.safetyeval.domain.change.model.QualFilingPersonnelCertChangeE;
|
||||
import org.qinan.safetyeval.domain.change.model.QualFilingPersonnelChangeE;
|
||||
import org.qinan.safetyeval.domain.entity.QualFilingChangeEntity;
|
||||
import org.qinan.safetyeval.domain.query.QualFilingChangeQuery;
|
||||
import org.qinan.safetyeval.domain.query.PageResult;
|
||||
|
|
@ -16,11 +21,17 @@ public interface QualFilingChangeGateway {
|
|||
|
||||
QualFilingChangeEntity get(Long id);
|
||||
|
||||
List<QualFilingChangeEntity> listByOriginFilingId(Long originFilingId);
|
||||
List<QualFilingChangeEntity> listByFilingId(Long filingId);
|
||||
|
||||
int countByFilingIdAndStatusNot(Long filingId, Integer excludeStatusCode);
|
||||
|
||||
QualFilingChangeEntity modify(QualFilingChangeEntity entity);
|
||||
|
||||
void delete(Long id);
|
||||
|
||||
PageResult<QualFilingChangeEntity> page(QualFilingChangeQuery query);
|
||||
|
||||
Long aggregationSaveOrEdit(QualFilingChangeEntity entity, QualFilingCommitmentChangeE commitmentEntity,
|
||||
List<QualFilingEquipmentChangeE> equipmentEntities, List<QualFilingMaterialChangeE> materialEntities,
|
||||
List<QualFilingPersonnelChangeE> personnelEntities, List<QualFilingPersonnelCertChangeE> personnelCertEntities);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@ public class QualFilingChangeQuery {
|
|||
/** 机构ID */
|
||||
private Long orgId;
|
||||
|
||||
/** 原备案ID */
|
||||
private Long originFilingId;
|
||||
/** 备案申请ID */
|
||||
private Long filingId;
|
||||
|
||||
/** 备案编号 */
|
||||
private String filingNo;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
package org.qinan.safetyeval.domain.service;
|
||||
|
||||
import org.qinan.safetyeval.domain.change.model.QualFilingCommitmentChangeE;
|
||||
import org.qinan.safetyeval.domain.change.model.QualFilingEquipmentChangeE;
|
||||
import org.qinan.safetyeval.domain.change.model.QualFilingMaterialChangeE;
|
||||
import org.qinan.safetyeval.domain.change.model.QualFilingPersonnelCertChangeE;
|
||||
import org.qinan.safetyeval.domain.change.model.QualFilingPersonnelChangeE;
|
||||
import org.qinan.safetyeval.domain.entity.QualFilingChangeEntity;
|
||||
import org.qinan.safetyeval.domain.exception.BizException;
|
||||
import org.qinan.safetyeval.domain.exception.ErrorCode;
|
||||
|
|
@ -7,6 +12,8 @@ import org.qinan.safetyeval.domain.gateway.QualFilingChangeGateway;
|
|||
import org.qinan.safetyeval.domain.query.QualFilingChangeQuery;
|
||||
import org.qinan.safetyeval.domain.query.PageResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
|
@ -29,6 +36,14 @@ public class QualFilingChangeDomainService {
|
|||
return qualFilingChangeGateway.get(id);
|
||||
}
|
||||
|
||||
public List<QualFilingChangeEntity> listByFilingId(Long filingId) {
|
||||
return qualFilingChangeGateway.listByFilingId(filingId);
|
||||
}
|
||||
|
||||
public int countByFilingIdAndStatusNot(Long filingId, Integer excludeStatusCode) {
|
||||
return qualFilingChangeGateway.countByFilingIdAndStatusNot(filingId, excludeStatusCode);
|
||||
}
|
||||
|
||||
public QualFilingChangeEntity modify(QualFilingChangeEntity entity) {
|
||||
QualFilingChangeEntity existing = qualFilingChangeGateway.get(entity.getId());
|
||||
if (existing == null) {
|
||||
|
|
@ -48,4 +63,10 @@ public class QualFilingChangeDomainService {
|
|||
public PageResult<QualFilingChangeEntity> page(QualFilingChangeQuery query) {
|
||||
return qualFilingChangeGateway.page(query);
|
||||
}
|
||||
|
||||
public Long aggregationSaveOrEdit(QualFilingChangeEntity entity, QualFilingCommitmentChangeE commitmentEntity,
|
||||
List<QualFilingEquipmentChangeE> equipmentEntities, List<QualFilingMaterialChangeE> materialEntities,
|
||||
List<QualFilingPersonnelChangeE> personnelEntities, List<QualFilingPersonnelCertChangeE> personnelCertEntities) {
|
||||
return qualFilingChangeGateway.aggregationSaveOrEdit(entity, commitmentEntity, equipmentEntities, materialEntities, personnelEntities, personnelCertEntities);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
package org.qinan.safetyeval.infrastructure.convertor;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.qinan.safetyeval.domain.entity.QualFilingChangeEntity;
|
||||
import org.qinan.safetyeval.infrastructure.dataobject.QualFilingChangeDO;
|
||||
|
||||
/**
|
||||
* 备案变更基本信息DO对象转换
|
||||
*
|
||||
* @author safety-eval
|
||||
*/
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface QualFilingChangeDoConvertor {
|
||||
|
||||
/**
|
||||
* 领域对象转DO
|
||||
*
|
||||
* @param qualFilingChangeEntity
|
||||
* @return
|
||||
*/
|
||||
QualFilingChangeDO convertEeToDo(QualFilingChangeEntity qualFilingChangeEntity);
|
||||
}
|
||||
|
|
@ -1,9 +1,11 @@
|
|||
package org.qinan.safetyeval.infrastructure.convertor;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.qinan.safetyeval.client.change.request.QualFilingPersonnelCertChangePageQry;
|
||||
import org.qinan.safetyeval.client.change.response.QualFilingPersonnelCertChangeCo;
|
||||
import org.qinan.safetyeval.domain.change.model.QualFilingPersonnelCertChangeE;
|
||||
import org.qinan.safetyeval.infrastructure.dataobject.OrgPersonnelCertDO;
|
||||
import org.qinan.safetyeval.infrastructure.persistence.domainobject.QualFilingPersonnelCertChangeDO;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -50,4 +52,16 @@ public interface QualFilingPersonnelCertChangeDoConvertor {
|
|||
* @return
|
||||
*/
|
||||
List<QualFilingPersonnelCertChangeCo> converDosToCos(List<QualFilingPersonnelCertChangeDO> qualFilingPersonnelCertChangeDos);
|
||||
|
||||
/**
|
||||
* OrgPersonnelCertDO转QualFilingPersonnelCertChangeDO
|
||||
*
|
||||
* @param orgPersonnelCertDO
|
||||
* @return
|
||||
*/
|
||||
@Mapping(target = "id", ignore = true)
|
||||
@Mapping(target = "filingChangeId", ignore = true)
|
||||
@Mapping(target = "filingPersonnelId", source = "personnelId")
|
||||
@Mapping(target = "sourceCertId", source = "id")
|
||||
QualFilingPersonnelCertChangeDO convertOrgDoToChangeDo(OrgPersonnelCertDO orgPersonnelCertDO);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ public class QualFilingChangeDO {
|
|||
|
||||
private Long id;
|
||||
private Long orgId;
|
||||
private Long originFilingId;
|
||||
private Long filingId;
|
||||
private Long changeFilingId;
|
||||
private String rejectReason;
|
||||
private LocalDateTime submitTime;
|
||||
|
|
|
|||
|
|
@ -52,14 +52,14 @@ public class QualFilingChangeDetailGatewayImpl implements QualFilingChangeDetail
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<QualFilingChangeDetailEntity> listByOriginFilingId(Long originFilingId) {
|
||||
List<QualFilingChangeDetailDO> dataObjects = qualFilingChangeDetailMapper.selectByOriginFilingId(originFilingId);
|
||||
public List<QualFilingChangeDetailEntity> listByFilingId(Long filingId) {
|
||||
List<QualFilingChangeDetailDO> dataObjects = qualFilingChangeDetailMapper.selectByFilingId(filingId);
|
||||
return dataObjects.stream().map(this::toEntity).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int countByOriginFilingId(Long originFilingId) {
|
||||
return qualFilingChangeDetailMapper.countByOriginFilingId(originFilingId);
|
||||
public int countByFilingId(Long filingId) {
|
||||
return qualFilingChangeDetailMapper.countByFilingId(filingId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -3,18 +3,29 @@ package org.qinan.safetyeval.infrastructure.gatewayimpl;
|
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.qinan.safetyeval.domain.change.model.*;
|
||||
import org.qinan.safetyeval.domain.entity.QualFilingChangeEntity;
|
||||
import org.qinan.safetyeval.domain.exception.BizException;
|
||||
import org.qinan.safetyeval.domain.exception.ErrorCode;
|
||||
import org.qinan.safetyeval.domain.gateway.QualFilingChangeGateway;
|
||||
import org.qinan.safetyeval.domain.query.QualFilingChangeQuery;
|
||||
import org.qinan.safetyeval.domain.query.PageResult;
|
||||
import org.qinan.safetyeval.domain.query.QualFilingChangeQuery;
|
||||
import org.qinan.safetyeval.infrastructure.convertor.*;
|
||||
import org.qinan.safetyeval.infrastructure.dataobject.OrgPersonnelCertDO;
|
||||
import org.qinan.safetyeval.infrastructure.dataobject.QualFilingChangeDO;
|
||||
import org.qinan.safetyeval.infrastructure.mapper.OrgPersonnelCertMapper;
|
||||
import org.qinan.safetyeval.infrastructure.mapper.QualFilingChangeMapper;
|
||||
import org.qinan.safetyeval.infrastructure.persistence.domainobject.*;
|
||||
import org.qinan.safetyeval.infrastructure.persistence.mapper.*;
|
||||
import org.qinan.safetyeval.infrastructure.support.InsertFieldDefaults;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
|
|
@ -27,6 +38,30 @@ public class QualFilingChangeGatewayImpl implements QualFilingChangeGateway {
|
|||
|
||||
@Resource
|
||||
private QualFilingChangeMapper qualFilingChangeMapper;
|
||||
@Resource
|
||||
private QualFilingCommitmentChangeMapper qualFilingCommitmentChangeMapper;
|
||||
@Resource
|
||||
private QualFilingEquipmentChangeMapper qualFilingEquipmentChangeMapper;
|
||||
@Resource
|
||||
private QualFilingMaterialChangeMapper qualFilingMaterialChangeMapper;
|
||||
@Resource
|
||||
private QualFilingPersonnelChangeMapper qualFilingPersonnelChangeMapper;
|
||||
@Resource
|
||||
private QualFilingPersonnelCertChangeMapper qualFilingPersonnelCertChangeMapper;
|
||||
@Resource
|
||||
private OrgPersonnelCertMapper orgPersonnelCertMapper;
|
||||
@Resource
|
||||
private QualFilingChangeDoConvertor qualFilingChangeDoConvertor;
|
||||
@Resource
|
||||
private QualFilingCommitmentChangeDoConvertor qualFilingCommitmentChangeDoConvertor;
|
||||
@Resource
|
||||
private QualFilingEquipmentChangeDoConvertor qualFilingEquipmentChangeDoConvertor;
|
||||
@Resource
|
||||
private QualFilingMaterialChangeDoConvertor qualFilingMaterialChangeDoConvertor;
|
||||
@Resource
|
||||
private QualFilingPersonnelChangeDoConvertor qualFilingPersonnelChangeDoConvertor;
|
||||
@Resource
|
||||
private QualFilingPersonnelCertChangeDoConvertor qualFilingPersonnelCertChangeDoConvertor;
|
||||
|
||||
@Override
|
||||
public QualFilingChangeEntity save(QualFilingChangeEntity entity) {
|
||||
|
|
@ -42,15 +77,24 @@ public class QualFilingChangeGatewayImpl implements QualFilingChangeGateway {
|
|||
QualFilingChangeDO dataObject = qualFilingChangeMapper.selectById(id);
|
||||
return toEntity(dataObject);
|
||||
}
|
||||
@Override
|
||||
public List<QualFilingChangeEntity> listByOriginFilingId(Long originFilingId) {
|
||||
|
||||
@Override
|
||||
public List<QualFilingChangeEntity> listByFilingId(Long filingId) {
|
||||
LambdaQueryWrapper<QualFilingChangeDO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(QualFilingChangeDO::getOriginFilingId, originFilingId);
|
||||
wrapper.eq(QualFilingChangeDO::getFilingId, filingId);
|
||||
wrapper.eq(QualFilingChangeDO::getDeleteEnum, "false");
|
||||
List<QualFilingChangeDO> dataObjects = qualFilingChangeMapper.selectList(wrapper);
|
||||
return dataObjects.stream().map(this::toEntity).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int countByFilingIdAndStatusNot(Long filingId, Integer excludeStatusCode) {
|
||||
LambdaQueryWrapper<QualFilingChangeDO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(QualFilingChangeDO::getFilingId, filingId);
|
||||
wrapper.ne(QualFilingChangeDO::getFilingStatusCode, excludeStatusCode);
|
||||
return qualFilingChangeMapper.selectCount(wrapper).intValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public QualFilingChangeEntity modify(QualFilingChangeEntity entity) {
|
||||
QualFilingChangeDO dataObject = toDO(entity);
|
||||
|
|
@ -72,8 +116,8 @@ public class QualFilingChangeGatewayImpl implements QualFilingChangeGateway {
|
|||
if (query.getOrgId() != null) {
|
||||
wrapper.eq(QualFilingChangeDO::getOrgId, query.getOrgId());
|
||||
}
|
||||
if (query.getOriginFilingId() != null) {
|
||||
wrapper.eq(QualFilingChangeDO::getOriginFilingId, query.getOriginFilingId());
|
||||
if (query.getFilingId() != null) {
|
||||
wrapper.eq(QualFilingChangeDO::getFilingId, query.getFilingId());
|
||||
}
|
||||
if (StringUtils.hasText(query.getFilingNo())) {
|
||||
wrapper.eq(QualFilingChangeDO::getFilingNo, query.getFilingNo());
|
||||
|
|
@ -92,9 +136,96 @@ public class QualFilingChangeGatewayImpl implements QualFilingChangeGateway {
|
|||
return PageResult.of(entities, result.getTotal(), result.getCurrent(), result.getSize());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Long aggregationSaveOrEdit(QualFilingChangeEntity entity, QualFilingCommitmentChangeE commitmentEntity
|
||||
, List<QualFilingEquipmentChangeE> equipmentEntities, List<QualFilingMaterialChangeE> materialEntities
|
||||
, List<QualFilingPersonnelChangeE> personnelEntities, List<QualFilingPersonnelCertChangeE> personnelCertEntities) {
|
||||
//保存基础信息
|
||||
QualFilingChangeDO dataObject = qualFilingChangeDoConvertor.convertEeToDo(entity);
|
||||
if (Objects.nonNull(dataObject.getId())) {
|
||||
// 编辑
|
||||
qualFilingChangeMapper.updateById(dataObject);
|
||||
} else {
|
||||
qualFilingChangeMapper.insert(dataObject);
|
||||
}
|
||||
if (Objects.isNull(dataObject.getId())) {
|
||||
throw new BizException(ErrorCode.QUAL_FILING_CHANGE_NOT_FOUND);
|
||||
}
|
||||
|
||||
qualFilingCommitmentChangeMapper.delete(new LambdaQueryWrapper<QualFilingCommitmentChangeDO>()
|
||||
.eq(QualFilingCommitmentChangeDO::getFilingChangeId,dataObject.getChangeFilingId()));
|
||||
qualFilingMaterialChangeMapper.delete(new LambdaQueryWrapper<QualFilingMaterialChangeDO>()
|
||||
.eq(QualFilingMaterialChangeDO::getFilingChangeId,dataObject.getChangeFilingId()));
|
||||
qualFilingEquipmentChangeMapper.delete(new LambdaQueryWrapper<QualFilingEquipmentChangeDO>()
|
||||
.eq(QualFilingEquipmentChangeDO::getFilingChangeId,dataObject.getChangeFilingId()));
|
||||
|
||||
qualFilingPersonnelCertChangeMapper.delete(new LambdaQueryWrapper<QualFilingPersonnelCertChangeDO>()
|
||||
.eq(QualFilingPersonnelCertChangeDO::getFilingChangeId,dataObject.getChangeFilingId()));
|
||||
qualFilingPersonnelChangeMapper.delete(new LambdaQueryWrapper<QualFilingPersonnelChangeDO>()
|
||||
.eq(QualFilingPersonnelChangeDO::getFilingChangeId,dataObject.getChangeFilingId()));
|
||||
|
||||
//备案承诺书
|
||||
QualFilingCommitmentChangeDO commitmentDataObject = qualFilingCommitmentChangeDoConvertor.convertEeToDo(commitmentEntity);
|
||||
InsertFieldDefaults.apply(commitmentDataObject);
|
||||
commitmentDataObject.setFilingChangeId(dataObject.getId());
|
||||
qualFilingCommitmentChangeMapper.insert(commitmentDataObject);
|
||||
//备案装备
|
||||
equipmentEntities.stream().map(item -> {
|
||||
QualFilingEquipmentChangeDO equipmentDataObject = qualFilingEquipmentChangeDoConvertor.convertEeToDo(item);
|
||||
InsertFieldDefaults.apply(equipmentDataObject);
|
||||
equipmentDataObject.setFilingChangeId(dataObject.getId());
|
||||
return equipmentDataObject;
|
||||
}).collect(Collectors.toList()).forEach(
|
||||
equipmentDataObject -> qualFilingEquipmentChangeMapper.insert(equipmentDataObject));
|
||||
//备案材料
|
||||
materialEntities.stream().map(item -> {
|
||||
QualFilingMaterialChangeDO materialDataObject = qualFilingMaterialChangeDoConvertor.convertEeToDo(item);
|
||||
InsertFieldDefaults.apply(materialDataObject);
|
||||
materialDataObject.setFilingChangeId(dataObject.getId());
|
||||
return materialDataObject;
|
||||
}).collect(Collectors.toList()).forEach(
|
||||
materialDataObject -> qualFilingMaterialChangeMapper.insert(materialDataObject));
|
||||
//备案人员
|
||||
personnelEntities.stream().map(item -> {
|
||||
QualFilingPersonnelChangeDO personnelDataObject = qualFilingPersonnelChangeDoConvertor.convertEeToDo(item);
|
||||
InsertFieldDefaults.apply(personnelDataObject);
|
||||
personnelDataObject.setFilingChangeId(dataObject.getId());
|
||||
return personnelDataObject;
|
||||
}).collect(Collectors.toList()).forEach(
|
||||
personnelDataObject -> qualFilingPersonnelChangeMapper.insert(personnelDataObject));
|
||||
//备案人员证书
|
||||
if (CollectionUtils.isEmpty(personnelCertEntities)) {
|
||||
List<Long> sourcePersonnelIds = personnelEntities
|
||||
.stream().map(QualFilingPersonnelChangeE::getSourcePersonnelId).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(sourcePersonnelIds)) {
|
||||
List<OrgPersonnelCertDO> orgPersonnelCertDOS = orgPersonnelCertMapper.selectList(new LambdaQueryWrapper<OrgPersonnelCertDO>()
|
||||
.eq(OrgPersonnelCertDO::getPersonnelId, sourcePersonnelIds));
|
||||
if (!CollectionUtils.isEmpty(orgPersonnelCertDOS)) {
|
||||
for (OrgPersonnelCertDO orgPersonnelCertDO : orgPersonnelCertDOS) {
|
||||
QualFilingPersonnelCertChangeDO qualFilingPersonnelCertChangeDO =
|
||||
qualFilingPersonnelCertChangeDoConvertor.convertOrgDoToChangeDo(orgPersonnelCertDO);
|
||||
InsertFieldDefaults.apply(qualFilingPersonnelCertChangeDO);
|
||||
qualFilingPersonnelCertChangeDO.setFilingChangeId(dataObject.getId());
|
||||
qualFilingPersonnelCertChangeMapper.insert(qualFilingPersonnelCertChangeDO);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
personnelCertEntities.stream().map(item -> {
|
||||
QualFilingPersonnelCertChangeDO personnelCertDataObject = qualFilingPersonnelCertChangeDoConvertor.convertEeToDo(item);
|
||||
InsertFieldDefaults.apply(personnelCertDataObject);
|
||||
personnelCertDataObject.setFilingChangeId(dataObject.getId());
|
||||
return personnelCertDataObject;
|
||||
}).collect(Collectors.toList()).forEach(
|
||||
personnelCertDataObject -> qualFilingPersonnelCertChangeMapper.insert(personnelCertDataObject));
|
||||
}
|
||||
return dataObject.getId();
|
||||
}
|
||||
|
||||
private QualFilingChangeDO toDO(QualFilingChangeEntity entity) {
|
||||
QualFilingChangeDO dataObject = new QualFilingChangeDO();
|
||||
dataObject.setOriginFilingId(entity.getOriginFilingId());
|
||||
dataObject.setFilingId(entity.getFilingId());
|
||||
dataObject.setChangeFilingId(entity.getChangeFilingId());
|
||||
dataObject.setRejectReason(entity.getRejectReason());
|
||||
dataObject.setSubmitTime(entity.getSubmitTime());
|
||||
|
|
@ -131,7 +262,7 @@ public class QualFilingChangeGatewayImpl implements QualFilingChangeGateway {
|
|||
}
|
||||
QualFilingChangeEntity entity = new QualFilingChangeEntity();
|
||||
entity.setId(dataObject.getId());
|
||||
entity.setOriginFilingId(dataObject.getOriginFilingId());
|
||||
entity.setFilingId(dataObject.getFilingId());
|
||||
entity.setChangeFilingId(dataObject.getChangeFilingId());
|
||||
entity.setRejectReason(dataObject.getRejectReason());
|
||||
entity.setSubmitTime(dataObject.getSubmitTime());
|
||||
|
|
|
|||
|
|
@ -14,12 +14,12 @@ public interface QualFilingChangeDetailMapper extends BaseMapper<QualFilingChang
|
|||
|
||||
@Select("SELECT d.* FROM qual_filing_change_detail d "
|
||||
+ "INNER JOIN qual_filing_change c ON d.change_id = c.id "
|
||||
+ "WHERE c.origin_filing_id = #{originFilingId} AND d.delete_enum = 'false' AND c.delete_enum = 'false' "
|
||||
+ "WHERE c.filing_id = #{filingId} AND d.delete_enum = 'false' AND c.delete_enum = 'false' "
|
||||
+ "ORDER BY d.create_time DESC")
|
||||
List<QualFilingChangeDetailDO> selectByOriginFilingId(@Param("originFilingId") Long originFilingId);
|
||||
List<QualFilingChangeDetailDO> selectByFilingId(@Param("filingId") Long filingId);
|
||||
|
||||
@Select("SELECT COUNT(1) FROM qual_filing_change_detail d "
|
||||
+ "INNER JOIN qual_filing_change c ON d.change_id = c.id "
|
||||
+ "WHERE c.origin_filing_id = #{originFilingId} AND d.delete_enum = 'false' AND c.delete_enum = 'false'")
|
||||
int countByOriginFilingId(@Param("originFilingId") Long originFilingId);
|
||||
+ "WHERE c.filing_id = #{filingId} AND d.delete_enum = 'false' AND c.delete_enum = 'false'")
|
||||
int countByFilingId(@Param("filingId") Long filingId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ public class QualFilingCommitmentChangeDO extends BaseDO {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 备案申请id
|
||||
* 备案变更id
|
||||
*/
|
||||
private Long filingId;
|
||||
private Long filingChangeId;
|
||||
/**
|
||||
* 承诺内容
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@ public class QualFilingEquipmentChangeDO extends BaseDO {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 备案申请id
|
||||
* 备案变更id
|
||||
*/
|
||||
private Long filingId;
|
||||
private Long filingChangeId;
|
||||
/**
|
||||
* 来源装备id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ public class QualFilingMaterialChangeDO extends BaseDO {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 备案申请id
|
||||
* 备案变更id
|
||||
*/
|
||||
private Long filingId;
|
||||
private Long filingChangeId;
|
||||
/**
|
||||
* 材料类型1,申请材料目录(原件),2,申请书(原件),3,法人证明(复印件),4,三年内无重大违法失信记录查询证明,5,法定代表人承诺书(原件),6,固定资产法定证明材料,7,工作场所及档案室面积证明,8,安全评价师专业能力证明,9,相关负责人证明材料,10,机构内部管理制度
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ public class QualFilingPersonnelCertChangeDO extends BaseDO {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 备案申请id
|
||||
* 备案变更id
|
||||
*/
|
||||
private Long filingId;
|
||||
private Long filingChangeId;
|
||||
/**
|
||||
* 备案人员id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ public class QualFilingPersonnelChangeDO extends BaseDO {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 备案申请id
|
||||
* 备案变更id
|
||||
*/
|
||||
private Long filingId;
|
||||
private Long filingChangeId;
|
||||
/**
|
||||
* 来源人员id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ public class QualFilingCommitmentChangeRepositoryImpl extends BaseRepositoryImpl
|
|||
@Override
|
||||
public IPage<QualFilingCommitmentChangeDO> listQualFilingCommitmentChangePage(IPage iPage, QualFilingCommitmentChangePageQry qualFilingCommitmentChangePageQry) {
|
||||
QueryWrapper<QualFilingCommitmentChangeDO> qualFilingCommitmentChangeDoQueryWrapper = new QueryWrapper<>();
|
||||
if (ObjectUtil.isNotEmpty(qualFilingCommitmentChangePageQry.getFilingId())) {
|
||||
qualFilingCommitmentChangeDoQueryWrapper.eq("filing_id", qualFilingCommitmentChangePageQry.getFilingId());
|
||||
if (ObjectUtil.isNotEmpty(qualFilingCommitmentChangePageQry.getFilingChangeId())) {
|
||||
qualFilingCommitmentChangeDoQueryWrapper.eq("filing_change_id", qualFilingCommitmentChangePageQry.getFilingChangeId());
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(qualFilingCommitmentChangePageQry.getCommitmentContent())) {
|
||||
qualFilingCommitmentChangeDoQueryWrapper.eq("commitment_content", qualFilingCommitmentChangePageQry.getCommitmentContent());
|
||||
|
|
@ -82,7 +82,7 @@ public class QualFilingCommitmentChangeRepositoryImpl extends BaseRepositoryImpl
|
|||
@Override
|
||||
public QualFilingCommitmentChangeDO getByFilingId(Long filingId) {
|
||||
return super.lambdaQuery()
|
||||
.eq(QualFilingCommitmentChangeDO::getFilingId, filingId)
|
||||
.eq(QualFilingCommitmentChangeDO::getFilingChangeId, filingId)
|
||||
.eq(QualFilingCommitmentChangeDO::getDeleteEnum, BooleanEnum.FALSE.getValue())
|
||||
.one();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ public class QualFilingEquipmentChangeRepositoryImpl extends BaseRepositoryImpl<
|
|||
@Override
|
||||
public IPage<QualFilingEquipmentChangeDO> listQualFilingEquipmentChangePage(IPage iPage, QualFilingEquipmentChangePageQry qualFilingEquipmentChangePageQry) {
|
||||
QueryWrapper<QualFilingEquipmentChangeDO> qualFilingEquipmentChangeDoQueryWrapper = new QueryWrapper<>();
|
||||
if (ObjectUtil.isNotEmpty(qualFilingEquipmentChangePageQry.getFilingId())) {
|
||||
qualFilingEquipmentChangeDoQueryWrapper.eq("filing_id", qualFilingEquipmentChangePageQry.getFilingId());
|
||||
if (ObjectUtil.isNotEmpty(qualFilingEquipmentChangePageQry.getFilingChangeId())) {
|
||||
qualFilingEquipmentChangeDoQueryWrapper.eq("filing_change_id", qualFilingEquipmentChangePageQry.getFilingChangeId());
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(qualFilingEquipmentChangePageQry.getSourceEquipmentId())) {
|
||||
qualFilingEquipmentChangeDoQueryWrapper.eq("source_equipment_id", qualFilingEquipmentChangePageQry.getSourceEquipmentId());
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ public class QualFilingMaterialChangeRepositoryImpl extends BaseRepositoryImpl<Q
|
|||
@Override
|
||||
public IPage<QualFilingMaterialChangeDO> listQualFilingMaterialChangePage(IPage iPage, QualFilingMaterialChangePageQry qualFilingMaterialChangePageQry) {
|
||||
QueryWrapper<QualFilingMaterialChangeDO> qualFilingMaterialChangeDoQueryWrapper = new QueryWrapper<>();
|
||||
if (ObjectUtil.isNotEmpty(qualFilingMaterialChangePageQry.getFilingId())) {
|
||||
qualFilingMaterialChangeDoQueryWrapper.eq("filing_id", qualFilingMaterialChangePageQry.getFilingId());
|
||||
if (ObjectUtil.isNotEmpty(qualFilingMaterialChangePageQry.getFilingChangeId())) {
|
||||
qualFilingMaterialChangeDoQueryWrapper.eq("filing_change_id", qualFilingMaterialChangePageQry.getFilingChangeId());
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(qualFilingMaterialChangePageQry.getMaterialType())) {
|
||||
qualFilingMaterialChangeDoQueryWrapper.eq("material_type", qualFilingMaterialChangePageQry.getMaterialType());
|
||||
|
|
@ -97,7 +97,7 @@ public class QualFilingMaterialChangeRepositoryImpl extends BaseRepositoryImpl<Q
|
|||
@Override
|
||||
public int countByFilingIdAndUploadStatusCodeAndMaterialType(Long filingId, Integer uploadStatusCode, String materialType) {
|
||||
return super.lambdaQuery()
|
||||
.eq(QualFilingMaterialChangeDO::getFilingId, filingId)
|
||||
.eq(QualFilingMaterialChangeDO::getFilingChangeId, filingId)
|
||||
.eq(QualFilingMaterialChangeDO::getDeleteEnum, BooleanEnum.FALSE.getValue())
|
||||
.eq(QualFilingMaterialChangeDO::getUploadStatusCode, uploadStatusCode)
|
||||
.eq(QualFilingMaterialChangeDO::getMaterialType, materialType)
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ public class QualFilingPersonnelCertChangeRepositoryImpl extends BaseRepositoryI
|
|||
@Override
|
||||
public IPage<QualFilingPersonnelCertChangeDO> listQualFilingPersonnelCertChangePage(IPage iPage, QualFilingPersonnelCertChangePageQry qualFilingPersonnelCertChangePageQry) {
|
||||
QueryWrapper<QualFilingPersonnelCertChangeDO> qualFilingPersonnelCertChangeDoQueryWrapper = new QueryWrapper<>();
|
||||
if (ObjectUtil.isNotEmpty(qualFilingPersonnelCertChangePageQry.getFilingId())) {
|
||||
qualFilingPersonnelCertChangeDoQueryWrapper.eq("filing_id", qualFilingPersonnelCertChangePageQry.getFilingId());
|
||||
if (ObjectUtil.isNotEmpty(qualFilingPersonnelCertChangePageQry.getFilingChangeId())) {
|
||||
qualFilingPersonnelCertChangeDoQueryWrapper.eq("filing_change_id", qualFilingPersonnelCertChangePageQry.getFilingChangeId());
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(qualFilingPersonnelCertChangePageQry.getFilingPersonnelId())) {
|
||||
qualFilingPersonnelCertChangeDoQueryWrapper.eq("filing_personnel_id", qualFilingPersonnelCertChangePageQry.getFilingPersonnelId());
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ public class QualFilingPersonnelChangeRepositoryImpl extends BaseRepositoryImpl<
|
|||
@Override
|
||||
public IPage<QualFilingPersonnelChangeDO> listQualFilingPersonnelChangePage(IPage iPage, QualFilingPersonnelChangePageQry qualFilingPersonnelChangePageQry) {
|
||||
QueryWrapper<QualFilingPersonnelChangeDO> qualFilingPersonnelChangeDoQueryWrapper = new QueryWrapper<>();
|
||||
if (ObjectUtil.isNotEmpty(qualFilingPersonnelChangePageQry.getFilingId())) {
|
||||
qualFilingPersonnelChangeDoQueryWrapper.eq("filing_id", qualFilingPersonnelChangePageQry.getFilingId());
|
||||
if (ObjectUtil.isNotEmpty(qualFilingPersonnelChangePageQry.getFilingChangeId())) {
|
||||
qualFilingPersonnelChangeDoQueryWrapper.eq("filing_change_id", qualFilingPersonnelChangePageQry.getFilingChangeId());
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(qualFilingPersonnelChangePageQry.getSourcePersonnelId())) {
|
||||
qualFilingPersonnelChangeDoQueryWrapper.eq("source_personnel_id", qualFilingPersonnelChangePageQry.getSourcePersonnelId());
|
||||
|
|
@ -139,7 +139,7 @@ public class QualFilingPersonnelChangeRepositoryImpl extends BaseRepositoryImpl<
|
|||
@Override
|
||||
public java.util.List<QualFilingPersonnelChangeDO> listByFilingId(Long filingId) {
|
||||
return super.lambdaQuery()
|
||||
.eq(QualFilingPersonnelChangeDO::getFilingId, filingId)
|
||||
.eq(QualFilingPersonnelChangeDO::getFilingChangeId, filingId)
|
||||
.eq(QualFilingPersonnelChangeDO::getDeleteEnum, BooleanEnum.FALSE.getValue())
|
||||
.list();
|
||||
}
|
||||
|
|
@ -147,7 +147,7 @@ public class QualFilingPersonnelChangeRepositoryImpl extends BaseRepositoryImpl<
|
|||
@Override
|
||||
public int countByFilingId(Long filingId) {
|
||||
return super.lambdaQuery()
|
||||
.eq(QualFilingPersonnelChangeDO::getFilingId, filingId)
|
||||
.eq(QualFilingPersonnelChangeDO::getFilingChangeId, filingId)
|
||||
.eq(QualFilingPersonnelChangeDO::getDeleteEnum, BooleanEnum.FALSE.getValue())
|
||||
.count().intValue();
|
||||
}
|
||||
|
|
@ -155,7 +155,7 @@ public class QualFilingPersonnelChangeRepositoryImpl extends BaseRepositoryImpl<
|
|||
@Override
|
||||
public int countByFilingIdAndRegisterEngineerFlag(Long filingId, Integer registerEngineerFlag) {
|
||||
return super.lambdaQuery()
|
||||
.eq(QualFilingPersonnelChangeDO::getFilingId, filingId)
|
||||
.eq(QualFilingPersonnelChangeDO::getFilingChangeId, filingId)
|
||||
.eq(QualFilingPersonnelChangeDO::getDeleteEnum, BooleanEnum.FALSE.getValue())
|
||||
.eq(QualFilingPersonnelChangeDO::getRegisterEngineerFlag, registerEngineerFlag)
|
||||
.count().intValue();
|
||||
|
|
@ -164,7 +164,7 @@ public class QualFilingPersonnelChangeRepositoryImpl extends BaseRepositoryImpl<
|
|||
@Override
|
||||
public int countByFilingIdAndJoinWorkDateAfter(Long filingId, java.time.LocalDate joinWorkDate) {
|
||||
return super.lambdaQuery()
|
||||
.eq(QualFilingPersonnelChangeDO::getFilingId, filingId)
|
||||
.eq(QualFilingPersonnelChangeDO::getFilingChangeId, filingId)
|
||||
.eq(QualFilingPersonnelChangeDO::getDeleteEnum, BooleanEnum.FALSE.getValue())
|
||||
.gt(QualFilingPersonnelChangeDO::getJoinWorkDate, joinWorkDate)
|
||||
.count().intValue();
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<resultMap id="BaseResultMap" type="org.qinan.safetyeval.infrastructure.dataobject.QualFilingChangeDO">
|
||||
<id column="id" property="id"/>
|
||||
<result column="org_id" property="orgId"/>
|
||||
<result column="origin_filing_id" property="originFilingId"/>
|
||||
<result column="filing_id" property="filingId"/>
|
||||
<result column="change_filing_id" property="changeFilingId"/>
|
||||
<result column="reject_reason" property="rejectReason"/>
|
||||
<result column="submit_time" property="submitTime"/>
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
`id`, `org_id`, `origin_filing_id`, `change_filing_id`, `reject_reason`, `submit_time`, `filing_territory_code`, `filing_territory_name`, `filing_unit_name`, `filing_unit_type_code`, `filing_unit_type_name`, `filing_no`, `business_scope`, `register_address`, `office_address`, `credit_code`, `qual_cert_no`, `legal_person_phone`, `contact_phone`, `info_disclosure_url`, `fixed_asset_amount`, `archive_room_area`, `fulltime_evaluator_count`, `registered_engineer_count`, `workplace_area`, `unit_intro`, `attachment_url`, `filing_status_code`, `filing_status_name`, `delete_enum`, `remarks`, `create_name`, `update_name`, `tenant_id`, `version`, `create_time`, `update_time`, `create_id`, `update_id`, `env`
|
||||
`id`, `org_id`, `filing_id`, `change_filing_id`, `reject_reason`, `submit_time`, `filing_territory_code`, `filing_territory_name`, `filing_unit_name`, `filing_unit_type_code`, `filing_unit_type_name`, `filing_no`, `business_scope`, `register_address`, `office_address`, `credit_code`, `qual_cert_no`, `legal_person_phone`, `contact_phone`, `info_disclosure_url`, `fixed_asset_amount`, `archive_room_area`, `fulltime_evaluator_count`, `registered_engineer_count`, `workplace_area`, `unit_intro`, `attachment_url`, `filing_status_code`, `filing_status_name`, `delete_enum`, `remarks`, `create_name`, `update_name`, `tenant_id`, `version`, `create_time`, `update_time`, `create_id`, `update_id`, `env`
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<resultMap type="org.qinan.safetyeval.infrastructure.persistence.domainobject.QualFilingCommitmentChangeDO"
|
||||
id="QualFilingCommitmentChangeResult">
|
||||
<id property="id" column="id"/>
|
||||
<result property="filingId" column="filing_id"/>
|
||||
<result property="filingChangeId" column="filing_change_id"/>
|
||||
<result property="commitmentContent" column="commitment_content"/>
|
||||
<result property="legalRepSignatureUrl" column="legal_rep_signature_url"/>
|
||||
<result property="signDate" column="sign_date"/>
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
<sql id="selectQualFilingCommitmentChange">
|
||||
select id,
|
||||
filing_id,
|
||||
filing_change_id,
|
||||
commitment_content,
|
||||
legal_rep_signature_url,
|
||||
sign_date,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<resultMap type="org.qinan.safetyeval.infrastructure.persistence.domainobject.QualFilingEquipmentChangeDO"
|
||||
id="QualFilingEquipmentChangeResult">
|
||||
<id property="id" column="id"/>
|
||||
<result property="filingId" column="filing_id"/>
|
||||
<result property="filingChangeId" column="filing_change_id"/>
|
||||
<result property="sourceEquipmentId" column="source_equipment_id"/>
|
||||
<result property="deviceName" column="device_name"/>
|
||||
<result property="deviceModel" column="device_model"/>
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
<sql id="selectQualFilingEquipmentChange">
|
||||
select id,
|
||||
filing_id,
|
||||
filing_change_id,
|
||||
source_equipment_id,
|
||||
device_name,
|
||||
device_model,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<resultMap type="org.qinan.safetyeval.infrastructure.persistence.domainobject.QualFilingMaterialChangeDO"
|
||||
id="QualFilingMaterialChangeResult">
|
||||
<id property="id" column="id"/>
|
||||
<result property="filingId" column="filing_id"/>
|
||||
<result property="filingChangeId" column="filing_change_id"/>
|
||||
<result property="materialType" column="material_type"/>
|
||||
<result property="materialContent" column="material_content"/>
|
||||
<result property="materialFormat" column="material_format"/>
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
<sql id="selectQualFilingMaterialChange">
|
||||
select id,
|
||||
filing_id,
|
||||
filing_change_id,
|
||||
material_type,
|
||||
material_content,
|
||||
material_format,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<resultMap type="org.qinan.safetyeval.infrastructure.persistence.domainobject.QualFilingPersonnelCertChangeDO"
|
||||
id="QualFilingPersonnelCertChangeResult">
|
||||
<id property="id" column="id"/>
|
||||
<result property="filingId" column="filing_id"/>
|
||||
<result property="filingChangeId" column="filing_change_id"/>
|
||||
<result property="filingPersonnelId" column="filing_personnel_id"/>
|
||||
<result property="certName" column="cert_name"/>
|
||||
<result property="certTypeCode" column="cert_type_code"/>
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
<sql id="selectQualFilingPersonnelCertChange">
|
||||
select id,
|
||||
filing_id,
|
||||
filing_change_id,
|
||||
filing_personnel_id,
|
||||
cert_name,
|
||||
cert_type_code,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<resultMap type="org.qinan.safetyeval.infrastructure.persistence.domainobject.QualFilingPersonnelChangeDO"
|
||||
id="QualFilingPersonnelChangeResult">
|
||||
<id property="id" column="id"/>
|
||||
<result property="filingId" column="filing_id"/>
|
||||
<result property="filingChangeId" column="filing_change_id"/>
|
||||
<result property="sourcePersonnelId" column="source_personnel_id"/>
|
||||
<result property="personName" column="person_name"/>
|
||||
<result property="personTypeCode" column="person_type_code"/>
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
<sql id="selectQualFilingPersonnelChange">
|
||||
select id,
|
||||
filing_id,
|
||||
filing_change_id,
|
||||
source_personnel_id,
|
||||
person_name,
|
||||
person_type_code,
|
||||
|
|
|
|||
Loading…
Reference in New Issue