Merge remote-tracking branch 'origin/dev-tmp1' into dev-tmp1
commit
9fea0bffa5
|
|
@ -63,7 +63,9 @@ public class AccountExecutor implements AccountApi {
|
||||||
public SingleResponse<AccountCO> add(AccountAddCmd cmd) {
|
public SingleResponse<AccountCO> add(AccountAddCmd cmd) {
|
||||||
smsRemote.signValidCode(cmd.getPhone(), cmd.getVerificationCode());
|
smsRemote.signValidCode(cmd.getPhone(), cmd.getVerificationCode());
|
||||||
AccountEntity entity = new AccountEntity();
|
AccountEntity entity = new AccountEntity();
|
||||||
entity.setUserName(cmd.getUserName());
|
if (cmd.getUserName() == null) {
|
||||||
|
entity.setUserName(cmd.getAccount());
|
||||||
|
}
|
||||||
entity.setAccount(cmd.getAccount());
|
entity.setAccount(cmd.getAccount());
|
||||||
entity.setPhone(cmd.getPhone());
|
entity.setPhone(cmd.getPhone());
|
||||||
entity.setPassword(cmd.getPassword());
|
entity.setPassword(cmd.getPassword());
|
||||||
|
|
|
||||||
|
|
@ -28,10 +28,8 @@ import org.qinan.safetyeval.infrastructure.dataobject.*;
|
||||||
import org.qinan.safetyeval.infrastructure.mapper.*;
|
import org.qinan.safetyeval.infrastructure.mapper.*;
|
||||||
import org.qinan.safetyeval.infrastructure.persistence.mapper.QualFilingPersonnelChangeMapper;
|
import org.qinan.safetyeval.infrastructure.persistence.mapper.QualFilingPersonnelChangeMapper;
|
||||||
import org.qinan.safetyeval.infrastructure.support.InsertFieldDefaults;
|
import org.qinan.safetyeval.infrastructure.support.InsertFieldDefaults;
|
||||||
import org.qinan.safetyeval.infrastructure.utils.CommonUtil;
|
|
||||||
import org.qinan.safetyeval.infrastructure.utils.ComplianceCheckUtil;
|
import org.qinan.safetyeval.infrastructure.utils.ComplianceCheckUtil;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
@ -104,8 +102,10 @@ public class QualFilingChangeExecutor implements QualFilingChangeApi {
|
||||||
@Resource
|
@Resource
|
||||||
private QualFilingChangeDetailGateway qualFilingChangeDetailGateway;
|
private QualFilingChangeDetailGateway qualFilingChangeDetailGateway;
|
||||||
|
|
||||||
@Value("${def.reviewEnable:false}")
|
@Resource
|
||||||
private Boolean reviewEnable;
|
private QualFilingCommitmentMapper qualFilingCommitmentMapper;
|
||||||
|
@Resource
|
||||||
|
private QualFilingEquipmentMapper qualFilingEquipmentMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SingleResponse<QualFilingChangeCO> add(QualFilingChangeAddCmd cmd) {
|
public SingleResponse<QualFilingChangeCO> add(QualFilingChangeAddCmd cmd) {
|
||||||
|
|
@ -198,6 +198,7 @@ public class QualFilingChangeExecutor implements QualFilingChangeApi {
|
||||||
domainQuery.setFilingUnitName(query.getFilingUnitName());
|
domainQuery.setFilingUnitName(query.getFilingUnitName());
|
||||||
domainQuery.setFilingTerritoryCode(query.getFilingTerritoryCode());
|
domainQuery.setFilingTerritoryCode(query.getFilingTerritoryCode());
|
||||||
domainQuery.setFilingStatusCode(query.getFilingStatusCode());
|
domainQuery.setFilingStatusCode(query.getFilingStatusCode());
|
||||||
|
domainQuery.setCreditCode(query.getCreditCode());
|
||||||
PageResult<QualFilingChangeEntity> pageResult = qualFilingChangeDomainService.page(domainQuery);
|
PageResult<QualFilingChangeEntity> pageResult = qualFilingChangeDomainService.page(domainQuery);
|
||||||
List<QualFilingChangeCO> cos = pageResult.getRecords().stream()
|
List<QualFilingChangeCO> cos = pageResult.getRecords().stream()
|
||||||
.map(this::toCO)
|
.map(this::toCO)
|
||||||
|
|
@ -305,8 +306,6 @@ public class QualFilingChangeExecutor implements QualFilingChangeApi {
|
||||||
public SingleResponse<List<QualFilingComplianceCheckResultCO>> aggregationSaveOrEdit(
|
public SingleResponse<List<QualFilingComplianceCheckResultCO>> aggregationSaveOrEdit(
|
||||||
AggregationSaveOrEditQualFilingChangeCmd cmd, boolean throwException) {
|
AggregationSaveOrEditQualFilingChangeCmd cmd, boolean throwException) {
|
||||||
validateBeforeSaveOrEdit(cmd);
|
validateBeforeSaveOrEdit(cmd);
|
||||||
|
|
||||||
cmd.getQualFilingCommitmentChangeAddCmd().setLegalRepSignatureUrl(CommonUtil.COLON);
|
|
||||||
// 合规性校验:只要有一项未通过则抛出异常
|
// 合规性校验:只要有一项未通过则抛出异常
|
||||||
AggregationSaveOrEditQualFilingCmd qualFilingCmd = convertToQualFilingCmd(cmd);
|
AggregationSaveOrEditQualFilingCmd qualFilingCmd = convertToQualFilingCmd(cmd);
|
||||||
List<QualFilingComplianceCheckResultCO> complianceResults = ComplianceCheckUtil.complianceCheck(qualFilingCmd, throwException);
|
List<QualFilingComplianceCheckResultCO> complianceResults = ComplianceCheckUtil.complianceCheck(qualFilingCmd, throwException);
|
||||||
|
|
@ -370,6 +369,8 @@ public class QualFilingChangeExecutor implements QualFilingChangeApi {
|
||||||
Long changeId = cmd.getOriginChangeFilingId();
|
Long changeId = cmd.getOriginChangeFilingId();
|
||||||
List<QualFilingChangeDetailDO> details = new ArrayList<>();
|
List<QualFilingChangeDetailDO> details = new ArrayList<>();
|
||||||
details.addAll(diffBasicInfoDetail(changeId, entity, cmd));
|
details.addAll(diffBasicInfoDetail(changeId, entity, cmd));
|
||||||
|
details.addAll(diffCommitmentDetail(changeId, commitmentEntity, cmd));
|
||||||
|
details.addAll(diffEquipmentDetail(changeId, equipmentEntities, cmd));
|
||||||
details.addAll(diffMaterialDetail(changeId, materialEntities, cmd));
|
details.addAll(diffMaterialDetail(changeId, materialEntities, cmd));
|
||||||
details.addAll(diffManagementPersonnelDetail(changeId, personnelEntities, cmd));
|
details.addAll(diffManagementPersonnelDetail(changeId, personnelEntities, cmd));
|
||||||
// 根据changeId先删除原有变更明细,再新增
|
// 根据changeId先删除原有变更明细,再新增
|
||||||
|
|
@ -494,7 +495,6 @@ public class QualFilingChangeExecutor implements QualFilingChangeApi {
|
||||||
// 人员清单
|
// 人员清单
|
||||||
List<QualFilingPersonnelChangeInfoCO> personnelList = qualFilingPersonnelChangeMapper.getFillingChangePersonInfo(changeFilingId);
|
List<QualFilingPersonnelChangeInfoCO> personnelList = qualFilingPersonnelChangeMapper.getFillingChangePersonInfo(changeFilingId);
|
||||||
if (!CollectionUtils.isEmpty(personnelList)) {
|
if (!CollectionUtils.isEmpty(personnelList)) {
|
||||||
setProfessionalCapabilityCodeList(personnelList);
|
|
||||||
detail.setPersonnelList(personnelList);
|
detail.setPersonnelList(personnelList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -625,6 +625,42 @@ public class QualFilingChangeExecutor implements QualFilingChangeApi {
|
||||||
return diffBasicInfo(changeId, filingDO, newEntity);
|
return diffBasicInfo(changeId, filingDO, newEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 法定代表人承诺书变更明细(对比原表 qual_filing_commitment,根据 filing_id 查询)
|
||||||
|
*/
|
||||||
|
private List<QualFilingChangeDetailDO> diffCommitmentDetail(
|
||||||
|
Long changeId, QualFilingCommitmentChangeE newCommitment, AggregationSaveOrEditQualFilingChangeCmd cmd) {
|
||||||
|
QualFilingCommitmentDO existCommitment = qualFilingCommitmentMapper.selectOne(
|
||||||
|
new LambdaQueryWrapper<QualFilingCommitmentDO>()
|
||||||
|
.select(QualFilingCommitmentDO::getLegalRepPersonnelId,
|
||||||
|
QualFilingCommitmentDO::getLegalRepName)
|
||||||
|
.eq(QualFilingCommitmentDO::getFilingId, cmd.getQualFilingChangeAddCmd().getFilingId()));
|
||||||
|
if (existCommitment == null) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
List<QualFilingChangeDetailDO> details = new ArrayList<>();
|
||||||
|
// 法定代表人机构人员id
|
||||||
|
if (!Objects.equals(existCommitment.getLegalRepPersonnelId(), newCommitment != null ? newCommitment.getLegalRepPersonnelId() : null)) {
|
||||||
|
String beforeName = Objects.toString(existCommitment.getLegalRepName(), "");
|
||||||
|
String afterName = Objects.toString(newCommitment != null ? newCommitment.getLegalRepName() : null, "");
|
||||||
|
details.add(fieldDetail(changeId, QualFilingFormStepEnum.COMMITMENT, "法定代表人承诺书变更",
|
||||||
|
"法定代表人", beforeName, afterName));
|
||||||
|
}
|
||||||
|
return details;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装备清单变更明细(对比原表 qual_filing_equipment,根据 filing_id 查询)
|
||||||
|
* 检测装备的增减和字段修改
|
||||||
|
*/
|
||||||
|
private List<QualFilingChangeDetailDO> diffEquipmentDetail(
|
||||||
|
Long changeId, List<QualFilingEquipmentChangeE> newEquipments, AggregationSaveOrEditQualFilingChangeCmd cmd) {
|
||||||
|
List<QualFilingEquipmentDO> existingEquipments = qualFilingEquipmentMapper.selectList(
|
||||||
|
new LambdaQueryWrapper<QualFilingEquipmentDO>()
|
||||||
|
.eq(QualFilingEquipmentDO::getFilingId, cmd.getQualFilingChangeAddCmd().getFilingId()));
|
||||||
|
return diffEquipment(changeId, existingEquipments, newEquipments);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 材料变更明细
|
* 材料变更明细
|
||||||
*/
|
*/
|
||||||
|
|
@ -650,10 +686,89 @@ public class QualFilingChangeExecutor implements QualFilingChangeApi {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 基本信息变更明细(仅对比法定代表人、专职安全评价师数量、注册安全工程师数量)
|
* 基本信息变更明细
|
||||||
*/
|
*/
|
||||||
private List<QualFilingChangeDetailDO> diffBasicInfo(Long changeId, QualFilingDO exist, QualFilingChangeEntity newEntity) {
|
private List<QualFilingChangeDetailDO> diffBasicInfo(Long changeId, QualFilingDO exist, QualFilingChangeEntity newEntity) {
|
||||||
List<QualFilingChangeDetailDO> details = new ArrayList<>();
|
List<QualFilingChangeDetailDO> details = new ArrayList<>();
|
||||||
|
// 备案属地编码
|
||||||
|
if (!Objects.equals(exist.getFilingTerritoryCode(), newEntity.getFilingTerritoryCode())) {
|
||||||
|
details.add(fieldDetail(changeId, QualFilingFormStepEnum.BASIC_INFO, "备案基本信息变更",
|
||||||
|
"备案属地编码",
|
||||||
|
Objects.toString(exist.getFilingTerritoryCode(), ""),
|
||||||
|
Objects.toString(newEntity.getFilingTerritoryCode(), "")));
|
||||||
|
}
|
||||||
|
// 备案属地名称
|
||||||
|
if (!Objects.equals(exist.getFilingTerritoryName(), newEntity.getFilingTerritoryName())) {
|
||||||
|
details.add(fieldDetail(changeId, QualFilingFormStepEnum.BASIC_INFO, "备案基本信息变更",
|
||||||
|
"备案属地名称",
|
||||||
|
Objects.toString(exist.getFilingTerritoryName(), ""),
|
||||||
|
Objects.toString(newEntity.getFilingTerritoryName(), "")));
|
||||||
|
}
|
||||||
|
// 备案单位
|
||||||
|
if (!Objects.equals(exist.getFilingUnitName(), newEntity.getFilingUnitName())) {
|
||||||
|
details.add(fieldDetail(changeId, QualFilingFormStepEnum.BASIC_INFO, "备案基本信息变更",
|
||||||
|
"备案单位",
|
||||||
|
Objects.toString(exist.getFilingUnitName(), ""),
|
||||||
|
Objects.toString(newEntity.getFilingUnitName(), "")));
|
||||||
|
}
|
||||||
|
// 备案单位类型编码
|
||||||
|
if (!Objects.equals(exist.getFilingUnitTypeCode(), newEntity.getFilingUnitTypeCode())) {
|
||||||
|
details.add(fieldDetail(changeId, QualFilingFormStepEnum.BASIC_INFO, "备案基本信息变更",
|
||||||
|
"备案单位类型编码",
|
||||||
|
Objects.toString(exist.getFilingUnitTypeCode(), ""),
|
||||||
|
Objects.toString(newEntity.getFilingUnitTypeCode(), "")));
|
||||||
|
}
|
||||||
|
// 备案单位类型名称
|
||||||
|
if (!Objects.equals(exist.getFilingUnitTypeName(), newEntity.getFilingUnitTypeName())) {
|
||||||
|
details.add(fieldDetail(changeId, QualFilingFormStepEnum.BASIC_INFO, "备案基本信息变更",
|
||||||
|
"备案单位类型名称",
|
||||||
|
Objects.toString(exist.getFilingUnitTypeName(), ""),
|
||||||
|
Objects.toString(newEntity.getFilingUnitTypeName(), "")));
|
||||||
|
}
|
||||||
|
// 备案编号
|
||||||
|
if (!Objects.equals(exist.getFilingNo(), newEntity.getFilingNo())) {
|
||||||
|
details.add(fieldDetail(changeId, QualFilingFormStepEnum.BASIC_INFO, "备案基本信息变更",
|
||||||
|
"备案编号",
|
||||||
|
Objects.toString(exist.getFilingNo(), ""),
|
||||||
|
Objects.toString(newEntity.getFilingNo(), "")));
|
||||||
|
}
|
||||||
|
// 备案安全评价业务范围
|
||||||
|
String existBusinessScope = exist.getBusinessScope();
|
||||||
|
String newBusinessScope = newEntity.getBusinessScope() != null ? String.join(",", newEntity.getBusinessScope()) : "";
|
||||||
|
if (!Objects.equals(existBusinessScope, newBusinessScope)) {
|
||||||
|
details.add(fieldDetail(changeId, QualFilingFormStepEnum.BASIC_INFO, "备案基本信息变更",
|
||||||
|
"备案安全评价业务范围",
|
||||||
|
Objects.toString(existBusinessScope, ""),
|
||||||
|
newBusinessScope));
|
||||||
|
}
|
||||||
|
// 注册地址
|
||||||
|
if (!Objects.equals(exist.getRegisterAddress(), newEntity.getRegisterAddress())) {
|
||||||
|
details.add(fieldDetail(changeId, QualFilingFormStepEnum.BASIC_INFO, "备案基本信息变更",
|
||||||
|
"注册地址",
|
||||||
|
Objects.toString(exist.getRegisterAddress(), ""),
|
||||||
|
Objects.toString(newEntity.getRegisterAddress(), "")));
|
||||||
|
}
|
||||||
|
// 办公地址
|
||||||
|
if (!Objects.equals(exist.getOfficeAddress(), newEntity.getOfficeAddress())) {
|
||||||
|
details.add(fieldDetail(changeId, QualFilingFormStepEnum.BASIC_INFO, "备案基本信息变更",
|
||||||
|
"办公地址",
|
||||||
|
Objects.toString(exist.getOfficeAddress(), ""),
|
||||||
|
Objects.toString(newEntity.getOfficeAddress(), "")));
|
||||||
|
}
|
||||||
|
// 统一社会信用代码
|
||||||
|
if (!Objects.equals(exist.getCreditCode(), newEntity.getCreditCode())) {
|
||||||
|
details.add(fieldDetail(changeId, QualFilingFormStepEnum.BASIC_INFO, "备案基本信息变更",
|
||||||
|
"统一社会信用代码",
|
||||||
|
Objects.toString(exist.getCreditCode(), ""),
|
||||||
|
Objects.toString(newEntity.getCreditCode(), "")));
|
||||||
|
}
|
||||||
|
// 资质证书编号
|
||||||
|
if (!Objects.equals(exist.getQualCertNo(), newEntity.getQualCertNo())) {
|
||||||
|
details.add(fieldDetail(changeId, QualFilingFormStepEnum.BASIC_INFO, "备案基本信息变更",
|
||||||
|
"资质证书编号",
|
||||||
|
Objects.toString(exist.getQualCertNo(), ""),
|
||||||
|
Objects.toString(newEntity.getQualCertNo(), "")));
|
||||||
|
}
|
||||||
// 法定代表人
|
// 法定代表人
|
||||||
if (!Objects.equals(exist.getLegalRepresentative(), newEntity.getLegalRepresentative())) {
|
if (!Objects.equals(exist.getLegalRepresentative(), newEntity.getLegalRepresentative())) {
|
||||||
details.add(fieldDetail(changeId, QualFilingFormStepEnum.BASIC_INFO, "备案基本信息变更",
|
details.add(fieldDetail(changeId, QualFilingFormStepEnum.BASIC_INFO, "备案基本信息变更",
|
||||||
|
|
@ -661,6 +776,55 @@ public class QualFilingChangeExecutor implements QualFilingChangeApi {
|
||||||
Objects.toString(exist.getLegalRepresentative(), ""),
|
Objects.toString(exist.getLegalRepresentative(), ""),
|
||||||
Objects.toString(newEntity.getLegalRepresentative(), "")));
|
Objects.toString(newEntity.getLegalRepresentative(), "")));
|
||||||
}
|
}
|
||||||
|
// 法人代表及电话
|
||||||
|
if (!Objects.equals(exist.getLegalPersonPhone(), newEntity.getLegalPersonPhone())) {
|
||||||
|
details.add(fieldDetail(changeId, QualFilingFormStepEnum.BASIC_INFO, "备案基本信息变更",
|
||||||
|
"法人代表及电话",
|
||||||
|
Objects.toString(exist.getLegalPersonPhone(), ""),
|
||||||
|
Objects.toString(newEntity.getLegalPersonPhone(), "")));
|
||||||
|
}
|
||||||
|
// 联系人
|
||||||
|
if (!Objects.equals(exist.getContactName(), newEntity.getContactName())) {
|
||||||
|
details.add(fieldDetail(changeId, QualFilingFormStepEnum.BASIC_INFO, "备案基本信息变更",
|
||||||
|
"联系人",
|
||||||
|
Objects.toString(exist.getContactName(), ""),
|
||||||
|
Objects.toString(newEntity.getContactName(), "")));
|
||||||
|
}
|
||||||
|
// 联系人及电话
|
||||||
|
if (!Objects.equals(exist.getContactPhone(), newEntity.getContactPhone())) {
|
||||||
|
details.add(fieldDetail(changeId, QualFilingFormStepEnum.BASIC_INFO, "备案基本信息变更",
|
||||||
|
"联系人及电话",
|
||||||
|
Objects.toString(exist.getContactPhone(), ""),
|
||||||
|
Objects.toString(newEntity.getContactPhone(), "")));
|
||||||
|
}
|
||||||
|
// 传真
|
||||||
|
if (!Objects.equals(exist.getFax(), newEntity.getFax())) {
|
||||||
|
details.add(fieldDetail(changeId, QualFilingFormStepEnum.BASIC_INFO, "备案基本信息变更",
|
||||||
|
"传真",
|
||||||
|
Objects.toString(exist.getFax(), ""),
|
||||||
|
Objects.toString(newEntity.getFax(), "")));
|
||||||
|
}
|
||||||
|
// 信息公开网址
|
||||||
|
if (!Objects.equals(exist.getInfoDisclosureUrl(), newEntity.getInfoDisclosureUrl())) {
|
||||||
|
details.add(fieldDetail(changeId, QualFilingFormStepEnum.BASIC_INFO, "备案基本信息变更",
|
||||||
|
"信息公开网址",
|
||||||
|
Objects.toString(exist.getInfoDisclosureUrl(), ""),
|
||||||
|
Objects.toString(newEntity.getInfoDisclosureUrl(), "")));
|
||||||
|
}
|
||||||
|
// 固定资产总值
|
||||||
|
if (!Objects.equals(exist.getFixedAssetAmount(), newEntity.getFixedAssetAmount())) {
|
||||||
|
details.add(fieldDetail(changeId, QualFilingFormStepEnum.BASIC_INFO, "备案基本信息变更",
|
||||||
|
"固定资产总值(单位:分)",
|
||||||
|
Objects.toString(exist.getFixedAssetAmount(), ""),
|
||||||
|
Objects.toString(newEntity.getFixedAssetAmount(), "")));
|
||||||
|
}
|
||||||
|
// 档案室面积(平方米)
|
||||||
|
if (!Objects.equals(exist.getArchiveRoomArea(), newEntity.getArchiveRoomArea())) {
|
||||||
|
details.add(fieldDetail(changeId, QualFilingFormStepEnum.BASIC_INFO, "备案基本信息变更",
|
||||||
|
"档案室面积(平方米)",
|
||||||
|
Objects.toString(exist.getArchiveRoomArea(), ""),
|
||||||
|
Objects.toString(newEntity.getArchiveRoomArea(), "")));
|
||||||
|
}
|
||||||
// 专职安全评价师数量(人)
|
// 专职安全评价师数量(人)
|
||||||
if (!Objects.equals(exist.getFulltimeEvaluatorCount(), newEntity.getFulltimeEvaluatorCount())) {
|
if (!Objects.equals(exist.getFulltimeEvaluatorCount(), newEntity.getFulltimeEvaluatorCount())) {
|
||||||
details.add(fieldDetail(changeId, QualFilingFormStepEnum.BASIC_INFO, "备案基本信息变更",
|
details.add(fieldDetail(changeId, QualFilingFormStepEnum.BASIC_INFO, "备案基本信息变更",
|
||||||
|
|
@ -675,6 +839,27 @@ public class QualFilingChangeExecutor implements QualFilingChangeApi {
|
||||||
Objects.toString(exist.getRegisteredEngineerCount(), ""),
|
Objects.toString(exist.getRegisteredEngineerCount(), ""),
|
||||||
Objects.toString(newEntity.getRegisteredEngineerCount(), "")));
|
Objects.toString(newEntity.getRegisteredEngineerCount(), "")));
|
||||||
}
|
}
|
||||||
|
// 工作场所建筑面积(平方米)
|
||||||
|
if (!Objects.equals(exist.getWorkplaceArea(), newEntity.getWorkplaceArea())) {
|
||||||
|
details.add(fieldDetail(changeId, QualFilingFormStepEnum.BASIC_INFO, "备案基本信息变更",
|
||||||
|
"工作场所建筑面积(平方米)",
|
||||||
|
Objects.toString(exist.getWorkplaceArea(), ""),
|
||||||
|
Objects.toString(newEntity.getWorkplaceArea(), "")));
|
||||||
|
}
|
||||||
|
// 单位基本情况介绍
|
||||||
|
if (!Objects.equals(exist.getUnitIntro(), newEntity.getUnitIntro())) {
|
||||||
|
details.add(fieldDetail(changeId, QualFilingFormStepEnum.BASIC_INFO, "备案基本信息变更",
|
||||||
|
"单位基本情况介绍",
|
||||||
|
Objects.toString(exist.getUnitIntro(), ""),
|
||||||
|
Objects.toString(newEntity.getUnitIntro(), "")));
|
||||||
|
}
|
||||||
|
// 单位基本情况附件地址
|
||||||
|
if (!Objects.equals(exist.getAttachmentUrl(), newEntity.getAttachmentUrl())) {
|
||||||
|
details.add(fieldDetail(changeId, QualFilingFormStepEnum.BASIC_INFO, "备案基本信息变更",
|
||||||
|
"单位基本情况附件地址",
|
||||||
|
Objects.toString(exist.getAttachmentUrl(), ""),
|
||||||
|
Objects.toString(newEntity.getAttachmentUrl(), "")));
|
||||||
|
}
|
||||||
return details;
|
return details;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -731,6 +916,84 @@ public class QualFilingChangeExecutor implements QualFilingChangeApi {
|
||||||
return details;
|
return details;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装备清单变更明细。
|
||||||
|
* existList 为原表 qual_filing_equipment 数据,newList 为本次提交的装备变更。
|
||||||
|
* 按 sourceEquipmentId 对比增减,对共有装备逐字段对比修改。
|
||||||
|
*/
|
||||||
|
private List<QualFilingChangeDetailDO> diffEquipment(Long changeId
|
||||||
|
, List<QualFilingEquipmentDO> existList, List<QualFilingEquipmentChangeE> newList) {
|
||||||
|
List<QualFilingChangeDetailDO> details = new ArrayList<>();
|
||||||
|
// 原始装备: sourceEquipmentId -> DO
|
||||||
|
Map<Long, QualFilingEquipmentDO> existingMap = safeList(existList).stream()
|
||||||
|
.filter(e -> e.getSourceEquipmentId() != null)
|
||||||
|
.collect(Collectors.toMap(QualFilingEquipmentDO::getSourceEquipmentId, e -> e, (a, b) -> a));
|
||||||
|
// 新装备: sourceEquipmentId -> ChangeE
|
||||||
|
Map<Long, QualFilingEquipmentChangeE> newMap = safeList(newList).stream()
|
||||||
|
.filter(e -> e.getSourceEquipmentId() != null)
|
||||||
|
.collect(Collectors.toMap(QualFilingEquipmentChangeE::getSourceEquipmentId, e -> e, (a, b) -> a));
|
||||||
|
|
||||||
|
// 增加
|
||||||
|
for (Map.Entry<Long, QualFilingEquipmentChangeE> entry : newMap.entrySet()) {
|
||||||
|
if (!existingMap.containsKey(entry.getKey())) {
|
||||||
|
QualFilingEquipmentChangeE e = entry.getValue();
|
||||||
|
String desc = equipmentDesc(e.getDeviceName(), e.getDeviceModel());
|
||||||
|
details.add(fieldDetail(changeId, QualFilingFormStepEnum.EQUIPMENT, "装备清单变更",
|
||||||
|
"增加", "", desc));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 减少
|
||||||
|
for (Map.Entry<Long, QualFilingEquipmentDO> entry : existingMap.entrySet()) {
|
||||||
|
if (!newMap.containsKey(entry.getKey())) {
|
||||||
|
QualFilingEquipmentDO e = entry.getValue();
|
||||||
|
String desc = equipmentDesc(e.getDeviceName(), e.getDeviceModel());
|
||||||
|
details.add(fieldDetail(changeId, QualFilingFormStepEnum.EQUIPMENT, "装备清单变更",
|
||||||
|
"减少", desc, ""));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 修改(逐字段对比)
|
||||||
|
for (Map.Entry<Long, QualFilingEquipmentChangeE> entry : newMap.entrySet()) {
|
||||||
|
QualFilingEquipmentDO oldE = existingMap.get(entry.getKey());
|
||||||
|
if (oldE == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
QualFilingEquipmentChangeE newE = entry.getValue();
|
||||||
|
String prefix = equipmentDesc(oldE.getDeviceName(), oldE.getDeviceModel());
|
||||||
|
diffEquipmentField(details, changeId, prefix, "设备名称", oldE.getDeviceName(), newE.getDeviceName());
|
||||||
|
diffEquipmentField(details, changeId, prefix, "设备型号", oldE.getDeviceModel(), newE.getDeviceModel());
|
||||||
|
diffEquipmentField(details, changeId, prefix, "仪器类型编码", oldE.getInstrumentTypeCode(), newE.getInstrumentTypeCode());
|
||||||
|
diffEquipmentField(details, changeId, prefix, "仪器类型名称", oldE.getInstrumentTypeName(), newE.getInstrumentTypeName());
|
||||||
|
diffEquipmentField(details, changeId, prefix, "设备类型编码", oldE.getDeviceTypeCode(), newE.getDeviceTypeCode());
|
||||||
|
diffEquipmentField(details, changeId, prefix, "设备类型名称", oldE.getDeviceTypeName(), newE.getDeviceTypeName());
|
||||||
|
diffEquipmentField(details, changeId, prefix, "厂家", oldE.getManufacturer(), newE.getManufacturer());
|
||||||
|
diffEquipmentField(details, changeId, prefix, "设备价值", oldE.getEquipmentValue(), newE.getEquipmentValue());
|
||||||
|
diffEquipmentField(details, changeId, prefix, "设备流量说明", oldE.getFlowDesc(), newE.getFlowDesc());
|
||||||
|
diffEquipmentField(details, changeId, prefix, "最小流量", oldE.getMinFlow(), newE.getMinFlow());
|
||||||
|
diffEquipmentField(details, changeId, prefix, "最大流量", oldE.getMaxFlow(), newE.getMaxFlow());
|
||||||
|
diffEquipmentField(details, changeId, prefix, "校准单位", oldE.getCalibrationUnit(), newE.getCalibrationUnit());
|
||||||
|
diffEquipmentField(details, changeId, prefix, "校准初始值", oldE.getCalibrationInitValue(), newE.getCalibrationInitValue());
|
||||||
|
diffEquipmentField(details, changeId, prefix, "现场校验类型编码", oldE.getFieldCalibrationTypeCode(), newE.getFieldCalibrationTypeCode());
|
||||||
|
diffEquipmentField(details, changeId, prefix, "现场校验类型名称", oldE.getFieldCalibrationTypeName(), newE.getFieldCalibrationTypeName());
|
||||||
|
diffEquipmentField(details, changeId, prefix, "是否双路", oldE.getDualChannelFlag(), newE.getDualChannelFlag());
|
||||||
|
diffEquipmentField(details, changeId, prefix, "计量检定报告地址", oldE.getCalibrationReportUrl(), newE.getCalibrationReportUrl());
|
||||||
|
}
|
||||||
|
return details;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void diffEquipmentField(List<QualFilingChangeDetailDO> details, Long changeId,
|
||||||
|
String prefix, String fieldName, Object before, Object after) {
|
||||||
|
if (!Objects.equals(before, after)) {
|
||||||
|
details.add(fieldDetail(changeId, QualFilingFormStepEnum.EQUIPMENT, "装备清单变更",
|
||||||
|
prefix + "-" + fieldName,
|
||||||
|
Objects.toString(before, ""),
|
||||||
|
Objects.toString(after, "")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String equipmentDesc(String deviceName, String deviceModel) {
|
||||||
|
return Objects.toString(deviceName, "") + (deviceModel != null ? "(" + deviceModel + ")" : "");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 管理人员变更明细。
|
* 管理人员变更明细。
|
||||||
* existList 为从 qual_filing_personnel 关联 org_personnel 查出的管理人员,newList 为本次提交的人员变更。
|
* existList 为从 qual_filing_personnel 关联 org_personnel 查出的管理人员,newList 为本次提交的人员变更。
|
||||||
|
|
|
||||||
|
|
@ -185,8 +185,9 @@ public class QualFilingExecutor implements QualFilingApi {
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public SingleResponse<List<QualFilingComplianceCheckResultCO>> aggregationSaveOrEdit(AggregationSaveOrEditQualFilingCmd cmd) {
|
public SingleResponse<List<QualFilingComplianceCheckResultCO>> aggregationSaveOrEdit(AggregationSaveOrEditQualFilingCmd cmd) {
|
||||||
if (cmd.getQualFilingAddCmd().getFilingStatusCode() != null
|
boolean nonDraft = cmd.getQualFilingAddCmd().getFilingStatusCode() != null
|
||||||
&& cmd.getQualFilingAddCmd().getFilingStatusCode() != QualFilingStatusEnum.DRAFT.getCode()) {
|
&& cmd.getQualFilingAddCmd().getFilingStatusCode() != QualFilingStatusEnum.DRAFT.getCode();
|
||||||
|
if (nonDraft) {
|
||||||
List<QualFilingComplianceCheckResultCO> complianceResults = ComplianceCheckUtil.complianceCheck(cmd, false);
|
List<QualFilingComplianceCheckResultCO> complianceResults = ComplianceCheckUtil.complianceCheck(cmd, false);
|
||||||
complianceResults = complianceResults.stream()
|
complianceResults = complianceResults.stream()
|
||||||
.filter(r -> QualFilingComplianceCheckEnum.STATUS_FAIL.equals(r.getStatus()))
|
.filter(r -> QualFilingComplianceCheckEnum.STATUS_FAIL.equals(r.getStatus()))
|
||||||
|
|
@ -198,12 +199,14 @@ public class QualFilingExecutor implements QualFilingApi {
|
||||||
// 新增时校验:用当前id查询记录获取org_id,若同机构已存在其他资质备案记录则不允许新增
|
// 新增时校验:用当前id查询记录获取org_id,若同机构已存在其他资质备案记录则不允许新增
|
||||||
Long currentId = cmd.getQualFilingAddCmd().getId();
|
Long currentId = cmd.getQualFilingAddCmd().getId();
|
||||||
if (currentId == null) {
|
if (currentId == null) {
|
||||||
Long count = qualFilingMapper.selectCount(new LambdaQueryWrapper<QualFilingDO>()
|
QualFilingDO one = qualFilingMapper.selectOne(new LambdaQueryWrapper<QualFilingDO>()
|
||||||
|
.select(QualFilingDO::getId)
|
||||||
.eq(QualFilingDO::getOrgId, ThreadLocalUserInfoAdapter.getOrgId())
|
.eq(QualFilingDO::getOrgId, ThreadLocalUserInfoAdapter.getOrgId())
|
||||||
.eq(QualFilingDO::getDeleteEnum, BooleanQAEnum.FALSE.getValue()));
|
.eq(QualFilingDO::getDeleteEnum, BooleanQAEnum.FALSE.getValue()));
|
||||||
if (count != null && count > 0) {
|
if (nonDraft && one != null) {
|
||||||
throw new BizException(ErrorCode.QUAL_FILING_ALREADY_EXISTS);
|
throw new BizException(ErrorCode.QUAL_FILING_ALREADY_EXISTS);
|
||||||
}
|
}
|
||||||
|
cmd.getQualFilingAddCmd().setId(one != null ? one.getId() : null);
|
||||||
}
|
}
|
||||||
|
|
||||||
QualFilingCO co = qualFilingAddCmdConvertor.convertFilingCmdToCO(cmd.getQualFilingAddCmd());
|
QualFilingCO co = qualFilingAddCmdConvertor.convertFilingCmdToCO(cmd.getQualFilingAddCmd());
|
||||||
|
|
|
||||||
|
|
@ -5,19 +5,14 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import org.qinan.safetyeval.app.executor.support.EvalProjectNodeOverviewAssembler;
|
import org.qinan.safetyeval.app.executor.support.EvalProjectNodeOverviewAssembler;
|
||||||
import org.qinan.safetyeval.app.executor.support.RegulatorMonitorCoConverter;
|
import org.qinan.safetyeval.app.executor.support.RegulatorMonitorCoConverter;
|
||||||
import org.qinan.safetyeval.client.api.regulator.RegulatorEvalProjectMonitorApi;
|
import org.qinan.safetyeval.client.api.regulator.RegulatorEvalProjectMonitorApi;
|
||||||
import org.qinan.safetyeval.client.co.regulator.RegulatorEvalProjectMonitorCO;
|
import org.qinan.safetyeval.client.co.regulator.*;
|
||||||
import org.qinan.safetyeval.client.co.regulator.RegulatorEvalProjectMonitorPageCO;
|
|
||||||
import org.qinan.safetyeval.client.co.regulator.RegulatorEvalProjectMonitorStatCO;
|
|
||||||
import org.qinan.safetyeval.client.co.regulator.RegulatorEvalProjectNodeOverviewCO;
|
|
||||||
import org.qinan.safetyeval.client.co.regulator.RegulatorEvalProjectSurveyPageCO;
|
|
||||||
import org.qinan.safetyeval.client.co.regulator.RegulatorEvalProjectSurveyStatCO;
|
|
||||||
import org.qinan.safetyeval.client.co.regulator.RegulatorEvalSurveyClockInCO;
|
|
||||||
import org.qinan.safetyeval.client.dto.PageResponse;
|
import org.qinan.safetyeval.client.dto.PageResponse;
|
||||||
import org.qinan.safetyeval.client.dto.SingleResponse;
|
import org.qinan.safetyeval.client.dto.SingleResponse;
|
||||||
import org.qinan.safetyeval.client.dto.regulator.RegulatorEvalProjectMonitorPageQuery;
|
import org.qinan.safetyeval.client.dto.regulator.RegulatorEvalProjectMonitorPageQuery;
|
||||||
import org.qinan.safetyeval.client.dto.regulator.RegulatorEvalProjectMonitorRealtimePageQuery;
|
import org.qinan.safetyeval.client.dto.regulator.RegulatorEvalProjectMonitorRealtimePageQuery;
|
||||||
import org.qinan.safetyeval.client.dto.regulator.RegulatorEvalProjectSurveyPageQuery;
|
import org.qinan.safetyeval.client.dto.regulator.RegulatorEvalProjectSurveyPageQuery;
|
||||||
import org.qinan.safetyeval.domain.constant.ProjectProcessWaringStatusEnum;
|
import org.qinan.safetyeval.domain.constant.ProjectProcessWaringStatusEnum;
|
||||||
|
import org.qinan.safetyeval.domain.constant.ProjectRoleEnum;
|
||||||
import org.qinan.safetyeval.domain.entity.EvalProjectEntity;
|
import org.qinan.safetyeval.domain.entity.EvalProjectEntity;
|
||||||
import org.qinan.safetyeval.domain.exception.BizException;
|
import org.qinan.safetyeval.domain.exception.BizException;
|
||||||
import org.qinan.safetyeval.domain.exception.ErrorCode;
|
import org.qinan.safetyeval.domain.exception.ErrorCode;
|
||||||
|
|
@ -150,7 +145,13 @@ public class RegulatorEvalProjectMonitorExecutor implements RegulatorEvalProject
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SingleResponse<List<RegulatorEvalSurveyClockInCO>> surveyClockInList(String projectId) {
|
public SingleResponse<List<RegulatorEvalSurveyClockInCO>> surveyClockInList(String projectId) {
|
||||||
return SingleResponse.success(evalProjectMapper.selectRegulatorSurveyClockInList(Long.parseLong(projectId)));
|
List<RegulatorEvalSurveyClockInCO> regulatorEvalSurveyClockInCOS = evalProjectMapper.selectRegulatorSurveyClockInList(Long.parseLong(projectId));
|
||||||
|
for (RegulatorEvalSurveyClockInCO regulatorEvalSurveyClockInCO : regulatorEvalSurveyClockInCOS) {
|
||||||
|
if (regulatorEvalSurveyClockInCO.getRole() != null) {
|
||||||
|
regulatorEvalSurveyClockInCO.setRole(ProjectRoleEnum.fromVals(regulatorEvalSurveyClockInCO.getRole()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return SingleResponse.success(regulatorEvalSurveyClockInCOS);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void fillDisplayFields(RegulatorEvalProjectMonitorPageCO co) {
|
private void fillDisplayFields(RegulatorEvalProjectMonitorPageCO co) {
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@ public class QualFilingPersonnelChangeInfoCO {
|
||||||
|
|
||||||
@ApiModelProperty(value = "能力认定")
|
@ApiModelProperty(value = "能力认定")
|
||||||
private List<CapabilityAssessmentDTO> capabilityAssessment;
|
private List<CapabilityAssessmentDTO> capabilityAssessment;
|
||||||
|
|
||||||
@ApiModelProperty(value = "职称(多个逗号分隔)")
|
@ApiModelProperty(value = "职称(多个逗号分隔)")
|
||||||
private List<TitleCodeCo> titleCodeArr;
|
private List<TitleCodeCo> titleCodeArr;
|
||||||
|
|
||||||
|
|
@ -66,6 +67,9 @@ public class QualFilingPersonnelChangeInfoCO {
|
||||||
@ApiModelProperty(value = "学历")
|
@ApiModelProperty(value = "学历")
|
||||||
private String educationName;
|
private String educationName;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否管理人员")
|
@ApiModelProperty(value = "是否技术负责人(0否1是)")
|
||||||
private Boolean technicalDirectorFlag;
|
private Boolean technicalDirectorFlag;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否过程控制负责人(0否1是)")
|
||||||
|
private Boolean processControlLeaderFlag;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,4 +27,7 @@ public class QualFilingChangePageQuery extends BasePageQuery {
|
||||||
|
|
||||||
@ApiModelProperty(value = "备案状态编码(1已备案2审核中3已打回4变更审核中5暂存)")
|
@ApiModelProperty(value = "备案状态编码(1已备案2审核中3已打回4变更审核中5暂存)")
|
||||||
private Long filingStatusCode;
|
private Long filingStatusCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "统一社会信用代码")
|
||||||
|
private String creditCode;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import org.qinan.safetyeval.client.dto.BasePageQuery;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 资质现场核查监管端分页查询Qry
|
* 资质现场核查监管端分页查询Qry
|
||||||
|
|
@ -46,4 +45,7 @@ public class QualOnSiteReviewMonitorPageQry extends BasePageQuery {
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
private LocalDate reviewDateStartEnd;
|
private LocalDate reviewDateStartEnd;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "关键字")
|
||||||
|
private String keyword;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import org.qinan.safetyeval.client.dto.BasePageQuery;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 资质现场核查机构端分页查询Qry
|
* 资质现场核查机构端分页查询Qry
|
||||||
|
|
@ -48,4 +47,7 @@ public class QualOnSiteReviewOrgPageQry extends BasePageQuery {
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
private LocalDate reviewDateStartEnd;
|
private LocalDate reviewDateStartEnd;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "关键字")
|
||||||
|
private String keyword;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,11 @@ import java.io.Serializable;
|
||||||
public class CapabilityAssessmentDTO implements Serializable {
|
public class CapabilityAssessmentDTO implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
/**
|
||||||
|
* 专业能力编码,取值见
|
||||||
|
* {@link org.qinan.safetyeval.domain.constant.basic.IndustryEnum}
|
||||||
|
*/
|
||||||
|
private String industryCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 专业能力编码,取值见
|
* 专业能力编码,取值见
|
||||||
|
|
|
||||||
|
|
@ -38,4 +38,5 @@ public class QualFilingChangeQuery {
|
||||||
|
|
||||||
/** 备案状态 */
|
/** 备案状态 */
|
||||||
private Long filingStatusCode;
|
private Long filingStatusCode;
|
||||||
|
private String creditCode;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -128,6 +128,9 @@ public class QualFilingChangeGatewayImpl implements QualFilingChangeGateway {
|
||||||
if (StringUtils.hasText(query.getFilingUnitName())) {
|
if (StringUtils.hasText(query.getFilingUnitName())) {
|
||||||
wrapper.like(QualFilingChangeDO::getFilingUnitName, query.getFilingUnitName());
|
wrapper.like(QualFilingChangeDO::getFilingUnitName, query.getFilingUnitName());
|
||||||
}
|
}
|
||||||
|
if (StringUtils.hasText(query.getCreditCode())) {
|
||||||
|
wrapper.eq(QualFilingChangeDO::getCreditCode, query.getCreditCode());
|
||||||
|
}
|
||||||
if (StringUtils.hasText(query.getFilingTerritoryCode())) {
|
if (StringUtils.hasText(query.getFilingTerritoryCode())) {
|
||||||
String territory = query.getFilingTerritoryCode();
|
String territory = query.getFilingTerritoryCode();
|
||||||
wrapper.and(w -> w.eq(QualFilingChangeDO::getFilingTerritoryCode, territory)
|
wrapper.and(w -> w.eq(QualFilingChangeDO::getFilingTerritoryCode, territory)
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="org.qinan.safetyeval.infrastructure.persistence.mapper.QualFilingPersonnelChangeMapper">
|
<mapper namespace="org.qinan.safetyeval.infrastructure.persistence.mapper.QualFilingPersonnelChangeMapper">
|
||||||
|
|
||||||
<resultMap type="org.qinan.safetyeval.infrastructure.persistence.domainobject.QualFilingPersonnelChangeDO"
|
<resultMap type="org.qinan.safetyeval.infrastructure.persistence.domainobject.QualFilingPersonnelChangeDO"
|
||||||
id="QualFilingPersonnelChangeResult">
|
id="QualFilingPersonnelChangeResult">
|
||||||
<id property="id" column="id"/>
|
<id property="id" column="id"/>
|
||||||
|
|
@ -96,9 +95,12 @@
|
||||||
|
|
||||||
<select id="getFillingChangePersonInfo"
|
<select id="getFillingChangePersonInfo"
|
||||||
resultMap="FilingPersonnelChangeInfoMap">
|
resultMap="FilingPersonnelChangeInfoMap">
|
||||||
SELECT fp.source_personnel_id, fp.id, p.user_name personName, po.position_name, p.post_id, p.gender_code, p.gender_name
|
SELECT fp.source_personnel_id, fp.id, p.user_name personName, po.position_name, p.post_id, p.gender_code,
|
||||||
, p.title_code_arr, p.technical_director_flag, p.capability_assessment, p.education_name, bdm.professional_name basicDisciplineMajorName
|
p.gender_name
|
||||||
, p.birth_date, p.register_engineer_flag, p.evaluator_cert_no, fp.filing_change_id, p.join_work_date, d.dept_name
|
, p.title_code_arr, p.technical_director_flag, p.process_control_leader_flag, p.capability_assessment
|
||||||
|
, p.education_name, bdm.professional_name basicDisciplineMajorName
|
||||||
|
, p.birth_date, p.register_engineer_flag, p.evaluator_cert_no, fp.filing_change_id, p.join_work_date,
|
||||||
|
d.dept_name
|
||||||
FROM org_personnel p
|
FROM org_personnel p
|
||||||
join qual_filing_personnel_change fp on p.id = fp.source_personnel_id
|
join qual_filing_personnel_change fp on p.id = fp.source_personnel_id
|
||||||
left join basic_discipline_major bdm on p.basic_discipline_major_id = bdm.id
|
left join basic_discipline_major bdm on p.basic_discipline_major_id = bdm.id
|
||||||
|
|
@ -119,5 +121,4 @@
|
||||||
AND qfp.delete_enum = 'false'
|
AND qfp.delete_enum = 'false'
|
||||||
AND (op.technical_director_flag = 1 OR op.process_control_leader_flag = 1)
|
AND (op.technical_director_flag = 1 OR op.process_control_leader_flag = 1)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -67,6 +67,9 @@
|
||||||
<if test="query.unitName != null and query.unitName != ''">
|
<if test="query.unitName != null and query.unitName != ''">
|
||||||
and info.unit_name like concat('%', #{query.unitName}, '%')
|
and info.unit_name like concat('%', #{query.unitName}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="query.keyword != null and query.keyword != ''">
|
||||||
|
and review.id = #{query.keyword}
|
||||||
|
</if>
|
||||||
<if test="query.status != null">
|
<if test="query.status != null">
|
||||||
and review.status = #{query.status}
|
and review.status = #{query.status}
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -74,7 +77,7 @@
|
||||||
and review.review_date_start >= #{query.reviewDateStartBegin}
|
and review.review_date_start >= #{query.reviewDateStartBegin}
|
||||||
</if>
|
</if>
|
||||||
<if test="query.reviewDateStartEnd != null">
|
<if test="query.reviewDateStartEnd != null">
|
||||||
and review.review_date_start <= #{query.reviewDateStartEnd}
|
and review.review_date_start <= DATE_ADD(#{query.reviewDateStartEnd}, INTERVAL 1 DAY)
|
||||||
</if>
|
</if>
|
||||||
order by review.id desc
|
order by review.id desc
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -95,6 +98,9 @@
|
||||||
from qual_on_site_review review
|
from qual_on_site_review review
|
||||||
where review.delete_enum = 'false'
|
where review.delete_enum = 'false'
|
||||||
and review.org_id = #{query.orgId}
|
and review.org_id = #{query.orgId}
|
||||||
|
<if test="query.keyword != null and query.keyword != ''">
|
||||||
|
and review.id = #{query.keyword}
|
||||||
|
</if>
|
||||||
<if test="query.status != null">
|
<if test="query.status != null">
|
||||||
and review.status = #{query.status}
|
and review.status = #{query.status}
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -102,7 +108,7 @@
|
||||||
and review.review_date_start >= #{query.reviewDateStartBegin}
|
and review.review_date_start >= #{query.reviewDateStartBegin}
|
||||||
</if>
|
</if>
|
||||||
<if test="query.reviewDateStartEnd != null">
|
<if test="query.reviewDateStartEnd != null">
|
||||||
and review.review_date_start <= #{query.reviewDateStartEnd}
|
and review.review_date_start <= DATE_ADD(#{query.reviewDateStartEnd}, INTERVAL 1 DAY)
|
||||||
</if>
|
</if>
|
||||||
order by review.id desc
|
order by review.id desc
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue