海南版本提交

This commit is contained in:
hzj
2024-03-13 18:24:38 +08:00
parent 1192b87083
commit 6288e6902c
37 changed files with 1918 additions and 473 deletions

View File

@@ -1,7 +1,7 @@
package com.njcn.advance.service.carrycapacity;
import com.github.jeffreyning.mybatisplus.service.IMppService;
import com.njcn.advance.pojo.carrycapacity.po.CarryCapacityDataPO;
import com.baomidou.mybatisplus.extension.service.IService;
/**
*
* Description:
@@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
* @author clam
* @version V1.0.0
*/
public interface CarryCapacityDataPOService extends IService<CarryCapacityDataPO>{
public interface CarryCapacityDataPOService extends IMppService<CarryCapacityDataPO> {
}

View File

@@ -1,8 +1,12 @@
package com.njcn.advance.service.carrycapacity;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.njcn.advance.pojo.carrycapacity.param.CarryCapacityResultParam;
import com.njcn.advance.pojo.carrycapacity.po.CarryCapacityResultPO;
import com.baomidou.mybatisplus.extension.service.IService;
/**
import com.njcn.advance.pojo.carrycapacity.vo.CarryCapacityDResultVO;
/**
*
* Description:
* Date: 2024/3/1 15:38【需求编号】
@@ -13,4 +17,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
public interface CarryCapacityResultPOService extends IService<CarryCapacityResultPO>{
}
IPage<CarryCapacityDResultVO> queryResultList(CarryCapacityResultParam.CarryCapacityResultPageParam queryParam);
}

View File

@@ -20,4 +20,6 @@ public interface CarryCapacityUserPOService extends IService<CarryCapacityUserPO
Boolean updateUser(CarryCapacityUserParam.CarryCapacityUserUpdateParam userUpdateParam);
IPage<CarryCapacityUserPO> queyDetailUser(CarryCapacityUserParam.CarryCapacityUserPageParam pageParm);
CarryCapacityUserPO queyDetailUserById(String userId);
}

View File

@@ -1,11 +1,10 @@
package com.njcn.advance.service.carrycapacity;
import com.njcn.advance.pojo.carrycapacity.param.CarryCapacityCalParam;
import com.njcn.advance.pojo.carrycapacity.param.CarryCapacityEvaluateParam;
import com.njcn.advance.pojo.carrycapacity.param.CarryCapacityQueryDataParam;
import com.njcn.advance.pojo.carrycapacity.vo.CarryCapacityDResultVO;
import com.njcn.advance.pojo.carrycapacity.vo.CarryCapacityDataIVO;
import com.njcn.advance.pojo.carrycapacity.vo.CarryCapacityDataQVO;
import com.njcn.advance.pojo.carrycapacity.vo.CarryCapacityDataVO;
import com.njcn.advance.pojo.carrycapacity.param.ExcelDataParam;
import com.njcn.advance.pojo.carrycapacity.vo.*;
import com.njcn.device.pq.pojo.vo.TerminalTree;
import java.util.List;
@@ -29,4 +28,10 @@ public interface CarryCapcityService {
CarryCapacityDResultVO carryCapacityCal(CarryCapacityCalParam calParam);
List<TerminalTree> carryCapacityTree();
boolean uploadExcel(ExcelDataParam excelDataParam) throws Exception;
CarryCapacityDataVO modelTraining(CarryCapacityQueryDataParam queryParam);
CarryCapacityDResultVO carryCapacityEvaluate(CarryCapacityEvaluateParam calParam);
}

View File

@@ -1,12 +1,10 @@
package com.njcn.advance.service.carrycapacity.impl;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.advance.pojo.carrycapacity.po.CarryCapacityDataPO;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.advance.mapper.carrycapacity.CarryCapacityDataPOMapper;
import com.njcn.advance.pojo.carrycapacity.po.CarryCapacityDataPO;
import com.njcn.advance.service.carrycapacity.CarryCapacityDataPOService;
import org.springframework.stereotype.Service;
/**
*
* Description:
@@ -16,6 +14,6 @@ import com.njcn.advance.service.carrycapacity.CarryCapacityDataPOService;
* @version V1.0.0
*/
@Service
public class CarryCapacityDataPOServiceImpl extends ServiceImpl<CarryCapacityDataPOMapper, CarryCapacityDataPO> implements CarryCapacityDataPOService{
public class CarryCapacityDataPOServiceImpl extends MppServiceImpl<CarryCapacityDataPOMapper, CarryCapacityDataPO> implements CarryCapacityDataPOService{
}

View File

@@ -1,10 +1,25 @@
package com.njcn.advance.service.carrycapacity.impl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.advance.mapper.carrycapacity.CarryCapacityResultPOMapper;
import com.njcn.advance.pojo.carrycapacity.param.CarryCapacityResultParam;
import com.njcn.advance.pojo.carrycapacity.po.CarryCapacityResultPO;
import com.njcn.advance.pojo.carrycapacity.po.CarryCapacityUserPO;
import com.njcn.advance.pojo.carrycapacity.vo.CarryCapacityDResultVO;
import com.njcn.advance.service.carrycapacity.CarryCapacityResultPOService;
import com.njcn.advance.service.carrycapacity.CarryCapacityUserPOService;
import lombok.RequiredArgsConstructor;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
/**
*
* Description:
@@ -14,6 +29,36 @@ import com.njcn.advance.service.carrycapacity.CarryCapacityResultPOService;
* @version V1.0.0
*/
@Service
@RequiredArgsConstructor
public class CarryCapacityResultPOServiceImpl extends ServiceImpl<CarryCapacityResultPOMapper, CarryCapacityResultPO> implements CarryCapacityResultPOService{
private final CarryCapacityUserPOService carryCapacityUserPOService;
@Override
public IPage<CarryCapacityDResultVO> queryResultList(CarryCapacityResultParam.CarryCapacityResultPageParam queryParam) {
Page<CarryCapacityDResultVO> returnpage = new Page<> (queryParam.getPageNum ( ), queryParam.getPageSize ( ));
Page<CarryCapacityResultPO> temppage = new Page<> (queryParam.getPageNum ( ), queryParam.getPageSize ( ));
QueryWrapper<CarryCapacityResultPO> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(StringUtils.isNotBlank(queryParam.getEvaluateType()) ,CarryCapacityResultPO::getEvaluateType,queryParam.getEvaluateType())
.between(StringUtils.isNotBlank(queryParam.getStartTime()) && StringUtils.isNotBlank(queryParam.getEndTime()) ,CarryCapacityResultPO::getEvaluateDate,queryParam.getStartTime(),queryParam.getEndTime())
.orderByDesc(CarryCapacityResultPO::getEvaluateDate);
IPage<CarryCapacityResultPO> page = this.page(temppage, queryWrapper);
List<CarryCapacityDResultVO> collect = page.getRecords().stream().map(temp -> {
CarryCapacityDResultVO vo = new CarryCapacityDResultVO();
BeanUtils.copyProperties(temp, vo);
String[] split = temp.getUserId().split(",");
List<String> collect1 = Arrays.stream(split).sequential().map(userId -> {
CarryCapacityUserPO carryCapacityUserPO = carryCapacityUserPOService.queyDetailUserById(userId);
return carryCapacityUserPO.getUserName();
}).collect(Collectors.toList());
vo.setUserName(collect1.stream().collect(Collectors.joining(",")));
return vo;
}).collect(Collectors.toList());
returnpage.setRecords(collect);
returnpage.setTotal(page.getTotal());
return returnpage;
}
}

View File

@@ -61,9 +61,15 @@ public class CarryCapacityUserPOServiceImpl extends ServiceImpl<CarryCapacityUse
QueryWrapper<CarryCapacityUserPO> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(StringUtils.isNotBlank(pageParm.getUserId()) ,CarryCapacityUserPO::getUserId,pageParm.getUserId())
.eq(StringUtils.isNotBlank(pageParm.getUserType()) ,CarryCapacityUserPO::getUserType,pageParm.getUserType())
.between(StringUtils.isNotBlank(pageParm.getStartTime()) && StringUtils.isNotBlank(pageParm.getEndTime()) ,CarryCapacityUserPO::getCreateTime,pageParm.getStartTime(),pageParm.getEndTime());
.between(StringUtils.isNotBlank(pageParm.getStartTime()) && StringUtils.isNotBlank(pageParm.getEndTime()) ,CarryCapacityUserPO::getCreateTime,pageParm.getStartTime(),pageParm.getEndTime()).
orderByDesc(CarryCapacityUserPO::getCreateTime);
IPage<CarryCapacityUserPO> page = this.page (returnpage, queryWrapper);
return page;
}
@Override
public CarryCapacityUserPO queyDetailUserById(String userId) {
return this.lambdaQuery().eq(CarryCapacityUserPO::getUserId,userId).one();
}
}