From 603537b983eeb75fab522480d7704369f1f5434a Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Mon, 30 Jun 2025 16:10:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89supermarket=5Fmaterial=5Ftype?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/SupermarketMaterialType.java | 5 +++- .../mapper/cook/CookMaterialTypeMapper.xml | 15 +++++++---- .../supermarket/SupermarketMaterialMapper.xml | 2 +- .../SupermarketMaterialTypeMapper.xml | 27 +++++++++++-------- .../supermarket/SupermarketProductMapper.xml | 4 +-- 5 files changed, 33 insertions(+), 20 deletions(-) diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/domain/SupermarketMaterialType.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/domain/SupermarketMaterialType.java index 20a25f8..f87256c 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/domain/SupermarketMaterialType.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/domain/SupermarketMaterialType.java @@ -42,5 +42,8 @@ public class SupermarketMaterialType extends BaseEntity { @ApiModelProperty(value = "区域id") private Long areaId; - + /** 商品类型(1原料2商品) */ + @Excel(name = "商品类型(1原料2商品)") + @ApiModelProperty(value = "商品类型(1原料2商品)") + private Long goodsType; } diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/cook/CookMaterialTypeMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/cook/CookMaterialTypeMapper.xml index bcdf0a1..21f0151 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/cook/CookMaterialTypeMapper.xml +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/cook/CookMaterialTypeMapper.xml @@ -22,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - where material_type_id = #{materialTypeId} + where goods_type = 1 and material_type_id = #{materialTypeId} + + + diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/supermarket/SupermarketMaterialMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/supermarket/SupermarketMaterialMapper.xml index c3e5473..bac730f 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/supermarket/SupermarketMaterialMapper.xml +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/supermarket/SupermarketMaterialMapper.xml @@ -39,7 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ba.area_name, smt.material_type_name, iu.unit_name from cook_material sm left join basic_area ba on ba.area_id = sm.area_id - left join supermarket_material_type smt on smt.material_type_id = sm.material_type_id + left join cook_material_type smt on smt.material_type_id = sm.material_type_id left join ims_unit iu on iu.unit_id = sm.unit_id diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/supermarket/SupermarketMaterialTypeMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/supermarket/SupermarketMaterialTypeMapper.xml index ad326a2..8273d59 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/supermarket/SupermarketMaterialTypeMapper.xml +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/supermarket/SupermarketMaterialTypeMapper.xml @@ -9,6 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -16,13 +17,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select material_type_id, material_type_name, parent_id, level, area_id, create_by, create_time, update_by, update_time - from supermarket_material_type + select material_type_id, material_type_name, parent_id, level, area_id, goods_type, create_by, create_time, update_by, update_time + from cook_material_type - where material_type_id = #{materialTypeId} + where goods_type = 2 and material_type_id = #{materialTypeId} - insert into supermarket_material_type + insert into cook_material_type material_type_name, parent_id, level, area_id, + goods_type, create_by, create_time, update_by, @@ -57,6 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{parentId}, #{level}, #{areaId}, + #{goodsType}, #{createBy}, #{createTime}, #{updateBy}, @@ -65,12 +69,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - update supermarket_material_type + update cook_material_type material_type_name = #{materialTypeName}, parent_id = #{parentId}, level = #{level}, area_id = #{areaId}, + goods_type = #{goodsType}, create_by = #{createBy}, create_time = #{createTime}, update_by = #{updateBy}, @@ -80,11 +85,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from supermarket_material_type where material_type_id = #{materialTypeId} + delete from cook_material_type where material_type_id = #{materialTypeId} - delete from supermarket_material_type where material_type_id in + delete from cook_material_type where material_type_id in #{materialTypeId} @@ -92,8 +97,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -62,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ba.area_name, smt.material_type_name, iu.unit_name from cook_material sm left join basic_area ba on ba.area_id = sm.area_id - left join supermarket_material_type smt on smt.material_type_id = sm.material_type_id + left join cook_material_type smt on smt.material_type_id = sm.material_type_id left join ims_unit iu on iu.unit_id = sm.unit_id left join supermarket_product sp on sm.material_id=sp.material_id where sm.goods_type = 2 and sp.material_id is null