From 7086a59e232234ee588b72652e27453165afd89c Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Mon, 8 Jan 2024 16:29:13 +0800 Subject: [PATCH] =?UTF-8?q?2024-01-08=20=E7=89=A9=E6=96=99=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/data/PartSubPropertiesValueData.java | 9 +++++++++ .../controller/PartInformationController.java | 12 ++++++++++++ .../part/mapper/PartInformationMapper.java | 2 ++ .../part/service/PartInformationService.java | 1 + .../service/impl/PartInformationServiceImpl.java | 15 ++++++++++++++- .../mapper/part/PartInformationMapper.xml | 8 ++++++++ 6 files changed, 46 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/spring/modules/base/data/PartSubPropertiesValueData.java b/src/main/java/com/spring/modules/base/data/PartSubPropertiesValueData.java index 67a60c59..a9bb7c7f 100644 --- a/src/main/java/com/spring/modules/base/data/PartSubPropertiesValueData.java +++ b/src/main/java/com/spring/modules/base/data/PartSubPropertiesValueData.java @@ -13,6 +13,15 @@ public class PartSubPropertiesValueData extends PartSubPropertiesValue { private String partDesc; private String valueChooseFlag; private List availableValueList; + private List itemList; + + public List getItemList() { + return itemList; + } + + public void setItemList(List itemList) { + this.itemList = itemList; + } public String getItemDesc() { return itemDesc; diff --git a/src/main/java/com/spring/modules/part/controller/PartInformationController.java b/src/main/java/com/spring/modules/part/controller/PartInformationController.java index ba13eef9..7d590c0f 100644 --- a/src/main/java/com/spring/modules/part/controller/PartInformationController.java +++ b/src/main/java/com/spring/modules/part/controller/PartInformationController.java @@ -274,4 +274,16 @@ public class PartInformationController { partInformationService.deleteManufacturer(data); return R.ok(); } + + /** + * 修改物料属性值 + * @param data + * @return + */ + @PostMapping(value="/commitItemValue") + @ResponseBody + public R commitItemValue(@RequestBody PartSubPropertiesValueData data){ + partInformationService.commitItemValue(data); + return R.ok(); + } } diff --git a/src/main/java/com/spring/modules/part/mapper/PartInformationMapper.java b/src/main/java/com/spring/modules/part/mapper/PartInformationMapper.java index 00624327..a8bc1a47 100644 --- a/src/main/java/com/spring/modules/part/mapper/PartInformationMapper.java +++ b/src/main/java/com/spring/modules/part/mapper/PartInformationMapper.java @@ -72,4 +72,6 @@ public interface PartInformationMapper extends BaseMapper List getManufacturerListBy(ManufacturerInformationVo data); void deleteManufacturer(ManufacturerInformationVo data); + + void commitItemValue(PartSubPropertiesValueData partSubPropertiesValueData); } diff --git a/src/main/java/com/spring/modules/part/service/PartInformationService.java b/src/main/java/com/spring/modules/part/service/PartInformationService.java index c04b8d06..9438839d 100644 --- a/src/main/java/com/spring/modules/part/service/PartInformationService.java +++ b/src/main/java/com/spring/modules/part/service/PartInformationService.java @@ -59,4 +59,5 @@ public interface PartInformationService { void deleteManufacturer(ManufacturerInformationVo data); + void commitItemValue(PartSubPropertiesValueData data); } diff --git a/src/main/java/com/spring/modules/part/service/impl/PartInformationServiceImpl.java b/src/main/java/com/spring/modules/part/service/impl/PartInformationServiceImpl.java index c20b8588..a251bc92 100644 --- a/src/main/java/com/spring/modules/part/service/impl/PartInformationServiceImpl.java +++ b/src/main/java/com/spring/modules/part/service/impl/PartInformationServiceImpl.java @@ -235,7 +235,7 @@ public class PartInformationServiceImpl extends ServiceImpl checkValueHeaderData = partInformationMapper.checkValueHeaderData(data); // 初次或修改物料模板则重新加载模板 - if (checkValueHeaderData.size() == 0) { + if (checkValueHeaderData.isEmpty()) { // 删除物料的属性和属性值 partInformationMapper.deletePartSubPropertiesValueHeader(data); partInformationMapper.deletePartSubPropertiesValue(data); @@ -422,6 +422,19 @@ public class PartInformationServiceImpl extends ServiceImpl + + + + UPDATE PartSubPropertiesValue + SET TextValue = #{textValue}, + NumValue = #{numValue,jdbcType=DECIMAL} + WHERE PartNo = #{partNo} and Site = #{site} and CodeNo = #{codeNo} and SubCodeSeqNo = #{subCodeSeqNo} and ItemNo = #{itemNo} and RecordType = #{recordType} +