From 55fe18c5f273ff0a0b80189dbd16e93a98338ed0 Mon Sep 17 00:00:00 2001 From: mashuai Date: Fri, 22 Nov 2024 09:39:07 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bootstrap-material_mall_local.yml | 26 +++++++++++++++++++ .../src/main/resources/bootstrap.yml | 4 +-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 bonus-modules/bonus-material-mall/src/main/resources/bootstrap-material_mall_local.yml diff --git a/bonus-modules/bonus-material-mall/src/main/resources/bootstrap-material_mall_local.yml b/bonus-modules/bonus-material-mall/src/main/resources/bootstrap-material_mall_local.yml new file mode 100644 index 0000000..4ca96bf --- /dev/null +++ b/bonus-modules/bonus-material-mall/src/main/resources/bootstrap-material_mall_local.yml @@ -0,0 +1,26 @@ +# Tomcat +server: + port: 18589 + +# Spring +spring: + cloud: + nacos: + discovery: + # 服务注册地址 + server-addr: 127.0.0.1:8848 + namespace: material_mall + config: + # 配置中心地址 + server-addr: 127.0.0.1:8848 + namespace: material_mall + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + +#加密组件 +jasypt: + encryptor: + password: Encrypt diff --git a/bonus-modules/bonus-material-mall/src/main/resources/bootstrap.yml b/bonus-modules/bonus-material-mall/src/main/resources/bootstrap.yml index 8a1b9da..dfda269 100644 --- a/bonus-modules/bonus-material-mall/src/main/resources/bootstrap.yml +++ b/bonus-modules/bonus-material-mall/src/main/resources/bootstrap.yml @@ -2,7 +2,7 @@ spring: application: # 应用名称 - name: bonus-material-screen + name: bonus-material-mall profiles: # 环境配置 - active: sgzb_bns_local + active: material_mall_local From 5d7d542b9c1426a1934afefbc0010f6018d205ee Mon Sep 17 00:00:00 2001 From: syruan <321359594@qq.com> Date: Fri, 22 Nov 2024 10:16:54 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=EF=BC=8C=E5=AD=97=E5=85=B8domain?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/bonus/common/biz/domain/SysDic.java | 68 ++++ .../com/bonus/common/biz/domain/SysFile.java | 29 ++ .../bonus/common/biz/domain/SysFileInfo.java | 39 ++ .../bonus/material/device/domain/DevInfo.java | 163 ++++++++ .../material/device/domain/vo/DevInfoVo.java | 89 +++++ .../material/device/mapper/DevInfoMapper.java | 100 +++++ .../resources/mapper/device/DevInfoMapper.xml | 373 ++++++++++++++++++ bonus-modules/pom.xml | 2 - 8 files changed, 861 insertions(+), 2 deletions(-) create mode 100644 bonus-common-biz/src/main/java/com/bonus/common/biz/domain/SysDic.java create mode 100644 bonus-common-biz/src/main/java/com/bonus/common/biz/domain/SysFile.java create mode 100644 bonus-common-biz/src/main/java/com/bonus/common/biz/domain/SysFileInfo.java create mode 100644 bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/domain/DevInfo.java create mode 100644 bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/domain/vo/DevInfoVo.java create mode 100644 bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/mapper/DevInfoMapper.java create mode 100644 bonus-modules/bonus-material-mall/src/main/resources/mapper/device/DevInfoMapper.xml diff --git a/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/SysDic.java b/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/SysDic.java new file mode 100644 index 0000000..26f7dac --- /dev/null +++ b/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/SysDic.java @@ -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; +} diff --git a/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/SysFile.java b/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/SysFile.java new file mode 100644 index 0000000..f07094c --- /dev/null +++ b/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/SysFile.java @@ -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; +} diff --git a/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/SysFileInfo.java b/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/SysFileInfo.java new file mode 100644 index 0000000..dd84194 --- /dev/null +++ b/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/SysFileInfo.java @@ -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; +} diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/domain/DevInfo.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/domain/DevInfo.java new file mode 100644 index 0000000..919153f --- /dev/null +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/domain/DevInfo.java @@ -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 fileList; + + /**城市*/ + private String city; +} diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/domain/vo/DevInfoVo.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/domain/vo/DevInfoVo.java new file mode 100644 index 0000000..caf1e7d --- /dev/null +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/domain/vo/DevInfoVo.java @@ -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; +} diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/mapper/DevInfoMapper.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/mapper/DevInfoMapper.java new file mode 100644 index 0000000..4f7528d --- /dev/null +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/mapper/DevInfoMapper.java @@ -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 getFilesByMaId(Long maId); + + Long getCompanyUpNum(Long ownCo); + + /** + * 查询设备信息列表 + * + * @param devInfo 设备信息 + * @return 设备信息集合 + */ + List selectDevInfoList(DevInfo devInfo); + + List selectUserCollectByUserId(Long userId); + + List 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 getSysDic(); + + SysDic getSysDicById(Integer id); + +// public List getBaseAddress(); + + String getBaseAddressById(Integer id); + + List selectDevInfoLists(DevInfoVo devInfo); +} + diff --git a/bonus-modules/bonus-material-mall/src/main/resources/mapper/device/DevInfoMapper.xml b/bonus-modules/bonus-material-mall/src/main/resources/mapper/device/DevInfoMapper.xml new file mode 100644 index 0000000..4e36700 --- /dev/null +++ b/bonus-modules/bonus-material-mall/src/main/resources/mapper/device/DevInfoMapper.xml @@ -0,0 +1,373 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + + + + + + + + + insert into ma_dev_info + + 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, + + + #{maId}, + #{code}, + #{typeId}, + #{maStatus}, + #{leaseScope}, + #{location}, + #{provinceId}, + #{cityId}, + #{areaId}, + #{brand}, + #{modelName}, + #{productionDate}, + #{workingHours}, + #{serialNumber}, + #{monthLeasePrice}, + #{dayLeasePrice}, + #{picUrl}, + #{jsMonthPrice}, + #{jsDayPrice}, + #{description}, + #{gpsCode}, + #{ownCo}, + #{createTime}, + #{creator}, + #{update_time}, + #{update_by}, + #{specification}, + #{deposit}, + #{isOperator}, + #{isActive}, + #{updateTime}, + #{updateBy}, + + + + + insert into gps_real_info + + gps_code, + lon, + lat, + + + #{dto.gpsCode}, + #{dto.lon}, + #{dto.lat}, + + + + + update ma_dev_info + + code = #{code}, + type_id = #{typeId}, + ma_status = #{maStatus}, + lease_scope = #{leaseScope}, + location = #{location}, + province_id = #{provinceId}, + city_id = #{cityId}, + area_id = #{areaId}, + brand = #{brand}, + model_name = #{modelName}, + production_date = #{productionDate}, + working_hours = #{workingHours}, + serial_number = #{serialNumber}, + month_lease_price = #{monthLeasePrice}, + day_lease_price = #{dayLeasePrice}, + pic_url = #{picUrl}, + js_month_price = #{jsMonthPrice}, + js_day_price = #{jsDayPrice}, + description = #{description}, + gps_code = #{gpsCode}, + own_co = #{ownCo}, + create_time = #{createTime}, + creator = #{creator}, + update_by = #{updateBy}, + update_time = #{updateTime}, + specification = #{specification}, + deposit = #{deposit}, + is_active = #{isOperator}, + is_active = #{isActive}, + update_time = #{updateTime}, + update_by = #{updateBy}, + + where ma_id = #{maId} + + + + update ma_dev_info set is_active='0' where ma_id = #{maId} + + + + update ma_dev_info set is_active='0' where ma_id in + + #{maId} + + + + + + + + + + INSERT INTO ma_hot_search (ma_id, search_num) + VALUES (#{maId}, 1) + + + + update ma_hot_search + set search_num = search_num + 1 + where ma_id = #{maId} + + + + + + + + + + + + + diff --git a/bonus-modules/pom.xml b/bonus-modules/pom.xml index db3eed7..c300b13 100644 --- a/bonus-modules/pom.xml +++ b/bonus-modules/pom.xml @@ -9,9 +9,7 @@ 4.0.0 - bonus-material bonus-material-mall - bonus-material-screen bonus-modules