From 12217c5eb96dc7b144a0783855a8320f5fe53d46 Mon Sep 17 00:00:00 2001 From: TS-QD1 Date: Sat, 13 May 2023 17:46:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=BD=91=E6=A0=BC=E9=95=BF?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apis/kpi/KpiKhxzController.java | 8 +++++++ .../cm/bigdata/dao/kpi/IKpiKhxzWgzDao.java | 2 ++ .../bigdata/service/kpi/IKpiKhxzService.java | 3 +++ .../service/kpi/impl/KpiKhxzServiceImpl.java | 7 ++++++ .../mapper/kpi/kpi-khxz-wgz-mapper.xml | 23 +++++++++++++++++++ 5 files changed, 43 insertions(+) diff --git a/src/main/java/com/cm/bigdata/controller/apis/kpi/KpiKhxzController.java b/src/main/java/com/cm/bigdata/controller/apis/kpi/KpiKhxzController.java index 5495e27..35089ea 100644 --- a/src/main/java/com/cm/bigdata/controller/apis/kpi/KpiKhxzController.java +++ b/src/main/java/com/cm/bigdata/controller/apis/kpi/KpiKhxzController.java @@ -112,6 +112,14 @@ public class KpiKhxzController extends AbstractController { kpiKhxzService.exportWgz(httpServletResponse, queryMap); } + + + @PutMapping("update-wgz") + public synchronized SuccessResult updateWgz(@RequestBody KpiUpdateVO kpiUpdateVO) { + kpiKhxzService.updateWgz(kpiUpdateVO); + return new SuccessResult(); + } + @GetMapping("list-znbm") public List listZnbm() { Map queryMap = requestParams(); diff --git a/src/main/java/com/cm/bigdata/dao/kpi/IKpiKhxzWgzDao.java b/src/main/java/com/cm/bigdata/dao/kpi/IKpiKhxzWgzDao.java index 7473214..dd458a3 100644 --- a/src/main/java/com/cm/bigdata/dao/kpi/IKpiKhxzWgzDao.java +++ b/src/main/java/com/cm/bigdata/dao/kpi/IKpiKhxzWgzDao.java @@ -17,4 +17,6 @@ public interface IKpiKhxzWgzDao { List list(Map params); + void update(Map params); + } diff --git a/src/main/java/com/cm/bigdata/service/kpi/IKpiKhxzService.java b/src/main/java/com/cm/bigdata/service/kpi/IKpiKhxzService.java index 6e80b23..d94d618 100644 --- a/src/main/java/com/cm/bigdata/service/kpi/IKpiKhxzService.java +++ b/src/main/java/com/cm/bigdata/service/kpi/IKpiKhxzService.java @@ -36,9 +36,12 @@ public interface IKpiKhxzService { void exportWgz(HttpServletResponse httpServletResponse, Map queryMap) throws IOException; + void updateWgz(KpiUpdateVO kpiUpdateVO); + List listZnbm(Map queryMap); void exportZnbm(HttpServletResponse httpServletResponse, Map queryMap) throws IOException; + } diff --git a/src/main/java/com/cm/bigdata/service/kpi/impl/KpiKhxzServiceImpl.java b/src/main/java/com/cm/bigdata/service/kpi/impl/KpiKhxzServiceImpl.java index dd7c6f0..f5f540f 100644 --- a/src/main/java/com/cm/bigdata/service/kpi/impl/KpiKhxzServiceImpl.java +++ b/src/main/java/com/cm/bigdata/service/kpi/impl/KpiKhxzServiceImpl.java @@ -174,6 +174,13 @@ public class KpiKhxzServiceImpl extends AbstractService implements IKpiKhxzServi ExcelExportUtil.simple(httpServletResponse, "网格长考核细则", listWgz(queryMap), KpiKhxzWgzDTO.class); } + @Override + public void updateWgz(KpiUpdateVO kpiUpdateVO) { + kpiUpdateVO.getDatas().forEach(params -> { + kpiKhxzWgzDao.update(params); + }); + } + @Override public List listZnbm(Map queryMap) { return kpiKhxzZnbmDao.list(queryMap); diff --git a/src/main/resources/mybatis/mapper/kpi/kpi-khxz-wgz-mapper.xml b/src/main/resources/mybatis/mapper/kpi/kpi-khxz-wgz-mapper.xml index 61196f7..c9d4ee6 100644 --- a/src/main/resources/mybatis/mapper/kpi/kpi-khxz-wgz-mapper.xml +++ b/src/main/resources/mybatis/mapper/kpi/kpi-khxz-wgz-mapper.xml @@ -97,4 +97,27 @@ + + UPDATE + kpi_khxz_wgz + SET + I = #{I}, + reasonI = #{reasonI}, + J = #{J}, + reasonJ = #{reasonJ}, + K = #{K}, + reasonK = #{reasonK}, + L = #{L}, + M = #{M}, + N = #{N}, + O = #{O}, + P = #{P} + WHERE + kh_year = #{khYear} + AND + kh_month = #{khMonth} + AND + user_id = #{userId} + + \ No newline at end of file