bug修改

This commit is contained in:
jjLv 2025-09-08 09:13:14 +08:00
parent ef52300bf4
commit a78873474c
31 changed files with 119 additions and 42 deletions

View File

@ -190,7 +190,7 @@ public class AccWalletInfoBusiness {
|| walletInfo.getWalletBal().compareTo(BigDecimal.ZERO) < 0
|| (walletInfo.getWalletBal().compareTo(operation.getAmount()) < 0)) {
log.info("钱包余额:{}", walletInfo.getWalletBal());
throw new ServiceException("钱包余额不足");
throw new ServiceException("个人钱包余额不足");
}
if(AccTradeTypeEnum.CLEAR.getKey().equals(operation.getOperationType())) {
operation.setAmount(walletInfo.getWalletBal());

View File

@ -153,7 +153,7 @@ public class CookDishes extends BaseEntity {
@Excel(name = "菜品基础单价(分)")
@ApiModelProperty(value = "菜品基础单价(分)")
@Max(value = 99999L, message = "菜品价格超过限制")
private Long price;
private BigDecimal price;
/** 单位价格 */
@Excel(name = "单位价格")

View File

@ -66,7 +66,7 @@ public interface CookMaterialMapper {
* @param materialId 其他参数如原料ID等用于更新时的校验
* @return 结果
*/
public int checkIsExistByCode(@Param("materialCode") String materialCode,@Param("materialId") Long materialId);
public int checkIsExistByCode(@Param("materialCode") String materialCode,@Param("materialId") Long materialId, @Param("type") Long type);
/**
* 校验是否存在
@ -74,7 +74,7 @@ public interface CookMaterialMapper {
* @param materialId 其他参数如原料ID等用于更新时的校验
* @return 结果
*/
public int checkIsExistByName(@Param("materialName") String materialName,@Param("materialId") Long materialId);
public int checkIsExistByName(@Param("materialName") String materialName,@Param("materialId") Long materialId, @Param("type") Long type);
/**
* 校验是否被使用

View File

@ -114,6 +114,8 @@ public interface CookRecipeMapper {
List<CookRecipeDateVO> selectTmpBetweenDateDetailList(@Param("recipeIds") List<Long> recipeIds, @Param("applyStartDate") LocalDate applyStartDate, @Param("applyEndDate") LocalDate applyEndDate);
boolean checkRecipeIfBind(Long recipeIds);
//List<CookRecipeDetailVO> selectTmpBetweenDateDetailList(@Param("recipeIds") List<Long> recipeIds, @Param("applyStartDate") LocalDate applyStartDate, @Param("applyEndDate") LocalDate applyEndDate);

View File

@ -118,7 +118,7 @@ public class CookDishesServiceImpl implements ICookDishesService {
try {
checkParam(cookDishes, false);
//转换价格金额元->
cookDishes.setPrice(Objects.isNull(cookDishes.getPrice()) ? 0L : cookDishes.getPrice() * 100);
cookDishes.setPrice(Objects.isNull(cookDishes.getPrice()) ? BigDecimal.ZERO : cookDishes.getPrice().multiply(BigDecimal.valueOf(100)));
cookDishes.setUnitPrice(Objects.isNull(cookDishes.getUnitPrice()) ? 0L : cookDishes.getUnitPrice() * 100);
cookDishes.setLargePrice(Objects.isNull(cookDishes.getLargePrice()) ? 0L : cookDishes.getLargePrice() * 100);
cookDishes.setLittlePrice(Objects.isNull(cookDishes.getLittlePrice()) ? 0L : cookDishes.getLittlePrice() * 100);
@ -151,7 +151,7 @@ public class CookDishesServiceImpl implements ICookDishesService {
try {
checkParam(cookDishes, true);
//转换价格金额元->
cookDishes.setPrice(Objects.isNull(cookDishes.getPrice()) ? 0L : cookDishes.getPrice() * 100);
cookDishes.setPrice(Objects.isNull(cookDishes.getPrice()) ? BigDecimal.ZERO : cookDishes.getPrice().multiply(BigDecimal.valueOf(100)));
cookDishes.setUnitPrice(Objects.isNull(cookDishes.getUnitPrice()) ? 0L : cookDishes.getUnitPrice() * 100);
cookDishes.setLargePrice(Objects.isNull(cookDishes.getLargePrice()) ? 0L : cookDishes.getLargePrice() * 100);
cookDishes.setLittlePrice(Objects.isNull(cookDishes.getLittlePrice()) ? 0L : cookDishes.getLittlePrice() * 100);
@ -187,7 +187,7 @@ public class CookDishesServiceImpl implements ICookDishesService {
if (StringUtils.isNull(cookDishes.getTypeId()) || cookDishes.getTypeId() == 0) {
throw new ServiceException("菜品分类不能为空");
}
if (StringUtils.isNull(cookDishes.getPrice()) || cookDishes.getPrice() == 0) {
if (StringUtils.isNull(cookDishes.getPrice()) || cookDishes.getPrice().compareTo(BigDecimal.ZERO) < 0) {
throw new ServiceException("菜品价格不能为空");
}
if (StringUtils.isNull(cookDishes.getWeight()) || cookDishes.getWeight().compareTo(BigDecimal.ZERO) < 0) {
@ -549,7 +549,7 @@ public class CookDishesServiceImpl implements ICookDishesService {
dishes.setStallId(menuDishesImportDTO.getStallId() == null ? null : Long.valueOf(menuDishesImportDTO.getStallId()));
dishes.setAreaId(menuDishesImportDTO.getAreaId() == null ? null : Long.valueOf(menuDishesImportDTO.getAreaId()));
dishes.setDishesName(menuDishesImportDTO.getDishesName());
dishes.setPrice(menuDishesImportDTO.getPrice() == null ? null : Long.valueOf(String.valueOf(menuDishesImportDTO.getPrice().multiply(BigDecimal.valueOf(100)))));
dishes.setPrice(menuDishesImportDTO.getPrice() == null ? null : menuDishesImportDTO.getPrice().multiply(BigDecimal.valueOf(100)));
dishes.setWeight(menuDishesImportDTO.getWeight() == null ? null : menuDishesImportDTO.getWeight());
dishes.setWeightDeviation(BigDecimal.ZERO);
dishes.setTypeId(menuDishesImportDTO.getTypeId() == null ? null : Long.valueOf(menuDishesImportDTO.getTypeId()));

View File

@ -88,10 +88,10 @@ public class CookMaterialServiceImpl implements ICookMaterialService {
if (cookMaterial.getGoodsType().equals(1L) && (StringUtils.isNull(cookMaterial.getNutritionId()) || cookMaterial.getNutritionId() == 0L)){
throw new ServiceException("请选择营养信息名称");
}
if (cookMaterialMapper.checkIsExistByCode(cookMaterial.getMaterialCode(), null) > 0) {
if (cookMaterialMapper.checkIsExistByCode(cookMaterial.getMaterialCode(), null,cookMaterial.getGoodsType()) > 0) {
throw new ServiceException("该原料编码已存在");
}
if (cookMaterialMapper.checkIsExistByName(cookMaterial.getMaterialName(), null) > 0) {
if (cookMaterialMapper.checkIsExistByName(cookMaterial.getMaterialName(), null,cookMaterial.getGoodsType()) > 0) {
throw new ServiceException("该原料名称已存在");
}
cookMaterial.setSalePrice(Objects.isNull(cookMaterial.getSalePrice()) ? 0L : cookMaterial.getSalePrice() * 100);
@ -127,10 +127,10 @@ public class CookMaterialServiceImpl implements ICookMaterialService {
if (cookMaterial.getGoodsType().equals(1L) && (StringUtils.isNull(cookMaterial.getNutritionId()) || cookMaterial.getNutritionId() == 0L)){
throw new ServiceException("请选择营养信息名称");
}
if (cookMaterialMapper.checkIsExistByCode(cookMaterial.getMaterialCode(), cookMaterial.getMaterialId()) > 0) {
if (cookMaterialMapper.checkIsExistByCode(cookMaterial.getMaterialCode(), cookMaterial.getMaterialId(),cookMaterial.getGoodsType()) > 0) {
throw new ServiceException("该原料编码已存在");
}
if (cookMaterialMapper.checkIsExistByName(cookMaterial.getMaterialName(), cookMaterial.getMaterialId()) > 0) {
if (cookMaterialMapper.checkIsExistByName(cookMaterial.getMaterialName(), cookMaterial.getMaterialId(),cookMaterial.getGoodsType()) > 0) {
throw new ServiceException("该原料名称已存在");
}
cookMaterial.setSalePrice(Objects.isNull(cookMaterial.getSalePrice()) ? 0L : cookMaterial.getSalePrice() * 100);

View File

@ -499,6 +499,11 @@ public class CookRecipeServiceImpl implements ICookRecipeService {
*/
@Override
public int deleteCookRecipeByRecipeIds(Long[] recipeIds) {
//验证是否存在绑定关系
boolean exists = cookRecipeMapper.checkRecipeIfBind(recipeIds[0]);
if (exists){
throw new ServiceException("菜谱已被使用,不能删除!");
}
List<Long> cookRecipeDetailIds = cookRecipeDetailMapper.getAllCookRecipeDetailIds(recipeIds);
Long[] cookRecipeDetailArray = cookRecipeDetailIds.stream().toArray(Long[]::new);
cookRecipeDishesMapper.deleteCookRecipeDishesByCookRecipeDetailIds(cookRecipeDetailArray);

View File

@ -122,8 +122,8 @@ public class CookRecipeImportListener extends AnalysisEventListener<Map<Integer,
Set<String> difference = DifferenceCalculator.calculateDifference(this.dishesNames, cookDishesList);
System.out.println("差集结果: " + difference);
if (difference != null && difference.size() > 0) {
throw new ServiceException("以下菜品不存在:" + difference);
if (!difference.isEmpty()) {
throw new ServiceException("以下菜品不存在 " + difference);
}
Map<String, CookDishes> nameMap = cookDishesList.stream().collect(Collectors.groupingBy(CookDishes::getDishesName, Collectors.collectingAndThen(Collectors.toList(), (list) -> {
return list.get(0);

View File

@ -18,4 +18,7 @@ public class CookDishesTypeVO extends BaseTreeNode implements Serializable {
@ApiModelProperty(value = "菜品类型名称")
private String dishesTypeName;
@ApiModelProperty(value = "区域ID")
private String areaId;
}

View File

@ -1,13 +1,9 @@
package com.bonus.canteen.core.ims.controller;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import cn.hutool.core.util.ObjectUtil;
import com.bonus.canteen.core.ims.domain.param.ImsInventoryAdd;
import com.bonus.canteen.core.ims.domain.param.ImsInventoryQuery;
import com.bonus.canteen.core.ims.domain.param.ImsInventoryUpdate;
import com.bonus.canteen.core.ims.domain.vo.ImsInventoryVO;
@ -15,7 +11,6 @@ import com.bonus.canteen.core.ims.dto.ExpireWarningDTO;
import com.bonus.canteen.core.ims.dto.InventoryWarningDTO;
import com.bonus.canteen.core.ims.vo.ExpireWarningVO;
import com.bonus.canteen.core.ims.vo.InventoryWarningVO;
import com.bonus.common.core.utils.poi.ExcelUtil;
import com.bonus.common.core.web.controller.BaseController;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.common.log.annotation.SysLog;
@ -25,12 +20,10 @@ import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.bonus.canteen.core.ims.domain.ImsInventory;
import com.bonus.canteen.core.ims.service.IImsInventoryService;
import com.bonus.common.core.web.page.TableDataInfo;

View File

@ -106,7 +106,10 @@ public class Inquiry extends BaseEntity {
@Excel(name = "选择的区域")
@ApiModelProperty(value = "选择的区域")
private String area;
private String bidStatus;
private String quoteAmount;
@Excel(name = "邀请供应商")
@ApiModelProperty(value = "邀请供应商")
private String inquirySupplierNum;

View File

@ -58,4 +58,6 @@ public interface InquirySupplierMapper {
* @return 结果
*/
public int deleteInquirySupplierByIds(Long[] ids);
void updateOtherInquirySupplier(InquirySupplier inquirySupplier);
}

View File

@ -2,6 +2,7 @@ package com.bonus.canteen.core.ims.mapper;
import java.util.List;
import com.bonus.canteen.core.ims.domain.WarehouseInfo;
import org.apache.ibatis.annotations.Param;
/**
* 仓库信息Mapper接口
@ -60,5 +61,7 @@ public interface WarehouseInfoMapper {
*/
public int deleteImsWarehouseInfoByWarehouseIds(Long[] warehouseIds);
int findWarehouseCode(WarehouseInfo imsWarehouseInfo);
int findWarehouseCode(@Param("bean") WarehouseInfo imsWarehouseInfo,@Param("isAdd") boolean isAdd);
int findWarehouseName(@Param("bean") WarehouseInfo imsWarehouseInfo,@Param("isAdd") boolean isAdd);
}

View File

@ -67,7 +67,6 @@ public class ImsInventoryServiceImpl implements IImsInventoryService
ImsInventory imsInventory = new ImsInventory();
BeanUtils.copyProperties(imsInventoryQuery, imsInventory);
List<ImsInventoryVO> imsInventoryList = imsInventoryMapper.selectImsInventoryList(imsInventory);
List<ImsInventoryVO> imsInventoryVOList = new ArrayList<>();
if(CollUtil.isNotEmpty(imsInventoryList)) {
Map<Long, BigDecimal> materialIdCountMap = imsInventoryList.stream()
.collect(Collectors.groupingBy(ImsInventoryVO::getMaterialId,
@ -80,16 +79,13 @@ public class ImsInventoryServiceImpl implements IImsInventoryService
.collect(Collectors.groupingBy(ImsIntoInventoryDetailVO::getInventoryId,
Collectors.mapping(detail -> detail.getInventoryNum().multiply(BigDecimal.valueOf(detail.getUnitPrice())),
Collectors.reducing(BigDecimal.ZERO, BigDecimal::add))));
ImsInventoryVO imsInventoryVO = new ImsInventoryVO();
BeanUtils.copyProperties(inventory, imsInventoryVO);
BigDecimal count = materialIdCountMap.get(inventory.getMaterialId());
imsInventoryVO.setTotalNum(count == null ? BigDecimal.ZERO : count);
inventory.setTotalNum(count == null ? BigDecimal.ZERO : count);
BigDecimal totalPrice = inventoryIdToTotalPrice.get(inventory.getInventoryId());
imsInventoryVO.setTotalPrice(totalPrice == null ? BigDecimal.ZERO : totalPrice);
imsInventoryVOList.add(imsInventoryVO);
inventory.setTotalPrice(totalPrice == null ? BigDecimal.ZERO : totalPrice);
}
}
return imsInventoryVOList;
return imsInventoryList;
}
/**

View File

@ -215,7 +215,12 @@ public class InquiryServiceImpl implements IInquiryService {
inquirySupplier.setSupplierId(supplier.getSupplierId());
inquirySupplier.setInquiryId(supplier.getInquiryId());
inquirySupplier.setBidStatus(3+"");
//更新中标状态
inquirySupplierMapper.updateInquirySupplier(inquirySupplier);
//更新未中标状态
inquirySupplier.setBidStatus(4+"");
inquirySupplierMapper.updateOtherInquirySupplier(inquirySupplier);
Inquiry inquiry=new Inquiry();
inquiry.setInquiryId(supplier.getInquiryId());
inquiry.setSupplierId(supplier.getSupplierId());

View File

@ -53,7 +53,11 @@ public class WarehouseInfoServiceImpl implements IWarehouseInfoService {
imsWarehouseInfo.setCreateTime(DateUtils.getNowDate());
try {
//检查仓库id是否唯一唯一的话进行下面否在返回进行提示
int warehouseCode = imsWarehouseInfoMapper.findWarehouseCode(imsWarehouseInfo);
int warehouseName = imsWarehouseInfoMapper.findWarehouseName(imsWarehouseInfo,false);
if (warehouseName>0) {
throw new ServiceException("仓库名称已存在");
}
int warehouseCode = imsWarehouseInfoMapper.findWarehouseCode(imsWarehouseInfo,false);
if (warehouseCode>0) {
throw new ServiceException("仓库编码已存在");
}
@ -73,7 +77,11 @@ public class WarehouseInfoServiceImpl implements IWarehouseInfoService {
public int updateImsWarehouseInfo(WarehouseInfo imsWarehouseInfo) {
imsWarehouseInfo.setUpdateTime(DateUtils.getNowDate());
try {
int warehouseCode = imsWarehouseInfoMapper.findWarehouseCode(imsWarehouseInfo);
int warehouseName = imsWarehouseInfoMapper.findWarehouseName(imsWarehouseInfo,true);
if (warehouseName>0) {
throw new ServiceException("仓库名称已存在");
}
int warehouseCode = imsWarehouseInfoMapper.findWarehouseCode(imsWarehouseInfo,true);
if (warehouseCode>0) {
throw new ServiceException("仓库编码已存在");
}

View File

@ -111,6 +111,7 @@ public class KitchenDeviceInfo extends Model<KitchenDeviceInfo> {
private String ip;
private Integer channel;
@TableField(exist = false)
private KitchenVideoDTO kitchenVideoDTO;
}

View File

@ -34,9 +34,10 @@ public interface DataScreeningMapper {
/**
* 获取菜品销量
* @param date 日期
* @param recipeIds 菜谱ID集合
* @return 菜品销量对象
*/
SingleModelVO selectDish(@Param("date")String date);
SingleModelVO selectDish(@Param("date")String date,@Param("recipeIds") List<String> recipeIds);
/**
* 获取食堂订单及销量趋势
* @param startDate 开始日期
@ -66,4 +67,10 @@ public interface DataScreeningMapper {
* @return 订单类型占比对象
*/
SingleModelVO selectOrderByDate(@Param("startDate")String startDate, @Param("endDate")String endDate, @Param("type") int type);
/**
* 获取所有菜谱id
* @return 菜品ID集合
*/
List<String> selectAllRecipeIds();
}

View File

@ -113,7 +113,9 @@ public class DataScreeningServiceImpl implements DataScreeningService {
case PERSON:
return mapper.selectPerson(date, orderType);
case DISH:
return mapper.selectDish(date);
//查询所有绑定的菜谱
List<String> recipeIds = mapper.selectAllRecipeIds();
return mapper.selectDish(date,recipeIds);
default:
return new SingleModelVO();
}

View File

@ -40,6 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and ach.create_time BETWEEN #{startDateTime} AND #{endDateTime}
</if>
</where>
order by ach.create_time desc
</select>
<select id="selectAccCardHisById" parameterType="Long" resultMap="AccCardHisResult">

View File

@ -57,6 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="weight != null "> and bce.weight = #{weight}</if>
<if test="proposal != null and proposal != ''"> and bce.proposal = #{proposal}</if>
</where>
order by create_time desc
</select>
<select id="selectBasicCanteenEvaluateByEvaluateId" parameterType="Long" resultMap="BasicCanteenEvaluateResult">

View File

@ -25,8 +25,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectBasicStallMealtimeList" parameterType="com.bonus.canteen.core.basic.domain.BasicStallMealtime" resultMap="BasicStallMealtimeResult">
<include refid="selectBasicStallMealtimeVo"/>
<!-- if_enable = '1'-->
<where>
if_enable = '1'
<if test="stallId != null "> and stall_id = #{stallId}</if>
<if test="mealtimeType != null "> and mealtime_type = #{mealtimeType}</if>
<if test="mealtimeName != null and mealtimeName != ''"> and mealtime_name like concat('%', #{mealtimeName}, '%')</if>

View File

@ -318,7 +318,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="checkDishIsExist" resultType="java.lang.Integer">
select count(1) from cook_dishes where dishes_name = #{dishesName} and area_id = #{areaId}
and canteen_id = #{canteenId} and shopstall_id = #{stallId}
and canteen_id = #{canteenId} and shopstall_id = #{stallId} and del_flag = 0
<if test="dishesId != null">
and dishes_id != #{dishesId}
</if>
@ -562,6 +562,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateCookDishes" parameterType="com.bonus.canteen.core.cook.domain.CookDishes">
update cook_dishes
<trim prefix="SET" suffixOverrides=",">
shopstall_id = #{stallId},
<if test="mealType != null">meal_type = #{mealType},</if>
<if test="customId != null">custom_id = #{customId},</if>
<if test="inventoryId != null">inventory_id = #{inventoryId},</if>
@ -617,7 +618,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="glycemicIndex != null">glycemic_index = #{glycemicIndex},</if>
<if test="sort != null">sort = #{sort},</if>
<if test="canteenId != null">canteen_id = #{canteenId},</if>
<if test="stallId != null">shopstall_id = #{stallId},</if>
<!-- <if test="stallId != null">shopstall_id = #{stallId},</if>-->
<if test="hideFlag != null">hide_flag = #{hideFlag},</if>
<if test="convertFlag != null">convert_flag = #{convertFlag},</if>
<if test="materialCost != null">material_cost = #{materialCost},</if>

View File

@ -51,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</select>
<select id="selectList" resultType="com.bonus.canteen.core.cook.vo.CookDishesTypeVO">
select dishes_type_id as dishesTypeId, dishes_type_name as dishesTypeName,dishes_type_id as id,parent_id as parentId
select dishes_type_id as dishesTypeId, dishes_type_name as dishesTypeName,dishes_type_id as id,parent_id as parentId,area_id as areaId
from cook_dishes_type
</select>

View File

@ -114,6 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
material_code = #{materialCode}
<if test="materialId != null and materialId != ''"> and material_id != #{materialId}</if>
<if test="type != null and type != ''"> and goods_type = #{type}</if>
</where>
</select>
@ -122,6 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
material_name = #{materialName}
<if test="materialId != null and materialId != ''"> and material_id != #{materialId}</if>
<if test="type != null and type != ''"> and goods_type = #{type}</if>
</where>
</select>

View File

@ -511,5 +511,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and mrd.apply_date between #{applyStartDate} and #{applyEndDate}
order by mrd.apply_date
</select>
<select id="checkRecipeIfBind" resultType="boolean">
select count(1) > 0 from cook_recipe_bind_app
where recipe_id = #{recipeId}
</select>
</mapper>

View File

@ -105,4 +105,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
<update id="updateOtherInquirySupplier">
update ims_inquiry_supplier
<trim prefix="SET" suffixOverrides=",">
<if test="bidStatus != null">bid_status = #{bidStatus},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where inquiry_id = #{inquiryId} and supplier_id != #{supplierId}
</update>
</mapper>

View File

@ -23,6 +23,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="startTime" column="start_time" />
<result property="endTime" column="end_time" />
<result property="status" column="status" />
<result property="bidStatus" column="bid_status" />
<result property="quoteAmount" column="quote_amount" />
<result property="bidTime" column="bid_time" />
<result property="requestArrivalTime" column="request_arrival_time" />
<result property="inquiryNotes" column="inquiry_notes" />
@ -207,7 +209,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select * from (
select aa.inquiry_id, aa.area_id, aa.inquiry_code, aa.title, aa.start_time, aa.end_time, aa.status, aa.bid_time,
aa.request_arrival_time, aa.inquiry_notes, aa.phone, aa.link_man, aa.address, aa.bid_total_price, aa.supplier_id,
bb.area_name as area, aa.create_by, aa.create_time, aa.update_by, aa.update_time
bb.area_name as area, aa.create_by, aa.create_time, aa.update_by, aa.update_time,cc.bid_status,cc.quote_amount
from ims_inquiry aa
left join basic_area bb on aa.area_id=bb.area_id
LEFT JOIN ims_inquiry_supplier cc on cc.inquiry_id = aa.inquiry_id
@ -222,6 +224,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and (aa.inquiry_code like CONCAT('%',#{searchValue},'%') or aa.title like CONCAT('%',#{searchValue},'%')
)
</if>
<if test="bidStatus != null and bidStatus != ''"> and cc.bid_status = #{bidStatus} </if>
<if test="inquiryState != null and inquiryState != '' and inquiryState == '1'"> and aa.status = 1 </if>
<if test="inquiryState != null and inquiryState != '' and inquiryState == '2'"> and aa.status = 3 </if>
<if test="inquiryState != null and inquiryState != '' and inquiryState == '3'"> and aa.status = 4 </if>

View File

@ -33,15 +33,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and cd.dishes_name like concat('%', #{dishesName}, '%')
</if>
<if test="startDateTime != null and endDateTime != null">
and exists (select 1 from ims_production_plan_detail ippd where
ipp.plan_id = ippd.production_plan_id
and ippd.detail_date <![CDATA[ >= ]]> #{startTime}
and ippd.detail_date <![CDATA[ <= ]]> #{endTime} )
and ippd.detail_date <![CDATA[ <= ]]> #{endTime}
</if>
group by
ipp.plan_id,
ippd.dishes_id,
ippd.detail_date
order by
ippd.detail_date desc
</select>
<select id="selectPurchasePlanList" parameterType="com.bonus.canteen.core.ims.domain.param.ReportPurchasePlanQuery" resultType="com.bonus.canteen.core.ims.domain.vo.ReportPurchasePlanVO">

View File

@ -79,7 +79,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="findWarehouseCode" resultType="java.lang.Integer">
select count(1)
from ims_warehouse_info
where warehouse_code = #{warehouseCode} and warehouse_id != #{warehouseId}
where warehouse_code = #{bean.warehouseCode}
<if test="isAdd">
and warehouse_id != #{bean.warehouseId}
</if>
</select>
<insert id="insertImsWarehouseInfo" parameterType="com.bonus.canteen.core.ims.domain.WarehouseInfo" useGeneratedKeys="true" keyProperty="warehouseId">
@ -173,4 +176,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{warehouseId}
</foreach>
</delete>
<select id="findWarehouseName" resultType="int">
select count(1)
from ims_warehouse_info
where warehouse_name = #{bean.warehouseName}
<if test="isAdd">
and warehouse_id != #{bean.warehouseId}
</if>
</select>
</mapper>

View File

@ -58,6 +58,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from cook_recipe_detail mrd
left join cook_recipe_dishes mrd2 on mrd.recipe_detail_id = mrd2.recipe_detail_id
where mrd.apply_date = #{date} and mrd.detail_type = '2'
<if test="recipeIds.size() > 0">
and mrd.recipe_id in
<foreach collection="recipeIds" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
</select>
<select id="getCanteenOrdersAndSalesTrends" resultType="com.bonus.canteen.core.screening.vo.EchartsVO">
SELECT
@ -106,4 +112,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and order_type = #{type}
</if>
</select>
<select id="selectAllRecipeIds" resultType="java.lang.String">
select
recipe_id
from cook_recipe_bind_app
</select>
</mapper>