预警管理
parent
10f54014fa
commit
f85ba94c90
|
|
@ -0,0 +1,21 @@
|
|||
package com.njzscloud.supervisory.biz.constant;
|
||||
|
||||
import com.njzscloud.common.core.ienum.DictStr;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
/**
|
||||
* 字典代码:truck_category
|
||||
* 字典名称:车辆类型
|
||||
*/
|
||||
@Getter
|
||||
@RequiredArgsConstructor
|
||||
public enum TruckCategory implements DictStr {
|
||||
HookTruck("HookTruck", "勾臂车"),
|
||||
FiveSmallTruck("FiveSmallTruck", "五小工程车"),
|
||||
DumpTruck("DumpTruck", "渣土车"),
|
||||
OtherTruck("OtherTruck", "其他车型"),
|
||||
;
|
||||
private final String val;
|
||||
private final String txt;
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@ import com.njzscloud.common.core.utils.R;
|
|||
import com.njzscloud.common.mp.support.PageParam;
|
||||
import com.njzscloud.common.mp.support.PageResult;
|
||||
import com.njzscloud.supervisory.biz.pojo.entity.BizWarnEntity;
|
||||
import com.njzscloud.supervisory.biz.pojo.result.BizWarnDetailVO;
|
||||
import com.njzscloud.supervisory.biz.service.BizWarnService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -53,7 +54,7 @@ public class BizWarnController {
|
|||
* 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public R<BizWarnEntity> detail(@RequestParam Long id) {
|
||||
public R<BizWarnDetailVO> detail(@RequestParam Long id) {
|
||||
return R.success(bizWarnService.detail(id));
|
||||
}
|
||||
|
||||
|
|
@ -61,7 +62,7 @@ public class BizWarnController {
|
|||
* 分页查询
|
||||
*/
|
||||
@GetMapping("/paging")
|
||||
public R<PageResult<BizWarnEntity>> paging(PageParam pageParam, BizWarnEntity bizWarnEntity) {
|
||||
public R<PageResult<BizWarnDetailVO>> paging(PageParam pageParam, BizWarnEntity bizWarnEntity) {
|
||||
return R.success(bizWarnService.paging(pageParam, bizWarnEntity));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,13 @@
|
|||
package com.njzscloud.supervisory.biz.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njzscloud.supervisory.biz.pojo.entity.BizWarnEntity;
|
||||
import com.njzscloud.supervisory.biz.pojo.result.BizWarnDetailVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 预警
|
||||
|
|
@ -10,4 +15,14 @@ import org.apache.ibatis.annotations.Mapper;
|
|||
@Mapper
|
||||
public interface BizWarnMapper extends BaseMapper<BizWarnEntity> {
|
||||
|
||||
/**
|
||||
* 分页查询预警详情(包含关联信息)
|
||||
*/
|
||||
IPage<BizWarnDetailVO> selectWarnDetailPage(Page<Object> page, @Param("ew") QueryWrapper<Object> ew);
|
||||
|
||||
/**
|
||||
* 根据ID查询预警详情(包含关联信息)
|
||||
*/
|
||||
BizWarnDetailVO selectWarnDetailById(@Param("id") Long id);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,6 +74,17 @@ public class BizTruckEntity {
|
|||
* 审核备注
|
||||
*/
|
||||
private String auditMemo;
|
||||
|
||||
/**
|
||||
* 车辆图片
|
||||
*/
|
||||
private String picture;
|
||||
|
||||
/**
|
||||
* gps编码
|
||||
*/
|
||||
private String gps;
|
||||
|
||||
/**
|
||||
* 行驶证有效期
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -44,6 +44,16 @@ public class BizWarnEntity {
|
|||
*/
|
||||
private String processStatus;
|
||||
|
||||
/**
|
||||
* 订单id
|
||||
*/
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 处理图片
|
||||
*/
|
||||
private String picture;
|
||||
|
||||
/**
|
||||
* 创建人 Id; sys_user.id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,88 @@
|
|||
package com.njzscloud.supervisory.biz.pojo.result;
|
||||
|
||||
import com.njzscloud.supervisory.biz.pojo.entity.BizWarnEntity;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 预警详情VO,包含关联查询的额外字段
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@Accessors(chain = true)
|
||||
public class BizWarnDetailVO extends BizWarnEntity {
|
||||
|
||||
/**
|
||||
* 订单号
|
||||
*/
|
||||
private String sn;
|
||||
|
||||
/**
|
||||
* 预约人昵称
|
||||
*/
|
||||
private String contacts;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 所在区域(拼接地址)
|
||||
*/
|
||||
private String cargoPlace;
|
||||
|
||||
/**
|
||||
* 货品名称
|
||||
*/
|
||||
private String goodsName;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
* 清运公司名称
|
||||
*/
|
||||
private String transCompanyName;
|
||||
|
||||
/**
|
||||
* 产废单位名称
|
||||
*/
|
||||
private String cfCompanyName;
|
||||
|
||||
/**
|
||||
* 车牌
|
||||
*/
|
||||
private String licensePlate;
|
||||
|
||||
/**
|
||||
* 车辆图片
|
||||
*/
|
||||
private String truckPicture;
|
||||
|
||||
/**
|
||||
* 最大载重; 单位:千克
|
||||
*/
|
||||
private Integer carryingCapacity;
|
||||
|
||||
/**
|
||||
* gps编码
|
||||
*/
|
||||
private String gps;
|
||||
|
||||
/**
|
||||
* 司机名称
|
||||
*/
|
||||
private String driverName;
|
||||
|
||||
/**
|
||||
* 司机电话
|
||||
*/
|
||||
private String driverPhone;
|
||||
|
||||
}
|
||||
|
|
@ -1,12 +1,15 @@
|
|||
package com.njzscloud.supervisory.biz.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njzscloud.common.mp.support.PageParam;
|
||||
import com.njzscloud.common.mp.support.PageResult;
|
||||
import com.njzscloud.supervisory.biz.mapper.BizWarnMapper;
|
||||
import com.njzscloud.supervisory.biz.pojo.entity.BizWarnEntity;
|
||||
import com.njzscloud.supervisory.biz.pojo.result.BizWarnDetailVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
|
@ -45,15 +48,17 @@ public class BizWarnService extends ServiceImpl<BizWarnMapper, BizWarnEntity> im
|
|||
/**
|
||||
* 详情
|
||||
*/
|
||||
public BizWarnEntity detail(Long id) {
|
||||
return this.getById(id);
|
||||
public BizWarnDetailVO detail(Long id) {
|
||||
return baseMapper.selectWarnDetailById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
public PageResult<BizWarnEntity> paging(PageParam pageParam, BizWarnEntity bizWarnEntity) {
|
||||
return PageResult.of(this.page(pageParam.toPage(), Wrappers.<BizWarnEntity>query(bizWarnEntity)));
|
||||
public PageResult<BizWarnDetailVO> paging(PageParam pageParam, BizWarnEntity bizWarnEntity) {
|
||||
QueryWrapper<Object> queryWrapper = Wrappers.query(bizWarnEntity);
|
||||
Page<Object> page = pageParam.toPage();
|
||||
return PageResult.of(baseMapper.selectWarnDetailPage(page, queryWrapper));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,9 @@
|
|||
a.modify_time,
|
||||
a.truck_license_date,
|
||||
a.qualification_date,
|
||||
a.deleted
|
||||
a.deleted,
|
||||
a.gps,
|
||||
a.picture
|
||||
FROM biz_truck a
|
||||
INNER JOIN biz_company b ON b.id = a.company_id AND b.deleted = 0
|
||||
<if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
|
||||
|
|
|
|||
|
|
@ -3,4 +3,115 @@
|
|||
|
||||
<mapper namespace="com.njzscloud.supervisory.biz.mapper.BizWarnMapper">
|
||||
|
||||
<resultMap id="BizWarnDetailVOResultMap" type="com.njzscloud.supervisory.biz.pojo.result.BizWarnDetailVO">
|
||||
<id property="id" column="id"/>
|
||||
<result property="warnCategory" column="warn_category"/>
|
||||
<result property="warnContent" column="warn_content"/>
|
||||
<result property="processResult" column="process_result"/>
|
||||
<result property="processStatus" column="process_status"/>
|
||||
<result property="orderId" column="order_id"/>
|
||||
<result property="picture" column="picture"/>
|
||||
<result property="creatorId" column="creator_id"/>
|
||||
<result property="modifierId" column="modifier_id"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="modifyTime" column="modify_time"/>
|
||||
<result property="deleted" column="deleted"/>
|
||||
<result property="sn" column="sn"/>
|
||||
<result property="contacts" column="contacts"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="cargoPlace" column="cargo_place"/>
|
||||
<result property="goodsName" column="goods_name"/>
|
||||
<result property="projectName" column="project_name"/>
|
||||
<result property="transCompanyName" column="trans_company_name"/>
|
||||
<result property="cfCompanyName" column="cf_company_name"/>
|
||||
<result property="licensePlate" column="license_plate"/>
|
||||
<result property="truckPicture" column="truck_picture"/>
|
||||
<result property="carryingCapacity" column="carrying_capacity"/>
|
||||
<result property="gps" column="gps"/>
|
||||
<result property="driverName" column="driver_name"/>
|
||||
<result property="driverPhone" column="driver_phone"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectWarnDetailPage" resultMap="BizWarnDetailVOResultMap">
|
||||
SELECT
|
||||
bw.id,
|
||||
bw.warn_category,
|
||||
bw.warn_content,
|
||||
bw.process_result,
|
||||
bw.process_status,
|
||||
bw.order_id,
|
||||
bw.picture,
|
||||
bw.creator_id,
|
||||
bw.modifier_id,
|
||||
bw.create_time,
|
||||
bw.modify_time,
|
||||
bw.deleted,
|
||||
oi.sn,
|
||||
oi.contacts,
|
||||
oi.phone,
|
||||
CONCAT_WS('', ocp.province_name, ocp.city_name, ocp.area_name, ocp.town_name, ocp.address) AS cargo_place,
|
||||
og.goods_name,
|
||||
bp.project_name,
|
||||
bc1.company_name AS trans_company_name,
|
||||
bc2.company_name AS cf_company_name,
|
||||
bt.license_plate,
|
||||
bt.picture truck_picture,
|
||||
bt.carrying_capacity,
|
||||
bt.gps,
|
||||
bd.driver_name,
|
||||
bd.phone driver_phone
|
||||
FROM biz_warn bw
|
||||
LEFT JOIN order_info oi ON bw.order_id = oi.id AND oi.deleted = 0
|
||||
LEFT JOIN order_cargo_place ocp ON oi.cargo_place_id = ocp.id
|
||||
LEFT JOIN order_goods og ON oi.goods_id = og.id
|
||||
LEFT JOIN biz_project bp ON oi.project_id = bp.id AND bp.deleted = 0
|
||||
LEFT JOIN biz_company bc1 ON oi.trans_company_id = bc1.id AND bc1.deleted = 0
|
||||
LEFT JOIN biz_company bc2 ON oi.user_id = bc2.user_id AND bc2.deleted = 0
|
||||
LEFT JOIN biz_truck bt ON oi.truck_id = bt.id AND bt.deleted = 0
|
||||
LEFT JOIN biz_driver bd ON oi.driver_id = bd.id AND bd.deleted = 0
|
||||
WHERE bw.deleted = 0
|
||||
${ew.customSqlSegment}
|
||||
ORDER BY a.modify_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectWarnDetailById" resultMap="BizWarnDetailVOResultMap">
|
||||
SELECT
|
||||
bw.id,
|
||||
bw.warn_category,
|
||||
bw.warn_content,
|
||||
bw.process_result,
|
||||
bw.process_status,
|
||||
bw.order_id,
|
||||
bw.picture,
|
||||
bw.creator_id,
|
||||
bw.modifier_id,
|
||||
bw.create_time,
|
||||
bw.modify_time,
|
||||
bw.deleted,
|
||||
oi.sn,
|
||||
oi.contacts,
|
||||
oi.phone,
|
||||
CONCAT_WS('', ocp.province_name, ocp.city_name, ocp.area_name, ocp.town_name, ocp.address) AS cargo_place,
|
||||
og.goods_name,
|
||||
bp.project_name,
|
||||
bc1.company_name AS trans_company_name,
|
||||
bc2.company_name AS cf_company_name,
|
||||
bt.license_plate,
|
||||
bt.picture,
|
||||
bt.carrying_capacity,
|
||||
bt.gps,
|
||||
bd.driver_name,
|
||||
bd.phone driver_phone
|
||||
FROM biz_warn bw
|
||||
LEFT JOIN order_info oi ON bw.order_id = oi.id AND oi.deleted = 0
|
||||
LEFT JOIN order_cargo_place ocp ON oi.cargo_place_id = ocp.id
|
||||
LEFT JOIN order_goods og ON oi.goods_id = og.id
|
||||
LEFT JOIN biz_project bp ON oi.project_id = bp.id AND bp.deleted = 0
|
||||
LEFT JOIN biz_company bc1 ON oi.trans_company_id = bc1.id AND bc1.deleted = 0
|
||||
LEFT JOIN biz_company bc2 ON oi.user_id = bc2.user_id AND bc2.deleted = 0
|
||||
LEFT JOIN biz_truck bt ON oi.truck_id = bt.id AND bt.deleted = 0
|
||||
LEFT JOIN biz_driver bd ON oi.driver_id = bd.id AND bd.deleted = 0
|
||||
WHERE bw.id = #{id} AND bw.deleted = 0
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue