测评问题修改

This commit is contained in:
liux 2025-08-27 18:29:54 +08:00
parent a53211446e
commit 56a1983e35
9 changed files with 67 additions and 16 deletions

View File

@ -6,6 +6,7 @@ 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;

View File

@ -11,6 +11,9 @@ public class ExpireWarningDTO {
private String materialName;
@ApiModelProperty("批次号")
private String intoId;
@ApiModelProperty("批次号")
private String intoCode;
@ApiModelProperty("过期状态1过期2未过期")
private Integer expireState;
@ApiModelProperty("预警天数")
@ -28,6 +31,13 @@ public class ExpireWarningDTO {
@ApiModelProperty("仓库id")
private Long warehouseId;
public String getIntoCode() {
return intoCode;
}
public void setIntoCode(String intoCode) {
this.intoCode = intoCode;
}
public Long getWarehouseId() {
return warehouseId;

View File

@ -16,6 +16,27 @@ public class InventoryWarningDTO {
@ApiModelProperty("导出字段")
private List<String> exportCols;
@ApiModelProperty("仓库id")
private Long warehouseId;
@ApiModelProperty("区域id集合")
private Long areaId;
public Long getAreaId() {
return areaId;
}
public void setAreaId(Long areaId) {
this.areaId = areaId;
}
public Long getWarehouseId() {
return warehouseId;
}
public void setWarehouseId(Long warehouseId) {
this.warehouseId = warehouseId;
}
public List<Long> getAreaIdList() {
return this.areaIdList;

View File

@ -1,13 +1,11 @@
package com.bonus.canteen.core.ims.service.impl;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.*;
import java.util.stream.Collectors;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
import com.bonus.canteen.core.ims.domain.ImsIntoInventory;
import com.bonus.canteen.core.ims.domain.ImsIntoInventoryDetail;
import com.bonus.canteen.core.ims.domain.param.ImsInventoryAdd;
@ -169,6 +167,12 @@ public class ImsInventoryServiceImpl implements IImsInventoryService
@Override
public List<InventoryWarningVO> inventoryWarning(InventoryWarningDTO content) {
if(ObjectUtil.isNotNull(content.getWarehouseId())){
content.setWarehouseIdList(new ArrayList<>(Collections.singletonList(content.getWarehouseId())));
}
if(ObjectUtil.isNotNull(content.getAreaId())){
content.setAreaIdList(new ArrayList<>(Collections.singletonList(content.getAreaId())));
}
return imsInventoryMapper.inventoryWarning(content);
}

View File

@ -15,7 +15,7 @@ import com.bonus.common.core.web.domain.BaseEntity;
/**
* 厨房后场设备传感器记录对象 kitchen_device_sensor_record
*
*
* @author xsheng
* @date 2025-06-16
*/
@ -118,4 +118,6 @@ public class KitchenDeviceSensorRecord extends BaseEntity {
private String searchValue;
private Integer onlyWarn;
private String keyWord;
}

View File

@ -101,6 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="effectDate != null "> and cr.effect_date = #{effectDate}</if>
<if test="expireDate != null "> and cr.expire_date = #{expireDate}</if>
<if test="delFlag != null and delFlag != ''"> and cr.del_flag = #{delFlag}</if>
<if test="areaId !=null"> and ba.area_id = #{areaId}</if>
</where>
order by cr.create_time desc
</select>

View File

@ -305,8 +305,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="content.intoId != null and content.intoId != ''">
and did.into_id = #{content.intoId}
</if>
<if test="content.intoCode != null and content.intoCode != ''">
and did.into_code like concat('%',#{content.intoCode},'%')
</if>
<if test="content.materialName != null and content.materialName != ''">
and mm.material_name like #{content.materialName}
and mm.material_name like concat('%',#{content.materialName},'%')
</if>
<if test="content.expireState != null and content.expireState == 1">
and TIMESTAMPDIFF(DAY,NOW(),did.expire_time) <![CDATA[ < ]]> 0

View File

@ -40,7 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectKitchenDeviceSensorRecordList" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenDeviceSensorRecord" resultMap="KitchenDeviceSensorRecordResult">
<include refid="selectKitchenDeviceSensorRecordVo"/>
<where>
<where>
<if test="batchNo != null "> and batch_no = #{batchNo}</if>
<if test="deviceId != null "> and kdsr.device_id = #{deviceId}</if>
<if test="deviceType != null "> and kdsr.device_type = #{deviceType}</if>
@ -57,6 +57,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{deviceType}
</foreach>
</if>
<if test="keyWord !=null and keyWord != 'null'">
and (kdi.device_name like CONCAT('%',#{keyWord},'%')
or kdi.device_no like CONCAT('%',#{keyWord},'%')
or kdsr.sub_place like CONCAT('%',#{keyWord},'%')
or bc.canteen_name like CONCAT('%',#{keyWord},'%')
)
</if>
<if test="envSensorResultTypeList != null and envSensorResultTypeList.size() > 0">
and (
<foreach item="type" collection="envSensorResultTypeList" separator=" or ">
@ -116,12 +123,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
order by kdsr.device_time desc
</select>
<select id="selectKitchenDeviceSensorRecordByRecordId" parameterType="Long" resultMap="KitchenDeviceSensorRecordResult">
<include refid="selectKitchenDeviceSensorRecordVo"/>
where record_id = #{recordId}
</select>
<insert id="insertKitchenDeviceSensorRecord" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenDeviceSensorRecord" useGeneratedKeys="true" keyProperty="recordId">
insert into kitchen_device_sensor_record
<trim prefix="(" suffix=")" suffixOverrides=",">
@ -184,9 +191,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteKitchenDeviceSensorRecordByRecordIds" parameterType="String">
delete from kitchen_device_sensor_record where record_id in
delete from kitchen_device_sensor_record where record_id in
<foreach item="recordId" collection="array" open="(" separator="," close=")">
#{recordId}
</foreach>
</delete>
</mapper>
</mapper>

View File

@ -28,19 +28,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectKitchenSubPlaceList" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenSubPlace" resultMap="KitchenSubPlaceResult">
<include refid="selectKitchenSubPlaceVo"/>
<where>
<where>
<if test="subPlaceName != null and subPlaceName != ''"> and ksp.sub_place_name like concat('%', #{subPlaceName}, '%')</if>
<if test="imgUrl != null and imgUrl != ''"> and ksp.img_url = #{imgUrl}</if>
<if test="canteenId != null "> and ksp.canteen_id = #{canteenId}</if>
<if test="warehouseId != null "> and ksp.warehouse_id = #{warehouseId}</if>
<if test="areaId != null"> and ba.area_id = #{areaId}</if>
</where>
</select>
<select id="selectKitchenSubPlaceBySubPlaceId" parameterType="Long" resultMap="KitchenSubPlaceResult">
<include refid="selectKitchenSubPlaceVo"/>
where ksp.sub_place_id = #{subPlaceId}
</select>
<insert id="insertKitchenSubPlace" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenSubPlace" useGeneratedKeys="true" keyProperty="subPlaceId">
insert into kitchen_sub_place
<trim prefix="(" suffix=")" suffixOverrides=",">
@ -85,9 +86,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteKitchenSubPlaceBySubPlaceIds" parameterType="String">
delete from kitchen_sub_place where sub_place_id in
delete from kitchen_sub_place where sub_place_id in
<foreach item="subPlaceId" collection="array" open="(" separator="," close=")">
#{subPlaceId}
</foreach>
</delete>
</mapper>
</mapper>