|
|
@ -1,5 +1,6 @@ |
|
|
|
package org.dromara.platform.service.impl; |
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil; |
|
|
|
import jakarta.annotation.Resource; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.dromara.common.core.utils.MapstructUtils; |
|
|
@ -11,10 +12,13 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import org.dromara.platform.domain.AgreementInfo; |
|
|
|
import org.dromara.platform.domain.ContractInfo; |
|
|
|
import org.dromara.platform.domain.dto.AgreementInfoDto; |
|
|
|
import org.dromara.platform.domain.vo.AgreementInfoVo; |
|
|
|
import org.dromara.platform.domain.vo.ContractInfoVo; |
|
|
|
import org.dromara.platform.domain.vo.ioCompanySelectVo; |
|
|
|
import org.dromara.platform.mapper.AgreementInfoMapper; |
|
|
|
import org.dromara.platform.mapper.ContractInfoMapper; |
|
|
|
import org.dromara.platform.service.IAgreementInfoService; |
|
|
|
import org.dromara.platform.service.IContractInfoService; |
|
|
|
import org.dromara.platform.service.IServiceCatalogCategoryService; |
|
|
@ -44,6 +48,9 @@ public class InspectionPlanInfoServiceImpl implements IInspectionPlanInfoService |
|
|
|
@Resource |
|
|
|
private IContractInfoService contractInfoService; |
|
|
|
|
|
|
|
@Resource |
|
|
|
private ContractInfoMapper contractInfoMapper; |
|
|
|
|
|
|
|
@Resource |
|
|
|
private IServiceCatalogCategoryService serviceCatalogCategoryService; |
|
|
|
|
|
|
@ -166,6 +173,7 @@ public class InspectionPlanInfoServiceImpl implements IInspectionPlanInfoService |
|
|
|
String projectName = contractInfoVo.getProjectName(); |
|
|
|
Date startDate = contractInfoVo.getStartDate(); |
|
|
|
Date endDate = contractInfoVo.getEndDate(); |
|
|
|
String partyB = contractInfoVo.getPartyB(); |
|
|
|
|
|
|
|
// 初始化待新增的协议信息集合
|
|
|
|
List<AgreementInfo> agreementInfos = new ArrayList<>(); |
|
|
@ -192,7 +200,7 @@ public class InspectionPlanInfoServiceImpl implements IInspectionPlanInfoService |
|
|
|
inspectionPlanInfo.setEndDate(endDate); |
|
|
|
inspectionPlanInfo.setDescription(agreementInfo.getServiceContent()); |
|
|
|
inspectionPlanInfo.setFrequency(agreementInfo.getFrequency()); |
|
|
|
inspectionPlanInfo.setIoCompany("测试运维单位1"); |
|
|
|
inspectionPlanInfo.setIoCompany(partyB); |
|
|
|
// 0未开始 1进行中 2已完成
|
|
|
|
inspectionPlanInfo.setStatus(0L); |
|
|
|
baseMapper.insert(inspectionPlanInfo); |
|
|
@ -200,4 +208,17 @@ public class InspectionPlanInfoServiceImpl implements IInspectionPlanInfoService |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Set<String> getIoCompanyNames() { |
|
|
|
LambdaQueryWrapper<ContractInfo> queryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
List<ContractInfo> contractInfos = contractInfoMapper.selectList(queryWrapper); |
|
|
|
if (CollectionUtil.isNotEmpty(contractInfos)){ |
|
|
|
Set<String> partyBSet = contractInfos.stream() |
|
|
|
.map(item -> item.getPartyB()) |
|
|
|
.collect(Collectors.toSet()); |
|
|
|
return partyBSet; |
|
|
|
} |
|
|
|
return new HashSet<>(); |
|
|
|
} |
|
|
|
} |
|
|
|