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