From f5ca895ae0625dc3a273a3d33d6d57f33147357d Mon Sep 17 00:00:00 2001 From: xhj Date: Sat, 14 Sep 2024 16:55:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=BD=99=E6=96=99=EF=BC=8C?= =?UTF-8?q?=E8=B4=A8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/pbsc/MpYlxxpController.java | 12 +++++ .../gj_erp/service/pgsc/MpYlxxpService.java | 7 +++ .../service/pgsc/impl/MpYlxxpServiceImpl.java | 12 +++++ .../resources/mappers/pbsc/MpYlxxpMapper.xml | 52 +++++++++++-------- 4 files changed, 62 insertions(+), 21 deletions(-) diff --git a/src/main/java/com/dsic/gj_erp/controller/pbsc/MpYlxxpController.java b/src/main/java/com/dsic/gj_erp/controller/pbsc/MpYlxxpController.java index ab03480..0e9e5c0 100644 --- a/src/main/java/com/dsic/gj_erp/controller/pbsc/MpYlxxpController.java +++ b/src/main/java/com/dsic/gj_erp/controller/pbsc/MpYlxxpController.java @@ -39,6 +39,9 @@ public class MpYlxxpController { @Autowired DmBchxylpMapper dmBchxylpMapper; + + + @PostMapping("/getYlList") @ResponseBody public ResultBean getYlList(HttpServletRequest req, @RequestBody Map map) throws Exception, CustomException { @@ -160,5 +163,14 @@ public class MpYlxxpController { } return new ResultBean(); } + + @PostMapping("/czzjList") + @ResponseBody + public ResultBean czzjList(HttpServletRequest req, @RequestBody Map map ) throws Exception, CustomException { + List maps = mpYlxxpService.czzjList(map); + return new ResultBean(maps); + } + + } diff --git a/src/main/java/com/dsic/gj_erp/service/pgsc/MpYlxxpService.java b/src/main/java/com/dsic/gj_erp/service/pgsc/MpYlxxpService.java index 250e075..149d3c3 100644 --- a/src/main/java/com/dsic/gj_erp/service/pgsc/MpYlxxpService.java +++ b/src/main/java/com/dsic/gj_erp/service/pgsc/MpYlxxpService.java @@ -3,6 +3,9 @@ package com.dsic.gj_erp.service.pgsc; import com.baomidou.mybatisplus.extension.service.IService; import com.dsic.gj_erp.bean.pbsc.MpYlxxp; +import java.util.List; +import java.util.Map; + /** *

* 服务类 @@ -13,4 +16,8 @@ import com.dsic.gj_erp.bean.pbsc.MpYlxxp; */ public interface MpYlxxpService extends IService { + + + public List czzjList(Map map); + } diff --git a/src/main/java/com/dsic/gj_erp/service/pgsc/impl/MpYlxxpServiceImpl.java b/src/main/java/com/dsic/gj_erp/service/pgsc/impl/MpYlxxpServiceImpl.java index a1bdae6..f004557 100644 --- a/src/main/java/com/dsic/gj_erp/service/pgsc/impl/MpYlxxpServiceImpl.java +++ b/src/main/java/com/dsic/gj_erp/service/pgsc/impl/MpYlxxpServiceImpl.java @@ -3,8 +3,12 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.dsic.gj_erp.bean.pbsc.MpYlxxp; import com.dsic.gj_erp.mapper.pbsc.MpYlxxpMapper; import com.dsic.gj_erp.service.pgsc.MpYlxxpService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.List; +import java.util.Map; + /** *

* 服务实现类 @@ -16,4 +20,12 @@ import org.springframework.stereotype.Service; @Service public class MpYlxxpServiceImpl extends ServiceImpl implements MpYlxxpService { + @Autowired + MpYlxxpMapper mpYlxxpMapper; + + + @Override + public List czzjList(Map map) { + return mpYlxxpMapper.czzjList(map); + } } diff --git a/src/main/resources/mappers/pbsc/MpYlxxpMapper.xml b/src/main/resources/mappers/pbsc/MpYlxxpMapper.xml index 10b3e9b..c2e210f 100644 --- a/src/main/resources/mappers/pbsc/MpYlxxpMapper.xml +++ b/src/main/resources/mappers/pbsc/MpYlxxpMapper.xml @@ -59,42 +59,52 @@ SELECT DISTINCT RTRIM(MP_DHSJ.DHH) AS DHH, RTRIM(MP_DHSJ.WPH) AS WPH, - MP_DHSJ.DHSL, - RTRIM(MP_DHSJ.DC_CH) as DC_CH, - RTRIM(MP_DHSJ.DC_PL) as DC_PL, - - RTRIM(MP_DHSJ.DC_TH ) as DC_TH, - - - RTRIM(MP_DHSJ.DC_PB ) as DC_PB, - + RTRIM(MP_DHSJ.DC_TH) as DC_TH, + RTRIM(MP_DHSJ.DC_PB) as DC_PB, MP_DHSJ.DC_LPH, - RTRIM(MP_DHSJ.sjksrqg) as sjksrqg, - RTRIM(DM_WPJBP.WPMC) AS WPMC, - RTRIM(MP_DHSJ.dc_tpmc) AS WPGG , - RTRIM(MP_DHSJ.dc_tpbh) AS WPXH , + RTRIM(MP_DHSJ.dc_tpmc) AS WPGG, + RTRIM(MP_DHSJ.dc_tpbh) AS WPXH, RTRIM(QC_ZBSDZP.ZBSH) AS ZBSH, RTRIM(QC_ZBSDZP.GG) AS GG, RTRIM(QC_ZBSDZP.CZ) AS CZ, - ZJZT = CASE WHEN LEN(RTRIM(QC_ZBSDZP.ZBSH)) >=10 THEN 1 - ELSE 0 - END , - FHZT = CASE WHEN LEN(RTRIM(QC_ZBSDZP.ZBSH)) >=10 AND (RTRIM(MP_DHSJ.dc_tpmc) = RTRIM(QC_ZBSDZP.GG) AND RTRIM(MP_DHSJ.dc_tpbh) = RTRIM(QC_ZBSDZP.CZ)) THEN '符合' - WHEN LEN(RTRIM(QC_ZBSDZP.ZBSH)) >=10 AND (RTRIM(MP_DHSJ.dc_tpmc) <> RTRIM(QC_ZBSDZP.GG) OR RTRIM(MP_DHSJ.dc_tpbh) <> RTRIM(QC_ZBSDZP.CZ)) THEN '不符' + ZJZT = CASE WHEN LEN(RTRIM(QC_ZBSDZP.ZBSH)) >= 10 THEN 1 ELSE 0 END, + FHZT = CASE + WHEN LEN(RTRIM(QC_ZBSDZP.ZBSH)) >= 10 + AND (RTRIM(MP_DHSJ.dc_tpmc) = RTRIM(QC_ZBSDZP.GG) + AND RTRIM(MP_DHSJ.dc_tpbh) = RTRIM(QC_ZBSDZP.CZ)) THEN '符合' + WHEN LEN(RTRIM(QC_ZBSDZP.ZBSH)) >= 10 + AND (RTRIM(MP_DHSJ.dc_tpmc) <> RTRIM(QC_ZBSDZP.GG) + OR RTRIM(MP_DHSJ.dc_tpbh) <> RTRIM(QC_ZBSDZP.CZ)) THEN '不符' WHEN LEN(RTRIM(QC_ZBSDZP.ZBSH)) < 10 THEN '' END, '' as xz, - qc_zbsdzp.gdh , + qc_zbsdzp.gdh, qc_zbsdzp.ylzd2 + FROM MP_DHSJ + LEFT JOIN DM_WPJBP ON MP_DHSJ.WPH = DM_WPJBP.WPH + LEFT JOIN QC_ZBSDZP ON MP_DHSJ.DC_LPH = QC_ZBSDZP.LPH + + + + where 1=1 + + + + and MP_DHSJ.DC_CH=#{dcch} + - FROM MP_DHSJ,DM_WPJBP,QC_ZBSDZP - WHERE MP_DHSJ.WPH *= DM_WPJBP.WPH + + and MP_DHSJ.dc_pl>=#{dcpl} and MP_DHSJ.dc_pl<=#{dcpl1} + + + and MP_DHSJ.dc_pl=#{dcpl} +