Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
0079778d3a
|
|
@ -0,0 +1,68 @@
|
|||
package com.bonus.common.biz.domain;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.bonus.common.core.web.page.PageDomain;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 数据字典(企业类型管理)
|
||||
* @author bonus
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@ApiModel("数据字典(企业类型管理)")
|
||||
public class SysDic extends PageDomain implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private PageDomain pageDomain;
|
||||
|
||||
@Excel(name = "id")
|
||||
@ApiModelProperty(value = "id", required = true)
|
||||
private Integer id;
|
||||
|
||||
@Excel(name = "父id")
|
||||
@ApiModelProperty(value = "父id", required = true)
|
||||
private Integer pId;
|
||||
|
||||
@Excel(name = "编码")
|
||||
@ApiModelProperty(value = "编码", required = true)
|
||||
private String code;
|
||||
|
||||
@Excel(name = "字典名称")
|
||||
@ApiModelProperty(value = "字典名称", required = true)
|
||||
private String name;
|
||||
|
||||
@Excel(name = "描述")
|
||||
@ApiModelProperty(value = "描述", required = true)
|
||||
private String description;
|
||||
|
||||
@Excel(name = "值")
|
||||
@ApiModelProperty(value = "值", required = true)
|
||||
private String value;
|
||||
|
||||
@Excel(name = "排序")
|
||||
@ApiModelProperty(value = "排序", required = true)
|
||||
private String sort;
|
||||
|
||||
@Excel(name = "层级")
|
||||
@ApiModelProperty(value = "层级", required = true)
|
||||
private String level;
|
||||
|
||||
@Excel(name = "状态")
|
||||
@ApiModelProperty(value = "状态", required = true)
|
||||
private String status;
|
||||
|
||||
@Excel(name = "创建时间")
|
||||
@ApiModelProperty(value = "创建时间", required = true)
|
||||
private String createTime;
|
||||
|
||||
@Excel(name = "创建人")
|
||||
@ApiModelProperty(value = "创建人", required = true)
|
||||
private String creator;
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.bonus.common.biz.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* 文件信息
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
public class SysFile
|
||||
{
|
||||
/**
|
||||
* 字典序号
|
||||
*/
|
||||
private Integer dicId;
|
||||
|
||||
/**
|
||||
* 文件名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 文件地址
|
||||
*/
|
||||
private String url;
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package com.bonus.common.biz.domain;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel("附件表")
|
||||
public class SysFileInfo {
|
||||
|
||||
@Excel(name = "id")
|
||||
@ApiModelProperty(value = "id", required = true)
|
||||
private Integer id;
|
||||
|
||||
@Excel(name = "设备id")
|
||||
@ApiModelProperty(value = "设备id", required = true)
|
||||
private Integer modelId;
|
||||
|
||||
@Excel(name = "文件名称")
|
||||
@ApiModelProperty(value = "文件名称", required = true)
|
||||
private String fileName;
|
||||
|
||||
@Excel(name = "文件路径")
|
||||
@ApiModelProperty(value = "文件路径", required = true)
|
||||
private String fileUrl;
|
||||
|
||||
@Excel(name = "字典id")
|
||||
@ApiModelProperty(value = "字典id", required = true)
|
||||
private Integer dicId;
|
||||
|
||||
@Excel(name = "创建人")
|
||||
@ApiModelProperty(value = "创建人", required = true)
|
||||
private String creator;
|
||||
|
||||
@Excel(name = "创建时间")
|
||||
@ApiModelProperty(value = "创建时间", required = true)
|
||||
private String createTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,163 @@
|
|||
package com.bonus.material.device.domain;
|
||||
|
||||
import com.bonus.common.biz.domain.SysFileInfo;
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备信息对象 ma_dev_info
|
||||
*
|
||||
* @author syruan
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Data
|
||||
@ToString
|
||||
public class DevInfo extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 429270031714225761L;
|
||||
|
||||
/** 设备id */
|
||||
@Excel(name = "设备id")
|
||||
@ApiModelProperty(value = "设备id")
|
||||
private Long maId;
|
||||
|
||||
/** 系统编码 */
|
||||
@Excel(name = "系统编码")
|
||||
@ApiModelProperty(value = "系统编码")
|
||||
private String code;
|
||||
|
||||
/** 类型id */
|
||||
@Excel(name = "类型id")
|
||||
@ApiModelProperty(value = "类型id")
|
||||
private Long typeId;
|
||||
|
||||
/** 设备状态(自有,待上架,上架,在租,下架)考虑数据字典 */
|
||||
@Excel(name = "设备状态(自有,待上架,上架,在租,下架)考虑数据字典")
|
||||
@ApiModelProperty(value = "设备状态(自有,待上架,上架,在租,下架)考虑数据字典")
|
||||
private String maStatus;
|
||||
|
||||
/** 租赁范围 */
|
||||
@Excel(name = "租赁范围")
|
||||
@ApiModelProperty(value = "租赁范围")
|
||||
private Long leaseScope;
|
||||
|
||||
/** 设备所在地 */
|
||||
@Excel(name = "设备所在地")
|
||||
@ApiModelProperty(value = "设备所在地")
|
||||
private String location;
|
||||
|
||||
@Excel(name = "设备所在省id")
|
||||
@ApiModelProperty(value = "设备所在省id")
|
||||
private Integer provinceId;
|
||||
|
||||
@Excel(name = "设备所在市id")
|
||||
@ApiModelProperty(value = "设备所在市id")
|
||||
private Integer cityId;
|
||||
|
||||
@Excel(name = "设备所在区id")
|
||||
@ApiModelProperty(value = "设备所在区id")
|
||||
private Integer areaId;
|
||||
|
||||
/** 设备品牌 */
|
||||
@Excel(name = "设备品牌")
|
||||
@ApiModelProperty(value = "设备品牌")
|
||||
private String brand;
|
||||
|
||||
/** 设备型号 */
|
||||
@Excel(name = "设备型号")
|
||||
@ApiModelProperty(value = "设备型号")
|
||||
private String modelName;
|
||||
|
||||
/** 出厂日期 */
|
||||
@Excel(name = "出厂日期")
|
||||
@ApiModelProperty(value = "出厂日期")
|
||||
private String productionDate;
|
||||
|
||||
/** 工作时长 */
|
||||
@Excel(name = "工作时长")
|
||||
@ApiModelProperty(value = "工作时长")
|
||||
private String workingHours;
|
||||
|
||||
/** 整机序列号 */
|
||||
@Excel(name = "整机序列号")
|
||||
@ApiModelProperty(value = "整机序列号")
|
||||
private String serialNumber;
|
||||
|
||||
/** 设备月租价 */
|
||||
@Excel(name = "设备月租价")
|
||||
@ApiModelProperty(value = "设备月租价")
|
||||
private Float monthLeasePrice;
|
||||
|
||||
/** 设备天租价 */
|
||||
@Excel(name = "设备天租价")
|
||||
@ApiModelProperty(value = "设备天租价")
|
||||
private Float dayLeasePrice;
|
||||
|
||||
/** 设备主照片 */
|
||||
@Excel(name = "设备主照片")
|
||||
@ApiModelProperty(value = "设备主照片")
|
||||
private String picUrl;
|
||||
|
||||
/** 机手月租金 */
|
||||
@Excel(name = "机手月租金")
|
||||
@ApiModelProperty(value = "机手月租金")
|
||||
private Float jsMonthPrice;
|
||||
|
||||
/** 机手天租金 */
|
||||
@Excel(name = "机手天租金")
|
||||
@ApiModelProperty(value = "机手天租金")
|
||||
private Float jsDayPrice;
|
||||
|
||||
/** 详细描述 */
|
||||
@Excel(name = "详细描述")
|
||||
@ApiModelProperty(value = "详细描述")
|
||||
private String description;
|
||||
|
||||
/** gps编号 */
|
||||
@Excel(name = "gps编号")
|
||||
@ApiModelProperty(value = "gps编号")
|
||||
private String gpsCode;
|
||||
|
||||
/** 设备所属公司 */
|
||||
@Excel(name = "设备所属公司")
|
||||
@ApiModelProperty(value = "设备所属公司")
|
||||
private Long ownCo;
|
||||
|
||||
/** 创建人 */
|
||||
@Excel(name = "创建人")
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private Long creator;
|
||||
|
||||
/** 设备规格 */
|
||||
@Excel(name = "设备规格")
|
||||
@ApiModelProperty(value = "设备规格")
|
||||
private String specification;
|
||||
|
||||
/** 订金 */
|
||||
@Excel(name = "订金")
|
||||
@ApiModelProperty(value = "订金")
|
||||
private BigDecimal deposit;
|
||||
|
||||
/** 是否删除 */
|
||||
@Excel(name = "是否配备机手")
|
||||
@ApiModelProperty(value = "是否配备机手")
|
||||
private String isOperator;
|
||||
|
||||
/** 是否删除 */
|
||||
@Excel(name = "是否删除")
|
||||
@ApiModelProperty(value = "是否删除")
|
||||
private String isActive;
|
||||
|
||||
/**文件附件*/
|
||||
private List<SysFileInfo> fileList;
|
||||
|
||||
/**城市*/
|
||||
private String city;
|
||||
}
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
package com.bonus.material.device.domain.vo;
|
||||
|
||||
import com.bonus.material.device.domain.DevInfo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* @author syruan
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Data
|
||||
@ToString
|
||||
public class DevInfoVo extends DevInfo {
|
||||
|
||||
private Integer pageNum;
|
||||
private Integer pageSize;
|
||||
private long parentId;
|
||||
|
||||
/* 装备类别 grandpa */
|
||||
@ApiModelProperty(value = "装备类别")
|
||||
private String typeName;
|
||||
/* 装备组别 parent */
|
||||
@ApiModelProperty(value = "装备组别")
|
||||
private String groupName;
|
||||
/* 装备名称 child */
|
||||
@ApiModelProperty(value = "装备名称")
|
||||
private String deviceName;
|
||||
@ApiModelProperty(value = "收藏id")
|
||||
private int collectId;
|
||||
@ApiModelProperty(value = "公司名称")
|
||||
private String companyName;
|
||||
@ApiModelProperty(value = "公司logo")
|
||||
private String companyLogoUrl;
|
||||
@ApiModelProperty(value = "公司入驻时间")
|
||||
private String companyCreateTime;
|
||||
@ApiModelProperty(value = "公司上架数量")
|
||||
private Long companyUpNum;
|
||||
/* 联系商家,被授权人手机号 */
|
||||
@ApiModelProperty(value = "认证人电话")
|
||||
private String authPhone;
|
||||
@ApiModelProperty(value = "外观图集")
|
||||
private String[] pictures;
|
||||
@ApiModelProperty(value = "关键词")
|
||||
private String keyWord;
|
||||
@ApiModelProperty(value = "搜索数量")
|
||||
private Long searchNum;
|
||||
@ApiModelProperty(value = "检验pdf")
|
||||
private String examinationPdf;
|
||||
@ApiModelProperty(value = "保险pdf")
|
||||
private String insurancePdf;
|
||||
/**上下架id*/
|
||||
@ApiModelProperty(value = "上下架id")
|
||||
private int upId;
|
||||
@ApiModelProperty(value = "搜索月租金最下值")
|
||||
private Integer monthLeasePriceMin;
|
||||
@ApiModelProperty(value = "搜索月租金最大值")
|
||||
private Integer monthLeasePriceMax;
|
||||
@ApiModelProperty(value = "搜索装备年份最小值")
|
||||
private Integer ageMin;
|
||||
@ApiModelProperty(value = "搜索装备年份最大值")
|
||||
private Integer ageMax;
|
||||
@ApiModelProperty(value = "搜索装备工作小时最小值")
|
||||
private Integer workingHoursMin;
|
||||
@ApiModelProperty(value = "搜索装备工作小时最大值")
|
||||
private Integer workingHoursMax;
|
||||
@ApiModelProperty(value = "搜索装备月租金排序 ASC or DESC")
|
||||
private String monthLeasePriceOrderBy; // ASC or DESC
|
||||
@ApiModelProperty(value = "搜索装备更新时间排序 ASC or DESC")
|
||||
private String updateTimeOrderBy; // ASC or DESC
|
||||
@ApiModelProperty(value = "装备分类级别")
|
||||
private Integer level; //ma_type_level 级别: 1,2,3
|
||||
@ApiModelProperty(value = "装备状态")
|
||||
private String maStatusStr;
|
||||
@ApiModelProperty(value = "省份名称")
|
||||
private String provinceStr;
|
||||
@ApiModelProperty(value = "市名称")
|
||||
private String cityStr;
|
||||
@ApiModelProperty(value = "区名称")
|
||||
private String areaStr;
|
||||
@ApiModelProperty(value = "装备类别Id")
|
||||
private String companyId;
|
||||
/* 装备组别 parent */
|
||||
@ApiModelProperty(value = "装备组别Id")
|
||||
private String groupId;
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private Long userId;
|
||||
}
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
package com.bonus.material.device.mapper;
|
||||
|
||||
|
||||
import com.bonus.common.biz.domain.SysDic;
|
||||
import com.bonus.common.biz.domain.SysFile;
|
||||
import com.bonus.material.device.domain.DevInfo;
|
||||
import com.bonus.material.device.domain.vo.DevInfoVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备信息Mapper接口
|
||||
*
|
||||
* @author syruan
|
||||
*/
|
||||
public interface DevInfoMapper {
|
||||
/**
|
||||
* 查询设备信息
|
||||
*
|
||||
* @param maId 设备信息主键
|
||||
* @return 设备信息
|
||||
*/
|
||||
DevInfoVo selectDevInfoByMaId(Long maId);
|
||||
|
||||
int getHotSearchCountByMaId(Long maId);
|
||||
|
||||
int insertHotSearch(Long maId);
|
||||
|
||||
int updateHotSearchByMaId(Long maId);
|
||||
|
||||
/**
|
||||
* 查询设备图片集
|
||||
*
|
||||
* @param maId 设备信息主键
|
||||
* @return 设备图片集
|
||||
*/
|
||||
List<SysFile> getFilesByMaId(Long maId);
|
||||
|
||||
Long getCompanyUpNum(Long ownCo);
|
||||
|
||||
/**
|
||||
* 查询设备信息列表
|
||||
*
|
||||
* @param devInfo 设备信息
|
||||
* @return 设备信息集合
|
||||
*/
|
||||
List<DevInfoVo> selectDevInfoList(DevInfo devInfo);
|
||||
|
||||
List<Object> selectUserCollectByUserId(Long userId);
|
||||
|
||||
List<DevInfoVo> selectDevInfoHotList(DevInfo devInfo);
|
||||
|
||||
/**
|
||||
* 新增设备信息
|
||||
*
|
||||
* @param devInfo 设备信息
|
||||
* @return 结果
|
||||
*/
|
||||
int insertDevInfo(DevInfo devInfo);
|
||||
|
||||
/**
|
||||
* 修改设备信息
|
||||
*
|
||||
* @param devInfo 设备信息
|
||||
* @return 结果
|
||||
*/
|
||||
int updateDevInfo(DevInfo devInfo);
|
||||
|
||||
/**
|
||||
* 删除设备信息
|
||||
*
|
||||
* @param maId 设备信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteDevInfoByMaId(Long maId);
|
||||
|
||||
/**
|
||||
* 批量删除设备信息
|
||||
*
|
||||
* @param maIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteDevInfoByMaIds(Long[] maIds);
|
||||
|
||||
/**
|
||||
* 添加经纬度信息
|
||||
*/
|
||||
// int insertLon(InforMationDto inforMationDto);
|
||||
|
||||
List<SysDic> getSysDic();
|
||||
|
||||
SysDic getSysDicById(Integer id);
|
||||
|
||||
// public List<BaseAddress> getBaseAddress();
|
||||
|
||||
String getBaseAddressById(Integer id);
|
||||
|
||||
List<DevInfoVo> selectDevInfoLists(DevInfoVo devInfo);
|
||||
}
|
||||
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: bonus-material-screen
|
||||
name: bonus-material-mall
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: material_mall_local
|
||||
|
|
|
|||
|
|
@ -0,0 +1,373 @@
|
|||
<?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.bonus.material.device.mapper.DevInfoMapper">
|
||||
<resultMap type="com.bonus.material.device.domain.vo.DevInfoVo" id="DevInfoResult">
|
||||
<result property="maId" column="ma_id" />
|
||||
<result property="code" column="code" />
|
||||
<result property="typeId" column="type_id" />
|
||||
<result property="maStatus" column="ma_status" />
|
||||
<result property="leaseScope" column="lease_scope" />
|
||||
<result property="location" column="location" />
|
||||
<result property="provinceId" column="province_id" />
|
||||
<result property="cityId" column="city_id" />
|
||||
<result property="areaId" column="area_id" />
|
||||
<result property="brand" column="brand" />
|
||||
<result property="modelName" column="model_name" />
|
||||
<result property="productionDate" column="production_date" />
|
||||
<result property="workingHours" column="working_hours" />
|
||||
<result property="serialNumber" column="serial_number" />
|
||||
<result property="monthLeasePrice" column="month_lease_price" />
|
||||
<result property="dayLeasePrice" column="day_lease_price" />
|
||||
<result property="picUrl" column="pic_url" />
|
||||
<result property="jsMonthPrice" column="js_month_price" />
|
||||
<result property="jsDayPrice" column="js_day_price" />
|
||||
<result property="description" column="description" />
|
||||
<result property="gpsCode" column="gps_code" />
|
||||
<result property="ownCo" column="own_co" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="creator" column="creator" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="specification" column="specification" />
|
||||
<result property="deposit" column="deposit" />
|
||||
<result property="isOperator" column="is_operator" />
|
||||
<result property="isActive" column="is_active" />
|
||||
<result property="deviceName" column="device_name" />
|
||||
<result property="groupName" column="group_name" />
|
||||
<result property="companyName" column="company_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDevInfoVo">
|
||||
select ma_id, code, type_id, ma_status, lease_scope, location, province_id, city_id, area_id, brand, model_name, production_date, working_hours, serial_number,
|
||||
month_lease_price, day_lease_price, pic_url, js_month_price, js_day_price, description, gps_code, own_co, create_time,
|
||||
creator, update_time, update_by, specification, deposit, is_operator, is_active, update_time, update_by from ma_dev_info
|
||||
</sql>
|
||||
|
||||
|
||||
|
||||
<select id="selectDevInfoList" parameterType="com.bonus.material.device.domain.vo.DevInfoVo" resultType="com.bonus.material.device.domain.vo.DevInfoVo">
|
||||
select d.*,mt1.type_name as device_name, mt2.type_name as group_name, mt3.type_name as type_name,c.company_name
|
||||
from ma_dev_info d
|
||||
left join ma_type_info mt1 on d.type_id = mt1.type_id
|
||||
left join ma_type_info mt2 on mt1.parent_id = mt2.type_id
|
||||
left join ma_type_info mt3 on mt2.parent_id = mt3.type_id
|
||||
left join bm_company_info c on d.own_co = c.company_id
|
||||
<where>
|
||||
<if test="maId != null "> and d.ma_id = #{maId}</if>
|
||||
<if test="code != null and code != ''"> and d.code = #{code}</if>
|
||||
<if test="typeId != null">
|
||||
<if test="level != null and level == 2">
|
||||
and t.parent_id = #{typeId}
|
||||
</if>
|
||||
<if test="level != null and level == 3">
|
||||
and d.type_id = #{typeId}
|
||||
</if>
|
||||
</if>
|
||||
<if test="maStatus != null and maStatus != ''"> and d.ma_status = #{maStatus}</if>
|
||||
<if test="leaseScope != null "> and d.lease_scope = #{leaseScope}</if>
|
||||
<if test="location != null and location != ''"> and d.location = #{location}</if>
|
||||
<if test="provinceId != null and provinceId != ''"> and d.province_id = #{provinceId}</if>
|
||||
<if test="cityId != null and cityId != ''"> and d.city_id = #{cityId}</if>
|
||||
<if test="areaId != null and areaId != ''"> and d.area_id = #{areaId}</if>
|
||||
<if test="brand != null and brand != ''"> and d.brand = #{brand}</if>
|
||||
<if test="modelName != null and modelName != ''"> and d.model_name like concat('%', #{modelName}, '%')</if>
|
||||
<if test="ageMin != null and ageMin != '' and ageMax != null and ageMax != ''">
|
||||
and DATEDIFF(DATE_FORMAT(now(), '%Y-%m-%d'), d.production_date) >= #{ageMin} * 365
|
||||
and DATEDIFF(DATE_FORMAT(now(), '%Y-%m-%d'), d.production_date) <= #{ageMax} * 365
|
||||
</if>
|
||||
<if test="workingHoursMin != null and workingHoursMin != '' and workingHoursMax != null and workingHoursMax != ''">
|
||||
and d.working_hours >= #{workingHoursMin} and d.working_hours <= #{workingHoursMax}
|
||||
</if>
|
||||
<if test="serialNumber != null and serialNumber != ''"> and d.serial_number = #{serialNumber}</if>
|
||||
<if test="monthLeasePriceMin != null and monthLeasePriceMax != null">
|
||||
and d.month_lease_price >= #{monthLeasePriceMin} and d.month_lease_price <= #{monthLeasePriceMax}
|
||||
</if>
|
||||
<if test="dayLeasePrice != null and dayLeasePrice != ''"> and d.day_lease_price = #{dayLeasePrice}</if>
|
||||
<if test="picUrl != null and picUrl != ''"> and d.pic_url = #{picUrl}</if>
|
||||
<if test="jsMonthPrice != null and jsMonthPrice != ''"> and d.js_month_price = #{jsMonthPrice}</if>
|
||||
<if test="jsDayPrice != null and jsDayPrice != ''"> and d.js_day_price = #{jsDayPrice}</if>
|
||||
<if test="description != null and description != ''"> and d.description = #{description}</if>
|
||||
<if test="gpsCode != null and gpsCode != ''"> and d.gps_code = #{gpsCode}</if>
|
||||
<if test="ownCo != null "> and d.own_co = #{ownCo}</if>
|
||||
<if test="creator != null "> and d.creator = #{creator}</if>
|
||||
<if test="updateBy != null "> and d.update_by = #{updateBy}</if>
|
||||
<if test="specification != null "> and d.specification = #{specification}</if>
|
||||
<if test="deposit != null "> and d.deposit = #{deposit}</if>
|
||||
<if test="isActive != null and isActive != ''"> and d.is_active = #{isActive}</if>
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
and (
|
||||
locate(#{keyWord},mt1.type_name) > 0
|
||||
or locate(#{keyWord},mt2.type_name) > 0
|
||||
or locate(#{keyWord},mt3.type_name) > 0
|
||||
or locate(#{keyWord},c.company_name) > 0
|
||||
or locate(#{keyWord},d.ma_id) > 0
|
||||
or locate(#{keyWord},d.model_name) > 0
|
||||
or locate(#{keyWord},d.specification) > 0
|
||||
or locate(#{keyWord},d.serial_number) > 0
|
||||
or locate(#{keyWord},d.description) > 0
|
||||
)
|
||||
</if>
|
||||
and d.is_active='1'
|
||||
</where>
|
||||
order by
|
||||
d.is_active
|
||||
<if test="monthLeasePriceOrderBy != null and monthLeasePriceOrderBy == 'ASC'">
|
||||
,d.month_lease_price
|
||||
</if>
|
||||
<if test="monthLeasePriceOrderBy != null and monthLeasePriceOrderBy == 'DESC'">
|
||||
,d.month_lease_price DESC
|
||||
</if>
|
||||
<if test="updateTimeOrderBy != null and updateTimeOrderBy == 'ASC'">
|
||||
,d.update_time
|
||||
</if>
|
||||
<if test="updateTimeOrderBy != null and updateTimeOrderBy == 'DESC'">
|
||||
,d.update_time DESC
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectDevInfoHotList" parameterType="com.bonus.material.device.domain.vo.DevInfoVo" resultType="com.bonus.material.device.domain.vo.DevInfoVo">
|
||||
select d.*,t.type_name as device_name,t.parent_name as group_name,c.company_name,search_num
|
||||
from ma_dev_info d
|
||||
left join (select t.*, p.type_name as parent_name
|
||||
from ma_type_info t
|
||||
left join ma_type_info p on t.parent_id=p.type_id) t on d.type_id = t.type_id
|
||||
left join bm_company_info c on d.own_co = c.company_id
|
||||
left join ma_hot_search h on d.ma_id = h.ma_id
|
||||
left join ma_type_info ti on d.type_id = ti.type_id
|
||||
<where>
|
||||
d.is_active='1'
|
||||
<if test="maStatus != null and maStatus != ''"> and d.ma_status = #{maStatus}</if>
|
||||
</where>
|
||||
order by h.search_num
|
||||
</select>
|
||||
|
||||
<select id="selectDevInfoByMaId" parameterType="Long" resultType="com.bonus.material.device.domain.vo.DevInfoVo">
|
||||
select d.*,c.company_name,c.create_time as company_create_time,c.logo_url as company_logo_url,
|
||||
c.auth_phone, mt1.type_name as device_name,
|
||||
mt2.type_name as group_name, mt3.type_name as type_name,
|
||||
col.id as collect_id, h.search_num
|
||||
from ma_dev_info d
|
||||
left join bm_company_info c on d.own_co = c.company_id
|
||||
left join ma_user_collect col on d.ma_id = col.ma_id
|
||||
left join ma_hot_search h on d.ma_id = h.ma_id
|
||||
left join ma_type_info t on d.type_id = t.type_id
|
||||
left join ma_type_info mt1 on d.type_id = mt1.type_id
|
||||
left join ma_type_info mt2 on mt1.parent_id = mt2.type_id
|
||||
left join ma_type_info mt3 on mt2.parent_id = mt3.type_id
|
||||
where d.ma_id = #{maId} and d.is_active='1'
|
||||
</select>
|
||||
|
||||
<select id="getFilesByMaId" parameterType="Long" resultType="com.bonus.common.biz.domain.SysFile">
|
||||
SELECT s.dic_id, s.file_name as name,s.file_url as url
|
||||
from ma_dev_info d
|
||||
left join sys_file_info s on d.ma_id = s.model_id
|
||||
WHERE d.ma_id = #{maId} and d.is_active='1' and s.dic_id in (20,28,29)
|
||||
</select>
|
||||
|
||||
<select id="getCompanyUpNum" parameterType="Long" resultType="Long">
|
||||
select count(d.ma_id) from ma_dev_info d
|
||||
|
||||
where d.own_co= #{ownCo} and d.ma_status in(16,17) and d.is_active='1'
|
||||
GROUP BY d.own_co
|
||||
</select>
|
||||
|
||||
<insert id="insertDevInfo" parameterType="com.bonus.material.device.domain.DevInfo" useGeneratedKeys="true" keyProperty="maId">
|
||||
insert into ma_dev_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="maId != null and maId != '' ">ma_id,</if>
|
||||
<if test="code != null and code != '' ">code,</if>
|
||||
<if test="typeId != null and typeId != ''">type_id,</if>
|
||||
<if test="maStatus != null and maStatus != ''">ma_status,</if>
|
||||
<if test="leaseScope != null and leaseScope != ''">lease_scope,</if>
|
||||
<if test="location != null and location != ''" >location,</if>
|
||||
<if test="provinceId != null and provinceId != ''">province_id,</if>
|
||||
<if test="cityId != null and cityId != ''">city_id,</if>
|
||||
<if test="areaId != null and areaId != ''">area_id,</if>
|
||||
<if test="brand != null and brand != ''">brand,</if>
|
||||
<if test="modelName != null and modelName != ''">model_name,</if>
|
||||
<if test="productionDate != null and productionDate != ''">production_date,</if>
|
||||
<if test="workingHours != null and workingHours != ''">working_hours,</if>
|
||||
<if test="serialNumber != null and serialNumber != ''">serial_number,</if>
|
||||
<if test="monthLeasePrice != null and monthLeasePrice != ''">month_lease_price,</if>
|
||||
<if test="dayLeasePrice != null and dayLeasePrice != ''">day_lease_price,</if>
|
||||
<if test="picUrl != null and picUrl != ''">pic_url,</if>
|
||||
<if test="jsMonthPrice != null and jsMonthPrice != ''">js_month_price,</if>
|
||||
<if test="jsDayPrice != null and jsDayPrice != ''">js_day_price,</if>
|
||||
<if test="description != null and description != ''">description,</if>
|
||||
<if test="gpsCode != null and gpsCode != ''">gps_code,</if>
|
||||
<if test="ownCo != null and ownCo != ''">own_co,</if>
|
||||
<if test="createTime != null and createTime != ''">create_time,</if>
|
||||
<if test="creator != null and creator != ''">creator,</if>
|
||||
<if test="updateTime != null and updateTime != ''">update_time,</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="specification != null and specification != ''">specification,</if>
|
||||
<if test="deposit != null and deposit != ''">deposit,</if>
|
||||
<if test="isOperator != null and isOperator != ''">is_operator,</if>
|
||||
<if test="isActive != null and isActive != ''">is_active,</if>
|
||||
<if test="updateTime != null and updateTime != ''">update_time,</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="maId != null and maId != ''">#{maId},</if>
|
||||
<if test="code != null and code != ''">#{code},</if>
|
||||
<if test="typeId != null and typeId != ''">#{typeId},</if>
|
||||
<if test="maStatus != null and maStatus != ''">#{maStatus},</if>
|
||||
<if test="leaseScope != null and leaseScope != ''">#{leaseScope},</if>
|
||||
<if test="location != null and location != ''">#{location},</if>
|
||||
<if test="provinceId != null and provinceId != ''">#{provinceId},</if>
|
||||
<if test="cityId != null and cityId != ''">#{cityId},</if>
|
||||
<if test="areaId != null and areaId != ''">#{areaId},</if>
|
||||
<if test="brand != null and brand != ''">#{brand},</if>
|
||||
<if test="modelName != null and modelName != ''">#{modelName},</if>
|
||||
<if test="productionDate != null and productionDate != ''">#{productionDate},</if>
|
||||
<if test="workingHours != null and workingHours != ''">#{workingHours},</if>
|
||||
<if test="serialNumber != null and serialNumber != ''">#{serialNumber},</if>
|
||||
<if test="monthLeasePrice != null and monthLeasePrice != ''">#{monthLeasePrice},</if>
|
||||
<if test="dayLeasePrice != null and dayLeasePrice != ''">#{dayLeasePrice},</if>
|
||||
<if test="picUrl != null and picUrl != ''">#{picUrl},</if>
|
||||
<if test="jsMonthPrice != null and jsMonthPrice != ''">#{jsMonthPrice},</if>
|
||||
<if test="jsDayPrice != null and jsDayPrice != ''">#{jsDayPrice},</if>
|
||||
<if test="description != null and description != ''">#{description},</if>
|
||||
<if test="gpsCode != null and gpsCode != ''">#{gpsCode},</if>
|
||||
<if test="ownCo != null and ownCo != ''">#{ownCo},</if>
|
||||
<if test="createTime != null and createTime != ''">#{createTime},</if>
|
||||
<if test="creator != null and creator != ''">#{creator},</if>
|
||||
<if test="updateTime != null and updateTime != ''">#{update_time},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{update_by},</if>
|
||||
<if test="specification != null and specification != ''">#{specification},</if>
|
||||
<if test="deposit != null and deposit != ''">#{deposit},</if>
|
||||
<if test="isOperator != null and isOperator != ''">#{isOperator},</if>
|
||||
<if test="isActive != null and isActive != ''">#{isActive},</if>
|
||||
<if test="updateTime != null and updateTime != ''">#{updateTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertLon">
|
||||
insert into gps_real_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="dto.gpsCode != null and dto.gpsCode != ''">gps_code,</if>
|
||||
<if test="dto.lon != null and dto.lon !=''">lon,</if>
|
||||
<if test="dto.lat != null and dto.lat != ''">lat,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="dto.gpsCode != null and dto.gpsCode != ''">#{dto.gpsCode},</if>
|
||||
<if test="dto.lon != null and dto.lon !=''">#{dto.lon},</if>
|
||||
<if test="dto.lat != null and dto.lat != ''">#{dto.lat},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDevInfo" parameterType="com.bonus.material.device.domain.DevInfo">
|
||||
update ma_dev_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="code != null">code = #{code},</if>
|
||||
<if test="typeId != null">type_id = #{typeId},</if>
|
||||
<if test="maStatus != null">ma_status = #{maStatus},</if>
|
||||
<if test="leaseScope != null">lease_scope = #{leaseScope},</if>
|
||||
<if test="location != null">location = #{location},</if>
|
||||
<if test="provinceId != null">province_id = #{provinceId},</if>
|
||||
<if test="cityId != null">city_id = #{cityId},</if>
|
||||
<if test="areaId != null">area_id = #{areaId},</if>
|
||||
<if test="brand != null">brand = #{brand},</if>
|
||||
<if test="modelName != null">model_name = #{modelName},</if>
|
||||
<if test="productionDate != null">production_date = #{productionDate},</if>
|
||||
<if test="workingHours != null">working_hours = #{workingHours},</if>
|
||||
<if test="serialNumber != null">serial_number = #{serialNumber},</if>
|
||||
<if test="monthLeasePrice != null">month_lease_price = #{monthLeasePrice},</if>
|
||||
<if test="dayLeasePrice != null">day_lease_price = #{dayLeasePrice},</if>
|
||||
<if test="picUrl != null">pic_url = #{picUrl},</if>
|
||||
<if test="jsMonthPrice != null">js_month_price = #{jsMonthPrice},</if>
|
||||
<if test="jsDayPrice != null">js_day_price = #{jsDayPrice},</if>
|
||||
<if test="description != null">description = #{description},</if>
|
||||
<if test="gpsCode != null">gps_code = #{gpsCode},</if>
|
||||
<if test="ownCo != null">own_co = #{ownCo},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="creator != null">creator = #{creator},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="specification != null">specification = #{specification},</if>
|
||||
<if test="deposit != null">deposit = #{deposit},</if>
|
||||
<if test="isOperator != null">is_active = #{isOperator},</if>
|
||||
<if test="isActive != null">is_active = #{isActive},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
</trim>
|
||||
where ma_id = #{maId}
|
||||
</update>
|
||||
|
||||
<update id="deleteDevInfoByMaId" parameterType="Long">
|
||||
update ma_dev_info set is_active='0' where ma_id = #{maId}
|
||||
</update>
|
||||
|
||||
<update id="deleteDevInfoByMaIds" parameterType="String">
|
||||
update ma_dev_info set is_active='0' where ma_id in
|
||||
<foreach item="maId" collection="array" open="(" separator="," close=")">
|
||||
#{maId}
|
||||
</foreach>
|
||||
</update>
|
||||
<select id="productList" parameterType="com.bonus.material.device.domain.DevInfo" resultType="com.bonus.zlpt.equip.api.domain.vo.MaDevInfoVo">
|
||||
select d.*,t.type_name as device_name,t.parent_name as group_name,c.company_name
|
||||
from ma_dev_info d
|
||||
left join (select t.*, p.type_name as parent_name
|
||||
from ma_type_info t
|
||||
left join ma_type_info p on t.parent_id=p.type_id) t on d.type_id = t.type_id
|
||||
left join bm_company_info c on d.own_co = c.company_id
|
||||
|
||||
</select>
|
||||
|
||||
<select id="selectUserCollectByUserId" parameterType="Long" resultType="java.lang.Object">
|
||||
select id, user_id, ma_id, time from ma_user_collect
|
||||
where user_id = #{userId}
|
||||
</select>
|
||||
|
||||
<select id="getHotSearchCountByMaId" resultType="Integer">
|
||||
select count(1) from ma_hot_search
|
||||
where ma_id = #{maId}
|
||||
</select>
|
||||
|
||||
<insert id="insertHotSearch">
|
||||
INSERT INTO ma_hot_search (ma_id, search_num)
|
||||
VALUES (#{maId}, 1)
|
||||
</insert>
|
||||
|
||||
<update id="updateHotSearchByMaId" parameterType="Long">
|
||||
update ma_hot_search
|
||||
set search_num = search_num + 1
|
||||
where ma_id = #{maId}
|
||||
</update>
|
||||
|
||||
<select id="getSysDic" resultType="com.bonus.common.biz.domain.SysDic">
|
||||
select
|
||||
id,p_id,code,`name`,description,`value`,sort,`level`,status,create_time,creator
|
||||
from sys_dic
|
||||
</select>
|
||||
|
||||
<select id="getSysDicById" resultType="com.bonus.common.biz.domain.SysDic">
|
||||
select
|
||||
id,p_id,code,`name`,description,`value`,sort,`level`,status,create_time,creator
|
||||
from sys_dic
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<!-- <select id="getBaseAddress" resultType="com.bonus.zlpt.system.api.domain.BaseAddress">-->
|
||||
<!-- select id,name,code from base_address where status = 1-->
|
||||
<!-- </select>-->
|
||||
|
||||
<select id="getBaseAddressById" resultType="String">
|
||||
select name from base_address where status = 1 and id = #{id}
|
||||
</select>
|
||||
<select id="selectDevInfoLists" resultType="com.bonus.material.device.domain.vo.DevInfoVo">
|
||||
select d.*,t.type_name as device_name,t.parent_name as group_name,c.company_name,u.type as type,t.group_name as type_name,t.p_id as group_id,t.group_id as company_id
|
||||
from ma_dev_info d
|
||||
left join (select t.*, p.type_name as parent_name, p.type_id as p_id,mt.type_name as group_name, mt.type_id as group_id
|
||||
from ma_type_info t
|
||||
left join ma_type_info p on t.parent_id=p.type_id
|
||||
left join ma_type_info mt on p.parent_id = mt.type_id
|
||||
) t on d.type_id = t.type_id
|
||||
left join bm_company_info c on d.own_co = c.company_id
|
||||
left join ma_up_off u on d.ma_id = u.ma_id ORDER BY d.create_time desc
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -9,9 +9,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<modules>
|
||||
<module>bonus-material</module>
|
||||
<module>bonus-material-mall</module>
|
||||
<module>bonus-material-screen</module>
|
||||
</modules>
|
||||
|
||||
<artifactId>bonus-modules</artifactId>
|
||||
|
|
|
|||
Loading…
Reference in New Issue