|
@@ -9,6 +9,7 @@ import com.ydtech.exception.SystemException;
|
|
|
import com.ydtech.modules.admin.model.vo.SysDeptTreeVo;
|
|
import com.ydtech.modules.admin.model.vo.SysDeptTreeVo;
|
|
|
import com.ydtech.modules.base.controller.BaseController;
|
|
import com.ydtech.modules.base.controller.BaseController;
|
|
|
import com.ydtech.modules.base.model.vo.PageVo;
|
|
import com.ydtech.modules.base.model.vo.PageVo;
|
|
|
|
|
+import com.ydtech.modules.esm.service.EsmInsCompanyService;
|
|
|
import com.ydtech.modules.fnc.controller.contract.ControllerTimer;
|
|
import com.ydtech.modules.fnc.controller.contract.ControllerTimer;
|
|
|
import com.ydtech.modules.fnc.dao.contract.ContractMapper;
|
|
import com.ydtech.modules.fnc.dao.contract.ContractMapper;
|
|
|
import com.ydtech.modules.fnc.dao.contract.ContractSupplierMapper;
|
|
import com.ydtech.modules.fnc.dao.contract.ContractSupplierMapper;
|
|
@@ -40,9 +41,7 @@ import org.springframework.util.CollectionUtils;
|
|
|
import java.time.LocalDate;
|
|
import java.time.LocalDate;
|
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
import java.time.format.DateTimeFormatter;
|
|
|
-import java.util.ArrayList;
|
|
|
|
|
-import java.util.HashMap;
|
|
|
|
|
-import java.util.List;
|
|
|
|
|
|
|
+import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
@Slf4j
|
|
@Slf4j
|
|
@@ -63,6 +62,9 @@ public class contractServiceImpl extends ServiceImpl<ContractMapper, ContractEnt
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private ContractFileService contractFileService;
|
|
private ContractFileService contractFileService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private EsmInsCompanyService esmInsCompanyService;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* @param contractDto
|
|
* @param contractDto
|
|
|
* @return 新增合同
|
|
* @return 新增合同
|
|
@@ -266,8 +268,15 @@ public class contractServiceImpl extends ServiceImpl<ContractMapper, ContractEnt
|
|
|
List<String> contractIdList = contractSupplierEntityList.stream().map(ContractSupplierEntity::getContractId).collect(Collectors.toList());
|
|
List<String> contractIdList = contractSupplierEntityList.stream().map(ContractSupplierEntity::getContractId).collect(Collectors.toList());
|
|
|
contractVO.setContractIdList(contractIdList);
|
|
contractVO.setContractIdList(contractIdList);
|
|
|
|
|
|
|
|
|
|
+ Set<String> uniqueIds = new HashSet<>();
|
|
|
|
|
+ List<String> supplierIdList = contractVO.getSupplierIdList();
|
|
|
|
|
+ for (String s : supplierIdList) {
|
|
|
|
|
+ List<String> lowerId = esmInsCompanyService.getByLowerId(s);
|
|
|
|
|
+ uniqueIds.addAll(lowerId);
|
|
|
|
|
+ }
|
|
|
|
|
+ List<String> supIds = new ArrayList<>(uniqueIds);
|
|
|
|
|
+ contractVO.setSupplierIdList(supIds);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
IPage<ContractEntity> queriedPage = contractMapper.queryPage(page, contractVO);
|
|
IPage<ContractEntity> queriedPage = contractMapper.queryPage(page, contractVO);
|
|
|
List<ContractEntity> records = queriedPage.getRecords();
|
|
List<ContractEntity> records = queriedPage.getRecords();
|
|
|
if (!records.isEmpty()) {
|
|
if (!records.isEmpty()) {
|