From ed071f16207d7c66bd8bc1ef239ff4b7d685df8a Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Tue, 18 Nov 2025 15:53:04 +0800 Subject: [PATCH] =?UTF-8?q?2025-11-18=20=E6=B5=8B=E8=AF=95=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E4=B8=AD=E6=9D=90=E6=96=99=E6=80=BB=E9=87=91=E9=A2=9D?= =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E6=9D=90=E6=96=99=E4=BF=A1=E6=81=AF=E5=90=8C?= =?UTF-8?q?=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test/controller/TestInformationController.java | 14 ++++++++++++++ .../test/service/TestInformationService.java | 2 ++ .../service/impl/TestInformationServiceImpl.java | 13 +++++++++++++ 3 files changed, 29 insertions(+) diff --git a/src/main/java/com/spring/modules/test/controller/TestInformationController.java b/src/main/java/com/spring/modules/test/controller/TestInformationController.java index d7057872..e9e2428b 100644 --- a/src/main/java/com/spring/modules/test/controller/TestInformationController.java +++ b/src/main/java/com/spring/modules/test/controller/TestInformationController.java @@ -295,4 +295,18 @@ public class TestInformationController { TestInformationEntity row = testInformationService.getTestRemarkEntry(data); return R.ok().put("row", row); } + + /** + * @description: 更新测试主信息的材料总金额 + * @author: AI Assistant + * @date: 2025/11/18 + * @param: [data] + * @return: com.spring.common.utils.R + **/ + @PostMapping(value="/updateMaterialTotalAmount") + @ResponseBody + public R updateMaterialTotalAmount(@RequestBody TestInformationVo data) { + testInformationService.updateMaterialTotalAmount(data); + return R.ok("更新成功"); + } } diff --git a/src/main/java/com/spring/modules/test/service/TestInformationService.java b/src/main/java/com/spring/modules/test/service/TestInformationService.java index d61bf502..e0ad50ca 100644 --- a/src/main/java/com/spring/modules/test/service/TestInformationService.java +++ b/src/main/java/com/spring/modules/test/service/TestInformationService.java @@ -58,4 +58,6 @@ public interface TestInformationService extends IService void testInfoEditEntry(TestInformationVo data); TestInformationEntity getTestRemarkEntry(TestInformationVo data); + + void updateMaterialTotalAmount(TestInformationVo data); } diff --git a/src/main/java/com/spring/modules/test/service/impl/TestInformationServiceImpl.java b/src/main/java/com/spring/modules/test/service/impl/TestInformationServiceImpl.java index e9668c91..9b342af9 100644 --- a/src/main/java/com/spring/modules/test/service/impl/TestInformationServiceImpl.java +++ b/src/main/java/com/spring/modules/test/service/impl/TestInformationServiceImpl.java @@ -202,6 +202,19 @@ public class TestInformationServiceImpl extends ServiceImpl updateWrapper = new UpdateWrapper<>(); + updateWrapper.eq("test_no", data.getTestNo()) + .set("material_total_amount", data.getMaterialTotalAmount()); + testInformationMapper.update(null, updateWrapper); + } + /** * 下达 * @param data