From f9b9653cc6cd5e4e7b0792d3efa30e9694a305f3 Mon Sep 17 00:00:00 2001 From: "kuang.yife" Date: Tue, 16 May 2023 14:44:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9A=94=E7=A6=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../order/OrderDetailController.java | 3 ++ .../worker/WorkerCertificationController.java | 3 ++ .../mapper/order/OrderDetailMapper.xml | 4 ++ .../worker/WorkerCertificationMapper.xml | 39 ++++++++++--------- 4 files changed, 30 insertions(+), 19 deletions(-) diff --git a/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderDetailController.java b/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderDetailController.java index 1c6c41b0..07940581 100644 --- a/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderDetailController.java +++ b/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderDetailController.java @@ -118,6 +118,9 @@ public class OrderDetailController extends BaseController { @ResponseBody public TableDataInfo list(OrderDetail orderDetail) { startPage(); + if(this.getSysUser().getDept().getParentId() != 101){ + orderDetail.setDeptId(this.getSysUser().getDept().getParentId()); + } List orderDetails = orderDetailService.selectOrderDetailList(orderDetail); Set customerIds = orderDetails.stream().map(OrderDetail::getCustomerId).collect(Collectors.toSet()); diff --git a/ghy-admin/src/main/java/com/ghy/web/controller/worker/WorkerCertificationController.java b/ghy-admin/src/main/java/com/ghy/web/controller/worker/WorkerCertificationController.java index 2e8d62de..e5c60d1b 100644 --- a/ghy-admin/src/main/java/com/ghy/web/controller/worker/WorkerCertificationController.java +++ b/ghy-admin/src/main/java/com/ghy/web/controller/worker/WorkerCertificationController.java @@ -81,6 +81,9 @@ public class WorkerCertificationController extends BaseController public TableDataInfo list(WorkerCertification workerCertification) { startPage(); + if(this.getSysUser().getDept().getParentId() != 101){ + workerCertification.setDeptId(this.getSysUser().getDept().getParentId()); + } List list = workerCertificationService.selectWorkerCertificationList(workerCertification); return getDataTable(list); } diff --git a/ghy-order/src/main/resources/mapper/order/OrderDetailMapper.xml b/ghy-order/src/main/resources/mapper/order/OrderDetailMapper.xml index a8ec99a2..9907f502 100644 --- a/ghy-order/src/main/resources/mapper/order/OrderDetailMapper.xml +++ b/ghy-order/src/main/resources/mapper/order/OrderDetailMapper.xml @@ -96,11 +96,15 @@ LEFT JOIN order_master om ON om.id = od.order_master_id LEFT JOIN customer_address ca ON ca.customer_address_id = om.address_id LEFT JOIN goods g ON g.goods_id = om.goods_id + left join worker w on od.worker_id = w.worker_id - + select worker_certification.* from worker_certification left join worker on worker_certification.worker_id = worker.worker_id - and worker_id = #{workerId} - and name like concat('%', #{name}, '%') - and id_card_num = #{idCardNum} - and id_card_url_1 = #{idCardUrl1} - and id_card_url_2 = #{idCardUrl2} - and brand_name like concat('%', #{brandName}, '%') - and company_size = #{companySize} - and company_name like concat('%', #{companyName}, '%') - and business_license_num = #{businessLicenseNum} - and business_license_url = #{businessLicenseUrl} - and company_province_id = #{companyProvinceId} - and company_city_id = #{companyCityId} - and company_country_id = #{companyCountryId} - and company_address = #{companyAddress} - and legal_persion_name like concat('%', #{legalPersionName}, '%') - and legal_persion_phone_num = #{legalPersionPhoneNum} - and other_serv = #{otherServ} - and status = #{status} + and worker_certification.worker_id = #{workerId} + and worker_certification.name like concat('%', #{name}, '%') + and worker_certification.id_card_num = #{idCardNum} + and worker_certification.id_card_url_1 = #{idCardUrl1} + and worker_certification.id_card_url_2 = #{idCardUrl2} + and worker_certification.brand_name like concat('%', #{brandName}, '%') + and worker_certification.company_size = #{companySize} + and worker_certification.company_name like concat('%', #{companyName}, '%') + and worker_certification.business_license_num = #{businessLicenseNum} + and worker_certification.business_license_url = #{businessLicenseUrl} + and worker_certification.company_province_id = #{companyProvinceId} + and worker_certification.company_city_id = #{companyCityId} + and worker_certification.company_country_id = #{companyCountryId} + and worker_certification.company_address = #{companyAddress} + and worker_certification.legal_persion_name like concat('%', #{legalPersionName}, '%') + and worker_certification.legal_persion_phone_num = #{legalPersionPhoneNum} + and worker_certification.other_serv = #{otherServ} + and worker_certification.status = #{status} + and worker.dept_id = #{deptId}