fix(sip): 优化订单查询功能

- 修复了订单查询时未判断序列号是否为空的问题
- 优化了订单信息的查询逻辑,通过序列号进行精确查询
- 调整了订单信息的展示字段,增加了销售信息和客户信息
- 优化了模板中的显示逻辑,增加了空数据的处理
master
chenhao 2025-05-22 15:08:29 +08:00
parent c8def41c4a
commit db0ea1bfe7
9 changed files with 57 additions and 34 deletions

View File

@ -43,9 +43,9 @@
<div class="col-sm-5"> <div class="col-sm-5">
<form id="signupForm" autocomplete="off"> <form id="signupForm" autocomplete="off">
<h4 class="no-margins">登录:</h4> <h4 class="no-margins">登录:</h4>
<p class="m-t-md">你若不离不弃,我必生死相依</p> <!-- <p class="m-t-md">你若不离不弃,我必生死相依</p>-->
<input type="text" name="username" class="form-control uname" placeholder="用户名" value="admin" /> <input type="text" name="username" class="form-control uname" placeholder="用户名" value="" />
<input type="password" name="password" class="form-control pword" placeholder="密码" value="admin@123" /> <input type="password" name="password" class="form-control pword" placeholder="密码" value="" />
<div class="row m-t" th:if="${captchaEnabled==true}"> <div class="row m-t" th:if="${captchaEnabled==true}">
<div class="col-xs-6"> <div class="col-xs-6">
<input type="text" name="validateCode" class="form-control code" placeholder="验证码" maxlength="5" /> <input type="text" name="validateCode" class="form-control code" placeholder="验证码" maxlength="5" />
@ -65,7 +65,7 @@
</div> </div>
<div class="signup-footer"> <div class="signup-footer">
<div class="pull-left"> <div class="pull-left">
Copyright © 2018-2025 ruoyi.vip All Rights Reserved. <br> Copyright © 2018-2025 unissense All Rights Reserved. <br>
</div> </div>
</div> </div>
</div> </div>

View File

@ -23,7 +23,7 @@
<input type="text" name="agentCode"/> <input type="text" name="agentCode"/>
</li> </li>
<li> <li>
<label>办事名称:</label> <label>办事名称:</label>
<input type="text" name="agentName"/> <input type="text" name="agentName"/>
</li> </li>
<li style="width: 95%;text-align: right"> <li style="width: 95%;text-align: right">

View File

@ -130,14 +130,14 @@
<thead> <thead>
<tr> <tr>
<th>合同识别号</th> <th>合同识别号</th>
<th>合同类型</th> <th>版本号</th>
<th>服务级别</th> <th>合同名称</th>
<th>服务级别描述</th> <th>销售人员姓名</th>
<th>服务项</th> <th>邮箱</th>
<th>服务项描述</th> <th>最终客户名称</th>
<th>开始时间</th> <th>联系人</th>
<th>结束时间</th> <th>电话</th>
<th>状态</th> <th>邮箱</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -185,19 +185,19 @@
}) })
$.operate.get(`/manage/service/order?serialNumber=${serialNumber}`, function (res){ $.operate.get(`/manage/service/order?serialNumber=${serialNumber}`, function (res){
let str=`<tr><td colspan="9" style="text-align: center">暂无数据</td></tr>` let str=`<tr><td colspan="9" style="text-align: center">暂无数据</td></tr>`
if(res.data.length){ if(res.data && res.data.length){
str=`` str=``
res.data.forEach((ele)=>{ res.data.forEach((ele)=>{
str+=`<tr> str+=`<tr>
<td>${ele.orderCode}</td> <td>${ele.orderCode}</td>
<td>${ele.orderType == 'zq' ? '直签合同' : '代理合同'}</td> <td>${ele.versionCode}</td>
<td></td> <td>${ele.orderName}</td>
<td></td> <td>${ele.saleName}</td>
<td></td> <td>${ele.saleEmail}</td>
<td></td> <td>${ele.customerName}</td>
<td>${ele.createdAt}</td> <td>${ele.contactPerson}</td>
<td></td> <td>${ele.contactPhone}</td>
<td>${ele.status == 0 ? '有效' : '无效'}</td> <td>${ele.contactEmail}</td>
</tr>` </tr>`
}) })
} }
@ -205,7 +205,7 @@
}) })
$.operate.get(`/manage/service/query?serialNumber=${serialNumber}`, function (res){ $.operate.get(`/manage/service/query?serialNumber=${serialNumber}`, function (res){
let str=`<tr><td colspan="9" style="text-align: center">暂无数据</td></tr>` let str=`<tr><td colspan="9" style="text-align: center">暂无数据</td></tr>`
if(res.data.length){ if(res.data && res.data.length){
str=`` str=``
res.data.forEach((ele)=>{ res.data.forEach((ele)=>{
str+=`<tr> str+=`<tr>

View File

@ -64,16 +64,16 @@
</div> </div>
<div class="btn-group-sm" id="toolbar" role="group"> <div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:info:add"> <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:customer:add">
<i class="fa fa-plus"></i> 添加 <i class="fa fa-plus"></i> 添加
</a> </a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:info:edit"> <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:customer:edit">
<i class="fa fa-edit"></i> 修改 <i class="fa fa-edit"></i> 修改
</a> </a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:info:remove"> <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:customer:remove">
<i class="fa fa-remove"></i> 删除 <i class="fa fa-remove"></i> 删除
</a> </a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:info:export"> <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:customer:export">
<i class="fa fa-download"></i> 导出 <i class="fa fa-download"></i> 导出
</a> </a>
</div> </div>
@ -84,8 +84,8 @@
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<script th:inline="javascript"> <script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:info:edit')}]]; var editFlag = [[${@permission.hasPermi('system:customer:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:info:remove')}]]; var removeFlag = [[${@permission.hasPermi('system:customer:remove')}]];
var prefix = ctx + "system/customer"; var prefix = ctx + "system/customer";
$(function() { $(function() {

View File

@ -3,7 +3,9 @@ package com.ruoyi.sip.controller;
import com.ruoyi.common.annotation.Anonymous; import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.sip.domain.MaintenanceRecordsDto; import com.ruoyi.sip.domain.MaintenanceRecordsDto;
import com.ruoyi.sip.dto.ApiDataQueryDto;
import com.ruoyi.sip.service.IMaintenanceService; import com.ruoyi.sip.service.IMaintenanceService;
import com.ruoyi.sip.service.IOrderDeliveryService; import com.ruoyi.sip.service.IOrderDeliveryService;
import com.ruoyi.sip.service.IOrderInfoService; import com.ruoyi.sip.service.IOrderInfoService;
@ -54,6 +56,9 @@ public class MaintenanceController {
@Anonymous @Anonymous
public AjaxResult query(MaintenanceRecordsDto dto) public AjaxResult query(MaintenanceRecordsDto dto)
{ {
if (StringUtils.isEmpty(dto.getSerialNumber())){
return AjaxResult.success();
}
return AjaxResult.success(service.query(dto)); return AjaxResult.success(service.query(dto));
} }
@ -70,7 +75,12 @@ public class MaintenanceController {
@Anonymous @Anonymous
public AjaxResult order(MaintenanceRecordsDto dto) public AjaxResult order(MaintenanceRecordsDto dto)
{ {
return AjaxResult.success(orderInfoService.selectOrderInfoByMaintenance(dto)); if (StringUtils.isEmpty(dto.getSerialNumber())){
return AjaxResult.success();
}
ApiDataQueryDto queryDto=new ApiDataQueryDto();
queryDto.setSerialNumber(dto.getSerialNumber());
return AjaxResult.success(orderInfoService.getOrderInfo(queryDto));
} }
} }

View File

@ -31,8 +31,8 @@ public class AgentInfo extends BaseEntity
private String agentCode; private String agentCode;
private List<String> agentCodeList; private List<String> agentCodeList;
/** 办处名称 */ /** 办处名称 */
@Excel(name = "办处名称") @Excel(name = "办处名称")
private String agentName; private String agentName;
/** 所在省 */ /** 所在省 */

View File

@ -99,6 +99,8 @@ public class OrderInfo extends BaseEntity
/** 合同清单信息 */ /** 合同清单信息 */
private List<OrderList> orderListList; private List<OrderList> orderListList;
private String serialNumber;
} }

View File

@ -159,8 +159,15 @@ public class OrderInfoServiceImpl implements IOrderInfoService
@Override @Override
public List<OrderInfoVo> getOrderInfo(ApiDataQueryDto dto) { public List<OrderInfoVo> getOrderInfo(ApiDataQueryDto dto) {
OrderInfo queryParams = new OrderInfo(); OrderInfo queryParams = new OrderInfo();
queryParams.setUpdatedAtStart(dto.getQueryStartTime()); if (dto.getQueryStartTime()!=null) {
queryParams.setUpdatedAtEnd(dto.getQueryEndTime()); queryParams.setUpdatedAtStart(dto.getQueryStartTime());
}
if (dto.getQueryEndTime()!=null) {
queryParams.setUpdatedAtEnd(dto.getQueryEndTime());
}
if (StringUtils.isNotEmpty(dto.getSerialNumber())){
queryParams.setSerialNumber(dto.getSerialNumber());
}
List<OrderInfo> orderInfos = orderInfoMapper.selectOrderInfoList(queryParams); List<OrderInfo> orderInfos = orderInfoMapper.selectOrderInfoList(queryParams);
if (CollUtil.isEmpty(orderInfos)) { if (CollUtil.isEmpty(orderInfos)) {

View File

@ -117,7 +117,11 @@
and updated_at <![CDATA[ <= ]]> #{updatedAtEnd} and updated_at <![CDATA[ <= ]]> #{updatedAtEnd}
</when> </when>
</choose> </choose>
<if test="serialNumber!=null and serialNumber!=''">
and id in (SELECT order_id from order_delivery where id in (
select delivery_id from delivery_list where serial_number=#{serialNumber}))
</if>
</where> </where>
</select> </select>