From 0234ca086f716473266c9776fa146bf3a99f35bb Mon Sep 17 00:00:00 2001
From: sxu <602087911@qq.com>
Date: Thu, 19 Jun 2025 17:17:24 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E4=BD=8D=E4=BB=93=E5=BA=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../basic/service/impl/BasicAreaServiceImpl.java | 13 ++++++-------
.../core/iws/mapper/ImsWarehouseInfoMapper.java | 2 ++
.../resources/mapper/cook/CookMaterialMapper.xml | 14 +++++++-------
.../mapper/iws/ImsWarehouseInfoMapper.xml | 9 +++++++++
.../mapper/supermarket/SupermarketInfoMapper.xml | 4 ++--
.../supermarket/SupermarketMaterialMapper.xml | 4 ++--
.../supermarket/SupermarketProductMapper.xml | 8 ++++----
7 files changed, 32 insertions(+), 22 deletions(-)
diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/basic/service/impl/BasicAreaServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/basic/service/impl/BasicAreaServiceImpl.java
index b4581e6..ef3e899 100644
--- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/basic/service/impl/BasicAreaServiceImpl.java
+++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/basic/service/impl/BasicAreaServiceImpl.java
@@ -5,11 +5,10 @@ import java.util.Iterator;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
-
import com.bonus.canteen.core.basic.mapper.BasicCanteenMapper;
import com.bonus.canteen.core.common.domain.TreeSelect;
+import com.bonus.canteen.core.iws.mapper.ImsWarehouseInfoMapper;
import com.bonus.canteen.core.supermarket.mapper.SupermarketInfoMapper;
-import com.bonus.canteen.core.supply.mapper.SupplyWarehouseInfoMapper;
import com.bonus.common.core.exception.ServiceException;
import com.bonus.common.core.utils.DateUtils;
import com.bonus.common.core.utils.StringUtils;
@@ -34,7 +33,7 @@ public class BasicAreaServiceImpl implements IBasicAreaService {
@Autowired
private SupermarketInfoMapper supermarketInfoMapper;
@Autowired
- SupplyWarehouseInfoMapper supplyWarehouseInfoMapper;
+ ImsWarehouseInfoMapper imsWarehouseInfoMapper;
/**
* 查询区域
@@ -118,12 +117,12 @@ public class BasicAreaServiceImpl implements IBasicAreaService {
if (count1 > 0) {
throw new ServiceException("该区域含有食堂信息,不能删除");
}
- int coun2 = supermarketInfoMapper.getSupermarketCountByAreaIds(areaIds);
- if (coun2 > 0) {
+ int count2 = supermarketInfoMapper.getSupermarketCountByAreaIds(areaIds);
+ if (count2 > 0) {
throw new ServiceException("该区域含有超市信息,不能删除");
}
- int coun3 = supplyWarehouseInfoMapper.getSupplyWarehouseCountByAreaIds(areaIds);
- if (coun3 > 0) {
+ int count3 = imsWarehouseInfoMapper.getImsWarehouseCountByAreaIds(areaIds);
+ if (count3 > 0) {
throw new ServiceException("该区域含有仓库信息,不能删除");
}
return basicAreaMapper.deleteBasicAreaByAreaIds(areaIds);
diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/iws/mapper/ImsWarehouseInfoMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/iws/mapper/ImsWarehouseInfoMapper.java
index c436ca4..029961b 100644
--- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/iws/mapper/ImsWarehouseInfoMapper.java
+++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/iws/mapper/ImsWarehouseInfoMapper.java
@@ -18,6 +18,8 @@ public interface ImsWarehouseInfoMapper {
*/
public ImsWarehouseInfo selectImsWarehouseInfoByWarehouseId(Long warehouseId);
+ public int getImsWarehouseCountByAreaIds(Long[] areaIds);
+
/**
* 查询仓库信息列表
*
diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/cook/CookMaterialMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/cook/CookMaterialMapper.xml
index fc18516..c35b197 100644
--- a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/cook/CookMaterialMapper.xml
+++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/cook/CookMaterialMapper.xml
@@ -45,13 +45,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
cmt.material_type_id, cmt.material_type_name,
a.area_id, a.area_name,
cm.nutrition_type_id, cnt.nutrition_type_name,
- spu.unit_name,cm.unit_id
- from cook_material cm
- left join cook_material_type cmt on cm.material_type_id = cmt.material_type_id
- left join cook_nutrition_type cnt on cm.nutrition_type_id = cnt.nutrition_type_id
- left join cook_nutrition cn on cm.nutrition_id = cn.nutrition_id
- left join supply_product_unit spu on cm.unit_id = spu.unit_id
- left join basic_area a on cm.area_id = a.area_id
+ iu.unit_name,cm.unit_id
+ from cook_material cm
+ left join cook_material_type cmt on cm.material_type_id = cmt.material_type_id
+ left join cook_nutrition_type cnt on cm.nutrition_type_id = cnt.nutrition_type_id
+ left join cook_nutrition cn on cm.nutrition_id = cn.nutrition_id
+ left join ims_unit iu on cm.unit_id = iu.unit_id
+ left join basic_area a on cm.area_id = a.area_id
+
+
insert into ims_warehouse_info
diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/supermarket/SupermarketInfoMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/supermarket/SupermarketInfoMapper.xml
index b8c53d6..32cccc9 100644
--- a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/supermarket/SupermarketInfoMapper.xml
+++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/supermarket/SupermarketInfoMapper.xml
@@ -39,10 +39,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
si.min_delivery_time, si.select_time_interval, si.delivery_cost, si.auto_verify_day,
si.delivery_way, si.refund_limit_time, si.if_relate_drp, si.meal_code, si.if_enable_pay_code,
si.pay_code_url, si.del_flag, si.create_by, si.create_time, si.update_by, si.update_time,
- ba.area_name, swi.warehouse_name
+ ba.area_name, iwi.warehouse_name
from supermarket_info si
left join basic_area ba on si.area_id = ba.area_id
- left join supply_warehouse_info swi on swi.warehouse_id = si.warehouse_id
+ left join ims_warehouse_info iwi on iwi.warehouse_id = si.warehouse_id