|
|
@@ -82,11 +82,11 @@ public class KwcContractLogisticsScoreServiceImpl implements IKwcContractLogisti
|
|
|
* @return 物流企业评分
|
|
|
*/
|
|
|
@Override
|
|
|
- public PageInfo<LogisticsScoreResVo> selectLogisticsScoreWithPendingSocreList(Long providerEntId)
|
|
|
+ public PageInfo<LogisticsScoreResVo> selectLogisticsScoreWithPendingSocreList(LogisticsScoreQueryDto query)
|
|
|
{
|
|
|
//查询评分列表
|
|
|
PageInfo<LogisticsScoreResVo> pageInfo = new PageInfo<>(new ArrayList<>());
|
|
|
- List<KwcContractLogisticsScore> logisticsScores = selectLogisticsScoreList(providerEntId, true);
|
|
|
+ List<KwcContractLogisticsScore> logisticsScores = selectLogisticsScoreList(query);
|
|
|
List<Long> logisticsScoreIds = logisticsScores.stream().map(KwcContractLogisticsScore::getId).toList();
|
|
|
if(CollectionUtils.isNotEmpty(logisticsScoreIds)){
|
|
|
//查询待审评分
|
|
|
@@ -125,17 +125,16 @@ public class KwcContractLogisticsScoreServiceImpl implements IKwcContractLogisti
|
|
|
* 查询物流企业评分明细列表
|
|
|
*
|
|
|
* @param detailReqDto 物流企业评分明细
|
|
|
- * @param providerEntId 供应商企业id
|
|
|
* @return 物流企业评分明细
|
|
|
*/
|
|
|
@Override
|
|
|
- public PageInfo<LogisticsScoreDetailResVo> selectKwcContractLogisticsScoreDetailList(LogisticsScoreDetailQueryDto detailReqDto, Long providerEntId)
|
|
|
+ public PageInfo<LogisticsScoreDetailResVo> selectKwcContractLogisticsScoreDetailList(LogisticsScoreDetailQueryDto detailReqDto)
|
|
|
{
|
|
|
//校验评分权限
|
|
|
- KwcContractLogisticsScore logisticsScore = checkLogisticsScoreAuth(providerEntId, detailReqDto.getScoreId());
|
|
|
+ KwcContractLogisticsScore logisticsScore = checkLogisticsScoreAuth(detailReqDto.getProviderEntId(), detailReqDto.getScoreId());
|
|
|
EntCacheResDto entCacheResDto = remoteSystemService.queryEntCacheById(logisticsScore.getLogisticsEntId());
|
|
|
PageInfo<LogisticsScoreDetailResVo> pageInfo = new PageInfo<>(new ArrayList<>());
|
|
|
- PageUtils.startPage();
|
|
|
+ PageUtils.startPage(detailReqDto);
|
|
|
detailReqDto.setScoreIds(Collections.singletonList(detailReqDto.getScoreId()));
|
|
|
List<KwcContractLogisticsScoreDetail> logisticsScoreDetails = kwcContractLogisticsScoreDetailMapper.selectKwcContractLogisticsScoreDetailList(detailReqDto);
|
|
|
//根据影响人id列表查询影响人
|
|
|
@@ -197,12 +196,10 @@ public class KwcContractLogisticsScoreServiceImpl implements IKwcContractLogisti
|
|
|
* isPage 是否是分页查询
|
|
|
* @return 物流企业评分
|
|
|
*/
|
|
|
- private List<KwcContractLogisticsScore> selectLogisticsScoreList(Long providerEntId, boolean isPage)
|
|
|
+ private List<KwcContractLogisticsScore> selectLogisticsScoreList(LogisticsScoreQueryDto query)
|
|
|
{
|
|
|
- LogisticsScoreQueryDto scoreReqDto = new LogisticsScoreQueryDto();
|
|
|
- providerEntId = providerEntId !=null ? providerEntId : LoginUserHolder.getEntId();
|
|
|
//1.查询当前供应商企业有效的自动派车物流合同
|
|
|
- List<KwcContractLogistics> logisticsContracts = kwcContractLogisticsRepository.queryValidByEntId(providerEntId);
|
|
|
+ List<KwcContractLogistics> logisticsContracts = kwcContractLogisticsRepository.queryValidByEntId(query.getProviderEntId());
|
|
|
List<Long> contractIds = logisticsContracts.stream().map(KwcContractLogistics::getId).toList();
|
|
|
if(CollectionUtils.isNotEmpty(contractIds)){
|
|
|
//2.根据物流合同id列表和托运商类型查询物流企业列表并得到物流企业id列表
|
|
|
@@ -210,15 +207,12 @@ public class KwcContractLogisticsScoreServiceImpl implements IKwcContractLogisti
|
|
|
List<Long> logisticsEntIds = logisticsUnits.stream().map(KwcContractLogisticsUnit::getEntId).toList();
|
|
|
if(CollectionUtils.isNotEmpty(logisticsEntIds)){
|
|
|
//3.根据物流企业id列表和供应商企业id查询物流企业评分列表
|
|
|
- scoreReqDto.setProviderEntId(providerEntId);
|
|
|
- scoreReqDto.setLogisticsEntIds(logisticsEntIds);
|
|
|
- if (isPage){
|
|
|
- PageUtils.startPage();
|
|
|
- }
|
|
|
- return kwcContractLogisticsScoreMapper.selectKwcContractLogisticsScoreList(scoreReqDto);
|
|
|
+ query.setLogisticsEntIds(logisticsEntIds);
|
|
|
+ PageUtils.startPage(query);
|
|
|
+ return kwcContractLogisticsScoreMapper.selectKwcContractLogisticsScoreList(query);
|
|
|
}
|
|
|
}
|
|
|
- return Collections.emptyList();
|
|
|
+ return new Page<>(query.getPageNum(), query.getPageSize());
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -418,7 +412,11 @@ public class KwcContractLogisticsScoreServiceImpl implements IKwcContractLogisti
|
|
|
if(userResDto != null){
|
|
|
detailAddDto.setInfluenceBy(userResDto.getId());
|
|
|
}
|
|
|
- detailAddDto.setAction(detailDto.getAction());
|
|
|
+ StringBuilder actionBuilder = new StringBuilder(detailDto.getAction());
|
|
|
+ if(detailDto.getScoreChange().compareTo(BigDecimal.ZERO)>0){
|
|
|
+ actionBuilder.append("+");
|
|
|
+ }
|
|
|
+ detailAddDto.setAction(actionBuilder.append(detailDto.getScoreChange()).append("分").toString());
|
|
|
detailAddDto.setScoreChange(entScoreChange);
|
|
|
detailAddDto.setScore(resultScore);
|
|
|
//2.设置评分状态为通过
|