From 3bb1e8f6ce33612067af77c4468c523a1abe02c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Thu, 30 Oct 2025 11:42:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(violation):=E4=BF=AE=E5=A4=8D=E8=BF=9D?= =?UTF-8?q?=E7=AB=A0=E8=AE=B0=E5=BD=95=E6=B7=BB=E5=8A=A0=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E5=92=8C=E6=9F=A5=E8=AF=A2=E9=87=8D=E5=A4=8D=E9=97=AE=E9=A2=98?= =?UTF-8?q?-=20=E8=B0=83=E6=95=B4HjmViolationController=E4=B8=AD=E8=BD=A6?= =?UTF-8?q?=E8=BE=86=E7=BC=96=E5=8F=B7=E6=A0=A1=E9=AA=8C=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E7=9A=84=E4=BD=8D=E7=BD=AE=20-=20=E5=9C=A8HjmViolationMapper.x?= =?UTF-8?q?ml=E7=9A=84=E5=85=B3=E8=81=94=E6=9F=A5=E8=AF=A2=E4=B8=AD?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0DISTINCT=E5=85=B3=E9=94=AE=E5=AD=97=E5=8E=BB?= =?UTF-8?q?=E9=87=8D=20-=20=E7=A1=AE=E4=BF=9D=E8=BF=9D=E7=AB=A0=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E4=BF=9D=E5=AD=98=E5=89=8D=E8=BF=9B=E8=A1=8C=E8=BD=A6?= =?UTF-8?q?=E8=BE=86=E5=AD=98=E5=9C=A8=E6=80=A7=E9=AA=8C=E8=AF=81=20-=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=BF=94=E5=9B=9E=E7=BB=93=E6=9E=9C=E5=A4=84?= =?UTF-8?q?=E7=90=86=E9=80=BB=E8=BE=91=E9=81=BF=E5=85=8D=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=BA=A7=E7=94=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hjm/controller/HjmViolationController.java | 16 ++++++++-------- .../hjm/mapper/xml/HjmViolationMapper.xml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/gxwebsoft/hjm/controller/HjmViolationController.java b/src/main/java/com/gxwebsoft/hjm/controller/HjmViolationController.java index 0d0520b..acede29 100644 --- a/src/main/java/com/gxwebsoft/hjm/controller/HjmViolationController.java +++ b/src/main/java/com/gxwebsoft/hjm/controller/HjmViolationController.java @@ -70,14 +70,14 @@ public class HjmViolationController extends BaseController { User loginUser = getLoginUser(); if (loginUser != null) { hjmViolation.setUserId(loginUser.getUserId()); - } - final HjmCar car = hjmCarService.getByCode(hjmViolation.getCode()); - if (ObjUtil.isEmpty(car)) { - return fail("车辆编号不存在"); - } - if (hjmViolationService.save(hjmViolation)) { - hjmViolationService.send(hjmViolation); - return success("添加成功"); + final HjmCar car = hjmCarService.getByCode(hjmViolation.getCode()); + if (ObjUtil.isEmpty(car)) { + return fail("车辆编号不存在"); + } + if (hjmViolationService.save(hjmViolation)) { + hjmViolationService.send(hjmViolation); + return success("添加成功"); + } } return fail("添加失败"); } diff --git a/src/main/java/com/gxwebsoft/hjm/mapper/xml/HjmViolationMapper.xml b/src/main/java/com/gxwebsoft/hjm/mapper/xml/HjmViolationMapper.xml index cde0134..2c8f616 100644 --- a/src/main/java/com/gxwebsoft/hjm/mapper/xml/HjmViolationMapper.xml +++ b/src/main/java/com/gxwebsoft/hjm/mapper/xml/HjmViolationMapper.xml @@ -4,7 +4,7 @@ - SELECT a.*,b.image + SELECT DISTINCT a.*,b.image FROM hjm_violation a LEFT JOIN hjm_car b ON a.code = b.code LEFT JOIN gxwebsoft_core.sys_organization c ON b.organization_id = c.organization_id