发货单查询调整

This commit is contained in:
mzr 2024-04-29 16:58:48 +08:00
parent 16fdd20676
commit b67be8fcda
3 changed files with 32 additions and 10 deletions

View File

@ -77,11 +77,15 @@ public class InvoiceApp extends BaseController {
if (!redisService.exists(token)) {
return AjaxResult.error(ErrorUtils.IS_NOT_LOGIN_ERROR, "用户未登录");
}
params = roleDateUtils.roleUtiles(token, "", "", "");
if ("0".equals(params.get("code"))) {
return AjaxResult.error(ErrorUtils.USERNAME_POWER_ERROR, "无权查看");
}
Map<String, String> tokenMap = redisService.hmget(token);
if ("GW1000105".equals(tokenMap.get("jobPostion"))) {
params.put("serviceId", tokenMap.get("archivesId") + "");
} else {
params = roleDateUtils.roleUtiles(token, "", "", "");
if ("0".equals(params.get("code"))) {
return AjaxResult.error(ErrorUtils.USERNAME_POWER_ERROR, "无权查看");
}
}
params.put("companyId", tokenMap.get("companyId") + "");
params.put("id", id);
params.put("status", status);
@ -124,9 +128,14 @@ public class InvoiceApp extends BaseController {
if (!redisService.exists(token)) {
return AjaxResult.error(ErrorUtils.IS_NOT_LOGIN_ERROR, "用户未登录");
}
params = roleDateUtils.roleUtiles(token, "", "", "");
if ("0".equals(params.get("code"))) {
return AjaxResult.error(ErrorUtils.USERNAME_POWER_ERROR, "无权查看");
Map<String, String> tokenMap = redisService.hmget(token);
if ("GW1000105".equals(tokenMap.get("jobPostion"))) {
params.put("serviceId", tokenMap.get("archivesId") + "");
} else {
params = roleDateUtils.roleUtiles(token, "", "", "");
if ("0".equals(params.get("code"))) {
return AjaxResult.error(ErrorUtils.USERNAME_POWER_ERROR, "无权查看");
}
}
// 0.未作废 1.作废
params.put("status", "0");

View File

@ -110,9 +110,14 @@ public class InvoiceController extends BaseController {
if (!redisService.isKey(token)) {
return AjaxResult.error(ErrorUtils.IS_NOT_LOGIN_ERROR, "用户未登录");
}
params = roleDateUtils.roleUtiles(token, "", "", "");
if ("0".equals(params.get("code"))) {
return AjaxResult.error(ErrorUtils.USERNAME_POWER_ERROR, "无权查看");
Map<String, String> tokenMap = redisService.hmget(token);
if ("GW1000105".equals(tokenMap.get("jobPostion"))) {
params.put("serviceId", tokenMap.get("archivesId") + "");
} else {
params = roleDateUtils.roleUtiles(token, "", "", "");
if ("0".equals(params.get("code"))) {
return AjaxResult.error(ErrorUtils.USERNAME_POWER_ERROR, "无权查看");
}
}
params.put("id", id);
params.put("status", status);

View File

@ -81,6 +81,7 @@
a.delivery_time, a.receipt_date, a.process_instance_id, a.menu_code, a.company_id, a.cdl_code, a.inv_url,
a.wh_code, a.wh_name, 0 totalMoney
FROM crm_invoice_info a
LEFT JOIN crm_distributor_user_info b ON a.client_id = b.id
<where>
<if test="id != null and id != ''">
and a.id = #{id}
@ -165,6 +166,9 @@
<if test="areaId != null and areaId != ''">
AND a.area_id = #{areaId}
</if>
<if test="serviceId != null and serviceId != ''">
AND b.service_id = #{serviceId}
</if>
<if test="staffId != null and staffId != ''">
AND a.staff_id = #{staffId}
</if>
@ -298,6 +302,7 @@
a.client_name "clientName",
a.delivery_time "deliveryTime"
FROM crm_invoice_view a
LEFT JOIN crm_distributor_user_info b ON a.client_id = b.id
<where>
<if test="clientId != null and clientId != ''">
and a.client_id = #{clientId}
@ -308,6 +313,9 @@
<if test="companyId != null and companyId != ''">
AND a.company_id = #{companyId}
</if>
<if test="serviceId != null and serviceId != ''">
AND b.service_id = #{serviceId}
</if>
<if test="userId !=null and userId != ''">
and (
a.client_id LIKE '%' || #{userId} || '%'