feat(sip): 优化项目信息查询和订单信息相关功能
- 新增选择客户、合作伙伴和人员的页面路由 - 优化项目信息查询条件,支持日期范围查询 - 修复项目订单信息插入逻辑,添加创建人和订单编号 - 优化项目信息列表查询,增加空列表判断master
parent
e384ef51dc
commit
3480d55309
|
@ -40,6 +40,21 @@ public class ProjectInfoController extends BaseController
|
||||||
{
|
{
|
||||||
return prefix + "/project";
|
return prefix + "/project";
|
||||||
}
|
}
|
||||||
|
@GetMapping("/selectCustomer")
|
||||||
|
public String selectCustomer()
|
||||||
|
{
|
||||||
|
return prefix + "/selectCustomer";
|
||||||
|
}
|
||||||
|
@GetMapping("/selectPartner")
|
||||||
|
public String selectPartner()
|
||||||
|
{
|
||||||
|
return prefix + "/selectPartner";
|
||||||
|
}
|
||||||
|
@GetMapping("selectPeople")
|
||||||
|
public String selectPeople()
|
||||||
|
{
|
||||||
|
return prefix + "/selectPeople";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询项目管理列表
|
* 查询项目管理列表
|
||||||
|
|
|
@ -92,6 +92,9 @@ public class ProjectInfoServiceImpl implements IProjectInfoService {
|
||||||
public List<ProjectInfo> selectProjectInfoList(ProjectInfo projectInfo) {
|
public List<ProjectInfo> selectProjectInfoList(ProjectInfo projectInfo) {
|
||||||
List<ProjectInfo> projectInfos = projectInfoMapper.selectProjectInfoList(projectInfo);
|
List<ProjectInfo> projectInfos = projectInfoMapper.selectProjectInfoList(projectInfo);
|
||||||
|
|
||||||
|
if (CollUtil.isEmpty(projectInfos)){
|
||||||
|
return projectInfos;
|
||||||
|
}
|
||||||
List<Long> idList = projectInfos.stream().map(ProjectInfo::getId).collect(Collectors.toList());
|
List<Long> idList = projectInfos.stream().map(ProjectInfo::getId).collect(Collectors.toList());
|
||||||
List<ProjectOrderInfo> projectOrderInfos = orderInfoService.selectProjectOrderInfoByProjectId(idList);
|
List<ProjectOrderInfo> projectOrderInfos = orderInfoService.selectProjectOrderInfoByProjectId(idList);
|
||||||
Map<Long, ProjectOrderInfo> orderInfoMap = projectOrderInfos.stream().collect(Collectors.toMap(ProjectOrderInfo::getProjectId, Function.identity(), (v1, v2) -> v1));
|
Map<Long, ProjectOrderInfo> orderInfoMap = projectOrderInfos.stream().collect(Collectors.toMap(ProjectOrderInfo::getProjectId, Function.identity(), (v1, v2) -> v1));
|
||||||
|
|
|
@ -7,6 +7,7 @@ import java.util.stream.Collectors;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import com.ruoyi.common.utils.ShiroUtils;
|
||||||
import com.ruoyi.sip.domain.ProjectOrderFileLog;
|
import com.ruoyi.sip.domain.ProjectOrderFileLog;
|
||||||
import com.ruoyi.sip.service.IProjectOrderFileLogService;
|
import com.ruoyi.sip.service.IProjectOrderFileLogService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -66,6 +67,8 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService {
|
||||||
@Override
|
@Override
|
||||||
public int insertProjectOrderInfo(ProjectOrderInfo projectOrderInfo) {
|
public int insertProjectOrderInfo(ProjectOrderInfo projectOrderInfo) {
|
||||||
projectOrderInfo.setCreateTime(DateUtils.getNowDate());
|
projectOrderInfo.setCreateTime(DateUtils.getNowDate());
|
||||||
|
projectOrderInfo.setCreateBy(ShiroUtils.getUserId().toString());
|
||||||
|
//todo 生成订单编号
|
||||||
return projectOrderInfoMapper.insertProjectOrderInfo(projectOrderInfo);
|
return projectOrderInfoMapper.insertProjectOrderInfo(projectOrderInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,43 +60,46 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="estimatedOrderTime != null "> and estimated_order_time = #{estimatedOrderTime}</if>
|
<if test="estimatedOrderTime != null "> and estimated_order_time = #{estimatedOrderTime}</if>
|
||||||
<if test="estimatedOrderTimeStart != null or estimatedOrderTimeEnd != null">
|
<if test="estimatedOrderTimeStart != null or estimatedOrderTimeEnd != null">
|
||||||
<choose>
|
<choose>
|
||||||
|
<when test="estimatedOrderTimeStart != null and estimatedOrderTimeEnd != null">
|
||||||
|
and estimated_order_time between date_format(#{estimatedOrderTimeStart}, '%Y-%m-%d 00:00:00') and date_format(#{estimatedOrderTimeEnd}, '%Y-%m-%d 23:59:59')
|
||||||
|
</when>
|
||||||
<when test="estimatedOrderTimeStart != null">
|
<when test="estimatedOrderTimeStart != null">
|
||||||
and estimated_order_time <![CDATA[ >= ]]> #{estimatedOrderTimeStart}
|
and estimated_order_time <![CDATA[ >= ]]> date_format(#{estimatedOrderTimeStart}, '%Y-%m-%d 00:00:00')
|
||||||
</when>
|
</when>
|
||||||
<when test="estimatedOrderTimeEnd != null">
|
<when test="estimatedOrderTimeEnd != null">
|
||||||
and estimated_order_time <![CDATA[ <= ]]> #{estimatedOrderTimeEnd}
|
and estimated_order_time <![CDATA[ <= ]]> date_format(#{estimatedOrderTimeEnd}, '%Y-%m-%d 23:59:59')
|
||||||
</when>
|
</when>
|
||||||
<otherwise>
|
|
||||||
and estimated_order_time between #{estimatedOrderTimeStart} and #{estimatedOrderTimeEnd}
|
|
||||||
</otherwise>
|
|
||||||
</choose>
|
</choose>
|
||||||
</if>
|
</if>
|
||||||
<if test="estimatedDeliverTime != null "> and estimated_deliver_time = #{estimatedDeliverTime}</if>
|
<if test="estimatedDeliverTime != null "> and estimated_deliver_time = #{estimatedDeliverTime}</if>
|
||||||
<if test="estimatedDeliverTimeStart != null or estimatedDeliverTimeEnd != null">
|
<if test="estimatedDeliverTimeStart != null or estimatedDeliverTimeEnd != null">
|
||||||
<choose>
|
<choose>
|
||||||
|
<when test="estimatedDeliverTimeStart != null and estimatedDeliverTimeEnd != null">
|
||||||
|
and estimated_deliver_time between date_format(#{estimatedDeliverTimeStart}, '%Y-%m-%d 00:00:00') and date_format(#{estimatedDeliverTimeEnd}, '%Y-%m-%d 23:59:59')
|
||||||
|
</when>
|
||||||
<when test="estimatedDeliverTimeStart != null">
|
<when test="estimatedDeliverTimeStart != null">
|
||||||
and estimated_deliver_time <![CDATA[ >= ]]> #{estimatedDeliverTimeStart}
|
and estimated_deliver_time <![CDATA[ >= ]]> date_format(#{estimatedDeliverTimeStart}, '%Y-%m-%d 00:00:00')
|
||||||
</when>
|
</when>
|
||||||
<when test="estimatedDeliverTimeEnd != null">
|
<when test="estimatedDeliverTimeEnd != null">
|
||||||
and estimated_deliver_time <![CDATA[ <= ]]> #{estimatedDeliverTimeEnd}
|
and estimated_deliver_time <![CDATA[ <= ]]> date_format(#{estimatedDeliverTimeEnd}, '%Y-%m-%d 23:59:59')
|
||||||
</when>
|
</when>
|
||||||
<otherwise>
|
|
||||||
and estimated_deliver_time between #{estimatedDeliverTimeStart} and #{estimatedDeliverTimeEnd}
|
|
||||||
</otherwise>
|
|
||||||
</choose>
|
</choose>
|
||||||
|
|
||||||
</if>
|
</if>
|
||||||
<if test="updateTimeStart != null or updateTimeEnd != null">
|
<if test="updateTimeStart != null or updateTimeEnd != null">
|
||||||
<choose>
|
<choose>
|
||||||
|
<when test="updateTimeStart != null and updateTimeEnd != null">
|
||||||
|
and update_time between date_format(#{updateTimeStart}, '%Y-%m-%d 00:00:00') and date_format(#{updateTimeEnd}, '%Y-%m-%d 23:59:59')
|
||||||
|
</when>
|
||||||
<when test="updateTimeStart != null">
|
<when test="updateTimeStart != null">
|
||||||
and update_time <![CDATA[ >= ]]> #{updateTimeStart}
|
and update_time <![CDATA[ >= ]]> date_format(#{updateTimeStart}, '%Y-%m-%d 00:00:00')
|
||||||
</when>
|
</when>
|
||||||
<when test="updateTimeEnd != null">
|
<when test="updateTimeEnd != null">
|
||||||
and update_time <![CDATA[ <= ]]> #{updateTimeEnd}
|
and update_time <![CDATA[ <= ]]> date_format(#{updateTimeEnd}, '%Y-%m-%d 23:59:59')
|
||||||
</when>
|
</when>
|
||||||
<otherwise>
|
|
||||||
and update_time between #{updateTimeStart} and #{updateTimeEnd}
|
|
||||||
</otherwise>
|
|
||||||
</choose>
|
</choose>
|
||||||
|
|
||||||
</if>
|
</if>
|
||||||
|
|
Loading…
Reference in New Issue