From d4d53e7a5fe430194f3d9007862326a206e09231 Mon Sep 17 00:00:00 2001 From: chenhc <2369838784@qq.com> Date: Fri, 7 Mar 2025 15:13:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20xml=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/dev/DeptDeviceDetailDao.xml | 72 +++++---- .../mybatis/mapper/inout/IoOrderDao.xml | 141 ++++++++++++------ .../mapper/inout/IoOrderInvoiceMapper.xml | 53 +++++-- .../mapper/inout/IoOrderMutiMapper.xml | 19 ++- .../mapper/inout/IoOrderMutiSetMapper.xml | 14 +- .../mapper/inout/IoOrderUploadLogDao.xml | 7 +- .../mybatis/mapper/inout/IoStatDayDao.xml | 13 +- .../mapper/inout/IoStatDetailMapper.xml | 14 +- .../mybatis/mapper/inout/IoStatMonthDao.xml | 14 +- .../mybatis/mapper/inout/IoStatQuarterDao.xml | 14 +- .../mybatis/mapper/inout/IoStatYearDao.xml | 12 +- .../mybatis/mapper/inout/ReceiveDao.xml | 42 ++++-- .../system/SystemPDFTemplateRelevanceDao.xml | 6 +- .../mybatis/mapper/thrsys/ThrDeptDao.xml | 14 -- 14 files changed, 283 insertions(+), 152 deletions(-) diff --git a/src/main/resources/mybatis/mapper/dev/DeptDeviceDetailDao.xml b/src/main/resources/mybatis/mapper/dev/DeptDeviceDetailDao.xml index f7d4e44ba..f9b7f6332 100644 --- a/src/main/resources/mybatis/mapper/dev/DeptDeviceDetailDao.xml +++ b/src/main/resources/mybatis/mapper/dev/DeptDeviceDetailDao.xml @@ -7,33 +7,41 @@ diff --git a/src/main/resources/mybatis/mapper/inout/IoOrderDao.xml b/src/main/resources/mybatis/mapper/inout/IoOrderDao.xml index 368020c31..33c103e42 100644 --- a/src/main/resources/mybatis/mapper/inout/IoOrderDao.xml +++ b/src/main/resources/mybatis/mapper/inout/IoOrderDao.xml @@ -254,29 +254,47 @@ - SELECT * - FROM io_order - WHERE (supplementNo IS NULL OR supplementNo = '') - AND `action` IN (SELECT `action` - FROM basic_bussiness_type - WHERE supplementOrderType IS NOT NULL - and supplementOrderType - != '') + SELECT io.* + FROM io_order io + WHERE (io.supplementNo IS NULL OR io.supplementNo = '') + AND EXISTS( + SELECT 1 + FROM basic_bussiness_type bbt + WHERE bbt.action = io.action + AND bbt.supplementOrderType IS NOT NULL + AND bbt.supplementOrderType != '' + ) - select io.*, - (select name from basic_bussiness_type bus where bus.action = io.action) billTypeName, - (select name from auth_dept ad where ad.code = io.deptCode) deptName, - (select name from auth_warehouse aw where aw.code = io.invCode) invName, - (select employeeName from auth_user au where au.id = io.createUser) createUserName, - (select employeeName from auth_user au2 where au2.id = io.updateUser) updateUserName, - (select employeeName from auth_user au3 where au3.id = io.reviewUser) reviewUserName, - (select employeeName from auth_user au4 where au4.id = io.checkUser) checkUserName, - (select name from auth_dept ad2 where ad2.code = io.fromDeptCode) fromDeptName, - (select name from auth_warehouse aw2 where aw2.code = io.fromInvCode) fromInvName, - (select name from basic_corp bc where bc.erpId = io.fromCorp) fromCorpName, - (select name from basic_corp bc where bc.erpId = io.customerId) customerName - from io_order as io - inner join io_order_invoice ioi on io.billNo = ioi.orderIdFk + SELECT + io.*, + bus.name AS billTypeName, + ad.name AS deptName, + aw.name AS invName, + au_create.employeeName AS createUserName, + au_update.employeeName AS updateUserName, + au_review.employeeName AS reviewUserName, + au_check.employeeName AS checkUserName, + ad_from.name AS fromDeptName, + aw_from.name AS fromInvName, + bc_from.name AS fromCorpName, + bc_customer.name AS customerName + FROM + io_order AS io + INNER JOIN + io_order_invoice AS ioi ON io.billNo = ioi.orderIdFk + LEFT JOIN + basic_bussiness_type AS bus ON bus.action = io.action + LEFT JOIN + auth_dept AS ad ON ad.code = io.deptCode + LEFT JOIN + auth_warehouse AS aw ON aw.code = io.invCode + LEFT JOIN + auth_user AS au_create ON au_create.id = io.createUser + LEFT JOIN + auth_user AS au_update ON au_update.id = io.updateUser + LEFT JOIN + auth_user AS au_review ON au_review.id = io.reviewUser + LEFT JOIN + auth_user AS au_check ON au_check.id = io.checkUser + LEFT JOIN + auth_dept AS ad_from ON ad_from.code = io.fromDeptCode + LEFT JOIN + auth_warehouse AS aw_from ON aw_from.code = io.fromInvCode + LEFT JOIN + basic_corp AS bc_from ON bc_from.erpId = io.fromCorp + LEFT JOIN + basic_corp AS bc_customer ON bc_customer.erpId = io.customerId AND ioi.invoiceEncode = #{invoiceEncode} diff --git a/src/main/resources/mybatis/mapper/inout/IoOrderMutiMapper.xml b/src/main/resources/mybatis/mapper/inout/IoOrderMutiMapper.xml index 780470d91..96c11e63b 100644 --- a/src/main/resources/mybatis/mapper/inout/IoOrderMutiMapper.xml +++ b/src/main/resources/mybatis/mapper/inout/IoOrderMutiMapper.xml @@ -5,14 +5,19 @@ SELECT io.*, - (SELECT NAME FROM auth_warehouse aw WHERE aw.CODE = io.curInv) invName, - (SELECT NAME FROM basic_corp bc WHERE bc.erpId = io.fromCorp) fromCorpName, - (SELECT NAME FROM basic_bussiness_type bus WHERE bus.action = io.targetAction) targetActionName + a1.NAME AS invName, + bc.NAME AS fromCorpName, + bus.NAME AS targetActionName FROM io_order_muti_set io - left join auth_warehouse a1 on a1.code=io.curInv + LEFT JOIN + auth_warehouse a1 ON a1.code = io.curInv + LEFT JOIN + basic_corp bc ON bc.erpId = io.fromCorp + LEFT JOIN + basic_bussiness_type bus ON bus.action = io.targetAction + AND a1.name like concat('%', #{curInv}, '%') diff --git a/src/main/resources/mybatis/mapper/inout/IoOrderUploadLogDao.xml b/src/main/resources/mybatis/mapper/inout/IoOrderUploadLogDao.xml index f444a5a1d..b82de9941 100644 --- a/src/main/resources/mybatis/mapper/inout/IoOrderUploadLogDao.xml +++ b/src/main/resources/mybatis/mapper/inout/IoOrderUploadLogDao.xml @@ -28,8 +28,11 @@ - select *, ( SELECT NAME FROM auth_dept WHERE io_stat_day.deptCode = auth_dept.CODE ) deptName - from io_stat_day + SELECT io_stat_day.*, + ad.NAME AS deptName + FROM io_stat_day + LEFT JOIN + auth_dept ad ON io_stat_day.deptCode = ad.CODE AND recordKeyFk = #{recordKey} @@ -21,7 +24,11 @@ diff --git a/src/main/resources/mybatis/mapper/inout/IoStatDetailMapper.xml b/src/main/resources/mybatis/mapper/inout/IoStatDetailMapper.xml index 123c066fe..d1082f05a 100644 --- a/src/main/resources/mybatis/mapper/inout/IoStatDetailMapper.xml +++ b/src/main/resources/mybatis/mapper/inout/IoStatDetailMapper.xml @@ -33,8 +33,11 @@ diff --git a/src/main/resources/mybatis/mapper/inout/IoStatMonthDao.xml b/src/main/resources/mybatis/mapper/inout/IoStatMonthDao.xml index f5aae9dfe..c7e634793 100644 --- a/src/main/resources/mybatis/mapper/inout/IoStatMonthDao.xml +++ b/src/main/resources/mybatis/mapper/inout/IoStatMonthDao.xml @@ -2,8 +2,11 @@ diff --git a/src/main/resources/mybatis/mapper/inout/IoStatQuarterDao.xml b/src/main/resources/mybatis/mapper/inout/IoStatQuarterDao.xml index d35d0568f..bbd7ba6ff 100644 --- a/src/main/resources/mybatis/mapper/inout/IoStatQuarterDao.xml +++ b/src/main/resources/mybatis/mapper/inout/IoStatQuarterDao.xml @@ -2,8 +2,11 @@ diff --git a/src/main/resources/mybatis/mapper/inout/IoStatYearDao.xml b/src/main/resources/mybatis/mapper/inout/IoStatYearDao.xml index a5360a710..c989d89d4 100644 --- a/src/main/resources/mybatis/mapper/inout/IoStatYearDao.xml +++ b/src/main/resources/mybatis/mapper/inout/IoStatYearDao.xml @@ -2,8 +2,10 @@ diff --git a/src/main/resources/mybatis/mapper/inout/ReceiveDao.xml b/src/main/resources/mybatis/mapper/inout/ReceiveDao.xml index ea0e87d27..a70fc1366 100644 --- a/src/main/resources/mybatis/mapper/inout/ReceiveDao.xml +++ b/src/main/resources/mybatis/mapper/inout/ReceiveDao.xml @@ -2,18 +2,36 @@