This commit is contained in:
sxu 2023-12-09 11:23:59 +08:00
parent d3704ad147
commit bb7d6fb77c
9 changed files with 130 additions and 13 deletions

View File

@ -50,6 +50,18 @@ public class DevInfo extends BaseEntity
@ApiModelProperty(value = "设备所在地") @ApiModelProperty(value = "设备所在地")
private String location; 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 = "设备品牌") @Excel(name = "设备品牌")
@ApiModelProperty(value = "设备品牌") @ApiModelProperty(value = "设备品牌")
@ -83,7 +95,7 @@ public class DevInfo extends BaseEntity
/** 设备天租价 */ /** 设备天租价 */
@Excel(name = "设备天租价") @Excel(name = "设备天租价")
@ApiModelProperty(value = "设备天租价") @ApiModelProperty(value = "设备天租价")
private String dayLeasePrice; private Float dayLeasePrice;
/** 设备主照片 */ /** 设备主照片 */
@Excel(name = "设备主照片") @Excel(name = "设备主照片")
@ -93,12 +105,12 @@ public class DevInfo extends BaseEntity
/** 机手月租金 */ /** 机手月租金 */
@Excel(name = "机手月租金") @Excel(name = "机手月租金")
@ApiModelProperty(value = "机手月租金") @ApiModelProperty(value = "机手月租金")
private String jsMonthPrice; private Float jsMonthPrice;
/** 机手天租金 */ /** 机手天租金 */
@Excel(name = "机手天租金") @Excel(name = "机手天租金")
@ApiModelProperty(value = "机手天租金") @ApiModelProperty(value = "机手天租金")
private String jsDayPrice; private Float jsDayPrice;
/** 详细描述 */ /** 详细描述 */
@Excel(name = "详细描述") @Excel(name = "详细描述")

View File

@ -70,4 +70,5 @@ public class DevInfoVo extends DevInfo {
@ApiModelProperty(value = "搜索装备更新时间排序 ASC or DESC") @ApiModelProperty(value = "搜索装备更新时间排序 ASC or DESC")
private String updateTimeOrderBy; // ASC or DESC private String updateTimeOrderBy; // ASC or DESC
private Integer level; //ma_type_level 级别: 1,2,3 private Integer level; //ma_type_level 级别: 1,2,3
private String maStatusStr;
} }

View File

@ -0,0 +1,68 @@
package com.bonus.zlpt.system.api.domain;
import com.bonus.zlpt.common.core.annotation.Excel;
import com.bonus.zlpt.common.core.web.page.PageDomain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 数据字典企业类型管理
*/
@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel("数据字典(企业类型管理)")
public class SysDic extends PageDomain {
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;
}

View File

@ -48,6 +48,10 @@ public class OrderDetails extends BaseEntity
@Excel(name = "工期时长") @Excel(name = "工期时长")
private String duration; private String duration;
/** 工期时长类型 */
@Excel(name = "工期时长类型 0-日 1-月")
private String durationType;
/** 发票类型 */ /** 发票类型 */
@Excel(name = "发票类型 1-增值税普票 2-增值税专票") @Excel(name = "发票类型 1-增值税普票 2-增值税专票")
private String invoiceType; private String invoiceType;

View File

@ -51,6 +51,8 @@ public class OrderInfoVo extends OrderInfo {
private String address; private String address;
@ApiModelProperty(value = "工期时长") @ApiModelProperty(value = "工期时长")
private String duration; private String duration;
@ApiModelProperty(name = "工期时长类型 0-日 1-月")
private String durationType;
@ApiModelProperty(value = "发票类型 1-增值税普票 2-增值税专票") @ApiModelProperty(value = "发票类型 1-增值税普票 2-增值税专票")
private String invoiceType; private String invoiceType;
@ApiModelProperty(value = "项目说明") @ApiModelProperty(value = "项目说明")

View File

@ -1,13 +1,12 @@
package com.bonus.zlpt.equip.mapper; package com.bonus.zlpt.equip.mapper;
import java.util.List; import java.util.List;
import com.bonus.zlpt.common.core.domain.system.SysFile; import com.bonus.zlpt.common.core.domain.system.SysFile;
import com.bonus.zlpt.equip.api.domain.DevInfo; import com.bonus.zlpt.equip.api.domain.DevInfo;
import com.bonus.zlpt.equip.api.domain.dto.InforMationDto; import com.bonus.zlpt.equip.api.domain.dto.InforMationDto;
import com.bonus.zlpt.equip.api.domain.vo.DevInfoVo; import com.bonus.zlpt.equip.api.domain.vo.DevInfoVo;
import com.bonus.zlpt.system.api.domain.SysDic;
/** /**
* 设备信息Mapper接口 * 设备信息Mapper接口
@ -83,4 +82,6 @@ public interface DevInfoMapper
* @return * @return
*/ */
int insertLon(InforMationDto inforMationDto); int insertLon(InforMationDto inforMationDto);
public List<SysDic> getSysDic();
} }

View File

@ -2,23 +2,19 @@ package com.bonus.zlpt.equip.service.impl;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.bonus.zlpt.equip.api.domain.DevInfo; import com.bonus.zlpt.equip.api.domain.DevInfo;
import com.bonus.zlpt.equip.api.domain.SysFileInfo; import com.bonus.zlpt.equip.api.domain.SysFileInfo;
import com.bonus.zlpt.equip.api.domain.dto.InforMationDto; import com.bonus.zlpt.equip.api.domain.dto.InforMationDto;
import com.bonus.zlpt.equip.api.domain.vo.DevInfoVo; import com.bonus.zlpt.equip.api.domain.vo.DevInfoVo;
import com.bonus.zlpt.common.core.domain.system.SysFile; import com.bonus.zlpt.common.core.domain.system.SysFile;
import com.bonus.zlpt.common.core.utils.DateUtils; import com.bonus.zlpt.common.core.utils.DateUtils;
import com.bonus.zlpt.system.api.domain.SysDic;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import com.bonus.zlpt.equip.mapper.SysFileInfoMapper; import com.bonus.zlpt.equip.mapper.SysFileInfoMapper;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.bonus.zlpt.equip.mapper.DevInfoMapper; import com.bonus.zlpt.equip.mapper.DevInfoMapper;
import com.bonus.zlpt.equip.service.IDevInfoService; import com.bonus.zlpt.equip.service.IDevInfoService;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import javax.annotation.Resource; import javax.annotation.Resource;
/** /**
@ -85,7 +81,16 @@ public class DevInfoServiceImpl implements IDevInfoService
@Override @Override
public List<DevInfoVo> selectDevInfoList(DevInfoVo devInfo) public List<DevInfoVo> selectDevInfoList(DevInfoVo devInfo)
{ {
return devInfoMapper.selectDevInfoList(devInfo); List<DevInfoVo> list = devInfoMapper.selectDevInfoList(devInfo);
List<SysDic> sysDics = devInfoMapper.getSysDic();
for (DevInfoVo devInfoVo : list) {
for (SysDic sysDic : sysDics) {
if (devInfoVo.getMaStatus().equals(String.valueOf(sysDic.getId()))) {
devInfoVo.setMaStatusStr(sysDic.getName());
}
}
}
return list;
} }
@Override @Override

View File

@ -10,6 +10,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="maStatus" column="ma_status" /> <result property="maStatus" column="ma_status" />
<result property="leaseScope" column="lease_scope" /> <result property="leaseScope" column="lease_scope" />
<result property="location" column="location" /> <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="brand" column="brand" />
<result property="modelName" column="model_name" /> <result property="modelName" column="model_name" />
<result property="productionDate" column="production_date" /> <result property="productionDate" column="production_date" />
@ -39,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectDevInfoVo"> <sql id="selectDevInfoVo">
select ma_id, code, type_id, ma_status, lease_scope, location, brand, model_name, production_date, working_hours, serial_number, 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, 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 creator, update_time, update_by, specification, deposit, is_operator, is_active, update_time, update_by from ma_dev_info
</sql> </sql>
@ -70,6 +73,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="maStatus != null and maStatus != ''"> and d.ma_status = #{maStatus}</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="leaseScope != null "> and d.lease_scope = #{leaseScope}</if>
<if test="location != null and location != ''"> and d.location = #{location}</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="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="modelName != null and modelName != ''"> and d.model_name like concat('%', #{modelName}, '%')</if>
<if test="ageMin != null and ageMin != '' and ageMax != null and ageMax != ''"> <if test="ageMin != null and ageMin != '' and ageMax != null and ageMax != ''">
@ -201,6 +207,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="maStatus != null">ma_status,</if> <if test="maStatus != null">ma_status,</if>
<if test="leaseScope != null">lease_scope,</if> <if test="leaseScope != null">lease_scope,</if>
<if test="location != null">location,</if> <if test="location != null">location,</if>
<if test="provinceId != null">provinceId,</if>
<if test="cityId != null">cityId,</if>
<if test="areaId != null">areaId,</if>
<if test="brand != null">brand,</if> <if test="brand != null">brand,</if>
<if test="modelName != null">model_name,</if> <if test="modelName != null">model_name,</if>
<if test="productionDate != null">production_date,</if> <if test="productionDate != null">production_date,</if>
@ -232,6 +241,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="maStatus != null">#{maStatus},</if> <if test="maStatus != null">#{maStatus},</if>
<if test="leaseScope != null">#{leaseScope},</if> <if test="leaseScope != null">#{leaseScope},</if>
<if test="location != null">#{location},</if> <if test="location != null">#{location},</if>
<if test="provinceId != null">#{provinceId},</if>
<if test="cityId != null">#{cityId},</if>
<if test="areaId != null">#{areaId},</if>
<if test="brand != null">#{brand},</if> <if test="brand != null">#{brand},</if>
<if test="modelName != null">#{modelName},</if> <if test="modelName != null">#{modelName},</if>
<if test="productionDate != null">#{productionDate},</if> <if test="productionDate != null">#{productionDate},</if>
@ -280,6 +292,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="maStatus != null">ma_status = #{maStatus},</if> <if test="maStatus != null">ma_status = #{maStatus},</if>
<if test="leaseScope != null">lease_scope = #{leaseScope},</if> <if test="leaseScope != null">lease_scope = #{leaseScope},</if>
<if test="location != null">location = #{location},</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="brand != null">brand = #{brand},</if>
<if test="modelName != null">model_name = #{modelName},</if> <if test="modelName != null">model_name = #{modelName},</if>
<if test="productionDate != null">production_date = #{productionDate},</if> <if test="productionDate != null">production_date = #{productionDate},</if>
@ -326,4 +341,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join bm_company_info c on d.own_co = c.company_id left join bm_company_info c on d.own_co = c.company_id
</select> </select>
<select id="getSysDic" resultType="com.bonus.zlpt.system.api.domain.SysDic">
select
id,p_id,code,`name`,description,`value`,sort,`level`,status,create_time,creator
from sys_dic
</select>
</mapper> </mapper>

View File

@ -99,6 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="addressId != null">address_id,</if> <if test="addressId != null">address_id,</if>
<if test="address != null">address,</if> <if test="address != null">address,</if>
<if test="duration != null">duration,</if> <if test="duration != null">duration,</if>
<if test="durationType != null">durationType,</if>
<if test="invoiceType != null">invoice_type,</if> <if test="invoiceType != null">invoice_type,</if>
<if test="description != null">description,</if> <if test="description != null">description,</if>
<if test="maId != null">ma_id,</if> <if test="maId != null">ma_id,</if>
@ -122,6 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="addressId != null">#{addressId},</if> <if test="addressId != null">#{addressId},</if>
<if test="address != null">#{address},</if> <if test="address != null">#{address},</if>
<if test="duration != null">#{duration},</if> <if test="duration != null">#{duration},</if>
<if test="durationType != null">#{durationType},</if>
<if test="invoiceType != null">#{invoiceType},</if> <if test="invoiceType != null">#{invoiceType},</if>
<if test="description != null">#{description},</if> <if test="description != null">#{description},</if>
<if test="maId != null">#{maId},</if> <if test="maId != null">#{maId},</if>
@ -169,6 +171,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="addressId != null">address_id = #{addressId},</if> <if test="addressId != null">address_id = #{addressId},</if>
<if test="address != null">address = #{address},</if> <if test="address != null">address = #{address},</if>
<if test="duration != null">duration = #{duration},</if> <if test="duration != null">duration = #{duration},</if>
<if test="durationType != null">duration_type = #{durationType},</if>
<if test="invoiceType != null">invoice_type = #{invoiceType},</if> <if test="invoiceType != null">invoice_type = #{invoiceType},</if>
<if test="description != null">description = #{description},</if> <if test="description != null">description = #{description},</if>
<if test="maId != null">ma_id = #{maId},</if> <if test="maId != null">ma_id = #{maId},</if>