|
|
@@ -15,12 +15,14 @@ import com.sckw.core.model.enums.SigningWayEnum;
|
|
|
import com.sckw.core.utils.CollectionUtils;
|
|
|
import org.apache.dubbo.config.annotation.DubboService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
-
|
|
|
import java.util.*;
|
|
|
|
|
|
+/**
|
|
|
+ * @author czh
|
|
|
+ * @desc 合同远程接口实现
|
|
|
+ * @date 2023/7/31
|
|
|
+ */
|
|
|
@DubboService(group = "design", version = "2.0.0")
|
|
|
-@Service
|
|
|
public class RemoteContractServiceImpl implements RemoteContractService {
|
|
|
|
|
|
@Autowired
|
|
|
@@ -34,7 +36,7 @@ public class RemoteContractServiceImpl implements RemoteContractService {
|
|
|
|
|
|
@Override
|
|
|
public Map<Long, ContractCommonInfoResDto> queryContractBaseInfo(List<Long> contractIds) {
|
|
|
- HashMap<Long, ContractCommonInfoResDto> map = new HashMap<>();
|
|
|
+ HashMap<Long, ContractCommonInfoResDto> map = new HashMap<>(4);
|
|
|
for (Long contractId : contractIds) {
|
|
|
KwcContractLogistics kwcContractLogistics = kwcContractLogisticsMapper.selectById(contractId);
|
|
|
if (Objects.nonNull(kwcContractLogistics)) {
|
|
|
@@ -67,10 +69,10 @@ public class RemoteContractServiceImpl implements RemoteContractService {
|
|
|
contractCommonInfoResDto.setContactName(kwcContractLogistics.getName());
|
|
|
contractCommonInfoResDto.setContractCode(kwcContractLogistics.getContractNo());
|
|
|
contractCommonInfoResDto.setSigningWay(kwcContractLogistics.getSigningWay());
|
|
|
- contractCommonInfoResDto.setSigningWayName(SigningWayEnum.getName(kwcContractLogistics.getSigningWay()).getName());
|
|
|
+ contractCommonInfoResDto.setSigningWayName(Objects.requireNonNull(SigningWayEnum.getName(kwcContractLogistics.getSigningWay())).getName());
|
|
|
contractCommonInfoResDto.setEntInfoList(entList);
|
|
|
contractCommonInfoResDto.setStatus(kwcContractLogistics.getStatus());
|
|
|
- contractCommonInfoResDto.setStatusName(ContractStatusEnum.getName(kwcContractLogistics.getStatus()).getName());
|
|
|
+ contractCommonInfoResDto.setStatusName(Objects.requireNonNull(ContractStatusEnum.getName(kwcContractLogistics.getStatus())).getName());
|
|
|
List<KwcContractLogisticsUnit> kwcContractLogisticsUnits = kwcContractLogisticsUnitService.queryByContractId(kwcContractLogistics.getId());
|
|
|
if (CollectionUtils.isNotEmpty(kwcContractLogisticsUnits)) {
|
|
|
for (KwcContractLogisticsUnit kwcContractLogisticsUnit : kwcContractLogisticsUnits) {
|
|
|
@@ -91,10 +93,10 @@ public class RemoteContractServiceImpl implements RemoteContractService {
|
|
|
contractCommonInfoResDto.setContactName(kwcContractTrade.getName());
|
|
|
contractCommonInfoResDto.setContractCode(kwcContractTrade.getContractNo());
|
|
|
contractCommonInfoResDto.setSigningWay(kwcContractTrade.getSigningWay());
|
|
|
- contractCommonInfoResDto.setSigningWayName(SigningWayEnum.getName(kwcContractTrade.getSigningWay()).getName());
|
|
|
+ contractCommonInfoResDto.setSigningWayName(Objects.requireNonNull(SigningWayEnum.getName(kwcContractTrade.getSigningWay())).getName());
|
|
|
contractCommonInfoResDto.setEntInfoList(entList);
|
|
|
contractCommonInfoResDto.setStatus(kwcContractTrade.getStatus());
|
|
|
- contractCommonInfoResDto.setStatusName(ContractStatusEnum.getName(kwcContractTrade.getStatus()).getName());
|
|
|
+ contractCommonInfoResDto.setStatusName(Objects.requireNonNull(ContractStatusEnum.getName(kwcContractTrade.getStatus())).getName());
|
|
|
List<KwcContractLogisticsUnit> kwcContractLogisticsUnits = kwcContractLogisticsUnitService.queryByContractId(kwcContractTrade.getId());
|
|
|
if (CollectionUtils.isNotEmpty(kwcContractLogisticsUnits)) {
|
|
|
for (KwcContractLogisticsUnit kwcContractLogisticsUnit : kwcContractLogisticsUnits) {
|