فهرست منبع

新增仓库摄像头模块

Sun 3 سال پیش
والد
کامیت
68bd6a1192

+ 108 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/basicData/TWarehouseWebcamController.java

@@ -0,0 +1,108 @@
+package com.ruoyi.web.controller.warehouse.basicData;
+
+import com.ruoyi.basicData.domain.TWarehouseWebcam;
+import com.ruoyi.basicData.service.ITWarehouseWebcamService;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.annotation.RepeatSubmit;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 仓库摄像头Controller
+ *
+ * @author ruoyi
+ * @date 2021-12-21
+ */
+@RestController
+@RequestMapping("/warehouse/webcam")
+public class TWarehouseWebcamController extends BaseController {
+    @Autowired
+    private ITWarehouseWebcamService tWarehouseWebcamService;
+
+    /**
+     * 查询仓库摄像头列表
+     */
+    @PreAuthorize("@ss.hasPermi('warehouse:webcam:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TWarehouseWebcam tWarehouseWebcam) {
+        startPage();
+        List<TWarehouseWebcam> list = tWarehouseWebcamService.selectTWarehouseWebcamList(tWarehouseWebcam);
+        return getDataTable(list);
+    }
+
+    /**
+     * APP查询仓库摄像头列表
+     */
+    @GetMapping("/appList")
+    public TableDataInfo appList(TWarehouseWebcam tWarehouseWebcam) {
+        startPage();
+        List<TWarehouseWebcam> list = tWarehouseWebcamService.selectTWarehouseWebcamList(tWarehouseWebcam);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出仓库摄像头列表
+     */
+    @PreAuthorize("@ss.hasPermi('warehouse:webcam:export')")
+    @Log(title = "仓库摄像头", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(TWarehouseWebcam tWarehouseWebcam) {
+        List<TWarehouseWebcam> list = tWarehouseWebcamService.selectTWarehouseWebcamList(tWarehouseWebcam);
+        ExcelUtil<TWarehouseWebcam> util = new ExcelUtil<TWarehouseWebcam>(TWarehouseWebcam.class);
+        return util.exportExcel(list, "webcam");
+    }
+
+    /**
+     * 获取仓库摄像头详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('warehouse:webcam:query')")
+    @GetMapping(value = "/{fId}")
+    public AjaxResult getInfo(@PathVariable("fId") Long fId) {
+        return AjaxResult.success(tWarehouseWebcamService.selectTWarehouseWebcamById(fId));
+    }
+
+    /**
+     * 新增仓库摄像头
+     */
+    @Log(title = "仓库摄像头", businessType = BusinessType.INSERT)
+    @PostMapping
+    @RepeatSubmit
+    public AjaxResult add(@RequestBody TWarehouseWebcam tWarehouseWebcam) {
+        if (StringUtils.isNotNull(tWarehouseWebcamService.selectTWarehouseWebcamByDeviceSerial(tWarehouseWebcam.getDeviceSerial()))) {
+            return AjaxResult.error("设备序列号已存在");
+        }
+
+        return toAjax(tWarehouseWebcamService.insertTWarehouseWebcam(tWarehouseWebcam));
+    }
+
+    /**
+     * 修改仓库摄像头
+     */
+    @PreAuthorize("@ss.hasPermi('warehouse:webcam:edit')")
+    @Log(title = "仓库摄像头", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @RepeatSubmit
+    public AjaxResult edit(@RequestBody TWarehouseWebcam tWarehouseWebcam) {
+        return toAjax(tWarehouseWebcamService.updateTWarehouseWebcam(tWarehouseWebcam));
+    }
+
+    /**
+     * 删除仓库摄像头
+     */
+    @PreAuthorize("@ss.hasPermi('warehouse:webcam:remove')")
+    @Log(title = "仓库摄像头", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{fIds}")
+    @RepeatSubmit
+    public AjaxResult remove(@PathVariable Long[] fIds) {
+        return toAjax(tWarehouseWebcamService.deleteTWarehouseWebcamByIds(fIds));
+    }
+}

+ 130 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/domain/TWarehouseWebcam.java

@@ -0,0 +1,130 @@
+package com.ruoyi.basicData.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 仓库摄像头对象 t_warehouse_webcam
+ *
+ * @author ruoyi
+ * @date 2021-12-21
+ */
+public class TWarehouseWebcam extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * $column.columnComment
+     */
+    private Long fId;
+
+    /**
+     * 项目ID
+     */
+    @Excel(name = "项目ID")
+    private String projectId;
+
+    /**
+     * 设备名称
+     */
+    @Excel(name = "设备名称")
+    private String deviceName;
+
+    /**
+     * 设备序列号
+     */
+    @Excel(name = "设备序列号")
+    private String deviceSerial;
+
+    /**
+     * 仓库ID
+     */
+    @Excel(name = "仓库ID")
+    private Long fWarehouseId;
+
+    /**
+     * 仓库名称
+     */
+    @Excel(name = "仓库名称")
+    private String fWarehouseName;
+
+    /**
+     * 删除状态
+     */
+    private String delFlag;
+
+    public void setfId(Long fId) {
+        this.fId = fId;
+    }
+
+    public Long getfId() {
+        return fId;
+    }
+
+    public void setProjectId(String projectId) {
+        this.projectId = projectId;
+    }
+
+    public String getProjectId() {
+        return projectId;
+    }
+
+    public void setDeviceName(String deviceName) {
+        this.deviceName = deviceName;
+    }
+
+    public String getDeviceName() {
+        return deviceName;
+    }
+
+    public void setDeviceSerial(String deviceSerial) {
+        this.deviceSerial = deviceSerial;
+    }
+
+    public String getDeviceSerial() {
+        return deviceSerial;
+    }
+
+    public void setfWarehouseId(Long fWarehouseId) {
+        this.fWarehouseId = fWarehouseId;
+    }
+
+    public Long getfWarehouseId() {
+        return fWarehouseId;
+    }
+
+    public void setfWarehouseName(String fWarehouseName) {
+        this.fWarehouseName = fWarehouseName;
+    }
+
+    public String getfWarehouseName() {
+        return fWarehouseName;
+    }
+
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() {
+        return delFlag;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("fId", getfId())
+                .append("projectId", getProjectId())
+                .append("deviceName", getDeviceName())
+                .append("deviceSerial", getDeviceSerial())
+                .append("fWarehouseId", getfWarehouseId())
+                .append("fWarehouseName", getfWarehouseName())
+                .append("delFlag", getDelFlag())
+                .append("createBy", getCreateBy())
+                .append("createTime", getCreateTime())
+                .append("updateBy", getUpdateBy())
+                .append("updateTime", getUpdateTime())
+                .append("remark", getRemark())
+                .toString();
+    }
+}

+ 79 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/mapper/TWarehouseWebcamMapper.java

@@ -0,0 +1,79 @@
+package com.ruoyi.basicData.mapper;
+
+import java.util.List;
+
+import com.ruoyi.basicData.domain.TWarehouseWebcam;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * 仓库摄像头Mapper接口
+ *
+ * @author ruoyi
+ * @date 2021-12-21
+ */
+public interface TWarehouseWebcamMapper {
+    /**
+     * 查询仓库摄像头
+     *
+     * @param fId 仓库摄像头ID
+     * @return 仓库摄像头
+     */
+    public TWarehouseWebcam selectTWarehouseWebcamById(Long fId);
+
+    /**
+     * 查询仓库摄像头
+     *
+     * @param deviceSerial 设备序列号
+     * @return 仓库摄像头
+     */
+    public TWarehouseWebcam selectTWarehouseWebcamByDeviceSerial(String deviceSerial);
+
+    /**
+     * 查询仓库摄像头列表
+     *
+     * @param tWarehouseWebcam 仓库摄像头
+     * @return 仓库摄像头集合
+     */
+    public List<TWarehouseWebcam> selectTWarehouseWebcamList(TWarehouseWebcam tWarehouseWebcam);
+
+    /**
+     * 新增仓库摄像头
+     *
+     * @param tWarehouseWebcam 仓库摄像头
+     * @return 结果
+     */
+    public int insertTWarehouseWebcam(TWarehouseWebcam tWarehouseWebcam);
+
+    /**
+     * 修改仓库摄像头
+     *
+     * @param tWarehouseWebcam 仓库摄像头
+     * @return 结果
+     */
+    public int updateTWarehouseWebcam(TWarehouseWebcam tWarehouseWebcam);
+
+    /**
+     * 删除仓库摄像头
+     *
+     * @param fId 仓库摄像头ID
+     * @return 结果
+     */
+    public int deleteTWarehouseWebcamById(Long fId);
+
+    /**
+     * 批量删除仓库摄像头
+     *
+     * @param fIds 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTWarehouseWebcamByIds(Long[] fIds);
+
+    /**
+     * APP查询仓库摄像头列表
+     *
+     * @param fWarehouseId 仓库ID
+     * @param corpId 客户ID
+     * @return 仓库摄像头集合
+     */
+    public List<TWarehouseWebcam> selectAppTWarehouseWebcamList(@Param("fWarehouseId") Long fWarehouseId, @Param("corpId") Long corpId);
+}

+ 77 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/service/ITWarehouseWebcamService.java

@@ -0,0 +1,77 @@
+package com.ruoyi.basicData.service;
+
+import java.util.List;
+
+import com.ruoyi.basicData.domain.TWarehouseWebcam;
+
+/**
+ * 仓库摄像头Service接口
+ *
+ * @author ruoyi
+ * @date 2021-12-21
+ */
+public interface ITWarehouseWebcamService {
+    /**
+     * 查询仓库摄像头
+     *
+     * @param fId 仓库摄像头ID
+     * @return 仓库摄像头
+     */
+    public TWarehouseWebcam selectTWarehouseWebcamById(Long fId);
+
+    /**
+     * 查询仓库摄像头
+     *
+     * @param deviceSerial 设备序列号
+     * @return 仓库摄像头
+     */
+    public TWarehouseWebcam selectTWarehouseWebcamByDeviceSerial(String deviceSerial);
+
+    /**
+     * 查询仓库摄像头列表
+     *
+     * @param tWarehouseWebcam 仓库摄像头
+     * @return 仓库摄像头集合
+     */
+    public List<TWarehouseWebcam> selectTWarehouseWebcamList(TWarehouseWebcam tWarehouseWebcam);
+
+    /**
+     * APP查询仓库摄像头列表
+     *
+     * @param tWarehouseWebcam 仓库摄像头
+     * @return 仓库摄像头集合
+     */
+    public List<TWarehouseWebcam> selectAppTWarehouseWebcamList(TWarehouseWebcam tWarehouseWebcam);
+
+    /**
+     * 新增仓库摄像头
+     *
+     * @param tWarehouseWebcam 仓库摄像头
+     * @return 结果
+     */
+    public int insertTWarehouseWebcam(TWarehouseWebcam tWarehouseWebcam);
+
+    /**
+     * 修改仓库摄像头
+     *
+     * @param tWarehouseWebcam 仓库摄像头
+     * @return 结果
+     */
+    public int updateTWarehouseWebcam(TWarehouseWebcam tWarehouseWebcam);
+
+    /**
+     * 批量删除仓库摄像头
+     *
+     * @param fIds 需要删除的仓库摄像头ID
+     * @return 结果
+     */
+    public int deleteTWarehouseWebcamByIds(Long[] fIds);
+
+    /**
+     * 删除仓库摄像头信息
+     *
+     * @param fId 仓库摄像头ID
+     * @return 结果
+     */
+    public int deleteTWarehouseWebcamById(Long fId);
+}

+ 136 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/service/impl/TWarehouseWebcamServiceImpl.java

@@ -0,0 +1,136 @@
+package com.ruoyi.basicData.service.impl;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.ruoyi.basicData.domain.TCustomerContact;
+import com.ruoyi.basicData.mapper.TCustomerContactMapper;
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.common.utils.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.basicData.mapper.TWarehouseWebcamMapper;
+import com.ruoyi.basicData.domain.TWarehouseWebcam;
+import com.ruoyi.basicData.service.ITWarehouseWebcamService;
+
+/**
+ * 仓库摄像头Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2021-12-21
+ */
+@Service
+public class TWarehouseWebcamServiceImpl implements ITWarehouseWebcamService {
+    @Autowired
+    private TWarehouseWebcamMapper tWarehouseWebcamMapper;
+
+    @Autowired
+    private TCustomerContactMapper customerContactMapper;
+
+    /**
+     * 查询仓库摄像头
+     *
+     * @param fId 仓库摄像头ID
+     * @return 仓库摄像头
+     */
+    @Override
+    public TWarehouseWebcam selectTWarehouseWebcamById(Long fId) {
+        return tWarehouseWebcamMapper.selectTWarehouseWebcamById(fId);
+    }
+
+    /**
+     * 查询仓库摄像头列表
+     *
+     * @param tWarehouseWebcam 仓库摄像头
+     * @return 仓库摄像头
+     */
+    @Override
+    public List<TWarehouseWebcam> selectTWarehouseWebcamList(TWarehouseWebcam tWarehouseWebcam) {
+        return tWarehouseWebcamMapper.selectTWarehouseWebcamList(tWarehouseWebcam);
+    }
+
+    /**
+     * 查询仓库摄像头
+     *
+     * @param deviceSerial 设备序列号
+     * @return 仓库摄像头
+     */
+    @Override
+    public TWarehouseWebcam selectTWarehouseWebcamByDeviceSerial(String deviceSerial) {
+        return tWarehouseWebcamMapper.selectTWarehouseWebcamByDeviceSerial(deviceSerial);
+    }
+
+    /**
+     * APP查询仓库摄像头列表
+     *
+     * @param tWarehouseWebcam 仓库摄像头
+     * @return 仓库摄像头
+     */
+    @Override
+    public List<TWarehouseWebcam> selectAppTWarehouseWebcamList(TWarehouseWebcam tWarehouseWebcam) {
+        if (StringUtils.isNotNull(tWarehouseWebcam.getfWarehouseId())) {
+            return tWarehouseWebcamMapper.selectAppTWarehouseWebcamList(tWarehouseWebcam.getfWarehouseId(), null);
+        }
+
+        TCustomerContact customerContact = new TCustomerContact();
+        SysUser user = SecurityUtils.getLoginUser().getUser();
+        Long corpId = null;
+        if ("外部用户".equals(user.getDept().getDeptName())) {
+            customerContact.setfTel(SecurityUtils.getLoginUser().getUser().getUserName());
+            List<TCustomerContact> tCustomerContacts = customerContactMapper.selectTCustomerContactList(customerContact);
+            if (CollectionUtils.isNotEmpty(tCustomerContacts)) {
+                corpId = tCustomerContacts.get(0).getfPid();
+            }
+        }
+
+        return tWarehouseWebcamMapper.selectAppTWarehouseWebcamList(null, corpId);
+    }
+
+    /**
+     * 新增仓库摄像头
+     *
+     * @param tWarehouseWebcam 仓库摄像头
+     * @return 结果
+     */
+    @Override
+    public int insertTWarehouseWebcam(TWarehouseWebcam tWarehouseWebcam) {
+        tWarehouseWebcam.setCreateTime(DateUtils.getNowDate());
+        return tWarehouseWebcamMapper.insertTWarehouseWebcam(tWarehouseWebcam);
+    }
+
+    /**
+     * 修改仓库摄像头
+     *
+     * @param tWarehouseWebcam 仓库摄像头
+     * @return 结果
+     */
+    @Override
+    public int updateTWarehouseWebcam(TWarehouseWebcam tWarehouseWebcam) {
+        tWarehouseWebcam.setUpdateTime(DateUtils.getNowDate());
+        return tWarehouseWebcamMapper.updateTWarehouseWebcam(tWarehouseWebcam);
+    }
+
+    /**
+     * 批量删除仓库摄像头
+     *
+     * @param fIds 需要删除的仓库摄像头ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTWarehouseWebcamByIds(Long[] fIds) {
+        return tWarehouseWebcamMapper.deleteTWarehouseWebcamByIds(fIds);
+    }
+
+    /**
+     * 删除仓库摄像头信息
+     *
+     * @param fId 仓库摄像头ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTWarehouseWebcamById(Long fId) {
+        return tWarehouseWebcamMapper.deleteTWarehouseWebcamById(fId);
+    }
+}

+ 146 - 0
ruoyi-warehouse/src/main/resources/mapper/basicData/TWarehouseWebcamMapper.xml

@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.basicData.mapper.TWarehouseWebcamMapper">
+
+    <resultMap type="TWarehouseWebcam" id="TWarehouseWebcamResult">
+        <result property="fId" column="f_id"/>
+        <result property="projectId" column="project_id"/>
+        <result property="deviceName" column="device_name"/>
+        <result property="deviceSerial" column="device_serial"/>
+        <result property="fWarehouseId" column="f_warehouse_id"/>
+        <result property="fWarehouseName" column="f_warehouse_name"/>
+        <result property="delFlag" column="del_flag"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="remark" column="remark"/>
+    </resultMap>
+
+    <sql id="selectTWarehouseWebcamVo">
+        select f_id,
+               project_id,
+               device_name,
+               device_serial,
+               f_warehouse_id,
+               f_warehouse_name,
+               del_flag,
+               create_by,
+               create_time,
+               update_by,
+               update_time,
+               remark
+        from t_warehouse_webcam
+    </sql>
+
+    <select id="selectTWarehouseWebcamList" parameterType="TWarehouseWebcam" resultMap="TWarehouseWebcamResult">
+        <include refid="selectTWarehouseWebcamVo"/>
+        <where>
+            <if test="projectId != null  and projectId != ''">and project_id = #{projectId}</if>
+            <if test="deviceName != null  and deviceName != ''">and device_name like concat('%', #{deviceName}, '%')
+            </if>
+            <if test="deviceSerial != null  and deviceSerial != ''">and device_serial = #{deviceSerial}</if>
+            <if test="fWarehouseId != null ">and f_warehouse_id = #{fWarehouseId}</if>
+            <if test="fWarehouseName != null  and fWarehouseName != ''">and f_warehouse_name like concat('%',
+                #{fWarehouseName}, '%')
+            </if>
+        </where>
+    </select>
+
+    <select id="selectTWarehouseWebcamById" parameterType="Long" resultMap="TWarehouseWebcamResult">
+        <include refid="selectTWarehouseWebcamVo"/>
+        where f_id = #{fId}
+    </select>
+
+    <select id="selectTWarehouseWebcamByDeviceSerial" parameterType="String" resultMap="TWarehouseWebcamResult">
+        <include refid="selectTWarehouseWebcamVo"/>
+        where device_serial = #{deviceSerial}
+    </select>
+
+    <insert id="insertTWarehouseWebcam" parameterType="TWarehouseWebcam" useGeneratedKeys="true" keyProperty="fId">
+        insert into t_warehouse_webcam
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="projectId != null and projectId != ''">project_id,</if>
+            <if test="deviceName != null and deviceName != ''">device_name,</if>
+            <if test="deviceSerial != null and deviceSerial != ''">device_serial,</if>
+            <if test="fWarehouseId != null">f_warehouse_id,</if>
+            <if test="fWarehouseName != null and fWarehouseName != ''">f_warehouse_name,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="remark != null">remark,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="projectId != null and projectId != ''">#{projectId},</if>
+            <if test="deviceName != null and deviceName != ''">#{deviceName},</if>
+            <if test="deviceSerial != null and deviceSerial != ''">#{deviceSerial},</if>
+            <if test="fWarehouseId != null">#{fWarehouseId},</if>
+            <if test="fWarehouseName != null and fWarehouseName != ''">#{fWarehouseName},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="remark != null">#{remark},</if>
+        </trim>
+    </insert>
+
+    <update id="updateTWarehouseWebcam" parameterType="TWarehouseWebcam">
+        update t_warehouse_webcam
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="projectId != null and projectId != ''">project_id = #{projectId},</if>
+            <if test="deviceName != null and deviceName != ''">device_name = #{deviceName},</if>
+            <if test="deviceSerial != null and deviceSerial != ''">device_serial = #{deviceSerial},</if>
+            <if test="fWarehouseId != null">f_warehouse_id = #{fWarehouseId},</if>
+            <if test="fWarehouseName != null and fWarehouseName != ''">f_warehouse_name = #{fWarehouseName},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where f_id = #{fId}
+    </update>
+
+    <delete id="deleteTWarehouseWebcamById" parameterType="Long">
+        delete
+        from t_warehouse_webcam
+        where f_id = #{fId}
+    </delete>
+
+    <delete id="deleteTWarehouseWebcamByIds" parameterType="String">
+        delete from t_warehouse_webcam where f_id in
+        <foreach item="fId" collection="array" open="(" separator="," close=")">
+            #{fId}
+        </foreach>
+    </delete>
+
+
+    <select id="appGetWarehouseList" resultType="map">
+        SELECT
+        f_id AS fId,
+        f_name AS fName
+        FROM t_warehouse
+        WHERE parent_id = 100
+        <if test="corpId != null and corpId != ''">
+            AND f_id IN (SELECT DISTINCT f_warehouseid FROM t_whgenleg WHERE f_corpid = #{corpId})
+        </if>
+
+    </select>
+    <select id="selectAppTWarehouseWebcamList" resultMap="TWarehouseWebcamResult">
+        <include refid="selectTWarehouseWebcamVo"/>
+        <where>
+            <if test="fWarehouseId != null ">and f_warehouse_id = #{fWarehouseId}</if>
+            <if test="corpId != null">
+                and f_warehouse_id in (select f_id from t_warehouse where parent_id = 100 and f_id in (
+                    select distinct f_warehouseid from t_whgenleg where f_corpid = #{corpId})
+                )
+            </if>
+        </where>
+    </select>
+</mapper>