zhanghua
2022-11-25 1adb62f9f3e71b17430edead1af2ce65f950b249
卡口管理
4个文件已修改
86 ■■■■■ 已修改文件
ycl-platform/src/main/java/com/ycl/controller/epuipment/EquipmentBayonetController.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/entity/equipment/EquipmentBayonet.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/vo/equipment/EquipmentBayonetVO.java 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/resources/mapper/equipment/EquipmentBayonetMapper.xml 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/controller/epuipment/EquipmentBayonetController.java
@@ -65,6 +65,13 @@
        return CommonResult.success(iEquipmentBayonetService.updateById(equipmentBayonet));
    }
    @DeleteMapping("/delete/{id}")
    @ApiOperation("修改")
    @LogSave(operationType = "卡口管理", contain = "删除卡口")
    public CommonResult delete(@PathVariable Integer id) {
        return CommonResult.success(iEquipmentBayonetService.removeById(id));
    }
    @GetMapping("/export")
    @ApiOperation("导出")
    @SneakyThrows
ycl-platform/src/main/java/com/ycl/entity/equipment/EquipmentBayonet.java
@@ -35,9 +35,9 @@
    /**
     * 卡口名称
     */
    @TableField("bayonet_name")
    @TableField("name")
    @ExcelProperty(index = 1, value = "卡口名称")
    private String bayonetName;
    private String name;
    /**
     * 卡口经度
ycl-platform/src/main/java/com/ycl/vo/equipment/EquipmentBayonetVO.java
@@ -31,7 +31,7 @@
     */
    @ApiModelProperty(value = "卡口名称")
    @ExcelProperty(index = 0, value = "卡口名称")
    private String bayonetName;
    private String name;
    /**
     * 卡口经度
@@ -72,15 +72,28 @@
     * 前端类型
     */
    @ApiModelProperty(value = "前端类型")
    @ExcelIgnore
    private Integer frontEndType;
    /**
     * 出入城类型
     */
    @ApiModelProperty(value = "出入城类型")
    @ExcelIgnore
    private Integer inOutCityType;
    /**
     * 前端类型
     */
    @ApiModelProperty(value = "前端类型")
    @ExcelProperty(index = 5, value = "前端类型")
    private String frontEndType;
    private String frontEndTypeName;
    /**
     * 出入城类型
     */
    @ApiModelProperty(value = "出入城类型")
    @ExcelProperty(index = 6, value = "出入城类型")
    private String inOutCityType;
    private String inOutCityTypeName;
    private String belongArea;
}
ycl-platform/src/main/resources/mapper/equipment/EquipmentBayonetMapper.xml
@@ -4,43 +4,47 @@
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ycl.entity.equipment.EquipmentBayonet">
        <id column="id" property="id" />
        <result column="bayonet_name" property="bayonetName" />
        <result column="longitude" property="longitude" />
        <result column="latitude" property="latitude" />
        <result column="ip_address" property="ipAddress" />
        <result column="port" property="port" />
        <result column="description" property="description" />
        <id column="id" property="id"/>
        <result column="name" property="name"/>
        <result column="longitude" property="longitude"/>
        <result column="latitude" property="latitude"/>
        <result column="ip_address" property="ipAddress"/>
        <result column="port" property="port"/>
        <result column="description" property="description"/>
    </resultMap>
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, bayonet_name, longitude, latitude, ip_address, port, description
        id
        , name, longitude, latitude, ip_address, port, description
    </sql>
    <select id="selectEquipmentPage" resultType="com.ycl.vo.equipment.EquipmentBayonetVO">
        SELECT
            t1.id,
            t1.bayonet_name,
            t1.description,
            t1.ip_address,
            t1.latitude,
            t1.longitude,
            t1.`port`,
            t2.`name` as frontEndType,
            t3.`name` as inOutCityType,
            t4.region_name as belongArea
        t1.id,
        t1.name,
        t1.description,
        t1.ip_address,
        t1.latitude,
        t1.longitude,
        t1.`port`,
        t1.belong_area belongArea,
        t1.front_end_type frontEndType,
        t1.in_out_city_type inOutCityType,
        t2.`name` as frontEndTypeName,
        t3.`name` as inOutCityTypeName,
        t4.region_name as belongArea
        FROM
            `ums_equipment_bayonet` t1
                LEFT JOIN
            ums_data_dictionary t2 on t1.front_end_type=t2.id
                LEFT JOIN
            ums_data_dictionary t3 on  t1.in_out_city_type=t3.id
                LEFT JOIN
            ums_sccg_region t4 on  t4.id=t1.belong_area
        `ums_equipment_bayonet` t1
        LEFT JOIN
        ums_data_dictionary t2 on t1.front_end_type=t2.id
        LEFT JOIN
        ums_data_dictionary t3 on t1.in_out_city_type=t3.id
        LEFT JOIN
        ums_sccg_region t4 on t4.id=t1.belong_area
        <where>
            <if test="bayonetName !=null and bayonetName !='' ">
                bayonet_name like CONCAT('%',#{bayonetName},'%')
                name like CONCAT('%',#{bayonetName},'%')
            </if>
        </where>
    </select>